summaryrefslogtreecommitdiff
path: root/Source/WebKit
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-01-11 10:03:25 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-01-11 10:03:25 +0100
commitd11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (patch)
treeb318cf594dc1da2fa48224005945c9157f35bb41 /Source/WebKit
parent6300a96eca9f152b379f1bcf3d9efdc5572d989a (diff)
downloadqtwebkit-d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9.tar.gz
Imported WebKit commit 75bb2fc5882d2e1b3d5572c2961507996cbca5e3 (http://svn.webkit.org/repository/webkit/trunk@104681)
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/ChangeLog33
-rw-r--r--Source/WebKit/WebKit.pri6
-rw-r--r--Source/WebKit/WebKit.xcodeproj/project.pbxproj108
-rw-r--r--Source/WebKit/blackberry/Api/BackingStore.cpp5
-rw-r--r--Source/WebKit/chromium/ChangeLog310
-rw-r--r--Source/WebKit/chromium/DEPS2
-rw-r--r--Source/WebKit/chromium/WebKit.gyp2
-rw-r--r--Source/WebKit/chromium/WebKit.gypi3
-rw-r--r--Source/WebKit/chromium/features.gypi5
-rw-r--r--Source/WebKit/chromium/public/WebContextMenuData.h3
-rw-r--r--Source/WebKit/chromium/public/WebPlugin.h12
-rw-r--r--Source/WebKit/chromium/public/WebPluginAction.h54
-rw-r--r--Source/WebKit/chromium/public/WebSettings.h1
-rw-r--r--Source/WebKit/chromium/public/WebView.h9
-rw-r--r--Source/WebKit/chromium/public/platform/WebMimeRegistry.h29
-rw-r--r--Source/WebKit/chromium/src/ContextMenuClientImpl.cpp6
-rw-r--r--Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/NonCompositedContentHost.cpp9
-rw-r--r--Source/WebKit/chromium/src/NonCompositedContentHost.h3
-rw-r--r--Source/WebKit/chromium/src/PlatformSupport.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp4
-rw-r--r--Source/WebKit/chromium/src/WebLayerTreeView.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp11
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp3
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp36
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h3
-rw-r--r--Source/WebKit/chromium/src/WebWorkerClientImpl.cpp4
-rw-r--r--Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp54
-rw-r--r--Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp275
-rw-r--r--Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp36
-rw-r--r--Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp47
-rw-r--r--Source/WebKit/chromium/tests/CCQuadCullerTest.cpp187
-rw-r--r--Source/WebKit/chromium/tests/TextureManagerTest.cpp231
-rw-r--r--Source/WebKit/efl/ChangeLog54
-rw-r--r--Source/WebKit/efl/ewk/ewk_js.cpp12
-rw-r--r--Source/WebKit/efl/ewk/ewk_js.h15
-rw-r--r--Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp2
-rw-r--r--Source/WebKit/efl/ewk/ewk_view.cpp41
-rw-r--r--Source/WebKit/gtk/ChangeLog32
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp13
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h1
-rw-r--r--Source/WebKit/gtk/tests/testatk.c26
-rw-r--r--Source/WebKit/mac/ChangeLog61
-rw-r--r--Source/WebKit/mac/History/WebHistoryItem.mm8
-rw-r--r--Source/WebKit/mac/WebCoreSupport/WebChromeClient.h10
-rw-r--r--Source/WebKit/mac/WebView/WebDynamicScrollBarsView.h3
-rw-r--r--Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm28
-rw-r--r--Source/WebKit/mac/WebView/WebView.mm1
-rw-r--r--Source/WebKit/qt/Api/qhttpheader.cpp273
-rw-r--r--Source/WebKit/qt/Api/qhttpheader_p.h112
-rw-r--r--Source/WebKit/qt/Api/qwebpage.cpp1
-rw-r--r--Source/WebKit/qt/ChangeLog116
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp12
-rw-r--r--Source/WebKit/win/ChangeLog14
-rw-r--r--Source/WebKit/win/DOMHTMLClasses.cpp4
-rw-r--r--Source/WebKit/win/Interfaces/IWebViewPrivate.idl3
60 files changed, 2184 insertions, 165 deletions
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index 3284277df..89991f914 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,36 @@
+2012-01-11 Rafael Brandao <rafael.lobo@openbossa.org>
+
+ [Qt][WK2] Fix the build for newer Qt5
+ https://bugs.webkit.org/show_bug.cgi?id=75964
+
+ Reviewed by Simon Hausmann.
+
+ * WebKit.pri: Added the new files to the buildsystem.
+
+2012-01-10 Mike Lattanzio <mlattanzio@rim.com>
+
+ [BlackBerry] Fix assertion failure in BackingStore::blitContents
+ https://bugs.webkit.org/show_bug.cgi?id=75976
+
+ Prevent an assertion failure in BackingStore::blitContents by
+ checking that the srcRect of the transformation matrix is non empty.
+
+ Reviewed by Adam Treat.
+
+ Upstream BlackBerry port is not yet building and testable.
+
+ * blackberry/Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::blitContents):
+
+2012-01-06 Benjamin Poulain <bpoulain@apple.com>
+
+ [Mac] Sort the resources of WebKit.xcodeproj
+ https://bugs.webkit.org/show_bug.cgi?id=75634
+
+ Reviewed by Andreas Kling.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
2012-01-06 Jacky Jiang <zhajiang@rim.com>
[BlackBerry] Upstream BlackBerry WebCoreSupport cache client
diff --git a/Source/WebKit/WebKit.pri b/Source/WebKit/WebKit.pri
index ca1a0fdaf..05eb09a87 100644
--- a/Source/WebKit/WebKit.pri
+++ b/Source/WebKit/WebKit.pri
@@ -13,7 +13,8 @@ SOURCES += \
$$PWD/qt/Api/qwebscriptworld.cpp \
$$PWD/qt/Api/qwebdatabase.cpp \
$$PWD/qt/Api/qwebinspector.cpp \
- $$PWD/qt/Api/qwebkitversion.cpp
+ $$PWD/qt/Api/qwebkitversion.cpp \
+ $$PWD/qt/Api/qhttpheader.cpp
HEADERS += \
$$PWD/qt/Api/qwebframe.h \
@@ -32,5 +33,6 @@ HEADERS += \
$$PWD/qt/Api/qwebhistory.h \
$$PWD/qt/Api/qwebinspector.h \
$$PWD/qt/Api/qwebkitversion.h \
- $$PWD/qt/Api/qwebplugindatabase_p.h
+ $$PWD/qt/Api/qwebplugindatabase_p.h \
+ $$PWD/qt/Api/qhttpheader_p.h
diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
index e36b1bf87..16cdf4c00 100644
--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -771,6 +771,7 @@
files = (
939811290824BF01008DF038 /* Carbon.framework in Frameworks */,
9398112A0824BF01008DF038 /* Cocoa.framework in Frameworks */,
+ 5D4DE0991479CBDF00EA3DF4 /* DiskArbitration.framework in Frameworks */,
CD8EAC7311CAC9A300774075 /* IOKit.framework in Frameworks */,
9398112B0824BF01008DF038 /* JavaScriptCore.framework in Frameworks */,
9398112E0824BF01008DF038 /* libicucore.dylib in Frameworks */,
@@ -778,7 +779,6 @@
1A20D08B0ED384F20043FA9F /* QuartzCore.framework in Frameworks */,
9398112F0824BF01008DF038 /* Security.framework in Frameworks */,
9398112C0824BF01008DF038 /* WebCore.framework in Frameworks */,
- 5D4DE0991479CBDF00EA3DF4 /* DiskArbitration.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -901,9 +901,9 @@
children = (
5D7BF8120C2A1D90008CE06D /* WebInspector.h */,
5D7BF8130C2A1D90008CE06D /* WebInspector.mm */,
- 7A8FF0D01075024A00A80A08 /* WebInspectorPrivate.h */,
B804176D1217A83100466BAE /* WebInspectorFrontend.h */,
B804176E1217A83100466BAE /* WebInspectorFrontend.mm */,
+ 7A8FF0D01075024A00A80A08 /* WebInspectorPrivate.h */,
1C68F663095B5FC100C2984E /* WebNodeHighlight.h */,
1C68F664095B5FC100C2984E /* WebNodeHighlight.mm */,
A5687BD8135B791A0074CBCB /* WebNodeHighlighter.h */,
@@ -935,9 +935,9 @@
254DC334016E1D3F0ECA149E /* Misc */ = {
isa = PBXGroup;
children = (
- 29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */,
A864B3E5123ED83D00C2A612 /* MailQuirksUserScript.js */,
1CCFFD120B1F81F2002EE926 /* OldWebAssertions.c */,
+ 29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */,
5DE92FEE0BD7017E0059A5FD /* WebAssertions.h */,
5241ADF30B1BC48A004012BD /* WebCache.h */,
5241ADF40B1BC48A004012BD /* WebCache.mm */,
@@ -1062,8 +1062,8 @@
511F3FD30CECC88F00852565 /* WebDatabaseTrackerClient.h */,
511F3FD40CECC88F00852565 /* WebDatabaseTrackerClient.mm */,
3AB02AF512C1319B00FBB694 /* WebStorageManager.mm */,
- 3AB02AFF12C132B200FBB694 /* WebStorageManagerPrivate.h */,
3AE15D4F12DBDED4009323C8 /* WebStorageManagerInternal.h */,
+ 3AB02AFF12C132B200FBB694 /* WebStorageManagerPrivate.h */,
3ABB3C781309C3B500E93D94 /* WebStorageTrackerClient.h */,
3ABB3C791309C3B500E93D94 /* WebStorageTrackerClient.mm */,
);
@@ -1168,13 +1168,13 @@
39446072020F50ED0ECA1767 /* WebDataSourcePrivate.h */,
BC542C400FD7766F00D8AB5D /* WebDelegateImplementationCaching.h */,
BC542C410FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm */,
+ 598AD91F1201CF0700ABAE4E /* WebDeviceOrientation.h */,
+ 598AD9211201CF1000ABAE4E /* WebDeviceOrientation.mm */,
+ 598AD9231201CF1900ABAE4E /* WebDeviceOrientationInternal.h */,
598ADA451202275000ABAE4E /* WebDeviceOrientationProvider.h */,
- 598AD9291201CF3B00ABAE4E /* WebDeviceOrientationProviderMockInternal.h */,
- 598AD9271201CF3200ABAE4E /* WebDeviceOrientationProviderMock.mm */,
598AD9251201CF2500ABAE4E /* WebDeviceOrientationProviderMock.h */,
- 598AD9231201CF1900ABAE4E /* WebDeviceOrientationInternal.h */,
- 598AD9211201CF1000ABAE4E /* WebDeviceOrientation.mm */,
- 598AD91F1201CF0700ABAE4E /* WebDeviceOrientation.h */,
+ 598AD9271201CF3200ABAE4E /* WebDeviceOrientationProviderMock.mm */,
+ 598AD9291201CF3B00ABAE4E /* WebDeviceOrientationProviderMockInternal.h */,
35081DAE02B6D4F50ACA2ACA /* WebDocument.h */,
ED21B9810528F7AA003299AC /* WebDocumentInternal.h */,
65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoaderMac.h */,
@@ -1285,8 +1285,6 @@
children = (
B82958D1132707D0000D0E79 /* CorrectionPanel.h */,
B82958D2132707D0000D0E79 /* CorrectionPanel.mm */,
- 598AD9191201CEC900ABAE4E /* WebDeviceOrientationClient.h */,
- 598AD91D1201CECF00ABAE4E /* WebDeviceOrientationClient.mm */,
B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */,
B68049720FFBCEC1009F7F62 /* WebApplicationCache.mm */,
A5DEFC1111D5344B00885273 /* WebApplicationCacheQuotaManager.h */,
@@ -1296,6 +1294,8 @@
14D8252E0AF955090004F057 /* WebChromeClient.mm */,
065AD5A10B0C32C7005A2B1D /* WebContextMenuClient.h */,
065AD5A20B0C32C7005A2B1D /* WebContextMenuClient.mm */,
+ 598AD9191201CEC900ABAE4E /* WebDeviceOrientationClient.h */,
+ 598AD91D1201CECF00ABAE4E /* WebDeviceOrientationClient.mm */,
A70936AD0B5608DC00CDB48E /* WebDragClient.h */,
A70936AE0B5608DC00CDB48E /* WebDragClient.mm */,
4BF99F8E0AE050BC00815C2B /* WebEditorClient.h */,
@@ -1423,6 +1423,7 @@
939810650824BF01008DF038 /* CarbonWindowAdapter.h in Headers */,
939810660824BF01008DF038 /* CarbonWindowContentView.h in Headers */,
939810670824BF01008DF038 /* CarbonWindowFrame.h in Headers */,
+ B82958D3132707D0000D0E79 /* CorrectionPanel.h in Headers */,
939810680824BF01008DF038 /* HIViewAdapter.h in Headers */,
939810690824BF01008DF038 /* HIWebView.h in Headers */,
1A8DED500EE88B8A00F25022 /* HostedNetscapePluginStream.h in Headers */,
@@ -1432,6 +1433,7 @@
1A2DBE9F0F251E3A0036F8A6 /* ProxyInstance.h in Headers */,
E169836211346D1B00894115 /* ProxyRuntimeObject.h in Headers */,
B6CE5C25100BC5F500219936 /* WebApplicationCache.h in Headers */,
+ A5DEFC1311D5344B00885273 /* WebApplicationCacheQuotaManager.h in Headers */,
9398109A0824BF01008DF038 /* WebArchive.h in Headers */,
44BB8B141241A022001E3A22 /* WebArchiveInternal.h in Headers */,
5DE92FEF0BD7017E0059A5FD /* WebAssertions.h in Headers */,
@@ -1445,11 +1447,12 @@
51CBFCAD0D10E6C5002DBF51 /* WebCachedFramePlatformData.h in Headers */,
14D8252F0AF955090004F057 /* WebChromeClient.h in Headers */,
939810490824BF01008DF038 /* WebClipView.h in Headers */,
- 939810250824BF01008DF038 /* WebNSWindowExtras.h in Headers */,
065AD5A30B0C32C7005A2B1D /* WebContextMenuClient.h in Headers */,
939810160824BF01008DF038 /* WebCoreStatistics.h in Headers */,
+ 93E2A1A4123B0B3C009FE12A /* WebDashboardRegion.h in Headers */,
51AEDEF10CECF45700854328 /* WebDatabaseManagerInternal.h in Headers */,
511F3FD60CECC88F00852565 /* WebDatabaseManagerPrivate.h in Headers */,
+ A5DEFC0F11D5343E00885273 /* WebDatabaseQuotaManager.h in Headers */,
511F3FD70CECC88F00852565 /* WebDatabaseTrackerClient.h in Headers */,
9398104B0824BF01008DF038 /* WebDataSource.h in Headers */,
658A40960A14853B005E6987 /* WebDataSourceInternal.h in Headers */,
@@ -1459,6 +1462,12 @@
9398104F0824BF01008DF038 /* WebDefaultPolicyDelegate.h in Headers */,
939810760824BF01008DF038 /* WebDefaultUIDelegate.h in Headers */,
BC542C420FD7766F00D8AB5D /* WebDelegateImplementationCaching.h in Headers */,
+ 598AD9201201CF0700ABAE4E /* WebDeviceOrientation.h in Headers */,
+ 598AD91A1201CEC900ABAE4E /* WebDeviceOrientationClient.h in Headers */,
+ 598AD9241201CF1900ABAE4E /* WebDeviceOrientationInternal.h in Headers */,
+ 598ADA461202275000ABAE4E /* WebDeviceOrientationProvider.h in Headers */,
+ 598AD9261201CF2500ABAE4E /* WebDeviceOrientationProviderMock.h in Headers */,
+ 598AD92A1201CF3B00ABAE4E /* WebDeviceOrientationProviderMockInternal.h in Headers */,
939810500824BF01008DF038 /* WebDocument.h in Headers */,
9398107F0824BF01008DF038 /* WebDocumentInternal.h in Headers */,
65FFB7FC0AD0B7D30048CD05 /* WebDocumentLoaderMac.h in Headers */,
@@ -1482,10 +1491,12 @@
9398105B0824BF01008DF038 /* WebFrameLoadDelegate.h in Headers */,
C0B88E8B10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h in Headers */,
931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */,
+ 9391F275121B38BD00EBF7E8 /* WebFrameNetworkingContext.h in Headers */,
939810540824BF01008DF038 /* WebFramePrivate.h in Headers */,
9398106E0824BF01008DF038 /* WebFrameView.h in Headers */,
9398106F0824BF01008DF038 /* WebFrameViewInternal.h in Headers */,
939810AF0824BF01008DF038 /* WebFrameViewPrivate.h in Headers */,
+ CDA62AE2125F87C2007FD118 /* WebFullScreenController.h in Headers */,
BC7F884B10C8775A00D6133D /* WebGeolocationClient.h in Headers */,
BC7F889E10C9D30C00D6133D /* WebGeolocationPosition.h in Headers */,
BC7F88A510C9D88B00D6133D /* WebGeolocationPositionInternal.h in Headers */,
@@ -1509,6 +1520,7 @@
939810190824BF01008DF038 /* WebIconDatabasePrivate.h in Headers */,
5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */,
06693DDC0BFBA85200216072 /* WebInspectorClient.h in Headers */,
+ B804176F1217A83100466BAE /* WebInspectorFrontend.h in Headers */,
7A8FF0D11075024A00A80A08 /* WebInspectorPrivate.h in Headers */,
939810A00824BF01008DF038 /* WebJavaPlugIn.h in Headers */,
939810420824BF01008DF038 /* WebJavaScriptTextInputPanel.h in Headers */,
@@ -1531,6 +1543,7 @@
9398107A0824BF01008DF038 /* WebKitSystemBits.h in Headers */,
1C0D40870AC1C8F40009C113 /* WebKitVersionChecks.h in Headers */,
939810790824BF01008DF038 /* WebLocalizableStrings.h in Headers */,
+ BC42D324131ED1E00075FA4B /* WebLocalizableStringsInternal.h in Headers */,
5185F62610712B80007AA393 /* WebNavigationData.h in Headers */,
0AB752370FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h in Headers */,
0AEBFF630F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h in Headers */,
@@ -1542,7 +1555,9 @@
9398102B0824BF01008DF038 /* WebNetscapePluginStream.h in Headers */,
1A4DF5220EC8C74D006BD4B4 /* WebNetscapePluginView.h in Headers */,
1C68F66F095B5FC100C2984E /* WebNodeHighlight.h in Headers */,
+ A5687BDA135B791A0074CBCB /* WebNodeHighlighter.h in Headers */,
1C68F671095B5FC100C2984E /* WebNodeHighlightView.h in Headers */,
+ 31C11A6E1476552E0049A4CC /* WebNotificationClient.h in Headers */,
EDE983800BCDF5FE00FDAE28 /* WebNSArrayExtras.h in Headers */,
939810210824BF01008DF038 /* WebNSControlExtras.h in Headers */,
939810820824BF01008DF038 /* WebNSDataExtras.h in Headers */,
@@ -1559,6 +1574,8 @@
65E0F88408500917007E5CB9 /* WebNSURLRequestExtras.h in Headers */,
65E0F9E608500F23007E5CB9 /* WebNSUserDefaultsExtras.h in Headers */,
939810240824BF01008DF038 /* WebNSViewExtras.h in Headers */,
+ 939810250824BF01008DF038 /* WebNSWindowExtras.h in Headers */,
+ A58A5799143E727000125F50 /* WebOpenPanelResultListener.h in Headers */,
9398102A0824BF01008DF038 /* WebPanelAuthenticationHandler.h in Headers */,
37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */,
939810A50824BF01008DF038 /* WebPDFRepresentation.h in Headers */,
@@ -1581,6 +1598,7 @@
939810A80824BF01008DF038 /* WebPreferenceKeysPrivate.h in Headers */,
9398105D0824BF01008DF038 /* WebPreferences.h in Headers */,
9398105E0824BF01008DF038 /* WebPreferencesPrivate.h in Headers */,
+ A57E2F24120749E600048DF3 /* WebQuotaManager.h in Headers */,
0F30985F11ECFE4500F559DF /* WebRenderLayer.h in Headers */,
9398105F0824BF01008DF038 /* WebRenderNode.h in Headers */,
939810880824BF01008DF038 /* WebResource.h in Headers */,
@@ -1592,8 +1610,13 @@
C0167BF80D7F5DD00028696E /* WebScriptDebugger.h in Headers */,
C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */,
C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */,
+ A5DEFC0B11D5331C00885273 /* WebSecurityOriginInternal.h in Headers */,
+ A5DEFC0C11D5331C00885273 /* WebSecurityOriginPrivate.h in Headers */,
BC26C69E10B743F400B687ED /* WebSerializedJSValue.h in Headers */,
F67DD7E6125E4527007BDCB8 /* WebSerializedJSValuePrivate.h in Headers */,
+ 3AE15D5012DBDED4009323C8 /* WebStorageManagerInternal.h in Headers */,
+ 3AB02B0012C132B200FBB694 /* WebStorageManagerPrivate.h in Headers */,
+ 3ABB3C7A1309C3B500E93D94 /* WebStorageTrackerClient.h in Headers */,
939810270824BF01008DF038 /* WebStringTruncator.h in Headers */,
93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */,
936A2DEA0FD2D08400D312DB /* WebTextCompletionController.h in Headers */,
@@ -1609,29 +1632,6 @@
9398109B0824BF01008DF038 /* WebViewInternal.h in Headers */,
939810710824BF01008DF038 /* WebViewPrivate.h in Headers */,
41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */,
- A5DEFC0B11D5331C00885273 /* WebSecurityOriginInternal.h in Headers */,
- A5DEFC0C11D5331C00885273 /* WebSecurityOriginPrivate.h in Headers */,
- A5DEFC0F11D5343E00885273 /* WebDatabaseQuotaManager.h in Headers */,
- A5DEFC1311D5344B00885273 /* WebApplicationCacheQuotaManager.h in Headers */,
- A57E2F24120749E600048DF3 /* WebQuotaManager.h in Headers */,
- B804176F1217A83100466BAE /* WebInspectorFrontend.h in Headers */,
- 9391F275121B38BD00EBF7E8 /* WebFrameNetworkingContext.h in Headers */,
- 598AD91A1201CEC900ABAE4E /* WebDeviceOrientationClient.h in Headers */,
- 598AD9201201CF0700ABAE4E /* WebDeviceOrientation.h in Headers */,
- 598AD9241201CF1900ABAE4E /* WebDeviceOrientationInternal.h in Headers */,
- 598AD9261201CF2500ABAE4E /* WebDeviceOrientationProviderMock.h in Headers */,
- 598AD92A1201CF3B00ABAE4E /* WebDeviceOrientationProviderMockInternal.h in Headers */,
- 598ADA461202275000ABAE4E /* WebDeviceOrientationProvider.h in Headers */,
- 93E2A1A4123B0B3C009FE12A /* WebDashboardRegion.h in Headers */,
- 3AB02B0012C132B200FBB694 /* WebStorageManagerPrivate.h in Headers */,
- CDA62AE2125F87C2007FD118 /* WebFullScreenController.h in Headers */,
- 3AE15D5012DBDED4009323C8 /* WebStorageManagerInternal.h in Headers */,
- 3ABB3C7A1309C3B500E93D94 /* WebStorageTrackerClient.h in Headers */,
- BC42D324131ED1E00075FA4B /* WebLocalizableStringsInternal.h in Headers */,
- B82958D3132707D0000D0E79 /* CorrectionPanel.h in Headers */,
- A5687BDA135B791A0074CBCB /* WebNodeHighlighter.h in Headers */,
- A58A5799143E727000125F50 /* WebOpenPanelResultListener.h in Headers */,
- 31C11A6E1476552E0049A4CC /* WebNotificationClient.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1703,9 +1703,9 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 29AEF960134C76FB00FE5096 /* OutlookQuirksUserScript.js in Resources */,
- A864B3F6123ED9FA00C2A612 /* MailQuirksUserScript.js in Resources */,
939810BA0824BF01008DF038 /* IDNScriptWhiteList.txt in Resources */,
+ A864B3F6123ED9FA00C2A612 /* MailQuirksUserScript.js in Resources */,
+ 29AEF960134C76FB00FE5096 /* OutlookQuirksUserScript.js in Resources */,
939810B70824BF01008DF038 /* url_icon.tiff in Resources */,
939810B50824BF01008DF038 /* WebAuthenticationPanel.nib in Resources */,
5DE83A7A0D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib in Resources */,
@@ -1878,6 +1878,7 @@
939810FD0824BF01008DF038 /* CarbonWindowAdapter.mm in Sources */,
939810FE0824BF01008DF038 /* CarbonWindowContentView.m in Sources */,
939810FF0824BF01008DF038 /* CarbonWindowFrame.m in Sources */,
+ B82958D4132707D0000D0E79 /* CorrectionPanel.mm in Sources */,
939811000824BF01008DF038 /* HIViewAdapter.m in Sources */,
939811020824BF01008DF038 /* HIWebView.mm in Sources */,
1A8DED510EE88B8A00F25022 /* HostedNetscapePluginStream.mm in Sources */,
@@ -1889,6 +1890,7 @@
1A2DBEA00F251E3A0036F8A6 /* ProxyInstance.mm in Sources */,
E169836C11346D5600894115 /* ProxyRuntimeObject.mm in Sources */,
B6CE5C24100BC5CE00219936 /* WebApplicationCache.mm in Sources */,
+ A5DEFC1411D5344B00885273 /* WebApplicationCacheQuotaManager.mm in Sources */,
9398111D0824BF01008DF038 /* WebArchive.mm in Sources */,
939810CF0824BF01008DF038 /* WebAuthenticationPanel.m in Sources */,
939810BC0824BF01008DF038 /* WebBackForwardList.mm in Sources */,
@@ -1899,7 +1901,9 @@
939810EB0824BF01008DF038 /* WebClipView.mm in Sources */,
065AD5A40B0C32C7005A2B1D /* WebContextMenuClient.mm in Sources */,
939810BF0824BF01008DF038 /* WebCoreStatistics.mm in Sources */,
+ 93E2A1A5123B0B3C009FE12A /* WebDashboardRegion.mm in Sources */,
511F3FD50CECC88F00852565 /* WebDatabaseManager.mm in Sources */,
+ A5DEFC1011D5343E00885273 /* WebDatabaseQuotaManager.mm in Sources */,
511F3FD80CECC88F00852565 /* WebDatabaseTrackerClient.mm in Sources */,
939810ED0824BF01008DF038 /* WebDataSource.mm in Sources */,
939810EF0824BF01008DF038 /* WebDefaultContextMenuDelegate.mm in Sources */,
@@ -1907,6 +1911,9 @@
939810F00824BF01008DF038 /* WebDefaultPolicyDelegate.m in Sources */,
9398110A0824BF01008DF038 /* WebDefaultUIDelegate.m in Sources */,
BC542C430FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm in Sources */,
+ 598AD9221201CF1000ABAE4E /* WebDeviceOrientation.mm in Sources */,
+ 598AD91E1201CECF00ABAE4E /* WebDeviceOrientationClient.mm in Sources */,
+ 598AD9281201CF3200ABAE4E /* WebDeviceOrientationProviderMock.mm in Sources */,
65FFB7FD0AD0B7D30048CD05 /* WebDocumentLoaderMac.mm in Sources */,
9398111C0824BF01008DF038 /* WebDOMOperations.mm in Sources */,
E15663190FB61C1F00C199CA /* WebDownload.mm in Sources */,
@@ -1917,7 +1924,9 @@
939810FC0824BF01008DF038 /* WebFormDelegate.m in Sources */,
939810F20824BF01008DF038 /* WebFrame.mm in Sources */,
931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */,
+ 9391F276121B38BD00EBF7E8 /* WebFrameNetworkingContext.mm in Sources */,
939811060824BF01008DF038 /* WebFrameView.mm in Sources */,
+ CDA62AE3125F87C2007FD118 /* WebFullScreenController.mm in Sources */,
BC7F884C10C8775A00D6133D /* WebGeolocationClient.mm in Sources */,
BC7F889F10C9D30C00D6133D /* WebGeolocationPosition.mm in Sources */,
939811130824BF01008DF038 /* WebHistory.mm in Sources */,
@@ -1930,6 +1939,7 @@
5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */,
06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */,
1C7B0C660EB2464D00A28502 /* WebInspectorClientCF.cpp in Sources */,
+ B80417701217A83100466BAE /* WebInspectorFrontend.mm in Sources */,
939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */,
37D1DCA91065928C0068F7EF /* WebJSPDFDoc.mm in Sources */,
939811170824BF01008DF038 /* WebKeyGenerator.mm in Sources */,
@@ -1943,6 +1953,7 @@
9398110E0824BF01008DF038 /* WebKitSystemBits.m in Sources */,
1C0D40880AC1C8F40009C113 /* WebKitVersionChecks.m in Sources */,
ED5B9524111B725A00472298 /* WebLocalizableStrings.mm in Sources */,
+ BC42D34D131ED3880075FA4B /* WebLocalizableStringsInternal.mm in Sources */,
5185F62810712B97007AA393 /* WebNavigationData.mm in Sources */,
0AB752380FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm in Sources */,
0AEBFF640F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm in Sources */,
@@ -1954,7 +1965,9 @@
939810D10824BF01008DF038 /* WebNetscapePluginStream.mm in Sources */,
1A4DF5230EC8C74D006BD4B4 /* WebNetscapePluginView.mm in Sources */,
1C68F670095B5FC100C2984E /* WebNodeHighlight.mm in Sources */,
+ A5687BDB135B791A0074CBCB /* WebNodeHighlighter.mm in Sources */,
1C68F672095B5FC100C2984E /* WebNodeHighlightView.mm in Sources */,
+ 31C11A6F1476552E0049A4CC /* WebNotificationClient.mm in Sources */,
EDE983810BCDF5FE00FDAE28 /* WebNSArrayExtras.m in Sources */,
939810C60824BF01008DF038 /* WebNSControlExtras.m in Sources */,
939811150824BF01008DF038 /* WebNSDataExtras.m in Sources */,
@@ -1971,6 +1984,7 @@
65E0F9E708500F23007E5CB9 /* WebNSUserDefaultsExtras.mm in Sources */,
939810C90824BF01008DF038 /* WebNSViewExtras.m in Sources */,
939810CA0824BF01008DF038 /* WebNSWindowExtras.m in Sources */,
+ A58A579A143E727000125F50 /* WebOpenPanelResultListener.mm in Sources */,
939810D00824BF01008DF038 /* WebPanelAuthenticationHandler.m in Sources */,
37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */,
9398111F0824BF01008DF038 /* WebPDFRepresentation.mm in Sources */,
@@ -1990,7 +2004,10 @@
7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */,
C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */,
C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */,
+ A5DEFC0A11D5331C00885273 /* WebSecurityOrigin.mm in Sources */,
BC26C6A510B7447A00B687ED /* WebSerializedJSValue.mm in Sources */,
+ 3AB02AF612C1319B00FBB694 /* WebStorageManager.mm in Sources */,
+ 3ABB3C7B1309C3B500E93D94 /* WebStorageTrackerClient.mm in Sources */,
939810CC0824BF01008DF038 /* WebStringTruncator.mm in Sources */,
93EB178D09F88D460091F8FF /* WebSystemInterface.mm in Sources */,
936A2DE80FD2D08000D312DB /* WebTextCompletionController.mm in Sources */,
@@ -2001,23 +2018,6 @@
939811070824BF01008DF038 /* WebView.mm in Sources */,
BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */,
41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */,
- A5DEFC0A11D5331C00885273 /* WebSecurityOrigin.mm in Sources */,
- A5DEFC1011D5343E00885273 /* WebDatabaseQuotaManager.mm in Sources */,
- A5DEFC1411D5344B00885273 /* WebApplicationCacheQuotaManager.mm in Sources */,
- B80417701217A83100466BAE /* WebInspectorFrontend.mm in Sources */,
- 9391F276121B38BD00EBF7E8 /* WebFrameNetworkingContext.mm in Sources */,
- 598AD91E1201CECF00ABAE4E /* WebDeviceOrientationClient.mm in Sources */,
- 598AD9221201CF1000ABAE4E /* WebDeviceOrientation.mm in Sources */,
- 598AD9281201CF3200ABAE4E /* WebDeviceOrientationProviderMock.mm in Sources */,
- 93E2A1A5123B0B3C009FE12A /* WebDashboardRegion.mm in Sources */,
- 3AB02AF612C1319B00FBB694 /* WebStorageManager.mm in Sources */,
- CDA62AE3125F87C2007FD118 /* WebFullScreenController.mm in Sources */,
- 3ABB3C7B1309C3B500E93D94 /* WebStorageTrackerClient.mm in Sources */,
- BC42D34D131ED3880075FA4B /* WebLocalizableStringsInternal.mm in Sources */,
- B82958D4132707D0000D0E79 /* CorrectionPanel.mm in Sources */,
- A5687BDB135B791A0074CBCB /* WebNodeHighlighter.mm in Sources */,
- A58A579A143E727000125F50 /* WebOpenPanelResultListener.mm in Sources */,
- 31C11A6F1476552E0049A4CC /* WebNotificationClient.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Source/WebKit/blackberry/Api/BackingStore.cpp b/Source/WebKit/blackberry/Api/BackingStore.cpp
index 30f471c3a..b9b929d4b 100644
--- a/Source/WebKit/blackberry/Api/BackingStore.cpp
+++ b/Source/WebKit/blackberry/Api/BackingStore.cpp
@@ -1241,8 +1241,9 @@ void BackingStorePrivate::blitContents(const Platform::IntRect& dstRect,
#endif
// FIXME: This should not explicitely depend on WebCore::.
- TransformationMatrix transformation = TransformationMatrix::rectToRect(
- FloatRect(FloatPoint(0.0, 0.0), WebCore::IntSize(contents.size())), WebCore::IntRect(dstRect));
+ TransformationMatrix transformation;
+ if (!contents.isEmpty())
+ transformation = TransformationMatrix::rectToRect(FloatRect(FloatPoint(0.0, 0.0), WebCore::IntSize(contents.size())), WebCore::IntRect(dstRect));
bool blittingDirectlyToCompositingWindow = m_webPage->d->m_client->window()->windowUsage() == BlackBerry::Platform::Graphics::Window::GLES2Usage;
#if USE(ACCELERATED_COMPOSITING)
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 358aa0c7d..d9cb1d2d0 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,313 @@
+2012-01-10 Daniel Cheng <dcheng@chromium.org>
+
+ [chromium] Unreviewed, roll Chromium DEPS to r117121.
+
+ * DEPS:
+
+2012-01-10 Nat Duca <nduca@chromium.org>
+
+ [chromium] Reuse old timebase when activating CCDelayBasedTimeSource
+ https://bugs.webkit.org/show_bug.cgi?id=75938
+
+ Reviewed by James Robinson.
+
+ * tests/CCDelayBasedTimeSourceTest.cpp:
+ (WebKitTests::TEST):
+
+2012-01-10 Tony Chang <tony@chromium.org>
+
+ [chromium] Unreviewed, roll Chromium DEPS to r117109.
+
+ * DEPS:
+
+2012-01-10 Bill Budge <bbudge@chromium.org>
+
+ Allow plugins to add rotate items to browser's context menu. Adds a new
+ WebPluginAction struct, with rotate types.
+ https://bugs.webkit.org/show_bug.cgi?id=75645
+
+ Reviewed by Darin Fisher.
+
+ * WebKit.gyp:
+ * public/WebContextMenuData.h:
+ * public/WebPlugin.h:
+ (WebKit::WebPlugin::canRotateView):
+ (WebKit::WebPlugin::rotateView):
+ * public/WebPluginAction.h: Added.
+ (WebKit::WebPluginAction::WebPluginAction):
+ * public/WebView.h:
+ * src/ContextMenuClientImpl.cpp:
+ (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::performMediaPlayerAction):
+ (WebKit::WebViewImpl::performPluginAction):
+ * src/WebViewImpl.h:
+
+2012-01-10 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Create iterators for the RenderSurface-Layer tree
+ https://bugs.webkit.org/show_bug.cgi?id=74203
+
+ Reviewed by James Robinson.
+
+ * WebKit.gypi:
+ * tests/CCLayerIteratorTest.cpp: Added.
+
+2012-01-10 James Robinson <jamesr@chromium.org>
+
+ [chromium] Remove old WebMimeRegistry.h forwarding header
+ https://bugs.webkit.org/show_bug.cgi?id=75979
+
+ Reviewed by Ryosuke Niwa.
+
+ This isn't needed any more.
+
+ * WebKit.gyp:
+ * public/platform/WebMimeRegistry.h: Removed.
+ * src/FrameLoaderClientImpl.cpp:
+ * src/PlatformSupport.cpp:
+ * src/WebMediaPlayerClientImpl.cpp:
+
+2012-01-10 Adrienne Walker <enne@google.com>
+
+ [chromium] Draw debug tile borders on composited layers
+ https://bugs.webkit.org/show_bug.cgi?id=75680
+
+ Reviewed by James Robinson.
+
+ As debug borders are not a CCSetting and are instead grabbed directly
+ from each graphics layer, modify the NonCompositedContentHost to say
+ that its graphics layer has debug borders if the page settings demand
+ it.
+
+ * src/NonCompositedContentHost.cpp:
+ (WebKit::NonCompositedContentHost::NonCompositedContentHost):
+ (WebKit::NonCompositedContentHost::setShowDebugBorders):
+ (WebKit::NonCompositedContentHost::showDebugBorders):
+ * src/NonCompositedContentHost.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
+2012-01-10 Peter Beverloo <peter@chromium.org>
+
+ [Chromium] Fix compilation with ENABLE_WEB_AUDIO=0
+ https://bugs.webkit.org/show_bug.cgi?id=75957
+
+ Reviewed by Tony Gentilcore.
+
+ Revision 104502 broke Chromium compilation for platforms which disable
+ the Web Audio API. All references to m_audioSourceProvider should be
+ guarded with the ENABLE(WEB_AUDIO) conditional.
+
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::load):
+ (WebKit::WebMediaPlayerClientImpl::loadInternal):
+
+2012-01-09 Ryosuke Niwa <rniwa@webkit.org>
+
+ Roll Chromium DEPS from 116979 to 117006.
+
+ * DEPS:
+
+2012-01-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r104507.
+ http://trac.webkit.org/changeset/104507
+ https://bugs.webkit.org/show_bug.cgi?id=75936
+
+ Broke webkit_unit_tests (Requested by dimich on #webkit).
+
+ * WebKit.gypi:
+ * tests/CCLayerIteratorTest.cpp: Removed.
+
+2012-01-09 Ryosuke Niwa <rniwa@webkit.org>
+
+ Touch WebView.h in an attempt to clobber Chromium bots on build.webkit.org.
+
+ * public/WebView.h:
+
+2012-01-09 Ryosuke Niwa <rniwa@webkit.org>
+
+ Roll Chromium DEPS from 116459 to 116979.
+
+ * DEPS:
+
+2012-01-09 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Create iterators for the RenderSurface-Layer tree
+ https://bugs.webkit.org/show_bug.cgi?id=74203
+
+ Reviewed by James Robinson.
+
+ * WebKit.gypi:
+ * tests/CCLayerIteratorTest.cpp: Added.
+
+2012-01-09 W. James MacLean <wjmaclean@chromium.org>
+
+ [Chromium] REGRESSION(r104368): Broke CCLayerTreeHostImplTest.blendingOffWhenDrawingOpaqueLayers
+ https://bugs.webkit.org/show_bug.cgi?id=75783
+
+ Updated unit test to reflect desired behaviour now that tile/quad culling
+ is implemented.
+
+ Reviewed by James Robinson.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKit::TEST_F):
+
+2012-01-09 Chris Rogers <crogers@google.com>
+
+ Fix potential issue in WebMediaPlayerClientImpl
+ https://bugs.webkit.org/show_bug.cgi?id=75899
+
+ Reviewed by Kenneth Russell.
+
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::load):
+ (WebKit::WebMediaPlayerClientImpl::loadInternal):
+ (WebKit::WebMediaPlayerClientImpl::AudioSourceProviderImpl::wrap):
+
+2012-01-09 Justin Novosad <junov@chromium.org>
+
+ [Chromium] remove all references to the legacy accelerated 2d Canvas
+ implementation
+ https://bugs.webkit.org/show_bug.cgi?id=75108
+
+ Purging an old settings flag that is no longer referenced
+
+ Reviewed by Darin Fisher.
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ * src/WebSettingsImpl.h:
+
+2012-01-09 Joshua Bell <jsbell@chromium.org>
+
+ IndexedDB: Make WebIDBDatabase::close() idempotent
+ https://bugs.webkit.org/show_bug.cgi?id=75751
+
+ Allow Chromium's back-end to safely trigger the cleanup that occurs
+ when a database connection is closed, without tracking whether or not
+ the connection was previous closed by script.
+
+ Reviewed by Tony Chang.
+
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::close):
+
+2012-01-09 Xianzhu Wang <wangxianzhu@chromium.org>
+
+ Avoid unnecessary TextureManager::reduceMemoryToLimit().
+ https://bugs.webkit.org/show_bug.cgi?id=75632
+
+ Main part of the change is in Source/WebCore.
+
+ Reviewed by James Robinson.
+
+ Tests: webkit_unit_tests --gtest_filter=TextureManagerTest.*:CCLayerTreeHostTestSetViewportSize.*
+
+ * WebKit.gypi:
+ * src/WebLayerTreeView.cpp:
+ (WebKit::WebLayerTreeView::setViewportSize):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::updateLayerTreeViewport):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKit::TEST_F):
+ * tests/CCLayerTreeHostTest.cpp:
+ (WTF::MockLayerTreeHost::create):
+ (WTF::CCLayerTreeHostTestOpacityChange::beginTest):
+ (WTF::CCLayerTreeHostTestSetViewportSize::CCLayerTreeHostTestSetViewportSize):
+ (WTF::CCLayerTreeHostTestSetViewportSize::beginTest):
+ (WTF::CCLayerTreeHostTestSetViewportSize::afterTest):
+ (WTF::TEST_F):
+ * tests/TextureManagerTest.cpp: Added.
+ (WTF::FakeTextureAllocator::createTexture):
+ (WTF::FakeTextureAllocator::deleteTexture):
+ (WTF::texturesMemorySize):
+ (WTF::createTextureManager):
+ (WTF::requestTexture):
+ (WTF::TEST):
+
+2012-01-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r104418.
+ http://trac.webkit.org/changeset/104418
+ https://bugs.webkit.org/show_bug.cgi?id=75855
+
+ we still need to build against CG on Mac sometimes (Requested
+ by epoger on #webkit).
+
+ * WebKit.gyp:
+ * WebKit.gypi:
+
+2012-01-08 David Levin <levin@chromium.org>
+
+ [chromium] iframes in an autoresized window get sized incorrectly.
+ https://bugs.webkit.org/show_bug.cgi?id=75806
+
+ Reviewed by Adam Barth.
+
+ TEST: fast/autoresize/autoresize-with-iframe.html
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::createFrameView): Only do autoresizing
+ for the main frame not child frames.
+
+2012-01-08 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Remove use_skia option from GYP
+ https://bugs.webkit.org/show_bug.cgi?id=75811
+
+ Reviewed by Ryosuke Niwa.
+
+ The CG configuration of Chromium Mac is no longer supported.
+
+ * WebKit.gyp:
+ * WebKit.gypi:
+
+2012-01-07 Dmitry Lomov <dslomov@google.com>
+
+ Unreviewed: disabled CCLayerTreeHostImplTest.blendingOffWhenDrawingOpaqueLayers
+ and filed https://bugs.webkit.org/show_bug.cgi?id=75783.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+ (WebKit::TEST_F):
+
+2012-01-06 W. James MacLean <wjmaclean@chromium.org>
+
+ [Chromium] Cull occluded tiles in tiled layers
+ https://bugs.webkit.org/show_bug.cgi?id=70533
+
+ Reviewed by James Robinson.
+
+ * WebKit.gypi:
+ * tests/CCQuadCullerTest.cpp: Added.
+ (WebCore::TestDrawQuad::TestDrawQuad):
+ (WebCore::TestDrawQuad::create):
+ (WebCore::setQuads):
+ (WebCore::TEST):
+
+2012-01-06 Greg Billock <gbillock@google.com>
+
+ [Web Intents] Flagged-off WebCore implementation of navigator.startActivity
+ https://bugs.webkit.org/show_bug.cgi?id=73051
+
+ Reviewed by Adam Barth.
+
+ * features.gypi:
+
+2012-01-06 Tom Sepez <tsepez@chromium.org>
+
+ Pass Content-security-policy directive to worker threads.
+ https://bugs.webkit.org/show_bug.cgi?id=73242
+
+ Reviewed by David Levin.
+
+ * src/WebSharedWorkerImpl.cpp:
+ (WebKit::WebSharedWorkerImpl::startWorkerContext):
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::startWorkerContext):
+
2012-01-05 Jochen Eisinger <jochen@chromium.org>
Check whether a WebView exists before accessing it in StorageAreaProxy. This is not necessarily the case, e.g. for detached iframes.
diff --git a/Source/WebKit/chromium/DEPS b/Source/WebKit/chromium/DEPS
index 95b392b55..71471f7ad 100644
--- a/Source/WebKit/chromium/DEPS
+++ b/Source/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '116459'
+ 'chromium_rev': '117121'
}
deps = {
diff --git a/Source/WebKit/chromium/WebKit.gyp b/Source/WebKit/chromium/WebKit.gyp
index a241978d2..2e59f8c1f 100644
--- a/Source/WebKit/chromium/WebKit.gyp
+++ b/Source/WebKit/chromium/WebKit.gyp
@@ -216,6 +216,7 @@
'public/WebPerformance.h',
'public/WebPermissionClient.h',
'public/WebPlugin.h',
+ 'public/WebPluginAction.h',
'public/WebPluginContainer.h',
'public/WebPluginDocument.h',
'public/WebPluginListBuilder.h',
@@ -312,7 +313,6 @@
'public/platform/WebLocalizedString.h',
'public/platform/WebMediaStreamDescriptor.h',
'public/platform/WebMediaStreamSource.h',
- 'public/platform/WebMimeRegistry.h',
'public/platform/WebNonCopyable.h',
'public/platform/WebPeerConnectionHandler.h',
'public/platform/WebPeerConnectionHandlerClient.h',
diff --git a/Source/WebKit/chromium/WebKit.gypi b/Source/WebKit/chromium/WebKit.gypi
index 8e8d42e4f..ca8fb39d2 100644
--- a/Source/WebKit/chromium/WebKit.gypi
+++ b/Source/WebKit/chromium/WebKit.gypi
@@ -64,12 +64,14 @@
'tests/CCDelayBasedTimeSourceTest.cpp',
'tests/CCFrameRateControllerTest.cpp',
'tests/CCLayerImplTest.cpp',
+ 'tests/CCLayerIteratorTest.cpp',
'tests/CCLayerQuadTest.cpp',
'tests/CCLayerSorterTest.cpp',
'tests/CCLayerTreeHostCommonTest.cpp',
'tests/CCLayerTreeHostImplTest.cpp',
'tests/CCLayerTreeHostTest.cpp',
'tests/CCLayerTreeTestCommon.h',
+ 'tests/CCQuadCullerTest.cpp',
'tests/CCRenderSurfaceTest.cpp',
'tests/CCSchedulerStateMachineTest.cpp',
'tests/CCSchedulerTestCommon.h',
@@ -95,6 +97,7 @@
'tests/PODIntervalTreeTest.cpp',
'tests/PODRedBlackTreeTest.cpp',
'tests/RenderTableCellTest.cpp',
+ 'tests/TextureManagerTest.cpp',
'tests/TiledLayerChromiumTest.cpp',
'tests/TilingDataTest.cpp',
'tests/TreeSynchronizerTest.cpp',
diff --git a/Source/WebKit/chromium/features.gypi b/Source/WebKit/chromium/features.gypi
index e7d9febc4..9d2e06047 100644
--- a/Source/WebKit/chromium/features.gypi
+++ b/Source/WebKit/chromium/features.gypi
@@ -159,6 +159,11 @@
'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
],
}],
+ ['enable_web_intents==1', {
+ 'feature_defines': [
+ 'ENABLE_WEB_INTENTS=1',
+ ],
+ }],
['OS=="mac"', {
'feature_defines': [
'ENABLE_RUBBER_BANDING=1',
diff --git a/Source/WebKit/chromium/public/WebContextMenuData.h b/Source/WebKit/chromium/public/WebContextMenuData.h
index e17e23717..e72a434db 100644
--- a/Source/WebKit/chromium/public/WebContextMenuData.h
+++ b/Source/WebKit/chromium/public/WebContextMenuData.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 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
@@ -102,6 +102,7 @@ struct WebContextMenuData {
MediaHasVideo = 0x40,
MediaControlRootElement = 0x80,
MediaCanPrint = 0x100,
+ MediaCanRotate = 0x200,
};
// Extra attributes describing media elements.
diff --git a/Source/WebKit/chromium/public/WebPlugin.h b/Source/WebKit/chromium/public/WebPlugin.h
index f0eeade42..edfda32a4 100644
--- a/Source/WebKit/chromium/public/WebPlugin.h
+++ b/Source/WebKit/chromium/public/WebPlugin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 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
@@ -125,6 +125,16 @@ public:
// Tells the plugin that the user has stopped the find operation.
virtual void stopFind() { }
+ // View rotation types.
+ enum RotationType {
+ RotationType90Clockwise,
+ RotationType90Counterclockwise
+ };
+ // Whether the plugin can rotate the view of its content.
+ virtual bool canRotateView() { return false; }
+ // Rotates the plugin's view of its content.
+ virtual void rotateView(RotationType type) { }
+
protected:
~WebPlugin() { }
};
diff --git a/Source/WebKit/chromium/public/WebPluginAction.h b/Source/WebKit/chromium/public/WebPluginAction.h
new file mode 100644
index 000000000..89f12edcd
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPluginAction.h
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+#ifndef WebPluginAction_h
+#define WebPluginAction_h
+
+namespace WebKit {
+
+struct WebPluginAction {
+ enum Type {
+ Unknown,
+ Rotate90Clockwise,
+ Rotate90Counterclockwise
+ };
+
+ Type type;
+ bool enable;
+
+ WebPluginAction()
+ : type(Unknown), enable(false) { }
+ WebPluginAction(Type type, bool enable)
+ : type(type), enable(enable) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSettings.h b/Source/WebKit/chromium/public/WebSettings.h
index 0e9495cd7..cce47e2e2 100644
--- a/Source/WebKit/chromium/public/WebSettings.h
+++ b/Source/WebKit/chromium/public/WebSettings.h
@@ -115,7 +115,6 @@ public:
virtual void setAcceleratedCompositingForAnimationEnabled(bool) = 0;
virtual void setAccelerated2dCanvasEnabled(bool) = 0;
virtual void setAcceleratedCompositingForFixedPositionEnabled(bool) = 0;
- virtual void setLegacyAccelerated2dCanvasEnabled(bool) = 0;
virtual void setMinimumAccelerated2dCanvasSize(int) = 0;
virtual void setAcceleratedFiltersEnabled(bool) = 0;
virtual void setMemoryInfoEnabled(bool) = 0;
diff --git a/Source/WebKit/chromium/public/WebView.h b/Source/WebKit/chromium/public/WebView.h
index 1f8530ff8..c72b6133c 100644
--- a/Source/WebKit/chromium/public/WebView.h
+++ b/Source/WebKit/chromium/public/WebView.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 2010, 2011, 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
@@ -55,6 +55,7 @@ class WebSpellCheckClient;
class WebString;
class WebViewClient;
struct WebMediaPlayerAction;
+struct WebPluginAction;
struct WebPoint;
class WebView : public WebWidget {
@@ -273,10 +274,14 @@ public:
// Media ---------------------------------------------------------------
- // Performs the specified action on the node at the given location.
+ // Performs the specified media player action on the node at the given location.
virtual void performMediaPlayerAction(
const WebMediaPlayerAction&, const WebPoint& location) = 0;
+ // Performs the specified plugin action on the node at the given location.
+ virtual void performPluginAction(
+ const WebPluginAction&, const WebPoint& location) = 0;
+
// Data exchange -------------------------------------------------------
diff --git a/Source/WebKit/chromium/public/platform/WebMimeRegistry.h b/Source/WebKit/chromium/public/platform/WebMimeRegistry.h
deleted file mode 100644
index 4137b0756..000000000
--- a/Source/WebKit/chromium/public/platform/WebMimeRegistry.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.
- */
-
-// This is a temporary forwarding header to ease the Platform transition for downstream users of the WebKit API.
-// See https://bugs.webkit.org/show_bug.cgi?id=74583
-// FIXME: Remove as soon as downstream clients are updated.
-#include "../../../../Platform/chromium/public/WebMimeRegistry.h"
diff --git a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
index 830a23b23..cdceb0763 100644
--- a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009, 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
@@ -234,6 +234,10 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(r.innerNonSharedNode());
data.srcURL = pluginElement->document()->completeURL(pluginElement->url());
data.mediaFlags |= WebContextMenuData::MediaCanSave;
+
+ // Add context menu commands that are supported by the plugin.
+ if (plugin->plugin()->canRotateView())
+ data.mediaFlags |= WebContextMenuData::MediaCanRotate;
}
}
}
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 46f96b508..72e71b960 100644
--- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -68,7 +68,7 @@
#include "WebFrameImpl.h"
#include "WebKit.h"
#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebMimeRegistry.h"
+#include <public/WebMimeRegistry.h>
#include "WebNode.h"
#include "WebPermissionClient.h"
#include "WebPlugin.h"
diff --git a/Source/WebKit/chromium/src/NonCompositedContentHost.cpp b/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
index c3a5bb481..edf1da7a3 100644
--- a/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
+++ b/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
@@ -37,6 +37,7 @@ namespace WebKit {
NonCompositedContentHost::NonCompositedContentHost(PassOwnPtr<WebCore::LayerPainterChromium> contentPaint)
: m_contentPaint(contentPaint)
+ , m_showDebugBorders(false)
{
m_graphicsLayer = WebCore::GraphicsLayer::create(this);
#ifndef NDEBUG
@@ -143,9 +144,15 @@ void NonCompositedContentHost::paintContents(const WebCore::GraphicsLayer*, WebC
m_contentPaint->paint(context, adjustedClipRect);
}
+void NonCompositedContentHost::setShowDebugBorders(bool showDebugBorders)
+{
+ m_showDebugBorders = showDebugBorders;
+ m_graphicsLayer->updateDebugIndicators();
+}
+
bool NonCompositedContentHost::showDebugBorders() const
{
- return false;
+ return m_showDebugBorders;
}
bool NonCompositedContentHost::showRepaintCounter() const
diff --git a/Source/WebKit/chromium/src/NonCompositedContentHost.h b/Source/WebKit/chromium/src/NonCompositedContentHost.h
index dd6958108..2ae85b736 100644
--- a/Source/WebKit/chromium/src/NonCompositedContentHost.h
+++ b/Source/WebKit/chromium/src/NonCompositedContentHost.h
@@ -61,6 +61,8 @@ public:
void protectVisibleTileTextures();
WebCore::GraphicsLayer* topLevelRootLayer() const { return m_graphicsLayer.get(); }
+ void setShowDebugBorders(bool);
+
protected:
explicit NonCompositedContentHost(PassOwnPtr<WebCore::LayerPainterChromium> contentPaint);
@@ -78,6 +80,7 @@ private:
OwnPtr<WebCore::LayerPainterChromium> m_contentPaint;
WebCore::IntSize m_viewportSize;
int m_layerAdjustX;
+ bool m_showDebugBorders;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/PlatformSupport.cpp b/Source/WebKit/chromium/src/PlatformSupport.cpp
index 1d1e79778..24681ec96 100644
--- a/Source/WebKit/chromium/src/PlatformSupport.cpp
+++ b/Source/WebKit/chromium/src/PlatformSupport.cpp
@@ -57,11 +57,11 @@
#include "platform/WebDragData.h"
#include "platform/WebImage.h"
#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebMimeRegistry.h"
#include "platform/WebSerializedScriptValue.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
#include "platform/WebVector.h"
+#include <public/WebMimeRegistry.h>
#if USE(CG)
#include <CoreGraphics/CGContext.h>
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index e5ae9c518..2e8a328f8 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -2093,7 +2093,7 @@ void WebFrameImpl::createFrameView()
WebViewImpl* webView = viewImpl();
bool isMainFrame = webView->mainFrameImpl()->frame() == m_frame;
m_frame->createView(webView->size(), Color::white, webView->isTransparent(), webView->fixedLayoutSize(), isMainFrame ? webView->isFixedLayoutModeEnabled() : 0);
- if (webView->shouldAutoResize())
+ if (webView->shouldAutoResize() && isMainFrame)
m_frame->view()->enableAutoSizeMode(true, webView->minAutoSize(), webView->maxAutoSize());
#if ENABLE(GESTURE_RECOGNIZER)
diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index f40e020bb..447b993c6 100644
--- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -101,8 +101,10 @@ void WebIDBDatabaseImpl::close()
{
// Use the callbacks that ::open gave us so that the backend in
// multi-process chromium knows which database connection is closing.
- ASSERT(m_databaseCallbacks);
+ if (!m_databaseCallbacks)
+ return;
m_databaseBackend->close(m_databaseCallbacks);
+ m_databaseCallbacks = 0;
}
void WebIDBDatabaseImpl::open(WebIDBDatabaseCallbacks* callbacks)
diff --git a/Source/WebKit/chromium/src/WebLayerTreeView.cpp b/Source/WebKit/chromium/src/WebLayerTreeView.cpp
index 44ac90541..b288b563b 100644
--- a/Source/WebKit/chromium/src/WebLayerTreeView.cpp
+++ b/Source/WebKit/chromium/src/WebLayerTreeView.cpp
@@ -81,7 +81,7 @@ void WebLayerTreeView::composite()
void WebLayerTreeView::setViewportSize(const WebSize& viewportSize)
{
- m_private->setViewport(viewportSize);
+ m_private->setViewportSize(viewportSize);
}
WebSize WebLayerTreeView::viewportSize() const
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index dd2bc221e..891c31f3f 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -31,11 +31,11 @@
#include "platform/WebCString.h"
#include "platform/WebCanvas.h"
#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebMimeRegistry.h"
#include "platform/WebRect.h"
#include "platform/WebSize.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
+#include <public/WebMimeRegistry.h>
#if USE(ACCELERATED_COMPOSITING)
#include "RenderLayerCompositor.h"
@@ -237,6 +237,9 @@ void WebMediaPlayerClientImpl::load(const String& url)
m_url = url;
if (m_preload == MediaPlayer::None) {
+#if ENABLE(WEB_AUDIO)
+ m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
+#endif
m_webMediaPlayer.clear();
m_delayingLoad = true;
} else
@@ -245,6 +248,10 @@ void WebMediaPlayerClientImpl::load(const String& url)
void WebMediaPlayerClientImpl::loadInternal()
{
+#if ENABLE(WEB_AUDIO)
+ m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
+#endif
+
Frame* frame = static_cast<HTMLMediaElement*>(m_mediaPlayer->mediaPlayerClient())->document()->frame();
m_webMediaPlayer = createWebMediaPlayer(this, frame);
if (m_webMediaPlayer) {
@@ -688,8 +695,6 @@ WebMediaPlayerClientImpl::WebMediaPlayerClientImpl()
#if ENABLE(WEB_AUDIO)
void WebMediaPlayerClientImpl::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* provider)
{
- if (m_webAudioSourceProvider && m_webAudioSourceProvider != provider)
- m_webAudioSourceProvider->setClient(0);
m_webAudioSourceProvider = provider;
if (m_webAudioSourceProvider)
m_webAudioSourceProvider->setClient(m_client.get());
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
index d11f45220..7733e2699 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -368,11 +368,6 @@ void WebSettingsImpl::setAccelerated2dCanvasEnabled(bool enabled)
m_settings->setAccelerated2dCanvasEnabled(enabled);
}
-void WebSettingsImpl::setLegacyAccelerated2dCanvasEnabled(bool enabled)
-{
- m_settings->setLegacyAccelerated2dCanvasEnabled(enabled);
-}
-
void WebSettingsImpl::setAcceleratedCompositingForFixedPositionEnabled(bool enabled)
{
m_settings->setAcceleratedCompositingForFixedPositionEnabled(enabled);
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h
index 8fe9fe6ca..cc70d1316 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.h
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.h
@@ -107,7 +107,6 @@ public:
virtual void setAcceleratedCompositingForAnimationEnabled(bool);
virtual void setAccelerated2dCanvasEnabled(bool);
virtual void setAcceleratedCompositingForFixedPositionEnabled(bool);
- virtual void setLegacyAccelerated2dCanvasEnabled(bool);
virtual void setMinimumAccelerated2dCanvasSize(int);
virtual void setAcceleratedFiltersEnabled(bool);
virtual void setMemoryInfoEnabled(bool);
diff --git a/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp b/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp
index 231aaac2e..a2e16847d 100644
--- a/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSharedWorkerImpl.cpp
@@ -365,7 +365,8 @@ void WebSharedWorkerImpl::startWorkerContext(const WebURL& url, const WebString&
{
initializeLoader(url);
WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerContextOnStart : DontPauseWorkerContextOnStart;
- setWorkerThread(SharedWorkerThread::create(name, url, userAgent, sourceCode, *this, *this, startMode));
+ // FIXME: pass content-security-policy directives into shared worker.
+ setWorkerThread(SharedWorkerThread::create(name, url, userAgent, sourceCode, *this, *this, startMode, "", ContentSecurityPolicy::ReportOnly));
workerThread()->start();
}
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index b9355fc83..a14748353 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2011, 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
@@ -95,6 +95,7 @@
#include "ProgressTracker.h"
#include "RenderLayerCompositor.h"
#include "RenderView.h"
+#include "RenderWidget.h"
#include "ResourceHandle.h"
#include "SchemeRegistry.h"
#include "ScrollAnimator.h"
@@ -125,6 +126,7 @@
#include "WebMediaPlayerAction.h"
#include "WebNode.h"
#include "WebPlugin.h"
+#include "WebPluginAction.h"
#include "WebPluginContainerImpl.h"
#include "platform/WebPoint.h"
#include "WebPopupMenuImpl.h"
@@ -2183,7 +2185,7 @@ void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action,
HitTestResult result = hitTestResultForWindowPos(location);
RefPtr<Node> node = result.innerNonSharedNode();
if (!node->hasTagName(HTMLNames::videoTag) && !node->hasTagName(HTMLNames::audioTag))
- return;
+ return;
RefPtr<HTMLMediaElement> mediaElement =
static_pointer_cast<HTMLMediaElement>(node);
@@ -2208,6 +2210,33 @@ void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action,
}
}
+void WebViewImpl::performPluginAction(const WebPluginAction& action,
+ const WebPoint& location)
+{
+ HitTestResult result = hitTestResultForWindowPos(location);
+ RefPtr<Node> node = result.innerNonSharedNode();
+ if (!node->hasTagName(HTMLNames::objectTag) && !node->hasTagName(HTMLNames::embedTag))
+ return;
+
+ RenderObject* object = node->renderer();
+ if (object && object->isWidget()) {
+ Widget* widget = toRenderWidget(object)->widget();
+ if (widget && widget->isPluginContainer()) {
+ WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget);
+ switch (action.type) {
+ case WebPluginAction::Rotate90Clockwise:
+ plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise);
+ break;
+ case WebPluginAction::Rotate90Counterclockwise:
+ plugin->plugin()->rotateView(WebPlugin::RotationType90Counterclockwise);
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+ }
+ }
+}
+
void WebViewImpl::copyImageAt(const WebPoint& point)
{
if (!m_page)
@@ -2977,6 +3006,7 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
ccSettings.partialSwapEnabled = page()->settings()->partialSwapEnabled();
m_nonCompositedContentHost = NonCompositedContentHost::create(WebViewImplContentPainter::create(this));
+ m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->showDebugBorders());
m_layerTreeHost = CCLayerTreeHost::create(this, ccSettings);
if (m_layerTreeHost) {
m_layerTreeHost->setHaveWheelEventHandlers(m_haveWheelEventHandlers);
@@ -3089,7 +3119,7 @@ void WebViewImpl::updateLayerTreeViewport()
layerAdjustX = -view->contentsSize().width() + view->visibleContentRect(false).width();
}
m_nonCompositedContentHost->setViewport(visibleRect.size(), view->contentsSize(), scroll, pageScaleFactor(), layerAdjustX);
- m_layerTreeHost->setViewport(visibleRect.size());
+ m_layerTreeHost->setViewportSize(visibleRect.size());
m_layerTreeHost->setPageScale(pageScaleFactor());
}
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index e5b5a525f..6ea196a75 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -186,6 +186,9 @@ public:
virtual void performMediaPlayerAction(
const WebMediaPlayerAction& action,
const WebPoint& location);
+ virtual void performPluginAction(
+ const WebPluginAction&,
+ const WebPoint&);
virtual void copyImageAt(const WebPoint& point);
virtual void dragSourceEndedAt(
const WebPoint& clientPoint,
diff --git a/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp b/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp
index 5090affbc..d36e83a70 100644
--- a/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebWorkerClientImpl.cpp
@@ -86,7 +86,9 @@ WorkerContextProxy* WebWorkerClientImpl::createWorkerContextProxy(Worker* worker
void WebWorkerClientImpl::startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode)
{
- RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, sourceCode, *this, *this, startMode);
+ RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, sourceCode, *this, *this, startMode,
+ m_scriptExecutionContext->contentSecurityPolicy()->policy(),
+ m_scriptExecutionContext->contentSecurityPolicy()->headerType());
m_proxy->workerThreadCreated(thread);
thread->start();
}
diff --git a/Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp b/Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp
index 05a753bb9..41c9d119e 100644
--- a/Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp
+++ b/Source/WebKit/chromium/tests/CCDelayBasedTimeSourceTest.cpp
@@ -224,7 +224,7 @@ TEST(CCDelayBasedTimeSourceTest, AchievesTargetRateWithNoNoise)
EXPECT_NEAR(1000.0 / 60.0, averageInterval, 0.1);
}
-TEST(CCDelayBasedTimeSource, TestUnrefWhilePending)
+TEST(CCDelayBasedTimeSource, TestDeactivateWhilePending)
{
FakeCCThread thread;
FakeCCTimeSourceClient client;
@@ -233,7 +233,57 @@ TEST(CCDelayBasedTimeSource, TestUnrefWhilePending)
timer->setActive(true); // Should post a task.
timer->setActive(false);
timer.clear();
- thread.runPendingTask(); // Should run the posted task, and delete the timer object.
+ thread.runPendingTask(); // Should run the posted task without crashing.
+}
+
+TEST(CCDelayBasedTimeSource, TestDeactivateAndReactivateBeforeNextTickTime)
+{
+ FakeCCThread thread;
+ FakeCCTimeSourceClient client;
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ timer->setClient(&client);
+
+ // Should run the activate task, and pick up a new timebase.
+ timer->setActive(true);
+ timer->setMonotonicallyIncreasingTimeMs(0);
+ thread.runPendingTask();
+
+ // Stop the timer
+ timer->setActive(false);
+
+ // Task will be pending anyway, run it
+ thread.runPendingTask();
+
+ // Start the timer again, but before the next tick time the timer previously
+ // planned on using. That same tick time should still be targeted.
+ timer->setMonotonicallyIncreasingTimeMs(4);
+ timer->setActive(true);
+ EXPECT_EQ(12, thread.pendingDelay());
+}
+
+TEST(CCDelayBasedTimeSource, TestDeactivateAndReactivateAfterNextTickTime)
+{
+ FakeCCThread thread;
+ FakeCCTimeSourceClient client;
+ RefPtr<FakeCCDelayBasedTimeSource> timer = FakeCCDelayBasedTimeSource::create(1000.0 / 60.0, &thread);
+ timer->setClient(&client);
+
+ // Should run the activate task, and pick up a new timebase.
+ timer->setActive(true);
+ timer->setMonotonicallyIncreasingTimeMs(0);
+ thread.runPendingTask();
+
+ // Stop the timer
+ timer->setActive(false);
+
+ // Task will be pending anyway, run it
+ thread.runPendingTask();
+
+ // Start the timer again, but before the next tick time the timer previously
+ // planned on using. That same tick time should still be targeted.
+ timer->setMonotonicallyIncreasingTimeMs(20);
+ timer->setActive(true);
+ EXPECT_EQ(13, thread.pendingDelay());
}
}
diff --git a/Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp b/Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp
new file mode 100644
index 000000000..47a6fd4dc
--- /dev/null
+++ b/Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp
@@ -0,0 +1,275 @@
+/*
+ * 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"
+
+#include "cc/CCLayerIterator.h"
+
+#include "LayerChromium.h"
+#include "cc/CCLayerTreeHostCommon.h"
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+using namespace WebCore;
+using ::testing::Mock;
+using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::AnyNumber;
+
+namespace {
+
+class TestLayerChromium : public LayerChromium {
+public:
+ static PassRefPtr<TestLayerChromium> create() { return adoptRef(new TestLayerChromium()); }
+
+ int m_countRepresentingTargetSurface;
+ int m_countRepresentingContributingSurface;
+ int m_countRepresentingItself;
+
+ virtual bool drawsContent() const { return m_drawsContent; }
+ void setDrawsContent(bool drawsContent) { m_drawsContent = drawsContent; }
+
+private:
+ TestLayerChromium()
+ : LayerChromium(0)
+ , m_drawsContent(true)
+ {
+ setBounds(IntSize(100, 100));
+ setDrawableContentRect(IntRect(0, 0, 100, 100));
+ }
+
+ bool m_drawsContent;
+};
+
+#define EXPECT_COUNT(layer, target, contrib, itself) \
+ EXPECT_EQ(target, layer->m_countRepresentingTargetSurface); \
+ EXPECT_EQ(contrib, layer->m_countRepresentingContributingSurface); \
+ EXPECT_EQ(itself, layer->m_countRepresentingItself);
+
+typedef CCLayerIterator<LayerChromium, RenderSurfaceChromium, CCLayerIteratorActions::FrontToBack> FrontToBack;
+typedef CCLayerIterator<LayerChromium, RenderSurfaceChromium, CCLayerIteratorActions::BackToFront> BackToFront;
+
+void resetCounts(Vector<RefPtr<LayerChromium> >& renderSurfaceLayerList)
+{
+ for (unsigned surfaceIndex = 0; surfaceIndex < renderSurfaceLayerList.size(); ++surfaceIndex) {
+ TestLayerChromium* renderSurfaceLayer = static_cast<TestLayerChromium*>(renderSurfaceLayerList[surfaceIndex].get());
+ RenderSurfaceChromium* renderSurface = renderSurfaceLayer->renderSurface();
+
+ renderSurfaceLayer->m_countRepresentingTargetSurface = -1;
+ renderSurfaceLayer->m_countRepresentingContributingSurface = -1;
+ renderSurfaceLayer->m_countRepresentingItself = -1;
+
+ for (unsigned layerIndex = 0; layerIndex < renderSurface->layerList().size(); ++layerIndex) {
+ TestLayerChromium* layer = static_cast<TestLayerChromium*>(renderSurface->layerList()[layerIndex].get());
+
+ layer->m_countRepresentingTargetSurface = -1;
+ layer->m_countRepresentingContributingSurface = -1;
+ layer->m_countRepresentingItself = -1;
+ }
+ }
+}
+
+void iterateFrontToBack(Vector<RefPtr<LayerChromium> >* renderSurfaceLayerList)
+{
+ resetCounts(*renderSurfaceLayerList);
+ int count = 0;
+ for (FrontToBack it = FrontToBack::begin(renderSurfaceLayerList); it != FrontToBack::end(renderSurfaceLayerList); ++it, ++count) {
+ TestLayerChromium* layer = static_cast<TestLayerChromium*>(*it);
+ if (it.representsTargetRenderSurface())
+ layer->m_countRepresentingTargetSurface = count;
+ if (it.representsContributingRenderSurface())
+ layer->m_countRepresentingContributingSurface = count;
+ if (it.representsItself())
+ layer->m_countRepresentingItself = count;
+ }
+}
+
+void iterateBackToFront(Vector<RefPtr<LayerChromium> >* renderSurfaceLayerList)
+{
+ resetCounts(*renderSurfaceLayerList);
+ int count = 0;
+ for (BackToFront it = BackToFront::begin(renderSurfaceLayerList); it != BackToFront::end(renderSurfaceLayerList); ++it, ++count) {
+ TestLayerChromium* layer = static_cast<TestLayerChromium*>(*it);
+ if (it.representsTargetRenderSurface())
+ layer->m_countRepresentingTargetSurface = count;
+ if (it.representsContributingRenderSurface())
+ layer->m_countRepresentingContributingSurface = count;
+ if (it.representsItself())
+ layer->m_countRepresentingItself = count;
+ }
+}
+
+TEST(CCLayerIteratorTest, simpleTree)
+{
+ RefPtr<TestLayerChromium> rootLayer = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> first = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> second = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> third = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> fourth = TestLayerChromium::create();
+
+ rootLayer->createRenderSurface();
+
+ rootLayer->addChild(first);
+ rootLayer->addChild(second);
+ rootLayer->addChild(third);
+ rootLayer->addChild(fourth);
+
+ Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
+ Vector<RefPtr<LayerChromium> > layerList;
+ renderSurfaceLayerList.append(rootLayer);
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(rootLayer.get(), rootLayer.get(),
+ TransformationMatrix(), TransformationMatrix(),
+ renderSurfaceLayerList, layerList,
+ 256);
+
+ iterateBackToFront(&renderSurfaceLayerList);
+ EXPECT_COUNT(rootLayer, 0, -1, 1);
+ EXPECT_COUNT(first, -1, -1, 2);
+ EXPECT_COUNT(second, -1, -1, 3);
+ EXPECT_COUNT(third, -1, -1, 4);
+ EXPECT_COUNT(fourth, -1, -1, 5);
+
+ iterateFrontToBack(&renderSurfaceLayerList);
+ EXPECT_COUNT(rootLayer, 5, -1, 4);
+ EXPECT_COUNT(first, -1, -1, 3);
+ EXPECT_COUNT(second, -1, -1, 2);
+ EXPECT_COUNT(third, -1, -1, 1);
+ EXPECT_COUNT(fourth, -1, -1, 0);
+
+}
+
+TEST(CCLayerIteratorTest, complexTree)
+{
+ RefPtr<TestLayerChromium> rootLayer = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root1 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root2 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root3 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root21 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root22 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root23 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root221 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root231 = TestLayerChromium::create();
+
+ rootLayer->createRenderSurface();
+
+ rootLayer->addChild(root1);
+ rootLayer->addChild(root2);
+ rootLayer->addChild(root3);
+ root2->addChild(root21);
+ root2->addChild(root22);
+ root2->addChild(root23);
+ root22->addChild(root221);
+ root23->addChild(root231);
+
+ Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
+ Vector<RefPtr<LayerChromium> > layerList;
+ renderSurfaceLayerList.append(rootLayer);
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(rootLayer.get(), rootLayer.get(),
+ TransformationMatrix(), TransformationMatrix(),
+ renderSurfaceLayerList, layerList,
+ 256);
+
+ iterateBackToFront(&renderSurfaceLayerList);
+ EXPECT_COUNT(rootLayer, 0, -1, 1);
+ EXPECT_COUNT(root1, -1, -1, 2);
+ EXPECT_COUNT(root2, -1, -1, 3);
+ EXPECT_COUNT(root21, -1, -1, 4);
+ EXPECT_COUNT(root22, -1, -1, 5);
+ EXPECT_COUNT(root221, -1, -1, 6);
+ EXPECT_COUNT(root23, -1, -1, 7);
+ EXPECT_COUNT(root231, -1, -1, 8);
+ EXPECT_COUNT(root3, -1, -1, 9);
+
+ iterateFrontToBack(&renderSurfaceLayerList);
+ EXPECT_COUNT(rootLayer, 9, -1, 8);
+ EXPECT_COUNT(root1, -1, -1, 7);
+ EXPECT_COUNT(root2, -1, -1, 6);
+ EXPECT_COUNT(root21, -1, -1, 5);
+ EXPECT_COUNT(root22, -1, -1, 4);
+ EXPECT_COUNT(root221, -1, -1, 3);
+ EXPECT_COUNT(root23, -1, -1, 2);
+ EXPECT_COUNT(root231, -1, -1, 1);
+ EXPECT_COUNT(root3, -1, -1, 0);
+
+}
+
+TEST(CCLayerIteratorTest, complexTreeMultiSurface)
+{
+ RefPtr<TestLayerChromium> rootLayer = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root1 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root2 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root3 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root21 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root22 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root23 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root221 = TestLayerChromium::create();
+ RefPtr<TestLayerChromium> root231 = TestLayerChromium::create();
+
+ rootLayer->createRenderSurface();
+
+ rootLayer->addChild(root1);
+ rootLayer->addChild(root2);
+ rootLayer->addChild(root3);
+ root2->setDrawsContent(false);
+ root2->setOpacity(0.5); // Force the layer to own a new surface.
+ root2->addChild(root21);
+ root2->addChild(root22);
+ root2->addChild(root23);
+ root22->setOpacity(0.5);
+ root22->addChild(root221);
+ root23->setOpacity(0.5);
+ root23->addChild(root231);
+
+ Vector<RefPtr<LayerChromium> > renderSurfaceLayerList;
+ Vector<RefPtr<LayerChromium> > layerList;
+ renderSurfaceLayerList.append(rootLayer);
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(rootLayer.get(), rootLayer.get(),
+ TransformationMatrix(), TransformationMatrix(),
+ renderSurfaceLayerList, layerList,
+ 256);
+
+ iterateBackToFront(&renderSurfaceLayerList);
+ EXPECT_COUNT(rootLayer, 0, -1, 1);
+ EXPECT_COUNT(root1, -1, -1, 2);
+ EXPECT_COUNT(root2, 4, 3, -1);
+ EXPECT_COUNT(root21, -1, -1, 5);
+ EXPECT_COUNT(root22, 7, 6, 8);
+ EXPECT_COUNT(root221, -1, -1, 9);
+ EXPECT_COUNT(root23, 11, 10, 12);
+ EXPECT_COUNT(root231, -1, -1, 13);
+ EXPECT_COUNT(root3, -1, -1, 14);
+
+ iterateFrontToBack(&renderSurfaceLayerList);
+ EXPECT_COUNT(rootLayer, 14, -1, 13);
+ EXPECT_COUNT(root1, -1, -1, 12);
+ EXPECT_COUNT(root2, 10, 11, -1);
+ EXPECT_COUNT(root21, -1, -1, 9);
+ EXPECT_COUNT(root22, 7, 8, 6);
+ EXPECT_COUNT(root221, -1, -1, 5);
+ EXPECT_COUNT(root23, 3, 4, 2);
+ EXPECT_COUNT(root231, -1, -1, 1);
+ EXPECT_COUNT(root3, -1, -1, 0);
+}
+
+} // namespace
diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
index e98f44da2..9b87d00fa 100644
--- a/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
@@ -217,12 +217,13 @@ private:
bool m_drawn;
};
+// https://bugs.webkit.org/show_bug.cgi?id=75783
TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers)
{
GraphicsContext3D::Attributes attrs;
RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new BlendStateTrackerContext()), attrs, 0, GraphicsContext3D::RenderDirectlyToHostWindow, GraphicsContext3DPrivate::ForUseOnThisThread);
m_hostImpl->initializeLayerRenderer(context);
- m_hostImpl->setViewport(IntSize(10, 10));
+ m_hostImpl->setViewportSize(IntSize(10, 10));
RefPtr<CCLayerImpl> root = CCLayerImpl::create(0);
root->setAnchorPoint(FloatPoint(0, 0));
@@ -263,7 +264,7 @@ TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers)
layer2->setOpacity(1);
layer2->setExpectation(false, false);
m_hostImpl->drawLayers();
- EXPECT_TRUE(layer1->drawn());
+ EXPECT_FALSE(layer1->drawn());
EXPECT_TRUE(layer2->drawn());
// Parent layer with translucent content, drawn with blending.
@@ -272,7 +273,7 @@ TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers)
layer1->setExpectation(true, false);
layer2->setExpectation(false, false);
m_hostImpl->drawLayers();
- EXPECT_TRUE(layer1->drawn());
+ EXPECT_FALSE(layer1->drawn());
EXPECT_TRUE(layer2->drawn());
// Parent layer with translucent opacity and opaque content. Since it has a
@@ -285,6 +286,29 @@ TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers)
layer1->setExpectation(false, true);
layer2->setExpectation(false, false);
m_hostImpl->drawLayers();
+ EXPECT_FALSE(layer1->drawn());
+ EXPECT_TRUE(layer2->drawn());
+
+ // Draw again, but with child non-opaque, to make sure
+ // layer1 not culled.
+ layer1->setOpaque(true);
+ layer1->setOpacity(1);
+ layer1->setExpectation(false, false);
+ layer2->setOpaque(true);
+ layer2->setOpacity(0.5);
+ layer2->setExpectation(true, false);
+ m_hostImpl->drawLayers();
+ EXPECT_TRUE(layer1->drawn());
+ EXPECT_TRUE(layer2->drawn());
+
+ // A second way of making the child non-opaque.
+ layer1->setOpaque(true);
+ layer1->setOpacity(1);
+ layer1->setExpectation(false, false);
+ layer2->setOpaque(false);
+ layer2->setOpacity(1);
+ layer2->setExpectation(true, false);
+ m_hostImpl->drawLayers();
EXPECT_TRUE(layer1->drawn());
EXPECT_TRUE(layer2->drawn());
}
@@ -321,7 +345,7 @@ TEST_F(CCLayerTreeHostImplTest, reshapeNotCalledUntilDraw)
ReshapeTrackerContext* reshapeTracker = new ReshapeTrackerContext();
RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(reshapeTracker), attrs, 0, GraphicsContext3D::RenderDirectlyToHostWindow, GraphicsContext3DPrivate::ForUseOnThisThread);
m_hostImpl->initializeLayerRenderer(context);
- m_hostImpl->setViewport(IntSize(10, 10));
+ m_hostImpl->setViewportSize(IntSize(10, 10));
RefPtr<CCLayerImpl> root = adoptRef(new FakeDrawableCCLayerImpl(1));
root->setAnchorPoint(FloatPoint(0, 0));
@@ -371,7 +395,7 @@ TEST_F(CCLayerTreeHostImplTest, partialSwapReceivesDamageRect)
settings.partialSwapEnabled = true;
OwnPtr<CCLayerTreeHostImpl> layerTreeHostImpl = CCLayerTreeHostImpl::create(settings, this);
layerTreeHostImpl->initializeLayerRenderer(context);
- layerTreeHostImpl->setViewport(IntSize(500, 500));
+ layerTreeHostImpl->setViewportSize(IntSize(500, 500));
RefPtr<CCLayerImpl> root = adoptRef(new FakeDrawableCCLayerImpl(1));
RefPtr<CCLayerImpl> child = adoptRef(new FakeDrawableCCLayerImpl(2));
@@ -412,7 +436,7 @@ TEST_F(CCLayerTreeHostImplTest, partialSwapReceivesDamageRect)
// Make sure that partial swap is constrained to the viewport dimensions
// expected damage rect: IntRect(IntPoint::zero(), IntSize(500, 500));
// expected swap rect: flipped damage rect, but also clamped to viewport
- layerTreeHostImpl->setViewport(IntSize(10, 10));
+ layerTreeHostImpl->setViewportSize(IntSize(10, 10));
root->setOpacity(0.7); // this will damage everything
layerTreeHostImpl->drawLayers();
layerTreeHostImpl->swapBuffers();
diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
index e6ce8b066..bfa1b0822 100644
--- a/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
@@ -110,7 +110,7 @@ public:
layerTreeHost->setRootLayer(rootLayer);
// LayerTreeHostImpl won't draw if it has 1x1 viewport.
- layerTreeHost->setViewport(IntSize(1, 1));
+ layerTreeHost->setViewportSize(IntSize(1, 1));
return layerTreeHost.release();
}
@@ -988,7 +988,7 @@ public:
virtual void beginTest()
{
m_layerTreeHost->setRootLayer(m_updateCheckLayer);
- m_layerTreeHost->setViewport(IntSize(10, 10));
+ m_layerTreeHost->setViewportSize(IntSize(10, 10));
postSetNeedsCommitToMainThread();
}
@@ -1025,4 +1025,47 @@ TEST_F(CCLayerTreeHostTestOpacityChange, runMultiThread)
runTest(true);
}
+class CCLayerTreeHostTestSetViewportSize : public CCLayerTreeHostTest {
+public:
+
+ CCLayerTreeHostTestSetViewportSize()
+ : m_numCommits(0)
+ , m_numDraws(0)
+ {
+ }
+
+ virtual void beginTest()
+ {
+ IntSize viewportSize(10, 10);
+ layerTreeHost()->setViewportSize(viewportSize);
+ EXPECT_EQ(viewportSize, layerTreeHost()->viewportSize());
+ EXPECT_EQ(TextureManager::highLimitBytes(viewportSize), layerTreeHost()->contentsTextureManager()->maxMemoryLimitBytes());
+ EXPECT_EQ(TextureManager::reclaimLimitBytes(viewportSize), layerTreeHost()->contentsTextureManager()->preferredMemoryLimitBytes());
+
+ // setViewportSize() should not call TextureManager::setMaxMemoryLimitBytes() or TextureManager::setPreferredMemoryLimitBytes()
+ // if the viewport size is not changed.
+ IntSize fakeSize(5, 5);
+ layerTreeHost()->contentsTextureManager()->setMaxMemoryLimitBytes(TextureManager::highLimitBytes(fakeSize));
+ layerTreeHost()->contentsTextureManager()->setPreferredMemoryLimitBytes(TextureManager::reclaimLimitBytes(fakeSize));
+ layerTreeHost()->setViewportSize(viewportSize);
+ EXPECT_EQ(TextureManager::highLimitBytes(fakeSize), layerTreeHost()->contentsTextureManager()->maxMemoryLimitBytes());
+ EXPECT_EQ(TextureManager::reclaimLimitBytes(fakeSize), layerTreeHost()->contentsTextureManager()->preferredMemoryLimitBytes());
+
+ endTest();
+ }
+
+ virtual void afterTest()
+ {
+ }
+
+private:
+ int m_numCommits;
+ int m_numDraws;
+};
+
+TEST_F(CCLayerTreeHostTestSetViewportSize, runSingleThread)
+{
+ runTest(false);
+}
+
} // namespace
diff --git a/Source/WebKit/chromium/tests/CCQuadCullerTest.cpp b/Source/WebKit/chromium/tests/CCQuadCullerTest.cpp
new file mode 100644
index 000000000..ed15e6c10
--- /dev/null
+++ b/Source/WebKit/chromium/tests/CCQuadCullerTest.cpp
@@ -0,0 +1,187 @@
+/*
+ * 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"
+
+#include "cc/CCQuadCuller.h"
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+using namespace WebCore;
+
+namespace {
+
+class CCQuadCullerTest : public testing::Test {
+};
+
+class TestDrawQuad : public CCDrawQuad {
+public:
+ TestDrawQuad(const CCSharedQuadState* state, Material m, const IntRect& rect)
+ : CCDrawQuad(state, m, rect)
+ {
+ }
+
+ static PassOwnPtr<TestDrawQuad> create(const CCSharedQuadState* state, Material m, const IntRect& rect)
+ {
+ return adoptPtr(new TestDrawQuad(state, m, rect));
+ }
+};
+
+void setQuads(CCSharedQuadState* rootState, CCSharedQuadState* childState, CCQuadList& quadList)
+{
+ quadList.clear();
+
+ quadList.append(TestDrawQuad::create(rootState, CCDrawQuad::TiledContent, IntRect(IntPoint(), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(rootState, CCDrawQuad::TiledContent, IntRect(IntPoint(100, 0), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(rootState, CCDrawQuad::TiledContent, IntRect(IntPoint(200, 0), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(rootState, CCDrawQuad::TiledContent, IntRect(IntPoint(0, 100), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(rootState, CCDrawQuad::TiledContent, IntRect(IntPoint(100, 100), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(rootState, CCDrawQuad::TiledContent, IntRect(IntPoint(200, 100), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(rootState, CCDrawQuad::TiledContent, IntRect(IntPoint(0, 200), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(rootState, CCDrawQuad::TiledContent, IntRect(IntPoint(100, 200), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(rootState, CCDrawQuad::TiledContent, IntRect(IntPoint(200, 200), IntSize(100, 100))));
+
+ quadList.append(TestDrawQuad::create(childState, CCDrawQuad::TiledContent, IntRect(IntPoint(), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(childState, CCDrawQuad::TiledContent, IntRect(IntPoint(100, 0), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(childState, CCDrawQuad::TiledContent, IntRect(IntPoint(0, 100), IntSize(100, 100))));
+ quadList.append(TestDrawQuad::create(childState, CCDrawQuad::TiledContent, IntRect(IntPoint(100, 100), IntSize(100, 100))));
+}
+
+#define DECLARE_AND_INITIALIZE_TEST_QUADS \
+ CCQuadList quadList; \
+ TransformationMatrix childTransform; \
+ IntSize rootSize = IntSize(300, 300); \
+ IntRect rootRect = IntRect(IntPoint(), rootSize); \
+ IntSize childSize = IntSize(200, 200); \
+ IntRect childRect = IntRect(IntPoint(), childSize);
+
+TEST(CCQuadCullerTest, verifyCullChildLinesUpTopLeft)
+{
+ DECLARE_AND_INITIALIZE_TEST_QUADS
+
+ OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
+ OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+
+ setQuads(rootState.get(), childState.get(), quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+ CCQuadCuller::cullOccludedQuads(quadList);
+ EXPECT_EQ(quadList.size(), 9u);
+}
+
+TEST(CCQuadCullerTest, verifyCullWhenChildOpacityNotOne)
+{
+ DECLARE_AND_INITIALIZE_TEST_QUADS
+
+ OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
+ OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 0.9, true);
+
+ setQuads(rootState.get(), childState.get(), quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+ CCQuadCuller::cullOccludedQuads(quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+}
+
+TEST(CCQuadCullerTest, verifyCullWhenChildOpaqueFlagFalse)
+{
+ DECLARE_AND_INITIALIZE_TEST_QUADS
+
+ OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
+ OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, false);
+
+ setQuads(rootState.get(), childState.get(), quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+ CCQuadCuller::cullOccludedQuads(quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+}
+
+TEST(CCQuadCullerTest, verifyCullCenterTileOnly)
+{
+ DECLARE_AND_INITIALIZE_TEST_QUADS
+
+ childTransform.translate(50, 50);
+
+ OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
+ OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+
+ setQuads(rootState.get(), childState.get(), quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+ CCQuadCuller::cullOccludedQuads(quadList);
+ EXPECT_EQ(quadList.size(), 12u);
+}
+
+TEST(CCQuadCullerTest, verifyCullChildLinesUpBottomRight)
+{
+ DECLARE_AND_INITIALIZE_TEST_QUADS
+
+ childTransform.translate(100, 100);
+
+ OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
+ OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+
+ setQuads(rootState.get(), childState.get(), quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+ CCQuadCuller::cullOccludedQuads(quadList);
+ EXPECT_EQ(quadList.size(), 9u);
+}
+
+TEST(CCQuadCullerTest, verifyNonAxisAlignedQuadsDontOcclude)
+{
+ DECLARE_AND_INITIALIZE_TEST_QUADS
+
+ // Use a small rotation so as to not disturb the geometry significantly.
+ childTransform.rotate(1);
+
+ OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), rootRect, IntRect(), 1.0, true);
+ OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(childTransform, TransformationMatrix(), childRect, IntRect(), 1.0, true);
+
+ setQuads(rootState.get(), childState.get(), quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+ CCQuadCuller::cullOccludedQuads(quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+}
+
+// This test requires some explanation: here we are rotating the quads to be culled.
+// The 2x2 tile child layer remains in the top-left corner, unrotated, but the 3x3
+// tile parent layer is rotated by 1 degree. Of the four tiles the child would
+// normally occlude, three will move (slightly) out from under the child layer, and
+// one moves further under the child. Only this last tile should be culled.
+TEST(CCQuadCullerTest, verifyNonAxisAlignedQuadsSafelyCulled)
+{
+ DECLARE_AND_INITIALIZE_TEST_QUADS
+
+ // Use a small rotation so as to not disturb the geometry significantly.
+ TransformationMatrix parentTransform;
+ parentTransform.rotate(1);
+
+ OwnPtr<CCSharedQuadState> rootState = CCSharedQuadState::create(parentTransform, TransformationMatrix(), rootRect, IntRect(), 1.0, true);
+ OwnPtr<CCSharedQuadState> childState = CCSharedQuadState::create(TransformationMatrix(), TransformationMatrix(), childRect, IntRect(), 1.0, true);
+
+ setQuads(rootState.get(), childState.get(), quadList);
+ EXPECT_EQ(quadList.size(), 13u);
+ CCQuadCuller::cullOccludedQuads(quadList);
+ EXPECT_EQ(quadList.size(), 12u);
+}
+
+} // namespace
diff --git a/Source/WebKit/chromium/tests/TextureManagerTest.cpp b/Source/WebKit/chromium/tests/TextureManagerTest.cpp
new file mode 100644
index 000000000..7c088dabc
--- /dev/null
+++ b/Source/WebKit/chromium/tests/TextureManagerTest.cpp
@@ -0,0 +1,231 @@
+/*
+ * 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"
+
+#include "TextureManager.h"
+
+#include <gtest/gtest.h>
+
+using namespace WebCore;
+using namespace WTF;
+
+namespace {
+
+class FakeTextureAllocator : public TextureAllocator {
+public:
+ virtual unsigned createTexture(const IntSize&, GC3Denum) { return 1; }
+ virtual void deleteTexture(unsigned, const IntSize&, GC3Denum) { }
+};
+
+FakeTextureAllocator fakeTextureAllocator;
+const IntSize textureSize(256, 256);
+const GC3Denum textureFormat = GraphicsContext3D::RGBA;
+
+size_t texturesMemorySize(size_t textureCount)
+{
+ return TextureManager::memoryUseBytes(textureSize, textureFormat) * textureCount;
+}
+
+PassOwnPtr<TextureManager> createTextureManager(size_t maxTextures, size_t preferredTextures)
+{
+ return TextureManager::create(texturesMemorySize(maxTextures), texturesMemorySize(preferredTextures), 1024);
+}
+
+bool requestTexture(TextureManager* manager, TextureToken token)
+{
+ unsigned textureId;
+ bool result = manager->requestTexture(token, textureSize, textureFormat, textureId);
+ if (result)
+ manager->allocateTexture(&fakeTextureAllocator, token);
+ return result;
+}
+
+TEST(TextureManagerTest, requestTextureInPreferredLimit)
+{
+ const size_t preferredTextures = 8;
+ OwnPtr<TextureManager> textureManager = createTextureManager(preferredTextures * 2, preferredTextures);
+ TextureToken tokens[preferredTextures];
+ for (size_t i = 0; i < preferredTextures; ++i) {
+ tokens[i] = textureManager->getToken();
+ if (i)
+ EXPECT_GT(tokens[i], tokens[i - 1]);
+ EXPECT_TRUE(requestTexture(textureManager.get(), tokens[i]));
+ EXPECT_TRUE(textureManager->hasTexture(tokens[i]));
+ EXPECT_TRUE(textureManager->isProtected(tokens[i]));
+ }
+
+ for (size_t i = 0; i < preferredTextures; ++i)
+ EXPECT_TRUE(textureManager->hasTexture(tokens[i]));
+
+ EXPECT_EQ(texturesMemorySize(preferredTextures), textureManager->currentMemoryUseBytes());
+}
+
+TEST(TextureManagerTest, requestTextureExceedingPreferredLimit)
+{
+ const size_t maxTextures = 8;
+ const size_t preferredTextures = 4;
+ OwnPtr<TextureManager> textureManager = createTextureManager(maxTextures, preferredTextures);
+ TextureToken tokens[maxTextures];
+ for (size_t i = 0; i < preferredTextures; ++i) {
+ tokens[i] = textureManager->getToken();
+ EXPECT_TRUE(requestTexture(textureManager.get(), tokens[i]));
+ EXPECT_TRUE(textureManager->hasTexture(tokens[i]));
+ }
+
+ textureManager->unprotectTexture(tokens[0]);
+ textureManager->unprotectTexture(tokens[2]);
+
+ for (size_t i = preferredTextures; i < maxTextures; ++i) {
+ tokens[i] = textureManager->getToken();
+ EXPECT_TRUE(requestTexture(textureManager.get(), tokens[i]));
+ EXPECT_TRUE(textureManager->hasTexture(tokens[i]));
+ textureManager->unprotectTexture(tokens[i]);
+ }
+
+ EXPECT_FALSE(textureManager->hasTexture(tokens[0]));
+ EXPECT_TRUE(textureManager->hasTexture(tokens[1]));
+ EXPECT_TRUE(textureManager->isProtected(tokens[1]));
+ EXPECT_FALSE(textureManager->hasTexture(tokens[2]));
+ EXPECT_TRUE(textureManager->hasTexture(tokens[3]));
+ EXPECT_TRUE(textureManager->isProtected(tokens[3]));
+
+ EXPECT_EQ(texturesMemorySize(preferredTextures), textureManager->currentMemoryUseBytes());
+}
+
+TEST(TextureManagerTest, requestTextureExceedingMaxLimit)
+{
+ const size_t maxTextures = 8;
+ const size_t preferredTextures = 4;
+ OwnPtr<TextureManager> textureManager = createTextureManager(maxTextures, preferredTextures);
+ TextureToken tokens[maxTextures];
+ for (size_t i = 0; i < maxTextures; ++i) {
+ tokens[i] = textureManager->getToken();
+ EXPECT_TRUE(requestTexture(textureManager.get(), tokens[i]));
+ EXPECT_TRUE(textureManager->hasTexture(tokens[i]));
+ }
+
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+
+ for (size_t i = 0; i < maxTextures; ++i) {
+ TextureToken token = textureManager->getToken();
+ EXPECT_FALSE(requestTexture(textureManager.get(), token));
+ EXPECT_FALSE(textureManager->hasTexture(token));
+ }
+
+ EXPECT_EQ(textureManager->currentMemoryUseBytes(), texturesMemorySize(maxTextures));
+
+ textureManager->unprotectTexture(tokens[1]);
+ textureManager->unprotectTexture(tokens[3]);
+ EXPECT_TRUE(requestTexture(textureManager.get(), textureManager->getToken()));
+ EXPECT_TRUE(requestTexture(textureManager.get(), textureManager->getToken()));
+ EXPECT_FALSE(requestTexture(textureManager.get(), textureManager->getToken()));
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+ EXPECT_FALSE(textureManager->hasTexture(tokens[1]));
+ EXPECT_FALSE(textureManager->hasTexture(tokens[3]));
+}
+
+TEST(TextureManagerTest, reduceMemoryToLimit)
+{
+ const size_t maxTextures = 8;
+ const size_t preferredTextures = 4;
+ OwnPtr<TextureManager> textureManager = createTextureManager(maxTextures, preferredTextures);
+ TextureToken tokens[maxTextures];
+ for (size_t i = 0; i < maxTextures; ++i) {
+ tokens[i] = textureManager->getToken();
+ EXPECT_TRUE(requestTexture(textureManager.get(), tokens[i]));
+ }
+
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+ textureManager->reduceMemoryToLimit(texturesMemorySize(maxTextures));
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+ textureManager->reduceMemoryToLimit(texturesMemorySize(preferredTextures));
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+
+ const size_t unprotectedTextures = preferredTextures + 1;
+ for (size_t i = 0; i < preferredTextures + 1; ++i)
+ textureManager->unprotectTexture(tokens[i]);
+
+ textureManager->reduceMemoryToLimit(texturesMemorySize(maxTextures));
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+ textureManager->reduceMemoryToLimit(texturesMemorySize(preferredTextures));
+ EXPECT_EQ(texturesMemorySize(preferredTextures), textureManager->currentMemoryUseBytes());
+ textureManager->reduceMemoryToLimit(texturesMemorySize(1));
+ EXPECT_EQ(texturesMemorySize(maxTextures - unprotectedTextures), textureManager->currentMemoryUseBytes());
+
+ // reduceMemoryToLimit doesn't change the current memory limits.
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->maxMemoryLimitBytes());
+ EXPECT_EQ(texturesMemorySize(preferredTextures), textureManager->preferredMemoryLimitBytes());
+}
+
+TEST(TextureManagerTest, setMaxMemoryLimitBytes)
+{
+ const size_t maxTextures = 8;
+ const size_t preferredTextures = 4;
+ OwnPtr<TextureManager> textureManager = createTextureManager(maxTextures, preferredTextures);
+ TextureToken tokens[maxTextures];
+ for (size_t i = 0; i < maxTextures; ++i) {
+ tokens[i] = textureManager->getToken();
+ EXPECT_TRUE(requestTexture(textureManager.get(), tokens[i]));
+ }
+
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+
+ const size_t unprotectedTextures = preferredTextures + 1;
+ for (size_t i = 0; i < unprotectedTextures; ++i)
+ textureManager->unprotectTexture(tokens[i]);
+
+ textureManager->setMaxMemoryLimitBytes(texturesMemorySize(maxTextures));
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+ textureManager->setMaxMemoryLimitBytes(texturesMemorySize(preferredTextures));
+ EXPECT_EQ(texturesMemorySize(preferredTextures), textureManager->currentMemoryUseBytes());
+ EXPECT_EQ(texturesMemorySize(preferredTextures), textureManager->maxMemoryLimitBytes());
+}
+
+TEST(TextureManagerTest, setPreferredMemoryLimitBytes)
+{
+ const size_t maxTextures = 8;
+ const size_t preferredTextures = 4;
+ OwnPtr<TextureManager> textureManager = createTextureManager(maxTextures, preferredTextures);
+ TextureToken tokens[maxTextures];
+ for (size_t i = 0; i < maxTextures; ++i) {
+ tokens[i] = textureManager->getToken();
+ EXPECT_TRUE(requestTexture(textureManager.get(), tokens[i]));
+ }
+
+ const size_t unprotectedTextures = preferredTextures + 1;
+ for (size_t i = 0; i < unprotectedTextures; ++i)
+ textureManager->unprotectTexture(tokens[i]);
+
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->maxMemoryLimitBytes());
+
+ // Setting preferred memory limit only won't force reduceMemoryToLimit.
+ textureManager->setPreferredMemoryLimitBytes(texturesMemorySize(preferredTextures));
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->currentMemoryUseBytes());
+ EXPECT_EQ(texturesMemorySize(maxTextures), textureManager->maxMemoryLimitBytes());
+ EXPECT_EQ(texturesMemorySize(preferredTextures), textureManager->preferredMemoryLimitBytes());
+}
+
+} // namespace
diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog
index ffe7a10cf..9247d340f 100644
--- a/Source/WebKit/efl/ChangeLog
+++ b/Source/WebKit/efl/ChangeLog
@@ -1,3 +1,57 @@
+2012-01-11 KwangHyuk Kim <hyuki.kim@samsung.com>
+
+ [EFL] Fix page rendering issue on ewk_view_tiled.
+ https://bugs.webkit.org/show_bug.cgi?id=75686
+
+ Reviewed by Andreas Kling.
+
+ As for now the discard of ewk_tiled_backing_store doesn't reset its own contents size information
+ and ewk_tiled_backing_store just ignores the request if new contents size change request would contain
+ the same size compared to the one that it owns,
+ contents size change request coming from ChromeClientEfl::contentsSizeChanged() API can be skipped
+ and therefore web page can't be presented properly.
+ In order to resolve this, I just add code to reset contents size information which ewk_tiled_backing_store owns
+ when it discards its own data.
+
+ * ewk/ewk_tiled_backing_store.cpp:
+ (ewk_tiled_backing_store_flush):
+
+2012-01-10 Tomasz Morawski <t.morawski@samsung.com>
+
+ [EFL] Added smart pointers to Ewk_View_Paint_Context class and done minor refactoring.
+ https://bugs.webkit.org/show_bug.cgi?id=75837
+
+ Reviewed by Ryosuke Niwa.
+
+ Changed graphicContext raw pointer to OwnPtr smart pointer.
+ Renamed cr to cairo and made it a RefPtr.
+
+ * ewk/ewk_view.cpp:
+ (ewk_view_paint_context_new): Adjust to auto pointers use.
+ (ewk_view_paint_context_free): Removed explicit raw pointers delete.
+ Adjust to auto pointers use:
+ (ewk_view_paint_context_save):
+ (ewk_view_paint_context_restore):
+ (ewk_view_paint_context_clip):
+ (ewk_view_paint_context_paint):
+ (ewk_view_paint_context_paint_contents):
+
+2012-01-09 Raphael Kubo da Costa <kubo@profusion.mobi>
+
+ [EFL] Add getter for Ewk_JS_Object::view.
+ https://bugs.webkit.org/show_bug.cgi?id=75868
+
+ Reviewed by Andreas Kling.
+
+ So far the view associated with a given JS object was a private
+ property only accessible to ewk itself. This does not make much sense,
+ as one often needs to know which view a certain method was invoked
+ from, for example.
+
+ * ewk/ewk_js.cpp:
+ (ewk_js_object_view_get):
+ * ewk/ewk_js.h:
+
2012-01-06 JungJik Lee <jungjik.lee@samsung.com>
[EFL] Add new pre-rendering code.
diff --git a/Source/WebKit/efl/ewk/ewk_js.cpp b/Source/WebKit/efl/ewk/ewk_js.cpp
index 6940b3b3f..3e5817b9f 100644
--- a/Source/WebKit/efl/ewk/ewk_js.cpp
+++ b/Source/WebKit/efl/ewk/ewk_js.cpp
@@ -612,6 +612,13 @@ void ewk_js_object_free(Ewk_JS_Object* jsObject)
free(jsObject);
}
+Evas_Object* ewk_js_object_view_get(const Ewk_JS_Object* jsObject)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(jsObject, 0);
+ EINA_MAGIC_CHECK_OR_RETURN(jsObject, 0);
+ return jsObject->view;
+}
+
Eina_Hash* ewk_js_object_properties_get(const Ewk_JS_Object* jsObject)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(jsObject, 0);
@@ -708,6 +715,11 @@ const char* ewk_js_object_name_get(const Ewk_JS_Object* jsObject)
return 0;
}
+Evas_Object* ewk_js_object_view_get(const Ewk_JS_Object* jsObject)
+{
+ return 0;
+}
+
void ewk_js_variant_free(Ewk_JS_Variant* jsVariant)
{
}
diff --git a/Source/WebKit/efl/ewk/ewk_js.h b/Source/WebKit/efl/ewk/ewk_js.h
index 7331da289..6279357ec 100644
--- a/Source/WebKit/efl/ewk/ewk_js.h
+++ b/Source/WebKit/efl/ewk/ewk_js.h
@@ -119,6 +119,21 @@ EAPI Eina_Hash *ewk_js_object_properties_get(const Ewk_JS_Object *obj);
EAPI const char *ewk_js_object_name_get(const Ewk_JS_Object *obj);
/**
+ * Returns the view associated with an Ewk_JS_Object.
+ *
+ * The returned view is the one passed to ewk_view_js_object_add. Right now,
+ * the object is always added to the view's main frame.
+ *
+ * @param obj The object to be queried.
+ *
+ * @return The view whose main frame the object has been inserted into, or
+ * @c NULL if the object has not been added to a view yet.
+ *
+ * @sa ewk_view_js_object_add, ewk_view_frame_main_get
+ */
+EAPI Evas_Object *ewk_js_object_view_get(const Ewk_JS_Object *obj);
+
+/**
* Release resources allocated by @a var.
*
* @param var @a Ewk_JS_Variant to be release
diff --git a/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp b/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp
index be0513391..094767a0c 100644
--- a/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp
+++ b/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp
@@ -1821,6 +1821,8 @@ void ewk_tiled_backing_store_flush(Evas_Object* ewkBackingStore)
priv->model.current.rows = 1;
priv->model.old.columns = 0;
priv->model.old.rows = 0;
+ priv->model.width = 0;
+ priv->model.height = 0;
priv->changed.size = true;
#ifdef DEBUG_MEM_LEAKS
diff --git a/Source/WebKit/efl/ewk/ewk_view.cpp b/Source/WebKit/efl/ewk/ewk_view.cpp
index 53a2d0a3b..8e089e130 100644
--- a/Source/WebKit/efl/ewk/ewk_view.cpp
+++ b/Source/WebKit/efl/ewk/ewk_view.cpp
@@ -2562,57 +2562,54 @@ void ewk_view_scrolls_process(Ewk_View_Smart_Data* smartData)
* to define their own backing store.
*/
struct _Ewk_View_Paint_Context {
- WebCore::GraphicsContext* graphicContext;
WebCore::FrameView* view;
- cairo_t* cr;
+ OwnPtr<WebCore::GraphicsContext> graphicContext;
+ RefPtr<cairo_t> cairo;
};
-Ewk_View_Paint_Context* ewk_view_paint_context_new(Ewk_View_Private_Data* priv, cairo_t* cr)
+Ewk_View_Paint_Context* ewk_view_paint_context_new(Ewk_View_Private_Data* priv, cairo_t* cairo)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(priv, 0);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cr, 0);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(cairo, 0);
EINA_SAFETY_ON_NULL_RETURN_VAL(priv->mainFrame, 0);
- WebCore::FrameView* view = priv->mainFrame->view();
- EINA_SAFETY_ON_NULL_RETURN_VAL(view, 0);
- Ewk_View_Paint_Context* context = static_cast<Ewk_View_Paint_Context*>(malloc(sizeof(*context)));
- EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(priv->mainFrame->view(), 0);
+
+ Ewk_View_Paint_Context* context = new Ewk_View_Paint_Context;
+ context->view = priv->mainFrame->view();
+ context->graphicContext = adoptPtr(new WebCore::GraphicsContext(cairo));
+ context->cairo = adoptRef(cairo_reference(cairo));
- context->graphicContext = new WebCore::GraphicsContext(cr);
- if (!context->graphicContext) {
- free(context);
- return 0;
- }
- context->view = view;
- context->cr = cairo_reference(cr);
return context;
}
void ewk_view_paint_context_free(Ewk_View_Paint_Context* context)
{
EINA_SAFETY_ON_NULL_RETURN(context);
- delete context->graphicContext;
- cairo_destroy(context->cr);
- free(context);
+
+ delete context;
}
void ewk_view_paint_context_save(Ewk_View_Paint_Context* context)
{
EINA_SAFETY_ON_NULL_RETURN(context);
- cairo_save(context->cr);
+
+ cairo_save(context->cairo.get());
context->graphicContext->save();
}
void ewk_view_paint_context_restore(Ewk_View_Paint_Context* context)
{
EINA_SAFETY_ON_NULL_RETURN(context);
+
context->graphicContext->restore();
- cairo_restore(context->cr);
+ cairo_restore(context->cairo.get());
}
void ewk_view_paint_context_clip(Ewk_View_Paint_Context* context, const Eina_Rectangle* area)
{
EINA_SAFETY_ON_NULL_RETURN(context);
EINA_SAFETY_ON_NULL_RETURN(area);
+
context->graphicContext->clip(WebCore::IntRect(area->x, area->y, area->w, area->h));
}
@@ -2625,7 +2622,7 @@ void ewk_view_paint_context_paint(Ewk_View_Paint_Context* context, const Eina_Re
if (context->view->isTransparent())
context->graphicContext->clearRect(rect);
- context->view->paint(context->graphicContext, rect);
+ context->view->paint(context->graphicContext.get(), rect);
}
void ewk_view_paint_context_paint_contents(Ewk_View_Paint_Context* context, const Eina_Rectangle* area)
@@ -2638,7 +2635,7 @@ void ewk_view_paint_context_paint_contents(Ewk_View_Paint_Context* context, cons
if (context->view->isTransparent())
context->graphicContext->clearRect(rect);
- context->view->paintContents(context->graphicContext, rect);
+ context->view->paintContents(context->graphicContext.get(), rect);
}
void ewk_view_paint_context_scale(Ewk_View_Paint_Context* context, float scaleX, float scaleY)
diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog
index fcd3ec6ea..2c50a1bac 100644
--- a/Source/WebKit/gtk/ChangeLog
+++ b/Source/WebKit/gtk/ChangeLog
@@ -1,3 +1,35 @@
+2012-01-10 Mario Sanchez Prada <msanchez@igalia.com>
+
+ AX: support helpText() in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=40193
+
+ Reviewed by Chris Fleizach.
+
+ Add support for retrieving WebCore's AccessibilityObject's
+ helpText from the GTK DumpRenderTree.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::accessibilityHelpText): Returns result
+ of calling to helpText() over the core accessibility object's.
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+
+2012-01-09 Mario Sanchez Prada <msanchez@igalia.com>
+
+ [Gtk] Regression: text-inserted events lack text inserted and current line
+ https://bugs.webkit.org/show_bug.cgi?id=72830
+
+ Reviewed by Martin Robinson.
+
+ Updated unit tests to check that both getting the current position
+ for the caret and the exposed text at, before or after a given
+ offset for an accessible object works as expected.
+
+ * tests/testatk.c:
+ (runGetTextTests): For objects implementing AtkEditableText, try
+ to change the exposed text and retrieve it again as a full line.
+ (testWebkitAtkCaretOffsets): For a text control (a text entry),
+ set the caret offset to a value greater than 1 and retrieve it.
+
2012-01-05 Martin Robinson <mrobinson@igalia.com>
[GTK] [AC] Introduce AcceleratedCompositingContext to isolate different accelerated compositing implementations
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
index ff7dc1a39..19fc6fb6d 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
@@ -24,6 +24,7 @@
#include "APICast.h"
#include "AXObjectCache.h"
+#include "AccessibilityObject.h"
#include "AccessibilityObjectWrapperAtk.h"
#include "AnimationController.h"
#include "DOMWrapperWorld.h"
@@ -780,6 +781,18 @@ void DumpRenderTreeSupportGtk::decrementAccessibilityValue(AtkObject* axObject)
modifyAccessibilityValue(axObject, false);
}
+CString DumpRenderTreeSupportGtk::accessibilityHelpText(AtkObject* axObject)
+{
+ if (!axObject || !WEBKIT_IS_ACCESSIBLE(axObject))
+ return CString();
+
+ AccessibilityObject* coreObject = webkit_accessible_get_accessibility_object(WEBKIT_ACCESSIBLE(axObject));
+ if (!coreObject)
+ return CString();
+
+ return coreObject->helpText().utf8();
+}
+
void DumpRenderTreeSupportGtk::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
{
JSC::ExecState* exec = toJS(context);
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
index 9309a92fe..06d30070a 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
@@ -101,6 +101,7 @@ public:
// Accessibility
static void incrementAccessibilityValue(AtkObject*);
static void decrementAccessibilityValue(AtkObject*);
+ static WTF::CString accessibilityHelpText(AtkObject*);
// TextInputController
static void setComposition(WebKitWebView*, const char*, int start, int length);
diff --git a/Source/WebKit/gtk/tests/testatk.c b/Source/WebKit/gtk/tests/testatk.c
index b46a242d1..e852deeed 100644
--- a/Source/WebKit/gtk/tests/testatk.c
+++ b/Source/WebKit/gtk/tests/testatk.c
@@ -63,7 +63,7 @@ static const char* linksWithInlineImages = "<html><head><style>a.http:before {co
static const char* listsOfItems = "<html><body><ul><li>text only</li><li><a href='foo'>link only</a></li><li>text and a <a href='bar'>link</a></li></ul><ol><li>text only</li><li><a href='foo'>link only</a></li><li>text and a <a href='bar'>link</a></li></ol></body></html>";
-static const char* textForCaretBrowsing = "<html><body><h1>A text header</h1><p>A paragraph <a href='http://foo.bar.baz/'>with a link</a> in the middle</p><ol><li>A list item</li></ol><select><option selected value='foo'>An option in a combo box</option></select></body></html>";
+static const char* textForCaretBrowsing = "<html><body><h1>A text header</h1><p>A paragraph <a href='http://foo.bar.baz/'>with a link</a> in the middle</p><ol><li>A list item</li></ol><select><option selected value='foo'>An option in a combo box</option></select><input type='text'' name='foo'' value='foo bar baz' /></body></html>";
static const char* textForSelections = "<html><body><p>A paragraph with plain text</p><p>A paragraph with <a href='http://webkit.org'>a link</a> in the middle</p><ol><li>A list item</li></ol><select></body></html>";
@@ -234,7 +234,7 @@ static void runGetTextTests(AtkText* textObject)
testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
44, " This is the second sentence.", 15, 44);
- /* It's trick to test these properly right now, since our a11y
+ /* It's tricky to test these properly right now, since our a11y
implementation splits different lines in different a11y items. */
/* ATK_TEXT_BOUNDARY_LINE_START */
testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START,
@@ -243,6 +243,15 @@ static void runGetTextTests(AtkText* textObject)
/* ATK_TEXT_BOUNDARY_LINE_END */
testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END,
0, "This is a test. This is the second sentence. And this the third.", 0, 64);
+
+ /* For objects implementing AtkEditableText, try to change the
+ exposed text and retrieve it again as a full line.
+ (see https://bugs.webkit.org/show_bug.cgi?id=72830) */
+ if (ATK_IS_EDITABLE_TEXT(textObject)) {
+ atk_editable_text_set_text_contents(ATK_EDITABLE_TEXT(textObject), "foo bar baz");
+ testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 0, "foo bar baz", 0, 11);
+ testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, "foo bar baz", 0, 11);
+ }
}
static void testWebkitAtkCaretOffsets()
@@ -334,6 +343,18 @@ static void testWebkitAtkCaretOffsets()
result = atk_text_set_caret_offset(ATK_TEXT(comboBoxOption), 1);
g_assert_cmpint(result, ==, FALSE);
+ AtkObject* textEntry = atk_object_ref_accessible_child(panel, 1);
+ g_assert(ATK_IS_OBJECT(textEntry));
+ g_assert(atk_object_get_role(textEntry) == ATK_ROLE_ENTRY);
+ g_assert(ATK_IS_TEXT(textEntry));
+ text = atk_text_get_text(ATK_TEXT(textEntry), 0, -1);
+ g_assert_cmpstr(text, ==, "foo bar baz");
+
+ result = atk_text_set_caret_offset(ATK_TEXT(textEntry), 5);
+ g_assert_cmpint(result, ==, TRUE);
+ offset = atk_text_get_caret_offset(ATK_TEXT(textEntry));
+ g_assert_cmpint(offset, ==, 5);
+
g_object_unref(header);
g_object_unref(paragraph);
g_object_unref(list);
@@ -342,6 +363,7 @@ static void testWebkitAtkCaretOffsets()
g_object_unref(comboBox);
g_object_unref(menuPopup);
g_object_unref(comboBoxOption);
+ g_object_unref(textEntry);
g_object_unref(webView);
}
diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog
index 7f63b196e..c5e65fa52 100644
--- a/Source/WebKit/mac/ChangeLog
+++ b/Source/WebKit/mac/ChangeLog
@@ -1,3 +1,64 @@
+2012-01-10 Dan Bernstein <mitz@apple.com>
+
+ Made -[WebHistoryItem copyWithZone:] allocate an object of the same class as the receiver.
+
+ Reviewed by Mark Rowe.
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem copyWithZone:]):
+
+2012-01-10 Chris Marrin <cmarrin@apple.com>
+
+ Wrapped allowedCompositingTriggers in ACCELERATED_COMPOSITING ifdef to make non-accelerated builds work
+
+ Unreviewed.
+
+ * WebCoreSupport/WebChromeClient.h:
+
+2012-01-10 Chris Marrin <cmarrin@apple.com>
+
+ Turn off the FilterTrigger in WebKit and WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=75914
+
+ Reviewed by Simon Fraser.
+
+ Implement allowedCompositingTriggers to turn on all compositing triggers except FilterTrigger.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::allowedCompositingTriggers):
+
+2012-01-10 Dan Bernstein <mitz@apple.com>
+
+ Change -[WebHistoryItem copyWithZone:] to not use NSCopyObject()
+ https://bugs.webkit.org/show_bug.cgi?id=75980
+
+ Reviewed by Mark Rowe.
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem copyWithZone:]): Replaced NSCopyObject() with
+ -alloc, -initWithWebCoreHistoryItem:.
+
+2012-01-06 Simon Fraser <simon.fraser@apple.com>
+
+ Mitigate scrollbar differences when running pixel tests
+ https://bugs.webkit.org/show_bug.cgi?id=67217
+
+ Reviewed by Dan Bernstein.
+
+ Make it possible to register a custom NSScroller class, which
+ the WebDynamicScrollBarsView will use when mock scrollbars are enabled.
+
+ Also ensure that the WebPreferences mock scrollbars preference is
+ migrated into Settings.
+
+ * WebView/WebDynamicScrollBarsView.h:
+ * WebView/WebDynamicScrollBarsView.mm:
+ (+[WebDynamicScrollBarsView _horizontalScrollerClass]):
+ (+[WebDynamicScrollBarsView _verticalScrollerClass]):
+ (+[WebDynamicScrollBarsView setCustomScrollerClass:]):
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
2012-01-05 Dan Bernstein <mitz@apple.com>
<rdar://problem/10633760> Update copyright strings
diff --git a/Source/WebKit/mac/History/WebHistoryItem.mm b/Source/WebKit/mac/History/WebHistoryItem.mm
index eef4346cd..653b1afae 100644
--- a/Source/WebKit/mac/History/WebHistoryItem.mm
+++ b/Source/WebKit/mac/History/WebHistoryItem.mm
@@ -141,11 +141,9 @@ void WKNotifyHistoryItemChanged(HistoryItem*)
- (id)copyWithZone:(NSZone *)zone
{
WebCoreThreadViolationCheckRoundOne();
- WebHistoryItem *copy = (WebHistoryItem *)NSCopyObject(self, 0, zone);
- RefPtr<HistoryItem> item = core(_private)->copy();
- copy->_private = kitPrivate(item.get());
- historyItemWrappers().set(item.release().leakRef(), copy);
-
+ WebHistoryItem *copy = [[[self class] alloc] initWithWebCoreHistoryItem:core(_private)->copy()];
+ historyItemWrappers().set(core(copy->_private), copy);
+
return copy;
}
diff --git a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 8961ba4fc..ce97ab042 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -148,6 +148,16 @@ public:
virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) OVERRIDE;
virtual void setNeedsOneShotDrawingSynchronization() OVERRIDE;
virtual void scheduleCompositingLayerSync() OVERRIDE;
+
+ virtual CompositingTriggerFlags allowedCompositingTriggers() const
+ {
+ return static_cast<CompositingTriggerFlags>(
+ ThreeDTransformTrigger |
+ VideoTrigger |
+ PluginTrigger|
+ CanvasTrigger |
+ AnimationTrigger);
+ }
#endif
#if ENABLE(VIDEO)
diff --git a/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.h b/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.h
index c289a0414..30b4daa0a 100644
--- a/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.h
+++ b/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.h
@@ -42,6 +42,9 @@ struct WebDynamicScrollBarsViewPrivate;
#endif
}
+// For use by DumpRenderTree only.
++ (void)setCustomScrollerClass:(Class)scrollerClass;
+
// This was originally added for Safari's benefit, but Safari has not used it for a long time.
// Perhaps it can be removed.
- (void)setAllowsHorizontalScrolling:(BOOL)flag;
diff --git a/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm b/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
index 71ef492bf..801109473 100644
--- a/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
+++ b/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
@@ -43,6 +43,11 @@ const int WebCoreScrollbarAlwaysOn = ScrollbarAlwaysOn;
COMPILE_ASSERT(sizeof(WebDynamicScrollBarsView) == 0x8c, WebDynamicScrollBarsView_is_expected_size);
#endif
+@interface NSScrollView(WebNSScrollViewDetails)
++ (Class)_horizontalScrollerClass;
++ (Class)_verticalScrollerClass;
+@end
+
struct WebDynamicScrollBarsViewPrivate {
unsigned inUpdateScrollersLayoutPass;
@@ -77,6 +82,29 @@ struct WebDynamicScrollBarsViewPrivate {
@implementation WebDynamicScrollBarsView
+static Class customScrollerClass;
+
++ (Class)_horizontalScrollerClass
+{
+ if (Settings::mockScrollbarsEnabled() && customScrollerClass)
+ return customScrollerClass;
+
+ return [super _horizontalScrollerClass];
+}
+
++ (Class)_verticalScrollerClass
+{
+ if (Settings::mockScrollbarsEnabled() && customScrollerClass)
+ return customScrollerClass;
+
+ return [super _horizontalScrollerClass];
+}
+
++ (void)setCustomScrollerClass:(Class)scrollerClass
+{
+ customScrollerClass = scrollerClass;
+}
+
- (id)initWithFrame:(NSRect)frame
{
if (!(self = [super initWithFrame:frame]))
diff --git a/Source/WebKit/mac/WebView/WebView.mm b/Source/WebKit/mac/WebView/WebView.mm
index 51a5b219a..7ded2aa70 100644
--- a/Source/WebKit/mac/WebView/WebView.mm
+++ b/Source/WebKit/mac/WebView/WebView.mm
@@ -1497,6 +1497,7 @@ static bool needsSelfRetainWhileLoadingQuirk()
settings->setMediaPlaybackAllowsInline([preferences mediaPlaybackAllowsInline]);
settings->setSuppressIncrementalRendering([preferences suppressIncrementalRendering]);
settings->setBackspaceKeyNavigationEnabled([preferences backspaceKeyNavigationEnabled]);
+ settings->setMockScrollbarsEnabled([preferences mockScrollbarsEnabled]);
#if ENABLE(VIDEO_TRACK)
settings->setShouldDisplaySubtitles([preferences shouldDisplaySubtitles]);
diff --git a/Source/WebKit/qt/Api/qhttpheader.cpp b/Source/WebKit/qt/Api/qhttpheader.cpp
new file mode 100644
index 000000000..aaabb1849
--- /dev/null
+++ b/Source/WebKit/qt/Api/qhttpheader.cpp
@@ -0,0 +1,273 @@
+/*
+ Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+
+ These were part of the QtNetwork module of the Qt Toolkit.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "qhttpheader_p.h"
+
+using namespace WebKit;
+
+static QString contentLengthString = QLatin1String("content-length");
+static QString contentTypeString = QLatin1String("content-type");
+
+QHttpHeader::QHttpHeader()
+{
+ setValid(true);
+}
+
+QHttpHeader::QHttpHeader(const QString& str)
+{
+ setValid(true);
+ parse(str);
+}
+
+QHttpHeader::~QHttpHeader()
+{
+}
+
+bool QHttpHeader::parse(const QString& str)
+{
+ QStringList lst;
+ int pos = str.indexOf(QLatin1Char('\n'));
+ if (pos > 0 && str.at(pos - 1) == QLatin1Char('\r'))
+ lst = str.trimmed().split(QLatin1String("\r\n"));
+ else
+ lst = str.trimmed().split(QLatin1String("\n"));
+ lst.removeAll(QString());
+
+ if (lst.isEmpty())
+ return true;
+
+ QStringList lines;
+ QStringList::Iterator it = lst.begin();
+ for (; it != lst.end(); ++it) {
+ if (!(*it).isEmpty()) {
+ if ((*it)[0].isSpace()) {
+ if (!lines.isEmpty()) {
+ lines.last() += QLatin1Char(' ');
+ lines.last() += (*it).trimmed();
+ }
+ } else
+ lines.append((*it));
+ }
+ }
+
+ int number = 0;
+ for (it = lines.begin(); it != lines.end(); ++it) {
+ if (!parseLine(*it, number++)) {
+ setValid(false);
+ return false;
+ }
+ }
+ return true;
+}
+
+QString QHttpHeader::value(const QString& key) const
+{
+ QString lowercaseKey = key.toLower();
+ QList<QPair<QString, QString> >::ConstIterator it = m_values.constBegin();
+ while (it != m_values.constEnd()) {
+ if ((*it).first.toLower() == lowercaseKey)
+ return (*it).second;
+ ++it;
+ }
+ return QString();
+}
+
+bool QHttpHeader::hasKey(const QString& key) const
+{
+ QString lowercaseKey = key.toLower();
+ QList<QPair<QString, QString> >::ConstIterator it = m_values.constBegin();
+ while (it != m_values.constEnd()) {
+ if ((*it).first.toLower() == lowercaseKey)
+ return true;
+ ++it;
+ }
+ return false;
+}
+
+void QHttpHeader::setValue(const QString& key, const QString& value)
+{
+ QString lowercaseKey = key.toLower();
+ QList<QPair<QString, QString> >::Iterator it = m_values.begin();
+ while (it != m_values.end()) {
+ if ((*it).first.toLower() == lowercaseKey) {
+ (*it).second = value;
+ return;
+ }
+ ++it;
+ }
+ addValue(key, value);
+}
+
+void QHttpHeader::addValue(const QString& key, const QString& value)
+{
+ m_values.append(qMakePair(key, value));
+}
+
+bool QHttpHeader::parseLine(const QString& line, int)
+{
+ int i = line.indexOf(QLatin1Char(':'));
+ if (i == -1)
+ return false;
+
+ addValue(line.left(i).trimmed(), line.mid(i + 1).trimmed());
+ return true;
+}
+
+QString QHttpHeader::toString() const
+{
+ if (!isValid())
+ return QLatin1String("");
+
+ QString ret = QLatin1String("");
+
+ QList<QPair<QString, QString> >::ConstIterator it = m_values.constBegin();
+ while (it != m_values.constEnd()) {
+ ret += (*it).first + QLatin1String(": ") + (*it).second + QLatin1String("\r\n");
+ ++it;
+ }
+ return ret;
+}
+
+bool QHttpHeader::hasContentLength() const
+{
+ return hasKey(contentLengthString);
+}
+
+uint QHttpHeader::contentLength() const
+{
+ return value(contentLengthString).toUInt();
+}
+
+void QHttpHeader::setContentLength(int len)
+{
+ setValue(contentLengthString, QString::number(len));
+}
+
+bool QHttpHeader::hasContentType() const
+{
+ return hasKey(contentTypeString);
+}
+
+QString QHttpHeader::contentType() const
+{
+ QString type = value(contentTypeString);
+ if (type.isEmpty())
+ return QString();
+
+ int pos = type.indexOf(QLatin1Char(';'));
+ if (pos == -1)
+ return type;
+
+ return type.left(pos).trimmed();
+}
+
+void QHttpHeader::setContentType(const QString &type)
+{
+ setValue(contentTypeString, type);
+}
+
+QHttpResponseHeader::QHttpResponseHeader(int code, const QString &text, int majorVer, int minorVer)
+ : QHttpHeader()
+ , m_statusCode(code)
+ , m_reasonPhrase(text)
+ , m_majorVersion(majorVer)
+ , m_minorVersion(minorVer)
+{
+}
+
+bool QHttpResponseHeader::parseLine(const QString& line, int number)
+{
+ if (number)
+ return QHttpHeader::parseLine(line, number);
+
+ QString l = line.simplified();
+ if (l.length() < 10)
+ return false;
+
+ if (l.left(5) == QLatin1String("HTTP/") && l[5].isDigit() && l[6] == QLatin1Char('.')
+ && l[7].isDigit() && l[8] == QLatin1Char(' ') && l[9].isDigit()) {
+ m_majorVersion = l[5].toLatin1() - '0';
+ m_minorVersion = l[7].toLatin1() - '0';
+
+ int pos = l.indexOf(QLatin1Char(' '), 9);
+ if (pos != -1) {
+ m_reasonPhrase = l.mid(pos + 1);
+ m_statusCode = l.mid(9, pos - 9).toInt();
+ } else {
+ m_statusCode = l.mid(9).toInt();
+ m_reasonPhrase.clear();
+ }
+ } else
+ return false;
+
+ return true;
+}
+
+QString QHttpResponseHeader::toString() const
+{
+ static QString ret(QLatin1String("HTTP/%1.%2 %3 %4\r\n%5\r\n"));
+ return ret.arg(m_majorVersion).arg(m_minorVersion).arg(m_statusCode).arg(m_reasonPhrase).arg(QHttpHeader::toString());
+}
+
+QHttpRequestHeader::QHttpRequestHeader()
+ : QHttpHeader()
+{
+ setValid(false);
+}
+
+QHttpRequestHeader::QHttpRequestHeader(const QString& str)
+{
+ parse(str);
+}
+
+bool QHttpRequestHeader::parseLine(const QString& line, int number)
+{
+ if (number)
+ return QHttpHeader::parseLine(line, number);
+
+ QStringList lst = line.simplified().split(QLatin1String(" "));
+ if (lst.count() > 0) {
+ m_method = lst[0];
+ if (lst.count() > 1) {
+ m_path = lst[1];
+ if (lst.count() > 2) {
+ QString v = lst[2];
+ if (v.length() >= 8 && v.left(5) == QLatin1String("HTTP/")
+ && v[5].isDigit() && v[6] == QLatin1Char('.') && v[7].isDigit()) {
+ m_majorVersion = v[5].toLatin1() - '0';
+ m_minorVersion = v[7].toLatin1() - '0';
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+}
+
+QString QHttpRequestHeader::toString() const
+{
+ static QString first(QLatin1String("%1 %2"));
+ static QString last(QLatin1String(" HTTP/%3.%4\r\n%5\r\n"));
+ return first.arg(m_method).arg(m_path) + last.arg(m_majorVersion).arg(m_minorVersion).arg(QHttpHeader::toString());
+}
+
diff --git a/Source/WebKit/qt/Api/qhttpheader_p.h b/Source/WebKit/qt/Api/qhttpheader_p.h
new file mode 100644
index 000000000..0682952fd
--- /dev/null
+++ b/Source/WebKit/qt/Api/qhttpheader_p.h
@@ -0,0 +1,112 @@
+/*
+ Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+
+ These were part of the QtNetwork module of the Qt Toolkit.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qhttpheader_p_h
+#define qhttpheader_p_h
+
+#include <QPair>
+#include <QString>
+#include <QStringList>
+
+namespace WebKit {
+
+class QHttpHeader {
+public:
+ QHttpHeader();
+ QHttpHeader(const QString&);
+ virtual ~QHttpHeader();
+
+ void setValue(const QString& key, const QString& value);
+ void addValue(const QString& key, const QString& value);
+ QString value(const QString& key) const;
+ bool hasKey(const QString&) const;
+
+ // ### Qt 5: change to qint64
+ bool hasContentLength() const;
+ uint contentLength() const;
+ void setContentLength(int);
+
+ bool hasContentType() const;
+ QString contentType() const;
+ void setContentType(const QString&);
+
+ virtual QString toString() const;
+ bool isValid() const { return m_valid; }
+
+ virtual int majorVersion() const = 0;
+ virtual int minorVersion() const = 0;
+
+protected:
+ virtual bool parseLine(const QString& line, int number);
+ bool parse(const QString&);
+ void setValid(bool v) { m_valid = v; }
+
+private:
+ bool m_valid;
+ QList<QPair<QString, QString> > m_values;
+};
+
+class QHttpResponseHeader : public QHttpHeader {
+public:
+ QHttpResponseHeader(int code, const QString& text = QString(), int majorVer = 1, int minorVer = 1);
+
+ int statusCode() const { return m_statusCode; }
+ QString reasonPhrase() const {return m_reasonPhrase; }
+ int majorVersion() const { return m_majorVersion; }
+ int minorVersion() const { return m_minorVersion; }
+
+ QString toString() const;
+
+protected:
+ bool parseLine(const QString& line, int number);
+
+private:
+ int m_statusCode;
+ QString m_reasonPhrase;
+ int m_majorVersion;
+ int m_minorVersion;
+};
+
+class QHttpRequestHeader : public QHttpHeader {
+public:
+ QHttpRequestHeader();
+ QHttpRequestHeader(const QString&);
+
+ QString method() const { return m_method; }
+ QString path() const { return m_path; }
+ int majorVersion() const { return m_majorVersion; }
+ int minorVersion() const { return m_minorVersion; }
+
+ QString toString() const;
+
+protected:
+ bool parseLine(const QString& line, int number);
+
+private:
+ QString m_method;
+ QString m_path;
+ int m_majorVersion;
+ int m_minorVersion;
+};
+
+}
+
+#endif
diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp
index 78de8126e..91de6f53c 100644
--- a/Source/WebKit/qt/Api/qwebpage.cpp
+++ b/Source/WebKit/qt/Api/qwebpage.cpp
@@ -125,7 +125,6 @@
#include <QDragMoveEvent>
#include <QDropEvent>
#include <QFileDialog>
-#include <QHttpRequestHeader>
#include <QInputDialog>
#include <QMessageBox>
#include <QNetworkProxy>
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 09da8ab79..95f374866 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,119 @@
+2012-01-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed trivial build fix: Removed unnecessary QHttpRequestHeader
+ inclusion (and the file is removed in newer Qt 5 versions).
+
+ * Api/qwebpage.cpp:
+
+2012-01-11 Rafael Brandao <rafael.lobo@openbossa.org>
+
+ [Qt][WK2] Fix the build for newer Qt5
+ https://bugs.webkit.org/show_bug.cgi?id=75964
+
+ Reviewed by Simon Hausmann.
+
+ Added QHttpHeader, QHttpResponseHeader and QHttpRequestHeader
+ that were removed from Qt. They are now kept under a private header
+ and only the relevant code is present.
+
+ * Api/qhttpheader.cpp: Added.
+ (QHttpHeader::QHttpHeader):
+ (QHttpHeader::~QHttpHeader):
+ (QHttpHeader::parse):
+ (QHttpHeader::value):
+ (QHttpHeader::hasKey):
+ (QHttpHeader::setValue):
+ (QHttpHeader::addValue):
+ (QHttpHeader::parseLine):
+ (QHttpHeader::toString):
+ (QHttpHeader::hasContentLength):
+ (QHttpHeader::contentLength):
+ (QHttpHeader::setContentLength):
+ (QHttpHeader::hasContentType):
+ (QHttpHeader::contentType):
+ (QHttpHeader::setContentType):
+ (QHttpResponseHeader::QHttpResponseHeader):
+ (QHttpResponseHeader::parseLine):
+ (QHttpResponseHeader::toString):
+ (QHttpRequestHeader::QHttpRequestHeader):
+ (QHttpRequestHeader::parseLine):
+ (QHttpRequestHeader::toString):
+ * Api/qhttpheader_p.h: Added.
+ (QHttpHeader::isValid):
+ (QHttpHeader::setValid):
+ (QHttpResponseHeader::statusCode):
+ (QHttpResponseHeader::reasonPhrase):
+ (QHttpResponseHeader::majorVersion):
+ (QHttpResponseHeader::minorVersion):
+ (QHttpRequestHeader::method):
+ (QHttpRequestHeader::path):
+ (QHttpRequestHeader::majorVersion):
+ (QHttpRequestHeader::minorVersion):
+ * WebCoreSupport/InspectorServerQt.cpp:
+
+2012-01-10 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Qt] Enable CSS_FILTERS in Qt build
+ https://bugs.webkit.org/show_bug.cgi?id=75777
+
+ For now, disallow compositing for filters. We will change that trigger when
+ https://bugs.webkit.org/show_bug.cgi?id=75778 is implemented.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::allowedCompositingTriggers):
+
+2012-01-08 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r104421.
+ http://trac.webkit.org/changeset/104421
+ https://bugs.webkit.org/show_bug.cgi?id=75816
+
+ Need to rebaseline some tests on Linux (Requested by noamr on
+ #webkit).
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::allowedCompositingTriggers):
+
+2012-01-08 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Qt] Enable CSS_FILTERS in Qt build
+ https://bugs.webkit.org/show_bug.cgi?id=75777
+
+ For now, disallow compositing for filters. We will change that trigger when
+ https://bugs.webkit.org/show_bug.cgi?id=75778 is implemented.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::allowedCompositingTriggers):
+
+2012-01-08 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r104403.
+ http://trac.webkit.org/changeset/104403
+ https://bugs.webkit.org/show_bug.cgi?id=75803
+
+ It broke all tests on Qt5 (Requested by Ossy_weekend on
+ #webkit).
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::allowedCompositingTriggers):
+
+2012-01-08 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Qt] Enable CSS_FILTERS in Qt build
+ https://bugs.webkit.org/show_bug.cgi?id=75777
+
+ For now, disallow compositing for filters. We will change that trigger when
+ https://bugs.webkit.org/show_bug.cgi?id=75778 is implemented.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::allowedCompositingTriggers):
+
2012-01-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104231.
diff --git a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index eed89dc30..f129b5871 100644
--- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -630,7 +630,7 @@ void ChromeClientQt::scheduleCompositingLayerSync()
ChromeClient::CompositingTriggerFlags ChromeClientQt::allowedCompositingTriggers() const
{
if (platformPageClient() && platformPageClient()->allowsAcceleratedCompositing())
- return AllTriggers;
+ return ThreeDTransformTrigger | VideoTrigger | CanvasTrigger | AnimationTrigger;
return 0;
}
diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
index f502f01a5..fdc14f533 100644
--- a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
@@ -24,12 +24,10 @@
#include "InspectorController.h"
#include "MD5.h"
#include "Page.h"
+#include "qhttpheader_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
#include <QFile>
-#include <QHttpHeader>
-#include <QHttpRequestHeader>
-#include <QHttpResponseHeader>
#include <QString>
#include <QStringList>
#include <QTcpServer>
@@ -176,7 +174,7 @@ InspectorServerRequestHandlerQt::~InspectorServerRequestHandlerQt()
void InspectorServerRequestHandlerQt::tcpReadyRead()
{
- QHttpRequestHeader header;
+ WebKit::QHttpRequestHeader header;
bool isWebSocket = false;
if (!m_tcpConnection)
return;
@@ -189,7 +187,7 @@ void InspectorServerRequestHandlerQt::tcpReadyRead()
m_endOfHeaders = true;
}
if (m_endOfHeaders) {
- header = QHttpRequestHeader(QString::fromLatin1(m_data));
+ header = WebKit::QHttpRequestHeader(QString::fromLatin1(m_data));
if (header.isValid()) {
m_path = header.path();
m_contentType = header.contentType().toLatin1();
@@ -222,7 +220,7 @@ void InspectorServerRequestHandlerQt::tcpReadyRead()
generateWebSocketChallengeResponse(number1, number2, (unsigned char*)key3.data(), (unsigned char*)responseData);
QByteArray response(responseData, sizeof(responseData));
- QHttpResponseHeader responseHeader(101, QLatin1String("WebSocket Protocol Handshake"), 1, 1);
+ WebKit::QHttpResponseHeader responseHeader(101, QLatin1String("WebSocket Protocol Handshake"), 1, 1);
responseHeader.setValue(QLatin1String("Upgrade"), header.value(QLatin1String("Upgrade")));
responseHeader.setValue(QLatin1String("Connection"), header.value(QLatin1String("Connection")));
responseHeader.setValue(QLatin1String("Sec-WebSocket-Origin"), header.value(QLatin1String("Origin")));
@@ -284,7 +282,7 @@ void InspectorServerRequestHandlerQt::tcpReadyRead()
}
}
- QHttpResponseHeader responseHeader(code, text, 1, 0);
+ WebKit::QHttpResponseHeader responseHeader(code, text, 1, 0);
responseHeader.setContentLength(response.size());
if (!m_contentType.isEmpty())
responseHeader.setContentType(QString::fromLatin1(m_contentType));
diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog
index f7d6b5f64..384faa5d0 100644
--- a/Source/WebKit/win/ChangeLog
+++ b/Source/WebKit/win/ChangeLog
@@ -1,3 +1,17 @@
+2012-01-07 Andreas Kling <awesomekling@apple.com>
+
+ Windows build fix.
+
+ * DOMHTMLClasses.cpp:
+ (DOMHTMLDocument::forms):
+ (DOMHTMLSelectElement::options):
+
+2012-01-06 Jessie Berlin <jberlin@apple.com>
+
+ Windows build fix.
+
+ * Interfaces/IWebViewPrivate.idl:
+
2012-01-05 Adam Roben <aroben@apple.com>
Add WebKitTestRunnerLauncher to WebKit.sln.
diff --git a/Source/WebKit/win/DOMHTMLClasses.cpp b/Source/WebKit/win/DOMHTMLClasses.cpp
index 6b29fa93f..5f156b7a5 100644
--- a/Source/WebKit/win/DOMHTMLClasses.cpp
+++ b/Source/WebKit/win/DOMHTMLClasses.cpp
@@ -305,7 +305,7 @@ HRESULT STDMETHODCALLTYPE DOMHTMLDocument::forms(
return E_FAIL;
HTMLDocument* htmlDoc = static_cast<HTMLDocument*>(m_document);
- *collection = DOMHTMLCollection::createInstance(htmlDoc->forms().get());
+ *collection = DOMHTMLCollection::createInstance(htmlDoc->forms());
return S_OK;
}
@@ -709,7 +709,7 @@ HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::options(
if (!selectElement->options())
return E_FAIL;
- *result = DOMHTMLOptionsCollection::createInstance(selectElement->options().get());
+ *result = DOMHTMLOptionsCollection::createInstance(selectElement->options());
return S_OK;
}
diff --git a/Source/WebKit/win/Interfaces/IWebViewPrivate.idl b/Source/WebKit/win/Interfaces/IWebViewPrivate.idl
index 46bd4197f..b4619494f 100644
--- a/Source/WebKit/win/Interfaces/IWebViewPrivate.idl
+++ b/Source/WebKit/win/Interfaces/IWebViewPrivate.idl
@@ -274,4 +274,7 @@ interface IWebViewPrivate : IUnknown
HRESULT setUsesLayeredWindow([in] BOOL usesLayeredWindow);
HRESULT usesLayeredWindow([out, retval] BOOL* usesLayeredWindow);
+
+ HRESULT registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing([in] BSTR scheme);
+ HRESULT registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing([in] BSTR scheme);
}