summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-22 09:09:45 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-22 09:10:13 +0100
commit470286ecfe79d59df14944e5b5d34630fc739391 (patch)
tree43983212872e06cebefd2ae474418fa2908ca54c /Source/WebKit/chromium/src
parent23037105e948c2065da5a937d3a2396b0ff45c1e (diff)
downloadqtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebKit/chromium/src')
-rw-r--r--Source/WebKit/chromium/src/AssertMatchingEnums.cpp138
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.cpp40
-rw-r--r--Source/WebKit/chromium/src/ColorChooserPopupUIController.cpp157
-rw-r--r--Source/WebKit/chromium/src/ColorChooserPopupUIController.h72
-rw-r--r--Source/WebKit/chromium/src/ColorChooserUIController.cpp101
-rw-r--r--Source/WebKit/chromium/src/ColorChooserUIController.h22
-rw-r--r--Source/WebKit/chromium/src/ContextMenuClientImpl.cpp13
-rw-r--r--Source/WebKit/chromium/src/DateTimeChooserImpl.cpp20
-rw-r--r--Source/WebKit/chromium/src/ExternalDateTimeChooser.cpp137
-rw-r--r--Source/WebKit/chromium/src/ExternalDateTimeChooser.h64
-rw-r--r--Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp16
-rw-r--r--Source/WebKit/chromium/src/FrameLoaderClientImpl.h5
-rw-r--r--Source/WebKit/chromium/src/FrameNetworkingContextImpl.cpp51
-rw-r--r--Source/WebKit/chromium/src/FrameNetworkingContextImpl.h3
-rw-r--r--Source/WebKit/chromium/src/IDBCallbacksProxy.cpp1
-rw-r--r--Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp19
-rw-r--r--Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h2
-rwxr-xr-xSource/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp55
-rw-r--r--Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h6
-rw-r--r--Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp8
-rw-r--r--Source/WebKit/chromium/src/IDBTransactionBackendProxy.h1
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.cpp10
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.h3
-rw-r--r--Source/WebKit/chromium/src/LinkHighlight.cpp12
-rw-r--r--Source/WebKit/chromium/src/LinkHighlight.h1
-rw-r--r--Source/WebKit/chromium/src/PageWidgetDelegate.cpp8
-rw-r--r--Source/WebKit/chromium/src/PageWidgetDelegate.h2
-rw-r--r--Source/WebKit/chromium/src/PlatformSupport.cpp94
-rw-r--r--Source/WebKit/chromium/src/WebArrayBuffer.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebBlob.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp30
-rw-r--r--Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h12
-rw-r--r--Source/WebKit/chromium/src/WebCursorInfo.cpp11
-rw-r--r--Source/WebKit/chromium/src/WebDOMCustomEvent.cpp (renamed from Source/WebKit/chromium/src/WebSessionDescriptionDescriptor.cpp)59
-rw-r--r--Source/WebKit/chromium/src/WebDocument.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebElement.cpp7
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp26
-rw-r--r--Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp16
-rw-r--r--Source/WebKit/chromium/src/WebIDBDatabaseImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebIDBKey.cpp1
-rwxr-xr-xSource/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp54
-rw-r--r--Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h5
-rw-r--r--Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp8
-rw-r--r--Source/WebKit/chromium/src/WebIDBTransactionImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebInputElement.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebNode.cpp24
-rw-r--r--Source/WebKit/chromium/src/WebPagePopupImpl.cpp4
-rw-r--r--Source/WebKit/chromium/src/WebPasswordFormData.cpp1
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.cpp39
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.h4
-rw-r--r--Source/WebKit/chromium/src/WebRuntimeFeatures.cpp36
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.cpp26
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.h18
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp123
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h27
55 files changed, 913 insertions, 696 deletions
diff --git a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
index f3e7859ee..3ee9fcac5 100644
--- a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -37,6 +37,7 @@
#include "AccessibilityObject.h"
#include "ApplicationCacheHost.h"
#include "ContentSecurityPolicy.h"
+#include "Cursor.h"
#include "DocumentMarker.h"
#include "EditorInsertAction.h"
#include "ExceptionCode.h"
@@ -59,14 +60,11 @@
#include "IDBKeyPath.h"
#include "IDBMetadata.h"
#include "IDBTransactionBackendInterface.h"
-#include "IceOptions.h"
#include "IconURL.h"
#include "MediaPlayer.h"
#include "MediaStreamSource.h"
#include "NotificationClient.h"
#include "PageVisibilityState.h"
-#include "PeerConnection00.h"
-#include "PlatformCursor.h"
#include "RTCDataChannelDescriptor.h"
#include "RTCPeerConnectionHandlerClient.h"
#include "ReferrerPolicy.h"
@@ -119,10 +117,7 @@
#include <public/WebClipboard.h>
#include <public/WebFileSystem.h>
#include <public/WebFilterOperation.h>
-#include <public/WebICEOptions.h>
#include <public/WebMediaStreamSource.h>
-#include <public/WebPeerConnection00Handler.h>
-#include <public/WebPeerConnection00HandlerClient.h>
#include <public/WebRTCDataChannel.h>
#include <public/WebRTCPeerConnectionHandler.h>
#include <public/WebRTCPeerConnectionHandlerClient.h>
@@ -216,6 +211,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleWebCoreLink, WebCoreLinkRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleImageMapLink, ImageMapLinkRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleImageMap, ImageMapRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListMarker, ListMarkerRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMathElement, MathElementRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleWebArea, WebAreaRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleHeading, HeadingRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListBox, ListBoxRole);
@@ -285,50 +281,50 @@ COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::UpdateReadyEvent, Applicat
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::CachedEvent, ApplicationCacheHost::CACHED_EVENT);
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::ObsoleteEvent, ApplicationCacheHost::OBSOLETE_EVENT);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypePointer, PlatformCursor::TypePointer);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCross, PlatformCursor::TypeCross);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHand, PlatformCursor::TypeHand);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeIBeam, PlatformCursor::TypeIBeam);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWait, PlatformCursor::TypeWait);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHelp, PlatformCursor::TypeHelp);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastResize, PlatformCursor::TypeEastResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthResize, PlatformCursor::TypeNorthResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastResize, PlatformCursor::TypeNorthEastResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestResize, PlatformCursor::TypeNorthWestResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthResize, PlatformCursor::TypeSouthResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastResize, PlatformCursor::TypeSouthEastResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestResize, PlatformCursor::TypeSouthWestResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestResize, PlatformCursor::TypeWestResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthSouthResize, PlatformCursor::TypeNorthSouthResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastWestResize, PlatformCursor::TypeEastWestResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastSouthWestResize, PlatformCursor::TypeNorthEastSouthWestResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestSouthEastResize, PlatformCursor::TypeNorthWestSouthEastResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeColumnResize, PlatformCursor::TypeColumnResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeRowResize, PlatformCursor::TypeRowResize);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMiddlePanning, PlatformCursor::TypeMiddlePanning);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastPanning, PlatformCursor::TypeEastPanning);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthPanning, PlatformCursor::TypeNorthPanning);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastPanning, PlatformCursor::TypeNorthEastPanning);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestPanning, PlatformCursor::TypeNorthWestPanning);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthPanning, PlatformCursor::TypeSouthPanning);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastPanning, PlatformCursor::TypeSouthEastPanning);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestPanning, PlatformCursor::TypeSouthWestPanning);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestPanning, PlatformCursor::TypeWestPanning);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMove, PlatformCursor::TypeMove);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeVerticalText, PlatformCursor::TypeVerticalText);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCell, PlatformCursor::TypeCell);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeContextMenu, PlatformCursor::TypeContextMenu);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeAlias, PlatformCursor::TypeAlias);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeProgress, PlatformCursor::TypeProgress);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNoDrop, PlatformCursor::TypeNoDrop);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCopy, PlatformCursor::TypeCopy);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNone, PlatformCursor::TypeNone);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNotAllowed, PlatformCursor::TypeNotAllowed);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomIn, PlatformCursor::TypeZoomIn);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomOut, PlatformCursor::TypeZoomOut);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeGrab, PlatformCursor::TypeGrab);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeGrabbing, PlatformCursor::TypeGrabbing);
-COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCustom, PlatformCursor::TypeCustom);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypePointer, Cursor::Pointer);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCross, Cursor::Cross);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHand, Cursor::Hand);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeIBeam, Cursor::IBeam);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWait, Cursor::Wait);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHelp, Cursor::Help);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastResize, Cursor::EastResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthResize, Cursor::NorthResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastResize, Cursor::NorthEastResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestResize, Cursor::NorthWestResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthResize, Cursor::SouthResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastResize, Cursor::SouthEastResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestResize, Cursor::SouthWestResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestResize, Cursor::WestResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthSouthResize, Cursor::NorthSouthResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastWestResize, Cursor::EastWestResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastSouthWestResize, Cursor::NorthEastSouthWestResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestSouthEastResize, Cursor::NorthWestSouthEastResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeColumnResize, Cursor::ColumnResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeRowResize, Cursor::RowResize);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMiddlePanning, Cursor::MiddlePanning);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastPanning, Cursor::EastPanning);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthPanning, Cursor::NorthPanning);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastPanning, Cursor::NorthEastPanning);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestPanning, Cursor::NorthWestPanning);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthPanning, Cursor::SouthPanning);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastPanning, Cursor::SouthEastPanning);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestPanning, Cursor::SouthWestPanning);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestPanning, Cursor::WestPanning);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMove, Cursor::Move);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeVerticalText, Cursor::VerticalText);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCell, Cursor::Cell);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeContextMenu, Cursor::ContextMenu);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeAlias, Cursor::Alias);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeProgress, Cursor::Progress);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNoDrop, Cursor::NoDrop);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCopy, Cursor::Copy);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNone, Cursor::None);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNotAllowed, Cursor::NotAllowed);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomIn, Cursor::ZoomIn);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomOut, Cursor::ZoomOut);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeGrab, Cursor::Grab);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeGrabbing, Cursor::Grabbing);
+COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCustom, Cursor::Custom);
COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionTyped, EditorInsertActionTyped);
COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionPasted, EditorInsertActionPasted);
@@ -566,43 +562,31 @@ COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::ReadyStateLive, MediaStreamSo
COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::ReadyStateMuted, MediaStreamSource::ReadyStateMuted);
COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::ReadyStateEnded, MediaStreamSource::ReadyStateEnded);
-COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeAll, IceOptions::ALL);
-COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeNoRelay, IceOptions::NO_RELAY);
-COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeOnlyRelay, IceOptions::ONLY_RELAY);
-
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPOffer, PeerConnection00::SDP_OFFER);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPPRanswer, PeerConnection00::SDP_PRANSWER);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPAnswer, PeerConnection00::SDP_ANSWER);
-
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNew, PeerConnection00::NEW);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateOpening, PeerConnection00::OPENING);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNegotiating, PeerConnection00::OPENING);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateActive, PeerConnection00::ACTIVE);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateClosed, PeerConnection00::CLOSED);
-
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateGathering, PeerConnection00::ICE_GATHERING);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateWaiting, PeerConnection00::ICE_WAITING);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateChecking, PeerConnection00::ICE_CHECKING);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateConnected, PeerConnection00::ICE_CONNECTED);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateCompleted, PeerConnection00::ICE_COMPLETED);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateFailed, PeerConnection00::ICE_FAILED);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateClosed, PeerConnection00::ICE_CLOSED);
-
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateNew, RTCPeerConnectionHandlerClient::ReadyStateNew);
-COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateOpening, RTCPeerConnectionHandlerClient::ReadyStateOpening);
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateHaveLocalOffer, RTCPeerConnectionHandlerClient::ReadyStateHaveLocalOffer);
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateHaveLocalPrAnswer, RTCPeerConnectionHandlerClient::ReadyStateHaveLocalPrAnswer);
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateHaveRemotePrAnswer, RTCPeerConnectionHandlerClient::ReadyStateHaveRemotePrAnswer);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateActive, RTCPeerConnectionHandlerClient::ReadyStateActive);
-COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateClosing, RTCPeerConnectionHandlerClient::ReadyStateClosing);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateClosed, RTCPeerConnectionHandlerClient::ReadyStateClosed);
-COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateNew, RTCPeerConnectionHandlerClient::IceStateNew);
-COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateGathering, RTCPeerConnectionHandlerClient::IceStateGathering);
-COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateWaiting, RTCPeerConnectionHandlerClient::IceStateWaiting);
+// DEPRECATED
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateOpening, RTCPeerConnectionHandlerClient::ReadyStateOpening);
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ReadyStateClosing, RTCPeerConnectionHandlerClient::ReadyStateClosing);
+
+
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateStarting, RTCPeerConnectionHandlerClient::IceStateStarting);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateChecking, RTCPeerConnectionHandlerClient::IceStateChecking);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateConnected, RTCPeerConnectionHandlerClient::IceStateConnected);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateCompleted, RTCPeerConnectionHandlerClient::IceStateCompleted);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateFailed, RTCPeerConnectionHandlerClient::IceStateFailed);
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateDisconnected, RTCPeerConnectionHandlerClient::IceStateDisconnected);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateClosed, RTCPeerConnectionHandlerClient::IceStateClosed);
+// DEPRECATED
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateNew, RTCPeerConnectionHandlerClient::IceStateNew);
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateGathering, RTCPeerConnectionHandlerClient::IceStateGathering);
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEStateWaiting, RTCPeerConnectionHandlerClient::IceStateWaiting);
+
COMPILE_ASSERT_MATCHING_ENUM(WebRTCDataChannel::ReadyStateConnecting, RTCDataChannelDescriptor::ReadyStateConnecting);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCDataChannel::ReadyStateOpen, RTCDataChannelDescriptor::ReadyStateOpen);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCDataChannel::ReadyStateClosing, RTCDataChannelDescriptor::ReadyStateClosing);
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
index 94959380a..e617e8f5a 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -37,8 +37,12 @@
#if ENABLE(INPUT_TYPE_COLOR)
#include "ColorChooser.h"
#include "ColorChooserClient.h"
+#if ENABLE(PAGE_POPUP)
+#include "ColorChooserPopupUIController.h"
+#else
#include "ColorChooserUIController.h"
#endif
+#endif
#include "Console.h"
#include "Cursor.h"
#include "DatabaseTracker.h"
@@ -46,6 +50,7 @@
#include "DateTimeChooserImpl.h"
#include "Document.h"
#include "DocumentLoader.h"
+#include "ExternalDateTimeChooser.h"
#include "ExternalPopupMenu.h"
#include "FileChooser.h"
#include "FileIconLoader.h"
@@ -292,7 +297,12 @@ static inline void updatePolicyForEvent(const WebInputEvent* inputEvent, WebNavi
bool alt = mouseEvent->modifiers & WebMouseEvent::AltKey;
bool meta = mouseEvent->modifiers & WebMouseEvent::MetaKey;
- WebViewImpl::navigationPolicyFromMouseEvent(buttonNumber, ctrl, shift, alt, meta, policy);
+ WebNavigationPolicy userPolicy = *policy;
+ WebViewImpl::navigationPolicyFromMouseEvent(buttonNumber, ctrl, shift, alt, meta, &userPolicy);
+ // User and app agree that we want a new window; let the app override the decorations.
+ if (userPolicy == WebNavigationPolicyNewWindow && *policy == WebNavigationPolicyNewPopup)
+ return;
+ *policy = userPolicy;
}
WebNavigationPolicy ChromeClientImpl::getNavigationPolicy()
@@ -590,7 +600,7 @@ void ChromeClientImpl::mouseDidMoveOverElement(
Widget* widget = toRenderWidget(object)->widget();
if (widget && widget->isPluginContainer()) {
WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget);
- url = plugin->plugin()->linkAtPosition(result.roundedPoint());
+ url = plugin->plugin()->linkAtPosition(result.roundedPointInInnerNodeFrame());
}
}
}
@@ -615,22 +625,18 @@ void ChromeClientImpl::dispatchViewportPropertiesDidChange(const ViewportArgumen
if (!m_webView->settings()->viewportEnabled() || !m_webView->isFixedLayoutModeEnabled() || !m_webView->client() || !m_webView->page())
return;
- FrameView* frameView = m_webView->mainFrameImpl()->frameView();
- int dpi = screenHorizontalDPI(frameView);
- ASSERT(dpi > 0);
-
WebViewClient* client = m_webView->client();
- WebRect deviceRect = client->windowRect();
+ WebSize deviceSize = m_webView->size();
// If the window size has not been set yet don't attempt to set the viewport
- if (!deviceRect.width || !deviceRect.height)
+ if (!deviceSize.width || !deviceSize.height)
return;
Settings* settings = m_webView->page()->settings();
- float devicePixelRatio = dpi / ViewportArguments::deprecatedTargetDPI;
+ float devicePixelRatio = client->screenInfo().deviceScaleFactor;
// Call the common viewport computing logic in ViewportArguments.cpp.
ViewportAttributes computed = computeViewportAttributes(
- arguments, settings->layoutFallbackWidth(), deviceRect.width, deviceRect.height,
- devicePixelRatio, IntSize(deviceRect.width, deviceRect.height));
+ arguments, settings->layoutFallbackWidth(), deviceSize.width, deviceSize.height,
+ devicePixelRatio, IntSize(deviceSize.width, deviceSize.height));
restrictScaleFactorToInitialScaleIfNotUserScalable(computed);
@@ -675,7 +681,14 @@ void ChromeClientImpl::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64
#if ENABLE(INPUT_TYPE_COLOR)
PassOwnPtr<ColorChooser> ChromeClientImpl::createColorChooser(ColorChooserClient* chooserClient, const Color&)
{
- return adoptPtr(new ColorChooserUIController(this, chooserClient));
+ OwnPtr<ColorChooserUIController> controller;
+#if ENABLE(PAGE_POPUP)
+ controller = adoptPtr(new ColorChooserPopupUIController(this, chooserClient));
+#else
+ controller = adoptPtr(new ColorChooserUIController(this, chooserClient));
+#endif
+ controller->openUI();
+ return controller.release();
}
PassOwnPtr<WebColorChooser> ChromeClientImpl::createWebColorChooser(WebColorChooserClient* chooserClient, const WebColor& initialColor)
{
@@ -692,8 +705,7 @@ PassRefPtr<DateTimeChooser> ChromeClientImpl::openDateTimeChooser(DateTimeChoose
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
return DateTimeChooserImpl::create(this, pickerClient, parameters);
#else
- notImplemented();
- return PassRefPtr<DateTimeChooser>();
+ return ExternalDateTimeChooser::create(this, m_webView->client(), pickerClient, parameters);
#endif
}
#endif
diff --git a/Source/WebKit/chromium/src/ColorChooserPopupUIController.cpp b/Source/WebKit/chromium/src/ColorChooserPopupUIController.cpp
new file mode 100644
index 000000000..5af98f087
--- /dev/null
+++ b/Source/WebKit/chromium/src/ColorChooserPopupUIController.cpp
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ColorChooserPopupUIController.h"
+
+#if ENABLE(INPUT_TYPE_COLOR) && ENABLE(PAGE_POPUP)
+#include "ChromeClientImpl.h"
+#include "ColorChooserClient.h"
+#include "ColorSuggestionPicker.h"
+#include "FrameView.h"
+#include "IntRect.h"
+#include "LocalizedStrings.h"
+#include "PickerCommon.h"
+#include "WebColorChooser.h"
+#include "WebViewImpl.h"
+#include <public/Platform.h>
+#include <public/WebLocalizedString.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+// Keep in sync with Actions in colorSuggestionPicker.js.
+enum ColorPickerPopupAction {
+ ColorPickerPopupActionChooseOtherColor = -2,
+ ColorPickerPopupActionCancel = -1,
+ ColorPickerPopupActionSetValue = 0
+};
+
+ColorChooserPopupUIController::ColorChooserPopupUIController(ChromeClientImpl* chromeClient, ColorChooserClient* client)
+ : ColorChooserUIController(chromeClient, client)
+ , m_chromeClient(chromeClient)
+ , m_client(client)
+ , m_popup(0)
+ , m_locale(Locale::createDefault())
+{
+}
+
+ColorChooserPopupUIController::~ColorChooserPopupUIController()
+{
+}
+
+void ColorChooserPopupUIController::openUI()
+{
+ if (m_client->shouldShowSuggestions())
+ openPopup();
+ else
+ openColorChooser();
+}
+
+void ColorChooserPopupUIController::endChooser()
+{
+ if (m_chooser)
+ m_chooser->endChooser();
+ if (m_popup)
+ closePopup();
+}
+
+IntSize ColorChooserPopupUIController::contentSize()
+{
+ return IntSize(0, 0);
+}
+
+void ColorChooserPopupUIController::writeDocument(DocumentWriter& writer)
+{
+ Vector<Color> suggestions = m_client->suggestions();
+ Vector<String> suggestionValues;
+ for (unsigned i = 0; i < suggestions.size(); i++)
+ suggestionValues.append(suggestions[i].serialized());
+ IntRect anchorRectInScreen = m_chromeClient->rootViewToScreen(m_client->elementRectRelativeToRootView());
+ FrameView* view = static_cast<WebViewImpl*>(m_chromeClient->webView())->page()->mainFrame()->view();
+ IntRect rootViewVisibleContentRect = view->visibleContentRect(true /* include scrollbars */);
+ IntRect rootViewRectInScreen = m_chromeClient->rootViewToScreen(rootViewVisibleContentRect);
+
+ PagePopupClient::addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", writer);
+ writer.addData(pickerCommonCss, sizeof(pickerCommonCss));
+ writer.addData(colorSuggestionPickerCss, sizeof(colorSuggestionPickerCss));
+ PagePopupClient::addString("</style></head><body><div id=main>Loading...</div><script>\n"
+ "window.dialogArguments = {\n", writer);
+ PagePopupClient::addProperty("values", suggestionValues, writer);
+ PagePopupClient::addProperty("otherColorLabel", Platform::current()->queryLocalizedString(WebLocalizedString::OtherColorLabel), writer);
+ addProperty("anchorRectInScreen", anchorRectInScreen, writer);
+ addProperty("rootViewRectInScreen", rootViewRectInScreen, writer);
+#if OS(MAC_OS_X)
+ addProperty("confineToRootView", true, writer);
+#else
+ addProperty("confineToRootView", false, writer);
+#endif
+ PagePopupClient::addString("};\n", writer);
+ writer.addData(pickerCommonJs, sizeof(pickerCommonJs));
+ writer.addData(colorSuggestionPickerJs, sizeof(colorSuggestionPickerJs));
+ PagePopupClient::addString("</script></body>\n", writer);
+}
+
+Locale& ColorChooserPopupUIController::locale()
+{
+ return *m_locale;
+}
+
+void ColorChooserPopupUIController::setValueAndClosePopup(int numValue, const String& stringValue)
+{
+ ASSERT(m_popup);
+ ASSERT(m_client);
+ if (numValue == ColorPickerPopupActionSetValue)
+ m_client->didChooseColor(Color(stringValue));
+ if (numValue == ColorPickerPopupActionChooseOtherColor)
+ openColorChooser();
+ closePopup();
+}
+
+void ColorChooserPopupUIController::didClosePopup()
+{
+ m_popup = 0;
+
+ if (!m_chooser)
+ didEndChooser();
+}
+
+
+void ColorChooserPopupUIController::openPopup()
+{
+ ASSERT(!m_popup);
+ m_popup = m_chromeClient->openPagePopup(this, m_client->elementRectRelativeToRootView());
+}
+
+void ColorChooserPopupUIController::closePopup()
+{
+ if (!m_popup)
+ return;
+ m_chromeClient->closePagePopup(m_popup);
+}
+
+}
+#endif // ENABLE(INPUT_TYPE_COLOR) && ENABLE(PAGE_POPUP)
diff --git a/Source/WebKit/chromium/src/ColorChooserPopupUIController.h b/Source/WebKit/chromium/src/ColorChooserPopupUIController.h
new file mode 100644
index 000000000..c4d5848c4
--- /dev/null
+++ b/Source/WebKit/chromium/src/ColorChooserPopupUIController.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef ColorChooserPopupUIController_h
+#define ColorChooserPopupUIController_h
+
+#if ENABLE(INPUT_TYPE_COLOR) && ENABLE(PAGE_POPUP)
+#include "ColorChooserUIController.h"
+#include "PagePopupClient.h"
+#include <wtf/OwnPtr.h>
+
+namespace WebCore {
+class ColorChooserClient;
+class PagePopup;
+}
+
+namespace WebKit {
+
+class ColorChooserPopupUIController : public ColorChooserUIController, public WebCore::PagePopupClient {
+
+public:
+ ColorChooserPopupUIController(ChromeClientImpl*, WebCore::ColorChooserClient*);
+ virtual ~ColorChooserPopupUIController();
+
+ // ColorChooserUIController functions:
+ virtual void openUI() OVERRIDE;
+
+ // ColorChooser functions
+ void endChooser() OVERRIDE;
+
+ // PagePopupClient functions:
+ virtual WebCore::IntSize contentSize() OVERRIDE;
+ virtual void writeDocument(WebCore::DocumentWriter&) OVERRIDE;
+ virtual WebCore::Locale& locale() OVERRIDE;
+ virtual void setValueAndClosePopup(int, const String&) OVERRIDE;
+ virtual void didClosePopup() OVERRIDE;
+
+private:
+ void openPopup();
+ void closePopup();
+
+ ChromeClientImpl* m_chromeClient;
+ WebCore::ColorChooserClient* m_client;
+ WebCore::PagePopup* m_popup;
+ OwnPtr<WebCore::Locale> m_locale;
+};
+}
+
+#endif // ENABLE(INPUT_TYPE_COLOR) && ENABLE(PAGE_POPUP)
+
+#endif // ColorChooserPopupUIController_h
diff --git a/Source/WebKit/chromium/src/ColorChooserUIController.cpp b/Source/WebKit/chromium/src/ColorChooserUIController.cpp
index 5789691e8..7ab3c34d4 100644
--- a/Source/WebKit/chromium/src/ColorChooserUIController.cpp
+++ b/Source/WebKit/chromium/src/ColorChooserUIController.cpp
@@ -27,48 +27,32 @@
#include "ColorChooserUIController.h"
#if ENABLE(INPUT_TYPE_COLOR)
-
#include "ChromeClientImpl.h"
#include "Color.h"
#include "ColorChooserClient.h"
-#include "ColorSuggestionPicker.h"
-#include "FrameView.h"
-#include "IntRect.h"
-#include "LocalizedStrings.h"
-#include "PickerCommon.h"
#include "WebColorChooser.h"
-#include "WebViewImpl.h"
-#include <public/Platform.h>
#include <public/WebColor.h>
-#include <public/WebLocalizedString.h>
using namespace WebCore;
namespace WebKit {
-// Keep in sync with Actions in colorSuggestionPicker.js.
-enum ColorPickerPopupAction {
- ColorPickerPopupActionChooseOtherColor = -2,
- ColorPickerPopupActionCancel = -1,
- ColorPickerPopupActionSetValue = 0
-};
ColorChooserUIController::ColorChooserUIController(ChromeClientImpl* chromeClient, ColorChooserClient* client)
: m_chromeClient(chromeClient)
, m_client(client)
- , m_popup(0)
- , m_locale(Locale::createDefault())
{
- if (m_client->shouldShowSuggestions())
- openPopup();
- else
- openColorChooser();
}
ColorChooserUIController::~ColorChooserUIController()
{
}
+void ColorChooserUIController::openUI()
+{
+ openColorChooser();
+}
+
void ColorChooserUIController::setSelectedColor(const Color& color)
{
ASSERT(m_chooser);
@@ -79,8 +63,6 @@ void ColorChooserUIController::endChooser()
{
if (m_chooser)
m_chooser->endChooser();
- if (m_popup)
- closePopup();
}
void ColorChooserUIController::didChooseColor(const WebColor& color)
@@ -96,79 +78,6 @@ void ColorChooserUIController::didEndChooser()
m_client->didEndChooser();
}
-IntSize ColorChooserUIController::contentSize()
-{
- return IntSize(0, 0);
-}
-
-void ColorChooserUIController::writeDocument(DocumentWriter& writer)
-{
- Vector<Color> suggestions = m_client->suggestions();
- Vector<String> suggestionValues;
- for (unsigned i = 0; i < suggestions.size(); i++)
- suggestionValues.append(suggestions[i].serialized());
- IntRect anchorRectInScreen = m_chromeClient->rootViewToScreen(m_client->elementRectRelativeToRootView());
- FrameView* view = static_cast<WebViewImpl*>(m_chromeClient->webView())->page()->mainFrame()->view();
- IntRect rootViewVisibleContentRect = view->visibleContentRect(true /* include scrollbars */);
- IntRect rootViewRectInScreen = m_chromeClient->rootViewToScreen(rootViewVisibleContentRect);
-
- PagePopupClient::addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", writer);
- writer.addData(pickerCommonCss, sizeof(pickerCommonCss));
- writer.addData(colorSuggestionPickerCss, sizeof(colorSuggestionPickerCss));
- PagePopupClient::addString("</style></head><body><div id=main>Loading...</div><script>\n"
- "window.dialogArguments = {\n", writer);
- PagePopupClient::addProperty("values", suggestionValues, writer);
- PagePopupClient::addProperty("otherColorLabel", Platform::current()->queryLocalizedString(WebLocalizedString::OtherColorLabel), writer);
- addProperty("anchorRectInScreen", anchorRectInScreen, writer);
- addProperty("rootViewRectInScreen", rootViewRectInScreen, writer);
-#if OS(MAC_OS_X)
- addProperty("confineToRootView", true, writer);
-#else
- addProperty("confineToRootView", false, writer);
-#endif
- PagePopupClient::addString("};\n", writer);
- writer.addData(pickerCommonJs, sizeof(pickerCommonJs));
- writer.addData(colorSuggestionPickerJs, sizeof(colorSuggestionPickerJs));
- PagePopupClient::addString("</script></body>\n", writer);
-}
-
-Locale& ColorChooserUIController::locale()
-{
- return *m_locale;
-}
-
-void ColorChooserUIController::setValueAndClosePopup(int numValue, const String& stringValue)
-{
- ASSERT(m_popup);
- ASSERT(m_client);
- if (numValue == ColorPickerPopupActionSetValue)
- m_client->didChooseColor(Color(stringValue));
- if (numValue == ColorPickerPopupActionChooseOtherColor)
- openColorChooser();
- closePopup();
-}
-
-void ColorChooserUIController::didClosePopup()
-{
- m_popup = 0;
-
- if (!m_chooser)
- didEndChooser();
-}
-
-void ColorChooserUIController::openPopup()
-{
- ASSERT(!m_popup);
- m_popup = m_chromeClient->openPagePopup(this, m_client->elementRectRelativeToRootView());
-}
-
-void ColorChooserUIController::closePopup()
-{
- if (!m_popup)
- return;
- m_chromeClient->closePagePopup(m_popup);
-}
-
void ColorChooserUIController::openColorChooser()
{
ASSERT(!m_chooser);
diff --git a/Source/WebKit/chromium/src/ColorChooserUIController.h b/Source/WebKit/chromium/src/ColorChooserUIController.h
index 60cecfe18..4f32d7e0a 100644
--- a/Source/WebKit/chromium/src/ColorChooserUIController.h
+++ b/Source/WebKit/chromium/src/ColorChooserUIController.h
@@ -29,15 +29,12 @@
#if ENABLE(INPUT_TYPE_COLOR)
#include "ColorChooser.h"
-#include "PagePopupClient.h"
#include "PlatformLocale.h"
#include "WebColorChooserClient.h"
#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
namespace WebCore {
class ColorChooserClient;
-class PagePopup;
}
namespace WebKit {
@@ -45,11 +42,13 @@ namespace WebKit {
class ChromeClientImpl;
class WebColorChooser;
-class ColorChooserUIController : public WebColorChooserClient, public WebCore::ColorChooser, public WebCore::PagePopupClient {
+class ColorChooserUIController : public WebColorChooserClient, public WebCore::ColorChooser {
public:
ColorChooserUIController(ChromeClientImpl*, WebCore::ColorChooserClient*);
virtual ~ColorChooserUIController();
+ virtual void openUI();
+
// ColorChooser functions:
virtual void setSelectedColor(const WebCore::Color&) OVERRIDE;
virtual void endChooser() OVERRIDE;
@@ -58,23 +57,14 @@ public:
virtual void didChooseColor(const WebColor&) OVERRIDE;
virtual void didEndChooser() OVERRIDE;
- // PagePopupClient functions:
- virtual WebCore::IntSize contentSize() OVERRIDE;
- virtual void writeDocument(WebCore::DocumentWriter&) OVERRIDE;
- virtual WebCore::Locale& locale() OVERRIDE;
- virtual void setValueAndClosePopup(int, const String&) OVERRIDE;
- virtual void didClosePopup() OVERRIDE;
+protected:
+ void openColorChooser();
+ OwnPtr<WebColorChooser> m_chooser;
private:
- void openPopup();
- void closePopup();
- void openColorChooser();
ChromeClientImpl* m_chromeClient;
WebCore::ColorChooserClient* m_client;
- OwnPtr<WebColorChooser> m_chooser;
- WebCore::PagePopup* m_popup;
- OwnPtr<WebCore::Locale> m_locale;
};
}
diff --git a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
index ad116090c..bda1b2e9a 100644
--- a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -120,7 +120,7 @@ static String selectMisspelledWord(const ContextMenu* defaultMenu, Frame* select
// Selection is empty, so change the selection to the word under the cursor.
HitTestResult hitTestResult = selectedFrame->eventHandler()->
- hitTestResultAtPoint(selectedFrame->page()->contextMenuController()->hitTestResult().point(), true);
+ hitTestResultAtPoint(selectedFrame->page()->contextMenuController()->hitTestResult().pointInInnerNodeFrame(), true);
Node* innerNode = hitTestResult.innerNode();
VisiblePosition pos(innerNode->renderer()->positionForPoint(
hitTestResult.localPoint()));
@@ -155,10 +155,10 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
return 0;
HitTestResult r = m_webView->page()->contextMenuController()->hitTestResult();
- Frame* selectedFrame = r.innerNonSharedNode()->document()->frame();
+ Frame* selectedFrame = r.innerNodeFrame();
WebContextMenuData data;
- data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPoint());
+ data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPointInInnerNodeFrame());
// Compute edit flags.
data.editFlags = WebContextMenuData::CanDoNone;
@@ -212,7 +212,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
if (mediaElement->hasVideo())
data.mediaFlags |= WebContextMenuData::MediaHasVideo;
if (mediaElement->controls())
- data.mediaFlags |= WebContextMenuData::MediaControlRootElement;
+ data.mediaFlags |= WebContextMenuData::MediaControls;
} else if (r.innerNonSharedNode()->hasTagName(HTMLNames::objectTag)
|| r.innerNonSharedNode()->hasTagName(HTMLNames::embedTag)) {
RenderObject* object = r.innerNonSharedNode()->renderer();
@@ -298,8 +298,9 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
selectedFrame->selection()->setSelection(selection, WordGranularity);
}
}
- } else if (m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled()) {
- data.isSpellCheckingEnabled = true;
+ } else {
+ data.isSpellCheckingEnabled =
+ m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled();
// Spellchecking might be enabled for the field, but could be disabled on the node.
if (m_webView->focusedWebCoreFrame()->editor()->isSpellCheckingEnabledInFocusedNode()) {
data.misspelledWord = selectMisspelledWord(defaultMenu, selectedFrame);
diff --git a/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp b/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp
index f44157a76..d966ba9d6 100644
--- a/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp
+++ b/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp
@@ -60,7 +60,7 @@ DateTimeChooserImpl::DateTimeChooserImpl(ChromeClientImpl* chromeClient, WebCore
, m_client(client)
, m_popup(0)
, m_parameters(parameters)
- , m_locale(WebCore::Locale::createDefault())
+ , m_locale(WebCore::Locale::create(parameters.locale))
{
ASSERT(m_chromeClient);
ASSERT(m_client);
@@ -110,12 +110,17 @@ void DateTimeChooserImpl::writeDocument(WebCore::DocumentWriter& writer)
IntRect rootViewRectInScreen = m_chromeClient->rootViewToScreen(rootViewVisibleContentRect);
rootViewRectInScreen.move(-view->scrollX(), -view->scrollY());
String todayLabelString;
- if (m_parameters.type == WebCore::InputTypeNames::month())
+ String otherDateLabelString;
+ if (m_parameters.type == WebCore::InputTypeNames::month()) {
todayLabelString = Platform::current()->queryLocalizedString(WebLocalizedString::ThisMonthButtonLabel);
- else if (m_parameters.type == WebCore::InputTypeNames::week())
+ otherDateLabelString = Platform::current()->queryLocalizedString(WebLocalizedString::OtherMonthLabel);
+ } else if (m_parameters.type == WebCore::InputTypeNames::week()) {
todayLabelString = Platform::current()->queryLocalizedString(WebLocalizedString::ThisWeekButtonLabel);
- else
+ otherDateLabelString = Platform::current()->queryLocalizedString(WebLocalizedString::OtherWeekLabel);
+ } else {
todayLabelString = Platform::current()->queryLocalizedString(WebLocalizedString::CalendarToday);
+ otherDateLabelString = Platform::current()->queryLocalizedString(WebLocalizedString::OtherDateLabel);
+ }
addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", writer);
writer.addData(WebCore::pickerCommonCss, sizeof(WebCore::pickerCommonCss));
@@ -139,12 +144,11 @@ void DateTimeChooserImpl::writeDocument(WebCore::DocumentWriter& writer)
addProperty("stepBase", stepBaseString, writer);
addProperty("required", m_parameters.required, writer);
addProperty("currentValue", m_parameters.currentValue, writer);
- addProperty("locale", WebCore::defaultLanguage(), writer);
+ addProperty("locale", m_parameters.locale.string(), writer);
addProperty("todayLabel", todayLabelString, writer);
addProperty("clearLabel", Platform::current()->queryLocalizedString(WebLocalizedString::CalendarClear), writer);
addProperty("weekLabel", Platform::current()->queryLocalizedString(WebLocalizedString::WeekNumberLabel), writer);
addProperty("weekStartDay", m_locale->firstDayOfWeek(), writer);
- addProperty("monthLabels", m_locale->monthLabels(), writer);
addProperty("dayLabels", m_locale->weekDayShortLabels(), writer);
addProperty("isCalendarRTL", m_locale->isRTL(), writer);
addProperty("isRTL", m_parameters.isAnchorElementRTL, writer);
@@ -154,8 +158,8 @@ void DateTimeChooserImpl::writeDocument(WebCore::DocumentWriter& writer)
addProperty("suggestionValues", m_parameters.suggestionValues, writer);
addProperty("localizedSuggestionValues", m_parameters.localizedSuggestionValues, writer);
addProperty("suggestionLabels", m_parameters.suggestionLabels, writer);
- addProperty("showOtherDateEntry", m_parameters.type == WebCore::InputTypeNames::date(), writer);
- addProperty("otherDateLabel", Platform::current()->queryLocalizedString(WebLocalizedString::OtherDateLabel), writer);
+ addProperty("showOtherDateEntry", WebCore::RenderTheme::defaultTheme()->supportsCalendarPicker(m_parameters.type), writer);
+ addProperty("otherDateLabel", otherDateLabelString, writer);
addProperty("suggestionHighlightColor", WebCore::RenderTheme::defaultTheme()->activeListBoxSelectionBackgroundColor().serialized(), writer);
addProperty("suggestionHighlightTextColor", WebCore::RenderTheme::defaultTheme()->activeListBoxSelectionForegroundColor().serialized(), writer);
}
diff --git a/Source/WebKit/chromium/src/ExternalDateTimeChooser.cpp b/Source/WebKit/chromium/src/ExternalDateTimeChooser.cpp
new file mode 100644
index 000000000..5a705e872
--- /dev/null
+++ b/Source/WebKit/chromium/src/ExternalDateTimeChooser.cpp
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "config.h"
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES) && !ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+#include "ExternalDateTimeChooser.h"
+
+#include "ChromeClientImpl.h"
+#include "DateTimeChooserClient.h"
+#include "WebDateTimeChooserCompletion.h"
+#include "WebDateTimeChooserParams.h"
+#include "WebViewClient.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+class WebDateTimeChooserCompletionImpl : public WebDateTimeChooserCompletion {
+public:
+ WebDateTimeChooserCompletionImpl(ExternalDateTimeChooser* chooser)
+ : m_chooser(chooser)
+ {
+ }
+
+private:
+ virtual void didChooseValue(const WebString& value) OVERRIDE
+ {
+ m_chooser->didChooseValue(value);
+ delete this;
+ }
+
+ virtual void didCancelChooser() OVERRIDE
+ {
+ m_chooser->didCancelChooser();
+ delete this;
+ }
+
+ RefPtr<ExternalDateTimeChooser> m_chooser;
+};
+
+ExternalDateTimeChooser::~ExternalDateTimeChooser()
+{
+}
+
+ExternalDateTimeChooser::ExternalDateTimeChooser(WebCore::DateTimeChooserClient* client)
+ : m_client(client)
+{
+ ASSERT(client);
+}
+
+PassRefPtr<ExternalDateTimeChooser> ExternalDateTimeChooser::create(ChromeClientImpl* chromeClient, WebViewClient* webViewClient, WebCore::DateTimeChooserClient* client, const WebCore::DateTimeChooserParameters& parameters)
+{
+ ASSERT(chromeClient);
+ RefPtr<ExternalDateTimeChooser> chooser = adoptRef(new ExternalDateTimeChooser(client));
+ if (!chooser->openDateTimeChooser(chromeClient, webViewClient, parameters))
+ chooser.clear();
+ return chooser.release();
+}
+
+bool ExternalDateTimeChooser::openDateTimeChooser(ChromeClientImpl* chromeClient, WebViewClient* webViewClient, const DateTimeChooserParameters& parameters)
+{
+ if (!webViewClient)
+ return false;
+
+ WebDateTimeChooserParams webParams;
+ webParams.type = parameters.type;
+ webParams.anchorRectInScreen = chromeClient->rootViewToScreen(parameters.anchorRectInRootView);
+ webParams.currentValue = parameters.currentValue;
+ webParams.suggestionValues = parameters.suggestionValues;
+ webParams.localizedSuggestionValues = parameters.localizedSuggestionValues;
+ webParams.suggestionLabels = parameters.suggestionLabels;
+ webParams.minimum = parameters.minimum;
+ webParams.maximum = parameters.maximum;
+ webParams.step = parameters.step;
+ webParams.stepBase = parameters.stepBase;
+ webParams.isRequired = parameters.required;
+ webParams.isAnchorElementRTL = parameters.isAnchorElementRTL;
+
+ WebDateTimeChooserCompletion* completion = new WebDateTimeChooserCompletionImpl(this);
+ if (webViewClient->openDateTimeChooser(webParams, completion))
+ return true;
+ // We can't open a chooser. Calling
+ // WebDateTimeChooserCompletionImpl::didCancelChooser to delete the
+ // WebDateTimeChooserCompletionImpl object and deref this.
+ completion->didCancelChooser();
+ return false;
+}
+
+void ExternalDateTimeChooser::didChooseValue(const WebString& value)
+{
+ if (m_client)
+ m_client->didChooseValue(value);
+ // didChooseValue might run JavaScript code, and endChooser() might be
+ // called. However DateTimeChooserCompletionImpl still has one reference to
+ // this object.
+ if (m_client)
+ m_client->didEndChooser();
+}
+
+void ExternalDateTimeChooser::didCancelChooser()
+{
+ if (m_client)
+ m_client->didEndChooser();
+}
+
+void ExternalDateTimeChooser::endChooser()
+{
+ DateTimeChooserClient* client = m_client;
+ m_client = 0;
+ client->didEndChooser();
+}
+
+}
+
+#endif
diff --git a/Source/WebKit/chromium/src/ExternalDateTimeChooser.h b/Source/WebKit/chromium/src/ExternalDateTimeChooser.h
new file mode 100644
index 000000000..342db211a
--- /dev/null
+++ b/Source/WebKit/chromium/src/ExternalDateTimeChooser.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef ExternalDateTimeChooser_h
+#define ExternalDateTimeChooser_h
+
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES) && !ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+#include "DateTimeChooser.h"
+
+namespace WebCore {
+class DateTimeChooserClient;
+}
+
+namespace WebKit {
+
+class ChromeClientImpl;
+class WebString;
+class WebViewClient;
+
+class ExternalDateTimeChooser : public WebCore::DateTimeChooser {
+public:
+ static PassRefPtr<ExternalDateTimeChooser> create(ChromeClientImpl*, WebViewClient*, WebCore::DateTimeChooserClient*, const WebCore::DateTimeChooserParameters&);
+ virtual ~ExternalDateTimeChooser();
+
+ // The following functions are for DateTimeChooserCompletion.
+ void didChooseValue(const WebString&);
+ void didCancelChooser();
+
+private:
+ ExternalDateTimeChooser(WebCore::DateTimeChooserClient*);
+ bool openDateTimeChooser(ChromeClientImpl*, WebViewClient*, const WebCore::DateTimeChooserParameters&);
+
+ // DateTimeChooer function:
+ virtual void endChooser() OVERRIDE;
+
+ WebCore::DateTimeChooserClient* m_client;
+};
+
+}
+#endif
+
+#endif
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 7ffe94339..9d0aab495 100644
--- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -1662,4 +1662,20 @@ void FrameLoaderClientImpl::didRequestAutocomplete(PassRefPtr<FormState> formSta
}
#endif
+#if ENABLE(WEBGL)
+bool FrameLoaderClientImpl::allowWebGL(bool enabledPerSettings)
+{
+ if (m_webFrame->client())
+ return m_webFrame->client()->allowWebGL(m_webFrame, enabledPerSettings);
+
+ return enabledPerSettings;
+}
+
+void FrameLoaderClientImpl::didLoseWebGLContext(int arbRobustnessContextLostReason)
+{
+ if (m_webFrame->client())
+ m_webFrame->client()->didLoseWebGLContext(m_webFrame, arbRobustnessContextLostReason);
+}
+#endif
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
index 6589c37bb..2aa624bdf 100644
--- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -229,6 +229,11 @@ public:
virtual void didRequestAutocomplete(PassRefPtr<WebCore::FormState>) OVERRIDE;
#endif
+#if ENABLE(WEBGL)
+ virtual bool allowWebGL(bool enabledPerSettings) OVERRIDE;
+ virtual void didLoseWebGLContext(int arbRobustnessContextLostReason) OVERRIDE;
+#endif
+
private:
void makeDocumentView();
diff --git a/Source/WebKit/chromium/src/FrameNetworkingContextImpl.cpp b/Source/WebKit/chromium/src/FrameNetworkingContextImpl.cpp
new file mode 100644
index 000000000..54f005002
--- /dev/null
+++ b/Source/WebKit/chromium/src/FrameNetworkingContextImpl.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "FrameNetworkingContextImpl.h"
+
+#include "WebFrameClient.h"
+#include "WebFrameImpl.h"
+#include <public/Platform.h>
+
+namespace WebKit {
+
+WebCookieJar* FrameNetworkingContextImpl::cookieJar() const
+{
+ WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(frame());
+ if (!frameImpl || !frameImpl->client())
+ return 0;
+ WebCookieJar* cookieJar = frameImpl->client()->cookieJar(frameImpl);
+ if (!cookieJar)
+ cookieJar = WebKit::Platform::current()->cookieJar();
+ return cookieJar;
+}
+
+}
diff --git a/Source/WebKit/chromium/src/FrameNetworkingContextImpl.h b/Source/WebKit/chromium/src/FrameNetworkingContextImpl.h
index 86705067b..6eccd0332 100644
--- a/Source/WebKit/chromium/src/FrameNetworkingContextImpl.h
+++ b/Source/WebKit/chromium/src/FrameNetworkingContextImpl.h
@@ -21,11 +21,14 @@
#define FrameNetworkingContextImpl_h
#include "FrameNetworkingContext.h"
+#include <public/WebCookieJar.h>
namespace WebKit {
class FrameNetworkingContextImpl : public WebCore::FrameNetworkingContext {
public:
+ virtual WebCookieJar* cookieJar() const OVERRIDE;
+
static PassRefPtr<FrameNetworkingContextImpl> create(WebCore::Frame* frame)
{
return adoptRef(new FrameNetworkingContextImpl(frame));
diff --git a/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp b/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
index 42ac76ba5..81cb549e5 100644
--- a/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
@@ -31,6 +31,7 @@
#if ENABLE(INDEXED_DATABASE)
+#include "DOMStringList.h"
#include "IDBCursorBackendInterface.h"
#include "IDBDatabaseBackendInterface.h"
#include "IDBDatabaseBackendProxy.h"
diff --git a/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp b/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp
index f6d964470..0bc95466d 100644
--- a/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp
@@ -77,14 +77,6 @@ PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseBackendProxy::createObject
return IDBObjectStoreBackendProxy::create(objectStore.release());
}
-void IDBDatabaseBackendProxy::deleteObjectStore(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
-{
- // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
- // all implementations of IDB interfaces are proxy objects.
- IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- m_webIDBDatabase->deleteObjectStore(name, *transactionProxy->getWebIDBTransaction(), ec);
-}
-
void IDBDatabaseBackendProxy::deleteObjectStore(int64_t objectStoreId, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
@@ -99,17 +91,6 @@ void IDBDatabaseBackendProxy::setVersion(const String& version, PassRefPtr<IDBCa
m_webIDBDatabase->setVersion(version, new WebIDBCallbacksImpl(callbacks), ec);
}
-PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseBackendProxy::transaction(DOMStringList* storeNames, unsigned short mode, ExceptionCode& ec)
-{
- WebDOMStringList names(storeNames);
- OwnPtr<WebIDBTransaction> transaction = adoptPtr(m_webIDBDatabase->transaction(names, mode, ec));
- if (!transaction) {
- ASSERT(ec);
- return 0;
- }
- return IDBTransactionBackendProxy::create(transaction.release());
-}
-
PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseBackendProxy::transaction(const Vector<int64_t>& objectStoreIds, unsigned short mode)
{
OwnPtr<WebIDBTransaction> transaction = adoptPtr(m_webIDBDatabase->transaction(objectStoreIds, mode));
diff --git a/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h b/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h
index 916f833ab..aa8fdf0c9 100644
--- a/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h
@@ -45,10 +45,8 @@ public:
virtual WebCore::IDBDatabaseMetadata metadata() const;
virtual PassRefPtr<WebCore::IDBObjectStoreBackendInterface> createObjectStore(int64_t, const String& name, const WebCore::IDBKeyPath&, bool autoIncrement, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
- virtual void deleteObjectStore(const String& name, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void deleteObjectStore(int64_t, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void setVersion(const String& version, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::IDBDatabaseCallbacks>, WebCore::ExceptionCode&);
- virtual PassRefPtr<WebCore::IDBTransactionBackendInterface> transaction(WebCore::DOMStringList* storeNames, unsigned short mode, WebCore::ExceptionCode&);
virtual PassRefPtr<WebCore::IDBTransactionBackendInterface> transaction(const Vector<int64_t>&, unsigned short mode);
virtual void close(PassRefPtr<WebCore::IDBDatabaseCallbacks>);
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
index 6a0d02772..8e89deb03 100755
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
@@ -67,16 +67,6 @@ void IDBObjectStoreBackendProxy::get(PassRefPtr<IDBKeyRange> keyRange, PassRefPt
m_webIDBObjectStore->get(keyRange, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBObjectStoreBackendProxy::putWithIndexKeys(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, const Vector<String>& indexNames, const Vector<IndexKeys>& indexKeys, ExceptionCode& ec)
-{
- // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
- // all implementations of IDB interfaces are proxy objects.
- IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- WebVector<WebString> webIndexNames(indexNames);
- WebVector<IndexKeys> webIndexKeys(indexKeys);
- m_webIDBObjectStore->putWithIndexKeys(value, key, static_cast<WebIDBObjectStore::PutMode>(putMode), new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), webIndexNames, webIndexKeys, ec);
-}
-
void IDBObjectStoreBackendProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
@@ -85,16 +75,6 @@ void IDBObjectStoreBackendProxy::put(PassRefPtr<SerializedScriptValue> value, Pa
m_webIDBObjectStore->put(value, key, static_cast<WebIDBObjectStore::PutMode>(putMode), new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), indexIds, indexKeys);
}
-void IDBObjectStoreBackendProxy::setIndexKeys(PassRefPtr<IDBKey> prpPrimaryKey, const Vector<String>& indexNames, const Vector<IndexKeys>& indexKeys, IDBTransactionBackendInterface* transaction)
-{
- // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
- // all implementations of IDB interfaces are proxy objects.
- IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- WebVector<WebString> webIndexNames(indexNames);
- WebVector<IndexKeys> webIndexKeys(indexKeys);
- m_webIDBObjectStore->setIndexKeys(prpPrimaryKey, webIndexNames, webIndexKeys, *transactionProxy->getWebIDBTransaction());
-}
-
void IDBObjectStoreBackendProxy::setIndexKeys(PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys, IDBTransactionBackendInterface* transaction)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
@@ -130,25 +110,6 @@ PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendProxy::createIndex(int
return IDBIndexBackendProxy::create(index.release());
}
-PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendProxy::createIndex(const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
-{
- // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
- // all implementations of IDB interfaces are proxy objects.
- IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- OwnPtr<WebIDBIndex> index = adoptPtr(m_webIDBObjectStore->createIndex(name, keyPath, unique, multiEntry, *transactionProxy->getWebIDBTransaction(), ec));
- if (!index)
- return 0;
- return IDBIndexBackendProxy::create(index.release());
-}
-
-void IDBObjectStoreBackendProxy::setIndexesReady(const Vector<String>& indexNames, IDBTransactionBackendInterface* transaction)
-{
- // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
- // all implementations of IDB interfaces are proxy objects.
- IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- m_webIDBObjectStore->setIndexesReady(WebVector<WebString>(indexNames), *transactionProxy->getWebIDBTransaction());
-}
-
void IDBObjectStoreBackendProxy::setIndexesReady(const Vector<int64_t>& indexIds, IDBTransactionBackendInterface* transaction)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
@@ -157,14 +118,6 @@ void IDBObjectStoreBackendProxy::setIndexesReady(const Vector<int64_t>& indexIds
m_webIDBObjectStore->setIndexesReady(WebVector<long long>(indexIds), *transactionProxy->getWebIDBTransaction());
}
-PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendProxy::index(const String& name, ExceptionCode& ec)
-{
- OwnPtr<WebIDBIndex> index = adoptPtr(m_webIDBObjectStore->index(name, ec));
- if (!index)
- return 0;
- return IDBIndexBackendProxy::create(index.release());
-}
-
PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendProxy::index(int64_t indexId)
{
OwnPtr<WebIDBIndex> index = adoptPtr(m_webIDBObjectStore->index(indexId));
@@ -173,14 +126,6 @@ PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendProxy::index(int64_t i
return IDBIndexBackendProxy::create(index.release());
}
-void IDBObjectStoreBackendProxy::deleteIndex(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
-{
- // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
- // all implementations of IDB interfaces are proxy objects.
- IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- m_webIDBObjectStore->deleteIndex(name, *transactionProxy->getWebIDBTransaction(), ec);
-}
-
void IDBObjectStoreBackendProxy::deleteIndex(const int64_t indexId, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
index 79113ae95..da8f6bbdd 100644
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
@@ -44,21 +44,15 @@ public:
virtual ~IDBObjectStoreBackendProxy();
virtual void get(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
- virtual void putWithIndexKeys(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, const WTF::Vector<WTF::String>&, const WTF::Vector<IndexKeys>&, WebCore::ExceptionCode&);
virtual void put(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, const WTF::Vector<int64_t>&, const WTF::Vector<IndexKeys>&);
virtual void deleteFunction(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void clear(PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
PassRefPtr<WebCore::IDBIndexBackendInterface> createIndex(int64_t id, const String& name, const WebCore::IDBKeyPath&, bool unique, bool multiEntry, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
- PassRefPtr<WebCore::IDBIndexBackendInterface> createIndex(const String& name, const WebCore::IDBKeyPath&, bool unique, bool multiEntry, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
- virtual void setIndexKeys(PassRefPtr<WebCore::IDBKey> prpPrimaryKey, const WTF::Vector<WTF::String>&, const Vector<IndexKeys>&, WebCore::IDBTransactionBackendInterface*);
virtual void setIndexKeys(PassRefPtr<WebCore::IDBKey> prpPrimaryKey, const WTF::Vector<int64_t>&, const Vector<IndexKeys>&, WebCore::IDBTransactionBackendInterface*);
- virtual void setIndexesReady(const Vector<String>&, WebCore::IDBTransactionBackendInterface*);
virtual void setIndexesReady(const Vector<int64_t>&, WebCore::IDBTransactionBackendInterface*);
- PassRefPtr<WebCore::IDBIndexBackendInterface> index(const String& name, WebCore::ExceptionCode&);
PassRefPtr<WebCore::IDBIndexBackendInterface> index(int64_t);
- void deleteIndex(const String& name, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
void deleteIndex(int64_t, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void openCursor(PassRefPtr<WebCore::IDBKeyRange>, WebCore::IDBCursor::Direction, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface::TaskType, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
diff --git a/Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp b/Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
index f0837fef6..572963c13 100644
--- a/Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
@@ -54,14 +54,6 @@ IDBTransactionBackendProxy::~IDBTransactionBackendProxy()
{
}
-PassRefPtr<IDBObjectStoreBackendInterface> IDBTransactionBackendProxy::objectStore(const String& name, ExceptionCode& ec)
-{
- OwnPtr<WebIDBObjectStore> objectStore = adoptPtr(m_webIDBTransaction->objectStore(name, ec));
- if (!objectStore)
- return 0;
- return IDBObjectStoreBackendProxy::create(objectStore.release());
-}
-
PassRefPtr<WebCore::IDBObjectStoreBackendInterface> IDBTransactionBackendProxy::objectStore(int64_t indexId, ExceptionCode& ec)
{
OwnPtr<WebIDBObjectStore> objectStore = adoptPtr(m_webIDBTransaction->objectStore(indexId, ec));
diff --git a/Source/WebKit/chromium/src/IDBTransactionBackendProxy.h b/Source/WebKit/chromium/src/IDBTransactionBackendProxy.h
index e8f2c3375..0a6a53b84 100644
--- a/Source/WebKit/chromium/src/IDBTransactionBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBTransactionBackendProxy.h
@@ -41,7 +41,6 @@ public:
static PassRefPtr<IDBTransactionBackendInterface> create(PassOwnPtr<WebIDBTransaction>);
virtual ~IDBTransactionBackendProxy();
- virtual PassRefPtr<WebCore::IDBObjectStoreBackendInterface> objectStore(const String& name, WebCore::ExceptionCode&);
virtual PassRefPtr<WebCore::IDBObjectStoreBackendInterface> objectStore(int64_t, WebCore::ExceptionCode&);
virtual void commit();
virtual void abort();
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.cpp b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
index c6e7b2277..220b7db74 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.cpp
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
@@ -163,6 +163,16 @@ void InspectorClientImpl::autoZoomPageToFitWidth()
agent->autoZoomPageToFitWidth();
}
+bool InspectorClientImpl::canShowFPSCounter()
+{
+ return true;
+}
+
+void InspectorClientImpl::setShowFPSCounter(bool show)
+{
+ m_inspectedWebView->setShowFPSCounter(show);
+}
+
bool InspectorClientImpl::supportsFrameInstrumentation()
{
return true;
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.h b/Source/WebKit/chromium/src/InspectorClientImpl.h
index 75e1e4342..a759257af 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.h
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.h
@@ -77,6 +77,9 @@ public:
virtual void overrideDeviceMetrics(int, int, float, bool);
virtual void autoZoomPageToFitWidth();
+ virtual bool canShowFPSCounter();
+ virtual void setShowFPSCounter(bool);
+
virtual bool supportsFrameInstrumentation();
virtual void getAllocatedObjects(HashSet<const void*>&);
diff --git a/Source/WebKit/chromium/src/LinkHighlight.cpp b/Source/WebKit/chromium/src/LinkHighlight.cpp
index 583358b94..48709dc25 100644
--- a/Source/WebKit/chromium/src/LinkHighlight.cpp
+++ b/Source/WebKit/chromium/src/LinkHighlight.cpp
@@ -48,6 +48,7 @@
#include <public/WebRect.h>
#include <public/WebSize.h>
#include <public/WebTransformationMatrix.h>
+#include <wtf/CurrentTime.h>
using namespace WebCore;
@@ -66,6 +67,7 @@ LinkHighlight::LinkHighlight(Node* node, WebViewImpl* owningWebViewImpl)
, m_currentGraphicsLayer(0)
, m_geometryNeedsUpdate(false)
, m_isAnimating(false)
+ , m_startTime(monotonicallyIncreasingTime())
{
ASSERT(m_node);
ASSERT(owningWebViewImpl);
@@ -246,7 +248,8 @@ void LinkHighlight::startHighlightAnimationIfNeeded()
m_isAnimating = true;
const float startOpacity = 1;
// FIXME: Should duration be configurable?
- const float duration = 0.1f;
+ const float fadeDuration = 0.1f;
+ const float minPreFadeDuration = 0.1f;
m_contentLayer->layer()->setOpacity(startOpacity);
@@ -255,9 +258,12 @@ void LinkHighlight::startHighlightAnimationIfNeeded()
OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(compositorSupport->createFloatAnimationCurve());
curve->add(WebFloatKeyframe(0, startOpacity));
- curve->add(WebFloatKeyframe(duration / 2, startOpacity));
+ // Make sure we have displayed for at least minPreFadeDuration before starting to fade out.
+ float extraDurationRequired = std::max(0.f, minPreFadeDuration - static_cast<float>(monotonicallyIncreasingTime() - m_startTime));
+ if (extraDurationRequired)
+ curve->add(WebFloatKeyframe(extraDurationRequired, startOpacity));
// For layout tests we don't fade out.
- curve->add(WebFloatKeyframe(duration, WebKit::layoutTestMode() ? startOpacity : 0));
+ curve->add(WebFloatKeyframe(fadeDuration + extraDurationRequired, WebKit::layoutTestMode() ? startOpacity : 0));
m_animation = adoptPtr(compositorSupport->createAnimation(*curve, WebAnimation::TargetPropertyOpacity));
diff --git a/Source/WebKit/chromium/src/LinkHighlight.h b/Source/WebKit/chromium/src/LinkHighlight.h
index 06d8c909f..59582857d 100644
--- a/Source/WebKit/chromium/src/LinkHighlight.h
+++ b/Source/WebKit/chromium/src/LinkHighlight.h
@@ -91,6 +91,7 @@ private:
bool m_geometryNeedsUpdate;
bool m_isAnimating;
+ double m_startTime;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/PageWidgetDelegate.cpp b/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
index 4cc81c14d..18985910b 100644
--- a/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
+++ b/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
@@ -81,15 +81,17 @@ void PageWidgetDelegate::layout(Page* page)
view->updateLayoutAndStyleIfNeededRecursive();
}
-void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background)
+void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background, bool applyDeviceScale)
{
if (rect.isEmpty())
return;
GraphicsContextBuilder builder(canvas);
GraphicsContext& gc = builder.context();
gc.platformContext()->setDrawingToImageBuffer(background == Opaque ? false : true);
- gc.applyDeviceScaleFactor(page->deviceScaleFactor());
- gc.platformContext()->setDeviceScaleFactor(page->deviceScaleFactor());
+ if (applyDeviceScale) {
+ gc.applyDeviceScaleFactor(page->deviceScaleFactor());
+ gc.platformContext()->setDeviceScaleFactor(page->deviceScaleFactor());
+ }
IntRect dirtyRect(rect);
gc.save();
FrameView* view = mainFrameView(page);
diff --git a/Source/WebKit/chromium/src/PageWidgetDelegate.h b/Source/WebKit/chromium/src/PageWidgetDelegate.h
index c9f76bb95..9a03a9002 100644
--- a/Source/WebKit/chromium/src/PageWidgetDelegate.h
+++ b/Source/WebKit/chromium/src/PageWidgetDelegate.h
@@ -79,7 +79,7 @@ public:
};
static void animate(WebCore::Page*, double monotonicFrameBeginTime);
static void layout(WebCore::Page*);
- static void paint(WebCore::Page*, PageOverlayList*, WebCanvas*, const WebRect&, CanvasBackground);
+ static void paint(WebCore::Page*, PageOverlayList*, WebCanvas*, const WebRect&, CanvasBackground, bool applyDeviceScale);
static bool handleInputEvent(WebCore::Page*, PageWidgetEventHandler&, const WebInputEvent&);
private:
diff --git a/Source/WebKit/chromium/src/PlatformSupport.cpp b/Source/WebKit/chromium/src/PlatformSupport.cpp
index a39b1e9cb..d7a4fbbfc 100644
--- a/Source/WebKit/chromium/src/PlatformSupport.cpp
+++ b/Source/WebKit/chromium/src/PlatformSupport.cpp
@@ -58,7 +58,13 @@
#if OS(WINDOWS)
#include "platform/WebRect.h"
+#if !ENABLE(DEFAULT_RENDER_THEME)
#include <public/win/WebThemeEngine.h>
+#endif // !ENABLE(DEFAULT_RENDER_THEME)
+#endif
+
+#if ENABLE(DEFAULT_RENDER_THEME)
+#include <public/default/WebThemeEngine.h>
#endif
#if OS(DARWIN)
@@ -69,15 +75,15 @@
#include <public/android/WebThemeEngine.h>
#else
#include "WebFontInfo.h"
+#if !ENABLE(DEFAULT_RENDER_THEME)
#include <public/linux/WebThemeEngine.h>
+#endif // !ENABLE(DEFAULT_RENDER_THEME)
#endif // OS(ANDROID)
#endif // elif OS(UNIX)
#include "NativeImageSkia.h"
#include "BitmapImage.h"
-#include "Cookie.h"
-#include "Document.h"
#include "FrameView.h"
#include "GraphicsContext.h"
#include "IDBFactoryBackendProxy.h"
@@ -89,8 +95,6 @@
#include "Worker.h"
#include "WorkerContextProxy.h"
-#include <public/WebCookie.h>
-#include <public/WebCookieJar.h>
#include <public/WebMimeRegistry.h>
#include <public/WebVector.h>
#include <wtf/Assertions.h>
@@ -100,86 +104,6 @@ using namespace WebKit;
namespace WebCore {
-static WebCookieJar* getCookieJar(const Document* document)
-{
- WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame());
- if (!frameImpl || !frameImpl->client())
- return 0;
- WebCookieJar* cookieJar = frameImpl->client()->cookieJar(frameImpl);
- if (!cookieJar)
- cookieJar = WebKit::Platform::current()->cookieJar();
- return cookieJar;
-}
-
-// Cookies --------------------------------------------------------------------
-
-void PlatformSupport::setCookies(const Document* document, const KURL& url,
- const String& value)
-{
- WebCookieJar* cookieJar = getCookieJar(document);
- if (cookieJar)
- cookieJar->setCookie(url, document->firstPartyForCookies(), value);
-}
-
-String PlatformSupport::cookies(const Document* document, const KURL& url)
-{
- String result;
- WebCookieJar* cookieJar = getCookieJar(document);
- if (cookieJar)
- result = cookieJar->cookies(url, document->firstPartyForCookies());
- return result;
-}
-
-String PlatformSupport::cookieRequestHeaderFieldValue(const Document* document,
- const KURL& url)
-{
- String result;
- WebCookieJar* cookieJar = getCookieJar(document);
- if (cookieJar)
- result = cookieJar->cookieRequestHeaderFieldValue(url, document->firstPartyForCookies());
- return result;
-}
-
-bool PlatformSupport::rawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies)
-{
- rawCookies.clear();
- WebVector<WebCookie> webCookies;
-
- WebCookieJar* cookieJar = getCookieJar(document);
- if (cookieJar)
- cookieJar->rawCookies(url, document->firstPartyForCookies(), webCookies);
-
- for (unsigned i = 0; i < webCookies.size(); ++i) {
- const WebCookie& webCookie = webCookies[i];
- Cookie cookie(webCookie.name,
- webCookie.value,
- webCookie.domain,
- webCookie.path,
- webCookie.expires,
- webCookie.httpOnly,
- webCookie.secure,
- webCookie.session);
- rawCookies.append(cookie);
- }
- return true;
-}
-
-void PlatformSupport::deleteCookie(const Document* document, const KURL& url, const String& cookieName)
-{
- WebCookieJar* cookieJar = getCookieJar(document);
- if (cookieJar)
- cookieJar->deleteCookie(url, cookieName);
-}
-
-bool PlatformSupport::cookiesEnabled(const Document* document)
-{
- bool result = false;
- WebCookieJar* cookieJar = getCookieJar(document);
- if (cookieJar)
- result = cookieJar->cookiesEnabled(document->cookieURL(), document->firstPartyForCookies());
- return result;
-}
-
// Font -----------------------------------------------------------------------
#if OS(WINDOWS)
@@ -221,7 +145,7 @@ NPObject* PlatformSupport::pluginScriptableObject(Widget* widget)
// Theming --------------------------------------------------------------------
-#if OS(WINDOWS)
+#if OS(WINDOWS) && !ENABLE(DEFAULT_RENDER_THEME)
void PlatformSupport::paintButton(
GraphicsContext* gc, int part, int state, int classicState,
diff --git a/Source/WebKit/chromium/src/WebArrayBuffer.cpp b/Source/WebKit/chromium/src/WebArrayBuffer.cpp
index d43874b63..2d192bdb7 100644
--- a/Source/WebKit/chromium/src/WebArrayBuffer.cpp
+++ b/Source/WebKit/chromium/src/WebArrayBuffer.cpp
@@ -72,7 +72,7 @@ unsigned WebArrayBuffer::byteLength() const
#if WEBKIT_USING_V8
v8::Handle<v8::Value> WebArrayBuffer::toV8Value()
{
- return V8ArrayBuffer::wrap(m_private.get());
+ return toV8Object(m_private.get());
}
WebArrayBuffer* WebArrayBuffer::createFromV8Value(v8::Handle<v8::Value> value)
diff --git a/Source/WebKit/chromium/src/WebBlob.cpp b/Source/WebKit/chromium/src/WebBlob.cpp
index f8228e9d7..b2f299fdd 100644
--- a/Source/WebKit/chromium/src/WebBlob.cpp
+++ b/Source/WebKit/chromium/src/WebBlob.cpp
@@ -61,7 +61,7 @@ void WebBlob::assign(const WebBlob& other)
#if WEBKIT_USING_V8
v8::Handle<v8::Value> WebBlob::toV8Value()
{
- return V8Blob::wrap(m_private.get());
+ return toV8Object(m_private.get());
}
#endif
diff --git a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
index 87d7b2522..74836d55f 100644
--- a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
@@ -27,12 +27,12 @@
#include "WebCompositorInputHandlerImpl.h"
-#include "PlatformGestureCurveFactory.h"
-#include "PlatformGestureCurveTarget.h"
#include "TraceEvent.h"
#include "WebCompositorInputHandlerClient.h"
#include "WebInputEvent.h"
+#include <public/Platform.h>
#include <public/WebInputHandlerClient.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/ThreadingPrimitives.h>
using namespace WebCore;
@@ -119,9 +119,9 @@ WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
switch (scrollStatus) {
case WebInputHandlerClient::ScrollStatusStarted: {
TRACE_EVENT_INSTANT2("cc", "WebCompositorInputHandlerImpl::handleInput wheel scroll", "deltaX", -wheelEvent.deltaX, "deltaY", -wheelEvent.deltaY);
- m_inputHandlerClient->scrollBy(WebPoint(wheelEvent.x, wheelEvent.y), IntSize(-wheelEvent.deltaX, -wheelEvent.deltaY));
+ bool didScroll = m_inputHandlerClient->scrollByIfPossible(WebPoint(wheelEvent.x, wheelEvent.y), IntSize(-wheelEvent.deltaX, -wheelEvent.deltaY));
m_inputHandlerClient->scrollEnd();
- return DidHandle;
+ return didScroll ? DidHandle : DropEvent;
}
case WebInputHandlerClient::ScrollStatusIgnored:
// FIXME: This should be DropEvent, but in cases where we fail to properly sync scrollability it's safer to send the
@@ -154,9 +154,9 @@ WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
return DidNotHandle;
const WebGestureEvent& gestureEvent = *static_cast<const WebGestureEvent*>(&event);
- m_inputHandlerClient->scrollBy(WebPoint(gestureEvent.x, gestureEvent.y),
+ bool didScroll = m_inputHandlerClient->scrollByIfPossible(WebPoint(gestureEvent.x, gestureEvent.y),
IntSize(-gestureEvent.data.scrollUpdate.deltaX, -gestureEvent.data.scrollUpdate.deltaY));
- return DidHandle;
+ return didScroll ? DidHandle : DropEvent;
} else if (event.type == WebInputEvent::GestureScrollEnd) {
ASSERT(m_expectScrollUpdateEnd);
#ifndef NDEBUG
@@ -206,8 +206,8 @@ WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
switch (scrollStatus) {
case WebInputHandlerClient::ScrollStatusStarted: {
m_inputHandlerClient->scrollEnd();
- m_wheelFlingCurve = PlatformGestureCurveFactory::get()->createCurve(gestureEvent.data.flingStart.sourceDevice, FloatPoint(gestureEvent.data.flingStart.velocityX, gestureEvent.data.flingStart.velocityY));
- TRACE_EVENT_ASYNC_BEGIN1("cc", "WebCompositorInputHandlerImpl::handleGestureFling::started", this, "curve", m_wheelFlingCurve->debugName());
+ m_wheelFlingCurve = adoptPtr(Platform::current()->createFlingAnimationCurve(gestureEvent.data.flingStart.sourceDevice, WebFloatPoint(gestureEvent.data.flingStart.velocityX, gestureEvent.data.flingStart.velocityY), WebSize()));
+ TRACE_EVENT_ASYNC_BEGIN0("cc", "WebCompositorInputHandlerImpl::handleGestureFling::started", this);
m_wheelFlingParameters.delta = WebFloatPoint(gestureEvent.data.flingStart.velocityX, gestureEvent.data.flingStart.velocityY);
m_wheelFlingParameters.point = WebPoint(gestureEvent.x, gestureEvent.y);
m_wheelFlingParameters.globalPoint = WebPoint(gestureEvent.globalX, gestureEvent.globalY);
@@ -273,16 +273,16 @@ bool WebCompositorInputHandlerImpl::cancelCurrentFling()
return hadFlingAnimation;
}
-void WebCompositorInputHandlerImpl::scrollBy(const IntPoint& increment)
+void WebCompositorInputHandlerImpl::scrollBy(const WebPoint& increment)
{
- if (increment == IntPoint::zero())
+ if (increment == WebPoint())
return;
- TRACE_EVENT2("cc", "WebCompositorInputHandlerImpl::scrollBy", "x", increment.x(), "y", increment.y());
+ TRACE_EVENT2("cc", "WebCompositorInputHandlerImpl::scrollBy", "x", increment.x, "y", increment.y);
WebMouseWheelEvent syntheticWheel;
syntheticWheel.type = WebInputEvent::MouseWheel;
- syntheticWheel.deltaX = increment.x();
- syntheticWheel.deltaY = increment.y();
+ syntheticWheel.deltaX = increment.x;
+ syntheticWheel.deltaY = increment.y;
syntheticWheel.hasPreciseScrollingDeltas = true;
syntheticWheel.x = m_wheelFlingParameters.point.x;
syntheticWheel.y = m_wheelFlingParameters.point.y;
@@ -293,8 +293,8 @@ void WebCompositorInputHandlerImpl::scrollBy(const IntPoint& increment)
WebCompositorInputHandlerImpl::EventDisposition disposition = handleInputEventInternal(syntheticWheel);
switch (disposition) {
case DidHandle:
- m_wheelFlingParameters.cumulativeScroll.width += increment.x();
- m_wheelFlingParameters.cumulativeScroll.height += increment.y();
+ m_wheelFlingParameters.cumulativeScroll.width += increment.x;
+ m_wheelFlingParameters.cumulativeScroll.height += increment.y;
case DropEvent:
break;
case DidNotHandle:
diff --git a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h
index fa81de945..efe7f53b4 100644
--- a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h
+++ b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h
@@ -26,10 +26,11 @@
#ifndef WebCompositorInputHandlerImpl_h
#define WebCompositorInputHandlerImpl_h
-#include "PlatformGestureCurveTarget.h"
#include "WebActiveWheelFlingParameters.h"
#include "WebCompositorInputHandler.h"
#include "WebInputEvent.h"
+#include <public/WebGestureCurve.h>
+#include <public/WebGestureCurveTarget.h>
#include <public/WebInputHandler.h>
#include <wtf/HashSet.h>
#include <wtf/Noncopyable.h>
@@ -41,14 +42,13 @@ class Mutex;
namespace WebCore {
class IntPoint;
-class PlatformGestureCurve;
}
namespace WebKit {
class WebCompositorInputHandlerClient;
-class WebCompositorInputHandlerImpl : public WebCompositorInputHandler, public WebInputHandler, public WebCore::PlatformGestureCurveTarget {
+class WebCompositorInputHandlerImpl : public WebCompositorInputHandler, public WebInputHandler, public WebGestureCurveTarget {
WTF_MAKE_NONCOPYABLE(WebCompositorInputHandlerImpl);
public:
static WebCompositorInputHandler* fromIdentifier(int identifier);
@@ -64,8 +64,8 @@ public:
virtual void bindToClient(WebInputHandlerClient*);
virtual void animate(double monotonicTime);
- // WebCore::PlatformGestureCurveTarget implementation.
- virtual void scrollBy(const WebCore::IntPoint&);
+ // WebGestureCurveTarget implementation.
+ virtual void scrollBy(const WebPoint&);
int identifier() const { return m_identifier; }
@@ -81,7 +81,7 @@ private:
// Returns true if we actually had an active fling to cancel.
bool cancelCurrentFling();
- OwnPtr<WebCore::PlatformGestureCurve> m_wheelFlingCurve;
+ OwnPtr<WebGestureCurve> m_wheelFlingCurve;
// Parameters for the active fling animation, stored in case we need to transfer it out later.
WebActiveWheelFlingParameters m_wheelFlingParameters;
diff --git a/Source/WebKit/chromium/src/WebCursorInfo.cpp b/Source/WebKit/chromium/src/WebCursorInfo.cpp
index d4b0f81fa..0981e4665 100644
--- a/Source/WebKit/chromium/src/WebCursorInfo.cpp
+++ b/Source/WebKit/chromium/src/WebCursorInfo.cpp
@@ -38,13 +38,14 @@ using namespace WebCore;
namespace WebKit {
WebCursorInfo::WebCursorInfo(const Cursor& cursor)
-{
- type = static_cast<Type>(cursor.impl().type());
- hotSpot = cursor.impl().hotSpot();
- customImage = cursor.impl().customImage();
+ : type(static_cast<Type>(cursor.type()))
+ , hotSpot(cursor.hotSpot())
+ , imageScaleFactor(1)
+ , customImage(cursor.image())
#ifdef WIN32
- externalHandle = 0;
+ , externalHandle(0)
#endif
+{
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSessionDescriptionDescriptor.cpp b/Source/WebKit/chromium/src/WebDOMCustomEvent.cpp
index 05cfce36d..2f7f8f428 100644
--- a/Source/WebKit/chromium/src/WebSessionDescriptionDescriptor.cpp
+++ b/Source/WebKit/chromium/src/WebDOMCustomEvent.cpp
@@ -29,64 +29,23 @@
*/
#include "config.h"
+#include "WebDOMCustomEvent.h"
-#if ENABLE(MEDIA_STREAM)
-
-#include <public/WebSessionDescriptionDescriptor.h>
-
-#include "SessionDescriptionDescriptor.h"
-#include <public/WebICECandidateDescriptor.h>
+#include "CustomEvent.h"
+#include "SerializedScriptValue.h"
+#include "platform/WebSerializedScriptValue.h"
#include <public/WebString.h>
-#include <wtf/Vector.h>
using namespace WebCore;
namespace WebKit {
-WebSessionDescriptionDescriptor::WebSessionDescriptionDescriptor(const PassRefPtr<SessionDescriptionDescriptor>& sessionDescription)
- : m_private(sessionDescription)
+void WebDOMCustomEvent::initCustomEvent(const WebString& type, bool canBubble, bool cancelable, const WebSerializedScriptValue& webSerializedScriptValue)
{
-}
-
-void WebSessionDescriptionDescriptor::assign(const WebSessionDescriptionDescriptor& other)
-{
- m_private = other.m_private;
-}
-
-void WebSessionDescriptionDescriptor::reset()
-{
- m_private.reset();
-}
-
-WebSessionDescriptionDescriptor::operator WTF::PassRefPtr<WebCore::SessionDescriptionDescriptor>()
-{
- return m_private.get();
-}
-
-void WebSessionDescriptionDescriptor::initialize(const WebString& sdp)
-{
- m_private = SessionDescriptionDescriptor::create(sdp);
-}
-
-size_t WebSessionDescriptionDescriptor::numberOfAddedCandidates() const
-{
- ASSERT(!m_private.isNull());
- return m_private.get()->numberOfAddedCandidates();
-}
-
-WebICECandidateDescriptor WebSessionDescriptionDescriptor::candidate(size_t index) const
-{
- ASSERT(!m_private.isNull());
- return m_private.get()->candidate(index);
-}
-
-WebString WebSessionDescriptionDescriptor::initialSDP() const
-{
- ASSERT(!m_private.isNull());
- return m_private.get()->initialSDP();
+ ASSERT(m_private);
+ RefPtr<SerializedScriptValue> serializedScriptValue;
+ serializedScriptValue = webSerializedScriptValue;
+ unwrap<CustomEvent>()->initCustomEvent(type, canBubble, cancelable, serializedScriptValue.get());
}
} // namespace WebKit
-
-#endif // ENABLE(MEDIA_STREAM)
-
diff --git a/Source/WebKit/chromium/src/WebDocument.cpp b/Source/WebKit/chromium/src/WebDocument.cpp
index c7a3a834a..ddd766636 100644
--- a/Source/WebKit/chromium/src/WebDocument.cpp
+++ b/Source/WebKit/chromium/src/WebDocument.cpp
@@ -194,12 +194,13 @@ WebDocumentType WebDocument::doctype() const
return WebDocumentType(constUnwrap<Document>()->doctype());
}
-void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLevel level)
+void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLevel)
{
RefPtr<Document> document = unwrap<Document>();
+ // FIXME: We currently ignore the passed in UserStyleLevel. http://crbug.com/162096
RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document.get());
- parsedSheet->setIsUserStyleSheet(level == UserStyleUserLevel);
+ parsedSheet->setIsUserStyleSheet(true);
parsedSheet->parseString(sourceCode);
document->styleSheetCollection()->addUserSheet(parsedSheet.release());
}
diff --git a/Source/WebKit/chromium/src/WebElement.cpp b/Source/WebKit/chromium/src/WebElement.cpp
index 49fff0a07..96cf9791d 100644
--- a/Source/WebKit/chromium/src/WebElement.cpp
+++ b/Source/WebKit/chromium/src/WebElement.cpp
@@ -66,8 +66,13 @@ bool WebElement::hasTagName(const WebString& tagName) const
bool WebElement::hasHTMLTagName(const WebString& tagName) const
{
+ // How to create class nodeName localName
+ // createElement('input') HTMLInputElement INPUT input
+ // createElement('INPUT') HTMLInputElement INPUT input
+ // createElementNS(xhtmlNS, 'input') HTMLInputElement INPUT input
+ // createElementNS(xhtmlNS, 'INPUT') HTMLUnknownElement INPUT INPUT
const Element* element = constUnwrap<Element>();
- return HTMLNames::xhtmlNamespaceURI == element->namespaceURI() && equalIgnoringCase(element->tagName(), String(tagName));
+ return HTMLNames::xhtmlNamespaceURI == element->namespaceURI() && element->localName() == String(tagName).lower();
}
bool WebElement::hasAttribute(const WebString& attrName) const
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index 1936476f3..eacf9aba8 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -130,7 +130,6 @@
#include "RenderObject.h"
#include "RenderTreeAsText.h"
#include "RenderView.h"
-#include "RenderWidget.h"
#include "ResourceHandle.h"
#include "ResourceRequest.h"
#include "SchemeRegistry.h"
@@ -304,23 +303,6 @@ static long long generateFrameIdentifier()
return ++next;
}
-static WebPluginContainerImpl* pluginContainerFromNode(const WebNode& node)
-{
- if (node.isNull())
- return 0;
-
- const Node* coreNode = node.constUnwrap<Node>();
- if (coreNode->hasTagName(HTMLNames::objectTag) || coreNode->hasTagName(HTMLNames::embedTag)) {
- RenderObject* object = coreNode->renderer();
- if (object && object->isWidget()) {
- Widget* widget = toRenderWidget(object)->widget();
- if (widget && widget->isPluginContainer())
- return static_cast<WebPluginContainerImpl*>(widget);
- }
- }
- return 0;
-}
-
WebPluginContainerImpl* WebFrameImpl::pluginContainerFromFrame(Frame* frame)
{
if (!frame)
@@ -1202,7 +1184,7 @@ size_t WebFrameImpl::characterIndexForPoint(const WebPoint& webPoint) const
IntPoint point = frame()->view()->windowToContents(webPoint);
HitTestResult result = frame()->eventHandler()->hitTestResultAtPoint(point, false);
- RefPtr<Range> range = frame()->rangeForPoint(result.roundedPoint());
+ RefPtr<Range> range = frame()->rangeForPoint(result.roundedPointInInnerNodeFrame());
if (!range)
return notFound;
@@ -1232,7 +1214,7 @@ bool WebFrameImpl::executeCommand(const WebString& name, const WebNode& node)
if (command == "Copy") {
WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame());
if (!pluginContainer)
- pluginContainer = pluginContainerFromNode(node);
+ pluginContainer = static_cast<WebPluginContainerImpl*>(node.pluginContainer());
if (pluginContainer) {
pluginContainer->copy();
return true;
@@ -1428,7 +1410,7 @@ int WebFrameImpl::printBegin(const WebPrintParams& printParams, const WebNode& c
pluginContainer = pluginContainerFromFrame(frame());
} else {
// We only support printing plugin nodes for now.
- pluginContainer = pluginContainerFromNode(constrainToNode);
+ pluginContainer = static_cast<WebPluginContainerImpl*>(constrainToNode.pluginContainer());
}
if (pluginContainer && pluginContainer->supportsPaginatedPrint())
@@ -1477,7 +1459,7 @@ void WebFrameImpl::printEnd()
bool WebFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node)
{
- WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFromFrame(frame()) : pluginContainerFromNode(node);
+ WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFromFrame(frame()) : static_cast<WebPluginContainerImpl*>(node.pluginContainer());
if (!pluginContainer || !pluginContainer->supportsPaginatedPrint())
return false;
diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index 90c262389..59abd5329 100644
--- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -70,11 +70,6 @@ WebIDBObjectStore* WebIDBDatabaseImpl::createObjectStore(long long id, const Web
return new WebIDBObjectStoreImpl(objectStore);
}
-void WebIDBDatabaseImpl::deleteObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec)
-{
- m_databaseBackend->deleteObjectStore(name, transaction.getIDBTransactionBackendInterface(), ec);
-}
-
void WebIDBDatabaseImpl::deleteObjectStore(long long objectStoreId, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_databaseBackend->deleteObjectStore(objectStoreId, transaction.getIDBTransactionBackendInterface(), ec);
@@ -85,17 +80,6 @@ void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* c
m_databaseBackend->setVersion(version, IDBCallbacksProxy::create(adoptPtr(callbacks)), m_databaseCallbacks, ec);
}
-WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names, unsigned short mode, WebExceptionCode& ec)
-{
- RefPtr<DOMStringList> nameList = PassRefPtr<DOMStringList>(names);
- RefPtr<IDBTransactionBackendInterface> transaction = m_databaseBackend->transaction(nameList.get(), mode, ec);
- if (!transaction) {
- ASSERT(ec);
- return 0;
- }
- return new WebIDBTransactionImpl(transaction);
-}
-
WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebVector<long long>& objectStoreIds, unsigned short mode)
{
Vector<int64_t> objectStoreIdList(objectStoreIds.size());
diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
index 65a19668a..e728742c6 100644
--- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -53,10 +53,8 @@ public:
virtual WebIDBMetadata metadata() const;
virtual WebIDBObjectStore* createObjectStore(long long, const WebString& name, const WebIDBKeyPath&, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&);
- virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
virtual void deleteObjectStore(long long objectStoreId, const WebIDBTransaction&, WebExceptionCode&);
virtual void setVersion(const WebString& version, WebIDBCallbacks*, WebExceptionCode&);
- virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, WebExceptionCode&);
virtual WebIDBTransaction* transaction(const WebVector<long long>& names, unsigned short mode);
virtual void forceClose();
virtual void close();
diff --git a/Source/WebKit/chromium/src/WebIDBKey.cpp b/Source/WebKit/chromium/src/WebIDBKey.cpp
index d60b5f5c1..609d3b4a0 100644
--- a/Source/WebKit/chromium/src/WebIDBKey.cpp
+++ b/Source/WebKit/chromium/src/WebIDBKey.cpp
@@ -30,7 +30,6 @@
#if ENABLE(INDEXED_DATABASE)
-#include "IDBBindingUtilities.h"
#include "IDBKey.h"
using namespace WebCore;
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
index 85bac13b3..102804bc8 100755
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
@@ -58,23 +58,6 @@ void WebIDBObjectStoreImpl::get(const WebIDBKeyRange& keyRange, WebIDBCallbacks*
m_objectStore->get(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBObjectStoreImpl::putWithIndexKeys(const WebSerializedScriptValue& value, const WebIDBKey& key, PutMode putMode, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, const WebVector<WebString>& webIndexNames, const WebVector<WebIndexKeys>& webIndexKeys, WebExceptionCode& ec)
-{
- ASSERT(webIndexNames.size() == webIndexKeys.size());
- Vector<String> indexNames(webIndexNames.size());
- Vector<IDBObjectStoreBackendInterface::IndexKeys> indexKeys(webIndexKeys.size());
-
- for (size_t i = 0; i < webIndexNames.size(); ++i) {
- indexNames[i] = webIndexNames[i];
- Vector<RefPtr<IDBKey> > indexKeyList(webIndexKeys[i].size());
- for (size_t j = 0; j < webIndexKeys[i].size(); ++j)
- indexKeyList[j] = webIndexKeys[i][j];
- indexKeys[i] = indexKeyList;
- }
-
- m_objectStore->putWithIndexKeys(value, key, static_cast<IDBObjectStoreBackendInterface::PutMode>(putMode), IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), indexNames, indexKeys, ec);
-}
-
void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, PutMode putMode, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, const WebVector<long long>& webIndexIds, const WebVector<WebIndexKeys>& webIndexKeys)
{
ASSERT(webIndexIds.size() == webIndexKeys.size());
@@ -92,22 +75,6 @@ void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const Web
m_objectStore->put(value, key, static_cast<IDBObjectStoreBackendInterface::PutMode>(putMode), IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), indexIds, indexKeys);
}
-void WebIDBObjectStoreImpl::setIndexKeys(const WebIDBKey& primaryKey, const WebVector<WebString>& webIndexNames, const WebVector<WebIndexKeys>& webIndexKeys, const WebIDBTransaction& transaction)
-{
- ASSERT(webIndexNames.size() == webIndexKeys.size());
- Vector<String> indexNames(webIndexNames.size());
- Vector<IDBObjectStoreBackendInterface::IndexKeys> indexKeys(webIndexKeys.size());
-
- for (size_t i = 0; i < webIndexNames.size(); ++i) {
- indexNames[i] = webIndexNames[i];
- Vector<RefPtr<IDBKey> > indexKeyList(webIndexKeys[i].size());
- for (size_t j = 0; j < webIndexKeys[i].size(); ++j)
- indexKeyList[j] = webIndexKeys[i][j];
- indexKeys[i] = indexKeyList;
- }
- m_objectStore->setIndexKeys(primaryKey, indexNames, indexKeys, transaction.getIDBTransactionBackendInterface());
-}
-
void WebIDBObjectStoreImpl::setIndexKeys(const WebIDBKey& primaryKey, const WebVector<long long>& webIndexIds, const WebVector<WebIndexKeys>& webIndexKeys, const WebIDBTransaction& transaction)
{
ASSERT(webIndexIds.size() == webIndexKeys.size());
@@ -124,14 +91,6 @@ void WebIDBObjectStoreImpl::setIndexKeys(const WebIDBKey& primaryKey, const WebV
m_objectStore->setIndexKeys(primaryKey, indexIds, indexKeys, transaction.getIDBTransactionBackendInterface());
}
-void WebIDBObjectStoreImpl::setIndexesReady(const WebVector<WebString>& webIndexNames, const WebIDBTransaction& transaction)
-{
- Vector<String> indexNames(webIndexNames.size());
- for (size_t i = 0; i < webIndexNames.size(); ++i)
- indexNames[i] = webIndexNames[i];
- m_objectStore->setIndexesReady(indexNames, transaction.getIDBTransactionBackendInterface());
-}
-
void WebIDBObjectStoreImpl::setIndexesReady(const WebVector<long long>& webIndexNames, const WebIDBTransaction& transaction)
{
Vector<int64_t> indexIds(webIndexNames.size());
@@ -158,14 +117,6 @@ WebIDBIndex* WebIDBObjectStoreImpl::createIndex(long long id, const WebString& n
return new WebIDBIndexImpl(index);
}
-WebIDBIndex* WebIDBObjectStoreImpl::index(const WebString& name, WebExceptionCode& ec)
-{
- RefPtr<IDBIndexBackendInterface> index = m_objectStore->index(name, ec);
- if (!index)
- return 0;
- return new WebIDBIndexImpl(index);
-}
-
WebIDBIndex* WebIDBObjectStoreImpl::index(long long objectStoreId)
{
RefPtr<IDBIndexBackendInterface> index = m_objectStore->index(objectStoreId);
@@ -174,11 +125,6 @@ WebIDBIndex* WebIDBObjectStoreImpl::index(long long objectStoreId)
return new WebIDBIndexImpl(index);
}
-void WebIDBObjectStoreImpl::deleteIndex(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec)
-{
- m_objectStore->deleteIndex(name, transaction.getIDBTransactionBackendInterface(), ec);
-}
-
void WebIDBObjectStoreImpl::deleteIndex(long long objectStoreId, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_objectStore->deleteIndex(objectStoreId, transaction.getIDBTransactionBackendInterface(), ec);
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
index 5de3c9a15..70f19cc8f 100644
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
@@ -46,19 +46,14 @@ public:
~WebIDBObjectStoreImpl();
void get(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
- void putWithIndexKeys(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, const WebVector<WebString>&, const WebVector<WebIndexKeys>&, WebExceptionCode&);
void put(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, const WebVector<long long>&, const WebVector<WebIndexKeys>&);
- void setIndexKeys(const WebIDBKey&, const WebVector<WebString>& indexNames, const WebVector<WebIndexKeys>&, const WebIDBTransaction&);
void setIndexKeys(const WebIDBKey&, const WebVector<long long>& indexNames, const WebVector<WebIndexKeys>&, const WebIDBTransaction&);
- void setIndexesReady(const WebVector<WebString>&, const WebIDBTransaction&);
void setIndexesReady(const WebVector<long long>&, const WebIDBTransaction&);
void deleteFunction(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void clear(WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
WebIDBIndex* createIndex(long long, const WebString& name, const WebIDBKeyPath&, bool unique, bool multiEntry, const WebIDBTransaction&, WebExceptionCode&);
- WebIDBIndex* index(const WebString& name, WebExceptionCode&);
WebIDBIndex* index(long long);
- void deleteIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
void deleteIndex(long long, const WebIDBTransaction&, WebExceptionCode&);
void openCursor(const WebIDBKeyRange&, WebIDBCursor::Direction, WebIDBCallbacks*, WebIDBTransaction::TaskType, const WebIDBTransaction&, WebExceptionCode&);
diff --git a/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp b/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp
index 6616d671f..40d7d7563 100644
--- a/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp
@@ -47,14 +47,6 @@ WebIDBTransactionImpl::~WebIDBTransactionImpl()
{
}
-WebIDBObjectStore* WebIDBTransactionImpl::objectStore(const WebString& name, ExceptionCode& ec)
-{
- RefPtr<IDBObjectStoreBackendInterface> objectStore = m_backend->objectStore(name, ec);
- if (!objectStore)
- return 0;
- return new WebIDBObjectStoreImpl(objectStore);
-}
-
WebIDBObjectStore* WebIDBTransactionImpl::objectStore(long long indexId, ExceptionCode& ec)
{
RefPtr<IDBObjectStoreBackendInterface> objectStore = m_backend->objectStore(indexId, ec);
diff --git a/Source/WebKit/chromium/src/WebIDBTransactionImpl.h b/Source/WebKit/chromium/src/WebIDBTransactionImpl.h
index 1ee6ab801..0fb653767 100644
--- a/Source/WebKit/chromium/src/WebIDBTransactionImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBTransactionImpl.h
@@ -41,7 +41,6 @@ public:
WebIDBTransactionImpl(WTF::PassRefPtr<WebCore::IDBTransactionBackendInterface>);
virtual ~WebIDBTransactionImpl();
- virtual WebIDBObjectStore* objectStore(const WebString& name, WebExceptionCode&);
virtual WebIDBObjectStore* objectStore(long long indexId, WebExceptionCode&);
virtual void commit();
virtual void abort();
diff --git a/Source/WebKit/chromium/src/WebInputElement.cpp b/Source/WebKit/chromium/src/WebInputElement.cpp
index bdc9f5db2..bfc0c236b 100644
--- a/Source/WebKit/chromium/src/WebInputElement.cpp
+++ b/Source/WebKit/chromium/src/WebInputElement.cpp
@@ -163,6 +163,11 @@ bool WebInputElement::isValidValue(const WebString& value) const
return constUnwrap<HTMLInputElement>()->isValidValue(value);
}
+void WebInputElement::setChecked(bool nowChecked, bool sendChangeEvent)
+{
+ unwrap<HTMLInputElement>()->setChecked(nowChecked, sendChangeEvent ? DispatchChangeEvent : DispatchNoEvent);
+}
+
bool WebInputElement::isChecked() const
{
return constUnwrap<HTMLInputElement>()->checked();
diff --git a/Source/WebKit/chromium/src/WebNode.cpp b/Source/WebKit/chromium/src/WebNode.cpp
index 27d57cfbc..e3e720b6e 100644
--- a/Source/WebKit/chromium/src/WebNode.cpp
+++ b/Source/WebKit/chromium/src/WebNode.cpp
@@ -38,12 +38,17 @@
#include "Node.h"
#include "NodeList.h"
#include "EventListenerWrapper.h"
+#include "RenderObject.h"
+#include "RenderWidget.h"
#include "WebDOMEvent.h"
#include "WebDOMEventListener.h"
#include "WebDocument.h"
#include "WebElement.h"
#include "WebFrameImpl.h"
#include "WebNodeList.h"
+#include "WebPluginContainer.h"
+#include "WebPluginContainerImpl.h"
+#include "Widget.h"
#include "markup.h"
#include <public/WebString.h>
#include <public/WebVector.h>
@@ -204,8 +209,7 @@ bool WebNode::dispatchEvent(const WebDOMEvent& event)
void WebNode::simulateClick()
{
- RefPtr<Event> noEvent;
- m_private->dispatchSimulatedClick(noEvent);
+ m_private->dispatchSimulatedClick(0);
}
WebNodeList WebNode::getElementsByTagName(const WebString& tag) const
@@ -236,6 +240,22 @@ bool WebNode::hasNonEmptyBoundingBox() const
return m_private->hasNonEmptyBoundingBox();
}
+WebPluginContainer* WebNode::pluginContainer() const
+{
+ if (isNull())
+ return 0;
+ const Node* coreNode = constUnwrap<Node>();
+ if (coreNode->hasTagName(HTMLNames::objectTag) || coreNode->hasTagName(HTMLNames::embedTag)) {
+ RenderObject* object = coreNode->renderer();
+ if (object && object->isWidget()) {
+ Widget* widget = WebCore::toRenderWidget(object)->widget();
+ if (widget && widget->isPluginContainer())
+ return static_cast<WebPluginContainerImpl*>(widget);
+ }
+ }
+ return 0;
+}
+
WebNode::WebNode(const PassRefPtr<Node>& node)
: m_private(node)
{
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
index 01cacda2a..53882f9e7 100644
--- a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
@@ -44,6 +44,7 @@
#include "Settings.h"
#include "WebInputEventConversion.h"
#include "WebPagePopup.h"
+#include "WebSettingsImpl.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
#include "WebWidgetClient.h"
@@ -242,7 +243,7 @@ void WebPagePopupImpl::layout()
void WebPagePopupImpl::paint(WebCanvas* canvas, const WebRect& rect, PaintOptions)
{
- PageWidgetDelegate::paint(m_page.get(), 0, canvas, rect, PageWidgetDelegate::Opaque);
+ PageWidgetDelegate::paint(m_page.get(), 0, canvas, rect, PageWidgetDelegate::Opaque, m_webView->settingsImpl()->applyDeviceScaleFactorInCompositor());
}
void WebPagePopupImpl::resize(const WebSize& newSize)
@@ -304,6 +305,7 @@ void WebPagePopupImpl::setFocus(bool enable)
void WebPagePopupImpl::close()
{
+ m_closing = true;
if (m_page && m_page->mainFrame())
m_page->mainFrame()->loader()->frameDetached();
m_page.clear();
diff --git a/Source/WebKit/chromium/src/WebPasswordFormData.cpp b/Source/WebKit/chromium/src/WebPasswordFormData.cpp
index efd8de32b..fe438200a 100644
--- a/Source/WebKit/chromium/src/WebPasswordFormData.cpp
+++ b/Source/WebKit/chromium/src/WebPasswordFormData.cpp
@@ -138,6 +138,7 @@ void assemblePasswordFormResult(const KURL& fullOrigin,
if (password) {
result->passwordElement = password->name();
result->passwordValue = password->value();
+ result->passwordShouldAutocomplete = password->shouldAutocomplete();
}
if (oldPassword) {
result->oldPasswordElement = oldPassword->name();
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 87a660156..075fc0548 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -67,6 +67,7 @@
#include "ScrollAnimator.h"
#include "ScrollView.h"
#include "ScrollbarTheme.h"
+#include "ScrollingCoordinator.h"
#include "TouchEvent.h"
#include "UserGestureIndicator.h"
#include "WebPrintParams.h"
@@ -133,13 +134,12 @@ void WebPluginContainerImpl::paint(GraphicsContext* gc, const IntRect& damageRec
// The plugin is positioned in window coordinates, so it needs to be painted
// in window coordinates.
- IntPoint origin = view->windowToContents(IntPoint(0, 0));
- gc->translate(static_cast<float>(origin.x()), static_cast<float>(origin.y()));
+ IntPoint origin = view->contentsToWindow(IntPoint(0, 0));
+ gc->translate(static_cast<float>(-origin.x()), static_cast<float>(-origin.y()));
WebCanvas* canvas = gc->platformContext()->canvas();
- IntRect windowRect =
- IntRect(view->contentsToWindow(enclosingIntRect(scaledDamageRect).location()), enclosingIntRect(scaledDamageRect).size());
+ IntRect windowRect = view->contentsToWindow(enclosingIntRect(scaledDamageRect));
m_webPlugin->paint(canvas, windowRect);
gc->restore();
@@ -532,6 +532,28 @@ void WebPluginContainerImpl::setIsAcceptingTouchEvents(bool acceptingTouchEvents
m_element->document()->didRemoveTouchEventHandler();
}
+void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents)
+{
+ if (m_wantsWheelEvents == wantsWheelEvents)
+ return;
+ m_wantsWheelEvents = wantsWheelEvents;
+ if (Page* page = m_element->document()->page()) {
+ if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) {
+ if (parent() && parent()->isFrameView())
+ scrollingCoordinator->frameViewLayoutUpdated(static_cast<FrameView*>(parent()));
+ }
+ }
+}
+
+WebPoint WebPluginContainerImpl::windowToLocalPoint(const WebPoint& point)
+{
+ ScrollView* view = parent();
+ if (!view)
+ return point;
+ WebPoint windowPoint = view->windowToContents(point);
+ return roundedIntPoint(m_element->renderer()->absoluteToLocal(LayoutPoint(windowPoint), UseTransforms | SnapOffsetForTransforms));
+}
+
void WebPluginContainerImpl::didReceiveResponse(const ResourceResponse& response)
{
// Make sure that the plugin receives window geometry before data, or else
@@ -582,6 +604,11 @@ bool WebPluginContainerImpl::canProcessDrag() const
return m_webPlugin->canProcessDrag();
}
+bool WebPluginContainerImpl::wantsWheelEvents()
+{
+ return m_wantsWheelEvents;
+}
+
void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver* observer)
{
size_t pos = m_pluginLoadObservers.find(observer);
@@ -641,6 +668,7 @@ WebPluginContainerImpl::WebPluginContainerImpl(WebCore::HTMLPlugInElement* eleme
, m_ioSurfaceId(0)
#endif
, m_isAcceptingTouchEvents(false)
+ , m_wantsWheelEvents(false)
{
}
@@ -818,8 +846,7 @@ void WebPluginContainerImpl::calculateGeometry(const IntRect& frameRect,
IntRect& clipRect,
Vector<IntRect>& cutOutRects)
{
- windowRect = IntRect(
- parent()->contentsToWindow(frameRect.location()), frameRect.size());
+ windowRect = parent()->contentsToWindow(frameRect);
// Calculate a clip-rect so that we don't overlap the scrollbars, etc.
clipRect = windowClipRect();
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.h b/Source/WebKit/chromium/src/WebPluginContainerImpl.h
index 89f2971b7..b4958fe19 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.h
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.h
@@ -79,6 +79,7 @@ public:
virtual bool getFormValue(String&);
virtual bool supportsKeyboardFocus() const;
virtual bool canProcessDrag() const;
+ virtual bool wantsWheelEvents();
// Widget methods
virtual void setFrameRect(const WebCore::IntRect&);
@@ -113,6 +114,8 @@ public:
virtual void setOpaque(bool);
virtual bool isRectTopmost(const WebRect&);
virtual void setIsAcceptingTouchEvents(bool);
+ virtual void setWantsWheelEvents(bool);
+ virtual WebPoint windowToLocalPoint(const WebPoint&);
// This cannot be null.
WebPlugin* plugin() { return m_webPlugin; }
@@ -199,6 +202,7 @@ private:
OwnPtr<ScrollbarGroup> m_scrollbarGroup;
bool m_isAcceptingTouchEvents;
+ bool m_wantsWheelEvents;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 9009ff9fa..a195de292 100644
--- a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -359,24 +359,6 @@ bool WebRuntimeFeatures::isPeerConnectionEnabled()
#endif
}
-void WebRuntimeFeatures::enableDeprecatedPeerConnection(bool enable)
-{
-#if ENABLE(MEDIA_STREAM)
- RuntimeEnabledFeatures::setDeprecatedPeerConnectionEnabled(enable);
-#else
- UNUSED_PARAM(enable);
-#endif
-}
-
-bool WebRuntimeFeatures::isDeprecatedPeerConnectionEnabled()
-{
-#if ENABLE(MEDIA_STREAM)
- return RuntimeEnabledFeatures::deprecatedPeerConnectionEnabled();
-#else
- return false;
-#endif
-}
-
void WebRuntimeFeatures::enableFullScreenAPI(bool enable)
{
#if ENABLE(FULLSCREEN_API)
@@ -395,24 +377,6 @@ bool WebRuntimeFeatures::isFullScreenAPIEnabled()
#endif
}
-void WebRuntimeFeatures::enablePointerLock(bool enable)
-{
-#if ENABLE(POINTER_LOCK)
- RuntimeEnabledFeatures::setPointerLockEnabled(enable);
-#else
- UNUSED_PARAM(enable);
-#endif
-}
-
-bool WebRuntimeFeatures::isPointerLockEnabled()
-{
-#if ENABLE(POINTER_LOCK)
- return RuntimeEnabledFeatures::pointerLockEnabled();
-#else
- return false;
-#endif
-}
-
void WebRuntimeFeatures::enableMediaSource(bool enable)
{
#if ENABLE(MEDIA_SOURCE)
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
index b14cde32f..20fcc1b96 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -53,7 +53,7 @@ WebSettingsImpl::WebSettingsImpl(Settings* settings)
, m_showPaintRects(false)
, m_renderVSyncEnabled(true)
, m_viewportEnabled(false)
- , m_applyDefaultDeviceScaleFactorInCompositor(false)
+ , m_applyDeviceScaleFactorInCompositor(false)
, m_gestureTapHighlightEnabled(true)
, m_autoZoomFocusedNodeToLegibleScale(false)
, m_deferredImageDecodingEnabled(false)
@@ -139,9 +139,9 @@ bool WebSettingsImpl::deviceSupportsTouch()
return m_settings->deviceSupportsTouch();
}
-void WebSettingsImpl::setApplyDefaultDeviceScaleFactorInCompositor(bool applyDefaultDeviceScaleFactorInCompositor)
+void WebSettingsImpl::setApplyDeviceScaleFactorInCompositor(bool applyDeviceScaleFactorInCompositor)
{
- m_applyDefaultDeviceScaleFactorInCompositor = applyDefaultDeviceScaleFactorInCompositor;
+ m_applyDeviceScaleFactorInCompositor = applyDeviceScaleFactorInCompositor;
}
void WebSettingsImpl::setApplyPageScaleFactorInCompositor(bool applyPageScaleFactorInCompositor)
@@ -431,6 +431,11 @@ void WebSettingsImpl::setEditingBehavior(EditingBehavior behavior)
m_settings->setEditingBehaviorType(static_cast<WebCore::EditingBehaviorType>(behavior));
}
+void WebSettingsImpl::setAcceleratedAnimationEnabled(bool enabled)
+{
+ m_acceleratedAnimationEnabled = enabled;
+}
+
void WebSettingsImpl::setAcceleratedCompositingEnabled(bool enabled)
{
m_settings->setAcceleratedCompositingEnabled(enabled);
@@ -586,6 +591,11 @@ void WebSettingsImpl::setPasswordEchoDurationInSeconds(double durationInSeconds)
m_settings->setPasswordEchoDurationInSeconds(durationInSeconds);
}
+void WebSettingsImpl::setPerTilePaintingEnabled(bool enabled)
+{
+ m_perTilePaintingEnabled = enabled;
+}
+
void WebSettingsImpl::setShouldPrintBackgrounds(bool enabled)
{
m_settings->setShouldPrintBackgrounds(enabled);
@@ -600,6 +610,11 @@ void WebSettingsImpl::setEnableScrollAnimator(bool enabled)
#endif
}
+void WebSettingsImpl::setEnableTouchAdjustment(bool enabled)
+{
+ m_settings->setTouchAdjustmentEnabled(enabled);
+}
+
bool WebSettingsImpl::scrollAnimatorEnabled() const
{
#if ENABLE(SMOOTH_SCROLLING)
@@ -696,4 +711,9 @@ bool WebSettingsImpl::applyPageScaleFactorInCompositor() const
return m_settings->applyPageScaleFactorInCompositor();
}
+void WebSettingsImpl::setAllowCustomScrollbarInMainFrame(bool enabled)
+{
+ m_settings->setAllowCustomScrollbarInMainFrame(enabled);
+}
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h
index ff88bac61..98520eadf 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.h
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.h
@@ -48,6 +48,7 @@ public:
virtual bool scrollAnimatorEnabled() const;
virtual bool viewportEnabled() const { return m_viewportEnabled; }
virtual void setAccelerated2dCanvasEnabled(bool);
+ virtual void setAcceleratedAnimationEnabled(bool);
virtual void setAcceleratedCompositingEnabled(bool);
virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool);
virtual void setAcceleratedCompositingForAnimationEnabled(bool);
@@ -60,10 +61,11 @@ public:
virtual void setAcceleratedPaintingEnabled(bool);
virtual void setAllowDisplayOfInsecureContent(bool);
virtual void setAllowFileAccessFromFileURLs(bool);
+ virtual void setAllowCustomScrollbarInMainFrame(bool);
virtual void setAllowRunningOfInsecureContent(bool);
virtual void setAllowScriptsToCloseWindows(bool);
virtual void setAllowUniversalAccessFromFileURLs(bool);
- virtual void setApplyDefaultDeviceScaleFactorInCompositor(bool);
+ virtual void setApplyDeviceScaleFactorInCompositor(bool);
virtual void setApplyPageScaleFactorInCompositor(bool);
virtual void setAsynchronousSpellCheckingEnabled(bool);
virtual void setAuthorAndUserStylesEnabled(bool);
@@ -87,6 +89,7 @@ public:
virtual void setEditableLinkBehaviorNeverLive();
virtual void setEditingBehavior(EditingBehavior);
virtual void setEnableScrollAnimator(bool);
+ virtual void setEnableTouchAdjustment(bool);
virtual void setExperimentalCSSCustomFilterEnabled(bool);
virtual void setExperimentalCSSGridLayoutEnabled(bool);
virtual void setCSSStickyPositionEnabled(bool);
@@ -126,6 +129,7 @@ public:
virtual void setPageCacheSupportsPlugins(bool);
virtual void setPasswordEchoDurationInSeconds(double);
virtual void setPasswordEchoEnabled(bool);
+ virtual void setPerTilePaintingEnabled(bool);
virtual void setPictographFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON);
virtual void setPluginsEnabled(bool);
virtual void setPrivilegedWebGLExtensionsEnabled(bool);
@@ -165,11 +169,13 @@ public:
bool showPlatformLayerTree() const { return m_showPlatformLayerTree; }
bool showPaintRects() const { return m_showPaintRects; }
bool renderVSyncEnabled() const { return m_renderVSyncEnabled; }
- bool applyDefaultDeviceScaleFactorInCompositor() const { return m_applyDefaultDeviceScaleFactorInCompositor; }
+ bool applyDeviceScaleFactorInCompositor() const { return m_applyDeviceScaleFactorInCompositor; }
bool applyPageScaleFactorInCompositor() const;
bool autoZoomFocusedNodeToLegibleScale() const { return m_autoZoomFocusedNodeToLegibleScale; }
- bool gestureTapHighlightEnabled() { return m_gestureTapHighlightEnabled; }
- bool doubleTapToZoomEnabled() { return m_doubleTapToZoomEnabled; }
+ bool gestureTapHighlightEnabled() const { return m_gestureTapHighlightEnabled; }
+ bool doubleTapToZoomEnabled() const { return m_doubleTapToZoomEnabled; }
+ bool perTilePaintingEnabled() const { return m_perTilePaintingEnabled; }
+ bool acceleratedAnimationEnabled() const { return m_acceleratedAnimationEnabled; }
WebSize defaultTileSize() const { return m_defaultTileSize; }
WebSize maxUntiledLayerSize() const { return m_maxUntiledLayerSize; }
@@ -180,11 +186,13 @@ private:
bool m_showPaintRects;
bool m_renderVSyncEnabled;
bool m_viewportEnabled;
- bool m_applyDefaultDeviceScaleFactorInCompositor;
+ bool m_applyDeviceScaleFactorInCompositor;
bool m_gestureTapHighlightEnabled;
bool m_autoZoomFocusedNodeToLegibleScale;
bool m_deferredImageDecodingEnabled;
bool m_doubleTapToZoomEnabled;
+ bool m_perTilePaintingEnabled;
+ bool m_acceleratedAnimationEnabled;
WebSize m_defaultTileSize;
WebSize m_maxUntiledLayerSize;
};
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index f6f9fc6fa..7aa12048f 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -32,7 +32,6 @@
#include "WebViewImpl.h"
#include "AXObjectCache.h"
-#include "ActivePlatformGestureAnimation.h"
#include "AutofillPopupMenuClient.h"
#include "BackForwardListChromium.h"
#include "BatteryClientImpl.h"
@@ -95,7 +94,6 @@
#include "PlatformContextSkia.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
-#include "PlatformThemeChromiumLinux.h"
#include "PlatformWheelEvent.h"
#include "PointerLockController.h"
#include "PopupContainer.h"
@@ -146,6 +144,7 @@
#include "WebViewClient.h"
#include "WheelEvent.h"
#include "painting/GraphicsContextBuilder.h"
+#include "src/WebActiveGestureAnimation.h"
#include <public/Platform.h>
#include <public/WebCompositorOutputSurface.h>
#include <public/WebCompositorSupport.h>
@@ -165,16 +164,23 @@
#include <wtf/TemporaryChange.h>
#include <wtf/Uint8ClampedArray.h>
+#if ENABLE(DEFAULT_RENDER_THEME)
+#include "PlatformThemeChromiumDefault.h"
+#include "RenderThemeChromiumDefault.h"
+#endif
+
#if ENABLE(GESTURE_EVENTS)
-#include "PlatformGestureCurveFactory.h"
#include "PlatformGestureEvent.h"
#include "TouchDisambiguation.h"
#endif
#if OS(WINDOWS)
+#if !ENABLE(DEFAULT_RENDER_THEME)
#include "RenderThemeChromiumWin.h"
+#endif
#else
-#if OS(UNIX) && !OS(DARWIN)
+#if OS(UNIX) && !OS(DARWIN) && !ENABLE(DEFAULT_RENDER_THEME)
+#include "PlatformThemeChromiumLinux.h"
#include "RenderThemeChromiumLinux.h"
#endif
#include "RenderTheme.h"
@@ -425,6 +431,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_compositorSurfaceReady(false)
, m_deviceScaleInCompositor(1)
, m_inputHandlerIdentifier(-1)
+ , m_isFontAtlasLoaded(false)
#endif
#if ENABLE(INPUT_SPEECH)
, m_speechInputClient(SpeechInputClientImpl::create(client))
@@ -641,15 +648,15 @@ void WebViewImpl::handleMouseUp(Frame& mainFrame, const WebMouseEvent& event)
#endif
}
-void WebViewImpl::scrollBy(const WebCore::IntPoint& delta)
+void WebViewImpl::scrollBy(const WebPoint& delta)
{
WebMouseWheelEvent syntheticWheel;
const float tickDivisor = WebCore::WheelEvent::tickMultiplier;
- syntheticWheel.deltaX = delta.x();
- syntheticWheel.deltaY = delta.y();
- syntheticWheel.wheelTicksX = delta.x() / tickDivisor;
- syntheticWheel.wheelTicksY = delta.y() / tickDivisor;
+ syntheticWheel.deltaX = delta.x;
+ syntheticWheel.deltaY = delta.y;
+ syntheticWheel.wheelTicksX = delta.x / tickDivisor;
+ syntheticWheel.wheelTicksY = delta.y / tickDivisor;
syntheticWheel.hasPreciseScrollingDeltas = true;
syntheticWheel.x = m_lastWheelPosition.x;
syntheticWheel.y = m_lastWheelPosition.y;
@@ -677,13 +684,10 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
#endif
break;
case WebInputEvent::GestureTapCancel:
- if (m_linkHighlight)
- m_linkHighlight->startHighlightAnimationIfNeeded();
- break;
case WebInputEvent::GestureTap:
case WebInputEvent::GestureLongPress:
- // If a link highlight is active, kill it.
- m_linkHighlight.clear();
+ if (m_linkHighlight)
+ m_linkHighlight->startHighlightAnimationIfNeeded();
break;
default:
break;
@@ -691,13 +695,14 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
switch (event.type) {
case WebInputEvent::GestureFlingStart: {
+ if (mainFrameImpl()->frame()->eventHandler()->isScrollbarHandlingGestures())
+ break;
m_client->cancelScheduledContentIntents();
m_lastWheelPosition = WebPoint(event.x, event.y);
m_lastWheelGlobalPosition = WebPoint(event.globalX, event.globalY);
m_flingModifier = event.modifiers;
- // FIXME: Make the curve parametrizable from the browser.
- OwnPtr<PlatformGestureCurve> flingCurve = PlatformGestureCurveFactory::get()->createCurve(event.data.flingStart.sourceDevice, FloatPoint(event.data.flingStart.velocityX, event.data.flingStart.velocityY));
- m_gestureAnimation = ActivePlatformGestureAnimation::create(flingCurve.release(), this);
+ OwnPtr<WebGestureCurve> flingCurve = adoptPtr(Platform::current()->createFlingAnimationCurve(event.data.flingStart.sourceDevice, WebFloatPoint(event.data.flingStart.velocityX, event.data.flingStart.velocityY), WebSize()));
+ m_gestureAnimation = WebActiveGestureAnimation::createAtAnimationStart(flingCurve.release(), this);
scheduleAnimation();
eventSwallowed = true;
break;
@@ -799,8 +804,8 @@ void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar
m_lastWheelPosition = parameters.point;
m_lastWheelGlobalPosition = parameters.globalPoint;
m_flingModifier = parameters.modifiers;
- OwnPtr<PlatformGestureCurve> curve = PlatformGestureCurveFactory::get()->createCurve(parameters.sourceDevice, parameters.delta, IntPoint(parameters.cumulativeScroll));
- m_gestureAnimation = ActivePlatformGestureAnimation::create(curve.release(), this, parameters.startTime);
+ OwnPtr<WebGestureCurve> curve = adoptPtr(Platform::current()->createFlingAnimationCurve(parameters.sourceDevice, WebFloatPoint(parameters.delta), parameters.cumulativeScroll));
+ m_gestureAnimation = WebActiveGestureAnimation::createWithTimeOffset(curve.release(), this, parameters.startTime);
scheduleAnimation();
}
@@ -831,6 +836,18 @@ WebViewBenchmarkSupport* WebViewImpl::benchmarkSupport()
return &m_benchmarkSupport;
}
+void WebViewImpl::setShowFPSCounter(bool show)
+{
+ if (isAcceleratedCompositingActive()) {
+ TRACE_EVENT0("webkit", "WebViewImpl::setShowFPSCounter");
+#if USE(ACCELERATED_COMPOSITING)
+ loadFontAtlasIfNecessary();
+#endif
+ m_layerTreeView->setShowFPSCounter(show);
+ }
+ settingsImpl()->setShowFPSCounter(show);
+}
+
bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
{
ASSERT((event.type == WebInputEvent::RawKeyDown)
@@ -1817,7 +1834,7 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect, PaintOptions opt
}
double paintStart = currentTime();
- PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTransparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque);
+ PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTransparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque, m_webSettings->applyDeviceScaleFactorInCompositor());
double paintEnd = currentTime();
double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart);
WebKit::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
@@ -2913,7 +2930,7 @@ void WebViewImpl::setDeviceScaleFactor(float scaleFactor)
page()->setDeviceScaleFactor(scaleFactor);
- if (m_layerTreeView && m_webSettings->applyDefaultDeviceScaleFactorInCompositor()) {
+ if (m_layerTreeView && m_webSettings->applyDeviceScaleFactorInCompositor()) {
m_deviceScaleInCompositor = page()->deviceScaleFactor();
m_layerTreeView->setDeviceScaleFactor(m_deviceScaleInCompositor);
}
@@ -2987,6 +3004,14 @@ void WebViewImpl::setIgnoreViewportTagMaximumScale(bool flag)
m_page->chrome()->client()->dispatchViewportPropertiesDidChange(page()->mainFrame()->document()->viewportArguments());
}
+static IntSize unscaledContentsSize(Frame* frame)
+{
+ RenderView* root = frame->contentRenderer();
+ if (!root)
+ return IntSize();
+ return root->unscaledDocumentRect().size();
+}
+
bool WebViewImpl::computePageScaleFactorLimits()
{
if (m_pageDefinedMinimumPageScaleFactor == -1 || m_pageDefinedMaximumPageScaleFactor == -1)
@@ -2999,11 +3024,10 @@ bool WebViewImpl::computePageScaleFactorLimits()
m_maximumPageScaleFactor = max(min(m_pageDefinedMaximumPageScaleFactor, maxPageScaleFactor), minPageScaleFactor) * (deviceScaleFactor() / m_deviceScaleInCompositor);
int viewWidthNotIncludingScrollbars = page()->mainFrame()->view()->visibleContentRect(false).width();
- int contentsWidth = mainFrame()->contentsSize().width;
- if (viewWidthNotIncludingScrollbars && contentsWidth) {
+ int unscaledContentsWidth = unscaledContentsSize(page()->mainFrame()).width();
+ if (viewWidthNotIncludingScrollbars && unscaledContentsWidth) {
// Limit page scaling down to the document width.
- int unscaledContentWidth = contentsWidth / pageScaleFactor();
- m_minimumPageScaleFactor = max(m_minimumPageScaleFactor, static_cast<float>(viewWidthNotIncludingScrollbars) / unscaledContentWidth);
+ m_minimumPageScaleFactor = max(m_minimumPageScaleFactor, static_cast<float>(viewWidthNotIncludingScrollbars) / unscaledContentsWidth);
m_maximumPageScaleFactor = max(m_minimumPageScaleFactor, m_maximumPageScaleFactor);
}
ASSERT(m_minimumPageScaleFactor <= m_maximumPageScaleFactor);
@@ -3533,7 +3557,9 @@ void WebViewImpl::setDomainRelaxationForbidden(bool forbidden, const WebString&
void WebViewImpl::setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor) {
-#if OS(UNIX) && !OS(DARWIN) && !OS(ANDROID)
+#if ENABLE(DEFAULT_RENDER_THEME)
+ PlatformThemeChromiumDefault::setScrollbarColors(inactiveColor, activeColor, trackColor);
+#elif OS(UNIX) && !OS(DARWIN) && !OS(ANDROID)
PlatformThemeChromiumLinux::setScrollbarColors(inactiveColor, activeColor, trackColor);
#endif
}
@@ -3542,11 +3568,11 @@ void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor,
unsigned activeForegroundColor,
unsigned inactiveBackgroundColor,
unsigned inactiveForegroundColor) {
-#if OS(UNIX) && !OS(DARWIN) && !OS(ANDROID)
- RenderThemeChromiumLinux::setSelectionColors(activeBackgroundColor,
- activeForegroundColor,
- inactiveBackgroundColor,
- inactiveForegroundColor);
+#if ENABLE(DEFAULT_RENDER_THEME)
+ RenderThemeChromiumDefault::setSelectionColors(activeBackgroundColor, activeForegroundColor, inactiveBackgroundColor, inactiveForegroundColor);
+ theme()->platformColorsDidChange();
+#elif OS(UNIX) && !OS(DARWIN) && !OS(ANDROID)
+ RenderThemeChromiumLinux::setSelectionColors(activeBackgroundColor, activeForegroundColor, inactiveBackgroundColor, inactiveForegroundColor);
theme()->platformColorsDidChange();
#endif
}
@@ -3964,10 +3990,14 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
WebLayerTreeView::Settings layerTreeViewSettings;
layerTreeViewSettings.acceleratePainting = page()->settings()->acceleratedDrawingEnabled();
+ layerTreeViewSettings.showDebugBorders = page()->settings()->showDebugBorders();
layerTreeViewSettings.showFPSCounter = settingsImpl()->showFPSCounter();
layerTreeViewSettings.showPlatformLayerTree = settingsImpl()->showPlatformLayerTree();
layerTreeViewSettings.showPaintRects = settingsImpl()->showPaintRects();
layerTreeViewSettings.renderVSyncEnabled = settingsImpl()->renderVSyncEnabled();
+ layerTreeViewSettings.perTilePaintingEnabled = settingsImpl()->perTilePaintingEnabled();
+ layerTreeViewSettings.acceleratedAnimationEnabled = settingsImpl()->acceleratedAnimationEnabled();
+ layerTreeViewSettings.pageScalePinchZoomEnabled = settingsImpl()->applyPageScaleFactorInCompositor();
layerTreeViewSettings.defaultTileSize = settingsImpl()->defaultTileSize();
layerTreeViewSettings.maxUntiledLayerSize = settingsImpl()->maxUntiledLayerSize();
@@ -3978,7 +4008,7 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(this, *m_rootLayer, layerTreeViewSettings));
if (m_layerTreeView) {
- if (m_webSettings->applyDefaultDeviceScaleFactorInCompositor() && page()->deviceScaleFactor() != 1) {
+ if (m_webSettings->applyDeviceScaleFactorInCompositor() && page()->deviceScaleFactor() != 1) {
ASSERT(page()->deviceScaleFactor());
m_deviceScaleInCompositor = page()->deviceScaleFactor();
@@ -3995,17 +4025,15 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
m_client->didActivateCompositor(m_inputHandlerIdentifier);
m_isAcceleratedCompositingActive = true;
m_compositorCreationFailed = false;
+ m_isFontAtlasLoaded = false;
if (m_pageOverlays)
m_pageOverlays->update();
- // Only allocate the font atlas if we have reason to use the heads-up display.
- if (layerTreeViewSettings.showFPSCounter || layerTreeViewSettings.showPlatformLayerTree) {
- TRACE_EVENT0("cc", "WebViewImpl::setIsAcceleratedCompositingActive(true) initialize font atlas");
- WebRect asciiToRectTable[128];
- int fontHeight;
- SkBitmap bitmap = WebCore::CompositorHUDFontAtlas::generateFontAtlas(asciiToRectTable, fontHeight);
- m_layerTreeView->setFontAtlas(asciiToRectTable, bitmap, fontHeight);
- }
+ if (layerTreeViewSettings.showPlatformLayerTree)
+ loadFontAtlasIfNecessary();
+
+ if (settingsImpl()->showFPSCounter())
+ setShowFPSCounter(true);
} else {
m_nonCompositedContentHost.clear();
m_isAcceleratedCompositingActive = false;
@@ -4017,6 +4045,21 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
page()->mainFrame()->view()->setClipsRepaints(!m_isAcceleratedCompositingActive);
}
+void WebViewImpl::loadFontAtlasIfNecessary()
+{
+ ASSERT(m_layerTreeView);
+
+ if (m_isFontAtlasLoaded)
+ return;
+
+ TRACE_EVENT0("webkit", "WebViewImpl::loadFontAtlas");
+ WebRect asciiToRectTable[128];
+ int fontHeight;
+ SkBitmap bitmap = WebCore::CompositorHUDFontAtlas::generateFontAtlas(asciiToRectTable, fontHeight);
+ m_layerTreeView->setFontAtlas(asciiToRectTable, bitmap, fontHeight);
+ m_isFontAtlasLoaded = true;
+}
+
#endif
namespace {
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index 02a1e5370..da5f69b9e 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -44,13 +44,13 @@
#include "PageOverlayList.h"
#include "PagePopupDriver.h"
#include "PageWidgetDelegate.h"
-#include "PlatformGestureCurveTarget.h"
#include "UserMediaClientImpl.h"
#include "WebInputEvent.h"
#include "WebNavigationPolicy.h"
#include "WebView.h"
#include "WebViewBenchmarkSupportImpl.h"
#include <public/WebFloatQuad.h>
+#include <public/WebGestureCurveTarget.h>
#include <public/WebLayer.h>
#include <public/WebLayerTreeViewClient.h>
#include <public/WebPoint.h>
@@ -61,7 +61,6 @@
#include <wtf/RefCounted.h>
namespace WebCore {
-class ActivePlatformGestureAnimation;
class ChromiumDataObject;
class Color;
class DocumentLoader;
@@ -74,7 +73,6 @@ class Page;
class PageGroup;
class PagePopup;
class PagePopupClient;
-class PlatformGestureCurveTarget;
class PlatformKeyboardEvent;
class PopupContainer;
class PopupMenuClient;
@@ -101,6 +99,7 @@ class SpeechRecognitionClientProxy;
class UserMediaClientImpl;
class ValidationMessageClientImpl;
class WebAccessibilityObject;
+class WebActiveGestureAnimation;
class WebCompositorImpl;
class WebDevToolsAgentClient;
class WebDevToolsAgentPrivate;
@@ -119,13 +118,13 @@ class WebTouchEvent;
class WebViewBenchmarkSupport;
class WebViewImpl : public WebView
- , public WebLayerTreeViewClient
- , public RefCounted<WebViewImpl>
- , public WebCore::PlatformGestureCurveTarget
+ , public WebLayerTreeViewClient
+ , public RefCounted<WebViewImpl>
+ , public WebGestureCurveTarget
#if ENABLE(PAGE_POPUP)
- , public WebCore::PagePopupDriver
+ , public WebCore::PagePopupDriver
#endif
- , public PageWidgetEventHandler {
+ , public PageWidgetEventHandler {
public:
enum AutoZoomType {
DoubleTap,
@@ -309,6 +308,7 @@ public:
#endif
virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingParameters&);
virtual WebViewBenchmarkSupport* benchmarkSupport();
+ virtual void setShowFPSCounter(bool);
// WebLayerTreeViewClient
virtual void willBeginFrame();
@@ -404,8 +404,8 @@ public:
void numberOfWheelEventHandlersChanged(unsigned);
void hasTouchEventHandlers(bool);
- // PlatformGestureCurveTarget implementation for wheel fling.
- virtual void scrollBy(const WebCore::IntPoint&);
+ // WebGestureCurveTarget implementation for fling.
+ virtual void scrollBy(const WebPoint&);
// Handles context menu events orignated via the the keyboard. These
// include the VK_APPS virtual key and the Shift+F10 combine. Code is
@@ -599,6 +599,7 @@ public:
LinkHighlight* linkHighlight() { return m_linkHighlight.get(); }
#endif
+ WebSettingsImpl* settingsImpl();
private:
bool computePageScaleFactorLimits();
@@ -650,6 +651,7 @@ private:
#if USE(ACCELERATED_COMPOSITING)
void setIsAcceleratedCompositingActive(bool);
+ void loadFontAtlasIfNecessary();
void doComposite();
void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
void reallocateRenderer();
@@ -677,8 +679,6 @@ private:
virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE;
virtual bool handleCharEvent(const WebKeyboardEvent&) OVERRIDE;
- WebSettingsImpl* settingsImpl();
-
WebViewClient* m_client;
WebAutofillClient* m_autofillClient;
WebPermissionClient* m_permissionClient;
@@ -846,6 +846,7 @@ private:
bool m_compositorSurfaceReady;
float m_deviceScaleInCompositor;
int m_inputHandlerIdentifier;
+ bool m_isFontAtlasLoaded;
#endif
static const WebInputEvent* m_currentInputEvent;
@@ -870,7 +871,7 @@ private:
#if ENABLE(NAVIGATOR_CONTENT_UTILS)
OwnPtr<NavigatorContentUtilsClientImpl> m_navigatorContentUtilsClient;
#endif
- OwnPtr<WebCore::ActivePlatformGestureAnimation> m_gestureAnimation;
+ OwnPtr<WebActiveGestureAnimation> m_gestureAnimation;
WebPoint m_lastWheelPosition;
WebPoint m_lastWheelGlobalPosition;
int m_flingModifier;