diff options
Diffstat (limited to 'WebKit')
94 files changed, 2332 insertions, 306 deletions
diff --git a/WebKit/CMakeLists.txt b/WebKit/CMakeLists.txt index 3ed3e9c..3fee2c6 100644 --- a/WebKit/CMakeLists.txt +++ b/WebKit/CMakeLists.txt @@ -67,6 +67,7 @@ INCLUDE_DIRECTORIES(${WebKit_INCLUDE_DIRECTORIES}) ADD_LIBRARY(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARY_TYPE} ${WebKit_SOURCES}) TARGET_LINK_LIBRARIES(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARIES}) ADD_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} LINK_FLAGS "${WebKit_LINK_FLAGS}") +SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) INSTALL(TARGETS ${WebKit_LIBRARY_NAME} DESTINATION lib) diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog index 76b6fb4..75181e6 100644 --- a/WebKit/ChangeLog +++ b/WebKit/ChangeLog @@ -1,3 +1,41 @@ +2010-07-31 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/43307> Make sure all private headers are copied to PrivateHeaders directory + + Reviewed by Dan Bernstein. + + This also fixes compilation of DumpRenderTree after changes for + Bug 40627. + + * WebKit.xcodeproj/project.pbxproj: Set the PRIVATE attribute on + the following headers: + - WebFormDelegatePrivate.h + - WebKitStatisticsPrivate.h + - WebSecurityOriginPrivate.h + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + * WebKit.xcodeproj/project.pbxproj: + * efl/WebCoreSupport/ChromeClientEfl.cpp: + (WebCore::ChromeClientEfl::reachedApplicationCacheOriginQuota): + * efl/WebCoreSupport/ChromeClientEfl.h: + +2010-07-30 Rafael Antognolli <antognolli@profusion.mobi> + + Reviewed by Antonio Gomes. + + [EFL] Add library version and soname to EFL generated libraries and binary. + https://bugs.webkit.org/show_bug.cgi?id=43212 + + Add version and soname to libewebkit.so. + + * CMakeLists.txt: + 2010-07-26 Rafael Antognolli <antognolli@profusion.mobi> Reviewed by Antonio Gomes. diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj index 634a430..e447b7f 100644 --- a/WebKit/WebKit.xcodeproj/project.pbxproj +++ b/WebKit/WebKit.xcodeproj/project.pbxproj @@ -93,9 +93,6 @@ 441793A60E34EE150055E1AE /* WebHTMLRepresentationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 441793A50E34EE150055E1AE /* WebHTMLRepresentationInternal.h */; }; 4BF99F900AE050BC00815C2B /* WebEditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF99F8E0AE050BC00815C2B /* WebEditorClient.h */; settings = {ATTRIBUTES = (); }; }; 4BF99F910AE050BC00815C2B /* WebEditorClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */; }; - 51079D170CED11B00077247D /* WebSecurityOrigin.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51079D140CED11B00077247D /* WebSecurityOrigin.mm */; }; - 51079D180CED11B00077247D /* WebSecurityOriginInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51079D150CED11B00077247D /* WebSecurityOriginInternal.h */; }; - 51079D190CED11B00077247D /* WebSecurityOriginPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51079D160CED11B00077247D /* WebSecurityOriginPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 511F3FD50CECC88F00852565 /* WebDatabaseManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 511F3FD10CECC88F00852565 /* WebDatabaseManager.mm */; }; 511F3FD60CECC88F00852565 /* WebDatabaseManagerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 511F3FD20CECC88F00852565 /* WebDatabaseManagerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 511F3FD70CECC88F00852565 /* WebDatabaseTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 511F3FD30CECC88F00852565 /* WebDatabaseTrackerClient.h */; }; @@ -155,7 +152,7 @@ 9398101D0824BF01008DF038 /* WebKitLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 93AEB17D032C1735008635CE /* WebKitLogging.h */; settings = {ATTRIBUTES = (); }; }; 9398101E0824BF01008DF038 /* WebKitNSStringExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 7082F56F038EADAA00A80180 /* WebKitNSStringExtras.h */; settings = {ATTRIBUTES = (Private, ); }; }; 9398101F0824BF01008DF038 /* WebKitStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = F53444CE02E87CBA018635CA /* WebKitStatistics.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 939810200824BF01008DF038 /* WebKitStatisticsPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F53444D202E87D4B018635CA /* WebKitStatisticsPrivate.h */; }; + 939810200824BF01008DF038 /* WebKitStatisticsPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F53444D202E87D4B018635CA /* WebKitStatisticsPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 939810210824BF01008DF038 /* WebNSControlExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 9345DDB20365FFD0008635CE /* WebNSControlExtras.h */; }; 939810220824BF01008DF038 /* WebNSImageExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 8398847A03426FB000BC5F5E /* WebNSImageExtras.h */; }; 939810230824BF01008DF038 /* WebNSPasteboardExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = ED2B2474033A2DA800C1A526 /* WebNSPasteboardExtras.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -196,7 +193,7 @@ 9398105F0824BF01008DF038 /* WebRenderNode.h in Headers */ = {isa = PBXBuildFile; fileRef = F5F81C3902B67C26018635CA /* WebRenderNode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 939810600824BF01008DF038 /* WebResourceLoadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 513D422E034CF55A00CA2ACD /* WebResourceLoadDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 939810630824BF01008DF038 /* WebHistoryItemInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 516F296F03A6C45A00CA2D3A /* WebHistoryItemInternal.h */; }; - 939810640824BF01008DF038 /* WebFormDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D36FD5E03F78F9E00A80166 /* WebFormDelegatePrivate.h */; }; + 939810640824BF01008DF038 /* WebFormDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D36FD5E03F78F9E00A80166 /* WebFormDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 939810650824BF01008DF038 /* CarbonWindowAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = F7EBEE9003F9DBA103CA0DE6 /* CarbonWindowAdapter.h */; }; 939810660824BF01008DF038 /* CarbonWindowContentView.h in Headers */ = {isa = PBXBuildFile; fileRef = F7EBEE9203F9DBA103CA0DE6 /* CarbonWindowContentView.h */; }; 939810670824BF01008DF038 /* CarbonWindowFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = F7EBEE9403F9DBA103CA0DE6 /* CarbonWindowFrame.h */; }; @@ -316,6 +313,13 @@ 93EB178D09F88D460091F8FF /* WebSystemInterface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93EB178C09F88D460091F8FF /* WebSystemInterface.mm */; }; 93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EB178E09F88D510091F8FF /* WebSystemInterface.h */; }; 93FDE9330D79CAF30074F029 /* WebHistoryInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FDE9320D79CAF30074F029 /* WebHistoryInternal.h */; }; + A5DEFC0A11D5331C00885273 /* WebSecurityOrigin.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5DEFC0711D5331C00885273 /* WebSecurityOrigin.mm */; }; + A5DEFC0B11D5331C00885273 /* WebSecurityOriginInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DEFC0811D5331C00885273 /* WebSecurityOriginInternal.h */; }; + A5DEFC0C11D5331C00885273 /* WebSecurityOriginPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DEFC0911D5331C00885273 /* WebSecurityOriginPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A5DEFC0F11D5343E00885273 /* WebDatabaseSecurityOrigin.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DEFC0D11D5343E00885273 /* WebDatabaseSecurityOrigin.h */; }; + A5DEFC1011D5343E00885273 /* WebDatabaseSecurityOrigin.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5DEFC0E11D5343E00885273 /* WebDatabaseSecurityOrigin.mm */; }; + A5DEFC1311D5344B00885273 /* WebApplicationCacheSecurityOrigin.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DEFC1111D5344B00885273 /* WebApplicationCacheSecurityOrigin.h */; }; + A5DEFC1411D5344B00885273 /* WebApplicationCacheSecurityOrigin.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5DEFC1211D5344B00885273 /* WebApplicationCacheSecurityOrigin.mm */; }; A70936AF0B5608DC00CDB48E /* WebDragClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A70936AD0B5608DC00CDB48E /* WebDragClient.h */; }; A70936B00B5608DC00CDB48E /* WebDragClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = A70936AE0B5608DC00CDB48E /* WebDragClient.mm */; }; A7D3C5BC0B5773C5002CA450 /* WebPasteboardHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D3C5BA0B5773C5002CA450 /* WebPasteboardHelper.h */; }; @@ -472,9 +476,6 @@ 449098B90F8F82DF0076A327 /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; }; 4BF99F8E0AE050BC00815C2B /* WebEditorClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebEditorClient.h; sourceTree = "<group>"; }; 4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebEditorClient.mm; sourceTree = "<group>"; }; - 51079D140CED11B00077247D /* WebSecurityOrigin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebSecurityOrigin.mm; sourceTree = "<group>"; }; - 51079D150CED11B00077247D /* WebSecurityOriginInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSecurityOriginInternal.h; sourceTree = "<group>"; }; - 51079D160CED11B00077247D /* WebSecurityOriginPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSecurityOriginPrivate.h; sourceTree = "<group>"; }; 511F3FD10CECC88F00852565 /* WebDatabaseManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDatabaseManager.mm; sourceTree = "<group>"; }; 511F3FD20CECC88F00852565 /* WebDatabaseManagerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDatabaseManagerPrivate.h; sourceTree = "<group>"; }; 511F3FD30CECC88F00852565 /* WebDatabaseTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDatabaseTrackerClient.h; sourceTree = "<group>"; }; @@ -607,6 +608,13 @@ 9CAE9D070252A4130ECA16EA /* WebPreferencesPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferencesPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 9CE1F8A302A5C6F30ECA2ACD /* WebImageRendererFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebImageRendererFactory.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 9CF0E249021361B00ECA16EA /* WebFramePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFramePrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; + A5DEFC0711D5331C00885273 /* WebSecurityOrigin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebSecurityOrigin.mm; sourceTree = "<group>"; }; + A5DEFC0811D5331C00885273 /* WebSecurityOriginInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSecurityOriginInternal.h; sourceTree = "<group>"; }; + A5DEFC0911D5331C00885273 /* WebSecurityOriginPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSecurityOriginPrivate.h; sourceTree = "<group>"; }; + A5DEFC0D11D5343E00885273 /* WebDatabaseSecurityOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDatabaseSecurityOrigin.h; sourceTree = "<group>"; }; + A5DEFC0E11D5343E00885273 /* WebDatabaseSecurityOrigin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDatabaseSecurityOrigin.mm; sourceTree = "<group>"; }; + A5DEFC1111D5344B00885273 /* WebApplicationCacheSecurityOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebApplicationCacheSecurityOrigin.h; sourceTree = "<group>"; }; + A5DEFC1211D5344B00885273 /* WebApplicationCacheSecurityOrigin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebApplicationCacheSecurityOrigin.mm; sourceTree = "<group>"; }; A70936AD0B5608DC00CDB48E /* WebDragClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebDragClient.h; sourceTree = "<group>"; }; A70936AE0B5608DC00CDB48E /* WebDragClient.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDragClient.mm; sourceTree = "<group>"; }; A7D3C5BA0B5773C5002CA450 /* WebPasteboardHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPasteboardHelper.h; sourceTree = "<group>"; }; @@ -1012,11 +1020,10 @@ 511F3FD10CECC88F00852565 /* WebDatabaseManager.mm */, 51AEDEF00CECF45700854328 /* WebDatabaseManagerInternal.h */, 511F3FD20CECC88F00852565 /* WebDatabaseManagerPrivate.h */, + A5DEFC0D11D5343E00885273 /* WebDatabaseSecurityOrigin.h */, + A5DEFC0E11D5343E00885273 /* WebDatabaseSecurityOrigin.mm */, 511F3FD30CECC88F00852565 /* WebDatabaseTrackerClient.h */, 511F3FD40CECC88F00852565 /* WebDatabaseTrackerClient.mm */, - 51079D140CED11B00077247D /* WebSecurityOrigin.mm */, - 51079D150CED11B00077247D /* WebSecurityOriginInternal.h */, - 51079D160CED11B00077247D /* WebSecurityOriginPrivate.h */, ); name = Storage; path = mac/Storage; @@ -1231,6 +1238,8 @@ children = ( B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */, B68049720FFBCEC1009F7F62 /* WebApplicationCache.mm */, + A5DEFC1111D5344B00885273 /* WebApplicationCacheSecurityOrigin.h */, + A5DEFC1211D5344B00885273 /* WebApplicationCacheSecurityOrigin.mm */, 51CBFCAC0D10E6C5002DBF51 /* WebCachedFramePlatformData.h */, 14D8252D0AF955090004F057 /* WebChromeClient.h */, 14D8252E0AF955090004F057 /* WebChromeClient.mm */, @@ -1260,6 +1269,9 @@ 1AA879B511CBE9BF003C664F /* WebPlatformStrategies.mm */, 0A2D87FB107AF52B00CDDEE3 /* WebPluginHalterClient.h */, 0A2D87FC107AF52B00CDDEE3 /* WebPluginHalterClient.mm */, + A5DEFC0711D5331C00885273 /* WebSecurityOrigin.mm */, + A5DEFC0811D5331C00885273 /* WebSecurityOriginInternal.h */, + A5DEFC0911D5331C00885273 /* WebSecurityOriginPrivate.h */, 93EB178E09F88D510091F8FF /* WebSystemInterface.h */, 93EB178C09F88D460091F8FF /* WebSystemInterface.mm */, F5F7174C02885C5B018635CA /* WebViewFactory.h */, @@ -1535,8 +1547,6 @@ C0167BF80D7F5DD00028696E /* WebScriptDebugger.h in Headers */, C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */, C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */, - 51079D180CED11B00077247D /* WebSecurityOriginInternal.h in Headers */, - 51079D190CED11B00077247D /* WebSecurityOriginPrivate.h in Headers */, BC26C69E10B743F400B687ED /* WebSerializedJSValue.h in Headers */, 939810270824BF01008DF038 /* WebStringTruncator.h in Headers */, 93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */, @@ -1557,6 +1567,10 @@ 939810710824BF01008DF038 /* WebViewPrivate.h in Headers */, 0FD3B0F81076C3F700039B96 /* WebWindowAnimation.h in Headers */, 41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */, + A5DEFC0B11D5331C00885273 /* WebSecurityOriginInternal.h in Headers */, + A5DEFC0C11D5331C00885273 /* WebSecurityOriginPrivate.h in Headers */, + A5DEFC0F11D5343E00885273 /* WebDatabaseSecurityOrigin.h in Headers */, + A5DEFC1311D5344B00885273 /* WebApplicationCacheSecurityOrigin.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1899,7 +1913,6 @@ 7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */, C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */, C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */, - 51079D170CED11B00077247D /* WebSecurityOrigin.mm in Sources */, BC26C6A510B7447A00B687ED /* WebSerializedJSValue.mm in Sources */, 939810CC0824BF01008DF038 /* WebStringTruncator.mm in Sources */, 93EB178D09F88D460091F8FF /* WebSystemInterface.mm in Sources */, @@ -1916,6 +1929,9 @@ 939810E80824BF01008DF038 /* WebViewFactory.mm in Sources */, 0FD3B0F91076C3F700039B96 /* WebWindowAnimation.m in Sources */, 41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */, + A5DEFC0A11D5331C00885273 /* WebSecurityOrigin.mm in Sources */, + A5DEFC1011D5343E00885273 /* WebDatabaseSecurityOrigin.mm in Sources */, + A5DEFC1411D5344B00885273 /* WebApplicationCacheSecurityOrigin.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog index 2c720e1..9a33ade 100644 --- a/WebKit/chromium/ChangeLog +++ b/WebKit/chromium/ChangeLog @@ -1,3 +1,252 @@ +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): + (WebKit::ChromeClientImpl::createPopupMenu): + (WebKit::ChromeClientImpl::createSearchPopupMenu): + * src/ChromeClientImpl.h: + +2010-08-02 Kent Tamura <tkent@chromium.org> + + Reviewed by Dimitri Glazkov. + + [DRT/Chromium] Always initialize GTK + https://bugs.webkit.org/show_bug.cgi?id=43327 + + * WebKit.gyp: Add GTK dependency for DRT. + +2010-08-02 Jeremy Orlow <jorlow@chromium.org> + + Speculative revert of 64425 due to Chromium instability + https://bugs.webkit.org/show_bug.cgi?id=43347 + + * src/ChromeClientImpl.cpp: + * src/ChromeClientImpl.h: + * tests/PopupMenuTest.cpp: + (WebKit::SelectPopupMenuTest::SetUp): + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): + (WebKit::ChromeClientImpl::createPopupMenu): + (WebKit::ChromeClientImpl::createSearchPopupMenu): + * src/ChromeClientImpl.h: + +2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64422. + http://trac.webkit.org/changeset/64422 + https://bugs.webkit.org/show_bug.cgi?id=43304 + + Build fixes are needed for Snow Leopard and Windows. + (Requested by lca on #webkit). + + * src/ChromeClientImpl.cpp: + * src/ChromeClientImpl.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): + (WebKit::ChromeClientImpl::createPopupMenu): + (WebKit::ChromeClientImpl::createSearchPopupMenu): + * src/ChromeClientImpl.h: + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::reachedApplicationCacheOriginQuota): + * src/ChromeClientImpl.h: + +2010-07-30 James Robinson <jamesr@chromium.org> + + Compile fix. Put GLES2 functions behind USE(GLES2_RENDERING) instead of + USE(ACCELERATED_COMPOSITING) to match WebCore. Fixes the compile when + USE(GLES2_RENDERING) is true and USE(ACCELERATED_COMPOSITING) is false. + + * src/ChromeClientImpl.cpp: + * src/ChromeClientImpl.h: + +2010-07-27 Darin Fisher <darin@chromium.org> + + Reviewed by Brady Eidson. + + History.pushState() + navigation operates on top frame when called from + nested context + https://bugs.webkit.org/show_bug.cgi?id=43080 + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::pluginLoadObserver): The WebDataSource + can be null if the Frame has already been detached from the Page. This + happens if a popstate event handler removes the frame. + +2010-07-29 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Steve Block. + + Rename all the IDBIndex classses to match the latest conventions + https://bugs.webkit.org/show_bug.cgi?id=43190 + + Fix up stuff in WebKit layer to handle the renamings in WebCore. + + * WebKit.gyp: + * src/IDBCallbacksProxy.cpp: + (WebCore::IDBCallbacksProxy::onSuccess): + * src/IDBCallbacksProxy.h: + * src/IDBIndexBackendProxy.cpp: Added. + (WebCore::IDBIndexBackendProxy::create): + (WebCore::IDBIndexBackendProxy::IDBIndexBackendProxy): + (WebCore::IDBIndexBackendProxy::~IDBIndexBackendProxy): + (WebCore::IDBIndexBackendProxy::name): + (WebCore::IDBIndexBackendProxy::keyPath): + (WebCore::IDBIndexBackendProxy::unique): + * src/IDBIndexBackendProxy.h: Added. + * src/IDBIndexProxy.cpp: Removed. + * src/IDBIndexProxy.h: Removed. + * src/IDBObjectStoreProxy.cpp: + (WebCore::IDBObjectStoreProxy::index): + * src/IDBObjectStoreProxy.h: + * src/WebIDBCallbacksImpl.cpp: + (WebCore::WebIDBCallbacksImpl::onSuccess): + * src/WebIDBIndexImpl.cpp: + (WebKit::WebIDBIndexImpl::WebIDBIndexImpl): + (WebKit::WebIDBIndexImpl::name): + (WebKit::WebIDBIndexImpl::keyPath): + (WebKit::WebIDBIndexImpl::unique): + * src/WebIDBIndexImpl.h: + * src/WebIDBObjectStoreImpl.cpp: + (WebKit::WebIDBObjectStoreImpl::index): + +2010-07-30 Satish Sampath <satish@chromium.org> + + Reviewed by Jeremy Orlow. + + Add a check for WebViewClient being null. + https://bugs.webkit.org/show_bug.cgi?id=43240 + + * src/SpeechInputClientImpl.cpp: + (WebKit::SpeechInputClientImpl::SpeechInputClientImpl): + +2010-07-30 Hans Wennborg <hans@chromium.org> + + Reviewed by Steve Block. + + Disable runtime switch for device orientation in chromium + https://bugs.webkit.org/show_bug.cgi?id=43237 + + Explicitly set the runtime switch for device orientation + in WebView::create until we implement the feature. + If the flag is accidentally on while no DeviceOrientationClient + is provided, the program will crash. + + * src/WebViewImpl.cpp: + (WebKit::WebView::create): + +2010-07-26 Andrei Popescu <andreip@google.com> + + Reviewed by Jeremy Orlow. + + [IndexedDB] IndexedDatabase should be called IDBFactory. + https://bugs.webkit.org/show_bug.cgi?id=42967 + + * WebKit.gyp: + * public/WebIDBFactory.h: Added. + (WebKit::WebIDBFactory::~WebIDBFactory): + (WebKit::WebIDBFactory::databases): + (WebKit::WebIDBFactory::open): + * public/WebIndexedDatabase.h: Removed. + * public/WebKitClient.h: + (WebKit::WebKitClient::idbFactory): + * src/ChromiumBridge.cpp: + (WebCore::ChromiumBridge::idbFactory): + * src/IDBFactoryBackendProxy.cpp: Added. + (WebCore::IDBFactoryBackendProxy::create): + (WebCore::IDBFactoryBackendProxy::IDBFactoryBackendProxy): + (WebCore::IDBFactoryBackendProxy::~IDBFactoryBackendProxy): + (WebCore::IDBFactoryBackendProxy::open): + * src/IDBFactoryBackendProxy.h: Added. + * src/IndexedDatabaseProxy.cpp: Removed. + * src/IndexedDatabaseProxy.h: Removed. + * src/WebIDBFactoryImpl.cpp: Added. + (WebKit::WebIDBFactory::create): + (WebKit::WebIDBFactoryImpl::WebIDBFactoryImpl): + (WebKit::WebIDBFactoryImpl::~WebIDBFactoryImpl): + (WebKit::WebIDBFactoryImpl::open): + * src/WebIDBFactoryImpl.h: Added. + * src/WebIndexedDatabaseImpl.cpp: Removed. + * src/WebIndexedDatabaseImpl.h: Removed. + +2010-07-29 Andrei Popescu <andreip@google.com> + + Reviewed by Jeremy Orlow. + + [IndexedDB] WebDOMStringList ctor is not exported and causes link errors for the multi-dll chromium build + https://bugs.webkit.org/show_bug.cgi?id=43186 + + Add WEBKIT_API to WebDOMStringList default ctor. + + * public/WebDOMStringList.h: + +2010-07-29 Satish Sampath <satish@chromium.org> + + Reviewed by Steve Block. + + Runtime feature switch for speech input + https://bugs.webkit.org/show_bug.cgi?id=43146 + + Add a runtime feature switch that decides whether speech input attributes are available or not. + Defaults to true. + + * public/WebRuntimeFeatures.h: + * src/SpeechInputClientImpl.cpp: + (WebKit::SpeechInputClientImpl::SpeechInputClientImpl): + * src/WebRuntimeFeatures.cpp: + (WebKit::WebRuntimeFeatures::enableSpeechInput): + (WebKit::WebRuntimeFeatures::isSpeechInputEnabled): + +2010-07-28 Kavita Kanetkar <kkanetkar@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: Enable UI for chromium's appcache inspection. + https://bugs.webkit.org/show_bug.cgi?id=43098 + + * src/js/DevTools.js: + (WebInspector.loaded): + 2010-07-28 Dominic Mazzoni <dmazzoni@google.com> Reviewed by Dimitri Glazkov. diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp index 97efddc..10f01e5 100644 --- a/WebKit/chromium/WebKit.gyp +++ b/WebKit/chromium/WebKit.gyp @@ -178,10 +178,10 @@ 'public/WebIDBCallbacks.h', 'public/WebIDBDatabase.h', 'public/WebIDBDatabaseError.h', + 'public/WebIDBFactory.h', 'public/WebIDBIndex.h', 'public/WebIDBKey.h', 'public/WebIDBObjectStore.h', - 'public/WebIndexedDatabase.h', 'public/WebInputElement.h', 'public/WebInputEvent.h', 'public/WebKit.h', @@ -321,12 +321,12 @@ 'src/IDBCallbacksProxy.h', 'src/IDBDatabaseProxy.cpp', 'src/IDBDatabaseProxy.h', - 'src/IDBIndexProxy.cpp', - 'src/IDBIndexProxy.h', + 'src/IDBFactoryBackendProxy.cpp', + 'src/IDBFactoryBackendProxy.h', + 'src/IDBIndexBackendProxy.cpp', + 'src/IDBIndexBackendProxy.h', 'src/IDBObjectStoreProxy.cpp', 'src/IDBObjectStoreProxy.h', - 'src/IndexedDatabaseProxy.cpp', - 'src/IndexedDatabaseProxy.h', 'src/InspectorClientImpl.cpp', 'src/InspectorClientImpl.h', 'src/InspectorFrontendClientImpl.cpp', @@ -417,6 +417,8 @@ 'src/WebIDBDatabaseError.cpp', 'src/WebIDBDatabaseImpl.cpp', 'src/WebIDBDatabaseImpl.h', + 'src/WebIDBFactoryImpl.cpp', + 'src/WebIDBFactoryImpl.h', 'src/WebIDBIndexImpl.cpp', 'src/WebIDBIndexImpl.h', 'src/WebIDBKey.cpp', @@ -425,8 +427,6 @@ 'src/WebImageCG.cpp', 'src/WebImageDecoder.cpp', 'src/WebImageSkia.cpp', - 'src/WebIndexedDatabaseImpl.cpp', - 'src/WebIndexedDatabaseImpl.h', 'src/WebInputElement.cpp', 'src/WebInputEvent.cpp', 'src/WebInputEventConversion.cpp', @@ -854,6 +854,13 @@ ] }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { + 'dependencies': [ + '<(chromium_src_dir)/build/linux/system.gyp:fontconfig', + '<(chromium_src_dir)/build/linux/system.gyp:gtk', + ], + 'include_dirs': [ + 'public/gtk', + ], 'copies': [{ 'destination': '<(PRODUCT_DIR)', 'files': [ diff --git a/WebKit/chromium/public/WebDOMStringList.h b/WebKit/chromium/public/WebDOMStringList.h index d88fcee..dabf1b7 100644 --- a/WebKit/chromium/public/WebDOMStringList.h +++ b/WebKit/chromium/public/WebDOMStringList.h @@ -46,7 +46,7 @@ class WebDOMStringList { public: ~WebDOMStringList() { reset(); } - WebDOMStringList(); + WEBKIT_API WebDOMStringList(); WebDOMStringList(const WebDOMStringList& l) { assign(l); } WebDOMStringList& operator=(const WebDOMStringList& l) { diff --git a/WebKit/chromium/public/WebIndexedDatabase.h b/WebKit/chromium/public/WebIDBFactory.h index 5517a0c..5eb6f58 100644..100755 --- a/WebKit/chromium/public/WebIndexedDatabase.h +++ b/WebKit/chromium/public/WebIDBFactory.h @@ -26,10 +26,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebIndexedDatabase_h -#define WebIndexedDatabase_h +#ifndef WebIDBFactory_h +#define WebIDBFactory_h #include "WebCommon.h" +#include "WebDOMStringList.h" #include "WebIDBCallbacks.h" #include "WebSecurityOrigin.h" #include "WebString.h" @@ -41,14 +42,14 @@ class WebIDBDatabase; class WebString; class WebSecurityOrigin; -// The entry point into the IndexedDatabase API. These classes match their _____Request and -// _____Sync counterparts in the spec, but operate only in an async manner. +// The entry point into the IndexedDatabase API. These classes match their Foo and +// FooSync counterparts in the spec, but operate only in an async manner. // http://dev.w3.org/2006/webapi/WebSimpleDB/ -class WebIndexedDatabase { +class WebIDBFactory { public: - WEBKIT_API static WebIndexedDatabase* create(); + WEBKIT_API static WebIDBFactory* create(); - virtual ~WebIndexedDatabase() { } + virtual ~WebIDBFactory() { } // The WebKit implementation of open ignores the WebFrame* parameter. virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame) @@ -66,4 +67,4 @@ public: } // namespace WebKit -#endif // WebIndexedDatabase_h +#endif // WebIDBFactory_h diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h index 48765ac..5959a1c 100644 --- a/WebKit/chromium/public/WebKitClient.h +++ b/WebKit/chromium/public/WebKitClient.h @@ -52,7 +52,7 @@ class WebCookieJar; class WebFileSystem; class WebGLES2Context; class WebGraphicsContext3D; -class WebIndexedDatabase; +class WebIDBFactory; class WebMessagePortChannel; class WebMimeRegistry; class WebPluginListBuilder; @@ -131,7 +131,7 @@ public: // Indexed Database ---------------------------------------------------- - virtual WebIndexedDatabase* indexedDatabase() { return 0; } + virtual WebIDBFactory* idbFactory() { return 0; } // Keygen -------------------------------------------------------------- diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h index 95307a2..517aad5 100644 --- a/WebKit/chromium/public/WebRuntimeFeatures.h +++ b/WebKit/chromium/public/WebRuntimeFeatures.h @@ -80,6 +80,9 @@ public: WEBKIT_API static void enableDeviceOrientation(bool); WEBKIT_API static bool isDeviceOrientationEnabled(); + WEBKIT_API static void enableSpeechInput(bool); + WEBKIT_API static bool isSpeechInputEnabled(); + private: WebRuntimeFeatures(); }; diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp index d43d88a..2a5c32e 100644 --- a/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/WebKit/chromium/src/ChromeClientImpl.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -55,7 +56,9 @@ #include "NotificationPresenterImpl.h" #include "Page.h" #include "PopupMenuChromium.h" +#include "SearchPopupMenuChromium.h" #include "ScriptController.h" +#include "SecurityOrigin.h" #include "WebGeolocationService.h" #if USE(V8) #include "V8Proxy.h" @@ -579,6 +582,11 @@ void ChromeClientImpl::reachedMaxAppCacheSize(int64_t spaceNeeded) { ASSERT_NOT_REACHED(); } + +void ChromeClientImpl::reachedApplicationCacheOriginQuota(SecurityOrigin*) +{ + ASSERT_NOT_REACHED(); +} #endif void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileChooser) @@ -734,7 +742,9 @@ void ChromeClientImpl::scheduleCompositingLayerSync() { m_webView->setRootLayerNeedsDisplay(); } +#endif +#if USE(GLES2_RENDERING) PassOwnPtr<GLES2Context> ChromeClientImpl::getOnscreenGLES2Context() { return m_webView->getOnscreenGLES2Context(); @@ -765,4 +775,19 @@ void ChromeClientImpl::exitFullscreenForNode(WebCore::Node* node) m_webView->client()->exitFullscreenForNode(WebNode(node)); } +bool ChromeClientImpl::selectItemWritingDirectionIsNatural() +{ + return false; +} + +PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuChromium(client)); +} + +PassRefPtr<SearchPopupMenu> ChromeClientImpl::createSearchPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuChromium(client)); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h index e824381..7f3febf 100644 --- a/WebKit/chromium/src/ChromeClientImpl.h +++ b/WebKit/chromium/src/ChromeClientImpl.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -32,12 +33,15 @@ #define ChromeClientImpl_h #include "ChromeClientChromium.h" +#include "PopupMenu.h" +#include "SearchPopupMenu.h" namespace WebCore { class AccessibilityObject; class FileChooser; class HTMLParserQuirks; class PopupContainer; +class PopupMenuClient; class SecurityOrigin; struct WindowFeatures; } @@ -118,6 +122,7 @@ public: WebCore::Frame*, const WebCore::String& databaseName); #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); + virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*); #endif #if ENABLE(NOTIFICATIONS) virtual WebCore::NotificationPresenter* notificationPresenter() const; @@ -145,7 +150,9 @@ public: // Sets a flag to specify that the view needs to be updated, so we need // to do an eager layout before the drawing. virtual void scheduleCompositingLayerSync(); +#endif +#if USE(GLES2_RENDERING) virtual PassOwnPtr<WebCore::GLES2Context> getOnscreenGLES2Context(); virtual PassOwnPtr<WebCore::GLES2Context> getOffscreenGLES2Context(); #endif @@ -165,6 +172,10 @@ public: void setCursor(const WebCursorInfo& cursor); void setCursorForPlugin(const WebCursorInfo& cursor); + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; + virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; + private: void getPopupMenuInfo(WebCore::PopupContainer*, WebPopupMenuInfo*); diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp index 78e0693..397ea17 100644 --- a/WebKit/chromium/src/ChromiumBridge.cpp +++ b/WebKit/chromium/src/ChromiumBridge.cpp @@ -77,7 +77,7 @@ #include "Cookie.h" #include "FrameView.h" #include "GraphicsContext.h" -#include "IndexedDatabaseProxy.h" +#include "IDBFactoryBackendProxy.h" #include "KURL.h" #include "NotImplemented.h" #include "PlatformContextSkia.h" @@ -493,11 +493,11 @@ long long ChromiumBridge::databaseGetFileSize(const String& vfsFileName) // Indexed Database ----------------------------------------------------------- -PassRefPtr<IndexedDatabase> ChromiumBridge::indexedDatabase() +PassRefPtr<IDBFactoryBackendInterface> ChromiumBridge::idbFactory() { // There's no reason why we need to allocate a new proxy each time, but // there's also no strong reason not to. - return IndexedDatabaseProxy::create(); + return IDBFactoryBackendProxy::create(); } // Keygen --------------------------------------------------------------------- diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp index dae9348..b416e35 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp +++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp @@ -1488,6 +1488,12 @@ PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver() { WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader( m_webFrame->frame()->loader()->activeDocumentLoader()); + if (!ds) { + // We can arrive here if a popstate event handler detaches this frame. + // FIXME: Remove this code once http://webkit.org/b/36202 is fixed. + ASSERT(!m_webFrame->frame()->page()); + return 0; + } return ds->releasePluginLoadObserver(); } diff --git a/WebKit/chromium/src/IDBCallbacksProxy.cpp b/WebKit/chromium/src/IDBCallbacksProxy.cpp index 3591bee..4489e9b 100644 --- a/WebKit/chromium/src/IDBCallbacksProxy.cpp +++ b/WebKit/chromium/src/IDBCallbacksProxy.cpp @@ -75,9 +75,9 @@ void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBDatabase> idbDatabase) m_callbacks.clear(); } -void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndex> idbIndex) +void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndexBackendInterface> backend) { - m_callbacks->onSuccess(new WebKit::WebIDBIndexImpl(idbIndex)); + m_callbacks->onSuccess(new WebKit::WebIDBIndexImpl(backend)); m_callbacks.clear(); } diff --git a/WebKit/chromium/src/IDBCallbacksProxy.h b/WebKit/chromium/src/IDBCallbacksProxy.h index c5a8858..10fc31a 100644 --- a/WebKit/chromium/src/IDBCallbacksProxy.h +++ b/WebKit/chromium/src/IDBCallbacksProxy.h @@ -50,7 +50,7 @@ public: virtual void onError(PassRefPtr<IDBDatabaseError>); virtual void onSuccess(); // For "null". virtual void onSuccess(PassRefPtr<IDBDatabase>); - virtual void onSuccess(PassRefPtr<IDBIndex>); + virtual void onSuccess(PassRefPtr<IDBIndexBackendInterface>); virtual void onSuccess(PassRefPtr<IDBKey>); virtual void onSuccess(PassRefPtr<IDBObjectStore>); virtual void onSuccess(PassRefPtr<SerializedScriptValue>); diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.cpp b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp index bee99b2..44cbb40 100644..100755 --- a/WebKit/chromium/src/IndexedDatabaseProxy.cpp +++ b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp @@ -27,15 +27,16 @@ */ #include "config.h" -#include "IndexedDatabaseProxy.h" +#include "IDBFactoryBackendProxy.h" +#include "DOMStringList.h" #include "IDBDatabaseError.h" #include "IDBDatabaseProxy.h" #include "WebFrameImpl.h" #include "WebIDBCallbacksImpl.h" #include "WebIDBDatabase.h" #include "WebIDBDatabaseError.h" -#include "WebIndexedDatabase.h" +#include "WebIDBFactory.h" #include "WebKit.h" #include "WebKitClient.h" @@ -43,24 +44,24 @@ namespace WebCore { -PassRefPtr<IndexedDatabase> IndexedDatabaseProxy::create() +PassRefPtr<IDBFactoryBackendInterface> IDBFactoryBackendProxy::create() { - return adoptRef(new IndexedDatabaseProxy()); + return adoptRef(new IDBFactoryBackendProxy()); } -IndexedDatabaseProxy::IndexedDatabaseProxy() - : m_webIndexedDatabase(WebKit::webKitClient()->indexedDatabase()) +IDBFactoryBackendProxy::IDBFactoryBackendProxy() + : m_webIDBFactory(WebKit::webKitClient()->idbFactory()) { } -IndexedDatabaseProxy::~IndexedDatabaseProxy() +IDBFactoryBackendProxy::~IDBFactoryBackendProxy() { } -void IndexedDatabaseProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame) +void IDBFactoryBackendProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame) { WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); - m_webIndexedDatabase->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame); + m_webIDBFactory->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame); } } // namespace WebCore diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.h b/WebKit/chromium/src/IDBFactoryBackendProxy.h index 53097f0..969a9d7 100644..100755 --- a/WebKit/chromium/src/IndexedDatabaseProxy.h +++ b/WebKit/chromium/src/IDBFactoryBackendProxy.h @@ -26,34 +26,37 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef IndexedDatabaseProxy_h -#define IndexedDatabaseProxy_h +#ifndef IDBFactoryBackendProxy_h +#define IDBFactoryBackendProxy_h -#include "IndexedDatabase.h" +#include "IDBFactoryBackendInterface.h" #if ENABLE(INDEXED_DATABASE) -namespace WebKit { class WebIndexedDatabase; } +namespace WebKit { class WebIDBFactory; } namespace WebCore { -class IndexedDatabaseProxy : public IndexedDatabase { +class DOMStringList; + +class IDBFactoryBackendProxy : public IDBFactoryBackendInterface { public: - static PassRefPtr<IndexedDatabase> create(); - virtual ~IndexedDatabaseProxy(); + static PassRefPtr<IDBFactoryBackendInterface> create(); + virtual ~IDBFactoryBackendProxy(); + PassRefPtr<DOMStringList> databases(void) const; virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*); private: - IndexedDatabaseProxy(); + IDBFactoryBackendProxy(); // We don't own this pointer (unlike all the other proxy classes which do). - WebKit::WebIndexedDatabase* m_webIndexedDatabase; + WebKit::WebIDBFactory* m_webIDBFactory; }; } // namespace WebCore #endif -#endif // IndexedDatabaseProxy_h +#endif // IDBFactoryBackendProxy_h diff --git a/WebKit/chromium/src/IDBIndexProxy.cpp b/WebKit/chromium/src/IDBIndexBackendProxy.cpp index f80eff3..5f1b9d9 100644 --- a/WebKit/chromium/src/IDBIndexProxy.cpp +++ b/WebKit/chromium/src/IDBIndexBackendProxy.cpp @@ -24,7 +24,7 @@ */ #include "config.h" -#include "IDBIndexProxy.h" +#include "IDBIndexBackendProxy.h" #include "WebIDBDatabaseError.h" #include "WebIDBIndex.h" @@ -33,31 +33,31 @@ namespace WebCore { -PassRefPtr<IDBIndex> IDBIndexProxy::create(PassOwnPtr<WebKit::WebIDBIndex> Index) +PassRefPtr<IDBIndexBackendInterface> IDBIndexBackendProxy::create(PassOwnPtr<WebKit::WebIDBIndex> index) { - return adoptRef(new IDBIndexProxy(Index)); + return adoptRef(new IDBIndexBackendProxy(index)); } -IDBIndexProxy::IDBIndexProxy(PassOwnPtr<WebKit::WebIDBIndex> Index) - : m_webIDBIndex(Index) +IDBIndexBackendProxy::IDBIndexBackendProxy(PassOwnPtr<WebKit::WebIDBIndex> index) + : m_webIDBIndex(index) { } -IDBIndexProxy::~IDBIndexProxy() +IDBIndexBackendProxy::~IDBIndexBackendProxy() { } -String IDBIndexProxy::name() +String IDBIndexBackendProxy::name() { return m_webIDBIndex->name(); } -String IDBIndexProxy::keyPath() +String IDBIndexBackendProxy::keyPath() { return m_webIDBIndex->keyPath(); } -bool IDBIndexProxy::unique() +bool IDBIndexBackendProxy::unique() { return m_webIDBIndex->unique(); } diff --git a/WebKit/chromium/src/IDBIndexProxy.h b/WebKit/chromium/src/IDBIndexBackendProxy.h index 35e6b30..1b378dd 100644 --- a/WebKit/chromium/src/IDBIndexProxy.h +++ b/WebKit/chromium/src/IDBIndexBackendProxy.h @@ -23,13 +23,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef IDBIndexProxy_h -#define IDBIndexProxy_h +#ifndef IDBIndexBackendProxy_h +#define IDBIndexBackendProxy_h -#include "IDBIndex.h" +#include "IDBIndexBackendInterface.h" #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> #if ENABLE(INDEXED_DATABASE) @@ -37,10 +36,10 @@ namespace WebKit { class WebIDBIndex; } namespace WebCore { -class IDBIndexProxy : public IDBIndex { +class IDBIndexBackendProxy : public IDBIndexBackendInterface { public: - static PassRefPtr<IDBIndex> create(PassOwnPtr<WebKit::WebIDBIndex>); - virtual ~IDBIndexProxy(); + static PassRefPtr<IDBIndexBackendInterface> create(PassOwnPtr<WebKit::WebIDBIndex>); + virtual ~IDBIndexBackendProxy(); virtual String name(); virtual String keyPath(); @@ -49,7 +48,7 @@ public: // FIXME: Add other methods. private: - IDBIndexProxy(PassOwnPtr<WebKit::WebIDBIndex>); + IDBIndexBackendProxy(PassOwnPtr<WebKit::WebIDBIndex>); OwnPtr<WebKit::WebIDBIndex> m_webIDBIndex; }; @@ -58,4 +57,4 @@ private: #endif -#endif // IDBIndexProxy_h +#endif // IDBIndexBackendProxy_h diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/WebKit/chromium/src/IDBObjectStoreProxy.cpp index cec4ed3..858ed20 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.cpp +++ b/WebKit/chromium/src/IDBObjectStoreProxy.cpp @@ -28,7 +28,7 @@ #include "DOMStringList.h" #include "IDBCallbacks.h" -#include "IDBIndexProxy.h" +#include "IDBIndexBackendProxy.h" #include "WebIDBCallbacksImpl.h" #include "WebIDBIndex.h" #include "WebIDBKey.h" @@ -88,12 +88,12 @@ void IDBObjectStoreProxy::createIndex(const String& name, const String& keyPath, m_webIDBObjectStore->createIndex(name, keyPath, unique, new WebIDBCallbacksImpl(callbacks)); } -PassRefPtr<IDBIndex> IDBObjectStoreProxy::index(const String& name) +PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::index(const String& name) { WebKit::WebIDBIndex* index = m_webIDBObjectStore->index(name); if (!index) return 0; - return IDBIndexProxy::create(index); + return IDBIndexBackendProxy::create(index); } void IDBObjectStoreProxy::removeIndex(const String& name, PassRefPtr<IDBCallbacks> callbacks) diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.h b/WebKit/chromium/src/IDBObjectStoreProxy.h index b8e4a01..b380bdc 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.h +++ b/WebKit/chromium/src/IDBObjectStoreProxy.h @@ -37,9 +37,6 @@ namespace WebKit { class WebIDBObjectStore; } namespace WebCore { -class DOMStringList; -class IDBIndex; - class IDBObjectStoreProxy : public IDBObjectStore { public: static PassRefPtr<IDBObjectStore> create(PassOwnPtr<WebKit::WebIDBObjectStore>); @@ -54,7 +51,7 @@ public: void remove(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>); void createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks>); - PassRefPtr<IDBIndex> index(const String& name); + PassRefPtr<IDBIndexBackendInterface> index(const String& name); void removeIndex(const String& name, PassRefPtr<IDBCallbacks>); private: diff --git a/WebKit/chromium/src/SpeechInputClientImpl.cpp b/WebKit/chromium/src/SpeechInputClientImpl.cpp index 8bccacf..66525e3 100644 --- a/WebKit/chromium/src/SpeechInputClientImpl.cpp +++ b/WebKit/chromium/src/SpeechInputClientImpl.cpp @@ -42,10 +42,9 @@ namespace WebKit { SpeechInputClientImpl::SpeechInputClientImpl(WebViewClient* web_view_client) - : m_controller(web_view_client->speechInputController(this)) + : m_controller(web_view_client ? web_view_client->speechInputController(this) : 0) , m_listener(0) { - ASSERT(m_controller); } SpeechInputClientImpl::~SpeechInputClientImpl() diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp index 21c9eed..dbf7d85 100644 --- a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp +++ b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp @@ -29,7 +29,7 @@ #include "IDBCallbacks.h" #include "IDBDatabaseError.h" #include "IDBDatabaseProxy.h" -#include "IDBIndexProxy.h" +#include "IDBIndexBackendProxy.h" #include "IDBKey.h" #include "IDBObjectStoreProxy.h" #include "WebIDBCallbacks.h" @@ -79,7 +79,7 @@ void WebIDBCallbacksImpl::onSuccess(const WebKit::WebIDBKey& key) void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBIndex* webKitInstance) { - m_callbacks->onSuccess(IDBIndexProxy::create(webKitInstance)); + m_callbacks->onSuccess(IDBIndexBackendProxy::create(webKitInstance)); m_callbacks.clear(); } diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBFactoryImpl.cpp index 27a6247..5ac89f4 100644..100755 --- a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp +++ b/WebKit/chromium/src/WebIDBFactoryImpl.cpp @@ -29,10 +29,11 @@ */ #include "config.h" -#include "WebIndexedDatabaseImpl.h" +#include "WebIDBFactoryImpl.h" +#include "DOMStringList.h" #include "IDBCallbacksProxy.h" -#include "IndexedDatabaseImpl.h" +#include "IDBFactoryBackendImpl.h" #include "SecurityOrigin.h" #include "WebIDBDatabaseError.h" #include <wtf/OwnPtr.h> @@ -43,23 +44,23 @@ using namespace WebCore; namespace WebKit { -WebIndexedDatabase* WebIndexedDatabase::create() +WebIDBFactory* WebIDBFactory::create() { - return new WebIndexedDatabaseImpl(); + return new WebIDBFactoryImpl(); } -WebIndexedDatabaseImpl::WebIndexedDatabaseImpl() - : m_indexedDatabase(WebCore::IndexedDatabaseImpl::create()) +WebIDBFactoryImpl::WebIDBFactoryImpl() + : m_idbFactoryBackend(WebCore::IDBFactoryBackendImpl::create()) { } -WebIndexedDatabaseImpl::~WebIndexedDatabaseImpl() +WebIDBFactoryImpl::~WebIDBFactoryImpl() { } -void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*) +void WebIDBFactoryImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*) { - m_indexedDatabase->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0); + m_idbFactoryBackend->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0); } } // namespace WebKit diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.h b/WebKit/chromium/src/WebIDBFactoryImpl.h index 76781e5..c9ec9a3 100644..100755 --- a/WebKit/chromium/src/WebIndexedDatabaseImpl.h +++ b/WebKit/chromium/src/WebIDBFactoryImpl.h @@ -26,27 +26,28 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebIndexedDatabaseImpl_h -#define WebIndexedDatabaseImpl_h +#ifndef WebIDBFactoryImpl_h +#define WebIDBFactoryImpl_h -#include "WebIndexedDatabase.h" +#include "WebDOMStringList.h" +#include "WebIDBFactory.h" #include <wtf/RefPtr.h> -namespace WebCore { class IndexedDatabase; } +namespace WebCore { class IDBFactoryBackendInterface; } namespace WebKit { -class WebIndexedDatabaseImpl : public WebIndexedDatabase { +class WebIDBFactoryImpl : public WebIDBFactory { public: - WebIndexedDatabaseImpl(); - virtual ~WebIndexedDatabaseImpl(); + WebIDBFactoryImpl(); + virtual ~WebIDBFactoryImpl(); virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*); private: - WTF::RefPtr<WebCore::IndexedDatabase> m_indexedDatabase; + WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend; }; } // namespace WebKit -#endif // WebIndexedDatabaseImpl_h +#endif // WebIDBFactoryImpl_h diff --git a/WebKit/chromium/src/WebIDBIndexImpl.cpp b/WebKit/chromium/src/WebIDBIndexImpl.cpp index 304217c..777ec32 100644 --- a/WebKit/chromium/src/WebIDBIndexImpl.cpp +++ b/WebKit/chromium/src/WebIDBIndexImpl.cpp @@ -34,8 +34,8 @@ using namespace WebCore; namespace WebKit { -WebIDBIndexImpl::WebIDBIndexImpl(PassRefPtr<IDBIndex> idbIndex) - : m_idbIndex(idbIndex) +WebIDBIndexImpl::WebIDBIndexImpl(PassRefPtr<IDBIndexBackendInterface> backend) + : m_backend(backend) { } @@ -45,17 +45,17 @@ WebIDBIndexImpl::~WebIDBIndexImpl() WebString WebIDBIndexImpl::name() const { - return m_idbIndex->name(); + return m_backend->name(); } WebString WebIDBIndexImpl::keyPath() const { - return m_idbIndex->keyPath(); + return m_backend->keyPath(); } bool WebIDBIndexImpl::unique() const { - return m_idbIndex->unique(); + return m_backend->unique(); } } // namespace WebCore diff --git a/WebKit/chromium/src/WebIDBIndexImpl.h b/WebKit/chromium/src/WebIDBIndexImpl.h index e1f0538..73f3819 100644 --- a/WebKit/chromium/src/WebIDBIndexImpl.h +++ b/WebKit/chromium/src/WebIDBIndexImpl.h @@ -31,14 +31,14 @@ #include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> -namespace WebCore { class IDBIndex; } +namespace WebCore { class IDBIndexBackendInterface; } namespace WebKit { // See comment in WebIndexedDatabase for a high level overview these classes. class WebIDBIndexImpl : public WebIDBIndex { public: - WebIDBIndexImpl(WTF::PassRefPtr<WebCore::IDBIndex> idbIndex); + WebIDBIndexImpl(WTF::PassRefPtr<WebCore::IDBIndexBackendInterface>); virtual ~WebIDBIndexImpl(); virtual WebString name() const; @@ -46,7 +46,7 @@ public: virtual bool unique() const; private: - WTF::RefPtr<WebCore::IDBIndex> m_idbIndex; + WTF::RefPtr<WebCore::IDBIndexBackendInterface> m_backend; }; } // namespace WebKit diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp index d8e98db..7b6a32a 100755 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp +++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp @@ -85,7 +85,7 @@ void WebIDBObjectStoreImpl::createIndex(const WebString& name, const WebString& WebIDBIndex* WebIDBObjectStoreImpl::index(const WebString& name) { - RefPtr<IDBIndex> index = m_objectStore->index(name); + RefPtr<IDBIndexBackendInterface> index = m_objectStore->index(name); if (!index) return 0; return new WebIDBIndexImpl(index); diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp index efb287c..217553b 100644 --- a/WebKit/chromium/src/WebRuntimeFeatures.cpp +++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp @@ -236,4 +236,14 @@ bool WebRuntimeFeatures::isDeviceOrientationEnabled() return RuntimeEnabledFeatures::deviceOrientationEnabled(); } +void WebRuntimeFeatures::enableSpeechInput(bool enable) +{ + RuntimeEnabledFeatures::setSpeechInputEnabled(enable); +} + +bool WebRuntimeFeatures::isSpeechInputEnabled() +{ + return RuntimeEnabledFeatures::speechInputEnabled(); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp index bb6d07c..691f143 100644 --- a/WebKit/chromium/src/WebViewImpl.cpp +++ b/WebKit/chromium/src/WebViewImpl.cpp @@ -106,6 +106,7 @@ #include "WebPoint.h" #include "WebPopupMenuImpl.h" #include "WebRect.h" +#include "WebRuntimeFeatures.h" #include "WebSettingsImpl.h" #include "WebString.h" #include "WebVector.h" @@ -176,6 +177,9 @@ static const PopupContainerSettings autoFillPopupSettings = { WebView* WebView::create(WebViewClient* client, WebDevToolsAgentClient* devToolsClient) { + // Keep runtime flag for device orientation turned off until it's implemented. + WebRuntimeFeatures::enableDeviceOrientation(false); + // Pass the WebViewImpl's self-reference to the caller. return adoptRef(new WebViewImpl(client, devToolsClient)).leakRef(); } diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js index 640474b..674f1d7 100644 --- a/WebKit/chromium/src/js/DevTools.js +++ b/WebKit/chromium/src/js/DevTools.js @@ -165,8 +165,7 @@ WebInspector.loaded = function() Preferences.debuggerAlwaysEnabled = true; Preferences.profilerAlwaysEnabled = true; Preferences.canEditScriptSource = true; - Preferences.appCacheEnabled = false; - + if ("page" in WebInspector._paramsObject) { WebInspector.loadedDone = true; if (WebInspector.socketOpened) diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp index 44b262d..50319af 100644 --- a/WebKit/chromium/tests/PopupMenuTest.cpp +++ b/WebKit/chromium/tests/PopupMenuTest.cpp @@ -180,7 +180,7 @@ protected: { m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webviewClient, 0)); m_webView->initializeMainFrame(&m_webFrameClient); - m_popupMenu = PopupMenu::create(&m_popupMenuClient); + m_popupMenu = adoptRef(new PopupMenuChromium(&m_popupMenuClient)); } virtual void TearDown() diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog index ad44392..80595aa 100644 --- a/WebKit/efl/ChangeLog +++ b/WebKit/efl/ChangeLog @@ -1,3 +1,74 @@ +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientEfl.cpp: + (WebCore::ChromeClientEfl::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientEfl::createPopupMenu): + (WebCore::ChromeClientEfl::createSearchPopupMenu): + * WebCoreSupport/ChromeClientEfl.h: + +2010-08-02 Jeremy Orlow <jorlow@chromium.org> + + Speculative revert of 64425 due to Chromium instability + https://bugs.webkit.org/show_bug.cgi?id=43347 + + * WebCoreSupport/ChromeClientEfl.cpp: + * WebCoreSupport/ChromeClientEfl.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientEfl.cpp: + (WebCore::ChromeClientEfl::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientEfl::createPopupMenu): + (WebCore::ChromeClientEfl::createSearchPopupMenu): + * WebCoreSupport/ChromeClientEfl.h: + +2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64422. + http://trac.webkit.org/changeset/64422 + https://bugs.webkit.org/show_bug.cgi?id=43304 + + Build fixes are needed for Snow Leopard and Windows. + (Requested by lca on #webkit). + + * WebCoreSupport/ChromeClientEfl.cpp: + * WebCoreSupport/ChromeClientEfl.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientEfl.cpp: + (WebCore::ChromeClientEfl::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientEfl::createPopupMenu): + (WebCore::ChromeClientEfl::createSearchPopupMenu): + * WebCoreSupport/ChromeClientEfl.h: + 2010-07-26 Steve Block <steveblock@google.com> Reviewed by Jeremy Orlow. diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp index ffbd642..21747a1 100644 --- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp +++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp @@ -5,6 +5,7 @@ * Copyright (C) 2008 Diego Gonzalez * Copyright (C) 2009-2010 ProFUSION embedded systems * Copyright (C) 2009-2010 Samsung Electronics + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * All rights reserved. * @@ -47,6 +48,9 @@ #include "KURL.h" #include "NotImplemented.h" #include "PlatformString.h" +#include "SecurityOrigin.h" +#include "PopupMenuEfl.h" +#include "SearchPopupMenuEfl.h" #include "ViewportArguments.h" #include "WindowFeatures.h" #include "ewk_private.h" @@ -376,6 +380,11 @@ void ChromeClientEfl::reachedMaxAppCacheSize(int64_t spaceNeeded) // FIXME: Free some space. notImplemented(); } + +void ChromeClientEfl::reachedApplicationCacheOriginQuota(SecurityOrigin*) +{ + notImplemented(); +} #endif #if ENABLE(DATABASE) @@ -513,4 +522,19 @@ void ChromeClientEfl::didReceiveViewportArguments(Frame* frame, const ViewportAr ewk_view_viewport_set(m_view, arguments.width, arguments.height, arguments.initialScale, arguments.minimumScale, arguments.maximumScale, arguments.userScalable); } +bool ChromeClientEfl::selectItemWritingDirectionIsNatural() +{ + return true; +} + +PassRefPtr<PopupMenu> ChromeClientEfl::createPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuEfl(client)); +} + +PassRefPtr<SearchPopupMenu> ChromeClientEfl::createSearchPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuEfl(client)); +} + } diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h index ce8abd1..d939ae6 100644 --- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h +++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h @@ -3,6 +3,7 @@ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia * Copyright (C) 2009-2010 ProFUSION embedded systems * Copyright (C) 2009-2010 Samsung Electronics + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -111,6 +112,7 @@ public: #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); + virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*); #endif virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); @@ -137,6 +139,10 @@ public: virtual void didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const; + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; + virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; + Evas_Object* m_view; KURL m_hoveredLinkURL; }; diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog index bf1777d..3d3436f 100644 --- a/WebKit/gtk/ChangeLog +++ b/WebKit/gtk/ChangeLog @@ -1,3 +1,126 @@ +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::selectItemWritingDirectionIsNatural): + (WebKit::ChromeClient::createPopupMenu): + (WebKit::ChromeClient::createSearchPopupMenu): + * WebCoreSupport/ChromeClientGtk.h: + +2010-08-02 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] Create a frame-created signal + https://bugs.webkit.org/show_bug.cgi?id=43284 + + Add a frame-created signal, which will allow developers to track + the beginning of a frame lifecycle and attach signal handlers to + all new frames. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::createFrame): Emit the frame-created signal. + * tests/testwebframe.c: Add a test which verifies that the correct number of + frame-created signals is fired when a page with iframes loads. + (createFrameSignalTestFrameCreatedCallback): Added. + (createFrameSignalTestTimeout): Added. + (test_webkit_web_frame_created_signal): Added. + (main): Add a reference to the new test. + * webkit/webkitprivate.h: De-normalize webkit_web_frame_init_with_web_view into + the one place that it is used, so that the frame-created signal may be fired there. + * webkit/webkitwebframe.cpp: Remove webkit_web_frame_init_with_web_view. + * webkit/webkitwebview.cpp: + (webkit_web_view_class_init): Add the frame-created signal declaration. + +2010-08-02 Mario Sanchez Prada <msanchez@igalia.com> + + Reviewed by Chris Fleizach. + + [GTK] Implement support for get_character_extents and get_range_extents + https://bugs.webkit.org/show_bug.cgi?id=25677 + + Added new unit tests to check get_character_extents and + get_range_extents functions for the ATK_TEXT interface + + Based on a previous patch by Joanmarie Diggs. + + * tests/testatk.c: + (test_webkit_atk_get_extents): + (main): + +2010-08-02 Jeremy Orlow <jorlow@chromium.org> + + Speculative revert of 64425 due to Chromium instability + https://bugs.webkit.org/show_bug.cgi?id=43347 + + * WebCoreSupport/ChromeClientGtk.cpp: + * WebCoreSupport/ChromeClientGtk.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::selectItemWritingDirectionIsNatural): + (WebKit::ChromeClient::createPopupMenu): + (WebKit::ChromeClient::createSearchPopupMenu): + * WebCoreSupport/ChromeClientGtk.h: + +2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64422. + http://trac.webkit.org/changeset/64422 + https://bugs.webkit.org/show_bug.cgi?id=43304 + + Build fixes are needed for Snow Leopard and Windows. + (Requested by lca on #webkit). + + * WebCoreSupport/ChromeClientGtk.cpp: + * WebCoreSupport/ChromeClientGtk.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::selectItemWritingDirectionIsNatural): + (WebKit::ChromeClient::createPopupMenu): + (WebKit::ChromeClient::createSearchPopupMenu): + * WebCoreSupport/ChromeClientGtk.h: + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::reachedApplicationCacheOriginQuota): + * WebCoreSupport/ChromeClientGtk.h: + 2010-07-26 Steve Block <steveblock@google.com> Reviewed by Jeremy Orlow. diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp index 88440ba..081c942 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp @@ -4,6 +4,7 @@ * Copyright (C) 2008 Nuanti Ltd. * Copyright (C) 2008 Alp Toker <alp@atoker.com> * Copyright (C) 2008 Gustavo Noronha Silva <gns@gnome.org> + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -30,10 +31,14 @@ #include "FrameLoadRequest.h" #include "GtkVersioning.h" #include "IntRect.h" -#include "PlatformString.h" #include "HitTestResult.h" #include "Icon.h" #include "KURL.h" +#include "PlatformString.h" +#include "PopupMenuClient.h" +#include "PopupMenuGtk.h" +#include "SearchPopupMenuGtk.h" +#include "SecurityOrigin.h" #include "webkitgeolocationpolicydecision.h" #include "webkitwebview.h" #include "webkitnetworkrequest.h" @@ -549,6 +554,11 @@ void ChromeClient::reachedMaxAppCacheSize(int64_t spaceNeeded) // FIXME: Free some space. notImplemented(); } + +void ChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin*) +{ + notImplemented(); +} #endif void ChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser) @@ -616,4 +626,19 @@ void ChromeClient::cancelGeolocationPermissionRequestForFrame(WebCore::Frame* fr g_signal_emit_by_name(webView, "geolocation-policy-decision-cancelled", webFrame); } +bool ChromeClient::selectItemWritingDirectionIsNatural() +{ + return true; +} + +PassRefPtr<WebCore::PopupMenu> ChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuGtk(client)); +} + +PassRefPtr<WebCore::SearchPopupMenu> ChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuGtk(client)); +} + } diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h index ce5c5a7..8c667c4 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2007 Holger Hans Peter Freyther + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -22,9 +23,15 @@ #include "ChromeClient.h" #include "KURL.h" +#include "PopupMenu.h" +#include "SearchPopupMenu.h" typedef struct _WebKitWebView WebKitWebView; +namespace WebCore { +class PopupMenuClient; +} + namespace WebKit { class ChromeClient : public WebCore::ChromeClient { @@ -108,6 +115,7 @@ namespace WebKit { #endif #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); + virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*); #endif virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*); @@ -122,6 +130,10 @@ namespace WebKit { virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*); + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; + virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; + private: WebKitWebView* m_webView; WebCore::KURL m_hoveredLinkURL; diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index 340b789..98ac4a1 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -5,6 +5,7 @@ * Copyright (C) 2008, 2009 Collabora Ltd. All rights reserved. * Copyright (C) 2009, 2010 Gustavo Noronha Silva <gns@gnome.org> * Copyright (C) Research In Motion Limited 2009. All rights reserved. + * Copyright (C) 2010 Igalia S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -472,14 +473,20 @@ PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HT PassRefPtr<Frame> FrameLoaderClient::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) { - Frame* coreFrame = core(m_frame); - - ASSERT(core(getViewFromFrame(m_frame)) == coreFrame->page()); + ASSERT(m_frame); + Frame* parentFrame = core(m_frame); + WebKitWebView* webView = getViewFromFrame(m_frame); + WebCore::Page* page = core(webView); + ASSERT(page == parentFrame->page()); - RefPtr<Frame> childFrame = webkit_web_frame_init_with_web_view(getViewFromFrame(m_frame), ownerElement); + WebKitWebFrame* kitFrame = WEBKIT_WEB_FRAME(g_object_new(WEBKIT_TYPE_WEB_FRAME, NULL)); + WebKitWebFramePrivate* framePrivate = kitFrame->priv; + framePrivate->webView = webView; - coreFrame->tree()->appendChild(childFrame); + RefPtr<Frame> childFrame = Frame::create(page, ownerElement, new FrameLoaderClient(kitFrame)); + framePrivate->coreFrame = childFrame.get(); + parentFrame->tree()->appendChild(childFrame); childFrame->tree()->setName(name); childFrame->init(); @@ -493,6 +500,7 @@ PassRefPtr<Frame> FrameLoaderClient::createFrame(const KURL& url, const String& if (!childFrame->tree()->parent()) return 0; + g_signal_emit_by_name(webView, "frame-created", kitFrame); return childFrame.release(); } diff --git a/WebKit/gtk/tests/testatk.c b/WebKit/gtk/tests/testatk.c index 8f13a95..e159f8a 100644 --- a/WebKit/gtk/tests/testatk.c +++ b/WebKit/gtk/tests/testatk.c @@ -26,6 +26,8 @@ #if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0) +static const char* centeredContents = "<html><body><p style='text-align: center;'>Short line</p><p style='text-align: center;'>Long-size line with some foo bar baz content</p><p style='text-align: center;'>Short line</p><p style='text-align: center;'>This is a multi-line paragraph<br />where the first line<br />is the biggest one</p></body></html>"; + static const char* contents = "<html><body><p>This is a test. This is the second sentence. And this the third.</p></body></html>"; static const char* contentsWithNewlines = "<html><body><p>This is a test. \n\nThis\n is the second sentence. And this the third.</p></body></html>"; @@ -738,6 +740,109 @@ static void testWebkitAtkTextAttributes(void) atk_attribute_set_free(set3); } +static void test_webkit_atk_get_extents(void) +{ + WebKitWebView* webView; + AtkObject* obj; + GMainLoop* loop; + + webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(webView); + GtkAllocation alloc = { 0, 0, 800, 600 }; + gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc); + webkit_web_view_load_string(webView, centeredContents, NULL, NULL, NULL); + loop = g_main_loop_new(NULL, TRUE); + + g_timeout_add(100, (GSourceFunc)bail_out, loop); + g_main_loop_run(loop); + + obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); + g_assert(obj); + + AtkText* short_text1 = ATK_TEXT(atk_object_ref_accessible_child(obj, 0)); + g_assert(ATK_IS_TEXT(short_text1)); + AtkText* long_text = ATK_TEXT(atk_object_ref_accessible_child(obj, 1)); + g_assert(ATK_IS_TEXT(long_text)); + AtkText* short_text2 = ATK_TEXT(atk_object_ref_accessible_child(obj, 2)); + g_assert(ATK_IS_TEXT(short_text2)); + AtkText* multiline_text = ATK_TEXT(atk_object_ref_accessible_child(obj, 3)); + g_assert(ATK_IS_TEXT(multiline_text)); + + // Start with window extents. + AtkTextRectangle sline_window1, sline_window2, lline_window, mline_window; + atk_text_get_range_extents(short_text1, 0, 10, ATK_XY_WINDOW, &sline_window1); + atk_text_get_range_extents(long_text, 0, 44, ATK_XY_WINDOW, &lline_window); + atk_text_get_range_extents(short_text2, 0, 10, ATK_XY_WINDOW, &sline_window2); + atk_text_get_range_extents(multiline_text, 0, 60, ATK_XY_WINDOW, &mline_window); + + // Check vertical line position. + g_assert_cmpint(sline_window1.y + sline_window1.height, <=, lline_window.y); + g_assert_cmpint(lline_window.y + lline_window.height + sline_window2.height, <=, mline_window.y); + + // Paragraphs 1 and 3 have identical text and alignment. + g_assert_cmpint(sline_window1.x, ==, sline_window2.x); + g_assert_cmpint(sline_window1.width, ==, sline_window2.width); + g_assert_cmpint(sline_window1.height, ==, sline_window2.height); + + // All lines should be the same height; line 2 is the widest line. + g_assert_cmpint(sline_window1.height, ==, lline_window.height); + g_assert_cmpint(sline_window1.width, <, lline_window.width); + + // Make sure the character extents jive with the range extents. + gint x, y, width, height; + + // First paragraph (short text) + atk_text_get_character_extents(short_text1, 0, &x, &y, &width, &height, ATK_XY_WINDOW); + g_assert_cmpint(x, ==, sline_window1.x); + g_assert_cmpint(y, ==, sline_window1.y); + g_assert_cmpint(height, ==, sline_window1.height); + + atk_text_get_character_extents(short_text1, 9, &x, &y, &width, &height, ATK_XY_WINDOW); + g_assert_cmpint(x, ==, sline_window1.x + sline_window1.width - width); + g_assert_cmpint(y, ==, sline_window1.y); + g_assert_cmpint(height, ==, sline_window1.height); + + // Second paragraph (long text) + atk_text_get_character_extents(long_text, 0, &x, &y, &width, &height, ATK_XY_WINDOW); + g_assert_cmpint(x, ==, lline_window.x); + g_assert_cmpint(y, ==, lline_window.y); + g_assert_cmpint(height, ==, lline_window.height); + + atk_text_get_character_extents(long_text, 43, &x, &y, &width, &height, ATK_XY_WINDOW); + g_assert_cmpint(x, ==, lline_window.x + lline_window.width - width); + g_assert_cmpint(y, ==, lline_window.y); + g_assert_cmpint(height, ==, lline_window.height); + + // Third paragraph (short text) + atk_text_get_character_extents(short_text2, 0, &x, &y, &width, &height, ATK_XY_WINDOW); + g_assert_cmpint(x, ==, sline_window2.x); + g_assert_cmpint(y, ==, sline_window2.y); + g_assert_cmpint(height, ==, sline_window2.height); + + atk_text_get_character_extents(short_text2, 9, &x, &y, &width, &height, ATK_XY_WINDOW); + g_assert_cmpint(x, ==, sline_window2.x + sline_window2.width - width); + g_assert_cmpint(y, ==, sline_window2.y); + g_assert_cmpint(height, ==, sline_window2.height); + + // Four paragraph (3 lines multi-line text) + atk_text_get_character_extents(multiline_text, 0, &x, &y, &width, &height, ATK_XY_WINDOW); + g_assert_cmpint(x, ==, mline_window.x); + g_assert_cmpint(y, ==, mline_window.y); + g_assert_cmpint(3 * height, ==, mline_window.height); + + atk_text_get_character_extents(multiline_text, 59, &x, &y, &width, &height, ATK_XY_WINDOW); + // Last line won't fill the whole width of the rectangle + g_assert_cmpint(x, <=, mline_window.x + mline_window.width - width); + g_assert_cmpint(y, ==, mline_window.y + mline_window.height - height); + g_assert_cmpint(height, <=, mline_window.height); + + g_object_unref(short_text1); + g_object_unref(short_text2); + g_object_unref(long_text); + g_object_unref(multiline_text); + g_object_unref(webView); +} + int main(int argc, char** argv) { g_thread_init(NULL); @@ -754,6 +859,7 @@ int main(int argc, char** argv) g_test_add_func("/webkit/atk/getTextInTable", testWebkitAtkGetTextInTable); g_test_add_func("/webkit/atk/getHeadersInTable", testWebkitAtkGetHeadersInTable); g_test_add_func("/webkit/atk/textAttributes", testWebkitAtkTextAttributes); + g_test_add_func("/webkit/atk/get_extents", test_webkit_atk_get_extents); return g_test_run (); } diff --git a/WebKit/gtk/tests/testwebframe.c b/WebKit/gtk/tests/testwebframe.c index 620c9c9..59c7c2b 100644 --- a/WebKit/gtk/tests/testwebframe.c +++ b/WebKit/gtk/tests/testwebframe.c @@ -27,6 +27,50 @@ #if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0) +static int numberOfFramesCreated = 0; + +static void createFrameSignalTestFrameCreatedCallback(WebKitWebView* webView, WebKitWebFrame* frame, gpointer data) +{ + numberOfFramesCreated++; +} + +static gboolean createFrameSignalTestTimeout(gpointer data) +{ + g_assert_cmpint(numberOfFramesCreated, ==, 2); + g_main_loop_quit((GMainLoop*) data); + return FALSE; +} + +static void test_webkit_web_frame_created_signal(void) +{ + GtkWidget* webView; + GtkWidget* window; + GMainLoop* loop = g_main_loop_new(NULL, TRUE); + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + + webView = webkit_web_view_new(); + g_signal_connect(webView, "frame-created", G_CALLBACK(createFrameSignalTestFrameCreatedCallback), loop); + + // We want to ensure that exactly two create-frame signals are + // fired and no more, so we set a timeout here. There does not appear + // to be a simple way via the API to figure out when all frames have + // loaded. + g_timeout_add(500, createFrameSignalTestTimeout, loop); + + gtk_container_add(GTK_CONTAINER(window), webView); + gtk_widget_show(window); + gtk_widget_show(webView); + + webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView), + "<html><body>Frames!" + "<iframe></iframe>" + "<iframe></iframe>" + "</body></html>", + "text/html", "utf-8", "file://"); + g_main_loop_run(loop); +} + static void test_webkit_web_frame_create_destroy(void) { GtkWidget *webView; @@ -170,6 +214,7 @@ int main(int argc, char** argv) g_test_bug_base("https://bugs.webkit.org/"); g_test_add_func("/webkit/webview/create_destroy", test_webkit_web_frame_create_destroy); + g_test_add_func("/webkit/webview/frame-created_signal", test_webkit_web_frame_created_signal); g_test_add_func("/webkit/webframe/lifetime", test_webkit_web_frame_lifetime); g_test_add_func("/webkit/webview/printing", test_webkit_web_frame_printing); g_test_add_func("/webkit/webview/response", test_webkit_web_frame_response); diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h index 73f9fcc..3ce77e6 100644 --- a/WebKit/gtk/webkit/webkitprivate.h +++ b/WebKit/gtk/webkit/webkitprivate.h @@ -196,9 +196,6 @@ extern "C" { gboolean disposed; }; - PassRefPtr<WebCore::Frame> - webkit_web_frame_init_with_web_view(WebKitWebView*, WebCore::HTMLFrameOwnerElement*); - void webkit_web_frame_core_frame_gone(WebKitWebFrame*); diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp index 344f94e..5e82d57 100644 --- a/WebKit/gtk/webkit/webkitwebframe.cpp +++ b/WebKit/gtk/webkit/webkitwebframe.cpp @@ -408,21 +408,6 @@ WebKitWebFrame* webkit_web_frame_new(WebKitWebView* webView) return frame; } -PassRefPtr<Frame> webkit_web_frame_init_with_web_view(WebKitWebView* webView, HTMLFrameOwnerElement* element) -{ - WebKitWebFrame* frame = WEBKIT_WEB_FRAME(g_object_new(WEBKIT_TYPE_WEB_FRAME, NULL)); - WebKitWebFramePrivate* priv = frame->priv; - WebKitWebViewPrivate* viewPriv = WEBKIT_WEB_VIEW_GET_PRIVATE(webView); - - priv->webView = webView; - WebKit::FrameLoaderClient* client = new WebKit::FrameLoaderClient(frame); - - RefPtr<Frame> coreFrame = Frame::create(viewPriv->corePage, element, client); - priv->coreFrame = coreFrame.get(); - - return coreFrame.release(); -} - /** * webkit_web_frame_get_title: * @frame: a #WebKitWebFrame diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp index cde9148..8747d42 100644 --- a/WebKit/gtk/webkit/webkitwebview.cpp +++ b/WebKit/gtk/webkit/webkitwebview.cpp @@ -172,6 +172,7 @@ enum { GEOLOCATION_POLICY_DECISION_REQUESTED, GEOLOCATION_POLICY_DECISION_CANCELLED, ONLOAD_EVENT, + FRAME_CREATED, LAST_SIGNAL }; @@ -2447,6 +2448,26 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) G_TYPE_NONE, 1, WEBKIT_TYPE_WEB_FRAME); + /* + * WebKitWebView::frame-created + * @web_view: the object which received the signal + * @web_frame: the #WebKitWebFrame which was just created. + * + * Emitted when a WebKitWebView has created a new frame. This signal will + * be emitted for all sub-frames created during page load. It will not be + * emitted for the main frame, which originates in the WebKitWebView constructor + * and may be accessed at any time using webkit_web_view_get_main_frame. + * + * Since: 1.3.4 + */ + webkit_web_view_signals[FRAME_CREATED] = g_signal_new("frame-created", + G_TYPE_FROM_CLASS(webViewClass), + (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), + 0, + NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, + WEBKIT_TYPE_WEB_FRAME); /* * implementations of virtual methods diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog index 841a94c..9e2e24d 100644 --- a/WebKit/haiku/ChangeLog +++ b/WebKit/haiku/ChangeLog @@ -1,3 +1,85 @@ +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientHaiku.cpp: + (WebCore::ChromeClientHaiku::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientHaiku::createPopupMenu): + (WebCore::ChromeClientHaiku::createSearchPopupMenu): + * WebCoreSupport/ChromeClientHaiku.h: + +2010-08-02 Jeremy Orlow <jorlow@chromium.org> + + Speculative revert of 64425 due to Chromium instability + https://bugs.webkit.org/show_bug.cgi?id=43347 + + * WebCoreSupport/ChromeClientHaiku.cpp: + * WebCoreSupport/ChromeClientHaiku.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientHaiku.cpp: + (WebCore::ChromeClientHaiku::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientHaiku::createPopupMenu): + (WebCore::ChromeClientHaiku::createSearchPopupMenu): + * WebCoreSupport/ChromeClientHaiku.h: + +2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64422. + http://trac.webkit.org/changeset/64422 + https://bugs.webkit.org/show_bug.cgi?id=43304 + + Build fixes are needed for Snow Leopard and Windows. + (Requested by lca on #webkit). + + * WebCoreSupport/ChromeClientHaiku.cpp: + * WebCoreSupport/ChromeClientHaiku.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientHaiku.cpp: + (WebCore::ChromeClientHaiku::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientHaiku::createPopupMenu): + (WebCore::ChromeClientHaiku::createSearchPopupMenu): + * WebCoreSupport/ChromeClientHaiku.h: + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + * WebCoreSupport/ChromeClientHaiku.cpp: + (WebCore::ChromeClientWx::reachedApplicationCacheOriginQuota): + * WebCoreSupport/ChromeClientHaiku.h: + 2010-07-16 Zhe Su <suzhe@chromium.org> Reviewed by Darin Adler. diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp index d18b84d..6c54424 100644 --- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp +++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp @@ -2,6 +2,7 @@ * Copyright (C) 2006 Zack Rusin <zack@kde.org> * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * * Redistribution and use in source and binary forms, with or without @@ -35,6 +36,9 @@ #include "Icon.h" #include "NotImplemented.h" #include "PlatformString.h" +#include "SecurityOrigin.h" +#include "PopupMenuHaiku.h" +#include "SearchPopupMenuHaiku.h" #include <Alert.h> #include <String.h> @@ -345,6 +349,11 @@ void ChromeClientWx::reachedMaxAppCacheSize(int64_t spaceNeeded) { notImplemented(); } + +void ChromeClientWx::reachedApplicationCacheOriginQuota(SecurityOrigin*) +{ + notImplemented(); +} #endif void ChromeClientHaiku::requestGeolocationPermissionForFrame(Frame*, Geolocation*) @@ -380,5 +389,20 @@ PassOwnPtr<HTMLParserQuirks> ChromeClientHaiku::createHTMLParserQuirks() return 0; } +bool ChromeClientHaiku::selectItemWritingDirectionIsNatural() +{ + return false; +} + +PassRefPtr<PopupMenu> ChromeClientHaiku::createPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuHaiku(client)); +} + +PassRefPtr<SearchPopupMenu> ChromeClientHaiku::createSearchPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuHaiku(client)); +} + } // namespace WebCore diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h index 963e72f..8201fae 100644 --- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h +++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h @@ -1,6 +1,7 @@ /* * Copyright (C) 2006 Zack Rusin <zack@kde.org> * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * * Redistribution and use in source and binary forms, with or without @@ -128,8 +129,13 @@ namespace WebCore { void exceededDatabaseQuota(Frame*, const String& databaseName); + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; + virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; + #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); + virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*); #endif // This is an asynchronous call. The ChromeClient can display UI asking the user for permission diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index 013780d..bb42e9d 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,237 @@ +2010-08-02 Brady Eidson <beidson@apple.com> + + Reviewed by Anders Carlsson. + + Add VisitedLinkStrategy for each platform to implement + https://bugs.webkit.org/show_bug.cgi?id=43393 + + * WebCoreSupport/WebPlatformStrategies.h: + * WebCoreSupport/WebPlatformStrategies.mm: + (WebPlatformStrategies::createVisitedLinkStrategy): + (WebPlatformStrategies::isLinkVisited): Call back into PageGroup's visited links. + (WebPlatformStrategies::addVisitedLink): Ditto. + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::selectItemWritingDirectionIsNatural): + (WebChromeClient::createPopupMenu): + (WebChromeClient::createSearchPopupMenu): + +2010-08-02 Jeremy Orlow <jorlow@chromium.org> + + Speculative revert of 64425 due to Chromium instability + https://bugs.webkit.org/show_bug.cgi?id=43347 + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::selectItemWritingDirectionIsNatural): + (WebChromeClient::createPopupMenu): + (WebChromeClient::createSearchPopupMenu): + +2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64422. + http://trac.webkit.org/changeset/64422 + https://bugs.webkit.org/show_bug.cgi?id=43304 + + Build fixes are needed for Snow Leopard and Windows. + (Requested by lca on #webkit). + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::selectItemWritingDirectionIsNatural): + (WebChromeClient::createPopupMenu): + (WebChromeClient::createSearchPopupMenu): + +2010-07-31 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/43300> Simplify variables in *.xcconfig files after adding iOS support + + Reviewed by Darin Adler. + + * Configurations/WebKit.xcconfig: Extracted + PRODUCTION_FRAMEWORKS_DIR and PRODUCTION_ROOT variables. + +2010-07-30 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/8257783> Short documents may print a second blank page + https://bugs.webkit.org/show_bug.cgi?id=43271 + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _web_setPrintingModeRecursive]): Updated for additional height parameter + to _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:. + (-[WebHTMLView _web_clearPrintingModeRecursive]): Ditto. + (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]): Ditto. + (-[WebHTMLView _beginPrintModeWithPageWidth:height:shrinkToFit:]): Added height parameter, + which is scaled and passed on to _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:. + (-[WebHTMLView _endPrintMode]): Updated for additional height parameter to + _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:. + (-[WebHTMLView layoutToMinimumPageWidth:height:maximumPageWidth:adjustingViewSize:]): Added + height parameter, which is passed on to FrameView::forceLayoutForPagination(). + (-[WebHTMLView layout]): Updated for additional height parameter. + (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:]): Added height + parameter, which is passed on to -layoutToMinimumPageWidth:height:maximumPageWidth:adjustViewSize:. + (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Updated for additional height + parameter. + (-[WebHTMLView setPageWidthForPrinting:]): Ditto. + (-[WebHTMLView knowsPageRange:]): Pass the available height on the page on to + _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize. + * WebView/WebHTMLViewPrivate.h: + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Fix for tests that broke after r64400. Tracking a more + ideal solution in https://bugs.webkit.org/show_bug.cgi?id=40627 + + Switch the interface back to (unsigned long long), and move + the WebDatabaseSecurityOrigin implementation up into WebSecurityOrigin. + The subclasses' implementations were not getting called. + + * Storage/WebDatabaseSecurityOrigin.mm: + * WebCoreSupport/WebApplicationCacheSecurityOrigin.mm: + (-[WebApplicationCacheSecurityOrigin quota]): + (-[WebApplicationCacheSecurityOrigin setQuota:]): + * WebCoreSupport/WebSecurityOrigin.mm: + (-[WebSecurityOrigin usage]): + (-[WebSecurityOrigin quota]): + (-[WebSecurityOrigin setQuota:]): + * WebCoreSupport/WebSecurityOriginPrivate.h: + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + Part 4 - Client Notification when the Quota is Reached + + Notify the WebKit client when the per-origin quota is reached + via a delegate method reachedApplicationCacheOriginQuota. + + Refactor the WebSecurityOrigin class to be generic enough to + allow quota management of both Databases or Application Caches + via subclasses. + + * Storage/WebDatabaseSecurityOrigin.h: Added. + * Storage/WebDatabaseSecurityOrigin.mm: Added. + (-[WebDatabaseSecurityOrigin quota]): + (-[WebDatabaseSecurityOrigin setQuota:]): + * WebCoreSupport/WebApplicationCacheSecurityOrigin.h: Added. + * WebCoreSupport/WebApplicationCacheSecurityOrigin.mm: Added. + (-[WebApplicationCacheSecurityOrigin quota]): + (-[WebApplicationCacheSecurityOrigin setQuota:]): + * Storage/WebSecurityOrigin.mm: Removed. (Moved to WebCoreSupport) + * Storage/WebSecurityOriginPrivate.h: Removed. (Moved to WebCoreSupport) + * WebCoreSupport/WebSecurityOrigin.mm: Added. + (-[WebSecurityOrigin usage]): to be implemented by subclasses. + (-[WebSecurityOrigin quota]): to be implemented by subclasses. + (-[WebSecurityOrigin setQuota:]): to be implemented by subclasses. + * WebCoreSupport/WebSecurityOriginInternal.h: Renamed from WebKit/mac/Storage/WebSecurityOriginInternal.h. + * WebCoreSupport/WebSecurityOriginPrivate.h: Added. + + Turn the notification into a WebUI Delegate to call. Following + the example of Databases. + + * DefaultDelegates/WebDefaultUIDelegate.m: + (-[WebDefaultUIDelegate webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:]): + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::exceededDatabaseQuota): use the Databases Security Origin subclass. + (WebChromeClient::reachedApplicationCacheOriginQuota): use the Application Cache Security Origin subclass. + * WebView/WebUIDelegatePrivate.h: + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + Part 1 - Add Total and Per-Origin Quota Preferences. + + Allow the application cache total size to be a preference, and + add a new preference for the default per-origin quota. + + Storage quotas were int64_t (long long). Boilerplate for + these types added for consistency. + + * Misc/WebNSDictionaryExtras.h: + * Misc/WebNSDictionaryExtras.m: + (-[NSMutableDictionary _webkit_setLongLong:forKey:]): + * WebCoreSupport/WebApplicationCache.h: setters and accessors for WebCore's cacheStorage. + * WebCoreSupport/WebApplicationCache.mm: + (+[WebApplicationCache maximumSize:]): + (+[WebApplicationCache setMaximumSize:]): + (+[WebApplicationCache defaultOriginQuota]): + (+[WebApplicationCache setDefaultOriginQuota:]): + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): defaults to noQuota for both preferences. + (-[WebPreferences _longLongValueForKey:]): + (-[WebPreferences _setLongLongValue:forKey:]): + (-[WebPreferences applicationCacheTotalQuota]): + (-[WebPreferences setApplicationCacheTotalQuota:]): + (-[WebPreferences applicationCacheDefaultOriginQuota]): + (-[WebPreferences setApplicationCacheDefaultOriginQuota:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): respect updates to the preferences. + +2010-07-30 Andy Estes <aestes@apple.com> + + Reviewed by David Kilzer. + + Add Xcode support for compiling WebKit against iOS SDKs. + https://bugs.webkit.org/show_bug.cgi?id=42796 + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + * Configurations/FeatureDefines.xcconfig: + * Configurations/Version.xcconfig: + * Configurations/WebKit.xcconfig: + 2010-07-26 Steve Block <steveblock@google.com> Reviewed by Jeremy Orlow. diff --git a/WebKit/mac/Configurations/Base.xcconfig b/WebKit/mac/Configurations/Base.xcconfig index 7914aed..b3f8ea6 100644 --- a/WebKit/mac/Configurations/Base.xcconfig +++ b/WebKit/mac/Configurations/Base.xcconfig @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Apple Inc. All rights reserved. +// Copyright (C) 2009, 2010 Apple Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -28,11 +28,15 @@ GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_CPP_EXCEPTIONS = NO; GCC_ENABLE_CPP_RTTI = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; -GCC_ENABLE_OBJC_GC = supported; +GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(REAL_PLATFORM_NAME)); +GCC_ENABLE_OBJC_GC_iphoneos = NO; +GCC_ENABLE_OBJC_GC_iphonesimulator = NO; +GCC_ENABLE_OBJC_GC_macosx = supported; GCC_ENABLE_SYMBOL_SEPARATION = NO; GCC_FAST_OBJC_DISPATCH = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; -GCC_MODEL_TUNING = G5; +GCC_MODEL_TUNING = $(GCC_MODEL_TUNING_$(REAL_PLATFORM_NAME)); +GCC_MODEL_TUNING_macosx = G5; GCC_OBJC_CALL_CXX_CDTORS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_THREADSAFE_STATICS = NO; @@ -44,13 +48,22 @@ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; LINKER_DISPLAYS_MANGLED_NAMES = YES; OTHER_MIGFLAGS = -F$(BUILT_PRODUCTS_DIR); PREBINDING = NO; -VALID_ARCHS = i386 ppc x86_64 ppc64; +VALID_ARCHS = $(VALID_ARCHS_$(REAL_PLATFORM_NAME)); +VALID_ARCHS_iphoneos = $(ARCHS_STANDARD_32_BIT); +VALID_ARCHS_iphonesimulator = $(ARCHS_STANDARD_32_BIT); +VALID_ARCHS_macosx = i386 ppc x86_64 ppc64; // FIXME: <rdar://problem/5070292> WebKit should build with -Wshorten-64-to-32 -WARNING_CFLAGS = -Wall -Wextra -Wcast-align -Wchar-subscripts -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings; +WARNING_CFLAGS_BASE = -Wall -Wextra -Wchar-subscripts -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings; +WARNING_CFLAGS = $(WARNING_CFLAGS_$(REAL_PLATFORM_NAME)); +WARNING_CFLAGS_iphoneos = $(WARNING_CFLAGS_BASE); +WARNING_CFLAGS_iphonesimulator = $(WARNING_CFLAGS_BASE) -Wcast-align; +WARNING_CFLAGS_macosx = $(WARNING_CFLAGS_BASE) -Wcast-align; REAL_PLATFORM_NAME = $(REAL_PLATFORM_NAME_$(PLATFORM_NAME)); REAL_PLATFORM_NAME_ = $(REAL_PLATFORM_NAME_macosx); +REAL_PLATFORM_NAME_iphoneos = iphoneos; +REAL_PLATFORM_NAME_iphonesimulator = iphonesimulator; REAL_PLATFORM_NAME_macosx = macosx; TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR); @@ -80,15 +93,18 @@ SECTORDER_FLAGS = -sectorder __TEXT __text mac/WebKit.order; // Note that Xcode versions as new as 3.1.2 use XCODE_VERSION_ACTUAL for the minor version // number. Newer versions of Xcode use XCODE_VERSION_MINOR for the minor version, and // XCODE_VERSION_ACTUAL for the full version number. -TARGET_GCC_VERSION = $(TARGET_GCC_VERSION_$(TARGET_MAC_OS_X_VERSION_MAJOR)); -TARGET_GCC_VERSION_ = $(TARGET_GCC_VERSION_1040); -TARGET_GCC_VERSION_1040 = GCC_40; -TARGET_GCC_VERSION_1050 = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_MINOR)); -TARGET_GCC_VERSION_1050_ = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_ACTUAL)); -TARGET_GCC_VERSION_1050_0310 = GCC_42; -TARGET_GCC_VERSION_1050_0320 = GCC_42; -TARGET_GCC_VERSION_1060 = GCC_42; -TARGET_GCC_VERSION_1070 = LLVM_GCC_42; +TARGET_GCC_VERSION = $(TARGET_GCC_VERSION_$(REAL_PLATFORM_NAME)); +TARGET_GCC_VERSION_iphoneos = LLVM_GCC_42; +TARGET_GCC_VERSION_iphonesimulator = GCC_42; +TARGET_GCC_VERSION_macosx = $(TARGET_GCC_VERSION_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +TARGET_GCC_VERSION_macosx_ = $(TARGET_GCC_VERSION_macosx_1040); +TARGET_GCC_VERSION_macosx_1040 = GCC_40; +TARGET_GCC_VERSION_macosx_1050 = $(TARGET_GCC_VERSION_macosx_1050_$(XCODE_VERSION_MINOR)); +TARGET_GCC_VERSION_macosx_1050_ = $(TARGET_GCC_VERSION_macosx_1050_$(XCODE_VERSION_ACTUAL)); +TARGET_GCC_VERSION_macosx_1050_0310 = GCC_42; +TARGET_GCC_VERSION_macosx_1050_0320 = GCC_42; +TARGET_GCC_VERSION_macosx_1060 = GCC_42; +TARGET_GCC_VERSION_macosx_1070 = LLVM_GCC_42; GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION)); GCC_VERSION_GCC_40 = 4.0; diff --git a/WebKit/mac/Configurations/DebugRelease.xcconfig b/WebKit/mac/Configurations/DebugRelease.xcconfig index 77f7893..5a86e25 100644 --- a/WebKit/mac/Configurations/DebugRelease.xcconfig +++ b/WebKit/mac/Configurations/DebugRelease.xcconfig @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Apple Inc. All rights reserved. +// Copyright (C) 2009, 2010 Apple Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -23,29 +23,38 @@ #include "Base.xcconfig" -ARCHS = $(ARCHS_$(TARGET_MAC_OS_X_VERSION_MAJOR)); -ARCHS_ = $(ARCHS_1040); -ARCHS_1040 = $(NATIVE_ARCH); -ARCHS_1050 = $(NATIVE_ARCH); -ARCHS_1060 = $(ARCHS_STANDARD_32_64_BIT); -ARCHS_1070 = $(ARCHS_STANDARD_32_64_BIT); +ARCHS = $(ARCHS_$(REAL_PLATFORM_NAME)); +ARCHS_iphoneos = $(ARCHS_STANDARD_32_BIT); +ARCHS_iphonesimulator = $(ARCHS_STANDARD_32_BIT); +ARCHS_macosx = $(ARCHS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +ARCHS_macosx_ = $(ARCHS_macosx_1040); +ARCHS_macosx_1040 = $(NATIVE_ARCH); +ARCHS_macosx_1050 = $(NATIVE_ARCH); +ARCHS_macosx_1060 = $(ARCHS_STANDARD_32_64_BIT); +ARCHS_macosx_1070 = $(ARCHS_STANDARD_32_64_BIT); ONLY_ACTIVE_ARCH = YES; -MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(TARGET_MAC_OS_X_VERSION_MAJOR)); -MACOSX_DEPLOYMENT_TARGET_ = 10.4; -MACOSX_DEPLOYMENT_TARGET_1040 = 10.4; -MACOSX_DEPLOYMENT_TARGET_1050 = 10.5; -MACOSX_DEPLOYMENT_TARGET_1060 = 10.6; -MACOSX_DEPLOYMENT_TARGET_1070 = 10.7; +MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(REAL_PLATFORM_NAME)); +MACOSX_DEPLOYMENT_TARGET_iphoneos = 10.5; +MACOSX_DEPLOYMENT_TARGET_iphonesimulator = 10.5; +MACOSX_DEPLOYMENT_TARGET_macosx = $(MACOSX_DEPLOYMENT_TARGET_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +MACOSX_DEPLOYMENT_TARGET_macosx_ = 10.4; +MACOSX_DEPLOYMENT_TARGET_macosx_1040 = 10.4; +MACOSX_DEPLOYMENT_TARGET_macosx_1050 = 10.5; +MACOSX_DEPLOYMENT_TARGET_macosx_1060 = 10.6; +MACOSX_DEPLOYMENT_TARGET_macosx_1070 = 10.7; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; SECTORDER_FLAGS = ; -WEBKIT_SYSTEM_INTERFACE_LIBRARY = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_$(TARGET_MAC_OS_X_VERSION_MAJOR)); -WEBKIT_SYSTEM_INTERFACE_LIBRARY_ = WebKitSystemInterfaceTiger; -WEBKIT_SYSTEM_INTERFACE_LIBRARY_1040 = WebKitSystemInterfaceTiger; -WEBKIT_SYSTEM_INTERFACE_LIBRARY_1050 = WebKitSystemInterfaceLeopard; -WEBKIT_SYSTEM_INTERFACE_LIBRARY_1060 = WebKitSystemInterfaceSnowLeopard; -WEBKIT_SYSTEM_INTERFACE_LIBRARY_1070 = WebKitSystemInterfaceSnowLeopard; +WEBKIT_SYSTEM_INTERFACE_LIBRARY = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_$(REAL_PLATFORM_NAME)); +WEBKIT_SYSTEM_INTERFACE_LIBRARY_iphoneos = WebKitSystemInterface; +WEBKIT_SYSTEM_INTERFACE_LIBRARY_iphonesimulator = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_iphoneos); +WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_ = WebKitSystemInterfaceTiger; +WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1040 = WebKitSystemInterfaceTiger; +WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1050 = WebKitSystemInterfaceLeopard; +WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1060 = WebKitSystemInterfaceSnowLeopard; +WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1070 = WebKitSystemInterfaceSnowLeopard; diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig index 8e33a91..9810cf7 100644 --- a/WebKit/mac/Configurations/FeatureDefines.xcconfig +++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Apple Inc. All rights reserved. +// Copyright (C) 2009, 2010 Apple Inc. All rights reserved. // Copyright (C) 2009 Google Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -33,31 +33,52 @@ ENABLE_LINK_PREFETCH = ; -ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(TARGET_MAC_OS_X_VERSION_MAJOR)); -ENABLE_3D_CANVAS_1060 = ENABLE_3D_CANVAS; -ENABLE_3D_CANVAS_1070 = ENABLE_3D_CANVAS; +ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(REAL_PLATFORM_NAME)); +ENABLE_3D_CANVAS_macosx = $(ENABLE_3D_CANVAS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +ENABLE_3D_CANVAS_macosx_1060 = ENABLE_3D_CANVAS; +ENABLE_3D_CANVAS_macosx_1070 = ENABLE_3D_CANVAS; -ENABLE_3D_RENDERING = $(ENABLE_3D_RENDERING_$(TARGET_MAC_OS_X_VERSION_MAJOR)); -ENABLE_3D_RENDERING_1050 = ENABLE_3D_RENDERING; -ENABLE_3D_RENDERING_1060 = ENABLE_3D_RENDERING; -ENABLE_3D_RENDERING_1070 = ENABLE_3D_RENDERING; +ENABLE_3D_RENDERING = $(ENABLE_3D_RENDERING_$(REAL_PLATFORM_NAME)); +ENABLE_3D_RENDERING_iphoneos = ENABLE_3D_RENDERING; +ENABLE_3D_RENDERING_iphonesimulator = $(ENABLE_3D_RENDERING_iphoneos); +ENABLE_3D_RENDERING_macosx = $(ENABLE_3D_RENDERING_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +ENABLE_3D_RENDERING_macosx_1050 = ENABLE_3D_RENDERING; +ENABLE_3D_RENDERING_macosx_1060 = ENABLE_3D_RENDERING; +ENABLE_3D_RENDERING_macosx_1070 = ENABLE_3D_RENDERING; + +ENABLE_BLOB_SLICE = $(ENABLE_BLOB_SLICE_$(REAL_PLATFORM_NAME)); +ENABLE_BLOB_SLICE_macosx = ENABLE_BLOB_SLICE; + +ENABLE_CHANNEL_MESSAGING = $(ENABLE_CHANNEL_MESSAGING_$(REAL_PLATFORM_NAME)); +ENABLE_CHANNEL_MESSAGING_macosx = ENABLE_CHANNEL_MESSAGING; + +ENABLE_CLIENT_BASED_GEOLOCATION = $(ENABLE_CLIENT_BASED_GEOLOCATION_$(REAL_PLATFORM_NAME)); +ENABLE_CLIENT_BASED_GEOLOCATION_macosx = ENABLE_CLIENT_BASED_GEOLOCATION; -ENABLE_BLOB_SLICE = ENABLE_BLOB_SLICE; -ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING; -ENABLE_CLIENT_BASED_GEOLOCATION = ENABLE_CLIENT_BASED_GEOLOCATION; ENABLE_DATABASE = ENABLE_DATABASE; ENABLE_DATAGRID = ; -ENABLE_DATALIST = ENABLE_DATALIST; + +ENABLE_DATALIST = $(ENABLE_DATALIST_$(REAL_PLATFORM_NAME)); +ENABLE_DATALIST_macosx = ENABLE_DATALIST; + ENABLE_DEVICE_ORIENTATION = ; ENABLE_DIRECTORY_UPLOAD = ; ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE; ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE; -ENABLE_FILTERS = ENABLE_FILTERS; -ENABLE_FILE_READER = ENABLE_FILE_READER; + +ENABLE_FILTERS = $(ENABLE_FILTERS_$(REAL_PLATFORM_NAME)); +ENABLE_FILTERS_macosx = ENABLE_FILTERS; + +ENABLE_FILE_READER = $(ENABLE_FILE_READER_$(REAL_PLATFORM_NAME)); +ENABLE_FILE_READER_macosx = ENABLE_FILE_READER; + ENABLE_FILE_WRITER = ; ENABLE_FILE_SYSTEM = ; ENABLE_GEOLOCATION = ENABLE_GEOLOCATION; -ENABLE_ICONDATABASE = ENABLE_ICONDATABASE; + +ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME)); +ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE; + ENABLE_IMAGE_RESIZER = ; ENABLE_INDEXED_DATABASE = ; ENABLE_INPUT_SPEECH = ; @@ -67,21 +88,37 @@ ENABLE_METER_TAG = ENABLE_METER_TAG; ENABLE_NOTIFICATIONS = ; ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS; ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG; -ENABLE_RUBY = ENABLE_RUBY; -ENABLE_SANDBOX = ENABLE_SANDBOX; -ENABLE_SHARED_WORKERS = ENABLE_SHARED_WORKERS; + +ENABLE_RUBY = $(ENABLE_RUBY_$(REAL_PLATFORM_NAME)); +ENABLE_RUBY_macosx = ENABLE_RUBY; + +ENABLE_SANDBOX = $(ENABLE_SANDBOX_$(REAL_PLATFORM_NAME)); +ENABLE_SANDBOX_macosx = ENABLE_SANDBOX; + +ENABLE_SHARED_WORKERS = $(ENABLE_SHARED_WORKERS_$(REAL_PLATFORM_NAME)); +ENABLE_SHARED_WORKERS_macosx = ENABLE_SHARED_WORKERS; + ENABLE_SVG = ENABLE_SVG; ENABLE_SVG_ANIMATION = ENABLE_SVG_ANIMATION; ENABLE_SVG_AS_IMAGE = ENABLE_SVG_AS_IMAGE; -ENABLE_SVG_DOM_OBJC_BINDINGS = ENABLE_SVG_DOM_OBJC_BINDINGS; + +ENABLE_SVG_DOM_OBJC_BINDINGS = $(ENABLE_SVG_DOM_OBJC_BINDINGS_$(REAL_PLATFORM_NAME)); +ENABLE_SVG_DOM_OBJC_BINDINGS_macosx = ENABLE_SVG_DOM_OBJC_BINDINGS; + ENABLE_SVG_FONTS = ENABLE_SVG_FONTS; ENABLE_SVG_FOREIGN_OBJECT = ENABLE_SVG_FOREIGN_OBJECT; ENABLE_SVG_USE = ENABLE_SVG_USE; ENABLE_VIDEO = ENABLE_VIDEO; -ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS; + +ENABLE_WEB_SOCKETS = $(ENABLE_WEB_SOCKETS_$(REAL_PLATFORM_NAME)); +ENABLE_WEB_SOCKETS_macosx = ENABLE_WEB_SOCKETS; + ENABLE_WEB_TIMING = ; ENABLE_WML = ; -ENABLE_WORKERS = ENABLE_WORKERS; + +ENABLE_WORKERS = $(ENABLE_WORKERS_$(REAL_PLATFORM_NAME)); +ENABLE_WORKERS_macosx = ENABLE_WORKERS; + ENABLE_XHTMLMP = ; ENABLE_XPATH = ENABLE_XPATH; ENABLE_XSLT = ENABLE_XSLT; diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig index c1b6b32..cc30ce9 100644 --- a/WebKit/mac/Configurations/Version.xcconfig +++ b/WebKit/mac/Configurations/Version.xcconfig @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Apple Inc. All rights reserved. +// Copyright (C) 2009, 2010 Apple Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -22,7 +22,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. MAJOR_VERSION = 534; -MINOR_VERSION = 4; +MINOR_VERSION = 5; TINY_VERSION = 0; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); @@ -31,12 +31,15 @@ BUNDLE_VERSION = $(BUNDLE_VERSION_$(CONFIGURATION)); SHORT_VERSION_STRING = $(SHORT_VERSION_STRING_$(CONFIGURATION)) // The system version prefix is based on the current system version. -SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(TARGET_MAC_OS_X_VERSION_MAJOR)); -SYSTEM_VERSION_PREFIX_ = 4; // Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR. -SYSTEM_VERSION_PREFIX_1040 = 4; -SYSTEM_VERSION_PREFIX_1050 = 5; -SYSTEM_VERSION_PREFIX_1060 = 6; -SYSTEM_VERSION_PREFIX_1070 = 7; +SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(REAL_PLATFORM_NAME)); +SYSTEM_VERSION_PREFIX_iphoneos = 6; // iPhone OS is most like SnowLeopard currently. +SYSTEM_VERSION_PREFIX_iphonesimulator = $(SYSTEM_VERSION_PREFIX_iphoneos); +SYSTEM_VERSION_PREFIX_macosx = $(SYSTEM_VERSION_PREFIX_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +SYSTEM_VERSION_PREFIX_macosx_ = 4; // Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR. +SYSTEM_VERSION_PREFIX_macosx_1040 = 4; +SYSTEM_VERSION_PREFIX_macosx_1050 = 5; +SYSTEM_VERSION_PREFIX_macosx_1060 = 6; +SYSTEM_VERSION_PREFIX_macosx_1070 = 7; // The production build always uses the full version with a system version prefix. BUNDLE_VERSION_Production = $(SYSTEM_VERSION_PREFIX)$(FULL_VERSION); diff --git a/WebKit/mac/Configurations/WebKit.xcconfig b/WebKit/mac/Configurations/WebKit.xcconfig index b9dbc87..def76fd 100644 --- a/WebKit/mac/Configurations/WebKit.xcconfig +++ b/WebKit/mac/Configurations/WebKit.xcconfig @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Apple Inc. All rights reserved. +// Copyright (C) 2009, 2010 Apple Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -24,26 +24,66 @@ #include "FeatureDefines.xcconfig" #include "Version.xcconfig" +EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(REAL_PLATFORM_NAME)); +EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.nib *.tiff; +EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos); + EXPORTED_SYMBOLS_FILE = $(EXPORTED_SYMBOLS_FILE_$(CURRENT_ARCH)); EXPORTED_SYMBOLS_FILE_ = mac/WebKit.exp; +EXPORTED_SYMBOLS_FILE_armv5 = mac/WebKit.exp; +EXPORTED_SYMBOLS_FILE_armv6 = mac/WebKit.exp; +EXPORTED_SYMBOLS_FILE_armv7 = mac/WebKit.exp; EXPORTED_SYMBOLS_FILE_i386 = mac/WebKit.exp; EXPORTED_SYMBOLS_FILE_ppc = mac/WebKit.exp; EXPORTED_SYMBOLS_FILE_ppc64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/WebKit.LP64.exp; EXPORTED_SYMBOLS_FILE_x86_64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/WebKit.LP64.exp; -FRAMEWORK_SEARCH_PATHS = $(UMBRELLA_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(FRAMEWORK_SEARCH_PATHS); + +FRAMEWORK_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS_$(REAL_PLATFORM_NAME)); +FRAMEWORK_SEARCH_PATHS_iphoneos = $(FRAMEWORK_SEARCH_PATHS_iphoneos_$(CONFIGURATION)); +FRAMEWORK_SEARCH_PATHS_iphoneos_Debug = $(BUILT_PRODUCTS_DIR) $(PRODUCTION_FRAMEWORKS_DIR); +FRAMEWORK_SEARCH_PATHS_iphoneos_Release = $(FRAMEWORK_SEARCH_PATHS_iphoneos_Debug); +FRAMEWORK_SEARCH_PATHS_iphoneos_Production = $(PRODUCTION_FRAMEWORKS_DIR); +FRAMEWORK_SEARCH_PATHS_iphonesimulator = $(FRAMEWORK_SEARCH_PATHS_iphoneos_$(CONFIGURATION)); +FRAMEWORK_SEARCH_PATHS_macosx = $(UMBRELLA_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(FRAMEWORK_SEARCH_PATHS); + GCC_PREFIX_HEADER = mac/WebKitPrefix.h; GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) FRAMEWORK_NAME=WebKit WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST $(GCC_PREPROCESSOR_DEFINITIONS); -HEADER_SEARCH_PATHS = $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(WEBCORE_PRIVATE_HEADERS_DIR)/icu "${BUILT_PRODUCTS_DIR}/usr/local/include" "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit" $(HEADER_SEARCH_PATHS); +HEADER_SEARCH_PATHS = $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(WEBCORE_PRIVATE_HEADERS_DIR)/icu $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH) "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit" $(HEADER_SEARCH_PATHS); INFOPLIST_FILE = mac/Info.plist; -INSTALL_PATH = $(SYSTEM_LIBRARY_DIR)/Frameworks; +INSTALL_PATH = $(INSTALL_PATH_$(REAL_PLATFORM_NAME)); +INSTALL_PATH_macosx = $(SYSTEM_LIBRARY_DIR)/Frameworks; INSTALLHDRS_COPY_PHASE = YES; INSTALLHDRS_SCRIPT_PHASE = YES; PRODUCT_NAME = WebKit; -UMBRELLA_FRAMEWORKS_DIR = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks; -OTHER_LDFLAGS = -sub_umbrella WebCore $(OTHER_LDFLAGS); +UMBRELLA_FRAMEWORKS_DIR = $(PRODUCTION_FRAMEWORKS_DIR)/WebKit.framework/Versions/A/Frameworks; + +OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(REAL_PLATFORM_NAME)); +OTHER_LDFLAGS_iphoneos = -lobjc -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework Foundation -framework GraphicsServices -framework ImageIO -framework WebCore; +OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos); +OTHER_LDFLAGS_macosx = -sub_umbrella WebCore $(OTHER_LDFLAGS); -WEBCORE_PRIVATE_HEADERS_DIR = $(WEBCORE_PRIVATE_HEADERS_DIR_$(REAL_PLATFORM_NAME)_$(CONFIGURATION)); -WEBCORE_PRIVATE_HEADERS_DIR_macosx_Release = $(WEBCORE_PRIVATE_HEADERS_engineering); -WEBCORE_PRIVATE_HEADERS_DIR_macosx_Debug = $(WEBCORE_PRIVATE_HEADERS_engineering); -WEBCORE_PRIVATE_HEADERS_DIR_macosx_Production = $(UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders; +PRODUCTION_FRAMEWORKS_DIR = $(PRODUCTION_FRAMEWORKS_DIR_$(REAL_PLATFORM_NAME)); +PRODUCTION_FRAMEWORKS_DIR_iphoneos = $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks; +PRODUCTION_FRAMEWORKS_DIR_iphonesimulator = $(PRODUCTION_FRAMEWORKS_DIR_iphoneos); +PRODUCTION_FRAMEWORKS_DIR_macosx = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks; + +PRODUCTION_ROOT = $(PRODUCTION_ROOT_$(REAL_PLATORM_NAME)); +PRODUCTION_ROOT_iphoneos = $(SDKROOT); +PRODUCTION_ROOT_iphonesimulator = $(SDKROOT); +PRODUCTION_ROOT_macosx = $(NEXT_ROOT); + +WEBCORE_PRIVATE_HEADERS_DIR = $(WEBCORE_PRIVATE_HEADERS_DIR_$(CONFIGURATION)); +WEBCORE_PRIVATE_HEADERS_DIR_Release = $(WEBCORE_PRIVATE_HEADERS_engineering); +WEBCORE_PRIVATE_HEADERS_DIR_Debug = $(WEBCORE_PRIVATE_HEADERS_engineering); +WEBCORE_PRIVATE_HEADERS_DIR_Production = $(WEBCORE_PRIVATE_HEADERS_DIR_Production_$(REAL_PLATFORM_NAME)); +WEBCORE_PRIVATE_HEADERS_DIR_Production_iphoneos = $(PRODUCTION_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders; +WEBCORE_PRIVATE_HEADERS_DIR_Production_iphonesimulator = $(WEBCORE_PRIVATE_HEADERS_DIR_Production_iphoneos); +WEBCORE_PRIVATE_HEADERS_DIR_Production_macosx = $(UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders; WEBCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/WebCore.framework/PrivateHeaders; + +WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH = $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_$(CONFIGURATION)); +WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_Debug = $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_engineering); +WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_Release = $(WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_engineering); +WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_Production = $(PRODUCTION_ROOT)/usr/local/include; +WEBKITSYSTEMINTERFACE_STATIC_LIBRARY_HEADERS_FOLDER_PATH_engineering = $(BUILT_PRODUCTS_DIR)/usr/local/include; + diff --git a/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m b/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m index 68fa05e..a327fd4 100644 --- a/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m +++ b/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m @@ -227,6 +227,10 @@ static WebDefaultUIDelegate *sharedDelegate = nil; { } +- (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin +{ +} + - (BOOL)webView:(WebView *)sender shouldReplaceUploadFile:(NSString *)path usingGeneratedFilename:(NSString **)filename { return NO; diff --git a/WebKit/mac/Misc/WebNSDictionaryExtras.h b/WebKit/mac/Misc/WebNSDictionaryExtras.h index 95445f8..0bbc5d5 100644 --- a/WebKit/mac/Misc/WebNSDictionaryExtras.h +++ b/WebKit/mac/Misc/WebNSDictionaryExtras.h @@ -43,5 +43,6 @@ - (void)_webkit_setInt:(int)value forKey:(id)key; - (void)_webkit_setFloat:(float)value forKey:(id)key; - (void)_webkit_setBool:(BOOL)value forKey:(id)key; +- (void)_webkit_setLongLong:(long long)value forKey:(id)key; - (void)_webkit_setUnsignedLongLong:(unsigned long long)value forKey:(id)key; @end diff --git a/WebKit/mac/Misc/WebNSDictionaryExtras.m b/WebKit/mac/Misc/WebNSDictionaryExtras.m index a47fd0b..366f361 100644 --- a/WebKit/mac/Misc/WebNSDictionaryExtras.m +++ b/WebKit/mac/Misc/WebNSDictionaryExtras.m @@ -108,6 +108,13 @@ [object release]; } +- (void)_webkit_setLongLong:(long long)value forKey:(id)key +{ + NSNumber *object = [[NSNumber alloc] initWithLongLong:value]; + [self setObject:object forKey:key]; + [object release]; +} + - (void)_webkit_setUnsignedLongLong:(unsigned long long)value forKey:(id)key { NSNumber *object = [[NSNumber alloc] initWithUnsignedLongLong:value]; diff --git a/WebKit/mac/Storage/WebDatabaseSecurityOrigin.h b/WebKit/mac/Storage/WebDatabaseSecurityOrigin.h new file mode 100644 index 0000000..a06ca3d --- /dev/null +++ b/WebKit/mac/Storage/WebDatabaseSecurityOrigin.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010 Apple 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. + */ + +#import "WebSecurityOriginInternal.h" + +@interface WebDatabaseSecurityOrigin : WebSecurityOrigin +@end diff --git a/WebKit/mac/Storage/WebDatabaseSecurityOrigin.mm b/WebKit/mac/Storage/WebDatabaseSecurityOrigin.mm new file mode 100644 index 0000000..a0c3529 --- /dev/null +++ b/WebKit/mac/Storage/WebDatabaseSecurityOrigin.mm @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2007, 2010 Apple 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. + */ + +#import "WebDatabaseSecurityOrigin.h" +#import <WebCore/SecurityOrigin.h> + +using namespace WebCore; + +@implementation WebDatabaseSecurityOrigin + +// FIXME: https://bugs.webkit.org/show_bug.cgi?id=40627 +// Proper steps should be taken to have subclass implementations of SecurityOrigin's +// origin, quota, and setQuota methods. + +@end diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCache.h b/WebKit/mac/WebCoreSupport/WebApplicationCache.h index 282157f..78b06b7 100644 --- a/WebKit/mac/WebCoreSupport/WebApplicationCache.h +++ b/WebKit/mac/WebCoreSupport/WebApplicationCache.h @@ -25,8 +25,12 @@ #import <Foundation/Foundation.h> -@interface WebApplicationCache: NSObject { -} +@interface WebApplicationCache: NSObject + ++ (long long)maximumSize; ++ (void)setMaximumSize:(long long)size; + ++ (long long)defaultOriginQuota; ++ (void)setDefaultOriginQuota:(long long)size; -+ (void)setMaximumSize:(unsigned long long)size; @end diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCache.mm b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm index 4ca749c..5c2a208 100644 --- a/WebKit/mac/WebCoreSupport/WebApplicationCache.mm +++ b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm @@ -32,13 +32,28 @@ using namespace WebCore; @implementation WebApplicationCache -+ (void)setMaximumSize:(unsigned long long)size ++ (long long)maximumSize +{ + return cacheStorage().maximumSize(); +} + ++ (void)setMaximumSize:(long long)size { cacheStorage().empty(); cacheStorage().vacuumDatabaseFile(); cacheStorage().setMaximumSize(size); } ++ (long long)defaultOriginQuota +{ + return cacheStorage().defaultOriginQuota(); +} + ++ (void)setDefaultOriginQuota:(long long)size +{ + cacheStorage().setDefaultOriginQuota(size); +} + @end #endif diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCacheSecurityOrigin.h b/WebKit/mac/WebCoreSupport/WebApplicationCacheSecurityOrigin.h new file mode 100644 index 0000000..09c0610 --- /dev/null +++ b/WebKit/mac/WebCoreSupport/WebApplicationCacheSecurityOrigin.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010 Apple 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. + */ + +#import "WebSecurityOriginInternal.h" + +@interface WebApplicationCacheSecurityOrigin : WebSecurityOrigin +@end diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCacheSecurityOrigin.mm b/WebKit/mac/WebCoreSupport/WebApplicationCacheSecurityOrigin.mm new file mode 100644 index 0000000..dac41ae --- /dev/null +++ b/WebKit/mac/WebCoreSupport/WebApplicationCacheSecurityOrigin.mm @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2010 Apple 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. + */ + +#import "WebApplicationCacheSecurityOrigin.h" + +#import <WebCore/ApplicationCacheStorage.h> + +using namespace WebCore; + +@implementation WebApplicationCacheSecurityOrigin + +- (unsigned long long)usage +{ +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + long long usage; + if (cacheStorage().usageForOrigin(reinterpret_cast<SecurityOrigin*>(_private), usage)) + return usage; + return 0; +#else + return 0; +#endif +} + +- (unsigned long long)quota +{ +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + long long quota; + if (cacheStorage().quotaForOrigin(reinterpret_cast<SecurityOrigin*>(_private), quota)) + return quota; + return 0; +#else + return 0; +#endif +} + +- (void)setQuota:(unsigned long long)quota +{ +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + cacheStorage().storeUpdatedQuotaForOrigin(reinterpret_cast<SecurityOrigin*>(_private), quota); +#endif +} + +@end diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h index 707d080..50c159c 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.h +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. - * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -117,6 +117,7 @@ public: #endif #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); + virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*); #endif virtual void populateVisitedLinks(); @@ -167,6 +168,10 @@ public: virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { } + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; + virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; + private: WebView *m_webView; }; diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm index eb56240..1a3736e 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm @@ -1,6 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. - * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,6 +30,8 @@ #import "WebChromeClient.h" #import "DOMNodeInternal.h" +#import "WebApplicationCacheSecurityOrigin.h" +#import "WebDatabaseSecurityOrigin.h" #import "WebDefaultUIDelegate.h" #import "WebDelegateImplementationCaching.h" #import "WebElementDictionary.h" @@ -62,12 +64,16 @@ #import <WebCore/Page.h> #import <WebCore/PlatformScreen.h> #import <WebCore/PlatformString.h> +#import <WebCore/PopupMenuMac.h> #import <WebCore/ResourceRequest.h> +#import <WebCore/SearchPopupMenuMac.h> #import <WebCore/Widget.h> #import <WebCore/WindowFeatures.h> #import <wtf/PassRefPtr.h> #import <wtf/Vector.h> + + #if USE(ACCELERATED_COMPOSITING) #import <WebCore/GraphicsLayer.h> #endif @@ -553,7 +559,7 @@ void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& database { BEGIN_BLOCK_OBJC_EXCEPTIONS; - WebSecurityOrigin *webOrigin = [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:frame->document()->securityOrigin()]; + WebDatabaseSecurityOrigin *webOrigin = [[WebDatabaseSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:frame->document()->securityOrigin()]; // FIXME: remove this workaround once shipping Safari has the necessary delegate implemented. if (WKAppVersionCheckLessThan(@"com.apple.Safari", -1, 3.1)) { const unsigned long long defaultQuota = 5 * 1024 * 1024; // 5 megabytes should hopefully be enough to test storage support. @@ -571,6 +577,17 @@ void WebChromeClient::reachedMaxAppCacheSize(int64_t spaceNeeded) { // FIXME: Free some space. } + +void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* origin) +{ + BEGIN_BLOCK_OBJC_EXCEPTIONS; + + WebApplicationCacheSecurityOrigin *webOrigin = [[WebApplicationCacheSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]; + CallUIDelegate(m_webView, @selector(webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:), webOrigin); + [webOrigin release]; + + END_BLOCK_OBJC_EXCEPTIONS; +} #endif void WebChromeClient::populateVisitedLinks() @@ -724,6 +741,21 @@ void WebChromeClient::formDidBlur(const WebCore::Node* node) CallUIDelegate(m_webView, @selector(webView:formDidBlurNode:), kit(const_cast<WebCore::Node*>(node))); } +bool WebChromeClient::selectItemWritingDirectionIsNatural() +{ + return true; +} + +PassRefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuMac(client)); +} + +PassRefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuMac(client)); +} + #if USE(ACCELERATED_COMPOSITING) void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer) diff --git a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h index 0ac4f16..3d34dbe 100644 --- a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h +++ b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h @@ -29,8 +29,9 @@ #include <WebCore/PlatformStrategies.h> #include <WebCore/PluginStrategy.h> #include <WebCore/LocalizationStrategy.h> +#include <WebCore/VisitedLinkStrategy.h> -class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy { +class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy { public: static void initialize(); @@ -40,6 +41,7 @@ private: // WebCore::PlatformStrategies virtual WebCore::PluginStrategy* createPluginStrategy(); virtual WebCore::LocalizationStrategy* createLocalizationStrategy(); + virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy(); // WebCore::PluginStrategy virtual void refreshPlugins(); @@ -148,6 +150,10 @@ private: virtual WebCore::String validationMessageRangeUnderflowText(); virtual WebCore::String validationMessageRangeOverflowText(); virtual WebCore::String validationMessageStepMismatchText(); + + // WebCore::VisitedLinkStrategy + virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash); + virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash); }; #endif // WebPlatformStrategies_h diff --git a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm index 6805f5e..2900ccf 100644 --- a/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm +++ b/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm @@ -30,6 +30,8 @@ #import "WebPluginPackage.h" #import <WebCore/BlockExceptions.h> #import <WebCore/IntSize.h> +#import <WebCore/Page.h> +#import <WebCore/PageGroup.h> #import <wtf/StdLibExtras.h> #ifdef BUILDING_ON_TIGER @@ -60,6 +62,11 @@ LocalizationStrategy* WebPlatformStrategies::createLocalizationStrategy() return this; } +VisitedLinkStrategy* WebPlatformStrategies::createVisitedLinkStrategy() +{ + return this; +} + void WebPlatformStrategies::refreshPlugins() { [[WebPluginDatabase sharedDatabase] refresh]; @@ -762,3 +769,13 @@ String WebPlatformStrategies::validationMessageStepMismatchText() return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute"); } +// VisitedLinkStrategy +bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash) +{ + return page->group().isLinkVisited(hash); +} + +void WebPlatformStrategies::addVisitedLink(Page* page, LinkHash hash) +{ + return page->group().addVisitedLinkHash(hash); +} diff --git a/WebKit/mac/Storage/WebSecurityOrigin.mm b/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm index 56a21f5..0d49445 100644 --- a/WebKit/mac/Storage/WebSecurityOrigin.mm +++ b/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,9 +28,9 @@ #import "WebSecurityOriginInternal.h" -#import <WebCore/DatabaseTracker.h> #import <WebCore/KURL.h> #import <WebCore/SecurityOrigin.h> +#import <WebCore/DatabaseTracker.h> using namespace WebCore; @@ -69,6 +69,10 @@ using namespace WebCore; return reinterpret_cast<SecurityOrigin*>(_private)->port(); } +// FIXME: https://bugs.webkit.org/show_bug.cgi?id=40627 +// Proper steps should be taken to have subclass implementations of SecurityOrigin's +// origin, quota, and setQuota methods. + - (unsigned long long)usage { #if ENABLE(DATABASE) @@ -87,9 +91,9 @@ using namespace WebCore; #endif } -// Sets the storage quota (in bytes) -// If the quota is set to a value lower than the current usage, that quota will "stick" but no data will be purged to meet the new quota. -// This will simply prevent new data from being added to databases in that origin +// If the quota is set to a value lower than the current usage, that quota will +// "stick" but no data will be purged to meet the new quota. This will simply +// prevent new data from being added to databases in that origin - (void)setQuota:(unsigned long long)quota { #if ENABLE(DATABASE) diff --git a/WebKit/mac/Storage/WebSecurityOriginInternal.h b/WebKit/mac/WebCoreSupport/WebSecurityOriginInternal.h index 7bd6817..7bd6817 100644 --- a/WebKit/mac/Storage/WebSecurityOriginInternal.h +++ b/WebKit/mac/WebCoreSupport/WebSecurityOriginInternal.h diff --git a/WebKit/mac/Storage/WebSecurityOriginPrivate.h b/WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h index c7836f8..6518a16 100644 --- a/WebKit/mac/Storage/WebSecurityOriginPrivate.h +++ b/WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h @@ -37,17 +37,19 @@ - (NSString*)protocol; - (NSString*)host; -// Returns zero if the port is the default port for the protocol, non-zero otherwise +// Returns zero if the port is the default port for the protocol, non-zero otherwise. - (unsigned short)port; -// Returns the current total usage of all databases in this security origin in bytes +// Meant to be implemented in a subclass. +// Returns the current total usage of all relevant items in this security origin in bytes. - (unsigned long long)usage; +// Meant to be implemented in a subclass. +// Returns the quota of this security origin in bytes. - (unsigned long long)quota; -// Sets the storage quota (in bytes) -// If the quota is set to a value lower than the current usage, that quota will "stick" but no data will be purged to meet the new quota. -// This will simply prevent new data from being added to databases in that origin -- (void)setQuota:(unsigned long long)quota; +// Meant to be implemented in a subclass. +// Sets the storage quota in bytes. +- (void)setQuota:(unsigned long long)quota; @end diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm index 08c8911..58ce124 100644 --- a/WebKit/mac/WebView/WebHTMLView.mm +++ b/WebKit/mac/WebView/WebHTMLView.mm @@ -399,7 +399,7 @@ static CachedResourceClient* promisedDataClient() #endif @interface WebHTMLView (WebForwardDeclaration) // FIXME: Put this in a normal category and stop doing the forward declaration trick. -- (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize; +- (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth height:(float)minPageHeight maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize; @end @class NSTextInputContext; @@ -1040,7 +1040,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart) - (void)_web_setPrintingModeRecursive { - [self _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO]; + [self _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO]; #ifndef NDEBUG _private->enumeratingSubviews = YES; @@ -1052,7 +1052,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart) unsigned count = [descendantWebHTMLViews count]; for (unsigned i = 0; i < count; ++i) - [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO]; + [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO]; [descendantWebHTMLViews release]; @@ -1063,7 +1063,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart) - (void)_web_clearPrintingModeRecursive { - [self _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO]; + [self _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO]; #ifndef NDEBUG _private->enumeratingSubviews = YES; @@ -1075,7 +1075,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart) unsigned count = [descendantWebHTMLViews count]; for (unsigned i = 0; i < count; ++i) - [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO]; + [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO]; [descendantWebHTMLViews release]; @@ -1086,7 +1086,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart) - (void)_web_setPrintingModeRecursiveAndAdjustViewSize { - [self _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:YES]; + [self _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:YES]; #ifndef NDEBUG _private->enumeratingSubviews = YES; @@ -1098,7 +1098,7 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart) unsigned count = [descendantWebHTMLViews count]; for (unsigned i = 0; i < count; ++i) - [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:YES]; + [[descendantWebHTMLViews objectAtIndex:i] _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:YES]; [descendantWebHTMLViews release]; @@ -2230,29 +2230,31 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info) return _private->printing; } -- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth shrinkToFit:(BOOL)shrinkToFit +- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit { Frame* frame = core([self _frame]); if (!frame) return NO; float minLayoutWidth = 0; + float minLayoutHeight = 0; float maxLayoutWidth = 0; // If we are a frameset just print with the layout we have onscreen, otherwise relayout // according to the page width. if (!frame->document() || !frame->document()->isFrameSet()) { minLayoutWidth = shrinkToFit ? pageWidth * _WebHTMLViewPrintingMinimumShrinkFactor : pageWidth; + minLayoutHeight = shrinkToFit ? pageHeight * _WebHTMLViewPrintingMinimumShrinkFactor : pageHeight; maxLayoutWidth = shrinkToFit ? pageWidth * _WebHTMLViewPrintingMaximumShrinkFactor : pageWidth; } - [self _setPrinting:YES minimumPageWidth:minLayoutWidth maximumPageWidth:maxLayoutWidth adjustViewSize:YES]; + [self _setPrinting:YES minimumPageWidth:minLayoutWidth height:minLayoutHeight maximumPageWidth:maxLayoutWidth adjustViewSize:YES]; return YES; } - (void)_endPrintMode { - [self _setPrinting:NO minimumPageWidth:0 maximumPageWidth:0 adjustViewSize:YES]; + [self _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:YES]; } - (CGFloat)_adjustedBottomOfPageWithTop:(CGFloat)top bottom:(CGFloat)bottom limit:(CGFloat)bottomLimit @@ -3104,7 +3106,7 @@ WEBCORE_COMMAND(yankAndSelect) // Do a layout, but set up a new fixed width for the purposes of doing printing layout. // minPageWidth==0 implies a non-printing layout -- (void)layoutToMinimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustViewSize +- (void)layoutToMinimumPageWidth:(float)minPageWidth height:(float)minPageHeight maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustViewSize { [self reapplyStyles]; @@ -3123,7 +3125,7 @@ WEBCORE_COMMAND(yankAndSelect) if (FrameView* coreView = coreFrame->view()) { if (minPageWidth > 0.0) - coreView->forceLayoutWithPageWidthRange(minPageWidth, maxPageWidth, adjustViewSize); + coreView->forceLayoutForPagination(FloatSize(minPageWidth, minPageHeight), maxPageWidth / minPageWidth, adjustViewSize ? Frame::AdjustViewSize : Frame::DoNotAdjustViewSize); else { coreView->forceLayout(!adjustViewSize); if (adjustViewSize) @@ -3139,7 +3141,7 @@ WEBCORE_COMMAND(yankAndSelect) - (void)layout { - [self layoutToMinimumPageWidth:0.0f maximumPageWidth:0.0f adjustingViewSize:NO]; + [self layoutToMinimumPageWidth:0 height:0 maximumPageWidth:0 adjustingViewSize:NO]; } // Deliver mouseup events to the DOM for button 2. @@ -3820,7 +3822,7 @@ static BOOL isInPasswordField(Frame* coreFrame) // Does setNeedsDisplay:NO as a side effect when printing is ending. // pageWidth != 0 implies we will relayout to a new width -- (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize +- (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth height:(float)minPageHeight maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize { WebFrame *frame = [self _frame]; NSArray *subframes = [frame childFrames]; @@ -3830,7 +3832,7 @@ static BOOL isInPasswordField(Frame* coreFrame) WebFrame *subframe = [subframes objectAtIndex:i]; WebFrameView *frameView = [subframe frameView]; if ([[subframe _dataSource] _isDocumentHTML]) { - [(WebHTMLView *)[frameView documentView] _setPrinting:printing minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:adjustViewSize]; + [(WebHTMLView *)[frameView documentView] _setPrinting:printing minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:adjustViewSize]; } } @@ -3842,7 +3844,7 @@ static BOOL isInPasswordField(Frame* coreFrame) _private->avoidingPrintOrphan = NO; [self setNeedsToApplyStyles:YES]; [self setNeedsLayout:YES]; - [self layoutToMinimumPageWidth:minPageWidth maximumPageWidth:maxPageWidth adjustingViewSize:adjustViewSize]; + [self layoutToMinimumPageWidth:minPageWidth height:minPageHeight maximumPageWidth:maxPageWidth adjustingViewSize:adjustViewSize]; if (!printing) { // Can't do this when starting printing or nested printing won't work, see 3491427. [self setNeedsDisplay:NO]; @@ -3863,7 +3865,7 @@ static BOOL isInPasswordField(Frame* coreFrame) // If the WebHTMLView itself is what we're printing, then we will never have to do this. BOOL wasInPrintingMode = _private->printing; if (!wasInPrintingMode) - [self _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO]; + [self _setPrinting:YES minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO]; *newBottom = [self _adjustedBottomOfPageWithTop:oldTop bottom:oldBottom limit:bottomLimit]; @@ -3874,7 +3876,7 @@ static BOOL isInPasswordField(Frame* coreFrame) [self performSelector:@selector(_delayedEndPrintMode:) withObject:currenPrintOperation afterDelay:0]; else // not sure if this is actually ever invoked, it probably shouldn't be - [self _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO]; + [self _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO]; } } @@ -3904,8 +3906,8 @@ static BOOL isInPasswordField(Frame* coreFrame) // This is used for Carbon printing. At some point we might want to make this public API. - (void)setPageWidthForPrinting:(float)pageWidth { - [self _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO]; - [self _setPrinting:YES minimumPageWidth:pageWidth maximumPageWidth:pageWidth adjustViewSize:YES]; + [self _setPrinting:NO minimumPageWidth:0 height:0 maximumPageWidth:0 adjustViewSize:NO]; + [self _setPrinting:YES minimumPageWidth:pageWidth height:0 maximumPageWidth:pageWidth adjustViewSize:YES]; } - (void)_endPrintModeAndRestoreWindowAutodisplay @@ -3948,8 +3950,9 @@ static BOOL isInPasswordField(Frame* coreFrame) [self displayIfNeeded]; [[self window] setAutodisplay:NO]; + [[self _webView] _adjustPrintingMarginsForHeaderAndFooter]; NSPrintOperation *printOperation = [NSPrintOperation currentOperation]; - if (![self _beginPrintModeWithPageWidth:[printOperation _web_availablePaperWidth] shrinkToFit:YES]) + if (![self _beginPrintModeWithPageWidth:[printOperation _web_availablePaperWidth] height:[printOperation _web_availablePaperHeight] shrinkToFit:YES]) return NO; // Certain types of errors, including invalid page ranges, can cause beginDocument and @@ -3959,7 +3962,6 @@ static BOOL isInPasswordField(Frame* coreFrame) // If not cancelled, this delayed call will be invoked in the next pass through the main event loop, // which is after beginDocument and endDocument would be called. [self performSelector:@selector(_delayedEndPrintMode:) withObject:printOperation afterDelay:0]; - [[self _webView] _adjustPrintingMarginsForHeaderAndFooter]; // There is a theoretical chance that someone could do some drawing between here and endDocument, // if something caused setNeedsDisplay after this point. If so, it's not a big tragedy, because diff --git a/WebKit/mac/WebView/WebHTMLViewPrivate.h b/WebKit/mac/WebView/WebHTMLViewPrivate.h index 3beb0d6..c2ca3fe 100644 --- a/WebKit/mac/WebView/WebHTMLViewPrivate.h +++ b/WebKit/mac/WebView/WebHTMLViewPrivate.h @@ -135,7 +135,7 @@ extern const float _WebHTMLViewPrintingMaximumShrinkFactor; - (void)_layoutForPrinting; - (WebCGFloat)_adjustedBottomOfPageWithTop:(WebCGFloat)top bottom:(WebCGFloat)bottom limit:(WebCGFloat)bottomLimit; - (BOOL)_isInPrintMode; -- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth shrinkToFit:(BOOL)shrinkToFit; +- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit; - (void)_endPrintMode; - (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard; diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h index 4175a5d..a8ebdca 100644 --- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h +++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h @@ -83,6 +83,8 @@ #define WebKitLocalStorageDatabasePathPreferenceKey @"WebKitLocalStorageDatabasePathPreferenceKey" #define WebKitEnableFullDocumentTeardownPreferenceKey @"WebKitEnableFullDocumentTeardown" #define WebKitOfflineWebApplicationCacheEnabledPreferenceKey @"WebKitOfflineWebApplicationCacheEnabled" +#define WebKitApplicationCacheTotalQuota @"WebKitApplicationCacheTotalQuota" +#define WebKitApplicationCacheDefaultOriginQuota @"WebKitApplicationCacheDefaultOriginQuota" #define WebKitZoomsTextOnlyPreferenceKey @"WebKitZoomsTextOnly" #define WebKitJavaScriptCanAccessClipboardPreferenceKey @"WebKitJavaScriptCanAccessClipboard" #define WebKitXSSAuditorEnabledPreferenceKey @"WebKitXSSAuditorEnabled" diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm index 63915dc..7ec2439 100644 --- a/WebKit/mac/WebView/WebPreferences.mm +++ b/WebKit/mac/WebView/WebPreferences.mm @@ -30,6 +30,7 @@ #import "WebPreferencesPrivate.h" #import "WebPreferenceKeysPrivate.h" +#import "WebApplicationCache.h" #import "WebKitLogging.h" #import "WebKitNSStringExtras.h" #import "WebKitSystemBits.h" @@ -37,6 +38,7 @@ #import "WebKitVersionChecks.h" #import "WebNSDictionaryExtras.h" #import "WebNSURLExtras.h" +#import <WebCore/ApplicationCacheStorage.h> NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotification"; NSString *WebPreferencesRemovedNotification = @"WebPreferencesRemovedNotification"; @@ -170,6 +172,8 @@ static WebCacheModel cacheModelForMainBundle(void) - (void)_setIntegerValue:(int)value forKey:(NSString *)key; - (float)_floatValueForKey:(NSString *)key; - (void)_setFloatValue:(float)value forKey:(NSString *)key; +- (void)_setLongLongValue:(long long)value forKey:(NSString *)key; +- (long long)_longLongValueForKey:(NSString *)key; - (void)_setUnsignedLongLongValue:(unsigned long long)value forKey:(NSString *)key; - (unsigned long long)_unsignedLongLongValueForKey:(NSString *)key; @end @@ -364,6 +368,8 @@ static WebCacheModel cacheModelForMainBundle(void) [NSNumber numberWithBool:NO], WebKitHTML5TreeBuilderEnabledPreferenceKey, [NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey, [NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey, + [NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota, + [NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheDefaultOriginQuota, nil]; // This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above @@ -461,6 +467,23 @@ static WebCacheModel cacheModelForMainBundle(void) [self _postPreferencesChangesNotification]; } +- (long long)_longLongValueForKey:(NSString *)key +{ + id o = [self _valueForKey:key]; + return [o respondsToSelector:@selector(longLongValue)] ? [o longLongValue] : 0; +} + +- (void)_setLongLongValue:(long long)value forKey:(NSString *)key +{ + if ([self _longLongValueForKey:key] == value) + return; + NSString *_key = KEY(key); + [_private->values _webkit_setLongLong:value forKey:_key]; + if (_private->autosaves) + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithLongLong:value] forKey:_key]; + [self _postPreferencesChangesNotification]; +} + - (unsigned long long)_unsignedLongLongValueForKey:(NSString *)key { id o = [self _valueForKey:key]; @@ -973,6 +996,31 @@ static WebCacheModel cacheModelForMainBundle(void) [self _setFloatValue:factor forKey:WebKitPDFScaleFactorPreferenceKey]; } +- (int64_t)applicationCacheTotalQuota +{ + ASSERT([self _longLongValueForKey:WebKitApplicationCacheTotalQuota] == [WebApplicationCache maximumSize]); + return [self _longLongValueForKey:WebKitApplicationCacheTotalQuota]; +} + +- (void)setApplicationCacheTotalQuota:(int64_t)quota +{ + [self _setLongLongValue:quota forKey:WebKitApplicationCacheTotalQuota]; + + // Application Cache Preferences are stored on the global cache storage manager, not in Settings. + [WebApplicationCache setMaximumSize:quota]; +} + +- (int64_t)applicationCacheDefaultOriginQuota +{ + ASSERT([self _longLongValueForKey:WebKitApplicationCacheDefaultOriginQuota] == [WebApplicationCache defaultOriginQuota]); + return [self _longLongValueForKey:WebKitApplicationCacheDefaultOriginQuota]; +} + +- (void)setApplicationCacheDefaultOriginQuota:(int64_t)quota +{ + [self _setLongLongValue:quota forKey:WebKitApplicationCacheDefaultOriginQuota]; +} + - (PDFDisplayMode)PDFDisplayMode { PDFDisplayMode value = [self _integerValueForKey:WebKitPDFDisplayModePreferenceKey]; diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h index 073b364..01f2aa8 100644 --- a/WebKit/mac/WebView/WebPreferencesPrivate.h +++ b/WebKit/mac/WebView/WebPreferencesPrivate.h @@ -134,6 +134,12 @@ extern NSString *WebPreferencesRemovedNotification; - (float)PDFScaleFactor; - (void)setPDFScaleFactor:(float)scale; +- (int64_t)applicationCacheTotalQuota; +- (void)setApplicationCacheTotalQuota:(int64_t)quota; + +- (int64_t)applicationCacheDefaultOriginQuota; +- (void)setApplicationCacheDefaultOriginQuota:(int64_t)quota; + - (WebKitEditableLinkBehavior)editableLinkBehavior; - (void)setEditableLinkBehavior:(WebKitEditableLinkBehavior)behavior; diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h index eccb10f..0fb120c 100644 --- a/WebKit/mac/WebView/WebUIDelegatePrivate.h +++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -125,6 +125,16 @@ enum { */ - (void)webView:(WebView *)sender frame:(WebFrame *)frame exceededDatabaseQuotaForSecurityOrigin:(WebSecurityOrigin *)origin database:(NSString *)databaseIdentifier; +/*! + @method webView:exceededApplicationCacheOriginQuotaForSecurityOrigin: + @param sender The WebView sending the delegate method. + @param origin The security origin that needs a larger quota + @discussion This method is called when a page attempts to store more in the Application Cache + for an origin than was allowed by the quota (or default) set for the origin. This allows the + quota to be increased for the security origin. +*/ +- (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin; + - (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request windowFeatures:(NSDictionary *)features; - (BOOL)webView:(WebView *)sender shouldReplaceUploadFile:(NSString *)path usingGeneratedFilename:(NSString **)filename; diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm index 3d878bc..aefd56b 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -34,6 +34,7 @@ #import "DOMCSSStyleDeclarationInternal.h" #import "DOMNodeInternal.h" #import "DOMRangeInternal.h" +#import "WebApplicationCache.h" #import "WebBackForwardListInternal.h" #import "WebBaseNetscapePluginView.h" #import "WebCache.h" @@ -1440,6 +1441,9 @@ static bool fastDocumentTeardownEnabled() settings->setHTML5TreeBuilderEnabled_DO_NOT_USE([preferences html5TreeBuilderEnabled]); settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]); settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]); + + // Application Cache Preferences are stored on the global cache storage manager, not in Settings. + [WebApplicationCache setDefaultOriginQuota:[preferences applicationCacheDefaultOriginQuota]]; } static inline IMP getMethod(id o, SEL s) diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp index 8a94c9b..53c1494 100644 --- a/WebKit/qt/Api/qgraphicswebview.cpp +++ b/WebKit/qt/Api/qgraphicswebview.cpp @@ -711,7 +711,12 @@ void QGraphicsWebView::load(const QNetworkRequest& request, through the charset attribute of the HTML script tag. Alternatively, the encoding can also be specified by the web server. - \sa load(), setContent(), QWebFrame::toHtml() + This is a convenience function equivalent to setContent(html, "text/html", baseUrl). + + \warning This function works only for HTML, for other mime types (i.e. XHTML, SVG) + setContent() should be used instead. + + \sa load(), setContent(), QWebFrame::toHtml(), QWebFrame::setContent() */ void QGraphicsWebView::setHtml(const QString& html, const QUrl& baseUrl) { diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp index f10d5b4..e90367e 100644 --- a/WebKit/qt/Api/qwebframe.cpp +++ b/WebKit/qt/Api/qwebframe.cpp @@ -793,9 +793,14 @@ void QWebFrame::load(const QNetworkRequest &req, script can be specified through the charset attribute of the HTML script tag. It is also possible for the encoding to be specified by web server. + This is a convenience function equivalent to setContent(html, "text/html", baseUrl). + \note This method will not affect session or global history for the frame. - \sa toHtml(), setContent() + \warning This function works only for HTML, for other mime types (i.e. XHTML, SVG) + setContent() should be used instead. + + \sa toHtml(), setContent(), load() */ void QWebFrame::setHtml(const QString &html, const QUrl &baseUrl) { diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp index fa49293..a8bd06a 100644 --- a/WebKit/qt/Api/qwebpage.cpp +++ b/WebKit/qt/Api/qwebpage.cpp @@ -1218,14 +1218,7 @@ typedef struct { void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event) { if (event->propertyName() == "_q_viewMode") { - QString mode = q->property("_q_viewMode").toString(); - if (mode != viewMode) { - viewMode = mode; - WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame()); - WebCore::FrameView* view = frame->view(); - frame->document()->updateStyleSelector(); - view->layout(); - } + page->setViewMode(Page::stringToViewMode(q->property("_q_viewMode").toString())); } else if (event->propertyName() == "_q_HTMLTokenizerChunkSize") { int chunkSize = q->property("_q_HTMLTokenizerChunkSize").toInt(); q->handle()->page->setCustomHTMLTokenizerChunkSize(chunkSize); diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h index 44ceb87..cf4ab88 100644 --- a/WebKit/qt/Api/qwebpage_p.h +++ b/WebKit/qt/Api/qwebpage_p.h @@ -201,8 +201,6 @@ public: QWebInspector* inspector; bool inspectorIsInternalOnly; // True if created through the Inspect context menu action Qt::DropAction m_lastDropAction; - - QString viewMode; static bool drtRun; }; diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp index 3daa045..773c79a 100644 --- a/WebKit/qt/Api/qwebview.cpp +++ b/WebKit/qt/Api/qwebview.cpp @@ -470,7 +470,12 @@ void QWebView::load(const QNetworkRequest &request, through the charset attribute of the HTML script tag. Alternatively, the encoding can also be specified by the web server. - \sa load(), setContent(), QWebFrame::toHtml() + This is a convenience function equivalent to setContent(html, "text/html", baseUrl). + + \warning This function works only for HTML, for other mime types (i.e. XHTML, SVG) + setContent() should be used instead. + + \sa load(), setContent(), QWebFrame::toHtml(), QWebFrame::setContent() */ void QWebView::setHtml(const QString &html, const QUrl &baseUrl) { diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog index 455fd89..b49385a 100644 --- a/WebKit/qt/ChangeLog +++ b/WebKit/qt/ChangeLog @@ -1,3 +1,119 @@ +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientQt::createPopupMenu): + (WebCore::ChromeClientQt::createSearchPopupMenu): + * WebCoreSupport/ChromeClientQt.h: + +2010-08-02 Jeremy Orlow <jorlow@chromium.org> + + Speculative revert of 64425 due to Chromium instability + https://bugs.webkit.org/show_bug.cgi?id=43347 + + * WebCoreSupport/ChromeClientQt.cpp: + * WebCoreSupport/ChromeClientQt.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientQt::createPopupMenu): + (WebCore::ChromeClientQt::createSearchPopupMenu): + * WebCoreSupport/ChromeClientQt.h: + +2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64422. + http://trac.webkit.org/changeset/64422 + https://bugs.webkit.org/show_bug.cgi?id=43304 + + Build fixes are needed for Snow Leopard and Windows. + (Requested by lca on #webkit). + + * WebCoreSupport/ChromeClientQt.cpp: + * WebCoreSupport/ChromeClientQt.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientQt::createPopupMenu): + (WebCore::ChromeClientQt::createSearchPopupMenu): + * WebCoreSupport/ChromeClientQt.h: + +2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Simon Fraser. + + Enabling view modes to all platforms + https://bugs.webkit.org/show_bug.cgi?id=37505 + + As view mode media feature is now supported by WebCore there is no need + to keep its implementation here. QtWebKit now uses WebCore's view mode media feature + implementation. + + * Api/qwebpage.cpp: + (QWebPagePrivate::dynamicPropertyChangeEvent): + * Api/qwebpage_p.h: + * WebCoreSupport/ChromeClientQt.cpp: + * WebCoreSupport/ChromeClientQt.h: + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::reachedApplicationCacheOriginQuota): + * WebCoreSupport/ChromeClientQt.h: + +2010-07-29 Alexis Menard <alexis.menard@nokia.com> + + Reviewed by Antonio Gomes. + + QWebFrame and QWebView documentation fix. + + The QWebFrame and the QWebView setHtml() methods are a bit confusing. + There are a few registered bugs in Webkit's bugzilla that source is + in a bad usage of the function. + Additional information were added. + + https://bugs.webkit.org/show_bug.cgi?id=31115 + + * Api/qgraphicswebview.cpp: + * Api/qwebframe.cpp: + * Api/qwebview.cpp: + 2010-07-28 Kim Grönholm <kim.1.gronholm@nokia.com> Reviewed by Antonio Gomes. diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index 2c64a78..a0bac72 100644 --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2006 Zack Rusin <zack@kde.org> * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * All rights reserved. * @@ -45,6 +46,7 @@ #include "NotImplemented.h" #include "NotificationPresenterClientQt.h" #include "PageClientQt.h" +#include "PopupMenuQt.h" #if defined(Q_WS_MAEMO_5) #include "QtMaemoWebPopup.h" #else @@ -52,6 +54,7 @@ #endif #include "QWebPageClient.h" #include "ScrollbarTheme.h" +#include "SearchPopupMenuQt.h" #include "SecurityOrigin.h" #include "ViewportArguments.h" #include "WindowFeatures.h" @@ -483,6 +486,11 @@ void ChromeClientQt::reachedMaxAppCacheSize(int64_t) // FIXME: Free some space. notImplemented(); } + +void ChromeClientQt::reachedApplicationCacheOriginQuota(SecurityOrigin*) +{ + notImplemented(); +} #endif #if ENABLE(NOTIFICATIONS) @@ -598,33 +606,6 @@ QtAbstractWebPopup* ChromeClientQt::createSelectPopup() #endif } -#if ENABLE(WIDGETS_10_SUPPORT) -bool ChromeClientQt::isWindowed() -{ - return m_webPage->d->viewMode == "windowed"; -} - -bool ChromeClientQt::isFloating() -{ - return m_webPage->d->viewMode == "floating"; -} - -bool ChromeClientQt::isFullscreen() -{ - return m_webPage->d->viewMode == "fullscreen"; -} - -bool ChromeClientQt::isMaximized() -{ - return m_webPage->d->viewMode == "maximized"; -} - -bool ChromeClientQt::isMinimized() -{ - return m_webPage->d->viewMode == "minimized"; -} -#endif - void ChromeClientQt::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const { if (m_webPage->mainFrame()->d->initialLayoutComplete) @@ -644,4 +625,19 @@ void ChromeClientQt::didReceiveViewportArguments(Frame* frame, const ViewportArg emit m_webPage->viewportChangeRequested(hints); } +bool ChromeClientQt::selectItemWritingDirectionIsNatural() +{ + return false; +} + +PassRefPtr<PopupMenu> ChromeClientQt::createPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuQt(client)); +} + +PassRefPtr<SearchPopupMenu> ChromeClientQt::createSearchPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuQt(client)); +} + } // namespace WebCore diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h index 70b4a25..aab2813 100644 --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2006 Zack Rusin <zack@kde.org> + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * All rights reserved. * @@ -131,6 +132,7 @@ namespace WebCore { #endif #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); + virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*); #endif #if ENABLE(NOTIFICATIONS) @@ -168,13 +170,9 @@ namespace WebCore { virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*); virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { } -#if ENABLE(WIDGETS_10_SUPPORT) - virtual bool isWindowed(); - virtual bool isFloating(); - virtual bool isFullscreen(); - virtual bool isMaximized(); - virtual bool isMinimized(); -#endif + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; + virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; QtAbstractWebPopup* createSelectPopup(); diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index 6b81bcc..d4a850e 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,120 @@ +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::selectItemWritingDirectionIsNatural): + (WebChromeClient::createPopupMenu): + (WebChromeClient::createSearchPopupMenu): + * WebCoreSupport/WebChromeClient.h: + +2010-08-02 Jon Honeycutt <jhoneycutt@apple.com> + + Move InjectedBundle.vcproj to where the other WebKitTestRunner vcprojs live. + + Reviewed by Sam Weinig. + + * WebKit.vcproj/WebKit.sln: + +2010-08-02 Jeremy Orlow <jorlow@chromium.org> + + Speculative revert of 64425 due to Chromium instability + https://bugs.webkit.org/show_bug.cgi?id=43347 + + * WebCoreSupport/WebChromeClient.cpp: + * WebCoreSupport/WebChromeClient.h: + * WebView.cpp: + (WebView::mouseWheel): + +2010-07-31 Luiz Agostini <luiz.agostini@openbossa.org> + + Build fix: Windows. + + * WebView.cpp: + (WebView::mouseWheel): + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::selectItemWritingDirectionIsNatural): + (WebChromeClient::createPopupMenu): + (WebChromeClient::createSearchPopupMenu): + * WebCoreSupport/WebChromeClient.h: + +2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64422. + http://trac.webkit.org/changeset/64422 + https://bugs.webkit.org/show_bug.cgi?id=43304 + + Build fixes are needed for Snow Leopard and Windows. + (Requested by lca on #webkit). + + * WebCoreSupport/WebChromeClient.cpp: + * WebCoreSupport/WebChromeClient.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::selectItemWritingDirectionIsNatural): + (WebChromeClient::createPopupMenu): + (WebChromeClient::createSearchPopupMenu): + * WebCoreSupport/WebChromeClient.h: + +2010-07-31 Daniel Bates <dbates@rim.com> + + Attempt to fix the Windows build after changeset 64409 <http://trac.webkit.org/changeset/64409>. + + * WebFrame.cpp: + (WebFrame::setPrinting): + +2010-07-30 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/8257783> Short documents may print a second blank page + https://bugs.webkit.org/show_bug.cgi?id=43271 + + * WebFrame.cpp: + (WebFrame::setPrinting): Updated for changes to Frame::setPrinting(). Passing 0 for the + page height, which maintains existing behavior. + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::reachedApplicationCacheOriginQuota): + * WebCoreSupport/WebChromeClient.h: + 2010-07-26 Steve Block <steveblock@google.com> Reviewed by Jeremy Orlow. diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp index 73532a6..08d4ee9 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp +++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -55,6 +56,9 @@ #include <WebCore/LocalizedStrings.h> #include <WebCore/NotImplemented.h> #include <WebCore/Page.h> +#include <WebCore/SecurityOrigin.h> +#include <WebCore/PopupMenuWin.h> +#include <WebCore/SearchPopupMenuWin.h> #include <WebCore/WindowFeatures.h> #pragma warning(pop) @@ -617,6 +621,11 @@ void WebChromeClient::reachedMaxAppCacheSize(int64_t spaceNeeded) // FIXME: Free some space. notImplemented(); } + +void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin*) +{ + notImplemented(); +} #endif void WebChromeClient::populateVisitedLinks() @@ -868,3 +877,18 @@ void WebChromeClient::exitFullscreenForNode(Node*) #endif +bool WebChromeClient::selectItemWritingDirectionIsNatural() +{ + return true; +} + +PassRefPtr<PopupMenu> WebChromeClient::createPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuWin(client)); +} + +PassRefPtr<SearchPopupMenu> WebChromeClient::createSearchPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuWin(client)); +} + diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h index e7845a9..cea11c7 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.h +++ b/WebKit/win/WebCoreSupport/WebChromeClient.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -118,6 +119,7 @@ public: #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); + virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*); #endif virtual void populateVisitedLinks(); @@ -165,6 +167,10 @@ public: virtual WebCore::NotificationPresenter* notificationPresenter() const { return reinterpret_cast<WebCore::NotificationPresenter*>(m_notificationsDelegate.get()); } #endif + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; + virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; + private: COMPtr<IWebUIDelegate> uiDelegate(); diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp index 5705f1e..f07821f 100644 --- a/WebKit/win/WebFrame.cpp +++ b/WebKit/win/WebFrame.cpp @@ -1939,7 +1939,7 @@ void WebFrame::setPrinting(bool printing, float minPageWidth, float maxPageWidth { Frame* coreFrame = core(this); ASSERT(coreFrame); - coreFrame->setPrinting(printing, minPageWidth, maxPageWidth, adjustViewSize); + coreFrame->setPrinting(printing, FloatSize(minPageWidth, 0), maxPageWidth / minPageWidth, adjustViewSize ? Frame::AdjustViewSize : Frame::DoNotAdjustViewSize); } HRESULT STDMETHODCALLTYPE WebFrame::setInPrintingMode( diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln index b954436..251fa5f 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.sln +++ b/WebKit/win/WebKit.vcproj/WebKit.sln @@ -118,7 +118,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinLauncher", "..\..\..\Web {C59E5129-B453-49B7-A52B-1E104715F76E} = {C59E5129-B453-49B7-A52B-1E104715F76E}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundle", "..\..\..\WebKitTools\WebKitTestRunner\InjectedBundle\win\InjectedBundle.vcproj", "{CBC3391C-F060-4BF5-A66E-81404168816B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundle", "..\..\..\WebKitTools\WebKitTestRunner\win\InjectedBundle.vcproj", "{CBC3391C-F060-4BF5-A66E-81404168816B}"
ProjectSection(ProjectDependencies) = postProject
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD} = {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}
EndProjectSection
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index 41ae079..8dfb7e7 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -110,6 +110,7 @@ #include <WebCore/PluginDatabase.h> #include <WebCore/PluginView.h> #include <WebCore/PopupMenu.h> +#include <WebCore/PopupMenuWin.h> #include <WebCore/ProgressTracker.h> #include <WebCore/RenderLayer.h> #include <WebCore/RenderTheme.h> @@ -1613,9 +1614,9 @@ bool WebView::mouseWheel(WPARAM wParam, LPARAM lParam, bool isMouseHWheel) TCHAR className[256]; // Make sure truncation won't affect the comparison. - ASSERT(ARRAYSIZE(className) > _tcslen(PopupMenu::popupClassName())); + ASSERT(ARRAYSIZE(className) > _tcslen(PopupMenuWin::popupClassName())); - if (GetClassName(focusedWindow, className, ARRAYSIZE(className)) && !_tcscmp(className, PopupMenu::popupClassName())) { + if (GetClassName(focusedWindow, className, ARRAYSIZE(className)) && !_tcscmp(className, PopupMenuWin::popupClassName())) { // We don't let the WebView scroll here for two reasons - 1) To match Firefox behavior, 2) If we do scroll, we lose the // focus ring around the select menu. SetFocus(m_viewWindow); diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog index 2195112..362f6e5 100644 --- a/WebKit/wx/ChangeLog +++ b/WebKit/wx/ChangeLog @@ -1,3 +1,96 @@ +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebKitSupport/ChromeClientWx.cpp: + (WebCore::ChromeClientWx::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientWx::createPopupMenu): + (WebCore::ChromeClientWx::createSearchPopupMenu): + * WebKitSupport/ChromeClientWx.h: + +2010-08-02 Jeremy Orlow <jorlow@chromium.org> + + Speculative revert of 64425 due to Chromium instability + https://bugs.webkit.org/show_bug.cgi?id=43347 + + * WebKitSupport/ChromeClientWx.cpp: + * WebKitSupport/ChromeClientWx.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebKitSupport/ChromeClientWx.cpp: + (WebCore::ChromeClientWx::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientWx::createPopupMenu): + (WebCore::ChromeClientWx::createSearchPopupMenu): + * WebKitSupport/ChromeClientWx.h: + +2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64422. + http://trac.webkit.org/changeset/64422 + https://bugs.webkit.org/show_bug.cgi?id=43304 + + Build fixes are needed for Snow Leopard and Windows. + (Requested by lca on #webkit). + + * WebKitSupport/ChromeClientWx.cpp: + * WebKitSupport/ChromeClientWx.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * WebKitSupport/ChromeClientWx.cpp: + (WebCore::ChromeClientWx::selectItemWritingDirectionIsNatural): + (WebCore::ChromeClientWx::createPopupMenu): + (WebCore::ChromeClientWx::createSearchPopupMenu): + * WebKitSupport/ChromeClientWx.h: + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + * WebKitSupport/ChromeClientWx.cpp: + (WebCore::ChromeClientWx::reachedApplicationCacheOriginQuota): + * WebKitSupport/ChromeClientWx.h: + +2010-07-29 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix, add file missing from DOM bindings commit. + + * WebEdit.cpp: Added. + (WebCore::): + (wxWebEditCommand::wxWebEditCommand): + (wxWebEditCommand::~wxWebEditCommand): + (wxWebEditCommand::SetNodeAttribute): + (wxWebEditCommand::Apply): + 2010-07-28 Kevin Ollivier <kevino@theolliviers.com> [wx] wxPython build fix that was missed in last commit. diff --git a/WebKit/wx/WebEdit.cpp b/WebKit/wx/WebEdit.cpp new file mode 100644 index 0000000..ed2d0d4 --- /dev/null +++ b/WebKit/wx/WebEdit.cpp @@ -0,0 +1,65 @@ + + +#include "config.h" +#include "WebEdit.h" + +#include "AtomicString.h" +#include "CompositeEditCommand.h" +#include "Document.h" +#include "Frame.h" +#include "HTMLNames.h" +#include "QualifiedName.h" +#include "StringImpl.h" + +#include "WebFrame.h" +#include "WebDOMElement.h" + +namespace WebCore { + +class WebCoreEditCommand: public CompositeEditCommand +{ +public: + WebCoreEditCommand(WebCore::Document* document) + : CompositeEditCommand(document) + { } + + void setElementAttribute(PassRefPtr<Element> element, const QualifiedName& attribute, const AtomicString& value) + { + setNodeAttribute(element, attribute, value); + } + // composite commands are applied as they are added, so we don't + // need doApply to do anything. + virtual void doApply() {} +}; + +} + +wxWebEditCommand::wxWebEditCommand(wxWebFrame* webframe) +{ + if (webframe) { + WebCore::Frame* frame = webframe->GetFrame(); + if (frame && frame->document()) + m_impl = new WebCore::WebCoreEditCommand(frame->document()); + m_impl->ref(); + } +} + +wxWebEditCommand::~wxWebEditCommand() +{ + // the impl. is ref-counted, so don't delete it as it may be in an undo/redo stack + if (m_impl) + m_impl->deref(); + m_impl = 0; +} + +void wxWebEditCommand::SetNodeAttribute(WebDOMElement* element, const wxString& name, const wxString& value) +{ + if (m_impl) + m_impl->setElementAttribute(element->impl(), WebCore::QualifiedName(WebCore::nullAtom, WebCore::String(name), WebCore::nullAtom), WebCore::String(value)); +} + +void wxWebEditCommand::Apply() +{ + if (m_impl) + m_impl->apply(); +}
\ No newline at end of file diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp index d81a20c..9c90596 100644 --- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp +++ b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * All rights reserved. * @@ -38,6 +39,9 @@ #include "Icon.h" #include "NotImplemented.h" #include "PlatformString.h" +#include "SecurityOrigin.h" +#include "PopupMenuWx.h" +#include "SearchPopupMenuWx.h" #include "WindowFeatures.h" #include <stdio.h> @@ -429,6 +433,11 @@ void ChromeClientWx::reachedMaxAppCacheSize(int64_t spaceNeeded) { notImplemented(); } + +void ChromeClientWx::reachedApplicationCacheOriginQuota(SecurityOrigin*) +{ + notImplemented(); +} #endif void ChromeClientWx::scroll(const IntSize&, const IntRect&, const IntRect&) @@ -458,4 +467,19 @@ void ChromeClientWx::requestGeolocationPermissionForFrame(Frame*, Geolocation*) notImplemented(); } +bool ChromeClientWx::selectItemWritingDirectionIsNatural() +{ + return false; +} + +PassRefPtr<PopupMenu> ChromeClientWx::createPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuWx(client)); +} + +PassRefPtr<SearchPopupMenu> ChromeClientWx::createSearchPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuWx(client)); +} + } diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.h b/WebKit/wx/WebKitSupport/ChromeClientWx.h index 4b156ed..5b60446 100644 --- a/WebKit/wx/WebKitSupport/ChromeClientWx.h +++ b/WebKit/wx/WebKitSupport/ChromeClientWx.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * All rights reserved. * @@ -125,6 +126,7 @@ public: #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); + virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*); #endif virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); @@ -141,6 +143,10 @@ public: virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*); virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { } + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; + virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; + private: wxWebView* m_webView; }; |