summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/src')
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp11
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.h5
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp5
-rw-r--r--WebKit/chromium/src/ContextMenuClientImpl.cpp6
-rw-r--r--WebKit/chromium/src/DebuggerAgentImpl.cpp1
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp6
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.h2
-rw-r--r--WebKit/chromium/src/GraphicsContext3D.cpp21
-rw-r--r--WebKit/chromium/src/InspectorFrontendClientImpl.cpp5
-rw-r--r--WebKit/chromium/src/InspectorFrontendClientImpl.h1
-rw-r--r--WebKit/chromium/src/WebAccessibilityObject.cpp45
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.h2
-rw-r--r--WebKit/chromium/src/WebDeviceOrientationClientMock.cpp6
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp8
-rw-r--r--WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebIDBCallbacksImpl.cpp8
-rw-r--r--WebKit/chromium/src/WebKit.cpp5
-rw-r--r--WebKit/chromium/src/WebScrollbarImpl.cpp14
-rw-r--r--WebKit/chromium/src/WebScrollbarImpl.h2
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp35
-rw-r--r--WebKit/chromium/src/WebViewImpl.h6
-rw-r--r--WebKit/chromium/src/js/Tests.js239
-rw-r--r--[-rwxr-xr-x]WebKit/chromium/src/js/devTools.css0
-rw-r--r--WebKit/chromium/src/mac/WebInputEventFactory.mm21
-rw-r--r--WebKit/chromium/src/win/WebInputEventFactory.cpp3
26 files changed, 168 insertions, 299 deletions
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index e6f1400..8a3eda6 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -59,6 +59,7 @@
#include "SearchPopupMenuChromium.h"
#include "ScriptController.h"
#include "SecurityOrigin.h"
+#include "SharedGraphicsContext3D.h"
#include "WebGeolocationService.h"
#if USE(V8)
#include "V8Proxy.h"
@@ -749,8 +750,18 @@ void ChromeClientImpl::scheduleCompositingLayerSync()
{
m_webView->setRootLayerNeedsDisplay();
}
+
+bool ChromeClientImpl::allowsAcceleratedCompositing() const
+{
+ return m_webView->allowsAcceleratedCompositing();
+}
#endif
+WebCore::SharedGraphicsContext3D* ChromeClientImpl::getSharedGraphicsContext3D()
+{
+ return m_webView->getSharedGraphicsContext3D();
+}
+
bool ChromeClientImpl::supportsFullscreenForNode(const WebCore::Node* node)
{
if (m_webView->client() && node->hasTagName(WebCore::HTMLNames::videoTag))
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index bff9f90..d16d8f6 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -150,8 +150,13 @@ public:
// Sets a flag to specify that the view needs to be updated, so we need
// to do an eager layout before the drawing.
virtual void scheduleCompositingLayerSync();
+
+ // Returns true if accelerated compositing is supported.
+ virtual bool allowsAcceleratedCompositing() const;
#endif
+ virtual WebCore::SharedGraphicsContext3D* getSharedGraphicsContext3D();
+
virtual bool supportsFullscreenForNode(const WebCore::Node*);
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 911dcf3..3ced7b8 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -823,6 +823,11 @@ int ChromiumBridge::memoryUsageMB()
return static_cast<int>(webKitClient()->memoryUsageMB());
}
+int ChromiumBridge::actualMemoryUsageMB()
+{
+ return static_cast<int>(webKitClient()->actualMemoryUsageMB());
+}
+
int ChromiumBridge::screenDepth(Widget* widget)
{
WebWidgetClient* client = toWebWidgetClient(widget);
diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp
index 1dc2ee7..ef611e1 100644
--- a/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -98,7 +98,7 @@ static bool isASingleWord(const String& text)
static String selectMisspelledWord(const ContextMenu* defaultMenu, Frame* selectedFrame)
{
// First select from selectedText to check for multiple word selection.
- String misspelledWord = selectedFrame->selectedText().stripWhiteSpace();
+ String misspelledWord = selectedFrame->editor()->selectedText().stripWhiteSpace();
// If some texts were already selected, we don't change the selection.
if (!misspelledWord.isEmpty()) {
@@ -119,7 +119,7 @@ static String selectMisspelledWord(const ContextMenu* defaultMenu, Frame* select
return misspelledWord; // It is empty.
WebFrameImpl::selectWordAroundPosition(selectedFrame, pos);
- misspelledWord = selectedFrame->selectedText().stripWhiteSpace();
+ misspelledWord = selectedFrame->editor()->selectedText().stripWhiteSpace();
#if OS(DARWIN)
// If misspelled word is still empty, then that portion should not be
@@ -233,7 +233,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
data.frameURL = urlFromFrame(selectedFrame);
if (r.isSelected())
- data.selectedText = selectedFrame->selectedText().stripWhiteSpace();
+ data.selectedText = selectedFrame->editor()->selectedText().stripWhiteSpace();
if (r.isContentEditable()) {
data.isEditable = true;
diff --git a/WebKit/chromium/src/DebuggerAgentImpl.cpp b/WebKit/chromium/src/DebuggerAgentImpl.cpp
index 46c6e7c..5dd5c58 100644
--- a/WebKit/chromium/src/DebuggerAgentImpl.cpp
+++ b/WebKit/chromium/src/DebuggerAgentImpl.cpp
@@ -60,7 +60,6 @@ DebuggerAgentImpl::~DebuggerAgentImpl()
void DebuggerAgentImpl::debuggerOutput(const String& command)
{
m_webdevtoolsAgentClient->sendDebuggerOutput(command);
- m_webdevtoolsAgent->forceRepaint();
}
WebCore::Page* DebuggerAgentImpl::page()
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 74186bf..ea668c7 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -37,6 +37,7 @@
#include "FormState.h"
#include "FrameLoader.h"
#include "FrameLoadRequest.h"
+#include "FrameNetworkingContextImpl.h"
#include "FrameView.h"
#include "HTTPParsers.h"
#include "HistoryItem.h"
@@ -1512,4 +1513,9 @@ PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver()
return ds->releasePluginLoadObserver();
}
+PassRefPtr<FrameNetworkingContext> FrameLoaderClientImpl::createNetworkingContext()
+{
+ return FrameNetworkingContextImpl::create(m_webFrame->frame());
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h
index 3a8a714..361bae4 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -198,6 +198,8 @@ public:
virtual void didNotAllowScript();
virtual void didNotAllowPlugins();
+ virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext();
+
private:
void makeDocumentView();
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 6bc5ffe..3051b9b 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -35,7 +35,7 @@
#include "GraphicsContext3D.h"
#include "CachedImage.h"
-#include "CanvasLayerChromium.h"
+#include "WebGLLayerChromium.h"
#include "CanvasRenderingContext.h"
#include "Chrome.h"
#include "ChromeClientImpl.h"
@@ -55,6 +55,7 @@
#if PLATFORM(CG)
#include "GraphicsContext.h"
+#include "WebGLRenderingContext.h"
#include <CoreGraphics/CGContext.h>
#include <CoreGraphics/CGImage.h>
#endif
@@ -103,7 +104,7 @@ public:
void prepareTexture();
#if USE(ACCELERATED_COMPOSITING)
- CanvasLayerChromium* platformLayer() const;
+ WebGLLayerChromium* platformLayer() const;
#endif
bool isGLES2Compliant() const;
bool isGLES2NPOTStrict() const;
@@ -298,7 +299,7 @@ private:
OwnPtr<WebKit::WebGraphicsContext3D> m_impl;
WebKit::WebViewImpl* m_webViewImpl;
#if USE(ACCELERATED_COMPOSITING)
- RefPtr<CanvasLayerChromium> m_compositingLayer;
+ RefPtr<WebGLLayerChromium> m_compositingLayer;
#endif
#if PLATFORM(SKIA)
// If the width and height of the Canvas's backing store don't
@@ -360,7 +361,7 @@ bool GraphicsContext3DInternal::initialize(GraphicsContext3D::Attributes attrs,
m_impl.set(webContext);
#if USE(ACCELERATED_COMPOSITING)
- m_compositingLayer = CanvasLayerChromium::create(0);
+ m_compositingLayer = WebGLLayerChromium::create(0);
#endif
return true;
}
@@ -381,7 +382,7 @@ void GraphicsContext3DInternal::prepareTexture()
}
#if USE(ACCELERATED_COMPOSITING)
-CanvasLayerChromium* GraphicsContext3DInternal::platformLayer() const
+WebGLLayerChromium* GraphicsContext3DInternal::platformLayer() const
{
return m_compositingLayer.get();
}
@@ -436,10 +437,10 @@ void GraphicsContext3DInternal::paintRenderingResultsToCanvas(CanvasRenderingCon
canvas.drawBitmapRect(m_resizingBitmap, 0, dst);
}
#elif PLATFORM(CG)
- if (m_renderOutput)
- context->graphicsContext3D()->paintToCanvas(m_renderOutput, m_impl->width(), m_impl->height(),
- canvas->width(), canvas->height(),
- imageBuffer->context()->platformContext());
+ if (m_renderOutput && context->is3d()) {
+ WebGLRenderingContext* webGLContext = static_cast<WebGLRenderingContext*>(context);
+ webGLContext->graphicsContext3D()->paintToCanvas(m_renderOutput, m_impl->width(), m_impl->height(), canvas->width(), canvas->height(), imageBuffer->context()->platformContext());
+ }
#else
#error Must port to your platform
#endif
@@ -1039,7 +1040,7 @@ void GraphicsContext3D::prepareTexture()
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* GraphicsContext3D::platformLayer() const
{
- CanvasLayerChromium* canvasLayer = m_internal->platformLayer();
+ WebGLLayerChromium* canvasLayer = m_internal->platformLayer();
canvasLayer->setContext(this);
return canvasLayer;
}
diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
index 46f2cb6..51864f1 100644
--- a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
+++ b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
@@ -105,6 +105,11 @@ void InspectorFrontendClientImpl::closeWindow()
m_client->closeWindow();
}
+void InspectorFrontendClientImpl::disconnectFromBackend()
+{
+ m_client->closeWindow();
+}
+
void InspectorFrontendClientImpl::requestAttachWindow()
{
m_client->requestDockWindow();
diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.h b/WebKit/chromium/src/InspectorFrontendClientImpl.h
index 1507bf2..fc21f3e 100644
--- a/WebKit/chromium/src/InspectorFrontendClientImpl.h
+++ b/WebKit/chromium/src/InspectorFrontendClientImpl.h
@@ -61,6 +61,7 @@ public:
virtual void bringToFront();
virtual void closeWindow();
+ virtual void disconnectFromBackend();
virtual void requestAttachWindow();
virtual void requestDetachWindow();
diff --git a/WebKit/chromium/src/WebAccessibilityObject.cpp b/WebKit/chromium/src/WebAccessibilityObject.cpp
index 4263e8b..3a3e94b 100644
--- a/WebKit/chromium/src/WebAccessibilityObject.cpp
+++ b/WebKit/chromium/src/WebAccessibilityObject.cpp
@@ -182,6 +182,15 @@ WebAccessibilityObject WebAccessibilityObject::previousSibling() const
return WebAccessibilityObject(m_private->previousSibling());
}
+bool WebAccessibilityObject::canSetSelectedAttribute() const
+{
+ if (!m_private)
+ return 0;
+
+ m_private->updateBackingStore();
+ return m_private->canSetSelectedAttribute();
+}
+
bool WebAccessibilityObject::isAnchor() const
{
if (!m_private)
@@ -200,6 +209,15 @@ bool WebAccessibilityObject::isChecked() const
return m_private->isChecked();
}
+bool WebAccessibilityObject::isCollapsed() const
+{
+ if (!m_private)
+ return 0;
+
+ m_private->updateBackingStore();
+ return m_private->isCollapsed();
+}
+
bool WebAccessibilityObject::isFocused() const
{
@@ -237,6 +255,15 @@ bool WebAccessibilityObject::isIndeterminate() const
return m_private->isIndeterminate();
}
+bool WebAccessibilityObject::isLinked() const
+{
+ if (!m_private)
+ return 0;
+
+ m_private->updateBackingStore();
+ return m_private->isLinked();
+}
+
bool WebAccessibilityObject::isMultiSelectable() const
{
if (!m_private)
@@ -282,6 +309,24 @@ bool WebAccessibilityObject::isReadOnly() const
return m_private->isReadOnly();
}
+bool WebAccessibilityObject::isSelected() const
+{
+ if (!m_private)
+ return 0;
+
+ m_private->updateBackingStore();
+ return m_private->isSelected();
+}
+
+bool WebAccessibilityObject::isVisible() const
+{
+ if (!m_private)
+ return 0;
+
+ m_private->updateBackingStore();
+ return m_private->isVisible();
+}
+
bool WebAccessibilityObject::isVisited() const
{
if (!m_private)
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index fbb06f8..971c290 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -239,11 +239,6 @@ void WebDevToolsAgentImpl::didClearWindowObject(WebFrameImpl* webframe)
DebuggerAgentManager::setHostId(webframe, m_hostId);
}
-void WebDevToolsAgentImpl::forceRepaint()
-{
- m_client->forceRepaint();
-}
-
void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
{
inspectorController()->inspectorBackendDispatcher()->dispatch(message);
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.h b/WebKit/chromium/src/WebDevToolsAgentImpl.h
index da584fb..36cafcf 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -99,8 +99,6 @@ public:
virtual void timelineProfilerWasStopped();
virtual bool sendMessageToFrontend(const WTF::String&);
- void forceRepaint();
-
int hostId() { return m_hostId; }
private:
diff --git a/WebKit/chromium/src/WebDeviceOrientationClientMock.cpp b/WebKit/chromium/src/WebDeviceOrientationClientMock.cpp
index 4011d12..820c970 100644
--- a/WebKit/chromium/src/WebDeviceOrientationClientMock.cpp
+++ b/WebKit/chromium/src/WebDeviceOrientationClientMock.cpp
@@ -35,6 +35,7 @@ namespace WebKit {
void WebDeviceOrientationClientMock::setController(WebDeviceOrientationController* controller)
{
m_clientMock->setController(controller->controller());
+ delete controller;
}
void WebDeviceOrientationClientMock::startUpdating()
@@ -59,13 +60,12 @@ void WebDeviceOrientationClientMock::setOrientation(WebDeviceOrientation& orient
void WebDeviceOrientationClientMock::initialize()
{
- m_clientMock = new WebCore::DeviceOrientationClientMock();
+ m_clientMock.reset(new WebCore::DeviceOrientationClientMock());
}
void WebDeviceOrientationClientMock::reset()
{
- delete m_clientMock;
- m_clientMock = 0;
+ m_clientMock.reset(0);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index eb0db7e..a2d6a46 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -1356,7 +1356,7 @@ bool WebFrameImpl::find(int identifier,
}
ASSERT(frame() && frame()->view());
- bool found = frame()->findString(
+ bool found = frame()->editor()->findString(
searchText, options.forward, options.matchCase, wrapWithinFrame,
startInSelection);
if (found) {
@@ -1439,7 +1439,7 @@ void WebFrameImpl::stopFinding(bool clearSelection)
// Remove all markers for matches found and turn off the highlighting.
frame()->document()->markers()->removeMarkers(DocumentMarker::TextMatch);
- frame()->setMarkedTextMatchesAreHighlighted(false);
+ frame()->editor()->setMarkedTextMatchesAreHighlighted(false);
// Let the frame know that we don't want tickmarks or highlighting anymore.
invalidateArea(InvalidateAll);
@@ -1460,7 +1460,7 @@ void WebFrameImpl::scopeStringMatches(int identifier,
// Scoping is just about to begin.
m_scopingComplete = false;
// Clear highlighting for this frame.
- if (frame()->markedTextMatchesAreHighlighted())
+ if (frame()->editor()->markedTextMatchesAreHighlighted())
frame()->page()->unmarkAllTextMatches();
// Clear the counters from last operation.
m_lastMatchCount = 0;
@@ -1585,7 +1585,7 @@ void WebFrameImpl::scopeStringMatches(int identifier,
m_lastSearchString = searchText;
if (matchCount > 0) {
- frame()->setMarkedTextMatchesAreHighlighted(true);
+ frame()->editor()->setMarkedTextMatchesAreHighlighted(true);
m_lastMatchCount += matchCount;
diff --git a/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp
index 3c3a1db..bbb7162 100644
--- a/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp
+++ b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp
@@ -79,6 +79,7 @@ public:
virtual void setIsAllowed(bool allowed);
virtual void setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp);
virtual void setLastError(int errorCode, const WebString& message);
+ virtual void onWebGeolocationServiceDestroyed();
private:
WebViewClient* getWebViewClient();
@@ -176,6 +177,10 @@ WebViewClient* WebGeolocationServiceBridgeImpl::getWebViewClient()
return webViewClient;
}
+void WebGeolocationServiceBridgeImpl::onWebGeolocationServiceDestroyed()
+{
+}
+
} // namespace WebKit
#endif // ENABLE(GEOLOCATION)
diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
index e543123..fe67789 100644
--- a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
+++ b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
@@ -57,49 +57,41 @@ WebIDBCallbacksImpl::~WebIDBCallbacksImpl()
void WebIDBCallbacksImpl::onError(const WebKit::WebIDBDatabaseError& error)
{
m_callbacks->onError(error);
- m_callbacks.clear();
}
void WebIDBCallbacksImpl::onSuccess()
{
m_callbacks->onSuccess();
- m_callbacks.clear();
}
void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBCursor* cursor)
{
m_callbacks->onSuccess(IDBCursorBackendProxy::create(cursor));
- m_callbacks.clear();
}
void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBDatabase* webKitInstance)
{
m_callbacks->onSuccess(IDBDatabaseProxy::create(webKitInstance));
- m_callbacks.clear();
}
void WebIDBCallbacksImpl::onSuccess(const WebKit::WebIDBKey& key)
{
m_callbacks->onSuccess(key);
- m_callbacks.clear();
}
void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBIndex* webKitInstance)
{
m_callbacks->onSuccess(IDBIndexBackendProxy::create(webKitInstance));
- m_callbacks.clear();
}
void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBObjectStore* webKitInstance)
{
m_callbacks->onSuccess(IDBObjectStoreProxy::create(webKitInstance));
- m_callbacks.clear();
}
void WebIDBCallbacksImpl::onSuccess(const WebKit::WebSerializedScriptValue& serializedScriptValue)
{
m_callbacks->onSuccess(serializedScriptValue);
- m_callbacks.clear();
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/WebKit.cpp b/WebKit/chromium/src/WebKit.cpp
index cadcb6c..f3336ea 100644
--- a/WebKit/chromium/src/WebKit.cpp
+++ b/WebKit/chromium/src/WebKit.cpp
@@ -103,6 +103,11 @@ bool layoutTestMode()
return s_layoutTestMode;
}
+bool areLayoutTestImagesOpaque()
+{
+ return true;
+}
+
void enableLogChannel(const char* name)
{
WTFLogChannel* channel = WebCore::getChannelFromName(name);
diff --git a/WebKit/chromium/src/WebScrollbarImpl.cpp b/WebKit/chromium/src/WebScrollbarImpl.cpp
index c0131cb..8b9e287 100644
--- a/WebKit/chromium/src/WebScrollbarImpl.cpp
+++ b/WebKit/chromium/src/WebScrollbarImpl.cpp
@@ -94,7 +94,7 @@ int WebScrollbarImpl::value() const
void WebScrollbarImpl::setValue(int position)
{
- m_scrollbar->setValue(position);
+ m_scrollbar->setValue(position, Scrollbar::NotFromScrollAnimator);
}
void WebScrollbarImpl::setDocumentSize(int size)
@@ -218,7 +218,7 @@ bool WebScrollbarImpl::onMouseWheel(const WebInputEvent& event)
if (negative)
delta *= -1;
}
- m_scrollbar->setValue(m_scrollbar->value() - delta);
+ m_scrollbar->scroll((m_scrollbar->orientation() == HorizontalScrollbar) ? WebCore::ScrollLeft : WebCore::ScrollUp, WebCore::ScrollByPixel, delta);
return true;
}
@@ -262,6 +262,16 @@ bool WebScrollbarImpl::onKeyDown(const WebInputEvent& event)
return false;
}
+int WebScrollbarImpl::scrollSize(WebCore::ScrollbarOrientation orientation) const
+{
+ return (orientation == m_scrollbar->orientation()) ? (m_scrollbar->totalSize() - m_scrollbar->visibleSize()) : 0;
+}
+
+void WebScrollbarImpl::setScrollOffsetFromAnimation(const WebCore::IntPoint& offset)
+{
+ m_scrollbar->setValue((m_scrollbar->orientation() == HorizontalScrollbar) ? offset.x() : offset.y(), Scrollbar::FromScrollAnimator);
+}
+
void WebScrollbarImpl::valueChanged(WebCore::Scrollbar*)
{
m_client->valueChanged(this);
diff --git a/WebKit/chromium/src/WebScrollbarImpl.h b/WebKit/chromium/src/WebScrollbarImpl.h
index a041ccc..5512867 100644
--- a/WebKit/chromium/src/WebScrollbarImpl.h
+++ b/WebKit/chromium/src/WebScrollbarImpl.h
@@ -58,6 +58,8 @@ public:
virtual bool handleInputEvent(const WebInputEvent&);
// WebCore::ScrollbarClient methods
+ virtual int scrollSize(WebCore::ScrollbarOrientation orientation) const;
+ virtual void setScrollOffsetFromAnimation(const WebCore::IntPoint&);
virtual void valueChanged(WebCore::Scrollbar*);
virtual void invalidateScrollbarRect(WebCore::Scrollbar*, const WebCore::IntRect&);
virtual bool isActive() const;
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 4b129d6..137bf06 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -58,6 +58,7 @@
#include "GLES2Context.h"
#include "GLES2ContextInternal.h"
#include "GraphicsContext.h"
+#include "GraphicsContext3D.h"
#include "HTMLInputElement.h"
#include "HTMLMediaElement.h"
#include "HitTestResult.h"
@@ -86,6 +87,7 @@
#include "SecurityOrigin.h"
#include "SelectionController.h"
#include "Settings.h"
+#include "SharedGraphicsContext3D.h"
#include "Timer.h"
#include "TypingCommand.h"
#include "UserGestureIndicator.h"
@@ -263,6 +265,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
#if USE(ACCELERATED_COMPOSITING)
, m_layerRenderer(0)
, m_isAcceleratedCompositingActive(false)
+ , m_compositorCreationFailed(false)
#endif
#if ENABLE(INPUT_SPEECH)
, m_speechInputClient(client)
@@ -967,6 +970,7 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
IntRect contentRect = view->visibleContentRect(false);
// Ask the layer compositor to redraw all the layers.
+ ASSERT(m_layerRenderer->hardwareCompositing());
m_layerRenderer->drawLayers(rect, visibleRect, contentRect, IntPoint(view->scrollX(), view->scrollY()));
}
#endif
@@ -1274,7 +1278,7 @@ WebRect WebViewImpl::caretOrSelectionBounds()
if (!node || !node->renderer())
return rect;
RefPtr<Range> range = controller->toNormalizedRange();
- rect = view->contentsToWindow(focused->firstRectForRange(range.get()));
+ rect = view->contentsToWindow(focused->editor()->firstRectForRange(range.get()));
}
return rect;
}
@@ -2103,6 +2107,11 @@ bool WebViewImpl::tabsToLinks() const
}
#if USE(ACCELERATED_COMPOSITING)
+bool WebViewImpl::allowsAcceleratedCompositing()
+{
+ return !m_compositorCreationFailed;
+}
+
void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer)
{
setIsAcceleratedCompositingActive(layer ? true : false);
@@ -2117,15 +2126,15 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
if (active) {
m_layerRenderer = LayerRendererChromium::create(getOnscreenGLES2Context());
- if (m_layerRenderer->hardwareCompositing()) {
+ if (m_layerRenderer) {
m_isAcceleratedCompositingActive = true;
// Force a redraw the entire view so that the compositor gets the entire view,
// rather than just the currently-dirty subset.
m_client->didInvalidateRect(IntRect(0, 0, m_size.width, m_size.height));
} else {
- m_layerRenderer.clear();
m_isAcceleratedCompositingActive = false;
+ m_compositorCreationFailed = true;
}
} else {
m_layerRenderer = 0;
@@ -2212,17 +2221,21 @@ void WebViewImpl::setRootLayerNeedsDisplay()
PassOwnPtr<GLES2Context> WebViewImpl::getOnscreenGLES2Context()
{
- return GLES2Context::create(GLES2ContextInternal::create(gles2Context(), false));
+ WebGLES2Context* context = gles2Context();
+ if (!context)
+ return 0;
+ return GLES2Context::create(GLES2ContextInternal::create(context, false));
}
-PassOwnPtr<GLES2Context> WebViewImpl::getOffscreenGLES2Context()
+SharedGraphicsContext3D* WebViewImpl::getSharedGraphicsContext3D()
{
- WebGLES2Context* context = webKitClient()->createGLES2Context();
- if (!context)
- return 0;
- if (!context->initialize(0, gles2Context()))
- return 0;
- return GLES2Context::create(GLES2ContextInternal::create(context, true));
+ if (!m_sharedContext3D) {
+ GraphicsContext3D::Attributes attr;
+ OwnPtr<GraphicsContext3D> context = GraphicsContext3D::create(attr, m_page->chrome());
+ m_sharedContext3D = SharedGraphicsContext3D::create(context.release());
+ }
+
+ return m_sharedContext3D.get();
}
// Returns the GLES2 context associated with this View. If one doesn't exist
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index c296121..a42099c 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -324,15 +324,16 @@ public:
#if USE(ACCELERATED_COMPOSITING)
void setRootLayerNeedsDisplay();
void setRootGraphicsLayer(WebCore::PlatformLayer*);
+ bool allowsAcceleratedCompositing();
#endif
// Onscreen contexts display to the screen associated with this view.
// Offscreen contexts render offscreen but can share resources with the
// onscreen context and thus can be composited.
PassOwnPtr<WebCore::GLES2Context> getOnscreenGLES2Context();
- PassOwnPtr<WebCore::GLES2Context> getOffscreenGLES2Context();
// Returns an onscreen context
virtual WebGLES2Context* gles2Context();
+ virtual WebCore::SharedGraphicsContext3D* getSharedGraphicsContext3D();
WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); }
@@ -512,6 +513,7 @@ private:
#if USE(ACCELERATED_COMPOSITING)
OwnPtr<WebCore::LayerRendererChromium> m_layerRenderer;
bool m_isAcceleratedCompositingActive;
+ bool m_compositorCreationFailed;
#endif
static const WebInputEvent* m_currentInputEvent;
@@ -521,6 +523,8 @@ private:
OwnPtr<WebGLES2Context> m_gles2Context;
+ RefPtr<WebCore::SharedGraphicsContext3D> m_sharedContext3D;
+
OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
};
diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js
index 41574b4..2233463 100644
--- a/WebKit/chromium/src/js/Tests.js
+++ b/WebKit/chromium/src/js/Tests.js
@@ -219,40 +219,6 @@ TestSuite.prototype.addSniffer = function(receiver, methodName, override, opt_st
/**
- * Tests that the real injected host is present in the context.
- */
-TestSuite.prototype.testHostIsPresent = function()
-{
- this.assertTrue(typeof InspectorFrontendHost === "object" && !InspectorFrontendHost.isStub);
-};
-
-
-/**
- * Tests elements tree has an "HTML" root.
- */
-TestSuite.prototype.testElementsTreeRoot = function()
-{
- var doc = WebInspector.domAgent.document;
- this.assertEquals("HTML", doc.documentElement.nodeName);
- this.assertTrue(doc.documentElement.hasChildNodes());
-};
-
-
-/**
- * Tests that main resource is present in the system and that it is
- * the only resource.
- */
-TestSuite.prototype.testMainResource = function()
-{
- var tokens = [];
- var resources = WebInspector.resources;
- for (var id in resources)
- tokens.push(resources[id].lastPathComponent);
- this.assertEquals("simple_page.html", tokens.join(","));
-};
-
-
-/**
* Tests that resources tab is enabled when corresponding item is selected.
*/
TestSuite.prototype.testEnableResourcesTab = function()
@@ -628,71 +594,6 @@ TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function()
};
-/**
- * Tests that a breakpoint can be set.
- */
-TestSuite.prototype.testSetBreakpoint = function()
-{
- var test = this;
- this.showPanel("scripts");
-
- var breakpointLine = 16
-
- this._waitUntilScriptsAreParsed(["debugger_test_page.html"],
- function() {
- test.showMainPageScriptSource_(
- "debugger_test_page.html",
- function(view, url) {
- view._addBreakpoint(breakpointLine);
-
- test.evaluateInConsole_(
- 'setTimeout("calculate()" , 0)',
- function(resultText) {
- test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText);
- });
- });
- });
-
- this._waitForScriptPause(
- {
- functionsOnStack: ["calculate", ""],
- lineNumber: breakpointLine,
- lineText: " result = fib(lastVal++);"
- },
- function() {
- test.releaseControl();
- });
-
- this.takeControl();
-};
-
-
-/**
- * Tests that pause on exception works.
- */
-TestSuite.prototype.testPauseOnException = function()
-{
- this.showPanel("scripts");
- var test = this;
-
- InspectorBackend.setPauseOnExceptionsState(WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions);
-
- this._executeCodeWhenScriptsAreParsed("handleClick()", ["pause_on_exception.html"]);
-
- this._waitForScriptPause(
- {
- functionsOnStack: ["throwAnException", "handleClick", ""],
- lineNumber: 6,
- lineText: " return unknown_var;"
- },
- function() {
- test.releaseControl();
- });
-
- this.takeControl();
-};
-
-
// Tests that debugger works correctly if pause event occurs when DevTools
// frontend is being loaded.
TestSuite.prototype.testPauseWhenLoadingDevTools = function()
@@ -864,54 +765,6 @@ TestSuite.prototype.evaluateInConsole_ = function(code, callback)
/**
- * Tests eval on call frame.
- */
-TestSuite.prototype.testEvalOnCallFrame = function()
-{
- this.showPanel("scripts");
-
- var breakpointLine = 16;
-
- var test = this;
- this._waitUntilScriptsAreParsed(["debugger_test_page.html"],
- function() {
- test.showMainPageScriptSource_(
- "debugger_test_page.html",
- function(view, url) {
- view._addBreakpoint(breakpointLine);
-
- // Since breakpoints are ignored in evals' calculate() function is
- // execute after zero-timeout so that the breakpoint is hit.
- test.evaluateInConsole_(
- 'setTimeout("calculate(123)" , 0)',
- function(resultText) {
- test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText);
- waitForBreakpointHit();
- });
- });
- });
-
- function waitForBreakpointHit() {
- test.addSniffer(WebInspector,
- "pausedScript",
- function(callFrames) {
- test.assertEquals(2, callFrames.length, "Unexpected stack depth on the breakpoint. " + JSON.stringify(callFrames, null, 4));
- test.assertEquals("calculate", callFrames[0].functionName, "Unexpected top frame function.");
- // Evaluate "e+1" where "e" is an argument of "calculate" function.
- test.evaluateInConsole_(
- "e+1",
- function(resultText) {
- test.assertEquals("124", resultText, 'Unexpected "e+1" value.');
- test.releaseControl();
- });
- });
- }
-
- this.takeControl();
-};
-
-
-/**
* Tests that console auto completion works when script execution is paused.
*/
TestSuite.prototype.testCompletionOnPause = function()
@@ -968,16 +821,6 @@ TestSuite.prototype.testCompletionOnPause = function()
/**
- * Tests that inspected page doesn't hang on reload if it contains a syntax
- * error and DevTools window is open.
- */
-TestSuite.prototype.testAutoContinueOnSyntaxError = function()
-{
- // TODO(yurys): provide an implementation that works with ScriptDebugServer.
-};
-
-
-/**
* Checks current execution line against expectations.
* @param {WebInspector.SourceFrame} sourceFrame
* @param {number} lineNumber Expected line number
@@ -1029,7 +872,8 @@ TestSuite.prototype._waitForScriptPause = function(expectations, callback)
test.addSniffer(
WebInspector,
"pausedScript",
- function(callFrames) {
+ function(details) {
+ var callFrames = details.callFrames;
var functionsOnStack = [];
for (var i = 0; i < callFrames.length; i++)
functionsOnStack.push(callFrames[i].functionName);
@@ -1393,85 +1237,6 @@ TestSuite.createKeyEvent = function(keyIdentifier)
/**
- * Tests the message loop re-entrancy.
- */
-TestSuite.prototype.testMessageLoopReentrant = function()
-{
- var test = this;
- this.showPanel("scripts");
-
- var breakpointLine = 16;
-
- WebInspector.showConsole();
-
- this._waitUntilScriptsAreParsed(["debugger_test_page.html"],
- function() {
- test.showMainPageScriptSource_(
- "debugger_test_page.html",
- function(view, url) {
- view._addBreakpoint(breakpointLine);
-
- test.evaluateInConsole_(
- 'setTimeout("calculate()", 0)',
- function(resultText) {
- test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText);
- });
-
- });
- });
-
- // Wait until script is paused.
- this.addSniffer(
- WebInspector,
- "pausedScript",
- function(callFrames) {
- test.evaluateInConsole_(
- 'document.cookie',
- test.releaseControl.bind(test)); // This callback will be invoked only if the test succeeds (i.e. no crash).
- });
-
- this.takeControl();
-};
-
-
-/**
- * Tests that Storage panel can be open and that local DOM storage is added
- * to the panel.
- */
-TestSuite.prototype.testShowStoragePanel = function()
-{
- var test = this;
- this.addSniffer(WebInspector.panels.storage, "addDOMStorage",
- function(storage) {
- var orig = storage.getEntries;
- storage.getEntries = function(callback) {
- orig.call(this, function(entries) {
- callback(entries);
- test.releaseControl();
- });
- };
- try {
- WebInspector.currentPanel.selectDOMStorage(storage.id);
- storage.getEntries = orig;
- } catch (e) {
- test.fail("Exception in selectDOMStorage: " + e);
- }
- });
- this.showPanel("storage");
-
- // Access localStorage so that it's pushed to the frontend.
- this.evaluateInConsole_(
- 'setTimeout("localStorage.x = 10" , 0)',
- function(resultText) {
- test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText);
- });
-
- // Wait until DOM storage is added to the panel.
- this.takeControl();
-};
-
-
-/**
* Test runner for the test suite.
*/
var uiTests = {};
diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css
index 9495fb8..9495fb8 100755..100644
--- a/WebKit/chromium/src/js/devTools.css
+++ b/WebKit/chromium/src/js/devTools.css
diff --git a/WebKit/chromium/src/mac/WebInputEventFactory.mm b/WebKit/chromium/src/mac/WebInputEventFactory.mm
index 694155f..b4e09c0 100644
--- a/WebKit/chromium/src/mac/WebInputEventFactory.mm
+++ b/WebKit/chromium/src/mac/WebInputEventFactory.mm
@@ -1178,22 +1178,19 @@ WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(NSEvent* event, NSView*
// the point delta data instead, since we cannot distinguish trackpad data
// from data from any other continuous device.
+ // Conversion between wheel delta amounts and number of pixels to scroll.
+ static const double scrollbarPixelsPerCocoaTick = 40.0;
+
if (CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventIsContinuous)) {
- result.wheelTicksY = result.deltaY =
- CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventPointDeltaAxis1);
- result.wheelTicksX = result.deltaX =
- CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventPointDeltaAxis2);
+ result.deltaX = CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventPointDeltaAxis2);
+ result.deltaY = CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventPointDeltaAxis1);
+ result.wheelTicksX = result.deltaX / scrollbarPixelsPerCocoaTick;
+ result.wheelTicksY = result.deltaY / scrollbarPixelsPerCocoaTick;
} else {
- result.wheelTicksY =
- CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventDeltaAxis1);
- result.wheelTicksX =
- CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventDeltaAxis2);
-
- // Convert wheel delta amount to a number of pixels to scroll.
- static const double scrollbarPixelsPerCocoaTick = 40.0;
-
result.deltaX = [event deltaX] * scrollbarPixelsPerCocoaTick;
result.deltaY = [event deltaY] * scrollbarPixelsPerCocoaTick;
+ result.wheelTicksY = CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventDeltaAxis1);
+ result.wheelTicksX = CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventDeltaAxis2);
}
result.timeStampSeconds = [event timestamp];
diff --git a/WebKit/chromium/src/win/WebInputEventFactory.cpp b/WebKit/chromium/src/win/WebInputEventFactory.cpp
index 4d83f22..d1d5869 100644
--- a/WebKit/chromium/src/win/WebInputEventFactory.cpp
+++ b/WebKit/chromium/src/win/WebInputEventFactory.cpp
@@ -403,6 +403,9 @@ WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(HWND hwnd, UINT message
// smooth scrolling while Firefox doesn't, so it can get away with somewhat
// larger scroll values without feeling as jerky. Here we use 100 px per
// three lines (the default scroll amount is three lines per wheel tick).
+ // Even though we have smooth scrolling, we don't make this as large as IE
+ // because subjectively IE feels like it scrolls farther than you want while
+ // reading articles.
static const float scrollbarPixelsPerLine = 100.0f / 3.0f;
wheelDelta /= WHEEL_DELTA;
float scrollDelta = wheelDelta;