diff options
Diffstat (limited to 'WebKit')
153 files changed, 3545 insertions, 671 deletions
diff --git a/WebKit/CMakeLists.txt b/WebKit/CMakeLists.txt index 5b0cebd..6e0996c 100644 --- a/WebKit/CMakeLists.txt +++ b/WebKit/CMakeLists.txt @@ -2,6 +2,7 @@ SET(WebKit_INCLUDE_DIRECTORIES "${WEBKIT_DIR}" "${WEBCORE_DIR}" "${WEBCORE_DIR}/bindings/js" + "${WEBCORE_DIR}/bindings" "${WEBCORE_DIR}/bridge" "${WEBCORE_DIR}/bridge/jsc" "${WEBCORE_DIR}/css" @@ -57,7 +58,7 @@ ADD_DEFINITIONS(-DBUILDING_WebKit) 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}) +ADD_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} LINK_FLAGS "${WebKit_LINK_FLAGS}") INSTALL(TARGETS ${WebKit_LIBRARY_NAME} DESTINATION lib) diff --git a/WebKit/CMakeListsEfl.txt b/WebKit/CMakeListsEfl.txt index 7eeddeb..2fc964b 100644 --- a/WebKit/CMakeListsEfl.txt +++ b/WebKit/CMakeListsEfl.txt @@ -17,7 +17,7 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${EVAS_INCLUDE_DIRS} ${Gdk_INCLUDE_DIRS} ${Glib_INCLUDE_DIRS} - ${LIBSOUP2_INCLUDE_DIRS} + ${LIBSOUP24_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS} ${LIBXSLT_INCLUDE_DIRS} ${SQLITE_INCLUDE_DIRS} @@ -50,7 +50,7 @@ LIST(APPEND WebKit_LIBRARIES ${Gdk_LIBRARIES} ${Glib_LIBRARIES} ${Gtk_LIBRARIES} - ${LIBSOUP_LIBRARIES} + ${LIBSOUP24_LIBRARIES} ${LIBXML2_LIBRARIES} ${Pango_LIBRARIES} ${SQLITE_LIBRARIES} @@ -79,7 +79,7 @@ SET(EWebLauncher_LIBRARIES ${EVAS_LIBRARIES} ${Gdk_LIBRARIES} ${Glib_LIBRARIES} - ${LIBSOUP2_LIBRARIES} + ${LIBSOUP24_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${SQLITE_LIBRARIES} @@ -90,11 +90,12 @@ SET(EWebLauncher_LINK_FLAGS ${EDJE_LDFLAGS} ${EFLDEPS_LDFLAGS} ${EVAS_LDFLAGS} + ${LIBSOUP24_LDFLAGS} ) ADD_EXECUTABLE(../Programs/EWebLauncher ${EWebLauncher_SOURCES}) TARGET_LINK_LIBRARIES(../Programs/EWebLauncher ${EWebLauncher_LIBRARIES}) -ADD_TARGET_PROPERTIES(../Programs/EWebLauncher LINK_FLAGS ${EWebLauncher_LINK_FLAGS}) +ADD_TARGET_PROPERTIES(../Programs/EWebLauncher LINK_FLAGS "${EWebLauncher_LINK_FLAGS}") IF (SHARED_CORE) SET(LIBS_PRIVATE "-l${WTF_LIBRARY_NAME} -l${JavaScriptCore_LIBRARY_NAME} -l${WebCore_LIBRARY_NAME}") diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog index 7ba39c3..bbf5170 100644 --- a/WebKit/ChangeLog +++ b/WebKit/ChangeLog @@ -1,3 +1,178 @@ +2010-07-12 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Unreviewed build fix after r60050. + + * CMakeLists.txt: Add WebCore/bindings to the include path. + +2010-07-11 Gyuyoung Kim <gyuyoung.kim@samsung.com> + + Reviewed by Adam Barth. + + [EFL] Fix style errors in ewk_private.h. + https://bugs.webkit.org/show_bug.cgi?id=41742 + + * efl/ewk/ewk_private.h: + +2010-07-09 Darin Adler <darin@apple.com> + + * StringsNotToBeLocalized.txt: Updated for recent changes. + +2010-07-08 Joone Hur <joone@kldp.org> + + Reviewed by Antonio Gomes. + + [EFL] fix cmake build for EWebLauncher + https://bugs.webkit.org/show_bug.cgi?id=41830 + + * CMakeListsEfl.txt: add ${LIBSOUP24_LDFLAGS} for link flags + +2010-07-08 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Implement several notification hooks in FrameLoaderClient. + We just notify browser, making the appropriate type conversions about + the events occurring in WebCore. + https://bugs.webkit.org/show_bug.cgi?id=41005 + + * efl/WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::FrameLoaderClientEfl::dispatchWillSendRequest): alloc 2 new + wrapper structures in stack in order to give client the opportunity to + change parameters. Then, call the function it defines. + (WebCore::FrameLoaderClientEfl::assignIdentifierToInitialRequest): + (WebCore::FrameLoaderClientEfl::didPerformFirstNavigation): notify + client. + (WebCore::FrameLoaderClientEfl::saveViewStateToItem): notify client. + (WebCore::FrameLoaderClientEfl::restoreViewState): notify client. + (WebCore::FrameLoaderClientEfl::dispatchDidChangeLocationWithinPage): + notify browser that the url changed. + (WebCore::FrameLoaderClientEfl::dispatchDidReceiveIcon): notify + browser. + (WebCore::FrameLoaderClientEfl::dispatchDidStartProvisionalLoad): + notify browser. + (WebCore::FrameLoaderClientEfl::dispatchDidFinishDocumentLoad): notify + browser. + (WebCore::FrameLoaderClientEfl::dispatchDidFirstLayout): norify + browser. + (WebCore::FrameLoaderClientEfl::dispatchDidFirstVisuallyNonEmptyLayout): + notify browser. + (WebCore::FrameLoaderClientEfl::dispatchShow): notify browser. + * efl/ewk/ewk_frame.cpp: + (ewk_frame_request_will_send): emit signal notifying browser. + (ewk_frame_request_assign_identifier): emit signal notifying browser. + (ewk_frame_did_perform_first_navigation): emit signal notifying browser. + (ewk_frame_view_state_save): emit signal notifying browser. + (ewk_frame_load_provisional): emit signal notifying browser. + (ewk_frame_load_firstlayout_finished): emit signal notifying browser. + (ewk_frame_load_firstlayout_nonempty_finished): emit signal notifying browser. + (ewk_frame_load_document_finished): emit signal notifying browser. + * efl/ewk/ewk_frame.h: update documentation about signals being sent + and implement wrapper struct for ResourceRequest. + * efl/ewk/ewk_private.h: export private functions. + +2010-07-08 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Flush backing store when going to new page. + Call client method to flush backing store when going to a new page. This + is the notification that data related to current page should be dropped, + since a new page is being loaded. + https://bugs.webkit.org/show_bug.cgi?id=41008 + + * efl/WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::FrameLoaderClientEfl::transitionToCommittedForNewPage): + +2010-07-07 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Unreviewed build fix after r62676. + + [EFL] Fix build after Page constructor has changed. By now, the + introduced BackForwardControllerClient is not used. + https://bugs.webkit.org/show_bug.cgi?id=41825 + + * efl/ewk/ewk_view.cpp: + (_ewk_view_priv_new): Add missing parameter to WebCore::Page + constructor. + +2010-07-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Rename the WebBaseNetscapePluginStream.cpp and .h files to WebNetscapePluginStream.cpp and .h to match the class name. + + * WebKit.xcodeproj/project.pbxproj: + +2010-07-07 Gyuyoung Kim <gyuyoung.kim@samsung.com> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] EFLWebKit doesn't support viewport meta tag. + Support viewport meta tag on EFL Port. + https://bugs.webkit.org/show_bug.cgi?id=40278 + + * efl/EWebLauncher/main.c: Process 'viewport,changed' signal. + (viewport_set): + (on_viewport_changed): Add a callback function for the 'viewport,changed' signal. + (browserCreate): Register the callback function for the 'viewport,changed' signal. + * efl/WebCoreSupport/ChromeClientEfl.cpp: Implement method to process viewport tag. + (WebCore::ChromeClientEfl::didReceiveViewportArguments): + * efl/WebCoreSupport/ChromeClientEfl.h: Define method to process viewport tag. + * efl/WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::FrameLoaderClientEfl::FrameLoaderClientEfl): Implement a function to set layout + when website doesn't contain viewport tag. + (WebCore::FrameLoaderClientEfl::dispatchDidCommitLoad): + (WebCore::FrameLoaderClientEfl::dispatchDidFirstLayout): + * efl/WebCoreSupport/FrameLoaderClientEfl.h: + (WebCore::FrameLoaderClientEfl::setInitLayoutCompleted): + (WebCore::FrameLoaderClientEfl::getInitLayoutCompleted): + * efl/ewk/ewk_private.h: Added internal APIs to process viewport tag. + * efl/ewk/ewk_view.cpp: Added APIs to process and to handle viewport tag. + (_ewk_view_priv_new): + (ewk_view_fixed_layout_size_set): + (ewk_view_zoom_set): + (ewk_view_zoom_weak_set): + (ewk_view_zoom_animated_set): + (ewk_view_viewport_set): Reports that viewport has changed. + (ewk_view_viewport_get): Reports that viewport has changed. + (ewk_view_zoom_range_set): Sets the zoom range. + (ewk_view_zoom_range_min_get): Gets minimum value of zoom range. + (ewk_view_zoom_range_max_get): Gets maximum value of zoom range. + (ewk_view_user_scalable_set): Sets if zoom is enabled. + (ewk_view_user_scalable_get): Gets if zoom is enabled. + * efl/ewk/ewk_view.h: + +2010-07-07 Rafael Antognolli <antognolli@profusion.mobi> + + Reviewed by Adam Barth. + + [EFL] Fix cmake build and libsoup detection + Some changes should be done to cmake build system to fix the detection of libsoup and correct some link paths: + - LINK_FLAGS should be set using quotes, otherwise some wrong + substitution takes place; + - we should use LIBSOUP24_* instead of LIBSOUP_* since this is the + version we are using; + - need to set HAVE_LIBSOUP_2_29_90 if we find a version equal or newer + than that. + https://bugs.webkit.org/show_bug.cgi?id=41717 + + * CMakeLists.txt: + * CMakeListsEfl.txt: + +2010-07-05 Gyuyoung Kim <gyuyoung.kim@samsung.com> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Implement downloadURL in ContextMenuClientEfl + When user selects a download menu from context menu, send the download + request to application. + https://bugs.webkit.org/show_bug.cgi?id=41149 + + * efl/WebCoreSupport/ContextMenuClientEfl.cpp: + (WebCore::ContextMenuClientEfl::downloadURL): Get url for downloading + file and Send it to application. + * efl/WebCoreSupport/ContextMenuClientEfl.h: + 2010-06-30 Gyuyoung Kim <gyuyoung.kim@samsung.com> Reviewed by Kenneth Rohde Christiansen. diff --git a/WebKit/StringsNotToBeLocalized.txt b/WebKit/StringsNotToBeLocalized.txt index 9fbaa7f..d23cafa 100644 --- a/WebKit/StringsNotToBeLocalized.txt +++ b/WebKit/StringsNotToBeLocalized.txt @@ -67,7 +67,8 @@ "0" "062AEEE3-9E42-44DC-A8A9-236B216FE011" "1" -"10.1.51.95" +"10.1" +"10.1.53.60" "1000" "12px" "13" @@ -688,7 +689,6 @@ "mainFrameTitle" "mainFrameURL" "mimeType" -"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@" "nameFieldLabel" "net.hmdt-web.Shiira" "oleacc.dll" @@ -769,9 +769,6 @@ WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"message" WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"prompt" WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"title" WebKit/mac/Plugins/Hosted/ProxyInstance.mm -WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:" OK\n" -WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:": " -WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:"identity" WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"DIRECT" WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"PROXY " WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"SOCKS " @@ -781,6 +778,9 @@ WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"true" WebKit/mac/Plugins/WebBasePluginPackage.mm:"Java Applet Plugin Enabler" WebKit/mac/Plugins/WebNetscapePluginPackage.mm:"RealPlayer Plugin" WebKit/mac/Plugins/WebNetscapePluginPackage.mm:"main" +WebKit/mac/Plugins/WebNetscapePluginStream.mm:" OK\n" +WebKit/mac/Plugins/WebNetscapePluginStream.mm:": " +WebKit/mac/Plugins/WebNetscapePluginStream.mm:"identity" WebKit/mac/Plugins/WebNetscapePluginView.mm:"height" WebKit/mac/Plugins/WebNetscapePluginView.mm:"width" WebKit/mac/WebCoreSupport/WebChromeClient.mm:"dialog" @@ -838,6 +838,7 @@ WebKit/mac/WebView/WebPreferences.mm:"ISO-8859-1" WebKit/mac/WebView/WebPreferences.mm:"Identifier" WebKit/mac/WebView/WebPreferences.mm:"Papyrus" WebKit/mac/WebView/WebPreferences.mm:"Values" +WebKit/mac/WebView/WebVideoFullscreenController.mm:"WebKit playing a video fullscreen." WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm:"maxValue" WebKit/mac/WebView/WebView.mm:"At least one WebView is still open." WebKit/mac/WebView/WebView.mm:"At least one WebView was closed with fast teardown." diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj index 66d2cd3..4c470e6 100644 --- a/WebKit/WebKit.xcodeproj/project.pbxproj +++ b/WebKit/WebKit.xcodeproj/project.pbxproj @@ -162,7 +162,7 @@ 939810270824BF01008DF038 /* WebStringTruncator.h in Headers */ = {isa = PBXBuildFile; fileRef = F59668C802AD2923018635CA /* WebStringTruncator.h */; settings = {ATTRIBUTES = (Private, ); }; }; 939810290824BF01008DF038 /* WebAuthenticationPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = F8CA15B5029A39D901000122 /* WebAuthenticationPanel.h */; }; 9398102A0824BF01008DF038 /* WebPanelAuthenticationHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 93154EF103A41270008635CE /* WebPanelAuthenticationHandler.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 9398102B0824BF01008DF038 /* WebBaseNetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = F5A672B90263866E01000102 /* WebBaseNetscapePluginStream.h */; }; + 9398102B0824BF01008DF038 /* WebNetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = F5A672B90263866E01000102 /* WebNetscapePluginStream.h */; }; 9398102E0824BF01008DF038 /* WebBasePluginPackage.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E4AF46036652150000E506 /* WebBasePluginPackage.h */; }; 939810310824BF01008DF038 /* WebNetscapePluginPackage.h in Headers */ = {isa = PBXBuildFile; fileRef = F5F7171E0288493C018635CA /* WebNetscapePluginPackage.h */; }; 939810350824BF01008DF038 /* WebPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 848DFF840365FE6A00CA2ACA /* WebPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -259,7 +259,7 @@ 939810CC0824BF01008DF038 /* WebStringTruncator.mm in Sources */ = {isa = PBXBuildFile; fileRef = F59668C902AD2923018635CA /* WebStringTruncator.mm */; }; 939810CF0824BF01008DF038 /* WebAuthenticationPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = F8CA15B6029A39D901000122 /* WebAuthenticationPanel.m */; }; 939810D00824BF01008DF038 /* WebPanelAuthenticationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 93154EF203A41270008635CE /* WebPanelAuthenticationHandler.m */; }; - 939810D10824BF01008DF038 /* WebBaseNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5A672BA0263866E01000102 /* WebBaseNetscapePluginStream.mm */; }; + 939810D10824BF01008DF038 /* WebNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5A672BA0263866E01000102 /* WebNetscapePluginStream.mm */; }; 939810D30824BF01008DF038 /* WebBasePluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83E4AF47036652150000E506 /* WebBasePluginPackage.mm */; }; 939810D60824BF01008DF038 /* WebNetscapePluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F7171F0288493C018635CA /* WebNetscapePluginPackage.mm */; }; 939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8467275D0367158500CA2ACA /* WebPluginController.mm */; }; @@ -679,8 +679,8 @@ F59EAE3E0253C7EE018635CA /* WebCoreStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreStatistics.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; F59EAE410253C8DE018635CA /* WebCoreStatistics.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreStatistics.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; F5A55DC702BAA2E8018635CC /* WebHTMLRepresentationPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHTMLRepresentationPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; - F5A672B90263866E01000102 /* WebBaseNetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebBaseNetscapePluginStream.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; - F5A672BA0263866E01000102 /* WebBaseNetscapePluginStream.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebBaseNetscapePluginStream.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; + F5A672B90263866E01000102 /* WebNetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapePluginStream.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; + F5A672BA0263866E01000102 /* WebNetscapePluginStream.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebNetscapePluginStream.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; F5AEBB3D024A527601C1A526 /* WebPreferences.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebPreferences.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; F5B67130023EDF8901C1A525 /* url_icon.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = url_icon.tiff; sourceTree = "<group>"; }; F5B92B820223191D01C1A525 /* WebHistoryPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; @@ -1057,8 +1057,8 @@ 1A9C78030EBBC455008599D4 /* Events */, 1A1F91430ECBB16F006351DA /* Hosted */, F5F717230288493C018635CA /* npapi.mm */, - F5A672B90263866E01000102 /* WebBaseNetscapePluginStream.h */, - F5A672BA0263866E01000102 /* WebBaseNetscapePluginStream.mm */, + F5A672B90263866E01000102 /* WebNetscapePluginStream.h */, + F5A672BA0263866E01000102 /* WebNetscapePluginStream.mm */, 1A4DF5E20EC8D104006BD4B4 /* WebBaseNetscapePluginView.h */, 1A4DF5E30EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm */, 0AB752350FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h */, @@ -1370,7 +1370,7 @@ 939810110824BF01008DF038 /* WebBackForwardList.h in Headers */, 51C714FB0B20F79F00E5E33C /* WebBackForwardListInternal.h in Headers */, 22F219CC08D236730030E078 /* WebBackForwardListPrivate.h in Headers */, - 9398102B0824BF01008DF038 /* WebBaseNetscapePluginStream.h in Headers */, + 9398102B0824BF01008DF038 /* WebNetscapePluginStream.h in Headers */, 1A4DF5E40EC8D104006BD4B4 /* WebBaseNetscapePluginView.h in Headers */, 9398102E0824BF01008DF038 /* WebBasePluginPackage.h in Headers */, 5241ADF50B1BC48A004012BD /* WebCache.h in Headers */, @@ -1789,7 +1789,7 @@ 9398111D0824BF01008DF038 /* WebArchive.mm in Sources */, 939810CF0824BF01008DF038 /* WebAuthenticationPanel.m in Sources */, 939810BC0824BF01008DF038 /* WebBackForwardList.mm in Sources */, - 939810D10824BF01008DF038 /* WebBaseNetscapePluginStream.mm in Sources */, + 939810D10824BF01008DF038 /* WebNetscapePluginStream.mm in Sources */, 1A4DF5E50EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm in Sources */, 939810D30824BF01008DF038 /* WebBasePluginPackage.mm in Sources */, 5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */, diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog index 29cf8f4..4356f21 100644 --- a/WebKit/chromium/ChangeLog +++ b/WebKit/chromium/ChangeLog @@ -1,3 +1,659 @@ +2010-07-12 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r63171. + http://trac.webkit.org/changeset/63171 + https://bugs.webkit.org/show_bug.cgi?id=42144 + + Broke Chromium canary (Requested by tkent on #webkit). + + * WebKit.gyp: + +2010-07-12 Kent Tamura <tkent@chromium.org> + + Reviewed by David Levin. + + [Chromium] Upstreaming inspector_resources target + https://bugs.webkit.org/show_bug.cgi?id=41669 + + 'inspector_resource' is currently in src/webkit/webkit.gyp of + Chromium tree. We move it to WebKit tree because: + - DumpRenderTree in WebKit tree needs it, and + - It's hard to refer to WebKit.gypi and WebCore.gypi from + webkit_support in both cases of Chromium-tree build and + WebKit-tree build. + + * WebKit.gyp: + +2010-07-12 Viet-Trung Luu <viettrungluu@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Pass key down events on to plugins. + https://bugs.webkit.org/show_bug.cgi?id=42113 + + * src/WebPluginContainerImpl.cpp: + (WebKit::WebPluginContainerImpl::handleKeyboardEvent): + +2010-07-12 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Joseph Pecoraro. + + Web Inspector: provide starts and ends for network phases instead of duration. + + https://bugs.webkit.org/show_bug.cgi?id=42091 + + * public/WebURLLoadTiming.h: + * public/WebURLResponse.h: + * src/WebURLLoadTiming.cpp: + (WebKit::WebURLLoadTiming::proxyStart): + (WebKit::WebURLLoadTiming::setProxyStart): + (WebKit::WebURLLoadTiming::proxyEnd): + (WebKit::WebURLLoadTiming::setProxyEnd): + (WebKit::WebURLLoadTiming::dnsStart): + (WebKit::WebURLLoadTiming::setDNSStart): + (WebKit::WebURLLoadTiming::dnsEnd): + (WebKit::WebURLLoadTiming::setDNSEnd): + (WebKit::WebURLLoadTiming::connectStart): + (WebKit::WebURLLoadTiming::setConnectStart): + (WebKit::WebURLLoadTiming::connectEnd): + (WebKit::WebURLLoadTiming::setConnectEnd): + (WebKit::WebURLLoadTiming::sendStart): + (WebKit::WebURLLoadTiming::setSendStart): + (WebKit::WebURLLoadTiming::sendEnd): + (WebKit::WebURLLoadTiming::setSendEnd): + (WebKit::WebURLLoadTiming::receiveHeadersStart): + (WebKit::WebURLLoadTiming::setReceiveHeadersStart): + (WebKit::WebURLLoadTiming::receiveHeadersEnd): + (WebKit::WebURLLoadTiming::setReceiveHeadersEnd): + (WebKit::WebURLLoadTiming::sslStart): + (WebKit::WebURLLoadTiming::setSSLStart): + (WebKit::WebURLLoadTiming::sslEnd): + (WebKit::WebURLLoadTiming::setSSLEnd): + * src/WebURLResponse.cpp: + (WebKit::WebURLResponse::wasCached): + (WebKit::WebURLResponse::setWasCached): + +2010-07-12 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r63156. + http://trac.webkit.org/changeset/63156 + https://bugs.webkit.org/show_bug.cgi?id=42129 + + broke chromium compile (Requested by jamesr on #webkit). + + * WebKit.gyp: + * public/WebAccessibilityObject.h: + * public/WebAttribute.h: Removed. + * public/WebDocumentType.h: Removed. + * public/WebElement.h: + * public/WebNamedNodeMap.h: Removed. + * public/WebNode.h: + * public/WebRenderStyle.h: Removed. + * src/WebAccessibilityObject.cpp: + * src/WebAttribute.cpp: Removed. + * src/WebDocumentType.cpp: Removed. + * src/WebElement.cpp: + * src/WebNamedNodeMap.cpp: Removed. + * src/WebNode.cpp: + * src/WebRenderStyle.cpp: Removed. + +2010-07-12 Dominic Mazzoni <dmazzoni@google.com> + + Reviewed by Darin Fisher. + + Add methods to WebAccessibilityObject to access the Node and + Document, and then add methods to access some document, node, + and element properties needed for Windows accessibility. + + https://bugs.webkit.org/show_bug.cgi?id=41569 + + * WebKit.gyp: + * public/WebAccessibilityObject.h: + * public/WebAttribute.h: Added. + (WebKit::WebAttribute::~WebAttribute): + (WebKit::WebAttribute::WebAttribute): + (WebKit::WebAttribute::operator=): + * public/WebDocumentType.h: Added. + (WebKit::WebDocumentType::WebDocumentType): + (WebKit::WebDocumentType::operator=): + (WebKit::WebDocumentType::assign): + * public/WebElement.h: + * public/WebNamedNodeMap.h: Added. + (WebKit::WebNamedNodeMap::~WebNamedNodeMap): + (WebKit::WebNamedNodeMap::WebNamedNodeMap): + (WebKit::WebNamedNodeMap::operator=): + * public/WebNode.h: + * public/WebRenderStyle.h: Added. + (WebKit::WebRenderStyle::~WebRenderStyle): + (WebKit::WebRenderStyle::WebRenderStyle): + (WebKit::WebRenderStyle::operator=): + * src/WebAccessibilityObject.cpp: + (WebKit::WebAccessibilityObject::node): + (WebKit::WebAccessibilityObject::document): + * src/WebAttribute.cpp: Added. + (WebKit::WebAttribute::reset): + (WebKit::WebAttribute::assign): + (WebKit::WebAttribute::WebAttribute): + (WebKit::WebAttribute::localName): + (WebKit::WebAttribute::value): + * src/WebDocumentType.cpp: Added. + (WebKit::WebDocumentType::name): + (WebKit::WebDocumentType::WebDocumentType): + (WebKit::WebDocumentType::operator=): + (WebKit::WebDocumentType::operator PassRefPtr<DocumentType>): + * src/WebElement.cpp: + (WebKit::WebElement::attributes): + * src/WebNamedNodeMap.cpp: Added. + (WebKit::WebNamedNodeMap::reset): + (WebKit::WebNamedNodeMap::assign): + (WebKit::WebNamedNodeMap::WebNamedNodeMap): + (WebKit::WebNamedNodeMap::length): + (WebKit::WebNamedNodeMap::attributeItem): + * src/WebNode.cpp: + (WebKit::WebNode::element): + (WebKit::WebNode::hasComputedStyle): + (WebKit::WebNode::computedStyle): + * src/WebRenderStyle.cpp: Added. + (WebKit::WebRenderStyle::reset): + (WebKit::WebRenderStyle::assign): + (WebKit::WebRenderStyle::WebRenderStyle): + (WebKit::WebRenderStyle::display): + +2010-07-12 Alexander Pavlov <apavlov@chromium.org> + + Reviewed by Yury Semikhatsky. + + [Chromium] Crash when stepping on a breakpoint while debugging Web Inspector + https://bugs.webkit.org/show_bug.cgi?id=41958 + + * src/WebViewImpl.cpp: + (WebKit::WebView::willEnterModalLoop): + (WebKit::WebView::didExitModalLoop): + +2010-07-12 Jeremy Orlow <jorlow@chromium.org> + + Speculative fix for visual studio retardedness. + + * public/WebCommon.h: + +2010-07-12 Jeremy Orlow <jorlow@chromium.org> + + Build fix. Add an include. + + * public/WebCommon.h: + +2010-06-27 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Dumitru Daniliuc. + + Implement IDBObjectStore.get/set/remove + https://bugs.webkit.org/show_bug.cgi?id=41250 + + Plumbing for new features, IDBKey, and added support + for both invalid (i.e. not serializable) and null + (i.e. the RefPtr was 0) to SerializedScriptValue. + + * WebKit.gyp: + * public/WebIDBCallbacks.h: + (WebKit::WebIDBCallbacks::onSuccess): + * public/WebIDBKey.h: Added. + (WebKit::WebIDBKey::WebIDBKey): + (WebKit::WebIDBKey::operator=): + (WebKit::WebIDBKey::): + * public/WebIDBObjectStore.h: + (WebKit::WebIDBObjectStore::get): + (WebKit::WebIDBObjectStore::set): + (WebKit::WebIDBObjectStore::remove): + (WebKit::WebIDBObjectStore::createIndex): + (WebKit::WebIDBObjectStore::index): + (WebKit::WebIDBObjectStore::removeIndex): + * public/WebSerializedScriptValue.h: + * src/IDBCallbacksProxy.cpp: + (WebCore::IDBCallbacksProxy::onSuccess): + * src/IDBCallbacksProxy.h: + * src/IDBObjectStoreProxy.cpp: + (WebCore::IDBObjectStoreProxy::get): + (WebCore::IDBObjectStoreProxy::set): + (WebCore::IDBObjectStoreProxy::remove): + * src/IDBObjectStoreProxy.h: + * src/WebIDBCallbacksImpl.cpp: + (WebCore::WebIDBCallbacksImpl::onSuccess): + * src/WebIDBCallbacksImpl.h: + * src/WebIDBKey.cpp: Added. + (WebKit::WebIDBKey::~WebIDBKey): + (WebKit::WebIDBKey::createNull): + (WebKit::WebIDBKey::createInvalid): + (WebKit::WebIDBKey::assign): + (WebKit::WebIDBKey::assignNull): + (WebKit::WebIDBKey::assignInvalid): + (WebKit::WebIDBKey::type): + (WebKit::WebIDBKey::string): + (WebKit::WebIDBKey::number): + (WebKit::WebIDBKey::WebIDBKey): + (WebKit::WebIDBKey::operator=): + (WebKit::WebIDBKey::operator PassRefPtr<IDBKey>): + * src/WebIDBObjectStoreImpl.cpp: + (WebKit::WebIDBObjectStoreImpl::get): + (WebKit::WebIDBObjectStoreImpl::set): + (WebKit::WebIDBObjectStoreImpl::remove): + * src/WebIDBObjectStoreImpl.h: + * src/WebSerializedScriptValue.cpp: + (WebKit::WebSerializedScriptValue::createInvalid): + +2010-07-09 John Abd-El-Malek <jam@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Take out WebPlugin::supportsFind since we can accomplish the same thing by having a return value on startFind + https://bugs.webkit.org/show_bug.cgi?id=42011 + + * public/WebPlugin.h: + (WebKit::WebPlugin::startFind): + +2010-07-09 Leon Clarke <leonclarke@google.com> + + Reviewed by Adam Barth. + + add support for link prefetching + https://bugs.webkit.org/show_bug.cgi?id=3652 + + * public/WebURLRequest.h: + (WebKit::WebURLRequest::): + +2010-07-09 Michael Nordman <michaeln@google.com> + + Reviewed by Dumitru Daniliuc. + + Use class ProgressEvent when raising appcache related progress events and + set the 'total', 'loaded', and 'lengthComputable' attributes. + Also raise the final progress event with the 'total' and 'loaded' attribute + values are equal to one another to keep pace with the spec for this feature. + https://bugs.webkit.org/show_bug.cgi?id=37602 + + * src/ApplicationCacheHost.cpp: + (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): + (WebCore::ApplicationCacheHost::stopDeferringEvents): + (WebCore::ApplicationCacheHost::dispatchDOMEvent): + * src/ApplicationCacheHostInternal.h: + (WebCore::ApplicationCacheHostInternal::notifyEventListener): + (WebCore::ApplicationCacheHostInternal::notifyProgressEventListener): + +2010-07-09 David Holloway <dhollowa@chromium.org> + + Reviewed by Dimitri Glazkov. + + Roll Chromium DEPS forward to r51736. + https://bugs.webkit.org/show_bug.cgi?id=41867 + + * DEPS: + +2010-07-09 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed: chromium build fix. + + * public/WebGLES2Context.h: + +2010-07-09 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Laszlo Gombos. + + NotificationPresenter needs a cancelRequestPermission API + https://bugs.webkit.org/show_bug.cgi?id=41783 + + Updated the NotificationPresenter API. + + * src/NotificationPresenterImpl.cpp: + (WebKit::NotificationPresenterImpl::checkPermission): + (WebKit::NotificationPresenterImpl::requestPermission): + * src/NotificationPresenterImpl.h: + (WebKit::NotificationPresenterImpl::cancelRequestsForPermission): + +2010-07-08 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Yury Semikhatsky. + + Web Inspector: Provide detailed network info in the resources panel. + + https://bugs.webkit.org/show_bug.cgi?id=40227 + + * WebKit.gyp: + * public/WebDevToolsAgent.h: + * public/WebURLLoadTiming.h: Added. + (WebKit::WebURLLoadTiming::~WebURLLoadTiming): + (WebKit::WebURLLoadTiming::WebURLLoadTiming): + (WebKit::WebURLLoadTiming::operator=): + (WebKit::WebURLLoadTiming::isNull): + * public/WebURLRequest.h: + * public/WebURLResponse.h: + * src/WebDevToolsAgentImpl.cpp: + (WebKit::WebDevToolsAgentImpl::willSendRequest): + * src/WebDevToolsAgentImpl.h: + * src/WebURLLoadTiming.cpp: Added. + (WebKit::WebURLLoadTiming::initialize): + (WebKit::WebURLLoadTiming::reset): + (WebKit::WebURLLoadTiming::assign): + (WebKit::WebURLLoadTiming::setDomainLookupTimes): + (WebKit::WebURLLoadTiming::setConnectStartTime): + (WebKit::WebURLLoadTiming::setRequestTimes): + (WebKit::WebURLLoadTiming::setHeadersAvailableTime): + (WebKit::WebURLLoadTiming::WebURLLoadTiming): + (WebKit::WebURLLoadTiming::operator=): + (WebKit::WebURLLoadTiming::operator PassRefPtr<ResourceLoadTiming>): + * src/WebURLRequest.cpp: + (WebKit::WebURLRequest::reportLoadTiming): + (WebKit::WebURLRequest::setReportLoadTiming): + * src/WebURLResponse.cpp: + (WebKit::WebURLResponse::setConnectionID): + (WebKit::WebURLResponse::setLoadTiming): + +2010-07-08 Jay Civelli <jcivelli@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Exposing the EditorClient text field related methods + to the WebViewClient. Also adding some more accessors methods + to the WebNode and WebInputElement. + This is needed to move the password autocomplete out of the + Chromium WebKit API to the Chromium code. + https://bugs.webkit.org/show_bug.cgi?id=41286 + + * public/WebInputElement.h: + * public/WebNode.h: + (WebKit::operator!=): + (WebKit::operator<): + * public/WebViewClient.h: + (WebKit::WebViewClient::textFieldDidBeginEditing): + (WebKit::WebViewClient::textFieldDidEndEditing): + (WebKit::WebViewClient::textDidChangeInTextField): + (WebKit::WebViewClient::textFieldHandlingKeyDown): + (WebKit::WebViewClient::didAcceptAutocompleteSuggestion): + * src/EditorClientImpl.cpp: + (WebKit::EditorClientImpl::textFieldDidBeginEditing): + (WebKit::EditorClientImpl::textFieldDidEndEditing): + (WebKit::EditorClientImpl::textDidChangeInTextField): + (WebKit::EditorClientImpl::onAutocompleteSuggestionAccepted): + (WebKit::EditorClientImpl::doTextFieldCommandFromEvent): + * src/WebInputElement.cpp: + (WebKit::WebInputElement::readOnly): + (WebKit::WebInputElement::setSelectionRange): + (WebKit::WebInputElement::selectionStart): + (WebKit::WebInputElement::selectionEnd): + * src/WebNode.cpp: + (WebKit::WebNode::lessThan): + +2010-07-08 Aaron Boodman <aa@chromium.org> + + Reviewed by Timothy Hatcher. + + Add the ability for user scripts and user styles to affect just the top frame. + + https://bugs.webkit.org/show_bug.cgi?id=41529 + + * public/WebView.h: + (WebKit::WebView::): + (WebKit::WebView::addUserScript): + (WebKit::WebView::addUserStyleSheet): + * src/AssertMatchingEnums.cpp: + * src/WebViewImpl.cpp: + (WebKit::WebView::addUserScript): + (WebKit::WebView::addUserStyleSheet): + +2010-07-08 James Robinson <jamesr@google.com> + + Reviewed by Darin Fisher. + + Allow resizing and getting the texture ID from an offscreen GLES2Context + https://bugs.webkit.org/show_bug.cgi?id=41828 + + When using an offscreen GLES2Context the caller needs to be able to resize the backing store + managed by the embedder and get access to a texture id to pass to the compositor. WebGL + does these actions in an indirect way, it will be refactored to use this path. + + * public/WebGLES2Context.h: + * src/GLES2Context.cpp: + (WebCore::GLES2Context::resizeOffscreenContent): + (WebCore::GLES2Context::getOffscreenContentParentTextureId): + +2010-07-08 Vitaly Repeshko <vitalyr@chromium.org> + + Reviewed by Pavel Feldman. + + [chromium] Fix deletion has begun assert in TestWebPopupMenuImpl. + https://bugs.webkit.org/show_bug.cgi?id=41899 + + * tests/PopupMenuTest.cpp: + (WebKit::TestWebPopupMenuImpl::create): + (WebKit::TestWebViewClient::TestWebViewClient): + (WebKit::TestWebViewClient::createPopupMenu): + +2010-07-08 Vitaly Repeshko <vitalyr@chromium.org> + + Reviewed by Pavel Feldman. + + [chromium] Fix deletion has begun assertion in TestImage destructor. + https://bugs.webkit.org/show_bug.cgi?id=41883 + + * tests/DragImageTest.cpp: + (WebCore::TestImage::create): + (WebCore::TEST): + +2010-07-08 Vitaly Repeshko <vitalyr@chromium.org> + + Reviewed by Pavel Feldman. + + Fix adoptRef usage violations (mostly in chromium) + https://bugs.webkit.org/show_bug.cgi?id=41863 + + * src/IDBCallbacksProxy.cpp: + (WebCore::IDBCallbacksProxy::create): + * src/WebPopupMenuImpl.cpp: + (WebKit::WebPopupMenu::create): + * src/WebViewImpl.cpp: + (WebKit::WebView::create): + +2010-07-07 Alexander Pavlov <apavlov@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Crash when re-entering message loop + + Allow re-entrancy of the message loop by tracking all suspended pages + through a PageGroupLoadDeferrer stack. + https://bugs.webkit.org/show_bug.cgi?id=41697 + + * src/WebViewImpl.cpp: + (WebKit::WebView::willEnterModalLoop): + (WebKit::WebView::didExitModalLoop): + * src/js/Tests.js: + (.TestSuite.prototype.evaluateInConsole_): + (.TestSuite.prototype.testCompletionOnPause): + (.TestSuite.prototype.testMessageLoopReentrant.this): + +2010-07-08 David Holloway <dhollowa@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Exposes WebNode::unwrap() and WebNode::constUnwrap() for + use by other code in WebKit/chromium/src. + + Specific use of these methods is made in WebFrameImpl.cpp. This is + preferred to the cast operator call that was happening prior to this + change. + + https://bugs.webkit.org/show_bug.cgi?id=41477 + + * public/WebNode.h: + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::registerPasswordListener): + (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete): + (WebKit::WebFrameImpl::getPasswordListener): + * src/WebFrameImpl.h: + +2010-07-07 Pavel Podivilov <podivilov@chromium.org> + + Reviewed by Yury Semikhatsky. + + Web Inspector: convert script offset to webkit format + https://bugs.webkit.org/show_bug.cgi?id=41755 + + * src/js/DebuggerScript.js: + (): + +2010-07-07 Kent Tamura <tkent@chromium.org> + + Reviewed by Adam Barth. + + [DRT/Chromium] DumpRenderTree should depend on ImageDiff + https://bugs.webkit.org/show_bug.cgi?id=41749 + + We usually use DumpRenderTree with ImageDiff. So ImageDiff should + be built with DumpRenderTree. Without this change, ImageDiff is not + built in a case of Chromium tree build. + test_shell in Chromium tree also depends on image_diff. + + * WebKit.gyp: + +2010-07-07 John Abd-El-Malek <jam@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Add a few more methods to WebPlugin so that Pepper v2 plugins can support copy/zoom/find + https://bugs.webkit.org/show_bug.cgi?id=41649 + + * public/WebPlugin.h: + (WebKit::WebPlugin::hasSelection): + (WebKit::WebPlugin::selectionAsText): + (WebKit::WebPlugin::selectionAsMarkup): + (WebKit::WebPlugin::setZoomFactor): + (WebKit::WebPlugin::supportsFind): + (WebKit::WebPlugin::startFind): + (WebKit::WebPlugin::selectFindResult): + (WebKit::WebPlugin::stopFind): + * src/ContextMenuClientImpl.cpp: + (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::pluginContainerFromFrame): + (WebKit::ChromePluginPrintContext::end): + (WebKit::ChromePluginPrintContext::computePageRects): + (WebKit::ChromePluginPrintContext::spoolPage): + (WebKit::WebFrameImpl::executeCommand): + * src/WebFrameImpl.h: + * src/WebPluginContainerImpl.cpp: + (WebKit::WebPluginContainerImpl::copy): + (WebKit::WebPluginContainerImpl::handleKeyboardEvent): + * src/WebPluginContainerImpl.h: + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::setZoomLevel): + +2010-07-07 James Hawkins <jhawkins@chromium.org> + + Reviewed by Dimitri Glazkov. + + [Chromium] Add setSuggestedValue to WebInputElement + https://bugs.webkit.org/show_bug.cgi?id=41785 + + * public/WebInputElement.h: + * src/WebInputElement.cpp: + (WebKit::WebInputElement::setSuggestedValue): + (WebKit::WebInputElement::suggestedValue): + +2010-07-07 James Robinson <jamesr@chromium.org> and Vincent Scheib <schieb@chromium.org> + + Reviewed by Dimitri Glazkov. + + WebCore::GLES2Context should allow creating onscreen and offscreen contexts + https://bugs.webkit.org/show_bug.cgi?id=41492 + + You should be able to create a GLES2Context for rendering both on screen + and off screen (to a texture). Currently WebGL does the latter by side + stepping the WebCore::GLES2Context API completely. Longer term it should + move over to using this. + + * src/GLES2Context.cpp: + (WebCore::GLES2ContextInternal::initializeOnscreen): + (WebCore::GLES2ContextInternal::initializeOffscreen): + (WebCore::GLES2Context::createOnscreen): + (WebCore::GLES2Context::createOffscreen): + +2010-07-07 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41772 + Add basic piping for BackForwardControllerClient. + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::WebViewImpl): + +2010-07-07 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r62645. + http://trac.webkit.org/changeset/62645 + https://bugs.webkit.org/show_bug.cgi?id=41757 + + "Broken inspector tests on several platforms" (Requested by + eseidel on #webkit). + + * src/js/DebuggerScript.js: + (): + +2010-07-07 Pavel Podivilov <podivilov@chromium.org> + + Reviewed by Yury Semikhatsky. + + Web Inspector: if breakpoints were deactivated, add new breakpoints as disabled. + https://bugs.webkit.org/show_bug.cgi?id=41461 + + * src/js/DebuggerScript.js: + (): + +2010-07-06 Darin Adler <darin@apple.com> + + Try to fix build. + + Why do the Chromium bots stop after the first error they encounter? + + * src/WebWorkerImpl.cpp: + (WebKit::WebWorkerImpl::postMessageToWorkerContextTask): Removed + unneeded release called on a PassOwnPtr to pass it as an argument of + type PassOwnPtr. + +2010-07-06 Darin Adler <darin@apple.com> + + Try to fix build. + + * src/WebWorkerBase.cpp: + (WebKit::WebWorkerBase::dispatchTaskToMainThread): Use leakPtr instead + of release. + * src/WebWorkerClientImpl.cpp: + (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask): Removed + unneeded release called on a PassOwnPtr to pass it as an argument of + type PassOwnPtr. + +2010-07-06 Darin Adler <darin@apple.com> + + Try to fix build. + + * src/WebSharedWorkerImpl.cpp: + (WebKit::WebSharedWorkerImpl::connectTask): Removed unneeded release + called on a PassOwnPtr to pass it as an argument of type PassOwnPtr. + +2010-07-06 Darin Adler <darin@apple.com> + + Try to fix build. + + * src/WebDataSourceImpl.cpp: + (WebKit::WebDataSourceImpl::setNextPluginLoadObserver): Call leakPtr + here instead of release. Comment makes it really unclear why it's OK! + +2010-07-06 Darin Adler <darin@apple.com> + + Try to fix build. + + * src/SharedWorkerRepository.cpp: + (WebCore::SharedWorkerRepository::connect): Removed unneeded release + called on a PassOwnPtr to pass it as an argument of type PassOwnPtr. + 2010-07-05 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS index fe3754f..63509ff 100644 --- a/WebKit/chromium/DEPS +++ b/WebKit/chromium/DEPS @@ -32,7 +32,7 @@ vars = { 'chromium_svn': 'http://src.chromium.org/svn/trunk/src', - 'chromium_rev': '51287', + 'chromium_rev': '51736', } deps = { diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp index e2da1b4..8143049 100644 --- a/WebKit/chromium/WebKit.gyp +++ b/WebKit/chromium/WebKit.gyp @@ -141,6 +141,7 @@ 'public/WebIDBDatabase.h', 'public/WebIDBDatabaseError.h', 'public/WebIDBIndex.h', + 'public/WebIDBKey.h', 'public/WebIDBObjectStore.h', 'public/WebIndexedDatabase.h', 'public/WebInputElement.h', @@ -211,6 +212,7 @@ 'public/WebURL.h', 'public/WebURLError.h', 'public/WebURLLoader.h', + 'public/WebURLLoadTiming.h', 'public/WebURLLoaderClient.h', 'public/WebURLRequest.h', 'public/WebURLResponse.h', @@ -364,6 +366,7 @@ 'src/WebIDBDatabaseImpl.h', 'src/WebIDBIndexImpl.cpp', 'src/WebIDBIndexImpl.h', + 'src/WebIDBKey.cpp', 'src/WebIDBObjectStoreImpl.cpp', 'src/WebIDBObjectStoreImpl.h', 'src/WebImageCG.cpp', @@ -422,6 +425,7 @@ 'src/WebStorageNamespaceImpl.h', 'src/WebString.cpp', 'src/WebURL.cpp', + 'src/WebURLLoadTiming.cpp', 'src/WebURLRequest.cpp', 'src/WebURLRequestPrivate.h', 'src/WebURLResponse.cpp', @@ -604,6 +608,7 @@ 'type': 'executable', 'mac_bundle': 1, 'dependencies': [ + 'ImageDiff', 'webkit', '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config', '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc', diff --git a/WebKit/chromium/public/WebCommon.h b/WebKit/chromium/public/WebCommon.h index 7872729..5f441b7 100644 --- a/WebKit/chromium/public/WebCommon.h +++ b/WebKit/chromium/public/WebCommon.h @@ -80,9 +80,17 @@ #include <stddef.h> // For size_t +#if defined(WIN32) +// Visual Studio doesn't have stdint.h. +typedef short int16_t; +typedef unsigned short uint16_t; +typedef int int32_t; +typedef unsigned int uint32_t; +#endif + namespace WebKit { - // UTF-16 character type +// UTF-16 character type #if defined(WIN32) typedef wchar_t WebUChar; #else diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h index 3bdee3c..0e26cc9 100644 --- a/WebKit/chromium/public/WebDevToolsAgent.h +++ b/WebKit/chromium/public/WebDevToolsAgent.h @@ -81,7 +81,7 @@ public: WEBKIT_API static void setMessageLoopDispatchHandler(MessageLoopDispatchHandler); virtual void identifierForInitialRequest(unsigned long resourceId, WebFrame*, const WebURLRequest&) = 0; - virtual void willSendRequest(unsigned long resourceId, const WebURLRequest&) = 0; + virtual void willSendRequest(unsigned long resourceId, WebURLRequest&) = 0; virtual void didReceiveData(unsigned long resourceId, int length) = 0; virtual void didReceiveResponse(unsigned long resourceId, const WebURLResponse&) = 0; virtual void didFinishLoading(unsigned long resourceId) = 0; diff --git a/WebKit/chromium/public/WebGLES2Context.h b/WebKit/chromium/public/WebGLES2Context.h index a7e9560..c67faf2 100644 --- a/WebKit/chromium/public/WebGLES2Context.h +++ b/WebKit/chromium/public/WebGLES2Context.h @@ -36,6 +36,7 @@ namespace WebKit { +struct WebSize; class WebView; // This interface abstracts the creation and management of an @@ -49,6 +50,14 @@ public: virtual bool makeCurrent() = 0; virtual bool destroy() = 0; virtual bool swapBuffers() = 0; + + // The follow two functions are for managing a context that renders offscreen. + + // Resizes the backing store used for offscreen rendering. + virtual void resizeOffscreenContent(const WebSize&) = 0; + + // Returns the ID of the texture used for offscreen rendering in the context of the parent. + virtual unsigned getOffscreenContentParentTextureId() = 0; }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBCallbacks.h b/WebKit/chromium/public/WebIDBCallbacks.h index 0e28961..cee8612 100644 --- a/WebKit/chromium/public/WebIDBCallbacks.h +++ b/WebKit/chromium/public/WebIDBCallbacks.h @@ -32,6 +32,7 @@ namespace WebKit { class WebIDBDatabase; class WebIDBDatabaseError; +class WebIDBKey; class WebIDBIndex; class WebIDBObjectStore; class WebSerializedScriptValue; @@ -45,6 +46,7 @@ public: virtual void onError(const WebIDBDatabaseError&) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); } // For "null". virtual void onSuccess(WebIDBDatabase*) { WEBKIT_ASSERT_NOT_REACHED(); } + virtual void onSuccess(const WebIDBKey&) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void onSuccess(WebIDBIndex*) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void onSuccess(WebIDBObjectStore*) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void onSuccess(const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); } diff --git a/WebKit/chromium/public/WebIDBKey.h b/WebKit/chromium/public/WebIDBKey.h new file mode 100644 index 0000000..876928a --- /dev/null +++ b/WebKit/chromium/public/WebIDBKey.h @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebIDBKey_h +#define WebIDBKey_h + +#include "WebCommon.h" +#include "WebPrivatePtr.h" +#include "WebString.h" + +namespace WebCore { class IDBKey; } + +namespace WebKit { + +class WebIDBKey { +public: + ~WebIDBKey(); + + WEBKIT_API static WebIDBKey createNull(); + WEBKIT_API static WebIDBKey createInvalid(); + + WebIDBKey(const WebString& string) { assign(string); } + WebIDBKey(int32_t number) { assign(number); } + WebIDBKey(const WebIDBKey& e) { assign(e); } + WebIDBKey& operator=(const WebIDBKey& e) + { + assign(e); + return *this; + } + + WEBKIT_API void assign(const WebIDBKey&); + WEBKIT_API void assignNull(); + WEBKIT_API void assign(const WebString&); + WEBKIT_API void assign(int32_t); + WEBKIT_API void assignInvalid(); + + enum Type { + NullType = 0, + StringType, + NumberType, + // Types not in WebCore::IDBKey: + InvalidType + }; + + WEBKIT_API Type type() const; + WEBKIT_API WebString string() const; // Only valid for StringType. + WEBKIT_API int32_t number() const; // Only valid for numberType. + +#if WEBKIT_IMPLEMENTATION + WebIDBKey(const WTF::PassRefPtr<WebCore::IDBKey>&); + WebIDBKey& operator=(const WTF::PassRefPtr<WebCore::IDBKey>&); + operator WTF::PassRefPtr<WebCore::IDBKey>() const; +#endif + +private: + WebIDBKey() { } + + WebPrivatePtr<WebCore::IDBKey> m_private; +}; + +} // namespace WebKit + +#endif // WebIDBKey_h diff --git a/WebKit/chromium/public/WebIDBObjectStore.h b/WebKit/chromium/public/WebIDBObjectStore.h index fead881..fb81fb9 100755 --- a/WebKit/chromium/public/WebIDBObjectStore.h +++ b/WebKit/chromium/public/WebIDBObjectStore.h @@ -53,17 +53,29 @@ public: WEBKIT_ASSERT_NOT_REACHED(); return WebDOMStringList(); } - void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks*) + virtual void get(const WebIDBKey& key, WebIDBCallbacks*) + { + WEBKIT_ASSERT_NOT_REACHED(); + } + virtual void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*) + { + WEBKIT_ASSERT_NOT_REACHED(); + } + virtual void remove(const WebIDBKey& key, WebIDBCallbacks*) + { + WEBKIT_ASSERT_NOT_REACHED(); + } + virtual void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } // Transfers ownership of the WebIDBIndex to the caller. - WebIDBIndex* index(const WebString& name) + virtual WebIDBIndex* index(const WebString& name) { WEBKIT_ASSERT_NOT_REACHED(); return 0; } - void removeIndex(const WebString& name, WebIDBCallbacks*) + virtual void removeIndex(const WebString& name, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h index 95f8aa7..d8c8ce7 100644 --- a/WebKit/chromium/public/WebInputElement.h +++ b/WebKit/chromium/public/WebInputElement.h @@ -80,6 +80,7 @@ namespace WebKit { }; WEBKIT_API bool autoComplete() const; + WEBKIT_API bool isReadOnly() const; WEBKIT_API bool isEnabledFormControl() const; WEBKIT_API InputType inputType() const; WEBKIT_API int maxLength() const; @@ -88,12 +89,16 @@ namespace WebKit { WEBKIT_API int size() const; WEBKIT_API void setValue(const WebString&); WEBKIT_API WebString value() const; + WEBKIT_API void setSuggestedValue(const WebString&); + WEBKIT_API WebString suggestedValue() const; WEBKIT_API void setPlaceholder(const WebString&); WEBKIT_API WebString placeholder() const; WEBKIT_API bool isAutofilled() const; WEBKIT_API void setAutofilled(bool); WEBKIT_API void dispatchFormControlChangeEvent(); WEBKIT_API void setSelectionRange(int, int); + WEBKIT_API int selectionStart(); + WEBKIT_API int selectionEnd(); #if WEBKIT_IMPLEMENTATION WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h index c7aa8ef..fb0a99e 100644 --- a/WebKit/chromium/public/WebNode.h +++ b/WebKit/chromium/public/WebNode.h @@ -61,7 +61,10 @@ public: WEBKIT_API void assign(const WebNode&); WEBKIT_API bool equals(const WebNode&) const; - + // Required for using WebNodes in std maps. Note the order used is + // arbitrary and should not be expected to have any specific meaning. + WEBKIT_API bool lessThan(const WebNode&) const; + bool isNull() const { return m_private.isNull(); } enum NodeType { @@ -124,7 +127,6 @@ public: operator WTF::PassRefPtr<WebCore::Node>() const; #endif -protected: #if WEBKIT_IMPLEMENTATION template<typename T> T* unwrap() { @@ -137,6 +139,7 @@ protected: } #endif +protected: WebPrivatePtr<WebCore::Node> m_private; }; @@ -150,6 +153,11 @@ inline bool operator!=(const WebNode& a, const WebNode& b) return !(a == b); } +inline bool operator<(const WebNode& a, const WebNode& b) +{ + return a.lessThan(b); +} + } // namespace WebKit #endif diff --git a/WebKit/chromium/public/WebPlugin.h b/WebKit/chromium/public/WebPlugin.h index 57f1cba..8e1c946 100644 --- a/WebKit/chromium/public/WebPlugin.h +++ b/WebKit/chromium/public/WebPlugin.h @@ -50,6 +50,9 @@ struct WebRect; struct WebURLError; template <typename T> class WebVector; +// FIXME: remove once the chromium is updated. +#define WEBPLUGIN_FIND_HAS_RETURN_TYPE + class WebPlugin { public: virtual bool initialize(WebPluginContainer*) = 0; @@ -94,7 +97,23 @@ public: // Ends the print operation. virtual void printEnd() { } - virtual WebString selectedText() { return WebString(); } + virtual bool hasSelection() const { return false; } + virtual WebString selectionAsText() const { return WebString(); } + virtual WebString selectionAsMarkup() const { return WebString(); } + + // Used for zooming of full page plugins. + virtual void setZoomFactor(float scale, bool textOnly) { } + + // Find interface. + // Start a new search. The plugin should search for a little bit at a time so that it + // doesn't block the thread in case of a large document. The results, along with the + // find's identifier, should be sent asynchronously to WebFrameClient's reportFindInPage* methods. + // Returns true if the search started, or false if the plugin doesn't support search. + virtual bool startFind(const WebString& searchText, bool caseSensitive, int identifier) { return false; } + // Tells the plugin to jump forward or backward in the list of find results. + virtual void selectFindResult(bool forward) { } + // Tells the plugin that the user has stopped the find operation. + virtual void stopFind() { } protected: ~WebPlugin() { } diff --git a/WebKit/chromium/public/WebSerializedScriptValue.h b/WebKit/chromium/public/WebSerializedScriptValue.h index dbcb92a..96e6d5b 100644 --- a/WebKit/chromium/public/WebSerializedScriptValue.h +++ b/WebKit/chromium/public/WebSerializedScriptValue.h @@ -53,6 +53,9 @@ public: WEBKIT_API static WebSerializedScriptValue fromString(const WebString&); + // Create a WebSerializedScriptValue that represents a serialization error. + WEBKIT_API static WebSerializedScriptValue createInvalid(); + WEBKIT_API void reset(); WEBKIT_API void assign(const WebSerializedScriptValue&); diff --git a/WebKit/chromium/public/WebURLLoadTiming.h b/WebKit/chromium/public/WebURLLoadTiming.h new file mode 100644 index 0000000..9412d14 --- /dev/null +++ b/WebKit/chromium/public/WebURLLoadTiming.h @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebURLLoadTiming_h +#define WebURLLoadTiming_h + +#include "WebCommon.h" +#include "WebPrivatePtr.h" + +namespace WebCore { class ResourceLoadTiming; } + +namespace WebKit { +class WebString; + +class WebURLLoadTiming { +public: + ~WebURLLoadTiming() { reset(); } + + WebURLLoadTiming() { } + WebURLLoadTiming(const WebURLLoadTiming& d) { assign(d); } + WebURLLoadTiming& operator=(const WebURLLoadTiming& d) + { + assign(d); + return *this; + } + + WEBKIT_API void initialize(); + WEBKIT_API void reset(); + WEBKIT_API void assign(const WebURLLoadTiming&); + + bool isNull() const { return m_private.isNull(); } + + WEBKIT_API double requestTime() const; + WEBKIT_API void setRequestTime(double time); + + WEBKIT_API int proxyStart() const; + WEBKIT_API void setProxyStart(int start); + + WEBKIT_API int proxyEnd() const; + WEBKIT_API void setProxyEnd(int end); + + WEBKIT_API int dnsStart() const; + WEBKIT_API void setDNSStart(int start); + + WEBKIT_API int dnsEnd() const; + WEBKIT_API void setDNSEnd(int end); + + WEBKIT_API int connectStart() const; + WEBKIT_API void setConnectStart(int start); + + WEBKIT_API int connectEnd() const; + WEBKIT_API void setConnectEnd(int end); + + WEBKIT_API int sendStart() const; + WEBKIT_API void setSendStart(int start); + + WEBKIT_API int sendEnd() const; + WEBKIT_API void setSendEnd(int end); + + WEBKIT_API int receiveHeadersEnd() const; + WEBKIT_API void setReceiveHeadersEnd(int end); + + WEBKIT_API int sslStart() const; + WEBKIT_API void setSSLStart(int start); + + WEBKIT_API int sslEnd() const; + WEBKIT_API void setSSLEnd(int end); + +#if WEBKIT_IMPLEMENTATION + WebURLLoadTiming(const WTF::PassRefPtr<WebCore::ResourceLoadTiming>&); + WebURLLoadTiming& operator=(const WTF::PassRefPtr<WebCore::ResourceLoadTiming>&); + operator WTF::PassRefPtr<WebCore::ResourceLoadTiming>() const; +#endif + +private: + WebPrivatePtr<WebCore::ResourceLoadTiming> m_private; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebURLRequest.h b/WebKit/chromium/public/WebURLRequest.h index 408aad7..b60d5be 100644 --- a/WebKit/chromium/public/WebURLRequest.h +++ b/WebKit/chromium/public/WebURLRequest.h @@ -69,7 +69,8 @@ public: TargetIsObject = 7, TargetIsMedia = 8, TargetIsWorker = 9, - TargetIsSharedWorker = 10 + TargetIsSharedWorker = 10, + TargetIsPrefetch = 11, }; ~WebURLRequest() { reset(); } @@ -129,6 +130,10 @@ public: WEBKIT_API bool reportUploadProgress() const; WEBKIT_API void setReportUploadProgress(bool); + // Controls whether load timing info is collected for the request. + WEBKIT_API bool reportLoadTiming() const; + WEBKIT_API void setReportLoadTiming(bool); + WEBKIT_API TargetType targetType() const; WEBKIT_API void setTargetType(TargetType); diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h index 293d955..2aa603d 100644 --- a/WebKit/chromium/public/WebURLResponse.h +++ b/WebKit/chromium/public/WebURLResponse.h @@ -43,6 +43,7 @@ class WebCString; class WebHTTPHeaderVisitor; class WebString; class WebURL; +class WebURLLoadTiming; class WebURLResponsePrivate; class WebURLResponse { @@ -72,6 +73,12 @@ public: WEBKIT_API WebURL url() const; WEBKIT_API void setURL(const WebURL&); + WEBKIT_API unsigned connectionID() const; + WEBKIT_API void setConnectionID(unsigned); + + WEBKIT_API WebURLLoadTiming loadTiming(); + WEBKIT_API void setLoadTiming(const WebURLLoadTiming&); + WEBKIT_API double responseTime() const; WEBKIT_API void setResponseTime(double); @@ -121,6 +128,10 @@ public: const WebCore::ResourceResponse& toResourceResponse() const; #endif + // Flag whether this request was served from the disk cache entry. + WEBKIT_API bool wasCached() const; + WEBKIT_API void setWasCached(bool); + // Flag whether this request was loaded via the SPDY protocol or not. // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy WEBKIT_API bool wasFetchedViaSPDY() const; diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h index 1efd752..a8f5387 100644 --- a/WebKit/chromium/public/WebView.h +++ b/WebKit/chromium/public/WebView.h @@ -54,6 +54,18 @@ struct WebPoint; class WebView : public WebWidget { public: + // Controls the time that user scripts injected into the document run. + enum UserScriptInjectAt { + UserScriptInjectAtDocumentStart, + UserScriptInjectAtDocumentEnd + }; + + // Controls which frames user content is injected into. + enum UserContentInjectIn { + UserContentInjectInAllFrames, + UserContentInjectInTopFrameOnly + }; + // Initialization ------------------------------------------------------ // Creates a WebView that is NOT yet initialized. You will need to @@ -286,18 +298,22 @@ public: // FIXME: These two methods are DEPRECATED. Remove once Chromium has been rolled. virtual void addUserScript(const WebString& sourceCode, bool runAtStart) { - addUserScript(sourceCode, WebVector<WebString>(), runAtStart); + addUserScript(sourceCode, WebVector<WebString>(), + runAtStart ? UserScriptInjectAtDocumentStart : UserScriptInjectAtDocumentEnd, + UserContentInjectInAllFrames); } virtual void addUserStyleSheet(const WebString& sourceCode) { - addUserStyleSheet(sourceCode, WebVector<WebString>()); + addUserStyleSheet(sourceCode, WebVector<WebString>(), UserContentInjectInAllFrames); } WEBKIT_API static void addUserScript(const WebString& sourceCode, const WebVector<WebString>& patterns, - bool runAtStart); + UserScriptInjectAt injectAt, + UserContentInjectIn injectIn); WEBKIT_API static void addUserStyleSheet(const WebString& sourceCode, - const WebVector<WebString>& patterns); + const WebVector<WebString>& patterns, + UserContentInjectIn injectIn); WEBKIT_API static void removeAllUserContent(); // Modal dialog support ------------------------------------------------ diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h index a59289d..f21d262 100644 --- a/WebKit/chromium/public/WebViewClient.h +++ b/WebKit/chromium/public/WebViewClient.h @@ -45,10 +45,13 @@ namespace WebKit { class WebAccessibilityObject; class WebDragData; +class WebElement; class WebFileChooserCompletion; class WebFrame; class WebGeolocationService; class WebImage; +class WebInputElement; +class WebKeyboardEvent; class WebNode; class WebNotificationPresenter; class WebRange; @@ -132,6 +135,12 @@ public: virtual void didExecuteCommand(const WebString& commandName) { } virtual void didEndEditing() { } + // These methods are called when the users edits a text-field. + virtual void textFieldDidBeginEditing(const WebInputElement&) { } + virtual void textFieldDidEndEditing(const WebInputElement&) { } + virtual void textFieldDidChange(const WebInputElement&) { } + virtual void textFieldDidReceiveKeyDown(const WebInputElement&, const WebKeyboardEvent&) { } + // This method is called in response to WebView's handleInputEvent() // when the default action for the current keyboard event is not // suppressed by the page, to give the embedder a chance to handle @@ -312,6 +321,11 @@ public: // keys to navigate outside the range of possible selections. virtual void didClearAutoFillSelection(const WebNode&) { } + // Informs the browser that the user has selected an autocomplete (password + // or field) suggestion from the drop-down. The input element text has + // already been set to the selected suggestion. + virtual void didAcceptAutocompleteSuggestion(const WebInputElement&) { } + // Geolocation --------------------------------------------------------- // Access the embedder API for geolocation services. diff --git a/WebKit/chromium/src/ApplicationCacheHost.cpp b/WebKit/chromium/src/ApplicationCacheHost.cpp index 5fa4a66..b90126f 100644 --- a/WebKit/chromium/src/ApplicationCacheHost.cpp +++ b/WebKit/chromium/src/ApplicationCacheHost.cpp @@ -37,6 +37,7 @@ #include "DocumentLoader.h" #include "DOMApplicationCache.h" #include "Frame.h" +#include "ProgressEvent.h" #include "Settings.h" #include "WebURL.h" #include "WebURLError.h" @@ -195,34 +196,42 @@ void ApplicationCacheHost::setDOMApplicationCache(DOMApplicationCache* domApplic m_domApplicationCache = domApplicationCache; } -void ApplicationCacheHost::notifyDOMApplicationCache(EventID id) +void ApplicationCacheHost::notifyDOMApplicationCache(EventID id, int total, int done) { if (m_defersEvents) { - m_deferredEvents.append(id); + // Event dispatching is deferred until document.onload has fired. + m_deferredEvents.append(DeferredEvent(id, total, done)); return; } - if (m_domApplicationCache) { - ExceptionCode ec = 0; - m_domApplicationCache->dispatchEvent(Event::create(DOMApplicationCache::toEventType(id), false, false), ec); - ASSERT(!ec); - } + dispatchDOMEvent(id, total, done); } void ApplicationCacheHost::stopDeferringEvents() { RefPtr<DocumentLoader> protect(documentLoader()); for (unsigned i = 0; i < m_deferredEvents.size(); ++i) { - EventID id = m_deferredEvents[i]; - if (m_domApplicationCache) { - ExceptionCode ec = 0; - m_domApplicationCache->dispatchEvent(Event::create(DOMApplicationCache::toEventType(id), false, false), ec); - ASSERT(!ec); - } + const DeferredEvent& deferred = m_deferredEvents[i]; + dispatchDOMEvent(deferred.eventID, deferred.progressTotal, deferred.progressDone); } m_deferredEvents.clear(); m_defersEvents = false; } +void ApplicationCacheHost::dispatchDOMEvent(EventID id, int total, int done) +{ + if (m_domApplicationCache) { + const AtomicString& eventType = DOMApplicationCache::toEventType(id); + ExceptionCode ec = 0; + RefPtr<Event> event; + if (id == PROGRESS_EVENT) + event = ProgressEvent::create(eventType, true, done, total); + else + event = Event::create(eventType, false, false); + m_domApplicationCache->dispatchEvent(event, ec); + ASSERT(!ec); + } +} + ApplicationCacheHost::Status ApplicationCacheHost::status() const { return m_internal ? static_cast<Status>(m_internal->m_outerHost->status()) : UNCACHED; diff --git a/WebKit/chromium/src/ApplicationCacheHostInternal.h b/WebKit/chromium/src/ApplicationCacheHostInternal.h index edaaca9..902b9b5 100644 --- a/WebKit/chromium/src/ApplicationCacheHostInternal.h +++ b/WebKit/chromium/src/ApplicationCacheHostInternal.h @@ -55,18 +55,12 @@ public: virtual void notifyEventListener(WebKit::WebApplicationCacheHost::EventID eventID) { - m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID)); + m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID), 0, 0); } - virtual void notifyProgressEventListener(const WebKit::WebURL&, int num_total, int num_complete) + virtual void notifyProgressEventListener(const WebKit::WebURL&, int progressTotal, int progressDone) { - // FIXME: Modify webcore's progress event handling to carry the extra info and alter the - // layout tests to not fail when the more recently specified 'final' event is raised. - // For now, we're eating the extra info and that last event. - // See https://bugs.webkit.org/show_bug.cgi?id=37602 - if (num_complete == num_total) - return; - notifyEventListener(WebKit::WebApplicationCacheHost::ProgressEvent); + m_innerHost->notifyDOMApplicationCache(ApplicationCacheHost::PROGRESS_EVENT, progressTotal, progressDone); } static WebKit::WebApplicationCacheHost* toWebApplicationCacheHost(ApplicationCacheHost* innerHost) diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp index 5736ca0..1f946f3 100644 --- a/WebKit/chromium/src/AssertMatchingEnums.cpp +++ b/WebKit/chromium/src/AssertMatchingEnums.cpp @@ -37,6 +37,7 @@ #include "ApplicationCacheHost.h" #include "EditorInsertAction.h" #include "HTMLInputElement.h" +#include "IDBKey.h" #include "MediaPlayer.h" #include "NotificationPresenter.h" #include "PasteboardPrivate.h" @@ -44,11 +45,14 @@ #include "Settings.h" #include "StringImpl.h" #include "TextAffinity.h" +#include "UserContentTypes.h" +#include "UserScriptTypes.h" #include "WebAccessibilityObject.h" #include "WebApplicationCacheHost.h" #include "WebClipboard.h" #include "WebCursorInfo.h" #include "WebEditingAction.h" +#include "WebIDBKey.h" #include "WebInputElement.h" #include "WebMediaPlayer.h" #include "WebNotificationPresenter.h" @@ -56,6 +60,7 @@ #include "WebSettings.h" #include "WebTextAffinity.h" #include "WebTextCaseSensitivity.h" +#include "WebView.h" #include <wtf/Assertions.h> #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \ @@ -312,3 +317,12 @@ COMPILE_ASSERT_MATCHING_ENUM(WebTextAffinityDownstream, DOWNSTREAM); COMPILE_ASSERT_MATCHING_ENUM(WebTextCaseSensitive, TextCaseSensitive); COMPILE_ASSERT_MATCHING_ENUM(WebTextCaseInsensitive, TextCaseInsensitive); + +COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentStart, InjectAtDocumentStart); +COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentEnd, InjectAtDocumentEnd); +COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInAllFrames, InjectInAllFrames); +COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInTopFrameOnly, InjectInTopFrameOnly); + +COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NullType, IDBKey::NullType); +COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType); +COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType); diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp index f757d9c..d0d09bf 100644 --- a/WebKit/chromium/src/ContextMenuClientImpl.cpp +++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp @@ -54,6 +54,7 @@ #include "WebDataSourceImpl.h" #include "WebFrameImpl.h" #include "WebMenuItemInfo.h" +#include "WebPlugin.h" #include "WebPluginContainerImpl.h" #include "WebPoint.h" #include "WebString.h" @@ -209,7 +210,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( Widget* widget = toRenderWidget(object)->widget(); if (widget) { WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget); - WebString text = plugin->selectedText(); + WebString text = plugin->plugin()->selectionAsText(); if (!text.isEmpty()) { data.selectedText = text; data.editFlags |= WebContextMenuData::CanCopy; diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp index 864988a..4ae4934 100644 --- a/WebKit/chromium/src/EditorClientImpl.cpp +++ b/WebKit/chromium/src/EditorClientImpl.cpp @@ -43,9 +43,11 @@ #include "DOMUtilitiesPrivate.h" #include "WebEditingAction.h" +#include "WebElement.h" #include "WebFrameImpl.h" #include "WebKit.h" #include "WebInputElement.h" +#include "WebInputEventConversion.h" #include "WebNode.h" #include "WebPasswordAutocompleteListener.h" #include "WebRange.h" @@ -90,7 +92,7 @@ bool EditorClientImpl::shouldShowDeleteInterface(HTMLElement* elem) // Normally, we don't care to show WebCore's deletion UI, so we only enable // it if in testing mode and the test specifically requests it by using this // magic class name. - return WebKit::layoutTestMode() + return layoutTestMode() && elem->getAttribute(HTMLNames::classAttr) == "needsDeletionUI"; } @@ -644,12 +646,19 @@ void EditorClientImpl::handleInputMethodKeydown(KeyboardEvent* keyEvent) // We handle IME within chrome. } -void EditorClientImpl::textFieldDidBeginEditing(Element*) +void EditorClientImpl::textFieldDidBeginEditing(Element* element) { + HTMLInputElement* inputElement = toHTMLInputElement(element); + if (m_webView->client() && inputElement) + m_webView->client()->textFieldDidBeginEditing(WebInputElement(inputElement)); } void EditorClientImpl::textFieldDidEndEditing(Element* element) { + HTMLInputElement* inputElement = toHTMLInputElement(element); + if (m_webView->client() && inputElement) + m_webView->client()->textFieldDidEndEditing(WebInputElement(inputElement)); + // Notification that focus was lost. Be careful with this, it's also sent // when the page is being closed. @@ -664,7 +673,6 @@ void EditorClientImpl::textFieldDidEndEditing(Element* element) return; // The page is getting closed, don't fill the password. // Notify any password-listener of the focus change. - HTMLInputElement* inputElement = WebKit::toHTMLInputElement(element); if (!inputElement) return; @@ -682,15 +690,18 @@ void EditorClientImpl::textFieldDidEndEditing(Element* element) void EditorClientImpl::textDidChangeInTextField(Element* element) { ASSERT(element->hasLocalName(HTMLNames::inputTag)); + HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(element); + if (m_webView->client()) + m_webView->client()->textFieldDidChange(WebInputElement(inputElement)); + // Note that we only show the autofill popup in this case if the caret is at // the end. This matches FireFox and Safari but not IE. - autofill(static_cast<HTMLInputElement*>(element), false, false, - true); + autofill(inputElement, false, false, true); } bool EditorClientImpl::showFormAutofillForNode(Node* node) { - HTMLInputElement* inputElement = WebKit::toHTMLInputElement(node); + HTMLInputElement* inputElement = toHTMLInputElement(node); if (inputElement) return autofill(inputElement, true, true, false); return false; @@ -792,6 +803,9 @@ void EditorClientImpl::cancelPendingAutofill() void EditorClientImpl::onAutocompleteSuggestionAccepted(HTMLInputElement* textField) { + if (m_webView->client()) + m_webView->client()->didAcceptAutocompleteSuggestion(WebInputElement(textField)); + WebFrameImpl* webframe = WebFrameImpl::fromFrame(textField->document()->frame()); if (!webframe) return; @@ -802,6 +816,12 @@ void EditorClientImpl::onAutocompleteSuggestionAccepted(HTMLInputElement* textFi bool EditorClientImpl::doTextFieldCommandFromEvent(Element* element, KeyboardEvent* event) { + HTMLInputElement* inputElement = toHTMLInputElement(element); + if (m_webView->client() && inputElement) { + m_webView->client()->textFieldDidReceiveKeyDown(WebInputElement(inputElement), + WebKeyboardEventBuilder(*event)); + } + // Remember if backspace was pressed for the autofill. It is not clear how to // find if backspace was pressed from textFieldDidBeginEditing and // textDidChangeInTextField as when these methods are called the value of the diff --git a/WebKit/chromium/src/GLES2Context.cpp b/WebKit/chromium/src/GLES2Context.cpp index b6d619c..f342436 100644 --- a/WebKit/chromium/src/GLES2Context.cpp +++ b/WebKit/chromium/src/GLES2Context.cpp @@ -31,6 +31,7 @@ #include "config.h" #include "GLES2Context.h" +#include "IntSize.h" #include "WebGLES2Context.h" #include "WebKit.h" #include "WebKitClient.h" @@ -56,7 +57,8 @@ public: GLES2ContextInternal() {} ~GLES2ContextInternal() {} - bool initialize(Page*); + bool initializeOnscreen(Page*); + bool initializeOffscreen(GLES2Context*); WebGLES2Context* getWebGLES2Context() { return m_impl; } @@ -64,7 +66,7 @@ private: WebGLES2Context* m_impl; }; -bool GLES2ContextInternal::initialize(Page* page) +bool GLES2ContextInternal::initializeOnscreen(Page* page) { ASSERT(page); WebViewImpl* webView = WebViewImpl::fromPage(page); @@ -75,10 +77,22 @@ bool GLES2ContextInternal::initialize(Page* page) return true; } -PassOwnPtr<GLES2Context> GLES2Context::create(Page* page) +bool GLES2ContextInternal::initializeOffscreen(GLES2Context* parent) +{ + m_impl = webKitClient()->createGLES2Context(); + if (!m_impl) + return false; + if (!m_impl->initialize(0, parent ? parent->m_internal->m_impl : 0)) { + delete m_impl; + return false; + } + return true; +} + +PassOwnPtr<GLES2Context> GLES2Context::createOnscreen(Page* page) { GLES2ContextInternal* internal = new GLES2ContextInternal(); - if (!internal->initialize(page)) { + if (!internal->initializeOnscreen(page)) { delete internal; return 0; } @@ -87,6 +101,19 @@ PassOwnPtr<GLES2Context> GLES2Context::create(Page* page) return result; } +PassOwnPtr<GLES2Context> GLES2Context::createOffscreen(GLES2Context* parent) +{ + GLES2ContextInternal* internal = new GLES2ContextInternal(); + if (!internal->initializeOffscreen(parent)) { + delete internal; + return 0; + } + PassOwnPtr<GLES2Context> result = new GLES2Context(); + result->m_internal.set(internal); + return result; +} + + GLES2Context::~GLES2Context() { } @@ -115,4 +142,18 @@ bool GLES2Context::swapBuffers() return webContext->swapBuffers(); } +void GLES2Context::resizeOffscreenContent(const IntSize& size) +{ + WebGLES2Context* webContext = m_internal->getWebGLES2Context(); + ASSERT(webContext); + webContext->resizeOffscreenContent(size); +} + +unsigned GLES2Context::getOffscreenContentParentTextureId() +{ + WebGLES2Context* webContext = m_internal->getWebGLES2Context(); + ASSERT(webContext); + return webContext->getOffscreenContentParentTextureId(); +} + } // namespace WebCore diff --git a/WebKit/chromium/src/IDBCallbacksProxy.cpp b/WebKit/chromium/src/IDBCallbacksProxy.cpp index 7a6571a..3591bee 100644 --- a/WebKit/chromium/src/IDBCallbacksProxy.cpp +++ b/WebKit/chromium/src/IDBCallbacksProxy.cpp @@ -35,6 +35,7 @@ #include "WebIDBDatabaseImpl.h" #include "WebIDBDatabaseError.h" #include "WebIDBIndexImpl.h" +#include "WebIDBKey.h" #include "WebIDBObjectStoreImpl.h" #include "WebSerializedScriptValue.h" @@ -44,7 +45,7 @@ namespace WebCore { PassRefPtr<IDBCallbacksProxy> IDBCallbacksProxy::create(PassOwnPtr<WebKit::WebIDBCallbacks> callbacks) { - return new IDBCallbacksProxy(callbacks); + return adoptRef(new IDBCallbacksProxy(callbacks)); } IDBCallbacksProxy::IDBCallbacksProxy(PassOwnPtr<WebKit::WebIDBCallbacks> callbacks) @@ -82,7 +83,8 @@ void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndex> idbIndex) void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBKey> idbKey) { - ASSERT_NOT_REACHED(); + m_callbacks->onSuccess(WebKit::WebIDBKey(idbKey)); + m_callbacks.clear(); } void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBObjectStore> idbObjectStore) @@ -100,4 +102,3 @@ void IDBCallbacksProxy::onSuccess(PassRefPtr<SerializedScriptValue> serializedSc } // namespace WebCore #endif // ENABLE(INDEXED_DATABASE) - diff --git a/WebKit/chromium/src/IDBCallbacksProxy.h b/WebKit/chromium/src/IDBCallbacksProxy.h index fc424f8..c5a8858 100644 --- a/WebKit/chromium/src/IDBCallbacksProxy.h +++ b/WebKit/chromium/src/IDBCallbacksProxy.h @@ -42,11 +42,6 @@ class WebIDBCallbacks; namespace WebCore { -class IDBDatabaseError; -class IDBDatabase; -class IDBObjectStore; -class SerializedScriptValue; - class IDBCallbacksProxy : public IDBCallbacks { public: static PassRefPtr<IDBCallbacksProxy> create(PassOwnPtr<WebKit::WebIDBCallbacks>); diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/WebKit/chromium/src/IDBObjectStoreProxy.cpp index 5942e2a..cec4ed3 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.cpp +++ b/WebKit/chromium/src/IDBObjectStoreProxy.cpp @@ -31,7 +31,9 @@ #include "IDBIndexProxy.h" #include "WebIDBCallbacksImpl.h" #include "WebIDBIndex.h" +#include "WebIDBKey.h" #include "WebIDBObjectStore.h" +#include "WebSerializedScriptValue.h" #if ENABLE(INDEXED_DATABASE) @@ -66,6 +68,21 @@ PassRefPtr<DOMStringList> IDBObjectStoreProxy::indexNames() const return m_webIDBObjectStore->indexNames(); } +void IDBObjectStoreProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks) +{ + m_webIDBObjectStore->get(key, new WebIDBCallbacksImpl(callbacks)); +} + +void IDBObjectStoreProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks> callbacks) +{ + m_webIDBObjectStore->put(value, key, addOnly, new WebIDBCallbacksImpl(callbacks)); +} + +void IDBObjectStoreProxy::remove(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks) +{ + m_webIDBObjectStore->remove(key, new WebIDBCallbacksImpl(callbacks)); +} + void IDBObjectStoreProxy::createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks> callbacks) { m_webIDBObjectStore->createIndex(name, keyPath, unique, new WebIDBCallbacksImpl(callbacks)); diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.h b/WebKit/chromium/src/IDBObjectStoreProxy.h index 78983cb..b8e4a01 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.h +++ b/WebKit/chromium/src/IDBObjectStoreProxy.h @@ -43,15 +43,19 @@ class IDBIndex; class IDBObjectStoreProxy : public IDBObjectStore { public: static PassRefPtr<IDBObjectStore> create(PassOwnPtr<WebKit::WebIDBObjectStore>); - virtual ~IDBObjectStoreProxy(); + ~IDBObjectStoreProxy(); - virtual String name() const; - virtual String keyPath() const; - virtual PassRefPtr<DOMStringList> indexNames() const; + String name() const; + String keyPath() const; + PassRefPtr<DOMStringList> indexNames() const; - virtual void createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks>); - virtual PassRefPtr<IDBIndex> index(const String& name); - virtual void removeIndex(const String& name, PassRefPtr<IDBCallbacks>); + void get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>); + void put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks>); + 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); + void removeIndex(const String& name, PassRefPtr<IDBCallbacks>); private: IDBObjectStoreProxy(PassOwnPtr<WebKit::WebIDBObjectStore>); diff --git a/WebKit/chromium/src/NotificationPresenterImpl.cpp b/WebKit/chromium/src/NotificationPresenterImpl.cpp index dca1856..1931465 100644 --- a/WebKit/chromium/src/NotificationPresenterImpl.cpp +++ b/WebKit/chromium/src/NotificationPresenterImpl.cpp @@ -35,6 +35,7 @@ #include "KURL.h" #include "Notification.h" +#include "ScriptExecutionContext.h" #include "SecurityOrigin.h" #include "WebNotification.h" @@ -91,15 +92,15 @@ void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notifi m_presenter->objectDestroyed(PassRefPtr<Notification>(notification)); } -NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(const KURL& sourceURL) +NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(ScriptExecutionContext* context) { - int result = m_presenter->checkPermission(sourceURL); + int result = m_presenter->checkPermission(context->url()); return static_cast<NotificationPresenter::Permission>(result); } -void NotificationPresenterImpl::requestPermission(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback) +void NotificationPresenterImpl::requestPermission(ScriptExecutionContext* context, PassRefPtr<VoidCallback> callback) { - m_presenter->requestPermission(WebSecurityOrigin(origin), new VoidCallbackClient(callback)); + m_presenter->requestPermission(WebSecurityOrigin(context->securityOrigin()), new VoidCallbackClient(callback)); } } // namespace WebKit diff --git a/WebKit/chromium/src/NotificationPresenterImpl.h b/WebKit/chromium/src/NotificationPresenterImpl.h index 479538f..bb156dd 100644 --- a/WebKit/chromium/src/NotificationPresenterImpl.h +++ b/WebKit/chromium/src/NotificationPresenterImpl.h @@ -54,8 +54,9 @@ public: virtual bool show(WebCore::Notification* object); virtual void cancel(WebCore::Notification* object); virtual void notificationObjectDestroyed(WebCore::Notification* object); - virtual WebCore::NotificationPresenter::Permission checkPermission(const WebCore::KURL& sourceURL); - virtual void requestPermission(WebCore::SecurityOrigin* origin, WTF::PassRefPtr<WebCore::VoidCallback> callback); + virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::ScriptExecutionContext*); + virtual void requestPermission(WebCore::ScriptExecutionContext* , WTF::PassRefPtr<WebCore::VoidCallback> callback); + virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) {} private: // WebNotificationPresenter that this object delegates to. diff --git a/WebKit/chromium/src/SharedWorkerRepository.cpp b/WebKit/chromium/src/SharedWorkerRepository.cpp index 2c4e918..88d3ec5 100644 --- a/WebKit/chromium/src/SharedWorkerRepository.cpp +++ b/WebKit/chromium/src/SharedWorkerRepository.cpp @@ -220,7 +220,7 @@ void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr // The loader object manages its own lifecycle (and the lifecycles of the two worker objects). // It will free itself once loading is completed. - SharedWorkerScriptLoader* loader = new SharedWorkerScriptLoader(worker, url, name, port.release(), webWorker.release()); + SharedWorkerScriptLoader* loader = new SharedWorkerScriptLoader(worker, url, name, port, webWorker.release()); loader->load(); } diff --git a/WebKit/chromium/src/WebDataSourceImpl.cpp b/WebKit/chromium/src/WebDataSourceImpl.cpp index 5a315cf..ac2a02d 100644 --- a/WebKit/chromium/src/WebDataSourceImpl.cpp +++ b/WebKit/chromium/src/WebDataSourceImpl.cpp @@ -156,7 +156,7 @@ void WebDataSourceImpl::setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserv { // This call should always be followed up with the creation of a // WebDataSourceImpl, so we should never leak this object. - m_nextPluginLoadObserver = observer.release(); + m_nextPluginLoadObserver = observer.leakPtr(); } WebDataSourceImpl::WebDataSourceImpl(const ResourceRequest& request, const SubstituteData& data) diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp index 20ab1d3..4205c62 100644 --- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp +++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp @@ -520,10 +520,10 @@ void WebDevToolsAgentImpl::identifierForInitialRequest( } } -void WebDevToolsAgentImpl::willSendRequest(unsigned long resourceId, const WebURLRequest& request) +void WebDevToolsAgentImpl::willSendRequest(unsigned long resourceId, WebURLRequest& request) { if (InspectorController* ic = inspectorController()) - ic->willSendRequest(resourceId, request.toResourceRequest(), ResourceResponse()); + ic->willSendRequest(resourceId, request.toMutableResourceRequest(), ResourceResponse()); } void WebDevToolsAgentImpl::didReceiveData(unsigned long resourceId, int length) @@ -598,6 +598,11 @@ bool WebDevToolsAgentImpl::sendMessageToFrontend(const WebCore::String& message) if (!devToolsAgent) return false; + if (devToolsAgent->m_apuAgentEnabled && devToolsAgent->m_apuAgentDelegateStub) { + devToolsAgent->m_apuAgentDelegateStub->dispatchToApu(message); + return true; + } + WebVector<WebString> arguments(size_t(1)); arguments[0] = message; WebDevToolsMessageData data; diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.h b/WebKit/chromium/src/WebDevToolsAgentImpl.h index c97b21f..12f51f9 100644 --- a/WebKit/chromium/src/WebDevToolsAgentImpl.h +++ b/WebKit/chromium/src/WebDevToolsAgentImpl.h @@ -89,7 +89,7 @@ public: virtual void setTimelineProfilingEnabled(bool enable); virtual void identifierForInitialRequest(unsigned long, WebFrame*, const WebURLRequest&); - virtual void willSendRequest(unsigned long, const WebURLRequest&); + virtual void willSendRequest(unsigned long, WebURLRequest&); virtual void didReceiveData(unsigned long, int length); virtual void didReceiveResponse(unsigned long, const WebURLResponse&); virtual void didFinishLoading(unsigned long); diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp index ff4883e..535d128 100644 --- a/WebKit/chromium/src/WebFrameImpl.cpp +++ b/WebKit/chromium/src/WebFrameImpl.cpp @@ -130,6 +130,7 @@ #include "WebHistoryItem.h" #include "WebInputElement.h" #include "WebPasswordAutocompleteListener.h" +#include "WebPlugin.h" #include "WebPluginContainerImpl.h" #include "WebRange.h" #include "WebRect.h" @@ -248,9 +249,7 @@ static void frameContentAsPlainText(size_t maxChars, Frame* frame, } } -// If the frame hosts a PluginDocument, this method returns the WebPluginContainerImpl -// that hosts the plugin. -static WebPluginContainerImpl* pluginContainerFromFrame(Frame* frame) +WebPluginContainerImpl* WebFrameImpl::pluginContainerFromFrame(Frame* frame) { if (!frame) return 0; @@ -348,7 +347,7 @@ public: virtual void end() { - WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(m_frame); + WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(m_frame); if (pluginContainer && pluginContainer->supportsPaginatedPrint()) pluginContainer->printEnd(); else @@ -363,7 +362,7 @@ public: virtual void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight) { - WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(m_frame); + WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(m_frame); if (pluginContainer && pluginContainer->supportsPaginatedPrint()) m_pageCount = pluginContainer->printBegin(IntRect(printRect), m_printerDPI); else @@ -380,7 +379,7 @@ public: // instead. Returns the scale to be applied. virtual float spoolPage(GraphicsContext& ctx, int pageNumber) { - WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(m_frame); + WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(m_frame); if (pluginContainer && pluginContainer->supportsPaginatedPrint()) pluginContainer->printPage(pageNumber, &ctx); else @@ -1094,6 +1093,14 @@ bool WebFrameImpl::executeCommand(const WebString& name) if (command[command.length() - 1] == UChar(':')) command = command.substring(0, command.length() - 1); + if (command == "Copy") { + WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); + if (pluginContainer) { + pluginContainer->copy(); + return true; + } + } + bool rv = true; // Specially handling commands that Editor::execCommand does not directly @@ -1164,6 +1171,10 @@ bool WebFrameImpl::isContinuousSpellCheckingEnabled() const bool WebFrameImpl::hasSelection() const { + WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); + if (pluginContainer) + return pluginContainer->plugin()->hasSelection(); + // frame()->selection()->isNone() never returns true. return (frame()->selection()->start() != frame()->selection()->end()); } @@ -1175,6 +1186,10 @@ WebRange WebFrameImpl::selectionRange() const WebString WebFrameImpl::selectionAsText() const { + WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); + if (pluginContainer) + return pluginContainer->plugin()->selectionAsText(); + RefPtr<Range> range = frame()->selection()->toNormalizedRange(); if (!range.get()) return WebString(); @@ -1189,6 +1204,10 @@ WebString WebFrameImpl::selectionAsText() const WebString WebFrameImpl::selectionAsMarkup() const { + WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); + if (pluginContainer) + return pluginContainer->plugin()->selectionAsMarkup(); + RefPtr<Range> range = frame()->selection()->toNormalizedRange(); if (!range.get()) return WebString(); @@ -1960,7 +1979,7 @@ bool WebFrameImpl::registerPasswordListener( WebInputElement inputElement, WebPasswordAutocompleteListener* listener) { - RefPtr<HTMLInputElement> element = inputElement.operator PassRefPtr<HTMLInputElement>(); + RefPtr<HTMLInputElement> element(inputElement.unwrap<HTMLInputElement>()); if (!m_passwordListeners.add(element, listener).second) { delete listener; return false; @@ -1971,8 +1990,8 @@ bool WebFrameImpl::registerPasswordListener( void WebFrameImpl::notifiyPasswordListenerOfAutocomplete( const WebInputElement& inputElement) { - RefPtr<HTMLInputElement> element = inputElement.operator PassRefPtr<HTMLInputElement>(); - WebPasswordAutocompleteListener* listener = getPasswordListener(element.get()); + const HTMLInputElement* element = inputElement.constUnwrap<HTMLInputElement>(); + WebPasswordAutocompleteListener* listener = getPasswordListener(element); // Password listeners need to autocomplete other fields that depend on the // input element with autofill suggestions. if (listener) @@ -1980,9 +1999,9 @@ void WebFrameImpl::notifiyPasswordListenerOfAutocomplete( } WebPasswordAutocompleteListener* WebFrameImpl::getPasswordListener( - HTMLInputElement* inputElement) + const HTMLInputElement* inputElement) { - return m_passwordListeners.get(RefPtr<HTMLInputElement>(inputElement)); + return m_passwordListeners.get(RefPtr<HTMLInputElement>(const_cast<HTMLInputElement*>(inputElement))); } // WebFrameImpl private -------------------------------------------------------- diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h index aa1edd6..2511fce 100644 --- a/WebKit/chromium/src/WebFrameImpl.h +++ b/WebKit/chromium/src/WebFrameImpl.h @@ -56,6 +56,7 @@ class WebDataSourceImpl; class WebInputElement; class WebFrameClient; class WebPasswordAutocompleteListener; +class WebPluginContainerImpl; class WebView; class WebViewImpl; @@ -197,6 +198,10 @@ public: static WebFrameImpl* fromFrame(WebCore::Frame* frame); static WebFrameImpl* fromFrameOwnerElement(WebCore::Element* element); + // If the frame hosts a PluginDocument, this method returns the WebPluginContainerImpl + // that hosts the plugin. + static WebPluginContainerImpl* pluginContainerFromFrame(WebCore::Frame*); + WebViewImpl* viewImpl() const; WebCore::Frame* frame() const { return m_frame; } @@ -231,7 +236,7 @@ public: // user name input element, or 0 if none available. // Note that the returned listener is owner by the WebFrameImpl and should not // be kept around as it is deleted when the page goes away. - WebPasswordAutocompleteListener* getPasswordListener(WebCore::HTMLInputElement*); + WebPasswordAutocompleteListener* getPasswordListener(const WebCore::HTMLInputElement*); WebFrameClient* client() const { return m_client; } void setClient(WebFrameClient* client) { m_client = client; } diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp index 891e3b3..21c9eed 100644 --- a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp +++ b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp @@ -30,11 +30,13 @@ #include "IDBDatabaseError.h" #include "IDBDatabaseProxy.h" #include "IDBIndexProxy.h" +#include "IDBKey.h" #include "IDBObjectStoreProxy.h" #include "WebIDBCallbacks.h" #include "WebIDBDatabase.h" #include "WebIDBDatabaseError.h" #include "WebIDBIndex.h" +#include "WebIDBKey.h" #include "WebIDBObjectStore.h" #include "WebSerializedScriptValue.h" @@ -69,6 +71,12 @@ void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBDatabase* webKitInstance) m_callbacks.clear(); } +void WebIDBCallbacksImpl::onSuccess(const WebKit::WebIDBKey& key) +{ + m_callbacks->onSuccess(key); + m_callbacks.clear(); +} + void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBIndex* webKitInstance) { m_callbacks->onSuccess(IDBIndexProxy::create(webKitInstance)); diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.h b/WebKit/chromium/src/WebIDBCallbacksImpl.h index 519f692..a4d53b5 100644 --- a/WebKit/chromium/src/WebIDBCallbacksImpl.h +++ b/WebKit/chromium/src/WebIDBCallbacksImpl.h @@ -44,6 +44,7 @@ public: virtual void onError(const WebKit::WebIDBDatabaseError&); virtual void onSuccess(); // For "null". virtual void onSuccess(WebKit::WebIDBDatabase*); + virtual void onSuccess(const WebKit::WebIDBKey&); virtual void onSuccess(WebKit::WebIDBIndex*); virtual void onSuccess(WebKit::WebIDBObjectStore*); virtual void onSuccess(const WebKit::WebSerializedScriptValue&); diff --git a/WebKit/chromium/src/WebIDBKey.cpp b/WebKit/chromium/src/WebIDBKey.cpp new file mode 100644 index 0000000..a52ea56 --- /dev/null +++ b/WebKit/chromium/src/WebIDBKey.cpp @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebIDBKey.h" + +#if ENABLE(INDEXED_DATABASE) + +#include "IDBKey.h" + +using namespace WebCore; + +namespace WebKit { + +WebIDBKey::~WebIDBKey() +{ + m_private.reset(); +} + +WebIDBKey WebIDBKey::createNull() +{ + WebIDBKey key; + key.assignNull(); + return key; +} + +WebIDBKey WebIDBKey::createInvalid() +{ + WebIDBKey key; + key.assignInvalid(); + return key; +} + +void WebIDBKey::assign(const WebIDBKey& value) +{ + m_private = value.m_private; +} + +void WebIDBKey::assignNull() +{ + m_private = IDBKey::create(); +} + +void WebIDBKey::assign(const WebString& string) +{ + m_private = IDBKey::create(string); +} + +void WebIDBKey::assign(int32_t number) +{ + m_private = IDBKey::create(number); +} + +void WebIDBKey::assignInvalid() +{ + m_private = 0; +} + +WebIDBKey::Type WebIDBKey::type() const +{ + if (!m_private.get()) + return InvalidType; + return Type(m_private->type()); +} + +WebString WebIDBKey::string() const +{ + return m_private->string(); +} + +int32_t WebIDBKey::number() const +{ + return m_private->number(); +} + +WebIDBKey::WebIDBKey(const PassRefPtr<IDBKey>& value) + : m_private(value) +{ +} + +WebIDBKey& WebIDBKey::operator=(const PassRefPtr<IDBKey>& value) +{ + m_private = value; + return *this; +} + +WebIDBKey::operator PassRefPtr<IDBKey>() const +{ + return m_private.get(); +} + +} // namespace WebKit + +#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp index a41010a..d8e98db 100755 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp +++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp @@ -30,6 +30,8 @@ #include "IDBCallbacksProxy.h" #include "IDBObjectStore.h" #include "WebIDBIndexImpl.h" +#include "WebIDBKey.h" +#include "WebSerializedScriptValue.h" #if ENABLE(INDEXED_DATABASE) @@ -61,6 +63,21 @@ WebDOMStringList WebIDBObjectStoreImpl::indexNames() const return m_objectStore->indexNames(); } +void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks) +{ + m_objectStore->get(key, IDBCallbacksProxy::create(callbacks)); +} + +void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks) +{ + m_objectStore->put(value, key, addOnly, IDBCallbacksProxy::create(callbacks)); +} + +void WebIDBObjectStoreImpl::remove(const WebIDBKey& key, WebIDBCallbacks* callbacks) +{ + m_objectStore->remove(key, IDBCallbacksProxy::create(callbacks)); +} + void WebIDBObjectStoreImpl::createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks* callbacks) { m_objectStore->createIndex(name, keyPath, unique, IDBCallbacksProxy::create(callbacks)); diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/WebKit/chromium/src/WebIDBObjectStoreImpl.h index f59840f..4064b7f 100755 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.h +++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.h @@ -41,15 +41,19 @@ class WebIDBIndex; class WebIDBObjectStoreImpl : public WebIDBObjectStore { public: WebIDBObjectStoreImpl(WTF::PassRefPtr<WebCore::IDBObjectStore> objectStore); - virtual ~WebIDBObjectStoreImpl(); + ~WebIDBObjectStoreImpl(); - virtual WebString name() const; - virtual WebString keyPath() const; - virtual WebDOMStringList indexNames() const; + WebString name() const; + WebString keyPath() const; + WebDOMStringList indexNames() const; - virtual void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks* callbacks); - virtual WebIDBIndex* index(const WebString& name); - virtual void removeIndex(const WebString& name, WebIDBCallbacks* callbacks); + void get(const WebIDBKey& key, WebIDBCallbacks*); + void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*); + void remove(const WebIDBKey& key, WebIDBCallbacks*); + + void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks* callbacks); + WebIDBIndex* index(const WebString& name); + void removeIndex(const WebString& name, WebIDBCallbacks* callbacks); private: WTF::RefPtr<WebCore::IDBObjectStore> m_objectStore; diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp index 18bafd6..3b88335 100644 --- a/WebKit/chromium/src/WebInputElement.cpp +++ b/WebKit/chromium/src/WebInputElement.cpp @@ -45,6 +45,11 @@ bool WebInputElement::autoComplete() const return constUnwrap<HTMLInputElement>()->autoComplete(); } +bool WebInputElement::isReadOnly() const +{ + return constUnwrap<HTMLInputElement>()->readOnly(); +} + bool WebInputElement::isEnabledFormControl() const { return constUnwrap<HTMLInputElement>()->isEnabledFormControl(); @@ -85,6 +90,16 @@ WebString WebInputElement::value() const return constUnwrap<HTMLInputElement>()->value(); } +void WebInputElement::setSuggestedValue(const WebString& value) +{ + unwrap<HTMLInputElement>()->setSuggestedValue(value); +} + +WebString WebInputElement::suggestedValue() const +{ + return constUnwrap<HTMLInputElement>()->suggestedValue(); +} + void WebInputElement::setPlaceholder(const WebString& value) { unwrap<HTMLInputElement>()->setPlaceholder(value); @@ -115,6 +130,16 @@ void WebInputElement::setSelectionRange(int start, int end) unwrap<HTMLInputElement>()->setSelectionRange(start, end); } +int WebInputElement::selectionStart() +{ + return unwrap<HTMLInputElement>()->selectionStart(); +} + +int WebInputElement::selectionEnd() +{ + return unwrap<HTMLInputElement>()->selectionEnd(); +} + WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem) : WebFormControlElement(elem) { diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp index 31ad70f..69c35e7 100644 --- a/WebKit/chromium/src/WebNode.cpp +++ b/WebKit/chromium/src/WebNode.cpp @@ -67,6 +67,11 @@ bool WebNode::equals(const WebNode& n) const return (m_private.get() == n.m_private.get()); } +bool WebNode::lessThan(const WebNode& n) const +{ + return (m_private.get() < n.m_private.get()); +} + WebNode::NodeType WebNode::nodeType() const { return static_cast<NodeType>(m_private->nodeType()); diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp index 41758d2..e24e372 100644 --- a/WebKit/chromium/src/WebPluginContainerImpl.cpp +++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp @@ -33,14 +33,18 @@ #include "Chrome.h" #include "ChromeClientImpl.h" +#include "WebClipboard.h" #include "WebCursorInfo.h" #include "WebDataSourceImpl.h" #include "WebElement.h" #include "WebInputEvent.h" #include "WebInputEventConversion.h" #include "WebKit.h" +#include "WebKitClient.h" #include "WebPlugin.h" #include "WebRect.h" +#include "WebString.h" +#include "WebURL.h" #include "WebURLError.h" #include "WebURLRequest.h" #include "WebVector.h" @@ -57,6 +61,7 @@ #include "HTMLFormElement.h" #include "HTMLNames.h" #include "HTMLPlugInElement.h" +#include "KeyboardCodes.h" #include "KeyboardEvent.h" #include "MouseEvent.h" #include "Page.h" @@ -246,9 +251,12 @@ void WebPluginContainerImpl::printEnd() return m_webPlugin->printEnd(); } -WebString WebPluginContainerImpl::selectedText() +void WebPluginContainerImpl::copy() { - return m_webPlugin->selectedText(); + if (!plugin()->hasSelection()) + return; + + webKitClient()->clipboard()->writeHTML(plugin()->selectionAsMarkup(), WebURL(), plugin()->selectionAsText(), false); } WebElement WebPluginContainerImpl::element() @@ -441,6 +449,19 @@ void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) if (webEvent.type == WebInputEvent::Undefined) return; + if (webEvent.type == WebInputEvent::KeyDown) { +#if defined(OS_MACOSX) + if (webEvent.modifiers == WebInputEvent::MetaKey +#else + if (webEvent.modifiers == WebInputEvent::ControlKey +#endif + && webEvent.windowsKeyCode == VKEY_C) { + copy(); + event->setDefaultHandled(); + return; + } + } + WebCursorInfo cursorInfo; if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) event->setDefaultHandled(); diff --git a/WebKit/chromium/src/WebPluginContainerImpl.h b/WebKit/chromium/src/WebPluginContainerImpl.h index dd0871a..2a46e00 100644 --- a/WebKit/chromium/src/WebPluginContainerImpl.h +++ b/WebKit/chromium/src/WebPluginContainerImpl.h @@ -102,7 +102,8 @@ public: // Ends the print operation. void printEnd(); - WebString selectedText(); + // Copy the selected text. + void copy(); // Resource load events for the plugin's source data: void didReceiveResponse(const WebCore::ResourceResponse&); diff --git a/WebKit/chromium/src/WebPopupMenuImpl.cpp b/WebKit/chromium/src/WebPopupMenuImpl.cpp index dbf9183..2abdc62 100644 --- a/WebKit/chromium/src/WebPopupMenuImpl.cpp +++ b/WebKit/chromium/src/WebPopupMenuImpl.cpp @@ -56,7 +56,8 @@ namespace WebKit { WebPopupMenu* WebPopupMenu::create(WebWidgetClient* client) { - return new WebPopupMenuImpl(client); + // Pass the WebPopupMenuImpl's self-reference to the caller. + return adoptRef(new WebPopupMenuImpl(client)).leakRef(); } // WebWidget ------------------------------------------------------------------ diff --git a/WebKit/chromium/src/WebSerializedScriptValue.cpp b/WebKit/chromium/src/WebSerializedScriptValue.cpp index ce8517a..7149a4d 100644 --- a/WebKit/chromium/src/WebSerializedScriptValue.cpp +++ b/WebKit/chromium/src/WebSerializedScriptValue.cpp @@ -43,6 +43,11 @@ WebSerializedScriptValue WebSerializedScriptValue::fromString(const WebString& s return SerializedScriptValue::createFromWire(s); } +WebSerializedScriptValue WebSerializedScriptValue::createInvalid() +{ + return SerializedScriptValue::create(); +} + void WebSerializedScriptValue::reset() { m_private.reset(); diff --git a/WebKit/chromium/src/WebSharedWorkerImpl.cpp b/WebKit/chromium/src/WebSharedWorkerImpl.cpp index 51bbf1b..e73c0f4 100644 --- a/WebKit/chromium/src/WebSharedWorkerImpl.cpp +++ b/WebKit/chromium/src/WebSharedWorkerImpl.cpp @@ -85,7 +85,7 @@ void WebSharedWorkerImpl::connectTask(ScriptExecutionContext* context, WebShared { // Wrap the passed-in channel in a MessagePort, and send it off via a connect event. RefPtr<MessagePort> port = MessagePort::create(*context); - port->entangle(channel.release()); + port->entangle(channel); ASSERT(context->isWorkerContext()); WorkerContext* workerContext = static_cast<WorkerContext*>(context); ASSERT(workerContext->isSharedWorkerContext()); diff --git a/WebKit/chromium/src/WebURLLoadTiming.cpp b/WebKit/chromium/src/WebURLLoadTiming.cpp new file mode 100644 index 0000000..27ed362 --- /dev/null +++ b/WebKit/chromium/src/WebURLLoadTiming.cpp @@ -0,0 +1,192 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebURLLoadTiming.h" + +#include "ResourceLoadTiming.h" +#include "WebString.h" + +using namespace WebCore; + +namespace WebKit { + +void WebURLLoadTiming::initialize() +{ + m_private = ResourceLoadTiming::create(); +} + +void WebURLLoadTiming::reset() +{ + m_private.reset(); +} + +void WebURLLoadTiming::assign(const WebURLLoadTiming& other) +{ + m_private = other.m_private; +} + +double WebURLLoadTiming::requestTime() const +{ + return m_private->requestTime; +} + +void WebURLLoadTiming::setRequestTime(double time) +{ + m_private->requestTime = time; +} + +int WebURLLoadTiming::proxyStart() const +{ + return m_private->proxyStart; +} + +void WebURLLoadTiming::setProxyStart(int start) +{ + m_private->proxyStart = start; +} + +int WebURLLoadTiming::proxyEnd() const +{ + return m_private->proxyEnd; +} + +void WebURLLoadTiming::setProxyEnd(int end) +{ + m_private->proxyEnd = end; +} + +int WebURLLoadTiming::dnsStart() const +{ + return m_private->dnsStart; +} + +void WebURLLoadTiming::setDNSStart(int start) +{ + m_private->dnsStart = start; +} + +int WebURLLoadTiming::dnsEnd() const +{ + return m_private->dnsEnd; +} + +void WebURLLoadTiming::setDNSEnd(int end) +{ + m_private->dnsEnd = end; +} + +int WebURLLoadTiming::connectStart() const +{ + return m_private->connectStart; +} + +void WebURLLoadTiming::setConnectStart(int start) +{ + m_private->connectStart = start; +} + +int WebURLLoadTiming::connectEnd() const +{ + return m_private->connectEnd; +} + +void WebURLLoadTiming::setConnectEnd(int end) +{ + m_private->connectEnd = end; +} + +int WebURLLoadTiming::sendStart() const +{ + return m_private->sendStart; +} + +void WebURLLoadTiming::setSendStart(int start) +{ + m_private->sendStart = start; +} + +int WebURLLoadTiming::sendEnd() const +{ + return m_private->sendEnd; +} + +void WebURLLoadTiming::setSendEnd(int end) +{ + m_private->sendEnd = end; +} + +int WebURLLoadTiming::receiveHeadersEnd() const +{ + return m_private->receiveHeadersEnd; +} + +void WebURLLoadTiming::setReceiveHeadersEnd(int end) +{ + m_private->receiveHeadersEnd = end; +} + +int WebURLLoadTiming::sslStart() const +{ + return m_private->sslStart; +} + +void WebURLLoadTiming::setSSLStart(int start) +{ + m_private->sslStart = start; +} + +int WebURLLoadTiming::sslEnd() const +{ + return m_private->sslEnd; +} + +void WebURLLoadTiming::setSSLEnd(int end) +{ + m_private->sslEnd = end; +} + +WebURLLoadTiming::WebURLLoadTiming(const PassRefPtr<ResourceLoadTiming>& value) + : m_private(value) +{ +} + +WebURLLoadTiming& WebURLLoadTiming::operator=(const PassRefPtr<ResourceLoadTiming>& value) +{ + m_private = value; + return *this; +} + +WebURLLoadTiming::operator PassRefPtr<ResourceLoadTiming>() const +{ + return m_private.get(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebURLRequest.cpp b/WebKit/chromium/src/WebURLRequest.cpp index 46fa842..3b2d251 100644 --- a/WebKit/chromium/src/WebURLRequest.cpp +++ b/WebKit/chromium/src/WebURLRequest.cpp @@ -194,6 +194,16 @@ void WebURLRequest::setReportUploadProgress(bool reportUploadProgress) m_private->m_resourceRequest->setReportUploadProgress(reportUploadProgress); } +bool WebURLRequest::reportLoadTiming() const +{ + return m_private->m_resourceRequest->reportLoadTiming(); +} + +void WebURLRequest::setReportLoadTiming(bool reportLoadTiming) +{ + m_private->m_resourceRequest->setReportLoadTiming(reportLoadTiming); +} + WebURLRequest::TargetType WebURLRequest::targetType() const { return static_cast<TargetType>(m_private->m_resourceRequest->targetType()); diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp index 3f3ddba..2b7facc 100644 --- a/WebKit/chromium/src/WebURLResponse.cpp +++ b/WebKit/chromium/src/WebURLResponse.cpp @@ -32,12 +32,16 @@ #include "WebURLResponse.h" #include "ResourceResponse.h" +#include "ResourceLoadTiming.h" #include "WebHTTPHeaderVisitor.h" #include "WebString.h" #include "WebURL.h" +#include "WebURLLoadTiming.h" #include "WebURLResponsePrivate.h" +#include <wtf/RefPtr.h> + using namespace WebCore; namespace WebKit { @@ -93,6 +97,27 @@ void WebURLResponse::setURL(const WebURL& url) m_private->m_resourceResponse->setURL(url); } +unsigned WebURLResponse::connectionID() const +{ + return m_private->m_resourceResponse->connectionID(); +} + +void WebURLResponse::setConnectionID(unsigned connectionID) +{ + m_private->m_resourceResponse->setConnectionID(connectionID); +} + +WebURLLoadTiming WebURLResponse::loadTiming() +{ + return WebURLLoadTiming(m_private->m_resourceResponse->resourceLoadTiming()); +} + +void WebURLResponse::setLoadTiming(const WebURLLoadTiming& timing) +{ + RefPtr<ResourceLoadTiming> loadTiming = PassRefPtr<ResourceLoadTiming>(timing); + m_private->m_resourceResponse->setResourceLoadTiming(loadTiming.release()); +} + double WebURLResponse::responseTime() const { return m_private->m_resourceResponse->responseTime(); @@ -267,6 +292,16 @@ const ResourceResponse& WebURLResponse::toResourceResponse() const return *m_private->m_resourceResponse; } +bool WebURLResponse::wasCached() const +{ + return m_private->m_resourceResponse->wasCached(); +} + +void WebURLResponse::setWasCached(bool value) +{ + m_private->m_resourceResponse->setWasCached(value); +} + bool WebURLResponse::wasFetchedViaSPDY() const { return m_private->m_resourceResponse->wasFetchedViaSPDY(); diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp index 45b9117..d1ca71e 100644 --- a/WebKit/chromium/src/WebViewImpl.cpp +++ b/WebKit/chromium/src/WebViewImpl.cpp @@ -84,6 +84,7 @@ #include "Settings.h" #include "Timer.h" #include "TypingCommand.h" +#include "Vector.h" #include "WebAccessibilityObject.h" #include "WebDevToolsAgentPrivate.h" #include "WebDevToolsAgentImpl.h" @@ -96,6 +97,8 @@ #include "WebKitClient.h" #include "WebMediaPlayerAction.h" #include "WebNode.h" +#include "WebPlugin.h" +#include "WebPluginContainerImpl.h" #include "WebPoint.h" #include "WebPopupMenuImpl.h" #include "WebRect.h" @@ -137,8 +140,8 @@ static const double maxTextSizeMultiplier = 3.0; const char* pageGroupName = "default"; // Used to defer all page activity in cases where the embedder wishes to run -// a nested event loop. -static PageGroupLoadDeferrer* pageGroupLoadDeferrer; +// a nested event loop. Using a stack enables nesting of message loop invocations. +static Vector<PageGroupLoadDeferrer*> pageGroupLoadDeferrerStack; // Ensure that the WebDragOperation enum values stay in sync with the original // DragOperation constants. @@ -168,7 +171,8 @@ static const PopupContainerSettings autoFillPopupSettings = { WebView* WebView::create(WebViewClient* client, WebDevToolsAgentClient* devToolsClient) { - return new WebViewImpl(client, devToolsClient); + // Pass the WebViewImpl's self-reference to the caller. + return adoptRef(new WebViewImpl(client, devToolsClient)).leakRef(); } void WebView::updateVisitedLinkState(unsigned long long linkHash) @@ -183,23 +187,23 @@ void WebView::resetVisitedLinkState() void WebView::willEnterModalLoop() { - // It is not valid to nest more than once. - ASSERT(!pageGroupLoadDeferrer); - PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); ASSERT(pageGroup); if (pageGroup->pages().isEmpty()) - return; - - // Pick any page in the page group since we are deferring all pages. - pageGroupLoadDeferrer = new PageGroupLoadDeferrer(*pageGroup->pages().begin(), true); + pageGroupLoadDeferrerStack.append(static_cast<PageGroupLoadDeferrer*>(0)); + else { + // Pick any page in the page group since we are deferring all pages. + pageGroupLoadDeferrerStack.append(new PageGroupLoadDeferrer(*pageGroup->pages().begin(), true)); + } } void WebView::didExitModalLoop() { - delete pageGroupLoadDeferrer; - pageGroupLoadDeferrer = 0; + ASSERT(pageGroupLoadDeferrerStack.size()); + + delete pageGroupLoadDeferrerStack.last(); + pageGroupLoadDeferrerStack.removeLast(); } void WebViewImpl::initializeMainFrame(WebFrameClient* frameClient) @@ -263,7 +267,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools if (devToolsClient) m_devToolsAgent = new WebDevToolsAgentImpl(this, devToolsClient); - m_page.set(new Page(&m_chromeClientImpl, &m_contextMenuClientImpl, &m_editorClientImpl, &m_dragClientImpl, &m_inspectorClientImpl, 0, 0, 0)); + m_page.set(new Page(&m_chromeClientImpl, &m_contextMenuClientImpl, &m_editorClientImpl, &m_dragClientImpl, &m_inspectorClientImpl, 0, 0, 0, 0)); // the page will take ownership of the various clients @@ -1434,8 +1438,11 @@ int WebViewImpl::setZoomLevel(bool textOnly, int zoomLevel) if (!view) return m_zoomLevel; if (zoomFactor != view->zoomFactor()) { - m_zoomLevel = zoomLevel; view->setZoomFactor(zoomFactor, textOnly ? ZoomTextOnly : ZoomPage); + WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(frame); + if (pluginContainer) + pluginContainer->plugin()->setZoomFactor(zoomFactor, textOnly); + m_zoomLevel = zoomLevel; } return m_zoomLevel; } @@ -1864,7 +1871,10 @@ void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor, #endif } -void WebView::addUserScript(const WebString& sourceCode, const WebVector<WebString>& patternsIn, bool runAtStart) +void WebView::addUserScript(const WebString& sourceCode, + const WebVector<WebString>& patternsIn, + WebView::UserScriptInjectAt injectAt, + WebView::UserContentInjectIn injectIn) { OwnPtr<Vector<String> > patterns(new Vector<String>); for (size_t i = 0; i < patternsIn.size(); ++i) @@ -1873,10 +1883,13 @@ void WebView::addUserScript(const WebString& sourceCode, const WebVector<WebStri PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); RefPtr<DOMWrapperWorld> world(DOMWrapperWorld::create()); pageGroup->addUserScriptToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0, - runAtStart ? InjectAtDocumentStart : InjectAtDocumentEnd); + static_cast<UserScriptInjectionTime>(injectAt), + static_cast<UserContentInjectedFrames>(injectIn)); } -void WebView::addUserStyleSheet(const WebString& sourceCode, const WebVector<WebString>& patternsIn) +void WebView::addUserStyleSheet(const WebString& sourceCode, + const WebVector<WebString>& patternsIn, + WebView::UserContentInjectIn injectIn) { OwnPtr<Vector<String> > patterns(new Vector<String>); for (size_t i = 0; i < patternsIn.size(); ++i) @@ -1884,7 +1897,8 @@ void WebView::addUserStyleSheet(const WebString& sourceCode, const WebVector<Web PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); RefPtr<DOMWrapperWorld> world(DOMWrapperWorld::create()); - pageGroup->addUserStyleSheetToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0); + pageGroup->addUserStyleSheetToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0, + static_cast<UserContentInjectedFrames>(injectIn)); } void WebView::removeAllUserContent() diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp index 0ad0ccd..9593f5f 100644 --- a/WebKit/chromium/src/WebWorkerBase.cpp +++ b/WebKit/chromium/src/WebWorkerBase.cpp @@ -185,7 +185,7 @@ void WebWorkerBase::initializeLoader(const WebURL& url) void WebWorkerBase::dispatchTaskToMainThread(PassOwnPtr<ScriptExecutionContext::Task> task) { - return callOnMainThread(invokeTaskMethod, task.release()); + callOnMainThread(invokeTaskMethod, task.leakPtr()); } void WebWorkerBase::invokeTaskMethod(void* param) diff --git a/WebKit/chromium/src/WebWorkerClientImpl.cpp b/WebKit/chromium/src/WebWorkerClientImpl.cpp index 13b7fe6..18282e3 100644 --- a/WebKit/chromium/src/WebWorkerClientImpl.cpp +++ b/WebKit/chromium/src/WebWorkerClientImpl.cpp @@ -360,7 +360,7 @@ void WebWorkerClientImpl::postMessageToWorkerObjectTask( if (thisPtr->m_worker) { OwnPtr<MessagePortArray> ports = - MessagePort::entanglePorts(*context, channels.release()); + MessagePort::entanglePorts(*context, channels); RefPtr<SerializedScriptValue> serializedMessage = SerializedScriptValue::createFromWire(message); thisPtr->m_worker->dispatchEvent(MessageEvent::create(ports.release(), diff --git a/WebKit/chromium/src/WebWorkerImpl.cpp b/WebKit/chromium/src/WebWorkerImpl.cpp index 857c50f..165af68 100644 --- a/WebKit/chromium/src/WebWorkerImpl.cpp +++ b/WebKit/chromium/src/WebWorkerImpl.cpp @@ -86,7 +86,7 @@ void WebWorkerImpl::postMessageToWorkerContextTask(WebCore::ScriptExecutionConte static_cast<DedicatedWorkerContext*>(context); OwnPtr<MessagePortArray> ports = - MessagePort::entanglePorts(*context, channels.release()); + MessagePort::entanglePorts(*context, channels); RefPtr<SerializedScriptValue> serializedMessage = SerializedScriptValue::createFromWire(message); workerContext->dispatchEvent(MessageEvent::create( diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js index 25d1903..70c2fbe 100644 --- a/WebKit/chromium/src/js/DebuggerScript.js +++ b/WebKit/chromium/src/js/DebuggerScript.js @@ -84,7 +84,7 @@ DebuggerScript._formatScript = function(script) id: script.id, name: script.name, source: script.source, - lineOffset: script.line_offset, + lineOffset: DebuggerScript._v8ToWebkitLineNumber(script.line_offset), lineCount: script.lineCount(), scriptWorldType: scriptWorldType }; diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js index cd4d9fb..81432eb 100644 --- a/WebKit/chromium/src/js/Tests.js +++ b/WebKit/chromium/src/js/Tests.js @@ -852,7 +852,7 @@ TestSuite.prototype.showMainPageScriptSource_ = function(scriptName, callback) */ TestSuite.prototype.evaluateInConsole_ = function(code, callback) { - WebInspector.console.visible = true; + WebInspector.showConsole(); WebInspector.console.prompt.text = code; WebInspector.console.promptElement.dispatchEvent( TestSuite.createKeyEvent("Enter")); @@ -952,8 +952,12 @@ TestSuite.prototype.testCompletionOnPause = function() showConsole); function showConsole() { - test.addSniffer(WebInspector.console, "afterShow", testLocalsCompletion); - WebInspector.showConsole(); + if (WebInspector.currentFocusElement === WebInspector.console.promptElement) + testLocalsCompletion(); + else { + test.addSniffer(WebInspector.console, "afterShow", testLocalsCompletion); + WebInspector.showConsole(); + } } function testLocalsCompletion() { @@ -1775,7 +1779,7 @@ TestSuite.prototype.testConsoleEval = function() */ TestSuite.prototype.testConsoleLog = function() { - WebInspector.console.visible = true; + WebInspector.showConsole(); var messages = WebInspector.console.messages; var index = 0; @@ -1817,7 +1821,7 @@ TestSuite.prototype.testConsoleLog = function() */ TestSuite.prototype.testEvalGlobal = function() { - WebInspector.console.visible = true; + WebInspector.showConsole(); var inputs = ["foo", "foobar"]; var expectations = ["foo", "fooValue", "foobar", "ReferenceError: foobar is not defined"]; @@ -1850,6 +1854,48 @@ TestSuite.prototype.testEvalGlobal = function() /** + * Tests the message loop re-entrancy. + */ +TestSuite.prototype.testMessageLoopReentrant = function() +{ + var test = this; + this.showPanel("scripts"); + + var breakpointLine = 16; + + WebInspector.showConsole(); + + this._waitUntilScriptsAreParsed(["debugger_test_page.html"], + function() { + test.showMainPageScriptSource_( + "debugger_test_page.html", + function(view, url) { + view._addBreakpoint(breakpointLine); + + test.evaluateInConsole_( + 'setTimeout("calculate()", 0)', + function(resultText) { + test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText); + }); + + }); + }); + + // Wait until script is paused. + this.addSniffer( + WebInspector, + "pausedScript", + function(callFrames) { + test.evaluateInConsole_( + 'document.cookie', + test.releaseControl.bind(test)); // This callback will be invoked only if the test succeeds (i.e. no crash). + }); + + this.takeControl(); +}; + + +/** * Tests that Storage panel can be open and that local DOM storage is added * to the panel. */ diff --git a/WebKit/chromium/tests/DragImageTest.cpp b/WebKit/chromium/tests/DragImageTest.cpp index 7b7d4ee..8ce6fe2 100644 --- a/WebKit/chromium/tests/DragImageTest.cpp +++ b/WebKit/chromium/tests/DragImageTest.cpp @@ -43,6 +43,11 @@ namespace { class TestImage : public Image { public: + static PassRefPtr<TestImage> create(const IntSize& size) + { + return adoptRef(new TestImage(size)); + } + explicit TestImage(const IntSize& size) : Image(0) , m_size(size) @@ -108,8 +113,8 @@ TEST(DragImageTest, NullHandling) TEST(DragImageTest, NonNullHandling) { - TestImage testImage(IntSize(2, 2)); - DragImageRef dragImage = createDragImageFromImage(&testImage); + RefPtr<TestImage> testImage(TestImage::create(IntSize(2, 2))); + DragImageRef dragImage = createDragImageFromImage(testImage.get()); ASSERT_TRUE(dragImage); dragImage = scaleDragImage(dragImage, FloatSize(0.5, 0.5)); @@ -129,17 +134,17 @@ TEST(DragImageTest, CreateDragImage) { // Tests that the DrageImage implementation doesn't choke on null values // of nativeImageForCurrentFrame(). - TestImage testImage((IntSize())); - EXPECT_FALSE(createDragImageFromImage(&testImage)); + RefPtr<TestImage> testImage(TestImage::create(IntSize())); + EXPECT_FALSE(createDragImageFromImage(testImage.get())); } { // Tests that the drag image is a deep copy. - TestImage testImage(IntSize(1, 1)); - DragImageRef dragImage = createDragImageFromImage(&testImage); + RefPtr<TestImage> testImage(TestImage::create(IntSize(1, 1))); + DragImageRef dragImage = createDragImageFromImage(testImage.get()); ASSERT_TRUE(dragImage); - SkAutoLockPixels lock1(*dragImage), lock2(*testImage.nativeImageForCurrentFrame()); - EXPECT_NE(dragImage->getPixels(), testImage.nativeImageForCurrentFrame()->getPixels()); + SkAutoLockPixels lock1(*dragImage), lock2(*(testImage->nativeImageForCurrentFrame())); + EXPECT_NE(dragImage->getPixels(), testImage->nativeImageForCurrentFrame()->getPixels()); } } diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp index 9a45dc2..6680d74 100644 --- a/WebKit/chromium/tests/PopupMenuTest.cpp +++ b/WebKit/chromium/tests/PopupMenuTest.cpp @@ -107,8 +107,15 @@ public: class TestWebPopupMenuImpl : public WebPopupMenuImpl { public: - TestWebPopupMenuImpl(WebWidgetClient* client) : WebPopupMenuImpl(client) { } + static PassRefPtr<TestWebPopupMenuImpl> create(WebWidgetClient* client) + { + return adoptRef(new TestWebPopupMenuImpl(client)); + } + ~TestWebPopupMenuImpl() { } + +private: + TestWebPopupMenuImpl(WebWidgetClient* client) : WebPopupMenuImpl(client) { } }; class TestWebWidget : public WebWidget { @@ -135,10 +142,10 @@ public: class TestWebViewClient : public WebViewClient { public: - TestWebViewClient() : m_webPopupMenu(&m_webWidgetClient) { } + TestWebViewClient() : m_webPopupMenu(TestWebPopupMenuImpl::create(&m_webWidgetClient)) { } ~TestWebViewClient() { } - virtual WebWidget* createPopupMenu(WebPopupType) { return &m_webPopupMenu; } + virtual WebWidget* createPopupMenu(WebPopupType) { return m_webPopupMenu.get(); } // We need to override this so that the popup menu size is not 0 // (the layout code checks to see if the popup fits on the screen). @@ -152,7 +159,7 @@ public: private: TestWebWidgetClient m_webWidgetClient; - TestWebPopupMenuImpl m_webPopupMenu; + RefPtr<TestWebPopupMenuImpl> m_webPopupMenu; }; class TestWebFrameClient : public WebFrameClient { diff --git a/WebKit/efl/EWebLauncher/main.c b/WebKit/efl/EWebLauncher/main.c index 6d484e4a..362eefd 100644 --- a/WebKit/efl/EWebLauncher/main.c +++ b/WebKit/efl/EWebLauncher/main.c @@ -47,6 +47,7 @@ #define DEFAULT_WIDTH 800 #define DEFAULT_HEIGHT 600 +#define DEFAULT_ZOOM_INIT 1.0 #define info(format, args...) \ do { \ @@ -125,6 +126,15 @@ static const Ecore_Getopt options = { } }; +typedef struct _Viewport { + int w; + int h; + float initScale; + float minScale; + float maxScale; + Eina_Bool userScalable; +} Viewport; + typedef struct _ELauncher { Ecore_Evas *ee; Evas *evas; @@ -132,6 +142,7 @@ typedef struct _ELauncher { Evas_Object *browser; const char *theme; const char *userAgent; + Viewport viewport; } ELauncher; static void browserDestroy(Ecore_Evas *ee); @@ -225,6 +236,23 @@ title_set(Ecore_Evas *ee, const char *title, int progress) ecore_evas_title_set(ee, label); } +/** + * This is en example function to adjust viewport via viewport tag's arguments. + * Application can invoke this function in order to adjust viewport tag when it is required. + */ +static void +viewport_set() +{ + ELauncher *app; + app = (ELauncher*) eina_list_data_get(windows); + + ewk_view_fixed_layout_size_set(app->browser, app->viewport.w, app->viewport.h); + ewk_view_zoom_set(app->browser, app->viewport.initScale, 0, 0); + if (!ewk_view_zoom_range_set(app->browser, app->viewport.minScale, app->viewport.maxScale)) + info(" Fail to set zoom range. minScale = %f, maxScale = %f\n", app->viewport.minScale, app->viewport.maxScale); + ewk_view_user_scalable_set(app->browser, app->viewport.userScalable); +} + static void on_title_changed(void *user_data, Evas_Object *webview, void *event_info) { @@ -345,6 +373,48 @@ on_tooltip_text_set(void* user_data, Evas_Object* webview, void* event_info) info("%s\n", text); } +/** + * "viewport,changed" signal will be always emitted regardless of the viewport existence. + * + * If you don't want to process the viewport tag, you can either do nothing in this callback + * or simply ignore the signal in your application. + * + * More information about this can be found at http://developer.apple.com/safari/library/docum + * entation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html + */ +static void +on_viewport_changed(void* user_data, Evas_Object* webview, void* event_info) +{ + ELauncher *app = (ELauncher *)user_data; + + float w, h, initScale, minScale, maxScale, userScalable; + + ewk_view_viewport_get(webview, &w, &h, &initScale, &maxScale, &minScale, &userScalable); + + /** + * If there is no argument in viewport tag, argument's value is -1. + */ + if ((int)w == -1) + w = DEFAULT_WIDTH; + if ((int)h == -1) + h = DEFAULT_HEIGHT; + if ((int)initScale == -1) + initScale = DEFAULT_ZOOM_INIT; // There's no scale separated from zooming in webkit-efl. + if ((int)minScale == -1) + minScale = ewk_view_zoom_range_min_get(webview); + if ((int)maxScale == -1) + maxScale = ewk_view_zoom_range_max_get(webview); + if ((int)userScalable == -1) + userScalable = EINA_TRUE; + + app->viewport.w = (int)w; + app->viewport.h = (int)h; + app->viewport.initScale = initScale; + app->viewport.minScale = minScale; + app->viewport.maxScale = maxScale; + app->viewport.userScalable = (Eina_Bool)userScalable; +} + static void on_mouse_down(void* data, Evas* e, Evas_Object* webview, void* event_info) { @@ -579,6 +649,7 @@ browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Re evas_object_smart_callback_add(app->browser, "title,changed", on_title_changed, app); evas_object_smart_callback_add(app->browser, "load,progress", on_progress, app); evas_object_smart_callback_add(app->browser, "load,finished", on_load_finished, app); + evas_object_smart_callback_add(app->browser, "viewport,changed", on_viewport_changed, app); evas_object_smart_callback_add(app->browser, "toolbars,visible,set", on_toolbars_visible_set, app); evas_object_smart_callback_add(app->browser, "toolbars,visible,get", on_toolbars_visible_get, app); diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp index 5fef33e..342654a 100644 --- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp +++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp @@ -47,6 +47,7 @@ #include "KURL.h" #include "NotImplemented.h" #include "PlatformString.h" +#include "ViewportArguments.h" #include "WindowFeatures.h" #include "ewk_private.h" #include <Ecore_Evas.h> @@ -504,4 +505,13 @@ void ChromeClientEfl::chooseIconForFiles(const Vector<String>&, FileChooser*) notImplemented(); } +void ChromeClientEfl::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const +{ + FrameLoaderClientEfl* client = static_cast<FrameLoaderClientEfl*>(frame->loader()->client()); + if (client->getInitLayoutCompleted()) + return; + + ewk_view_viewport_set(m_view, arguments.width, arguments.height, arguments.initialScale, arguments.minimumScale, arguments.maximumScale, arguments.userScalable); +} + } diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h index fccf54f..45bda59 100644 --- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h +++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h @@ -135,6 +135,8 @@ public: virtual void cancelGeolocationPermissionRequestForFrame(Frame*); virtual void iconForFiles(const Vector<String, 0u>&, PassRefPtr<FileChooser>); + virtual void didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const; + Evas_Object* m_view; KURL m_hoveredLinkURL; }; diff --git a/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp b/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp index 19c3705..37d7d5a 100644 --- a/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp +++ b/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp @@ -30,11 +30,11 @@ #include "ContextMenu.h" #include "EWebKit.h" -#include "ewk_private.h" #include "HitTestResult.h" #include "KURL.h" #include "NotImplemented.h" #include "PlatformMenuDescription.h" +#include "ewk_private.h" using namespace WebCore; @@ -62,9 +62,16 @@ void ContextMenuClientEfl::contextMenuItemSelected(ContextMenuItem*, const Conte notImplemented(); } -void ContextMenuClientEfl::downloadURL(const KURL&) +void ContextMenuClientEfl::downloadURL(const KURL& url) { - notImplemented(); + if (!m_view) + return; + + Ewk_Download download; + + CString downloadUrl = url.prettyURL().utf8(); + download.url = downloadUrl.data(); + ewk_view_download_request(m_view, &download); } void ContextMenuClientEfl::searchWithGoogle(const Frame*) diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp index 50356e9..5648ec7 100644 --- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp @@ -49,6 +49,7 @@ #include "ProgressTracker.h" #include "RenderPart.h" #include "ResourceRequest.h" +#include "ViewportArguments.h" #include "ewk_private.h" #include <wtf/text/CString.h> @@ -70,6 +71,7 @@ FrameLoaderClientEfl::FrameLoaderClientEfl(Evas_Object *view) , m_customUserAgent("") , m_pluginView(0) , m_hasSentResponseToPlugin(false) + , m_initLayoutCompleted(false) { } @@ -249,9 +251,25 @@ void FrameLoaderClientEfl::dispatchDidCancelAuthenticationChallenge(DocumentLoad notImplemented(); } -void FrameLoaderClientEfl::dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest&, const ResourceResponse&) +void FrameLoaderClientEfl::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& coreRequest, const ResourceResponse& coreResponse) { - notImplemented(); + CString url = coreRequest.url().prettyURL().utf8(); + DBG("Resource url=%s", url.data()); + + Ewk_Frame_Resource_Request request = { 0, identifier }; + Ewk_Frame_Resource_Request orig = request; /* Initialize const fields. */ + + orig.url = request.url = url.data(); + + ewk_frame_request_will_send(m_frame, &request); + + if (request.url != orig.url) { + coreRequest.setURL(KURL(KURL(), request.url)); + + // Calling client might have changed our url pointer. + // Free the new allocated string. + free(const_cast<char*>(request.url)); + } } bool FrameLoaderClientEfl::shouldUseCredentialStorage(DocumentLoader*, unsigned long) @@ -260,9 +278,13 @@ bool FrameLoaderClientEfl::shouldUseCredentialStorage(DocumentLoader*, unsigned return false; } -void FrameLoaderClientEfl::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&) +void FrameLoaderClientEfl::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest& coreRequest) { - notImplemented(); + CString url = coreRequest.url().prettyURL().utf8(); + DBG("Resource url=%s", url.data()); + + Ewk_Frame_Resource_Request request = { 0, identifier }; + ewk_frame_request_assign_identifier(m_frame, &request); } void FrameLoaderClientEfl::postProgressStartedNotification() @@ -421,7 +443,7 @@ void FrameLoaderClientEfl::documentElementAvailable() void FrameLoaderClientEfl::didPerformFirstNavigation() const { - notImplemented(); + ewk_frame_did_perform_first_navigation(m_frame); } void FrameLoaderClientEfl::registerForIconNotification(bool) @@ -456,14 +478,17 @@ void FrameLoaderClientEfl::frameLoadCompleted() // Note: Can be called multiple times. } -void FrameLoaderClientEfl::saveViewStateToItem(HistoryItem*) +void FrameLoaderClientEfl::saveViewStateToItem(HistoryItem* item) { - notImplemented(); + ewk_frame_view_state_save(m_frame, item); } void FrameLoaderClientEfl::restoreViewState() { - notImplemented(); + ASSERT(m_frame); + ASSERT(m_view); + + ewk_view_restore_state(m_view, m_frame); } void FrameLoaderClientEfl::updateGlobalHistoryRedirectLinks() @@ -542,7 +567,11 @@ void FrameLoaderClientEfl::dispatchWillPerformClientRedirect(const KURL&, double void FrameLoaderClientEfl::dispatchDidChangeLocationWithinPage() { - notImplemented(); + ewk_frame_uri_changed(m_frame); + + if (ewk_view_frame_main_get(m_view) != m_frame) + return; + ewk_view_uri_changed(m_view); } void FrameLoaderClientEfl::dispatchWillClose() @@ -552,10 +581,18 @@ void FrameLoaderClientEfl::dispatchWillClose() void FrameLoaderClientEfl::dispatchDidReceiveIcon() { + /* report received favicon only for main frame. */ + if (ewk_view_frame_main_get(m_view) != m_frame) + return; + + ewk_view_frame_main_icon_received(m_view); } void FrameLoaderClientEfl::dispatchDidStartProvisionalLoad() { + ewk_frame_load_provisional(m_frame); + if (ewk_view_frame_main_get(m_view) == m_frame) + ewk_view_load_provisional(m_view); } void FrameLoaderClientEfl::dispatchDidReceiveTitle(const String& title) @@ -575,32 +612,37 @@ void FrameLoaderClientEfl::dispatchDidChangeIcons() void FrameLoaderClientEfl::dispatchDidCommitLoad() { + m_initLayoutCompleted = false; + ewk_frame_uri_changed(m_frame); if (ewk_view_frame_main_get(m_view) != m_frame) return; ewk_view_title_set(m_view, 0); ewk_view_uri_changed(m_view); + + ViewportArguments arguments; + ewk_view_viewport_set(m_view, arguments.width, arguments.height, arguments.initialScale, arguments.minimumScale, arguments.maximumScale, arguments.userScalable); } void FrameLoaderClientEfl::dispatchDidFinishDocumentLoad() { - notImplemented(); + ewk_frame_load_document_finished(m_frame); } void FrameLoaderClientEfl::dispatchDidFirstLayout() { - // emit m_frame->initialLayoutCompleted(); - notImplemented(); + m_initLayoutCompleted = true; + ewk_frame_load_firstlayout_finished(m_frame); } void FrameLoaderClientEfl::dispatchDidFirstVisuallyNonEmptyLayout() { - notImplemented(); + ewk_frame_load_firstlayout_nonempty_finished(m_frame); } void FrameLoaderClientEfl::dispatchShow() { - notImplemented(); + ewk_view_load_show(m_view); } void FrameLoaderClientEfl::cancelPolicyCheck() @@ -883,7 +925,11 @@ void FrameLoaderClientEfl::transitionToCommittedForNewPage() { ASSERT(m_frame); ASSERT(m_view); + ewk_frame_view_create_for_view(m_frame, m_view); + + if (m_frame == ewk_view_frame_main_get(m_view)) + ewk_view_frame_main_cleared(m_view); } } diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h index 581ec85..561760c 100644 --- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h @@ -55,6 +55,9 @@ class FrameLoaderClientEfl : public FrameLoaderClient { void setCustomUserAgent(const String &agent); const String& customUserAgent() const; + void setInitLayoutCompleted(bool completed) { m_initLayoutCompleted = completed; } + bool getInitLayoutCompleted() { return m_initLayoutCompleted; } + virtual bool hasWebView() const; virtual bool hasFrameView() const; @@ -213,6 +216,8 @@ class FrameLoaderClientEfl : public FrameLoaderClient { // Plugin view to redirect data to PluginView* m_pluginView; bool m_hasSentResponseToPlugin; + + bool m_initLayoutCompleted; }; } diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp index ec56221..ca76f02 100644 --- a/WebKit/efl/ewk/ewk_frame.cpp +++ b/WebKit/efl/ewk/ewk_frame.cpp @@ -31,6 +31,7 @@ #include "FrameTree.h" #include "FrameView.h" #include "HTMLPlugInElement.h" +#include "HistoryItem.h" #include "HitTestResult.h" #include "KURL.h" #include "PlatformKeyboardEvent.h" @@ -1633,6 +1634,70 @@ WebCore::Frame* ewk_frame_core_get(const Evas_Object* o) /** * @internal + * Reports a resource will be requested. User may override behavior of webkit by + * changing values in @param request. + * + * @param o Frame. + * @param request Request details that user may override. Whenever values on + * this struct changes, it must be properly malloc'd as it will be freed + * afterwards. + * + * Emits signal: "resource,request,willsend" + */ +void ewk_frame_request_will_send(Evas_Object *o, Ewk_Frame_Resource_Request *request) +{ + evas_object_smart_callback_call(o, "resource,request,willsend", request); +} + +/** + * @internal + * Reports that there's a new resource. + * + * @param o Frame. + * @param request New request details. No changes are allowed to fields. + * + * Emits signal: "resource,request,new" + */ +void ewk_frame_request_assign_identifier(Evas_Object *o, const Ewk_Frame_Resource_Request *request) +{ + evas_object_smart_callback_call(o, "resource,request,new", (void *)request); +} + +/** + * @internal + * Reports that first navigation occurred + * + * @param o Frame. + * + * Emits signal: "navigation,first" + */ +void ewk_frame_did_perform_first_navigation(Evas_Object *o) +{ + evas_object_smart_callback_call(o, "navigation,first", 0); +} + +/** + * @internal + * Reports frame will be saved to current state + * + * @param o Frame. + * @param item History item to save details to. + * + * Emits signal: "state,save" + */ +void ewk_frame_view_state_save(Evas_Object *o, WebCore::HistoryItem* item) +{ + const char *title = ewk_frame_title_get(o); + const char *uri = ewk_frame_uri_get(o); + + item->setTitle(WebCore::String::fromUTF8(title)); + item->setURLString(WebCore::String::fromUTF8(uri)); + + evas_object_smart_callback_call(o, "state,save", 0); +} + +/** + * @internal * Reports the frame started loading something. * * Emits signal: "load,started" with no parameters. @@ -1652,6 +1717,58 @@ void ewk_frame_load_started(Evas_Object* o) /** * @internal + * Reports the frame started provisional load. + * + * @param o Frame. + * + * Emits signal: "load,provisional" with no parameters. + */ +void ewk_frame_load_provisional(Evas_Object* o) +{ + evas_object_smart_callback_call(o, "load,provisional", 0); +} + +/** + * @internal + * Reports the frame finished first layout. + * + * @param o Frame. + * + * Emits signal: "load,firstlayout,finished" with no parameters. + */ +void ewk_frame_load_firstlayout_finished(Evas_Object *o) +{ + evas_object_smart_callback_call(o, "load,firstlayout,finished", 0); +} + +/** + * @internal + * Reports the frame finished first non empty layout. + * + * @param o Frame. + * + * Emits signal: "load,nonemptylayout,finished" with no parameters. + */ +void ewk_frame_load_firstlayout_nonempty_finished(Evas_Object *o) +{ + evas_object_smart_callback_call(o, "load,nonemptylayout,finished", 0); +} + +/** + * @internal + * Reports the loading of a document has finished on frame. + * + * @param o Frame. + * + * Emits signal: "load,document,finished" with no parameters. + */ +void ewk_frame_load_document_finished(Evas_Object *o) +{ + evas_object_smart_callback_call(o, "load,document,finished", 0); +} + +/** + * @internal * Reports load finished, optionally with error information. * * Emits signal: "load,finished" with pointer to Ewk_Frame_Load_Error diff --git a/WebKit/efl/ewk/ewk_frame.h b/WebKit/efl/ewk/ewk_frame.h index c71269b..1a9fe81 100644 --- a/WebKit/efl/ewk/ewk_frame.h +++ b/WebKit/efl/ewk/ewk_frame.h @@ -48,16 +48,28 @@ extern "C" { * * - "title,changed", const char*: title of the main frame changed. * - "uri,changed", const char*: uri of the main frame changed. + * - "load,document,finished", void: loading of a document has + * finished on this frame. + * - "load,nonemptylayout,finished", void: frame finished first + * non-empty layout. * - "load,started", void: frame started loading. * - "load,progress", double*: load progress changed (overall value * from 0.0 to 1.0, connect to individual frames for fine grained). * - "load,finished", const Ewk_Frame_Load_Error*: reports load * finished and as argument @c NULL if successfully or pointer to * structure defining the error. + * - "load,provisional", void: frame started provisional load. + * - "load,firstlayout,finished", void: frame finished first layout. * - "load,error", const Ewk_Frame_Load_Error*: reports load failed * and as argument a pointer to structure defining the error. * - "contents,size,changed", Evas_Coord[2]: reports contents size * changed due new layout, script actions or any other events. + * - "navigation,first", void: first navigation occurred. + * - "resource,request,new", Ewk_Frame_Resource_Request*: reports that + * there's a new resource request. + * - "resource,request,willsend", Ewk_Frame_Resource_Request*: a resource will + * be requested. + * - "state,save", void: frame's state will be saved as a history item. */ @@ -82,6 +94,19 @@ struct _Ewk_Frame_Load_Error { }; /** + * Structure used to report resource requests + * + * Details given before a resource is loaded on a given frame. It's used by + * ewk_frame_request_will_send() to inform the details of a to-be-loaded + * resource, allowing them to be overridden. + */ +typedef struct _Ewk_Frame_Resource_Request Ewk_Frame_Resource_Request; +struct _Ewk_Frame_Resource_Request { + const char *url; /**< url of this resource */ + const unsigned long identifier; /**< resource's identifier. Can not be changed */ +}; + +/** * Structure used to report hit test results. */ typedef struct _Ewk_Hit_Test Ewk_Hit_Test; diff --git a/WebKit/efl/ewk/ewk_private.h b/WebKit/efl/ewk/ewk_private.h index 83eef91..c549ad7 100644 --- a/WebKit/efl/ewk/ewk_private.h +++ b/WebKit/efl/ewk/ewk_private.h @@ -48,85 +48,101 @@ struct ContextMenu; struct ContextMenuItem; } -void ewk_view_ready(Evas_Object *o); -void ewk_view_title_set(Evas_Object *o, const char *title); -void ewk_view_uri_changed(Evas_Object *o); -void ewk_view_load_started(Evas_Object *o); -void ewk_view_frame_main_load_started(Evas_Object *o); -void ewk_view_load_finished(Evas_Object *o, const Ewk_Frame_Load_Error *error); -void ewk_view_load_error(Evas_Object *o, const Ewk_Frame_Load_Error *error); -void ewk_view_load_progress_changed(Evas_Object *o); -Evas_Object *ewk_view_window_create(Evas_Object *o, Eina_Bool javascript, const WebCore::WindowFeatures* coreFeatures); +void ewk_view_ready(Evas_Object *o); +void ewk_view_title_set(Evas_Object *o, const char *title); +void ewk_view_uri_changed(Evas_Object *o); +void ewk_view_load_started(Evas_Object *o); +void ewk_view_load_provisional(Evas_Object *o); +void ewk_view_frame_main_load_started(Evas_Object *o); +void ewk_view_frame_main_cleared(Evas_Object *o); +void ewk_view_frame_main_icon_received(Evas_Object *o); +void ewk_view_load_finished(Evas_Object *o, const Ewk_Frame_Load_Error *error); +void ewk_view_load_error(Evas_Object *o, const Ewk_Frame_Load_Error *error); +void ewk_view_load_progress_changed(Evas_Object *o); +void ewk_view_load_show(Evas_Object* o); +void ewk_view_restore_state(Evas_Object *o, Evas_Object *frame); +Evas_Object *ewk_view_window_create(Evas_Object *o, Eina_Bool javascript, const WebCore::WindowFeatures* coreFeatures); -void ewk_view_mouse_link_hover_in(Evas_Object *o, void *data); -void ewk_view_mouse_link_hover_out(Evas_Object *o); +void ewk_view_mouse_link_hover_in(Evas_Object *o, void *data); +void ewk_view_mouse_link_hover_out(Evas_Object *o); -void ewk_view_toolbars_visible_set(Evas_Object *o, Eina_Bool visible); -void ewk_view_toolbars_visible_get(Evas_Object *o, Eina_Bool *visible); +void ewk_view_toolbars_visible_set(Evas_Object *o, Eina_Bool visible); +void ewk_view_toolbars_visible_get(Evas_Object *o, Eina_Bool *visible); -void ewk_view_statusbar_visible_set(Evas_Object *o, Eina_Bool visible); -void ewk_view_statusbar_visible_get(Evas_Object *o, Eina_Bool *visible); -void ewk_view_statusbar_text_set(Evas_Object *o, const char *text); +void ewk_view_statusbar_visible_set(Evas_Object *o, Eina_Bool visible); +void ewk_view_statusbar_visible_get(Evas_Object *o, Eina_Bool *visible); +void ewk_view_statusbar_text_set(Evas_Object *o, const char *text); -void ewk_view_scrollbars_visible_set(Evas_Object *o, Eina_Bool visible); -void ewk_view_scrollbars_visible_get(Evas_Object *o, Eina_Bool *visible); +void ewk_view_scrollbars_visible_set(Evas_Object *o, Eina_Bool visible); +void ewk_view_scrollbars_visible_get(Evas_Object *o, Eina_Bool *visible); -void ewk_view_menubar_visible_set(Evas_Object *o, Eina_Bool visible); -void ewk_view_menubar_visible_get(Evas_Object *o, Eina_Bool *visible); +void ewk_view_menubar_visible_set(Evas_Object *o, Eina_Bool visible); +void ewk_view_menubar_visible_get(Evas_Object *o, Eina_Bool *visible); -void ewk_view_tooltip_text_set(Evas_Object *o, const char *text); +void ewk_view_tooltip_text_set(Evas_Object *o, const char *text); -void ewk_view_add_console_message(Evas_Object *o, const char *message, unsigned int lineNumber, const char *sourceID); +void ewk_view_add_console_message(Evas_Object *o, const char *message, unsigned int lineNumber, const char *sourceID); -void ewk_view_run_javascript_alert(Evas_Object *o, Evas_Object *frame, const char *message); -Eina_Bool ewk_view_run_javascript_confirm(Evas_Object *o, Evas_Object *frame, const char *message); -Eina_Bool ewk_view_run_javascript_prompt(Evas_Object *o, Evas_Object *frame, const char *message, const char *defaultValue, char **value); -Eina_Bool ewk_view_should_interrupt_javascript(Evas_Object *o); -uint64_t ewk_view_exceeded_database_quota(Evas_Object *o, Evas_Object *frame, const char *databaseName, uint64_t current_size, uint64_t expected_size); +void ewk_view_run_javascript_alert(Evas_Object *o, Evas_Object *frame, const char *message); +Eina_Bool ewk_view_run_javascript_confirm(Evas_Object *o, Evas_Object *frame, const char *message); +Eina_Bool ewk_view_run_javascript_prompt(Evas_Object *o, Evas_Object *frame, const char *message, const char *defaultValue, char **value); +Eina_Bool ewk_view_should_interrupt_javascript(Evas_Object *o); +uint64_t ewk_view_exceeded_database_quota(Evas_Object *o, Evas_Object *frame, const char *databaseName, uint64_t current_size, uint64_t expected_size); -Eina_Bool ewk_view_run_open_panel(Evas_Object *o, Evas_Object *frame, Eina_Bool allows_multiple_files, const Eina_List *suggested_filenames, Eina_List **selected_filenames); +Eina_Bool ewk_view_run_open_panel(Evas_Object *o, Evas_Object *frame, Eina_Bool allows_multiple_files, const Eina_List *suggested_filenames, Eina_List **selected_filenames); -void ewk_view_repaint(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); -void ewk_view_scroll(Evas_Object *o, Evas_Coord dx, Evas_Coord dy, Evas_Coord sx, Evas_Coord sy, Evas_Coord sw, Evas_Coord sh, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch, Eina_Bool main_frame); -WebCore::Page *ewk_view_core_page_get(const Evas_Object *o); +void ewk_view_repaint(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); +void ewk_view_scroll(Evas_Object *o, Evas_Coord dx, Evas_Coord dy, Evas_Coord sx, Evas_Coord sy, Evas_Coord sw, Evas_Coord sh, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch, Eina_Bool main_frame); +WebCore::Page *ewk_view_core_page_get(const Evas_Object *o); WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object *o, Evas_Object *frame, const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WebCore::KURL& url, const WebCore::String& referrer); WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* o, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WebCore::String>& paramNames, const WTF::Vector<WebCore::String>& paramValues, const WebCore::String& mimeType, bool loadManually); -void ewk_view_popup_new(Evas_Object *o, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect); +void ewk_view_popup_new(Evas_Object *o, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect); +void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, float max_scale, float min_scale, float user_scalable); -void ewk_view_download_request(Evas_Object *o, Ewk_Download *download); +void ewk_view_download_request(Evas_Object *o, Ewk_Download *download); -Ewk_History *ewk_history_new(WebCore::BackForwardList *history); -void ewk_history_free(Ewk_History *history); +Ewk_History *ewk_history_new(WebCore::BackForwardList *history); +void ewk_history_free(Ewk_History *history); Ewk_Context_Menu *ewk_context_menu_new(Evas_Object *view, WebCore::ContextMenuController *controller); -Eina_Bool ewk_context_menu_free(Ewk_Context_Menu *o); -void ewk_context_menu_item_append(Ewk_Context_Menu *o, WebCore::ContextMenuItem& core); +Eina_Bool ewk_context_menu_free(Ewk_Context_Menu *o); +void ewk_context_menu_item_append(Ewk_Context_Menu *o, WebCore::ContextMenuItem& core); Ewk_Context_Menu *ewk_context_menu_custom_get(Ewk_Context_Menu *o); -void ewk_context_menu_show(Ewk_Context_Menu *o); +void ewk_context_menu_show(Ewk_Context_Menu *o); Ewk_Window_Features *ewk_window_features_new_from_core(const WebCore::WindowFeatures* core); -Evas_Object *ewk_frame_add(Evas *e); -Eina_Bool ewk_frame_init(Evas_Object *o, Evas_Object *view, WebCore::Frame *frame); -Evas_Object *ewk_frame_child_add(Evas_Object *o, WTF::PassRefPtr<WebCore::Frame> child, const WebCore::String& name, const WebCore::KURL& url, const WebCore::String& referrer); +Evas_Object *ewk_frame_add(Evas *e); +Eina_Bool ewk_frame_init(Evas_Object *o, Evas_Object *view, WebCore::Frame *frame); +Evas_Object *ewk_frame_child_add(Evas_Object *o, WTF::PassRefPtr<WebCore::Frame> child, const WebCore::String& name, const WebCore::KURL& url, const WebCore::String& referrer); -WebCore::Frame *ewk_frame_core_get(const Evas_Object *o); -void ewk_frame_core_gone(Evas_Object *o); +WebCore::Frame *ewk_frame_core_get(const Evas_Object *o); +void ewk_frame_core_gone(Evas_Object *o); -void ewk_frame_load_started(Evas_Object *o); -void ewk_frame_load_finished(Evas_Object *o, const char *error_domain, int error_code, Eina_Bool is_cancellation, const char *error_description, const char *failing_url); -void ewk_frame_load_error(Evas_Object *o, const char *error_domain, int error_code, Eina_Bool is_cancellation, const char *error_description, const char *failing_url); -void ewk_frame_load_progress_changed(Evas_Object *o); +void ewk_frame_load_started(Evas_Object *o); +void ewk_frame_load_provisional(Evas_Object *o); +void ewk_frame_load_firstlayout_finished(Evas_Object *o); +void ewk_frame_load_firstlayout_nonempty_finished(Evas_Object *o); +void ewk_frame_load_document_finished(Evas_Object *o); +void ewk_frame_load_finished(Evas_Object *o, const char *error_domain, int error_code, Eina_Bool is_cancellation, const char *error_description, const char *failing_url); +void ewk_frame_load_error(Evas_Object *o, const char *error_domain, int error_code, Eina_Bool is_cancellation, const char *error_description, const char *failing_url); +void ewk_frame_load_progress_changed(Evas_Object *o); -void ewk_frame_contents_size_changed(Evas_Object *o, Evas_Coord w, Evas_Coord h); -void ewk_frame_title_set(Evas_Object *o, const char *title); +void ewk_frame_request_will_send(Evas_Object *o, Ewk_Frame_Resource_Request *request); +void ewk_frame_request_assign_identifier(Evas_Object *o, const Ewk_Frame_Resource_Request *request); +void ewk_frame_view_state_save(Evas_Object *o, WebCore::HistoryItem* item); -void ewk_frame_view_create_for_view(Evas_Object *o, Evas_Object *view); -Eina_Bool ewk_frame_uri_changed(Evas_Object *o); -void ewk_frame_force_layout(Evas_Object *o); +void ewk_frame_did_perform_first_navigation(Evas_Object *o); + +void ewk_frame_contents_size_changed(Evas_Object *o, Evas_Coord w, Evas_Coord h); +void ewk_frame_title_set(Evas_Object *o, const char *title); + +void ewk_frame_view_create_for_view(Evas_Object *o, Evas_Object *view); +Eina_Bool ewk_frame_uri_changed(Evas_Object *o); +void ewk_frame_force_layout(Evas_Object *o); WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* o, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WebCore::String>& paramNames, const WTF::Vector<WebCore::String>& paramValues, const WebCore::String& mimeType, bool loadManually); diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp index ca26f64..39dc0a7 100644 --- a/WebKit/efl/ewk/ewk_view.cpp +++ b/WebKit/efl/ewk/ewk_view.cpp @@ -102,6 +102,19 @@ struct _Ewk_View_Private_Data { Eina_Bool resizable_textareas:1; Eina_Bool private_browsing:1; Eina_Bool caret_browsing:1; + struct { + float w; + float h; + float init_scale; + float min_scale; + float max_scale; + float user_scalable; + } viewport; + struct { + float min_scale; + float max_scale; + Eina_Bool user_scalable:1; + } zoom_range; } settings; struct { struct { @@ -520,6 +533,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) static_cast<WebCore::InspectorClient*>(new WebCore::InspectorClientEfl), 0, 0, + 0, 0); if (!priv->page) { CRITICAL("Could not create WebKit Page"); @@ -576,6 +590,12 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->settings.private_browsing = priv->page_settings->privateBrowsingEnabled(); priv->settings.caret_browsing = priv->page_settings->caretBrowsingEnabled(); + // Since there's no scale separated from zooming in webkit-efl, this functionality of + // viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl, + // this functionality will be modified by the scale zoom patch. + priv->settings.zoom_range.min_scale = ZOOM_MIN; + priv->settings.zoom_range.max_scale = ZOOM_MAX; + priv->main_frame = _ewk_view_core_frame_new(sd, priv, 0).get(); if (!priv->main_frame) { CRITICAL("Could not create main frame."); @@ -1001,6 +1021,11 @@ void ewk_view_fixed_layout_size_set(Evas_Object* o, Evas_Coord w, Evas_Coord h) { EWK_VIEW_SD_GET_OR_RETURN(o, sd); EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + + WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(priv->main_frame->loader()->client()); + if (!client->getInitLayoutCompleted()) + return; + WebCore::FrameView* view = sd->_priv->main_frame->view(); if (w <= 0 && h <= 0) { if (!priv->fixed_layout.use) @@ -1757,14 +1782,22 @@ float ewk_view_zoom_get(const Evas_Object* o) Eina_Bool ewk_view_zoom_set(Evas_Object* o, float zoom, Evas_Coord cx, Evas_Coord cy) { EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET(sd, priv); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api->zoom_set, EINA_FALSE); - if (zoom < ZOOM_MIN) { - WRN("zoom level is < %f : %f", (double)ZOOM_MIN, (double)zoom); + + if (!priv->settings.zoom_range.user_scalable) { + WRN("userScalable is false"); + return EINA_FALSE; + } + + if (zoom < priv->settings.zoom_range.min_scale) { + WRN("zoom level is < %f : %f", (double)priv->settings.zoom_range.min_scale, (double)zoom); return EINA_FALSE; } - if (zoom > ZOOM_MAX) { - WRN("zoom level is > %f : %f", (double)ZOOM_MAX, (double)zoom); + if (zoom > priv->settings.zoom_range.max_scale) { + WRN("zoom level is > %f : %f", (double)priv->settings.zoom_range.max_scale, (double)zoom); return EINA_FALSE; } @@ -1827,14 +1860,22 @@ void ewk_view_zoom_weak_smooth_scale_set(Evas_Object* o, Eina_Bool smooth_scale) Eina_Bool ewk_view_zoom_weak_set(Evas_Object* o, float zoom, Evas_Coord cx, Evas_Coord cy) { EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET(sd, priv); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api->zoom_weak_set, EINA_FALSE); - if (zoom < ZOOM_MIN) { - WRN("zoom level is < %f : %f", (double)ZOOM_MIN, (double)zoom); + + if (!priv->settings.zoom_range.user_scalable) { + WRN("userScalable is false"); + return EINA_FALSE; + } + + if (zoom < priv->settings.zoom_range.min_scale) { + WRN("zoom level is < %f : %f", (double)priv->settings.zoom_range.min_scale, (double)zoom); return EINA_FALSE; } - if (zoom > ZOOM_MAX) { - WRN("zoom level is > %f : %f", (double)ZOOM_MAX, (double)zoom); + if (zoom > priv->settings.zoom_range.max_scale) { + WRN("zoom level is > %f : %f", (double)priv->settings.zoom_range.max_scale, (double)zoom); return EINA_FALSE; } @@ -1977,12 +2018,17 @@ Eina_Bool ewk_view_zoom_animated_set(Evas_Object* o, float zoom, float duration, EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api->zoom_weak_set, EINA_FALSE); - if (zoom < ZOOM_MIN) { - WRN("zoom level is < %f : %f", (double)ZOOM_MIN, (double)zoom); + if (!priv->settings.zoom_range.user_scalable) { + WRN("userScalable is false"); return EINA_FALSE; } - if (zoom > ZOOM_MAX) { - WRN("zoom level is > %f : %f", (double)ZOOM_MAX, (double)zoom); + + if (zoom < priv->settings.zoom_range.min_scale) { + WRN("zoom level is < %f : %f", (double)priv->settings.zoom_range.min_scale, (double)zoom); + return EINA_FALSE; + } + if (zoom > priv->settings.zoom_range.max_scale) { + WRN("zoom level is > %f : %f", (double)priv->settings.zoom_range.max_scale, (double)zoom); return EINA_FALSE; } @@ -3710,3 +3756,148 @@ void ewk_view_download_request(Evas_Object* o, Ewk_Download* download) DBG("view=%p", o); evas_object_smart_callback_call(o, "download,request", download); } + +/** + * @internal + * Reports the viewport has changed. + * + * @param o view. + * @param w width. + * @param h height. + * @param init_scale initialScale value. + * @param max_scale maximumScale value. + * @param min_scale minimumScale value. + * @param user_scalable userscalable flag. + * + * Emits signal: "viewport,changed" with no parameters. + */ +void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, float max_scale, float min_scale, float user_scalable) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + priv->settings.viewport.w = w; + priv->settings.viewport.h = h; + priv->settings.viewport.init_scale = init_scale; + priv->settings.viewport.min_scale = min_scale; + priv->settings.viewport.max_scale = max_scale; + priv->settings.viewport.user_scalable = user_scalable; + + evas_object_smart_callback_call(o, "viewport,changed", 0); +} + +/** + * Gets data of viewport meta tag. + * + * @param o view. + * @param w width. + * @param h height. + * @param init_scale initial Scale value. + * @param max_scale maximum Scale value. + * @param min_scale minimum Scale value. + * @param user_scalable user Scalable value. + */ +void ewk_view_viewport_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* user_scalable) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + if (w) + *w = priv->settings.viewport.w; + if (h) + *h = priv->settings.viewport.h; + if (init_scale) + *init_scale = priv->settings.viewport.init_scale; + if (max_scale) + *max_scale = priv->settings.viewport.max_scale; + if (min_scale) + *min_scale = priv->settings.viewport.min_scale; + if (user_scalable) + *user_scalable = priv->settings.viewport.user_scalable; +} + +/** + * Sets the zoom range. + * + * @param o view. + * @param min_scale minimum value of zoom range. + * @param max_scale maximum value of zoom range. + * + * @return @c EINA_TRUE if zoom range is changed, @c EINA_FALSE if not or failure. + */ +Eina_Bool ewk_view_zoom_range_set(Evas_Object* o, float min_scale, float max_scale) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + if (max_scale < min_scale) { + WRN("min_scale is larger than max_scale"); + return EINA_FALSE; + } + + priv->settings.zoom_range.min_scale = min_scale; + priv->settings.zoom_range.max_scale = max_scale; + + return EINA_TRUE; +} + +/** + * Gets the minimum value of zoom range. + * + * @param o view. + * + * @return minimum value of zoom range. + */ +float ewk_view_zoom_range_min_get(Evas_Object* o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + return priv->settings.zoom_range.min_scale; +} + +/** + * Gets the maximum value of zoom range. + * + * @param o view. + * + * @return maximum value of zoom range. + */ +float ewk_view_zoom_range_max_get(Evas_Object* o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + return priv->settings.zoom_range.max_scale; +} + +/** + * Sets if zoom is enabled. + * + * @param o view. + * @param user_scalable boolean pointer in which to enable zoom. It defaults + * to @c EINA_TRUE. + */ +void ewk_view_user_scalable_set(Evas_Object* o, Eina_Bool user_scalable) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + priv->settings.zoom_range.user_scalable = user_scalable; +} + +/** + * Gets if zoom is enabled. + * + * @param o view. + * @param user_scalable where to return the current user scalable value. + * + * @return @c EINA_TRUE if zoom is enabled, @c EINA_FALSE if not. + */ +Eina_Bool ewk_view_user_scalable_get(Evas_Object* o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + return priv->settings.zoom_range.user_scalable; +} diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h index a8fe3b8..209beff 100644 --- a/WebKit/efl/ewk/ewk_view.h +++ b/WebKit/efl/ewk/ewk_view.h @@ -85,6 +85,7 @@ extern "C" { * - "download,request", Ewk_Download: reports a download is being requested * and as arguments gives its details. * - "icon,received", void: main frame received an icon. + * - "viewport,changed", void: Report that viewport has changed. */ typedef struct _Ewk_View_Smart_Data Ewk_View_Smart_Data; @@ -453,6 +454,13 @@ EAPI void ewk_view_paint_context_translate(Ewk_View_Paint_Context *ctxt, float x EAPI Eina_Bool ewk_view_paint(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area); EAPI Eina_Bool ewk_view_paint_contents(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area); +EAPI void ewk_view_viewport_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* user_scalable); +EAPI Eina_Bool ewk_view_zoom_range_set(Evas_Object* o, float min_scale, float max_scale); +EAPI float ewk_view_zoom_range_min_get(Evas_Object* o); +EAPI float ewk_view_zoom_range_max_get(Evas_Object* o); +EAPI void ewk_view_user_scalable_set(Evas_Object* o, Eina_Bool user_scalable); +EAPI Eina_Bool ewk_view_user_scalable_get(Evas_Object* o); + #ifdef __cplusplus } #endif diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog index a33506c..cddfac8 100644 --- a/WebKit/gtk/ChangeLog +++ b/WebKit/gtk/ChangeLog @@ -1,3 +1,78 @@ +2010-07-12 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] r63100 broke the testwebview test + https://bugs.webkit.org/show_bug.cgi?id=42114 + + * tests/testwebview.c: Disable a failing assertion in test_webkit_web_view_adjustments + until we can get to the bottom of the failure. + +2010-07-12 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Update for 1.3.3 + + * NEWS: + +2010-07-12 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Fix compilation with sealed GTK+. + + * webkit/webkitwebview.cpp: + (webkit_web_view_drag_motion): + (webkit_web_view_drag_data_received): + (webkit_web_view_drag_drop): + +2010-07-11 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] WebKitWebView should support drops + https://bugs.webkit.org/show_bug.cgi?id=39843 + + Add support for dropping content onto GTK+ WebViews. + + * webkit/webkitprivate.h: + Add a DroppingContext struct to keep track of drop data while the drop is + in progress. Have WebKitWebView keep a map of GdkDragContexts to DroppingContexts. + * webkit/webkitwebview.cpp: Add necessary includes and globalPointForClientPoint helper. + (webkit_web_view_popup_menu_handler): Use globalPointForClientPoint helper. + (webkit_web_view_dispose): Properly clean up droppingContexts member. + (webkit_web_view_finalize): Delete droppingContext member. + (globalPointForClientPoint): Added. + (doDragLeaveLater): Added. + (webkit_web_view_drag_leave): Added. + (webkit_web_view_drag_motion): Added. + (webkit_web_view_drag_data_received): Added. + (webkit_web_view_drag_drop): Added. + (webkit_web_view_class_init): Connect new drop signal handlers to the widget definition. + (webkit_web_view_init): Set up the widget as a drop destination and initialize droppingContexts. + +2010-07-07 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41772 + Add basic piping for BackForwardControllerClient. + + * webkit/webkitwebview.cpp: + (webkit_web_view_init): + +2010-06-19 Ilya Tikhonovsky <loislo@chromium.org> + + Reviewed by Yury Semikhatsky. + + WebInspector: js function name was fixed. + dispatchMessageToFrontend -> dispatchMessageFromBackend. + https://bugs.webkit.org/show_bug.cgi?id=40675 + + * WebCoreSupport/InspectorClientGtk.cpp: + (WebKit::InspectorClient::sendMessageToFrontend): + 2010-06-23 Martin Robinson <mrobinson@igalia.com> Reviewed by Gustavo Noronha Silva. diff --git a/WebKit/gtk/NEWS b/WebKit/gtk/NEWS index eb6d8cc..b99e2a1 100644 --- a/WebKit/gtk/NEWS +++ b/WebKit/gtk/NEWS @@ -1,4 +1,14 @@ ================ +WebKitGTK+ 1.3.3 +================ + +What's new in WebKitGTK+ 1.3.3? + + - Fixes to compile with latest GTK+ 2.90.x. + - Add support for dropping content in WebKitWebViews. + - Many other bugfixes. + +================ WebKitGTK+ 1.3.2 ================ diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp index 4bc3c32..616834b 100644 --- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp @@ -134,7 +134,7 @@ bool InspectorClient::sendMessageToFrontend(const String& message) if (!scriptController) return false; - String dispatchToFrontend("WebInspector.dispatchMessageToFrontend("); + String dispatchToFrontend("WebInspector.dispatchMessageFromBackend("); dispatchToFrontend += message; dispatchToFrontend += ");"; scriptController->executeScript(dispatchToFrontend); diff --git a/WebKit/gtk/tests/testwebview.c b/WebKit/gtk/tests/testwebview.c index 36511d7..0bea643 100644 --- a/WebKit/gtk/tests/testwebview.c +++ b/WebKit/gtk/tests/testwebview.c @@ -266,7 +266,10 @@ static void do_test_webkit_web_view_adjustments(gboolean with_page_cache) g_assert_cmpfloat(lower, ==, gtk_adjustment_get_lower(adjustment)); g_assert_cmpfloat(upper, ==, gtk_adjustment_get_upper(adjustment)); - g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 100.0); + // This assert is temporarily disabled until we fix the following bug: + // https://bugs.webkit.org/show_bug.cgi?id=42114 + // It should be re-enabled ASAP. + // g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 100.0); g_free(effective_uri); g_free(second_uri); diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h index fa74abc..73f9fcc 100644 --- a/WebKit/gtk/webkit/webkitprivate.h +++ b/WebKit/gtk/webkit/webkitprivate.h @@ -48,21 +48,23 @@ #include "ArchiveResource.h" #include "BackForwardList.h" #include "DataObjectGtk.h" -#include <enchant.h> +#include "DragActions.h" +#include "Frame.h" #include "GOwnPtr.h" #include "Geolocation.h" #include "HistoryItem.h" -#include "Settings.h" -#include "Page.h" -#include "Frame.h" #include "InspectorClientGtk.h" #include "IntPoint.h" #include "FrameLoaderClient.h" +#include "Page.h" #include "ResourceHandle.h" #include "ResourceRequest.h" #include "ResourceResponse.h" #include "WindowFeatures.h" #include "SecurityOrigin.h" +#include "Settings.h" +#include <enchant.h> +#include <wtf/OwnPtr.h> #include <wtf/text/CString.h> #include <atk/atk.h> @@ -103,7 +105,16 @@ namespace WebKit { WebKitHitTestResult* kit(const WebCore::HitTestResult&); - WebKit::PasteboardHelperGtk* pasteboardHelperInstance(); + PasteboardHelperGtk* pasteboardHelperInstance(); + + typedef struct DroppingContext_ { + WebKitWebView* webView; + GdkDragContext* gdkContext; + RefPtr<WebCore::DataObjectGtk> dataObject; + WebCore::IntPoint lastMotionPosition; + int pendingDataRequests; + bool dropHappened; + } DroppingContext; } extern "C" { @@ -159,6 +170,7 @@ extern "C" { guint32 previousClickTime; HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> >* draggingDataObjects; + HashMap<GdkDragContext*, WebKit::DroppingContext*>* droppingContexts; }; #define WEBKIT_WEB_FRAME_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate)) diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp index 62997c5..0010a77 100644 --- a/WebKit/gtk/webkit/webkitwebview.cpp +++ b/WebKit/gtk/webkit/webkitwebview.cpp @@ -7,7 +7,7 @@ * Copyright (C) 2008 Gustavo Noronha Silva <gns@gnome.org> * Copyright (C) 2008 Nuanti Ltd. * Copyright (C) 2008, 2009, 2010 Collabora Ltd. - * Copyright (C) 2009 Igalia S.L. + * Copyright (C) 2009, 2010 Igalia S.L. * Copyright (C) 2009 Movial Creative Technologies Inc. * Copyright (C) 2009 Bobby Powers * @@ -52,7 +52,10 @@ #include "Cursor.h" #include "Document.h" #include "DocumentLoader.h" +#include "DragActions.h" #include "DragClientGtk.h" +#include "DragController.h" +#include "DragData.h" #include "EditorClientGtk.h" #include "Editor.h" #include "EventHandler.h" @@ -123,6 +126,7 @@ static const double defaultDPI = 96.0; static WebKitCacheModel cacheModel; +static IntPoint globalPointForClientPoint(GdkWindow* window, const IntPoint& clientPoint); using namespace WebKit; using namespace WebCore; @@ -370,9 +374,6 @@ static gboolean webkit_web_view_popup_menu_handler(GtkWidget* widget) location = IntPoint(rightAligned ? firstRect.right() : firstRect.x(), firstRect.bottom()); } - int x, y; - gdk_window_get_origin(gtk_widget_get_window(GTK_WIDGET(view->hostWindow()->platformPageClient())), &x, &y); - // FIXME: The IntSize(0, -1) is a hack to get the hit-testing to result in the selected element. // Ideally we'd have the position of a context menu event be separate from its target node. location = view->contentsToWindow(location) + IntSize(0, -1); @@ -384,7 +385,7 @@ static gboolean webkit_web_view_popup_menu_handler(GtkWidget* widget) location.setX(contextMenuMargin); else if (location.x() > view->width()) location.setX(view->width() - contextMenuMargin); - IntPoint global = location + IntSize(x, y); + IntPoint global(globalPointForClientPoint(gtk_widget_get_window(widget), location)); PlatformMouseEvent event(location, global, RightButton, MouseEventPressed, 0, false, false, false, false, gtk_get_current_event_time()); @@ -1197,6 +1198,10 @@ static void webkit_web_view_dispose(GObject* object) } priv->draggingDataObjects->clear(); + HashMap<GdkDragContext*, DroppingContext*>::iterator endDroppingContexts = priv->droppingContexts->end(); + for (HashMap<GdkDragContext*, DroppingContext*>::iterator iter = priv->droppingContexts->begin(); iter != endDroppingContexts; ++iter) + delete (iter->second); + priv->droppingContexts->clear(); G_OBJECT_CLASS(webkit_web_view_parent_class)->dispose(object); } @@ -1214,6 +1219,7 @@ static void webkit_web_view_finalize(GObject* object) delete priv->previousClickPoint; delete priv->draggingDataObjects; + delete priv->droppingContexts; G_OBJECT_CLASS(webkit_web_view_parent_class)->finalize(object); } @@ -1309,6 +1315,14 @@ static void webkit_web_view_screen_changed(GtkWidget* widget, GdkScreen* previou settings->setMinimumLogicalFontSize(minimumLogicalFontSize / 72.0 * DPI); } +static IntPoint globalPointForClientPoint(GdkWindow* window, const IntPoint& clientPoint) +{ + int x, y; + gdk_window_get_origin(window, &x, &y); + return clientPoint + IntSize(x, y); +} + + static void webkit_web_view_drag_end(GtkWidget* widget, GdkDragContext* context) { WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); @@ -1360,6 +1374,130 @@ static void webkit_web_view_drag_data_get(GtkWidget* widget, GdkDragContext* con pasteboardHelperInstance()->fillSelectionData(selectionData, info, priv->draggingDataObjects->get(context).get()); } +static gboolean doDragLeaveLater(DroppingContext* context) +{ + WebKitWebView* webView = context->webView; + WebKitWebViewPrivate* priv = webView->priv; + + if (!priv->droppingContexts->contains(context->gdkContext)) + return FALSE; + + // If the view doesn't know about the drag yet (there are still pending data) + // requests, don't update it with information about the drag. + if (context->pendingDataRequests) + return FALSE; + + // Don't call dragExited if we have just received a drag-drop signal. This + // happens in the case of a successful drop onto the view. + if (!context->dropHappened) { + const IntPoint& position = context->lastMotionPosition; + DragData dragData(context->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(GTK_WIDGET(webView)), position), DragOperationNone); + core(webView)->dragController()->dragExited(&dragData); + } + + core(webView)->dragController()->dragEnded(); + priv->droppingContexts->remove(context->gdkContext); + delete context; + return FALSE; +} + +static void webkit_web_view_drag_leave(GtkWidget* widget, GdkDragContext* context, guint time) +{ + WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); + WebKitWebViewPrivate* priv = webView->priv; + + if (!priv->droppingContexts->contains(context)) + return; + + // During a drop GTK+ will fire a drag-leave signal right before firing + // the drag-drop signal. We want the actions for drag-leave to happen after + // those for drag-drop, so schedule them to happen asynchronously here. + g_timeout_add(0, reinterpret_cast<GSourceFunc>(doDragLeaveLater), priv->droppingContexts->get(context)); +} + +static gboolean webkit_web_view_drag_motion(GtkWidget* widget, GdkDragContext* context, gint x, gint y, guint time) +{ + WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); + WebKitWebViewPrivate* priv = webView->priv; + + DroppingContext* droppingContext = 0; + IntPoint position = IntPoint(x, y); + if (!priv->droppingContexts->contains(context)) { + droppingContext = new DroppingContext; + droppingContext->webView = webView; + droppingContext->gdkContext = context; + droppingContext->dataObject = WebCore::DataObjectGtk::create(); + droppingContext->dropHappened = false; + droppingContext->lastMotionPosition = position; + priv->droppingContexts->set(context, droppingContext); + + Vector<GdkAtom> acceptableTargets(pasteboardHelperInstance()->dropAtomsForContext(widget, context)); + droppingContext->pendingDataRequests = acceptableTargets.size(); + for (size_t i = 0; i < acceptableTargets.size(); i++) + gtk_drag_get_data(widget, context, acceptableTargets.at(i), time); + } else { + droppingContext = priv->droppingContexts->get(context); + droppingContext->lastMotionPosition = position; + } + + // Don't send any drag information to WebCore until we've retrieved all + // the data for this drag operation. Otherwise we'd have to block to wait + // for the drag's data. + ASSERT(droppingContext); + if (droppingContext->pendingDataRequests > 0) + return TRUE; + + DragData dragData(droppingContext->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(widget), position), gdkDragActionToDragOperation(gdk_drag_context_get_actions(context))); + DragOperation operation = core(webView)->dragController()->dragUpdated(&dragData); + gdk_drag_status(context, dragOperationToSingleGdkDragAction(operation), time); + + return TRUE; +} + +static void webkit_web_view_drag_data_received(GtkWidget* widget, GdkDragContext* context, gint x, gint y, GtkSelectionData* selectionData, guint info, guint time) +{ + WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); + WebKitWebViewPrivate* priv = webView->priv; + + if (!priv->droppingContexts->contains(context)) + return; + + DroppingContext* droppingContext = priv->droppingContexts->get(context); + droppingContext->pendingDataRequests--; + pasteboardHelperInstance()->fillDataObjectFromDropData(selectionData, info, droppingContext->dataObject.get()); + + if (droppingContext->pendingDataRequests) + return; + + // The coordinates passed to drag-data-received signal are sometimes + // inaccurate in DRT, so use the coordinates of the last motion event. + const IntPoint& position = droppingContext->lastMotionPosition; + + // If there are no more pending requests, start sending dragging data to WebCore. + DragData dragData(droppingContext->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(widget), position), gdkDragActionToDragOperation(gdk_drag_context_get_actions(context))); + DragOperation operation = core(webView)->dragController()->dragEntered(&dragData); + gdk_drag_status(context, dragOperationToSingleGdkDragAction(operation), time); +} + +static gboolean webkit_web_view_drag_drop(GtkWidget* widget, GdkDragContext* context, gint x, gint y, guint time) +{ + WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); + WebKitWebViewPrivate* priv = webView->priv; + + if (!priv->droppingContexts->contains(context)) + return FALSE; + + DroppingContext* droppingContext = priv->droppingContexts->get(context); + droppingContext->dropHappened = true; + + IntPoint position(x, y); + DragData dragData(droppingContext->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(widget), position), gdkDragActionToDragOperation(gdk_drag_context_get_actions(context))); + core(webView)->dragController()->performDrag(&dragData); + + gtk_drag_finish(context, TRUE, FALSE, time); + return TRUE; +} + #if GTK_CHECK_VERSION(2, 12, 0) static gboolean webkit_web_view_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip) { @@ -2356,6 +2494,10 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) widgetClass->screen_changed = webkit_web_view_screen_changed; widgetClass->drag_end = webkit_web_view_drag_end; widgetClass->drag_data_get = webkit_web_view_drag_data_get; + widgetClass->drag_motion = webkit_web_view_drag_motion; + widgetClass->drag_leave = webkit_web_view_drag_leave; + widgetClass->drag_drop = webkit_web_view_drag_drop; + widgetClass->drag_data_received = webkit_web_view_drag_data_received; #if GTK_CHECK_VERSION(2, 12, 0) widgetClass->query_tooltip = webkit_web_view_query_tooltip; #endif @@ -2900,7 +3042,7 @@ static void webkit_web_view_init(WebKitWebView* webView) priv->imContext = gtk_im_multicontext_new(); WebKit::InspectorClient* inspectorClient = new WebKit::InspectorClient(webView); - priv->corePage = new Page(new WebKit::ChromeClient(webView), new WebKit::ContextMenuClient(webView), new WebKit::EditorClient(webView), new WebKit::DragClient(webView), inspectorClient, 0, 0, 0); + priv->corePage = new Page(new WebKit::ChromeClient(webView), new WebKit::ContextMenuClient(webView), new WebKit::EditorClient(webView), new WebKit::DragClient(webView), inspectorClient, 0, 0, 0, 0); // We also add a simple wrapper class to provide the public // interface for the Web Inspector. @@ -2937,6 +3079,9 @@ static void webkit_web_view_init(WebKitWebView* webView) priv->previousClickTime = 0; priv->draggingDataObjects = new HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> >(); + priv->droppingContexts = new HashMap<GdkDragContext*, DroppingContext*>(); + gtk_drag_dest_set(GTK_WIDGET(webView), static_cast<GtkDestDefaults>(0), 0, 0, static_cast<GdkDragAction>(GDK_ACTION_COPY | GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_PRIVATE)); + gtk_drag_dest_set_target_list(GTK_WIDGET(webView), pasteboardHelperInstance()->targetList()); } GtkWidget* webkit_web_view_new(void) diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index c59d8b4..eaed21b 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,145 @@ +2010-07-09 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=13075 + XMLHttpRequest with failed authentication should set status to 401 + + https://bugs.webkit.org/show_bug.cgi?id=6871 + <rdar://problem/3363403> 401 error page is never shown + + * Panels/WebPanelAuthenticationHandler.m: + (-[WebPanelAuthenticationHandler startAuthentication:window:]): Updated a comment - this + code cancels loading, not authentication (canceling authentication means telling to + continue without credentials). + (-[WebPanelAuthenticationHandler _authenticationDoneWithChallenge:result:]): If there were + no credentials provided, tell to continue without any. There may be alternative content + returned with 401. + +2010-07-09 Leon Clarke <leonclarke@google.com> + + Reviewed by Adam Barth. + + add support for link prefetching + https://bugs.webkit.org/show_bug.cgi?id=3652 + + * Configurations/FeatureDefines.xcconfig: + +2010-07-08 Aaron Boodman <aa@chromium.org> + + Reviewed by Timothy Hatcher. + + Add the ability for user scripts and user styles to affect just the top frame. + + https://bugs.webkit.org/show_bug.cgi?id=41529 + + * WebView/WebView.mm: + (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]): + (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]): + (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]): + (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]): + * WebView/WebViewPrivate.h: + +2010-07-08 Adele Peterson <adele@apple.com> + + Reviewed by Jon Honeycutt, Adam Roben, and Darin Adler. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=41721 + <rdar://problem/8158561> Missing plug-in indicator should have a pressed state + + Implement shouldMissingPluginMessageBeButton. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::shouldMissingPluginMessageBeButton): + +2010-07-08 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher. + + <rdar://problem/8136327> - Crash in Entourage calling WebCache method from background thread + + * Misc/WebCache.mm: + (+[WebCache setDisabled:]): Forward the call to the main thread if called from a background thread. + + * Misc/WebNSObjectExtras.h: + * Misc/WebNSObjectExtras.mm: + (+[NSObject _webkit_invokeOnMainThread]): Add a class version of the main thread invoker. + +2010-07-08 Mike Thole <mthole@apple.com> + + Reviewed by Darin Adler. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41896 + Crash under allScriptsInPDFDocument() in WebPDFDocumentExtras.mm for certain PDFs + + * WebView/WebPDFDocumentExtras.mm: + (allScriptsInPDFDocument): Null-check 'data', as CGPDFStreamCopyData() may have returned 0. + +2010-07-08 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41826 + Convert BackForwardList to an abstract base class and add BackForwardListImpl + as the concrete implementation of it. + + * History/WebBackForwardList.mm: + (-[WebBackForwardList init]): + (-[WebBackForwardList setPageCacheSize:]): + (-[WebBackForwardList pageCacheSize]): + +2010-07-07 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41772 + Add basic piping for BackForwardControllerClient. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + +2010-07-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Change requestURL to a KURL. + https://bugs.webkit.org/show_bug.cgi?id=41775 + + * Plugins/WebNetscapePluginStream.h: + (WebNetscapePluginStream::setRequestURL): + * Plugins/WebNetscapePluginStream.mm: + (WebNetscapePluginStream::pluginCancelledConnectionError): + (WebNetscapePluginStream::errorForReason): + (WebNetscapePluginStream::startStream): + (WebNetscapePluginStream::didReceiveResponse): + (WebNetscapePluginStream::destroyStream): + +2010-07-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Rename the WebBaseNetscapePluginStream.cpp and .h files to WebNetscapePluginStream.cpp and .h to match the class name. + + * Plugins/WebNetscapePluginStream.h: Renamed from WebKit/mac/Plugins/WebBaseNetscapePluginStream.h. + * Plugins/WebNetscapePluginStream.mm: Renamed from WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm. + +2010-07-06 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Simon Fraser. + + Expose URL matching from WebUserContentURLPattern + https://bugs.webkit.org/show_bug.cgi?id=41726 + <rdar://problem/7910144> + + We previously had a way to construct WebUserContentURLPattern + instances via WebKit, but no way for callers to perform matching. + This patch adds the matchesURL functionality to allow for this. + + * Misc/WebUserContentURLPattern.h: Added matchesURL. + * Misc/WebUserContentURLPattern.mm: + (-[WebUserContentURLPattern matchesURL:]): Added. Calls through to WebCore::UserContentURLPattern::matches. + 2010-06-23 Philippe Normand <pnormand@igalia.com> Reviewed by Eric Carlson. diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig index 8d2ff72..9a3ec0b 100644 --- a/WebKit/mac/Configurations/FeatureDefines.xcconfig +++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig @@ -31,6 +31,8 @@ // Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature. +ENABLE_LINK_PREFETCH = ; + ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(TARGET_MAC_OS_X_VERSION_MAJOR)); ENABLE_3D_CANVAS_1050 = ENABLE_3D_CANVAS; ENABLE_3D_CANVAS_1060 = ENABLE_3D_CANVAS; @@ -84,4 +86,4 @@ ENABLE_XHTMLMP = ; ENABLE_XPATH = ENABLE_XPATH; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); +FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); diff --git a/WebKit/mac/History/WebBackForwardList.mm b/WebKit/mac/History/WebBackForwardList.mm index 6d9e998..617ee0e 100644 --- a/WebKit/mac/History/WebBackForwardList.mm +++ b/WebKit/mac/History/WebBackForwardList.mm @@ -38,7 +38,7 @@ #import "WebPreferencesPrivate.h" #import "WebTypesInternal.h" #import "WebViewPrivate.h" -#import <WebCore/BackForwardList.h> +#import <WebCore/BackForwardListImpl.h> #import <WebCore/HistoryItem.h> #import <WebCore/Page.h> #import <WebCore/PageCache.h> @@ -109,7 +109,7 @@ WebBackForwardList *kit(BackForwardList* backForwardList) - (id)init { - return [self initWithBackForwardList:BackForwardList::create(0)]; + return [self initWithBackForwardList:BackForwardListImpl::create(0)]; } - (void)dealloc @@ -293,12 +293,14 @@ static bool bumperCarBackForwardHackNeeded() - (void)setPageCacheSize:(NSUInteger)size { - [kit(core(self)->page()) setUsesPageCache:size != 0]; + ASSERT(core(self)->isBackForwardListImpl()); + [kit(static_cast<BackForwardListImpl*>(core(self))->page()) setUsesPageCache:size != 0]; } - (NSUInteger)pageCacheSize { - return [kit(core(self)->page()) usesPageCache] ? pageCache()->capacity() : 0; + ASSERT(core(self)->isBackForwardListImpl()); + return [kit(static_cast<BackForwardListImpl*>(core(self))->page()) usesPageCache] ? pageCache()->capacity() : 0; } - (int)backListCount diff --git a/WebKit/mac/Misc/WebCache.mm b/WebKit/mac/Misc/WebCache.mm index b29f720..747d213 100644 --- a/WebKit/mac/Misc/WebCache.mm +++ b/WebKit/mac/Misc/WebCache.mm @@ -25,6 +25,7 @@ #import "WebCache.h" +#import "WebNSObjectExtras.h" #import "WebPreferences.h" #import "WebSystemInterface.h" #import "WebView.h" @@ -126,6 +127,9 @@ + (void)setDisabled:(BOOL)disabled { + if (!pthread_main_np()) + return [[self _webkit_invokeOnMainThread] setDisabled:disabled]; + WebCore::cache()->setDisabled(disabled); } diff --git a/WebKit/mac/Misc/WebNSObjectExtras.h b/WebKit/mac/Misc/WebNSObjectExtras.h index f327966..0114bcc 100644 --- a/WebKit/mac/Misc/WebNSObjectExtras.h +++ b/WebKit/mac/Misc/WebNSObjectExtras.h @@ -54,5 +54,6 @@ static inline IMP method_setImplementation(Method m, IMP i) #endif @interface NSObject (WebNSObjectExtras) ++ (id)_webkit_invokeOnMainThread; - (id)_webkit_invokeOnMainThread; @end diff --git a/WebKit/mac/Misc/WebNSObjectExtras.mm b/WebKit/mac/Misc/WebNSObjectExtras.mm index 3beb641..d00726b 100644 --- a/WebKit/mac/Misc/WebNSObjectExtras.mm +++ b/WebKit/mac/Misc/WebNSObjectExtras.mm @@ -105,6 +105,11 @@ static bool returnTypeIsObject(NSInvocation *invocation) @implementation NSObject (WebNSObjectExtras) ++ (id)_webkit_invokeOnMainThread +{ + return [[[WebMainThreadInvoker alloc] initWithTarget:self] autorelease]; +} + - (id)_webkit_invokeOnMainThread { return [[[WebMainThreadInvoker alloc] initWithTarget:self] autorelease]; diff --git a/WebKit/mac/Misc/WebUserContentURLPattern.h b/WebKit/mac/Misc/WebUserContentURLPattern.h index 6ec4bcf..e7ccac4 100644 --- a/WebKit/mac/Misc/WebUserContentURLPattern.h +++ b/WebKit/mac/Misc/WebUserContentURLPattern.h @@ -34,5 +34,6 @@ - (NSString *)scheme; - (NSString *)host; - (BOOL)matchesSubdomains; +- (BOOL)matchesURL:(NSURL *)url; @end diff --git a/WebKit/mac/Misc/WebUserContentURLPattern.mm b/WebKit/mac/Misc/WebUserContentURLPattern.mm index 5d9f49e..883f2e6 100644 --- a/WebKit/mac/Misc/WebUserContentURLPattern.mm +++ b/WebKit/mac/Misc/WebUserContentURLPattern.mm @@ -24,6 +24,7 @@ #import "WebUserContentURLPattern.h" +#import <WebCore/KURL.h> #import <WebCore/UserContentURLPattern.h> using namespace WebCore; @@ -80,4 +81,9 @@ using namespace WebCore; return _private->pattern.matchSubdomains(); } +- (BOOL)matchesURL:(NSURL *)url +{ + return _private->pattern.matches(url); +} + @end diff --git a/WebKit/mac/Panels/WebPanelAuthenticationHandler.m b/WebKit/mac/Panels/WebPanelAuthenticationHandler.m index c4c6e5b..694bba5 100644 --- a/WebKit/mac/Panels/WebPanelAuthenticationHandler.m +++ b/WebKit/mac/Panels/WebPanelAuthenticationHandler.m @@ -113,7 +113,7 @@ WebPanelAuthenticationHandler *sharedHandler; // In this case, we have an attached sheet that's not one of our // authentication panels, so enqueing is not an option. Just - // cancel authentication instead, since this case is fairly + // cancel loading instead, since this case is fairly // unlikely (how would you be loading a page if you had an error // sheet up?) if ([w attachedSheet] != nil) { @@ -152,7 +152,7 @@ WebPanelAuthenticationHandler *sharedHandler; } if (credential == nil) { - [[challenge sender] cancelAuthenticationChallenge:challenge]; + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; } else { [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; } diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h b/WebKit/mac/Plugins/WebNetscapePluginStream.h index 8fbe262..8ee9e7f 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h +++ b/WebKit/mac/Plugins/WebNetscapePluginStream.h @@ -36,6 +36,7 @@ #import <wtf/RefCounted.h> #import <wtf/RefPtr.h> #import <wtf/RetainPtr.h> +#import <wtf/text/CString.h> #import "WebNetscapePluginView.h" @@ -71,7 +72,7 @@ public: void cancelLoadAndDestroyStreamWithError(NSError *); - void setRequestURL(NSURL *requestURL) { m_requestURL = requestURL; } + void setRequestURL(const WebCore::KURL& requestURL) { m_requestURL = requestURL; } void start(); void stop(); @@ -89,7 +90,7 @@ private: void deliverDataToFile(NSData *data); void deliverData(); - void startStream(NSURL *, long long expectedContentLength, NSDate *lastModifiedDate, NSString *mimeType, NSData *headers); + void startStream(NSURL *, long long expectedContentLength, NSDate *lastModifiedDate, const WebCore::String& mimeType, NSData *headers); NSError *pluginCancelledConnectionError() const; @@ -99,9 +100,9 @@ private: bool wantsAllStreams() const; RetainPtr<NSMutableData> m_deliveryData; - RetainPtr<NSURL> m_requestURL; + WebCore::KURL m_requestURL; RetainPtr<NSURL> m_responseURL; - RetainPtr<NSString> m_mimeType; + CString m_mimeType; NPP m_plugin; uint16_t m_transferMode; diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm b/WebKit/mac/Plugins/WebNetscapePluginStream.mm index 07d1d4f..5c1e8ee 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginStream.mm @@ -27,7 +27,7 @@ */ #if ENABLE(NETSCAPE_PLUGIN_API) -#import "WebBaseNetscapePluginStream.h" +#import "WebNetscapePluginStream.h" #import "WebNetscapePluginView.h" #import "WebFrameInternal.h" @@ -102,10 +102,10 @@ NPReason WebNetscapePluginStream::reasonForError(NSError *error) NSError *WebNetscapePluginStream::pluginCancelledConnectionError() const { return [[[NSError alloc] _initWithPluginErrorCode:WebKitErrorPlugInCancelledConnection - contentURL:m_responseURL ? m_responseURL.get() : m_requestURL.get() + contentURL:m_responseURL ? m_responseURL.get() : (NSURL *)m_requestURL pluginPageURL:nil pluginName:[[m_pluginView.get() pluginPackage] pluginInfo].name - MIMEType:m_mimeType.get()] autorelease]; + MIMEType:(NSString *)String::fromUTF8(m_mimeType.data(), m_mimeType.length())] autorelease]; } NSError *WebNetscapePluginStream::errorForReason(NPReason reason) const @@ -116,7 +116,7 @@ NSError *WebNetscapePluginStream::errorForReason(NPReason reason) const if (reason == NPRES_USER_BREAK) return [NSError _webKitErrorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled - URL:m_responseURL ? m_responseURL.get() : m_requestURL.get()]; + URL:m_responseURL ? m_responseURL.get() : (NSURL *)m_requestURL]; return pluginCancelledConnectionError(); } @@ -209,12 +209,12 @@ void WebNetscapePluginStream::setPlugin(NPP plugin) } } -void WebNetscapePluginStream::startStream(NSURL *url, long long expectedContentLength, NSDate *lastModifiedDate, NSString *mimeType, NSData *headers) +void WebNetscapePluginStream::startStream(NSURL *url, long long expectedContentLength, NSDate *lastModifiedDate, const String& mimeType, NSData *headers) { ASSERT(!m_isTerminated); m_responseURL = url; - m_mimeType = mimeType; + m_mimeType = mimeType.utf8(); free((void *)m_stream.url); m_stream.url = strdup([m_responseURL.get() _web_URLCString]); @@ -243,10 +243,10 @@ void WebNetscapePluginStream::startStream(NSURL *url, long long expectedContentL NPError npErr; { PluginStopDeferrer deferrer(m_pluginView.get()); - npErr = m_pluginFuncs->newstream(m_plugin, (char *)[m_mimeType.get() UTF8String], &m_stream, NO, &m_transferMode); + npErr = m_pluginFuncs->newstream(m_plugin, m_mimeType.mutableData(), &m_stream, NO, &m_transferMode); } - LOG(Plugins, "NPP_NewStream URL=%@ MIME=%@ error=%d", m_responseURL.get(), m_mimeType.get(), npErr); + LOG(Plugins, "NPP_NewStream URL=%@ MIME=%s error=%d", m_responseURL.get(), m_mimeType.data(), npErr); if (npErr != NPERR_NO_ERROR) { LOG_ERROR("NPP_NewStream failed with error: %d responseURL: %@", npErr, m_responseURL.get()); @@ -350,7 +350,7 @@ void WebNetscapePluginStream::didReceiveResponse(NetscapePlugInStreamLoader*, co // startStreamResponseURL:... will null-terminate. } - startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), [r MIMEType], theHeaders); + startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), response.mimeType(), theHeaders); } void WebNetscapePluginStream::startStreamWithResponse(NSURLResponse *response) @@ -440,8 +440,8 @@ void WebNetscapePluginStream::destroyStream() if (m_sendNotification) { // NPP_URLNotify expects the request URL, not the response URL. PluginStopDeferrer deferrer(m_pluginView.get()); - m_pluginFuncs->urlnotify(m_plugin, [m_requestURL.get() _web_URLCString], m_reason, m_notifyData); - LOG(Plugins, "NPP_URLNotify requestURL=%@ reason=%d", m_requestURL.get(), m_reason); + m_pluginFuncs->urlnotify(m_plugin, m_requestURL.string().utf8().data(), m_reason, m_notifyData); + LOG(Plugins, "NPP_URLNotify requestURL=%@ reason=%d", (NSURL *)m_requestURL, m_reason); } m_isTerminated = true; diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm index f062f7c..10a3187 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm @@ -30,7 +30,6 @@ #import "WebNetscapePluginView.h" -#import "WebBaseNetscapePluginStream.h" #import "WebDataSourceInternal.h" #import "WebDefaultUIDelegate.h" #import "WebFrameInternal.h" @@ -49,6 +48,7 @@ #import "WebNetscapeContainerCheckPrivate.h" #import "WebNetscapePluginEventHandler.h" #import "WebNetscapePluginPackage.h" +#import "WebNetscapePluginStream.h" #import "WebPluginContainerCheck.h" #import "WebPluginRequest.h" #import "WebPreferences.h" diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h index 5587a8d..ea59c4d 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.h +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h @@ -105,6 +105,7 @@ public: virtual void setStatusbarText(const WebCore::String&); virtual void scrollbarsModeDidChange() const { } + virtual bool shouldMissingPluginMessageBeButton() const; virtual void missingPluginButtonClicked(WebCore::Element*) const; virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags); diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm index e426f05..3bf310a 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm @@ -516,6 +516,11 @@ void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView*) co // End host window methods. +bool WebChromeClient::shouldMissingPluginMessageBeButton() const +{ + return [[m_webView UIDelegate] respondsToSelector:@selector(webView:didPressMissingPluginButton:)]; +} + void WebChromeClient::missingPluginButtonClicked(Element* element) const { CallUIDelegate(m_webView, @selector(webView:didPressMissingPluginButton:), kit(element)); diff --git a/WebKit/mac/WebView/WebPDFDocumentExtras.mm b/WebKit/mac/WebView/WebPDFDocumentExtras.mm index b7043df..7651dba 100644 --- a/WebKit/mac/WebView/WebPDFDocumentExtras.mm +++ b/WebKit/mac/WebView/WebPDFDocumentExtras.mm @@ -112,6 +112,8 @@ NSArray *allScriptsInPDFDocument(PDFDocument *document) if (CGPDFDictionaryGetStream(javaScriptAction, "JS", &stream)) { CGPDFDataFormat format; data.adoptCF(CGPDFStreamCopyData(stream, &format)); + if (!data) + continue; bytes = CFDataGetBytePtr(data.get()); length = CFDataGetLength(data.get()); } else if (CGPDFDictionaryGetString(javaScriptAction, "JS", &string)) { diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm index ada00b5..6d61453 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -675,8 +675,7 @@ static bool shouldEnableLoadDeferring() #else WebGeolocationControllerClient* geolocationControllerClient = 0; #endif - DeviceOrientationClient* deviceOrientationClient = 0; - _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), geolocationControllerClient, deviceOrientationClient); + _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), geolocationControllerClient, 0, 0); _private->page->setCanStartMedia([self window]); _private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]); @@ -2363,7 +2362,16 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns) } + (void)_addUserScriptToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url - whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime + whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist + injectionTime:(WebUserScriptInjectionTime)injectionTime +{ + [WebView _addUserScriptToGroup:groupName world:world source:source url:url whitelist:whitelist blacklist:blacklist injectionTime:injectionTime injectedFrames:WebInjectInAllFrames]; +} + ++ (void)_addUserScriptToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url + whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist + injectionTime:(WebUserScriptInjectionTime)injectionTime + injectedFrames:(WebUserContentInjectedFrames)injectedFrames { String group(groupName); if (group.isEmpty()) @@ -2374,11 +2382,19 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns) return; pageGroup->addUserScriptToWorld(core(world), source, url, toStringVector(whitelist), toStringVector(blacklist), - injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd); + injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd, + injectedFrames == WebInjectInAllFrames ? InjectInAllFrames : InjectInTopFrameOnly); +} + ++ (void)_addUserStyleSheetToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url + whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist +{ + [WebView _addUserStyleSheetToGroup:groupName world:world source:source url:url whitelist:whitelist blacklist:blacklist injectedFrames:WebInjectInAllFrames]; } + (void)_addUserStyleSheetToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist + injectedFrames:(WebUserContentInjectedFrames)injectedFrames { String group(groupName); if (group.isEmpty()) @@ -2388,7 +2404,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns) if (!pageGroup) return; - pageGroup->addUserStyleSheetToWorld(core(world), source, url, toStringVector(whitelist), toStringVector(blacklist)); + pageGroup->addUserStyleSheetToWorld(core(world), source, url, toStringVector(whitelist), toStringVector(blacklist), injectedFrames == WebInjectInAllFrames ? InjectInAllFrames : InjectInTopFrameOnly); } + (void)_removeUserScriptFromGroup:(NSString *)groupName world:(WebScriptWorld *)world url:(NSURL *)url diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h index cedc62c..9d47a4d 100644 --- a/WebKit/mac/WebView/WebViewPrivate.h +++ b/WebKit/mac/WebView/WebViewPrivate.h @@ -88,6 +88,11 @@ typedef enum { WebInjectAtDocumentEnd, } WebUserScriptInjectionTime; +typedef enum { + WebInjectInAllFrames, + WebInjectInTopFrameOnly +} WebUserContentInjectedFrames; + @interface WebController : NSTreeController { IBOutlet WebView *webView; } @@ -504,8 +509,12 @@ Could be worth adding to the API. // Removes all white list entries created with _addOriginAccessWhitelistEntryWithSourceOrigin. + (void)_resetOriginAccessWhitelists; +// FIXME: The following two methods are deprecated in favor of the overloads below that take the WebUserContentInjectedFrames argument. https://bugs.webkit.org/show_bug.cgi?id=41800. + (void)_addUserScriptToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime; + (void)_addUserStyleSheetToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist; + ++ (void)_addUserScriptToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime injectedFrames:(WebUserContentInjectedFrames)injectedFrames; ++ (void)_addUserStyleSheetToGroup:(NSString *)groupName world:(WebScriptWorld *)world source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectedFrames:(WebUserContentInjectedFrames)injectedFrames; + (void)_removeUserScriptFromGroup:(NSString *)groupName world:(WebScriptWorld *)world url:(NSURL *)url; + (void)_removeUserStyleSheetFromGroup:(NSString *)groupName world:(WebScriptWorld *)world url:(NSURL *)url; + (void)_removeUserScriptsFromGroup:(NSString *)groupName world:(WebScriptWorld *)world; diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp index c4cb597..d1741ca 100644 --- a/WebKit/qt/Api/qwebframe.cpp +++ b/WebKit/qt/Api/qwebframe.cpp @@ -621,9 +621,10 @@ static inline QUrl ensureAbsoluteUrl(const QUrl &url) void QWebFrame::setUrl(const QUrl &url) { - d->frame->loader()->writer()->begin(ensureAbsoluteUrl(url)); + const QUrl absolute = ensureAbsoluteUrl(url); + d->frame->loader()->writer()->begin(absolute); d->frame->loader()->writer()->end(); - load(ensureAbsoluteUrl(url)); + load(absolute); } QUrl QWebFrame::url() const @@ -714,7 +715,8 @@ QWebPage *QWebFrame::page() const */ void QWebFrame::load(const QUrl &url) { - load(QNetworkRequest(ensureAbsoluteUrl(url))); + // The load() overload ensures that the url is absolute. + load(QNetworkRequest(url)); } /*! diff --git a/WebKit/qt/Api/qwebhistory.cpp b/WebKit/qt/Api/qwebhistory.cpp index a6f3d0c..55305c9 100644 --- a/WebKit/qt/Api/qwebhistory.cpp +++ b/WebKit/qt/Api/qwebhistory.cpp @@ -22,6 +22,7 @@ #include "qwebhistory_p.h" #include "qwebframe_p.h" +#include "BackForwardListImpl.h" #include "PlatformString.h" #include "Image.h" #include "KURL.h" @@ -259,7 +260,7 @@ void QWebHistory::clear() WebCore::BackForwardList* lst = d->lst; //clear visited links - WebCore::Page* page = lst->page(); + WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(lst)->page(); if (page && page->groupPtr()) page->groupPtr()->removeVisitedLinks(); @@ -363,7 +364,7 @@ bool QWebHistory::canGoForward() const void QWebHistory::back() { if (canGoBack()) { - WebCore::Page* page = d->lst->page(); + WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page(); page->goToItem(d->lst->backItem(), WebCore::FrameLoadTypeIndexedBackForward); } } @@ -377,7 +378,7 @@ void QWebHistory::back() void QWebHistory::forward() { if (canGoForward()) { - WebCore::Page* page = d->lst->page(); + WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page(); page->goToItem(d->lst->forwardItem(), WebCore::FrameLoadTypeIndexedBackForward); } } @@ -389,7 +390,7 @@ void QWebHistory::forward() */ void QWebHistory::goToItem(const QWebHistoryItem &item) { - WebCore::Page* page = d->lst->page(); + WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page(); page->goToItem(item.d->item, WebCore::FrameLoadTypeIndexedBackForward); } @@ -538,7 +539,7 @@ QDataStream& operator>>(QDataStream& source, QWebHistory& history) } d->lst->removeItem(nullItem); // Update the HistoryController. - history.d->lst->page()->mainFrame()->loader()->history()->setCurrentItem(history.d->lst->entries()[currentIndex].get()); + static_cast<WebCore::BackForwardListImpl*>(history.d->lst)->page()->mainFrame()->loader()->history()->setCurrentItem(history.d->lst->entries()[currentIndex].get()); history.goToItem(history.itemAt(currentIndex)); } } @@ -550,7 +551,7 @@ QDataStream& operator>>(QDataStream& source, QWebHistory& history) QWebPagePrivate* QWebHistoryPrivate::page() { - return QWebFramePrivate::kit(lst->page()->mainFrame())->page()->handle(); + return QWebFramePrivate::kit(static_cast<WebCore::BackForwardListImpl*>(lst)->page()->mainFrame())->page()->handle(); } WebCore::HistoryItem* QWebHistoryItemPrivate::core(QWebHistoryItem* q) diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp index eab909c..35219a9 100644 --- a/WebKit/qt/Api/qwebpage.cpp +++ b/WebKit/qt/Api/qwebpage.cpp @@ -218,9 +218,6 @@ const char* QWebPagePrivate::editorCommandForWebActions(QWebPage::WebAction acti return 0; } -// If you change this make sure to also adjust the docs for QWebPage::userAgentForUrl -#define WEBKIT_VERSION "527+" - static inline DragOperation dropActionToDragOp(Qt::DropActions actions) { unsigned result = 0; @@ -275,7 +272,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq) contextMenuClient = new ContextMenuClientQt(); editorClient = new EditorClientQt(q); page = new Page(chromeClient, contextMenuClient, editorClient, - new DragClientQt(q), new InspectorClientQt(q), 0, 0, 0); + new DragClientQt(q), new InspectorClientQt(q), 0, 0, 0, 0); settings = new QWebSettings(page->settings()); @@ -3590,7 +3587,7 @@ QString QWebPage::userAgentForUrl(const QUrl&) const firstPartTemp += QString::fromLatin1("Sun Solaris"); #elif defined Q_OS_ULTRIX firstPartTemp += QString::fromLatin1("DEC Ultrix"); -#elif defined Q_WS_S60 +#elif defined Q_OS_SYMBIAN firstPartTemp += QLatin1Char(' '); QSysInfo::S60Version s60Version = QSysInfo::s60Version(); switch (s60Version) { diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp index ff7c101..4ba6943 100644 --- a/WebKit/qt/Api/qwebsettings.cpp +++ b/WebKit/qt/Api/qwebsettings.cpp @@ -80,11 +80,20 @@ public: typedef QHash<int, QPixmap> WebGraphicHash; Q_GLOBAL_STATIC(WebGraphicHash, _graphics) +static void earlyClearGraphics() +{ + _graphics()->clear(); +} + static WebGraphicHash* graphics() { WebGraphicHash* hash = _graphics(); if (hash->isEmpty()) { + + // prevent ~QPixmap running after ~QApplication (leaks native pixmaps) + qAddPostRoutine(earlyClearGraphics); + hash->insert(QWebSettings::MissingImageGraphic, QPixmap(QLatin1String(":webkit/resources/missingImage.png"))); hash->insert(QWebSettings::MissingPluginGraphic, QPixmap(QLatin1String(":webkit/resources/nullPlugin.png"))); hash->insert(QWebSettings::DefaultFrameIconGraphic, QPixmap(QLatin1String(":webkit/resources/urlIcon.png"))); diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog index 2a649f6..e67abca 100644 --- a/WebKit/qt/ChangeLog +++ b/WebKit/qt/ChangeLog @@ -1,3 +1,205 @@ +2010-07-09 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Laszlo Gombos. + + NotificationPresenter needs a cancelRequestPermission API + https://bugs.webkit.org/show_bug.cgi?id=41783 + + Updated NotificationPresenter API to use ScriptExecutionContext instead of origin + and added a new NotificationPresenter::cancelRequestsForPermission API. + The new API will be implemented in a followup patch. + + * WebCoreSupport/NotificationPresenterClientQt.cpp: + (WebCore::NotificationPresenterClientQt::requestPermission): + (WebCore::NotificationPresenterClientQt::checkPermission): + (WebCore::NotificationPresenterClientQt::cancelRequestsForPermission): + * WebCoreSupport/NotificationPresenterClientQt.h: + +2010-07-09 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Skip test that never terminates on maemo5 + + Due to https://bugs.webkit.org/show_bug.cgi?id=38538 + the tst_QWebPage::infiniteLoopJS() autotest never terminates. + Skip the test so that the test case may run to completion. + + Patch by Dominik Holland <dominik.holland@nokia.com> + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::infiniteLoopJS): + +2010-07-09 Simon Hausmann <simon.hausmann@nokia.com> + + Unreviewed trivial Symbian build fix. + + [Qt] Fix the Symbian build when compiling without S60 + + Use Q_OS_SYMBIAN instead of Q_WS_S60 for the user agent + determination. + + * Api/qwebpage.cpp: + (QWebPage::userAgentForUrl): + +2010-07-09 Kristian Amlie <kristian.amlie@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fixed Qt symbian/linux-armcc mkspec when configured with -qtlibinfix. + + * declarative/declarative.pro: Use QT_LIBINFIX. + +2010-07-09 Anders Bakken <agbakken@gmail.com> + + Reviewed by Simon Hausmann. + + [Qt] Remove superfluous function calls + https://bugs.webkit.org/show_bug.cgi?id=40353 + + QWebFrame::setUrl() calls ensureAbsoluteUrl() twice. It's better to + store a local variable and reuse this one. + + QWebFrame::load(QUrl) calls QWebFrame::load(QNetworkRequest) which in + turn will get the QUrl from the request and make sure it's absolute by + calling ensureAbsoluteUrl() on it. + + * Api/qwebframe.cpp: + (QWebFrame::setUrl): + (QWebFrame::load): + +2010-07-08 Sam Magnuson <smagnuson@netflix.com> + + Reviewed by Simon Hausmann. + + [Qt] instance objects created for QObjects are somtimes GC'd + https://bugs.webkit.org/show_bug.cgi?id=40352 + + Improved the test to check for jsObjects that that are garbage collected. + + * tests/qwebframe/tst_qwebframe.cpp: + (tst_QWebFrame::): + +2010-07-08 Aaron Boodman <aa@chromium.org> + + Unreviewed change to fix qt build after c62876. + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::addUserStyleSheet): + +2010-07-07 Robert Hogan <robert@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Add DRT support for pageProperty etc. + + https://bugs.webkit.org/show_bug.cgi?id=41584 + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::isPageBoxVisible): + (DumpRenderTreeSupportQt::pageSizeAndMarginsInPixels): + (DumpRenderTreeSupportQt::pageProperty): + (DumpRenderTreeSupportQt::addUserStyleSheet): + * WebCoreSupport/DumpRenderTreeSupportQt.h: + +2010-07-08 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41826 + Convert BackForwardList to an abstract base class and add BackForwardListImpl + as the concrete implementation of it. + + * Api/qwebhistory.cpp: + (QWebHistory::clear): + (QWebHistory::back): + (QWebHistory::forward): + (QWebHistory::goToItem): + (operator>>): + (QWebHistoryPrivate::page): + +2010-07-08 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Remove unused WEBKIT_VERSION define from qwebpage.cpp + + We now use qWebKitVersion() + + * Api/qwebpage.cpp: + +2010-07-07 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41772 + Add basic piping for BackForwardControllerClient. + + * Api/qwebpage.cpp: + (QWebPagePrivate::QWebPagePrivate): + +2010-07-07 Marc Mutz <marc.mutz@kdab.com> + + Reviewed by Adam Barth. + + [Qt] QWebSettings: Don't leak native pixmaps + + When Q_GLOBAL_STATIC gets around to deleting the QHash with the + pixmaps in, the QApplication destructor has already been + completed. This makes it impossible for ~QPixmap to return the + native pixmap to the OS, thus leaking them. + + This patch adds a post routine (executed as part of ~QApplication) + that clears the hash so Q_GLOBAL_STATIC's destruction doesn't have + to execute ~QPixmap's anymore. + + https://bugs.webkit.org/show_bug.cgi?id=41657 + + * Api/qwebsettings.cpp: + (earlyClearGraphics): New. Clears the pixmap hash. + (graphics): add earlyClearGraphics as a qAddPostRoutine() + +2010-07-06 Csaba Osztrogonác <ossy@webkit.org> + + Rubber-stamped by Kenneth Rohde Christiansen. + + Client errors should set "WebKitErrorDomain" domain instead of "WebKit" to match Mac. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::blockedError): + (WebCore::FrameLoaderClientQt::cannotShowURLError): + (WebCore::FrameLoaderClientQt::interruptForPolicyChangeError): + (WebCore::FrameLoaderClientQt::cannotShowMIMETypeError): + +2010-07-06 Darin Adler <darin@apple.com> + + Fix crash caused by my fix to the Qt build. + + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorFrontendClientQt::closeWindow): Release pointer into + a local OwnPtr instead of calling clear. Another fix, probably better, + would be to change OwnPtr::clear to zero out the pointer before deleting, + but that affects many more call sites, so I will do that separately. + +2010-07-06 Darin Adler <darin@apple.com> + + Fix Qt build. + + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorFrontendClientQt::closeWindow): Call clear instead of + calling delete on the result of leakPtr. + +2010-06-19 Ilya Tikhonovsky <loislo@chromium.org> + + Reviewed by Yury Semikhatsky. + + WebInspector: js function name was fixed. + dispatchMessageToFrontend -> dispatchMessageFromBackend. + https://bugs.webkit.org/show_bug.cgi?id=40675 + + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorClientQt::sendMessageToFrontend): + 2010-07-03 Robert Hogan <robert@webkit.org> Reviewed by Kenneth Rohde Christiansen. diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp index 09dec71..99f5653 100644 --- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp +++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp @@ -669,6 +669,30 @@ void DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(QWebFrame* frame, in proxy->executeScriptInWorld(scriptWorld->world(), script, true); } +bool DumpRenderTreeSupportQt::isPageBoxVisible(QWebFrame* frame, int pageIndex) +{ + WebCore::Frame* coreFrame = QWebFramePrivate::core(frame); + return coreFrame->document()->isPageBoxVisible(pageIndex); +} + +QString DumpRenderTreeSupportQt::pageSizeAndMarginsInPixels(QWebFrame* frame, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft) +{ + WebCore::Frame* coreFrame = QWebFramePrivate::core(frame); + return PrintContext::pageSizeAndMarginsInPixels(coreFrame, pageIndex, width, height, + marginTop, marginRight, marginBottom, marginLeft); +} + +QString DumpRenderTreeSupportQt::pageProperty(QWebFrame* frame, const QString& propertyName, int pageNumber) +{ + WebCore::Frame* coreFrame = QWebFramePrivate::core(frame); + return PrintContext::pageProperty(coreFrame, propertyName.toUtf8().constData(), pageNumber); +} + +void DumpRenderTreeSupportQt::addUserStyleSheet(QWebPage* page, const QString& sourceCode) +{ + page->handle()->page->group().addUserStyleSheetToWorld(mainThreadNormalWorld(), sourceCode, QUrl(), 0, 0, WebCore::InjectInAllFrames); +} + // Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame) diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h index 304e65b..2ff1fc8 100644 --- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h +++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h @@ -135,6 +135,13 @@ public: static bool shouldClose(QWebFrame* frame); static void setCustomPolicyDelegate(bool enabled, bool permissive); + + static bool isPageBoxVisible(QWebFrame* frame, int pageIndex); + + static QString pageSizeAndMarginsInPixels(QWebFrame* frame, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft); + static QString pageProperty(QWebFrame* frame, const QString& propertyName, int pageNumber); + static void addUserStyleSheet(QWebPage* page, const QString& sourceCode); + }; #endif diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index db731d8..0348251 100644 --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -834,26 +834,26 @@ enum { WebCore::ResourceError FrameLoaderClientQt::blockedError(const WebCore::ResourceRequest& request) { - return ResourceError("WebKit", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(), + return ResourceError("WebKitErrorDomain", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(), QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8)); } WebCore::ResourceError FrameLoaderClientQt::cannotShowURLError(const WebCore::ResourceRequest& request) { - return ResourceError("WebKit", WebKitErrorCannotShowURL, request.url().string(), + return ResourceError("WebKitErrorDomain", WebKitErrorCannotShowURL, request.url().string(), QCoreApplication::translate("QWebFrame", "Cannot show URL", 0, QCoreApplication::UnicodeUTF8)); } WebCore::ResourceError FrameLoaderClientQt::interruptForPolicyChangeError(const WebCore::ResourceRequest& request) { - return ResourceError("WebKit", WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(), + return ResourceError("WebKitErrorDomain", WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(), QCoreApplication::translate("QWebFrame", "Frame load interrupted by policy change", 0, QCoreApplication::UnicodeUTF8)); } WebCore::ResourceError FrameLoaderClientQt::cannotShowMIMETypeError(const WebCore::ResourceResponse& response) { - return ResourceError("WebKit", WebKitErrorCannotShowMIMEType, response.url().string(), + return ResourceError("WebKitErrorDomain", WebKitErrorCannotShowMIMEType, response.url().string(), QCoreApplication::translate("QWebFrame", "Cannot show mimetype", 0, QCoreApplication::UnicodeUTF8)); } diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp index fde0556..2cc7e50 100644 --- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp @@ -184,7 +184,7 @@ bool InspectorClientQt::sendMessageToFrontend(const String& message) if (!scriptController) return false; - String dispatchToFrontend("WebInspector.dispatchMessageToFrontend("); + String dispatchToFrontend("WebInspector.dispatchMessageFromBackend("); dispatchToFrontend += message; dispatchToFrontend += ");"; scriptController->executeScript(dispatchToFrontend); @@ -260,7 +260,7 @@ void InspectorFrontendClientQt::closeWindow() m_inspectorClient->releaseFrontendPage(); // Clear pointer before deleting WebView to avoid recursive calls to its destructor. - delete m_inspectorView.release(); + OwnPtr<QWebView> inspectorView = m_inspectorView.release(); } void InspectorFrontendClientQt::attachWindow() diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp index c90b3b5..a037592 100644 --- a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp @@ -37,6 +37,7 @@ #include "EventNames.h" #include "KURL.h" #include "QtPlatformPlugin.h" +#include "ScriptExecutionContext.h" #include "SecurityOrigin.h" #include "qwebkitglobal.h" @@ -252,12 +253,12 @@ void NotificationPresenterClientQt::notificationObjectDestroyed(Notification* no delete m_notifications.take(notification); } -void NotificationPresenterClientQt::requestPermission(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback) +void NotificationPresenterClientQt::requestPermission(ScriptExecutionContext* context, PassRefPtr<VoidCallback> callback) { if (dumpNotification) - printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n", QString(origin->toString()).toUtf8().constData()); + printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n", QString(context->securityOrigin()->toString()).toUtf8().constData()); - QString originString = origin->toString(); + QString originString = context->securityOrigin()->toString(); QHash<QString, QList<RefPtr<VoidCallback> > >::iterator iter = m_pendingPermissionRequests.find(originString); if (iter != m_pendingPermissionRequests.end()) iter.value().append(callback); @@ -271,10 +272,10 @@ void NotificationPresenterClientQt::requestPermission(SecurityOrigin* origin, Pa } } -NotificationPresenter::Permission NotificationPresenterClientQt::checkPermission(const KURL& url) +NotificationPresenter::Permission NotificationPresenterClientQt::checkPermission(ScriptExecutionContext* context) { NotificationPermission permission = NotificationNotAllowed; - QString origin = url.string(); + QString origin = context->url().string(); if (checkPermissionFunction) checkPermissionFunction(m_receiver, origin, permission); switch (permission) { @@ -289,6 +290,12 @@ NotificationPresenter::Permission NotificationPresenterClientQt::checkPermission return NotificationPresenter::PermissionNotAllowed; } +void NotificationPresenterClientQt::cancelRequestsForPermission(ScriptExecutionContext*) +{ + // FIXME: This will be implemented for https://bugs.webkit.org/show_bug.cgi?id=41413 + // to avoid adding and removing new private API +} + void NotificationPresenterClientQt::allowNotificationForOrigin(const QString& origin) { QHash<QString, QList<RefPtr<VoidCallback> > >::iterator iter = m_pendingPermissionRequests.find(origin); diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h index 82c5f7c..b99393b 100644 --- a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h +++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h @@ -45,7 +45,7 @@ namespace WebCore { class Document; -class KURL; +class ScriptExecutionContext; class NotificationWrapper : public QObject, public QWebNotificationData { Q_OBJECT @@ -84,8 +84,9 @@ public: virtual bool show(Notification*); virtual void cancel(Notification*); virtual void notificationObjectDestroyed(Notification*); - virtual void requestPermission(SecurityOrigin*, PassRefPtr<VoidCallback>); - virtual NotificationPresenter::Permission checkPermission(const KURL&); + virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>); + virtual NotificationPresenter::Permission checkPermission(ScriptExecutionContext*); + virtual void cancelRequestsForPermission(ScriptExecutionContext*); void cancel(NotificationWrapper*); diff --git a/WebKit/qt/declarative/declarative.pro b/WebKit/qt/declarative/declarative.pro index 75268f3..526cf06 100644 --- a/WebKit/qt/declarative/declarative.pro +++ b/WebKit/qt/declarative/declarative.pro @@ -30,6 +30,7 @@ symbian: { TARGET.EPOCALLOWDLLDATA=1 TARGET.CAPABILITY = All -Tcb load(armcc_warnings) + TARGET = $$TARGET$${QT_LIBINFIX} } include(../../../WebKit.pri) diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index 76fdba3..3d03157 100644 --- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -37,6 +37,7 @@ #include <qsslerror.h> #endif #include "../util.h" +#include "../WebCoreSupport/DumpRenderTreeSupportQt.h" struct CustomType { QString string; @@ -570,9 +571,11 @@ public slots: void cleanup(); private slots: - void getSetStaticProperty(); void getSetDynamicProperty(); + void getSetDynamicProperty_data(); void getSetChildren(); + void getSetChildren_data(); + void getSetStaticProperty(); void callQtInvokable(); void connectAndDisconnect(); void classEnums(); @@ -667,6 +670,10 @@ private: evalJS("delete retvalue; delete typevalue"); return ret; } + void garbageCollectJS() + { + DumpRenderTreeSupportQt::garbageCollectorCollect(); + } QObject* firstChildByClassName(QObject* parent, const char* className) { const QObjectList & children = parent->children(); foreach (QObject* child, children) { @@ -943,6 +950,8 @@ void tst_QWebFrame::getSetStaticProperty() void tst_QWebFrame::getSetDynamicProperty() { + QFETCH(bool, garbageCollect); + // initially the object does not have the property // In WebKit, RuntimeObjects do not inherit Object, so don't have hasOwnProperty @@ -954,11 +963,34 @@ void tst_QWebFrame::getSetDynamicProperty() //QCOMPARE(evalJS("myObject.hasOwnProperty('dynamicProperty')"), sTrue); QCOMPARE(evalJS("typeof myObject.dynamicProperty != 'undefined'"), sTrue); QCOMPARE(evalJS("myObject.dynamicProperty == 123"), sTrue); + if( garbageCollect ) { + garbageCollectJS(); + QCOMPARE(evalJS("typeof myObject.dynamicProperty != 'undefined'"), sTrue); + } // property change in script should be reflected in C++ QCOMPARE(evalJS("myObject.dynamicProperty = 'foo';" "myObject.dynamicProperty"), QLatin1String("foo")); QCOMPARE(m_myObject->property("dynamicProperty").toString(), QLatin1String("foo")); + if( garbageCollect ) { + garbageCollectJS(); + QCOMPARE(m_myObject->property("dynamicProperty").toString(), QLatin1String("foo")); + } + + // add a dynamic property in C++ to another QObject + QObject* propertyObject = new QObject(m_myObject); + QCOMPARE(m_myObject->setProperty("dynamicObjectProperty", qVariantFromValue(propertyObject)), false); + QCOMPARE(evalJS("typeof myObject.dynamicObjectProperty != 'undefined'"), sTrue); + evalJS("myObject.dynamicObjectProperty.jsProperty = 123"); + QCOMPARE(evalJS("myObject.dynamicObjectProperty.jsProperty == 123"), sTrue); + if( garbageCollect ) { + garbageCollectJS(); + QCOMPARE(evalJS("typeof myObject.dynamicObjectProperty != 'undefined'"), sTrue); + QCOMPARE(evalJS("myObject.dynamicObjectProperty.jsProperty == 123"), sTrue); + } + QCOMPARE(m_myObject->setProperty("dynamicObjectProperty", QVariant()), false); + delete propertyObject; + QCOMPARE(evalJS("typeof myObject.dynamicObjectProperty == 'undefined'"), sTrue); // delete the property (XFAIL - can't delete properties) QEXPECT_FAIL("", "can't delete properties", Continue); @@ -969,10 +1001,21 @@ void tst_QWebFrame::getSetDynamicProperty() // QCOMPARE(evalJS("myObject.hasOwnProperty('dynamicProperty')"), sFalse); QCOMPARE(evalJS("typeof myObject.dynamicProperty"), sUndefined); */ + + evalJS("myObject.dynamicProperty = undefined"); +} + +void tst_QWebFrame::getSetDynamicProperty_data() +{ + QTest::addColumn<bool>("garbageCollect"); + QTest::newRow("with garbageCollect") << true; + QTest::newRow("without garbageCollect") << false; } void tst_QWebFrame::getSetChildren() { + QFETCH(bool, garbageCollect); + // initially the object does not have the child // (again, no hasOwnProperty) @@ -984,12 +1027,27 @@ void tst_QWebFrame::getSetChildren() child->setObjectName("child"); // QCOMPARE(evalJS("myObject.hasOwnProperty('child')"), sTrue); QCOMPARE(evalJS("typeof myObject.child != 'undefined'"), sTrue); + evalJS("myObject.child.jsProperty = 123"); + QCOMPARE(evalJS("myObject.child.jsProperty == 123"), sTrue); + + if( garbageCollect ) { + garbageCollectJS(); + QCOMPARE(evalJS("typeof myObject.child != 'undefined'"), sTrue); + QCOMPARE(evalJS("myObject.child.jsProperty == 123"), sTrue); + } // add a grandchild MyQObject* grandChild = new MyQObject(child); grandChild->setObjectName("grandChild"); // QCOMPARE(evalJS("myObject.child.hasOwnProperty('grandChild')"), sTrue); QCOMPARE(evalJS("typeof myObject.child.grandChild != 'undefined'"), sTrue); + evalJS("myObject.child.grandChild.jsProperty = 123"); + evalJS("myObject.child.grandChild.jsProperty = 123"); + if( garbageCollect ) { + garbageCollectJS(); + QCOMPARE(evalJS("typeof myObject.child.grandChild != 'undefined'"), sTrue); + QCOMPARE(evalJS("myObject.child.grandChild.jsProperty == 123"), sTrue); + } // delete grandchild delete grandChild; @@ -1000,6 +1058,18 @@ void tst_QWebFrame::getSetChildren() delete child; // QCOMPARE(evalJS("myObject.hasOwnProperty('child')"), sFalse); QCOMPARE(evalJS("typeof myObject.child == 'undefined'"), sTrue); + if( garbageCollect ) { + garbageCollectJS(); + QCOMPARE(evalJS("typeof myObject.child == 'undefined'"), sTrue); + } +} + + +void tst_QWebFrame::getSetChildren_data() +{ + QTest::addColumn<bool>("garbageCollect"); + QTest::newRow("with garbageCollect") << true; + QTest::newRow("without garbageCollect") << false; } Q_DECLARE_METATYPE(QVector<int>) @@ -1666,7 +1736,7 @@ void tst_QWebFrame::connectAndDisconnect() m_myObject->emitMySignal(); QCOMPARE(m_myObject->qtFunctionInvoked(), 20); evalJS("myObject = null"); - evalJS("gc()"); + garbageCollectJS(); m_myObject->resetQtFunctionInvoked(); m_myObject->emitMySignal(); QCOMPARE(m_myObject->qtFunctionInvoked(), 20); diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 5e6f4e6..70466c7 100644 --- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -234,6 +234,9 @@ private: void tst_QWebPage::infiniteLoopJS() { +#ifdef Q_WS_MAEMO_5 + QSKIP("Test never terminates on Maemo 5 : https://bugs.webkit.org/show_bug.cgi?id=38538", SkipAll); +#endif JSTestPage* newPage = new JSTestPage(m_view); m_view->setPage(newPage); m_view->setHtml(QString("<html><body>test</body></html>"), QUrl()); diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index d943cc6..e1b7248 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,116 @@ +2010-07-12 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Alice Liu. + + <rdar://problem/8113038> WebKit1 and WebKit2 should build as a single DLL + https://bugs.webkit.org/show_bug.cgi?id=40921 + + Pre-WebKit2 WebKit now builds into a static library named WebKitLib.lib. + WebKit.dll now links in WebCore.lib, WebKitLib.lib and WebKit2 code. + + This is a first step. We'll likely want to migrate the remainder of + the non-deprecated WebKit code (strings, DLLMain, resources) into WebKit2. + + * WebKit.vcproj/WebKit.def: Removed. + * WebKit.vcproj/WebKit.make: Don't fail if WebKit doesn't produce a DLL. + * WebKit.vcproj/WebKit.vcproj: Build WebKit as a static lib. + Renamed project name to WebKitLib to avoid confusion and naming conflicts. + Generate intermediate pdb file for debuggability of static lib. + Removed DLL-related options. + * WebKit.vcproj/deleteButton.png: Removed. + * WebKit.vcproj/deleteButtonPressed.png: Removed. + * WebKit.vcproj/fsVideoAudioVolumeHigh.png: Removed. + * WebKit.vcproj/fsVideoAudioVolumeLow.png: Removed. + * WebKit.vcproj/fsVideoExitFullscreen.png: Removed. + * WebKit.vcproj/fsVideoPause.png: Removed. + * WebKit.vcproj/fsVideoPlay.png: Removed. + * WebKit.vcproj/missingImage.png: Removed. + * WebKit.vcproj/nullplugin.png: Removed. + * WebKit.vcproj/panEastCursor.png: Removed. + * WebKit.vcproj/panIcon.png: Removed. + * WebKit.vcproj/panNorthCursor.png: Removed. + * WebKit.vcproj/panNorthEastCursor.png: Removed. + * WebKit.vcproj/panNorthWestCursor.png: Removed. + * WebKit.vcproj/panSouthCursor.png: Removed. + * WebKit.vcproj/panSouthEastCursor.png: Removed. + * WebKit.vcproj/panSouthWestCursor.png: Removed. + * WebKit.vcproj/panWestCursor.png: Removed. + * WebKit.vcproj/searchCancel.png: Removed. + * WebKit.vcproj/searchCancelPressed.png: Removed. + * WebKit.vcproj/searchMagnifier.png: Removed. + * WebKit.vcproj/searchMagnifierResults.png: Removed. + * WebKit.vcproj/textAreaResizeCorner.png: Removed. + * WebKit.vcproj/verticalTextCursor.png: Removed. + * WebKit.vcproj/zoomInCursor.png: Removed. + * WebKit.vcproj/zoomOutCursor.png: Removed. + +2010-07-08 Aaron Boodman <aa@chromium.org> + + Reviewed by Timothy Hatcher. + + Add the ability for user scripts and user styles to affect just the top frame. + + https://bugs.webkit.org/show_bug.cgi?id=41529 + + * WebView.cpp: + (WebView::addUserScriptToGroup): + (WebView::addUserStyleSheetToGroup): + +2010-07-08 Adele Peterson <adele@apple.com> + + Reviewed by Jon Honeycutt, Adam Roben, and Darin Adler. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=41721 + <rdar://problem/8158561> Missing plug-in indicator should have a pressed state + + Implement shouldMissingPluginMessageBeButton. + + * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::shouldMissingPluginMessageBeButton): + * WebCoreSupport/WebChromeClient.h: + +2010-07-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Simon Fraser. + + Rename TestNetscapePlugin.subproj and move platform specific files to subdirectories + https://bugs.webkit.org/show_bug.cgi?id=41781 + + * WebKit.vcproj/WebKit.sln: + +2010-07-07 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41772 + Add basic piping for BackForwardControllerClient. + + * WebView.cpp: + (WebView::initWithFrame): + +2010-07-07 Adam Roben <aroben@apple.com> + + Windows build fix + + * Interfaces/WebKit.idl: Touched to force a build. + +2010-07-06 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Simon Fraser. + + Expose URL matching from WebUserContentURLPattern + https://bugs.webkit.org/show_bug.cgi?id=41726 + <rdar://problem/7910144> + + We previously had a way to construct WebUserContentURLPattern + instances via WebKit, but no way for callers to perform matching. + This patch adds the matchesURL functionality to allow for this. + + * Interfaces/IWebUserContentURLPattern.idl: Added matchesURL. + * Interfaces/IWebView.idl: Touch to force a build. + * WebUserContentURLPattern.cpp: + (WebUserContentURLPattern::matchesURL): Added. Calls through to WebCore::UserContentURLPattern::matches. + * WebUserContentURLPattern.h: Added matchesURL. + 2010-07-03 Jon Honeycutt <jhoneycutt@apple.com> The missing plug-in indicator should be clickable diff --git a/WebKit/win/Interfaces/IWebUserContentURLPattern.idl b/WebKit/win/Interfaces/IWebUserContentURLPattern.idl index b261084..0d4b133 100644 --- a/WebKit/win/Interfaces/IWebUserContentURLPattern.idl +++ b/WebKit/win/Interfaces/IWebUserContentURLPattern.idl @@ -40,4 +40,5 @@ interface IWebUserContentURLPattern : IUnknown HRESULT scheme([out, retval] BSTR*); HRESULT host([out, retval] BSTR*); HRESULT matchesSubdomains([out, retval] BOOL* matches); + HRESULT matchesURL([in] BSTR url, [out, retval] BOOL* matches); } diff --git a/WebKit/win/Interfaces/IWebView.idl b/WebKit/win/Interfaces/IWebView.idl index bec4df5..e3ec98a 100644 --- a/WebKit/win/Interfaces/IWebView.idl +++ b/WebKit/win/Interfaces/IWebView.idl @@ -1216,3 +1216,6 @@ interface IWebViewEditingActions : IUnknown */ HRESULT stopSpeaking([in] IUnknown* sender); } + + + diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl index 8938501..ce2f213 100644 --- a/WebKit/win/Interfaces/WebKit.idl +++ b/WebKit/win/Interfaces/WebKit.idl @@ -300,3 +300,4 @@ library WebKit [default] interface IWebUserContentURLPattern; } } + diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp index d45e10c..42e5cc4 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp +++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp @@ -535,6 +535,18 @@ void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& result, unsig uiDelegate->mouseDidMoveOverElement(m_webView, element.get(), modifierFlags); } +bool WebChromeClient::shouldMissingPluginMessageBeButton() const +{ + COMPtr<IWebUIDelegate> uiDelegate; + if (FAILED(m_webView->uiDelegate(&uiDelegate))) + return false; + + // If the UI delegate implements IWebUIDelegatePrivate3, + // which contains didPressMissingPluginButton, then the message should be a button. + COMPtr<IWebUIDelegatePrivate3> uiDelegatePrivate3(Query, uiDelegate); + return uiDelegatePrivate3; +} + void WebChromeClient::missingPluginButtonClicked(Element* element) const { COMPtr<IWebUIDelegate> uiDelegate; diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h index c8a9451..c890af0 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.h +++ b/WebKit/win/WebCoreSupport/WebChromeClient.h @@ -105,6 +105,7 @@ public: virtual void scrollbarsModeDidChange() const { } virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags); + virtual bool shouldMissingPluginMessageBeButton() const; virtual void missingPluginButtonClicked(WebCore::Element*) const; virtual void setToolTip(const WebCore::String&, WebCore::TextDirection); diff --git a/WebKit/win/WebKit.vcproj/WebKit.def b/WebKit/win/WebKit.vcproj/WebKit.def deleted file mode 100644 index 8d091ec..0000000 --- a/WebKit/win/WebKit.vcproj/WebKit.def +++ /dev/null @@ -1,136 +0,0 @@ -LIBRARY "WebKit" - -EXPORTS - DllGetClassObject PRIVATE - DllCanUnloadNow PRIVATE - DllRegisterServer PRIVATE - DllUnregisterServer PRIVATE - RunAsLocalServer PRIVATE - LocalServerDidDie PRIVATE - setUseOpenSourceWebKit - shutDownWebKit - progIDForClass - WebLocalizedStringUTF8 - WebLocalizedLPCTSTRUTF8 - WebDrawText - FontMetrics - TextFloatWidth - CenterTruncateStringToWidth - RightTruncateStringToWidth - WebKitSetShouldUseFontSmoothing - WebKitShouldUseFontSmoothing - WebKitCreateInstance - - ; These functions are deprecated - WebLocalizedString - WebLocalizedLPCTSTR - SetWebLocalizedStringMainBundle - - ; Deprecated re-exports from JavaScriptCore - JSCheckScriptSyntax - JSClassCreate - JSClassRelease - JSClassRetain - JSContextGetGlobalObject - JSContextGetGroup - JSContextGroupCreate - JSContextGroupRelease - JSContextGroupRetain - JSEvaluateScript - JSGarbageCollect - JSGlobalContextCreate - JSGlobalContextCreateInGroup - JSGlobalContextRelease - JSGlobalContextRetain - JSObjectCallAsConstructor - JSObjectCallAsFunction - JSObjectCopyPropertyNames - JSObjectDeleteProperty - JSObjectGetPrivate - JSObjectGetProperty - JSObjectGetPropertyAtIndex - JSObjectGetPrototype - JSObjectHasProperty - JSObjectIsConstructor - JSObjectIsFunction - JSObjectMake - JSObjectMakeArray - JSObjectMakeConstructor - JSObjectMakeDate - JSObjectMakeError - JSObjectMakeFunction - JSObjectMakeFunctionWithCallback - JSObjectMakeRegExp - JSObjectSetPrivate - JSObjectSetProperty - JSObjectSetPropertyAtIndex - JSObjectSetPrototype - JSPropertyNameAccumulatorAddName - JSPropertyNameArrayGetCount - JSPropertyNameArrayGetNameAtIndex - JSPropertyNameArrayRelease - JSPropertyNameArrayRetain - JSStringCopyBSTR - JSStringCopyCFString - JSStringCreateWithBSTR - JSStringCreateWithCFString - JSStringCreateWithCharacters - JSStringCreateWithUTF8CString - JSStringGetCharactersPtr - JSStringGetLength - JSStringGetMaximumUTF8CStringSize - JSStringGetUTF8CString - JSStringIsEqual - JSStringIsEqualToUTF8CString - JSStringRelease - JSStringRetain - JSValueGetType - JSValueIsBoolean - JSValueIsEqual - JSValueIsInstanceOfConstructor - JSValueIsNull - JSValueIsNumber - JSValueIsObject - JSValueIsObjectOfClass - JSValueIsStrictEqual - JSValueIsString - JSValueIsUndefined - JSValueMakeBoolean - JSValueMakeNull - JSValueMakeNumber - JSValueMakeString - JSValueMakeUndefined - JSValueProtect - JSValueToBoolean - JSValueToNumber - JSValueToObject - JSValueToStringCopy - JSValueUnprotect - ?fastMalloc@WTF@@YAPAXI@Z - ?fastZeroedMalloc@WTF@@YAPAXI@Z - ?fastFree@WTF@@YAXPAX@Z - ?fastCalloc@WTF@@YAPAXII@Z - ??0Mutex@WTF@@QAE@XZ - ??0ThreadCondition@WTF@@QAE@XZ - ??1Mutex@WTF@@QAE@XZ - ??1ThreadCondition@WTF@@QAE@XZ - ?broadcast@ThreadCondition@WTF@@QAEXXZ - ?callOnMainThread@WTF@@YAXP6AXPAX@Z0@Z - ?createThread@WTF@@YAIP6APAXPAX@Z0PBD@Z - ?currentThread@WTF@@YAIXZ - ?detachThread@WTF@@YAXI@Z - ?initializeMainThread@WTF@@YAXXZ - ?initializeThreading@WTF@@YAXXZ - ?isMainThread@WTF@@YA_NXZ - ?lock@Mutex@WTF@@QAEXXZ - ?lockAtomicallyInitializedStaticMutex@WTF@@YAXXZ - ?signal@ThreadCondition@WTF@@QAEXXZ - ?timedWait@ThreadCondition@WTF@@QAE_NAAVMutex@2@N@Z - ?tlsKeyCount@WTF@@YAAAJXZ - ?tlsKeys@WTF@@YAPAKXZ - ?tryLock@Mutex@WTF@@QAE_NXZ - ?unlock@Mutex@WTF@@QAEXXZ - ?unlockAtomicallyInitializedStaticMutex@WTF@@YAXXZ - ?wait@ThreadCondition@WTF@@QAEXAAVMutex@2@@Z - ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z - ?createThread@WTF@@YAIP6APAXPAX@Z0@Z diff --git a/WebKit/win/WebKit.vcproj/WebKit.make b/WebKit/win/WebKit.vcproj/WebKit.make index 6c2ce85..eda85bd 100755 --- a/WebKit/win/WebKit.vcproj/WebKit.make +++ b/WebKit/win/WebKit.vcproj/WebKit.make @@ -11,7 +11,7 @@ install: devenv "WebKit.submit.sln" /rebuild $(BUILDSTYLE) -xcopy "$(OBJROOT)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y xcopy "$(OBJROOT)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y - xcopy "$(OBJROOT)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y + -xcopy "$(OBJROOT)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y xcopy "$(OBJROOT)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y xcopy "$(OBJROOT)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y xcopy "$(OBJROOT)\bin\WebKit.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit.resources" /e/v/i/h/y diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln index c205704..38f4253 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.sln +++ b/WebKit/win/WebKit.vcproj/WebKit.sln @@ -26,7 +26,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DumpRenderTree", "..\..\..\ {59CC0547-70AC-499C-9B19-EC01C6F61137} = {59CC0547-70AC-499C-9B19-EC01C6F61137}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestNetscapePlugin", "..\..\..\WebKitTools\DumpRenderTree\win\TestNetscapePlugin\TestNetscapePlugin.vcproj", "{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestNetscapePlugin", "..\..\..\WebKitTools\DumpRenderTree\TestNetscapePlugin\win\TestNetscapePlugin.vcproj", "{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
ProjectSection(ProjectDependencies) = postProject
{114FCA11-216B-4C8C-957E-30A75AE80443} = {114FCA11-216B-4C8C-957E-30A75AE80443}
EndProjectSection
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj index 76b5e7b..7316805 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.vcproj +++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj @@ -2,7 +2,7 @@ <VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
- Name="WebKit"
+ Name="WebKitLib"
ProjectGUID="{0662A8A9-82A3-4638-97D8-EC425D8D87C9}"
RootNamespace="WebKit"
Keyword="Win32Proj"
@@ -17,7 +17,8 @@ <Configurations>
<Configuration
Name="Debug|Win32"
- ConfigurationType="2"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ ConfigurationType="4"
InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
@@ -43,6 +44,7 @@ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
DisableSpecificWarnings="4819"
ForcedIncludeFiles="WebKitPrefix.h"
/>
@@ -58,20 +60,12 @@ CommandLine=""
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
- ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
- Name="VCManifestTool"
- />
- <Tool
Name="VCXDCMakeTool"
/>
<Tool
@@ -81,19 +75,14 @@ Name="VCFxCopTool"
/>
<Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\WebKit.resources\*" "$(OutDir)\..\bin\WebKit.resources"
mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\..\bin\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
<Configuration
Name="Release|Win32"
- ConfigurationType="2"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ ConfigurationType="4"
InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
@@ -120,6 +109,7 @@ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
DisableSpecificWarnings="4819"
ForcedIncludeFiles="WebKitPrefix.h"
/>
@@ -135,20 +125,12 @@ CommandLine=""
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
- ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
- Name="VCManifestTool"
- />
- <Tool
Name="VCXDCMakeTool"
/>
<Tool
@@ -158,19 +140,14 @@ Name="VCFxCopTool"
/>
<Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\WebKit.resources\*" "$(OutDir)\..\bin\WebKit.resources"
mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\..\bin\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
<Configuration
Name="Debug_Internal|Win32"
- ConfigurationType="2"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ ConfigurationType="4"
InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
CharacterSet="1"
>
@@ -196,6 +173,7 @@ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
Detect64BitPortabilityProblems="false"
DisableSpecificWarnings="4819"
ForcedIncludeFiles="WebKitPrefix.h"
@@ -212,20 +190,12 @@ CommandLine=""
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
- ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
- Name="VCManifestTool"
- />
- <Tool
Name="VCXDCMakeTool"
/>
<Tool
@@ -235,19 +205,14 @@ Name="VCFxCopTool"
/>
<Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\WebKit.resources\*" "$(OutDir)\..\bin\WebKit.resources"
mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\..\bin\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
<Configuration
Name="Debug_Cairo|Win32"
- ConfigurationType="2"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ ConfigurationType="4"
InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
CharacterSet="1"
>
@@ -273,6 +238,7 @@ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
DisableSpecificWarnings="4819"
ForcedIncludeFiles="WebKitPrefix.h"
/>
@@ -288,21 +254,12 @@ CommandLine=""
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CFLite_Debug.lib JavaScriptCore$(WebKitConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib msimg32.lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
- ModuleDefinitionFile="WebKit_Cairo$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;iphlpapi.dll;rpcrt4.dll"
+ Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
- Name="VCManifestTool"
- VerboseOutput="false"
- />
- <Tool
Name="VCXDCMakeTool"
/>
<Tool
@@ -312,21 +269,15 @@ Name="VCFxCopTool"
/>
<Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\WebKit.resources\*" "$(OutDir)\..\bin\WebKit.resources"
mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\..\bin\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
<Configuration
Name="Release_Cairo|Win32"
- OutputDirectory="$(WebKitOutputDir)\bin"
+ OutputDirectory="$(WebKitOutputDir)\lib"
IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
- ConfigurationType="2"
+ ConfigurationType="4"
InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
@@ -353,6 +304,7 @@ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
DisableSpecificWarnings="4819"
ForcedIncludeFiles="WebKitPrefix.h"
/>
@@ -368,20 +320,12 @@ CommandLine=""
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CFLite.lib JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib msimg32.lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
- ModuleDefinitionFile="WebKit_Cairo$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;iphlpapi.dll;rpcrt4.dll"
+ Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
- Name="VCManifestTool"
- />
- <Tool
Name="VCXDCMakeTool"
/>
<Tool
@@ -391,19 +335,14 @@ Name="VCFxCopTool"
/>
<Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\WebKit.resources\*" "$(OutDir)\..\bin\WebKit.resources"
mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\..\bin\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
<Configuration
Name="Debug_All|Win32"
- ConfigurationType="2"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ ConfigurationType="4"
InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
@@ -429,6 +368,7 @@ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
Detect64BitPortabilityProblems="false"
DisableSpecificWarnings="4819"
ForcedIncludeFiles="WebKitPrefix.h"
@@ -445,20 +385,12 @@ CommandLine=""
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
- ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
- Name="VCManifestTool"
- />
- <Tool
Name="VCXDCMakeTool"
/>
<Tool
@@ -468,14 +400,8 @@ Name="VCFxCopTool"
/>
<Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitCOMAPI.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebPreferenceKeysPrivate.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npruntime_internal.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\WebCore\nptypes.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\WebKit.resources\*" "$(OutDir)\..\bin\WebKit.resources"
mkdir 2>NUL "$(OutDir)\..\bin\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\..\English.lproj\Localizable.strings" "$(OutDir)\..\bin\WebKit.resources\en.lproj\"

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
/>
</Configuration>
</Configurations>
@@ -1275,122 +1201,6 @@ </File>
</Filter>
<Filter
- Name="Resources"
- >
- <File
- RelativePath=".\fsVideoAudioVolumeHigh.png"
- >
- </File>
- <File
- RelativePath=".\fsVideoAudioVolumeLow.png"
- >
- </File>
- <File
- RelativePath=".\fsVideoExitFullscreen.png"
- >
- </File>
- <File
- RelativePath=".\fsVideoPause.png"
- >
- </File>
- <File
- RelativePath=".\fsVideoPlay.png"
- >
- </File>
- <File
- RelativePath=".\missingImage.png"
- >
- </File>
- <File
- RelativePath=".\nullplugin.png"
- >
- </File>
- <File
- RelativePath=".\searchCancel.png"
- >
- </File>
- <File
- RelativePath=".\searchCancelPressed.png"
- >
- </File>
- <File
- RelativePath=".\searchMagnifier.png"
- >
- </File>
- <File
- RelativePath=".\searchMagnifierResults.png"
- >
- </File>
- <File
- RelativePath=".\textAreaResizeCorner.png"
- >
- </File>
- <File
- RelativePath=".\verticalTextCursor.png"
- >
- </File>
- <File
- RelativePath=".\WebKit.rc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- >
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\lib";"$(WebKitOutputDir)\obj\$(ProjectName)\Interfaces""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\zoomInCursor.png"
- >
- </File>
- <File
- RelativePath=".\zoomOutCursor.png"
- >
- </File>
- </Filter>
- <Filter
Name="API"
>
<File
diff --git a/WebKit/win/WebKit.vcproj/deleteButton.png b/WebKit/win/WebKit.vcproj/deleteButton.png Binary files differdeleted file mode 100644 index 8f1b881..0000000 --- a/WebKit/win/WebKit.vcproj/deleteButton.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/deleteButtonPressed.png b/WebKit/win/WebKit.vcproj/deleteButtonPressed.png Binary files differdeleted file mode 100644 index 77d31ca..0000000 --- a/WebKit/win/WebKit.vcproj/deleteButtonPressed.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png Binary files differdeleted file mode 100755 index d04df37..0000000 --- a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png Binary files differdeleted file mode 100755 index e824a21..0000000 --- a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png b/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png Binary files differdeleted file mode 100755 index 01ce692..0000000 --- a/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/fsVideoPause.png b/WebKit/win/WebKit.vcproj/fsVideoPause.png Binary files differdeleted file mode 100755 index b98fb36..0000000 --- a/WebKit/win/WebKit.vcproj/fsVideoPause.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/fsVideoPlay.png b/WebKit/win/WebKit.vcproj/fsVideoPlay.png Binary files differdeleted file mode 100755 index 035aeb2..0000000 --- a/WebKit/win/WebKit.vcproj/fsVideoPlay.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/missingImage.png b/WebKit/win/WebKit.vcproj/missingImage.png Binary files differdeleted file mode 100644 index f49a98d..0000000 --- a/WebKit/win/WebKit.vcproj/missingImage.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/nullplugin.png b/WebKit/win/WebKit.vcproj/nullplugin.png Binary files differdeleted file mode 100644 index a4195f6..0000000 --- a/WebKit/win/WebKit.vcproj/nullplugin.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/panEastCursor.png b/WebKit/win/WebKit.vcproj/panEastCursor.png Binary files differdeleted file mode 100755 index 9c1592e..0000000 --- a/WebKit/win/WebKit.vcproj/panEastCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/panIcon.png b/WebKit/win/WebKit.vcproj/panIcon.png Binary files differdeleted file mode 100644 index 4ca8d70..0000000 --- a/WebKit/win/WebKit.vcproj/panIcon.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/panNorthCursor.png b/WebKit/win/WebKit.vcproj/panNorthCursor.png Binary files differdeleted file mode 100755 index 0d020db..0000000 --- a/WebKit/win/WebKit.vcproj/panNorthCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/panNorthEastCursor.png b/WebKit/win/WebKit.vcproj/panNorthEastCursor.png Binary files differdeleted file mode 100755 index 0e89639..0000000 --- a/WebKit/win/WebKit.vcproj/panNorthEastCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/panNorthWestCursor.png b/WebKit/win/WebKit.vcproj/panNorthWestCursor.png Binary files differdeleted file mode 100755 index 6723f61..0000000 --- a/WebKit/win/WebKit.vcproj/panNorthWestCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/panSouthCursor.png b/WebKit/win/WebKit.vcproj/panSouthCursor.png Binary files differdeleted file mode 100755 index 60cf722..0000000 --- a/WebKit/win/WebKit.vcproj/panSouthCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/panSouthEastCursor.png b/WebKit/win/WebKit.vcproj/panSouthEastCursor.png Binary files differdeleted file mode 100755 index 415aa63..0000000 --- a/WebKit/win/WebKit.vcproj/panSouthEastCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/panSouthWestCursor.png b/WebKit/win/WebKit.vcproj/panSouthWestCursor.png Binary files differdeleted file mode 100755 index 8dc5cdc..0000000 --- a/WebKit/win/WebKit.vcproj/panSouthWestCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/panWestCursor.png b/WebKit/win/WebKit.vcproj/panWestCursor.png Binary files differdeleted file mode 100755 index 544439a..0000000 --- a/WebKit/win/WebKit.vcproj/panWestCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/searchCancel.png b/WebKit/win/WebKit.vcproj/searchCancel.png Binary files differdeleted file mode 100644 index 49f3f47..0000000 --- a/WebKit/win/WebKit.vcproj/searchCancel.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/searchCancelPressed.png b/WebKit/win/WebKit.vcproj/searchCancelPressed.png Binary files differdeleted file mode 100644 index b699d81..0000000 --- a/WebKit/win/WebKit.vcproj/searchCancelPressed.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/searchMagnifier.png b/WebKit/win/WebKit.vcproj/searchMagnifier.png Binary files differdeleted file mode 100644 index f9b8cae..0000000 --- a/WebKit/win/WebKit.vcproj/searchMagnifier.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/searchMagnifierResults.png b/WebKit/win/WebKit.vcproj/searchMagnifierResults.png Binary files differdeleted file mode 100644 index 9aa1b36..0000000 --- a/WebKit/win/WebKit.vcproj/searchMagnifierResults.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/textAreaResizeCorner.png b/WebKit/win/WebKit.vcproj/textAreaResizeCorner.png Binary files differdeleted file mode 100644 index 023615e..0000000 --- a/WebKit/win/WebKit.vcproj/textAreaResizeCorner.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/verticalTextCursor.png b/WebKit/win/WebKit.vcproj/verticalTextCursor.png Binary files differdeleted file mode 100644 index 0f2877c..0000000 --- a/WebKit/win/WebKit.vcproj/verticalTextCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/zoomInCursor.png b/WebKit/win/WebKit.vcproj/zoomInCursor.png Binary files differdeleted file mode 100644 index feec9bc..0000000 --- a/WebKit/win/WebKit.vcproj/zoomInCursor.png +++ /dev/null diff --git a/WebKit/win/WebKit.vcproj/zoomOutCursor.png b/WebKit/win/WebKit.vcproj/zoomOutCursor.png Binary files differdeleted file mode 100644 index f4a954e..0000000 --- a/WebKit/win/WebKit.vcproj/zoomOutCursor.png +++ /dev/null diff --git a/WebKit/win/WebUserContentURLPattern.cpp b/WebKit/win/WebUserContentURLPattern.cpp index 5312fca..1c8c569 100644 --- a/WebKit/win/WebUserContentURLPattern.cpp +++ b/WebKit/win/WebUserContentURLPattern.cpp @@ -23,9 +23,11 @@ */ #include "config.h" -#include "WebKitDLL.h" #include "WebUserContentURLPattern.h" +#include "MarshallingHelpers.h" +#include "WebKitDLL.h" + #include <WebCore/BString.h> #include <WebCore/KURL.h> @@ -118,3 +120,11 @@ HRESULT WebUserContentURLPattern::matchesSubdomains(BOOL* matches) *matches = m_pattern.matchSubdomains(); return S_OK; } + +HRESULT WebUserContentURLPattern::matchesURL(BSTR url, BOOL* matches) +{ + if (!matches) + return E_POINTER; + *matches = m_pattern.matches(MarshallingHelpers::BSTRToKURL(url)); + return S_OK; +} diff --git a/WebKit/win/WebUserContentURLPattern.h b/WebKit/win/WebUserContentURLPattern.h index 143f644..e8f6b67 100644 --- a/WebKit/win/WebUserContentURLPattern.h +++ b/WebKit/win/WebUserContentURLPattern.h @@ -49,6 +49,7 @@ private: virtual HRESULT STDMETHODCALLTYPE scheme(BSTR*); virtual HRESULT STDMETHODCALLTYPE host(BSTR*); virtual HRESULT STDMETHODCALLTYPE matchesSubdomains(BOOL* matches); + virtual HRESULT STDMETHODCALLTYPE matchesURL(BSTR, BOOL*); ULONG m_refCount; WebCore::UserContentURLPattern m_pattern; diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index 441f0f2..b5c4fa8 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -2570,13 +2570,12 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame( #else WebGeolocationControllerClient* geolocationControllerClient = 0; #endif - DeviceOrientationClient* deviceOrientationClient = 0; BOOL useHighResolutionTimer; if (SUCCEEDED(m_preferences->shouldUseHighResolutionTimers(&useHighResolutionTimer))) Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer); - m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), geolocationControllerClient, deviceOrientationClient); + m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), geolocationControllerClient, 0, 0); BSTR localStoragePath; if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) { @@ -5971,7 +5970,8 @@ HRESULT WebView::addUserScriptToGroup(BSTR groupName, IWebScriptWorld* iWorld, B pageGroup->addUserScriptToWorld(world->world(), toString(source), toKURL(url), toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist), - injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd); + injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd, + InjectInAllFrames); return S_OK; } @@ -5994,7 +5994,8 @@ HRESULT WebView::addUserStyleSheetToGroup(BSTR groupName, IWebScriptWorld* iWorl return E_FAIL; pageGroup->addUserStyleSheetToWorld(world->world(), toString(source), toKURL(url), - toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist)); + toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist), + InjectInAllFrames); return S_OK; } diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog index 36c9990..9d89858 100644 --- a/WebKit/wx/ChangeLog +++ b/WebKit/wx/ChangeLog @@ -1,3 +1,10 @@ +2010-07-07 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix after change in Page constructor. + + * WebView.cpp: + (wxWebView::Create): + 2010-06-21 Kevin Ollivier <kevino@theolliviers.com> Build fix after conversion of WebInterfaceSystem to Obj-C++. diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp index a2897b5..59fba2f 100644 --- a/WebKit/wx/WebView.cpp +++ b/WebKit/wx/WebView.cpp @@ -336,7 +336,7 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position, new WebCore::ContextMenuClientWx(), editorClient, new WebCore::DragClientWx(), - new WebCore::InspectorClientWx(), 0, 0, 0); + new WebCore::InspectorClientWx(), 0, 0, 0, 0); editorClient->setPage(m_impl->page); m_mainFrame = new wxWebFrame(this); |