diff options
Diffstat (limited to 'WebKit')
547 files changed, 48215 insertions, 9968 deletions
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog index 134a252..3ba6146 100644 --- a/WebKit/ChangeLog +++ b/WebKit/ChangeLog @@ -1,3 +1,357 @@ +2010-04-21 Gustavo Sverzut Barbieri <barbieri@profusion.mobi> + + Reviewed by Adam Roben. + + Update EFL port to match recent API changes. + http://webkit.org/b/37853 + + * efl/WebCoreSupport/EditorClientEfl.cpp: + * efl/WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::FrameLoaderClientEfl::didTransferChildFrameToNewDocument): + (WebCore::FrameLoaderClientEfl::objectContentType): + (WebCore::FrameLoaderClientEfl::dispatchDidChangeIcons): + (WebCore::FrameLoaderClientEfl::canShowMIMEType): + * efl/WebCoreSupport/FrameLoaderClientEfl.h: + +2010-04-15 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/WebCoreSupport. + http://webkit.org/b/35915 + + * efl/WebCoreSupport/FrameLoaderClientEfl.cpp: Added. + * efl/WebCoreSupport/FrameLoaderClientEfl.h: Added. + +2010-04-15 Adam Roben <aroben@apple.com> + + Expose UserContentURLPattern as WebKit SPI + + Fixes <http://webkit.org/b/37354>. + + Reviewed by Tim Hatcher. + + * WebKit.xcodeproj/project.pbxproj: Add WebUserContentURLPattern. + +2010-04-15 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/WebCoreSupport. + http://webkit.org/b/35918 + + * efl/WebCoreSupport/EditorClientEfl.cpp: Added. + * efl/WebCoreSupport/EditorClientEfl.h: Added. + +2010-04-10 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7845305> Further adoption of formal protocols for delegates. + + Move EmptyProtocolDefinitions.h down in to WebCore, and add the new protocols. Adopt the protocols in the appropriate places. + + * WebKit.xcodeproj/project.pbxproj: + +2010-04-07 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add ewk_view (the high level object to acces the WebKit-EFL browser + component) to efl/ewk. + http://webkit.org/b/35932 + + * efl/ewk/ewk_view.cpp: Added. + * efl/ewk/ewk_view.h: Added. + +2010-04-05 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=37111 + <rdar://problem/7790327> Draw replacement text when plug-in host crashes + + https://bugs.webkit.org/show_bug.cgi?id=37111 + <rdar://problem/7790327> Draw replacement text when plug-in host crashes + + * English.lproj/Localizable.strings: Added a string for plug-in failure. + +2010-04-01 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Gustavo Noronha Silva. + + Add EFL's pkg-config metadata file file to efl/. + http://webkit.org/b/36766 + + * efl/ewebkit.pc.in: Added. + +2010-03-30 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=36866 + Move CString to WTF + + * efl/WebCoreSupport/ChromeClientEfl.cpp: + * efl/ewk/ewk_frame.cpp: + (ewk_frame_name_get): + (ewk_frame_selection_get): + (ewk_frame_uri_changed): + * efl/ewk/ewk_history.cpp: + * efl/ewk/ewk_settings.cpp: + +2010-03-28 Alexey Proskuryakov <ap@apple.com> + + Build fix. Include WindowsKeyboardCodes.h instead of KeyboardCodes.h. + + * efl/ewk/ewk_frame.cpp: + +2010-03-22 Kevin Decker <kdecker@apple.com> + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=36328 + + * WebKit.xcodeproj/project.pbxproj: Remove WebNullPluginView and nullplugin.tiff from the project. + +2010-03-22 Darin Adler <darin@apple.com> + + * StringsNotToBeLocalized.txt: Updated for recent changes. + +2010-03-22 Kevin Decker <kdecker@apple.com> + + Reviewed by John Sullivan. + + https://bugs.webkit.org/show_bug.cgi?id=36328 + + * English.lproj/Localizable.strings: Added "Missing Plug-in" string. + +2010-03-18 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/ewk. + http://webkit.org/b/35931 + + * efl/ewk/ewk_settings.cpp: Added. + * efl/ewk/ewk_settings.h: Added. + +2010-03-17 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add default theme files to efl/DefaultTheme. + http://webkit.org/b/36240 + + * efl/DefaultTheme/widget/radio/img_radio_on.png: Added. + * efl/DefaultTheme/radio/img_radio_off_hover.png: Added. + * efl/DefaultTheme/radio/img_radio_on_hover.png: Added. + * efl/DefaultTheme/radio/img_radio_off.png: Added. + * efl/DefaultTheme/radio/img_radio_off_focus.png: Added. + * efl/DefaultTheme/radio/img_radio_on_focus.png: Added. + * efl/DefaultTheme/combo/combo_normal.png: Added. + * efl/DefaultTheme/combo/combo_focus_button.png: Added. + * efl/DefaultTheme/combo/combo_hover_button.png: Added. + * efl/DefaultTheme/combo/combo_hover.png: Added. + * efl/DefaultTheme/combo/combo_focus.png: Added. + * efl/DefaultTheme/combo/combo_press_button.png: Added. + * efl/DefaultTheme/combo/combo_normal_button.png: Added. + * efl/DefaultTheme/combo/combo_press.png: Added. + * efl/DefaultTheme/combo/icon.png: Added. + * efl/DefaultTheme/file/file_normal.png: Added. + * efl/DefaultTheme/file/file_press.png: Added. + * efl/DefaultTheme/file/file_hover.png: Added. + * efl/DefaultTheme/file/file_focus.png: Added. + * efl/DefaultTheme/search/cancel/cancel_normal_button.png: Added. + * efl/DefaultTheme/search/cancel/cancel_normal_button2.png: Added. + * efl/DefaultTheme/search/decoration/decoration_normal_button.png: Added. + * efl/DefaultTheme/search/field/field_focused.png: Added. + * efl/DefaultTheme/search/field/field_normal.png: Added. + * efl/DefaultTheme/search/field/field_hovered.png: Added. + * efl/DefaultTheme/entry/img_normal.png: Added. + * efl/DefaultTheme/entry/img_hovered.png: Added. + * efl/DefaultTheme/entry/img_focused.png: Added. + * efl/DefaultTheme/check/img_check_off_hover.png: Added. + * efl/DefaultTheme/check/img_check_on.png: Added. + * efl/DefaultTheme/check/img_check_off_focus.png: Added. + * efl/DefaultTheme/check/img_check_on_focus.png: Added. + * efl/DefaultTheme/check/img_check_off.png: Added. + * efl/DefaultTheme/check/img_check_on_hover.png: Added. + * efl/DefaultTheme/scrollbar/scrollbar_knob_h.png: Added. + * efl/DefaultTheme/scrollbar/scrollbar_knob_v.png: Added. + * efl/DefaultTheme/scrollbar/scrollbar_hilight.png: Added. + * efl/DefaultTheme/scrollbar/scrollbar_v.png: Added. + * efl/DefaultTheme/scrollbar/scrollbar_h.png: Added. + * efl/DefaultTheme/button/img_button_normal.png: Added. + * efl/DefaultTheme/button/img_button_focus.png: Added. + * efl/DefaultTheme/button/img_button_hover.png: Added. + * efl/DefaultTheme/button/img_button_press.png: Added. + +2010-03-17 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL example browser to efl/EWebLauncher. + http://webkit.org/b/36176 + + * efl/EWebLauncher/main.c: Added. + +2010-03-16 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/WebCoreSupport. + http://webkit.org/b/35916 + + * efl/WebCoreSupport/ContextMenuClientEfl.cpp: Added. + * efl/WebCoreSupport/ContextMenuClientEfl.h: Added. + +2010-03-16 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. + + Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder + https://bugs.webkit.org/show_bug.cgi?id=35036 + + * efl/WebCoreSupport/InspectorClientEfl.cpp: + (WebCore::InspectorClientEfl::openInspectorFrontend): + * efl/WebCoreSupport/InspectorClientEfl.h: + +2010-03-13 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/ewk. + http://webkit.org/b/35925 + + * efl/ewk/ewk_history.cpp: Added. + * efl/ewk/ewk_history.h: Added. + +2010-03-13 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/ewk. + http://webkit.org/b/35928 + + * efl/ewk/ewk_main.cpp: Added. + * efl/ewk/ewk_main.h: Added. + +2010-03-13 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/ewk. + http://webkit.org/b/35924 + + * efl/ewk/ewk_frame.cpp: Added. + * efl/ewk/ewk_frame.h: Added. + +2010-03-13 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/ewk. + http://webkit.org/b/35936 + + * efl/ewk/ewk_view_single.c: Added. + +2010-03-13 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/ewk. + http://webkit.org/b/35929 + + * efl/ewk/ewk_util.cpp: Added. + * efl/ewk/ewk_util.h: Added. + +2010-03-13 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Add EFL port files to efl/ewk. + http://webkit.org/b/35934 + + * efl/ewk/EWebKit.h: Added. + * efl/ewk/ewk_eapi.h: Added. + * efl/ewk/ewk_logging.h: Added. + * efl/ewk/ewk_private.h: Added. + +2010-03-11 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Gustavo Noronha Silva. + + Add EFL port files to efl/WebCoreSupport. + http://webkit.org/b/35917 + + * efl/WebCoreSupport/InspectorClientEfl.h: Added. + * efl/WebCoreSupport/InspectorClientEfl.cpp: Added. + +2010-03-11 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Gustavo Noronha Silva. + + Add EFL port files to efl/WebCoreSupport. + http://webkit.org/b/35914 + + * efl/WebCoreSupport/DragClientEfl.h: Added. + * efl/WebCoreSupport/DragClientEfl.cpp: Added. + +2010-03-11 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Mark Rowe. + + Sort the project file. + + * WebKit.xcodeproj/project.pbxproj: + +2010-03-10 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Holger Freyther. + + Add EFL port files to efl/WebCoreSupport. + http://webkit.org/b/35913 + + * efl/WebCoreSupport/ChromeClientEfl.cpp: Added. + * efl/WebCoreSupport/ChromeClientEfl.h: Added. + +2010-03-09 John Sullivan <sullivan@apple.com> + + Fixed localized string key collision. update-webkit-localized-strings now + runs without errors. + + Reviewed by Adam Roben. + + * English.lproj/Localizable.strings: + Regenerated. + +2010-03-09 John Sullivan <sullivan@apple.com> + + * StringsNotToBeLocalized.txt: + Brought this file up to date. update-webkit-localizable-strings still lists + one key collision, but that's a separate issue. + +2010-03-04 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Add a script to verify that WebKit framework headers are internally consistent. + + * WebKit.xcodeproj/project.pbxproj: Run the script during the build and fail with + an error should the consistency check fail. + +2010-02-25 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=35394 + <rdar://problem/7685262> Make passing objects between Java and plug-ins work + + * WebKit.xcodeproj/project.pbxproj: Added new files. + 2010-02-04 Mark Rowe <mrowe@apple.com> Reviewed by Timothy Hatcher. diff --git a/WebKit/English.lproj/Localizable.strings b/WebKit/English.lproj/Localizable.strings Binary files differindex 42c1386..8301e28 100644 --- a/WebKit/English.lproj/Localizable.strings +++ b/WebKit/English.lproj/Localizable.strings diff --git a/WebKit/StringsNotToBeLocalized.txt b/WebKit/StringsNotToBeLocalized.txt index b39a1b0..74c90ca 100644 --- a/WebKit/StringsNotToBeLocalized.txt +++ b/WebKit/StringsNotToBeLocalized.txt @@ -38,10 +38,14 @@ "%d_%d_%d" "%dpx" "%ld" +"%s%01d:%02d:%02d" +"%s%02d:%02d" +"%s%02d:%02d:%02d" "%u" "&ie=UTF-8&oe=UTF-8" "(%.0f, %.0f)" "+" +", " "," "-" "-1px" @@ -59,11 +63,13 @@ "/Library/Internet Plug-Ins" "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LangAnalysis.framework/LangAnalysis" "/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/HIToolbox" +"/System/Library/Frameworks/CoreVideo.framework" "/Volumes" "/tmp/XXXXXX.tiff" "0" "062AEEE3-9E42-44DC-A8A9-236B216FE011" "1" +"10.1.51.95" "1000" "12px" "13" @@ -72,6 +78,7 @@ "1px" "2" "3.1" +"3dbd565b-db22-4d88-8e0e-778bde54524a" "420+" "5CACD637-F82F-491F-947A-5DCA38AA0FEA" "6EB8D98F-2723-4472-88D3-5936F9D6E631" @@ -132,6 +139,7 @@ "BEGIN:VCALENDAR" "BEGIN:VCARD" "BP_CreatePluginMIMETypesPreferences" +"CFBundleShortVersionString" "CFDictionaryPropertyBag" "CSS" "Change Back to \\U201C%@\\U201D" @@ -154,13 +162,15 @@ "DeleteWordBackward" "DeleteWordForward" "DisableWebKitDeveloperExtras" +"FAKETRACKPOINTHSCROLLBAR" +"FAKETRACKPOINTVSCROLLBAR" "FD3B2381-0BB6-4B59-AF09-0E599C8901CF" -"FastMallocFreeSizeInCaches" -"FastMallocFreeSizeInHeap" -"FastMallocHeapSize" -"FastMallocReturnedSize" +"FastMallocCommittedVMBytes" +"FastMallocFreeListBytes" +"FastMallocReservedVMBytes" "FrameName" "FullscreenButton" +"GCS_COMPATTR" "GEN_DOMObject" "GET" "GroupName" @@ -172,6 +182,26 @@ "IDNScriptWhiteList" "IDNScriptWhiteList.txt" "IMM32.DLL" +"IMN_CHANGECANDIDATE" +"IMN_CLOSECANDIDATE" +"IMN_CLOSESTATUSWINDOW" +"IMN_GUIDELINE" +"IMN_OPENCANDIDATE" +"IMN_OPENSTATUSWINDOW" +"IMN_SETCANDIDATEPOS" +"IMN_SETCOMPOSITIONFONT" +"IMN_SETCOMPOSITIONWINDOW" +"IMN_SETCONVERSIONMODE" +"IMN_SETOPENSTATUS" +"IMN_SETSENTENCEMODE" +"IMN_SETSTATUSWINDOWPOS" +"IMR_CANDIDATEWINDOW" +"IMR_COMPOSITIONFONT" +"IMR_COMPOSITIONWINDOW" +"IMR_CONFIRMRECONVERTSTRING" +"IMR_DOCUMENTFEED" +"IMR_QUERYCHARPOSITION" +"IMR_RECONVERTSTRING" "If-Match" "If-Modified-Since" "If-None-Match" @@ -249,11 +279,11 @@ "PDFViewChangedPage" "PDFViewDisplayModeChanged" "PDFViewScaleChanged" -"PNG" "POST" "PPC" "PauseButton" "PlayButton" +"ProxyRuntimeObject" "Quartz.framework" "RTL" "Referer" @@ -261,6 +291,7 @@ "RewindButton" "SAMILang" "SAMIStyle" +"SCROLLBAR" "Safari.exe" "SeekBackButton" "SeekForwardButton" @@ -268,6 +299,11 @@ "ShowClosedCaptionsButton" "Slider" "SliderThumb" +"Software\\Alps\\Apoint\\TrackPoint" +"Software\\Lenovo\\TrackPoint" +"Software\\Lenovo\\UltraNav" +"Software\\Synaptics\\SynTPEnh\\UltraNavPS2" +"Software\\Synaptics\\SynTPEnh\\UltraNavUSB" "StatusDisplay" "TimeRemainingDisplay" "Times" @@ -317,6 +353,7 @@ "WebElementImageRect" "WebElementImageURL" "WebElementIsContentEditableKey" +"WebElementIsInScrollBar" "WebElementIsSelected" "WebElementLinkIsLive" "WebElementLinkLabel" @@ -336,6 +373,8 @@ "WebFrameUsesApplicationCacheKey" "WebFrameUsesDatabasesKey" "WebFrameUsesGeolocationKey" +"WebGeolocationPolicyListener" +"WebGeolocationPosition" "WebHTMLRepresentation" "WebHistory" "WebHistoryAllItemsRemovedNotification" @@ -481,11 +520,13 @@ "a" "ab" "about:" +"acceleratedCompositingEnabled" "actions" "allowedFileTypes" "allowsMultipleSelection" "allowsOtherFileTypes" "anchorPoint" +"apple-dashboard://stylesheet" "applewebdata" "applewebdata://%@" "application.pdf" @@ -590,9 +631,16 @@ "estimatedProgress" "fi.karppinen.Pyro" "file:" +"file:///System/Library/PrivateFrameworks/DashboardClient.framework/Resources/widget.css" "frameName" +"fsVideoAudioVolumeHigh" +"fsVideoAudioVolumeLow" +"fsVideoExitFullscreen" +"fsVideoPause" +"fsVideoPlay" "ftp:" "fullFrame" +"fullscreenVideeoHUDWindowClass" "groupName" "htm" "html" @@ -615,7 +663,6 @@ "img" "info.colloquy" "insertText:" -"inspectorStartsAttached" "isExtensionHidden" "isLoading" "isindex" @@ -639,24 +686,13 @@ "mainFrameTitle" "mainFrameURL" "mimeType" -"missingImage" "name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@" "nameFieldLabel" "net.hmdt-web.Shiira" -"nullPlugin" "nullplugin" "oleacc.dll" "opacity" "org.xlife.NewsFire" -"panEastCursor" -"panIcon" -"panNorthCursor" -"panNorthEastCursor" -"panNorthWestCursor" -"panSouthCursor" -"panSouthEastCursor" -"panSouthWestCursor" -"panWestCursor" "pluginHostPath" "pluginspage" "position" @@ -671,10 +707,6 @@ "rgb(%.0f,%.0f,%.0f)" "rgba(%.0f,%.0f,%.0f,%f)" "s" -"searchCancel" -"searchCancelPressed" -"searchMagnifier" -"searchMagnifierResults" "showsHiddenFiles" "sourceURL" "src" @@ -697,7 +729,6 @@ "text/x-vcalendar" "text/x-vcard" "text/x-vcf" -"textAreaResizeCorner" "tiff" "transform" "treatsFilePackagesAsDirectories" @@ -708,7 +739,6 @@ "userAgent" "userInfo" "utf-16" -"verticalTextCursor" "visibleName" "visitCount" "webkit-fake-url" @@ -717,8 +747,6 @@ "x-apple-web-kit/" "xml" "xsl" -"zoomInCursor" -"zoomOutCursor" "{A3676398-4485-4a9d-87DC-CB5A40E6351D}" "~/Library/Icons" "~/Library/WebKit/Databases" @@ -740,6 +768,7 @@ WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"filenames" 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" @@ -836,12 +865,14 @@ WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"inspector" WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"true" WebKit/win/WebDatabaseManager.cpp:"Databases" WebKit/win/WebHistoryItem.cpp:"title" +WebKit/win/WebKitDLL.cpp WebKit/win/WebPreferenceKeysPrivate.h WebKit/win/WebPreferences.cpp:"Arial" WebKit/win/WebPreferences.cpp:"Comic Sans MS" WebKit/win/WebPreferences.cpp:"Courier New" WebKit/win/WebPreferences.cpp:"Times New Roman" WebKit/win/WebURLResponse.cpp:"Extension" +WebKit/win/WebView.cpp:")" WebKit/win/WebView.cpp:"Cancel" WebKit/win/WebView.cpp:"Copy" WebKit/win/WebView.cpp:"Cut" @@ -849,4 +880,5 @@ WebKit/win/WebView.cpp:"Delete" WebKit/win/WebView.cpp:"Paste" WebKit/win/WebView.cpp:"Redo" WebKit/win/WebView.cpp:"Undo" +WebKit/win/WebView.cpp:"Unknown (" WebKit/win/WebView.cpp:"about" diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj index dda5966..e6bbab5 100644 --- a/WebKit/WebKit.xcodeproj/project.pbxproj +++ b/WebKit/WebKit.xcodeproj/project.pbxproj @@ -112,7 +112,6 @@ 5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5241ADF40B1BC48A004012BD /* WebCache.mm */; }; 59C77F3510545F7E00506104 /* WebGeolocationMock.mm in Sources */ = {isa = PBXBuildFile; fileRef = 59C77F3310545F7E00506104 /* WebGeolocationMock.mm */; }; 59C77F4B105471E700506104 /* WebGeolocationMockPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 59C77F4A105471E700506104 /* WebGeolocationMockPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 5D1638F30E35B45D00F3038E /* EmptyProtocolDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D1638F20E35B45D00F3038E /* EmptyProtocolDefinitions.h */; }; 5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D7BF8120C2A1D90008CE06D /* WebInspector.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */; }; 5DE83A7A0D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib in Resources */ = {isa = PBXBuildFile; fileRef = 5DE83A740D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib */; }; @@ -166,7 +165,6 @@ 9398102B0824BF01008DF038 /* WebBaseNetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = F5A672B90263866E01000102 /* WebBaseNetscapePluginStream.h */; }; 9398102E0824BF01008DF038 /* WebBasePluginPackage.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E4AF46036652150000E506 /* WebBasePluginPackage.h */; }; 939810310824BF01008DF038 /* WebNetscapePluginPackage.h in Headers */ = {isa = PBXBuildFile; fileRef = F5F7171E0288493C018635CA /* WebNetscapePluginPackage.h */; }; - 939810340824BF01008DF038 /* WebNullPluginView.h in Headers */ = {isa = PBXBuildFile; fileRef = F5883BE0025E5E9D01000102 /* WebNullPluginView.h */; }; 939810350824BF01008DF038 /* WebPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 848DFF840365FE6A00CA2ACA /* WebPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; 939810360824BF01008DF038 /* WebPluginContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 848DFF850365FE6A00CA2ACA /* WebPluginContainer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 939810370824BF01008DF038 /* WebPluginController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8467275C0367158500CA2ACA /* WebPluginController.h */; }; @@ -243,7 +241,6 @@ 939810B00824BF01008DF038 /* WebPluginContainerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 65836F5E07EE425900682F95 /* WebPluginContainerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 939810B10824BF01008DF038 /* WebPluginContainerCheck.h in Headers */ = {isa = PBXBuildFile; fileRef = 65E1150307EFFEBF009B8BF7 /* WebPluginContainerCheck.h */; }; 939810B50824BF01008DF038 /* WebAuthenticationPanel.nib in Resources */ = {isa = PBXBuildFile; fileRef = 9345D17B0365BF35008635CE /* WebAuthenticationPanel.nib */; }; - 939810B60824BF01008DF038 /* nullplugin.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5883BDE025E5C6A01000102 /* nullplugin.tiff */; }; 939810B70824BF01008DF038 /* url_icon.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5B67130023EDF8901C1A525 /* url_icon.tiff */; }; 939810BA0824BF01008DF038 /* IDNScriptWhiteList.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9325FBDC07D829AE00159862 /* IDNScriptWhiteList.txt */; }; 939810BC0824BF01008DF038 /* WebBackForwardList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3944607E020F50ED0ECA1767 /* WebBackForwardList.mm */; }; @@ -265,7 +262,6 @@ 939810D10824BF01008DF038 /* WebBaseNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5A672BA0263866E01000102 /* WebBaseNetscapePluginStream.mm */; }; 939810D30824BF01008DF038 /* WebBasePluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83E4AF47036652150000E506 /* WebBasePluginPackage.mm */; }; 939810D60824BF01008DF038 /* WebNetscapePluginPackage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F7171F0288493C018635CA /* WebNetscapePluginPackage.mm */; }; - 939810D90824BF01008DF038 /* WebNullPluginView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5883BE1025E5E9D01000102 /* WebNullPluginView.mm */; }; 939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8467275D0367158500CA2ACA /* WebPluginController.mm */; }; 939810DB0824BF01008DF038 /* WebPluginDatabase.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F717210288493C018635CA /* WebPluginDatabase.mm */; }; 939810DC0824BF01008DF038 /* WebPluginPackage.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E4AF4C036659440000E506 /* WebPluginPackage.m */; }; @@ -344,10 +340,14 @@ C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0B1F7E610AC8E3100C925D9 /* WebScriptWorld.mm */; }; C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B1F7E710AC8E3100C925D9 /* WebScriptWorldInternal.h */; }; C0B88E8B10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B88E8A10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C0C5B3EE1177A4A0002B0AEF /* WebUserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = C0C5B3EC1177A4A0002B0AEF /* WebUserContentURLPattern.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C0C5B3EF1177A4A0002B0AEF /* WebUserContentURLPattern.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C5B3ED1177A4A0002B0AEF /* WebUserContentURLPattern.mm */; }; DD7CDEE70A23BA9E00069928 /* WebTypesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */; }; DD89682009AA87240097E7F0 /* WebElementDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = DD89681E09AA87240097E7F0 /* WebElementDictionary.h */; }; DD89682109AA87240097E7F0 /* WebElementDictionary.mm in Sources */ = {isa = PBXBuildFile; fileRef = DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */; }; E15663190FB61C1F00C199CA /* WebDownload.mm in Sources */ = {isa = PBXBuildFile; fileRef = E15663180FB61C1F00C199CA /* WebDownload.mm */; }; + E169836211346D1B00894115 /* ProxyRuntimeObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E169836111346D1B00894115 /* ProxyRuntimeObject.h */; }; + E169836C11346D5600894115 /* ProxyRuntimeObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = E169836B11346D5600894115 /* ProxyRuntimeObject.mm */; }; ED5B9524111B725A00472298 /* WebLocalizableStrings.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED5B9523111B725A00472298 /* WebLocalizableStrings.mm */; }; ED6BE2E7088C32B50044DEDC /* WebNSAttributedStringExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = ED6BE2E5088C32B50044DEDC /* WebNSAttributedStringExtras.h */; }; ED6BE2E8088C32B50044DEDC /* WebNSAttributedStringExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED6BE2E6088C32B50044DEDC /* WebNSAttributedStringExtras.mm */; }; @@ -512,7 +512,6 @@ 5241ADF40B1BC48A004012BD /* WebCache.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCache.mm; sourceTree = "<group>"; }; 59C77F3310545F7E00506104 /* WebGeolocationMock.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGeolocationMock.mm; sourceTree = "<group>"; }; 59C77F4A105471E700506104 /* WebGeolocationMockPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationMockPrivate.h; sourceTree = "<group>"; }; - 5D1638F20E35B45D00F3038E /* EmptyProtocolDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmptyProtocolDefinitions.h; sourceTree = "<group>"; }; 5D7BF8120C2A1D90008CE06D /* WebInspector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebInspector.h; sourceTree = "<group>"; }; 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspector.mm; sourceTree = "<group>"; }; 5DE83A750D0F7F9400CAD12A /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/WebJavaScriptTextInputPanel.nib; sourceTree = SOURCE_ROOT; }; @@ -641,10 +640,14 @@ C0B1F7E610AC8E3100C925D9 /* WebScriptWorld.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebScriptWorld.mm; sourceTree = "<group>"; }; C0B1F7E710AC8E3100C925D9 /* WebScriptWorldInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptWorldInternal.h; sourceTree = "<group>"; }; C0B88E8A10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameLoadDelegatePrivate.h; sourceTree = "<group>"; }; + C0C5B3EC1177A4A0002B0AEF /* WebUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentURLPattern.h; sourceTree = "<group>"; }; + C0C5B3ED1177A4A0002B0AEF /* WebUserContentURLPattern.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebUserContentURLPattern.mm; sourceTree = "<group>"; }; DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebTypesInternal.h; sourceTree = "<group>"; }; DD89681E09AA87240097E7F0 /* WebElementDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebElementDictionary.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebElementDictionary.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; E15663180FB61C1F00C199CA /* WebDownload.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDownload.mm; sourceTree = "<group>"; }; + E169836111346D1B00894115 /* ProxyRuntimeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProxyRuntimeObject.h; sourceTree = "<group>"; }; + E169836B11346D5600894115 /* ProxyRuntimeObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ProxyRuntimeObject.mm; sourceTree = "<group>"; }; ED21B9810528F7AA003299AC /* WebDocumentInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDocumentInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; ED2B2474033A2DA800C1A526 /* WebNSPasteboardExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSPasteboardExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; ED2B2475033A2DA800C1A526 /* WebNSPasteboardExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNSPasteboardExtras.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; @@ -668,9 +671,6 @@ F53444CE02E87CBA018635CA /* WebKitStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitStatistics.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; F53444CF02E87CBA018635CA /* WebKitStatistics.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebKitStatistics.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; F53444D202E87D4B018635CA /* WebKitStatisticsPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitStatisticsPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; - F5883BDE025E5C6A01000102 /* nullplugin.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = nullplugin.tiff; sourceTree = "<group>"; }; - F5883BE0025E5E9D01000102 /* WebNullPluginView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNullPluginView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; - F5883BE1025E5E9D01000102 /* WebNullPluginView.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNullPluginView.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; F5927D4E02D26C5E01CA2DBB /* WebKitErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitErrors.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; F59668C802AD2923018635CA /* WebStringTruncator.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebStringTruncator.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; F59668C902AD2923018635CA /* WebStringTruncator.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebStringTruncator.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; @@ -795,7 +795,6 @@ 9325FBDC07D829AE00159862 /* IDNScriptWhiteList.txt */, 939811320824BF01008DF038 /* Info.plist */, 5DE83A7D0D0F7FAD00CAD12A /* Localizable.strings */, - F5883BDE025E5C6A01000102 /* nullplugin.tiff */, ED3B48DE0CC51F7E00DFF1EB /* StringsNotToBeLocalized.txt */, F5B67130023EDF8901C1A525 /* url_icon.tiff */, 5DE83A740D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib */, @@ -819,6 +818,8 @@ 1AAF5CE90EDDE1FE008D883D /* NetscapePluginInstanceProxy.mm */, 1A2DBE9D0F251E3A0036F8A6 /* ProxyInstance.h */, 1A2DBE9E0F251E3A0036F8A6 /* ProxyInstance.mm */, + E169836111346D1B00894115 /* ProxyRuntimeObject.h */, + E169836B11346D5600894115 /* ProxyRuntimeObject.mm */, 1AAF5FBD0EDE3A92008D883D /* WebHostedNetscapePluginView.h */, 1AAF5FBE0EDE3A92008D883D /* WebHostedNetscapePluginView.mm */, 1AAF588A0EDCCEA3008D883D /* WebKitPluginAgent.defs */, @@ -881,7 +882,6 @@ 254DC334016E1D3F0ECA149E /* Misc */ = { isa = PBXGroup; children = ( - 5D1638F20E35B45D00F3038E /* EmptyProtocolDefinitions.h */, 1CCFFD120B1F81F2002EE926 /* OldWebAssertions.c */, 5DE92FEE0BD7017E0059A5FD /* WebAssertions.h */, 5241ADF30B1BC48A004012BD /* WebCache.h */, @@ -956,6 +956,8 @@ F59668C802AD2923018635CA /* WebStringTruncator.h */, F59668C902AD2923018635CA /* WebStringTruncator.mm */, DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */, + C0C5B3ED1177A4A0002B0AEF /* WebUserContentURLPattern.mm */, + C0C5B3EC1177A4A0002B0AEF /* WebUserContentURLPattern.h */, ); name = Misc; path = mac/Misc; @@ -1266,8 +1268,6 @@ 848DFF430365F71500CA2ACA /* WebKit Plug-ins */, 83E4AF46036652150000E506 /* WebBasePluginPackage.h */, 83E4AF47036652150000E506 /* WebBasePluginPackage.mm */, - F5883BE0025E5E9D01000102 /* WebNullPluginView.h */, - F5883BE1025E5E9D01000102 /* WebNullPluginView.mm */, F5F717200288493C018635CA /* WebPluginDatabase.h */, F5F717210288493C018635CA /* WebPluginDatabase.mm */, 224100F2091818D900D2D266 /* WebPluginsPrivate.h */, @@ -1351,7 +1351,6 @@ 939810650824BF01008DF038 /* CarbonWindowAdapter.h in Headers */, 939810660824BF01008DF038 /* CarbonWindowContentView.h in Headers */, 939810670824BF01008DF038 /* CarbonWindowFrame.h in Headers */, - 5D1638F30E35B45D00F3038E /* EmptyProtocolDefinitions.h in Headers */, 939810680824BF01008DF038 /* HIViewAdapter.h in Headers */, 939810690824BF01008DF038 /* HIWebView.h in Headers */, 1A8DED500EE88B8A00F25022 /* HostedNetscapePluginStream.h in Headers */, @@ -1359,6 +1358,7 @@ 1AAF5CEC0EDDE1FE008D883D /* NetscapePluginHostProxy.h in Headers */, 1AAF5CEE0EDDE1FE008D883D /* NetscapePluginInstanceProxy.h in Headers */, 1A2DBE9F0F251E3A0036F8A6 /* ProxyInstance.h in Headers */, + E169836211346D1B00894115 /* ProxyRuntimeObject.h in Headers */, B6CE5C25100BC5F500219936 /* WebApplicationCache.h in Headers */, 9398109A0824BF01008DF038 /* WebArchive.h in Headers */, 5DE92FEF0BD7017E0059A5FD /* WebAssertions.h in Headers */, @@ -1491,7 +1491,6 @@ 65E0F9E608500F23007E5CB9 /* WebNSUserDefaultsExtras.h in Headers */, 939810240824BF01008DF038 /* WebNSViewExtras.h in Headers */, 939810250824BF01008DF038 /* WebNSWindowExtras.h in Headers */, - 939810340824BF01008DF038 /* WebNullPluginView.h in Headers */, 9398102A0824BF01008DF038 /* WebPanelAuthenticationHandler.h in Headers */, A7D3C5BC0B5773C5002CA450 /* WebPasteboardHelper.h in Headers */, 37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */, @@ -1546,6 +1545,7 @@ 939810710824BF01008DF038 /* WebViewPrivate.h in Headers */, 0FD3B0F81076C3F700039B96 /* WebWindowAnimation.h in Headers */, 41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */, + C0C5B3EE1177A4A0002B0AEF /* WebUserContentURLPattern.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1567,6 +1567,7 @@ 939D054F09DA02D500984996 /* Check For Global Initializers */, 9337D6540EBFE54D00DA3CB5 /* Check For Exit Time Destructors */, 5D0D54210E98631D0029E223 /* Check For Weak VTables and Externals */, + 5D88EE6C11407DE800BC3ABC /* Check For Framework Include Consistency */, 5DE6D18C0FCF231B002DE28C /* Symlink WebKitPluginHost in to place */, ); buildRules = ( @@ -1613,7 +1614,6 @@ files = ( 939810BA0824BF01008DF038 /* IDNScriptWhiteList.txt in Resources */, 5DE83A7F0D0F7FAD00CAD12A /* Localizable.strings in Resources */, - 939810B60824BF01008DF038 /* nullplugin.tiff in Resources */, 939810B70824BF01008DF038 /* url_icon.tiff in Resources */, 939810B50824BF01008DF038 /* WebAuthenticationPanel.nib in Resources */, 5DE83A7A0D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib in Resources */, @@ -1685,6 +1685,20 @@ shellPath = /bin/sh; shellScript = "# Touch Info.plist to let Xcode know it needs to copy it into the built product\nif [[ \"${CONFIGURATION}\" != \"Production\" ]]; then\n touch \"${PROJECT_DIR}/mac/Info.plist\";\nfi;\n"; }; + 5D88EE6C11407DE800BC3ABC /* Check For Framework Include Consistency */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check For Framework Include Consistency"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n exit 0;\nfi\n\nif [ -f ../WebKitTools/Scripts/check-for-webkit-framework-include-consistency ]; then\n ../WebKitTools/Scripts/check-for-webkit-framework-include-consistency || exit $?\nfi\n"; + }; 5DE6D18C0FCF231B002DE28C /* Symlink WebKitPluginHost in to place */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1766,6 +1780,7 @@ 939810DD0824BF01008DF038 /* npapi.mm in Sources */, 1CCFFD130B1F81F2002EE926 /* OldWebAssertions.c in Sources */, 1A2DBEA00F251E3A0036F8A6 /* ProxyInstance.mm in Sources */, + E169836C11346D5600894115 /* ProxyRuntimeObject.mm in Sources */, B6CE5C24100BC5CE00219936 /* WebApplicationCache.mm in Sources */, 9398111D0824BF01008DF038 /* WebArchive.mm in Sources */, 939810CF0824BF01008DF038 /* WebAuthenticationPanel.m in Sources */, @@ -1824,6 +1839,7 @@ 939810C50824BF01008DF038 /* WebKitStatistics.m in Sources */, 9398110E0824BF01008DF038 /* WebKitSystemBits.m in Sources */, 1C0D40880AC1C8F40009C113 /* WebKitVersionChecks.m in Sources */, + ED5B9524111B725A00472298 /* WebLocalizableStrings.mm in Sources */, 5185F62810712B97007AA393 /* WebNavigationData.mm in Sources */, 0AB752380FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm in Sources */, 0AEBFF640F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm in Sources */, @@ -1852,7 +1868,6 @@ 65E0F9E708500F23007E5CB9 /* WebNSUserDefaultsExtras.m in Sources */, 939810C90824BF01008DF038 /* WebNSViewExtras.m in Sources */, 939810CA0824BF01008DF038 /* WebNSWindowExtras.m in Sources */, - 939810D90824BF01008DF038 /* WebNullPluginView.mm in Sources */, 939810D00824BF01008DF038 /* WebPanelAuthenticationHandler.m in Sources */, A7D3C5BD0B5773C5002CA450 /* WebPasteboardHelper.mm in Sources */, 37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */, @@ -1888,7 +1903,7 @@ 939810E80824BF01008DF038 /* WebViewFactory.mm in Sources */, 0FD3B0F91076C3F700039B96 /* WebWindowAnimation.m in Sources */, 41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */, - ED5B9524111B725A00472298 /* WebLocalizableStrings.mm in Sources */, + C0C5B3EF1177A4A0002B0AEF /* WebUserContentURLPattern.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog index 245cd9e..ed43fff 100644 --- a/WebKit/chromium/ChangeLog +++ b/WebKit/chromium/ChangeLog @@ -1,3 +1,3764 @@ +2010-04-21 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r58028. + http://trac.webkit.org/changeset/58028 + https://bugs.webkit.org/show_bug.cgi?id=37962 + + broke the chromium build (Requested by tony^work on #webkit). + + * DEPS: + +2010-04-21 Evan Martin <evan@chromium.org> + + Unreviewed, just a dependency change. + + [chromium] roll skia forward to r538 + https://bugs.webkit.org/show_bug.cgi?id=37960 + + This will cause a bunch of pixel tests to fail due to bulleted + lists rendering slightly differently. I will grab new baselines + from the bots and check them in in a followup. + + * DEPS: + +2010-04-21 Evan Stade <estade@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Web page serializer saves tag names in upper case + https://bugs.webkit.org/show_bug.cgi?id=37940 + + Simply convert all tags to lower case. + + This is tested by chrome tests: + - save page browser tests + - encoding ui tests + - web page serializer test shell tests + + * src/WebPageSerializer.cpp: + (WebKit::WebPageSerializer::generateMetaCharsetDeclaration): + (WebKit::WebPageSerializer::generateBaseTagDeclaration): + * src/WebPageSerializerImpl.cpp: + (WebKit::WebPageSerializerImpl::openTagToString): + (WebKit::WebPageSerializerImpl::endTagToString): + +2010-04-20 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * src/ContextMenuClientImpl.cpp: + (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::finishedLoading): + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::encoding): + (WebKit::WebFrameImpl::commitDocumentData): + * src/WebPageSerializerImpl.cpp: + (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): + (WebKit::WebPageSerializerImpl::serialize): + * src/WebSearchableFormData.cpp: + (WebCore::GetFormEncoding): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::pageEncoding): + +2010-04-20 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: add basic script editing capabilities to the front-end. + + https://bugs.webkit.org/show_bug.cgi?id=37875 + + * src/js/DebuggerAgent.js: + (devtools.DebuggerAgent.prototype.resolveScriptSource.this.requestSeqToCallback_.cmd.getSequenceNumber): + (devtools.DebuggerAgent.prototype.resolveScriptSource): + (devtools.DebuggerAgent.prototype.editScriptLine.this.requestSeqToCallback_.cmd.getSequenceNumber): + (devtools.DebuggerAgent.prototype.editScriptLine): + (devtools.DebuggerAgent.prototype.handleDebuggerOutput_): + * src/js/DevTools.js: + * src/js/InspectorControllerImpl.js: + (.devtools.InspectorBackendImpl.prototype.editScriptLine): + +2010-04-20 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Change a parameter type of chooseIconForFiles() + https://bugs.webkit.org/show_bug.cgi?id=37504 + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::chooseIconForFiles): + * src/ChromeClientImpl.h: + +2010-04-20 Jay Civelli <jcivelli@chromium.org> + + Reviewed by Dimitri Glazkov. + + [chromium] Tests that pressing tab now closes the select popup. + https://bugs.webkit.org/show_bug.cgi?id=37721 + + * tests/PopupMenuTest.cpp: + (WebKit::TEST_F): + +2010-04-20 Evan Stade <estade@chromium.org> + + Reviewed by David Levin. + + [chromium] crash when dragging images + https://bugs.webkit.org/show_bug.cgi?id=37715 + + Added unit tests for DragImageChromiumSkia. + + * WebKit.gyp: + * tests/DragImageTest.cpp: Added. + (WebCore::TestImage::TestImage): + (WebCore::TestImage::~TestImage): + (WebCore::TestImage::size): + (WebCore::TestImage::nativeImageForCurrentFrame): + (WebCore::TestImage::destroyDecodedData): + (WebCore::TestImage::decodedSize): + (WebCore::TestImage::draw): + (WebCore::TEST): + +2010-04-20 Stuart Morgan <stuartmorgan@chromium.org> + + Reviewed by David Levin. + + Remove a workaround in plugin cursor setting that was obsoleted by + the change in https://bugs.webkit.org/show_bug.cgi?id=35132 + https://bugs.webkit.org/show_bug.cgi?id=37811 + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::ChromeClientImpl): + (WebKit::ChromeClientImpl::setCursor): + (WebKit::ChromeClientImpl::setCursorForPlugin): + * src/ChromeClientImpl.h: + +2010-04-19 Ada Chan <adachan@apple.com> + + Reviewed by Jeremy Orlow. + + https://bugs.webkit.org/show_bug.cgi?id=37717 + Changes needed now that StorageNamespaceImpl::sessionStorageNamespace() and + StorageNamespace::sessionStorageNamespace() take in a quota parameter. + + * src/StorageNamespaceProxy.cpp: + (WebCore::StorageNamespace::sessionStorageNamespace): + * src/WebStorageNamespaceImpl.cpp: + (WebKit::WebStorageNamespace::createSessionStorageNamespace): + +2010-04-17 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Dimitri Glazkov. + + Adding the implementation of GLES2Context class which provides WebCore access to a GL ES context. + https://bugs.webkit.org/show_bug.cgi?id=37541 + + * WebKit.gyp: + * public/WebGLES2Context.h: Added. + (WebKit::WebGLES2Context::~WebGLES2Context): + * src/GLES2Context.cpp: Added. + (WebCore::GLES2ContextInternal::GLES2ContextInternal): + (WebCore::GLES2ContextInternal::~GLES2ContextInternal): + (WebCore::GLES2ContextInternal::getWebGLES2Context): + (WebCore::GLES2ContextInternal::initialize): + (WebCore::GLES2Context::create): + (WebCore::GLES2Context::~GLES2Context): + (WebCore::GLES2Context::initialize): + (WebCore::GLES2Context::makeCurrent): + (WebCore::GLES2Context::destroy): + (WebCore::GLES2Context::swapBuffers): + +2010-04-16 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Eric Seidel. + + Get rid of the UNUSED_PARAM macro in GraphicsContext3D.cpp. + https://bugs.webkit.org/show_bug.cgi?id=37733 + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3D::GraphicsContext3D): + +2010-04-16 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Jeremy Orlow. + + Changing the return type of WebSecurityOrigin::createFromDatabaseIdentifier(). + https://bugs.webkit.org/show_bug.cgi?id=34466 + + Changing the return type of + WebSecurityOrigin::createFromDatabaseIdentifier() from + WebSecurityOrigin* to WebSecurityOrigin, to make it more + consistent with the other WebSecurityOrigin methods. + + * public/WebSecurityOrigin.h: + * src/WebDatabase.cpp: + (WebKit::WebDatabase::closeDatabaseImmediately): + * src/WebSecurityOrigin.cpp: + (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): + +2010-04-16 Dmitry Titov <dimich@chromium.org> + + Reviewed by Yury Semikhatsky. + + [v8] In Workers, script errors right after close() are not delivered to the Worker.onerror + https://bugs.webkit.org/show_bug.cgi?id=37691 + + * src/WebWorkerClientImpl.cpp: + (WebKit::WebWorkerClientImpl::createWorkerContextProxy): Don't need to pull V8 proxy to retrieve current WorkerContext. + +2010-04-16 Albert J. Wong <ajwong@chromium.org> + + Not reviewed. Build fix. + + [chromium] Compile fix. Missing include header, and missing type conversion. + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::beginPaint): + +2010-04-16 Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com> + + Reviewed by Simon Hausmann. + + [Qt] WebGL is not visible when QGLWidget viewport is used + https://bugs.webkit.org/show_bug.cgi?id=37070 + + Added HostWindow parameter to the constructor of GraphicsContext3D. + Shared OpenGL context is initialized with parent QGLWidget. + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3D::GraphicsContext3D): + +2010-04-16 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by Jian Li. + + [chromium] WebKit::WebURLResponse::addHTTPHeaderField will crash if response is invalid UTF-8 + https://bugs.webkit.org/show_bug.cgi?id=37687 + + * src/WebURLResponse.cpp: + (WebKit::WebURLResponse::addHTTPHeaderField): ignore if name or value is null string. + +2010-04-16 Jay Civelli <jcivelli@chromium.org> + + Reviewed by Dimitri Glazkov. + + [chromium] Select popups would assert when destroyed. + Also adding unit-tests for the select popup code. + https://bugs.webkit.org/show_bug.cgi?id=37436 + + * WebKit.gyp: + * src/WebViewImpl.h: + (WebKit::WebViewImpl::selectPopup): + * tests/PopupMenuTest.cpp: Added. + +2010-04-16 Tony Chang <tony@chromium.org> + + Reviewed by Dimitri Glazkov. + + [chromium] build DRT on Linux + https://bugs.webkit.org/show_bug.cgi?id=37690 + + * DEPS: Need to roll deps to remove a dependency on src/chrome + * gyp_webkit: generate makefiles for DRT.gyp on Linux + +2010-04-15 Tony Chang <tony@chromium.org> + + Reviewed by Dimitri Glazkov. + + build DRT on chromium mac + https://bugs.webkit.org/show_bug.cgi?id=37639 + + * gyp_webkit: generate build files for DRT on mac + +2010-04-15 Yury Semikhatsky <yurys@google.com> + + Reviewed by Pavel Feldman. + + Support basic debugging capabilities including step in/over/out in v8 + implementation of ScriptDebugServer. + + https://bugs.webkit.org/show_bug.cgi?id=37604 + + * WebKit.gypi: + * src/DebuggerAgent.h: + * src/DebuggerAgentImpl.cpp: + (WebKit::DebuggerAgentImpl::setDebuggerScriptSource): + * src/DebuggerAgentImpl.h: + * src/DebuggerAgentManager.cpp: + (WebKit::DebuggerAgentManager::hostDispatchHandler): + (WebKit::DebuggerAgentManager::debugAttach): + (WebKit::DebuggerAgentManager::debugDetach): + (WebKit::DebuggerAgentManager::setMessageLoopDispatchHandler): + * src/DebuggerAgentManager.h: + * src/InspectorFrontendClientImpl.cpp: + (WebKit::InspectorFrontendClientImpl::windowObjectCleared): + * src/js/DebuggerScript.js: Added. + (debuggerScriptConstructor.DebuggerScript.getAfterCompileScript): + (debuggerScriptConstructor.DebuggerScript.getScripts): + (debuggerScriptConstructor.DebuggerScript._formatScript): + (debuggerScriptConstructor.DebuggerScript.setBreakpoint): + (debuggerScriptConstructor.DebuggerScript.removeBreakpoint): + (debuggerScriptConstructor.DebuggerScript.currentCallFrame): + (debuggerScriptConstructor.DebuggerScript.stepIntoStatement): + (debuggerScriptConstructor.DebuggerScript.stepOverStatement): + (debuggerScriptConstructor.DebuggerScript.stepOutOfFunction): + (debuggerScriptConstructor.DebuggerScript.clearBreakpoints): + (debuggerScriptConstructor.DebuggerScript.setBreakpointsActivated): + (debuggerScriptConstructor.DebuggerScript._frameMirrorToJSCallFrame): + (debuggerScriptConstructor.DebuggerScript._webkitToV8LineNumber): + (debuggerScriptConstructor.DebuggerScript._v8ToWwebkitLineNumber): + (debuggerScriptConstructor): + * src/js/DevTools.js: + (WebInspector.loaded): + (.): + (): + * src/js/DevToolsHostStub.js: + (.RemoteDebuggerAgentStub.prototype.setDebuggerScriptSource): + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + +2010-04-15 Matt Perry <mpcomplete@chromium.org> + + Reviewed by Dimitri Glazkov. + + Implement layoutTestController's addUserStyleSheet and + setAuthorAndUserStylesEnabled on Chromium port. + https://bugs.webkit.org/show_bug.cgi?id=37595 + + * public/WebSettings.h: + * public/WebView.h: + * src/WebSettingsImpl.cpp: + (WebKit::WebSettingsImpl::setAuthorAndUserStylesEnabled): + * src/WebSettingsImpl.h: + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::addUserStyleSheet): + * src/WebViewImpl.h: + +2010-04-15 Zhenyao Mo <zmo@google.com> + + Reviewed by Dimitri Glazkov. + + Must enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization + https://bugs.webkit.org/show_bug.cgi?id=37178 + + * src/WebGraphicsContext3DDefaultImpl.cpp: Enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization. + (WebKit::WebGraphicsContext3DDefaultImpl::initialize): + +2010-04-15 Albert J. Wong <ajwong@chromium.org> + + Unreviewed, rolling out r57660. + http://trac.webkit.org/changeset/57660 + https://bugs.webkit.org/show_bug.cgi?id=37604 + + Broke a large number of inspector layout tests in chromium. + + * WebKit.gypi: + * src/DebuggerAgent.h: + * src/DebuggerAgentImpl.cpp: + * src/DebuggerAgentImpl.h: + * src/DebuggerAgentManager.cpp: + (WebKit::DebuggerAgentManager::debugAttach): + (WebKit::DebuggerAgentManager::debugDetach): + (WebKit::DebuggerAgentManager::setMessageLoopDispatchHandler): + * src/DebuggerAgentManager.h: + * src/InspectorFrontendClientImpl.cpp: + (WebKit::InspectorFrontendClientImpl::windowObjectCleared): + * src/js/DebuggerScript.js: Removed. + * src/js/DevTools.js: + (WebInspector.loaded): + (WebInspector.UnresolvedPropertyValue): + (): + * src/js/DevToolsHostStub.js: + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + +2010-04-15 Yury Semikhatsky <yurys@google.com> + + Reviewed by Pavel Feldman. + + Support basic debugging capabilities including step in/over/out in v8 + implementation of ScriptDebugServer. + + https://bugs.webkit.org/show_bug.cgi?id=37604 + + * WebKit.gypi: + * src/DebuggerAgent.h: + * src/DebuggerAgentImpl.cpp: + (WebKit::DebuggerAgentImpl::setDebuggerScriptSource): + * src/DebuggerAgentImpl.h: + * src/DebuggerAgentManager.cpp: + (WebKit::DebuggerAgentManager::hostDispatchHandler): + (WebKit::DebuggerAgentManager::debugAttach): + (WebKit::DebuggerAgentManager::debugDetach): + (WebKit::DebuggerAgentManager::setMessageLoopDispatchHandler): + * src/DebuggerAgentManager.h: + * src/InspectorFrontendClientImpl.cpp: + (WebKit::InspectorFrontendClientImpl::windowObjectCleared): + * src/js/DebuggerScript.js: Added. + (debuggerScriptConstructor.DebuggerScript.getAfterCompileScript): + (debuggerScriptConstructor.DebuggerScript.getScripts): + (debuggerScriptConstructor.DebuggerScript._formatScript): + (debuggerScriptConstructor.DebuggerScript.setBreakpoint): + (debuggerScriptConstructor.DebuggerScript.removeBreakpoint): + (debuggerScriptConstructor.DebuggerScript.currentCallFrame): + (debuggerScriptConstructor.DebuggerScript.stepIntoStatement): + (debuggerScriptConstructor.DebuggerScript.stepOverStatement): + (debuggerScriptConstructor.DebuggerScript.stepOutOfFunction): + (debuggerScriptConstructor.DebuggerScript.clearBreakpoints): + (debuggerScriptConstructor.DebuggerScript.setBreakpointsActivated): + (debuggerScriptConstructor.DebuggerScript._frameMirrorToJSCallFrame): + (debuggerScriptConstructor.DebuggerScript._webkitToV8LineNumber): + (debuggerScriptConstructor.DebuggerScript._v8ToWwebkitLineNumber): + (debuggerScriptConstructor): + * src/js/DevTools.js: + (WebInspector.loaded): + (.): + (): + * src/js/DevToolsHostStub.js: + (.RemoteDebuggerAgentStub.prototype.setDebuggerScriptSource): + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + +2010-04-15 Ben Murdoch <benm@google.com> + + Unreviewed, rolling out r57652. + http://trac.webkit.org/changeset/57652 + https://bugs.webkit.org/show_bug.cgi?id=37609 + + Caused a build break on Chromium Mac and Layout Test fail on + Qt + + * src/WebInputEventConversion.cpp: + (WebKit::toPlatformTouchPointState): + +2010-04-14 Ben Murdoch <benm@google.com> + + Reviewed by Kenneth Rohde Christiansen. + + The TouchStationary state of WebCore::PlatformTouchPoint is not + handled inside the touch event handler. + https://bugs.webkit.org/show_bug.cgi?id=37609 + + After discussions at the WebKit contributors meeting, we decided that + this is a currently unused state without a good future use case in the + Touch API and thus decided to remove it. This patch actions that decision. + + * src/WebInputEventConversion.cpp: + (WebKit::toPlatformTouchPointState): Remove TouchStationary. + +2010-04-12 Tony Chang <tony@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] update chromium DEPS for upstream compile + https://bugs.webkit.org/show_bug.cgi?id=36578 + + * DEPS: Pull sub deps from chromium's DEPS file + +2010-04-14 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57599. + http://trac.webkit.org/changeset/57599 + https://bugs.webkit.org/show_bug.cgi?id=37605 + + "Broke Chromium build" (Requested by dglazkov on #webkit). + + * WebKit.gyp: + * src/WebViewImpl.h: + * tests/PopupMenuTest.cpp: Removed. + +2010-04-14 Aaron Boodman <aa@chromium.org> + + Reviewed by David Levin. + + Support relative URLs for notifications on Chromium. They weren't working previously because WebCore was inserting + the relative URL into a KURL instance, but when KURL is backed by GURL as it is on Chromium, relative URLs are + unsupported. Fixed by resolving the relative URL first. + + https://bugs.webkit.org/show_bug.cgi?id=36623 + + Adding tests for this is difficult because we don't currently have DRT support for notifications on Mac, only Windows. + + * public/WebNotification.h: Remove deprecated icon() method. + * src/WebNotification.cpp: Ditto. + +2010-04-14 Jay Civelli <jcivelli@chromium.org> + + Reviewed by Dimitri Glazkov. + + [chromium] Select popups would assert when destroyed. + Also adding unit-tests for the select popup code. + https://bugs.webkit.org/show_bug.cgi?id=37436 + + * WebKit.gyp: + * src/WebViewImpl.h: + (WebKit::WebViewImpl::selectPopup): + * tests/PopupMenuTest.cpp: Added. + +2010-04-14 Zhenyao Mo <zmo@google.com> + + Reviewed by Dimitri Glazkov. + + readPixels must take PACK_ALIGNMENT into account + https://bugs.webkit.org/show_bug.cgi?id=34718 + + * src/GraphicsContext3D.cpp: Refactor readPixels. + * src/WebGraphicsContext3DDefaultImpl.cpp: + (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): Temporarily disable pack alignment for glReadPixels. + (WebKit::WebGraphicsContext3DDefaultImpl::readPixels): Move array allocation and alpha fix to WebGLRenderingContext; flush before read pixels. + +2010-04-14 Mikhail Naganov <mnaganov@chromium.org> + + Reviewed by Pavel Feldman. + + Re-write testProfilerTab to match the new implementation. + + https://bugs.webkit.org/show_bug.cgi?id=37516 + + * src/js/Tests.js: + (.TestSuite.prototype.testProfilerTab.findDisplayedNode): + (.TestSuite.prototype.testProfilerTab.findVisibleView): + (.TestSuite.prototype.testProfilerTab): + +2010-04-13 Timothy Hatcher <timothy@apple.com> + + Rename SecurityOrigin::whiteListAccessFromOrigin to addOriginAccessWhitelistEntry. + And SecurityOrigin::resetOriginAccessWhiteLists to resetOriginAccessWhitelists. + + SecurityOrigin needs a way to remove individual OriginAccessEntries + https://bugs.webkit.org/show_bug.cgi?id=37449 + + Reviewed by Dave Hyatt. + + * src/WebSecurityPolicy.cpp: + (WebKit::WebSecurityPolicy::whiteListAccessFromOrigin): + (WebKit::WebSecurityPolicy::resetOriginAccessWhiteLists): + +2010-04-13 Mikhail Naganov <mnaganov@chromium.org> + + Reviewed by Pavel Feldman. + + Fix search behavior in Heap profiles. + + https://bugs.webkit.org/show_bug.cgi?id=37498 + + * src/js/HeapProfilerPanel.js: + +2010-04-13 Jeremy Moskovich <jeremy@chromium.org> + + Reviewed by David Levin. + + Add some diagnostics to try to track down cause of crash in ArchiveFactory::isArchiveMimeType(). + + https://bugs.webkit.org/show_bug.cgi?id=36426 + + * src/ResourceHandle.cpp: Track state across ResourceHandle invocations. + (WebCore::ResourceHandleInternal::ResourceHandleInternal): + (WebCore::ResourceHandleInternal::): + (WebCore::ResourceHandleInternal::start): + (WebCore::ResourceHandleInternal::cancel): + (WebCore::ResourceHandleInternal::didReceiveResponse): + (WebCore::ResourceHandleInternal::didReceiveData): + (WebCore::ResourceHandleInternal::didFinishLoading): + (WebCore::ResourceHandleInternal::didFail): + +2010-04-13 Mikhail Naganov <mnaganov@chromium.org> + + Unreviewed Chromium build fix: pin to a newer V8 revision (4386). + + * DEPS: + +2010-04-12 Mikhail Naganov <mnaganov@chromium.org> + + Reviewed by Yury Semikhatsky. + + Replace hand-written JavaScriptProfile* bindings with idl-based, and + in Chromium port, bind them to the new V8's profiler API that is + aligned with JSC. + + https://bugs.webkit.org/show_bug.cgi?id=37448 + + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + * src/js/ProfilerAgent.js: + (devtools.ProfilerAgent): + (devtools.ProfilerAgent.prototype.initializeProfiling): + (devtools.ProfilerAgent.prototype._didGetActiveProfilerModules): + (devtools.ProfilerAgent.prototype._didGetLogLines): + * src/js/Tests.js: + +2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57468. + http://trac.webkit.org/changeset/57468 + https://bugs.webkit.org/show_bug.cgi?id=37433 + + Broke the world... Must have applied the patch wrong + (Requested by abarth on #webkit). + + * src/ContextMenuClientImpl.cpp: + (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::finishedLoading): + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::encoding): + (WebKit::WebFrameImpl::commitDocumentData): + * src/WebPageSerializerImpl.cpp: + (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): + (WebKit::WebPageSerializerImpl::serialize): + * src/WebSearchableFormData.cpp: + (WebCore::GetFormEncoding): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::pageEncoding): + +2010-04-11 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * src/ContextMenuClientImpl.cpp: + (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::finishedLoading): + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::encoding): + (WebKit::WebFrameImpl::commitDocumentData): + * src/WebPageSerializerImpl.cpp: + (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): + (WebKit::WebPageSerializerImpl::serialize): + * src/WebSearchableFormData.cpp: + (WebCore::GetFormEncoding): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::pageEncoding): + +2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57460. + http://trac.webkit.org/changeset/57460 + https://bugs.webkit.org/show_bug.cgi?id=37424 + + broke chromium builders (Requested by tony^work on #webkit). + + * DEPS: + * gyp_webkit: + +2010-04-11 Tony Chang <tony@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] update chromium DEPS for upstream compile + https://bugs.webkit.org/show_bug.cgi?id=36578 + + * DEPS: + * gyp_webkit: Add DumpRenderTree.gyp so we generate xcode projects for DRT. + +2010-04-10 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Dimitri Glazkov. + + Include file change as a result of renaming LayerRenderSkia.h to LayerRenderChromium.h + https://bugs.webkit.org/show_bug.cgi?id=37231 + + * src/WebViewImpl.h: + +2010-04-10 Rafael Weinstein <rafaelw@chromium.org> + + Reviewed by Eric Seidel. + + Cleanup after chromium breakage. All interface methods are + returned to being abstract. + + * public/WebNotificationPresenter.h: + +2010-04-09 Evan Stade <estade@chromium.org> + + Reviewed by Eric Seidel. + + [chromium] Linux: respect the scale factor during printing + https://bugs.webkit.org/show_bug.cgi?id=37168 + + Chromium doesn't support testing .pdfs from printing at the moment, so + this change is not covered by any tests. + + * src/WebFrameImpl.cpp: + (WebKit::ChromePrintContext::spoolPage): + +2010-04-09 Aaron Boodman <aa@chromium.org> + + Reviewed by Eric Seidel. + + Remove applicationID() from WebDocument as it is Chromium-specific. + https://bugs.webkit.org/show_bug.cgi?id=37350 + + * public/WebDocument.h: + * src/WebDocument.cpp: + +2010-04-09 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Adler. + + Move the IDB::open ExceptionCode paramter to be last + https://bugs.webkit.org/show_bug.cgi?id=37277 + + Move the ExceptionCode paramter to the last position in + IndexedDatabaseRequest::open and friends. It should definitely + go after the callbacks to keep the parameters that come directly + from javascript together. And having output parameters appear + last is done often in the code base, so it makes sense to push + it past the Frame* param as well. + + * public/WebIndexedDatabase.h: + * src/IndexedDatabaseProxy.cpp: + (WebCore::IndexedDatabaseProxy::open): + * src/IndexedDatabaseProxy.h: + * src/WebIndexedDatabaseImpl.cpp: + (WebKit::WebIndexedDatabaseImpl::open): + * src/WebIndexedDatabaseImpl.h: + +2010-04-09 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Darin Fisher. + + Complete move of createApplicationCacheHost from WebKitClient to WebFrameClient. + https://bugs.webkit.org/show_bug.cgi?id=37330 + + * public/WebApplicationCacheHost.h: + * public/WebKitClient.h: + * src/ApplicationCacheHostInternal.h: + (WebCore::ApplicationCacheHostInternal::ApplicationCacheHostInternal): + +2010-04-09 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Crash on WebKit::WebGeolocationServiceBridgeImpl::stopUpdating() during frame disconnection + Should not try to access WebViewClient if the frame has already been disconnected. + https://bugs.webkit.org/show_bug.cgi?id=37318 + + * src/WebGeolocationServiceBridgeImpl.cpp: + (WebKit::WebGeolocationServiceBridgeImpl::stopUpdating): + +2010-04-09 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Adam Barth. + + Expose SecurityOrigin::canRequest in WebSecurityOrigin. + https://bugs.webkit.org/show_bug.cgi?id=37271 + + * public/WebSecurityOrigin.h: + * src/WebSecurityOrigin.cpp: + (WebKit::WebSecurityOrigin::canRequest): + +2010-04-09 Zhenyao Mo <zmo@google.com> + + Reviewed by Dimitri Glazkov. + + Must resolve multisampled back buffer during copyTexImage2D and copyTexSubImage2D + https://bugs.webkit.org/show_bug.cgi?id=37174 + + Test: fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html + + * src/WebGraphicsContext3DDefaultImpl.cpp: Resolve multisampled back buffer during copyTexImage2D and copyTexSubImage2D. + (WebKit::WebGraphicsContext3DDefaultImpl::copyTexImage2D): + (WebKit::WebGraphicsContext3DDefaultImpl::copyTexSubImage2D): + +2010-04-07 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Yury Semikhatsky. + + Chromium: support themes in devtools window. + + https://bugs.webkit.org/attachment.cgi?bugid=37216 + + * WebKit.gypi: + * src/js/DevTools.js: + (WebInspector.setToolbarColors): + (WebInspector.resetToolbarColors): + * src/js/Images/segmentChromium2.png: Added. + * src/js/Images/segmentHoverChromium2.png: Added. + * src/js/Images/segmentSelectedChromium2.png: Added. + * src/js/Images/statusbarBackgroundChromium2.png: Added. + * src/js/Images/statusbarMenuButtonChromium2.png: Added. + +2010-04-07 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Yury Semikhatsky. + + Removed inspector methods from ScriptExecutionContext and derived classes. + Removed MessageDestination parameter from console-related calls (we now always + log to the same destination(s)). + Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest() + https://bugs.webkit.org/show_bug.cgi?id=36949 + + * public/WebCommonWorkerClient.h: + (WebKit::WebCommonWorkerClient::postConsoleMessageToWorkerObject): + * src/FrameLoaderClientImpl.cpp: + * src/FrameLoaderClientImpl.h: + * src/WebWorkerBase.cpp: + (WebKit::WebWorkerBase::postConsoleMessageToWorkerObject): + (WebKit::WebWorkerBase::postConsoleMessageTask): + * src/WebWorkerBase.h: + * src/WebWorkerClientImpl.cpp: + (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObject): + (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObjectTask): + * src/WebWorkerClientImpl.h: + +2010-04-07 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] WebIDBDatabaseError::assign doesn't work correctly + https://bugs.webkit.org/show_bug.cgi?id=37209 + + * src/WebIDBDatabaseError.cpp: + (WebKit::WebIDBDatabaseError::assign): + +2010-04-07 Dawit Alemayehu <adawit@kde.org> + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=36827 + + Updated the WebCore::shouldTreatAsAttachement function call with the + new more generic replacement WebCore::contentDispositionType. + + See comments 39-42 in https://bugs.webkit.org/show_bug.cgi?id=36395 + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType): + +2010-04-07 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Darin Fisher. + + Add createApplicationCacheHost to WebFrameClient so + the ApplicationCacheHost has access to its frame. + + https://bugs.webkit.org/show_bug.cgi?id=36882 + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::createApplicationCacheHost): + * src/ApplicationCacheHostInternal.h: + (WebCore::ApplicationCacheHostInternal::ApplicationCacheHostInternal): + +2010-04-06 Nicolas Weber <thakis@chromium.org> + + Reviewed by Dimitri Glazkov. + + Use drag images on OS X as well. + https://bugs.webkit.org/show_bug.cgi?id=37069 + + * src/DragClientImpl.cpp: + (WebKit::DragClientImpl::startDrag): + +2010-04-06 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Dimitri Glazkov. + + Changing references to Graphics Layer related classes from *Skia to *Chromium. + https://bugs.webkit.org/show_bug.cgi?id=37116 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::paint): + (WebKit::WebViewImpl::setAcceleratedCompositing): + (WebKit::WebViewImpl::updateRootLayerContents): + * src/WebViewImpl.h: + +2010-04-06 James Hawkins <jhawkins@chromium.org> + + Reviewed by Adam Barth. + + [Chromium] Implement WebInputElement::maxLength. + https://bugs.webkit.org/show_bug.cgi?id=37172 + + * public/WebInputElement.h: + * src/WebInputElement.cpp: + (WebKit::WebInputElement::maxLength): + +2010-04-06 Evan Stade <estade@chromium.org> + + Reviewed by Dimitri Glazkov. + + [chromium] need DragImage implementation + https://bugs.webkit.org/show_bug.cgi?id=35811 + + Basic implementation using SkBitmap. Transformations are not supported + yet. No implementation for mac. + + This was previously committed but rolled back for breaking layout + tests. + + * public/WebViewClient.h: + (WebKit::WebViewClient::startDragging): + * src/DragClientImpl.cpp: + (WebKit::DragClientImpl::startDrag): new: check for null dragImage. + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::startDragging): + * src/WebViewImpl.h: + +2010-04-06 James Hawkins <jhawkins@chromium.org> + + Reviewed by Dimitri Glazkov. + + [Chromium] Move the getElementsByTagName from WebDocument to WebNode. + https://bugs.webkit.org/show_bug.cgi?id=37161 + + * public/WebDocument.h: + * public/WebNode.h: + * src/WebDocument.cpp: + * src/WebNode.cpp: + (WebKit::WebNode::getElementsByTagName): + +2010-04-06 Ilya Tikhonovsky <loislo@chromium.org> + + Unreviewed build fix for Chromium DEPS. + + * DEPS: + +2010-04-06 Ilya Tikhonovsky <loislo@chromium.org> + + Unreviewed: build fix. + + * DEPS: + +2010-04-06 Mattias Nissler <mnissler@chromium.org> + + Reviewed by Pavel Feldman. + + Handle docking requests from the developer tools and forward them to + WebDevToolsFrontendClient. + https://bugs.webkit.org/show_bug.cgi?id=36944 + + * public/WebDevToolsFrontendClient.h: + (WebKit::WebDevToolsFrontendClient::requestDockWindow): + * src/WebDevToolsFrontendImpl.cpp: + (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): + (WebKit::WebDevToolsFrontendImpl::jsRequestAttachWindow): + * src/WebDevToolsFrontendImpl.h: + +2010-04-06 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Yury Semikhatsky. + + Fixed logging of unhndled worker exceptions. + https://bugs.webkit.org/show_bug.cgi?id=37143 + + * src/WebWorkerClientImpl.cpp: + (WebKit::WebWorkerClientImpl::postExceptionToWorkerObject): + +2010-04-05 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=37111 + <rdar://problem/7790327> Draw replacement text when plug-in host crashes + + * src/LocalizedStrings.cpp: (WebCore::crashedPluginText): Added a stub string for plug-in + failure. + +2010-04-04 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed. Rolling out chromium changes r57028 and r57032 + for breaking chromium layout tests. + + * public/WebViewClient.h: + (WebKit::WebViewClient::startDragging): + * src/DragClientImpl.cpp: + (WebKit::DragClientImpl::startDrag): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::startDragging): + * src/WebViewImpl.h: + +2010-04-03 Darin Fisher <darin@chromium.org> + + Add default implementations of WebNotificationPresenter methods to + repair the downstream Chromium build. + + * public/WebNotificationPresenter.h: + (WebKit::WebNotificationPresenter::show): + (WebKit::WebNotificationPresenter::cancel): + (WebKit::WebNotificationPresenter::objectDestroyed): + (WebKit::WebNotificationPresenter::checkPermission): + (WebKit::WebNotificationPresenter::requestPermission): + +2010-04-02 Michael Nordman <michaeln@google.com> + + Reviewed by Nate Chapin. + + Set the close policy used by the DatabaseCloseTask at this callsite to + RemoveDatabaseFromContext. This restores its behavior to what it was prior to + r56293. + https://bugs.webkit.org/show_bug.cgi?id=37037 + + * src/WebDatabase.cpp: + (WebKit::WebDatabase::closeDatabaseImmediately): + +2010-04-02 Evan Stade <estade@chromium.org> + + Reviewed by Eric Seidel. + + [chromium] need DragImage implementation + https://bugs.webkit.org/show_bug.cgi?id=35811 + + Use the DragImageRef that the DragController passes to us. + + * public/WebViewClient.h: + (WebKit::WebViewClient::startDragging): + * src/DragClientImpl.cpp: + (WebKit::DragClientImpl::startDrag): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::startDragging): + * src/WebViewImpl.h: + +2010-04-02 Rafael Weinstein <rafaelw@chromium.org> + + Reviewed by Adam Barth. + + Clean up unused calls after changes to checkPermission and requestPermission argument lists. + + * public/WebNotificationPresenter.h: + * src/NotificationPresenterImpl.cpp: + (WebKit::NotificationPresenterImpl::checkPermission): + (WebKit::NotificationPresenterImpl::requestPermission): + +2010-04-02 Zhenyao Mo <zmo@google.com> + + Reviewed by Eric Seidel. + + Implement and test new framebuffer object attachment behavior. + https://bugs.webkit.org/show_bug.cgi?id=35611 + + Test: fast/canvas/webgl/framebuffer-object-attachment.html + + * src/WebGraphicsContext3DDefaultImpl.cpp: Map to correct DEPTH_STENCIL format. + (WebKit::WebGraphicsContext3DDefaultImpl::framebufferRenderbuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::getFramebufferAttachmentParameteriv): + (WebKit::WebGraphicsContext3DDefaultImpl::renderbufferStorage): + +2010-04-02 Jay Civelli <jcivelli@chromium.org> + + Reviewed by Darin Fisher. + + The popup type (select or suggestion) is now passed to the + WebClient::createPopupMenu() method. This is required for + Chromium on Linux to make the select popups work correctly. + https://bugs.webkit.org/show_bug.cgi?id=37013 + + * WebKit.gyp: + * public/WebPopupType.h: Added. + (WebKit::): + * public/WebViewClient.h: + (WebKit::WebViewClient::createPopupMenu): + * src/ChromeClientImpl.cpp: + (WebCore::convertPopupType): + (WebKit::ChromeClientImpl::popupOpened): + +2010-04-02 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Implement InspectorFrontendClient in Chromium and remove all custom bindings for the host methods from WebDevToolsFrontendImpl. + + https://bugs.webkit.org/show_bug.cgi?id=36817 + + * WebKit.gyp: + * src/InspectorFrontendClientImpl.cpp: Added. + (WebKit::InspectorFrontendClientImpl::InspectorFrontendClientImpl): + (WebKit::InspectorFrontendClientImpl::~InspectorFrontendClientImpl): + (WebKit::InspectorFrontendClientImpl::windowObjectCleared): + (WebKit::InspectorFrontendClientImpl::frontendLoaded): + (WebKit::InspectorFrontendClientImpl::moveWindowBy): + (WebKit::InspectorFrontendClientImpl::localizedStringsURL): + (WebKit::InspectorFrontendClientImpl::hiddenPanels): + (WebKit::InspectorFrontendClientImpl::bringToFront): + (WebKit::InspectorFrontendClientImpl::closeWindow): + (WebKit::InspectorFrontendClientImpl::canAttachWindow): + (WebKit::InspectorFrontendClientImpl::attachWindow): + (WebKit::InspectorFrontendClientImpl::detachWindow): + (WebKit::InspectorFrontendClientImpl::changeAttachedWindowHeight): + (WebKit::InspectorFrontendClientImpl::inspectedURLChanged): + * src/InspectorFrontendClientImpl.h: Added. + * src/WebDevToolsFrontendImpl.cpp: + (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): + (WebKit::WebDevToolsFrontendImpl::~WebDevToolsFrontendImpl): + (WebKit::WebDevToolsFrontendImpl::frontendLoaded): + * src/WebDevToolsFrontendImpl.h: + * src/js/DebuggerAgent.js: + (devtools.DebuggerAgent.prototype.doHandleBacktraceResponse_): + * src/js/DevTools.js: + (): + +2010-04-01 Jay Civelli <jcivelli@google.com> + + Reviewed by David Levin. + + Adds a method to WebFrame to execute JavaScript and get the value + it evaluates to. + https://bugs.webkit.org/show_bug.cgi?id=36907 + + * public/WebFrame.h: + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::executeScriptAndReturnValue): + * src/WebFrameImpl.h: + +2010-04-01 Kinuko Yasuda <kinuko@chromium.org> + + Reviewed by Dmitry Titov. + + Add FileThread for async file operation support in FileReader and FileWriter + https://bugs.webkit.org/show_bug.cgi?id=36896 + + Add ENABLE_FILE_READER and ENABLE_FILE_WRITER flags. + + * features.gypi: + +2010-04-01 Finnur Thorarinsson <finnur.webkit@gmail.com> + + Reviewed by Eric Seidel. + + [chromium] FindInPage on multi-frame pages wasn't always updating + tickmarks on scrollbars for the subframes. It was calling invalidateRect + on the View and specifying a rect that's in window coordinates, whereas + the invalidateRect expects frame coordinates. + + https://bugs.webkit.org/show_bug.cgi?id=36982 + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::invalidateArea): + +2010-04-01 Finnur Thorarinsson <finnur.webkit@gmail.com> + + Reviewed by Dimitri Glazkov. + + [chromium] FindInPage should clear the focused node when a match has + been found. This is because WebFrameImpl::setFocus will try to refocus + editable elements if it thinks they have focus, causing the page to + scroll. + + https://bugs.webkit.org/show_bug.cgi?id=36923 + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::find): + +2010-04-01 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + As a follow up on https://bugs.webkit.org/show_bug.cgi?id=36535, remove: + GeolocationServiceBridgeChromium.h + dettachBridge() + getGeolocationService() + https://bugs.webkit.org/show_bug.cgi?id=36895 + + * WebKit.gyp: + * public/GeolocationServiceBridgeChromium.h: Removed. + * public/WebGeolocationService.h: + (WebKit::WebGeolocationService::detachBridge): + * public/WebViewClient.h: + (WebKit::WebViewClient::geolocationService): + +2010-03-31 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Nate Chapin. + + Misc IndexedDatabase cleanup + https://bugs.webkit.org/show_bug.cgi?id=36889 + + Plumb the Frame* so Chromium knows where the request originated from. + + * public/WebIndexedDatabase.h: + * src/IndexedDatabaseProxy.cpp: + (WebCore::IndexedDatabaseProxy::open): + * src/IndexedDatabaseProxy.h: + * src/WebIndexedDatabaseImpl.cpp: + (WebKit::WebIndexedDatabaseImpl::open): + * src/WebIndexedDatabaseImpl.h: + +2010-03-31 Alpha Lam <hclam@chromium.org> + + Not reviewed. Build fix. + + Fixing a build break caused by 56872. One of the Chromium bots doesn't + like std::strstr(). Includes string.h and use strstr() instead. + + * src/WebGraphicsContext3DDefaultImpl.cpp: + (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes): + Includes string.h and use strstr(). + +2010-03-31 Zhenyao Mo <zmo@google.com> + + Reviewed by Darin Fisher. + + Hook up WebGLContextAttributes to OpenGL context creation code + https://bugs.webkit.org/show_bug.cgi?id=33416 + + * src/WebGraphicsContext3DDefaultImpl.cpp: Hook up WebGLContextAttributes to OpenGL context creation code for Chrome. + (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): + (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): + (WebKit::WebGraphicsContext3DDefaultImpl::initialize): + (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes): + (WebKit::WebGraphicsContext3DDefaultImpl::reshape): + (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::bindFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::readPixels): Deal with wrong returned alpha values in Mac. + * src/WebGraphicsContext3DDefaultImpl.h: Add a function. + +2010-03-31 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + [chromium] including WebKit.gyp:webkit should automatically add Skia + and NPAPI include paths + + https://bugs.webkit.org/show_bug.cgi?id=36887 + + * WebKit.gyp: + +2010-03-31 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Implements cancelGeolocationPermissionRequestForFrame. + https://bugs.webkit.org/show_bug.cgi?id=35031 + + * public/WebGeolocationService.h: + (WebKit::WebGeolocationService::cancelPermissionRequestForFrame): + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame): + * src/ChromeClientImpl.h: + +2010-03-31 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed. Rolling out r56829 since it broke chromium layout tests. + + [REGRESSION] Inspector tests started crashing since r56829 + https://bugs.webkit.org/show_bug.cgi?id=36888 + + * public/WebFrameClient.h: + * src/FrameLoaderClientImpl.cpp: + * src/FrameLoaderClientImpl.h: + +2010-03-31 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Add stubs for moveWindowBy and setAttachedWindowHeight. + + https://bugs.webkit.org/show_bug.cgi?id=36842 + + * src/WebDevToolsFrontendImpl.cpp: + (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): + (WebKit::WebDevToolsFrontendImpl::jsSetAttachedWindowHeight): + (WebKit::WebDevToolsFrontendImpl::jsMoveWindowBy): + * src/WebDevToolsFrontendImpl.h: + +2010-03-31 John Gregg <johnnyg@google.com> + + Reviewed by Darin Fisher. + + [chromium] add logging of cross-frame property accesses for site isolation + https://bugs.webkit.org/show_bug.cgi?id=35773 + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::logCrossFramePropertyAccess): + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::logCrossFramePropertyAccess): + * src/FrameLoaderClientImpl.h: + +2010-03-30 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=36866 + Move CString to WTF + + * public/WebCString.h: + * src/FrameLoaderClientImpl.cpp: + * src/GraphicsContext3D.cpp: + * src/WebCString.cpp: + (WebKit::WebCString::assign): + (WebKit::WebCString::WebCString): + (WebKit::WebCString::operator=): + (WebKit::WebCString::operator WTF::CString): + * src/WebMediaPlayerClientImpl.cpp: + * src/WebString.cpp: + * src/WebURLError.cpp: + +2010-03-30 Marcus Bulach <bulach@chromium.org> + + Reviewed by Darin Fisher. + + Rename / tidy up Geolocation bridge: + Rename GeolocationServiceBridgeChromium.cpp to WebGeolocationServiceBridgeImpl.cpp + Uses a temporary compatibility layer in GeolocationServiceBridgeChromium.h. + + https://bugs.webkit.org/show_bug.cgi?id=36535 + + * WebKit.gyp: + * public/GeolocationServiceBridgeChromium.h: + * public/WebGeolocationService.h: Copied from WebKit/chromium/public/GeolocationServiceBridgeChromium.h. + (WebKit::WebGeolocationService::detachBridge): + * public/WebGeolocationServiceBridge.h: Copied from WebKit/chromium/public/GeolocationServiceBridgeChromium.h. + * public/WebViewClient.h: + (WebKit::WebViewClient::geolocationService): + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame): + * src/ChromiumBridge.cpp: + * src/GeolocationServiceBridgeChromium.cpp: Removed. + * src/WebGeolocationServiceBridgeImpl.cpp: Copied from WebKit/chromium/src/GeolocationServiceBridgeChromium.cpp. + (WebKit::createGeolocationServiceBridgeImpl): + (WebKit::WebGeolocationServiceBridgeImpl::WebGeolocationServiceBridgeImpl): + (WebKit::WebGeolocationServiceBridgeImpl::~WebGeolocationServiceBridgeImpl): + (WebKit::WebGeolocationServiceBridgeImpl::startUpdating): + (WebKit::WebGeolocationServiceBridgeImpl::stopUpdating): + (WebKit::WebGeolocationServiceBridgeImpl::suspend): + (WebKit::WebGeolocationServiceBridgeImpl::resume): + (WebKit::WebGeolocationServiceBridgeImpl::getBridgeId): + (WebKit::WebGeolocationServiceBridgeImpl::setIsAllowed): + (WebKit::WebGeolocationServiceBridgeImpl::setLastPosition): + (WebKit::WebGeolocationServiceBridgeImpl::setLastError): + (WebKit::WebGeolocationServiceBridgeImpl::getWebViewClient): + * src/WebGeolocationServiceBridgeImpl.h: Copied from WebKit/chromium/public/GeolocationServiceBridgeChromium.h. + +2010-03-30 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Jeremy Orlow. + + Remove dysfunctional implementation of canEstablishDatabase for + Workers. I postpone this implementation until Workers can actually + access Web Databases. + + https://bugs.webkit.org/show_bug.cgi?id=36795 + + * src/DatabaseObserver.cpp: + (WebCore::DatabaseObserver::canEstablishDatabase): + * src/WebWorkerBase.h: + +2010-03-29 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + More IndexedDB work + https://bugs.webkit.org/show_bug.cgi?id=36770 + + Start the implementation of WebIndexedDatabase (for entrance back into WebKit). + + * WebKit.gyp: + * public/WebIndexedDatabase.h: + * src/WebIndexedDatabaseImpl.cpp: Added. + (WebKit::WebIndexedDatabase::create): + (WebKit::WebIndexedDatabaseImpl::~WebIndexedDatabaseImpl): + (WebKit::WebIndexedDatabaseImpl::open): + * src/WebIndexedDatabaseImpl.h: Added. + +2010-03-29 Rafael Weinstein <rafaelw@chromium.org> + + Reviewed by Adam Barth. + + Change NotificationPresenter::checkPermission() to take the source frames full KURL, + rather than its SecurityOrigin. This will aid chromium in having more fine grained + permissions to control notification spam. + + * public/WebNotificationPresenter.h: + (WebKit::WebNotificationPresenter::checkPermission): + * src/NotificationPresenterImpl.cpp: + (WebKit::NotificationPresenterImpl::checkPermission): + * src/NotificationPresenterImpl.h: + +2010-03-29 Dawit Alemayehu <adawit@kde.org> + + Reviewed by Simon Hausmann. + + Factored out the 'ShouldTreatAsAttachment' function to HTTPParsers.* + and replacted local version with the factored out version. + + The code was factored out to make possible its use in other implementations + such as QtWebKit. + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType): + +2010-03-29 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Darin Fisher. + + Pass a WebFrame to WebFrameClient::allowDatabase instead of a WebSecurityOrigin + https://bugs.webkit.org/show_bug.cgi?id=36743 + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::allowDatabase): + * src/DatabaseObserver.cpp: + (WebCore::DatabaseObserver::canEstablishDatabase): + +2010-03-24 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + More IndexedDB plumbing + https://bugs.webkit.org/show_bug.cgi?id=36546 + + Plumbing work towards the goal of making IndexedDatabase::open work. + + * WebKit.gyp: + * public/WebIDBCallbacks.h: Added. + (WebKit::WebIDBCallbacks::~WebIDBCallbacks): + * public/WebIDBDatabase.h: Added. + (WebKit::WebIDBDatabase::~WebIDBDatabase): + * public/WebIDBDatabaseError.h: Added. + (WebKit::WebIDBDatabaseError::WebIDBDatabaseError): + (WebKit::WebIDBDatabaseError::operator=): + * public/WebIndexedDatabase.h: + * public/WebKitClient.h: + (WebKit::WebKitClient::indexedDatabase): + * public/WebSerializedScriptValue.h: + * src/IDBCallbacksProxy.h: Added. + (WebCore::IDBCallbacksProxy::IDBCallbacksProxy): + (WebCore::IDBCallbacksProxy::~IDBCallbacksProxy): + (WebCore::IDBCallbacksProxy::onSuccess): + (WebCore::IDBCallbacksProxy::onError): + * src/IDBDatabaseProxy.cpp: Added. + (WebCore::IDBDatabaseProxy::create): + (WebCore::IDBDatabaseProxy::IDBDatabaseProxy): + (WebCore::IDBDatabaseProxy::~IDBDatabaseProxy): + * src/IDBDatabaseProxy.h: Added. + * src/IndexedDatabaseProxy.cpp: + (WebCore::IndexedDatabaseProxy::IndexedDatabaseProxy): + (WebCore::IndexedDatabaseProxy::open): + * src/IndexedDatabaseProxy.h: + * src/WebIDBDatabaseError.cpp: Added. + (WebKit::WebIDBDatabaseError::~WebIDBDatabaseError): + (WebKit::WebIDBDatabaseError::WebIDBDatabaseError): + (WebKit::WebIDBDatabaseError::assign): + (WebKit::WebIDBDatabaseError::code): + (WebKit::WebIDBDatabaseError::message): + (WebKit::WebIDBDatabaseError::operator=): + (WebKit::WebIDBDatabaseError::operator PassRefPtr<IDBDatabaseError>): + +2010-03-29 Mikhail Naganov <mnaganov@chromium.org> + + Reviewed by Pavel Feldman. + + Remove a possibility of confusion from Profiles panel Welcome screen + by turning buttons into non-clickable glyphs. Also, span instructions + alongside panel width. + + https://bugs.webkit.org/show_bug.cgi?id=34319 + + * src/js/HeapProfilerPanel.js: + (WebInspector.HeapSnapshotProfileType.prototype.get welcomeMessage): + +2010-03-28 Alexey Proskuryakov <ap@apple.com> + + Build fix. Removed extraneous includes of KeyboardCodesWin.h and KeyboardCodesPosix.h - + these no longer exist, but they weren't needed even before reshuffling KeyboardCodes headers. + + * src/WebViewImpl.cpp: + +2010-03-27 Kenneth Russell <kbr@google.com> + + Reviewed by Darin Fisher. + + Use WebKitClient to instantiate WebGraphicsContext3D + https://bugs.webkit.org/show_bug.cgi?id=36669 + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::initialize): + +2010-03-24 James Hawkins <jhawkins@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Implement WebFormControlElement and WebSelectElement. Add + a getFormControlElements method to WebFormElement. + + https://bugs.webkit.org/show_bug.cgi?id=36562 + + * WebKit.gyp: + * public/WebElement.h: + * public/WebFormControlElement.h: Added. + * public/WebFormElement.h: + * public/WebInputElement.h: + (WebKit::WebInputElement::WebInputElement): + (WebKit::WebInputElement::operator=): + (WebKit::WebInputElement::assign): + * public/WebSelectElement.h: Added. + * src/WebElement.cpp: + (WebKit::WebElement::isFormControlElement): + * src/WebFormControlElement.cpp: Added. + * src/WebFormElement.cpp: + (WebKit::WebFormElement::getFormControlElements): + * src/WebInputElement.cpp: + (WebKit::WebInputElement::WebInputElement): + * src/WebSelectElement.cpp: Added. + +2010-03-26 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Pavel Feldman. + + Send worker resource content to inspector to enable display of web + workers in inspector's resource tab. + https://bugs.webkit.org/show_bug.cgi?id=36658 + + * src/SharedWorkerRepository.cpp: + (WebCore::SharedWorkerScriptLoader::notifyFinished): + +2010-03-25 Tony Chang <tony@chromium.org> + + Reviewed by David Levin. + + [chromium] correctly handle move drag operations + https://bugs.webkit.org/show_bug.cgi?id=36484 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::dragTargetDragEnter): + (WebKit::WebViewImpl::dragTargetDragOver): + (WebKit::WebViewImpl::dragTargetDragEnterOrOver): Combine common code into a helper method + and properly mask against the drag effect. + (WebKit::WebViewImpl::createUniqueIdentifierForRequest): + * src/WebViewImpl.h: + +2010-03-25 Drew Wilson <atwilson@chromium.org> + + Reviewed by Nate Chapin. + + [v8] Error in getScriptExecutionContext() when worker context is terminating + https://bugs.webkit.org/show_bug.cgi?id=36565 + + Test: Existing worker tests suffice. + + * src/WebWorkerClientImpl.cpp: + (WebKit::WebWorkerClientImpl::createWorkerContextProxy): + Changed to use WorkerScriptController::controllerForContext() instead of WorkerScriptExecutionProxy::retrieve(). + +2010-03-25 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Add an ASSERT macro to the Chromium WebKit API + https://bugs.webkit.org/show_bug.cgi?id=36545 + + * WebKit.gyp: Add WebCommon.cpp + * public/WebCommon.h: Add the Macro. + * public/WebPrivatePtr.h: + (WebKit::WebPrivatePtr::~WebPrivatePtr): Verify the pointer is now 0. + * src/WebCommon.cpp: Added. + (WebKit::failedAssertion): Calls the WTF assert function and then crashes. + +2010-03-25 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Jeremy Orlow. + + Remove ASSERT(isMainThread()) which is violated for workers and not necessary at this point. + https://bugs.webkit.org/show_bug.cgi?id=36614 + + * src/DatabaseObserver.cpp: + (WebCore::DatabaseObserver::canEstablishDatabase): + +2010-03-25 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Jeremy Orlow. + + Forward DatabaseTracker::canEstablishDatabase to chromium layer. + https://bugs.webkit.org/show_bug.cgi?id=36595 + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::allowDatabase): + * src/DatabaseObserver.cpp: + (WebCore::DatabaseObserver::canEstablishDatabase): + * src/WebWorkerBase.h: + (WebKit::WebWorkerBase::allowDatabase): + +2010-03-10 John Abd-El-Malek <jam@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Fix up WebMouseWheelEventBuilder to properly calculate the units + https://bugs.webkit.org/show_bug.cgi?id=35989 + + * src/WebInputEventConversion.cpp: + +2010-03-24 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Dimitri Glazkov. + + Eliminate unecessary redraws of GraphicsLayer contents when doing accelerated compositing: + https://bugs.webkit.org/show_bug.cgi?id=36470 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::paint): + Remove call that forced redrawing the contents of the entire layer hierarchy. + +2010-03-24 Dmitry Titov <dimich@chromium.org> + + No review, rolling out r56453. + http://trac.webkit.org/changeset/56453 + https://bugs.webkit.org/show_bug.cgi?id=36426 + + In Chromium port, it broke invalid-image-data-standalone.html + invalid-image-data.html multipart-wait-before-boundary.html + stop-crash.html win-boundary-crash.html + + * src/ResourceHandle.cpp: + (WebCore::ResourceHandleInternal::ResourceHandleInternal): + (WebCore::ResourceHandleInternal::start): + (WebCore::ResourceHandleInternal::cancel): + (WebCore::ResourceHandleInternal::didReceiveResponse): + (WebCore::ResourceHandleInternal::didReceiveData): + (WebCore::ResourceHandleInternal::didFinishLoading): + (WebCore::ResourceHandleInternal::didFail): + +2010-03-24 John Abd-El-Malek <jam@chromium.org> + + Reviewed by Darin Fisher. + + [chromium]WebKit side of adding search support to Pepper. + https://bugs.webkit.org/show_bug.cgi?id=36434 + + * WebKit.gyp: + * public/WebDocument.h: + * public/WebNode.h: + (WebKit::WebNode::to): + (WebKit::WebNode::toConst): + * public/WebPluginDocument.h: Added. + (WebKit::WebPluginDocument::WebPluginDocument): + (WebKit::WebPluginDocument::operator=): + (WebKit::WebPluginDocument::assign): + * src/WebDocument.cpp: + (WebKit::WebDocument::isPluginDocument): + * src/WebPluginDocument.cpp: Added. + (WebKit::WebPluginDocument::plugin): + (WebKit::WebPluginDocument::WebPluginDocument): + (WebKit::WebPluginDocument::operator=): + (WebKit::WebPluginDocument::operator PassRefPtr<PluginDocument>): + +2010-03-24 Jeremy Moskovich <jeremy@chromium.org> + + Reviewed by Jeremy Orlow. + + Add some diagnostics to try to track down cause of crash in ArchiveFactory::isArchiveMimeType(). + + https://bugs.webkit.org/show_bug.cgi?id=36426 + + * src/ResourceHandle.cpp: Track state across ResourceHandle invocations. + (WebCore::ResourceHandleInternal::ResourceHandleInternal): + (WebCore::ResourceHandleInternal::): + (WebCore::ResourceHandleInternal::start): + (WebCore::ResourceHandleInternal::cancel): + (WebCore::ResourceHandleInternal::didReceiveResponse): + (WebCore::ResourceHandleInternal::didReceiveData): + (WebCore::ResourceHandleInternal::didFinishLoading): + (WebCore::ResourceHandleInternal::didFail): + +2010-03-24 Jay Campan <jcampan@google.com> + + Reviewed by Darin Fisher. + + Making Chromium select popups not steal activation from the browser. + Select popups are now like autocomplete popups, shown in non-activated + windows. + https://bugs.webkit.org/show_bug.cgi?id=36062 + + * public/WebViewClient.h: + (WebKit::WebViewClient::createPopupMenu): + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::popupOpened): + (WebKit::ChromeClientImpl::popupClosed): + * src/ChromeClientImpl.h: + * src/WebViewImpl.cpp: + (WebKit::): + (WebKit::WebViewImpl::mouseDown): + (WebKit::WebViewImpl::keyEvent): + (WebKit::WebViewImpl::selectPopupHandleKeyEvent): + (WebKit::WebViewImpl::hideSelectPopup): + (WebKit::WebViewImpl::popupOpened): + (WebKit::WebViewImpl::popupClosed): + (WebKit::WebViewImpl::setFocus): + (WebKit::WebViewImpl::applyAutoFillSuggestions): + (WebKit::WebViewImpl::applyAutocompleteSuggestions): + * src/WebViewImpl.h: + +2010-03-24 Alexander Pavlov <apavlov@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: [Chromium] Audits never complete + https://bugs.webkit.org/show_bug.cgi?id=36544 + + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + +2010-03-24 Alexander Pavlov <apavlov@chromium.org> + + Reviewed by Pavel Feldman. + + [Chromium] Fix VKEY_F10, VKEY_F11 translation in WebInputEvent.cpp + https://bugs.webkit.org/show_bug.cgi?id=36524 + + * src/WebInputEvent.cpp: + (WebKit::staticKeyIdentifiers): + +2010-03-24 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Make Icon::createIconForFiles() optional. + https://bugs.webkit.org/show_bug.cgi?id=35072 + + - Rename iconForFiles() to chooseIconForFiles(). + - Call Icon::createIconForFiles() from chooseIconForFiles(). + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::chooseIconForFiles): + * src/ChromeClientImpl.h: + +2010-03-23 Kenneth Russell <kbr@google.com> + + Unreviewed build fix. + + Add #include <stdio.h> to fix Chromium Linux build. + + * src/WebGraphicsContext3DDefaultImpl.cpp: + +2010-03-23 Nate Chapin <japhet@chromium.org> + + Unreviewed, revert r56376. + + This revision introduced a crash in a couple of layout tests + on Chromium Linux. + + * public/WebViewClient.h: + (WebKit::WebViewClient::createPopupMenu): + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::popupOpened): + * src/ChromeClientImpl.h: + * src/WebViewImpl.cpp: + (WebKit::): + (WebKit::WebViewImpl::mouseDown): + (WebKit::WebViewImpl::keyEvent): + (WebKit::WebViewImpl::setFocus): + (WebKit::WebViewImpl::applyAutoFillSuggestions): + (WebKit::WebViewImpl::applyAutocompleteSuggestions): + * src/WebViewImpl.h: + +2010-03-23 Sergey Ulanov <sergeyu@chromium.org> + + Reviewed by Dmitry Titov. + + Changes needed to implement Show/Hide Controls command for <video> in + chrome: (1) added Controls action in WebMediaPlayerAction that toggles + controls for media player, (2) added MediaHasVideo in + WebContextMenuData so that controls can be made toggleable only for + video player but not for audio. + https://bugs.webkit.org/show_bug.cgi?id=36460 + + * public/WebContextMenuData.h: + (WebKit::WebContextMenuData::): + * public/WebMediaPlayerAction.h: + (WebKit::WebMediaPlayerAction::): + * src/ContextMenuClientImpl.cpp: + (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::performMediaPlayerAction): + +2010-03-23 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + When uncaught exception happens reveal Scripts panel only if reporting uncaught exceptions is on. + + https://bugs.webkit.org/show_bug.cgi?id=36498 + + * src/js/DebuggerAgent.js: + (devtools.DebuggerAgent.prototype.handleExceptionEvent_): + +2010-03-23 Ilya Tikhonovsky <loislo@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: TimelinePanel stays in the recording state after reopening WebInspector. + https://bugs.webkit.org/show_bug.cgi?id=36503 + + * src/WebDevToolsAgentImpl.cpp: + (WebKit::WebDevToolsAgentImpl::detach): + +2010-03-22 Kenneth Russell <kbr@google.com> + + Reviewed by Darin Fisher. + + Add GraphicsContext3D abstraction to WebKit API + https://bugs.webkit.org/show_bug.cgi?id=36262 + + Added WebGraphicsContext3D to the WebKit API and refactored Chromium's + GraphicsContext3D implementation to use it. All of the OpenGL calls have + been moved out of WebKit/chromium/src/GraphicsContext3D.cpp and into the + WebGraphicsContext3D implementation. GraphicsContext3D is still + responsible for the transfer of rendered output from the + WebGraphicsContext3D to the HTMLCanvasElement. + + The GraphicsContext3DInternal class, which is a data member of + GraphicsContext3D for the Chromium port, remains. It is possible to + eliminate this class and thereby one level of delegation, but this is + being deferred. + + The needed entry point for a Chrome implementation of + WebGraphicsContext3D has been added to WebKitClient, but it is not being + called yet by GraphicsContext3D. It will be once this patch lands and + Chromium is rolled forward to support this entry point. + + This is a large patch, but the transformation is almost entirely + mechanical and there is no change in functionality. Nearly all of + GraphicsContext3D and GraphicsContext3DInternal has been moved to + WebGraphicsContext3DDefaultImpl. The only area where the splitting of + logic is less than mechanical is GraphicsContext3D::beginPaint() and its + callees. + + Ran all WebGL layout tests and demos from Khronos site in Chromium + on Mac and Windows. + + * WebKit.gyp: + * public/WebGraphicsContext3D.h: Added. + (WebKit::WebGraphicsContext3D::Attributes::Attributes): + (WebKit::WebGraphicsContext3D::~WebGraphicsContext3D): + * public/WebKitClient.h: + (WebKit::WebKitClient::createGraphicsContext3D): + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::initialize): + (WebCore::GraphicsContext3DInternal::platformGraphicsContext3D): + (WebCore::GraphicsContext3DInternal::platformTexture): + (WebCore::GraphicsContext3DInternal::beginPaint): + (WebCore::GraphicsContext3DInternal::endPaint): + (WebCore::GraphicsContext3DInternal::reshape): + (WebCore::GraphicsContext3DInternal::bindAttribLocation): + (WebCore::GraphicsContext3DInternal::bindTexture): + (WebCore::GraphicsContext3DInternal::bufferData): + (WebCore::GraphicsContext3DInternal::bufferSubData): + (WebCore::GraphicsContext3DInternal::getActiveAttrib): + (WebCore::GraphicsContext3DInternal::getActiveUniform): + (WebCore::GraphicsContext3DInternal::getAttribLocation): + (WebCore::GraphicsContext3DInternal::getContextAttributes): + (WebCore::GraphicsContext3DInternal::getProgramInfoLog): + (WebCore::GraphicsContext3DInternal::getShaderInfoLog): + (WebCore::GraphicsContext3DInternal::getShaderSource): + (WebCore::GraphicsContext3DInternal::getString): + (WebCore::GraphicsContext3DInternal::getUniformLocation): + (WebCore::GraphicsContext3DInternal::readPixels): + (WebCore::GraphicsContext3DInternal::shaderSource): + (WebCore::GraphicsContext3DInternal::texImage2D): + (WebCore::GraphicsContext3DInternal::texSubImage2D): + (WebCore::GraphicsContext3DInternal::uniform1fv): + (WebCore::GraphicsContext3DInternal::uniform1iv): + (WebCore::GraphicsContext3DInternal::uniform2fv): + (WebCore::GraphicsContext3DInternal::uniform2iv): + (WebCore::GraphicsContext3DInternal::uniform3fv): + (WebCore::GraphicsContext3DInternal::uniform3iv): + (WebCore::GraphicsContext3DInternal::uniform4fv): + (WebCore::GraphicsContext3DInternal::uniform4iv): + (WebCore::GraphicsContext3DInternal::uniformMatrix2fv): + (WebCore::GraphicsContext3DInternal::uniformMatrix3fv): + (WebCore::GraphicsContext3DInternal::uniformMatrix4fv): + (WebCore::GraphicsContext3D::GraphicsContext3D): + (WebCore::GraphicsContext3D::~GraphicsContext3D): + (WebCore::GraphicsContext3D::create): + (WebCore::GraphicsContext3D::platformGraphicsContext3D): + (WebCore::GraphicsContext3D::platformTexture): + (WebCore::GraphicsContext3D::texImage2D): + (WebCore::GraphicsContext3D::texSubImage2D): + * src/WebGraphicsContext3D.cpp: Added. + (WebKit::WebGraphicsContext3D::createDefault): + * src/WebGraphicsContext3DDefaultImpl.cpp: Added. + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::create): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::~GLConnection): + (WebKit::WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerState): + (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): + (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): + (WebKit::WebGraphicsContext3DDefaultImpl::initialize): + (WebKit::WebGraphicsContext3DDefaultImpl::makeContextCurrent): + (WebKit::WebGraphicsContext3DDefaultImpl::width): + (WebKit::WebGraphicsContext3DDefaultImpl::height): + (WebKit::WebGraphicsContext3DDefaultImpl::sizeInBytes): + (WebKit::createTextureObject): + (WebKit::WebGraphicsContext3DDefaultImpl::reshape): + (WebKit::WebGraphicsContext3DDefaultImpl::flipVertically): + (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::activeTexture): + (WebKit::WebGraphicsContext3DDefaultImpl::bindBuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::bindFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::disableVertexAttribArray): + (WebKit::WebGraphicsContext3DDefaultImpl::drawElements): + (WebKit::WebGraphicsContext3DDefaultImpl::enableVertexAttribArray): + (WebKit::WebGraphicsContext3DDefaultImpl::generateMipmap): + (WebKit::WebGraphicsContext3DDefaultImpl::getActiveAttrib): + (WebKit::WebGraphicsContext3DDefaultImpl::getActiveUniform): + (WebKit::WebGraphicsContext3DDefaultImpl::getContextAttributes): + (WebKit::WebGraphicsContext3DDefaultImpl::getError): + (WebKit::WebGraphicsContext3DDefaultImpl::getProgramInfoLog): + (WebKit::WebGraphicsContext3DDefaultImpl::getShaderInfoLog): + (WebKit::WebGraphicsContext3DDefaultImpl::getShaderSource): + (WebKit::WebGraphicsContext3DDefaultImpl::getString): + (WebKit::WebGraphicsContext3DDefaultImpl::getVertexAttribOffset): + (WebKit::WebGraphicsContext3DDefaultImpl::releaseShaderCompiler): + (WebKit::WebGraphicsContext3DDefaultImpl::shaderSource): + (WebKit::WebGraphicsContext3DDefaultImpl::vertexAttribPointer): + (WebKit::WebGraphicsContext3DDefaultImpl::createBuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::createFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::createProgram): + (WebKit::WebGraphicsContext3DDefaultImpl::createRenderbuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::createTexture): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteBuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteProgram): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteRenderbuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteShader): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteTexture): + (WebKit::WebGraphicsContext3DDefaultImpl::synthesizeGLError): + * src/WebGraphicsContext3DDefaultImpl.h: Added. + (WebKit::WebGraphicsContext3DDefaultImpl::): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::chooseFBConfig): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::createNewContext): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::createPbuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::destroyPbuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::makeCurrent): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::destroyContext): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::getCurrentContext): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::GLConnection): + +2010-03-22 Jay Campan <jcampan@google.com> + + Reviewed by Darin Fisher. + + Making Chromium select popups not steal activation from the browser. + Select popups are now like autocomplete popups, shown in non-activated + windows. + https://bugs.webkit.org/show_bug.cgi?id=36062 + + * public/WebViewClient.h: + (WebKit::WebViewClient::createPopupMenu): + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::popupOpened): + (WebKit::ChromeClientImpl::popupClosed): + * src/ChromeClientImpl.h: + * src/WebViewImpl.cpp: + (WebKit::): + (WebKit::WebViewImpl::mouseDown): + (WebKit::WebViewImpl::keyEvent): + (WebKit::WebViewImpl::selectPopupHandleKeyEvent): + (WebKit::WebViewImpl::hideSelectPopup): + (WebKit::WebViewImpl::popupOpened): + (WebKit::WebViewImpl::popupClosed): + (WebKit::WebViewImpl::setFocus): + (WebKit::WebViewImpl::applyAutoFillSuggestions): + (WebKit::WebViewImpl::applyAutocompleteSuggestions): + * src/WebViewImpl.h: + +2010-03-22 Darin Fisher <darin@chromium.org> + + Reviewed by Nate Chapin. + + [chromium] Renderer crashes when navigating to a reference fragment in + a frame that has no current HistoryItem. + + https://bugs.webkit.org/show_bug.cgi?id=36443 + + Test: fast/loader/crash-replacing-location-before-load.html + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage): + +2010-03-22 Kevin Decker <kdecker@apple.com> + + Reviewed by John Sullivan. + + https://bugs.webkit.org/show_bug.cgi?id=36328 + + * src/LocalizedStrings.cpp: + (WebCore::missingPluginText): Added + +2010-03-22 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Fix inspected Page crash in destructor when Web Inspector is open. + + https://bugs.webkit.org/show_bug.cgi?id=36441 + + * src/js/InjectDispatch.js: + (inspectedPageDestroyed): Added stub for missing method. + +2010-03-22 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Jeremy Orlow. + + Added methods to WebSecurityOrigin for invoking + SecurityOrigin::canAccess and SecurityOrigin::Create + https://bugs.webkit.org/show_bug.cgi?id=36356 + + * public/WebSecurityOrigin.h: + * src/WebSecurityOrigin.cpp: + (WebKit::WebSecurityOrigin::create): + (WebKit::WebSecurityOrigin::canAccess): + +2010-03-20 Dimitri Glazkov <dglazkov@chromium.org> + + No review, rolling out r56294. + http://trac.webkit.org/changeset/56294 + https://bugs.webkit.org/show_bug.cgi?id=36262 + + Broke compile on Chromium canaries. + + * WebKit.gyp: + * public/WebGraphicsContext3D.h: Removed. + * public/WebKitClient.h: + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::): + (WebCore::GraphicsContext3DInternal::GLConnection::chooseFBConfig): + (WebCore::GraphicsContext3DInternal::GLConnection::createNewContext): + (WebCore::GraphicsContext3DInternal::GLConnection::createPbuffer): + (WebCore::GraphicsContext3DInternal::GLConnection::destroyPbuffer): + (WebCore::GraphicsContext3DInternal::GLConnection::makeCurrent): + (WebCore::GraphicsContext3DInternal::GLConnection::destroyContext): + (WebCore::GraphicsContext3DInternal::GLConnection::getCurrentContext): + (WebCore::GraphicsContext3DInternal::GLConnection::GLConnection): + (WebCore::GraphicsContext3DInternal::GLConnection::create): + (WebCore::GraphicsContext3DInternal::GLConnection::~GLConnection): + (WebCore::GraphicsContext3DInternal::VertexAttribPointerState::VertexAttribPointerState): + (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::makeContextCurrent): + (WebCore::GraphicsContext3DInternal::platformGraphicsContext3D): + (WebCore::GraphicsContext3DInternal::platformTexture): + (WebCore::createTextureObject): + (WebCore::GraphicsContext3DInternal::reshape): + (WebCore::GraphicsContext3DInternal::flipVertically): + (WebCore::GraphicsContext3DInternal::beginPaint): + (WebCore::GraphicsContext3DInternal::activeTexture): + (WebCore::GraphicsContext3DInternal::bindBuffer): + (WebCore::GraphicsContext3DInternal::bindFramebuffer): + (WebCore::GraphicsContext3DInternal::bindTexture): + (WebCore::GraphicsContext3DInternal::bufferDataImpl): + (WebCore::GraphicsContext3DInternal::disableVertexAttribArray): + (WebCore::GraphicsContext3DInternal::enableVertexAttribArray): + (WebCore::GraphicsContext3DInternal::getError): + (WebCore::GraphicsContext3DInternal::getContextAttributes): + (WebCore::GraphicsContext3DInternal::vertexAttribPointer): + (WebCore::GraphicsContext3DInternal::viewportImpl): + (WebCore::GraphicsContext3DInternal::synthesizeGLError): + (WebCore::GraphicsContext3D::create): + (WebCore::GraphicsContext3D::GraphicsContext3D): + (WebCore::GraphicsContext3D::~GraphicsContext3D): + (WebCore::GraphicsContext3D::platformGraphicsContext3D): + (WebCore::GraphicsContext3D::platformTexture): + (WebCore::GraphicsContext3D::makeContextCurrent): + (WebCore::GraphicsContext3D::reshape): + (WebCore::GraphicsContext3D::beginPaint): + (WebCore::GraphicsContext3D::endPaint): + (WebCore::GraphicsContext3D::sizeInBytes): + (WebCore::GraphicsContext3D::createBuffer): + (WebCore::GraphicsContext3D::createFramebuffer): + (WebCore::GraphicsContext3D::createProgram): + (WebCore::GraphicsContext3D::createRenderbuffer): + (WebCore::GraphicsContext3D::createShader): + (WebCore::GraphicsContext3D::createTexture): + (WebCore::GraphicsContext3D::deleteBuffer): + (WebCore::GraphicsContext3D::deleteFramebuffer): + (WebCore::GraphicsContext3D::deleteProgram): + (WebCore::GraphicsContext3D::deleteRenderbuffer): + (WebCore::GraphicsContext3D::deleteShader): + (WebCore::GraphicsContext3D::deleteTexture): + (WebCore::GraphicsContext3D::activeTexture): + (WebCore::GraphicsContext3D::bindAttribLocation): + (WebCore::GraphicsContext3D::bindBuffer): + (WebCore::GraphicsContext3D::bindFramebuffer): + (WebCore::GraphicsContext3D::bindTexture): + (WebCore::GraphicsContext3D::bufferData): + (WebCore::GraphicsContext3D::bufferSubData): + (WebCore::GraphicsContext3D::checkFramebufferStatus): + (WebCore::GraphicsContext3D::detachShader): + (WebCore::GraphicsContext3D::disableVertexAttribArray): + (WebCore::GraphicsContext3D::drawArrays): + (WebCore::GraphicsContext3D::drawElements): + (WebCore::GraphicsContext3D::enableVertexAttribArray): + (WebCore::GraphicsContext3D::generateMipmap): + (WebCore::GraphicsContext3D::getActiveAttrib): + (WebCore::GraphicsContext3D::getActiveUniform): + (WebCore::GraphicsContext3D::getAttribLocation): + (WebCore::GraphicsContext3D::getBooleanv): + (WebCore::GraphicsContext3D::getBufferParameteriv): + (WebCore::GraphicsContext3D::getContextAttributes): + (WebCore::GraphicsContext3D::getError): + (WebCore::GraphicsContext3D::getFloatv): + (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): + (WebCore::GraphicsContext3D::getIntegerv): + (WebCore::GraphicsContext3D::getProgramiv): + (WebCore::GraphicsContext3D::getProgramInfoLog): + (WebCore::GraphicsContext3D::getRenderbufferParameteriv): + (WebCore::GraphicsContext3D::getShaderiv): + (WebCore::GraphicsContext3D::getShaderInfoLog): + (WebCore::GraphicsContext3D::getShaderSource): + (WebCore::GraphicsContext3D::getString): + (WebCore::GraphicsContext3D::getTexParameterfv): + (WebCore::GraphicsContext3D::getTexParameteriv): + (WebCore::GraphicsContext3D::getUniformfv): + (WebCore::GraphicsContext3D::getUniformiv): + (WebCore::GraphicsContext3D::getUniformLocation): + (WebCore::GraphicsContext3D::getVertexAttribfv): + (WebCore::GraphicsContext3D::getVertexAttribiv): + (WebCore::GraphicsContext3D::getVertexAttribOffset): + (WebCore::GraphicsContext3D::isBuffer): + (WebCore::GraphicsContext3D::isEnabled): + (WebCore::GraphicsContext3D::isFramebuffer): + (WebCore::GraphicsContext3D::isProgram): + (WebCore::GraphicsContext3D::isRenderbuffer): + (WebCore::GraphicsContext3D::isShader): + (WebCore::GraphicsContext3D::isTexture): + (WebCore::GraphicsContext3D::pixelStorei): + (WebCore::GraphicsContext3D::readPixels): + (WebCore::GraphicsContext3D::releaseShaderCompiler): + (WebCore::GraphicsContext3D::shaderSource): + (WebCore::GraphicsContext3D::synthesizeGLError): + (WebCore::GraphicsContext3D::texImage2D): + (WebCore::GraphicsContext3D::texSubImage2D): + (WebCore::GraphicsContext3D::uniform1fv): + (WebCore::GraphicsContext3D::uniform1iv): + (WebCore::GraphicsContext3D::uniform2fv): + (WebCore::GraphicsContext3D::uniform2iv): + (WebCore::GraphicsContext3D::uniform3fv): + (WebCore::GraphicsContext3D::uniform3iv): + (WebCore::GraphicsContext3D::uniform4fv): + (WebCore::GraphicsContext3D::uniform4iv): + (WebCore::GraphicsContext3D::uniformMatrix2fv): + (WebCore::GraphicsContext3D::uniformMatrix3fv): + (WebCore::GraphicsContext3D::uniformMatrix4fv): + (WebCore::GraphicsContext3D::vertexAttrib1fv): + (WebCore::GraphicsContext3D::vertexAttrib2fv): + (WebCore::GraphicsContext3D::vertexAttrib3fv): + (WebCore::GraphicsContext3D::vertexAttrib4fv): + (WebCore::GraphicsContext3D::vertexAttribPointer): + (WebCore::GraphicsContext3D::viewport): + * src/WebGraphicsContext3D.cpp: Removed. + * src/WebGraphicsContext3DDefaultImpl.cpp: Removed. + * src/WebGraphicsContext3DDefaultImpl.h: Removed. + +2010-03-19 Kenneth Russell <kbr@google.com> + + Reviewed by Darin Fisher. + + Add GraphicsContext3D abstraction to WebKit API + https://bugs.webkit.org/show_bug.cgi?id=36262 + + Added WebGraphicsContext3D to the WebKit API and refactored Chromium's + GraphicsContext3D implementation to use it. All of the OpenGL calls have + been moved out of WebKit/chromium/src/GraphicsContext3D.cpp and into the + WebGraphicsContext3D implementation. GraphicsContext3D is still + responsible for the transfer of rendered output from the + WebGraphicsContext3D to the HTMLCanvasElement. + + The GraphicsContext3DInternal class, which is a data member of + GraphicsContext3D for the Chromium port, remains. It is possible to + eliminate this class and thereby one level of delegation, but this is + being deferred. + + The needed entry point for a Chrome implementation of + WebGraphicsContext3D has been added to WebKitClient, but it is not being + called yet by GraphicsContext3D. It will be once this patch lands and + Chromium is rolled forward to support this entry point. + + This is a large patch, but the transformation is almost entirely + mechanical and there is no change in functionality. Nearly all of + GraphicsContext3D and GraphicsContext3DInternal has been moved to + WebGraphicsContext3DDefaultImpl. The only area where the splitting of + logic is less than mechanical is GraphicsContext3D::beginPaint() and its + callees. + + Ran all WebGL layout tests and demos from Khronos site in Chromium. + + * WebKit.gyp: + * public/WebGraphicsContext3D.h: Added. + (WebKit::WebGraphicsContext3D::Attributes::Attributes): + (WebKit::WebGraphicsContext3D::~WebGraphicsContext3D): + * public/WebKitClient.h: + (WebKit::WebKitClient::createGraphicsContext3D): + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::initialize): + (WebCore::GraphicsContext3DInternal::platformGraphicsContext3D): + (WebCore::GraphicsContext3DInternal::platformTexture): + (WebCore::GraphicsContext3DInternal::beginPaint): + (WebCore::GraphicsContext3DInternal::endPaint): + (WebCore::GraphicsContext3DInternal::reshape): + (WebCore::GraphicsContext3DInternal::bindAttribLocation): + (WebCore::GraphicsContext3DInternal::bindTexture): + (WebCore::GraphicsContext3DInternal::bufferData): + (WebCore::GraphicsContext3DInternal::bufferSubData): + (WebCore::GraphicsContext3DInternal::getActiveAttrib): + (WebCore::GraphicsContext3DInternal::getActiveUniform): + (WebCore::GraphicsContext3DInternal::getAttribLocation): + (WebCore::GraphicsContext3DInternal::getContextAttributes): + (WebCore::GraphicsContext3DInternal::getProgramInfoLog): + (WebCore::GraphicsContext3DInternal::getShaderInfoLog): + (WebCore::GraphicsContext3DInternal::getShaderSource): + (WebCore::GraphicsContext3DInternal::getString): + (WebCore::GraphicsContext3DInternal::getUniformLocation): + (WebCore::GraphicsContext3DInternal::readPixels): + (WebCore::GraphicsContext3DInternal::shaderSource): + (WebCore::GraphicsContext3DInternal::texImage2D): + (WebCore::GraphicsContext3DInternal::texSubImage2D): + (WebCore::GraphicsContext3DInternal::uniform1fv): + (WebCore::GraphicsContext3DInternal::uniform1iv): + (WebCore::GraphicsContext3DInternal::uniform2fv): + (WebCore::GraphicsContext3DInternal::uniform2iv): + (WebCore::GraphicsContext3DInternal::uniform3fv): + (WebCore::GraphicsContext3DInternal::uniform3iv): + (WebCore::GraphicsContext3DInternal::uniform4fv): + (WebCore::GraphicsContext3DInternal::uniform4iv): + (WebCore::GraphicsContext3DInternal::uniformMatrix2fv): + (WebCore::GraphicsContext3DInternal::uniformMatrix3fv): + (WebCore::GraphicsContext3DInternal::uniformMatrix4fv): + (WebCore::GraphicsContext3D::GraphicsContext3D): + (WebCore::GraphicsContext3D::~GraphicsContext3D): + (WebCore::GraphicsContext3D::create): + (WebCore::GraphicsContext3D::platformGraphicsContext3D): + (WebCore::GraphicsContext3D::platformTexture): + (WebCore::GraphicsContext3D::texImage2D): + (WebCore::GraphicsContext3D::texSubImage2D): + * src/WebGraphicsContext3D.cpp: Added. + (WebKit::WebGraphicsContext3D::createDefault): + * src/WebGraphicsContext3DDefaultImpl.cpp: Added. + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::create): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::~GLConnection): + (WebKit::WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerState): + (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): + (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): + (WebKit::WebGraphicsContext3DDefaultImpl::initialize): + (WebKit::WebGraphicsContext3DDefaultImpl::makeContextCurrent): + (WebKit::WebGraphicsContext3DDefaultImpl::width): + (WebKit::WebGraphicsContext3DDefaultImpl::height): + (WebKit::WebGraphicsContext3DDefaultImpl::sizeInBytes): + (WebKit::createTextureObject): + (WebKit::WebGraphicsContext3DDefaultImpl::reshape): + (WebKit::WebGraphicsContext3DDefaultImpl::flipVertically): + (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::activeTexture): + (WebKit::WebGraphicsContext3DDefaultImpl::bindBuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::bindFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::disableVertexAttribArray): + (WebKit::WebGraphicsContext3DDefaultImpl::drawElements): + (WebKit::WebGraphicsContext3DDefaultImpl::enableVertexAttribArray): + (WebKit::WebGraphicsContext3DDefaultImpl::generateMipmap): + (WebKit::WebGraphicsContext3DDefaultImpl::getActiveAttrib): + (WebKit::WebGraphicsContext3DDefaultImpl::getActiveUniform): + (WebKit::WebGraphicsContext3DDefaultImpl::getContextAttributes): + (WebKit::WebGraphicsContext3DDefaultImpl::getError): + (WebKit::WebGraphicsContext3DDefaultImpl::getProgramInfoLog): + (WebKit::WebGraphicsContext3DDefaultImpl::getShaderInfoLog): + (WebKit::WebGraphicsContext3DDefaultImpl::getShaderSource): + (WebKit::WebGraphicsContext3DDefaultImpl::getString): + (WebKit::WebGraphicsContext3DDefaultImpl::getVertexAttribOffset): + (WebKit::WebGraphicsContext3DDefaultImpl::releaseShaderCompiler): + (WebKit::WebGraphicsContext3DDefaultImpl::shaderSource): + (WebKit::WebGraphicsContext3DDefaultImpl::vertexAttribPointer): + (WebKit::WebGraphicsContext3DDefaultImpl::createBuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::createFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::createProgram): + (WebKit::WebGraphicsContext3DDefaultImpl::createRenderbuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::createTexture): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteBuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteFramebuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteProgram): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteRenderbuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteShader): + (WebKit::WebGraphicsContext3DDefaultImpl::deleteTexture): + (WebKit::WebGraphicsContext3DDefaultImpl::synthesizeGLError): + * src/WebGraphicsContext3DDefaultImpl.h: Added. + (WebKit::WebGraphicsContext3DDefaultImpl::): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::chooseFBConfig): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::createNewContext): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::createPbuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::destroyPbuffer): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::makeCurrent): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::destroyContext): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::getCurrentContext): + (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::GLConnection): + +2010-03-19 Dimitri Glazkov <dglazkov@chromium.org> + + Unreviewed, build fix. + + Rename enqueueStorageEvent to enqueueEvent to match changes in + http://trac.webkit.org/changeset/56249. + + * src/StorageAreaProxy.cpp: + (WebCore::StorageAreaProxy::storageEvent): Renamed. + +2010-03-19 Darin Fisher <darin@chromium.org> + + Reviewed by Dimitri Glazkov. + + [chromium] querying the current history item during a back/forward + navigation should not clobber the scroll offset, etc. + https://bugs.webkit.org/show_bug.cgi?id=36347 + + We should only allow the current history item to be modified if we are + no longer loading or if the load is a new navigation (i.e., not a + back/forward/reload variant). + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::currentHistoryItem): + +2010-03-18 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Adam Barth. + + Adding support for the ACCELERATED_COMPOSITING render path to Chromium. + https://bugs.webkit.org/show_bug.cgi?id=35557 + Currently compositing of layers is performed via s/w compositor which relies on Skia. This is an initial check-in + and it's only been tested on Windows. Compiling the code requires seting "use_accelerated_compositing=1" + to GYP_DEFINES. The update of layer contents and compositing is fairly inefficient but this will be fixed in + subsequent check-ins. + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::attachRootGraphicsLayer): + (WebKit::ChromeClientImpl::scheduleCompositingLayerSync): + * src/ChromeClientImpl.h: + (WebKit::ChromeClientImpl::setNeedsOneShotDrawingSynchronization): + Added methods required by the RenderLayerCompositor + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::paintWithContext): + (WebKit::WebFrameImpl::paint): + * src/WebFrameImpl.h: + Split WebFrameImpl::paint() into two methods to make it possible to call the paint + routine with an existing GraphicsContext, which is necessary for painting the root layer into + its own backing surface. + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::WebViewImpl): + (WebKit::WebViewImpl::paint): + Modified method to handle the accelerated compositing path. Now, when doing accelerated compositing, + paint() results in repainting the contents of the root layer and then doing a composite operation. + (WebKit::WebViewImpl::setRootGraphicsLayer): + (WebKit::WebViewImpl::setAcceleratedCompositing): + (WebKit::WebViewImpl::updateRootLayerContents): + (WebKit::WebViewImpl::setRootLayerNeedsDisplay): + * src/WebViewImpl.h: + (WebKit::WebViewImpl::isAcceleratedCompositing): + +2010-03-18 Jian Li <jianli@chromium.org> + + Reviewed by Darin Fisher. + + Chromium interface change to support Blob.slice. + https://bugs.webkit.org/show_bug.cgi?id=35318 + + * features.gypi: + * public/WebHTTPBody.h: + * public/WebKitClient.h: + (WebKit::WebKitClient::getFileModificationTime): + * src/ChromiumBridge.cpp: + (WebCore::ChromiumBridge::getFileModificationTime): + * src/WebHTTPBody.cpp: + (WebKit::WebHTTPBody::elementAt): + (WebKit::WebHTTPBody::appendFile): + (WebKit::WebHTTPBody::appendFileRange): + +2010-03-12 Ojan Vafai <ojan@chromium.org> + + Reviewed by David Levin. + + smartdelete should only occur after double-click + https://bugs.webkit.org/show_bug.cgi?id=35314 + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::selectWordAroundPosition): + +2010-03-18 Nate Chapin <japhet@chromium.org> + + Unreviewed, build fix. + + Left a parentheses unclosed somehow. + + * src/WebDevToolsFrontendImpl.cpp: + (WebKit::WebDevToolsFrontendImpl::jsShowContextMenu): + +2010-03-18 Nate Chapin <japhet@chromium.org> + + Reviewed by Dimitri Glazkov. + + Remove all references to V8Index.h and V8ClassIndex. + + https://bugs.webkit.org/show_bug.cgi?id=33477 + + * src/WebBindings.cpp: + (WebKit::getRangeImpl): + * src/WebDevToolsAgentImpl.cpp: + * src/WebDevToolsFrontendImpl.cpp: + (WebKit::WebDevToolsFrontendImpl::jsShowContextMenu): + +2010-03-17 Garret Kelly <gdk@chromium.org> + + Reviewed by Darin Fisher. + + PlatformTouchEventBuilder should not be resizing the touch point + array before appending touch points to it. + https://bugs.webkit.org/show_bug.cgi?id=36231 + + * src/WebInputEventConversion.cpp: + (WebKit::PlatformTouchEventBuilder::PlatformTouchEventBuilder): + +2010-03-17 Dmitry Titov <dimich@chromium.org> + + Reviewed by Dimitri Glazkov. + + [chromium] Roll Chromium builder's DEPS to current revs. + https://bugs.webkit.org/show_bug.cgi?id=36241 + + * DEPS: + +2010-03-17 Kenneth Russell <kbr@google.com> + + Reviewed by Darin Fisher. + + Revert WebGL context attributes changes 33416 / r56074 and 36200 / r56093 + https://bugs.webkit.org/show_bug.cgi?id=36233 + + The patch for bug 33416, which added multisampling support to the + WebGL back buffer, uncovered some OpenGL driver bugs on the build + bots which need further investigation to determine the appropriate + workaround. Reverting this change, the minor build fix in 36189, + and the skipping of the affected tests in bug 36200. + + Built and tested WebKit and Chromium and ran all WebGL layout + tests in both. + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::reshape): + (WebCore::GraphicsContext3DInternal::beginPaint): + (WebCore::GraphicsContext3DInternal::bindFramebuffer): + (WebCore::GraphicsContext3D::readPixels): + +2010-03-16 James Hawkins <jhawkins@chromium.org> + + Reviewed by David Levin. + + [Chromium] Size the WebVector of forms after determining how many + forms are valid and will be returned. + + https://bugs.webkit.org/show_bug.cgi?id=36204 + + No new tests, as this is only triggered by Chromium's use of the + WebFormElement API. + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::forms): + +2010-03-16 Kenneth Russell <kbr@google.com> + + Reviewed by Darin Fisher. + + Build breakage from 33416 + https://bugs.webkit.org/show_bug.cgi?id=36189 + + No new tests. Built release Chromium. + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::reshape): + +2010-03-16 Zhenyao Mo <zmo@google.com> + + Reviewed by Darin Fisher. + + Hook up WebGLContextAttributes to OpenGL context creation code + https://bugs.webkit.org/show_bug.cgi?id=33416 + + Test: fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html + + * src/GraphicsContext3D.cpp: Hook up WebGLContextAttributes to OpenGL context creation code for Windows. + +2010-03-16 Yury Semikhatsky <yurys@chromium.org> + + Unreviewed. + + Fix Chromium Mac build: remove unused code. + + * src/WebDevToolsAgentImpl.cpp: + (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy): + +2010-03-16 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. + + Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder + https://bugs.webkit.org/show_bug.cgi?id=35036 + + * src/InspectorClientImpl.cpp: + (WebKit::InspectorClientImpl::openInspectorFrontend): + * src/InspectorClientImpl.h: + * src/WebDevToolsAgentImpl.cpp: + (WebKit::WebDevToolsAgentImpl::attach): + (WebKit::WebDevToolsAgentImpl::didCommitProvisionalLoad): + (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy): + (WebKit::WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController): + * src/WebDevToolsAgentImpl.h: + * src/WebDevToolsFrontendImpl.cpp: + (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): + (WebKit::WebDevToolsFrontendImpl::jsBringToFront): + (WebKit::WebDevToolsFrontendImpl::jsInspectedURLChanged): + * src/WebDevToolsFrontendImpl.h: + * src/js/InjectDispatch.js: + (close): + +2010-03-16 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed: chromium tests fix. + + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + +2010-03-16 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: migrate to native styles inspector in order to inspect styles from foreighn domains. + + https://bugs.webkit.org/show_bug.cgi?id=36117 + + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + +2010-03-15 John Gregg <johnnyg@google.com> + + Reviewed by David Levin. + + Notification object should expose absolute URL of icon + https://bugs.webkit.org/show_bug.cgi?id=35800 + + * public/WebNotification.h: + * src/WebNotification.cpp: + (WebKit::WebNotification::iconURL): + +2010-03-15 Darin Fisher <darin@chromium.org> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=36152 + [chromium] Add support for history.pushState and history.replaceState + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::didNavigateWithinPage): Move implementation of + didChangeLocationWithinPage to here. Only add to the redirect chain if + we are performing a simple hash change (i.e., no state object on the + history item). Call the old didChangeLocationWithinPage for backwards + compat with Chromium. This will be removed in a subsequent patch. + + (WebKit::WebFrameClient::didChangeLocationWithinPage): + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage): + (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): + Call the new version of didChangeLocationWithinPage without the + parameter to indicate whether this is a new navigation or not. We only + need this method on WebFrameClient to support TestShell / DRT. + + (WebKit::FrameLoaderClientImpl::dispatchDidPushStateWithinPage): + Call dispatchDidNavigateWithinPage since pushState is just a type of + in-page navigation. This is an in-page navigation that adds another + entry to session history. + + (WebKit::FrameLoaderClientImpl::dispatchDidReplaceStateWithinPage): + Call dispatchDidNavigateWithinPage since replaceState is just a type of + in-page navigation. This is an in-page navigation that replaces the + current session history entry. + + (WebKit::FrameLoaderClientImpl::dispatchDidPopStateWithinPage): Do + nothing since dispatchDidNavigateWithinPage is called in this case by + the FrameLoader. + + (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction): + (WebKit::FrameLoaderClientImpl::shouldGoToHistoryItem): Move the code + for handling the dummy chrome-back-forward://go/ URLs from + dispatchDecidePolicyForNavigationAction to shouldGoToHistoryItem, which + prevents the URLs from leaking into session history. + shouldGoToHistoryItem is called before any work is done by history + traversal, so this is a better place for this hack. Ultimately, this + code should be eliminatd in favor of better integration with + FrameLoader or HistoryController. + + * src/FrameLoaderClientImpl.h: + +2010-03-15 Darin Fisher <darin@chromium.org> + + Fix build bustage. We also need to pull down "third_party/tcmalloc" + + * DEPS: + +2010-03-15 Darin Fisher <darin@chromium.org> + + Fix build bustage. We also need to pull down "gfx" + + * DEPS: + +2010-03-15 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + https://bugs.webkit.org/show_bug.cgi?id=36131 + Update include paths for chromium Rect, Point, and Size types. + + Update DEPS to pull latest chromium code that reflects the + new location of these headers. + + * DEPS: + * public/WebPoint.h: + * public/WebRect.h: + * public/WebSize.h: + +2010-03-15 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Send the frame URL on GeolocationServiceBridgeImpl::startUpdating. + https://bugs.webkit.org/show_bug.cgi?id=36012 + + * public/GeolocationServiceBridgeChromium.h: + * src/GeolocationServiceBridgeChromium.cpp: + (WebKit::GeolocationServiceBridgeImpl::startUpdating): + +2010-03-15 Patrik Persson <patrik.j.persson@ericsson.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=32369 + + Revise iframe sandbox behavior to match the updated HTML5 spec. + + - Enables window.sessionStorage in sandboxed iframes. + + - Raises SECURITY_ERR exceptions when window.localStorage or + window.openDatabase() is blocked by iframe sandboxing. + + Note: window.sessionStorage does not raise exceptions. + + WebKit would previously return null references in these cases. The + new behavior is in accordance with HTML5: + + http://dev.w3.org/html5/webstorage/ (sections 4.2 and 4.3) + http://dev.w3.org/html5/webdatabase/ (section 4.1) + http://www.mail-archive.com/whatwg@lists.whatwg.org/msg19786.html + + * src/StorageAreaProxy.cpp: + (WebCore::StorageAreaProxy::storageEvent): exception handling + * src/StorageEventDispatcherImpl.cpp: + (WebCore::StorageEventDispatcherImpl::dispatchStorageEvent): exception handling + +2010-03-15 Tony Chang <tony@chromium.org> + + Reviewed by Darin Adler. + + option-pageup/down should move cursor on chromium mac + https://bugs.webkit.org/show_bug.cgi?id=36108 + + * src/EditorClientImpl.cpp: + (WebKit::): + +2010-03-13 Eric Roman <eroman@chromium.org> + + Reviewed by Adam Barth. + + Add a firstPartyForCookies() property to WebDocument. + https://bugs.webkit.org/show_bug.cgi?id=35592 + + * public/WebDocument.h: + * src/WebDocument.cpp: + (WebKit::WebDocument::firstPartyForCookies): + +2010-03-12 Garret Kelly <gdk@chromium.org> + + Unreiviewed. + + Fix Chromium Mac build. Last patch did not apply properly. + (Garret assures me this patch will actually work.) + + * src/WebInputEventConversion.cpp: + (WebKit::toPlatformTouchEventType): + (WebKit::toPlatformTouchPointState): + +2010-03-12 Garret Kelly <gdk@chromium.org> + + Unreviewed. + + Fix Chromium Mac build. This time, with actual fixing goodness. + + * src/WebInputEventConversion.cpp: + (WebKit::toPlatformTouchEventType): + (WebKit::toPlatformTouchPointState): + +2010-03-12 Garret Kelly <gdk@chromium.org> + + Unreviewed. + + Fix Chromium Mac build. + + * src/WebInputEventConversion.cpp: + (WebKit::toPlatformTouchEventType): + (WebKit::toPlatformTouchPointState): + +2010-03-12 Garret Kelly <gdk@chromium.org> + + Reviewed by Eric Seidel. + + Enable touch events in Chromium features gypi file. + https://bugs.webkit.org/show_bug.cgi?id=35994 + + * features.gypi: + +2010-03-12 Darin Fisher <darin@chromium.org> + + Fix Chromium build bustage. + + Wrap usage of WebPrivatePtr from WebNode.h in a #if + WEBKIT_IMPLEMENTATION guard. + + * public/WebNode.h: + +2010-03-12 Nicolas Weber <thakis@chromium.org> + + Reviewed by David Levin. + + [Chromium] Cmd-clicking submit buttons should submit in new tab + https://bugs.webkit.org/show_bug.cgi?id=36023 + + Take modifiers into account when clicking form buttons. E.g. + cmd-clicking a submit button will submit in a new background tab, + cmd-shift-clicking in a new foreground tab, shift-clicking in a new + window. (On windows/linux, it's ctrl instead of cmd.) + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::actionSpecifiesNavigationPolicy): + +2010-03-12 Kavita Kanetkar <kkanetkar@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Fix memory leak in WebImageDecoder API + https://bugs.webkit.org/show_bug.cgi?id=35946 + + * src/WebImageDecoder.cpp: + (WebKit::WebImageDecoder::setData): + (WebKit::WebImageDecoder::getFrameAtIndex): + +2010-03-11 Aaron Boodman <aa@chromium.org> + + Kill WebDocument::applicationID() (part 1). + + Modify interface to WebCore::NotificationPresenter::checkPermission() + and remove implementation of WebDocument::applicationID(). Breaking + API changes will be in a subsequent change. + https://bugs.webkit.org/show_bug.cgi?id=35846 + + * public/WebNotificationPresenter.h: + * src/NotificationPresenterImpl.cpp: + (WebKit::NotificationPresenterImpl::checkPermission): + * src/NotificationPresenterImpl.h: + * src/WebDocument.cpp: + (WebKit::WebDocument::applicationID): + +2010-03-11 Stuart Morgan <stuartmorgan@chromium.org> + + Reviewed by Darin Fisher. + + Fix the screen coordinate conversion of Chromium Mac mouse events for + multiple-moniter setups. Also changes the global coordinate values + to be computed from the event, rather than the instantaneous mouse + location, and reduces code duplication for location conversion. + + Dual-sided patch with http://codereview.chromium.org/751002 + + https://bugs.webkit.org/show_bug.cgi?id=35950 + + * src/mac/WebInputEventFactory.mm: + (WebKit::setWebEventLocationFromEventInView): + (WebKit::WebInputEventFactory::mouseEvent): + (WebKit::WebInputEventFactory::mouseWheelEvent): + +2010-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. + + * src/ChromeClientImpl.cpp: + * src/ChromeClientImpl.h: + +2010-03-10 Darin Fisher <darin@chromium.org> + + Reviewed by Jeremy Orlow. + + Use WebPrivatePtr for WebNode + https://bugs.webkit.org/show_bug.cgi?id=36005 + + * public/WebElement.h: + * public/WebFormElement.h: + * public/WebInputElement.h: + * public/WebLabelElement.h: + * public/WebNode.h: + (WebKit::WebNode::WebNode): + (WebKit::WebNode::isNull): + (WebKit::WebNode::unwrap): + (WebKit::WebNode::constUnwrap): + * public/WebPrivatePtr.h: + (WebKit::WebPrivatePtr::assign): + * src/WebDocument.cpp: + (WebKit::WebDocument::WebDocument): + (WebKit::WebDocument::operator=): + (WebKit::WebDocument::operator PassRefPtr<Document>): + * src/WebElement.cpp: + (WebKit::WebElement::hasTagName): + (WebKit::WebElement::WebElement): + (WebKit::WebElement::operator=): + (WebKit::WebElement::operator PassRefPtr<Element>): + * src/WebFormElement.cpp: + (WebKit::WebFormElement::WebFormElement): + (WebKit::WebFormElement::operator=): + (WebKit::WebFormElement::operator PassRefPtr<HTMLFormElement>): + * src/WebInputElement.cpp: + (WebKit::WebInputElement::WebInputElement): + (WebKit::WebInputElement::operator=): + (WebKit::WebInputElement::operator PassRefPtr<HTMLInputElement>): + * src/WebLabelElement.cpp: + (WebKit::WebLabelElement::correspondingControl): + (WebKit::WebLabelElement::operator=): + (WebKit::WebLabelElement::operator PassRefPtr<HTMLLabelElement>): + * src/WebNode.cpp: + (WebKit::WebNode::reset): + (WebKit::WebNode::assign): + (WebKit::WebNode::equals): + (WebKit::WebNode::parentNode): + (WebKit::WebNode::createMarkup): + (WebKit::WebNode::addEventListener): + (WebKit::WebNode::removeEventListener): + (WebKit::WebNode::simulateClick): + (WebKit::WebNode::WebNode): + (WebKit::WebNode::operator=): + (WebKit::WebNode::operator PassRefPtr<Node>): + +2010-03-10 Darin Fisher <darin@chromium.org> + + Reviewed by Jeremy Orlow. + + Add API wrapper for WebCore::SerializedScriptValue + https://bugs.webkit.org/show_bug.cgi?id=35988 + + WebSerializedScriptValue is a wrapper around SerializedScriptValue. + + WebPrivatePtr is used to simplify wrapping reference counted WebCore + types. This class is used to cleanup WebHistoryItem, and will be used + to clean up other classes in the WebKit API in a follow-up patch. + + * WebKit.gyp: + * public/WebHistoryItem.h: + * public/WebPrivatePtr.h: Added. + * public/WebSerializedScriptValue.h: Added. + * src/WebHistoryItem.cpp: + * src/WebSerializedScriptValue.cpp: Added. + +2010-03-10 Sanjeev Radhakrishnan <sanjeevr@chromium.org> + + Reviewed by Darin Fisher. + + Allow a plugin to participate in the browser's print workflow. + https://bugs.webkit.org/show_bug.cgi?id=35550 + + * public/WebFrame.h: + * public/WebPlugin.h: + * src/WebFrameImpl.cpp: + * src/WebFrameImpl.h: + * src/WebPluginContainerImpl.cpp: + * src/WebPluginContainerImpl.h: + +2010-03-10 John Abd-El-Malek <jam@chromium.org> + + Reviewed by Nate Chapin. + + [chromium]: Fix regression in mouse capture on Mac/Linux + https://bugs.webkit.org/show_bug.cgi?id=35987 + + * src/WebViewImpl.cpp: + +2010-03-10 Evan Stade <estade@chromium.org> + + Reviewed by David Levin. + + [chromium] add functionality to activate the focused node in a WebView + https://bugs.webkit.org/show_bug.cgi?id=35407 + + * public/WebDocument.h: + * public/WebNode.h: + * src/WebDocument.cpp: + (WebKit::WebDocument::focusedNode): Added + * src/WebNode.cpp: + (WebKit::WebNode::simulateClick): Added + +2010-03-10 John Abd-El-Malek <jam@chromium.org> + + Reviewed by Darin Fisher. + + https://bugs.webkit.org/show_bug.cgi?id=35952 + Propagate mouse wheel events to Pepper plugins. + + * src/WebInputEventConversion.cpp: + (WebKit::WebMouseWheelEventBuilder::WebMouseWheelEventBuilder): + * src/WebInputEventConversion.h: + * src/WebPluginContainerImpl.cpp: + (WebKit::WebPluginContainerImpl::handleEvent): + (WebKit::WebPluginContainerImpl::handleMouseEvent): + (WebKit::WebPluginContainerImpl::handleWheelEvent): + (WebKit::WebPluginContainerImpl::handleKeyboardEvent): + * src/WebPluginContainerImpl.h: + +2010-03-10 Garret Kelly <gdk@chromium.org> + + Reviewed by Darin Fisher. + + Add support for converting WebTouchEvents to PlatformTouchEvents and + routing them into the EventHandler for the frame in which they + originate. + https://bugs.webkit.org/show_bug.cgi?id=35874 + + * src/ChromeClientImpl.h: + (WebKit::ChromeClientImpl::needTouchEvents): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::touchEvent): Handle incoming WebTouchEvents, + converting them to PlatformTouchEvents and sending them to the + EventHandler. + (WebKit::WebViewImpl::handleInputEvent): Now routes WebTouchEvents to + the touchEvent handler. + * src/WebViewImpl.h: + +2010-03-10 Nate Chapin <japhet@chromium.org> + + Reviewed by Dimitri Glazkov. + + Wrap and unwrap v8 objects with WrapperTypeInfo instead of V8ClassIndex::V8WrapperType. + + https://bugs.webkit.org/show_bug.cgi?id=35941 + + * src/WebBindings.cpp: + (WebKit::getRangeImpl): + * src/WebDevToolsAgentImpl.cpp: + (WebKit::WebDevToolsAgentImpl::createInspectorBackendV8Wrapper): + * src/WebDevToolsFrontendImpl.cpp: + (WebKit::WebDevToolsFrontendImpl::jsShowContextMenu): + +2010-03-10 Garret Kelly <gdk@chromium.org> + + Reviewed by Darin Fisher. + + Fixing build warning caused by using 0 instead of NULL as the sentiel + in a varargs call. + https://bugs.webkit.org/show_bug.cgi?id=35898 + + * src/gtk/WebInputEventFactory.cpp: + +2010-03-10 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + Add IndexedDatabase class and hook it up. + https://bugs.webkit.org/show_bug.cgi?id=35927 + + This change is mostly just adding the plumbing necessary for + the IndexedDatabaseRequest and IndexedDatabaseSync (not written + yet). + + * WebKit.gyp: + * public/WebIndexedDatabase.h: Added. + (WebKit::WebIndexedDatabase::~WebIndexedDatabase): + * public/WebKitClient.h: + (WebKit::WebKitClient::getIndexedDatabase): + * src/ChromiumBridge.cpp: + (WebCore::ChromiumBridge::getIndexedDatabase): + * src/IndexedDatabaseProxy.cpp: Added. + (WebCore::IndexedDatabaseProxy::create): + (WebCore::IndexedDatabaseProxy::IndexedDatabaseProxy): + (WebCore::IndexedDatabaseProxy::~IndexedDatabaseProxy): + (WebCore::IndexedDatabaseProxy::open): + * src/IndexedDatabaseProxy.h: Added. + +2010-03-10 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: display list of active workers & support debugging + with fake workers + https://bugs.webkit.org/show_bug.cgi?id=35568 + + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + +2010-03-10 Tony Chang <tony@chromium.org> + + Reviewed by Darin Fisher. + + https://bugs.webkit.org/show_bug.cgi?id=35956 + Create a grd file upstream for resources that chromium uses + that are pulled directly from the upstream repository. + + * WebKit.grd: Added. + +2010-03-10 Roland Steiner <rolandsteiner@chromium.org> + + Reviewed by David Levin. + + Bug 28293 - [Chromium] event.datatransfer.getdata("text/uri-list") is treated the same as getdata("URL") + https://bugs.webkit.org/show_bug.cgi?id=28293 + + Change ChromiumDataObject such that it treats types "URL" and "text/uri-list" + correctly for event.dataTransfer.getData/setData. Currently both are treated + as synonyms, but for "URL", getData is supposed to only return the first valid URL + contained within the data for "text/uri-list" (see HTML5 spec). + + Tests: editing/pasteboard/dataTransfer-setData-getData.html + + * src/WebDragData.cpp: + (WebKit::WebDragData::url): + (WebKit::WebDragData::setURL): + +2010-03-08 John Abd-El-Malek <jam@chromium.org> + + Reviewed by Darin Fisher. + + Need to send mouse events to plugin when it has mouse capture + https://bugs.webkit.org/show_bug.cgi?id=35900 + + * public/WebInputEvent.h: + (WebKit::WebInputEvent::isMouseEventType): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::WebViewImpl): + (WebKit::WebViewImpl::mouseDown): + (WebKit::WebViewImpl::mouseUp): + (WebKit::WebViewImpl::handleInputEvent): + * src/WebViewImpl.h: + +2010-03-09 Anton Muhin <antonm@chromium.org> + + Reviewed by Darin Fisher. + + Accept and bailout NULL widgets in ChromiumBridge + https://bugs.webkit.org/show_bug.cgi?id=35796 + + * src/ChromiumBridge.cpp: + (WebCore::toChromeClientImpl): + +2010-03-09 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Use clean global object for devtools utility context instead of + trying to simulate inspected context. + + https://bugs.webkit.org/show_bug.cgi?id=35923 + + * src/DebuggerAgentImpl.cpp: + * src/DebuggerAgentImpl.h: + * src/WebDevToolsAgentImpl.cpp: + (WebKit::WebDevToolsAgentImpl::resetInspectorFrontendProxy): + +2010-03-08 Alexey Proskuryakov <ap@apple.com> + + Chromium build fix. + + Updated for the removal of "mightDownloadFromHandle". + + * src/ResourceHandle.cpp: + (WebCore::ResourceHandle::ResourceHandle): + (WebCore::ResourceHandle::create): + +2010-03-08 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Reset multiple form submission protection on mouse events. + https://bugs.webkit.org/show_bug.cgi?id=35128 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::mouseDown): + +2010-03-08 Michael Nordman <michaeln@google.com> + + Reviewed by Darin Fisher. + + Quick fix for a chromium unit test failures around r55675 (repaint refactoring). + This change restores the tests for empty rects that were deleted. + + https://bugs.webkit.org/show_bug.cgi?id=35878 + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::invalidateContentsAndWindow): + * src/WebPopupMenuImpl.cpp: + (WebKit::WebPopupMenuImpl::invalidateContentsAndWindow): + +2010-03-02 Adam Treat <atreat@rim.com> + + Reviewed by Dave Hyatt. + + Adapt the chromium port to the refactoring of repaint methods. + + https://bugs.webkit.org/show_bug.cgi?id=34214 + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::invalidateContents): + (WebKit::ChromeClientImpl::invalidateWindow): + (WebKit::ChromeClientImpl::invalidateContentsAndWindow): + (WebKit::ChromeClient::invalidateContentsForSlowScroll): + * src/ChromeClientImpl.h: + +2010-03-08 Jian Li <jianli@chromium.org> + + Reviewed by Dmitry Titov. + + Blob.slice support. + https://bugs.webkit.org/show_bug.cgi?id=32993 + + Add ENABLE_BLOB_SLICE feature define. + + * features.gypi: + +2010-03-08 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + Remove the now-redundant Settings fields for the Database + https://bugs.webkit.org/show_bug.cgi?id=35763 + + No new tests; this code isn't called. + + * public/WebSettings.h: + * src/WebSettingsImpl.cpp: + * src/WebSettingsImpl.h: + +2010-03-08 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + Pass the WebFrame into WebStorageArea::setItem so we can figure out the routing ID + https://bugs.webkit.org/show_bug.cgi?id=35758 + + This is necessary since setItem is sometimes blocked and the embedder might need + to display some piece of UI associated with such an event. + + * public/WebStorageArea.h: + (WebKit::WebStorageArea::setItem): + * src/StorageAreaProxy.cpp: + (WebCore::StorageAreaProxy::setItem): + * src/WebStorageAreaImpl.cpp: + (WebKit::WebStorageAreaImpl::setItem): + * src/WebStorageAreaImpl.h: + +2010-03-07 Mark Rowe <mrowe@apple.com> + + Chromium build fix. + + * src/ChromiumBridge.cpp: Include SharedBuffer.h since WebCore::SharedBuffer is being used. + +2010-03-07 Mark Rowe <mrowe@apple.com> + + Chromium build fix. + + * src/ResourceHandle.cpp: Include SharedBuffer.h since WebCore::SharedBuffer is being used. + +2010-03-06 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Chromium: Restore devtools window activate upon node search complete. + + https://bugs.webkit.org/show_bug.cgi?id=35832 + + * src/js/DevTools.js: + +2010-03-06 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + [Chromium] Embedder initiated loads should not always stop existing loads + https://bugs.webkit.org/show_bug.cgi?id=33862 + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::reload): + (WebKit::WebFrameImpl::loadRequest): + (WebKit::WebFrameImpl::loadHistoryItem): + (WebKit::WebFrameImpl::loadData): + +2010-03-06 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + [Chromium] spurious WebViewClient::didStopLoading if changing + location.hash while a subframe is still loading + + https://bugs.webkit.org/show_bug.cgi?id=33884 + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): + Call isLoadingInAPISense, which checks subframes. + +2010-03-06 Hironori Bono <hbono@chromium.org> + + Reviewed by Eric Seidel. + + [Chromium] Typing into Flash with wmode = opaque|transparent and + non-latin language active outputs as if US keyboard layout active + + https://bugs.webkit.org/show_bug.cgi?id=34936 + + This change is a WebKit-side change for this issue. It dispatches + Char events to plug-ins so plug-ins can receive non-ASCII characters + as well as ASCII characters. + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::keyEvent): + +2010-03-06 Kavita Kanetkar <kkanetkar@chromium.org> + + Reviewed by Darin Fisher. + + Create WebKit API for WebCore::ImageDecoder + https://bugs.webkit.org/show_bug.cgi?id=35415 + + * WebKit.gyp: + * public/WebImageDecoder.h: Added. + * src/WebImageDecoder.cpp: Added. + +2010-03-05 John Abd-El-Malek <jam@chromium.org> + + Reviewed by Darin Fisher. + + Take out code hack that flips the result of NPP_HandleEvent. This needs to move to + the NPAPI code so that Pepper plugins don't hit it. + https://bugs.webkit.org/show_bug.cgi?id=35779 + + * public/WebPluginContainer.h: + * src/WebPluginContainerImpl.cpp: + (WebKit::WebPluginContainerImpl::handleMouseEvent): + (WebKit::WebPluginContainerImpl::handleKeyboardEvent): + +2010-03-05 Ilya Tikhonovsky <loislo@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: Do not show link helper in popovers and/or for external resources. + + https://bugs.webkit.org/show_bug.cgi?id=35785 + + * src/js/DebuggerAgent.js: + (devtools.DebuggerAgent.prototype.initUI): + (devtools.DebuggerAgent.prototype.addScriptInfo_): + +2010-03-04 Garret Kelly <gdk@chromium.org> + + Reviewed by Darin Fisher. + + Adding PlatformTouchEventBuilder and PlatformTouchPointBuilder for + converting Chromium WebTouchEvent and WebTouchPoint types to + corresponding WebCore types. + https://bugs.webkit.org/show_bug.cgi?id=35760 + + * src/WebInputEventConversion.cpp: + (WebKit::toPlatformTouchEventType): + (WebKit::toPlatformTouchPointState): + (WebKit::PlatformTouchPointBuilder::PlatformTouchPointBuilder): + (WebKit::PlatformTouchEventBuilder::PlatformTouchEventBuilder): + * src/WebInputEventConversion.h: + +2010-03-04 John Gregg <johnnyg@google.com> + + Reviewed by Darin Fisher. + + [chromium] WebDocument:applicationID() crashes on <meta> tag with no http-equiv attribute + https://bugs.webkit.org/show_bug.cgi?id=35771 + + * src/WebDocument.cpp: + (WebKit::WebDocument::applicationID): + check for presence of http-equiv attribute before lower()ing it. + +2010-03-04 Darin Fisher <darin@chromium.org> + + Reviewed by Dmitry Titov. + + [chromium] make history.{push,replace}State enabled at runtime + https://bugs.webkit.org/show_bug.cgi?id=35753 + + * public/WebRuntimeFeatures.h: + * src/WebRuntimeFeatures.cpp: + (WebKit::WebRuntimeFeatures::enablePushState): + (WebKit::WebRuntimeFeatures::isPushStateEnabled): + +2010-03-04 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed: chromium tests fix. + + * src/js/Tests.js: + +2010-03-03 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: Remove two last synchronous calls from front-end to InspectorBackend. + + https://bugs.webkit.org/show_bug.cgi?id=35720 + + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + (devtools.InspectorBackendImpl.prototype.setPauseOnExceptionsState): + +2010-03-03 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: Remove sync access to resourceTrackingEnabled. + + https://bugs.webkit.org/show_bug.cgi?id=35693 + + * src/js/DevTools.js: + +2010-03-04 Darin Fisher <darin@chromium.org> + + Reviewed by Pavel Feldman. + + Fix failing DevToolsSanityTest.TestResourceContentLength + https://bugs.webkit.org/show_bug.cgi?id=35725 + + http://trac.webkit.org/changeset/55466 missed one more spot + where contentLength needed to be renamed resourceSize. + + * src/js/Tests.js: + +2010-03-03 Garret Kelly <gdk@chromium.org> + + Reviewed by Darin Fisher. + + Adding touch event type and point type. Tested against the try bots. + https://bugs.webkit.org/show_bug.cgi?id=35691 + + * public/WebInputEvent.h: + (WebKit::WebInputEvent::): + (WebKit::WebInputEvent::isTouchEventType): + (WebKit::WebTouchEvent::WebTouchEvent): + * public/WebTouchPoint.h: Added. + (WebKit::WebTouchPoint::WebTouchPoint): + (WebKit::WebTouchPoint::): + +2010-03-02 Tony Chang <tony@chromium.org> + + Reviewed by Darin Fisher. + + add a flag to WebURLResponse so we can identify multipart content + https://bugs.webkit.org/show_bug.cgi?id=35628 + + * public/WebURLResponse.h: + * src/WebURLResponse.cpp: + (WebKit::WebURLResponse::isMultipartPayload): + (WebKit::WebURLResponse::setIsMultipartPayload): + +2010-03-02 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Fisher. + + Google Analytics triggers "blocked plugin" UI + https://bugs.webkit.org/show_bug.cgi?id=35565 + + Plumb didNotAllowPlugins to the client. + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::didNotAllowPlugins): + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::didNotAllowPlugins): + * src/FrameLoaderClientImpl.h: + +2010-03-02 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Beth Dakin. + + aria-label isn't respected on option elements + https://bugs.webkit.org/show_bug.cgi?id=35400 + + * src/SuggestionsPopupMenuClient.h: + (WebKit::SuggestionsPopupMenuClient::itemAccessibilityText): + +2010-03-02 Mads Ager <ager@chromium.org> + + Reviewed by Adam Barth. + + [V8] V8 should be notified of context disposals + https://bugs.webkit.org/show_bug.cgi?id=35526 + + Update V8 DEPS in order to get V8 API changes needed for context + disposal notifications. + + * DEPS: + +2010-03-02 Kenneth Russell <kbr@google.com> + + Reviewed by Darin Fisher. + + Add EnabledAtRuntime attribute to WebGLArray constructors + https://bugs.webkit.org/show_bug.cgi?id=35558 + + * public/WebRuntimeFeatures.h: + * src/WebRuntimeFeatures.cpp: + (WebKit::WebRuntimeFeatures::enableWebGL): + (WebKit::WebRuntimeFeatures::isWebGLEnabled): + +2010-03-02 James Hawkins <jhawkins@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Implement WebNode::equals and add inline operators for == + and !=. + + https://bugs.webkit.org/show_bug.cgi?id=35543 + + * public/WebNode.h: + (WebKit::operator==): + (WebKit::operator!=): + * src/WebNode.cpp: + (WebKit::WebNode::equals): + +2010-03-01 Jakob Petsovits <jpetsovits@rim.com> + + Reviewed by Adam Barth. + + Adapt to the new ZoomMode enum. + https://bugs.webkit.org/show_bug.cgi?id=35347 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::setZoomLevel): + +2010-03-01 Thatcher Ulrich <tulrich@google.com> + + Reviewed by Darin Fisher. + + Fix chromium iframe shims. Add another test case to the + iframes-shims test. After r53637, the plugin widget doesn't get + moved every paint. This used to hide the bug that if an iframe + gets added, the plugin's cutout rectangles don't get updated until + a layout happens. + https://bugs.webkit.org/show_bug.cgi?id=35184 + + * src/WebPluginContainerImpl.cpp: + (WebKit::WebPluginContainerImpl::widgetPositionsUpdated): do reportGeometry() to ensure that + the plugin is aware of the positions of cutouts on the page (for iframe shim behavior). + * src/WebPluginContainerImpl.h: + +2010-02-27 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Chromium: remove DevTools part that has been upstreamed. + + * src/js/DevTools.js: + +2010-02-26 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: reload inspected page on Cmd+R / Ctrl+R / F5 key event in inspector. + + * src/WebDevToolsFrontendImpl.cpp: + (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): + (WebKit::WebDevToolsFrontendImpl::jsCanAttachWindow): + * src/WebDevToolsFrontendImpl.h: + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl): + (devtools.InspectorBackendImpl.prototype.toggleNodeSearch): + +2010-02-26 James Hawkins <jhawkins@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Verify that the Nodes being enumerated are HTML elements. + + https://bugs.webkit.org/show_bug.cgi?id=35463 + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::forms): + +2010-02-26 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Fisher. + + Expose an API for ports to add schemes to the mixed content whitelist + https://bugs.webkit.org/show_bug.cgi?id=35438 + + Expose registerURLSchemeAsSecure via the WebKit API. + + * public/WebSecurityPolicy.h: + * src/WebSecurityPolicy.cpp: + (WebKit::WebSecurityPolicy::registerURLSchemeAsSecure): + +2010-02-26 Brett Wilson <brettw@chromium.org> + + Fix chromium build. This test's expectation became obsolete with + recent changes to KURL which my previous change brings Chromium's + port in compliance with. + + * tests/KURLTest.cpp: + (ComponentCase::TEST): + +2010-02-26 Yaar Schnitman <yaar@chromium.org> + + Chromium build fix. + + * features.gypi: Added missing new variable enable_svg. + +2010-02-26 Yaar Schnitman <yaar@chromium.org> + + Reviewed by Dimitri Glazkov. + + [V8] Auto-generate and split DerivedSourcesAllInOne.cpp + https://bugs.webkit.org/show_bug.cgi?id=33048 + + * DEPS: Incremented gyp revision. + +2010-02-26 Darin Fisher <darin@chromium.org> + + Fix mac warning (that gets treated as an error in the chromium build). + + * src/ChromiumBridge.cpp: + (WebCore::ChromiumBridge::cookiesEnabled): + +2010-02-25 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + Remove deprecated cookie methods. + https://bugs.webkit.org/show_bug.cgi?id=35420 + + * public/WebFrameClient.h: + * public/WebKitClient.h: + * src/ChromiumBridge.cpp: + (WebCore::ChromiumBridge::setCookies): + (WebCore::ChromiumBridge::cookies): + (WebCore::ChromiumBridge::cookieRequestHeaderFieldValue): + (WebCore::ChromiumBridge::rawCookies): + (WebCore::ChromiumBridge::deleteCookie): + (WebCore::ChromiumBridge::cookiesEnabled): + +2010-02-25 James Hawkins <jhawkins@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Implement WebLabelElement. + + https://bugs.webkit.org/show_bug.cgi?id=35317 + + * WebKit.gyp: + * public/WebLabelElement.h: Added. + * src/WebLabelElement.cpp: Added. + +2010-02-25 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Dimitri Glazkov. + + Web Inspector: make script lines count calculation lazy. + + https://bugs.webkit.org/show_bug.cgi?id=35392 + + * src/js/Tests.js: + (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.waitUntilScriptIsParsed): + (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.checkScriptsPanel): + (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh): + (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.checkScriptsPanel): + (.TestSuite.prototype.testAutoContinueOnSyntaxError.checkScriptsList): + (.TestSuite.prototype._executeFunctionForStepTest): + +2010-02-24 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + Add a missing WebString.h include. + https://bugs.webkit.org/show_bug.cgi?id=35360 + + This is required since some of the methods have implementations that + return a WebString. + + * public/WebCookieJar.h: + +2010-02-24 Jay Campan <jcampan@google.com> + + Reviewed by David Levin. + + Don't show the autofill popup when the input text is disabled or read only. + + https://bugs.webkit.org/show_bug.cgi?id=35129 + + * src/EditorClientImpl.cpp: + (WebKit::EditorClientImpl::autofill): + +2010-02-24 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Fisher. + + [Chromium API] Disambiguate allowJavaScript from didNotAllowScript + https://bugs.webkit.org/show_bug.cgi?id=35205 + + Plumb didNotAllowScript through Chromium's WebKit API. + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::didNotAllowScript): + * src/DebuggerAgentImpl.cpp: + (WebKit::DebuggerAgentImpl::createUtilityContext): + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::didNotAllowScript): + * src/FrameLoaderClientImpl.h: + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::bindToWindowObject): + +2010-02-23 James Hawkins <jhawkins@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Implement WebDocument::getElementsByTagName. + + https://bugs.webkit.org/show_bug.cgi?id=35272 + + * public/WebDocument.h: + * src/WebDocument.cpp: + (WebKit::WebDocument::getElementsByTagName): + +2010-02-23 Steve Block <steveblock@google.com> + + Reviewed by Jeremy Orlow. + + Removes redundant Settings::setGeolocationEnabled and Settings::geolocationEnabled + https://bugs.webkit.org/show_bug.cgi?id=35242 + + This removes Chromium's WebSettings::setGeolocationEnabled + + * public/WebSettings.h: + * src/WebSettingsImpl.cpp: + * src/WebSettingsImpl.h: + +2010-02-23 Dmitriy Belenko <dbelenko@google.com> + + Reviewed by Darin Fisher. + + Chromium: Need to be able to get the bounds of selection + rectangle(s) + https://bugs.webkit.org/show_bug.cgi?id=34915 + + This change will enable about 30 test cases to pass in Chromium. + All of these test cases are related to selection rect boundaries. + This change will enable the test cases to retrieve the selection + rect boundary rectangle for the current selection. + + * public/WebFrame.h: + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::selectionBoundsRect): + * src/WebFrameImpl.h: + +2010-02-23 Steve Block <steveblock@google.com> + + Reviewed by Darin Adler. + + Adds ChromeClient::cancelGeolocationPermissionRequestForFrame + https://bugs.webkit.org/show_bug.cgi?id=34962 + + This method is required so that a Geolocation object can cancel an + asynchronous permission request. This allows the chrome client to cancel + any UI it is showing for the permission request. + + * src/ChromeClientImpl.h: + (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame): + +2009-02-22 Adam Langley <agl@google.com> + + Reviewed by Darin Fisher. + + fontconfig on Linux can change the render preferences on a per strike + basis (a strike a combination of face and size). Because of this, we + need to query fontconfig each time a new FontPlatformData is created + for a new size. + + This patch adds support for querying this via ChromiumBridge. + + https://bugs.webkit.org/show_bug.cgi?id=33065 + + * WebKit.gyp: + * public/gtk/WebFontInfo.h: + * public/linux/WebSandboxSupport.h: + * src/ChromiumBridge.cpp: + (WebCore::ChromiumBridge::getRenderStyleForStrike): + * src/gtk/WebFontInfo.cpp: + (WebKit::WebFontInfo::renderStyleForStrike): + +2010-02-22 Alexander Pavlov <apavlov@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: there should be a way to "deactivate" or "skip" all breakpoints while debugging. + https://bugs.webkit.org/show_bug.cgi?id=33217 + + * src/js/DebuggerAgent.js: + (devtools.DebuggerAgent): + (devtools.DebuggerAgent.prototype.setBreakpointsActivated): + (devtools.DebuggerAgent.prototype.handleBreakEvent_): + (devtools.DebuggerAgent.prototype.handleExceptionEvent_): + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl.prototype.activateBreakpoints): + (devtools.InspectorBackendImpl.prototype.deactivateBreakpoints): + +2010-02-21 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Chromium DevTools: kepp debugger API in sync with inspector. + + https://bugs.webkit.org/show_bug.cgi?id=28799 + + * src/js/DebuggerAgent.js: + * src/js/InspectorControllerImpl.js: + (devtools.InspectorBackendImpl.prototype.setBreakpoint): + +2010-02-19 Maciej Stachowiak <mjs@apple.com> + + Reviewed by David Levin. + + Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases + https://bugs.webkit.org/show_bug.cgi?id=35147 + + * features.gypi: + +2010-02-19 James Hawkins <jhawkins@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Call WebViewClient::didAcceptAutoFillSuggestion when the + user selects a suggestion from the AutoFill suggestions popup. + + https://bugs.webkit.org/show_bug.cgi?id=35174 + + * public/WebViewClient.h: + (WebKit::WebViewClient::didAcceptAutoFillSuggestion): + * src/AutoFillPopupMenuClient.cpp: + (WebKit::AutoFillPopupMenuClient::valueChanged): + * src/AutoFillPopupMenuClient.h: + 2010-02-19 James Hawkins <jhawkins@chromium.org> Reviewed by Eric Seidel. @@ -2873,7 +6634,6 @@ (WebKit::AutocompletePopupMenuClient::resetLastFieldValue): * src/AutocompletePopupMenuClient.h: - 2009-12-28 Kinuko Yasuda <kinuko@chromium.org> Reviewed by Maciej Stachowiak. diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS index 9c45b83..c6d71ab 100644 --- a/WebKit/chromium/DEPS +++ b/WebKit/chromium/DEPS @@ -32,55 +32,43 @@ vars = { 'chromium_svn': 'http://src.chromium.org/svn/trunk/src', - 'chromium_deps_svn': 'http://src.chromium.org/svn/trunk/deps/third_party', - - # Dependencies' revisions to use: - 'chromium_rev': '38580', - 'google-url_rev': '121', - 'gtest_rev': '359', - 'gyp_rev': '781', - 'icu_rev': '37341', - 'openvcdiff_rev': '28', - 'ots_rev': '26', - 'skia_rev': '490', - 'v8_rev': '3781', - - # Windows: - 'cygwin_rev': '11984', - 'ffmpeg_ia32_rev': '34297', + 'chromium_rev': '44453', + 'pthreads-win32_rev': '26716', - 'python_24_rev': '22967', - 'nss_rev': '36871', } deps = { + 'chromium_deps': + File(Var('chromium_svn')+'/DEPS@'+Var('chromium_rev')), + # build tools 'build': Var('chromium_svn')+'/build@'+Var('chromium_rev'), 'tools/gyp': - 'http://gyp.googlecode.com/svn/trunk@'+Var('gyp_rev'), + From('chromium_deps', 'src/tools/gyp'), # Basic tools 'base': Var('chromium_svn')+'/base@'+Var('chromium_rev'), + 'gfx': + Var('chromium_svn')+'/gfx@'+Var('chromium_rev'), # skia dependencies 'skia': Var('chromium_svn')+'/skia@'+Var('chromium_rev'), - 'third_party/skia': - 'http://skia.googlecode.com/svn/trunk@'+Var('skia_rev'), + 'third_party/skia/src': + From('chromium_deps', 'src/third_party/skia/src'), + 'third_party/skia/include': + From('chromium_deps', 'src/third_party/skia/include'), # testing 'testing': Var('chromium_svn')+'/testing@'+Var('chromium_rev'), 'testing/gtest': - 'http://googletest.googlecode.com/svn/trunk@'+Var('gtest_rev'), + From('chromium_deps', 'src/testing/gtest'), # v8 javascript engine - 'v8': - 'http://v8.googlecode.com/svn/trunk@'+Var('v8_rev'), - 'testing/gtest': - 'http://googletest.googlecode.com/svn/trunk@'+Var('gtest_rev'), + 'v8': From('chromium_deps', 'src/v8'), # net dependencies 'net': @@ -88,13 +76,35 @@ deps = { 'sdch': Var('chromium_svn')+'/sdch@'+Var('chromium_rev'), 'sdch/open-vcdiff': - 'http://open-vcdiff.googlecode.com/svn/trunk@'+Var('openvcdiff_rev'), + From('chromium_deps', 'src/sdch/open-vcdiff'), 'googleurl': - 'http://google-url.googlecode.com/svn/trunk@'+Var('google-url_rev'), + From('chromium_deps', 'src/googleurl'), + + # webkit dependencis + 'webkit': Var('chromium_svn')+'/webkit@'+Var('chromium_rev'), + + 'app': + Var('chromium_svn')+'/app@'+Var('chromium_rev'), # needed by appcache + 'gpu': + Var('chromium_svn')+'/gpu@'+Var('chromium_rev'), + 'media': + Var('chromium_svn')+'/media@'+Var('chromium_rev'), + 'third_party/glew': # webgl related + Var('chromium_svn')+'/third_party/glew@'+Var('chromium_rev'), + 'third_party/ffmpeg': # needed by webkit/media + Var('chromium_svn')+'/third_party/ffmpeg@'+Var('chromium_rev'), + 'third_party/yasm': # needed by ffmpeg + Var('chromium_svn')+'/third_party/yasm@'+Var('chromium_rev'), + 'third_party/openmax': # needed by webkit/media + Var('chromium_svn')+'/third_party/openmax@'+Var('chromium_rev'), + 'tools/grit': + Var('chromium_svn')+'/tools/grit@'+Var('chromium_rev'), + 'tools/generate_stubs': + Var('chromium_svn')+'/tools/generate_stubs@'+Var('chromium_rev'), # other third party 'third_party/icu': - Var('chromium_deps_svn')+'/icu42@'+Var('icu_rev'), + From('chromium_deps', 'src/third_party/icu'), 'third_party/bzip2': Var('chromium_svn')+'/third_party/bzip2@'+Var('chromium_rev'), @@ -121,40 +131,50 @@ deps = { Var('chromium_svn')+'/third_party/npapi@'+Var('chromium_rev'), 'third_party/ots': - 'http://ots.googlecode.com/svn/trunk@'+Var('ots_rev'), + From('chromium_deps', 'src/third_party/ots'), 'third_party/sqlite': Var('chromium_svn')+'/third_party/sqlite@'+Var('chromium_rev'), + 'third_party/tcmalloc': + Var('chromium_svn')+'/third_party/tcmalloc@'+Var('chromium_rev'), + 'third_party/zlib': Var('chromium_svn')+'/third_party/zlib@'+Var('chromium_rev'), + + 'third_party/ffmpeg/source/patched-ffmpeg-mt': + From('chromium_deps', 'src/third_party/ffmpeg/source/patched-ffmpeg-mt'), } deps_os = { 'win': { 'third_party/cygwin': - Var('chromium_deps_svn')+'/cygwin@'+Var('cygwin_rev'), - + From('chromium_deps', 'src/third_party/cygwin'), 'third_party/python_24': - Var('chromium_deps_svn')+'/python_24@'+Var('python_24_rev'), - + From('chromium_deps', 'src/third_party/python_24'), 'third_party/ffmpeg/binaries/chromium/win/ia32': - Var('chromium_deps_svn')+'/ffmpeg/binaries/win@'+Var('ffmpeg_ia32_rev'), - + From('chromium_deps', 'src/third_party/ffmpeg/binaries/chromium/win/ia32'), 'third_party/pthreads-win32': - Var('chromium_deps_svn')+'/pthreads-win32@'+Var('pthreads-win32_rev'), - - # base.gypi depends on nss on Windows - 'third_party/nss': - Var('chromium_deps_svn')+'/nss@'+Var('nss_rev'), + 'http://src.chromium.org/svn/trunk/deps/third_party/pthreads-win32@'+Var('pthreads-win32_rev'), + # base.gypi depends on nss on Windows + 'third_party/nss': + From('chromium_deps', 'src/third_party/nss'), + 'third_party/wtl': + Var('chromium_svn')+'/third_party/wtl@'+Var('chromium_rev'), + }, + 'mac': { + # needed by ffmpeg + 'third_party/yasm/source/patched-yasm': + From('chromium_deps', 'src/third_party/yasm/source/patched-yasm'), }, 'unix': { # Linux, actually. 'third_party/harfbuzz': Var('chromium_svn')+'/third_party/harfbuzz@'+Var('chromium_rev'), - 'tools/xdisplaycheck': Var('chromium_svn')+'/tools/xdisplaycheck@'+Var('chromium_rev'), + 'third_party/yasm/source/patched-yasm': + From('chromium_deps', 'src/third_party/yasm/source/patched-yasm'), }, } diff --git a/WebKit/chromium/WebKit.grd b/WebKit/chromium/WebKit.grd new file mode 100644 index 0000000..a0783d7 --- /dev/null +++ b/WebKit/chromium/WebKit.grd @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<grit latest_public_release="0" current_release="1"> + <outputs> + <output filename="grit/webkit_chromium_resources.h" type="rc_header"> + <emit emit_type='prepend'></emit> + </output> + <output filename="webkit_chromium_resources.rc" type="rc_all" /> + <output filename="webkit_chromium_resources.pak" type="data_package" /> + </outputs> + <release seq="1"> + <includes> + <include name="IDR_DEVTOOLS_INJECT_DISPATCH_JS" file="src\js\InjectDispatch.js" type="BINDATA"/> + <include name="IDR_DEVTOOLS_INJECT_WEBKIT_JS" file="..\..\WebCore\inspector\front-end\InjectedScript.js" type="BINDATA"/> + </includes> + </release> +</grit> diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp index 0c76dd3..53581bc 100644 --- a/WebKit/chromium/WebKit.gyp +++ b/WebKit/chromium/WebKit.gyp @@ -59,6 +59,12 @@ 'msvs_guid': '5ECEC9E5-8F23-47B6-93E0-C3B328B3BE65', 'dependencies': [ '../../WebCore/WebCore.gyp/WebCore.gyp:webcore', + '<(chromium_src_dir)/skia/skia.gyp:skia', + '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi', + ], + 'export_dependent_settings': [ + '<(chromium_src_dir)/skia/skia.gyp:skia', + '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi', ], 'include_dirs': [ 'public', @@ -68,9 +74,9 @@ 'WEBKIT_IMPLEMENTATION', ], 'sources': [ - 'public/GeolocationServiceBridgeChromium.h', 'public/gtk/WebInputEventFactory.h', 'public/linux/WebFontRendering.h', + 'public/linux/WebFontRenderStyle.h', 'public/linux/WebRenderTheme.h', 'public/x11/WebScreenInfoFactory.h', 'public/mac/WebInputEventFactory.h', @@ -119,15 +125,26 @@ 'public/WebFrame.h', 'public/WebFrameClient.h', 'public/WebFontCache.h', + 'public/WebFormControlElement.h', 'public/WebFormElement.h', + 'public/WebGeolocationService.h', + 'public/WebGeolocationServiceBridge.h', 'public/WebGlyphCache.h', + 'public/WebGLES2Context.h', + 'public/WebGraphicsContext3D.h', 'public/WebHistoryItem.h', 'public/WebHTTPBody.h', 'public/WebImage.h', + 'public/WebImageDecoder.h', + 'public/WebIDBCallbacks.h', + 'public/WebIDBDatabase.h', + 'public/WebIDBDatabaseError.h', + 'public/WebIndexedDatabase.h', 'public/WebInputElement.h', 'public/WebInputEvent.h', 'public/WebKit.h', 'public/WebKitClient.h', + 'public/WebLabelElement.h', 'public/WebLocalizedString.h', 'public/WebMediaPlayer.h', 'public/WebMediaPlayerAction.h', @@ -151,10 +168,13 @@ 'public/WebPasswordFormData.h', 'public/WebPlugin.h', 'public/WebPluginContainer.h', + 'public/WebPluginDocument.h', 'public/WebPluginListBuilder.h', 'public/WebPoint.h', 'public/WebPopupMenu.h', 'public/WebPopupMenuInfo.h', + 'public/WebPopupType.h', + 'public/WebPrivatePtr.h', 'public/WebRange.h', 'public/WebRect.h', 'public/WebRegularExpression.h', @@ -165,6 +185,8 @@ 'public/WebSearchableFormData.h', 'public/WebSecurityOrigin.h', 'public/WebSecurityPolicy.h', + 'public/WebSelectElement.h', + 'public/WebSerializedScriptValue.h', 'public/WebSettings.h', 'public/WebSharedWorker.h', 'public/WebSharedWorkerRepository.h', @@ -233,13 +255,21 @@ 'src/EventListenerWrapper.h', 'src/FrameLoaderClientImpl.cpp', 'src/FrameLoaderClientImpl.h', - 'src/GeolocationServiceBridgeChromium.cpp', + 'src/GLES2Context.cpp', 'src/gtk/WebFontInfo.cpp', 'src/gtk/WebFontInfo.h', 'src/gtk/WebInputEventFactory.cpp', + 'src/IDBCallbacksProxy.h', + 'src/IDBDatabaseProxy.cpp', + 'src/IDBDatabaseProxy.h', + 'src/IndexedDatabaseProxy.cpp', + 'src/IndexedDatabaseProxy.h', 'src/InspectorClientImpl.cpp', 'src/InspectorClientImpl.h', + 'src/InspectorFrontendClientImpl.cpp', + 'src/InspectorFrontendClientImpl.h', 'src/linux/WebFontRendering.cpp', + 'src/linux/WebFontRenderStyle.cpp', 'src/linux/WebRenderTheme.cpp', 'src/x11/WebScreenInfoFactory.cpp', 'src/mac/WebInputEventFactory.mm', @@ -276,6 +306,7 @@ 'src/WebBindings.cpp', 'src/WebCache.cpp', 'src/WebColor.cpp', + 'src/WebCommon.cpp', 'src/WebCrossOriginPreflightResultCache.cpp', 'src/WebCString.cpp', 'src/WebCursorInfo.cpp', @@ -299,19 +330,30 @@ 'src/WebFileChooserCompletionImpl.cpp', 'src/WebFileChooserCompletionImpl.h', 'src/WebFontCache.cpp', + 'src/WebFormControlElement.cpp', 'src/WebFormElement.cpp', 'src/WebFrameImpl.cpp', 'src/WebFrameImpl.h', + 'src/WebGeolocationServiceBridgeImpl.cpp', + 'src/WebGeolocationServiceBridgeImpl.h', 'src/WebGlyphCache.cpp', + 'src/WebGraphicsContext3D.cpp', + 'src/WebGraphicsContext3DDefaultImpl.cpp', + 'src/WebGraphicsContext3DDefaultImpl.h', 'src/WebHistoryItem.cpp', 'src/WebHTTPBody.cpp', + 'src/WebIDBDatabaseError.cpp', 'src/WebImageCG.cpp', + 'src/WebImageDecoder.cpp', 'src/WebImageSkia.cpp', + 'src/WebIndexedDatabaseImpl.cpp', + 'src/WebIndexedDatabaseImpl.h', 'src/WebInputElement.cpp', 'src/WebInputEvent.cpp', 'src/WebInputEventConversion.cpp', 'src/WebInputEventConversion.h', 'src/WebKit.cpp', + 'src/WebLabelElement.cpp', 'src/WebMediaPlayerClientImpl.cpp', 'src/WebMediaPlayerClientImpl.h', 'src/WebMutationEvent.cpp', @@ -327,6 +369,7 @@ 'src/WebPasswordFormUtils.h', 'src/WebPluginContainerImpl.h', 'src/WebPluginContainerImpl.cpp', + 'src/WebPluginDocument.cpp', 'src/WebPluginListBuilderImpl.cpp', 'src/WebPluginListBuilderImpl.h', 'src/WebPluginLoadObserver.cpp', @@ -340,6 +383,8 @@ 'src/WebSearchableFormData.cpp', 'src/WebSecurityOrigin.cpp', 'src/WebSecurityPolicy.cpp', + 'src/WebSelectElement.cpp', + 'src/WebSerializedScriptValue.cpp', 'src/WebSettingsImpl.cpp', 'src/WebSettingsImpl.h', 'src/WebSharedWorkerImpl.cpp', @@ -457,6 +502,7 @@ 'src', ], 'sources': [ + 'tests/DragImageTest.cpp', 'tests/KeyboardTest.cpp', 'tests/KURLTest.cpp', 'tests/RunAllTests.cpp', @@ -464,10 +510,18 @@ 'conditions': [ ['OS=="win"', { 'sources': [ + # FIXME: Port PopupMenuTest to Linux and Mac. + 'tests/PopupMenuTest.cpp', 'tests/TransparencyWinTest.cpp', 'tests/UniscribeHelperTest.cpp', ], }], + ['OS=="mac"', { + 'sources!': [ + # FIXME: Port DragImageTest to Mac. + 'tests/DragImageTest.cpp', + ], + }], ], }, ], # targets diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi index 69b1479..37faa99 100644 --- a/WebKit/chromium/WebKit.gypi +++ b/WebKit/chromium/WebKit.gypi @@ -35,6 +35,7 @@ 'devtools_js_files': [ 'src/js/InspectorControllerImpl.js', 'src/js/DebuggerAgent.js', + 'src/js/DebuggerScript.js', 'src/js/ProfilerAgent.js', 'src/js/ProfilerProcessor.js', 'src/js/HeapProfilerPanel.js', @@ -47,14 +48,19 @@ ], 'devtools_image_files': [ 'src/js/Images/segmentChromium.png', + 'src/js/Images/segmentChromium2.png', 'src/js/Images/segmentHoverChromium.png', + 'src/js/Images/segmentHoverChromium2.png', 'src/js/Images/segmentHoverEndChromium.png', 'src/js/Images/segmentSelectedChromium.png', + 'src/js/Images/segmentSelectedChromium2.png', 'src/js/Images/segmentSelectedEndChromium.png', 'src/js/Images/statusbarBackgroundChromium.png', + 'src/js/Images/statusbarBackgroundChromium2.png', 'src/js/Images/statusbarBottomBackgroundChromium.png', 'src/js/Images/statusbarButtonsChromium.png', 'src/js/Images/statusbarMenuButtonChromium.png', + 'src/js/Images/statusbarMenuButtonChromium2.png', 'src/js/Images/statusbarMenuButtonSelectedChromium.png', ], }, diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi index 0fc6516..7146685 100644 --- a/WebKit/chromium/features.gypi +++ b/WebKit/chromium/features.gypi @@ -40,12 +40,15 @@ # features_override.gypi inline documentation for more details. 'feature_defines%': [ 'ENABLE_3D_CANVAS=0', + 'ENABLE_BLOB_SLICE=1', 'ENABLE_CHANNEL_MESSAGING=1', 'ENABLE_DATABASE=1', 'ENABLE_DATAGRID=0', 'ENABLE_OFFLINE_WEB_APPLICATIONS=1', 'ENABLE_DASHBOARD_SUPPORT=0', 'ENABLE_DOM_STORAGE=1', + 'ENABLE_FILE_READER=0', + 'ENABLE_FILE_WRITER=0', 'ENABLE_GEOLOCATION=1', 'ENABLE_JAVASCRIPT_DEBUGGER=1', 'ENABLE_JSC_MULTIPLE_THREADS=0', @@ -55,6 +58,7 @@ 'ENABLE_OPENTYPE_SANITIZER=1', 'ENABLE_ORIENTATION_EVENTS=0', 'ENABLE_RUBY=1', + 'ENABLE_SANDBOX=1', 'ENABLE_XHTMLMP=0', 'ENABLE_XSLT=1', 'ENABLE_XPATH=1', @@ -65,12 +69,17 @@ 'ENABLE_SVG_USE=1', 'ENABLE_SVG_FOREIGN_OBJECT=1', 'ENABLE_SVG_FONTS=1', + 'ENABLE_TOUCH_EVENTS=1', 'ENABLE_VIDEO=1', 'ENABLE_WEB_SOCKETS=1', 'ENABLE_WORKERS=1', 'WTF_USE_ACCELERATED_COMPOSITING=0', ], + + 'enable_svg%': 1, }, + 'feature_defines%': '<(feature_defines)', + 'enable_svg%': '<(enable_svg)', }, } diff --git a/WebKit/chromium/gyp_webkit b/WebKit/chromium/gyp_webkit index ef18239..db1aa7a 100644 --- a/WebKit/chromium/gyp_webkit +++ b/WebKit/chromium/gyp_webkit @@ -78,7 +78,7 @@ if __name__ == '__main__': args.extend(['-I' + i for i in additional_include_files(args)]) # On linux, we want gyp to output a makefile (default is scons). - if (platform.system() == 'Linux'): + if platform.system() == 'Linux': args.extend(['-fmake']) # Other command args: @@ -94,6 +94,10 @@ if __name__ == '__main__': # gyp file to execute. 'WebKit.gyp']) + # Generate DRT build files on the platforms that support it. + if platform.system() in ('Darwin', 'Linux'): + args.append('../../WebKitTools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp') + print 'Updating webkit projects from gyp files...' sys.stdout.flush() diff --git a/WebKit/chromium/public/WebApplicationCacheHost.h b/WebKit/chromium/public/WebApplicationCacheHost.h index 7c5dafe..23be4dd 100644 --- a/WebKit/chromium/public/WebApplicationCacheHost.h +++ b/WebKit/chromium/public/WebApplicationCacheHost.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * 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 @@ -42,7 +42,7 @@ class WebURLResponse; struct WebURLError; // This interface is used by webkit to call out to the embedder. Webkit uses -// the WebKitClient::createApplicationCacheHost method to create instances, +// the WebFrameClient::createApplicationCacheHost method to create instances, // and calls delete when the instance is no longer needed. class WebApplicationCacheHost { public: diff --git a/WebKit/chromium/public/WebCString.h b/WebKit/chromium/public/WebCString.h index 434cb06..d24916b 100644 --- a/WebKit/chromium/public/WebCString.h +++ b/WebKit/chromium/public/WebCString.h @@ -34,7 +34,7 @@ #include "WebCommon.h" #if WEBKIT_IMPLEMENTATION -namespace WebCore { class CString; } +namespace WTF { class CString; } #else #include <string> #endif @@ -84,9 +84,9 @@ public: WEBKIT_API static WebCString fromUTF16(const WebUChar* data); #if WEBKIT_IMPLEMENTATION - WebCString(const WebCore::CString&); - WebCString& operator=(const WebCore::CString&); - operator WebCore::CString() const; + WebCString(const WTF::CString&); + WebCString& operator=(const WTF::CString&); + operator WTF::CString() const; #else WebCString(const std::string& s) : m_private(0) { diff --git a/WebKit/chromium/public/WebCommon.h b/WebKit/chromium/public/WebCommon.h index d347ea6..e7e38d3 100644 --- a/WebKit/chromium/public/WebCommon.h +++ b/WebKit/chromium/public/WebCommon.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * 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 @@ -89,6 +89,21 @@ typedef wchar_t WebUChar; typedef unsigned short WebUChar; #endif +// ----------------------------------------------------------------------------- +// Assertions + +WEBKIT_API void failedAssertion(const char* file, int line, const char* function, const char* assertion); + } // namespace WebKit +// Ideally, only use inside the public directory but outside of WEBKIT_IMPLEMENTATION blocks. (Otherwise use WTF's ASSERT.) +#if defined(NDEBUG) +#define WEBKIT_ASSERT(assertion) ((void)0) +#else +#define WEBKIT_ASSERT(assertion) do { \ + if (!(assertion)) \ + failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \ +} while (0) +#endif + #endif diff --git a/WebKit/chromium/public/WebCommonWorkerClient.h b/WebKit/chromium/public/WebCommonWorkerClient.h index 771ffff..f4df16d 100644 --- a/WebKit/chromium/public/WebCommonWorkerClient.h +++ b/WebKit/chromium/public/WebCommonWorkerClient.h @@ -49,14 +49,18 @@ public: const WebString& errorString, int lineNumber, const WebString& sourceURL) = 0; - virtual void postConsoleMessageToWorkerObject( - int destinationIdentifier, - int sourceIdentifier, - int messageType, - int messageLevel, - const WebString& message, - int lineNumber, - const WebString& sourceURL) = 0; + // FIXME: the below is for compatibility only and should be + // removed once Chromium is updated to remove message + // destination parameter <http://webkit.org/b/37155>. + virtual void postConsoleMessageToWorkerObject(int, int sourceIdentifier, int messageType, int messageLevel, + const WebString& message, int lineNumber, const WebString& sourceURL) = 0; + + virtual void postConsoleMessageToWorkerObject(int sourceIdentifier, int messageType, int messageLevel, + const WebString& message, int lineNumber, const WebString& sourceURL) + { + postConsoleMessageToWorkerObject(0, sourceIdentifier, messageType, messageLevel, + message, lineNumber, sourceURL); + } virtual void workerContextClosed() = 0; virtual void workerContextDestroyed() = 0; diff --git a/WebKit/chromium/public/WebContextMenuData.h b/WebKit/chromium/public/WebContextMenuData.h index 384240d..25036d4 100644 --- a/WebKit/chromium/public/WebContextMenuData.h +++ b/WebKit/chromium/public/WebContextMenuData.h @@ -83,6 +83,8 @@ struct WebContextMenuData { MediaLoop = 0x8, MediaCanSave = 0x10, MediaHasAudio = 0x20, + MediaHasVideo = 0x40, + MediaControls = 0x80, }; // Extra attributes describing media elements. diff --git a/WebKit/chromium/public/WebCookieJar.h b/WebKit/chromium/public/WebCookieJar.h index df70341..6daba6b 100644 --- a/WebKit/chromium/public/WebCookieJar.h +++ b/WebKit/chromium/public/WebCookieJar.h @@ -31,8 +31,9 @@ #ifndef WebCookieJar_h #define WebCookieJar_h +#include "WebString.h" + namespace WebKit { -class WebString; class WebURL; struct WebCookie; template <typename T> class WebVector; diff --git a/WebKit/chromium/public/WebDevToolsFrontendClient.h b/WebKit/chromium/public/WebDevToolsFrontendClient.h index 6200709..754ecf9 100644 --- a/WebKit/chromium/public/WebDevToolsFrontendClient.h +++ b/WebKit/chromium/public/WebDevToolsFrontendClient.h @@ -46,8 +46,8 @@ public: virtual void activateWindow() {}; virtual void closeWindow() {}; - virtual void dockWindow() {}; - virtual void undockWindow() {}; + virtual void requestDockWindow() {}; + virtual void requestUndockWindow() {}; protected: virtual ~WebDevToolsFrontendClient() {} diff --git a/WebKit/chromium/public/WebDocument.h b/WebKit/chromium/public/WebDocument.h index 8964d3a..1f09653 100644 --- a/WebKit/chromium/public/WebDocument.h +++ b/WebKit/chromium/public/WebDocument.h @@ -42,6 +42,7 @@ namespace WebKit { class WebElement; class WebFrame; class WebNodeCollection; +class WebNodeList; class WebString; class WebURL; @@ -61,15 +62,17 @@ public: // Returns the frame the document belongs to or 0 if the document is frameless. WEBKIT_API WebFrame* frame() const; WEBKIT_API bool isHTMLDocument() const; + WEBKIT_API bool isPluginDocument() const; WEBKIT_API WebURL baseURL() const; + WEBKIT_API WebURL firstPartyForCookies() const; WEBKIT_API WebElement documentElement() const; WEBKIT_API WebElement body() const; WEBKIT_API WebElement head(); WEBKIT_API WebString title() const; WEBKIT_API WebNodeCollection all(); WEBKIT_API WebURL completeURL(const WebString&) const; - WEBKIT_API WebElement getElementById(const WebString& id) const; - WEBKIT_API WebString applicationID() const; + WEBKIT_API WebElement getElementById(const WebString&) const; + WEBKIT_API WebNode focusedNode() const; #if WEBKIT_IMPLEMENTATION WebDocument(const WTF::PassRefPtr<WebCore::Document>&); diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h index 20f6c9a..1be40bc 100644 --- a/WebKit/chromium/public/WebElement.h +++ b/WebKit/chromium/public/WebElement.h @@ -35,7 +35,6 @@ #if WEBKIT_IMPLEMENTATION namespace WebCore { class Element; } -namespace WTF { template <typename T> class PassRefPtr; } #endif namespace WebKit { @@ -48,6 +47,7 @@ namespace WebKit { WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *this; } void assign(const WebElement& e) { WebNode::assign(e); } + WEBKIT_API bool isFormControlElement() const; WEBKIT_API WebString tagName() const; WEBKIT_API bool hasTagName(const WebString&) const; WEBKIT_API bool hasAttribute(const WebString&) const; diff --git a/WebKit/chromium/public/WebFormControlElement.h b/WebKit/chromium/public/WebFormControlElement.h new file mode 100644 index 0000000..ee0783d --- /dev/null +++ b/WebKit/chromium/public/WebFormControlElement.h @@ -0,0 +1,74 @@ +/* + * 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 WebFormControlElement_h +#define WebFormControlElement_h + +#include "WebElement.h" +#include "WebString.h" + +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class HTMLFormControlElement; } +#endif + +namespace WebKit { + +// Provides readonly access to some properties of a DOM form control element node. +class WebFormControlElement : public WebElement { +public: + WebFormControlElement() : WebElement() { } + WebFormControlElement(const WebFormControlElement& e) : WebElement(e) { } + + WebFormControlElement& operator=(const WebFormControlElement& e) + { + WebElement::assign(e); + return *this; + } + WEBKIT_API void assign(const WebFormControlElement& e) { WebElement::assign(e); } + + WEBKIT_API bool isEnabled() const; + WEBKIT_API WebString formControlName() const; + WEBKIT_API WebString formControlType() const; + + // Returns the name that should be used for the specified |element| when + // storing autofill data. This is either the field name or its id, an empty + // string if it has no name and no id. + WEBKIT_API WebString nameForAutofill() const; + +#if WEBKIT_IMPLEMENTATION + WebFormControlElement(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>&); + WebFormControlElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>&); + operator WTF::PassRefPtr<WebCore::HTMLFormControlElement>() const; +#endif +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h index b07bff9..8cb4e47 100644 --- a/WebKit/chromium/public/WebFormElement.h +++ b/WebKit/chromium/public/WebFormElement.h @@ -32,15 +32,17 @@ #define WebFormElement_h #include "WebElement.h" -#include "WebInputElement.h" #include "WebVector.h" #if WEBKIT_IMPLEMENTATION namespace WebCore { class HTMLFormElement; } -namespace WTF { template <typename T> class PassRefPtr; } #endif namespace WebKit { + + class WebInputElement; + class WebFormControlElement; + // A container for passing around a reference to a form element. Provides // some information about the form. class WebFormElement : public WebElement { @@ -57,12 +59,6 @@ namespace WebKit { } WEBKIT_API void assign(const WebFormElement& e) { WebElement::assign(e); } -#if WEBKIT_IMPLEMENTATION - WebFormElement(const WTF::PassRefPtr<WebCore::HTMLFormElement>&); - WebFormElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormElement>&); - operator WTF::PassRefPtr<WebCore::HTMLFormElement>() const; -#endif - WEBKIT_API bool autoComplete() const; WEBKIT_API WebString action() const; WEBKIT_API WebString name() const; @@ -70,7 +66,15 @@ namespace WebKit { WEBKIT_API void submit(); // FIXME: Deprecate and replace with WebVector<WebElement>. WEBKIT_API void getNamedElements(const WebString&, WebVector<WebNode>&); + // DEPRECATED: Replaced by getFormControlElements. WEBKIT_API void getInputElements(WebVector<WebInputElement>&) const; + WEBKIT_API void getFormControlElements(WebVector<WebFormControlElement>&) const; + +#if WEBKIT_IMPLEMENTATION + WebFormElement(const WTF::PassRefPtr<WebCore::HTMLFormElement>&); + WebFormElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormElement>&); + operator WTF::PassRefPtr<WebCore::HTMLFormElement>() const; +#endif }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h index f193b9e..f112446 100644 --- a/WebKit/chromium/public/WebFrame.h +++ b/WebKit/chromium/public/WebFrame.h @@ -39,6 +39,8 @@ struct NPObject; #if WEBKIT_USING_V8 namespace v8 { class Context; +class Value; +template <class T> class Handle; template <class T> class Local; } #endif @@ -123,6 +125,9 @@ public: // NOTE: These routines do not force page layout so their results may // not be accurate if the page layout is out-of-date. + // If set to false, do not draw scrollbars on this frame's view. + virtual void setCanHaveScrollbars(bool) = 0; + // The scroll offset from the top-left corner of the frame in pixels. virtual WebSize scrollOffset() const = 0; @@ -222,6 +227,11 @@ public: virtual void collectGarbage() = 0; #if WEBKIT_USING_V8 + // Executes script in the context of the current page and returns the value + // that the script evaluated to. + virtual v8::Handle<v8::Value> executeScriptAndReturnValue( + const WebScriptSource&) = 0; + // Returns the V8 context for this frame, or an empty handle if there // is none. virtual v8::Local<v8::Context> mainWorldScriptContext() const = 0; @@ -367,10 +377,14 @@ public: // Printing ------------------------------------------------------------ - // Reformats the WebFrame for printing. pageSize is the page size in - // pixels. Returns the number of pages that can be printed at the - // given page size. - virtual int printBegin(const WebSize& pageSize) = 0; + // Reformats the WebFrame for printing. pageSize is the page size in + // points (a point in 1/72 of an inch). printerDPI is the user selected, + // DPI for the printer. Returns the number of pages that + // can be printed at the given page size. The out param useBrowserOverlays + // specifies whether the browser process should use its overlays (header, + // footer, margins etc) or whether the renderer controls this. + virtual int printBegin(const WebSize& pageSize, int printerDPI = 72, + bool* useBrowserOverlays = 0) = 0; // Returns the page shrinking factor calculated by webkit (usually // between 1/1.25 and 1/2). Returns 0 if the page number is invalid or @@ -492,6 +506,12 @@ public: float pageWidthInPixels, float pageHeightInPixels) const = 0; + // Returns the bounds rect for current selection. If selection is performed + // on transformed text, the rect will still bound the selection but will + // not be transformed itself. If no selection is present, the rect will be + // empty ((0,0), (0,0)). + virtual WebRect selectionBoundsRect() const = 0; + protected: ~WebFrame() { } }; diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h index ae2541a..315cf87 100644 --- a/WebKit/chromium/public/WebFrameClient.h +++ b/WebKit/chromium/public/WebFrameClient.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * 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 @@ -38,6 +38,8 @@ namespace WebKit { +class WebApplicationCacheHost; +class WebApplicationCacheHostClient; class WebCookieJar; class WebDataSource; class WebFormElement; @@ -75,10 +77,14 @@ public: // May return null. virtual WebMediaPlayer* createMediaPlayer(WebFrame*, WebMediaPlayerClient*) { return 0; } + // May return null. + virtual WebApplicationCacheHost* createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient*) { return 0; } + // Services ------------------------------------------------------------ - // A frame specific cookie jar. May return null. + // A frame specific cookie jar. May return null, in which case + // WebKitClient::cookieJar() will be called to access cookies. virtual WebCookieJar* cookieJar() { return 0; } @@ -90,6 +96,9 @@ public: // Controls whether plugins are allowed for this frame. virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; } + // Notifies the client that the frame would have instantiated a plug-in if plug-ins were enabled. + virtual void didNotAllowPlugins(WebFrame*) { } + // Controls whether images are allowed for this frame. virtual bool allowImages(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; } @@ -195,9 +204,16 @@ public: // The frame's document and all of its subresources succeeded to load. virtual void didFinishLoad(WebFrame*) { } + // The navigation resulted in no change to the documents within the page. + // For example, the navigation may have just resulted in scrolling to a + // named anchor or a PopState event may have been dispatched. + virtual void didNavigateWithinPage(WebFrame*, bool isNewNavigation) { } + // The navigation resulted in scrolling the page to a named anchor instead // of downloading a new document. + // FIXME: The isNewNavigation parameter is DEPRECATED. virtual void didChangeLocationWithinPage(WebFrame*, bool isNewNavigation) { } + virtual void didChangeLocationWithinPage(WebFrame*) { } // Called upon update to scroll position, document state, and other // non-navigational events related to the data held by WebHistoryItem. @@ -252,6 +268,12 @@ public: // Controls whether scripts are allowed to execute for this frame. virtual bool allowScript(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; } + // Controls whether access to Web Databases is allowed for this frame. + virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) { return true; } + + // Notifies the client that the frame would have executed script if script were enabled. + virtual void didNotAllowScript(WebFrame*) { } + // Script in the page tried to allocate too much memory. virtual void didExhaustMemoryAvailableForScript(WebFrame*) { } diff --git a/WebKit/chromium/public/WebGLES2Context.h b/WebKit/chromium/public/WebGLES2Context.h new file mode 100644 index 0000000..bd63060 --- /dev/null +++ b/WebKit/chromium/public/WebGLES2Context.h @@ -0,0 +1,56 @@ +/* + * 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 WebGLES2Context_h +#define WebGLES2Context_h + +#include "WebCommon.h" +#include "WebNonCopyable.h" + +namespace WebKit { + +class WebView; + +// This interface abstracts the creation and management of an +// OpenGL ES 2.0 context. + +class WebGLES2Context : public WebNonCopyable { +public: + virtual ~WebGLES2Context() {} + + virtual bool initialize(WebView*) = 0; + virtual bool makeCurrent() = 0; + virtual bool destroy() = 0; + virtual bool swapBuffers() = 0; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebGeolocationService.h b/WebKit/chromium/public/WebGeolocationService.h new file mode 100644 index 0000000..ed8c4e8 --- /dev/null +++ b/WebKit/chromium/public/WebGeolocationService.h @@ -0,0 +1,61 @@ +/* + * 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 WebGeolocationService_h +#define WebGeolocationService_h + +#include "WebGeolocationServiceBridge.h" + +namespace WebKit { + +class WebString; +class WebURL; + +// Provides an embedder API called by WebKit. +class WebGeolocationService { +public: + virtual void requestPermissionForFrame(int bridgeId, const WebURL& url) { } + virtual void cancelPermissionRequestForFrame(int bridgeId, const WebURL&) { } + virtual void startUpdating(int bridgeId, const WebURL& url, bool enableHighAccuracy) { } + virtual void stopUpdating(int bridgeId) { } + virtual void suspend(int bridgeId) { } + virtual void resume(int bridgeId) { } + + // Attaches the WebGeolocationServiceBridge to the embedder and returns its + // id, which should be used on subsequent calls for the methods above. + virtual int attachBridge(WebGeolocationServiceBridge*) { return 0; } + + // Detaches the WebGeolocationServiceBridge from the embedder. + virtual void detachBridge(int bridgeId) { } +}; + +} // namespace WebKit + +#endif // WebGeolocationService_h diff --git a/WebKit/chromium/public/GeolocationServiceBridgeChromium.h b/WebKit/chromium/public/WebGeolocationServiceBridge.h index adca956..9f0ffd4 100644 --- a/WebKit/chromium/public/GeolocationServiceBridgeChromium.h +++ b/WebKit/chromium/public/WebGeolocationServiceBridge.h @@ -28,8 +28,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef GeolocationServiceBridgeChromium_h -#define GeolocationServiceBridgeChromium_h +#ifndef WebGeolocationServiceBridge_h +#define WebGeolocationServiceBridge_h namespace WebCore { class GeolocationServiceBridge; @@ -49,25 +49,6 @@ public: virtual void setLastError(int errorCode, const WebString& message) = 0; }; -// Provides an embedder API called by WebKit. -class WebGeolocationServiceInterface { -public: - virtual void requestPermissionForFrame(int bridgeId, const WebURL& url) = 0; - virtual void startUpdating(int bridgeId, bool hasHighAccuracy) = 0; - virtual void stopUpdating(int bridgeId) = 0; - virtual void suspend(int bridgeId) = 0; - virtual void resume(int bridgeId) = 0; - - // Attaches the GeolocationBridge to the embedder and returns its id, which - // should be used on subsequent calls for the methods above. - virtual int attachBridge(WebKit::WebGeolocationServiceBridge* geolocationServiceBridge) = 0; - - // Dettaches the GeolocationService from the embedder. - virtual void dettachBridge(int bridgeId) = 0; -}; - -WebCore::GeolocationServiceBridge* createGeolocationServiceBridgeImpl(WebCore::GeolocationServiceChromium*); - } // namespace WebKit -#endif // GeolocationServiceBridgeChromium_h +#endif // WebGeolocationServiceBridge_h diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h new file mode 100644 index 0000000..3418ef9 --- /dev/null +++ b/WebKit/chromium/public/WebGraphicsContext3D.h @@ -0,0 +1,302 @@ +/* + * 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 WebGraphicsContext3D_h +#define WebGraphicsContext3D_h + +#include "WebCommon.h" +#include "WebNonCopyable.h" +#include "WebString.h" + +namespace WebKit { + +// Typedef for server-side objects like OpenGL textures and program objects. +typedef unsigned int WebGLId; + +// This interface abstracts the operations performed by the +// GraphicsContext3D in order to implement WebGL. Nearly all of the +// methods exposed on this interface map directly to entry points in +// the OpenGL ES 2.0 API. + +class WebGraphicsContext3D : public WebNonCopyable { +public: + // Return value from getActiveUniform and getActiveAttrib. + struct ActiveInfo { + WebString name; + unsigned type; + int size; + }; + + // Context creation attributes. + struct Attributes { + Attributes() + : alpha(true) + , depth(true) + , stencil(true) + , antialias(true) + , premultipliedAlpha(true) + { + } + + bool alpha; + bool depth; + bool stencil; + bool antialias; + bool premultipliedAlpha; + }; + + // This destructor needs to be public so that using classes can destroy instances if initialization fails. + virtual ~WebGraphicsContext3D() {} + + // Creates a "default" implementation of WebGraphicsContext3D which calls + // OpenGL directly. + static WebGraphicsContext3D* createDefault(); + + // Initializes the graphics context; should be the first operation performed + // on newly-constructed instances. Returns true on success. + virtual bool initialize(Attributes) = 0; + + // Makes the OpenGL context current on the current thread. Returns true on + // success. + virtual bool makeContextCurrent() = 0; + + // The size of the region into which this WebGraphicsContext3D is rendering. + // Returns the last values passed to reshape(). + virtual int width() = 0; + virtual int height() = 0; + + // Helper to return the size in bytes of OpenGL data types + // like GL_FLOAT, GL_INT, etc. + virtual int sizeInBytes(int type) = 0; + + // Resizes the region into which this WebGraphicsContext3D is drawing. + virtual void reshape(int width, int height) = 0; + + // Helper for software compositing path. Reads back the frame buffer into + // the memory region pointed to by "pixels" with size "bufferSize". It is + // expected that the storage for "pixels" covers (4 * width * height) bytes. + // Returns true on success. + virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize) = 0; + + // Synthesizes an OpenGL error which will be returned from a + // later call to getError. This is used to emulate OpenGL ES + // 2.0 behavior on the desktop and to enforce additional error + // checking mandated by WebGL. + // + // Per the behavior of glGetError, this stores at most one + // instance of any given error, and returns them from calls to + // getError in the order they were added. + virtual void synthesizeGLError(unsigned long error) = 0; + + // The entry points below map directly to the OpenGL ES 2.0 API. + // See: http://www.khronos.org/registry/gles/ + // and: http://www.khronos.org/opengles/sdk/docs/man/ + virtual void activeTexture(unsigned long texture) = 0; + virtual void attachShader(WebGLId program, WebGLId shader) = 0; + virtual void bindAttribLocation(WebGLId program, unsigned long index, const char* name) = 0; + virtual void bindBuffer(unsigned long target, WebGLId buffer) = 0; + virtual void bindFramebuffer(unsigned long target, WebGLId framebuffer) = 0; + virtual void bindRenderbuffer(unsigned long target, WebGLId renderbuffer) = 0; + virtual void bindTexture(unsigned long target, WebGLId texture) = 0; + virtual void blendColor(double red, double green, double blue, double alpha) = 0; + virtual void blendEquation(unsigned long mode) = 0; + virtual void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha) = 0; + virtual void blendFunc(unsigned long sfactor, unsigned long dfactor) = 0; + virtual void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha) = 0; + + virtual void bufferData(unsigned long target, int size, const void* data, unsigned long usage) = 0; + virtual void bufferSubData(unsigned long target, long offset, int size, const void* data) = 0; + + virtual unsigned long checkFramebufferStatus(unsigned long target) = 0; + virtual void clear(unsigned long mask) = 0; + virtual void clearColor(double red, double green, double blue, double alpha) = 0; + virtual void clearDepth(double depth) = 0; + virtual void clearStencil(long s) = 0; + virtual void colorMask(bool red, bool green, bool blue, bool alpha) = 0; + virtual void compileShader(WebGLId shader) = 0; + + virtual void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border) = 0; + virtual void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height) = 0; + virtual void cullFace(unsigned long mode) = 0; + virtual void depthFunc(unsigned long func) = 0; + virtual void depthMask(bool flag) = 0; + virtual void depthRange(double zNear, double zFar) = 0; + virtual void detachShader(WebGLId program, WebGLId shader) = 0; + virtual void disable(unsigned long cap) = 0; + virtual void disableVertexAttribArray(unsigned long index) = 0; + virtual void drawArrays(unsigned long mode, long first, long count) = 0; + virtual void drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset) = 0; + + virtual void enable(unsigned long cap) = 0; + virtual void enableVertexAttribArray(unsigned long index) = 0; + virtual void finish() = 0; + virtual void flush() = 0; + virtual void framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, WebGLId renderbuffer) = 0; + virtual void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, WebGLId texture, long level) = 0; + virtual void frontFace(unsigned long mode) = 0; + virtual void generateMipmap(unsigned long target) = 0; + + virtual bool getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo&) = 0; + virtual bool getActiveUniform(WebGLId program, unsigned long index, ActiveInfo&) = 0; + + virtual int getAttribLocation(WebGLId program, const char* name) = 0; + + virtual void getBooleanv(unsigned long pname, unsigned char* value) = 0; + + virtual void getBufferParameteriv(unsigned long target, unsigned long pname, int* value) = 0; + + virtual Attributes getContextAttributes() = 0; + + virtual unsigned long getError() = 0; + + virtual void getFloatv(unsigned long pname, float* value) = 0; + + virtual void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value) = 0; + + virtual void getIntegerv(unsigned long pname, int* value) = 0; + + virtual void getProgramiv(WebGLId program, unsigned long pname, int* value) = 0; + + virtual WebString getProgramInfoLog(WebGLId program) = 0; + + virtual void getRenderbufferParameteriv(unsigned long target, unsigned long pname, int* value) = 0; + + virtual void getShaderiv(WebGLId shader, unsigned long pname, int* value) = 0; + + virtual WebString getShaderInfoLog(WebGLId shader) = 0; + + // TBD + // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); + + virtual WebString getShaderSource(WebGLId shader) = 0; + virtual WebString getString(unsigned long name) = 0; + + virtual void getTexParameterfv(unsigned long target, unsigned long pname, float* value) = 0; + virtual void getTexParameteriv(unsigned long target, unsigned long pname, int* value) = 0; + + virtual void getUniformfv(WebGLId program, long location, float* value) = 0; + virtual void getUniformiv(WebGLId program, long location, int* value) = 0; + + virtual long getUniformLocation(WebGLId program, const char* name) = 0; + + virtual void getVertexAttribfv(unsigned long index, unsigned long pname, float* value) = 0; + virtual void getVertexAttribiv(unsigned long index, unsigned long pname, int* value) = 0; + + virtual long getVertexAttribOffset(unsigned long index, unsigned long pname) = 0; + + virtual void hint(unsigned long target, unsigned long mode) = 0; + virtual bool isBuffer(WebGLId buffer) = 0; + virtual bool isEnabled(unsigned long cap) = 0; + virtual bool isFramebuffer(WebGLId framebuffer) = 0; + virtual bool isProgram(WebGLId program) = 0; + virtual bool isRenderbuffer(WebGLId renderbuffer) = 0; + virtual bool isShader(WebGLId shader) = 0; + virtual bool isTexture(WebGLId texture) = 0; + virtual void lineWidth(double) = 0; + virtual void linkProgram(WebGLId program) = 0; + virtual void pixelStorei(unsigned long pname, long param) = 0; + virtual void polygonOffset(double factor, double units) = 0; + + virtual void readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels) = 0; + + virtual void releaseShaderCompiler() = 0; + virtual void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height) = 0; + virtual void sampleCoverage(double value, bool invert) = 0; + virtual void scissor(long x, long y, unsigned long width, unsigned long height) = 0; + virtual void shaderSource(WebGLId shader, const char* string) = 0; + virtual void stencilFunc(unsigned long func, long ref, unsigned long mask) = 0; + virtual void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask) = 0; + virtual void stencilMask(unsigned long mask) = 0; + virtual void stencilMaskSeparate(unsigned long face, unsigned long mask) = 0; + virtual void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass) = 0; + virtual void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass) = 0; + + virtual void texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels) = 0; + + virtual void texParameterf(unsigned target, unsigned pname, float param) = 0; + virtual void texParameteri(unsigned target, unsigned pname, int param) = 0; + + virtual void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, const void* pixels) = 0; + + virtual void uniform1f(long location, float x) = 0; + virtual void uniform1fv(long location, int count, float* v) = 0; + virtual void uniform1i(long location, int x) = 0; + virtual void uniform1iv(long location, int count, int* v) = 0; + virtual void uniform2f(long location, float x, float y) = 0; + virtual void uniform2fv(long location, int count, float* v) = 0; + virtual void uniform2i(long location, int x, int y) = 0; + virtual void uniform2iv(long location, int count, int* v) = 0; + virtual void uniform3f(long location, float x, float y, float z) = 0; + virtual void uniform3fv(long location, int count, float* v) = 0; + virtual void uniform3i(long location, int x, int y, int z) = 0; + virtual void uniform3iv(long location, int count, int* v) = 0; + virtual void uniform4f(long location, float x, float y, float z, float w) = 0; + virtual void uniform4fv(long location, int count, float* v) = 0; + virtual void uniform4i(long location, int x, int y, int z, int w) = 0; + virtual void uniform4iv(long location, int count, int* v) = 0; + virtual void uniformMatrix2fv(long location, int count, bool transpose, const float* value) = 0; + virtual void uniformMatrix3fv(long location, int count, bool transpose, const float* value) = 0; + virtual void uniformMatrix4fv(long location, int count, bool transpose, const float* value) = 0; + + virtual void useProgram(WebGLId program) = 0; + virtual void validateProgram(WebGLId program) = 0; + + virtual void vertexAttrib1f(unsigned long indx, float x) = 0; + virtual void vertexAttrib1fv(unsigned long indx, const float* values) = 0; + virtual void vertexAttrib2f(unsigned long indx, float x, float y) = 0; + virtual void vertexAttrib2fv(unsigned long indx, const float* values) = 0; + virtual void vertexAttrib3f(unsigned long indx, float x, float y, float z) = 0; + virtual void vertexAttrib3fv(unsigned long indx, const float* values) = 0; + virtual void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w) = 0; + virtual void vertexAttrib4fv(unsigned long indx, const float* values) = 0; + virtual void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, + unsigned long stride, unsigned long offset) = 0; + + virtual void viewport(long x, long y, unsigned long width, unsigned long height) = 0; + + // Support for buffer creation and deletion. + virtual unsigned createBuffer() = 0; + virtual unsigned createFramebuffer() = 0; + virtual unsigned createProgram() = 0; + virtual unsigned createRenderbuffer() = 0; + virtual unsigned createShader(unsigned long) = 0; + virtual unsigned createTexture() = 0; + + virtual void deleteBuffer(unsigned) = 0; + virtual void deleteFramebuffer(unsigned) = 0; + virtual void deleteProgram(unsigned) = 0; + virtual void deleteRenderbuffer(unsigned) = 0; + virtual void deleteShader(unsigned) = 0; + virtual void deleteTexture(unsigned) = 0; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebHTTPBody.h b/WebKit/chromium/public/WebHTTPBody.h index fcc44ff..a7dc7c9 100644 --- a/WebKit/chromium/public/WebHTTPBody.h +++ b/WebKit/chromium/public/WebHTTPBody.h @@ -81,9 +81,9 @@ public: // Append to the list of elements. WEBKIT_API void appendData(const WebData&); - WEBKIT_API void appendFile(const WebString&); // FIXME: to be removed. + WEBKIT_API void appendFile(const WebString&); // Passing -1 to fileLength means to the end of the file. - WEBKIT_API void appendFile(const WebString&, long long fileStart, long long fileLength, const WebFileInfo&); + WEBKIT_API void appendFileRange(const WebString&, long long fileStart, long long fileLength, const WebFileInfo&); // Identifies a particular form submission instance. A value of 0 is // used to indicate an unspecified identifier. diff --git a/WebKit/chromium/public/WebHistoryItem.h b/WebKit/chromium/public/WebHistoryItem.h index e248a61..015f5d7 100644 --- a/WebKit/chromium/public/WebHistoryItem.h +++ b/WebKit/chromium/public/WebHistoryItem.h @@ -32,17 +32,14 @@ #define WebHistoryItem_h #include "WebCommon.h" +#include "WebPrivatePtr.h" -#if WEBKIT_IMPLEMENTATION namespace WebCore { class HistoryItem; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif namespace WebKit { - -class WebHistoryItemPrivate; class WebHTTPBody; class WebString; +class WebSerializedScriptValue; struct WebPoint; template <typename T> class WebVector; @@ -55,8 +52,8 @@ class WebHistoryItem { public: ~WebHistoryItem() { reset(); } - WebHistoryItem() : m_private(0) { } - WebHistoryItem(const WebHistoryItem& h) : m_private(0) { assign(h); } + WebHistoryItem() { } + WebHistoryItem(const WebHistoryItem& h) { assign(h); } WebHistoryItem& operator=(const WebHistoryItem& h) { assign(h); @@ -67,7 +64,7 @@ public: WEBKIT_API void reset(); WEBKIT_API void assign(const WebHistoryItem&); - bool isNull() const { return !m_private; } + bool isNull() const { return m_private.isNull(); } WEBKIT_API WebString urlString() const; WEBKIT_API void setURLString(const WebString&); @@ -108,6 +105,9 @@ public: WEBKIT_API long long documentSequenceNumber() const; WEBKIT_API void setDocumentSequenceNumber(long long); + WEBKIT_API WebSerializedScriptValue stateObject() const; + WEBKIT_API void setStateObject(const WebSerializedScriptValue&); + WEBKIT_API WebString httpContentType() const; WEBKIT_API void setHTTPContentType(const WebString&); @@ -125,9 +125,8 @@ public: #endif private: - void assign(WebHistoryItemPrivate*); void ensureMutable(); - WebHistoryItemPrivate* m_private; + WebPrivatePtr<WebCore::HistoryItem> m_private; }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBCallbacks.h b/WebKit/chromium/public/WebIDBCallbacks.h new file mode 100644 index 0000000..9e85aa8 --- /dev/null +++ b/WebKit/chromium/public/WebIDBCallbacks.h @@ -0,0 +1,56 @@ +/* + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 WebIDBCallbacks_h +#define WebIDBCallbacks_h + +#include "WebCommon.h" + +namespace WebKit { + +class WebIDBDatabaseError; + +// Every IndexedDB method takes in a pair of callbacks for error/success which +// implement this class. Either 0 or 1 of these methods will be called and the +// callback class may be deleted any time after the callback is called. +template <typename ResultType> +class WebIDBCallbacks { +public: + virtual ~WebIDBCallbacks() { } + + // If the method was a success, this method is called with the result. The + // result is a pointer that the callback takes ownership of. + virtual void onSuccess(ResultType*) = 0; + + // Called in the event of an error. + virtual void onError(const WebIDBDatabaseError&) = 0; +}; + +} // namespace WebKit + +#endif // WebIDBCallbacks_h diff --git a/WebKit/mac/Plugins/WebNullPluginView.h b/WebKit/chromium/public/WebIDBDatabase.h index 3ca1532..403b4e8 100644 --- a/WebKit/mac/Plugins/WebNullPluginView.h +++ b/WebKit/chromium/public/WebIDBDatabase.h @@ -1,18 +1,18 @@ /* - * Copyright (C) 2005, 2007 Apple Inc. All rights reserved. + * 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. + * 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. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -26,16 +26,21 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#import <AppKit/AppKit.h> +#ifndef WebIDBDatabase_h +#define WebIDBDatabase_h -@class DOMElement; +#include "WebCommon.h" -@interface WebNullPluginView : NSImageView -{ - NSError *error; - DOMElement *element; -} +namespace WebKit { -- (id)initWithFrame:(NSRect)frame error:(NSError *)error DOMElement:(DOMElement *)element; +// See comment in WebIndexedDatabase for a high level overview these classes. +class WebIDBDatabase { +public: + virtual ~WebIDBDatabase() { } -@end + // FIXME: Implement. +}; + +} // namespace WebKit + +#endif // WebIDBDatabase_h diff --git a/WebKit/chromium/public/WebIDBDatabaseError.h b/WebKit/chromium/public/WebIDBDatabaseError.h new file mode 100644 index 0000000..f56a0d0 --- /dev/null +++ b/WebKit/chromium/public/WebIDBDatabaseError.h @@ -0,0 +1,72 @@ +/* + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 WebIDBDatabaseError_h +#define WebIDBDatabaseError_h + +#include "WebCommon.h" +#include "WebPrivatePtr.h" +#include "WebString.h" + +namespace WebCore { class IDBDatabaseError; } + +namespace WebKit { + +// See comment in WebIndexedDatabase for a high level overview these classes. +class WebIDBDatabaseError { +public: + ~WebIDBDatabaseError(); + + WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); } + WebIDBDatabaseError(const WebIDBDatabaseError& e) { assign(e); } + WebIDBDatabaseError& operator=(const WebIDBDatabaseError& e) + { + assign(e); + return *this; + } + + WEBKIT_API void assign(const WebIDBDatabaseError&); + + WEBKIT_API unsigned short code() const; + WEBKIT_API WebString message() const; + +#if WEBKIT_IMPLEMENTATION + WebIDBDatabaseError(const WTF::PassRefPtr<WebCore::IDBDatabaseError>&); + WebIDBDatabaseError& operator=(const WTF::PassRefPtr<WebCore::IDBDatabaseError>&); + operator WTF::PassRefPtr<WebCore::IDBDatabaseError>() const; +#endif + +private: + WEBKIT_API void assign(unsigned short code, const WebString& message); + + WebPrivatePtr<WebCore::IDBDatabaseError> m_private; +}; + +} // namespace WebKit + +#endif // WebIDBDatabaseError_h diff --git a/WebKit/chromium/public/WebImageDecoder.h b/WebKit/chromium/public/WebImageDecoder.h new file mode 100644 index 0000000..22db709 --- /dev/null +++ b/WebKit/chromium/public/WebImageDecoder.h @@ -0,0 +1,90 @@ +/* + * 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 WebImageDecoder_h +#define WebImageDecoder_h + +#include "WebCommon.h" +#include "WebImage.h" +#include "WebNonCopyable.h" + +namespace WebCore { class ImageDecoder; } + +namespace WebKit { + +typedef WebCore::ImageDecoder WebImageDecoderPrivate; +class WebData; + +class WebImageDecoder : public WebNonCopyable { +public: + enum Type { + TypeBMP, + TypeICO + }; + + ~WebImageDecoder() { reset(); } + + explicit WebImageDecoder(Type type) { init(type); } + + // Sets data contents for underlying decoder. All the API methods + // require that setData() is called prior to their use. + WEBKIT_API void setData(const WebData& data, bool allDataReceived); + + // Deletes owned decoder. + WEBKIT_API void reset(); + + // Returns true if image decoding failed. + WEBKIT_API bool isFailed() const; + + // Returns true if size information is available for the decoder. + WEBKIT_API bool isSizeAvailable() const; + + // Returns the size of the image. + WEBKIT_API WebSize size() const; + + // Gives frame count for the image. For multiple frames, decoder scans the image data for the count. + WEBKIT_API size_t frameCount() const; + + // Returns if the frame at given index is completely decoded. + WEBKIT_API bool isFrameCompleteAtIndex(int index) const; + + // Creates and returns WebImage from buffer at the index. + WEBKIT_API WebImage getFrameAtIndex(int index) const; + +private: + // Creates type-specific decoder. + WEBKIT_API void init(Type type); + + WebImageDecoderPrivate* m_private; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebIndexedDatabase.h b/WebKit/chromium/public/WebIndexedDatabase.h new file mode 100644 index 0000000..bb75170 --- /dev/null +++ b/WebKit/chromium/public/WebIndexedDatabase.h @@ -0,0 +1,55 @@ +/* + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 WebIndexedDatabase_h +#define WebIndexedDatabase_h + +#include "WebCommon.h" +#include "WebIDBCallbacks.h" + +namespace WebKit { + +class WebFrame; +class WebIDBDatabase; +class WebString; + +// The entry point into the IndexedDatabase API. These classes match their _____Request and +// _____Sync counterparts in the spec, but operate only in an async manner. +// http://dev.w3.org/2006/webapi/WebSimpleDB/ +class WebIndexedDatabase { +public: + WEBKIT_API static WebIndexedDatabase* create(); + + virtual ~WebIndexedDatabase() { } + + virtual void open(const WebString& name, const WebString& description, bool modifyDatabase, WebIDBCallbacks<WebIDBDatabase>*, WebFrame*, int& exceptionCode) = 0; +}; + +} // namespace WebKit + +#endif // WebIndexedDatabase_h diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h index 59643d1..0fec63f 100644 --- a/WebKit/chromium/public/WebInputElement.h +++ b/WebKit/chromium/public/WebInputElement.h @@ -31,29 +31,26 @@ #ifndef WebInputElement_h #define WebInputElement_h -#include "WebElement.h" +#include "WebFormControlElement.h" #if WEBKIT_IMPLEMENTATION namespace WebCore { class HTMLInputElement; } -namespace WTF { template <typename T> class PassRefPtr; } #endif namespace WebKit { // Provides readonly access to some properties of a DOM input element node. - class WebInputElement : public WebElement { + class WebInputElement : public WebFormControlElement { public: - WebInputElement() : WebElement() { } - WebInputElement(const WebInputElement& n) : WebElement(n) { } + WebInputElement() : WebFormControlElement() { } + WebInputElement(const WebInputElement& e) : WebFormControlElement(e) { } - WebInputElement& operator=(const WebInputElement& n) { WebElement::assign(n); return *this; } - WEBKIT_API void assign(const WebInputElement& n) { WebElement::assign(n); } - -#if WEBKIT_IMPLEMENTATION - WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); - WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); - operator WTF::PassRefPtr<WebCore::HTMLInputElement>() const; -#endif + WebInputElement& operator=(const WebInputElement& e) + { + WebFormControlElement::assign(e); + return *this; + } + WEBKIT_API void assign(const WebInputElement& e) { WebFormControlElement::assign(e); } enum InputType { Text = 0, @@ -85,7 +82,7 @@ namespace WebKit { WEBKIT_API bool autoComplete() const; WEBKIT_API bool isEnabledFormControl() const; WEBKIT_API InputType inputType() const; - WEBKIT_API WebString formControlType() const; + WEBKIT_API int maxLength() const; WEBKIT_API bool isActivatedSubmit() const; WEBKIT_API void setActivatedSubmit(bool); WEBKIT_API void setValue(const WebString& value); @@ -93,11 +90,18 @@ namespace WebKit { WEBKIT_API void setAutofilled(bool); WEBKIT_API void dispatchFormControlChangeEvent(); WEBKIT_API void setSelectionRange(int, int); + // DEPRECATED: The following two methods have been moved to WebFormControlElement. WEBKIT_API WebString name() const; // Returns the name that should be used for the specified |element| when - // storing autofill data. This is either the field name or its id, an empty - // string if it has no name and no id. + // storing AutoFill data. This is either the field name or its id, an + // empty string if it has no name and no id. WEBKIT_API WebString nameForAutofill() const; + +#if WEBKIT_IMPLEMENTATION + WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); + WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); + operator WTF::PassRefPtr<WebCore::HTMLInputElement>() const; +#endif }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebInputEvent.h b/WebKit/chromium/public/WebInputEvent.h index 983aa2a..2ac7475 100644 --- a/WebKit/chromium/public/WebInputEvent.h +++ b/WebKit/chromium/public/WebInputEvent.h @@ -32,6 +32,7 @@ #define WebInputEvent_h #include "WebCommon.h" +#include "WebTouchPoint.h" #include <string.h> @@ -96,7 +97,13 @@ public: RawKeyDown, KeyDown, KeyUp, - Char + Char, + + // WebTouchEvent + TouchStart, + TouchMove, + TouchEnd, + TouchCancel, }; enum Modifiers { @@ -121,6 +128,16 @@ public: int modifiers; double timeStampSeconds; // Seconds since epoch. + // Returns true if the WebInputEvent |type| is a mouse event. + static bool isMouseEventType(int type) + { + return type == MouseDown + || type == MouseUp + || type == MouseMove + || type == MouseEnter + || type == MouseLeave; + } + // Returns true if the WebInputEvent |type| is a keyboard event. static bool isKeyboardEventType(int type) { @@ -129,6 +146,15 @@ public: || type == KeyUp || type == Char; } + + // Returns true if the WebInputEvent |type| is a touch event. + static bool isTouchEventType(int type) + { + return type == TouchStart + || type == TouchMove + || type == TouchEnd + || type == TouchCancel; + } }; // WebKeyboardEvent ----------------------------------------------------------- @@ -255,6 +281,22 @@ public: } }; +// WebTouchEvent -------------------------------------------------------------- + +class WebTouchEvent : public WebInputEvent { +public: + static const int touchPointsLengthCap = 4; + + int touchPointsLength; + WebTouchPoint touchPoints[touchPointsLengthCap]; + + WebTouchEvent(unsigned sizeParam = sizeof(WebTouchEvent)) + : WebInputEvent(sizeParam) + , touchPointsLength(0) + { + } +}; + } // namespace WebKit #endif diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h index c5a04b2..38b131d 100644 --- a/WebKit/chromium/public/WebKitClient.h +++ b/WebKit/chromium/public/WebKitClient.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * 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 @@ -36,7 +36,6 @@ #include "WebLocalizedString.h" #include "WebString.h" #include "WebURL.h" -#include "WebVector.h" #include <time.h> @@ -50,6 +49,9 @@ class WebApplicationCacheHost; class WebApplicationCacheHostClient; class WebClipboard; class WebCookieJar; +class WebGLES2Context; +class WebGraphicsContext3D; +class WebIndexedDatabase; class WebMessagePortChannel; class WebMimeRegistry; class WebPluginListBuilder; @@ -59,8 +61,6 @@ class WebSocketStreamHandle; class WebStorageNamespace; class WebThemeEngine; class WebURLLoader; -struct WebCookie; -template <typename T> class WebVector; class WebKitClient { public: @@ -80,12 +80,6 @@ public: virtual WebCookieJar* cookieJar() { return 0; } - // Application Cache -------------------------------------------- - - // May return null if the process type doesn't involve appcaching. - virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) { return 0; } - - // DOM Storage -------------------------------------------------- // Return a LocalStorage namespace that corresponds to the following path. @@ -109,7 +103,7 @@ public: virtual bool deleteFile(const WebString& path) { return false; } virtual bool deleteEmptyDirectory(const WebString& path) { return false; } virtual bool getFileSize(const WebString& path, long long& result) { return false; } - virtual bool getFileModificationTime(const WebString& path, time_t& result) { return false; } + virtual bool getFileModificationTime(const WebString& path, double& result) { return false; } virtual WebString directoryName(const WebString& path) { return WebString(); } virtual WebString pathByAppendingComponent(const WebString& path, const WebString& component) { return WebString(); } virtual bool makeAllDirectories(const WebString& path) { return false; } @@ -130,7 +124,7 @@ public: virtual bool isLinkVisited(unsigned long long linkHash) { return false; } - // Database ------------------------------------------------------------ + // HTML5 Database ------------------------------------------------------ #ifdef WIN32 typedef HANDLE FileHandle; @@ -153,6 +147,11 @@ public: virtual long long databaseGetFileSize(const WebString& vfsFileName) { return 0; } + // Indexed Database ---------------------------------------------------- + + virtual WebIndexedDatabase* indexedDatabase() { return 0; } + + // Keygen -------------------------------------------------------------- // Handle the <keygen> tag for generating client certificates @@ -181,13 +180,6 @@ public: // Network ------------------------------------------------------------- - // These cookie methods are DEPRECATED in favor of cookieJar accessor. - virtual void setCookies(const WebURL&, const WebURL& firstPartyForCookies, const WebString& cookies) { } - virtual WebString cookies(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); } - virtual bool rawCookies(const WebURL&, const WebURL& firstPartyForCookies, WebVector<WebCookie>*) { return false; } - virtual void deleteCookie(const WebURL&, const WebString& cookieName) { } - virtual bool cookiesEnabled(const WebURL&, const WebURL& firstPartyForCookies) { return true; } - // A suggestion to prefetch IP information for the given hostname. virtual void prefetchHostName(const WebString&) { } @@ -273,6 +265,18 @@ public: // Callable from a background WebKit thread. virtual void callOnMainThread(void (*func)()) { } + // WebGL -------------------------------------------------------------- + + // May return null if WebGL is not supported. + // Returns newly allocated WebGraphicsContext3D instance. + virtual WebGraphicsContext3D* createGraphicsContext3D() { return 0; } + + // GLES2 -------------------------------------------------------------- + + // Returns newly allocated WebGLES2Context instance. + // May return null if it fails to create the context. + virtual WebGLES2Context* createGLES2Context() { return 0; } + protected: ~WebKitClient() { } }; diff --git a/WebKit/chromium/public/WebLabelElement.h b/WebKit/chromium/public/WebLabelElement.h new file mode 100644 index 0000000..3e97c39 --- /dev/null +++ b/WebKit/chromium/public/WebLabelElement.h @@ -0,0 +1,68 @@ +/* + * 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 WebLabelElement_h +#define WebLabelElement_h + +#include "WebElement.h" + +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class HTMLLabelElement; } +namespace WTF { template <typename T> class PassRefPtr; } +#endif + +namespace WebKit { + +// Provides readonly access to some properties of a DOM label element node. +class WebLabelElement : public WebElement { +public: + WebLabelElement() : WebElement() { } + WebLabelElement(const WebLabelElement& e) : WebElement(e) { } + + WebLabelElement& operator=(const WebLabelElement& e) + { + WebElement::assign(e); + return *this; + } + + WEBKIT_API void assign(const WebLabelElement& e) { WebElement::assign(e); } + + WEBKIT_API WebElement correspondingControl(); + +#if WEBKIT_IMPLEMENTATION + WebLabelElement(const WTF::PassRefPtr<WebCore::HTMLLabelElement>&); + WebLabelElement& operator=(const WTF::PassRefPtr<WebCore::HTMLLabelElement>&); + operator WTF::PassRefPtr<WebCore::HTMLLabelElement>() const; +#endif +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebMediaPlayerAction.h b/WebKit/chromium/public/WebMediaPlayerAction.h index 3aede25..192704f 100644 --- a/WebKit/chromium/public/WebMediaPlayerAction.h +++ b/WebKit/chromium/public/WebMediaPlayerAction.h @@ -38,7 +38,8 @@ struct WebMediaPlayerAction { Unknown, Play, Mute, - Loop + Loop, + Controls }; Type type; diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h index 4d2a0e9..5a87da0 100644 --- a/WebKit/chromium/public/WebNode.h +++ b/WebKit/chromium/public/WebNode.h @@ -32,12 +32,10 @@ #define WebNode_h #include "WebCommon.h" +#include "WebPrivatePtr.h" #include "WebString.h" namespace WebCore { class Node; } -#if WEBKIT_IMPLEMENTATION -namespace WTF { template <typename T> class PassRefPtr; } -#endif namespace WebKit { class WebDocument; @@ -51,8 +49,8 @@ class WebNode { public: virtual ~WebNode() { reset(); } - WebNode() : m_private(0) { } - WebNode(const WebNode& n) : m_private(0) { assign(n); } + WebNode() { } + WebNode(const WebNode& n) { assign(n); } WebNode& operator=(const WebNode& n) { assign(n); @@ -62,13 +60,9 @@ public: WEBKIT_API void reset(); WEBKIT_API void assign(const WebNode&); - bool isNull() const { return !m_private; } + WEBKIT_API bool equals(const WebNode&) const; -#if WEBKIT_IMPLEMENTATION - WebNode(const WTF::PassRefPtr<WebCore::Node>&); - WebNode& operator=(const WTF::PassRefPtr<WebCore::Node>&); - operator WTF::PassRefPtr<WebCore::Node>() const; -#endif + bool isNull() const { return m_private.isNull(); } enum NodeType { ElementNode = 1, @@ -104,7 +98,10 @@ public: WEBKIT_API bool isElementNode() const; WEBKIT_API void addEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture); WEBKIT_API void removeEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture); + WEBKIT_API void simulateClick(); + WEBKIT_API WebNodeList getElementsByTagName(const WebString&) const; + // Deprecated. Use to() instead. template<typename T> T toElement() { T res; @@ -112,6 +109,7 @@ public: return res; } + // Deprecated. Use toConst() instead. template<typename T> const T toConstElement() const { T res; @@ -119,22 +117,52 @@ public: return res; } + template<typename T> T to() + { + T res; + res.WebNode::assign(*this); + return res; + } + + template<typename T> const T toConst() const + { + T res; + res.WebNode::assign(*this); + return res; + } + +#if WEBKIT_IMPLEMENTATION + WebNode(const WTF::PassRefPtr<WebCore::Node>&); + WebNode& operator=(const WTF::PassRefPtr<WebCore::Node>&); + operator WTF::PassRefPtr<WebCore::Node>() const; +#endif + protected: - typedef WebCore::Node WebNodePrivate; - void assign(WebNodePrivate*); - WebNodePrivate* m_private; - +#if WEBKIT_IMPLEMENTATION template<typename T> T* unwrap() { - return static_cast<T*>(m_private); + return static_cast<T*>(m_private.get()); } template<typename T> const T* constUnwrap() const { - return static_cast<const T*>(m_private); + return static_cast<const T*>(m_private.get()); } +#endif + + WebPrivatePtr<WebCore::Node> m_private; }; +inline bool operator==(const WebNode& a, const WebNode& b) +{ + return a.equals(b); +} + +inline bool operator!=(const WebNode& a, const WebNode& b) +{ + return !(a == b); +} + } // namespace WebKit #endif diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h index 1a41252..9d64e2a 100644 --- a/WebKit/chromium/public/WebNotification.h +++ b/WebKit/chromium/public/WebNotification.h @@ -71,8 +71,7 @@ public: // If HTML, the URL which contains the contents of the notification. WEBKIT_API WebURL url() const; - // If not HTML, the parameters for the icon-title-text notification. - WEBKIT_API WebString icon() const; + WEBKIT_API WebURL iconURL() const; WEBKIT_API WebString title() const; WEBKIT_API WebString body() const; diff --git a/WebKit/chromium/public/WebNotificationPresenter.h b/WebKit/chromium/public/WebNotificationPresenter.h index a3764aa..9fb7e6e 100644 --- a/WebKit/chromium/public/WebNotificationPresenter.h +++ b/WebKit/chromium/public/WebNotificationPresenter.h @@ -31,13 +31,14 @@ #ifndef WebNotificationPresenter_h #define WebNotificationPresenter_h +#include "WebNotificationPermissionCallback.h" +#include "WebSecurityOrigin.h" #include "WebString.h" namespace WebKit { class WebDocument; class WebNotification; -class WebNotificationPermissionCallback; class WebURL; // Provides the services to show desktop notifications to the user. @@ -59,14 +60,13 @@ public: // being destroyed. Does _not_ remove the notification if being shown, but detaches it from receiving events. virtual void objectDestroyed(const WebNotification&) = 0; - // Checks the permission level for the given URL. If the URL is being displayed in a document - // (as opposed to a worker or other ScriptExecutionContext), |document| will also be provided. - virtual Permission checkPermission(const WebURL& url, WebDocument* document) = 0; + // Checks the permission level for the given origin. + virtual Permission checkPermission(const WebURL&) = 0; // Requests permission for a given origin. This operation is asynchronous and the callback provided // will be invoked when the permission decision is made. Callback pointer must remain // valid until called. - virtual void requestPermission(const WebString& origin, WebNotificationPermissionCallback* callback) = 0; + virtual void requestPermission(const WebSecurityOrigin&, WebNotificationPermissionCallback*) = 0; }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebPlugin.h b/WebKit/chromium/public/WebPlugin.h index 5097265..f57c621 100644 --- a/WebKit/chromium/public/WebPlugin.h +++ b/WebKit/chromium/public/WebPlugin.h @@ -80,6 +80,19 @@ public: virtual void didFailLoadingFrameRequest( const WebURL&, void* notifyData, const WebURLError&) = 0; + // Printing interface. + // Whether the plugin supports its own paginated print. The other print + // interface methods are called only if this method returns true. + virtual bool supportsPaginatedPrint() { return false; } + // Sets up printing at the given print rect and printer DPI. printableArea + // is in points (a point is 1/72 of an inch).Returns the number of pages to + // be printed at these settings. + virtual int printBegin(const WebRect& printableArea, int printerDPI) { return 0; } + // Prints the page specified by pageNumber (0-based index) into the supplied canvas. + virtual bool printPage(int pageNumber, WebCanvas* canvas) { return false; } + // Ends the print operation. + virtual void printEnd() { } + protected: ~WebPlugin() { } }; diff --git a/WebKit/chromium/public/WebPluginDocument.h b/WebKit/chromium/public/WebPluginDocument.h new file mode 100644 index 0000000..b772cf7 --- /dev/null +++ b/WebKit/chromium/public/WebPluginDocument.h @@ -0,0 +1,67 @@ +/* + * 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 WebPluginDocument_h +#define WebPluginDocument_h + +#include "WebDocument.h" + +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class PluginDocument; } +#endif + +namespace WebKit { +class WebPlugin; + +// Wraps a WebDocument for full page plugins. +class WebPluginDocument : public WebDocument { +public: + WebPluginDocument() { } + WebPluginDocument(const WebPluginDocument& e) : WebDocument(e) { } + + WebPluginDocument& operator=(const WebPluginDocument& e) + { + WebNode::assign(e); + return *this; + } + void assign(const WebPluginDocument& d) { WebNode::assign(d); } + + WEBKIT_API WebPlugin* plugin(); + +#if WEBKIT_IMPLEMENTATION + WebPluginDocument(const WTF::PassRefPtr<WebCore::PluginDocument>&); + WebPluginDocument& operator=(const WTF::PassRefPtr<WebCore::PluginDocument>&); + operator WTF::PassRefPtr<WebCore::PluginDocument>() const; +#endif +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebPoint.h b/WebKit/chromium/public/WebPoint.h index d1abe02..20c52c2 100644 --- a/WebKit/chromium/public/WebPoint.h +++ b/WebKit/chromium/public/WebPoint.h @@ -36,7 +36,7 @@ #if WEBKIT_IMPLEMENTATION #include "IntPoint.h" #else -#include <base/gfx/rect.h> +#include <gfx/point.h> #endif namespace WebKit { diff --git a/WebKit/chromium/public/WebPopupMenuInfo.h b/WebKit/chromium/public/WebPopupMenuInfo.h index 876842d..7eb132e 100644 --- a/WebKit/chromium/public/WebPopupMenuInfo.h +++ b/WebKit/chromium/public/WebPopupMenuInfo.h @@ -41,6 +41,7 @@ struct WebPopupMenuInfo { // FIXME: migrate clients to WebMenuItemInfo and remove this temporary Item typedef. typedef WebMenuItemInfo Item; int itemHeight; + int itemFontSize; int selectedIndex; WebVector<WebMenuItemInfo> items; }; diff --git a/WebKit/chromium/public/WebPopupType.h b/WebKit/chromium/public/WebPopupType.h new file mode 100644 index 0000000..8a546ba --- /dev/null +++ b/WebKit/chromium/public/WebPopupType.h @@ -0,0 +1,44 @@ +/* + * 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 WebPopupType_h +#define WebPopupType_h + +namespace WebKit { + +enum WebPopupType { + WebPopupTypeNone, // Not a popup. + WebPopupTypeSelect, // A HTML select (combo-box) popup. + WebPopupTypeSuggestion, // An autofill/autocomplete popup. +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebPrivatePtr.h b/WebKit/chromium/public/WebPrivatePtr.h new file mode 100644 index 0000000..48ad7f2 --- /dev/null +++ b/WebKit/chromium/public/WebPrivatePtr.h @@ -0,0 +1,105 @@ +/* + * 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 WebPrivatePtr_h +#define WebPrivatePtr_h + +#if WEBKIT_IMPLEMENTATION +#include <wtf/PassRefPtr.h> +#endif + +namespace WebKit { + +// This class is an implementation detail of the WebKit API. It exists +// to help simplify the implementation of WebKit interfaces that merely +// wrap a reference counted WebCore class. +template <typename T> +class WebPrivatePtr { +public: + WebPrivatePtr() : m_ptr(0) { } + ~WebPrivatePtr() { WEBKIT_ASSERT(!m_ptr); } + + bool isNull() const { return !m_ptr; } + +#if WEBKIT_IMPLEMENTATION + WebPrivatePtr(const PassRefPtr<T>& prp) + : m_ptr(prp.releaseRef()) + { + } + + void reset() + { + assign(0); + } + + WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other) + { + T* p = other.m_ptr; + if (p) + p->ref(); + assign(p); + return *this; + } + + WebPrivatePtr<T>& operator=(const PassRefPtr<T>& prp) + { + assign(prp.releaseRef()); + return *this; + } + + T* get() const + { + return m_ptr; + } + + T* operator->() const + { + ASSERT(m_ptr); + return m_ptr; + } +#endif + +private: +#if WEBKIT_IMPLEMENTATION + void assign(T* p) + { + // p is already ref'd for us by the caller + if (m_ptr) + m_ptr->deref(); + m_ptr = p; + } +#endif + + T* m_ptr; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebRect.h b/WebKit/chromium/public/WebRect.h index ed5a7d1..30381d7 100644 --- a/WebKit/chromium/public/WebRect.h +++ b/WebKit/chromium/public/WebRect.h @@ -36,7 +36,7 @@ #if WEBKIT_IMPLEMENTATION #include "IntRect.h" #else -#include <base/gfx/rect.h> +#include <gfx/rect.h> #endif namespace WebKit { diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h index 04f88c9..40a5952 100644 --- a/WebKit/chromium/public/WebRuntimeFeatures.h +++ b/WebKit/chromium/public/WebRuntimeFeatures.h @@ -68,6 +68,12 @@ public: WEBKIT_API static void enableIndexedDatabase(bool); WEBKIT_API static bool isIndexedDatabaseEnabled(); + WEBKIT_API static void enableWebGL(bool); + WEBKIT_API static bool isWebGLEnabled(); + + WEBKIT_API static void enablePushState(bool); + WEBKIT_API static bool isPushStateEnabled(bool); + private: WebRuntimeFeatures(); }; diff --git a/WebKit/chromium/public/WebSecurityOrigin.h b/WebKit/chromium/public/WebSecurityOrigin.h index 1285b10..76012a1 100644 --- a/WebKit/chromium/public/WebSecurityOrigin.h +++ b/WebKit/chromium/public/WebSecurityOrigin.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * 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 @@ -42,6 +42,7 @@ namespace WebKit { class WebSecurityOriginPrivate; class WebString; +class WebURL; class WebSecurityOrigin { public: @@ -55,9 +56,9 @@ public: return *this; } - // FIXME: This should return a WebSecurityOrigin, not a pointer to one. - WEBKIT_API static WebSecurityOrigin* createFromDatabaseIdentifier(const WebString& databaseIdentifier); + WEBKIT_API static WebSecurityOrigin createFromDatabaseIdentifier(const WebString& databaseIdentifier); WEBKIT_API static WebSecurityOrigin createFromString(const WebString&); + WEBKIT_API static WebSecurityOrigin create(const WebURL&); WEBKIT_API void reset(); WEBKIT_API void assign(const WebSecurityOrigin&); @@ -71,6 +72,17 @@ public: // The empty WebSecurityOrigin is the least privileged WebSecurityOrigin. WEBKIT_API bool isEmpty() const; + // Returns true if this WebSecurityOrigin can script objects in the given + // SecurityOrigin. For example, call this function before allowing + // script from one security origin to read or write objects from + // another SecurityOrigin. + WEBKIT_API bool canAccess(const WebSecurityOrigin&) const; + + // Returns true if this WebSecurityOrigin can read content retrieved from + // the given URL. For example, call this function before allowing script + // from a given security origin to receive contents from a given URL. + WEBKIT_API bool canRequest(const WebURL&) const; + // Returns a string representation of the WebSecurityOrigin. The empty // WebSecurityOrigin is represented by "null". The representation of a // non-empty WebSecurityOrigin resembles a standard URL. diff --git a/WebKit/chromium/public/WebSecurityPolicy.h b/WebKit/chromium/public/WebSecurityPolicy.h index 8e1ee52..815f471 100644 --- a/WebKit/chromium/public/WebSecurityPolicy.h +++ b/WebKit/chromium/public/WebSecurityPolicy.h @@ -50,6 +50,10 @@ public: // any other URL scheme. WEBKIT_API static void registerURLSchemeAsNoAccess(const WebString&); + // Registers a URL scheme to not generate mixed content warnings when + // included by an HTTPS page. + WEBKIT_API static void registerURLSchemeAsSecure(const WebString&); + // Support for whitelisting access to origins beyond the same-origin policy. WEBKIT_API static void whiteListAccessFromOrigin( const WebURL& sourceOrigin, const WebString& destinationProtocol, diff --git a/WebKit/chromium/public/WebSelectElement.h b/WebKit/chromium/public/WebSelectElement.h new file mode 100644 index 0000000..7bd755b --- /dev/null +++ b/WebKit/chromium/public/WebSelectElement.h @@ -0,0 +1,63 @@ +/* + * 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 WebSelectElement_h +#define WebSelectElement_h + +#include "WebFormControlElement.h" + +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class HTMLSelectElement; } +#endif + +namespace WebKit { + +// Provides readonly access to some properties of a DOM select element node. +class WebSelectElement : public WebFormControlElement { +public: + WebSelectElement() : WebFormControlElement() { } + WebSelectElement(const WebSelectElement& e) : WebFormControlElement(e) { } + + WebSelectElement& operator=(const WebSelectElement& e) { WebFormControlElement::assign(e); return *this; } + WEBKIT_API void assign(const WebSelectElement& e) { WebFormControlElement::assign(e); } + + WEBKIT_API void setValue(const WebString&); + WEBKIT_API WebString value(); + +#if WEBKIT_IMPLEMENTATION + WebSelectElement(const WTF::PassRefPtr<WebCore::HTMLSelectElement>&); + WebSelectElement& operator=(const WTF::PassRefPtr<WebCore::HTMLSelectElement>&); + operator WTF::PassRefPtr<WebCore::HTMLSelectElement>() const; +#endif +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebSerializedScriptValue.h b/WebKit/chromium/public/WebSerializedScriptValue.h new file mode 100644 index 0000000..dbcb92a --- /dev/null +++ b/WebKit/chromium/public/WebSerializedScriptValue.h @@ -0,0 +1,76 @@ +/* + * 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 WebSerializedScriptValue_h +#define WebSerializedScriptValue_h + +#include "WebCommon.h" +#include "WebPrivatePtr.h" + +namespace WebCore { class SerializedScriptValue; } + +namespace WebKit { +class WebString; + +class WebSerializedScriptValue { +public: + ~WebSerializedScriptValue() { reset(); } + + WebSerializedScriptValue() { } + WebSerializedScriptValue(const WebSerializedScriptValue& d) { assign(d); } + WebSerializedScriptValue& operator=(const WebSerializedScriptValue& d) + { + assign(d); + return *this; + } + + WEBKIT_API static WebSerializedScriptValue fromString(const WebString&); + + WEBKIT_API void reset(); + WEBKIT_API void assign(const WebSerializedScriptValue&); + + bool isNull() const { return m_private.isNull(); } + + // Returns a string representation of the WebSerializedScriptValue. + WEBKIT_API WebString toString() const; + +#if WEBKIT_IMPLEMENTATION + WebSerializedScriptValue(const WTF::PassRefPtr<WebCore::SerializedScriptValue>&); + WebSerializedScriptValue& operator=(const WTF::PassRefPtr<WebCore::SerializedScriptValue>&); + operator WTF::PassRefPtr<WebCore::SerializedScriptValue>() const; +#endif + +private: + WebPrivatePtr<WebCore::SerializedScriptValue> m_private; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h index d3a91d3..6339ded 100644 --- a/WebKit/chromium/public/WebSettings.h +++ b/WebKit/chromium/public/WebSettings.h @@ -69,6 +69,7 @@ public: virtual void setJavaEnabled(bool) = 0; virtual void setAllowScriptsToCloseWindows(bool) = 0; virtual void setUserStyleSheetLocation(const WebURL&) = 0; + virtual void setAuthorAndUserStylesEnabled(bool) = 0; virtual void setUsesPageCache(bool) = 0; virtual void setDownloadableBinaryFontsEnabled(bool) = 0; virtual void setXSSAuditorEnabled(bool) = 0; @@ -76,13 +77,11 @@ public: virtual void setEditableLinkBehaviorNeverLive() = 0; virtual void setFontRenderingModeNormal() = 0; virtual void setShouldPaintCustomScrollbars(bool) = 0; - virtual void setDatabasesEnabled(bool) = 0; virtual void setAllowUniversalAccessFromFileURLs(bool) = 0; virtual void setAllowFileAccessFromFileURLs(bool) = 0; virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded() = 0; virtual void setOfflineWebApplicationCacheEnabled(bool) = 0; virtual void setExperimentalWebGLEnabled(bool) = 0; - virtual void setGeolocationEnabled(bool) = 0; virtual void setShowDebugBorders(bool) = 0; protected: diff --git a/WebKit/chromium/public/WebSize.h b/WebKit/chromium/public/WebSize.h index bb88633..a7159b2 100644 --- a/WebKit/chromium/public/WebSize.h +++ b/WebKit/chromium/public/WebSize.h @@ -36,7 +36,7 @@ #if WEBKIT_IMPLEMENTATION #include "IntSize.h" #else -#include <base/gfx/rect.h> +#include <gfx/size.h> #endif namespace WebKit { diff --git a/WebKit/chromium/public/WebStorageArea.h b/WebKit/chromium/public/WebStorageArea.h index 5e2c11c..86f708c 100644 --- a/WebKit/chromium/public/WebStorageArea.h +++ b/WebKit/chromium/public/WebStorageArea.h @@ -36,6 +36,7 @@ namespace WebKit { +class WebFrame; class WebURL; // In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This @@ -66,18 +67,14 @@ public: // Set the value that corresponds to a specific key. Result will either be ResultOK // or some particular error. The value is NOT set when there's an error. url is the // url that should be used if a storage event fires. - virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue) + virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue, WebFrame*) { - bool quotaException = false; - setItem(key, newValue, url, quotaException, oldValue); - result = quotaException ? ResultBlockedByQuota : ResultOK; + setItem(key, newValue, url, result, oldValue); } // FIXME: Remove soon (once Chrome has rolled past this revision). - virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException, WebString& oldValue) + virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue) { - Result result; - setItem(key, newValue, url, result, oldValue); - quotaException = result != ResultOK; + setItem(key, newValue, url, result, oldValue, 0); } // Remove the value associated with a particular key. url is the url that should be used diff --git a/WebKit/chromium/public/WebTouchPoint.h b/WebKit/chromium/public/WebTouchPoint.h new file mode 100644 index 0000000..ddfa26f --- /dev/null +++ b/WebKit/chromium/public/WebTouchPoint.h @@ -0,0 +1,62 @@ +/* + * 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 WebTouchPoint_h +#define WebTouchPoint_h + +#include "WebCommon.h" +#include "WebPoint.h" + +namespace WebKit { + +class WebTouchPoint { +public: + WebTouchPoint() + : id(0) + , state(StateUndefined) { } + + enum State { + StateUndefined, + StateReleased, + StatePressed, + StateMoved, + StateStationary, + StateCancelled, + }; + + int id; + State state; + WebPoint screenPosition; + WebPoint position; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h index 1dac069..3acacf8 100644 --- a/WebKit/chromium/public/WebURLResponse.h +++ b/WebKit/chromium/public/WebURLResponse.h @@ -123,6 +123,10 @@ public: WEBKIT_API bool wasFetchedViaSPDY() const; WEBKIT_API void setWasFetchedViaSPDY(bool); + // Flag whether this request is part of a multipart response. + WEBKIT_API bool isMultipartPayload() const; + WEBKIT_API void setIsMultipartPayload(bool); + protected: void assign(WebURLResponsePrivate*); diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h index 99125d4..5a043f2 100644 --- a/WebKit/chromium/public/WebView.h +++ b/WebKit/chromium/public/WebView.h @@ -283,6 +283,7 @@ public: // User scripts -------------------------------------------------------- virtual void addUserScript(const WebString& sourceCode, bool runAtStart) = 0; + virtual void addUserStyleSheet(const WebString& sourceCode) = 0; virtual void removeAllUserContent() = 0; // Modal dialog support ------------------------------------------------ diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h index a2de115..c2a96dc 100644 --- a/WebKit/chromium/public/WebViewClient.h +++ b/WebKit/chromium/public/WebViewClient.h @@ -35,6 +35,7 @@ #include "WebEditingAction.h" #include "WebFileChooserCompletion.h" #include "WebFileChooserParams.h" +#include "WebPopupType.h" #include "WebString.h" #include "WebTextAffinity.h" #include "WebTextDirection.h" @@ -46,7 +47,8 @@ class WebAccessibilityObject; class WebDragData; class WebFileChooserCompletion; class WebFrame; -class WebGeolocationServiceInterface; +class WebGeolocationService; +class WebImage; class WebNode; class WebNotificationPresenter; class WebRange; @@ -73,8 +75,12 @@ public: // Create a new WebPopupMenu. In the second form, the client is // responsible for rendering the contents of the popup menu. - virtual WebWidget* createPopupMenu(bool activatable) { return 0; } + virtual WebWidget* createPopupMenu(WebPopupType) { return 0; } virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; } + // Deprecated methods. + virtual WebWidget* createPopupMenu() { return 0; } + virtual WebWidget* createPopupMenu(bool activatable) { return 0; } + // Create a session storage namespace object associated with this WebView. virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; } @@ -219,7 +225,7 @@ public: // Called when a drag-n-drop operation should begin. virtual void startDragging( - const WebPoint& from, const WebDragData&, WebDragOperationsMask) { } + const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint&) { } // Called to determine if drag-n-drop operations may initiate a page // navigation. @@ -278,10 +284,17 @@ public: virtual void removeAutofillSuggestions(const WebString& name, const WebString& value) { } + // Informs the browser that the user has selected an AutoFill suggestion + // for a WebNode. |name| and |label| form a key into the set of AutoFill + // profiles. + virtual void didAcceptAutoFillSuggestion(const WebNode&, + const WebString& name, + const WebString& label) { } + // Geolocation --------------------------------------------------------- // Access the embedder API for geolocation services. - virtual WebKit::WebGeolocationServiceInterface* getGeolocationService() { return 0; } + virtual WebKit::WebGeolocationService* geolocationService() { return 0; } protected: ~WebViewClient() { } diff --git a/WebKit/chromium/public/gtk/WebFontInfo.h b/WebKit/chromium/public/gtk/WebFontInfo.h index ad37680..fae792d 100644 --- a/WebKit/chromium/public/gtk/WebFontInfo.h +++ b/WebKit/chromium/public/gtk/WebFontInfo.h @@ -32,6 +32,7 @@ #define WebFontInfo_h #include "../WebCString.h" +#include "../linux/WebFontRenderStyle.h" #include <string.h> #include <unistd.h> @@ -48,6 +49,19 @@ public: // Returns: the font family or an empty string if the request could not be // satisfied. WEBKIT_API static WebCString familyForChars(const WebUChar* characters, size_t numCharacters); + + // Fill out the given WebFontRenderStyle with the user's preferences for + // rendering the given font at the given size. + // family: i.e. "Times New Roman" + // sizeAndStyle: + // 3322222222221111111111 + // 10987654321098765432109876543210 + // +--------------------------------+ + // |..............Size............IB| + // +--------------------------------+ + // I: italic flag + // B: bold flag + WEBKIT_API static void renderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* result); }; } // namespace WebKit diff --git a/WebKit/chromium/public/linux/WebFontRenderStyle.h b/WebKit/chromium/public/linux/WebFontRenderStyle.h new file mode 100644 index 0000000..a3b180f --- /dev/null +++ b/WebKit/chromium/public/linux/WebFontRenderStyle.h @@ -0,0 +1,62 @@ +/* + * 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 WebFontRenderStyle_h +#define WebFontRenderStyle_h + +#include "../WebCommon.h" + +namespace WebCore { struct FontRenderStyle; } + +namespace WebKit { + +struct WebFontRenderStyle { + // Each of the use* members below can take one of three values: + // 0: off + // 1: on + // 2: no preference expressed + char useBitmaps; // use embedded bitmap strike if possible + char useAutoHint; // use 'auto' hinting (FreeType specific) + char useHinting; // hint glyphs to the pixel grid + char hintStyle; // level of hinting, 0..3 + char useAntiAlias; // antialias glyph shapes + char useSubpixel; // use subpixel antialias + +#ifdef WEBKIT_IMPLEMENTATION + // Translates the members of this struct to a FontRenderStyle + void toFontRenderStyle(WebCore::FontRenderStyle*); +#endif + + void setDefaults(); +}; + +} // namespace WebKit + +#endif // WebFontRenderStyle_h diff --git a/WebKit/chromium/public/linux/WebSandboxSupport.h b/WebKit/chromium/public/linux/WebSandboxSupport.h index 5edceb2..6990abe 100644 --- a/WebKit/chromium/public/linux/WebSandboxSupport.h +++ b/WebKit/chromium/public/linux/WebSandboxSupport.h @@ -36,6 +36,8 @@ namespace WebKit { +struct WebFontRenderStyle; + // Put methods here that are required due to sandbox restrictions. class WebSandboxSupport { public: @@ -49,6 +51,7 @@ public: // Returns a string with the font family on an empty string if the // request cannot be satisfied. virtual WebString getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters) = 0; + virtual void getRenderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* style) = 0; }; } // namespace WebKit diff --git a/WebKit/chromium/src/ApplicationCacheHostInternal.h b/WebKit/chromium/src/ApplicationCacheHostInternal.h index 3e52c1b..bf6c4ae 100644 --- a/WebKit/chromium/src/ApplicationCacheHostInternal.h +++ b/WebKit/chromium/src/ApplicationCacheHostInternal.h @@ -33,7 +33,10 @@ #if ENABLE(OFFLINE_WEB_APPLICATIONS) +#include "DocumentLoader.h" #include "WebApplicationCacheHostClient.h" +#include "WebFrameClient.h" +#include "WebFrameImpl.h" #include "WebKit.h" #include "WebKitClient.h" @@ -44,7 +47,9 @@ public: ApplicationCacheHostInternal(ApplicationCacheHost* host) : m_innerHost(host) { - m_outerHost.set(WebKit::webKitClient()->createApplicationCacheHost(this)); + WebKit::WebFrameImpl* webFrame = WebKit::WebFrameImpl::fromFrame(host->m_documentLoader->frame()); + ASSERT(webFrame); + m_outerHost.set(webFrame->client()->createApplicationCacheHost(webFrame, this)); } virtual void notifyEventListener(WebKit::WebApplicationCacheHost::EventID eventID) diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp index 8e6cab4..4f8793a 100644 --- a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp +++ b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp @@ -32,8 +32,11 @@ #include "AutoFillPopupMenuClient.h" #include "HTMLInputElement.h" +#include "WebNode.h" #include "WebString.h" #include "WebVector.h" +#include "WebViewClient.h" +#include "WebViewImpl.h" using namespace WebCore; @@ -59,6 +62,19 @@ void AutoFillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex) m_labels.remove(listIndex); } +void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents) +{ + ASSERT(listIndex >= 0 && listIndex < m_names.size()); + + WebViewImpl* webView = getWebView(); + if (!webView) + return; + + webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()), + m_names[listIndex], + m_labels[listIndex]); +} + void AutoFillPopupMenuClient::initialize( HTMLInputElement* textField, const WebVector<WebString>& names, diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.h b/WebKit/chromium/src/AutoFillPopupMenuClient.h index 1912fa3..568ce4d 100644 --- a/WebKit/chromium/src/AutoFillPopupMenuClient.h +++ b/WebKit/chromium/src/AutoFillPopupMenuClient.h @@ -50,6 +50,9 @@ public: virtual WebString getSuggestion(unsigned listIndex) const; virtual void removeSuggestionAtIndex(unsigned listIndex); + // WebCore::PopupMenuClient implementation: + virtual void valueChanged(unsigned listIndex, bool fireEvents = true); + void initialize(WebCore::HTMLInputElement*, const WebVector<WebString>& names, const WebVector<WebString>& labels, diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp index 6e5bfc2..c7acab5 100644 --- a/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/WebKit/chromium/src/ChromeClientImpl.cpp @@ -45,8 +45,9 @@ #include "FrameView.h" #include "Geolocation.h" #include "GeolocationService.h" -#include "GeolocationServiceBridgeChromium.h" +#include "WebGeolocationService.h" #include "GeolocationServiceChromium.h" +#include "GraphicsLayer.h" #include "HitTestResult.h" #include "IntRect.h" #include "Node.h" @@ -67,6 +68,7 @@ #include "WebKit.h" #include "WebPopupMenuImpl.h" #include "WebPopupMenuInfo.h" +#include "WebPopupType.h" #include "WebRect.h" #include "WebTextDirection.h" #include "WebURLRequest.h" @@ -79,6 +81,20 @@ using namespace WebCore; namespace WebKit { +// Converts a WebCore::PopupContainerType to a WebKit::WebPopupType. +static WebPopupType convertPopupType(PopupContainer::PopupType type) +{ + switch (type) { + case PopupContainer::Select: + return WebPopupTypeSelect; + case PopupContainer::Suggestion: + return WebPopupTypeSuggestion; + default: + ASSERT_NOT_REACHED(); + return WebPopupTypeNone; + } +} + ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) : m_webView(webView) , m_toolbarsVisible(true) @@ -86,7 +102,6 @@ ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) , m_scrollbarsVisible(true) , m_menubarVisible(true) , m_resizable(true) - , m_ignoreNextSetCursor(false) { } @@ -327,7 +342,7 @@ void ChromeClientImpl::setScrollbarsVisible(bool value) m_scrollbarsVisible = value; WebFrameImpl* web_frame = static_cast<WebFrameImpl*>(m_webView->mainFrame()); if (web_frame) - web_frame->setAllowsScrolling(value); + web_frame->setCanHaveScrollbars(value); } bool ChromeClientImpl::scrollbarsVisible() @@ -466,15 +481,22 @@ IntRect ChromeClientImpl::windowResizerRect() const return result; } -void ChromeClientImpl::repaint( - const IntRect& paintRect, bool contentChanged, bool immediate, - bool repaintContentOnly) +void ChromeClientImpl::invalidateWindow(const IntRect&, bool) +{ + notImplemented(); +} + +void ChromeClientImpl::invalidateContentsAndWindow(const IntRect& updateRect, bool /*immediate*/) { - // Ignore spurious calls. - if (!contentChanged || paintRect.isEmpty()) + if (updateRect.isEmpty()) return; if (m_webView->client()) - m_webView->client()->didInvalidateRect(paintRect); + m_webView->client()->didInvalidateRect(updateRect); +} + +void ChromeClientImpl::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) +{ + invalidateContentsAndWindow(updateRect, immediate); } void ChromeClientImpl::scroll( @@ -580,14 +602,13 @@ void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileCh chooserCompletion->didChooseFile(WebVector<WebString>()); } -void ChromeClientImpl::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>) +void ChromeClientImpl::chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*) { notImplemented(); } void ChromeClientImpl::popupOpened(PopupContainer* popupContainer, const IntRect& bounds, - bool activatable, bool handleExternally) { if (!m_webView->client()) @@ -598,19 +619,28 @@ void ChromeClientImpl::popupOpened(PopupContainer* popupContainer, WebPopupMenuInfo popupInfo; getPopupMenuInfo(popupContainer, &popupInfo); webwidget = m_webView->client()->createPopupMenu(popupInfo); - } else - webwidget = m_webView->client()->createPopupMenu(activatable); - + } else { + webwidget = m_webView->client()->createPopupMenu( + convertPopupType(popupContainer->popupType())); + // Try the deprecated methods. + // FIXME: Remove the deprecated methods once the Chromium side use the + // new method. + if (!webwidget) + webwidget = m_webView->client()->createPopupMenu(); + if (!webwidget) + webwidget = m_webView->client()->createPopupMenu(false); + } + m_webView->popupOpened(popupContainer); static_cast<WebPopupMenuImpl*>(webwidget)->Init(popupContainer, bounds); } -void ChromeClientImpl::setCursor(const WebCursorInfo& cursor) +void ChromeClientImpl::popupClosed(WebCore::PopupContainer* popupContainer) { - if (m_ignoreNextSetCursor) { - m_ignoreNextSetCursor = false; - return; - } + m_webView->popupClosed(popupContainer); +} +void ChromeClientImpl::setCursor(const WebCursorInfo& cursor) +{ if (m_webView->client()) m_webView->client()->didChangeCursor(cursor); } @@ -618,11 +648,6 @@ void ChromeClientImpl::setCursor(const WebCursorInfo& cursor) void ChromeClientImpl::setCursorForPlugin(const WebCursorInfo& cursor) { setCursor(cursor); - - // Currently, Widget::setCursor is always called after this function in - // EventHandler.cpp and since we don't want that we set a flag indicating - // that the next SetCursor call is to be ignored. - m_ignoreNextSetCursor = true; } void ChromeClientImpl::formStateDidChange(const Node* node) @@ -664,6 +689,7 @@ void ChromeClientImpl::getPopupMenuInfo(PopupContainer* popupContainer, } info->itemHeight = popupContainer->menuItemHeight(); + info->itemFontSize = popupContainer->menuItemFontSize(); info->selectedIndex = popupContainer->selectedIndex(); info->items.swap(outputItems); } @@ -675,7 +701,6 @@ void ChromeClientImpl::didChangeAccessibilityObjectState(AccessibilityObject* ob m_webView->client()->didChangeAccessibilityObjectState(WebAccessibilityObject(obj)); } - #if ENABLE(NOTIFICATIONS) NotificationPresenter* ChromeClientImpl::notificationPresenter() const { @@ -685,8 +710,26 @@ NotificationPresenter* ChromeClientImpl::notificationPresenter() const void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation) { - GeolocationServiceChromium* geolocationService = reinterpret_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService()); - m_webView->client()->getGeolocationService()->requestPermissionForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url()); + GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService()); + m_webView->client()->geolocationService()->requestPermissionForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url()); +} + +void ChromeClientImpl::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation) +{ + GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService()); + m_webView->client()->geolocationService()->cancelPermissionRequestForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url()); +} + +#if USE(ACCELERATED_COMPOSITING) +void ChromeClientImpl::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer) +{ + m_webView->setRootGraphicsLayer(graphicsLayer ? graphicsLayer->platformLayer() : 0); } +void ChromeClientImpl::scheduleCompositingLayerSync() +{ + m_webView->setRootLayerNeedsDisplay(); +} +#endif + } // namespace WebKit diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h index 3a4035b..3b5ebd5 100644 --- a/WebKit/chromium/src/ChromeClientImpl.h +++ b/WebKit/chromium/src/ChromeClientImpl.h @@ -35,6 +35,7 @@ namespace WebCore { class AccessibilityObject; +class FileChooser; class HTMLParserQuirks; class PopupContainer; class SecurityOrigin; @@ -96,9 +97,9 @@ public: virtual bool shouldInterruptJavaScript(); virtual bool tabsToLinks() const; virtual WebCore::IntRect windowResizerRect() const; - virtual void repaint( - const WebCore::IntRect&, bool contentChanged, bool immediate = false, - bool repaintContentOnly = false); + virtual void invalidateWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool); virtual void scroll( const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect); @@ -122,17 +123,34 @@ public: virtual WebCore::NotificationPresenter* notificationPresenter() const; #endif virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); + virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*); virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); - virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>); + virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*); virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; } virtual void formStateDidChange(const WebCore::Node*); virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; } +#if ENABLE(TOUCH_EVENTS) + // FIXME: All touch events are forwarded regardless of whether or not they are needed. + virtual void needTouchEvents(bool needTouchEvents) { } +#endif + +#if USE(ACCELERATED_COMPOSITING) + // Pass 0 as the GraphicsLayer to detatch the root layer. + virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*); + // Sets a flag to specify that the next time content is drawn to the window, + // the changes appear on the screen in synchrony with updates to GraphicsLayers. + virtual void setNeedsOneShotDrawingSynchronization() { } + + // Sets a flag to specify that the view needs to be updated, so we need + // to do an eager layout before the drawing. + virtual void scheduleCompositingLayerSync(); +#endif // ChromeClientChromium methods: virtual void popupOpened(WebCore::PopupContainer* popupContainer, const WebCore::IntRect& bounds, - bool activatable, bool handleExternally); + virtual void popupClosed(WebCore::PopupContainer* popupContainer); virtual void didChangeAccessibilityObjectState(WebCore::AccessibilityObject*); // ChromeClientImpl: @@ -148,8 +166,6 @@ private: bool m_scrollbarsVisible; bool m_menubarVisible; bool m_resizable; - // Set to true if the next SetCursor is to be ignored. - bool m_ignoreNextSetCursor; }; } // namespace WebKit diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp index e04226e..cffd166 100644 --- a/WebKit/chromium/src/ChromiumBridge.cpp +++ b/WebKit/chromium/src/ChromiumBridge.cpp @@ -65,6 +65,7 @@ #if OS(LINUX) #include "WebSandboxSupport.h" #include "WebFontInfo.h" +#include "WebFontRenderStyle.h" #endif #if WEBKIT_USING_SKIA @@ -74,12 +75,14 @@ #include "BitmapImage.h" #include "Cookie.h" #include "FrameView.h" -#include "GeolocationServiceBridgeChromium.h" #include "GraphicsContext.h" +#include "IndexedDatabaseProxy.h" #include "KURL.h" #include "NotImplemented.h" #include "PlatformContextSkia.h" #include "PluginData.h" +#include "SharedBuffer.h" +#include "WebGeolocationServiceBridgeImpl.h" #include "Worker.h" #include "WorkerContextProxy.h" #include <wtf/Assertions.h> @@ -91,6 +94,9 @@ namespace WebCore { static ChromeClientImpl* toChromeClientImpl(Widget* widget) { + if (!widget) + return 0; + FrameView* view; if (widget->isFrameView()) view = static_cast<FrameView*>(widget); @@ -192,8 +198,6 @@ void ChromiumBridge::setCookies(const Document* document, const KURL& url, WebCookieJar* cookieJar = getCookieJar(document); if (cookieJar) cookieJar->setCookie(url, document->firstPartyForCookies(), value); - else - webKitClient()->setCookies(url, document->firstPartyForCookies(), value); // DEPRECATED } String ChromiumBridge::cookies(const Document* document, const KURL& url) @@ -202,8 +206,6 @@ String ChromiumBridge::cookies(const Document* document, const KURL& url) WebCookieJar* cookieJar = getCookieJar(document); if (cookieJar) result = cookieJar->cookies(url, document->firstPartyForCookies()); - else - result = webKitClient()->cookies(url, document->firstPartyForCookies()); // DEPRECATED return result; } @@ -214,10 +216,6 @@ String ChromiumBridge::cookieRequestHeaderFieldValue(const Document* document, WebCookieJar* cookieJar = getCookieJar(document); if (cookieJar) result = cookieJar->cookieRequestHeaderFieldValue(url, document->firstPartyForCookies()); - else { - // FIXME: This does not return http-only cookies - result = webKitClient()->cookies(url, document->firstPartyForCookies()); // DEPRECATED - } return result; } @@ -229,8 +227,6 @@ bool ChromiumBridge::rawCookies(const Document* document, const KURL& url, Vecto WebCookieJar* cookieJar = getCookieJar(document); if (cookieJar) cookieJar->rawCookies(url, document->firstPartyForCookies(), webCookies); - else - webKitClient()->rawCookies(url, document->firstPartyForCookies(), &webCookies); // DEPRECATED for (unsigned i = 0; i < webCookies.size(); ++i) { const WebCookie& webCookie = webCookies[i]; @@ -252,18 +248,14 @@ void ChromiumBridge::deleteCookie(const Document* document, const KURL& url, con WebCookieJar* cookieJar = getCookieJar(document); if (cookieJar) cookieJar->deleteCookie(url, cookieName); - else - webKitClient()->deleteCookie(url, cookieName); // DEPRECATED } bool ChromiumBridge::cookiesEnabled(const Document* document) { - bool result; + bool result = false; WebCookieJar* cookieJar = getCookieJar(document); if (cookieJar) result = cookieJar->cookiesEnabled(document->cookieURL(), document->firstPartyForCookies()); - else - result = webKitClient()->cookiesEnabled(document->cookieURL(), document->firstPartyForCookies()); // DEPRECATED return result; } @@ -298,7 +290,11 @@ bool ChromiumBridge::getFileSize(const String& path, long long& result) bool ChromiumBridge::getFileModificationTime(const String& path, time_t& result) { - return webKitClient()->getFileModificationTime(path, result); + double modificationTime; + if (!webKitClient()->getFileModificationTime(path, modificationTime)) + return false; + result = static_cast<time_t>(modificationTime); + return true; } String ChromiumBridge::directoryName(const String& path) @@ -356,6 +352,18 @@ String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_ return WebString(); } + +void ChromiumBridge::getRenderStyleForStrike(const char* font, int sizeAndStyle, FontRenderStyle* result) +{ + WebFontRenderStyle style; + + if (webKitClient()->sandboxSupport()) + webKitClient()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style); + else + WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style); + + style.toFontRenderStyle(result); +} #endif // Geolocation ---------------------------------------------------------------- @@ -389,6 +397,15 @@ long long ChromiumBridge::databaseGetFileSize(const String& vfsFileName) } #endif +// Indexed Database ----------------------------------------------------------- + +PassRefPtr<IndexedDatabase> ChromiumBridge::indexedDatabase() +{ + // There's no reason why we need to allocate a new proxy each time, but + // there's also no strong reason not to. + return IndexedDatabaseProxy::create(); +} + // Keygen --------------------------------------------------------------------- String ChromiumBridge::signedPublicKeyAndChallengeString( diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp index 06a29ff..bee4310 100644 --- a/WebKit/chromium/src/ContextMenuClientImpl.cpp +++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp @@ -181,6 +181,10 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( data.mediaFlags |= WebContextMenuData::MediaCanSave; if (mediaElement->hasAudio()) data.mediaFlags |= WebContextMenuData::MediaHasAudio; + if (mediaElement->hasVideo()) + data.mediaFlags |= WebContextMenuData::MediaHasVideo; + if (mediaElement->controls()) + data.mediaFlags |= WebContextMenuData::MediaControls; } data.isImageBlocked = @@ -188,7 +192,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( // If it's not a link, an image, a media element, or an image/media link, // show a selection menu or a more generic page menu. - data.frameEncoding = selectedFrame->loader()->encoding(); + data.frameEncoding = selectedFrame->loader()->writer()->encoding(); // Send the frame and page URLs in any case. data.pageURL = urlFromFrame(m_webView->mainFrameImpl()->frame()); diff --git a/WebKit/chromium/src/DatabaseObserver.cpp b/WebKit/chromium/src/DatabaseObserver.cpp index 54e93e1..6a2e2a7 100644 --- a/WebKit/chromium/src/DatabaseObserver.cpp +++ b/WebKit/chromium/src/DatabaseObserver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * 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 @@ -32,13 +32,35 @@ #include "DatabaseObserver.h" #include "Database.h" +#include "Document.h" +#include "ScriptExecutionContext.h" #include "WebDatabase.h" #include "WebDatabaseObserver.h" +#include "WebFrameClient.h" +#include "WebFrameImpl.h" +#include "WebSecurityOrigin.h" +#include "WebWorkerImpl.h" +#include "WorkerContext.h" +#include "WorkerThread.h" using namespace WebKit; namespace WebCore { +bool DatabaseObserver::canEstablishDatabase(ScriptExecutionContext* scriptExecutionContext, const String& name, const String& displayName, unsigned long estimatedSize) +{ + ASSERT(scriptExecutionContext->isContextThread()); + // FIXME: add support for the case scriptExecutionContext()->isWorker() once workers implement web databases. + ASSERT(scriptExecutionContext->isDocument()); + if (scriptExecutionContext->isDocument()) { + Document* document = static_cast<Document*>(scriptExecutionContext); + WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); + return webFrame->client()->allowDatabase(webFrame, name, displayName, estimatedSize); + } + + return true; +} + void DatabaseObserver::databaseOpened(Database* database) { ASSERT(isMainThread()); diff --git a/WebKit/chromium/src/DebuggerAgent.h b/WebKit/chromium/src/DebuggerAgent.h index 17cde11..7f3dbbb 100644 --- a/WebKit/chromium/src/DebuggerAgent.h +++ b/WebKit/chromium/src/DebuggerAgent.h @@ -40,7 +40,10 @@ namespace WebKit { METHOD0(getContextId) \ \ /* Request v8 to process all debug commands in the queue. */ \ - METHOD0(processDebugCommands) + METHOD0(processDebugCommands) \ + \ + /* Push DebuggerScript.js content to the agent. */ \ + METHOD1(setDebuggerScriptSource, String) DEFINE_RPC_CLASS(DebuggerAgent, DEBUGGER_AGENT_STRUCT) diff --git a/WebKit/chromium/src/DebuggerAgentImpl.cpp b/WebKit/chromium/src/DebuggerAgentImpl.cpp index d592710..673482a 100644 --- a/WebKit/chromium/src/DebuggerAgentImpl.cpp +++ b/WebKit/chromium/src/DebuggerAgentImpl.cpp @@ -35,10 +35,8 @@ #include "Document.h" #include "Frame.h" #include "Page.h" +#include "ScriptDebugServer.h" #include "V8Binding.h" -#include "V8DOMWindow.h" -#include "V8Index.h" -#include "V8Proxy.h" #include "WebDevToolsAgentImpl.h" #include "WebViewImpl.h" #include <wtf/HashSet.h> @@ -50,10 +48,6 @@ using WebCore::Document; using WebCore::Frame; using WebCore::Page; using WebCore::String; -using WebCore::V8ClassIndex; -using WebCore::V8DOMWindow; -using WebCore::V8DOMWrapper; -using WebCore::V8Proxy; namespace WebKit { @@ -85,62 +79,15 @@ void DebuggerAgentImpl::processDebugCommands() v8::Debug::ProcessDebugMessages(); } -void DebuggerAgentImpl::debuggerOutput(const String& command) +void DebuggerAgentImpl::setDebuggerScriptSource(const String& source) { - m_delegate->debuggerOutput(command); - m_webdevtoolsAgent->forceRepaint(); + WebCore::ScriptDebugServer::shared().setDebuggerScriptSource(source); } -// static -void DebuggerAgentImpl::createUtilityContext(Frame* frame, v8::Persistent<v8::Context>* context) +void DebuggerAgentImpl::debuggerOutput(const String& command) { - v8::HandleScope scope; - bool canExecuteScripts = frame->script()->canExecuteScripts(); - - // Set up the DOM window as the prototype of the new global object. - v8::Handle<v8::Context> windowContext = V8Proxy::context(frame); - v8::Handle<v8::Object> windowGlobal; - v8::Handle<v8::Object> windowWrapper; - if (canExecuteScripts) { - // FIXME: This check prevents renderer from crashing, while providing limited capabilities for - // DOM inspection, Resources tracking, no scripts support, some timeline profiling. Console will - // result in exceptions for each evaluation. There is still some work that needs to be done in - // order to polish the script-less experience. - windowGlobal = windowContext->Global(); - windowWrapper = V8DOMWrapper::lookupDOMWrapper(V8DOMWindow::GetTemplate(), windowGlobal); - ASSERT(V8DOMWindow::toNative(windowWrapper) == frame->domWindow()); - } - - v8::Handle<v8::ObjectTemplate> globalTemplate = v8::ObjectTemplate::New(); - - // TODO(yurys): provide a function in v8 bindings that would make the - // utility context more like main world context of the inspected frame, - // otherwise we need to manually make it satisfy various invariants - // that V8Proxy::getEntered and some other V8Proxy methods expect to find - // on v8 contexts on the contexts stack. - // See V8Proxy::createNewContext. - // - // Install a security handler with V8. - globalTemplate->SetAccessCheckCallbacks( - V8DOMWindow::namedSecurityCheck, - V8DOMWindow::indexedSecurityCheck, - v8::Integer::New(V8ClassIndex::DOMWINDOW)); - // We set number of internal fields to match that in V8DOMWindow wrapper. - // See http://crbug.com/28961 - globalTemplate->SetInternalFieldCount(V8DOMWindow::internalFieldCount); - - *context = v8::Context::New(0 /* no extensions */, globalTemplate, v8::Handle<v8::Object>()); - v8::Context::Scope contextScope(*context); - v8::Handle<v8::Object> global = (*context)->Global(); - - v8::Handle<v8::String> implicitProtoString = v8::String::New("__proto__"); - if (canExecuteScripts) - global->Set(implicitProtoString, windowWrapper); - - // Give the code running in the new context a way to get access to the - // original context. - if (canExecuteScripts) - global->Set(v8::String::New("contentWindow"), windowGlobal); + m_delegate->debuggerOutput(command); + m_webdevtoolsAgent->forceRepaint(); } String DebuggerAgentImpl::executeUtilityFunction( diff --git a/WebKit/chromium/src/DebuggerAgentImpl.h b/WebKit/chromium/src/DebuggerAgentImpl.h index 6eaf576..bd9ddf6 100644 --- a/WebKit/chromium/src/DebuggerAgentImpl.h +++ b/WebKit/chromium/src/DebuggerAgentImpl.h @@ -52,9 +52,6 @@ class WebViewImpl; class DebuggerAgentImpl : public DebuggerAgent { public: - // Creates utility context with injected js agent. - static void createUtilityContext(WebCore::Frame* frame, v8::Persistent<v8::Context>* context); - DebuggerAgentImpl(WebKit::WebViewImpl* webViewImpl, DebuggerAgentDelegate* delegate, WebDevToolsAgentImpl* webdevtoolsAgent); @@ -63,6 +60,7 @@ public: // DebuggerAgent implementation. virtual void getContextId(); virtual void processDebugCommands(); + virtual void setDebuggerScriptSource(const String&); void debuggerOutput(const WebCore::String& out); diff --git a/WebKit/chromium/src/DebuggerAgentManager.cpp b/WebKit/chromium/src/DebuggerAgentManager.cpp index faafaff..d3f7fea 100644 --- a/WebKit/chromium/src/DebuggerAgentManager.cpp +++ b/WebKit/chromium/src/DebuggerAgentManager.cpp @@ -34,6 +34,7 @@ #include "DebuggerAgentImpl.h" #include "Frame.h" #include "PageGroupLoadDeferrer.h" +#include "ScriptDebugServer.h" #include "V8Proxy.h" #include "WebDevToolsAgentImpl.h" #include "WebFrameImpl.h" @@ -72,6 +73,42 @@ private: } // namespace +void DebuggerAgentManager::hostDispatchHandler(const Vector<WebCore::Page*>& pages) +{ + if (!s_messageLoopDispatchHandler) + return; + + if (s_inHostDispatchHandler) + return; + + s_inHostDispatchHandler = true; + + Vector<WebViewImpl*> views; + // 1. Disable active objects and input events. + for (size_t i = 0; i < pages.size(); i++) { + WebCore::Page* page = pages[i]; + WebViewImpl* view = WebViewImpl::fromPage(page); + s_pageDeferrers.set(view , new WebCore::PageGroupLoadDeferrer(page, true)); + views.append(view); + view->setIgnoreInputEvents(true); + } + + // 2. Process messages. + s_messageLoopDispatchHandler(); + + // 3. Bring things back. + for (Vector<WebViewImpl*>::iterator it = views.begin(); it != views.end(); ++it) { + if (s_pageDeferrers.contains(*it)) { + // The view was not closed during the dispatch. + (*it)->setIgnoreInputEvents(false); + } + } + deleteAllValues(s_pageDeferrers); + s_pageDeferrers.clear(); + + s_inHostDispatchHandler = false; +} + void DebuggerAgentManager::debugHostDispatchHandler() { if (!s_messageLoopDispatchHandler || !s_attachedAgentsMap) @@ -116,6 +153,9 @@ DebuggerAgentManager::AttachedAgentsMap* DebuggerAgentManager::s_attachedAgentsM void DebuggerAgentManager::debugAttach(DebuggerAgentImpl* debuggerAgent) { +#if ENABLE(V8_SCRIPT_DEBUG_SERVER) + return; +#endif if (!s_attachedAgentsMap) { s_attachedAgentsMap = new AttachedAgentsMap(); v8::Debug::SetMessageHandler2(&DebuggerAgentManager::onV8DebugMessage); @@ -128,6 +168,9 @@ void DebuggerAgentManager::debugAttach(DebuggerAgentImpl* debuggerAgent) void DebuggerAgentManager::debugDetach(DebuggerAgentImpl* debuggerAgent) { +#if ENABLE(V8_SCRIPT_DEBUG_SERVER) + return; +#endif if (!s_attachedAgentsMap) { ASSERT_NOT_REACHED(); return; @@ -249,6 +292,7 @@ void DebuggerAgentManager::executeDebuggerCommand(const String& command, int cal void DebuggerAgentManager::setMessageLoopDispatchHandler(WebDevToolsAgent::MessageLoopDispatchHandler handler) { s_messageLoopDispatchHandler = handler; + WebCore::ScriptDebugServer::setMessageLoopDispatchHandler(DebuggerAgentManager::hostDispatchHandler); } void DebuggerAgentManager::setHostId(WebFrameImpl* webframe, int hostId) diff --git a/WebKit/chromium/src/DebuggerAgentManager.h b/WebKit/chromium/src/DebuggerAgentManager.h index a2e9030..a8bc7a3 100644 --- a/WebKit/chromium/src/DebuggerAgentManager.h +++ b/WebKit/chromium/src/DebuggerAgentManager.h @@ -31,12 +31,15 @@ #ifndef DebuggerAgentManager_h #define DebuggerAgentManager_h +#include "WebCString.h" #include "WebDevToolsAgent.h" #include <v8-debug.h> #include <wtf/HashMap.h> #include <wtf/Noncopyable.h> +#include <wtf/Vector.h> namespace WebCore { +class Page; class PageGroupLoadDeferrer; class String; } @@ -97,6 +100,7 @@ private: DebuggerAgentManager(); ~DebuggerAgentManager(); + static void hostDispatchHandler(const Vector<WebCore::Page*>&); static void debugHostDispatchHandler(); static void onV8DebugMessage(const v8::Debug::Message& message); static void sendCommandToV8(const WebCore::String& cmd, diff --git a/WebKit/chromium/src/DragClientImpl.cpp b/WebKit/chromium/src/DragClientImpl.cpp index 671e7ca..9874401 100644 --- a/WebKit/chromium/src/DragClientImpl.cpp +++ b/WebKit/chromium/src/DragClientImpl.cpp @@ -30,11 +30,14 @@ #include "config.h" #include "DragClientImpl.h" - +#include "DragImageRef.h" #include "ChromiumDataObject.h" #include "ClipboardChromium.h" #include "Frame.h" +#include "NativeImageSkia.h" +#include "WebCommon.h" #include "WebDragData.h" +#include "WebImage.h" #include "WebViewClient.h" #include "WebViewImpl.h" @@ -81,8 +84,16 @@ void DragClientImpl::startDrag(DragImageRef dragImage, DragOperation dragOperationMask = clipboard->sourceOperation(); + IntSize offsetSize(eventPos - dragImageOrigin); + WebPoint offsetPoint(offsetSize.width(), offsetSize.height()); m_webView->startDragging( - eventPos, dragData, static_cast<WebDragOperationsMask>(dragOperationMask)); + dragData, static_cast<WebDragOperationsMask>(dragOperationMask), +#if WEBKIT_USING_SKIA + dragImage ? WebImage(*dragImage) : WebImage(), +#else + dragImage ? WebImage(dragImage) : WebImage(), +#endif + offsetPoint); } DragImageRef DragClientImpl::createDragImageForLink(KURL&, const String& label, Frame*) diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp index cfd8ec4..4ecdcf7 100644 --- a/WebKit/chromium/src/EditorClientImpl.cpp +++ b/WebKit/chromium/src/EditorClientImpl.cpp @@ -413,8 +413,10 @@ static const KeyDownEntry keyDownEntries[] = { { VKEY_DOWN, 0, "MoveDown" }, { VKEY_DOWN, ShiftKey, "MoveDownAndModifySelection" }, { VKEY_NEXT, ShiftKey, "MovePageDownAndModifySelection" }, +#if !OS(DARWIN) { VKEY_PRIOR, 0, "MovePageUp" }, { VKEY_NEXT, 0, "MovePageDown" }, +#endif { VKEY_HOME, 0, "MoveToBeginningOfLine" }, { VKEY_HOME, ShiftKey, "MoveToBeginningOfLineAndModifySelection" }, @@ -422,6 +424,8 @@ static const KeyDownEntry keyDownEntries[] = { { VKEY_LEFT, CommandKey, "MoveToBeginningOfLine" }, { VKEY_LEFT, CommandKey | ShiftKey, "MoveToBeginningOfLineAndModifySelection" }, + { VKEY_PRIOR, OptionKey, "MovePageUp" }, + { VKEY_NEXT, OptionKey, "MovePageDown" }, #endif #if OS(DARWIN) { VKEY_UP, CommandKey, "MoveToBeginningOfDocument" }, @@ -703,8 +707,9 @@ bool EditorClientImpl::autofill(HTMLInputElement* inputElement, // Let's try to trigger autofill for that field, if applicable. if (!inputElement->isEnabledFormControl() || !inputElement->isTextField() - || inputElement->isPasswordField() - || !inputElement->autoComplete()) + || inputElement->isPasswordField() || !inputElement->autoComplete() + || !inputElement->isEnabledFormControl() + || inputElement->isReadOnlyFormControl()) return false; WebString name = WebInputElement(inputElement).nameForAutofill(); diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp index 8fb267d..135392b 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp +++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp @@ -32,12 +32,13 @@ #include "FrameLoaderClientImpl.h" #include "Chrome.h" -#include "CString.h" #include "Document.h" #include "DocumentLoader.h" #include "FormState.h" #include "FrameLoader.h" #include "FrameLoadRequest.h" +#include "HTTPParsers.h" +#include "HistoryItem.h" #include "HitTestResult.h" #include "HTMLAppletElement.h" #include "HTMLFormElement.h" // needed by FormState.h @@ -71,6 +72,7 @@ #include "WindowFeatures.h" #include "WrappedResourceRequest.h" #include "WrappedResourceResponse.h" +#include <wtf/text/CString.h> using namespace WebCore; @@ -180,6 +182,18 @@ bool FrameLoaderClientImpl::allowImages(bool enabledPerSettings) return enabledPerSettings; } +void FrameLoaderClientImpl::didNotAllowScript() +{ + if (m_webFrame->client()) + m_webFrame->client()->didNotAllowScript(m_webFrame); +} + +void FrameLoaderClientImpl::didNotAllowPlugins() +{ + if (m_webFrame->client()) + m_webFrame->client()->didNotAllowPlugins(m_webFrame); +} + bool FrameLoaderClientImpl::hasWebView() const { return m_webFrame->viewImpl(); @@ -392,12 +406,6 @@ bool FrameLoaderClientImpl::dispatchDidLoadResourceFromMemoryCache( return false; // Do not suppress remaining notifications } -void FrameLoaderClientImpl::dispatchDidLoadResourceByXMLHttpRequest( - unsigned long identifier, - const ScriptString& source) -{ -} - void FrameLoaderClientImpl::dispatchDidHandleOnloadEvents() { if (m_webFrame->client()) @@ -556,7 +564,7 @@ void FrameLoaderClientImpl::dispatchWillPerformClientRedirect( } } -void FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage() +void FrameLoaderClientImpl::dispatchDidNavigateWithinPage() { // Anchor fragment navigations are not normal loads, so we need to synthesize // some events for our delegate. @@ -567,12 +575,17 @@ void FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage() // them for fragment redirection that happens in window.onload handler. // See https://bugs.webkit.org/show_bug.cgi?id=31838 bool loaderCompleted = - !m_webFrame->frame()->page()->mainFrame()->loader()->isLoading(); + !webView->page()->mainFrame()->loader()->activeDocumentLoader()->isLoadingInAPISense(); // Generate didStartLoading if loader is completed. if (webView->client() && loaderCompleted) webView->client()->didStartLoading(); + // We need to classify some hash changes as client redirects. + // FIXME: It seems wrong that the currentItem can sometimes be null. + HistoryItem* currentItem = m_webFrame->frame()->loader()->history()->currentItem(); + bool isHashChange = !currentItem || !currentItem->stateObject(); + WebDataSourceImpl* ds = m_webFrame->dataSourceImpl(); ASSERT(ds); // Should not be null when navigating to a reference fragment! if (ds) { @@ -583,27 +596,29 @@ void FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage() ds->clearRedirectChain(); } - // Figure out if this location change is because of a JS-initiated - // client redirect (e.g onload/setTimeout document.location.href=). - // FIXME: (bugs 1085325, 1046841) We don't get proper redirect - // performed/cancelled notifications across anchor navigations, so the - // other redirect-tracking code in this class (see - // dispatch*ClientRedirect() and dispatchDidStartProvisionalLoad) is - // insufficient to catch and properly flag these transitions. Once a - // proper fix for this bug is identified and applied the following - // block may no longer be required. - bool wasClientRedirect = - (url == m_expectedClientRedirectDest && chainEnd == m_expectedClientRedirectSrc) - || !m_webFrame->isProcessingUserGesture(); - - if (wasClientRedirect) { - if (m_webFrame->client()) - m_webFrame->client()->didCompleteClientRedirect(m_webFrame, chainEnd); - ds->appendRedirect(chainEnd); - // Make sure we clear the expected redirect since we just effectively - // completed it. - m_expectedClientRedirectSrc = KURL(); - m_expectedClientRedirectDest = KURL(); + if (isHashChange) { + // Figure out if this location change is because of a JS-initiated + // client redirect (e.g onload/setTimeout document.location.href=). + // FIXME: (b/1085325, b/1046841) We don't get proper redirect + // performed/cancelled notifications across anchor navigations, so the + // other redirect-tracking code in this class (see + // dispatch*ClientRedirect() and dispatchDidStartProvisionalLoad) is + // insufficient to catch and properly flag these transitions. Once a + // proper fix for this bug is identified and applied the following + // block may no longer be required. + bool wasClientRedirect = + (url == m_expectedClientRedirectDest && chainEnd == m_expectedClientRedirectSrc) + || !m_webFrame->isProcessingUserGesture(); + + if (wasClientRedirect) { + if (m_webFrame->client()) + m_webFrame->client()->didCompleteClientRedirect(m_webFrame, chainEnd); + ds->appendRedirect(chainEnd); + // Make sure we clear the expected redirect since we just effectively + // completed it. + m_expectedClientRedirectSrc = KURL(); + m_expectedClientRedirectDest = KURL(); + } } // Regardless of how we got here, we are navigating to a URL so we need to @@ -613,27 +628,38 @@ void FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage() bool isNewNavigation; webView->didCommitLoad(&isNewNavigation); - if (m_webFrame->client()) - m_webFrame->client()->didChangeLocationWithinPage(m_webFrame, isNewNavigation); + if (m_webFrame->client()) { + m_webFrame->client()->didNavigateWithinPage(m_webFrame, isNewNavigation); + + // FIXME: Remove this notification once it is no longer consumed downstream. + if (isHashChange) + m_webFrame->client()->didChangeLocationWithinPage(m_webFrame, isNewNavigation); + } // Generate didStopLoading if loader is completed. if (webView->client() && loaderCompleted) webView->client()->didStopLoading(); } +void FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage() +{ + if (m_webFrame) + m_webFrame->client()->didChangeLocationWithinPage(m_webFrame); +} + void FrameLoaderClientImpl::dispatchDidPushStateWithinPage() { - // FIXME + dispatchDidNavigateWithinPage(); } void FrameLoaderClientImpl::dispatchDidReplaceStateWithinPage() { - // FIXME + dispatchDidNavigateWithinPage(); } void FrameLoaderClientImpl::dispatchDidPopStateWithinPage() { - // FIXME + // Ignored since dispatchDidNavigateWithinPage was already called. } void FrameLoaderClientImpl::dispatchWillClose() @@ -797,38 +823,6 @@ void FrameLoaderClientImpl::dispatchShow() webView->client()->show(webView->initialNavigationPolicy()); } -static bool shouldTreatAsAttachment(const ResourceResponse& response) -{ - const String& contentDisposition = - response.httpHeaderField("Content-Disposition"); - if (contentDisposition.isEmpty()) - return false; - - // Some broken sites just send - // Content-Disposition: ; filename="file" - // screen those out here. - if (contentDisposition.startsWith(";")) - return false; - - if (contentDisposition.startsWith("inline", false)) - return false; - - // Some broken sites just send - // Content-Disposition: filename="file" - // without a disposition token... screen those out. - if (contentDisposition.startsWith("filename", false)) - return false; - - // Also in use is Content-Disposition: name="file" - if (contentDisposition.startsWith("name", false)) - return false; - - // We have a content-disposition of "attachment" or unknown. - // RFC 2183, section 2.8 says that an unknown disposition - // value should be treated as "attachment" - return true; -} - void FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType( FramePolicyFunction function, const String& mimeType, @@ -843,7 +837,7 @@ void FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType( if (statusCode == 204 || statusCode == 205) { // The server does not want us to replace the page contents. action = PolicyIgnore; - } else if (shouldTreatAsAttachment(response)) { + } else if (WebCore::contentDispositionType(response.httpHeaderField("Content-Disposition")) == WebCore::ContentDispositionAttachment) { // The server wants us to download instead of replacing the page contents. // Downloading is handled by the embedder, but we still get the initial // response so that we can ignore it and clean up properly. @@ -898,51 +892,48 @@ void FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction( // The null check here is to fix a crash that seems strange // (see - https://bugs.webkit.org/show_bug.cgi?id=23554). if (m_webFrame->client() && !request.url().isNull()) { - WebNavigationPolicy navigationPolicy = WebNavigationPolicyCurrentTab; - actionSpecifiesNavigationPolicy(action, &navigationPolicy); - - // Give the delegate a chance to change the navigation policy. - const WebDataSourceImpl* ds = m_webFrame->provisionalDataSourceImpl(); - if (ds) { - KURL url = ds->request().url(); - if (url.protocolIs(backForwardNavigationScheme)) { - handleBackForwardNavigation(url); - navigationPolicy = WebNavigationPolicyIgnore; - } else { - bool isRedirect = ds->hasRedirectChain(); - - WebNavigationType webnavType = - WebDataSourceImpl::toWebNavigationType(action.type()); - - RefPtr<Node> node; - for (const Event* event = action.event(); event; event = event->underlyingEvent()) { - if (event->isMouseEvent()) { - const MouseEvent* mouseEvent = - static_cast<const MouseEvent*>(event); - node = m_webFrame->frame()->eventHandler()->hitTestResultAtPoint( - mouseEvent->absoluteLocation(), false).innerNonSharedNode(); - break; - } - } - WebNode originatingNode(node); - - navigationPolicy = m_webFrame->client()->decidePolicyForNavigation( - m_webFrame, ds->request(), webnavType, originatingNode, - navigationPolicy, isRedirect); - } - } - - if (navigationPolicy == WebNavigationPolicyCurrentTab) - policyAction = PolicyUse; - else if (navigationPolicy == WebNavigationPolicyDownload) - policyAction = PolicyDownload; - else { - if (navigationPolicy != WebNavigationPolicyIgnore) { - WrappedResourceRequest webreq(request); - m_webFrame->client()->loadURLExternally(m_webFrame, webreq, navigationPolicy); - } - policyAction = PolicyIgnore; - } + WebNavigationPolicy navigationPolicy = WebNavigationPolicyCurrentTab; + actionSpecifiesNavigationPolicy(action, &navigationPolicy); + + // Give the delegate a chance to change the navigation policy. + const WebDataSourceImpl* ds = m_webFrame->provisionalDataSourceImpl(); + if (ds) { + KURL url = ds->request().url(); + ASSERT(!url.protocolIs(backForwardNavigationScheme)); + + bool isRedirect = ds->hasRedirectChain(); + + WebNavigationType webnavType = + WebDataSourceImpl::toWebNavigationType(action.type()); + + RefPtr<Node> node; + for (const Event* event = action.event(); event; event = event->underlyingEvent()) { + if (event->isMouseEvent()) { + const MouseEvent* mouseEvent = + static_cast<const MouseEvent*>(event); + node = m_webFrame->frame()->eventHandler()->hitTestResultAtPoint( + mouseEvent->absoluteLocation(), false).innerNonSharedNode(); + break; + } + } + WebNode originatingNode(node); + + navigationPolicy = m_webFrame->client()->decidePolicyForNavigation( + m_webFrame, ds->request(), webnavType, originatingNode, + navigationPolicy, isRedirect); + } + + if (navigationPolicy == WebNavigationPolicyCurrentTab) + policyAction = PolicyUse; + else if (navigationPolicy == WebNavigationPolicyDownload) + policyAction = PolicyDownload; + else { + if (navigationPolicy != WebNavigationPolicyIgnore) { + WrappedResourceRequest webreq(request); + m_webFrame->client()->loadURLExternally(m_webFrame, webreq, navigationPolicy); + } + policyAction = PolicyIgnore; + } } (m_webFrame->frame()->loader()->policyChecker()->*function)(policyAction); @@ -1075,7 +1066,7 @@ void FrameLoaderClientImpl::finishedLoading(DocumentLoader* dl) // However, we only want to do this if makeRepresentation has been called, to // match the behavior on the Mac. if (m_hasRepresentation) - dl->frameLoader()->setEncoding("", false); + dl->frameLoader()->writer()->setEncoding("", false); } } @@ -1087,10 +1078,28 @@ void FrameLoaderClientImpl::updateGlobalHistoryRedirectLinks() { } -bool FrameLoaderClientImpl::shouldGoToHistoryItem(HistoryItem*) const +bool FrameLoaderClientImpl::shouldGoToHistoryItem(HistoryItem* item) const { - // FIXME - return true; + const KURL& url = item->url(); + if (!url.protocolIs(backForwardNavigationScheme)) + return true; + + // Else, we'll punt this history navigation to the embedder. It is + // necessary that we intercept this here, well before the FrameLoader + // has made any state changes for this history traversal. + + bool ok; + int offset = url.lastPathComponent().toIntStrict(&ok); + if (!ok) { + ASSERT_NOT_REACHED(); + return false; + } + + WebViewImpl* webview = m_webFrame->viewImpl(); + if (webview->client()) + webview->client()->navigateBackForwardSoon(offset); + + return false; } void FrameLoaderClientImpl::dispatchDidAddBackForwardItem(HistoryItem*) const @@ -1465,29 +1474,24 @@ bool FrameLoaderClientImpl::actionSpecifiesNavigationPolicy( const NavigationAction& action, WebNavigationPolicy* policy) { - if ((action.type() != NavigationTypeLinkClicked) || !action.event()->isMouseEvent()) + const MouseEvent* event = 0; + if (action.type() == NavigationTypeLinkClicked + && action.event()->isMouseEvent()) + event = static_cast<const MouseEvent*>(action.event()); + else if (action.type() == NavigationTypeFormSubmitted + && action.event() + && action.event()->underlyingEvent() + && action.event()->underlyingEvent()->isMouseEvent()) + event = static_cast<const MouseEvent*>(action.event()->underlyingEvent()); + + if (!event) return false; - const MouseEvent* event = static_cast<const MouseEvent*>(action.event()); return WebViewImpl::navigationPolicyFromMouseEvent( event->button(), event->ctrlKey(), event->shiftKey(), event->altKey(), event->metaKey(), policy); } -void FrameLoaderClientImpl::handleBackForwardNavigation(const KURL& url) -{ - ASSERT(url.protocolIs(backForwardNavigationScheme)); - - bool ok; - int offset = url.lastPathComponent().toIntStrict(&ok); - if (!ok) - return; - - WebViewImpl* webview = m_webFrame->viewImpl(); - if (webview->client()) - webview->client()->navigateBackForwardSoon(offset); -} - PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver() { WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader( diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h index 8a39393..1cbc1de 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.h +++ b/WebKit/chromium/src/FrameLoaderClientImpl.h @@ -89,11 +89,11 @@ public: virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier); virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&); virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length); - virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString&); virtual void dispatchDidHandleOnloadEvents(); virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); virtual void dispatchDidCancelClientRedirect(); virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate); + virtual void dispatchDidNavigateWithinPage(); virtual void dispatchDidChangeLocationWithinPage(); virtual void dispatchDidPushStateWithinPage(); virtual void dispatchDidReplaceStateWithinPage(); @@ -195,6 +195,8 @@ public: virtual bool allowJavaScript(bool enabledPerSettings); virtual bool allowPlugins(bool enabledPerSettings); virtual bool allowImages(bool enabledPerSettings); + virtual void didNotAllowScript(); + virtual void didNotAllowPlugins(); private: void makeDocumentView(); @@ -204,9 +206,6 @@ private: static bool actionSpecifiesNavigationPolicy( const WebCore::NavigationAction& action, WebNavigationPolicy* policy); - // Called when a dummy back-forward navigation is intercepted. - void handleBackForwardNavigation(const WebCore::KURL&); - PassOwnPtr<WebPluginLoadObserver> pluginLoadObserver(); // The WebFrame that owns this object and manages its lifetime. Therefore, diff --git a/WebKit/chromium/src/GLES2Context.cpp b/WebKit/chromium/src/GLES2Context.cpp new file mode 100644 index 0000000..9dd4eff --- /dev/null +++ b/WebKit/chromium/src/GLES2Context.cpp @@ -0,0 +1,119 @@ +/* + * 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 "GLES2Context.h" +#include "WebGLES2Context.h" +#include "WebKit.h" +#include "WebKitClient.h" +#include "WebViewImpl.h" +#include <wtf/OwnPtr.h> + +// There are two levels of delegation in this file: +// +// 1. GLES2Context delegates to GLES2ContextInternal. This is done +// so that we have some place to store data members common among +// implementations. +// +// 2. GLES2ContextInternal delegates to an implementation of +// WebGLES2Context. This is done so we have a place to inject an +// implementation which creates the GL ES context. + +namespace WebCore { + +class GLES2ContextInternal { +public: + GLES2ContextInternal() {} + ~GLES2ContextInternal() {} + + bool initialize(Page*); + + WebKit::WebGLES2Context* getWebGLES2Context() { return m_impl.get(); } + +private: + OwnPtr<WebKit::WebGLES2Context> m_impl; +}; + +bool GLES2ContextInternal::initialize(Page* page) +{ + m_impl = WebKit::webKitClient()->createGLES2Context(); + if (!m_impl) + return false; + + WebKit::WebViewImpl* webView = WebKit::WebViewImpl::fromPage(page); + if (!m_impl->initialize(webView)) { + m_impl.clear(); + return false; + } + return true; +} + +PassOwnPtr<GLES2Context> GLES2Context::create(Page* page) +{ + GLES2ContextInternal* internal = new GLES2ContextInternal(); + if (!internal->initialize(page)) { + delete internal; + return 0; + } + PassOwnPtr<GLES2Context> result = new GLES2Context(); + result->m_internal.set(internal); + return result; +} + +GLES2Context::~GLES2Context() +{ +} + +bool GLES2Context::makeCurrent() +{ + WebKit::WebGLES2Context* webContext = m_internal->getWebGLES2Context(); + if (!webContext) + return false; + return webContext->makeCurrent(); +} + +bool GLES2Context::destroy() +{ + WebKit::WebGLES2Context* webContext = m_internal->getWebGLES2Context(); + if (!webContext) + return false; + return webContext->destroy(); +} + +bool GLES2Context::swapBuffers() +{ + WebKit::WebGLES2Context* webContext = m_internal->getWebGLES2Context(); + if (!webContext) + return false; + return webContext->swapBuffers(); +} + +} // namespace WebCore diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp index 807a794..0f9c959 100644 --- a/WebKit/chromium/src/GraphicsContext3D.cpp +++ b/WebKit/chromium/src/GraphicsContext3D.cpp @@ -35,12 +35,10 @@ #include "GraphicsContext3D.h" #include "CachedImage.h" -#include "CString.h" #include "HTMLCanvasElement.h" #include "HTMLImageElement.h" #include "ImageBuffer.h" #include "ImageData.h" -#include "NotImplemented.h" #include "WebGLBuffer.h" #include "WebGLByteArray.h" #include "WebGLFloatArray.h" @@ -52,39 +50,42 @@ #include "WebGLShader.h" #include "WebGLTexture.h" #include "WebGLUnsignedByteArray.h" +#include "WebGraphicsContext3D.h" +#include "WebGraphicsContext3DDefaultImpl.h" +#include "WebKit.h" +#include "WebKitClient.h" #include <stdio.h> #include <wtf/FastMalloc.h> - -#if OS(WINDOWS) -#include <windows.h> -#endif - -#include "GL/glew.h" +#include <wtf/text/CString.h> #if PLATFORM(CG) #include "GraphicsContext.h" #include <CoreGraphics/CGContext.h> #include <CoreGraphics/CGImage.h> -#include <OpenGL/OpenGL.h> -#else -#define FLIP_FRAMEBUFFER_VERTICALLY -#endif - -#if OS(DARWIN) -#define USE_TEXTURE_RECTANGLE_FOR_FRAMEBUFFER -#endif - -#if OS(LINUX) -#include <dlfcn.h> -#include "GL/glxew.h" #endif -using namespace std; +// using namespace std; + +// There are two levels of delegation in this file: +// +// 1. GraphicsContext3D delegates to GraphicsContext3DInternal. This is done +// so that we have some place to store data members common among +// implementations; GraphicsContext3D only provides us the m_internal +// pointer. We always delegate to the GraphicsContext3DInternal. While we +// could sidestep it and go directly to the WebGraphicsContext3D in some +// cases, it is better for consistency to always delegate through it. +// +// 2. GraphicsContext3DInternal delegates to an implementation of +// WebGraphicsContext3D. This is done so we have a place to inject an +// implementation which remotes the OpenGL calls across processes. +// +// The legacy, in-process, implementation uses WebGraphicsContext3DDefaultImpl. namespace WebCore { -// GraphicsContext3DInternal ----------------------------------------------------- +//---------------------------------------------------------------------- +// GraphicsContext3DInternal // Uncomment this to render to a separate window for debugging // #define RENDER_TO_DEBUGGING_WINDOW @@ -93,744 +94,324 @@ namespace WebCore { class GraphicsContext3DInternal { public: - GraphicsContext3DInternal(GraphicsContext3D::Attributes attrs); + GraphicsContext3DInternal(); ~GraphicsContext3DInternal(); - bool makeContextCurrent(); + bool initialize(GraphicsContext3D::Attributes attrs); PlatformGraphicsContext3D platformGraphicsContext3D() const; Platform3DObject platformTexture() const; + bool makeContextCurrent(); + + int sizeInBytes(int type); + void reshape(int width, int height); void beginPaint(WebGLRenderingContext* context); + void endPaint(); - bool validateTextureTarget(int target); - bool validateTextureParameter(int param); - + //---------------------------------------------------------------------- + // Entry points for WebGL. + // void activeTexture(unsigned long texture); - void bindBuffer(unsigned long target, - WebGLBuffer* buffer); - void bindFramebuffer(unsigned long target, - WebGLFramebuffer* framebuffer); - void bindTexture(unsigned long target, - WebGLTexture* texture); - void bufferDataImpl(unsigned long target, int size, const void* data, unsigned long usage); + void attachShader(WebGLProgram* program, WebGLShader* shader); + void bindAttribLocation(WebGLProgram*, unsigned long index, const String& name); + void bindBuffer(unsigned long target, WebGLBuffer*); + void bindFramebuffer(unsigned long target, WebGLFramebuffer*); + void bindRenderbuffer(unsigned long target, WebGLRenderbuffer*); + void bindTexture(unsigned long target, WebGLTexture* texture); + void blendColor(double red, double green, double blue, double alpha); + void blendEquation(unsigned long mode); + void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha); + void blendFunc(unsigned long sfactor, unsigned long dfactor); + void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha); + + void bufferData(unsigned long target, int size, unsigned long usage); + void bufferData(unsigned long target, WebGLArray* data, unsigned long usage); + void bufferSubData(unsigned long target, long offset, WebGLArray* data); + + unsigned long checkFramebufferStatus(unsigned long target); + void clear(unsigned long mask); + void clearColor(double red, double green, double blue, double alpha); + void clearDepth(double depth); + void clearStencil(long s); + void colorMask(bool red, bool green, bool blue, bool alpha); + void compileShader(WebGLShader*); + + void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border); + void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height); + void cullFace(unsigned long mode); + void depthFunc(unsigned long func); + void depthMask(bool flag); + void depthRange(double zNear, double zFar); + void detachShader(WebGLProgram*, WebGLShader*); + void disable(unsigned long cap); void disableVertexAttribArray(unsigned long index); + void drawArrays(unsigned long mode, long first, long count); + void drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset); + + void enable(unsigned long cap); void enableVertexAttribArray(unsigned long index); - unsigned long getError(); + void finish(); + void flush(); + void framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, WebGLRenderbuffer*); + void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, WebGLTexture*, long level); + void frontFace(unsigned long mode); + void generateMipmap(unsigned long target); + + bool getActiveAttrib(WebGLProgram* program, unsigned long index, ActiveInfo&); + bool getActiveUniform(WebGLProgram* program, unsigned long index, ActiveInfo&); + + int getAttribLocation(WebGLProgram*, const String& name); + + void getBooleanv(unsigned long pname, unsigned char* value); + + void getBufferParameteriv(unsigned long target, unsigned long pname, int* value); + GraphicsContext3D::Attributes getContextAttributes(); - void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, - unsigned long stride, unsigned long offset); - void viewportImpl(long x, long y, unsigned long width, unsigned long height); - void synthesizeGLError(unsigned long error); + unsigned long getError(); -private: - GraphicsContext3D::Attributes m_attrs; + void getFloatv(unsigned long pname, float* value); + + void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value); + + void getIntegerv(unsigned long pname, int* value); + + void getProgramiv(WebGLProgram* program, unsigned long pname, int* value); + + String getProgramInfoLog(WebGLProgram*); + + void getRenderbufferParameteriv(unsigned long target, unsigned long pname, int* value); + + void getShaderiv(WebGLShader*, unsigned long pname, int* value); + + String getShaderInfoLog(WebGLShader*); + + String getShaderSource(WebGLShader*); + String getString(unsigned long name); + + void getTexParameterfv(unsigned long target, unsigned long pname, float* value); + void getTexParameteriv(unsigned long target, unsigned long pname, int* value); + + void getUniformfv(WebGLProgram* program, long location, float* value); + void getUniformiv(WebGLProgram* program, long location, int* value); + + long getUniformLocation(WebGLProgram*, const String& name); + + void getVertexAttribfv(unsigned long index, unsigned long pname, float* value); + void getVertexAttribiv(unsigned long index, unsigned long pname, int* value); + + long getVertexAttribOffset(unsigned long index, unsigned long pname); + + void hint(unsigned long target, unsigned long mode); + bool isBuffer(WebGLBuffer*); + bool isEnabled(unsigned long cap); + bool isFramebuffer(WebGLFramebuffer*); + bool isProgram(WebGLProgram*); + bool isRenderbuffer(WebGLRenderbuffer*); + bool isShader(WebGLShader*); + bool isTexture(WebGLTexture*); + void lineWidth(double); + void linkProgram(WebGLProgram*); + void pixelStorei(unsigned long pname, long param); + void polygonOffset(double factor, double units); + + void readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* data); + + void releaseShaderCompiler(); + void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height); + void sampleCoverage(double value, bool invert); + void scissor(long x, long y, unsigned long width, unsigned long height); + void shaderSource(WebGLShader*, const String& string); + void stencilFunc(unsigned long func, long ref, unsigned long mask); + void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask); + void stencilMask(unsigned long mask); + void stencilMaskSeparate(unsigned long face, unsigned long mask); + void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass); + void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass); + + // These next several functions return an error code (0 if no errors) rather than using an ExceptionCode. + // Currently they return -1 on any error. + int texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels); + + void texParameterf(unsigned target, unsigned pname, float param); + void texParameteri(unsigned target, unsigned pname, int param); + + int texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, void* pixels); + + void uniform1f(long location, float x); + void uniform1fv(long location, float* v, int size); + void uniform1i(long location, int x); + void uniform1iv(long location, int* v, int size); + void uniform2f(long location, float x, float y); + void uniform2fv(long location, float* v, int size); + void uniform2i(long location, int x, int y); + void uniform2iv(long location, int* v, int size); + void uniform3f(long location, float x, float y, float z); + void uniform3fv(long location, float* v, int size); + void uniform3i(long location, int x, int y, int z); + void uniform3iv(long location, int* v, int size); + void uniform4f(long location, float x, float y, float z, float w); + void uniform4fv(long location, float* v, int size); + void uniform4i(long location, int x, int y, int z, int w); + void uniform4iv(long location, int* v, int size); + void uniformMatrix2fv(long location, bool transpose, float* value, int size); + void uniformMatrix3fv(long location, bool transpose, float* value, int size); + void uniformMatrix4fv(long location, bool transpose, float* value, int size); + + void useProgram(WebGLProgram*); + void validateProgram(WebGLProgram*); + + void vertexAttrib1f(unsigned long indx, float x); + void vertexAttrib1fv(unsigned long indx, float* values); + void vertexAttrib2f(unsigned long indx, float x, float y); + void vertexAttrib2fv(unsigned long indx, float* values); + void vertexAttrib3f(unsigned long indx, float x, float y, float z); + void vertexAttrib3fv(unsigned long indx, float* values); + void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w); + void vertexAttrib4fv(unsigned long indx, float* values); + void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, + unsigned long stride, unsigned long offset); - unsigned int m_texture; - unsigned int m_fbo; - unsigned int m_depthBuffer; - unsigned int m_cachedWidth, m_cachedHeight; + void viewport(long x, long y, unsigned long width, unsigned long height); - // For tracking which FBO is bound - unsigned int m_boundFBO; + unsigned createBuffer(); + unsigned createFramebuffer(); + unsigned createProgram(); + unsigned createRenderbuffer(); + unsigned createShader(unsigned long); + unsigned createTexture(); -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - unsigned char* m_scanline; - void flipVertically(unsigned char* framebuffer, - unsigned int width, - unsigned int height); -#endif + void deleteBuffer(unsigned); + void deleteFramebuffer(unsigned); + void deleteProgram(unsigned); + void deleteRenderbuffer(unsigned); + void deleteShader(unsigned); + void deleteTexture(unsigned); - // Note: we aren't currently using this information, but we will - // need to in order to verify that all enabled vertex arrays have - // a valid buffer bound -- to avoid crashes on certain cards. - unsigned int m_boundArrayBuffer; - class VertexAttribPointerState { - public: - VertexAttribPointerState(); - - bool enabled; - unsigned long buffer; - unsigned long indx; - int size; - int type; - bool normalized; - unsigned long stride; - unsigned long offset; - }; - - enum { - NumTrackedPointerStates = 2 - }; - VertexAttribPointerState m_vertexAttribPointerState[NumTrackedPointerStates]; - - // Errors raised by synthesizeGLError(). - ListHashSet<unsigned long> m_syntheticErrors; + void synthesizeGLError(unsigned long error); +private: + OwnPtr<WebKit::WebGraphicsContext3D> m_impl; #if PLATFORM(SKIA) // If the width and height of the Canvas's backing store don't // match those that we were given in the most recent call to // reshape(), then we need an intermediate bitmap to read back the // frame buffer into. This seems to happen when CSS styles are // used to resize the Canvas. - SkBitmap* m_resizingBitmap; + SkBitmap m_resizingBitmap; #endif - static bool s_initializedGLEW; -#if OS(WINDOWS) - HWND m_canvasWindow; - HDC m_canvasDC; - HGLRC m_contextObj; -#elif PLATFORM(CG) - CGLPBufferObj m_pbuffer; - CGLContextObj m_contextObj; +#if PLATFORM(CG) unsigned char* m_renderOutput; -#elif OS(LINUX) - GLXContext m_contextObj; - GLXPbuffer m_pbuffer; - - // In order to avoid problems caused by linking against libGL, we - // dynamically look up all the symbols we need. - // http://code.google.com/p/chromium/issues/detail?id=16800 - class GLConnection { - public: - ~GLConnection(); - - static GLConnection* create(); - - GLXFBConfig* chooseFBConfig(int screen, const int *attrib_list, int *nelements) - { - return m_glXChooseFBConfig(m_display, screen, attrib_list, nelements); - } - - GLXContext createNewContext(GLXFBConfig config, int renderType, GLXContext shareList, Bool direct) - { - return m_glXCreateNewContext(m_display, config, renderType, shareList, direct); - } - - GLXPbuffer createPbuffer(GLXFBConfig config, const int *attribList) - { - return m_glXCreatePbuffer(m_display, config, attribList); - } - - void destroyPbuffer(GLXPbuffer pbuf) - { - m_glXDestroyPbuffer(m_display, pbuf); - } - - Bool makeCurrent(GLXDrawable drawable, GLXContext ctx) - { - return m_glXMakeCurrent(m_display, drawable, ctx); - } - - void destroyContext(GLXContext ctx) - { - m_glXDestroyContext(m_display, ctx); - } - - GLXContext getCurrentContext() - { - return m_glXGetCurrentContext(); - } - - private: - Display* m_display; - void* m_libGL; - PFNGLXCHOOSEFBCONFIGPROC m_glXChooseFBConfig; - PFNGLXCREATENEWCONTEXTPROC m_glXCreateNewContext; - PFNGLXCREATEPBUFFERPROC m_glXCreatePbuffer; - PFNGLXDESTROYPBUFFERPROC m_glXDestroyPbuffer; - typedef Bool (* PFNGLXMAKECURRENTPROC)(Display* dpy, GLXDrawable drawable, GLXContext ctx); - PFNGLXMAKECURRENTPROC m_glXMakeCurrent; - typedef void (* PFNGLXDESTROYCONTEXTPROC)(Display* dpy, GLXContext ctx); - PFNGLXDESTROYCONTEXTPROC m_glXDestroyContext; - typedef GLXContext (* PFNGLXGETCURRENTCONTEXTPROC)(void); - PFNGLXGETCURRENTCONTEXTPROC m_glXGetCurrentContext; - - GLConnection(Display* display, - void* libGL, - PFNGLXCHOOSEFBCONFIGPROC chooseFBConfig, - PFNGLXCREATENEWCONTEXTPROC createNewContext, - PFNGLXCREATEPBUFFERPROC createPbuffer, - PFNGLXDESTROYPBUFFERPROC destroyPbuffer, - PFNGLXMAKECURRENTPROC makeCurrent, - PFNGLXDESTROYCONTEXTPROC destroyContext, - PFNGLXGETCURRENTCONTEXTPROC getCurrentContext) - : m_libGL(libGL) - , m_display(display) - , m_glXChooseFBConfig(chooseFBConfig) - , m_glXCreateNewContext(createNewContext) - , m_glXCreatePbuffer(createPbuffer) - , m_glXDestroyPbuffer(destroyPbuffer) - , m_glXMakeCurrent(makeCurrent) - , m_glXDestroyContext(destroyContext) - , m_glXGetCurrentContext(getCurrentContext) - { - } - }; - - static GLConnection* s_gl; -#else - #error Must port GraphicsContext3D to your platform #endif }; -bool GraphicsContext3DInternal::s_initializedGLEW = false; - -#if OS(LINUX) -GraphicsContext3DInternal::GLConnection* GraphicsContext3DInternal::s_gl = 0; - -GraphicsContext3DInternal::GLConnection* GraphicsContext3DInternal::GLConnection::create() -{ - Display* dpy = XOpenDisplay(0); - if (!dpy) { - printf("GraphicsContext3D: error opening X display\n"); - return 0; - } - - // We use RTLD_GLOBAL semantics so that GLEW initialization works; - // GLEW expects to be able to open the current process's handle - // and do dlsym's of GL entry points from there. - void* libGL = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); - if (!libGL) { - XCloseDisplay(dpy); - printf("GraphicsContext3D: error opening libGL.so.1: %s\n", dlerror()); - return 0; - } - - PFNGLXCHOOSEFBCONFIGPROC chooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) dlsym(libGL, "glXChooseFBConfig"); - PFNGLXCREATENEWCONTEXTPROC createNewContext = (PFNGLXCREATENEWCONTEXTPROC) dlsym(libGL, "glXCreateNewContext"); - PFNGLXCREATEPBUFFERPROC createPbuffer = (PFNGLXCREATEPBUFFERPROC) dlsym(libGL, "glXCreatePbuffer"); - PFNGLXDESTROYPBUFFERPROC destroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) dlsym(libGL, "glXDestroyPbuffer"); - PFNGLXMAKECURRENTPROC makeCurrent = (PFNGLXMAKECURRENTPROC) dlsym(libGL, "glXMakeCurrent"); - PFNGLXDESTROYCONTEXTPROC destroyContext = (PFNGLXDESTROYCONTEXTPROC) dlsym(libGL, "glXDestroyContext"); - PFNGLXGETCURRENTCONTEXTPROC getCurrentContext = (PFNGLXGETCURRENTCONTEXTPROC) dlsym(libGL, "glXGetCurrentContext"); - if (!chooseFBConfig || !createNewContext || !createPbuffer - || !destroyPbuffer || !makeCurrent || !destroyContext - || !getCurrentContext) { - XCloseDisplay(dpy); - dlclose(libGL); - printf("GraphicsContext3D: error looking up bootstrapping entry points\n"); - return 0; - } - return new GLConnection(dpy, - libGL, - chooseFBConfig, - createNewContext, - createPbuffer, - destroyPbuffer, - makeCurrent, - destroyContext, - getCurrentContext); -} - -GraphicsContext3DInternal::GLConnection::~GLConnection() -{ - XCloseDisplay(m_display); - dlclose(m_libGL); -} - -#endif // OS(LINUX) - -GraphicsContext3DInternal::VertexAttribPointerState::VertexAttribPointerState() - : enabled(false) - , buffer(0) - , indx(0) - , size(0) - , type(0) - , normalized(false) - , stride(0) - , offset(0) -{ -} - -GraphicsContext3DInternal::GraphicsContext3DInternal(GraphicsContext3D::Attributes attrs) - : m_attrs(attrs) - , m_texture(0) - , m_fbo(0) - , m_depthBuffer(0) - , m_boundFBO(0) -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - , m_scanline(0) -#endif - , m_boundArrayBuffer(0) +GraphicsContext3DInternal::GraphicsContext3DInternal() #if PLATFORM(SKIA) - , m_resizingBitmap(0) -#endif -#if OS(WINDOWS) - , m_canvasWindow(0) - , m_canvasDC(0) - , m_contextObj(0) #elif PLATFORM(CG) - , m_pbuffer(0) - , m_contextObj(0) - , m_renderOutput(0) -#elif OS(LINUX) - , m_contextObj(0) - , m_pbuffer(0) + : m_renderOutput(0) #else #error Must port to your platform #endif { - // FIXME: we need to take into account the user's requested - // context creation attributes, in particular stencil and - // antialias, and determine which could and could not be honored - // based on the capabilities of the OpenGL implementation. - m_attrs.alpha = true; - m_attrs.depth = true; - m_attrs.stencil = false; - m_attrs.antialias = false; - m_attrs.premultipliedAlpha = true; - -#if OS(WINDOWS) - WNDCLASS wc; - if (!GetClassInfo(GetModuleHandle(0), L"CANVASGL", &wc)) { - ZeroMemory(&wc, sizeof(WNDCLASS)); - wc.style = CS_OWNDC; - wc.hInstance = GetModuleHandle(0); - wc.lpfnWndProc = DefWindowProc; - wc.lpszClassName = L"CANVASGL"; - - if (!RegisterClass(&wc)) { - printf("GraphicsContext3D: RegisterClass failed\n"); - return; - } - } - - m_canvasWindow = CreateWindow(L"CANVASGL", L"CANVASGL", - WS_CAPTION, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, 0, 0, GetModuleHandle(0), 0); - if (!m_canvasWindow) { - printf("GraphicsContext3DInternal: CreateWindow failed\n"); - return; - } - - // get the device context - m_canvasDC = GetDC(m_canvasWindow); - if (!m_canvasDC) { - printf("GraphicsContext3DInternal: GetDC failed\n"); - return; - } - - // find default pixel format - PIXELFORMATDESCRIPTOR pfd; - ZeroMemory(&pfd, sizeof(PIXELFORMATDESCRIPTOR)); - pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); - pfd.nVersion = 1; - pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL -#ifdef RENDER_TO_DEBUGGING_WINDOW - | PFD_DOUBLEBUFFER -#endif // RENDER_TO_DEBUGGING_WINDOW - ; - int pixelformat = ChoosePixelFormat(m_canvasDC, &pfd); - - // set the pixel format for the dc - if (!SetPixelFormat(m_canvasDC, pixelformat, &pfd)) { - printf("GraphicsContext3D: SetPixelFormat failed\n"); - return; - } - - // create rendering context - m_contextObj = wglCreateContext(m_canvasDC); - if (!m_contextObj) { - printf("GraphicsContext3D: wglCreateContext failed\n"); - return; - } - - if (!wglMakeCurrent(m_canvasDC, m_contextObj)) { - printf("GraphicsContext3D: wglMakeCurrent failed\n"); - return; - } - -#ifdef RENDER_TO_DEBUGGING_WINDOW - typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); - PFNWGLSWAPINTERVALEXTPROC setSwapInterval = 0; - setSwapInterval = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress("wglSwapIntervalEXT"); - if (setSwapInterval) - setSwapInterval(1); -#endif // RENDER_TO_DEBUGGING_WINDOW - -#elif PLATFORM(CG) - // Create a 1x1 pbuffer and associated context to bootstrap things - CGLPixelFormatAttribute attribs[] = { - (CGLPixelFormatAttribute) kCGLPFAPBuffer, - (CGLPixelFormatAttribute) 0 - }; - CGLPixelFormatObj pixelFormat; - GLint numPixelFormats; - if (CGLChoosePixelFormat(attribs, &pixelFormat, &numPixelFormats) != kCGLNoError) { - printf("GraphicsContext3D: error choosing pixel format\n"); - return; - } - if (!pixelFormat) { - printf("GraphicsContext3D: no pixel format selected\n"); - return; - } - CGLContextObj context; - CGLError res = CGLCreateContext(pixelFormat, 0, &context); - CGLDestroyPixelFormat(pixelFormat); - if (res != kCGLNoError) { - printf("GraphicsContext3D: error creating context\n"); - return; - } - CGLPBufferObj pbuffer; - if (CGLCreatePBuffer(1, 1, GL_TEXTURE_2D, GL_RGBA, 0, &pbuffer) != kCGLNoError) { - CGLDestroyContext(context); - printf("GraphicsContext3D: error creating pbuffer\n"); - return; - } - if (CGLSetPBuffer(context, pbuffer, 0, 0, 0) != kCGLNoError) { - CGLDestroyContext(context); - CGLDestroyPBuffer(pbuffer); - printf("GraphicsContext3D: error attaching pbuffer to context\n"); - return; - } - if (CGLSetCurrentContext(context) != kCGLNoError) { - CGLDestroyContext(context); - CGLDestroyPBuffer(pbuffer); - printf("GraphicsContext3D: error making context current\n"); - return; - } - m_pbuffer = pbuffer; - m_contextObj = context; -#elif OS(LINUX) - if (!s_gl) { - s_gl = GLConnection::create(); - if (!s_gl) - return; - } - - int configAttrs[] = { - GLX_DRAWABLE_TYPE, - GLX_PBUFFER_BIT, - GLX_RENDER_TYPE, - GLX_RGBA_BIT, - GLX_DOUBLEBUFFER, - 0, - 0 - }; - int nelements = 0; - GLXFBConfig* config = s_gl->chooseFBConfig(0, configAttrs, &nelements); - if (!config) { - printf("GraphicsContext3D: glXChooseFBConfig failed\n"); - return; - } - if (!nelements) { - printf("GraphicsContext3D: glXChooseFBConfig returned 0 elements\n"); - XFree(config); - return; - } - GLXContext context = s_gl->createNewContext(config[0], GLX_RGBA_TYPE, 0, True); - if (!context) { - printf("GraphicsContext3D: glXCreateNewContext failed\n"); - XFree(config); - return; - } - int pbufferAttrs[] = { - GLX_PBUFFER_WIDTH, - 1, - GLX_PBUFFER_HEIGHT, - 1, - 0 - }; - GLXPbuffer pbuffer = s_gl->createPbuffer(config[0], pbufferAttrs); - XFree(config); - if (!pbuffer) { - printf("GraphicsContext3D: glxCreatePbuffer failed\n"); - return; - } - if (!s_gl->makeCurrent(pbuffer, context)) { - printf("GraphicsContext3D: glXMakeCurrent failed\n"); - return; - } - m_contextObj = context; - m_pbuffer = pbuffer; -#else -#error Must port to your platform -#endif - - if (!s_initializedGLEW) { - // Initialize GLEW and check for GL 2.0 support by the drivers. - GLenum glewInitResult = glewInit(); - if (glewInitResult != GLEW_OK) { - printf("GraphicsContext3D: GLEW initialization failed\n"); - return; - } - if (!glewIsSupported("GL_VERSION_2_0")) { - printf("GraphicsContext3D: OpenGL 2.0 not supported\n"); - return; - } - s_initializedGLEW = true; - } } GraphicsContext3DInternal::~GraphicsContext3DInternal() { - makeContextCurrent(); -#ifndef RENDER_TO_DEBUGGING_WINDOW - glDeleteRenderbuffersEXT(1, &m_depthBuffer); - glDeleteTextures(1, &m_texture); -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - if (m_scanline) - delete[] m_scanline; -#endif - glDeleteFramebuffersEXT(1, &m_fbo); -#endif // !RENDER_TO_DEBUGGING_WINDOW -#if PLATFORM(SKIA) - if (m_resizingBitmap) - delete m_resizingBitmap; -#endif -#if OS(WINDOWS) - wglMakeCurrent(0, 0); - wglDeleteContext(m_contextObj); - ReleaseDC(m_canvasWindow, m_canvasDC); - DestroyWindow(m_canvasWindow); -#elif PLATFORM(CG) - CGLSetCurrentContext(0); - CGLDestroyContext(m_contextObj); - CGLDestroyPBuffer(m_pbuffer); +#if PLATFORM(CG) if (m_renderOutput) delete[] m_renderOutput; -#elif OS(LINUX) - s_gl->makeCurrent(0, 0); - s_gl->destroyContext(m_contextObj); - s_gl->destroyPbuffer(m_pbuffer); -#else -#error Must port to your platform #endif - m_contextObj = 0; } -bool GraphicsContext3DInternal::makeContextCurrent() +bool GraphicsContext3DInternal::initialize(GraphicsContext3D::Attributes attrs) { -#if OS(WINDOWS) - if (wglGetCurrentContext() != m_contextObj) - if (wglMakeCurrent(m_canvasDC, m_contextObj)) - return true; -#elif PLATFORM(CG) - if (CGLGetCurrentContext() != m_contextObj) - if (CGLSetCurrentContext(m_contextObj) == kCGLNoError) - return true; -#elif OS(LINUX) - if (s_gl->getCurrentContext() != m_contextObj) - if (s_gl->makeCurrent(m_pbuffer, m_contextObj)) - return true; -#else -#error Must port to your platform -#endif - return false; + WebKit::WebGraphicsContext3D::Attributes webAttributes; + webAttributes.alpha = attrs.alpha; + webAttributes.depth = attrs.depth; + webAttributes.stencil = attrs.stencil; + webAttributes.antialias = attrs.antialias; + webAttributes.premultipliedAlpha = attrs.premultipliedAlpha; + WebKit::WebGraphicsContext3D* webContext = WebKit::webKitClient()->createGraphicsContext3D(); + if (!webContext) + return false; + if (!webContext->initialize(webAttributes)) { + delete webContext; + return false; + } + m_impl.set(webContext); + return true; } PlatformGraphicsContext3D GraphicsContext3DInternal::platformGraphicsContext3D() const { - return m_contextObj; + return 0; } Platform3DObject GraphicsContext3DInternal::platformTexture() const { - return m_texture; -} - -static int createTextureObject(GLenum target) -{ - GLuint texture = 0; - glGenTextures(1, &texture); - glBindTexture(target, texture); - glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - return texture; -} - -void GraphicsContext3DInternal::reshape(int width, int height) -{ -#ifdef RENDER_TO_DEBUGGING_WINDOW - SetWindowPos(m_canvasWindow, HWND_TOP, 0, 0, width, height, - SWP_NOMOVE); - ShowWindow(m_canvasWindow, SW_SHOW); -#endif - - m_cachedWidth = width; - m_cachedHeight = height; - makeContextCurrent(); - -#ifndef RENDER_TO_DEBUGGING_WINDOW -#ifdef USE_TEXTURE_RECTANGLE_FOR_FRAMEBUFFER - // GL_TEXTURE_RECTANGLE_ARB is the best supported render target on Mac OS X - GLenum target = GL_TEXTURE_RECTANGLE_ARB; -#else - GLenum target = GL_TEXTURE_2D; -#endif - if (!m_texture) { - // Generate the texture object - m_texture = createTextureObject(target); - // Generate the framebuffer object - glGenFramebuffersEXT(1, &m_fbo); - // Generate the depth buffer - glGenRenderbuffersEXT(1, &m_depthBuffer); - } - - // Reallocate the color and depth buffers - glBindTexture(target, m_texture); - glTexImage2D(target, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); - glBindTexture(target, 0); - - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); - m_boundFBO = m_fbo; - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_depthBuffer); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, width, height); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0); - - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, target, m_texture, 0); - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_depthBuffer); - GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - printf("GraphicsContext3D: framebuffer was incomplete\n"); - - // FIXME: cleanup. - notImplemented(); - } -#endif // RENDER_TO_DEBUGGING_WINDOW - -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - if (m_scanline) { - delete[] m_scanline; - m_scanline = 0; - } - m_scanline = new unsigned char[width * 4]; -#endif // FLIP_FRAMEBUFFER_VERTICALLY - - glClear(GL_COLOR_BUFFER_BIT); - -#if PLATFORM(CG) - // Need to reallocate the client-side backing store. - // FIXME: make this more efficient. - if (m_renderOutput) { - delete[] m_renderOutput; - m_renderOutput = 0; - } - int rowBytes = width * 4; - m_renderOutput = new unsigned char[height * rowBytes]; -#endif // PLATFORM(CG) -} - -#ifdef FLIP_FRAMEBUFFER_VERTICALLY -void GraphicsContext3DInternal::flipVertically(unsigned char* framebuffer, - unsigned int width, - unsigned int height) -{ - unsigned char* scanline = m_scanline; - if (!scanline) - return; - unsigned int rowBytes = width * 4; - unsigned int count = height / 2; - for (unsigned int i = 0; i < count; i++) { - unsigned char* rowA = framebuffer + i * rowBytes; - unsigned char* rowB = framebuffer + (height - i - 1) * rowBytes; - // FIXME: this is where the multiplication of the alpha - // channel into the color buffer will need to occur if the - // user specifies the "premultiplyAlpha" flag in the context - // creation attributes. - memcpy(scanline, rowB, rowBytes); - memcpy(rowB, rowA, rowBytes); - memcpy(rowA, scanline, rowBytes); - } + return 0; } -#endif void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context) { - makeContextCurrent(); - -#ifdef RENDER_TO_DEBUGGING_WINDOW - SwapBuffers(m_canvasDC); -#else - // Earlier versions of this code used the GPU to flip the - // framebuffer vertically before reading it back for compositing - // via software. This code was quite complicated, used a lot of - // GPU memory, and didn't provide an obvious speedup. Since this - // vertical flip is only a temporary solution anyway until Chrome - // is fully GPU composited, it wasn't worth the complexity. - HTMLCanvasElement* canvas = context->canvas(); ImageBuffer* imageBuffer = canvas->buffer(); unsigned char* pixels = 0; - bool mustRestoreFBO = (m_boundFBO != m_fbo); - if (mustRestoreFBO) - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); #if PLATFORM(SKIA) const SkBitmap* canvasBitmap = imageBuffer->context()->platformContext()->bitmap(); const SkBitmap* readbackBitmap = 0; ASSERT(canvasBitmap->config() == SkBitmap::kARGB_8888_Config); - if (canvasBitmap->width() == m_cachedWidth && canvasBitmap->height() == m_cachedHeight) { + if (canvasBitmap->width() == m_impl->width() && canvasBitmap->height() == m_impl->height()) { // This is the fastest and most common case. We read back // directly into the canvas's backing store. readbackBitmap = canvasBitmap; - if (m_resizingBitmap) { - delete m_resizingBitmap; - m_resizingBitmap = 0; - } + m_resizingBitmap.reset(); } else { // We need to allocate a temporary bitmap for reading back the // pixel data. We will then use Skia to rescale this bitmap to // the size of the canvas's backing store. - if (m_resizingBitmap && (m_resizingBitmap->width() != m_cachedWidth || m_resizingBitmap->height() != m_cachedHeight)) { - delete m_resizingBitmap; - m_resizingBitmap = 0; - } - if (!m_resizingBitmap) { - m_resizingBitmap = new SkBitmap(); - m_resizingBitmap->setConfig(SkBitmap::kARGB_8888_Config, - m_cachedWidth, - m_cachedHeight); - if (!m_resizingBitmap->allocPixels()) { - delete m_resizingBitmap; - m_resizingBitmap = 0; + if (m_resizingBitmap.width() != m_impl->width() || m_resizingBitmap.height() != m_impl->height()) { + m_resizingBitmap.setConfig(SkBitmap::kARGB_8888_Config, + m_impl->width(), + m_impl->height()); + if (!m_resizingBitmap.allocPixels()) { return; } } - readbackBitmap = m_resizingBitmap; + readbackBitmap = &m_resizingBitmap; } // Read back the frame buffer. SkAutoLockPixels bitmapLock(*readbackBitmap); pixels = static_cast<unsigned char*>(readbackBitmap->getPixels()); - glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_BGRA, GL_UNSIGNED_BYTE, pixels); #elif PLATFORM(CG) - if (m_renderOutput) { + if (m_renderOutput) pixels = m_renderOutput; - glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pixels); - } #else #error Must port to your platform #endif - if (mustRestoreFBO) - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); - -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - if (pixels) - flipVertically(pixels, m_cachedWidth, m_cachedHeight); -#endif + m_impl->readBackFramebuffer(pixels, 4 * m_impl->width() * m_impl->height()); #if PLATFORM(SKIA) - if (m_resizingBitmap) { + if (m_resizingBitmap.readyToDraw()) { // We need to draw the resizing bitmap into the canvas's backing store. SkCanvas canvas(*canvasBitmap); SkRect dst; - dst.set(0, 0, canvasBitmap->width(), canvasBitmap->height()); - canvas.drawBitmapRect(*m_resizingBitmap, 0, dst); + dst.set(SkIntToScalar(0), SkIntToScalar(0), canvasBitmap->width(), canvasBitmap->height()); + canvas.drawBitmapRect(m_resizingBitmap, 0, dst); } #elif PLATFORM(CG) if (m_renderOutput) { - int rowBytes = m_cachedWidth * 4; - CGDataProviderRef dataProvider = CGDataProviderCreateWithData(0, m_renderOutput, rowBytes * m_cachedHeight, 0); + int rowBytes = m_impl->width() * 4; + CGDataProviderRef dataProvider = CGDataProviderCreateWithData(0, m_renderOutput, rowBytes * m_impl->height(), 0); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - CGImageRef cgImage = CGImageCreate(m_cachedWidth, - m_cachedHeight, + CGImageRef cgImage = CGImageCreate(m_impl->width(), + m_impl->height(), 8, 32, rowBytes, @@ -861,1017 +442,766 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context) #else #error Must port to your platform #endif - -#endif // RENDER_TO_DEBUGGING_WINDOW } -void GraphicsContext3DInternal::activeTexture(unsigned long texture) +void GraphicsContext3DInternal::endPaint() { - // FIXME: query number of textures available. - if (texture < GL_TEXTURE0 || texture > GL_TEXTURE0+32) - // FIXME: raise exception. - return; - - makeContextCurrent(); - glActiveTexture(texture); } -void GraphicsContext3DInternal::bindBuffer(unsigned long target, - WebGLBuffer* buffer) -{ - makeContextCurrent(); - GLuint bufID = EXTRACT(buffer); - if (target == GL_ARRAY_BUFFER) - m_boundArrayBuffer = bufID; - glBindBuffer(target, bufID); -} - -void GraphicsContext3DInternal::bindFramebuffer(unsigned long target, - WebGLFramebuffer* framebuffer) -{ - makeContextCurrent(); - GLuint id = EXTRACT(framebuffer); - if (!id) - id = m_fbo; - glBindFramebufferEXT(target, id); - m_boundFBO = id; -} - -// If we didn't have to hack GL_TEXTURE_WRAP_R for cube maps, -// we could just use: -// GL_SAME_METHOD_2_X2(BindTexture, bindTexture, unsigned long, WebGLTexture*) -void GraphicsContext3DInternal::bindTexture(unsigned long target, - WebGLTexture* texture) +void GraphicsContext3DInternal::reshape(int width, int height) { - makeContextCurrent(); - unsigned int textureObject = EXTRACT(texture); + if (width == m_impl->width() && height == m_impl->height()) + return; - glBindTexture(target, textureObject); + m_impl->reshape(width, height); - // FIXME: GL_TEXTURE_WRAP_R isn't exposed in the OpenGL ES 2.0 - // API. On desktop OpenGL implementations it seems necessary to - // set this wrap mode to GL_CLAMP_TO_EDGE to get correct behavior - // of cube maps. - if (texture) { - if (target == GL_TEXTURE_CUBE_MAP) { - if (!texture->isCubeMapRWrapModeInitialized()) { - glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); - texture->setCubeMapRWrapModeInitialized(true); - } - } else - texture->setCubeMapRWrapModeInitialized(false); +#if PLATFORM(CG) + // Need to reallocate the client-side backing store. + // FIXME: make this more efficient. + if (m_renderOutput) { + delete[] m_renderOutput; + m_renderOutput = 0; } + int rowBytes = width * 4; + m_renderOutput = new unsigned char[height * rowBytes]; +#endif // PLATFORM(CG) } -void GraphicsContext3DInternal::bufferDataImpl(unsigned long target, int size, const void* data, unsigned long usage) -{ - makeContextCurrent(); - // FIXME: make this verification more efficient. - GLint binding = 0; - GLenum binding_target = GL_ARRAY_BUFFER_BINDING; - if (target == GL_ELEMENT_ARRAY_BUFFER) - binding_target = GL_ELEMENT_ARRAY_BUFFER_BINDING; - glGetIntegerv(binding_target, &binding); - if (binding <= 0) { - // FIXME: raise exception. - // LogMessagef(("bufferData: no buffer bound")); - return; - } +// Macros to assist in delegating from GraphicsContext3DInternal to +// WebGraphicsContext3D. - glBufferData(target, - size, - data, - usage); +#define DELEGATE_TO_IMPL(name) \ +void GraphicsContext3DInternal::name() \ +{ \ + m_impl->name(); \ } -void GraphicsContext3DInternal::disableVertexAttribArray(unsigned long index) -{ - makeContextCurrent(); - if (index < NumTrackedPointerStates) - m_vertexAttribPointerState[index].enabled = false; - glDisableVertexAttribArray(index); +#define DELEGATE_TO_IMPL_R(name, rt) \ +rt GraphicsContext3DInternal::name() \ +{ \ + return m_impl->name(); \ } -void GraphicsContext3DInternal::enableVertexAttribArray(unsigned long index) -{ - makeContextCurrent(); - if (index < NumTrackedPointerStates) - m_vertexAttribPointerState[index].enabled = true; - glEnableVertexAttribArray(index); +#define DELEGATE_TO_IMPL_1(name, t1) \ +void GraphicsContext3DInternal::name(t1 a1) \ +{ \ + m_impl->name(a1); \ } -unsigned long GraphicsContext3DInternal::getError() -{ - if (m_syntheticErrors.size() > 0) { - ListHashSet<unsigned long>::iterator iter = m_syntheticErrors.begin(); - unsigned long err = *iter; - m_syntheticErrors.remove(iter); - return err; - } - - makeContextCurrent(); - return glGetError(); +#define DELEGATE_TO_IMPL_1_X(name, t1) \ +void GraphicsContext3DInternal::name(t1 a1) \ +{ \ + m_impl->name(EXTRACT(a1)); \ } -GraphicsContext3D::Attributes GraphicsContext3DInternal::getContextAttributes() -{ - return m_attrs; +#define DELEGATE_TO_IMPL_1R(name, t1, rt) \ +rt GraphicsContext3DInternal::name(t1 a1) \ +{ \ + return m_impl->name(a1); \ } -void GraphicsContext3DInternal::vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, - unsigned long stride, unsigned long offset) -{ - makeContextCurrent(); - - if (m_boundArrayBuffer <= 0) { - // FIXME: raise exception. - // LogMessagef(("bufferData: no buffer bound")); - return; - } - - if (indx < NumTrackedPointerStates) { - VertexAttribPointerState& state = m_vertexAttribPointerState[indx]; - state.buffer = m_boundArrayBuffer; - state.indx = indx; - state.size = size; - state.type = type; - state.normalized = normalized; - state.stride = stride; - state.offset = offset; - } - - glVertexAttribPointer(indx, size, type, normalized, stride, - reinterpret_cast<void*>(static_cast<intptr_t>(offset))); +#define DELEGATE_TO_IMPL_1R_X(name, t1, rt) \ +rt GraphicsContext3DInternal::name(t1 a1) \ +{ \ + return m_impl->name(EXTRACT(a1)); \ } -void GraphicsContext3DInternal::viewportImpl(long x, long y, unsigned long width, unsigned long height) -{ - glViewport(x, y, width, height); +#define DELEGATE_TO_IMPL_2(name, t1, t2) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2) \ +{ \ + m_impl->name(a1, a2); \ } -void GraphicsContext3DInternal::synthesizeGLError(unsigned long error) -{ - m_syntheticErrors.add(error); +#define DELEGATE_TO_IMPL_2_X12(name, t1, t2) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2) \ +{ \ + m_impl->name(EXTRACT(a1), EXTRACT(a2)); \ } -// GraphicsContext3D ----------------------------------------------------- - -/* Helper macros for when we're just wrapping a gl method, so that - * we can avoid having to type this 500 times. Note that these MUST - * NOT BE USED if we need to check any of the parameters. - */ - -#define GL_SAME_METHOD_0(glname, name) \ -void GraphicsContext3D::name() \ -{ \ - makeContextCurrent(); \ - gl##glname(); \ +#define DELEGATE_TO_IMPL_2_X2(name, t1, t2) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2) \ +{ \ + m_impl->name(a1, EXTRACT(a2)); \ } -#define GL_SAME_METHOD_1(glname, name, t1) \ -void GraphicsContext3D::name(t1 a1) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1); \ +#define DELEGATE_TO_IMPL_2R(name, t1, t2, rt) \ +rt GraphicsContext3DInternal::name(t1 a1, t2 a2) \ +{ \ + return m_impl->name(a1, a2); \ } -#define GL_SAME_METHOD_1_X(glname, name, t1) \ -void GraphicsContext3D::name(t1 a1) \ -{ \ - makeContextCurrent(); \ - gl##glname(EXTRACT(a1)); \ +#define DELEGATE_TO_IMPL_3(name, t1, t2, t3) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3) \ +{ \ + m_impl->name(a1, a2, a3); \ } -#define GL_SAME_METHOD_2(glname, name, t1, t2) \ -void GraphicsContext3D::name(t1 a1, t2 a2) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2); \ +#define DELEGATE_TO_IMPL_3_X1(name, t1, t2, t3) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3) \ +{ \ + m_impl->name(EXTRACT(a1), a2, a3); \ } -#define GL_SAME_METHOD_2_X12(glname, name, t1, t2) \ -void GraphicsContext3D::name(t1 a1, t2 a2) \ -{ \ - makeContextCurrent(); \ - gl##glname(EXTRACT(a1), EXTRACT(a2)); \ +#define DELEGATE_TO_IMPL_3R(name, t1, t2, t3, rt) \ +rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3) \ +{ \ + return m_impl->name(a1, a2, a3); \ } -#define GL_SAME_METHOD_2_X2(glname, name, t1, t2) \ -void GraphicsContext3D::name(t1 a1, t2 a2) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, EXTRACT(a2)); \ +#define DELEGATE_TO_IMPL_4(name, t1, t2, t3, t4) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4) \ +{ \ + m_impl->name(a1, a2, a3, a4); \ } -#define GL_SAME_METHOD_3(glname, name, t1, t2, t3) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3); \ +#define DELEGATE_TO_IMPL_4_X4(name, t1, t2, t3, t4) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4) \ +{ \ + m_impl->name(a1, a2, a3, EXTRACT(a4)); \ } -#define GL_SAME_METHOD_3_X12(glname, name, t1, t2, t3) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3) \ -{ \ - makeContextCurrent(); \ - gl##glname(EXTRACT(a1), EXTRACT(a2), a3); \ +#define DELEGATE_TO_IMPL_5(name, t1, t2, t3, t4, t5) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ +{ \ + m_impl->name(a1, a2, a3, a4, a5); \ } -#define GL_SAME_METHOD_3_X2(glname, name, t1, t2, t3) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, EXTRACT(a2), a3); \ +#define DELEGATE_TO_IMPL_5_X4(name, t1, t2, t3, t4, t5) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ +{ \ + m_impl->name(a1, a2, a3, EXTRACT(a4), a5); \ } -#define GL_SAME_METHOD_4(glname, name, t1, t2, t3, t4) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4); \ +#define DELEGATE_TO_IMPL_5R(name, t1, t2, t3, t4, t5, rt) \ +rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ +{ \ + return m_impl->name(a1, a2, a3, a4, a5); \ } -#define GL_SAME_METHOD_4_X4(glname, name, t1, t2, t3, t4) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, EXTRACT(a4)); \ +#define DELEGATE_TO_IMPL_6(name, t1, t2, t3, t4, t5, t6) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ +{ \ + m_impl->name(a1, a2, a3, a4, a5, a6); \ } -#define GL_SAME_METHOD_5(glname, name, t1, t2, t3, t4, t5) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4, a5); \ +#define DELEGATE_TO_IMPL_6R(name, t1, t2, t3, t4, t5, t6, rt) \ +rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ +{ \ + return m_impl->name(a1, a2, a3, a4, a5, a6); \ } -#define GL_SAME_METHOD_5_X4(glname, name, t1, t2, t3, t4, t5) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, EXTRACT(a4), a5); \ +#define DELEGATE_TO_IMPL_7(name, t1, t2, t3, t4, t5, t6, t7) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ +{ \ + m_impl->name(a1, a2, a3, a4, a5, a6, a7); \ } -#define GL_SAME_METHOD_6(glname, name, t1, t2, t3, t4, t5, t6) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4, a5, a6); \ +#define DELEGATE_TO_IMPL_7R(name, t1, t2, t3, t4, t5, t6, t7, rt) \ +rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ +{ \ + return m_impl->name(a1, a2, a3, a4, a5, a6, a7); \ } -#define GL_SAME_METHOD_8(glname, name, t1, t2, t3, t4, t5, t6, t7, t8) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4, a5, a6, a7, a8); \ +#define DELEGATE_TO_IMPL_8(name, t1, t2, t3, t4, t5, t6, t7, t8) \ +void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8) \ +{ \ + m_impl->name(a1, a2, a3, a4, a5, a6, a7, a8); \ } -PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs) -{ - PassOwnPtr<GraphicsContext3D> context = new GraphicsContext3D(attrs); - // FIXME: add error checking - return context; +#define DELEGATE_TO_IMPL_9R(name, t1, t2, t3, t4, t5, t6, t7, t8, t9, rt) \ +rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9) \ +{ \ + return m_impl->name(a1, a2, a3, a4, a5, a6, a7, a8, a9); \ } -GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attrs) - : m_currentWidth(0) - , m_currentHeight(0) - , m_internal(new GraphicsContext3DInternal(attrs)) -{ -} +DELEGATE_TO_IMPL_R(makeContextCurrent, bool) +DELEGATE_TO_IMPL_1R(sizeInBytes, int, int) -GraphicsContext3D::~GraphicsContext3D() -{ -} +DELEGATE_TO_IMPL_1(activeTexture, unsigned long) +DELEGATE_TO_IMPL_2_X12(attachShader, WebGLProgram*, WebGLShader*) -PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D() const +void GraphicsContext3DInternal::bindAttribLocation(WebGLProgram* program, unsigned long index, const String& name) { - return m_internal->platformGraphicsContext3D(); + m_impl->bindAttribLocation(EXTRACT(program), index, name.utf8().data()); } -Platform3DObject GraphicsContext3D::platformTexture() const -{ - return m_internal->platformTexture(); -} +DELEGATE_TO_IMPL_2_X2(bindBuffer, unsigned long, WebGLBuffer*) +DELEGATE_TO_IMPL_2_X2(bindFramebuffer, unsigned long, WebGLFramebuffer*) +DELEGATE_TO_IMPL_2_X2(bindRenderbuffer, unsigned long, WebGLRenderbuffer*) -void GraphicsContext3D::makeContextCurrent() -{ - m_internal->makeContextCurrent(); -} +static const int kTextureWrapR = 0x8072; -void GraphicsContext3D::reshape(int width, int height) +// If we didn't have to hack GL_TEXTURE_WRAP_R for cube maps, +// we could just use: +// DELEGATE_TO_IMPL_2_X2(bindTexture, unsigned long, WebGLTexture*) +void GraphicsContext3DInternal::bindTexture(unsigned long target, + WebGLTexture* texture) { - if (width == m_currentWidth && height == m_currentHeight) - return; + unsigned int textureObject = EXTRACT(texture); - m_currentWidth = width; - m_currentHeight = height; + m_impl->bindTexture(target, textureObject); - m_internal->reshape(width, height); + // FIXME: GL_TEXTURE_WRAP_R isn't exposed in the OpenGL ES 2.0 + // API. On desktop OpenGL implementations it seems necessary to + // set this wrap mode to GL_CLAMP_TO_EDGE to get correct behavior + // of cube maps. + if (texture) + if (target == GraphicsContext3D::TEXTURE_CUBE_MAP) { + if (!texture->isCubeMapRWrapModeInitialized()) { + m_impl->texParameteri(GraphicsContext3D::TEXTURE_CUBE_MAP, kTextureWrapR, GraphicsContext3D::CLAMP_TO_EDGE); + texture->setCubeMapRWrapModeInitialized(true); + } + } else + texture->setCubeMapRWrapModeInitialized(false); } -void GraphicsContext3D::beginPaint(WebGLRenderingContext* context) -{ - m_internal->beginPaint(context); -} +DELEGATE_TO_IMPL_4(blendColor, double, double, double, double) +DELEGATE_TO_IMPL_1(blendEquation, unsigned long) +DELEGATE_TO_IMPL_2(blendEquationSeparate, unsigned long, unsigned long) +DELEGATE_TO_IMPL_2(blendFunc, unsigned long, unsigned long) +DELEGATE_TO_IMPL_4(blendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long) -void GraphicsContext3D::endPaint() +void GraphicsContext3DInternal::bufferData(unsigned long target, int size, unsigned long usage) { + m_impl->bufferData(target, size, 0, usage); } -int GraphicsContext3D::sizeInBytes(int type) +void GraphicsContext3DInternal::bufferData(unsigned long target, WebGLArray* array, unsigned long usage) { - switch (type) { - case GL_BYTE: - return sizeof(GLbyte); - case GL_UNSIGNED_BYTE: - return sizeof(GLubyte); - case GL_SHORT: - return sizeof(GLshort); - case GL_UNSIGNED_SHORT: - return sizeof(GLushort); - case GL_INT: - return sizeof(GLint); - case GL_UNSIGNED_INT: - return sizeof(GLuint); - case GL_FLOAT: - return sizeof(GLfloat); - default: // FIXME: default cases are discouraged in WebKit. - return 0; - } + m_impl->bufferData(target, array->byteLength(), array->baseAddress(), usage); } -unsigned GraphicsContext3D::createBuffer() +void GraphicsContext3DInternal::bufferSubData(unsigned long target, long offset, WebGLArray* array) { - makeContextCurrent(); - GLuint o; - glGenBuffers(1, &o); - return o; + m_impl->bufferSubData(target, offset, array->byteLength(), array->baseAddress()); } -unsigned GraphicsContext3D::createFramebuffer() -{ - makeContextCurrent(); - GLuint o = 0; - glGenFramebuffersEXT(1, &o); - return o; -} +DELEGATE_TO_IMPL_1R(checkFramebufferStatus, unsigned long, unsigned long) +DELEGATE_TO_IMPL_1(clear, unsigned long) +DELEGATE_TO_IMPL_4(clearColor, double, double, double, double) +DELEGATE_TO_IMPL_1(clearDepth, double) +DELEGATE_TO_IMPL_1(clearStencil, long) +DELEGATE_TO_IMPL_4(colorMask, bool, bool, bool, bool) +DELEGATE_TO_IMPL_1_X(compileShader, WebGLShader*) -unsigned GraphicsContext3D::createProgram() -{ - makeContextCurrent(); - return glCreateProgram(); -} +DELEGATE_TO_IMPL_8(copyTexImage2D, unsigned long, long, unsigned long, long, long, unsigned long, unsigned long, long) +DELEGATE_TO_IMPL_8(copyTexSubImage2D, unsigned long, long, long, long, long, long, unsigned long, unsigned long) +DELEGATE_TO_IMPL_1(cullFace, unsigned long) +DELEGATE_TO_IMPL_1(depthFunc, unsigned long) +DELEGATE_TO_IMPL_1(depthMask, bool) +DELEGATE_TO_IMPL_2(depthRange, double, double) +DELEGATE_TO_IMPL_2_X12(detachShader, WebGLProgram*, WebGLShader*) +DELEGATE_TO_IMPL_1(disable, unsigned long) +DELEGATE_TO_IMPL_1(disableVertexAttribArray, unsigned long) +DELEGATE_TO_IMPL_3(drawArrays, unsigned long, long, long) +DELEGATE_TO_IMPL_4(drawElements, unsigned long, unsigned long, unsigned long, long) -unsigned GraphicsContext3D::createRenderbuffer() -{ - makeContextCurrent(); - GLuint o; - glGenRenderbuffersEXT(1, &o); - return o; -} +DELEGATE_TO_IMPL_1(enable, unsigned long) +DELEGATE_TO_IMPL_1(enableVertexAttribArray, unsigned long) +DELEGATE_TO_IMPL(finish) +DELEGATE_TO_IMPL(flush) +DELEGATE_TO_IMPL_4_X4(framebufferRenderbuffer, unsigned long, unsigned long, unsigned long, WebGLRenderbuffer*) +DELEGATE_TO_IMPL_5_X4(framebufferTexture2D, unsigned long, unsigned long, unsigned long, WebGLTexture*, long) +DELEGATE_TO_IMPL_1(frontFace, unsigned long) +DELEGATE_TO_IMPL_1(generateMipmap, unsigned long) -unsigned GraphicsContext3D::createShader(unsigned long type) +bool GraphicsContext3DInternal::getActiveAttrib(WebGLProgram* program, unsigned long index, ActiveInfo& info) { - makeContextCurrent(); - return glCreateShader((type == FRAGMENT_SHADER) ? GL_FRAGMENT_SHADER : GL_VERTEX_SHADER); + WebKit::WebGraphicsContext3D::ActiveInfo webInfo; + if (!m_impl->getActiveAttrib(EXTRACT(program), index, webInfo)) + return false; + info.name = webInfo.name; + info.type = webInfo.type; + info.size = webInfo.size; + return true; } -unsigned GraphicsContext3D::createTexture() +bool GraphicsContext3DInternal::getActiveUniform(WebGLProgram* program, unsigned long index, ActiveInfo& info) { - makeContextCurrent(); - GLuint o; - glGenTextures(1, &o); - return o; + WebKit::WebGraphicsContext3D::ActiveInfo webInfo; + if (!m_impl->getActiveUniform(EXTRACT(program), index, webInfo)) + return false; + info.name = webInfo.name; + info.type = webInfo.type; + info.size = webInfo.size; + return true; } -void GraphicsContext3D::deleteBuffer(unsigned buffer) +int GraphicsContext3DInternal::getAttribLocation(WebGLProgram* program, const String& name) { - makeContextCurrent(); - glDeleteBuffers(1, &buffer); + return m_impl->getAttribLocation(EXTRACT(program), name.utf8().data()); } -void GraphicsContext3D::deleteFramebuffer(unsigned framebuffer) -{ - makeContextCurrent(); - glDeleteFramebuffersEXT(1, &framebuffer); -} +DELEGATE_TO_IMPL_2(getBooleanv, unsigned long, unsigned char*) -void GraphicsContext3D::deleteProgram(unsigned program) -{ - makeContextCurrent(); - glDeleteProgram(program); -} +DELEGATE_TO_IMPL_3(getBufferParameteriv, unsigned long, unsigned long, int*) -void GraphicsContext3D::deleteRenderbuffer(unsigned renderbuffer) +GraphicsContext3D::Attributes GraphicsContext3DInternal::getContextAttributes() { - makeContextCurrent(); - glDeleteRenderbuffersEXT(1, &renderbuffer); + WebKit::WebGraphicsContext3D::Attributes webAttributes = m_impl->getContextAttributes(); + GraphicsContext3D::Attributes attributes; + attributes.alpha = webAttributes.alpha; + attributes.depth = webAttributes.depth; + attributes.stencil = webAttributes.stencil; + attributes.antialias = webAttributes.antialias; + attributes.premultipliedAlpha = webAttributes.premultipliedAlpha; + return attributes; } -void GraphicsContext3D::deleteShader(unsigned shader) -{ - makeContextCurrent(); - glDeleteShader(shader); -} +DELEGATE_TO_IMPL_R(getError, unsigned long) -void GraphicsContext3D::deleteTexture(unsigned texture) -{ - makeContextCurrent(); - glDeleteTextures(1, &texture); -} +DELEGATE_TO_IMPL_2(getFloatv, unsigned long, float*) + +DELEGATE_TO_IMPL_4(getFramebufferAttachmentParameteriv, unsigned long, unsigned long, unsigned long, int*) -void GraphicsContext3D::activeTexture(unsigned long texture) +DELEGATE_TO_IMPL_2(getIntegerv, unsigned long, int*) + +DELEGATE_TO_IMPL_3_X1(getProgramiv, WebGLProgram*, unsigned long, int*) + +String GraphicsContext3DInternal::getProgramInfoLog(WebGLProgram* program) { - m_internal->activeTexture(texture); + return m_impl->getProgramInfoLog(EXTRACT(program)); } -GL_SAME_METHOD_2_X12(AttachShader, attachShader, WebGLProgram*, WebGLShader*) +DELEGATE_TO_IMPL_3(getRenderbufferParameteriv, unsigned long, unsigned long, int*) -void GraphicsContext3D::bindAttribLocation(WebGLProgram* program, - unsigned long index, - const String& name) +DELEGATE_TO_IMPL_3_X1(getShaderiv, WebGLShader*, unsigned long, int*) + +String GraphicsContext3DInternal::getShaderInfoLog(WebGLShader* shader) { - if (!program) - return; - makeContextCurrent(); - glBindAttribLocation(EXTRACT(program), index, name.utf8().data()); + return m_impl->getShaderInfoLog(EXTRACT(shader)); } -void GraphicsContext3D::bindBuffer(unsigned long target, - WebGLBuffer* buffer) +String GraphicsContext3DInternal::getShaderSource(WebGLShader* shader) { - m_internal->bindBuffer(target, buffer); + return m_impl->getShaderSource(EXTRACT(shader)); } -void GraphicsContext3D::bindFramebuffer(unsigned long target, WebGLFramebuffer* framebuffer) +String GraphicsContext3DInternal::getString(unsigned long name) { - m_internal->bindFramebuffer(target, framebuffer); + return m_impl->getString(name); } -GL_SAME_METHOD_2_X2(BindRenderbufferEXT, bindRenderbuffer, unsigned long, WebGLRenderbuffer*) +DELEGATE_TO_IMPL_3(getTexParameterfv, unsigned long, unsigned long, float*) +DELEGATE_TO_IMPL_3(getTexParameteriv, unsigned long, unsigned long, int*) -// If we didn't have to hack GL_TEXTURE_WRAP_R for cube maps, -// we could just use: -// GL_SAME_METHOD_2_X2(BindTexture, bindTexture, unsigned long, WebGLTexture*) -void GraphicsContext3D::bindTexture(unsigned long target, - WebGLTexture* texture) +DELEGATE_TO_IMPL_3_X1(getUniformfv, WebGLProgram*, long, float*) +DELEGATE_TO_IMPL_3_X1(getUniformiv, WebGLProgram*, long, int*) + +long GraphicsContext3DInternal::getUniformLocation(WebGLProgram* program, const String& name) { - m_internal->bindTexture(target, texture); + return m_impl->getUniformLocation(EXTRACT(program), name.utf8().data()); } -GL_SAME_METHOD_4(BlendColor, blendColor, double, double, double, double) - -GL_SAME_METHOD_1(BlendEquation, blendEquation, unsigned long) +DELEGATE_TO_IMPL_3(getVertexAttribfv, unsigned long, unsigned long, float*) +DELEGATE_TO_IMPL_3(getVertexAttribiv, unsigned long, unsigned long, int*) -GL_SAME_METHOD_2(BlendEquationSeparate, blendEquationSeparate, unsigned long, unsigned long) +DELEGATE_TO_IMPL_2R(getVertexAttribOffset, unsigned long, unsigned long, long) -GL_SAME_METHOD_2(BlendFunc, blendFunc, unsigned long, unsigned long) +DELEGATE_TO_IMPL_2(hint, unsigned long, unsigned long) +DELEGATE_TO_IMPL_1R_X(isBuffer, WebGLBuffer*, bool) +DELEGATE_TO_IMPL_1R(isEnabled, unsigned long, bool) +DELEGATE_TO_IMPL_1R_X(isFramebuffer, WebGLFramebuffer*, bool) +DELEGATE_TO_IMPL_1R_X(isProgram, WebGLProgram*, bool) +DELEGATE_TO_IMPL_1R_X(isRenderbuffer, WebGLRenderbuffer*, bool) +DELEGATE_TO_IMPL_1R_X(isShader, WebGLShader*, bool) +DELEGATE_TO_IMPL_1R_X(isTexture, WebGLTexture*, bool) +DELEGATE_TO_IMPL_1(lineWidth, double) +DELEGATE_TO_IMPL_1_X(linkProgram, WebGLProgram*) +DELEGATE_TO_IMPL_2(pixelStorei, unsigned long, long) +DELEGATE_TO_IMPL_2(polygonOffset, double, double) +DELEGATE_TO_IMPL_7(readPixels, long, long, unsigned long, unsigned long, unsigned long, unsigned long, void*) +DELEGATE_TO_IMPL(releaseShaderCompiler) +DELEGATE_TO_IMPL_4(renderbufferStorage, unsigned long, unsigned long, unsigned long, unsigned long) +DELEGATE_TO_IMPL_2(sampleCoverage, double, bool) +DELEGATE_TO_IMPL_4(scissor, long, long, unsigned long, unsigned long) -GL_SAME_METHOD_4(BlendFuncSeparate, blendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long) - -void GraphicsContext3D::bufferData(unsigned long target, int size, unsigned long usage) +void GraphicsContext3DInternal::shaderSource(WebGLShader* shader, const String& string) { - m_internal->bufferDataImpl(target, size, 0, usage); + m_impl->shaderSource(EXTRACT(shader), string.utf8().data()); } -void GraphicsContext3D::bufferData(unsigned long target, WebGLArray* array, unsigned long usage) +DELEGATE_TO_IMPL_3(stencilFunc, unsigned long, long, unsigned long) +DELEGATE_TO_IMPL_4(stencilFuncSeparate, unsigned long, unsigned long, long, unsigned long) +DELEGATE_TO_IMPL_1(stencilMask, unsigned long) +DELEGATE_TO_IMPL_2(stencilMaskSeparate, unsigned long, unsigned long) +DELEGATE_TO_IMPL_3(stencilOp, unsigned long, unsigned long, unsigned long) +DELEGATE_TO_IMPL_4(stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long) + +int GraphicsContext3DInternal::texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels) { - m_internal->bufferDataImpl(target, array->byteLength(), array->baseAddress(), usage); + m_impl->texImage2D(target, level, internalformat, width, height, border, format, type, pixels); + return 0; } -void GraphicsContext3D::bufferSubData(unsigned long target, long offset, WebGLArray* array) -{ - if (!array || !array->length()) - return; +DELEGATE_TO_IMPL_3(texParameterf, unsigned, unsigned, float) +DELEGATE_TO_IMPL_3(texParameteri, unsigned, unsigned, int) - makeContextCurrent(); - // FIXME: make this verification more efficient. - GLint binding = 0; - GLenum binding_target = GL_ARRAY_BUFFER_BINDING; - if (target == GL_ELEMENT_ARRAY_BUFFER) - binding_target = GL_ELEMENT_ARRAY_BUFFER_BINDING; - glGetIntegerv(binding_target, &binding); - if (binding <= 0) { - // FIXME: raise exception. - // LogMessagef(("bufferSubData: no buffer bound")); - return; - } - glBufferSubData(target, offset, array->byteLength(), array->baseAddress()); +int GraphicsContext3DInternal::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, void* pixels) +{ + m_impl->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + return 0; } -unsigned long GraphicsContext3D::checkFramebufferStatus(unsigned long target) +DELEGATE_TO_IMPL_2(uniform1f, long, float) + +void GraphicsContext3DInternal::uniform1fv(long location, float* v, int size) { - makeContextCurrent(); - return glCheckFramebufferStatusEXT(target); + m_impl->uniform1fv(location, size, v); } -GL_SAME_METHOD_1(Clear, clear, unsigned long) - -GL_SAME_METHOD_4(ClearColor, clearColor, double, double, double, double) +DELEGATE_TO_IMPL_2(uniform1i, long, int) -GL_SAME_METHOD_1(ClearDepth, clearDepth, double) +void GraphicsContext3DInternal::uniform1iv(long location, int* v, int size) +{ + m_impl->uniform1iv(location, size, v); +} -GL_SAME_METHOD_1(ClearStencil, clearStencil, long) +DELEGATE_TO_IMPL_3(uniform2f, long, float, float) -GL_SAME_METHOD_4(ColorMask, colorMask, bool, bool, bool, bool) +void GraphicsContext3DInternal::uniform2fv(long location, float* v, int size) +{ + m_impl->uniform2fv(location, size, v); +} -GL_SAME_METHOD_1_X(CompileShader, compileShader, WebGLShader*) +DELEGATE_TO_IMPL_3(uniform2i, long, int, int) -GL_SAME_METHOD_8(CopyTexImage2D, copyTexImage2D, unsigned long, long, unsigned long, long, long, unsigned long, unsigned long, long) +void GraphicsContext3DInternal::uniform2iv(long location, int* v, int size) +{ + m_impl->uniform2iv(location, size, v); +} -GL_SAME_METHOD_8(CopyTexSubImage2D, copyTexSubImage2D, unsigned long, long, long, long, long, long, unsigned long, unsigned long) +DELEGATE_TO_IMPL_4(uniform3f, long, float, float, float) -GL_SAME_METHOD_1(CullFace, cullFace, unsigned long) +void GraphicsContext3DInternal::uniform3fv(long location, float* v, int size) +{ + m_impl->uniform3fv(location, size, v); +} -GL_SAME_METHOD_1(DepthFunc, depthFunc, unsigned long) +DELEGATE_TO_IMPL_4(uniform3i, long, int, int, int) -GL_SAME_METHOD_1(DepthMask, depthMask, bool) +void GraphicsContext3DInternal::uniform3iv(long location, int* v, int size) +{ + m_impl->uniform3iv(location, size, v); +} -GL_SAME_METHOD_2(DepthRange, depthRange, double, double) +DELEGATE_TO_IMPL_5(uniform4f, long, float, float, float, float) -void GraphicsContext3D::detachShader(WebGLProgram* program, WebGLShader* shader) +void GraphicsContext3DInternal::uniform4fv(long location, float* v, int size) { - if (!program || !shader) - return; - - makeContextCurrent(); - glDetachShader(EXTRACT(program), EXTRACT(shader)); + m_impl->uniform4fv(location, size, v); } -GL_SAME_METHOD_1(Disable, disable, unsigned long) +DELEGATE_TO_IMPL_5(uniform4i, long, int, int, int, int) -void GraphicsContext3D::disableVertexAttribArray(unsigned long index) +void GraphicsContext3DInternal::uniform4iv(long location, int* v, int size) { - m_internal->disableVertexAttribArray(index); + m_impl->uniform4iv(location, size, v); } -void GraphicsContext3D::drawArrays(unsigned long mode, long first, long count) +void GraphicsContext3DInternal::uniformMatrix2fv(long location, bool transpose, float* value, int size) { - switch (mode) { - case GL_TRIANGLES: - case GL_TRIANGLE_STRIP: - case GL_TRIANGLE_FAN: - case GL_POINTS: - case GL_LINE_STRIP: - case GL_LINE_LOOP: - case GL_LINES: - break; - default: // FIXME: default cases are discouraged in WebKit. - // FIXME: output log message, raise exception. - // LogMessage(NS_LITERAL_CSTRING("drawArrays: invalid mode")); - // return NS_ERROR_DOM_SYNTAX_ERR; - return; - } - - if (first+count < first || first+count < count) { - // FIXME: output log message, raise exception. - // LogMessage(NS_LITERAL_CSTRING("drawArrays: overflow in first+count")); - // return NS_ERROR_INVALID_ARG; - return; - } - - // FIXME: validate against currently bound buffer. - // if (!ValidateBuffers(first+count)) - // return NS_ERROR_INVALID_ARG; - - makeContextCurrent(); - glDrawArrays(mode, first, count); + m_impl->uniformMatrix2fv(location, size, transpose, value); } -void GraphicsContext3D::drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset) +void GraphicsContext3DInternal::uniformMatrix3fv(long location, bool transpose, float* value, int size) { - makeContextCurrent(); - // FIXME: make this verification more efficient. - GLint binding = 0; - GLenum binding_target = GL_ELEMENT_ARRAY_BUFFER_BINDING; - glGetIntegerv(binding_target, &binding); - if (binding <= 0) { - // FIXME: raise exception. - // LogMessagef(("bufferData: no buffer bound")); - return; - } - glDrawElements(mode, count, type, - reinterpret_cast<void*>(static_cast<intptr_t>(offset))); + m_impl->uniformMatrix3fv(location, size, transpose, value); } -GL_SAME_METHOD_1(Enable, enable, unsigned long) - -void GraphicsContext3D::enableVertexAttribArray(unsigned long index) +void GraphicsContext3DInternal::uniformMatrix4fv(long location, bool transpose, float* value, int size) { - m_internal->enableVertexAttribArray(index); + m_impl->uniformMatrix4fv(location, size, transpose, value); } -GL_SAME_METHOD_0(Finish, finish) +DELEGATE_TO_IMPL_1_X(useProgram, WebGLProgram*) +DELEGATE_TO_IMPL_1_X(validateProgram, WebGLProgram*) -GL_SAME_METHOD_0(Flush, flush) +DELEGATE_TO_IMPL_2(vertexAttrib1f, unsigned long, float) +DELEGATE_TO_IMPL_2(vertexAttrib1fv, unsigned long, float*) +DELEGATE_TO_IMPL_3(vertexAttrib2f, unsigned long, float, float) +DELEGATE_TO_IMPL_2(vertexAttrib2fv, unsigned long, float*) +DELEGATE_TO_IMPL_4(vertexAttrib3f, unsigned long, float, float, float) +DELEGATE_TO_IMPL_2(vertexAttrib3fv, unsigned long, float*) +DELEGATE_TO_IMPL_5(vertexAttrib4f, unsigned long, float, float, float, float) +DELEGATE_TO_IMPL_2(vertexAttrib4fv, unsigned long, float*) +DELEGATE_TO_IMPL_6(vertexAttribPointer, unsigned long, int, int, bool, unsigned long, unsigned long) -GL_SAME_METHOD_4_X4(FramebufferRenderbufferEXT, framebufferRenderbuffer, unsigned long, unsigned long, unsigned long, WebGLRenderbuffer*) +DELEGATE_TO_IMPL_4(viewport, long, long, unsigned long, unsigned long) -GL_SAME_METHOD_5_X4(FramebufferTexture2DEXT, framebufferTexture2D, unsigned long, unsigned long, unsigned long, WebGLTexture*, long) +DELEGATE_TO_IMPL_R(createBuffer, unsigned) +DELEGATE_TO_IMPL_R(createFramebuffer, unsigned) +DELEGATE_TO_IMPL_R(createProgram, unsigned) +DELEGATE_TO_IMPL_R(createRenderbuffer, unsigned) +DELEGATE_TO_IMPL_1R(createShader, unsigned long, unsigned) +DELEGATE_TO_IMPL_R(createTexture, unsigned) -GL_SAME_METHOD_1(FrontFace, frontFace, unsigned long) +DELEGATE_TO_IMPL_1(deleteBuffer, unsigned) +DELEGATE_TO_IMPL_1(deleteFramebuffer, unsigned) +DELEGATE_TO_IMPL_1(deleteProgram, unsigned) +DELEGATE_TO_IMPL_1(deleteRenderbuffer, unsigned) +DELEGATE_TO_IMPL_1(deleteShader, unsigned) +DELEGATE_TO_IMPL_1(deleteTexture, unsigned) -void GraphicsContext3D::generateMipmap(unsigned long target) -{ - makeContextCurrent(); - if (glGenerateMipmapEXT) - glGenerateMipmapEXT(target); - // FIXME: provide alternative code path? This will be unpleasant - // to implement if glGenerateMipmapEXT is not available -- it will - // require a texture readback and re-upload. -} +DELEGATE_TO_IMPL_1(synthesizeGLError, unsigned long) -bool GraphicsContext3D::getActiveAttrib(WebGLProgram* program, unsigned long index, ActiveInfo& info) -{ - if (!program) { - synthesizeGLError(INVALID_VALUE); - return false; - } - GLint maxNameLength = -1; - glGetProgramiv(EXTRACT(program), GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &maxNameLength); - if (maxNameLength < 0) - return false; - GLchar* name = 0; - if (!tryFastMalloc(maxNameLength * sizeof(GLchar)).getValue(name)) { - synthesizeGLError(OUT_OF_MEMORY); - return false; - } - GLsizei length = 0; - GLint size = -1; - GLenum type = 0; - glGetActiveAttrib(EXTRACT(program), index, maxNameLength, - &length, &size, &type, name); - if (size < 0) { - fastFree(name); - return false; - } - info.name = String(name, length); - info.type = type; - info.size = size; - fastFree(name); - return true; -} +//---------------------------------------------------------------------- +// GraphicsContext3D +// -bool GraphicsContext3D::getActiveUniform(WebGLProgram* program, unsigned long index, ActiveInfo& info) -{ - if (!program) { - synthesizeGLError(INVALID_VALUE); - return false; - } - GLint maxNameLength = -1; - glGetProgramiv(EXTRACT(program), GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxNameLength); - if (maxNameLength < 0) - return false; - GLchar* name = 0; - if (!tryFastMalloc(maxNameLength * sizeof(GLchar)).getValue(name)) { - synthesizeGLError(OUT_OF_MEMORY); - return false; - } - GLsizei length = 0; - GLint size = -1; - GLenum type = 0; - glGetActiveUniform(EXTRACT(program), index, maxNameLength, - &length, &size, &type, name); - if (size < 0) { - fastFree(name); - return false; - } - info.name = String(name, length); - info.type = type; - info.size = size; - fastFree(name); - return true; -} +// Macros to assist in delegating from GraphicsContext3D to +// GraphicsContext3DInternal. -int GraphicsContext3D::getAttribLocation(WebGLProgram* program, const String& name) -{ - if (!program) - return -1; +#define DELEGATE_TO_INTERNAL(name) \ +void GraphicsContext3D::name() \ +{ \ + m_internal->name(); \ +} - makeContextCurrent(); - return glGetAttribLocation(EXTRACT(program), name.utf8().data()); +#define DELEGATE_TO_INTERNAL_R(name, rt) \ +rt GraphicsContext3D::name() \ +{ \ + return m_internal->name(); \ } -void GraphicsContext3D::getBooleanv(unsigned long pname, unsigned char* value) -{ - makeContextCurrent(); - glGetBooleanv(pname, value); +#define DELEGATE_TO_INTERNAL_1(name, t1) \ +void GraphicsContext3D::name(t1 a1) \ +{ \ + m_internal->name(a1); \ } -void GraphicsContext3D::getBufferParameteriv(unsigned long target, unsigned long pname, int* value) -{ - makeContextCurrent(); - glGetBufferParameteriv(target, pname, value); +#define DELEGATE_TO_INTERNAL_1R(name, t1, rt) \ +rt GraphicsContext3D::name(t1 a1) \ +{ \ + return m_internal->name(a1); \ } -GraphicsContext3D::Attributes GraphicsContext3D::getContextAttributes() -{ - return m_internal->getContextAttributes(); +#define DELEGATE_TO_INTERNAL_2(name, t1, t2) \ +void GraphicsContext3D::name(t1 a1, t2 a2) \ +{ \ + m_internal->name(a1, a2); \ } -unsigned long GraphicsContext3D::getError() -{ - return m_internal->getError(); +#define DELEGATE_TO_INTERNAL_2R(name, t1, t2, rt) \ +rt GraphicsContext3D::name(t1 a1, t2 a2) \ +{ \ + return m_internal->name(a1, a2); \ } -void GraphicsContext3D::getFloatv(unsigned long pname, float* value) -{ - makeContextCurrent(); - glGetFloatv(pname, value); +#define DELEGATE_TO_INTERNAL_3(name, t1, t2, t3) \ +void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3) \ +{ \ + m_internal->name(a1, a2, a3); \ } -void GraphicsContext3D::getFramebufferAttachmentParameteriv(unsigned long target, - unsigned long attachment, - unsigned long pname, - int* value) -{ - makeContextCurrent(); - glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, value); +#define DELEGATE_TO_INTERNAL_3R(name, t1, t2, t3, rt) \ +rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3) \ +{ \ + return m_internal->name(a1, a2, a3); \ } -void GraphicsContext3D::getIntegerv(unsigned long pname, int* value) -{ - makeContextCurrent(); - glGetIntegerv(pname, value); +#define DELEGATE_TO_INTERNAL_4(name, t1, t2, t3, t4) \ +void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4) \ +{ \ + m_internal->name(a1, a2, a3, a4); \ } -void GraphicsContext3D::getProgramiv(WebGLProgram* program, - unsigned long pname, - int* value) -{ - makeContextCurrent(); - glGetProgramiv(EXTRACT(program), pname, value); +#define DELEGATE_TO_INTERNAL_5(name, t1, t2, t3, t4, t5) \ +void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ +{ \ + m_internal->name(a1, a2, a3, a4, a5); \ } -String GraphicsContext3D::getProgramInfoLog(WebGLProgram* program) -{ - makeContextCurrent(); - GLuint programID = EXTRACT(program); - GLint logLength; - glGetProgramiv(programID, GL_INFO_LOG_LENGTH, &logLength); - if (!logLength) - return String(); - GLchar* log = 0; - if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) - return String(); - GLsizei returnedLogLength; - glGetProgramInfoLog(programID, logLength, &returnedLogLength, log); - ASSERT(logLength == returnedLogLength + 1); - String res = String(log, returnedLogLength); - fastFree(log); - return res; -} - -void GraphicsContext3D::getRenderbufferParameteriv(unsigned long target, - unsigned long pname, - int* value) -{ - makeContextCurrent(); - glGetRenderbufferParameterivEXT(target, pname, value); +#define DELEGATE_TO_INTERNAL_6(name, t1, t2, t3, t4, t5, t6) \ +void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ +{ \ + m_internal->name(a1, a2, a3, a4, a5, a6); \ } -void GraphicsContext3D::getShaderiv(WebGLShader* shader, - unsigned long pname, - int* value) -{ - makeContextCurrent(); - glGetShaderiv(EXTRACT(shader), pname, value); +#define DELEGATE_TO_INTERNAL_6R(name, t1, t2, t3, t4, t5, t6, rt) \ +rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ +{ \ + return m_internal->name(a1, a2, a3, a4, a5, a6); \ } -String GraphicsContext3D::getShaderInfoLog(WebGLShader* shader) -{ - makeContextCurrent(); - GLuint shaderID = EXTRACT(shader); - GLint logLength; - glGetShaderiv(shaderID, GL_INFO_LOG_LENGTH, &logLength); - if (!logLength) - return String(); - GLchar* log = 0; - if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) - return String(); - GLsizei returnedLogLength; - glGetShaderInfoLog(shaderID, logLength, &returnedLogLength, log); - ASSERT(logLength == returnedLogLength + 1); - String res = String(log, returnedLogLength); - fastFree(log); - return res; -} - -String GraphicsContext3D::getShaderSource(WebGLShader* shader) -{ - makeContextCurrent(); - GLuint shaderID = EXTRACT(shader); - GLint logLength; - glGetShaderiv(shaderID, GL_SHADER_SOURCE_LENGTH, &logLength); - if (!logLength) - return String(); - GLchar* log = 0; - if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) - return String(); - GLsizei returnedLogLength; - glGetShaderSource(shaderID, logLength, &returnedLogLength, log); - ASSERT(logLength == returnedLogLength + 1); - String res = String(log, returnedLogLength); - fastFree(log); - return res; -} - -String GraphicsContext3D::getString(unsigned long name) -{ - makeContextCurrent(); - return String(reinterpret_cast<const char*>(glGetString(name))); +#define DELEGATE_TO_INTERNAL_7(name, t1, t2, t3, t4, t5, t6, t7) \ +void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ +{ \ + m_internal->name(a1, a2, a3, a4, a5, a6, a7); \ } -void GraphicsContext3D::getTexParameterfv(unsigned long target, unsigned long pname, float* value) -{ - makeContextCurrent(); - glGetTexParameterfv(target, pname, value); +#define DELEGATE_TO_INTERNAL_7R(name, t1, t2, t3, t4, t5, t6, t7, rt) \ +rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ +{ \ + return m_internal->name(a1, a2, a3, a4, a5, a6, a7); \ } -void GraphicsContext3D::getTexParameteriv(unsigned long target, unsigned long pname, int* value) -{ - makeContextCurrent(); - glGetTexParameteriv(target, pname, value); +#define DELEGATE_TO_INTERNAL_8(name, t1, t2, t3, t4, t5, t6, t7, t8) \ +void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8) \ +{ \ + m_internal->name(a1, a2, a3, a4, a5, a6, a7, a8); \ } -void GraphicsContext3D::getUniformfv(WebGLProgram* program, long location, float* value) -{ - makeContextCurrent(); - glGetUniformfv(EXTRACT(program), location, value); +#define DELEGATE_TO_INTERNAL_9R(name, t1, t2, t3, t4, t5, t6, t7, t8, t9, rt) \ +rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9) \ +{ \ + return m_internal->name(a1, a2, a3, a4, a5, a6, a7, a8, a9); \ } -void GraphicsContext3D::getUniformiv(WebGLProgram* program, long location, int* value) +GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes, HostWindow*) { - makeContextCurrent(); - glGetUniformiv(EXTRACT(program), location, value); } -long GraphicsContext3D::getUniformLocation(WebGLProgram* program, const String& name) +GraphicsContext3D::~GraphicsContext3D() { - if (!program) - return -1; - - makeContextCurrent(); - return glGetUniformLocation(EXTRACT(program), name.utf8().data()); } -void GraphicsContext3D::getVertexAttribfv(unsigned long index, - unsigned long pname, - float* value) +PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow) { - makeContextCurrent(); - glGetVertexAttribfv(index, pname, value); + GraphicsContext3DInternal* internal = new GraphicsContext3DInternal(); + if (!internal->initialize(attrs)) { + delete internal; + return 0; + } + PassOwnPtr<GraphicsContext3D> result = new GraphicsContext3D(attrs, hostWindow); + result->m_internal.set(internal); + return result; } -void GraphicsContext3D::getVertexAttribiv(unsigned long index, - unsigned long pname, - int* value) +PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D() const { - makeContextCurrent(); - glGetVertexAttribiv(index, pname, value); + return m_internal->platformGraphicsContext3D(); } -long GraphicsContext3D::getVertexAttribOffset(unsigned long index, unsigned long pname) +Platform3DObject GraphicsContext3D::platformTexture() const { - // FIXME: implement. - notImplemented(); - return 0; + return m_internal->platformTexture(); } -GL_SAME_METHOD_2(Hint, hint, unsigned long, unsigned long); +DELEGATE_TO_INTERNAL(makeContextCurrent) +DELEGATE_TO_INTERNAL_1R(sizeInBytes, int, int) +DELEGATE_TO_INTERNAL_2(reshape, int, int) -bool GraphicsContext3D::isBuffer(WebGLBuffer* buffer) -{ - makeContextCurrent(); - return glIsBuffer(EXTRACT(buffer)); -} +DELEGATE_TO_INTERNAL_1(activeTexture, unsigned long) +DELEGATE_TO_INTERNAL_2(attachShader, WebGLProgram*, WebGLShader*) +DELEGATE_TO_INTERNAL_3(bindAttribLocation, WebGLProgram*, unsigned long, const String&) -bool GraphicsContext3D::isEnabled(unsigned long cap) -{ - makeContextCurrent(); - return glIsEnabled(cap); -} +DELEGATE_TO_INTERNAL_2(bindBuffer, unsigned long, WebGLBuffer*) +DELEGATE_TO_INTERNAL_2(bindFramebuffer, unsigned long, WebGLFramebuffer*) +DELEGATE_TO_INTERNAL_2(bindRenderbuffer, unsigned long, WebGLRenderbuffer*) +DELEGATE_TO_INTERNAL_2(bindTexture, unsigned long, WebGLTexture*) +DELEGATE_TO_INTERNAL_4(blendColor, double, double, double, double) +DELEGATE_TO_INTERNAL_1(blendEquation, unsigned long) +DELEGATE_TO_INTERNAL_2(blendEquationSeparate, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_2(blendFunc, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_4(blendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long) -bool GraphicsContext3D::isFramebuffer(WebGLFramebuffer* framebuffer) -{ - makeContextCurrent(); - return glIsFramebufferEXT(EXTRACT(framebuffer)); -} +DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, int, unsigned long) +DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, WebGLArray*, unsigned long) +DELEGATE_TO_INTERNAL_3(bufferSubData, unsigned long, long, WebGLArray*) -bool GraphicsContext3D::isProgram(WebGLProgram* program) -{ - makeContextCurrent(); - return glIsProgram(EXTRACT(program)); -} +DELEGATE_TO_INTERNAL_1R(checkFramebufferStatus, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_1(clear, unsigned long) +DELEGATE_TO_INTERNAL_4(clearColor, double, double, double, double) +DELEGATE_TO_INTERNAL_1(clearDepth, double) +DELEGATE_TO_INTERNAL_1(clearStencil, long) +DELEGATE_TO_INTERNAL_4(colorMask, bool, bool, bool, bool) +DELEGATE_TO_INTERNAL_1(compileShader, WebGLShader*) -bool GraphicsContext3D::isRenderbuffer(WebGLRenderbuffer* renderbuffer) -{ - makeContextCurrent(); - return glIsRenderbufferEXT(EXTRACT(renderbuffer)); -} +DELEGATE_TO_INTERNAL_8(copyTexImage2D, unsigned long, long, unsigned long, long, long, unsigned long, unsigned long, long) +DELEGATE_TO_INTERNAL_8(copyTexSubImage2D, unsigned long, long, long, long, long, long, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_1(cullFace, unsigned long) +DELEGATE_TO_INTERNAL_1(depthFunc, unsigned long) +DELEGATE_TO_INTERNAL_1(depthMask, bool) +DELEGATE_TO_INTERNAL_2(depthRange, double, double) +DELEGATE_TO_INTERNAL_2(detachShader, WebGLProgram*, WebGLShader*) +DELEGATE_TO_INTERNAL_1(disable, unsigned long) +DELEGATE_TO_INTERNAL_1(disableVertexAttribArray, unsigned long) +DELEGATE_TO_INTERNAL_3(drawArrays, unsigned long, long, long) +DELEGATE_TO_INTERNAL_4(drawElements, unsigned long, unsigned long, unsigned long, long) -bool GraphicsContext3D::isShader(WebGLShader* shader) -{ - makeContextCurrent(); - return glIsShader(EXTRACT(shader)); -} +DELEGATE_TO_INTERNAL_1(enable, unsigned long) +DELEGATE_TO_INTERNAL_1(enableVertexAttribArray, unsigned long) +DELEGATE_TO_INTERNAL(finish) +DELEGATE_TO_INTERNAL(flush) +DELEGATE_TO_INTERNAL_4(framebufferRenderbuffer, unsigned long, unsigned long, unsigned long, WebGLRenderbuffer*) +DELEGATE_TO_INTERNAL_5(framebufferTexture2D, unsigned long, unsigned long, unsigned long, WebGLTexture*, long) +DELEGATE_TO_INTERNAL_1(frontFace, unsigned long) +DELEGATE_TO_INTERNAL_1(generateMipmap, unsigned long) -bool GraphicsContext3D::isTexture(WebGLTexture* texture) -{ - makeContextCurrent(); - return glIsTexture(EXTRACT(texture)); -} +DELEGATE_TO_INTERNAL_3R(getActiveAttrib, WebGLProgram*, unsigned long, ActiveInfo&, bool) +DELEGATE_TO_INTERNAL_3R(getActiveUniform, WebGLProgram*, unsigned long, ActiveInfo&, bool) -GL_SAME_METHOD_1(LineWidth, lineWidth, double) +DELEGATE_TO_INTERNAL_2R(getAttribLocation, WebGLProgram*, const String&, int) -GL_SAME_METHOD_1_X(LinkProgram, linkProgram, WebGLProgram*) +DELEGATE_TO_INTERNAL_2(getBooleanv, unsigned long, unsigned char*) -void GraphicsContext3D::pixelStorei(unsigned long pname, long param) -{ - if (pname != GL_PACK_ALIGNMENT && pname != GL_UNPACK_ALIGNMENT) { - // FIXME: Create a fake GL error and throw an exception. - return; - } +DELEGATE_TO_INTERNAL_3(getBufferParameteriv, unsigned long, unsigned long, int*) - makeContextCurrent(); - glPixelStorei(pname, param); -} +DELEGATE_TO_INTERNAL_R(getContextAttributes, GraphicsContext3D::Attributes) -GL_SAME_METHOD_2(PolygonOffset, polygonOffset, double, double) +DELEGATE_TO_INTERNAL_R(getError, unsigned long) -PassRefPtr<WebGLArray> GraphicsContext3D::readPixels(long x, long y, - unsigned long width, unsigned long height, - unsigned long format, unsigned long type) { - // FIXME: support more pixel formats and types. - if (!((format == GL_RGBA) && (type == GL_UNSIGNED_BYTE))) - return 0; +DELEGATE_TO_INTERNAL_2(getFloatv, unsigned long, float*) - // FIXME: take into account pack alignment. - RefPtr<WebGLUnsignedByteArray> array = WebGLUnsignedByteArray::create(width * height * 4); - glReadPixels(x, y, width, height, format, type, array->baseAddress()); - return array; -} +DELEGATE_TO_INTERNAL_4(getFramebufferAttachmentParameteriv, unsigned long, unsigned long, unsigned long, int*) -void GraphicsContext3D::releaseShaderCompiler() -{ -} +DELEGATE_TO_INTERNAL_2(getIntegerv, unsigned long, int*) -GL_SAME_METHOD_4(RenderbufferStorageEXT, renderbufferStorage, unsigned long, unsigned long, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_3(getProgramiv, WebGLProgram*, unsigned long, int*) -GL_SAME_METHOD_2(SampleCoverage, sampleCoverage, double, bool) +DELEGATE_TO_INTERNAL_1R(getProgramInfoLog, WebGLProgram*, String) -GL_SAME_METHOD_4(Scissor, scissor, long, long, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_3(getRenderbufferParameteriv, unsigned long, unsigned long, int*) -void GraphicsContext3D::shaderSource(WebGLShader* shader, const String& source) -{ - makeContextCurrent(); - CString str = source.utf8(); - const char* data = str.data(); - GLint length = str.length(); - glShaderSource(EXTRACT(shader), 1, &data, &length); -} +DELEGATE_TO_INTERNAL_3(getShaderiv, WebGLShader*, unsigned long, int*) -GL_SAME_METHOD_3(StencilFunc, stencilFunc, unsigned long, long, unsigned long) +DELEGATE_TO_INTERNAL_1R(getShaderInfoLog, WebGLShader*, String) -GL_SAME_METHOD_4(StencilFuncSeparate, stencilFuncSeparate, unsigned long, unsigned long, long, unsigned long) +DELEGATE_TO_INTERNAL_1R(getShaderSource, WebGLShader*, String) +DELEGATE_TO_INTERNAL_1R(getString, unsigned long, String) -GL_SAME_METHOD_1(StencilMask, stencilMask, unsigned long) +DELEGATE_TO_INTERNAL_3(getTexParameterfv, unsigned long, unsigned long, float*) +DELEGATE_TO_INTERNAL_3(getTexParameteriv, unsigned long, unsigned long, int*) -GL_SAME_METHOD_2(StencilMaskSeparate, stencilMaskSeparate, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_3(getUniformfv, WebGLProgram*, long, float*) +DELEGATE_TO_INTERNAL_3(getUniformiv, WebGLProgram*, long, int*) -GL_SAME_METHOD_3(StencilOp, stencilOp, unsigned long, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_2R(getUniformLocation, WebGLProgram*, const String&, long) -GL_SAME_METHOD_4(StencilOpSeparate, stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_3(getVertexAttribfv, unsigned long, unsigned long, float*) +DELEGATE_TO_INTERNAL_3(getVertexAttribiv, unsigned long, unsigned long, int*) -void GraphicsContext3D::synthesizeGLError(unsigned long error) -{ - m_internal->synthesizeGLError(error); -} - -int GraphicsContext3D::texImage2D(unsigned target, - unsigned level, - unsigned internalformat, - unsigned width, - unsigned height, - unsigned border, - unsigned format, - unsigned type, - void* pixels) -{ - // FIXME: must do validation similar to JOGL's to ensure that - // the incoming array is of the appropriate length. - glTexImage2D(target, - level, - internalformat, - width, - height, - border, - format, - type, - pixels); - return 0; -} +DELEGATE_TO_INTERNAL_2R(getVertexAttribOffset, unsigned long, unsigned long, long) + +DELEGATE_TO_INTERNAL_2(hint, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_1R(isBuffer, WebGLBuffer*, bool) +DELEGATE_TO_INTERNAL_1R(isEnabled, unsigned long, bool) +DELEGATE_TO_INTERNAL_1R(isFramebuffer, WebGLFramebuffer*, bool) +DELEGATE_TO_INTERNAL_1R(isProgram, WebGLProgram*, bool) +DELEGATE_TO_INTERNAL_1R(isRenderbuffer, WebGLRenderbuffer*, bool) +DELEGATE_TO_INTERNAL_1R(isShader, WebGLShader*, bool) +DELEGATE_TO_INTERNAL_1R(isTexture, WebGLTexture*, bool) +DELEGATE_TO_INTERNAL_1(lineWidth, double) +DELEGATE_TO_INTERNAL_1(linkProgram, WebGLProgram*) +DELEGATE_TO_INTERNAL_2(pixelStorei, unsigned long, long) +DELEGATE_TO_INTERNAL_2(polygonOffset, double, double) + +DELEGATE_TO_INTERNAL_7(readPixels, long, long, unsigned long, unsigned long, unsigned long, unsigned long, void*) + +DELEGATE_TO_INTERNAL(releaseShaderCompiler) +DELEGATE_TO_INTERNAL_4(renderbufferStorage, unsigned long, unsigned long, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_2(sampleCoverage, double, bool) +DELEGATE_TO_INTERNAL_4(scissor, long, long, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_2(shaderSource, WebGLShader*, const String&) +DELEGATE_TO_INTERNAL_3(stencilFunc, unsigned long, long, unsigned long) +DELEGATE_TO_INTERNAL_4(stencilFuncSeparate, unsigned long, unsigned long, long, unsigned long) +DELEGATE_TO_INTERNAL_1(stencilMask, unsigned long) +DELEGATE_TO_INTERNAL_2(stencilMaskSeparate, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_3(stencilOp, unsigned long, unsigned long, unsigned long) +DELEGATE_TO_INTERNAL_4(stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long) + +DELEGATE_TO_INTERNAL_9R(texImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int) int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image, bool flipY, bool premultiplyAlpha) @@ -1880,29 +1210,15 @@ int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image, unsigned int format, internalFormat; if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat)) return -1; - glTexImage2D(target, level, internalFormat, - image->width(), image->height(), 0, - format, GL_UNSIGNED_BYTE, imageData.data()); - return 0; + return m_internal->texImage2D(target, level, internalFormat, + image->width(), image->height(), 0, + format, UNSIGNED_BYTE, imageData.data()); } -GL_SAME_METHOD_3(TexParameterf, texParameterf, unsigned, unsigned, float); +DELEGATE_TO_INTERNAL_3(texParameterf, unsigned, unsigned, float) +DELEGATE_TO_INTERNAL_3(texParameteri, unsigned, unsigned, int) -GL_SAME_METHOD_3(TexParameteri, texParameteri, unsigned, unsigned, int); - -int GraphicsContext3D::texSubImage2D(unsigned target, - unsigned level, - unsigned xoffset, - unsigned yoffset, - unsigned width, - unsigned height, - unsigned format, - unsigned type, - void* pixels) -{ - glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - return 0; -} +DELEGATE_TO_INTERNAL_9R(texSubImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int) int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, @@ -1916,142 +1232,65 @@ int GraphicsContext3D::texSubImage2D(unsigned target, unsigned int format, internalFormat; if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat)) return -1; - glTexSubImage2D(target, level, xoffset, yoffset, - image->width(), image->height(), - format, GL_UNSIGNED_BYTE, imageData.data()); - return 0; -} - -GL_SAME_METHOD_2(Uniform1f, uniform1f, long, float) - -void GraphicsContext3D::uniform1fv(long location, float* v, int size) -{ - makeContextCurrent(); - glUniform1fv(location, size, v); -} - -GL_SAME_METHOD_2(Uniform1i, uniform1i, long, int) - -void GraphicsContext3D::uniform1iv(long location, int* v, int size) -{ - makeContextCurrent(); - glUniform1iv(location, size, v); -} - -GL_SAME_METHOD_3(Uniform2f, uniform2f, long, float, float) - -void GraphicsContext3D::uniform2fv(long location, float* v, int size) -{ - makeContextCurrent(); - glUniform2fv(location, size, v); -} - -GL_SAME_METHOD_3(Uniform2i, uniform2i, long, int, int) - -void GraphicsContext3D::uniform2iv(long location, int* v, int size) -{ - makeContextCurrent(); - glUniform2iv(location, size, v); -} - -GL_SAME_METHOD_4(Uniform3f, uniform3f, long, float, float, float) - -void GraphicsContext3D::uniform3fv(long location, float* v, int size) -{ - makeContextCurrent(); - glUniform3fv(location, size, v); -} - -GL_SAME_METHOD_4(Uniform3i, uniform3i, long, int, int, int) - -void GraphicsContext3D::uniform3iv(long location, int* v, int size) -{ - makeContextCurrent(); - glUniform3iv(location, size, v); -} - -GL_SAME_METHOD_5(Uniform4f, uniform4f, long, float, float, float, float) - -void GraphicsContext3D::uniform4fv(long location, float* v, int size) -{ - makeContextCurrent(); - glUniform4fv(location, size, v); -} - -GL_SAME_METHOD_5(Uniform4i, uniform4i, long, int, int, int, int) - -void GraphicsContext3D::uniform4iv(long location, int* v, int size) -{ - makeContextCurrent(); - glUniform4iv(location, size, v); -} - -void GraphicsContext3D::uniformMatrix2fv(long location, bool transpose, float* value, int size) -{ - makeContextCurrent(); - glUniformMatrix2fv(location, size, transpose, value); -} - -void GraphicsContext3D::uniformMatrix3fv(long location, bool transpose, float* value, int size) -{ - makeContextCurrent(); - glUniformMatrix3fv(location, size, transpose, value); -} - -void GraphicsContext3D::uniformMatrix4fv(long location, bool transpose, float* value, int size) -{ - makeContextCurrent(); - glUniformMatrix4fv(location, size, transpose, value); -} - -GL_SAME_METHOD_1_X(UseProgram, useProgram, WebGLProgram*) - -GL_SAME_METHOD_1_X(ValidateProgram, validateProgram, WebGLProgram*) - -GL_SAME_METHOD_2(VertexAttrib1f, vertexAttrib1f, unsigned long, float) - -void GraphicsContext3D::vertexAttrib1fv(unsigned long indx, float* values) -{ - makeContextCurrent(); - glVertexAttrib1fv(indx, values); -} - -GL_SAME_METHOD_3(VertexAttrib2f, vertexAttrib2f, unsigned long, float, float) - -void GraphicsContext3D::vertexAttrib2fv(unsigned long indx, float* values) -{ - makeContextCurrent(); - glVertexAttrib2fv(indx, values); -} - -GL_SAME_METHOD_4(VertexAttrib3f, vertexAttrib3f, unsigned long, float, float, float) - -void GraphicsContext3D::vertexAttrib3fv(unsigned long indx, float* values) -{ - makeContextCurrent(); - glVertexAttrib3fv(indx, values); -} - -GL_SAME_METHOD_5(VertexAttrib4f, vertexAttrib4f, unsigned long, float, float, float, float) - -void GraphicsContext3D::vertexAttrib4fv(unsigned long indx, float* values) -{ - makeContextCurrent(); - glVertexAttrib4fv(indx, values); -} - -void GraphicsContext3D::vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, - unsigned long stride, unsigned long offset) -{ - m_internal->vertexAttribPointer(indx, size, type, normalized, stride, offset); -} - -void GraphicsContext3D::viewport(long x, long y, unsigned long width, unsigned long height) -{ - makeContextCurrent(); - m_internal->viewportImpl(x, y, width, height); -} - -} + return m_internal->texSubImage2D(target, level, xoffset, yoffset, + image->width(), image->height(), + format, UNSIGNED_BYTE, imageData.data()); +} + +DELEGATE_TO_INTERNAL_2(uniform1f, long, float) +DELEGATE_TO_INTERNAL_3(uniform1fv, long, float*, int) +DELEGATE_TO_INTERNAL_2(uniform1i, long, int) +DELEGATE_TO_INTERNAL_3(uniform1iv, long, int*, int) +DELEGATE_TO_INTERNAL_3(uniform2f, long, float, float) +DELEGATE_TO_INTERNAL_3(uniform2fv, long, float*, int) +DELEGATE_TO_INTERNAL_3(uniform2i, long, int, int) +DELEGATE_TO_INTERNAL_3(uniform2iv, long, int*, int) +DELEGATE_TO_INTERNAL_4(uniform3f, long, float, float, float) +DELEGATE_TO_INTERNAL_3(uniform3fv, long, float*, int) +DELEGATE_TO_INTERNAL_4(uniform3i, long, int, int, int) +DELEGATE_TO_INTERNAL_3(uniform3iv, long, int*, int) +DELEGATE_TO_INTERNAL_5(uniform4f, long, float, float, float, float) +DELEGATE_TO_INTERNAL_3(uniform4fv, long, float*, int) +DELEGATE_TO_INTERNAL_5(uniform4i, long, int, int, int, int) +DELEGATE_TO_INTERNAL_3(uniform4iv, long, int*, int) +DELEGATE_TO_INTERNAL_4(uniformMatrix2fv, long, bool, float*, int) +DELEGATE_TO_INTERNAL_4(uniformMatrix3fv, long, bool, float*, int) +DELEGATE_TO_INTERNAL_4(uniformMatrix4fv, long, bool, float*, int) + +DELEGATE_TO_INTERNAL_1(useProgram, WebGLProgram*) +DELEGATE_TO_INTERNAL_1(validateProgram, WebGLProgram*) + +DELEGATE_TO_INTERNAL_2(vertexAttrib1f, unsigned long, float) +DELEGATE_TO_INTERNAL_2(vertexAttrib1fv, unsigned long, float*) +DELEGATE_TO_INTERNAL_3(vertexAttrib2f, unsigned long, float, float) +DELEGATE_TO_INTERNAL_2(vertexAttrib2fv, unsigned long, float*) +DELEGATE_TO_INTERNAL_4(vertexAttrib3f, unsigned long, float, float, float) +DELEGATE_TO_INTERNAL_2(vertexAttrib3fv, unsigned long, float*) +DELEGATE_TO_INTERNAL_5(vertexAttrib4f, unsigned long, float, float, float, float) +DELEGATE_TO_INTERNAL_2(vertexAttrib4fv, unsigned long, float*) +DELEGATE_TO_INTERNAL_6(vertexAttribPointer, unsigned long, int, int, bool, unsigned long, unsigned long) + +DELEGATE_TO_INTERNAL_4(viewport, long, long, unsigned long, unsigned long) + +DELEGATE_TO_INTERNAL_1(beginPaint, WebGLRenderingContext*) +DELEGATE_TO_INTERNAL(endPaint) + +DELEGATE_TO_INTERNAL_R(createBuffer, unsigned) +DELEGATE_TO_INTERNAL_R(createFramebuffer, unsigned) +DELEGATE_TO_INTERNAL_R(createProgram, unsigned) +DELEGATE_TO_INTERNAL_R(createRenderbuffer, unsigned) +DELEGATE_TO_INTERNAL_1R(createShader, unsigned long, unsigned) +DELEGATE_TO_INTERNAL_R(createTexture, unsigned) + +DELEGATE_TO_INTERNAL_1(deleteBuffer, unsigned) +DELEGATE_TO_INTERNAL_1(deleteFramebuffer, unsigned) +DELEGATE_TO_INTERNAL_1(deleteProgram, unsigned) +DELEGATE_TO_INTERNAL_1(deleteRenderbuffer, unsigned) +DELEGATE_TO_INTERNAL_1(deleteShader, unsigned) +DELEGATE_TO_INTERNAL_1(deleteTexture, unsigned) + +DELEGATE_TO_INTERNAL_1(synthesizeGLError, unsigned long) + +} // namespace WebCore #endif // ENABLE(3D_CANVAS) diff --git a/WebKit/chromium/src/IDBCallbacksProxy.h b/WebKit/chromium/src/IDBCallbacksProxy.h new file mode 100644 index 0000000..e803c96 --- /dev/null +++ b/WebKit/chromium/src/IDBCallbacksProxy.h @@ -0,0 +1,73 @@ +/* + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 IDBCallbacksProxy_h +#define IDBCallbacksProxy_h + +#include "IDBCallbacks.h" +#include "IDBDatabaseError.h" +#include "WebIDBCallbacks.h" +#include "WebIDBDatabaseError.h" +#include <wtf/PassRefPtr.h> +#include <wtf/RefPtr.h> + +#if ENABLE(INDEXED_DATABASE) + +namespace WebCore { + +template <typename WebKitClass, typename WebCoreClass, typename WebCoreProxy> +class IDBCallbacksProxy : public WebKit::WebIDBCallbacks<WebKitClass> { +public: + IDBCallbacksProxy(PassRefPtr<IDBCallbacks<WebCoreClass> > callbacks) + : m_callbacks(callbacks) { } + + virtual ~IDBCallbacksProxy() { } + + virtual void onSuccess(WebKitClass* webKitInstance) + { + RefPtr<WebCoreClass> proxy = WebCoreProxy::create(webKitInstance); + m_callbacks->onSuccess(proxy); + m_callbacks.clear(); + } + + virtual void onError(const WebKit::WebIDBDatabaseError& error) + { + m_callbacks->onError(error); + m_callbacks.clear(); + } + +private: + PassRefPtr<IDBCallbacks<WebCoreClass> > m_callbacks; +}; + + +} // namespace WebCore + +#endif + +#endif // IDBCallbacksProxy_h diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp new file mode 100644 index 0000000..d12ec70 --- /dev/null +++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp @@ -0,0 +1,57 @@ +/* + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "IDBDatabaseProxy.h" + +#include "IDBDatabaseError.h" +#include "WebIDBDatabase.h" +#include "WebIDBDatabaseError.h" + +#if ENABLE(INDEXED_DATABASE) + +namespace WebCore { + +PassRefPtr<IDBDatabase> IDBDatabaseProxy::create(PassOwnPtr<WebKit::WebIDBDatabase> database) +{ + return adoptRef(new IDBDatabaseProxy(database)); +} + +IDBDatabaseProxy::IDBDatabaseProxy(PassOwnPtr<WebKit::WebIDBDatabase> database) + : m_webIDBDatabase(database) +{ +} + +IDBDatabaseProxy::~IDBDatabaseProxy() +{ +} + +} // namespace WebCore + +#endif // ENABLE(INDEXED_DATABASE) + diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h new file mode 100644 index 0000000..ac96a15 --- /dev/null +++ b/WebKit/chromium/src/IDBDatabaseProxy.h @@ -0,0 +1,61 @@ +/* + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 IDBDatabaseProxy_h +#define IDBDatabaseProxy_h + +#include "IDBDatabase.h" +#include <wtf/OwnPtr.h> +#include <wtf/PassOwnPtr.h> +#include <wtf/PassRefPtr.h> + +#if ENABLE(INDEXED_DATABASE) + +namespace WebKit { class WebIDBDatabase; } + +namespace WebCore { + +class IDBDatabaseProxy : public IDBDatabase { +public: + static PassRefPtr<IDBDatabase> create(PassOwnPtr<WebKit::WebIDBDatabase>); + virtual ~IDBDatabaseProxy(); + + // FIXME: Add other methods. + +private: + IDBDatabaseProxy(PassOwnPtr<WebKit::WebIDBDatabase>); + + OwnPtr<WebKit::WebIDBDatabase> m_webIDBDatabase; +}; + +} // namespace WebCore + +#endif + +#endif // IDBDatabaseProxy_h + diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.cpp b/WebKit/chromium/src/IndexedDatabaseProxy.cpp new file mode 100644 index 0000000..9069b46 --- /dev/null +++ b/WebKit/chromium/src/IndexedDatabaseProxy.cpp @@ -0,0 +1,70 @@ +/* + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "IndexedDatabaseProxy.h" + +#include "IDBCallbacksProxy.h" +#include "IDBDatabaseError.h" +#include "IDBDatabaseProxy.h" +#include "WebFrameImpl.h" +#include "WebIDBDatabase.h" +#include "WebIDBDatabaseError.h" +#include "WebIndexedDatabase.h" +#include "WebKit.h" +#include "WebKitClient.h" + +#if ENABLE(INDEXED_DATABASE) + +namespace WebCore { + +PassRefPtr<IndexedDatabase> IndexedDatabaseProxy::create() +{ + return adoptRef(new IndexedDatabaseProxy()); +} + +IndexedDatabaseProxy::IndexedDatabaseProxy() + : m_webIndexedDatabase(WebKit::webKitClient()->indexedDatabase()) +{ +} + +IndexedDatabaseProxy::~IndexedDatabaseProxy() +{ +} + +void IndexedDatabaseProxy::open(const String& name, const String& description, bool modifyDatabase, PassRefPtr<IDBDatabaseCallbacks> callbacks, Frame* frame, ExceptionCode& ec) +{ + WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); + typedef IDBCallbacksProxy<WebKit::WebIDBDatabase, IDBDatabase, IDBDatabaseProxy> CallbacksProxy; + m_webIndexedDatabase->open(name, description, modifyDatabase, new CallbacksProxy(callbacks), webFrame, ec); +} + +} // namespace WebCore + +#endif // ENABLE(INDEXED_DATABASE) + diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.h b/WebKit/chromium/src/IndexedDatabaseProxy.h new file mode 100644 index 0000000..d0f55b6 --- /dev/null +++ b/WebKit/chromium/src/IndexedDatabaseProxy.h @@ -0,0 +1,59 @@ +/* + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 IndexedDatabaseProxy_h +#define IndexedDatabaseProxy_h + +#include "IndexedDatabase.h" + +#if ENABLE(INDEXED_DATABASE) + +namespace WebKit { class WebIndexedDatabase; } + +namespace WebCore { + +class IndexedDatabaseProxy : public IndexedDatabase { +public: + static PassRefPtr<IndexedDatabase> create(); + virtual ~IndexedDatabaseProxy(); + + virtual void open(const String& name, const String& description, bool modifyDatabase, PassRefPtr<IDBDatabaseCallbacks>, Frame*, ExceptionCode&); + +private: + IndexedDatabaseProxy(); + + // We don't own this pointer (unlike all the other proxy classes which do). + WebKit::WebIndexedDatabase* m_webIndexedDatabase; +}; + +} // namespace WebCore + +#endif + +#endif // IndexedDatabaseProxy_h + diff --git a/WebKit/chromium/src/InspectorClientImpl.cpp b/WebKit/chromium/src/InspectorClientImpl.cpp index 54550d1..f69ef72 100644 --- a/WebKit/chromium/src/InspectorClientImpl.cpp +++ b/WebKit/chromium/src/InspectorClientImpl.cpp @@ -63,46 +63,8 @@ void InspectorClientImpl::inspectorDestroyed() // Our lifetime is bound to the WebViewImpl. } -Page* InspectorClientImpl::createPage() +void InspectorClientImpl::openInspectorFrontend(InspectorController*) { - // This method should never be called in Chrome as inspector front-end lives - // in a separate process. - ASSERT_NOT_REACHED(); - return 0; -} - -void InspectorClientImpl::showWindow() -{ - ASSERT(m_inspectedWebView->devToolsAgentPrivate()); - m_inspectedWebView->page()->inspectorController()->setWindowVisible(true); -} - -void InspectorClientImpl::closeWindow() -{ - if (m_inspectedWebView->page()) - m_inspectedWebView->page()->inspectorController()->setWindowVisible(false); -} - -bool InspectorClientImpl::windowVisible() -{ - ASSERT(m_inspectedWebView->devToolsAgentPrivate()); - return false; -} - -void InspectorClientImpl::attachWindow() -{ - // FIXME: Implement this -} - -void InspectorClientImpl::detachWindow() -{ - // FIXME: Implement this -} - -void InspectorClientImpl::setAttachedWindowHeight(unsigned int height) -{ - // FIXME: Implement this - notImplemented(); } static void invalidateNodeBoundingRect(WebViewImpl* webView) @@ -130,23 +92,6 @@ void InspectorClientImpl::hideHighlight() invalidateNodeBoundingRect(m_inspectedWebView); } -void InspectorClientImpl::inspectedURLChanged(const String& newURL) -{ - // FIXME: Implement this -} - -String InspectorClientImpl::localizedStringsURL() -{ - notImplemented(); - return String(); -} - -String InspectorClientImpl::hiddenPanels() -{ - notImplemented(); - return ""; -} - void InspectorClientImpl::populateSetting(const String& key, String* value) { loadSettings(); @@ -161,11 +106,6 @@ void InspectorClientImpl::storeSetting(const String& key, const String& value) saveSettings(); } -void InspectorClientImpl::inspectorWindowObjectCleared() -{ - notImplemented(); -} - void InspectorClientImpl::loadSettings() { if (m_settings) diff --git a/WebKit/chromium/src/InspectorClientImpl.h b/WebKit/chromium/src/InspectorClientImpl.h index 6f7f8b1..ccbcef7 100644 --- a/WebKit/chromium/src/InspectorClientImpl.h +++ b/WebKit/chromium/src/InspectorClientImpl.h @@ -45,25 +45,15 @@ public: // InspectorClient methods: virtual void inspectorDestroyed(); - virtual WebCore::Page* createPage(); - virtual WebCore::String localizedStringsURL(); - virtual WebCore::String hiddenPanels(); - virtual void showWindow(); - virtual void closeWindow(); - virtual bool windowVisible(); - virtual void attachWindow(); - virtual void detachWindow(); - virtual void setAttachedWindowHeight(unsigned height); + virtual void openInspectorFrontend(WebCore::InspectorController*); virtual void highlight(WebCore::Node*); virtual void hideHighlight(); - virtual void inspectedURLChanged(const WebCore::String& newURL); virtual void populateSetting( const WebCore::String& key, WebCore::String* value); virtual void storeSetting( const WebCore::String& key, const WebCore::String& value); - virtual void inspectorWindowObjectCleared(); private: void loadSettings(); diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp new file mode 100644 index 0000000..9ff3938 --- /dev/null +++ b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp @@ -0,0 +1,126 @@ +/* + * 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 "InspectorFrontendClientImpl.h" + +#include "InspectorFrontendHost.h" +#include "Page.h" +#include "PlatformString.h" +#include "V8InspectorFrontendHost.h" +#include "V8Proxy.h" +#include "WebDevToolsFrontendClient.h" +#include "WebDevToolsFrontendImpl.h" + +using namespace WebCore; + +namespace WebKit { + +InspectorFrontendClientImpl::InspectorFrontendClientImpl(Page* frontendPage, WebDevToolsFrontendClient* client, WebDevToolsFrontendImpl* frontend) + : m_frontendPage(frontendPage) + , m_client(client) + , m_frontend(frontend) +{ +} + +InspectorFrontendClientImpl::~InspectorFrontendClientImpl() +{ + if (m_frontendHost) + m_frontendHost->disconnectClient(); + m_client = 0; +} + +void InspectorFrontendClientImpl::windowObjectCleared() +{ + v8::HandleScope handleScope; + v8::Handle<v8::Context> frameContext = V8Proxy::context(m_frontendPage->mainFrame()); + v8::Context::Scope contextScope(frameContext); + + ASSERT(!m_frontendHost); + m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage); + v8::Handle<v8::Value> frontendHostObj = toV8(m_frontendHost.get()); + v8::Handle<v8::Object> global = frameContext->Global(); + + global->Set(v8::String::New("InspectorFrontendHost"), frontendHostObj); +#if ENABLE(V8_SCRIPT_DEBUG_SERVER) + global->Set(v8::String::New("v8ScriptDebugServerEnabled"), v8::True()); +#endif +} + +void InspectorFrontendClientImpl::frontendLoaded() +{ + m_frontend->frontendLoaded(); +} + +void InspectorFrontendClientImpl::moveWindowBy(float x, float y) +{ +} + +String InspectorFrontendClientImpl::localizedStringsURL() +{ + return ""; +} + +String InspectorFrontendClientImpl::hiddenPanels() +{ + return ""; +} + +void InspectorFrontendClientImpl::bringToFront() +{ + m_client->activateWindow(); +} + +void InspectorFrontendClientImpl::closeWindow() +{ + m_client->closeWindow(); +} + +void InspectorFrontendClientImpl::requestAttachWindow() +{ + m_client->requestDockWindow(); +} + +void InspectorFrontendClientImpl::requestDetachWindow() +{ + m_client->requestUndockWindow(); +} + +void InspectorFrontendClientImpl::changeAttachedWindowHeight(unsigned) +{ + // Do nothing; +} + +void InspectorFrontendClientImpl::inspectedURLChanged(const String&) +{ + // Do nothing; +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.h b/WebKit/chromium/src/InspectorFrontendClientImpl.h new file mode 100644 index 0000000..f869ac3 --- /dev/null +++ b/WebKit/chromium/src/InspectorFrontendClientImpl.h @@ -0,0 +1,80 @@ +/* + * 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 InspectorFrontendClientImpl_h +#define InspectorFrontendClientImpl_h + +#include "InspectorFrontendClient.h" +#include <wtf/Noncopyable.h> + +namespace WebCore { +class InspectorFrontendHost; +class Page; +} + +namespace WebKit { + +class WebDevToolsFrontendClient; +class WebDevToolsFrontendImpl; + +class InspectorFrontendClientImpl : public WebCore::InspectorFrontendClient + , public Noncopyable { +public: + InspectorFrontendClientImpl(WebCore::Page*, WebDevToolsFrontendClient*, WebDevToolsFrontendImpl*); + virtual ~InspectorFrontendClientImpl(); + + // InspectorFrontendClient methods: + virtual void windowObjectCleared(); + virtual void frontendLoaded(); + + virtual void moveWindowBy(float x, float y); + + virtual WebCore::String localizedStringsURL(); + virtual WebCore::String hiddenPanels(); + + virtual void bringToFront(); + virtual void closeWindow(); + + virtual void requestAttachWindow(); + virtual void requestDetachWindow(); + virtual void changeAttachedWindowHeight(unsigned); + + virtual void inspectedURLChanged(const WebCore::String&); + +private: + WebCore::Page* m_frontendPage; + WebDevToolsFrontendClient* m_client; + WebDevToolsFrontendImpl* m_frontend; + RefPtr<WebCore::InspectorFrontendHost> m_frontendHost; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp index 4e01848..74ff699 100644 --- a/WebKit/chromium/src/LocalizedStrings.cpp +++ b/WebKit/chromium/src/LocalizedStrings.cpp @@ -174,6 +174,18 @@ String AXMenuListActionVerb() { return String(); } + +String missingPluginText() +{ + notImplemented(); + return String("Missing Plug-in"); +} + +String crashedPluginText() +{ + notImplemented(); + return String("Plug-in Failure"); +} String multipleFileUploadText(unsigned numberOfFiles) { diff --git a/WebKit/chromium/src/NotificationPresenterImpl.cpp b/WebKit/chromium/src/NotificationPresenterImpl.cpp index a38b8b5..dca1856 100644 --- a/WebKit/chromium/src/NotificationPresenterImpl.cpp +++ b/WebKit/chromium/src/NotificationPresenterImpl.cpp @@ -33,11 +33,10 @@ #if ENABLE(NOTIFICATIONS) -#include "Document.h" +#include "KURL.h" #include "Notification.h" #include "SecurityOrigin.h" -#include "WebDocument.h" #include "WebNotification.h" #include "WebNotificationPermissionCallback.h" #include "WebNotificationPresenter.h" @@ -92,19 +91,15 @@ void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notifi m_presenter->objectDestroyed(PassRefPtr<Notification>(notification)); } -NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(const KURL& url, Document* document) +NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(const KURL& sourceURL) { - WebDocument webDocument; - if (document) - webDocument = document; - - int result = m_presenter->checkPermission(url, document ? &webDocument : 0); + int result = m_presenter->checkPermission(sourceURL); return static_cast<NotificationPresenter::Permission>(result); } void NotificationPresenterImpl::requestPermission(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback) { - m_presenter->requestPermission(origin->toString(), new VoidCallbackClient(callback)); + m_presenter->requestPermission(WebSecurityOrigin(origin), new VoidCallbackClient(callback)); } } // namespace WebKit diff --git a/WebKit/chromium/src/NotificationPresenterImpl.h b/WebKit/chromium/src/NotificationPresenterImpl.h index 8e3799c..479538f 100644 --- a/WebKit/chromium/src/NotificationPresenterImpl.h +++ b/WebKit/chromium/src/NotificationPresenterImpl.h @@ -54,7 +54,7 @@ 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& url, WebCore::Document* document); + virtual WebCore::NotificationPresenter::Permission checkPermission(const WebCore::KURL& sourceURL); virtual void requestPermission(WebCore::SecurityOrigin* origin, WTF::PassRefPtr<WebCore::VoidCallback> callback); private: diff --git a/WebKit/chromium/src/ResourceHandle.cpp b/WebKit/chromium/src/ResourceHandle.cpp index bf6910f..39270e7 100644 --- a/WebKit/chromium/src/ResourceHandle.cpp +++ b/WebKit/chromium/src/ResourceHandle.cpp @@ -33,6 +33,7 @@ #include "ResourceHandleClient.h" #include "ResourceRequest.h" +#include "SharedBuffer.h" #include "WebKit.h" #include "WebKitClient.h" @@ -56,6 +57,7 @@ public: : m_request(request) , m_owner(0) , m_client(client) + , m_state(ConnectionStateNew) { } @@ -73,14 +75,32 @@ public: virtual void didFinishLoading(WebURLLoader*); virtual void didFail(WebURLLoader*, const WebURLError&); + enum ConnectionState { + ConnectionStateNew, + ConnectionStateStarted, + ConnectionStateReceivedResponse, + ConnectionStateReceivingData, + ConnectionStateFinishedLoading, + ConnectionStateCanceled, + ConnectionStateFailed, + }; + ResourceRequest m_request; ResourceHandle* m_owner; ResourceHandleClient* m_client; OwnPtr<WebURLLoader> m_loader; + + // Used for sanity checking to make sure we don't experience illegal state + // transitions. + ConnectionState m_state; }; void ResourceHandleInternal::start() { + if (m_state != ConnectionStateNew) + CRASH(); + m_state = ConnectionStateStarted; + m_loader.set(webKitClient()->createURLLoader()); ASSERT(m_loader.get()); @@ -91,6 +111,7 @@ void ResourceHandleInternal::start() void ResourceHandleInternal::cancel() { + m_state = ConnectionStateCanceled; m_loader->cancel(); // Do not make any further calls to the client. @@ -127,6 +148,12 @@ void ResourceHandleInternal::didReceiveResponse(WebURLLoader*, const WebURLRespo { ASSERT(m_client); ASSERT(!response.isNull()); + bool isMultipart = response.isMultipartPayload(); + bool isValidStateTransition = (m_state == ConnectionStateStarted || m_state == ConnectionStateReceivedResponse); + // In the case of multipart loads, calls to didReceiveData & didReceiveResponse can be interleaved. + if (!isMultipart && !isValidStateTransition) + CRASH(); + m_state = ConnectionStateReceivedResponse; m_client->didReceiveResponse(m_owner, response.toResourceResponse()); } @@ -134,6 +161,9 @@ void ResourceHandleInternal::didReceiveData( WebURLLoader*, const char* data, int dataLength) { ASSERT(m_client); + if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData) + CRASH(); + m_state = ConnectionStateReceivingData; // FIXME(yurys): it looks like lengthReceived is always the same as // dataLength and that the latter parameter can be eliminated. @@ -144,12 +174,16 @@ void ResourceHandleInternal::didReceiveData( void ResourceHandleInternal::didFinishLoading(WebURLLoader*) { ASSERT(m_client); + if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData) + CRASH(); + m_state = ConnectionStateFinishedLoading; m_client->didFinishLoading(m_owner); } void ResourceHandleInternal::didFail(WebURLLoader*, const WebURLError& error) { ASSERT(m_client); + m_state = ConnectionStateFailed; m_client->didFail(m_owner, error); } @@ -158,8 +192,7 @@ void ResourceHandleInternal::didFail(WebURLLoader*, const WebURLError& error) ResourceHandle::ResourceHandle(const ResourceRequest& request, ResourceHandleClient* client, bool defersLoading, - bool shouldContentSniff, - bool mightDownloadFromHandle) + bool shouldContentSniff) : d(new ResourceHandleInternal(request, client)) { d->m_owner = this; @@ -171,11 +204,10 @@ PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request ResourceHandleClient* client, Frame* deprecated, bool defersLoading, - bool shouldContentSniff, - bool mightDownloadFromHandle) + bool shouldContentSniff) { RefPtr<ResourceHandle> newHandle = adoptRef(new ResourceHandle( - request, client, defersLoading, shouldContentSniff, mightDownloadFromHandle)); + request, client, defersLoading, shouldContentSniff)); if (newHandle->start(deprecated)) return newHandle.release(); diff --git a/WebKit/chromium/src/SharedWorkerRepository.cpp b/WebKit/chromium/src/SharedWorkerRepository.cpp index c803aac..f0a8ec8 100644 --- a/WebKit/chromium/src/SharedWorkerRepository.cpp +++ b/WebKit/chromium/src/SharedWorkerRepository.cpp @@ -36,6 +36,7 @@ #include "Event.h" #include "EventNames.h" +#include "InspectorController.h" #include "MessagePortChannel.h" #include "PlatformMessagePortChannel.h" #include "ScriptExecutionContext.h" @@ -152,6 +153,10 @@ void SharedWorkerScriptLoader::notifyFinished() m_worker->dispatchEvent(Event::create(eventNames().errorEvent, false, true)); delete this; } else { +#if ENABLE(INSPECTOR) + if (InspectorController* inspector = m_worker->scriptExecutionContext()->inspectorController()) + inspector->scriptImported(m_scriptLoader.identifier(), m_scriptLoader.script()); +#endif // Pass the script off to the worker, then send a connect event. m_webWorker->startWorkerContext(m_url, m_name, m_worker->scriptExecutionContext()->userAgent(m_url), m_scriptLoader.script()); sendConnect(); diff --git a/WebKit/chromium/src/StorageAreaProxy.cpp b/WebKit/chromium/src/StorageAreaProxy.cpp index c9185fe..0e44250 100644 --- a/WebKit/chromium/src/StorageAreaProxy.cpp +++ b/WebKit/chromium/src/StorageAreaProxy.cpp @@ -40,6 +40,7 @@ #include "StorageAreaImpl.h" #include "StorageEvent.h" +#include "WebFrameImpl.h" #include "WebStorageArea.h" #include "WebString.h" #include "WebURL.h" @@ -73,12 +74,13 @@ String StorageAreaProxy::getItem(const String& key) const String StorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame) { - bool quotaException = false; + WebKit::WebStorageArea::Result result = WebKit::WebStorageArea::ResultOK; WebKit::WebString oldValue; - m_storageArea->setItem(key, value, frame->document()->url(), quotaException, oldValue); - ec = quotaException ? QUOTA_EXCEEDED_ERR : 0; + WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); + m_storageArea->setItem(key, value, frame->document()->url(), result, oldValue, webFrame); + ec = (result == WebKit::WebStorageArea::ResultOK) ? 0 : QUOTA_EXCEEDED_ERR; String oldValueString = oldValue; - if (oldValueString != value) + if (oldValueString != value && result == WebKit::WebStorageArea::ResultOK) storageEvent(key, oldValue, value, m_storageType, frame->document()->securityOrigin(), frame); return oldValue; } @@ -124,7 +126,7 @@ void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, c } for (unsigned i = 0; i < frames.size(); ++i) - frames[i]->document()->enqueueStorageEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->sessionStorage())); + frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->sessionStorage())); } else { // Send events to every page. const HashSet<Page*>& pages = page->group().pages(); @@ -136,8 +138,12 @@ void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, c } } - for (unsigned i = 0; i < frames.size(); ++i) - frames[i]->document()->enqueueStorageEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->localStorage())); + for (unsigned i = 0; i < frames.size(); ++i) { + ExceptionCode ec = 0; + Storage* storage = frames[i]->domWindow()->localStorage(ec); + if (!ec) + frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage)); + } } } diff --git a/WebKit/chromium/src/StorageEventDispatcherImpl.cpp b/WebKit/chromium/src/StorageEventDispatcherImpl.cpp index 3518796..ae25d44 100644 --- a/WebKit/chromium/src/StorageEventDispatcherImpl.cpp +++ b/WebKit/chromium/src/StorageEventDispatcherImpl.cpp @@ -73,8 +73,11 @@ void StorageEventDispatcherImpl::dispatchStorageEvent(const String& key, const S // FIXME: Figure out how to pass in the document URI. for (unsigned i = 0; i < frames.size(); ++i) { - frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, - url, frames[i]->domWindow()->localStorage())); + ExceptionCode ec = 0; + Storage* storage = frames[i]->domWindow()->localStorage(ec); + if (!ec) + frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, + url, storage)); } } diff --git a/WebKit/chromium/src/StorageNamespaceProxy.cpp b/WebKit/chromium/src/StorageNamespaceProxy.cpp index 3c87554..252bc14 100644 --- a/WebKit/chromium/src/StorageNamespaceProxy.cpp +++ b/WebKit/chromium/src/StorageNamespaceProxy.cpp @@ -47,7 +47,7 @@ PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const Strin return adoptRef(new StorageNamespaceProxy(WebKit::webKitClient()->createLocalStorageNamespace(path, quota), LocalStorage)); } -PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* page) +PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* page, unsigned quota) { WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(page->chrome()->client()); WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client(); diff --git a/WebKit/chromium/src/SuggestionsPopupMenuClient.h b/WebKit/chromium/src/SuggestionsPopupMenuClient.h index edc4c09..77b3890 100644 --- a/WebKit/chromium/src/SuggestionsPopupMenuClient.h +++ b/WebKit/chromium/src/SuggestionsPopupMenuClient.h @@ -63,6 +63,7 @@ public: virtual void valueChanged(unsigned listIndex, bool fireEvents = true); virtual WebCore::String itemText(unsigned listIndex) const; virtual WebCore::String itemToolTip(unsigned lastIndex) const { return WebCore::String(); } + virtual WebCore::String itemAccessibilityText(unsigned lastIndex) const { return WebCore::String(); } virtual bool itemIsEnabled(unsigned listIndex) const { return true; } virtual WebCore::PopupMenuStyle itemStyle(unsigned listIndex) const; virtual WebCore::PopupMenuStyle menuStyle() const; diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp index 04f2f85..41619d6 100644 --- a/WebKit/chromium/src/WebBindings.cpp +++ b/WebKit/chromium/src/WebBindings.cpp @@ -284,7 +284,7 @@ static bool getRangeImpl(NPObject* npobj, WebRange* range) { V8NPObject* v8npobject = reinterpret_cast<V8NPObject*>(npobj); v8::Handle<v8::Object> v8object(v8npobject->v8Object); - if (V8ClassIndex::RANGE != V8DOMWrapper::domWrapperType(v8object)) + if (!V8Range::info.equals(V8DOMWrapper::domWrapperType(v8object))) return false; Range* native = V8Range::toNative(v8object); diff --git a/WebKit/chromium/src/WebCString.cpp b/WebKit/chromium/src/WebCString.cpp index 82fbac0..b484b19 100644 --- a/WebKit/chromium/src/WebCString.cpp +++ b/WebKit/chromium/src/WebCString.cpp @@ -31,14 +31,14 @@ #include "config.h" #include "WebCString.h" -#include "CString.h" #include "TextEncoding.h" +#include <wtf/text/CString.h> #include "WebString.h" namespace WebKit { -class WebCStringPrivate : public WebCore::CStringBuffer { +class WebCStringPrivate : public WTF::CStringBuffer { }; void WebCString::reset() @@ -57,8 +57,8 @@ void WebCString::assign(const WebCString& other) void WebCString::assign(const char* data, size_t length) { char* newData; - RefPtr<WebCore::CStringBuffer> buffer = - WebCore::CString::newUninitialized(length, newData).buffer(); + RefPtr<WTF::CStringBuffer> buffer = + WTF::CString::newUninitialized(length, newData).buffer(); memcpy(newData, data, length); assign(static_cast<WebCStringPrivate*>(buffer.get())); } @@ -97,20 +97,20 @@ WebCString WebCString::fromUTF16(const WebUChar* data) return fromUTF16(data, len); } -WebCString::WebCString(const WebCore::CString& s) +WebCString::WebCString(const WTF::CString& s) : m_private(static_cast<WebCStringPrivate*>(s.buffer())) { if (m_private) m_private->ref(); } -WebCString& WebCString::operator=(const WebCore::CString& s) +WebCString& WebCString::operator=(const WTF::CString& s) { assign(static_cast<WebCStringPrivate*>(s.buffer())); return *this; } -WebCString::operator WebCore::CString() const +WebCString::operator WTF::CString() const { return m_private; } diff --git a/WebKit/chromium/src/WebCommon.cpp b/WebKit/chromium/src/WebCommon.cpp new file mode 100644 index 0000000..f9457fb --- /dev/null +++ b/WebKit/chromium/src/WebCommon.cpp @@ -0,0 +1,44 @@ +/* + * 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 "WebCommon.h" + +#include <wtf/Assertions.h> + +namespace WebKit { + +void failedAssertion(const char* file, int line, const char* function, const char* assertion) +{ + WTFReportAssertionFailure(file, line, function, assertion); + CRASH(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebDatabase.cpp b/WebKit/chromium/src/WebDatabase.cpp index 50b9220..1479eb0 100644 --- a/WebKit/chromium/src/WebDatabase.cpp +++ b/WebKit/chromium/src/WebDatabase.cpp @@ -111,7 +111,7 @@ void WebDatabase::updateDatabaseSize( void WebDatabase::closeDatabaseImmediately(const WebString& originIdentifier, const WebString& databaseName) { HashSet<RefPtr<Database> > databaseHandles; - PassRefPtr<SecurityOrigin> originPrp(*WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier)); + PassRefPtr<SecurityOrigin> originPrp(WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier)); RefPtr<SecurityOrigin> origin = originPrp; DatabaseTracker::tracker().getOpenDatabases(origin.get(), databaseName, &databaseHandles); for (HashSet<RefPtr<Database> >::iterator it = databaseHandles.begin(); it != databaseHandles.end(); ++it) { @@ -119,7 +119,7 @@ void WebDatabase::closeDatabaseImmediately(const WebString& originIdentifier, co DatabaseThread* databaseThread = database->scriptExecutionContext()->databaseThread(); if (databaseThread && !databaseThread->terminationRequested()) { database->stop(); - databaseThread->scheduleTask(DatabaseCloseTask::create(database, 0)); + databaseThread->scheduleTask(DatabaseCloseTask::create(database, Database::RemoveDatabaseFromContext, 0)); } } } diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp index 9ce35b4..0969d37 100644 --- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp +++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp @@ -86,7 +86,6 @@ using WebCore::ScriptObject; using WebCore::ScriptState; using WebCore::ScriptValue; using WebCore::String; -using WebCore::V8ClassIndex; using WebCore::V8DOMWrapper; using WebCore::V8InspectorBackend; using WebCore::V8Proxy; @@ -161,15 +160,6 @@ void WebDevToolsAgentImpl::disposeUtilityContext() } } -void WebDevToolsAgentImpl::unhideResourcesPanelIfNecessary() -{ - InspectorController* ic = m_webViewImpl->page()->inspectorController(); - ic->ensureResourceTrackingSettingsLoaded(); - String command = String::format("[\"setResourcesPanelEnabled\", %s]", - ic->resourceTrackingEnabled() ? "true" : "false"); - m_toolsAgentDelegateStub->dispatchOnClient(command); -} - void WebDevToolsAgentImpl::attach() { if (m_attached) @@ -178,8 +168,8 @@ void WebDevToolsAgentImpl::attach() new DebuggerAgentImpl(m_webViewImpl, m_debuggerAgentDelegateStub.get(), this)); - resetInspectorFrontendProxy(); - unhideResourcesPanelIfNecessary(); + createInspectorFrontendProxy(); + // Allow controller to send messages to the frontend. InspectorController* ic = inspectorController(); @@ -194,7 +184,7 @@ void WebDevToolsAgentImpl::attach() } } - ic->setWindowVisible(true, false); + setInspectorFrontendProxyToInspectorController(); m_attached = true; } @@ -202,6 +192,7 @@ void WebDevToolsAgentImpl::detach() { // Prevent controller from sending messages to the frontend. InspectorController* ic = m_webViewImpl->page()->inspectorController(); + ic->disconnectFrontend(); ic->hideHighlight(); ic->close(); disposeUtilityContext(); @@ -225,10 +216,8 @@ void WebDevToolsAgentImpl::didCommitProvisionalLoad(WebFrameImpl* webframe, bool ds->unreachableURL() : request.url(); if (!webframe->parent()) { - resetInspectorFrontendProxy(); m_toolsAgentDelegateStub->frameNavigate(WebCore::KURL(url).string()); SetApuAgentEnabledInUtilityContext(m_utilityContext, m_apuAgentEnabled); - unhideResourcesPanelIfNecessary(); } } @@ -347,7 +336,6 @@ void WebDevToolsAgentImpl::initDevToolsAgentHost() v8::Local<v8::Object> WebDevToolsAgentImpl::createInspectorBackendV8Wrapper() { - V8ClassIndex::V8WrapperType descriptorType = V8ClassIndex::INSPECTORBACKEND; v8::Handle<v8::Function> function = V8InspectorBackend::GetTemplate()->GetFunction(); if (function.IsEmpty()) { // Return if allocation failed. @@ -359,7 +347,7 @@ v8::Local<v8::Object> WebDevToolsAgentImpl::createInspectorBackendV8Wrapper() return v8::Local<v8::Object>(); } InspectorBackend* backend = m_webViewImpl->page()->inspectorController()->inspectorBackend(); - V8DOMWrapper::setDOMWrapper(instance, V8ClassIndex::ToInt(descriptorType), backend); + V8DOMWrapper::setDOMWrapper(instance, &V8InspectorBackend::info, backend); // Create a weak reference to the v8 wrapper of InspectorBackend to deref // InspectorBackend when the wrapper is garbage collected. backend->ref(); @@ -368,19 +356,22 @@ v8::Local<v8::Object> WebDevToolsAgentImpl::createInspectorBackendV8Wrapper() return instance; } -void WebDevToolsAgentImpl::resetInspectorFrontendProxy() +void WebDevToolsAgentImpl::createInspectorFrontendProxy() { disposeUtilityContext(); - m_debuggerAgentImpl->createUtilityContext(m_webViewImpl->page()->mainFrame(), &m_utilityContext); + m_utilityContext = v8::Context::New(); compileUtilityScripts(); initDevToolsAgentHost(); +} +void WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController() +{ v8::HandleScope scope; - v8::Context::Scope contextScope(m_utilityContext); ScriptState* state = ScriptState::forContext( v8::Local<v8::Context>::New(m_utilityContext)); InspectorController* ic = inspectorController(); - ic->setFrontendProxyObject(state, ScriptObject(state, m_utilityContext->Global())); + ic->setFrontend(new InspectorFrontend( + ScriptObject(state, m_utilityContext->Global()))); } void WebDevToolsAgentImpl::setApuAgentEnabled(bool enabled) diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.h b/WebKit/chromium/src/WebDevToolsAgentImpl.h index 1f81c6d..455dcef 100644 --- a/WebKit/chromium/src/WebDevToolsAgentImpl.h +++ b/WebKit/chromium/src/WebDevToolsAgentImpl.h @@ -106,11 +106,11 @@ private: static v8::Handle<v8::Value> jsOnRuntimeFeatureStateChanged(const v8::Arguments& args); void disposeUtilityContext(); - void unhideResourcesPanelIfNecessary(); void compileUtilityScripts(); void initDevToolsAgentHost(); - void resetInspectorFrontendProxy(); + void createInspectorFrontendProxy(); + void setInspectorFrontendProxyToInspectorController(); void setApuAgentEnabled(bool enabled); WebCore::InspectorController* inspectorController(); diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp index 89fa6e7..0a6c8de 100644 --- a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp +++ b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp @@ -42,6 +42,7 @@ #include "Frame.h" #include "InspectorBackend.h" #include "InspectorController.h" +#include "InspectorFrontendClientImpl.h" #include "InspectorFrontendHost.h" #include "Node.h" #include "Page.h" @@ -54,6 +55,7 @@ #include "V8Binding.h" #include "V8DOMWrapper.h" #include "V8InspectorFrontendHost.h" +#include "V8MouseEvent.h" #include "V8Node.h" #include "V8Proxy.h" #include "V8Utilities.h" @@ -100,6 +102,9 @@ WebDevToolsFrontendImpl::WebDevToolsFrontendImpl( , m_applicationLocale(applicationLocale) , m_loaded(false) { + InspectorController* ic = m_webViewImpl->page()->inspectorController(); + ic->setInspectorFrontendClient(new InspectorFrontendClientImpl(m_webViewImpl->page(), m_client, this)); + WebFrameImpl* frame = m_webViewImpl->mainFrameImpl(); v8::HandleScope scope; v8::Handle<v8::Context> frameContext = V8Proxy::context(frame->frame()); @@ -117,57 +122,10 @@ WebDevToolsFrontendImpl::WebDevToolsFrontendImpl( "DebuggerPauseScript", WebDevToolsFrontendImpl::jsDebuggerPauseScript); debuggerCommandExecutorObj.build(); - - BoundObject devToolsHost(frameContext, this, "InspectorFrontendHost"); - devToolsHost.addProtoFunction( - "loaded", - WebDevToolsFrontendImpl::jsLoaded); - devToolsHost.addProtoFunction( - "platform", - WebDevToolsFrontendImpl::jsPlatform); - devToolsHost.addProtoFunction( - "port", - WebDevToolsFrontendImpl::jsPort); - devToolsHost.addProtoFunction( - "copyText", - WebDevToolsFrontendImpl::jsCopyText); - devToolsHost.addProtoFunction( - "activateWindow", - WebDevToolsFrontendImpl::jsActivateWindow); - devToolsHost.addProtoFunction( - "closeWindow", - WebDevToolsFrontendImpl::jsCloseWindow); - devToolsHost.addProtoFunction( - "attach", - WebDevToolsFrontendImpl::jsDockWindow); - devToolsHost.addProtoFunction( - "detach", - WebDevToolsFrontendImpl::jsUndockWindow); - devToolsHost.addProtoFunction( - "localizedStringsURL", - WebDevToolsFrontendImpl::jsLocalizedStringsURL); - devToolsHost.addProtoFunction( - "hiddenPanels", - WebDevToolsFrontendImpl::jsHiddenPanels); - devToolsHost.addProtoFunction( - "setting", - WebDevToolsFrontendImpl::jsSetting); - devToolsHost.addProtoFunction( - "setSetting", - WebDevToolsFrontendImpl::jsSetSetting); - devToolsHost.addProtoFunction( - "windowUnloading", - WebDevToolsFrontendImpl::jsWindowUnloading); - devToolsHost.addProtoFunction( - "showContextMenu", - WebDevToolsFrontendImpl::jsShowContextMenu); - devToolsHost.build(); } WebDevToolsFrontendImpl::~WebDevToolsFrontendImpl() { - if (m_menuProvider) - m_menuProvider->disconnect(); } void WebDevToolsFrontendImpl::dispatchMessageFromAgent(const WebDevToolsMessageData& data) @@ -184,6 +142,22 @@ void WebDevToolsFrontendImpl::dispatchMessageFromAgent(const WebDevToolsMessageD executeScript(v); } +void WebDevToolsFrontendImpl::frontendLoaded() +{ + m_loaded = true; + + // Grant the devtools page the ability to have source view iframes. + SecurityOrigin* origin = m_webViewImpl->page()->mainFrame()->domWindow()->securityOrigin(); + origin->grantUniversalAccess(); + + for (Vector<Vector<String> >::iterator it = m_pendingIncomingMessages.begin(); + it != m_pendingIncomingMessages.end(); + ++it) { + executeScript(*it); + } + m_pendingIncomingMessages.clear(); +} + void WebDevToolsFrontendImpl::executeScript(const Vector<String>& v) { WebFrameImpl* frame = m_webViewImpl->mainFrameImpl(); @@ -199,125 +173,11 @@ void WebDevToolsFrontendImpl::executeScript(const Vector<String>& v) function->Call(frameContext->Global(), args.size(), args.data()); } -void WebDevToolsFrontendImpl::dispatchOnWebInspector(const String& methodName, const String& param) -{ - WebFrameImpl* frame = m_webViewImpl->mainFrameImpl(); - v8::HandleScope scope; - v8::Handle<v8::Context> frameContext = V8Proxy::context(frame->frame()); - v8::Context::Scope contextScope(frameContext); - - v8::Handle<v8::Value> webInspector = frameContext->Global()->Get(v8::String::New("WebInspector")); - ASSERT(webInspector->IsObject()); - v8::Handle<v8::Object> webInspectorObj = v8::Handle<v8::Object>::Cast(webInspector); - - v8::Handle<v8::Value> method = webInspectorObj->Get(ToV8String(methodName)); - ASSERT(method->IsFunction()); - v8::Handle<v8::Function> methodFunc = v8::Handle<v8::Function>::Cast(method); - v8::Handle<v8::Value> args[] = { - ToV8String(param) - }; - methodFunc->Call(frameContext->Global(), 1, args); -} - void WebDevToolsFrontendImpl::sendRpcMessage(const WebDevToolsMessageData& data) { m_client->sendMessageToAgent(data); } -void WebDevToolsFrontendImpl::contextMenuItemSelected(ContextMenuItem* item) -{ - int itemNumber = item->action() - ContextMenuItemBaseCustomTag; - dispatchOnWebInspector("contextMenuItemSelected", String::number(itemNumber)); -} - -void WebDevToolsFrontendImpl::contextMenuCleared() -{ - dispatchOnWebInspector("contextMenuCleared", ""); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsLoaded(const v8::Arguments& args) -{ - WebDevToolsFrontendImpl* frontend = static_cast<WebDevToolsFrontendImpl*>(v8::External::Cast(*args.Data())->Value()); - frontend->m_loaded = true; - - // Grant the devtools page the ability to have source view iframes. - Page* page = V8Proxy::retrieveFrameForEnteredContext()->page(); - SecurityOrigin* origin = page->mainFrame()->domWindow()->securityOrigin(); - origin->grantUniversalAccess(); - - for (Vector<Vector<String> >::iterator it = frontend->m_pendingIncomingMessages.begin(); - it != frontend->m_pendingIncomingMessages.end(); - ++it) { - frontend->executeScript(*it); - } - frontend->m_pendingIncomingMessages.clear(); - return v8::Undefined(); -} - -// static -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsPlatform(const v8::Arguments& args) -{ -#if defined(OS_MACOSX) - return v8String("mac"); -#elif defined(OS_LINUX) - return v8String("linux"); -#elif defined(OS_WIN) - return v8String("windows"); -#else - return v8String("unknown"); -#endif -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsPort(const v8::Arguments& args) -{ - return v8::Undefined(); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsCopyText(const v8::Arguments& args) -{ - String text = WebCore::toWebCoreStringWithNullCheck(args[0]); - Pasteboard::generalPasteboard()->writePlainText(text); - return v8::Undefined(); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsActivateWindow(const v8::Arguments& args) -{ - WebDevToolsFrontendImpl* frontend = static_cast<WebDevToolsFrontendImpl*>(v8::External::Cast(*args.Data())->Value()); - frontend->m_client->activateWindow(); - return v8::Undefined(); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsCloseWindow(const v8::Arguments& args) -{ - WebDevToolsFrontendImpl* frontend = static_cast<WebDevToolsFrontendImpl*>(v8::External::Cast(*args.Data())->Value()); - frontend->m_client->closeWindow(); - return v8::Undefined(); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsDockWindow(const v8::Arguments& args) -{ - WebDevToolsFrontendImpl* frontend = static_cast<WebDevToolsFrontendImpl*>(v8::External::Cast(*args.Data())->Value()); - frontend->m_client->dockWindow(); - return v8::Undefined(); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsUndockWindow(const v8::Arguments& args) -{ - WebDevToolsFrontendImpl* frontend = static_cast<WebDevToolsFrontendImpl*>(v8::External::Cast(*args.Data())->Value()); - frontend->m_client->undockWindow(); - return v8::Undefined(); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsLocalizedStringsURL(const v8::Arguments& args) -{ - return v8::Undefined(); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsHiddenPanels(const v8::Arguments& args) -{ - return v8String(""); -} - v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsDebuggerCommand(const v8::Arguments& args) { WebDevToolsFrontendImpl* frontend = static_cast<WebDevToolsFrontendImpl*>(v8::External::Cast(*args.Data())->Value()); @@ -326,16 +186,6 @@ v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsDebuggerCommand(const v8::Argum return v8::Undefined(); } -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsSetting(const v8::Arguments& args) -{ - return v8::Undefined(); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsSetSetting(const v8::Arguments& args) -{ - return v8::Undefined(); -} - v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsDebuggerPauseScript(const v8::Arguments& args) { WebDevToolsFrontendImpl* frontend = static_cast<WebDevToolsFrontendImpl*>(v8::External::Cast(*args.Data())->Value()); @@ -343,53 +193,4 @@ v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsDebuggerPauseScript(const v8::A return v8::Undefined(); } -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsWindowUnloading(const v8::Arguments& args) -{ - // TODO(pfeldman): Implement this. - return v8::Undefined(); -} - -v8::Handle<v8::Value> WebDevToolsFrontendImpl::jsShowContextMenu(const v8::Arguments& args) -{ - if (args.Length() < 2) - return v8::Undefined(); - - v8::Local<v8::Object> eventWrapper = v8::Local<v8::Object>::Cast(args[0]); - if (V8DOMWrapper::domWrapperType(eventWrapper) != V8ClassIndex::MOUSEEVENT) - return v8::Undefined(); - - Event* event = V8Event::toNative(eventWrapper); - if (!args[1]->IsArray()) - return v8::Undefined(); - - v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(args[1]); - Vector<ContextMenuItem*> items; - - for (size_t i = 0; i < array->Length(); ++i) { - v8::Local<v8::Object> item = v8::Local<v8::Object>::Cast(array->Get(v8::Integer::New(i))); - v8::Local<v8::Value> label = item->Get(v8::String::New("label")); - v8::Local<v8::Value> id = item->Get(v8::String::New("id")); - if (label->IsUndefined() || id->IsUndefined()) { - items.append(new ContextMenuItem(SeparatorType, - ContextMenuItemTagNoAction, - String())); - } else { - ContextMenuAction typedId = static_cast<ContextMenuAction>( - ContextMenuItemBaseCustomTag + id->ToInt32()->Value()); - items.append(new ContextMenuItem(ActionType, - typedId, - toWebCoreStringWithNullCheck(label))); - } - } - - WebDevToolsFrontendImpl* frontend = static_cast<WebDevToolsFrontendImpl*>(v8::External::Cast(*args.Data())->Value()); - - frontend->m_menuProvider = MenuProvider::create(frontend, items); - - ContextMenuController* menuController = frontend->m_webViewImpl->page()->contextMenuController(); - menuController->showContextMenu(event, frontend->m_menuProvider); - - return v8::Undefined(); -} - } // namespace WebKit diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.h b/WebKit/chromium/src/WebDevToolsFrontendImpl.h index 62b34da..fa4707d 100644 --- a/WebKit/chromium/src/WebDevToolsFrontendImpl.h +++ b/WebKit/chromium/src/WebDevToolsFrontendImpl.h @@ -31,8 +31,6 @@ #ifndef WebDevToolsFrontendImpl_h #define WebDevToolsFrontendImpl_h -#include "ContextMenu.h" -#include "ContextMenuProvider.h" #include "DevToolsRPC.h" #include "WebDevToolsFrontend.h" #include <v8.h> @@ -74,76 +72,13 @@ public: // WebDevToolsFrontend implementation. virtual void dispatchMessageFromAgent(const WebKit::WebDevToolsMessageData& data); -private: - class MenuProvider : public WebCore::ContextMenuProvider { - public: - static PassRefPtr<MenuProvider> create(WebDevToolsFrontendImpl* frontendHost, const Vector<WebCore::ContextMenuItem*>& items) - { - return adoptRef(new MenuProvider(frontendHost, items)); - } - - virtual ~MenuProvider() - { - contextMenuCleared(); - } - - void disconnect() - { - m_frontendHost = 0; - } - - virtual void populateContextMenu(WebCore::ContextMenu* menu) - { - for (size_t i = 0; i < m_items.size(); ++i) - menu->appendItem(*m_items[i]); - } - - virtual void contextMenuItemSelected(WebCore::ContextMenuItem* item) - { - if (m_frontendHost) - m_frontendHost->contextMenuItemSelected(item); - } - - virtual void contextMenuCleared() - { - if (m_frontendHost) - m_frontendHost->contextMenuCleared(); - deleteAllValues(m_items); - m_items.clear(); - } - - private: - MenuProvider(WebDevToolsFrontendImpl* frontendHost, const Vector<WebCore::ContextMenuItem*>& items) - : m_frontendHost(frontendHost) - , m_items(items) { } - WebDevToolsFrontendImpl* m_frontendHost; - Vector<WebCore::ContextMenuItem*> m_items; - }; + void frontendLoaded(); +private: void executeScript(const Vector<String>& v); - void dispatchOnWebInspector(const String& method, const String& param); - - // friend class MenuSelectionHandler; - void contextMenuItemSelected(WebCore::ContextMenuItem* menuItem); - void contextMenuCleared(); - - static v8::Handle<v8::Value> jsLoaded(const v8::Arguments& args); - static v8::Handle<v8::Value> jsPlatform(const v8::Arguments& args); - static v8::Handle<v8::Value> jsPort(const v8::Arguments& args); - static v8::Handle<v8::Value> jsCopyText(const v8::Arguments& args); - static v8::Handle<v8::Value> jsActivateWindow(const v8::Arguments& args); - static v8::Handle<v8::Value> jsCloseWindow(const v8::Arguments& args); - static v8::Handle<v8::Value> jsDockWindow(const v8::Arguments& args); - static v8::Handle<v8::Value> jsUndockWindow(const v8::Arguments& args); - static v8::Handle<v8::Value> jsLocalizedStringsURL(const v8::Arguments& args); - static v8::Handle<v8::Value> jsHiddenPanels(const v8::Arguments& args); static v8::Handle<v8::Value> jsDebuggerCommand(const v8::Arguments& args); - static v8::Handle<v8::Value> jsSetting(const v8::Arguments& args); - static v8::Handle<v8::Value> jsSetSetting(const v8::Arguments& args); static v8::Handle<v8::Value> jsDebuggerPauseScript(const v8::Arguments& args); - static v8::Handle<v8::Value> jsWindowUnloading(const v8::Arguments& args); - static v8::Handle<v8::Value> jsShowContextMenu(const v8::Arguments& args); WebKit::WebViewImpl* m_webViewImpl; WebKit::WebDevToolsFrontendClient* m_client; @@ -153,7 +88,6 @@ private: OwnPtr<JSToolsAgentBoundObj> m_toolsAgentObj; bool m_loaded; Vector<Vector<String> > m_pendingIncomingMessages; - RefPtr<MenuProvider> m_menuProvider; }; } // namespace WebKit diff --git a/WebKit/chromium/src/WebDocument.cpp b/WebKit/chromium/src/WebDocument.cpp index 2a91e22..21e2bb8 100644 --- a/WebKit/chromium/src/WebDocument.cpp +++ b/WebKit/chromium/src/WebDocument.cpp @@ -32,7 +32,6 @@ #include "WebDocument.h" #include "Document.h" -#include "DocumentLoader.h" #include "Element.h" #include "HTMLAllCollection.h" #include "HTMLBodyElement.h" @@ -44,6 +43,7 @@ #include "WebElement.h" #include "WebFrameImpl.h" #include "WebNodeCollection.h" +#include "WebNodeList.h" #include "WebURL.h" #include <wtf/PassRefPtr.h> @@ -52,22 +52,6 @@ using namespace WebCore; namespace WebKit { -WebDocument::WebDocument(const PassRefPtr<Document>& elem) - : WebNode(elem) -{ -} - -WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem) -{ - WebNode::assign(elem.releaseRef()); - return *this; -} - -WebDocument::operator PassRefPtr<Document>() const -{ - return PassRefPtr<Document>(static_cast<Document*>(m_private)); -} - WebFrame* WebDocument::frame() const { return WebFrameImpl::fromFrame(constUnwrap<Document>()->frame()); @@ -78,11 +62,21 @@ bool WebDocument::isHTMLDocument() const return constUnwrap<Document>()->isHTMLDocument(); } +bool WebDocument::isPluginDocument() const +{ + return constUnwrap<Document>()->isPluginDocument(); +} + WebURL WebDocument::baseURL() const { return constUnwrap<Document>()->baseURL(); } +WebURL WebDocument::firstPartyForCookies() const +{ + return constUnwrap<Document>()->firstPartyForCookies(); +} + WebElement WebDocument::documentElement() const { return WebElement(constUnwrap<Document>()->documentElement()); @@ -118,38 +112,25 @@ WebElement WebDocument::getElementById(const WebString& id) const return WebElement(constUnwrap<Document>()->getElementById(id)); } -WebString WebDocument::applicationID() const +WebNode WebDocument::focusedNode() const +{ + return WebNode(constUnwrap<Document>()->focusedNode()); +} + +WebDocument::WebDocument(const PassRefPtr<Document>& elem) + : WebNode(elem) +{ +} + +WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem) +{ + m_private = elem; + return *this; +} + +WebDocument::operator PassRefPtr<Document>() const { - const char* kChromeApplicationHeader = "x-chrome-application"; - - // First check if the document's response included a header indicating the - // application it should go with. - const Document* document = constUnwrap<Document>(); - Frame* frame = document->frame(); - if (!frame) - return WebString(); - - DocumentLoader* loader = frame->loader()->documentLoader(); - if (!loader) - return WebString(); - - WebString headerValue = - loader->response().httpHeaderField(kChromeApplicationHeader); - if (!headerValue.isEmpty()) - return headerValue; - - // Otherwise, fall back to looking for the meta tag. - RefPtr<NodeList> metaTags = - const_cast<Document*>(document)->getElementsByTagName("meta"); - for (unsigned i = 0; i < metaTags->length(); ++i) { - Element* element = static_cast<Element*>(metaTags->item(i)); - if (element->getAttribute("http-equiv").lower() == - kChromeApplicationHeader) { - return element->getAttribute("value"); - } - } - - return WebString(); + return static_cast<Document*>(m_private.get()); } } // namespace WebKit diff --git a/WebKit/chromium/src/WebDragData.cpp b/WebKit/chromium/src/WebDragData.cpp index 2f476a7..643c35d 100644 --- a/WebKit/chromium/src/WebDragData.cpp +++ b/WebKit/chromium/src/WebDragData.cpp @@ -67,13 +67,13 @@ void WebDragData::assign(const WebDragData& other) WebURL WebDragData::url() const { ASSERT(!isNull()); - return m_private->url; + return m_private->getURL(); } void WebDragData::setURL(const WebURL& url) { ensureMutable(); - m_private->url = url; + m_private->setURL(url); } WebString WebDragData::urlTitle() const diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp index 6501771..3ed16e6 100644 --- a/WebKit/chromium/src/WebElement.cpp +++ b/WebKit/chromium/src/WebElement.cpp @@ -38,20 +38,9 @@ using namespace WebCore; namespace WebKit { -WebElement::WebElement(const WTF::PassRefPtr<WebCore::Element>& elem) - : WebNode(elem) -{ -} - -WebElement& WebElement::operator=(const WTF::PassRefPtr<WebCore::Element>& elem) -{ - WebNode::assign(elem.releaseRef()); - return *this; -} - -WebElement::operator WTF::PassRefPtr<Element>() const +bool WebElement::isFormControlElement() const { - return PassRefPtr<Element>(static_cast<Element*>(m_private)); + return constUnwrap<Element>()->isFormControlElement(); } WebString WebElement::tagName() const @@ -62,7 +51,7 @@ WebString WebElement::tagName() const bool WebElement::hasTagName(const WebString& tagName) const { return equalIgnoringCase(constUnwrap<Element>()->tagName(), - tagName.operator WebCore::String()); + tagName.operator String()); } bool WebElement::hasAttribute(const WebString& attrName) const @@ -87,5 +76,20 @@ WebString WebElement::innerText() const return constUnwrap<Element>()->innerText(); } -} // namespace WebKit +WebElement::WebElement(const PassRefPtr<Element>& elem) + : WebNode(elem) +{ +} + +WebElement& WebElement::operator=(const PassRefPtr<Element>& elem) +{ + m_private = elem; + return *this; +} +WebElement::operator PassRefPtr<Element>() const +{ + return static_cast<Element*>(m_private.get()); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebFormControlElement.cpp b/WebKit/chromium/src/WebFormControlElement.cpp new file mode 100644 index 0000000..0530776 --- /dev/null +++ b/WebKit/chromium/src/WebFormControlElement.cpp @@ -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: + * + * * 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 "WebFormControlElement.h" + +#include "HTMLFormControlElement.h" +#include <wtf/PassRefPtr.h> + +using namespace WebCore; + +namespace WebKit { + +bool WebFormControlElement::isEnabled() const +{ + return constUnwrap<HTMLFormControlElement>()->isEnabledFormControl(); +} + +WebString WebFormControlElement::formControlName() const +{ + return constUnwrap<HTMLFormControlElement>()->formControlName(); +} + +WebString WebFormControlElement::formControlType() const +{ + return constUnwrap<HTMLFormControlElement>()->formControlType(); +} + +WebString WebFormControlElement::nameForAutofill() const +{ + String name = constUnwrap<HTMLFormControlElement>()->name(); + String trimmedName = name.stripWhiteSpace(); + if (!trimmedName.isEmpty()) + return trimmedName; + name = constUnwrap<HTMLFormControlElement>()->getAttribute(HTMLNames::idAttr); + trimmedName = name.stripWhiteSpace(); + if (!trimmedName.isEmpty()) + return trimmedName; + return String(); +} + +WebFormControlElement::WebFormControlElement(const PassRefPtr<HTMLFormControlElement>& elem) + : WebElement(elem) +{ +} + +WebFormControlElement& WebFormControlElement::operator=(const PassRefPtr<HTMLFormControlElement>& elem) +{ + m_private = elem; + return *this; +} + +WebFormControlElement::operator PassRefPtr<HTMLFormControlElement>() const +{ + return static_cast<HTMLFormControlElement*>(m_private.get()); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebFormElement.cpp b/WebKit/chromium/src/WebFormElement.cpp index 0024892..610c36d 100644 --- a/WebKit/chromium/src/WebFormElement.cpp +++ b/WebKit/chromium/src/WebFormElement.cpp @@ -35,6 +35,8 @@ #include "HTMLFormElement.h" #include "HTMLInputElement.h" #include "HTMLNames.h" +#include "WebFormControlElement.h" +#include "WebInputElement.h" #include "WebString.h" #include "WebURL.h" #include <wtf/PassRefPtr.h> @@ -43,25 +45,6 @@ using namespace WebCore; namespace WebKit { -class WebFormPrivate : public HTMLFormElement { -}; - -WebFormElement::WebFormElement(const WTF::PassRefPtr<HTMLFormElement>& e) - : WebElement(e) -{ -} - -WebFormElement& WebFormElement::operator=(const WTF::PassRefPtr<HTMLFormElement>& e) -{ - WebNode::assign(e.releaseRef()); - return *this; -} - -WebFormElement::operator WTF::PassRefPtr<WebCore::HTMLFormElement>() const -{ - return PassRefPtr<HTMLFormElement>(static_cast<HTMLFormElement*>(m_private)); -} - bool WebFormElement::autoComplete() const { return constUnwrap<HTMLFormElement>()->autoComplete(); @@ -107,4 +90,32 @@ void WebFormElement::getInputElements(WebVector<WebInputElement>& result) const result.assign(tempVector); } +void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& result) const +{ + const HTMLFormElement* form = constUnwrap<HTMLFormElement>(); + Vector<RefPtr<HTMLFormControlElement> > tempVector; + for (size_t i = 0; i < form->formElements.size(); i++) { + if (form->formElements[i]->hasLocalName(HTMLNames::inputTag) + || form->formElements[i]->hasLocalName(HTMLNames::selectTag)) + tempVector.append(form->formElements[i]); + } + result.assign(tempVector); +} + +WebFormElement::WebFormElement(const PassRefPtr<HTMLFormElement>& e) + : WebElement(e) +{ +} + +WebFormElement& WebFormElement::operator=(const PassRefPtr<HTMLFormElement>& e) +{ + m_private = e; + return *this; +} + +WebFormElement::operator PassRefPtr<HTMLFormElement>() const +{ + return static_cast<HTMLFormElement*>(m_private.get()); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp index 665f6a3..7b6c8ce 100644 --- a/WebKit/chromium/src/WebFrameImpl.cpp +++ b/WebKit/chromium/src/WebFrameImpl.cpp @@ -101,6 +101,7 @@ #include "markup.h" #include "Page.h" #include "PlatformContextSkia.h" +#include "PluginDocument.h" #include "PrintContext.h" #include "RenderFrame.h" #include "RenderTreeAsText.h" @@ -130,6 +131,7 @@ #include "WebHistoryItem.h" #include "WebInputElement.h" #include "WebPasswordAutocompleteListener.h" +#include "WebPluginContainerImpl.h" #include "WebRange.h" #include "WebRect.h" #include "WebScriptSource.h" @@ -246,7 +248,20 @@ static void frameContentAsPlainText(size_t maxChars, Frame* frame, } } -// Simple class to override some of PrintContext behavior. +// If the frame hosts a PluginDocument, this method returns the WebPluginContainerImpl +// that hosts the plugin. +static WebPluginContainerImpl* pluginContainerFromFrame(Frame* frame) +{ + if (!frame) + return 0; + if (!frame->document() || !frame->document()->isPluginDocument()) + return 0; + PluginDocument* pluginDocument = static_cast<PluginDocument*>(frame->document()); + return static_cast<WebPluginContainerImpl *>(pluginDocument->pluginWidget()); +} + +// Simple class to override some of PrintContext behavior. Some of the methods +// made virtual so that they can be overriden by ChromePluginPrintContext. class ChromePrintContext : public PrintContext, public Noncopyable { public: ChromePrintContext(Frame* frame) @@ -255,28 +270,38 @@ public: { } - void begin(float width) + virtual void begin(float width) { ASSERT(!m_printedPageWidth); m_printedPageWidth = width; PrintContext::begin(m_printedPageWidth); } - float getPageShrink(int pageNumber) const + virtual void end() + { + PrintContext::end(); + } + + virtual float getPageShrink(int pageNumber) const { IntRect pageRect = m_pageRects[pageNumber]; return m_printedPageWidth / pageRect.width(); } - // Spools the printed page, a subrect of m_frame. Skip the scale step. + // Spools the printed page, a subrect of m_frame. Skip the scale step. // NativeTheme doesn't play well with scaling. Scaling is done browser side - // instead. Returns the scale to be applied. - float spoolPage(GraphicsContext& ctx, int pageNumber) + // instead. Returns the scale to be applied. + // On Linux, we don't have the problem with NativeTheme, hence we let WebKit + // do the scaling and ignore the return value. + virtual float spoolPage(GraphicsContext& ctx, int pageNumber) { IntRect pageRect = m_pageRects[pageNumber]; float scale = m_printedPageWidth / pageRect.width(); ctx.save(); +#if OS(LINUX) + ctx.scale(WebCore::FloatSize(scale, scale)); +#endif ctx.translate(static_cast<float>(-pageRect.x()), static_cast<float>(-pageRect.y())); ctx.clip(pageRect); @@ -285,11 +310,95 @@ public: return scale; } + virtual void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight) + { + return PrintContext::computePageRects(printRect, headerHeight, footerHeight, userScaleFactor, outPageHeight); + } + + virtual int pageCount() const + { + return PrintContext::pageCount(); + } + + virtual bool shouldUseBrowserOverlays() const + { + return true; + } + private: // Set when printing. float m_printedPageWidth; }; +// Simple class to override some of PrintContext behavior. This is used when +// the frame hosts a plugin that supports custom printing. In this case, we +// want to delegate all printing related calls to the plugin. +class ChromePluginPrintContext : public ChromePrintContext { +public: + ChromePluginPrintContext(Frame* frame, int printerDPI) + : ChromePrintContext(frame), m_pageCount(0), m_printerDPI(printerDPI) + { + // This HAS to be a frame hosting a full-mode plugin + ASSERT(frame->document()->isPluginDocument()); + } + + virtual void begin(float width) + { + } + + virtual void end() + { + WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(m_frame); + if (pluginContainer && pluginContainer->supportsPaginatedPrint()) + pluginContainer->printEnd(); + else + ASSERT_NOT_REACHED(); + } + + virtual float getPageShrink(int pageNumber) const + { + // We don't shrink the page (maybe we should ask the widget ??) + return 1.0; + } + + virtual void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight) + { + WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(m_frame); + if (pluginContainer && pluginContainer->supportsPaginatedPrint()) + m_pageCount = pluginContainer->printBegin(IntRect(printRect), m_printerDPI); + else + ASSERT_NOT_REACHED(); + } + + virtual int pageCount() const + { + return m_pageCount; + } + + // Spools the printed page, a subrect of m_frame. Skip the scale step. + // NativeTheme doesn't play well with scaling. Scaling is done browser side + // instead. Returns the scale to be applied. + virtual float spoolPage(GraphicsContext& ctx, int pageNumber) + { + WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(m_frame); + if (pluginContainer && pluginContainer->supportsPaginatedPrint()) + pluginContainer->printPage(pageNumber, &ctx); + else + ASSERT_NOT_REACHED(); + return 1.0; + } + + virtual bool shouldUseBrowserOverlays() const + { + return false; + } + +private: + // Set when printing. + int m_pageCount; + int m_printerDPI; +}; + static WebDataSource* DataSourceForDocLoader(DocumentLoader* loader) { return loader ? WebDataSourceImpl::fromDocumentLoader(loader) : 0; @@ -413,7 +522,7 @@ WebURL WebFrameImpl::openSearchDescriptionURL() const WebString WebFrameImpl::encoding() const { - return frame()->loader()->encoding(); + return frame()->loader()->writer()->encoding(); } WebSize WebFrameImpl::scrollOffset() const @@ -553,13 +662,18 @@ void WebFrameImpl::forms(WebVector<WebFormElement>& results) const return; RefPtr<HTMLCollection> forms = m_frame->document()->forms(); - size_t formCount = forms->length(); + size_t formCount = 0; + for (size_t i = 0; i < forms->length(); ++i) { + Node* node = forms->item(i); + if (node && node->isHTMLElement()) + ++formCount; + } WebVector<WebFormElement> temp(formCount); for (size_t i = 0; i < formCount; ++i) { Node* node = forms->item(i); // Strange but true, sometimes item can be 0. - if (node) + if (node && node->isHTMLElement()) temp[i] = static_cast<HTMLFormElement*>(node); } results.swap(temp); @@ -596,7 +710,7 @@ NPObject* WebFrameImpl::windowObject() const void WebFrameImpl::bindToWindowObject(const WebString& name, NPObject* object) { ASSERT(m_frame); - if (!m_frame || !m_frame->script()->canExecuteScripts()) + if (!m_frame || !m_frame->script()->canExecuteScripts(NotAboutToExecuteScript)) return; String key = name; @@ -670,6 +784,13 @@ void WebFrameImpl::collectGarbage() } #if USE(V8) +v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue( + const WebScriptSource& source) +{ + return m_frame->script()->executeScript( + ScriptSourceCode(source.code, source.url, source.startLine)).v8Value(); +} + // Returns the V8 context for this frame, or an empty handle if there is none. v8::Local<v8::Context> WebFrameImpl::mainWorldScriptContext() const { @@ -716,9 +837,6 @@ bool WebFrameImpl::insertStyleText( void WebFrameImpl::reload(bool ignoreCache) { m_frame->loader()->history()->saveDocumentAndScrollState(); - - stopLoading(); // Make sure existing activity stops. - m_frame->loader()->reload(ignoreCache); } @@ -732,7 +850,6 @@ void WebFrameImpl::loadRequest(const WebURLRequest& request) return; } - stopLoading(); // Make sure existing activity stops. m_frame->loader()->load(resourceRequest, false); } @@ -741,8 +858,6 @@ void WebFrameImpl::loadHistoryItem(const WebHistoryItem& item) RefPtr<HistoryItem> historyItem = PassRefPtr<HistoryItem>(item); ASSERT(historyItem.get()); - stopLoading(); // Make sure existing activity stops. - // If there is no currentItem, which happens when we are navigating in // session history after a crash, we need to manufacture one otherwise WebKit // hoarks. This is probably the wrong thing to do, but it seems to work. @@ -779,8 +894,6 @@ void WebFrameImpl::loadData(const WebData& data, request = m_frame->loader()->originalRequest(); request.setURL(baseURL); - stopLoading(); // Make sure existing activity stops. - m_frame->loader()->load(request, substData, false); if (replace) { // Do this to force WebKit to treat the load as replacing the currently @@ -848,7 +961,12 @@ WebHistoryItem WebFrameImpl::previousHistoryItem() const WebHistoryItem WebFrameImpl::currentHistoryItem() const { - m_frame->loader()->history()->saveDocumentAndScrollState(); + // If we are still loading, then we don't want to clobber the current + // history item as this could cause us to lose the scroll position and + // document state. However, it is OK for new navigations. + if (m_frame->loader()->loadType() == FrameLoadTypeStandard + || !m_frame->loader()->activeDocumentLoader()->isLoadingInAPISense()) + m_frame->loader()->history()->saveDocumentAndScrollState(); return WebHistoryItem(m_frame->page()->backForwardList()->currentItem()); } @@ -898,7 +1016,7 @@ void WebFrameImpl::commitDocumentData(const char* data, size_t dataLen) userChosen = false; encoding = documentLoader->response().textEncodingName(); } - m_frame->loader()->setEncoding(encoding, userChosen); + m_frame->loader()->writer()->setEncoding(encoding, userChosen); // NOTE: mac only does this if there is a document m_frame->loader()->addData(data, dataLen); @@ -1083,11 +1201,10 @@ void WebFrameImpl::selectWordAroundPosition(Frame* frame, VisiblePosition pos) VisibleSelection selection(pos); selection.expandUsingGranularity(WordGranularity); - if (selection.isRange()) - frame->setSelectionGranularity(WordGranularity); - - if (frame->shouldChangeSelection(selection)) - frame->selection()->setSelection(selection); + if (frame->shouldChangeSelection(selection)) { + TextGranularity granularity = selection.isRange() ? WordGranularity : CharacterGranularity; + frame->selection()->setSelection(selection, granularity); + } } bool WebFrameImpl::selectWordAroundCaret() @@ -1100,11 +1217,17 @@ bool WebFrameImpl::selectWordAroundCaret() return true; } -int WebFrameImpl::printBegin(const WebSize& pageSize) +int WebFrameImpl::printBegin(const WebSize& pageSize, int printerDPI, bool *useBrowserOverlays) { ASSERT(!frame()->document()->isFrameSet()); + // If this is a plugin document, check if the plugin supports its own + // printing. If it does, we will delegate all printing to that. + WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); + if (pluginContainer && pluginContainer->supportsPaginatedPrint()) + m_printContext.set(new ChromePluginPrintContext(frame(), printerDPI)); + else + m_printContext.set(new ChromePrintContext(frame())); - m_printContext.set(new ChromePrintContext(frame())); FloatRect rect(0, 0, static_cast<float>(pageSize.width), static_cast<float>(pageSize.height)); m_printContext->begin(rect.width()); @@ -1112,6 +1235,9 @@ int WebFrameImpl::printBegin(const WebSize& pageSize) // We ignore the overlays calculation for now since they are generated in the // browser. pageHeight is actually an output parameter. m_printContext->computePageRects(rect, 0, 0, 1.0, pageHeight); + if (useBrowserOverlays) + *useBrowserOverlays = m_printContext->shouldUseBrowserOverlays(); + return m_printContext->pageCount(); } @@ -1134,7 +1260,7 @@ float WebFrameImpl::printPage(int page, WebCanvas* canvas) return 0; } -#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) +#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) || OS(SOLARIS) PlatformContextSkia context(canvas); GraphicsContext spool(&context); #elif OS(DARWIN) @@ -1209,6 +1335,9 @@ bool WebFrameImpl::find(int identifier, executeCommand(WebString::fromUTF8("Unselect")); } + // Make sure no node is focused. See http://crbug.com/38700. + frame()->document()->setFocusedNode(0); + if (!options.findNext || activeSelection) { // This is either a Find operation or a Find-next from a new start point // due to a selection, so we set the flag to ask the scoping effort @@ -1534,6 +1663,14 @@ int WebFrameImpl::pageNumberForElementById(const WebString& id, return PrintContext::pageNumberForElement(element, pageSize); } +WebRect WebFrameImpl::selectionBoundsRect() const +{ + if (hasSelection()) + return IntRect(frame()->selectionBounds(false)); + + return WebRect(); +} + // WebFrameImpl public --------------------------------------------------------- PassRefPtr<WebFrameImpl> WebFrameImpl::create(WebFrameClient* client) @@ -1635,11 +1772,23 @@ void WebFrameImpl::layout() view->layoutIfNeededRecursive(); } +void WebFrameImpl::paintWithContext(GraphicsContext& gc, const WebRect& rect) +{ + IntRect dirtyRect(rect); + gc.save(); + if (m_frame->document() && frameView()) { + gc.clip(dirtyRect); + frameView()->paint(&gc, dirtyRect); + m_frame->page()->inspectorController()->drawNodeHighlight(gc); + } else + gc.fillRect(dirtyRect, Color::white, DeviceColorSpace); + gc.restore(); +} + void WebFrameImpl::paint(WebCanvas* canvas, const WebRect& rect) { if (rect.isEmpty()) return; - IntRect dirtyRect(rect); #if WEBKIT_USING_CG GraphicsContext gc(canvas); LocalCurrentGraphicsContext localContext(&gc); @@ -1651,14 +1800,7 @@ void WebFrameImpl::paint(WebCanvas* canvas, const WebRect& rect) #else notImplemented(); #endif - gc.save(); - if (m_frame->document() && frameView()) { - gc.clip(dirtyRect); - frameView()->paint(&gc, dirtyRect); - m_frame->page()->inspectorController()->drawNodeHighlight(gc); - } else - gc.fillRect(dirtyRect, Color::white, DeviceColorSpace); - gc.restore(); + paintWithContext(gc, rect); } void WebFrameImpl::createFrameView() @@ -1720,7 +1862,7 @@ WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) static_cast<HTMLFrameOwnerElement*>(element); return fromFrame(frameElement->contentFrame()); } - + WebViewImpl* WebFrameImpl::viewImpl() const { if (!m_frame) @@ -1795,9 +1937,9 @@ void WebFrameImpl::didFail(const ResourceError& error, bool wasProvisional) client()->didFailLoad(this, webError); } -void WebFrameImpl::setAllowsScrolling(bool flag) +void WebFrameImpl::setCanHaveScrollbars(bool canHaveScrollbars) { - m_frame->view()->setCanHaveScrollbars(flag); + m_frame->view()->setCanHaveScrollbars(canHaveScrollbars); } void WebFrameImpl::registerPasswordListener( @@ -1833,6 +1975,8 @@ void WebFrameImpl::invalidateArea(AreaToInvalidate area) if ((area & InvalidateContentArea) == InvalidateContentArea) { IntRect contentArea( view->x(), view->y(), view->visibleWidth(), view->visibleHeight()); + IntRect frameRect = view->frameRect(); + contentArea.move(-frameRect.topLeft().x(), -frameRect.topLeft().y()); view->invalidateRect(contentArea); } @@ -1842,6 +1986,8 @@ void WebFrameImpl::invalidateArea(AreaToInvalidate area) view->x() + view->visibleWidth(), view->y(), ScrollbarTheme::nativeTheme()->scrollbarThickness(), view->visibleHeight()); + IntRect frameRect = view->frameRect(); + scrollBarVert.move(-frameRect.topLeft().x(), -frameRect.topLeft().y()); view->invalidateRect(scrollBarVert); } } @@ -1975,12 +2121,13 @@ void WebFrameImpl::clearPasswordListeners() void WebFrameImpl::loadJavaScriptURL(const KURL& url) { - // This is copied from FrameLoader::executeIfJavaScriptURL. Unfortunately, - // we cannot just use that method since it is private, and it also doesn't - // quite behave as we require it to for bookmarklets. The key difference is - // that we need to suppress loading the string result from evaluating the JS - // URL if executing the JS URL resulted in a location change. We also allow - // a JS URL to be loaded even if scripts on the page are otherwise disabled. + // This is copied from ScriptController::executeIfJavaScriptURL. + // Unfortunately, we cannot just use that method since it is private, and + // it also doesn't quite behave as we require it to for bookmarklets. The + // key difference is that we need to suppress loading the string result + // from evaluating the JS URL if executing the JS URL resulted in a + // location change. We also allow a JS URL to be loaded even if scripts on + // the page are otherwise disabled. if (!m_frame->document() || !m_frame->page()) return; @@ -1996,9 +2143,9 @@ void WebFrameImpl::loadJavaScriptURL(const KURL& url) if (!m_frame->redirectScheduler()->locationChangePending()) { m_frame->loader()->stopAllLoaders(); - m_frame->loader()->begin(m_frame->loader()->url(), true, securityOrigin); - m_frame->loader()->write(scriptResult); - m_frame->loader()->end(); + m_frame->loader()->writer()->begin(m_frame->loader()->url(), true, securityOrigin); + m_frame->loader()->writer()->addData(scriptResult); + m_frame->loader()->writer()->end(); } } diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h index f23106c..08d3cc2 100644 --- a/WebKit/chromium/src/WebFrameImpl.h +++ b/WebKit/chromium/src/WebFrameImpl.h @@ -42,6 +42,7 @@ #include "WebAnimationControllerImpl.h" namespace WebCore { +class GraphicsContext; class HistoryItem; class KURL; class Node; @@ -88,7 +89,7 @@ public: virtual WebFrame* findChildByExpression(const WebString&) const; virtual WebDocument document() const; virtual void forms(WebVector<WebFormElement>&) const; - virtual WebAnimationController* animationController(); + virtual WebAnimationController* animationController(); virtual WebSecurityOrigin securityOrigin() const; virtual void grantUniversalAccess(); virtual NPObject* windowObject() const; @@ -100,6 +101,8 @@ public: virtual void addMessageToConsole(const WebConsoleMessage&); virtual void collectGarbage(); #if WEBKIT_USING_V8 + virtual v8::Handle<v8::Value> executeScriptAndReturnValue( + const WebScriptSource&); virtual v8::Local<v8::Context> mainWorldScriptContext() const; #endif virtual bool insertStyleText(const WebString& css, const WebString& id); @@ -142,7 +145,8 @@ public: virtual WebString selectionAsText() const; virtual WebString selectionAsMarkup() const; virtual bool selectWordAroundCaret(); - virtual int printBegin(const WebSize& pageSize); + virtual int printBegin(const WebSize& pageSize, int printerDPI, + bool* useBrowserOverlays); virtual float printPage(int pageToPrint, WebCanvas*); virtual float getPrintPageShrink(int page); virtual void printEnd(); @@ -167,6 +171,7 @@ public: virtual int pageNumberForElementById(const WebString& id, float pageWidthInPixels, float pageHeightInPixels) const; + virtual WebRect selectionBoundsRect() const; static PassRefPtr<WebFrameImpl> create(WebFrameClient* client); ~WebFrameImpl(); @@ -179,6 +184,7 @@ public: void layout(); void paint(WebCanvas*, const WebRect&); + void paintWithContext(WebCore::GraphicsContext&, const WebRect&); void createFrameView(); static WebFrameImpl* fromFrame(WebCore::Frame* frame); @@ -212,7 +218,7 @@ public: // Sets whether the WebFrameImpl allows its document to be scrolled. // If the parameter is true, allow the document to be scrolled. // Otherwise, disallow scrolling. - void setAllowsScrolling(bool); + void setCanHaveScrollbars(bool); // Returns the password autocomplete listener associated with the passed // user name input element, or 0 if none available. diff --git a/WebKit/chromium/src/GeolocationServiceBridgeChromium.cpp b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp index abbb9c6..07f09da 100644 --- a/WebKit/chromium/src/GeolocationServiceBridgeChromium.cpp +++ b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp @@ -29,8 +29,7 @@ */ #include "config.h" - -#include "GeolocationServiceBridgeChromium.h" +#include "WebGeolocationServiceBridgeImpl.h" #include "Chrome.h" #include "ChromeClientImpl.h" @@ -43,6 +42,8 @@ #include "PositionOptions.h" #include "WebFrame.h" #include "WebFrameImpl.h" +#include "WebGeolocationService.h" +#include "WebGeolocationServiceBridge.h" #include "WebViewClient.h" #include "WebViewImpl.h" @@ -61,10 +62,10 @@ using WebCore::String; namespace WebKit { -class GeolocationServiceBridgeImpl : public GeolocationServiceBridge, public WebGeolocationServiceBridge { +class WebGeolocationServiceBridgeImpl : public GeolocationServiceBridge, public WebGeolocationServiceBridge { public: - explicit GeolocationServiceBridgeImpl(GeolocationServiceChromium*); - virtual ~GeolocationServiceBridgeImpl(); + explicit WebGeolocationServiceBridgeImpl(GeolocationServiceChromium*); + virtual ~WebGeolocationServiceBridgeImpl(); // GeolocationServiceBridge virtual bool startUpdating(PositionOptions*); @@ -88,83 +89,82 @@ private: GeolocationServiceBridge* createGeolocationServiceBridgeImpl(GeolocationServiceChromium* geolocationServiceChromium) { - return new GeolocationServiceBridgeImpl(geolocationServiceChromium); + return new WebGeolocationServiceBridgeImpl(geolocationServiceChromium); } -GeolocationServiceBridgeImpl::GeolocationServiceBridgeImpl(GeolocationServiceChromium* geolocationServiceChromium) +WebGeolocationServiceBridgeImpl::WebGeolocationServiceBridgeImpl(GeolocationServiceChromium* geolocationServiceChromium) : m_GeolocationServiceChromium(geolocationServiceChromium) { // We need to attach ourselves here: Geolocation calls requestPermissionForFrame() // directly, and we need to be attached so that the embedder can call // our setIsAllowed(). - m_bridgeId = getWebViewClient()->getGeolocationService()->attachBridge(this); + m_bridgeId = getWebViewClient()->geolocationService()->attachBridge(this); ASSERT(m_bridgeId); } -GeolocationServiceBridgeImpl::~GeolocationServiceBridgeImpl() +WebGeolocationServiceBridgeImpl::~WebGeolocationServiceBridgeImpl() { WebKit::WebViewClient* webViewClient = getWebViewClient(); // Geolocation has an OwnPtr to us, and it's destroyed after the frame has // been potentially disconnected. In this case, it calls stopUpdating() - // has been called and we have already dettached ourselves. - if (!webViewClient) { + // has been called and we have already detached ourselves. + if (!webViewClient) ASSERT(!m_bridgeId); - } else if (m_bridgeId) - webViewClient->getGeolocationService()->dettachBridge(m_bridgeId); + else if (m_bridgeId) + webViewClient->geolocationService()->detachBridge(m_bridgeId); } -bool GeolocationServiceBridgeImpl::startUpdating(PositionOptions* positionOptions) +bool WebGeolocationServiceBridgeImpl::startUpdating(PositionOptions* positionOptions) { if (!m_bridgeId) - m_bridgeId = getWebViewClient()->getGeolocationService()->attachBridge(this); - getWebViewClient()->getGeolocationService()->startUpdating(m_bridgeId, positionOptions->enableHighAccuracy()); - //// FIXME: this will trigger a permission request regardless. - //// Is it correct? confirm with andreip. - // positionChanged(); + m_bridgeId = getWebViewClient()->geolocationService()->attachBridge(this); + getWebViewClient()->geolocationService()->startUpdating(m_bridgeId, m_GeolocationServiceChromium->frame()->document()->url(), positionOptions->enableHighAccuracy()); return true; } -void GeolocationServiceBridgeImpl::stopUpdating() +void WebGeolocationServiceBridgeImpl::stopUpdating() { - if (m_bridgeId) { - WebGeolocationServiceInterface* geolocationService = getWebViewClient()->getGeolocationService(); + WebViewClient* webViewClient = getWebViewClient(); + if (m_bridgeId && webViewClient) { + WebGeolocationService* geolocationService = webViewClient->geolocationService(); geolocationService->stopUpdating(m_bridgeId); - geolocationService->dettachBridge(m_bridgeId); - m_bridgeId = 0; + geolocationService->detachBridge(m_bridgeId); } + m_bridgeId = 0; } -void GeolocationServiceBridgeImpl::suspend() +void WebGeolocationServiceBridgeImpl::suspend() { - getWebViewClient()->getGeolocationService()->suspend(m_bridgeId); + getWebViewClient()->geolocationService()->suspend(m_bridgeId); } -void GeolocationServiceBridgeImpl::resume() +void WebGeolocationServiceBridgeImpl::resume() { - getWebViewClient()->getGeolocationService()->resume(m_bridgeId); + getWebViewClient()->geolocationService()->resume(m_bridgeId); } -int GeolocationServiceBridgeImpl::getBridgeId() const +int WebGeolocationServiceBridgeImpl::getBridgeId() const { return m_bridgeId; } -void GeolocationServiceBridgeImpl::setIsAllowed(bool allowed) +void WebGeolocationServiceBridgeImpl::setIsAllowed(bool allowed) { m_GeolocationServiceChromium->setIsAllowed(allowed); } -void GeolocationServiceBridgeImpl::setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp) +void WebGeolocationServiceBridgeImpl::setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp) { - m_GeolocationServiceChromium->setLastPosition(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed, timestamp); + RefPtr<Geoposition> geoposition = Geoposition::create(Coordinates::create(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed), timestamp); + m_GeolocationServiceChromium->setLastPosition(geoposition); } -void GeolocationServiceBridgeImpl::setLastError(int errorCode, const WebString& message) +void WebGeolocationServiceBridgeImpl::setLastError(int errorCode, const WebString& message) { m_GeolocationServiceChromium->setLastError(errorCode, message); } -WebViewClient* GeolocationServiceBridgeImpl::getWebViewClient() +WebViewClient* WebGeolocationServiceBridgeImpl::getWebViewClient() { Frame* frame = m_GeolocationServiceChromium->frame(); if (!frame || !frame->page()) diff --git a/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.h b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.h new file mode 100644 index 0000000..2c37bcb --- /dev/null +++ b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.h @@ -0,0 +1,43 @@ +/* + * 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 WebGeolocationServiceBridgeImpl_h +#define WebGeolocationServiceBridgeImpl_h + +namespace WebCore { +class GeolocationServiceBridge; +class GeolocationServiceChromium; +} + +namespace WebKit { +WebCore::GeolocationServiceBridge* createGeolocationServiceBridgeImpl(WebCore::GeolocationServiceChromium*); +} // namespace WebKit + +#endif // WebGeolocationServiceBridgeImpl_h diff --git a/WebKit/chromium/src/WebGraphicsContext3D.cpp b/WebKit/chromium/src/WebGraphicsContext3D.cpp new file mode 100644 index 0000000..bc23703 --- /dev/null +++ b/WebKit/chromium/src/WebGraphicsContext3D.cpp @@ -0,0 +1,51 @@ +/* + * 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 "WebGraphicsContext3D.h" + +#if ENABLE(3D_CANVAS) + +#include "WebGraphicsContext3DDefaultImpl.h" + +namespace WebKit { + +WebGraphicsContext3D* WebGraphicsContext3D::createDefault() +{ +#if ENABLE(3D_CANVAS) + return new WebGraphicsContext3DDefaultImpl(); +#else + return 0; +#endif +} + +} // namespace WebKit + +#endif // ENABLE(3D_CANVAS) diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp new file mode 100644 index 0000000..2ff1c11 --- /dev/null +++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp @@ -0,0 +1,1399 @@ +/* + * 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" + +#if ENABLE(3D_CANVAS) + +#include <stdio.h> +#include <string.h> + +#include "WebGraphicsContext3DDefaultImpl.h" + +#include "NotImplemented.h" + +#if OS(LINUX) +#include <dlfcn.h> +#endif + +namespace WebKit { + +// Uncomment this to render to a separate window for debugging +// #define RENDER_TO_DEBUGGING_WINDOW + +#if OS(DARWIN) +#define USE_TEXTURE_RECTANGLE_FOR_FRAMEBUFFER +#endif + +bool WebGraphicsContext3DDefaultImpl::s_initializedGLEW = false; + +#if OS(LINUX) +WebGraphicsContext3DDefaultImpl::GLConnection* WebGraphicsContext3DDefaultImpl::s_gl = 0; + +WebGraphicsContext3DDefaultImpl::GLConnection* WebGraphicsContext3DDefaultImpl::GLConnection::create() +{ + Display* dpy = XOpenDisplay(0); + if (!dpy) { + printf("GraphicsContext3D: error opening X display\n"); + return 0; + } + + // We use RTLD_GLOBAL semantics so that GLEW initialization works; + // GLEW expects to be able to open the current process's handle + // and do dlsym's of GL entry points from there. + void* libGL = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); + if (!libGL) { + XCloseDisplay(dpy); + printf("GraphicsContext3D: error opening libGL.so.1: %s\n", dlerror()); + return 0; + } + + PFNGLXCHOOSEFBCONFIGPROC chooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) dlsym(libGL, "glXChooseFBConfig"); + PFNGLXCREATENEWCONTEXTPROC createNewContext = (PFNGLXCREATENEWCONTEXTPROC) dlsym(libGL, "glXCreateNewContext"); + PFNGLXCREATEPBUFFERPROC createPbuffer = (PFNGLXCREATEPBUFFERPROC) dlsym(libGL, "glXCreatePbuffer"); + PFNGLXDESTROYPBUFFERPROC destroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) dlsym(libGL, "glXDestroyPbuffer"); + PFNGLXMAKECURRENTPROC makeCurrent = (PFNGLXMAKECURRENTPROC) dlsym(libGL, "glXMakeCurrent"); + PFNGLXDESTROYCONTEXTPROC destroyContext = (PFNGLXDESTROYCONTEXTPROC) dlsym(libGL, "glXDestroyContext"); + PFNGLXGETCURRENTCONTEXTPROC getCurrentContext = (PFNGLXGETCURRENTCONTEXTPROC) dlsym(libGL, "glXGetCurrentContext"); + if (!chooseFBConfig || !createNewContext || !createPbuffer + || !destroyPbuffer || !makeCurrent || !destroyContext + || !getCurrentContext) { + XCloseDisplay(dpy); + dlclose(libGL); + printf("GraphicsContext3D: error looking up bootstrapping entry points\n"); + return 0; + } + return new GLConnection(dpy, + libGL, + chooseFBConfig, + createNewContext, + createPbuffer, + destroyPbuffer, + makeCurrent, + destroyContext, + getCurrentContext); +} + +WebGraphicsContext3DDefaultImpl::GLConnection::~GLConnection() +{ + XCloseDisplay(m_display); + dlclose(m_libGL); +} + +#endif // OS(LINUX) + +WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerState() + : enabled(false) + , buffer(0) + , indx(0) + , size(0) + , type(0) + , normalized(false) + , stride(0) + , offset(0) +{ +} + +WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl() + : m_initialized(false) + , m_texture(0) + , m_fbo(0) + , m_depthStencilBuffer(0) + , m_multisampleFBO(0) + , m_multisampleDepthStencilBuffer(0) + , m_multisampleColorBuffer(0) + , m_boundFBO(0) +#ifdef FLIP_FRAMEBUFFER_VERTICALLY + , m_scanline(0) +#endif + , m_boundArrayBuffer(0) +#if OS(WINDOWS) + , m_canvasWindow(0) + , m_canvasDC(0) + , m_contextObj(0) +#elif PLATFORM(CG) + , m_pbuffer(0) + , m_contextObj(0) + , m_renderOutput(0) +#elif OS(LINUX) + , m_contextObj(0) + , m_pbuffer(0) +#else +#error Must port to your platform +#endif +{ +} + +WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl() +{ + if (m_initialized) { + makeContextCurrent(); +#ifndef RENDER_TO_DEBUGGING_WINDOW + if (m_attributes.antialias) { + glDeleteRenderbuffersEXT(1, &m_multisampleColorBuffer); + if (m_attributes.depth || m_attributes.stencil) + glDeleteRenderbuffersEXT(1, &m_multisampleDepthStencilBuffer); + glDeleteFramebuffersEXT(1, &m_multisampleFBO); + } else { + if (m_attributes.depth || m_attributes.stencil) + glDeleteRenderbuffersEXT(1, &m_depthStencilBuffer); + } + glDeleteTextures(1, &m_texture); +#ifdef FLIP_FRAMEBUFFER_VERTICALLY + if (m_scanline) + delete[] m_scanline; +#endif + glDeleteFramebuffersEXT(1, &m_fbo); +#endif // !RENDER_TO_DEBUGGING_WINDOW +#if OS(WINDOWS) + wglMakeCurrent(0, 0); + wglDeleteContext(m_contextObj); + ReleaseDC(m_canvasWindow, m_canvasDC); + DestroyWindow(m_canvasWindow); +#elif PLATFORM(CG) + CGLSetCurrentContext(0); + CGLDestroyContext(m_contextObj); + CGLDestroyPBuffer(m_pbuffer); + if (m_renderOutput) + delete[] m_renderOutput; +#elif OS(LINUX) + s_gl->makeCurrent(0, 0); + s_gl->destroyContext(m_contextObj); + s_gl->destroyPbuffer(m_pbuffer); +#else +#error Must port to your platform +#endif + m_contextObj = 0; + } +} + +bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attributes attributes) +{ +#if OS(WINDOWS) + WNDCLASS wc; + if (!GetClassInfo(GetModuleHandle(0), L"CANVASGL", &wc)) { + ZeroMemory(&wc, sizeof(WNDCLASS)); + wc.style = CS_OWNDC; + wc.hInstance = GetModuleHandle(0); + wc.lpfnWndProc = DefWindowProc; + wc.lpszClassName = L"CANVASGL"; + + if (!RegisterClass(&wc)) { + printf("WebGraphicsContext3DDefaultImpl: RegisterClass failed\n"); + return false; + } + } + + m_canvasWindow = CreateWindow(L"CANVASGL", L"CANVASGL", + WS_CAPTION, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + CW_USEDEFAULT, 0, 0, GetModuleHandle(0), 0); + if (!m_canvasWindow) { + printf("WebGraphicsContext3DDefaultImpl: CreateWindow failed\n"); + return false; + } + + // get the device context + m_canvasDC = GetDC(m_canvasWindow); + if (!m_canvasDC) { + printf("WebGraphicsContext3DDefaultImpl: GetDC failed\n"); + return false; + } + + // find default pixel format + PIXELFORMATDESCRIPTOR pfd; + ZeroMemory(&pfd, sizeof(PIXELFORMATDESCRIPTOR)); + pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); + pfd.nVersion = 1; +#ifdef RENDER_TO_DEBUGGING_WINDOW + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; +#else + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL; +#endif + int pixelformat = ChoosePixelFormat(m_canvasDC, &pfd); + + // set the pixel format for the dc + if (!SetPixelFormat(m_canvasDC, pixelformat, &pfd)) { + printf("WebGraphicsContext3DDefaultImpl: SetPixelFormat failed\n"); + return false; + } + + // create rendering context + m_contextObj = wglCreateContext(m_canvasDC); + if (!m_contextObj) { + printf("WebGraphicsContext3DDefaultImpl: wglCreateContext failed\n"); + return false; + } + + if (!wglMakeCurrent(m_canvasDC, m_contextObj)) { + printf("WebGraphicsContext3DDefaultImpl: wglMakeCurrent failed\n"); + return false; + } + +#ifdef RENDER_TO_DEBUGGING_WINDOW + typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); + PFNWGLSWAPINTERVALEXTPROC setSwapInterval = 0; + setSwapInterval = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress("wglSwapIntervalEXT"); + if (setSwapInterval) + setSwapInterval(1); +#endif // RENDER_TO_DEBUGGING_WINDOW + +#elif PLATFORM(CG) + // Create a 1x1 pbuffer and associated context to bootstrap things + CGLPixelFormatAttribute attribs[] = { + (CGLPixelFormatAttribute) kCGLPFAPBuffer, + (CGLPixelFormatAttribute) 0 + }; + CGLPixelFormatObj pixelFormat; + GLint numPixelFormats; + if (CGLChoosePixelFormat(attribs, &pixelFormat, &numPixelFormats) != kCGLNoError) { + printf("WebGraphicsContext3DDefaultImpl: error choosing pixel format\n"); + return false; + } + if (!pixelFormat) { + printf("WebGraphicsContext3DDefaultImpl: no pixel format selected\n"); + return false; + } + CGLContextObj context; + CGLError res = CGLCreateContext(pixelFormat, 0, &context); + CGLDestroyPixelFormat(pixelFormat); + if (res != kCGLNoError) { + printf("WebGraphicsContext3DDefaultImpl: error creating context\n"); + return false; + } + CGLPBufferObj pbuffer; + if (CGLCreatePBuffer(1, 1, GL_TEXTURE_2D, GL_RGBA, 0, &pbuffer) != kCGLNoError) { + CGLDestroyContext(context); + printf("WebGraphicsContext3DDefaultImpl: error creating pbuffer\n"); + return false; + } + if (CGLSetPBuffer(context, pbuffer, 0, 0, 0) != kCGLNoError) { + CGLDestroyContext(context); + CGLDestroyPBuffer(pbuffer); + printf("WebGraphicsContext3DDefaultImpl: error attaching pbuffer to context\n"); + return false; + } + if (CGLSetCurrentContext(context) != kCGLNoError) { + CGLDestroyContext(context); + CGLDestroyPBuffer(pbuffer); + printf("WebGraphicsContext3DDefaultImpl: error making context current\n"); + return false; + } + m_pbuffer = pbuffer; + m_contextObj = context; +#elif OS(LINUX) + if (!s_gl) { + s_gl = GLConnection::create(); + if (!s_gl) + return false; + } + + int configAttrs[] = { + GLX_DRAWABLE_TYPE, + GLX_PBUFFER_BIT, + GLX_RENDER_TYPE, + GLX_RGBA_BIT, + GLX_DOUBLEBUFFER, + 0, + 0 + }; + int nelements = 0; + GLXFBConfig* config = s_gl->chooseFBConfig(0, configAttrs, &nelements); + if (!config) { + printf("WebGraphicsContext3DDefaultImpl: glXChooseFBConfig failed\n"); + return false; + } + if (!nelements) { + printf("WebGraphicsContext3DDefaultImpl: glXChooseFBConfig returned 0 elements\n"); + XFree(config); + return false; + } + GLXContext context = s_gl->createNewContext(config[0], GLX_RGBA_TYPE, 0, True); + if (!context) { + printf("WebGraphicsContext3DDefaultImpl: glXCreateNewContext failed\n"); + XFree(config); + return false; + } + int pbufferAttrs[] = { + GLX_PBUFFER_WIDTH, + 1, + GLX_PBUFFER_HEIGHT, + 1, + 0 + }; + GLXPbuffer pbuffer = s_gl->createPbuffer(config[0], pbufferAttrs); + XFree(config); + if (!pbuffer) { + printf("WebGraphicsContext3DDefaultImpl: glxCreatePbuffer failed\n"); + return false; + } + if (!s_gl->makeCurrent(pbuffer, context)) { + printf("WebGraphicsContext3DDefaultImpl: glXMakeCurrent failed\n"); + return false; + } + m_contextObj = context; + m_pbuffer = pbuffer; +#else +#error Must port to your platform +#endif + + if (!s_initializedGLEW) { + // Initialize GLEW and check for GL 2.0 support by the drivers. + GLenum glewInitResult = glewInit(); + if (glewInitResult != GLEW_OK) { + printf("WebGraphicsContext3DDefaultImpl: GLEW initialization failed\n"); + return false; + } + if (!glewIsSupported("GL_VERSION_2_0")) { + printf("WebGraphicsContext3DDefaultImpl: OpenGL 2.0 not supported\n"); + return false; + } + s_initializedGLEW = true; + } + + m_attributes = attributes; + validateAttributes(); + + glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); + m_initialized = true; + return true; +} + +void WebGraphicsContext3DDefaultImpl::validateAttributes() +{ + const char* extensions = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); + + if (m_attributes.stencil) { + if (strstr(extensions, "GL_EXT_packed_depth_stencil")) { + if (!m_attributes.depth) + m_attributes.depth = true; + } else + m_attributes.stencil = false; + } + if (m_attributes.antialias) { + bool isValidVendor = true; +#if PLATFORM(CG) + // Currently in Mac we only turn on antialias if vendor is NVIDIA. + const char* vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR)); + if (!strstr(vendor, "NVIDIA")) + isValidVendor = false; +#endif + if (!isValidVendor || !strstr(extensions, "GL_EXT_framebuffer_multisample")) + m_attributes.antialias = false; + } + // FIXME: instead of enforcing premultipliedAlpha = true, implement the + // correct behavior when premultipliedAlpha = false is requested. + m_attributes.premultipliedAlpha = true; +} + +bool WebGraphicsContext3DDefaultImpl::makeContextCurrent() +{ +#if OS(WINDOWS) + if (wglGetCurrentContext() != m_contextObj) + if (wglMakeCurrent(m_canvasDC, m_contextObj)) + return true; +#elif PLATFORM(CG) + if (CGLGetCurrentContext() != m_contextObj) + if (CGLSetCurrentContext(m_contextObj) == kCGLNoError) + return true; +#elif OS(LINUX) + if (s_gl->getCurrentContext() != m_contextObj) + if (s_gl->makeCurrent(m_pbuffer, m_contextObj)) + return true; +#else +#error Must port to your platform +#endif + return false; +} + +int WebGraphicsContext3DDefaultImpl::width() +{ + return m_cachedWidth; +} + +int WebGraphicsContext3DDefaultImpl::height() +{ + return m_cachedHeight; +} + +int WebGraphicsContext3DDefaultImpl::sizeInBytes(int type) +{ + switch (type) { + case GL_BYTE: + return sizeof(GLbyte); + case GL_UNSIGNED_BYTE: + return sizeof(GLubyte); + case GL_SHORT: + return sizeof(GLshort); + case GL_UNSIGNED_SHORT: + return sizeof(GLushort); + case GL_INT: + return sizeof(GLint); + case GL_UNSIGNED_INT: + return sizeof(GLuint); + case GL_FLOAT: + return sizeof(GLfloat); + } + return 0; +} + +static int createTextureObject(GLenum target) +{ + GLuint texture = 0; + glGenTextures(1, &texture); + glBindTexture(target, texture); + glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + return texture; +} + +void WebGraphicsContext3DDefaultImpl::reshape(int width, int height) +{ +#ifdef RENDER_TO_DEBUGGING_WINDOW + SetWindowPos(m_canvasWindow, HWND_TOP, 0, 0, width, height, + SWP_NOMOVE); + ShowWindow(m_canvasWindow, SW_SHOW); +#endif + + m_cachedWidth = width; + m_cachedHeight = height; + makeContextCurrent(); + +#ifndef RENDER_TO_DEBUGGING_WINDOW +#ifdef USE_TEXTURE_RECTANGLE_FOR_FRAMEBUFFER + // GL_TEXTURE_RECTANGLE_ARB is the best supported render target on Mac OS X + GLenum target = GL_TEXTURE_RECTANGLE_ARB; +#else + GLenum target = GL_TEXTURE_2D; +#endif + if (!m_texture) { + // Generate the texture object + m_texture = createTextureObject(target); + // Generate the framebuffer object + glGenFramebuffersEXT(1, &m_fbo); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + m_boundFBO = m_fbo; + if (m_attributes.depth || m_attributes.stencil) + glGenRenderbuffersEXT(1, &m_depthStencilBuffer); + // Generate the multisample framebuffer object + if (m_attributes.antialias) { + glGenFramebuffersEXT(1, &m_multisampleFBO); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_multisampleFBO); + m_boundFBO = m_multisampleFBO; + glGenRenderbuffersEXT(1, &m_multisampleColorBuffer); + if (m_attributes.depth || m_attributes.stencil) + glGenRenderbuffersEXT(1, &m_multisampleDepthStencilBuffer); + } + } + + GLint internalColorFormat, colorFormat, internalDepthStencilFormat = 0; + if (m_attributes.alpha) { + internalColorFormat = GL_RGBA8; + colorFormat = GL_RGBA; + } else { + internalColorFormat = GL_RGB8; + colorFormat = GL_RGB; + } + if (m_attributes.stencil || m_attributes.depth) { + // We don't allow the logic where stencil is required and depth is not. + // See GraphicsContext3DInternal constructor. + if (m_attributes.stencil && m_attributes.depth) + internalDepthStencilFormat = GL_DEPTH24_STENCIL8_EXT; + else + internalDepthStencilFormat = GL_DEPTH_COMPONENT; + } + + bool mustRestoreFBO = false; + + // Resize multisampling FBO + if (m_attributes.antialias) { + GLint maxSampleCount; + glGetIntegerv(GL_MAX_SAMPLES_EXT, &maxSampleCount); + GLint sampleCount = std::min(8, maxSampleCount); + if (m_boundFBO != m_multisampleFBO) { + mustRestoreFBO = true; + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_multisampleFBO); + } + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_multisampleColorBuffer); + glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, sampleCount, internalColorFormat, width, height); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, m_multisampleColorBuffer); + if (m_attributes.stencil || m_attributes.depth) { + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_multisampleDepthStencilBuffer); + glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, sampleCount, internalDepthStencilFormat, width, height); + if (m_attributes.stencil) + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_multisampleDepthStencilBuffer); + if (m_attributes.depth) + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_multisampleDepthStencilBuffer); + } + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0); + GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { + printf("GraphicsContext3D: multisampling framebuffer was incomplete\n"); + + // FIXME: cleanup. + notImplemented(); + } + } + + // Resize regular FBO + if (m_boundFBO != m_fbo) { + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + mustRestoreFBO = true; + } + glBindTexture(target, m_texture); + glTexImage2D(target, 0, internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0); + glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, target, m_texture, 0); + glBindTexture(target, 0); + if (!m_attributes.antialias && (m_attributes.stencil || m_attributes.depth)) { + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_depthStencilBuffer); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, internalDepthStencilFormat, width, height); + if (m_attributes.stencil) + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_depthStencilBuffer); + if (m_attributes.depth) + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_depthStencilBuffer); + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0); + } + GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { + printf("WebGraphicsContext3DDefaultImpl: framebuffer was incomplete\n"); + + // FIXME: cleanup. + notImplemented(); + } + + if (mustRestoreFBO) + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); +#endif // RENDER_TO_DEBUGGING_WINDOW + +#ifdef FLIP_FRAMEBUFFER_VERTICALLY + if (m_scanline) { + delete[] m_scanline; + m_scanline = 0; + } + m_scanline = new unsigned char[width * 4]; +#endif // FLIP_FRAMEBUFFER_VERTICALLY + + GLbitfield clearMask = GL_COLOR_BUFFER_BIT; + if (m_attributes.stencil) + clearMask |= GL_STENCIL_BUFFER_BIT; + if (m_attributes.depth) + clearMask |= GL_DEPTH_BUFFER_BIT; + glClear(clearMask); +} + +#ifdef FLIP_FRAMEBUFFER_VERTICALLY +void WebGraphicsContext3DDefaultImpl::flipVertically(unsigned char* framebuffer, + unsigned int width, + unsigned int height) +{ + unsigned char* scanline = m_scanline; + if (!scanline) + return; + unsigned int rowBytes = width * 4; + unsigned int count = height / 2; + for (unsigned int i = 0; i < count; i++) { + unsigned char* rowA = framebuffer + i * rowBytes; + unsigned char* rowB = framebuffer + (height - i - 1) * rowBytes; + // FIXME: this is where the multiplication of the alpha + // channel into the color buffer will need to occur if the + // user specifies the "premultiplyAlpha" flag in the context + // creation attributes. + memcpy(scanline, rowB, rowBytes); + memcpy(rowB, rowA, rowBytes); + memcpy(rowA, scanline, rowBytes); + } +} +#endif + +bool WebGraphicsContext3DDefaultImpl::readBackFramebuffer(unsigned char* pixels, size_t bufferSize) +{ + if (bufferSize != static_cast<size_t>(4 * width() * height())) + return false; + + makeContextCurrent(); + +#ifdef RENDER_TO_DEBUGGING_WINDOW + SwapBuffers(m_canvasDC); +#else + // Earlier versions of this code used the GPU to flip the + // framebuffer vertically before reading it back for compositing + // via software. This code was quite complicated, used a lot of + // GPU memory, and didn't provide an obvious speedup. Since this + // vertical flip is only a temporary solution anyway until Chrome + // is fully GPU composited, it wasn't worth the complexity. + + bool mustRestoreFBO; + if (m_attributes.antialias) { + glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO); + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo); + glBlitFramebufferEXT(0, 0, m_cachedWidth, m_cachedHeight, 0, 0, m_cachedWidth, m_cachedHeight, GL_COLOR_BUFFER_BIT, GL_LINEAR); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + mustRestoreFBO = true; + } else { + if (m_boundFBO != m_fbo) { + mustRestoreFBO = true; + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + } + } + + GLint packAlignment = 4; + bool mustRestorePackAlignment = false; + glGetIntegerv(GL_PACK_ALIGNMENT, &packAlignment); + if (packAlignment > 4) { + glPixelStorei(GL_PACK_ALIGNMENT, 4); + mustRestorePackAlignment = true; + } + +#if PLATFORM(SKIA) + glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_BGRA, GL_UNSIGNED_BYTE, pixels); +#elif PLATFORM(CG) + glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pixels); +#else +#error Must port to your platform +#endif + + if (mustRestorePackAlignment) + glPixelStorei(GL_PACK_ALIGNMENT, packAlignment); + + if (mustRestoreFBO) + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); + +#ifdef FLIP_FRAMEBUFFER_VERTICALLY + if (pixels) + flipVertically(pixels, m_cachedWidth, m_cachedHeight); +#endif + +#endif // RENDER_TO_DEBUGGING_WINDOW + return true; +} + +void WebGraphicsContext3DDefaultImpl::synthesizeGLError(unsigned long error) +{ + m_syntheticErrors.add(error); +} + +// Helper macros to reduce the amount of code. + +#define DELEGATE_TO_GL(name, glname) \ +void WebGraphicsContext3DDefaultImpl::name() \ +{ \ + makeContextCurrent(); \ + gl##glname(); \ +} + +#define DELEGATE_TO_GL_1(name, glname, t1) \ +void WebGraphicsContext3DDefaultImpl::name(t1 a1) \ +{ \ + makeContextCurrent(); \ + gl##glname(a1); \ +} + +#define DELEGATE_TO_GL_1R(name, glname, t1, rt) \ +rt WebGraphicsContext3DDefaultImpl::name(t1 a1) \ +{ \ + makeContextCurrent(); \ + return gl##glname(a1); \ +} + +#define DELEGATE_TO_GL_2(name, glname, t1, t2) \ +void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2) \ +{ \ + makeContextCurrent(); \ + gl##glname(a1, a2); \ +} + +#define DELEGATE_TO_GL_2R(name, glname, t1, t2, rt) \ +rt WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2) \ +{ \ + makeContextCurrent(); \ + return gl##glname(a1, a2); \ +} + +#define DELEGATE_TO_GL_3(name, glname, t1, t2, t3) \ +void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3) \ +{ \ + makeContextCurrent(); \ + gl##glname(a1, a2, a3); \ +} + +#define DELEGATE_TO_GL_4(name, glname, t1, t2, t3, t4) \ +void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4) \ +{ \ + makeContextCurrent(); \ + gl##glname(a1, a2, a3, a4); \ +} + +#define DELEGATE_TO_GL_5(name, glname, t1, t2, t3, t4, t5) \ +void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ +{ \ + makeContextCurrent(); \ + gl##glname(a1, a2, a3, a4, a5); \ +} + +#define DELEGATE_TO_GL_6(name, glname, t1, t2, t3, t4, t5, t6) \ +void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ +{ \ + makeContextCurrent(); \ + gl##glname(a1, a2, a3, a4, a5, a6); \ +} + +#define DELEGATE_TO_GL_7(name, glname, t1, t2, t3, t4, t5, t6, t7) \ +void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ +{ \ + makeContextCurrent(); \ + gl##glname(a1, a2, a3, a4, a5, a6, a7); \ +} + +#define DELEGATE_TO_GL_8(name, glname, t1, t2, t3, t4, t5, t6, t7, t8) \ +void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8) \ +{ \ + makeContextCurrent(); \ + gl##glname(a1, a2, a3, a4, a5, a6, a7, a8); \ +} + +#define DELEGATE_TO_GL_9(name, glname, t1, t2, t3, t4, t5, t6, t7, t8, t9) \ +void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9) \ +{ \ + makeContextCurrent(); \ + gl##glname(a1, a2, a3, a4, a5, a6, a7, a8, a9); \ +} + +void WebGraphicsContext3DDefaultImpl::activeTexture(unsigned long texture) +{ + // FIXME: query number of textures available. + if (texture < GL_TEXTURE0 || texture > GL_TEXTURE0+32) + // FIXME: raise exception. + return; + + makeContextCurrent(); + glActiveTexture(texture); +} + +DELEGATE_TO_GL_2(attachShader, AttachShader, WebGLId, WebGLId) + +DELEGATE_TO_GL_3(bindAttribLocation, BindAttribLocation, WebGLId, unsigned long, const char*) + +void WebGraphicsContext3DDefaultImpl::bindBuffer(unsigned long target, WebGLId buffer) +{ + makeContextCurrent(); + if (target == GL_ARRAY_BUFFER) + m_boundArrayBuffer = buffer; + glBindBuffer(target, buffer); +} + +void WebGraphicsContext3DDefaultImpl::bindFramebuffer(unsigned long target, WebGLId framebuffer) +{ + makeContextCurrent(); + if (!framebuffer) + framebuffer = (m_attributes.antialias ? m_multisampleFBO : m_fbo); + if (framebuffer != m_boundFBO) { + glBindFramebufferEXT(target, framebuffer); + m_boundFBO = framebuffer; + } +} + +DELEGATE_TO_GL_2(bindRenderbuffer, BindRenderbufferEXT, unsigned long, WebGLId) + +DELEGATE_TO_GL_2(bindTexture, BindTexture, unsigned long, WebGLId) + +DELEGATE_TO_GL_4(blendColor, BlendColor, double, double, double, double) + +DELEGATE_TO_GL_1(blendEquation, BlendEquation, unsigned long) + +DELEGATE_TO_GL_2(blendEquationSeparate, BlendEquationSeparate, unsigned long, unsigned long) + +DELEGATE_TO_GL_2(blendFunc, BlendFunc, unsigned long, unsigned long) + +DELEGATE_TO_GL_4(blendFuncSeparate, BlendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long) + +DELEGATE_TO_GL_4(bufferData, BufferData, unsigned long, int, const void*, unsigned long) + +DELEGATE_TO_GL_4(bufferSubData, BufferSubData, unsigned long, long, int, const void*) + +DELEGATE_TO_GL_1R(checkFramebufferStatus, CheckFramebufferStatusEXT, unsigned long, unsigned long) + +DELEGATE_TO_GL_1(clear, Clear, unsigned long) + +DELEGATE_TO_GL_4(clearColor, ClearColor, double, double, double, double) + +DELEGATE_TO_GL_1(clearDepth, ClearDepth, double) + +DELEGATE_TO_GL_1(clearStencil, ClearStencil, long) + +DELEGATE_TO_GL_4(colorMask, ColorMask, bool, bool, bool, bool) + +DELEGATE_TO_GL_1(compileShader, CompileShader, WebGLId) + +void WebGraphicsContext3DDefaultImpl::copyTexImage2D(unsigned long target, long level, unsigned long internalformat, + long x, long y, unsigned long width, unsigned long height, long border) +{ + makeContextCurrent(); +#ifndef RENDER_TO_DEBUGGING_WINDOW + if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) { + glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO); + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo); + glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + } +#endif + glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); +#ifndef RENDER_TO_DEBUGGING_WINDOW + if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); +#endif +} + +void WebGraphicsContext3DDefaultImpl::copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, + long x, long y, unsigned long width, unsigned long height) +{ + makeContextCurrent(); +#ifndef RENDER_TO_DEBUGGING_WINDOW + if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) { + glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO); + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo); + glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + } +#endif + glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +#ifndef RENDER_TO_DEBUGGING_WINDOW + if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); +#endif +} + +DELEGATE_TO_GL_1(cullFace, CullFace, unsigned long) + +DELEGATE_TO_GL_1(depthFunc, DepthFunc, unsigned long) + +DELEGATE_TO_GL_1(depthMask, DepthMask, bool) + +DELEGATE_TO_GL_2(depthRange, DepthRange, double, double) + +DELEGATE_TO_GL_2(detachShader, DetachShader, WebGLId, WebGLId) + +DELEGATE_TO_GL_1(disable, Disable, unsigned long) + +void WebGraphicsContext3DDefaultImpl::disableVertexAttribArray(unsigned long index) +{ + makeContextCurrent(); + if (index < NumTrackedPointerStates) + m_vertexAttribPointerState[index].enabled = false; + glDisableVertexAttribArray(index); +} + +DELEGATE_TO_GL_3(drawArrays, DrawArrays, unsigned long, long, long) + +void WebGraphicsContext3DDefaultImpl::drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset) +{ + makeContextCurrent(); + glDrawElements(mode, count, type, + reinterpret_cast<void*>(static_cast<intptr_t>(offset))); +} + +DELEGATE_TO_GL_1(enable, Enable, unsigned long) + +void WebGraphicsContext3DDefaultImpl::enableVertexAttribArray(unsigned long index) +{ + makeContextCurrent(); + if (index < NumTrackedPointerStates) + m_vertexAttribPointerState[index].enabled = true; + glEnableVertexAttribArray(index); +} + +DELEGATE_TO_GL(finish, Finish) + +DELEGATE_TO_GL(flush, Flush) + +void WebGraphicsContext3DDefaultImpl::framebufferRenderbuffer(unsigned long target, unsigned long attachment, + unsigned long renderbuffertarget, WebGLId buffer) +{ + makeContextCurrent(); + if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { + glFramebufferRenderbufferEXT(target, GL_DEPTH_ATTACHMENT, renderbuffertarget, buffer); + glFramebufferRenderbufferEXT(target, GL_STENCIL_ATTACHMENT, renderbuffertarget, buffer); + } else + glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, buffer); +} + +DELEGATE_TO_GL_5(framebufferTexture2D, FramebufferTexture2DEXT, unsigned long, unsigned long, unsigned long, WebGLId, long) + +DELEGATE_TO_GL_1(frontFace, FrontFace, unsigned long) + +void WebGraphicsContext3DDefaultImpl::generateMipmap(unsigned long target) +{ + makeContextCurrent(); + if (glGenerateMipmapEXT) + glGenerateMipmapEXT(target); + // FIXME: provide alternative code path? This will be unpleasant + // to implement if glGenerateMipmapEXT is not available -- it will + // require a texture readback and re-upload. +} + +bool WebGraphicsContext3DDefaultImpl::getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo& info) +{ + if (!program) { + synthesizeGLError(GL_INVALID_VALUE); + return false; + } + GLint maxNameLength = -1; + glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &maxNameLength); + if (maxNameLength < 0) + return false; + GLchar* name = 0; + if (!tryFastMalloc(maxNameLength * sizeof(GLchar)).getValue(name)) { + synthesizeGLError(GL_OUT_OF_MEMORY); + return false; + } + GLsizei length = 0; + GLint size = -1; + GLenum type = 0; + glGetActiveAttrib(program, index, maxNameLength, + &length, &size, &type, name); + if (size < 0) { + fastFree(name); + return false; + } + info.name = WebString::fromUTF8(name, length); + info.type = type; + info.size = size; + fastFree(name); + return true; +} + +bool WebGraphicsContext3DDefaultImpl::getActiveUniform(WebGLId program, unsigned long index, ActiveInfo& info) +{ + GLint maxNameLength = -1; + glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxNameLength); + if (maxNameLength < 0) + return false; + GLchar* name = 0; + if (!tryFastMalloc(maxNameLength * sizeof(GLchar)).getValue(name)) { + synthesizeGLError(GL_OUT_OF_MEMORY); + return false; + } + GLsizei length = 0; + GLint size = -1; + GLenum type = 0; + glGetActiveUniform(program, index, maxNameLength, + &length, &size, &type, name); + if (size < 0) { + fastFree(name); + return false; + } + info.name = WebString::fromUTF8(name, length); + info.type = type; + info.size = size; + fastFree(name); + return true; +} + +DELEGATE_TO_GL_2R(getAttribLocation, GetAttribLocation, WebGLId, const char*, int) + +DELEGATE_TO_GL_2(getBooleanv, GetBooleanv, unsigned long, unsigned char*) + +DELEGATE_TO_GL_3(getBufferParameteriv, GetBufferParameteriv, unsigned long, unsigned long, int*) + +WebGraphicsContext3D::Attributes WebGraphicsContext3DDefaultImpl::getContextAttributes() +{ + return m_attributes; +} + +unsigned long WebGraphicsContext3DDefaultImpl::getError() +{ + if (m_syntheticErrors.size() > 0) { + ListHashSet<unsigned long>::iterator iter = m_syntheticErrors.begin(); + unsigned long err = *iter; + m_syntheticErrors.remove(iter); + return err; + } + + makeContextCurrent(); + return glGetError(); +} + +DELEGATE_TO_GL_2(getFloatv, GetFloatv, unsigned long, float*) + +void WebGraphicsContext3DDefaultImpl::getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, + unsigned long pname, int* value) +{ + makeContextCurrent(); + if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) + attachment = GL_DEPTH_ATTACHMENT; // Or GL_STENCIL_ATTACHMENT, either works. + glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, value); +} + +DELEGATE_TO_GL_2(getIntegerv, GetIntegerv, unsigned long, int*) + +DELEGATE_TO_GL_3(getProgramiv, GetProgramiv, WebGLId, unsigned long, int*) + +WebString WebGraphicsContext3DDefaultImpl::getProgramInfoLog(WebGLId program) +{ + makeContextCurrent(); + GLint logLength; + glGetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength); + if (!logLength) + return WebString(); + GLchar* log = 0; + if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) + return WebString(); + GLsizei returnedLogLength; + glGetProgramInfoLog(program, logLength, &returnedLogLength, log); + ASSERT(logLength == returnedLogLength + 1); + WebString res = WebString::fromUTF8(log, returnedLogLength); + fastFree(log); + return res; +} + +DELEGATE_TO_GL_3(getRenderbufferParameteriv, GetRenderbufferParameterivEXT, unsigned long, unsigned long, int*) + +DELEGATE_TO_GL_3(getShaderiv, GetShaderiv, WebGLId, unsigned long, int*) + +WebString WebGraphicsContext3DDefaultImpl::getShaderInfoLog(WebGLId shader) +{ + makeContextCurrent(); + GLint logLength; + glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLength); + if (!logLength) + return WebString(); + GLchar* log = 0; + if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) + return WebString(); + GLsizei returnedLogLength; + glGetShaderInfoLog(shader, logLength, &returnedLogLength, log); + ASSERT(logLength == returnedLogLength + 1); + WebString res = WebString::fromUTF8(log, returnedLogLength); + fastFree(log); + return res; +} + +WebString WebGraphicsContext3DDefaultImpl::getShaderSource(WebGLId shader) +{ + makeContextCurrent(); + GLint logLength; + glGetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &logLength); + if (!logLength) + return WebString(); + GLchar* log = 0; + if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) + return WebString(); + GLsizei returnedLogLength; + glGetShaderSource(shader, logLength, &returnedLogLength, log); + ASSERT(logLength == returnedLogLength + 1); + WebString res = WebString::fromUTF8(log, returnedLogLength); + fastFree(log); + return res; +} + +WebString WebGraphicsContext3DDefaultImpl::getString(unsigned long name) +{ + makeContextCurrent(); + return WebString::fromUTF8(reinterpret_cast<const char*>(glGetString(name))); +} + +DELEGATE_TO_GL_3(getTexParameterfv, GetTexParameterfv, unsigned long, unsigned long, float*) + +DELEGATE_TO_GL_3(getTexParameteriv, GetTexParameteriv, unsigned long, unsigned long, int*) + +DELEGATE_TO_GL_3(getUniformfv, GetUniformfv, WebGLId, long, float*) + +DELEGATE_TO_GL_3(getUniformiv, GetUniformiv, WebGLId, long, int*) + +DELEGATE_TO_GL_2R(getUniformLocation, GetUniformLocation, WebGLId, const char*, long) + +DELEGATE_TO_GL_3(getVertexAttribfv, GetVertexAttribfv, unsigned long, unsigned long, float*) + +DELEGATE_TO_GL_3(getVertexAttribiv, GetVertexAttribiv, unsigned long, unsigned long, int*) + +long WebGraphicsContext3DDefaultImpl::getVertexAttribOffset(unsigned long index, unsigned long pname) +{ + // FIXME: implement. + notImplemented(); + return 0; +} + +DELEGATE_TO_GL_2(hint, Hint, unsigned long, unsigned long) + +DELEGATE_TO_GL_1R(isBuffer, IsBuffer, WebGLId, bool) + +DELEGATE_TO_GL_1R(isEnabled, IsEnabled, unsigned long, bool) + +DELEGATE_TO_GL_1R(isFramebuffer, IsFramebuffer, WebGLId, bool) + +DELEGATE_TO_GL_1R(isProgram, IsProgram, WebGLId, bool) + +DELEGATE_TO_GL_1R(isRenderbuffer, IsRenderbuffer, WebGLId, bool) + +DELEGATE_TO_GL_1R(isShader, IsShader, WebGLId, bool) + +DELEGATE_TO_GL_1R(isTexture, IsTexture, WebGLId, bool) + +DELEGATE_TO_GL_1(lineWidth, LineWidth, double) + +DELEGATE_TO_GL_1(linkProgram, LinkProgram, WebGLId) + +DELEGATE_TO_GL_2(pixelStorei, PixelStorei, unsigned long, long) + +DELEGATE_TO_GL_2(polygonOffset, PolygonOffset, double, double) + +void WebGraphicsContext3DDefaultImpl::readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels) +{ + // FIXME: remove the two glFlush calls when the driver bug is fixed, i.e., + // all previous rendering calls should be done before reading pixels. + glFlush(); +#ifndef RENDER_TO_DEBUGGING_WINDOW + if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) { + glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO); + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo); + glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + glFlush(); + } +#endif + glReadPixels(x, y, width, height, format, type, pixels); +#ifndef RENDER_TO_DEBUGGING_WINDOW + if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); +#endif +} + +void WebGraphicsContext3DDefaultImpl::releaseShaderCompiler() +{ +} + +void WebGraphicsContext3DDefaultImpl::renderbufferStorage(unsigned long target, + unsigned long internalformat, + unsigned long width, + unsigned long height) +{ + makeContextCurrent(); + if (internalformat == GL_DEPTH_STENCIL) + internalformat = GL_DEPTH24_STENCIL8_EXT; + else if (internalformat == GL_DEPTH_COMPONENT16) + internalformat = GL_DEPTH_COMPONENT; + glRenderbufferStorageEXT(target, internalformat, width, height); +} + +DELEGATE_TO_GL_2(sampleCoverage, SampleCoverage, double, bool) + +DELEGATE_TO_GL_4(scissor, Scissor, long, long, unsigned long, unsigned long) + +void WebGraphicsContext3DDefaultImpl::shaderSource(WebGLId shader, const char* string) +{ + makeContextCurrent(); + GLint length = strlen(string); + glShaderSource(shader, 1, &string, &length); +} + +DELEGATE_TO_GL_3(stencilFunc, StencilFunc, unsigned long, long, unsigned long) + +DELEGATE_TO_GL_4(stencilFuncSeparate, StencilFuncSeparate, unsigned long, unsigned long, long, unsigned long) + +DELEGATE_TO_GL_1(stencilMask, StencilMask, unsigned long) + +DELEGATE_TO_GL_2(stencilMaskSeparate, StencilMaskSeparate, unsigned long, unsigned long) + +DELEGATE_TO_GL_3(stencilOp, StencilOp, unsigned long, unsigned long, unsigned long) + +DELEGATE_TO_GL_4(stencilOpSeparate, StencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long) + +DELEGATE_TO_GL_9(texImage2D, TexImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, const void*) + +DELEGATE_TO_GL_3(texParameterf, TexParameterf, unsigned, unsigned, float); + +DELEGATE_TO_GL_3(texParameteri, TexParameteri, unsigned, unsigned, int); + +DELEGATE_TO_GL_9(texSubImage2D, TexSubImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, const void*) + +DELEGATE_TO_GL_2(uniform1f, Uniform1f, long, float) + +DELEGATE_TO_GL_3(uniform1fv, Uniform1fv, long, int, float*) + +DELEGATE_TO_GL_2(uniform1i, Uniform1i, long, int) + +DELEGATE_TO_GL_3(uniform1iv, Uniform1iv, long, int, int*) + +DELEGATE_TO_GL_3(uniform2f, Uniform2f, long, float, float) + +DELEGATE_TO_GL_3(uniform2fv, Uniform2fv, long, int, float*) + +DELEGATE_TO_GL_3(uniform2i, Uniform2i, long, int, int) + +DELEGATE_TO_GL_3(uniform2iv, Uniform2iv, long, int, int*) + +DELEGATE_TO_GL_4(uniform3f, Uniform3f, long, float, float, float) + +DELEGATE_TO_GL_3(uniform3fv, Uniform3fv, long, int, float*) + +DELEGATE_TO_GL_4(uniform3i, Uniform3i, long, int, int, int) + +DELEGATE_TO_GL_3(uniform3iv, Uniform3iv, long, int, int*) + +DELEGATE_TO_GL_5(uniform4f, Uniform4f, long, float, float, float, float) + +DELEGATE_TO_GL_3(uniform4fv, Uniform4fv, long, int, float*) + +DELEGATE_TO_GL_5(uniform4i, Uniform4i, long, int, int, int, int) + +DELEGATE_TO_GL_3(uniform4iv, Uniform4iv, long, int, int*) + +DELEGATE_TO_GL_4(uniformMatrix2fv, UniformMatrix2fv, long, int, bool, const float*) + +DELEGATE_TO_GL_4(uniformMatrix3fv, UniformMatrix3fv, long, int, bool, const float*) + +DELEGATE_TO_GL_4(uniformMatrix4fv, UniformMatrix4fv, long, int, bool, const float*) + +DELEGATE_TO_GL_1(useProgram, UseProgram, WebGLId) + +DELEGATE_TO_GL_1(validateProgram, ValidateProgram, WebGLId) + +DELEGATE_TO_GL_2(vertexAttrib1f, VertexAttrib1f, unsigned long, float) + +DELEGATE_TO_GL_2(vertexAttrib1fv, VertexAttrib1fv, unsigned long, const float*) + +DELEGATE_TO_GL_3(vertexAttrib2f, VertexAttrib2f, unsigned long, float, float) + +DELEGATE_TO_GL_2(vertexAttrib2fv, VertexAttrib2fv, unsigned long, const float*) + +DELEGATE_TO_GL_4(vertexAttrib3f, VertexAttrib3f, unsigned long, float, float, float) + +DELEGATE_TO_GL_2(vertexAttrib3fv, VertexAttrib3fv, unsigned long, const float*) + +DELEGATE_TO_GL_5(vertexAttrib4f, VertexAttrib4f, unsigned long, float, float, float, float) + +DELEGATE_TO_GL_2(vertexAttrib4fv, VertexAttrib4fv, unsigned long, const float*) + +void WebGraphicsContext3DDefaultImpl::vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, + unsigned long stride, unsigned long offset) +{ + makeContextCurrent(); + + if (m_boundArrayBuffer <= 0) { + // FIXME: raise exception. + // LogMessagef(("bufferData: no buffer bound")); + return; + } + + if (indx < NumTrackedPointerStates) { + VertexAttribPointerState& state = m_vertexAttribPointerState[indx]; + state.buffer = m_boundArrayBuffer; + state.indx = indx; + state.size = size; + state.type = type; + state.normalized = normalized; + state.stride = stride; + state.offset = offset; + } + + glVertexAttribPointer(indx, size, type, normalized, stride, + reinterpret_cast<void*>(static_cast<intptr_t>(offset))); +} + +DELEGATE_TO_GL_4(viewport, Viewport, long, long, unsigned long, unsigned long) + +unsigned WebGraphicsContext3DDefaultImpl::createBuffer() +{ + makeContextCurrent(); + GLuint o; + glGenBuffers(1, &o); + return o; +} + +unsigned WebGraphicsContext3DDefaultImpl::createFramebuffer() +{ + makeContextCurrent(); + GLuint o = 0; + glGenFramebuffersEXT(1, &o); + return o; +} + +unsigned WebGraphicsContext3DDefaultImpl::createProgram() +{ + makeContextCurrent(); + return glCreateProgram(); +} + +unsigned WebGraphicsContext3DDefaultImpl::createRenderbuffer() +{ + makeContextCurrent(); + GLuint o; + glGenRenderbuffersEXT(1, &o); + return o; +} + +DELEGATE_TO_GL_1R(createShader, CreateShader, unsigned long, unsigned); + +unsigned WebGraphicsContext3DDefaultImpl::createTexture() +{ + makeContextCurrent(); + GLuint o; + glGenTextures(1, &o); + return o; +} + +void WebGraphicsContext3DDefaultImpl::deleteBuffer(unsigned buffer) +{ + makeContextCurrent(); + glDeleteBuffers(1, &buffer); +} + +void WebGraphicsContext3DDefaultImpl::deleteFramebuffer(unsigned framebuffer) +{ + makeContextCurrent(); + glDeleteFramebuffersEXT(1, &framebuffer); +} + +void WebGraphicsContext3DDefaultImpl::deleteProgram(unsigned program) +{ + makeContextCurrent(); + glDeleteProgram(program); +} + +void WebGraphicsContext3DDefaultImpl::deleteRenderbuffer(unsigned renderbuffer) +{ + makeContextCurrent(); + glDeleteRenderbuffersEXT(1, &renderbuffer); +} + +void WebGraphicsContext3DDefaultImpl::deleteShader(unsigned shader) +{ + makeContextCurrent(); + glDeleteShader(shader); +} + +void WebGraphicsContext3DDefaultImpl::deleteTexture(unsigned texture) +{ + makeContextCurrent(); + glDeleteTextures(1, &texture); +} + +} // namespace WebKit + +#endif // ENABLE(3D_CANVAS) diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h new file mode 100644 index 0000000..cc283e3 --- /dev/null +++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h @@ -0,0 +1,419 @@ +/* + * 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 WebGraphicsContext3DDefaultImpl_h +#define WebGraphicsContext3DDefaultImpl_h + +#if ENABLE(3D_CANVAS) + +#include "WebGraphicsContext3D.h" + +#include <wtf/ListHashSet.h> + +#if OS(WINDOWS) +#include <windows.h> +#endif + +#include "GL/glew.h" + +#if PLATFORM(CG) +#include <OpenGL/OpenGL.h> +#else +#define FLIP_FRAMEBUFFER_VERTICALLY +#endif + +#if OS(LINUX) +#include "GL/glxew.h" +#endif + +namespace WebKit { + +// The default implementation of WebGL. In Chromium, using this class +// requires the sandbox to be disabled, which is strongly discouraged. +// It is provided for support of test_shell and any Chromium ports +// where an in-renderer WebGL implementation would be helpful. + +class WebGraphicsContext3DDefaultImpl : public WebGraphicsContext3D { +public: + WebGraphicsContext3DDefaultImpl(); + virtual ~WebGraphicsContext3DDefaultImpl(); + + //---------------------------------------------------------------------- + // WebGraphicsContext3D methods + virtual bool initialize(WebGraphicsContext3D::Attributes attributes); + virtual bool makeContextCurrent(); + + virtual int width(); + virtual int height(); + + virtual int sizeInBytes(int type); + + virtual void reshape(int width, int height); + + virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize); + + virtual void synthesizeGLError(unsigned long error); + + virtual void activeTexture(unsigned long texture); + virtual void attachShader(WebGLId program, WebGLId shader); + virtual void bindAttribLocation(WebGLId program, unsigned long index, const char* name); + virtual void bindBuffer(unsigned long target, WebGLId buffer); + virtual void bindFramebuffer(unsigned long target, WebGLId framebuffer); + virtual void bindRenderbuffer(unsigned long target, WebGLId renderbuffer); + virtual void bindTexture(unsigned long target, WebGLId texture); + virtual void blendColor(double red, double green, double blue, double alpha); + virtual void blendEquation(unsigned long mode); + virtual void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha); + virtual void blendFunc(unsigned long sfactor, unsigned long dfactor); + virtual void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha); + + virtual void bufferData(unsigned long target, int size, const void* data, unsigned long usage); + virtual void bufferSubData(unsigned long target, long offset, int size, const void* data); + + virtual unsigned long checkFramebufferStatus(unsigned long target); + virtual void clear(unsigned long mask); + virtual void clearColor(double red, double green, double blue, double alpha); + virtual void clearDepth(double depth); + virtual void clearStencil(long s); + virtual void colorMask(bool red, bool green, bool blue, bool alpha); + virtual void compileShader(WebGLId shader); + + virtual void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border); + virtual void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height); + virtual void cullFace(unsigned long mode); + virtual void depthFunc(unsigned long func); + virtual void depthMask(bool flag); + virtual void depthRange(double zNear, double zFar); + virtual void detachShader(WebGLId program, WebGLId shader); + virtual void disable(unsigned long cap); + virtual void disableVertexAttribArray(unsigned long index); + virtual void drawArrays(unsigned long mode, long first, long count); + virtual void drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset); + + virtual void enable(unsigned long cap); + virtual void enableVertexAttribArray(unsigned long index); + virtual void finish(); + virtual void flush(); + virtual void framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, WebGLId renderbuffer); + virtual void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, WebGLId texture, long level); + virtual void frontFace(unsigned long mode); + virtual void generateMipmap(unsigned long target); + + virtual bool getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo&); + virtual bool getActiveUniform(WebGLId program, unsigned long index, ActiveInfo&); + + virtual int getAttribLocation(WebGLId program, const char* name); + + virtual void getBooleanv(unsigned long pname, unsigned char* value); + + virtual void getBufferParameteriv(unsigned long target, unsigned long pname, int* value); + + virtual Attributes getContextAttributes(); + + virtual unsigned long getError(); + + virtual void getFloatv(unsigned long pname, float* value); + + virtual void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value); + + virtual void getIntegerv(unsigned long pname, int* value); + + virtual void getProgramiv(WebGLId program, unsigned long pname, int* value); + + virtual WebString getProgramInfoLog(WebGLId program); + + virtual void getRenderbufferParameteriv(unsigned long target, unsigned long pname, int* value); + + virtual void getShaderiv(WebGLId shader, unsigned long pname, int* value); + + virtual WebString getShaderInfoLog(WebGLId shader); + + // TBD + // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); + + virtual WebString getShaderSource(WebGLId shader); + virtual WebString getString(unsigned long name); + + virtual void getTexParameterfv(unsigned long target, unsigned long pname, float* value); + virtual void getTexParameteriv(unsigned long target, unsigned long pname, int* value); + + virtual void getUniformfv(WebGLId program, long location, float* value); + virtual void getUniformiv(WebGLId program, long location, int* value); + + virtual long getUniformLocation(WebGLId program, const char* name); + + virtual void getVertexAttribfv(unsigned long index, unsigned long pname, float* value); + virtual void getVertexAttribiv(unsigned long index, unsigned long pname, int* value); + + virtual long getVertexAttribOffset(unsigned long index, unsigned long pname); + + virtual void hint(unsigned long target, unsigned long mode); + virtual bool isBuffer(WebGLId buffer); + virtual bool isEnabled(unsigned long cap); + virtual bool isFramebuffer(WebGLId framebuffer); + virtual bool isProgram(WebGLId program); + virtual bool isRenderbuffer(WebGLId renderbuffer); + virtual bool isShader(WebGLId shader); + virtual bool isTexture(WebGLId texture); + virtual void lineWidth(double); + virtual void linkProgram(WebGLId program); + virtual void pixelStorei(unsigned long pname, long param); + virtual void polygonOffset(double factor, double units); + + virtual void readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels); + + virtual void releaseShaderCompiler(); + virtual void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height); + virtual void sampleCoverage(double value, bool invert); + virtual void scissor(long x, long y, unsigned long width, unsigned long height); + virtual void shaderSource(WebGLId shader, const char* string); + virtual void stencilFunc(unsigned long func, long ref, unsigned long mask); + virtual void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask); + virtual void stencilMask(unsigned long mask); + virtual void stencilMaskSeparate(unsigned long face, unsigned long mask); + virtual void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass); + virtual void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass); + + virtual void texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels); + + virtual void texParameterf(unsigned target, unsigned pname, float param); + virtual void texParameteri(unsigned target, unsigned pname, int param); + + virtual void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, const void* pixels); + + virtual void uniform1f(long location, float x); + virtual void uniform1fv(long location, int count, float* v); + virtual void uniform1i(long location, int x); + virtual void uniform1iv(long location, int count, int* v); + virtual void uniform2f(long location, float x, float y); + virtual void uniform2fv(long location, int count, float* v); + virtual void uniform2i(long location, int x, int y); + virtual void uniform2iv(long location, int count, int* v); + virtual void uniform3f(long location, float x, float y, float z); + virtual void uniform3fv(long location, int count, float* v); + virtual void uniform3i(long location, int x, int y, int z); + virtual void uniform3iv(long location, int count, int* v); + virtual void uniform4f(long location, float x, float y, float z, float w); + virtual void uniform4fv(long location, int count, float* v); + virtual void uniform4i(long location, int x, int y, int z, int w); + virtual void uniform4iv(long location, int count, int* v); + virtual void uniformMatrix2fv(long location, int count, bool transpose, const float* value); + virtual void uniformMatrix3fv(long location, int count, bool transpose, const float* value); + virtual void uniformMatrix4fv(long location, int count, bool transpose, const float* value); + + virtual void useProgram(WebGLId program); + virtual void validateProgram(WebGLId program); + + virtual void vertexAttrib1f(unsigned long indx, float x); + virtual void vertexAttrib1fv(unsigned long indx, const float* values); + virtual void vertexAttrib2f(unsigned long indx, float x, float y); + virtual void vertexAttrib2fv(unsigned long indx, const float* values); + virtual void vertexAttrib3f(unsigned long indx, float x, float y, float z); + virtual void vertexAttrib3fv(unsigned long indx, const float* values); + virtual void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w); + virtual void vertexAttrib4fv(unsigned long indx, const float* values); + virtual void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, + unsigned long stride, unsigned long offset); + + virtual void viewport(long x, long y, unsigned long width, unsigned long height); + + // Support for buffer creation and deletion + virtual unsigned createBuffer(); + virtual unsigned createFramebuffer(); + virtual unsigned createProgram(); + virtual unsigned createRenderbuffer(); + virtual unsigned createShader(unsigned long); + virtual unsigned createTexture(); + + virtual void deleteBuffer(unsigned); + virtual void deleteFramebuffer(unsigned); + virtual void deleteProgram(unsigned); + virtual void deleteRenderbuffer(unsigned); + virtual void deleteShader(unsigned); + virtual void deleteTexture(unsigned); + +private: + WebGraphicsContext3D::Attributes m_attributes; + bool m_initialized; + unsigned int m_texture; + unsigned int m_fbo; + unsigned int m_depthStencilBuffer; + unsigned int m_cachedWidth, m_cachedHeight; + + // For multisampling + unsigned int m_multisampleFBO; + unsigned int m_multisampleDepthStencilBuffer; + unsigned int m_multisampleColorBuffer; + + // For tracking which FBO is bound + unsigned int m_boundFBO; + +#ifdef FLIP_FRAMEBUFFER_VERTICALLY + unsigned char* m_scanline; + void flipVertically(unsigned char* framebuffer, + unsigned int width, + unsigned int height); +#endif + + // Take into account the user's requested context creation attributes, in + // particular stencil and antialias, and determine which could or could + // not be honored based on the capabilities of the OpenGL implementation. + void validateAttributes(); + + // Note: we aren't currently using this information, but we will + // need to in order to verify that all enabled vertex arrays have + // a valid buffer bound -- to avoid crashes on certain cards. + unsigned int m_boundArrayBuffer; + class VertexAttribPointerState { + public: + VertexAttribPointerState(); + + bool enabled; + unsigned long buffer; + unsigned long indx; + int size; + int type; + bool normalized; + unsigned long stride; + unsigned long offset; + }; + + enum { + NumTrackedPointerStates = 2 + }; + VertexAttribPointerState m_vertexAttribPointerState[NumTrackedPointerStates]; + + // Errors raised by synthesizeGLError(). + ListHashSet<unsigned long> m_syntheticErrors; + + static bool s_initializedGLEW; +#if OS(WINDOWS) + HWND m_canvasWindow; + HDC m_canvasDC; + HGLRC m_contextObj; +#elif PLATFORM(CG) + CGLPBufferObj m_pbuffer; + CGLContextObj m_contextObj; + unsigned char* m_renderOutput; +#elif OS(LINUX) + GLXContext m_contextObj; + GLXPbuffer m_pbuffer; + + // In order to avoid problems caused by linking against libGL, we + // dynamically look up all the symbols we need. + // http://code.google.com/p/chromium/issues/detail?id=16800 + class GLConnection { + public: + ~GLConnection(); + + static GLConnection* create(); + + GLXFBConfig* chooseFBConfig(int screen, const int *attrib_list, int *nelements) + { + return m_glXChooseFBConfig(m_display, screen, attrib_list, nelements); + } + + GLXContext createNewContext(GLXFBConfig config, int renderType, GLXContext shareList, Bool direct) + { + return m_glXCreateNewContext(m_display, config, renderType, shareList, direct); + } + + GLXPbuffer createPbuffer(GLXFBConfig config, const int *attribList) + { + return m_glXCreatePbuffer(m_display, config, attribList); + } + + void destroyPbuffer(GLXPbuffer pbuf) + { + m_glXDestroyPbuffer(m_display, pbuf); + } + + Bool makeCurrent(GLXDrawable drawable, GLXContext ctx) + { + return m_glXMakeCurrent(m_display, drawable, ctx); + } + + void destroyContext(GLXContext ctx) + { + m_glXDestroyContext(m_display, ctx); + } + + GLXContext getCurrentContext() + { + return m_glXGetCurrentContext(); + } + + private: + Display* m_display; + void* m_libGL; + PFNGLXCHOOSEFBCONFIGPROC m_glXChooseFBConfig; + PFNGLXCREATENEWCONTEXTPROC m_glXCreateNewContext; + PFNGLXCREATEPBUFFERPROC m_glXCreatePbuffer; + PFNGLXDESTROYPBUFFERPROC m_glXDestroyPbuffer; + typedef Bool (* PFNGLXMAKECURRENTPROC)(Display* dpy, GLXDrawable drawable, GLXContext ctx); + PFNGLXMAKECURRENTPROC m_glXMakeCurrent; + typedef void (* PFNGLXDESTROYCONTEXTPROC)(Display* dpy, GLXContext ctx); + PFNGLXDESTROYCONTEXTPROC m_glXDestroyContext; + typedef GLXContext (* PFNGLXGETCURRENTCONTEXTPROC)(void); + PFNGLXGETCURRENTCONTEXTPROC m_glXGetCurrentContext; + + GLConnection(Display* display, + void* libGL, + PFNGLXCHOOSEFBCONFIGPROC chooseFBConfig, + PFNGLXCREATENEWCONTEXTPROC createNewContext, + PFNGLXCREATEPBUFFERPROC createPbuffer, + PFNGLXDESTROYPBUFFERPROC destroyPbuffer, + PFNGLXMAKECURRENTPROC makeCurrent, + PFNGLXDESTROYCONTEXTPROC destroyContext, + PFNGLXGETCURRENTCONTEXTPROC getCurrentContext) + : m_libGL(libGL) + , m_display(display) + , m_glXChooseFBConfig(chooseFBConfig) + , m_glXCreateNewContext(createNewContext) + , m_glXCreatePbuffer(createPbuffer) + , m_glXDestroyPbuffer(destroyPbuffer) + , m_glXMakeCurrent(makeCurrent) + , m_glXDestroyContext(destroyContext) + , m_glXGetCurrentContext(getCurrentContext) + { + } + }; + + static GLConnection* s_gl; +#else + #error Must port WebGraphicsContext3DDefaultImpl to your platform +#endif +}; + +} // namespace WebKit + +#endif // ENABLE(3D_CANVAS) + +#endif diff --git a/WebKit/chromium/src/WebHTTPBody.cpp b/WebKit/chromium/src/WebHTTPBody.cpp index 3d40869..d062576 100644 --- a/WebKit/chromium/src/WebHTTPBody.cpp +++ b/WebKit/chromium/src/WebHTTPBody.cpp @@ -79,17 +79,25 @@ bool WebHTTPBody::elementAt(size_t index, Element& result) const result.type = Element::TypeData; result.data.assign(element.m_data.data(), element.m_data.size()); result.filePath.reset(); +#if ENABLE(BLOB_SLICE) result.fileStart = 0; result.fileLength = 0; result.fileInfo.modificationTime = 0.0; +#endif break; case FormDataElement::encodedFile: result.type = Element::TypeFile; result.data.reset(); result.filePath = element.m_filename; - result.fileStart = 0; // FIXME: to be set from FormData. - result.fileLength = -1; // FIXME: to be set from FormData. - result.fileInfo.modificationTime = 0.0; // FIXME: to be set from FormData. +#if ENABLE(BLOB_SLICE) + result.fileStart = element.m_fileStart; + result.fileLength = element.m_fileLength; + result.fileInfo.modificationTime = element.m_expectedFileModificationTime; +#else + result.fileStart = 0; + result.fileLength = -1; + result.fileInfo.modificationTime = 0.0; +#endif break; default: ASSERT_NOT_REACHED(); @@ -113,9 +121,12 @@ void WebHTTPBody::appendFile(const WebString& filePath) m_private->appendFile(filePath); } -void WebHTTPBody::appendFile(const WebString& filePath, long long fileStart, long long fileLength, const WebFileInfo& fileInfo) +void WebHTTPBody::appendFileRange(const WebString& filePath, long long fileStart, long long fileLength, const WebFileInfo& fileInfo) { - // FIXME: to be implemented. +#if ENABLE(BLOB_SLICE) + ensureMutable(); + m_private->appendFileRange(filePath, fileStart, fileLength, fileInfo.modificationTime); +#endif } long long WebHTTPBody::identifier() const diff --git a/WebKit/chromium/src/WebHistoryItem.cpp b/WebKit/chromium/src/WebHistoryItem.cpp index 4ca8cc7..45e4472 100644 --- a/WebKit/chromium/src/WebHistoryItem.cpp +++ b/WebKit/chromium/src/WebHistoryItem.cpp @@ -37,6 +37,7 @@ #include "WebHTTPBody.h" #include "WebPoint.h" +#include "WebSerializedScriptValue.h" #include "WebString.h" #include "WebVector.h" @@ -44,30 +45,23 @@ using namespace WebCore; namespace WebKit { -class WebHistoryItemPrivate : public HistoryItem { -}; - void WebHistoryItem::initialize() { - assign(static_cast<WebHistoryItemPrivate*>(HistoryItem::create().releaseRef())); + m_private = HistoryItem::create(); } void WebHistoryItem::reset() { - assign(0); + m_private.reset(); } void WebHistoryItem::assign(const WebHistoryItem& other) { - WebHistoryItemPrivate* p = const_cast<WebHistoryItemPrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); + m_private = other.m_private; } WebString WebHistoryItem::urlString() const { - ASSERT(!isNull()); return m_private->urlString(); } @@ -79,7 +73,6 @@ void WebHistoryItem::setURLString(const WebString& url) WebString WebHistoryItem::originalURLString() const { - ASSERT(!isNull()); return m_private->originalURLString(); } @@ -91,7 +84,6 @@ void WebHistoryItem::setOriginalURLString(const WebString& originalURLString) WebString WebHistoryItem::referrer() const { - ASSERT(!isNull()); return m_private->referrer(); } @@ -103,7 +95,6 @@ void WebHistoryItem::setReferrer(const WebString& referrer) WebString WebHistoryItem::target() const { - ASSERT(!isNull()); return m_private->target(); } @@ -115,7 +106,6 @@ void WebHistoryItem::setTarget(const WebString& target) WebString WebHistoryItem::parent() const { - ASSERT(!isNull()); return m_private->parent(); } @@ -127,7 +117,6 @@ void WebHistoryItem::setParent(const WebString& parent) WebString WebHistoryItem::title() const { - ASSERT(!isNull()); return m_private->title(); } @@ -139,7 +128,6 @@ void WebHistoryItem::setTitle(const WebString& title) WebString WebHistoryItem::alternateTitle() const { - ASSERT(!isNull()); return m_private->alternateTitle(); } @@ -151,7 +139,6 @@ void WebHistoryItem::setAlternateTitle(const WebString& alternateTitle) double WebHistoryItem::lastVisitedTime() const { - ASSERT(!isNull()); return m_private->lastVisitedTime(); } @@ -168,7 +155,6 @@ void WebHistoryItem::setLastVisitedTime(double lastVisitedTime) WebPoint WebHistoryItem::scrollOffset() const { - ASSERT(!isNull()); return m_private->scrollPoint(); } @@ -180,7 +166,6 @@ void WebHistoryItem::setScrollOffset(const WebPoint& scrollOffset) bool WebHistoryItem::isTargetItem() const { - ASSERT(!isNull()); return m_private->isTargetItem(); } @@ -192,7 +177,6 @@ void WebHistoryItem::setIsTargetItem(bool isTargetItem) int WebHistoryItem::visitCount() const { - ASSERT(!isNull()); return m_private->visitCount(); } @@ -204,7 +188,6 @@ void WebHistoryItem::setVisitCount(int count) WebVector<WebString> WebHistoryItem::documentState() const { - ASSERT(!isNull()); return m_private->documentState(); } @@ -220,7 +203,6 @@ void WebHistoryItem::setDocumentState(const WebVector<WebString>& state) long long WebHistoryItem::documentSequenceNumber() const { - ASSERT(!isNull()); return m_private->documentSequenceNumber(); } @@ -230,9 +212,19 @@ void WebHistoryItem::setDocumentSequenceNumber(long long documentSequenceNumber) m_private->setDocumentSequenceNumber(documentSequenceNumber); } +WebSerializedScriptValue WebHistoryItem::stateObject() const +{ + return WebSerializedScriptValue(m_private->stateObject()); +} + +void WebHistoryItem::setStateObject(const WebSerializedScriptValue& object) +{ + ensureMutable(); + m_private->setStateObject(object); +} + WebString WebHistoryItem::httpContentType() const { - ASSERT(!isNull()); return m_private->formContentType(); } @@ -244,7 +236,6 @@ void WebHistoryItem::setHTTPContentType(const WebString& httpContentType) WebHTTPBody WebHistoryItem::httpBody() const { - ASSERT(!isNull()); return WebHTTPBody(m_private->formData()); } @@ -256,7 +247,6 @@ void WebHistoryItem::setHTTPBody(const WebHTTPBody& httpBody) WebVector<WebHistoryItem> WebHistoryItem::children() const { - ASSERT(!isNull()); return m_private->children(); } @@ -275,34 +265,25 @@ void WebHistoryItem::appendToChildren(const WebHistoryItem& item) } WebHistoryItem::WebHistoryItem(const PassRefPtr<HistoryItem>& item) - : m_private(static_cast<WebHistoryItemPrivate*>(item.releaseRef())) + : m_private(item) { } WebHistoryItem& WebHistoryItem::operator=(const PassRefPtr<HistoryItem>& item) { - assign(static_cast<WebHistoryItemPrivate*>(item.releaseRef())); + m_private = item; return *this; } WebHistoryItem::operator PassRefPtr<HistoryItem>() const { - return m_private; -} - -void WebHistoryItem::assign(WebHistoryItemPrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; + return m_private.get(); } void WebHistoryItem::ensureMutable() { - ASSERT(!isNull()); if (!m_private->hasOneRef()) - assign(static_cast<WebHistoryItemPrivate*>(m_private->copy().releaseRef())); + m_private = m_private->copy(); } } // namespace WebKit diff --git a/WebKit/chromium/src/WebIDBDatabaseError.cpp b/WebKit/chromium/src/WebIDBDatabaseError.cpp new file mode 100644 index 0000000..17fdd38 --- /dev/null +++ b/WebKit/chromium/src/WebIDBDatabaseError.cpp @@ -0,0 +1,86 @@ +/* + * 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 "WebIDBDatabaseError.h" + +#include "IDBDatabaseError.h" +#include "WebString.h" + +#if ENABLE(INDEXED_DATABASE) + +using namespace WebCore; + +namespace WebKit { + +WebIDBDatabaseError::~WebIDBDatabaseError() +{ + m_private.reset(); +} + +void WebIDBDatabaseError::assign(const WebIDBDatabaseError& value) +{ + m_private = value.m_private; +} + +void WebIDBDatabaseError::assign(unsigned short code, const WebString& message) +{ + m_private = IDBDatabaseError::create(code, message); +} + +unsigned short WebIDBDatabaseError::code() const +{ + return m_private->code(); +} + +WebString WebIDBDatabaseError::message() const +{ + return m_private->message(); +} + +WebIDBDatabaseError::WebIDBDatabaseError(const PassRefPtr<IDBDatabaseError>& value) + : m_private(value) +{ +} + +WebIDBDatabaseError& WebIDBDatabaseError::operator=(const PassRefPtr<IDBDatabaseError>& value) +{ + m_private = value; + return *this; +} + +WebIDBDatabaseError::operator PassRefPtr<IDBDatabaseError>() const +{ + return m_private.get(); +} + +} // namespace WebKit + +#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebImageDecoder.cpp b/WebKit/chromium/src/WebImageDecoder.cpp new file mode 100644 index 0000000..9e1d1f4 --- /dev/null +++ b/WebKit/chromium/src/WebImageDecoder.cpp @@ -0,0 +1,121 @@ +/* + * 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 "WebImageDecoder.h" + +#include "BMPImageDecoder.h" +#include "ICOImageDecoder.h" +#include "SharedBuffer.h" +#include "WebData.h" +#include "WebImage.h" +#include "WebSize.h" + +#if WEBKIT_USING_SKIA +#include <wtf/OwnPtr.h> +#include <wtf/PassRefPtr.h> +#endif + +using namespace WebCore; + +namespace WebKit { + +void WebImageDecoder::reset() +{ + delete m_private; +} + +void WebImageDecoder::init(Type type) +{ + switch (type) { + case TypeBMP: + m_private = new BMPImageDecoder(); + break; + case TypeICO: + m_private = new ICOImageDecoder(); + break; + } +} + +void WebImageDecoder::setData(const WebData& data, bool allDataReceived) +{ + ASSERT(m_private); + m_private->setData(PassRefPtr<SharedBuffer>(data).get(), allDataReceived); +} + +bool WebImageDecoder::isFailed() const +{ + ASSERT(m_private); + return m_private->failed(); +} + +bool WebImageDecoder::isSizeAvailable() const +{ + ASSERT(m_private); + return m_private->isSizeAvailable(); +} + +WebSize WebImageDecoder::size() const +{ + ASSERT(m_private); + return m_private->size(); +} + +size_t WebImageDecoder::frameCount() const +{ + ASSERT(m_private); + return m_private->frameCount(); +} + +bool WebImageDecoder::isFrameCompleteAtIndex(int index) const +{ + ASSERT(m_private); + RGBA32Buffer* const frameBuffer = m_private->frameBufferAtIndex(index); + if (!frameBuffer) + return false; + return (frameBuffer->status() == RGBA32Buffer::FrameComplete); +} + +WebImage WebImageDecoder::getFrameAtIndex(int index = 0) const +{ + ASSERT(m_private); + RGBA32Buffer* const frameBuffer = m_private->frameBufferAtIndex(index); + if (!frameBuffer) + return WebImage(); +#if WEBKIT_USING_SKIA + OwnPtr<NativeImageSkia>image(frameBuffer->asNewNativeImage()); + return WebImage(*image); +#elif WEBKIT_USING_CG + // FIXME: Implement CG side of this. + return WebImage(frameBuffer->asNewNativeImage()); +#endif +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp b/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp new file mode 100644 index 0000000..6a6327b --- /dev/null +++ b/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp @@ -0,0 +1,59 @@ +/* + * 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 "WebIndexedDatabaseImpl.h" + +#include "WebIDBDatabaseError.h" +#include <wtf/OwnPtr.h> + +#if ENABLE(INDEXED_DATABASE) + +namespace WebKit { + +WebIndexedDatabase* WebIndexedDatabase::create() +{ + return new WebIndexedDatabaseImpl(); +} + +WebIndexedDatabaseImpl::~WebIndexedDatabaseImpl() +{ +} + +void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, bool modifyDatabase, WebIDBCallbacks<WebIDBDatabase>* callbacksPtr, WebFrame*, int& exceptionCode) +{ + OwnPtr<WebIDBCallbacks<WebIDBDatabase>*> callbacks(callbacksPtr); + callbacks->onError(WebIDBDatabaseError(0, "Not implemented")); + // FIXME: Implement for realz. +} + +} // namespace WebKit + +#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.h b/WebKit/chromium/src/WebIndexedDatabaseImpl.h new file mode 100644 index 0000000..b4b8c99 --- /dev/null +++ b/WebKit/chromium/src/WebIndexedDatabaseImpl.h @@ -0,0 +1,45 @@ +/* + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 WebIndexedDatabaseImpl_h +#define WebIndexedDatabaseImpl_h + +#include "WebIndexedDatabase.h" + +namespace WebKit { + +class WebIndexedDatabaseImpl : public WebIndexedDatabase { +public: + virtual ~WebIndexedDatabaseImpl(); + + virtual void open(const WebString& name, const WebString& description, bool modifyDatabase, WebIDBCallbacks<WebIDBDatabase>*, WebFrame*, int& exceptionCode); +}; + +} // namespace WebKit + +#endif // WebIndexedDatabaseImpl_h diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp index 4ee1b93..1eab91f 100644 --- a/WebKit/chromium/src/WebInputElement.cpp +++ b/WebKit/chromium/src/WebInputElement.cpp @@ -40,22 +40,6 @@ using namespace WebCore; namespace WebKit { -WebInputElement::WebInputElement(const WTF::PassRefPtr<HTMLInputElement>& elem) - : WebElement(elem) -{ -} - -WebInputElement& WebInputElement::operator=(const WTF::PassRefPtr<HTMLInputElement>& elem) -{ - WebNode::assign(elem.releaseRef()); - return *this; -} - -WebInputElement::operator WTF::PassRefPtr<HTMLInputElement>() const -{ - return PassRefPtr<HTMLInputElement>(static_cast<HTMLInputElement*>(m_private)); -} - bool WebInputElement::autoComplete() const { return constUnwrap<HTMLInputElement>()->autoComplete(); @@ -71,9 +55,9 @@ WebInputElement::InputType WebInputElement::inputType() const return static_cast<InputType>(constUnwrap<HTMLInputElement>()->inputType()); } -WebString WebInputElement::formControlType() const +int WebInputElement::maxLength() const { - return constUnwrap<HTMLInputElement>()->formControlType(); + return constUnwrap<HTMLInputElement>()->maxLength(); } bool WebInputElement::isActivatedSubmit() const @@ -129,4 +113,20 @@ WebString WebInputElement::nameForAutofill() const return String(); } +WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem) + : WebFormControlElement(elem) +{ +} + +WebInputElement& WebInputElement::operator=(const PassRefPtr<HTMLInputElement>& elem) +{ + m_private = elem; + return *this; +} + +WebInputElement::operator PassRefPtr<HTMLInputElement>() const +{ + return static_cast<HTMLInputElement*>(m_private.get()); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebInputEvent.cpp b/WebKit/chromium/src/WebInputEvent.cpp index b5c56fa..c00200e 100644 --- a/WebKit/chromium/src/WebInputEvent.cpp +++ b/WebKit/chromium/src/WebInputEvent.cpp @@ -86,6 +86,8 @@ static const char* staticKeyIdentifiers(unsigned short keyCode) case VKEY_F9: return "F9"; case VKEY_F10: + return "F10"; + case VKEY_F11: return "F11"; case VKEY_F12: return "F12"; diff --git a/WebKit/chromium/src/WebInputEventConversion.cpp b/WebKit/chromium/src/WebInputEventConversion.cpp index 147f88b..f68e3ab 100644 --- a/WebKit/chromium/src/WebInputEventConversion.cpp +++ b/WebKit/chromium/src/WebInputEventConversion.cpp @@ -40,6 +40,7 @@ #include "PlatformWheelEvent.h" #include "ScrollView.h" #include "WebInputEvent.h" +#include "WheelEvent.h" #include "Widget.h" using namespace WebCore; @@ -168,6 +169,64 @@ bool PlatformKeyboardEventBuilder::isCharacterKey() const return true; } +#if ENABLE(TOUCH_EVENTS) +static inline TouchEventType toPlatformTouchEventType(const WebInputEvent::Type type) +{ + switch (type) { + case WebInputEvent::TouchStart: + return TouchStart; + case WebInputEvent::TouchMove: + return TouchMove; + case WebInputEvent::TouchEnd: + return TouchEnd; + case WebInputEvent::TouchCancel: + return TouchCancel; + default: + ASSERT_NOT_REACHED(); + } + return TouchStart; +} + +static inline PlatformTouchPoint::State toPlatformTouchPointState(const WebTouchPoint::State state) +{ + switch (state) { + case WebTouchPoint::StateReleased: + return PlatformTouchPoint::TouchReleased; + case WebTouchPoint::StatePressed: + return PlatformTouchPoint::TouchPressed; + case WebTouchPoint::StateMoved: + return PlatformTouchPoint::TouchMoved; + case WebTouchPoint::StateStationary: + return PlatformTouchPoint::TouchStationary; + case WebTouchPoint::StateCancelled: + return PlatformTouchPoint::TouchCancelled; + case WebTouchPoint::StateUndefined: + ASSERT_NOT_REACHED(); + } + return PlatformTouchPoint::TouchReleased; +} + +PlatformTouchPointBuilder::PlatformTouchPointBuilder(Widget* widget, const WebTouchPoint& point) +{ + m_id = point.id; + m_state = toPlatformTouchPointState(point.state); + m_pos = widget->convertFromContainingWindow(point.position); + m_screenPos = point.screenPosition; +} + +PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTouchEvent& event) +{ + m_type = toPlatformTouchEventType(event.type); + m_ctrlKey = event.modifiers & WebInputEvent::ControlKey; + m_altKey = event.modifiers & WebInputEvent::AltKey; + m_shiftKey = event.modifiers & WebInputEvent::ShiftKey; + m_metaKey = event.modifiers & WebInputEvent::MetaKey; + + for (int i = 0; i < event.touchPointsLength; ++i) + m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touchPoints[i])); +} +#endif + static int getWebInputModifiers(const UIEventWithKeyState& event) { int modifiers = 0; @@ -232,6 +291,28 @@ WebMouseEventBuilder::WebMouseEventBuilder(const ScrollView* view, const MouseEv clickCount = event.detail(); } +WebMouseWheelEventBuilder::WebMouseWheelEventBuilder(const ScrollView* view, const WheelEvent& event) +{ + if (event.type() != eventNames().mousewheelEvent) + return; + type = WebInputEvent::MouseWheel; + timeStampSeconds = event.timeStamp() * 1.0e-3; + modifiers = getWebInputModifiers(event); + IntPoint p = view->contentsToWindow(IntPoint(event.pageX(), event.pageY())); + globalX = event.screenX(); + globalY = event.screenY(); + windowX = p.x(); + windowY = p.y(); + x = event.offsetX(); + y = event.offsetY(); + deltaX = static_cast<float>(event.rawDeltaX()); + deltaY = static_cast<float>(event.rawDeltaY()); + // The 120 is from WheelEvent::initWheelEvent(). + wheelTicksX = static_cast<float>(event.wheelDeltaX()) / 120; + wheelTicksY = static_cast<float>(event.wheelDeltaY()) / 120; + scrollByPage = event.granularity() == WheelEvent::Page; +} + WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) { if (event.type() == eventNames().keydownEvent) diff --git a/WebKit/chromium/src/WebInputEventConversion.h b/WebKit/chromium/src/WebInputEventConversion.h index 4c9cf82..3018973 100644 --- a/WebKit/chromium/src/WebInputEventConversion.h +++ b/WebKit/chromium/src/WebInputEventConversion.h @@ -37,12 +37,14 @@ #include "PlatformKeyboardEvent.h" #include "PlatformMouseEvent.h" +#include "PlatformTouchEvent.h" #include "PlatformWheelEvent.h" namespace WebCore { class KeyboardEvent; class MouseEvent; class ScrollView; +class WheelEvent; class Widget; } @@ -72,8 +74,20 @@ public: bool isCharacterKey() const; }; +#if ENABLE(TOUCH_EVENTS) +class PlatformTouchPointBuilder : public WebCore::PlatformTouchPoint { +public: + PlatformTouchPointBuilder(WebCore::Widget*, const WebTouchPoint&); +}; + +class PlatformTouchEventBuilder : public WebCore::PlatformTouchEvent { +public: + PlatformTouchEventBuilder(WebCore::Widget*, const WebTouchEvent&); +}; +#endif + // Converts a WebCore::MouseEvent to a corresponding WebMouseEvent. view is -// the ScrollView corresponding to the event. Returns true if successful. +// the ScrollView corresponding to the event. // NOTE: This is only implemented for mousemove, mouseover, mouseout, // mousedown and mouseup. If the event mapping fails, the event type will // be set to Undefined. @@ -82,10 +96,16 @@ public: WebMouseEventBuilder(const WebCore::ScrollView*, const WebCore::MouseEvent&); }; +// Converts a WebCore::WheelEvent to a corresponding WebMouseWheelEvent. +// If the event mapping fails, the event type will be set to Undefined. +class WebMouseWheelEventBuilder : public WebMouseWheelEvent { +public: + WebMouseWheelEventBuilder(const WebCore::ScrollView*, const WebCore::WheelEvent&); +}; + // Converts a WebCore::KeyboardEvent to a corresponding WebKeyboardEvent. -// Returns true if successful. NOTE: This is only implemented for keydown -// and keyup. If the event mapping fails, the event type will be set to -// Undefined. +// NOTE: This is only implemented for keydown and keyup. If the event mapping +// fails, the event type will be set to Undefined. class WebKeyboardEventBuilder : public WebKeyboardEvent { public: WebKeyboardEventBuilder(const WebCore::KeyboardEvent&); diff --git a/WebKit/chromium/src/WebLabelElement.cpp b/WebKit/chromium/src/WebLabelElement.cpp new file mode 100644 index 0000000..9546986 --- /dev/null +++ b/WebKit/chromium/src/WebLabelElement.cpp @@ -0,0 +1,64 @@ +/* + * 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 "WebLabelElement.h" + +#include "HTMLLabelElement.h" +#include "HTMLNames.h" +#include "WebString.h" +#include <wtf/PassRefPtr.h> + +using namespace WebCore; + +namespace WebKit { + +WebElement WebLabelElement::correspondingControl() +{ + return WebElement(unwrap<HTMLLabelElement>()->correspondingControl()); +} + +WebLabelElement::WebLabelElement(const PassRefPtr<HTMLLabelElement>& elem) + : WebElement(elem) +{ +} + +WebLabelElement& WebLabelElement::operator=(const PassRefPtr<HTMLLabelElement>& elem) +{ + m_private = elem; + return *this; +} + +WebLabelElement::operator PassRefPtr<HTMLLabelElement>() const +{ + return static_cast<HTMLLabelElement*>(m_private.get()); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp index b1f1f03..d7dbade 100644 --- a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp +++ b/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp @@ -7,7 +7,6 @@ #if ENABLE(VIDEO) -#include "CString.h" #include "Frame.h" #include "GraphicsContext.h" #include "HTMLMediaElement.h" @@ -36,6 +35,7 @@ #endif #include <wtf/Assertions.h> +#include <wtf/text/CString.h> using namespace WebCore; diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp index 9fbf573..e050c79 100644 --- a/WebKit/chromium/src/WebNode.cpp +++ b/WebKit/chromium/src/WebNode.cpp @@ -48,26 +48,23 @@ #include "markup.h" -#include <wtf/PassRefPtr.h> - using namespace WebCore; namespace WebKit { -class WebNodePrivate : public Node { -}; - void WebNode::reset() { - assign(0); + m_private.reset(); } void WebNode::assign(const WebNode& other) { - WebNodePrivate* p = const_cast<WebNodePrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); + m_private = other.m_private; +} + +bool WebNode::equals(const WebNode& n) const +{ + return (m_private.get() == n.m_private.get()); } WebNode::NodeType WebNode::nodeType() const @@ -77,7 +74,7 @@ WebNode::NodeType WebNode::nodeType() const WebNode WebNode::parentNode() const { - return PassRefPtr<Node>(const_cast<Node*>(m_private->parentNode())); + return WebNode(const_cast<Node*>(m_private->parentNode())); } WebString WebNode::nodeName() const @@ -97,30 +94,6 @@ bool WebNode::setNodeValue(const WebString& value) return !exceptionCode; } -WebNode::WebNode(const PassRefPtr<Node>& node) - : m_private(static_cast<WebNodePrivate*>(node.releaseRef())) -{ -} - -WebNode& WebNode::operator=(const PassRefPtr<Node>& node) -{ - assign(static_cast<WebNodePrivate*>(node.releaseRef())); - return *this; -} - -WebNode::operator PassRefPtr<Node>() const -{ - return PassRefPtr<Node>(const_cast<WebNodePrivate*>(m_private)); -} - -void WebNode::assign(WebNodePrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - WebFrame* WebNode::frame() const { return WebFrameImpl::fromFrame(m_private->document()->frame()); @@ -163,7 +136,7 @@ WebNodeList WebNode::childNodes() WebString WebNode::createMarkup() const { - return WebCore::createMarkup(m_private); + return WebCore::createMarkup(m_private.get()); } bool WebNode::isTextNode() const @@ -179,7 +152,7 @@ bool WebNode::isElementNode() const void WebNode::addEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture) { EventListenerWrapper* listenerWrapper = - listener->createEventListenerWrapper(eventType, useCapture, m_private); + listener->createEventListenerWrapper(eventType, useCapture, m_private.get()); // The listenerWrapper is only referenced by the actual Node. Once it goes // away, the wrapper notifies the WebEventListener so it can clear its // pointer to it. @@ -189,9 +162,36 @@ void WebNode::addEventListener(const WebString& eventType, WebEventListener* lis void WebNode::removeEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture) { EventListenerWrapper* listenerWrapper = - listener->getEventListenerWrapper(eventType, useCapture, m_private); + listener->getEventListenerWrapper(eventType, useCapture, m_private.get()); m_private->removeEventListener(eventType, listenerWrapper, useCapture); // listenerWrapper is now deleted. } +void WebNode::simulateClick() +{ + RefPtr<Event> noEvent; + m_private->dispatchSimulatedClick(noEvent); +} + +WebNodeList WebNode::getElementsByTagName(const WebString& tag) const +{ + return WebNodeList(m_private->getElementsByTagName(tag)); +} + +WebNode::WebNode(const PassRefPtr<Node>& node) + : m_private(node) +{ +} + +WebNode& WebNode::operator=(const PassRefPtr<Node>& node) +{ + m_private = node; + return *this; +} + +WebNode::operator PassRefPtr<Node>() const +{ + return m_private.get(); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebNotification.cpp b/WebKit/chromium/src/WebNotification.cpp index 1f6916e..5200d17 100644 --- a/WebKit/chromium/src/WebNotification.cpp +++ b/WebKit/chromium/src/WebNotification.cpp @@ -76,10 +76,10 @@ WebURL WebNotification::url() const return m_private->url(); } -WebString WebNotification::icon() const +WebURL WebNotification::iconURL() const { ASSERT(!isHTML()); - return m_private->contents().icon(); + return m_private->iconURL(); } WebString WebNotification::title() const diff --git a/WebKit/chromium/src/WebPageSerializer.cpp b/WebKit/chromium/src/WebPageSerializer.cpp index 1010285..4f93702 100644 --- a/WebKit/chromium/src/WebPageSerializer.cpp +++ b/WebKit/chromium/src/WebPageSerializer.cpp @@ -59,7 +59,7 @@ bool WebPageSerializer::serialize(WebFrame* frame, WebString WebPageSerializer::generateMetaCharsetDeclaration(const WebString& charset) { - return String::format("<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">", + return String::format("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">", charset.utf8().data()); } @@ -75,7 +75,7 @@ WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar String targetDeclaration; if (!baseTarget.isEmpty()) targetDeclaration = String::format(" target=\"%s\"", baseTarget.utf8().data()); - return String::format("<BASE href=\".\"%s>", targetDeclaration.utf8().data()); + return String::format("<base href=\".\"%s>", targetDeclaration.utf8().data()); } } // namespace WebKit diff --git a/WebKit/chromium/src/WebPageSerializerImpl.cpp b/WebKit/chromium/src/WebPageSerializerImpl.cpp index d5b2b7f..008e0c7 100644 --- a/WebKit/chromium/src/WebPageSerializerImpl.cpp +++ b/WebKit/chromium/src/WebPageSerializerImpl.cpp @@ -170,7 +170,7 @@ String WebPageSerializerImpl::preActionBeforeSerializeOpenTag( // Get encoding info. String xmlEncoding = param->doc->xmlEncoding(); if (xmlEncoding.isEmpty()) - xmlEncoding = param->doc->frame()->loader()->encoding(); + xmlEncoding = param->doc->frame()->loader()->writer()->encoding(); if (xmlEncoding.isEmpty()) xmlEncoding = UTF8Encoding().name(); result.append("<?xml version=\""); @@ -306,7 +306,7 @@ void WebPageSerializerImpl::openTagToString(const Element* element, if (needSkip) return; // Add open tag - result += "<" + element->nodeName(); + result += "<" + element->nodeName().lower(); // Go through all attributes and serialize them. const NamedNodeMap *attrMap = element->attributes(true); if (attrMap) { @@ -374,7 +374,7 @@ void WebPageSerializerImpl::endTagToString(const Element* element, // Write end tag when element has child/children. if (element->hasChildNodes() || param->hasAddedContentsBeforeEnd) { result += "</"; - result += element->nodeName(); + result += element->nodeName().lower(); result += ">"; } else { // Check whether we have to write end tag for empty element. @@ -385,7 +385,7 @@ void WebPageSerializerImpl::endTagToString(const Element* element, if (htmlElement->endTagRequirement() == TagStatusRequired) { // We need to write end tag when it is required. result += "</"; - result += element->nodeName(); + result += element->nodeName().lower(); result += ">"; } } else { @@ -514,7 +514,7 @@ bool WebPageSerializerImpl::serialize() // A new document, we will serialize it. didSerialization = true; // Get target encoding for current document. - String encoding = currentFrame->frame()->loader()->encoding(); + String encoding = currentFrame->frame()->loader()->writer()->encoding(); // Create the text encoding object with target encoding. TextEncoding textEncoding(encoding); // Construct serialize parameter for late processing document. diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp index 86cac26..2cdf255 100644 --- a/WebKit/chromium/src/WebPluginContainerImpl.cpp +++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp @@ -60,6 +60,7 @@ #include "MouseEvent.h" #include "Page.h" #include "ScrollView.h" +#include "WheelEvent.h" #if WEBKIT_USING_SKIA #include "PlatformContextSkia.h" @@ -124,7 +125,7 @@ void WebPluginContainerImpl::invalidateRect(const IntRect& rect) IntRect clipRect = parent()->windowClipRect(); damageRect.intersect(clipRect); - parent()->hostWindow()->repaint(damageRect, true); + parent()->hostWindow()->invalidateContentsAndWindow(damageRect, false /*immediate*/); } void WebPluginContainerImpl::setFocus() @@ -160,6 +161,8 @@ void WebPluginContainerImpl::handleEvent(Event* event) // where mozilla behaves differently than the spec. if (event->isMouseEvent()) handleMouseEvent(static_cast<MouseEvent*>(event)); + else if (event->isWheelEvent()) + handleWheelEvent(static_cast<WheelEvent*>(event)); else if (event->isKeyboardEvent()) handleKeyboardEvent(static_cast<KeyboardEvent*>(event)); } @@ -170,6 +173,12 @@ void WebPluginContainerImpl::frameRectsChanged() reportGeometry(); } +void WebPluginContainerImpl::widgetPositionsUpdated() +{ + Widget::widgetPositionsUpdated(); + reportGeometry(); +} + void WebPluginContainerImpl::setParentVisible(bool parentVisible) { // We override this function to make sure that geometry updates are sent @@ -200,6 +209,36 @@ void WebPluginContainerImpl::setParent(ScrollView* view) reportGeometry(); } +bool WebPluginContainerImpl::supportsPaginatedPrint() const +{ + return m_webPlugin->supportsPaginatedPrint(); +} + +int WebPluginContainerImpl::printBegin(const IntRect& printableArea, + int printerDPI) const +{ + return m_webPlugin->printBegin(printableArea, printerDPI); +} + +bool WebPluginContainerImpl::printPage(int pageNumber, + WebCore::GraphicsContext* gc) +{ + gc->save(); +#if WEBKIT_USING_SKIA + WebCanvas* canvas = gc->platformContext()->canvas(); +#elif WEBKIT_USING_CG + WebCanvas* canvas = gc->platformContext(); +#endif + bool ret = m_webPlugin->printPage(pageNumber, canvas); + gc->restore(); + return ret; +} + +void WebPluginContainerImpl::printEnd() +{ + return m_webPlugin->printEnd(); +} + void WebPluginContainerImpl::invalidate() { Widget::invalidate(); @@ -353,22 +392,7 @@ void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event) } WebCursorInfo cursorInfo; - bool handled = m_webPlugin->handleInputEvent(webEvent, cursorInfo); -#if !OS(DARWIN) - // TODO(pkasting): http://b/1119691 This conditional seems exactly - // backwards, but if I reverse it, giving focus to a transparent - // (windowless) plugin fails. - handled = !handled; - // TODO(awalker): oddly, the above is not true in Mac builds. Looking - // at Apple's corresponding code for Mac and Windows (PluginViewMac and - // PluginViewWin), setDefaultHandled() gets called when handleInputEvent() - // returns true, which then indicates to WebCore that the plugin wants to - // swallow the event--which is what we want. Calling setDefaultHandled() - // fixes several Mac Chromium bugs, but does indeed prevent windowless plugins - // from getting focus in Windows builds, as pkasting notes above. So for - // now, we only do so in Mac builds. -#endif - if (handled) + if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) event->setDefaultHandled(); // A windowless plugin can change the cursor in response to a mouse move @@ -382,19 +406,26 @@ void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event) chromeClient->setCursorForPlugin(cursorInfo); } +void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) +{ + FrameView* parentView = static_cast<FrameView*>(parent()); + WebMouseWheelEventBuilder webEvent(parentView, *event); + if (webEvent.type == WebInputEvent::Undefined) + return; + + WebCursorInfo cursorInfo; + if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) + event->setDefaultHandled(); +} + void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) { WebKeyboardEventBuilder webEvent(*event); if (webEvent.type == WebInputEvent::Undefined) return; - WebCursorInfo cursor_info; - bool handled = m_webPlugin->handleInputEvent(webEvent, cursor_info); -#if !OS(DARWIN) - // TODO(pkasting): http://b/1119691 See above. - handled = !handled; -#endif - if (handled) + 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 00450bb..3160394 100644 --- a/WebKit/chromium/src/WebPluginContainerImpl.h +++ b/WebKit/chromium/src/WebPluginContainerImpl.h @@ -48,6 +48,7 @@ class KeyboardEvent; class MouseEvent; class ResourceError; class ResourceResponse; +class WheelEvent; } namespace WebKit { @@ -73,6 +74,7 @@ public: virtual void frameRectsChanged(); virtual void setParentVisible(bool); virtual void setParent(WebCore::ScrollView*); + virtual void widgetPositionsUpdated(); // WebPluginContainer methods virtual void invalidate(); @@ -83,6 +85,20 @@ public: virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed); virtual void loadFrameRequest(const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData); + // Printing interface. The plugin can support custom printing + // (which means it controls the layout, number of pages etc). + // Whether the plugin supports its own paginated print. The other print + // interface methods are called only if this method returns true. + bool supportsPaginatedPrint() const; + // Sets up printing at the given print rect and printer DPI. printableArea + // is in points (a point is 1/72 of an inch).Returns the number of pages to + // be printed at these settings. + int printBegin(const WebCore::IntRect& printableArea, int printerDPI) const; + // Prints the page specified by pageNumber (0-based index) into the supplied canvas. + bool printPage(int pageNumber, WebCore::GraphicsContext* gc); + // Ends the print operation. + void printEnd(); + // Resource load events for the plugin's source data: void didReceiveResponse(const WebCore::ResourceResponse&); void didReceiveData(const char *data, int dataLength); @@ -103,6 +119,7 @@ private: ~WebPluginContainerImpl(); void handleMouseEvent(WebCore::MouseEvent*); + void handleWheelEvent(WebCore::WheelEvent*); void handleKeyboardEvent(WebCore::KeyboardEvent*); void calculateGeometry(const WebCore::IntRect& frameRect, diff --git a/WebKit/chromium/src/WebPluginDocument.cpp b/WebKit/chromium/src/WebPluginDocument.cpp new file mode 100644 index 0000000..8f794ad --- /dev/null +++ b/WebKit/chromium/src/WebPluginDocument.cpp @@ -0,0 +1,72 @@ +/* + * 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 "WebPluginDocument.h" + +#include "Document.h" +#include "PluginDocument.h" + +#include "WebPluginContainerImpl.h" + +#include <wtf/PassRefPtr.h> + +using namespace WebCore; + +namespace WebKit { + + +WebPlugin* WebPluginDocument::plugin() +{ + if (!isPluginDocument()) + return 0; + PluginDocument* doc = unwrap<PluginDocument>(); + WebPluginContainerImpl* container = static_cast<WebPluginContainerImpl*>(static_cast<PluginDocument*>(doc)->pluginWidget()); + return container->plugin(); +} + + +WebPluginDocument::WebPluginDocument(const PassRefPtr<PluginDocument>& elem) + : WebDocument(elem) +{ +} + +WebPluginDocument& WebPluginDocument::operator=(const PassRefPtr<PluginDocument>& elem) +{ + m_private = elem; + return *this; +} + +WebPluginDocument::operator PassRefPtr<PluginDocument>() const +{ + return static_cast<PluginDocument*>(m_private.get()); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebPopupMenuImpl.cpp b/WebKit/chromium/src/WebPopupMenuImpl.cpp index f6d360e..f9da394 100644 --- a/WebKit/chromium/src/WebPopupMenuImpl.cpp +++ b/WebKit/chromium/src/WebPopupMenuImpl.cpp @@ -250,18 +250,29 @@ void WebPopupMenuImpl::setTextDirection(WebTextDirection direction) //----------------------------------------------------------------------------- // WebCore::HostWindow -void WebPopupMenuImpl::repaint(const IntRect& paintRect, - bool contentChanged, - bool immediate, - bool repaintContentOnly) +void WebPopupMenuImpl::invalidateContents(const IntRect&, bool) { - // Ignore spurious calls. - if (!contentChanged || paintRect.isEmpty()) + notImplemented(); +} + +void WebPopupMenuImpl::invalidateWindow(const IntRect&, bool) +{ + notImplemented(); +} + +void WebPopupMenuImpl::invalidateContentsAndWindow(const IntRect& paintRect, bool /*immediate*/) +{ + if (paintRect.isEmpty()) return; if (m_client) m_client->didInvalidateRect(paintRect); } +void WebPopupMenuImpl::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) +{ + invalidateContentsAndWindow(updateRect, immediate); +} + void WebPopupMenuImpl::scroll(const IntSize& scrollDelta, const IntRect& scrollRect, const IntRect& clipRect) diff --git a/WebKit/chromium/src/WebPopupMenuImpl.h b/WebKit/chromium/src/WebPopupMenuImpl.h index 13eb674..7390394 100644 --- a/WebKit/chromium/src/WebPopupMenuImpl.h +++ b/WebKit/chromium/src/WebPopupMenuImpl.h @@ -98,9 +98,10 @@ public: ~WebPopupMenuImpl(); // WebCore::HostWindow methods: - virtual void repaint( - const WebCore::IntRect&, bool contentChanged, bool immediate = false, - bool repaintContentOnly = false); + virtual void invalidateContents(const WebCore::IntRect&, bool); + virtual void invalidateWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool); virtual void scroll( const WebCore::IntSize& scrollDelta, const WebCore::IntRect& scrollRect, const WebCore::IntRect& clipRect); diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp index ad84764..464834d 100644 --- a/WebKit/chromium/src/WebRuntimeFeatures.cpp +++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp @@ -184,4 +184,30 @@ bool WebRuntimeFeatures::isIndexedDatabaseEnabled() #endif } +void WebRuntimeFeatures::enableWebGL(bool enable) +{ +#if ENABLE(3D_CANVAS) + RuntimeEnabledFeatures::setWebGLEnabled(enable); +#endif +} + +bool WebRuntimeFeatures::isWebGLEnabled() +{ +#if ENABLE(3D_CANVAS) + return RuntimeEnabledFeatures::webGLRenderingContextEnabled(); +#else + return false; +#endif +} + +void WebRuntimeFeatures::enablePushState(bool enable) +{ + RuntimeEnabledFeatures::setPushStateEnabled(enable); +} + +bool WebRuntimeFeatures::isPushStateEnabled(bool enable) +{ + return RuntimeEnabledFeatures::pushStateEnabled(); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp index eddaffe..8eef6cc 100644 --- a/WebKit/chromium/src/WebSearchableFormData.cpp +++ b/WebKit/chromium/src/WebSearchableFormData.cpp @@ -62,7 +62,7 @@ void GetFormEncoding(const HTMLFormElement* form, TextEncoding* encoding) return; } const Frame* frame = form->document()->frame(); - *encoding = frame ? TextEncoding(frame->loader()->encoding()) : Latin1Encoding(); + *encoding = frame ? TextEncoding(frame->loader()->writer()->encoding()) : Latin1Encoding(); } // Returns true if the submit request results in an HTTP URL. diff --git a/WebKit/chromium/src/WebSecurityOrigin.cpp b/WebKit/chromium/src/WebSecurityOrigin.cpp index 81546da..bc36be7 100644 --- a/WebKit/chromium/src/WebSecurityOrigin.cpp +++ b/WebKit/chromium/src/WebSecurityOrigin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * 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 @@ -31,8 +31,10 @@ #include "config.h" #include "WebSecurityOrigin.h" +#include "KURL.h" #include "SecurityOrigin.h" #include "WebString.h" +#include "WebURL.h" #include <wtf/PassRefPtr.h> using namespace WebCore; @@ -42,9 +44,9 @@ namespace WebKit { class WebSecurityOriginPrivate : public SecurityOrigin { }; -WebSecurityOrigin* WebSecurityOrigin::createFromDatabaseIdentifier(const WebString& databaseIdentifier) +WebSecurityOrigin WebSecurityOrigin::createFromDatabaseIdentifier(const WebString& databaseIdentifier) { - return new WebSecurityOrigin(SecurityOrigin::createFromDatabaseIdentifier(databaseIdentifier)); + return WebSecurityOrigin(SecurityOrigin::createFromDatabaseIdentifier(databaseIdentifier)); } WebSecurityOrigin WebSecurityOrigin::createFromString(const WebString& origin) @@ -52,6 +54,11 @@ WebSecurityOrigin WebSecurityOrigin::createFromString(const WebString& origin) return WebSecurityOrigin(SecurityOrigin::createFromString(origin)); } +WebSecurityOrigin WebSecurityOrigin::create(const WebURL& url) +{ + return WebSecurityOrigin(SecurityOrigin::create(url)); +} + void WebSecurityOrigin::reset() { assign(0); @@ -89,6 +96,19 @@ bool WebSecurityOrigin::isEmpty() const return m_private->isEmpty(); } +bool WebSecurityOrigin::canAccess(const WebSecurityOrigin& other) const +{ + ASSERT(m_private); + ASSERT(other.m_private); + return m_private->canAccess(other.m_private); +} + +bool WebSecurityOrigin::canRequest(const WebURL& url) const +{ + ASSERT(m_private); + return m_private->canRequest(url); +} + WebString WebSecurityOrigin::toString() const { ASSERT(m_private); diff --git a/WebKit/chromium/src/WebSecurityPolicy.cpp b/WebKit/chromium/src/WebSecurityPolicy.cpp index 48b445c..24ef7d1 100644 --- a/WebKit/chromium/src/WebSecurityPolicy.cpp +++ b/WebKit/chromium/src/WebSecurityPolicy.cpp @@ -51,19 +51,24 @@ void WebSecurityPolicy::registerURLSchemeAsNoAccess(const WebString& scheme) SecurityOrigin::registerURLSchemeAsNoAccess(scheme); } +void WebSecurityPolicy::registerURLSchemeAsSecure(const WebString& scheme) +{ + SecurityOrigin::registerURLSchemeAsSecure(scheme); +} + void WebSecurityPolicy::whiteListAccessFromOrigin(const WebURL& sourceOrigin, const WebString& destinationProtocol, const WebString& destinationHost, bool allowDestinationSubdomains) { - SecurityOrigin::whiteListAccessFromOrigin( + SecurityOrigin::addOriginAccessWhitelistEntry( *SecurityOrigin::create(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains); } void WebSecurityPolicy::resetOriginAccessWhiteLists() { - SecurityOrigin::resetOriginAccessWhiteLists(); + SecurityOrigin::resetOriginAccessWhitelists(); } bool WebSecurityPolicy::shouldHideReferrer(const WebURL& url, const WebString& referrer) diff --git a/WebKit/chromium/src/WebSelectElement.cpp b/WebKit/chromium/src/WebSelectElement.cpp new file mode 100644 index 0000000..6516cc3 --- /dev/null +++ b/WebKit/chromium/src/WebSelectElement.cpp @@ -0,0 +1,68 @@ +/* + * 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 "WebSelectElement.h" + +#include "HTMLSelectElement.h" +#include "WebString.h" +#include <wtf/PassRefPtr.h> + +using namespace WebCore; + +namespace WebKit { + +void WebSelectElement::setValue(const WebString& value) +{ + unwrap<HTMLSelectElement>()->setValue(value); +} + +WebString WebSelectElement::value() +{ + return unwrap<HTMLSelectElement>()->value(); +} + +WebSelectElement::WebSelectElement(const PassRefPtr<HTMLSelectElement>& elem) + : WebFormControlElement(elem) +{ +} + +WebSelectElement& WebSelectElement::operator=(const PassRefPtr<HTMLSelectElement>& elem) +{ + m_private = elem; + return *this; +} + +WebSelectElement::operator PassRefPtr<HTMLSelectElement>() const +{ + return static_cast<HTMLSelectElement*>(m_private.get()); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebSerializedScriptValue.cpp b/WebKit/chromium/src/WebSerializedScriptValue.cpp new file mode 100644 index 0000000..ce8517a --- /dev/null +++ b/WebKit/chromium/src/WebSerializedScriptValue.cpp @@ -0,0 +1,77 @@ +/* + * 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 "WebSerializedScriptValue.h" + +#include "SerializedScriptValue.h" +#include "WebString.h" + +using namespace WebCore; + +namespace WebKit { + +WebSerializedScriptValue WebSerializedScriptValue::fromString(const WebString& s) +{ + return SerializedScriptValue::createFromWire(s); +} + +void WebSerializedScriptValue::reset() +{ + m_private.reset(); +} + +void WebSerializedScriptValue::assign(const WebSerializedScriptValue& other) +{ + m_private = other.m_private; +} + +WebString WebSerializedScriptValue::toString() const +{ + return m_private->toWireString(); +} + +WebSerializedScriptValue::WebSerializedScriptValue(const PassRefPtr<SerializedScriptValue>& value) + : m_private(value) +{ +} + +WebSerializedScriptValue& WebSerializedScriptValue::operator=(const PassRefPtr<SerializedScriptValue>& value) +{ + m_private = value; + return *this; +} + +WebSerializedScriptValue::operator PassRefPtr<SerializedScriptValue>() const +{ + return m_private.get(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp index a680321..9e0fa91 100644 --- a/WebKit/chromium/src/WebSettingsImpl.cpp +++ b/WebKit/chromium/src/WebSettingsImpl.cpp @@ -185,6 +185,11 @@ void WebSettingsImpl::setUserStyleSheetLocation(const WebURL& location) m_settings->setUserStyleSheetLocation(location); } +void WebSettingsImpl::setAuthorAndUserStylesEnabled(bool enabled) +{ + m_settings->setAuthorAndUserStylesEnabled(enabled); +} + void WebSettingsImpl::setUsesPageCache(bool usesPageCache) { m_settings->setUsesPageCache(usesPageCache); @@ -226,11 +231,6 @@ void WebSettingsImpl::setShouldPaintCustomScrollbars(bool enabled) m_settings->setShouldPaintCustomScrollbars(enabled); } -void WebSettingsImpl::setDatabasesEnabled(bool enabled) -{ - m_settings->setDatabasesEnabled(enabled); -} - void WebSettingsImpl::setAllowUniversalAccessFromFileURLs(bool allow) { m_settings->setAllowUniversalAccessFromFileURLs(allow); @@ -264,9 +264,4 @@ void WebSettingsImpl::setShowDebugBorders(bool show) m_settings->setShowDebugBorders(show); } -void WebSettingsImpl::setGeolocationEnabled(bool enabled) -{ - m_settings->setGeolocationEnabled(enabled); -} - } // namespace WebKit diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h index 64ccab5..7a809c7 100644 --- a/WebKit/chromium/src/WebSettingsImpl.h +++ b/WebKit/chromium/src/WebSettingsImpl.h @@ -71,6 +71,7 @@ public: virtual void setJavaEnabled(bool); virtual void setAllowScriptsToCloseWindows(bool); virtual void setUserStyleSheetLocation(const WebURL&); + virtual void setAuthorAndUserStylesEnabled(bool); virtual void setUsesPageCache(bool); virtual void setDownloadableBinaryFontsEnabled(bool); virtual void setXSSAuditorEnabled(bool); @@ -78,13 +79,11 @@ public: virtual void setEditableLinkBehaviorNeverLive(); virtual void setFontRenderingModeNormal(); virtual void setShouldPaintCustomScrollbars(bool); - virtual void setDatabasesEnabled(bool); virtual void setAllowUniversalAccessFromFileURLs(bool); virtual void setAllowFileAccessFromFileURLs(bool); virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); virtual void setOfflineWebApplicationCacheEnabled(bool); virtual void setExperimentalWebGLEnabled(bool); - virtual void setGeolocationEnabled(bool); virtual void setShowDebugBorders(bool); private: diff --git a/WebKit/chromium/src/WebStorageAreaImpl.cpp b/WebKit/chromium/src/WebStorageAreaImpl.cpp index 9a7fd5c..2cecfe9 100644 --- a/WebKit/chromium/src/WebStorageAreaImpl.cpp +++ b/WebKit/chromium/src/WebStorageAreaImpl.cpp @@ -66,7 +66,7 @@ WebString WebStorageAreaImpl::getItem(const WebString& key) return m_storageArea->getItem(key); } -void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue) +void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue, WebFrame*) { int exceptionCode = 0; diff --git a/WebKit/chromium/src/WebStorageAreaImpl.h b/WebKit/chromium/src/WebStorageAreaImpl.h index e9a11c2..2869fc9 100644 --- a/WebKit/chromium/src/WebStorageAreaImpl.h +++ b/WebKit/chromium/src/WebStorageAreaImpl.h @@ -45,7 +45,7 @@ public: virtual unsigned length(); virtual WebString key(unsigned index); virtual WebString getItem(const WebString& key); - virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue); + virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue, WebFrame*); virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue); virtual void clear(const WebURL& url, bool& somethingCleared); diff --git a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp b/WebKit/chromium/src/WebStorageNamespaceImpl.cpp index e6f6548..66be027 100644 --- a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp +++ b/WebKit/chromium/src/WebStorageNamespaceImpl.cpp @@ -47,7 +47,7 @@ WebStorageNamespace* WebStorageNamespace::createLocalStorageNamespace(const WebS WebStorageNamespace* WebStorageNamespace::createSessionStorageNamespace() { - return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::sessionStorageNamespace()); + return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::sessionStorageNamespace(noQuota)); } WebStorageNamespaceImpl::WebStorageNamespaceImpl(PassRefPtr<WebCore::StorageNamespace> storageNamespace) diff --git a/WebKit/chromium/src/WebString.cpp b/WebKit/chromium/src/WebString.cpp index 36d5f86..a61a059 100644 --- a/WebKit/chromium/src/WebString.cpp +++ b/WebKit/chromium/src/WebString.cpp @@ -32,8 +32,8 @@ #include "WebString.h" #include "AtomicString.h" -#include "CString.h" #include "PlatformString.h" +#include <wtf/text/CString.h> #include "WebCString.h" diff --git a/WebKit/chromium/src/WebURLError.cpp b/WebKit/chromium/src/WebURLError.cpp index a038aee..ef32b5c 100644 --- a/WebKit/chromium/src/WebURLError.cpp +++ b/WebKit/chromium/src/WebURLError.cpp @@ -31,9 +31,9 @@ #include "config.h" #include "WebURLError.h" -#include "CString.h" #include "KURL.h" #include "ResourceError.h" +#include <wtf/text/CString.h> using namespace WebCore; diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp index 95e0be2..3b0600c 100644 --- a/WebKit/chromium/src/WebURLResponse.cpp +++ b/WebKit/chromium/src/WebURLResponse.cpp @@ -165,6 +165,8 @@ void WebURLResponse::setHTTPHeaderField(const WebString& name, const WebString& void WebURLResponse::addHTTPHeaderField(const WebString& name, const WebString& value) { + if (name.isNull() || value.isNull()) + return; // FIXME: Add an addHTTPHeaderField method to ResourceResponse. const HTTPHeaderMap& map = m_private->m_resourceResponse->httpHeaderFields(); String valueStr(value); @@ -265,6 +267,16 @@ void WebURLResponse::setWasFetchedViaSPDY(bool value) m_private->m_resourceResponse->setWasFetchedViaSPDY(value); } +bool WebURLResponse::isMultipartPayload() const +{ + return m_private->m_resourceResponse->isMultipartPayload(); +} + +void WebURLResponse::setIsMultipartPayload(bool value) +{ + m_private->m_resourceResponse->setIsMultipartPayload(value); +} + void WebURLResponse::assign(WebURLResponsePrivate* p) { // Subclasses may call this directly so a self-assignment check is needed diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp index 97665d4..671a8c9 100644 --- a/WebKit/chromium/src/WebViewImpl.cpp +++ b/WebKit/chromium/src/WebViewImpl.cpp @@ -87,6 +87,7 @@ #include "WebDevToolsAgentPrivate.h" #include "WebDragData.h" #include "WebFrameImpl.h" +#include "WebImage.h" #include "WebInputEvent.h" #include "WebInputEventConversion.h" #include "WebMediaPlayerAction.h" @@ -100,13 +101,11 @@ #include "WebViewClient.h" #if OS(WINDOWS) -#include "KeyboardCodesWin.h" #include "RenderThemeChromiumWin.h" #else #if OS(LINUX) #include "RenderThemeChromiumLinux.h" #endif -#include "KeyboardCodesPosix.h" #include "RenderTheme.h" #endif @@ -149,11 +148,7 @@ COMPILE_ASSERT_MATCHING_ENUM(DragOperationMove); COMPILE_ASSERT_MATCHING_ENUM(DragOperationDelete); COMPILE_ASSERT_MATCHING_ENUM(DragOperationEvery); -// Note that focusOnShow is false so that the suggestions popup is shown not -// activated. We need the page to still have focus so the user can keep typing -// while the popup is showing. static const PopupContainerSettings suggestionsPopupSettings = { - false, // focusOnShow false, // setTextOnIndexChange false, // acceptOnAbandon true, // loopSelectionNavigation @@ -245,6 +240,11 @@ WebViewImpl::WebViewImpl(WebViewClient* client) , m_suggestionsPopup(0) , m_isTransparent(false) , m_tabsToLinks(false) + , m_haveMouseCapture(false) +#if USE(ACCELERATED_COMPOSITING) + , m_layerRenderer(0) + , m_isAcceleratedCompositing(false) +#endif { // WebKit/win/WebView.cpp does the same thing, except they call the // KJS specific wrapper around this method. We need to have threading @@ -326,7 +326,12 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event) if (!mainFrameImpl() || !mainFrameImpl()->frameView()) return; + // If there is a select popup opened, close it as the user is clicking on + // the page (outside of the popup). + hideSelectPopup(); + m_lastMouseDownPoint = WebPoint(event.x, event.y); + m_haveMouseCapture = true; // If a text field that has focus is clicked again, we should display the // suggestions popup. @@ -347,6 +352,8 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event) } } + mainFrameImpl()->frame()->loader()->resetMultipleFormSubmissionProtection(); + mainFrameImpl()->frame()->eventHandler()->handleMousePressEvent( PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event)); @@ -439,7 +446,6 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event) } #endif - mouseCaptureLost(); mainFrameImpl()->frame()->eventHandler()->handleMouseReleaseEvent( PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event)); @@ -471,6 +477,10 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event) // event. m_suppressNextKeypressEvent = false; + // Give any select popup a chance at consuming the key event. + if (selectPopupHandleKeyEvent(event)) + return true; + // Give Autocomplete a chance to consume the key events it is interested in. if (autocompleteHandleKeyEvent(event)) return true; @@ -507,14 +517,27 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event) PlatformKeyboardEventBuilder evt(event); if (handler->keyEvent(evt)) { - if (WebInputEvent::RawKeyDown == event.type) - m_suppressNextKeypressEvent = true; + if (WebInputEvent::RawKeyDown == event.type) { + // Suppress the next keypress event unless the focused node is a plug-in node. + // (Flash needs these keypress events to handle non-US keyboards.) + Node* node = frame->document()->focusedNode(); + if (!node || !node->renderer() || !node->renderer()->isEmbeddedObject()) + m_suppressNextKeypressEvent = true; + } return true; } return keyEventDefault(event); } +bool WebViewImpl::selectPopupHandleKeyEvent(const WebKeyboardEvent& event) +{ + if (!m_selectPopup) + return false; + + return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event)); +} + bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event) { if (!m_suggestionsPopupShowing @@ -604,6 +627,17 @@ bool WebViewImpl::charEvent(const WebKeyboardEvent& event) return true; } +#if ENABLE(TOUCH_EVENTS) +bool WebViewImpl::touchEvent(const WebTouchEvent& event) +{ + if (!mainFrameImpl() || !mainFrameImpl()->frameView()) + return false; + + PlatformTouchEventBuilder touchEventBuilder(mainFrameImpl()->frameView(), event); + return mainFrameImpl()->frame()->eventHandler()->handleTouchEvent(touchEventBuilder); +} +#endif + // The WebViewImpl::SendContextMenuEvent function is based on the Webkit // function // bool WebView::handleContextMenuEvent(WPARAM wParam, LPARAM lParam) in @@ -774,6 +808,12 @@ bool WebViewImpl::scrollViewWithKeyboard(int keyCode, int modifiers) return propagateScroll(scrollDirection, scrollGranularity); } +void WebViewImpl::hideSelectPopup() +{ + if (m_selectPopup.get()) + m_selectPopup->hidePopup(); +} + bool WebViewImpl::propagateScroll(ScrollDirection scrollDirection, ScrollGranularity scrollGranularity) { @@ -793,6 +833,22 @@ bool WebViewImpl::propagateScroll(ScrollDirection scrollDirection, return scrollHandled; } +void WebViewImpl::popupOpened(WebCore::PopupContainer* popupContainer) +{ + if (popupContainer->popupType() == WebCore::PopupContainer::Select) { + ASSERT(!m_selectPopup); + m_selectPopup = popupContainer; + } +} + +void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer) +{ + if (popupContainer->popupType() == WebCore::PopupContainer::Select) { + ASSERT(m_selectPopup.get()); + m_selectPopup = 0; + } +} + Frame* WebViewImpl::focusedWebCoreFrame() { return m_page.get() ? m_page->focusController()->focusedOrMainFrame() : 0; @@ -873,9 +929,26 @@ void WebViewImpl::layout() void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect) { - WebFrameImpl* webframe = mainFrameImpl(); - if (webframe) - webframe->paint(canvas, rect); + +#if USE(ACCELERATED_COMPOSITING) + if (!isAcceleratedCompositing()) { +#endif + WebFrameImpl* webframe = mainFrameImpl(); + if (webframe) + webframe->paint(canvas, rect); +#if USE(ACCELERATED_COMPOSITING) + } else { + // Draw the contents of the root layer. + updateRootLayerContents(rect); + + // Composite everything into the canvas that's passed to us. +#if PLATFORM(SKIA) + m_layerRenderer->drawLayersInCanvas(static_cast<skia::PlatformCanvas*>(canvas), IntRect(rect)); +#elif PLATFORM(CG) +#error "Need to implement CG version" +#endif + } +#endif } // FIXME: m_currentInputEvent should be removed once ChromeClient::show() can @@ -892,6 +965,38 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) if (m_ignoreInputEvents) return true; + if (m_haveMouseCapture && WebInputEvent::isMouseEventType(inputEvent.type)) { + // Not all platforms call mouseCaptureLost() directly. + if (inputEvent.type == WebInputEvent::MouseUp) + mouseCaptureLost(); + + Node* node = focusedWebCoreNode(); + if (node && node->renderer() && node->renderer()->isEmbeddedObject()) { + AtomicString eventType; + switch (inputEvent.type) { + case WebInputEvent::MouseMove: + eventType = eventNames().mousemoveEvent; + break; + case WebInputEvent::MouseLeave: + eventType = eventNames().mouseoutEvent; + break; + case WebInputEvent::MouseDown: + eventType = eventNames().mousedownEvent; + break; + case WebInputEvent::MouseUp: + eventType = eventNames().mouseupEvent; + break; + default: + ASSERT_NOT_REACHED(); + } + + node->dispatchMouseEvent( + PlatformMouseEventBuilder(mainFrameImpl()->frameView(), *static_cast<const WebMouseEvent*>(&inputEvent)), + eventType); + return true; + } + } + // FIXME: Remove m_currentInputEvent. // This only exists to allow ChromeClient::show() to know which mouse button // triggered a window.open event. @@ -936,6 +1041,15 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) handled = charEvent(*static_cast<const WebKeyboardEvent*>(&inputEvent)); break; +#if ENABLE(TOUCH_EVENTS) + case WebInputEvent::TouchStart: + case WebInputEvent::TouchMove: + case WebInputEvent::TouchEnd: + case WebInputEvent::TouchCancel: + handled = touchEvent(*static_cast<const WebTouchEvent*>(&inputEvent)); + break; +#endif + default: handled = false; } @@ -947,6 +1061,7 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) void WebViewImpl::mouseCaptureLost() { + m_haveMouseCapture = false; } void WebViewImpl::setFocus(bool enable) @@ -982,6 +1097,7 @@ void WebViewImpl::setFocus(bool enable) m_imeAcceptEvents = true; } else { hideSuggestionsPopup(); + hideSelectPopup(); // Clear focus on the currently focused frame if any. if (!m_page.get()) @@ -1166,7 +1282,7 @@ WebString WebViewImpl::pageEncoding() const if (!m_page.get()) return WebString(); - return m_page->mainFrame()->loader()->encoding(); + return m_page->mainFrame()->loader()->writer()->encoding(); } void WebViewImpl::setPageEncoding(const WebString& encodingName) @@ -1302,7 +1418,7 @@ int WebViewImpl::setZoomLevel(bool textOnly, int zoomLevel) Frame* frame = mainFrameImpl()->frame(); if (zoomFactor != frame->zoomFactor()) { m_zoomLevel = zoomLevel; - frame->setZoomFactor(zoomFactor, textOnly); + frame->setZoomFactor(zoomFactor, textOnly ? ZoomTextOnly : ZoomPage); } return m_zoomLevel; } @@ -1331,6 +1447,9 @@ void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, case WebMediaPlayerAction::Loop: mediaElement->setLoop(action.enable); break; + case WebMediaPlayerAction::Controls: + mediaElement->setControls(action.enable); + break; default: ASSERT_NOT_REACHED(); } @@ -1392,26 +1511,7 @@ WebDragOperation WebViewImpl::dragTargetDragEnter( m_dragIdentity = identity; m_operationsAllowed = operationsAllowed; - DragData dragData( - m_currentDragData.get(), - clientPoint, - screenPoint, - static_cast<DragOperation>(operationsAllowed)); - - m_dropEffect = DropEffectDefault; - m_dragTargetDispatch = true; - DragOperation effect = m_page->dragController()->dragEntered(&dragData); - // Mask the operation against the drag source's allowed operations. - if ((effect & dragData.draggingSourceOperationMask()) != effect) - effect = DragOperationNone; - m_dragTargetDispatch = false; - - if (m_dropEffect != DropEffectDefault) { - m_dragOperation = (m_dropEffect != DropEffectNone) ? WebDragOperationCopy - : WebDragOperationNone; - } else - m_dragOperation = static_cast<WebDragOperation>(effect); - return m_dragOperation; + return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragEnter); } WebDragOperation WebViewImpl::dragTargetDragOver( @@ -1419,29 +1519,9 @@ WebDragOperation WebViewImpl::dragTargetDragOver( const WebPoint& screenPoint, WebDragOperationsMask operationsAllowed) { - ASSERT(m_currentDragData.get()); - m_operationsAllowed = operationsAllowed; - DragData dragData( - m_currentDragData.get(), - clientPoint, - screenPoint, - static_cast<DragOperation>(operationsAllowed)); - - m_dropEffect = DropEffectDefault; - m_dragTargetDispatch = true; - DragOperation effect = m_page->dragController()->dragUpdated(&dragData); - // Mask the operation against the drag source's allowed operations. - if ((effect & dragData.draggingSourceOperationMask()) != effect) - effect = DragOperationNone; - m_dragTargetDispatch = false; - if (m_dropEffect != DropEffectDefault) { - m_dragOperation = (m_dropEffect != DropEffectNone) ? WebDragOperationCopy - : WebDragOperationNone; - } else - m_dragOperation = static_cast<WebDragOperation>(effect); - return m_dragOperation; + return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragOver); } void WebViewImpl::dragTargetDragLeave() @@ -1504,7 +1584,36 @@ int WebViewImpl::dragIdentity() return 0; } -unsigned long WebViewImpl::createUniqueIdentifierForRequest() { +WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPoint, const WebPoint& screenPoint, DragAction dragAction) +{ + ASSERT(m_currentDragData.get()); + + DragData dragData( + m_currentDragData.get(), + clientPoint, + screenPoint, + static_cast<DragOperation>(m_operationsAllowed)); + + m_dropEffect = DropEffectDefault; + m_dragTargetDispatch = true; + DragOperation effect = dragAction == DragEnter ? m_page->dragController()->dragEntered(&dragData) + : m_page->dragController()->dragUpdated(&dragData); + // Mask the operation against the drag source's allowed operations. + if (!(effect & dragData.draggingSourceOperationMask())) + effect = DragOperationNone; + m_dragTargetDispatch = false; + + if (m_dropEffect != DropEffectDefault) { + m_dragOperation = (m_dropEffect != DropEffectNone) ? WebDragOperationCopy + : WebDragOperationNone; + } else + m_dragOperation = static_cast<WebDragOperation>(effect); + + return m_dragOperation; +} + +unsigned long WebViewImpl::createUniqueIdentifierForRequest() +{ if (m_page) return m_page->progress()->createUniqueIdentifier(); return 0; @@ -1607,6 +1716,7 @@ void WebViewImpl::applyAutoFillSuggestions( if (!m_autoFillPopup.get()) { m_autoFillPopup = PopupContainer::create(m_suggestionsPopupClient, + PopupContainer::Suggestion, suggestionsPopupSettings); } @@ -1662,6 +1772,7 @@ void WebViewImpl::applyAutocompleteSuggestions( if (!m_autocompletePopup.get()) { m_autocompletePopup = PopupContainer::create(m_suggestionsPopupClient, + PopupContainer::Suggestion, suggestionsPopupSettings); } @@ -1775,6 +1886,13 @@ void WebViewImpl::addUserScript(const WebString& sourceCode, bool runAtStart) runAtStart ? InjectAtDocumentStart : InjectAtDocumentEnd); } +void WebViewImpl::addUserStyleSheet(const WebString& sourceCode) +{ + PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); + RefPtr<DOMWrapperWorld> world(DOMWrapperWorld::create()); + pageGroup->addUserStyleSheetToWorld(world.get(), sourceCode, WebURL(), 0, 0); +} + void WebViewImpl::removeAllUserContent() { PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); @@ -1799,7 +1917,7 @@ bool WebViewImpl::navigationPolicyFromMouseEvent(unsigned short button, bool alt, bool meta, WebNavigationPolicy* policy) { -#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) +#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) || OS(SOLARIS) const bool newTabModifier = (button == 1) || ctrl; #elif OS(DARWIN) const bool newTabModifier = (button == 1) || meta; @@ -1822,15 +1940,16 @@ bool WebViewImpl::navigationPolicyFromMouseEvent(unsigned short button, return true; } -void WebViewImpl::startDragging(const WebPoint& eventPos, - const WebDragData& dragData, - WebDragOperationsMask mask) +void WebViewImpl::startDragging(const WebDragData& dragData, + WebDragOperationsMask mask, + const WebImage& dragImage, + const WebPoint& dragImageOffset) { if (!m_client) return; ASSERT(!m_doingDragAndDrop); m_doingDragAndDrop = true; - m_client->startDragging(eventPos, dragData, mask); + m_client->startDragging(dragData, mask, dragImage, dragImageOffset); } void WebViewImpl::setCurrentHistoryItem(HistoryItem* item) @@ -1916,4 +2035,76 @@ bool WebViewImpl::tabsToLinks() const return m_tabsToLinks; } +#if USE(ACCELERATED_COMPOSITING) +void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer) +{ + setAcceleratedCompositing(layer ? true : false); + if (m_layerRenderer) + m_layerRenderer->setRootLayer(layer); +} + +void WebViewImpl::setAcceleratedCompositing(bool accelerated) +{ + if (m_isAcceleratedCompositing == accelerated) + return; + + if (accelerated) { + m_layerRenderer = LayerRendererChromium::create(); + if (m_layerRenderer) + m_isAcceleratedCompositing = true; + } else { + m_layerRenderer = 0; + m_isAcceleratedCompositing = false; + } +} + +void WebViewImpl::updateRootLayerContents(const WebRect& rect) +{ + if (!isAcceleratedCompositing()) + return; + + WebFrameImpl* webframe = mainFrameImpl(); + if (!webframe) + return; + FrameView* view = webframe->frameView(); + if (!view) + return; + + WebRect viewRect = view->frameRect(); + SkIRect scrollFrame; + scrollFrame.set(view->scrollX(), view->scrollY(), view->layoutWidth() + view->scrollX(), view->layoutHeight() + view->scrollY()); + m_layerRenderer->setScrollFrame(scrollFrame); + LayerChromium* rootLayer = m_layerRenderer->rootLayer(); + if (rootLayer) { + IntRect visibleRect = view->visibleContentRect(true); + + // Set the backing store size used by the root layer to be the size of the visible + // area. Note that the root layer bounds could be larger than the backing store size, + // but there's no reason to waste memory by allocating backing store larger than the + // visible portion. + rootLayer->setBackingStoreRect(IntSize(visibleRect.width(), visibleRect.height())); + GraphicsContext* rootLayerContext = rootLayer->graphicsContext(); + rootLayerContext->save(); + + webframe->paintWithContext(*(rootLayer->graphicsContext()), rect); + rootLayerContext->restore(); + } +} + +void WebViewImpl::setRootLayerNeedsDisplay() +{ + // FIXME: For now we're posting a repaint event for the entire page which is an overkill. + if (WebFrameImpl* webframe = mainFrameImpl()) { + if (FrameView* view = webframe->frameView()) { + IntRect visibleRect = view->visibleContentRect(true); + m_client->didInvalidateRect(visibleRect); + } + } + + if (m_layerRenderer) + m_layerRenderer->setNeedsDisplay(); +} + +#endif + } // namespace WebKit diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h index 286ac43..ba2dc25 100644 --- a/WebKit/chromium/src/WebViewImpl.h +++ b/WebKit/chromium/src/WebViewImpl.h @@ -43,7 +43,9 @@ #include "ContextMenuClientImpl.h" #include "DragClientImpl.h" #include "EditorClientImpl.h" +#include "GraphicsLayer.h" #include "InspectorClientImpl.h" +#include "LayerRendererChromium.h" #include "NotificationPresenterImpl.h" #include <wtf/OwnPtr.h> @@ -72,10 +74,12 @@ class SuggestionsPopupMenuClient; class WebAccessibilityObject; class WebDevToolsAgentPrivate; class WebFrameImpl; +class WebImage; class WebKeyboardEvent; class WebMouseEvent; class WebMouseWheelEvent; class WebSettingsImpl; +class WebTouchEvent; class WebViewImpl : public WebView, public RefCounted<WebViewImpl> { public: @@ -177,6 +181,7 @@ public: virtual void performCustomContextMenuAction(unsigned action); virtual void addUserScript(const WebString& sourceCode, bool runAtStart); + virtual void addUserStyleSheet(const WebString& sourceCode); virtual void removeAllUserContent(); // WebViewImpl @@ -201,7 +206,7 @@ public: return m_client; } - // Returns the page object associated with this view. This may be null when + // Returns the page object associated with this view. This may be null when // the page is shutting down, but will be valid at all other times. WebCore::Page* page() const { @@ -210,7 +215,7 @@ public: WebCore::RenderTheme* theme() const; - // Returns the main frame associated with this view. This may be null when + // Returns the main frame associated with this view. This may be null when // the page is shutting down, but will be valid at all other times. WebFrameImpl* mainFrameImpl(); @@ -229,16 +234,17 @@ public: void mouseWheel(const WebMouseWheelEvent&); bool keyEvent(const WebKeyboardEvent&); bool charEvent(const WebKeyboardEvent&); + bool touchEvent(const WebTouchEvent&); // Handles context menu events orignated via the the keyboard. These - // include the VK_APPS virtual key and the Shift+F10 combine. Code is + // include the VK_APPS virtual key and the Shift+F10 combine. Code is // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only // significant change in this function is the code to convert from a // Keyboard event to the Right Mouse button down event. bool sendContextMenuEvent(const WebKeyboardEvent&); - // Notifies the WebView that a load has been committed. isNewNavigation + // Notifies the WebView that a load has been committed. isNewNavigation // will be true if a new session history item should be created for that // load. void didCommitLoad(bool* isNewNavigation); @@ -270,9 +276,10 @@ public: // Start a system drag and drop operation. void startDragging( - const WebPoint& eventPos, const WebDragData& dragData, - WebDragOperationsMask dragSourceOperationMask); + WebDragOperationsMask mask, + const WebImage& dragImage, + const WebPoint& dragImageOffset); void suggestionsPopupDidHide() { @@ -288,6 +295,10 @@ public: // was scrolled. bool propagateScroll(WebCore::ScrollDirection, WebCore::ScrollGranularity); + // Notification that a popup was opened/closed. + void popupOpened(WebCore::PopupContainer* popupContainer); + void popupClosed(WebCore::PopupContainer* popupContainer); + // HACK: currentInputEvent() is for ChromeClientImpl::show(), until we can // fix WebKit to pass enough information up into ChromeClient::show() so we // can decide if the window.open event was caused by a middle-mouse click @@ -296,31 +307,62 @@ public: return m_currentInputEvent; } +#if USE(ACCELERATED_COMPOSITING) + void setRootLayerNeedsDisplay(); + void setRootGraphicsLayer(WebCore::PlatformLayer*); +#endif + + WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); } + private: friend class WebView; // So WebView::Create can call our constructor friend class WTF::RefCounted<WebViewImpl>; + enum DragAction { + DragEnter, + DragOver + }; + WebViewImpl(WebViewClient* client); ~WebViewImpl(); // Returns true if the event was actually processed. bool keyEventDefault(const WebKeyboardEvent&); + // Returns true if the select popup has consumed the event. + bool selectPopupHandleKeyEvent(const WebKeyboardEvent&); + // Returns true if the autocomple has consumed the event. bool autocompleteHandleKeyEvent(const WebKeyboardEvent&); - // Repaints the suggestions popup. Should be called when the suggestions - // have changed. Note that this should only be called when the suggestions + // Repaints the suggestions popup. Should be called when the suggestions + // have changed. Note that this should only be called when the suggestions // popup is showing. void refreshSuggestionsPopup(); // Returns true if the view was scrolled. bool scrollViewWithKeyboard(int keyCode, int modifiers); + // Hides the select popup if one is opened. + void hideSelectPopup(); + // Converts |pos| from window coordinates to contents coordinates and gets // the HitTestResult for it. WebCore::HitTestResult hitTestResultForWindowPos(const WebCore::IntPoint&); + // Consolidate some common code between starting a drag over a target and + // updating a drag over a target. If we're starting a drag, |isEntering| + // should be true. + WebDragOperation dragTargetDragEnterOrOver(const WebPoint& clientPoint, + const WebPoint& screenPoint, + DragAction); + +#if USE(ACCELERATED_COMPOSITING) + void setAcceleratedCompositing(bool); + bool isAcceleratedCompositing() const { return m_isAcceleratedCompositing; } + void updateRootLayerContents(const WebRect&); +#endif + WebViewClient* m_client; BackForwardListClientImpl m_backForwardListClientImpl; @@ -335,7 +377,7 @@ private: WebPoint m_lastMousePosition; OwnPtr<WebCore::Page> m_page; - // This flag is set when a new navigation is detected. It is used to satisfy + // This flag is set when a new navigation is detected. It is used to satisfy // the corresponding argument to WebFrameClient::didCommitProvisionalLoad. bool m_observedNewNavigation; #ifndef NDEBUG @@ -345,7 +387,7 @@ private: #endif // An object that can be used to manipulate m_page->settings() without linking - // against WebCore. This is lazily allocated the first time GetWebSettings() + // against WebCore. This is lazily allocated the first time GetWebSettings() // is called. OwnPtr<WebSettingsImpl> m_webSettings; @@ -361,7 +403,7 @@ private: // dragged by the time a drag is initiated. WebPoint m_lastMouseDownPoint; - // Keeps track of the current zoom level. 0 means no zoom, positive numbers + // Keeps track of the current zoom level. 0 means no zoom, positive numbers // mean zoom in, negative numbers mean zoom out. int m_zoomLevel; @@ -391,7 +433,7 @@ private: // copied from the WebDropData object sent from the browser process. int m_dragIdentity; - // Valid when m_dragTargetDispatch is true. Used to override the default + // Valid when m_dragTargetDispatch is true. Used to override the default // browser drop effect with the effects "none" or "copy". enum DragTargetDropEffect { DropEffectDefault = -1, @@ -410,8 +452,8 @@ private: // Whether a suggestions popup is currently showing. bool m_suggestionsPopupShowing; - // A pointer to the current suggestions popup menu client. This can be - // either an AutoFillPopupMenuClient or an AutocompletePopupMenuClient. We + // A pointer to the current suggestions popup menu client. This can be + // either an AutoFillPopupMenuClient or an AutocompletePopupMenuClient. We // do not own this pointer. SuggestionsPopupMenuClient* m_suggestionsPopupClient; @@ -421,9 +463,12 @@ private: // The Autocomplete popup client. OwnPtr<AutocompletePopupMenuClient> m_autocompletePopupClient; - // A pointer to the current suggestions popup. We do not own this pointer. + // A pointer to the current suggestions popup. We do not own this pointer. WebCore::PopupContainer* m_suggestionsPopup; + // The popup associated with a select element. + RefPtr<WebCore::PopupContainer> m_selectPopup; + // The AutoFill suggestions popup. RefPtr<WebCore::PopupContainer> m_autoFillPopup; @@ -446,6 +491,12 @@ private: NotificationPresenterImpl m_notificationPresenter; #endif + bool m_haveMouseCapture; + +#if USE(ACCELERATED_COMPOSITING) + OwnPtr<WebCore::LayerRendererChromium> m_layerRenderer; + bool m_isAcceleratedCompositing; +#endif static const WebInputEvent* m_currentInputEvent; }; diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp index 40019e8..da51414 100644 --- a/WebKit/chromium/src/WebWorkerBase.cpp +++ b/WebKit/chromium/src/WebWorkerBase.cpp @@ -199,8 +199,7 @@ void WebWorkerBase::postExceptionTask(ScriptExecutionContext* context, sourceURL); } -void WebWorkerBase::postConsoleMessageToWorkerObject(MessageDestination destination, - MessageSource source, +void WebWorkerBase::postConsoleMessageToWorkerObject(MessageSource source, MessageType type, MessageLevel level, const String& message, @@ -208,16 +207,13 @@ void WebWorkerBase::postConsoleMessageToWorkerObject(MessageDestination destinat const String& sourceURL) { dispatchTaskToMainThread(createCallbackTask(&postConsoleMessageTask, this, - static_cast<int>(destination), - static_cast<int>(source), - static_cast<int>(type), - static_cast<int>(level), + source, type, level, message, lineNumber, sourceURL)); } void WebWorkerBase::postConsoleMessageTask(ScriptExecutionContext* context, WebWorkerBase* thisPtr, - int destination, int source, + int source, int type, int level, const String& message, int lineNumber, @@ -225,7 +221,7 @@ void WebWorkerBase::postConsoleMessageTask(ScriptExecutionContext* context, { if (!thisPtr->commonClient()) return; - thisPtr->commonClient()->postConsoleMessageToWorkerObject(destination, source, + thisPtr->commonClient()->postConsoleMessageToWorkerObject(source, type, level, message, lineNumber, sourceURL); } diff --git a/WebKit/chromium/src/WebWorkerBase.h b/WebKit/chromium/src/WebWorkerBase.h index 0217401..1252770 100644 --- a/WebKit/chromium/src/WebWorkerBase.h +++ b/WebKit/chromium/src/WebWorkerBase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Google Inc. All rights reserved. + * 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 @@ -45,8 +45,11 @@ class WorkerThread; namespace WebKit { class WebCommonWorkerClient; +class WebSecurityOrigin; +class WebString; class WebURL; class WebView; +class WebWorker; class WebWorkerClient; // Base class for WebSharedWorkerImpl and WebWorkerImpl. It contains common @@ -65,7 +68,7 @@ public: virtual void postExceptionToWorkerObject( const WebCore::String&, int, const WebCore::String&); virtual void postConsoleMessageToWorkerObject( - WebCore::MessageDestination, WebCore::MessageSource, WebCore::MessageType, + WebCore::MessageSource, WebCore::MessageType, WebCore::MessageLevel, const WebCore::String&, int, const WebCore::String&); virtual void confirmMessageFromWorkerObject(bool); virtual void reportPendingActivity(bool); @@ -112,7 +115,6 @@ private: static void postConsoleMessageTask( WebCore::ScriptExecutionContext* context, WebWorkerBase* thisPtr, - int destination, int source, int type, int level, diff --git a/WebKit/chromium/src/WebWorkerClientImpl.cpp b/WebKit/chromium/src/WebWorkerClientImpl.cpp index 598a078..d0dda8e 100644 --- a/WebKit/chromium/src/WebWorkerClientImpl.cpp +++ b/WebKit/chromium/src/WebWorkerClientImpl.cpp @@ -45,6 +45,7 @@ #include "Worker.h" #include "WorkerContext.h" #include "WorkerContextExecutionProxy.h" +#include "WorkerScriptController.h" #include "WorkerMessagingProxy.h" #include <wtf/Threading.h> @@ -94,15 +95,13 @@ WorkerContextProxy* WebWorkerClientImpl::createWorkerContextProxy(Worker* worker WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); webWorker = webFrame->client()->createWorker(webFrame, proxy); } else { - WorkerContextExecutionProxy* currentContext = - WorkerContextExecutionProxy::retrieve(); - if (!currentContext) { + WorkerScriptController* controller = WorkerScriptController::controllerForContext(); + if (!controller) { ASSERT_NOT_REACHED(); return 0; } - DedicatedWorkerThread* thread = - static_cast<DedicatedWorkerThread*>(currentContext->workerContext()->thread()); + DedicatedWorkerThread* thread = static_cast<DedicatedWorkerThread*>(controller->workerContext()->thread()); WorkerObjectProxy* workerObjectProxy = &thread->workerObjectProxy(); WebWorkerImpl* impl = reinterpret_cast<WebWorkerImpl*>(workerObjectProxy); webWorker = impl->client()->createWorker(proxy); @@ -244,15 +243,14 @@ void WebWorkerClientImpl::postExceptionToWorkerObject(const WebString& errorMess return; } - bool handled = false; - handled = m_worker->dispatchEvent(ErrorEvent::create(errorMessage, - sourceURL, - lineNumber)); - if (!handled) + bool unhandled = m_worker->dispatchEvent(ErrorEvent::create(errorMessage, + sourceURL, + lineNumber)); + if (unhandled) m_scriptExecutionContext->reportException(errorMessage, lineNumber, sourceURL); } -void WebWorkerClientImpl::postConsoleMessageToWorkerObject(int destinationId, +void WebWorkerClientImpl::postConsoleMessageToWorkerObject(int destination, int sourceId, int messageType, int messageLevel, @@ -263,7 +261,6 @@ void WebWorkerClientImpl::postConsoleMessageToWorkerObject(int destinationId, if (currentThread() != m_workerThreadId) { m_scriptExecutionContext->postTask(createCallbackTask(&postConsoleMessageToWorkerObjectTask, this, - destinationId, sourceId, messageType, messageLevel, @@ -273,14 +270,23 @@ void WebWorkerClientImpl::postConsoleMessageToWorkerObject(int destinationId, return; } - m_scriptExecutionContext->addMessage(static_cast<MessageDestination>(destinationId), - static_cast<MessageSource>(sourceId), + m_scriptExecutionContext->addMessage(static_cast<MessageSource>(sourceId), static_cast<MessageType>(messageType), static_cast<MessageLevel>(messageLevel), String(message), lineNumber, String(sourceURL)); } +void WebWorkerClientImpl::postConsoleMessageToWorkerObject(int sourceId, + int messageType, + int messageLevel, + const WebString& message, + int lineNumber, + const WebString& sourceURL) +{ + postConsoleMessageToWorkerObject(0, sourceId, messageType, messageLevel, message, lineNumber, sourceURL); +} + void WebWorkerClientImpl::confirmMessageFromWorkerObject(bool hasPendingActivity) { // unconfirmed_message_count_ can only be updated on the thread where it's @@ -382,7 +388,6 @@ void WebWorkerClientImpl::postExceptionToWorkerObjectTask( void WebWorkerClientImpl::postConsoleMessageToWorkerObjectTask(ScriptExecutionContext* context, WebWorkerClientImpl* thisPtr, - int destinationId, int sourceId, int messageType, int messageLevel, @@ -390,8 +395,7 @@ void WebWorkerClientImpl::postConsoleMessageToWorkerObjectTask(ScriptExecutionCo int lineNumber, const String& sourceURL) { - thisPtr->m_scriptExecutionContext->addMessage(static_cast<MessageDestination>(destinationId), - static_cast<MessageSource>(sourceId), + thisPtr->m_scriptExecutionContext->addMessage(static_cast<MessageSource>(sourceId), static_cast<MessageType>(messageType), static_cast<MessageLevel>(messageLevel), message, lineNumber, diff --git a/WebKit/chromium/src/WebWorkerClientImpl.h b/WebKit/chromium/src/WebWorkerClientImpl.h index 63acebc..4bdc332 100644 --- a/WebKit/chromium/src/WebWorkerClientImpl.h +++ b/WebKit/chromium/src/WebWorkerClientImpl.h @@ -78,8 +78,12 @@ public: // These are called on the main WebKit thread. virtual void postMessageToWorkerObject(const WebString&, const WebMessagePortChannelArray&); virtual void postExceptionToWorkerObject(const WebString&, int, const WebString&); - virtual void postConsoleMessageToWorkerObject(int, int, int, int, const WebString&, - int, const WebString&); + + // FIXME: the below is for compatibility only and should be + // removed once Chromium is updated to remove message + // destination parameter <http://webkit.org/b/37155>. + virtual void postConsoleMessageToWorkerObject(int, int, int, int, const WebString&, int, const WebString&); + virtual void postConsoleMessageToWorkerObject(int, int, int, const WebString&, int, const WebString&); virtual void confirmMessageFromWorkerObject(bool); virtual void reportPendingActivity(bool); virtual void workerContextClosed(); @@ -125,7 +129,6 @@ private: const WebCore::String& sourceURL); static void postConsoleMessageToWorkerObjectTask(WebCore::ScriptExecutionContext* context, WebWorkerClientImpl* thisPtr, - int destinationId, int sourceId, int messageType, int messageLevel, diff --git a/WebKit/chromium/src/gtk/WebFontInfo.cpp b/WebKit/chromium/src/gtk/WebFontInfo.cpp index 76ed618..3ac0b00 100644 --- a/WebKit/chromium/src/gtk/WebFontInfo.cpp +++ b/WebKit/chromium/src/gtk/WebFontInfo.cpp @@ -30,6 +30,7 @@ #include "config.h" #include "WebFontInfo.h" +#include "WebFontRenderStyle.h" #include <fontconfig/fontconfig.h> #include <string.h> @@ -55,11 +56,11 @@ WebCString WebFontInfo::familyForChars(const WebUChar* characters, size_t numCha FcValue fcvalue; fcvalue.type = FcTypeCharSet; fcvalue.u.c = cset; - FcPatternAdd(pattern, FC_CHARSET, fcvalue, 0); + FcPatternAdd(pattern, FC_CHARSET, fcvalue, FcFalse); fcvalue.type = FcTypeBool; fcvalue.u.b = FcTrue; - FcPatternAdd(pattern, FC_SCALABLE, fcvalue, 0); + FcPatternAdd(pattern, FC_SCALABLE, fcvalue, FcFalse); FcConfigSubstitute(0, pattern, FcMatchPattern); FcDefaultSubstitute(pattern); @@ -104,4 +105,68 @@ WebCString WebFontInfo::familyForChars(const WebUChar* characters, size_t numCha return WebCString(); } +void WebFontInfo::renderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* out) +{ + bool isBold = sizeAndStyle & 1; + bool isItalic = sizeAndStyle & 2; + int pixelSize = sizeAndStyle >> 2; + + FcPattern* pattern = FcPatternCreate(); + FcValue fcvalue; + + fcvalue.type = FcTypeString; + fcvalue.u.s = reinterpret_cast<const FcChar8 *>(family); + FcPatternAdd(pattern, FC_FAMILY, fcvalue, FcFalse); + + fcvalue.type = FcTypeInteger; + fcvalue.u.i = isBold ? FC_WEIGHT_BOLD : FC_WEIGHT_NORMAL; + FcPatternAdd(pattern, FC_WEIGHT, fcvalue, FcFalse); + + fcvalue.type = FcTypeInteger; + fcvalue.u.i = isItalic ? FC_SLANT_ITALIC : FC_SLANT_ROMAN; + FcPatternAdd(pattern, FC_SLANT, fcvalue, FcFalse); + + fcvalue.type = FcTypeBool; + fcvalue.u.b = FcTrue; + FcPatternAdd(pattern, FC_SCALABLE, fcvalue, FcFalse); + + fcvalue.type = FcTypeDouble; + fcvalue.u.d = pixelSize; + FcPatternAdd(pattern, FC_SIZE, fcvalue, FcFalse); + + FcConfigSubstitute(0, pattern, FcMatchPattern); + FcDefaultSubstitute(pattern); + + FcResult result; + // Some versions of fontconfig don't actually write a value into result. + // However, it's not clear from the documentation if result should be a + // non-0 pointer: future versions might expect to be able to write to + // it. So we pass in a valid pointer and ignore it. + FcPattern* match = FcFontMatch(0, pattern, &result); + FcPatternDestroy(pattern); + + out->setDefaults(); + + if (!match) { + FcPatternDestroy(match); + return; + } + + FcBool b; + int i; + + if (FcPatternGetBool(match, FC_ANTIALIAS, 0, &b) == FcResultMatch) + out->useAntiAlias = b; + if (FcPatternGetBool(match, FC_EMBEDDED_BITMAP, 0, &b) == FcResultMatch) + out->useBitmaps = b; + if (FcPatternGetBool(match, FC_AUTOHINT, 0, &b) == FcResultMatch) + out->useAutoHint = b; + if (FcPatternGetBool(match, FC_HINTING, 0, &b) == FcResultMatch) + out->useHinting = b; + if (FcPatternGetInteger(match, FC_HINT_STYLE, 0, &i) == FcResultMatch) + out->hintStyle = i; + + FcPatternDestroy(match); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp index 7125a16..f4db5ee 100644 --- a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp +++ b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp @@ -49,7 +49,7 @@ gint getDoubleClickTime() { static GtkSettings* settings = gtk_settings_get_default(); gint doubleClickTime = 250; - g_object_get(G_OBJECT(settings), "gtk-double-click-time", &doubleClickTime, 0); + g_object_get(G_OBJECT(settings), "gtk-double-click-time", &doubleClickTime, NULL); return doubleClickTime; } diff --git a/WebKit/chromium/src/js/DebuggerAgent.js b/WebKit/chromium/src/js/DebuggerAgent.js index bb655c7..8230616 100644 --- a/WebKit/chromium/src/js/DebuggerAgent.js +++ b/WebKit/chromium/src/js/DebuggerAgent.js @@ -117,12 +117,17 @@ devtools.DebuggerAgent = function() */ this.urlToBreakpoints_ = {}; - /** * Exception message that is shown to user while on exception break. * @type {WebInspector.ConsoleMessage} */ this.currentExceptionMessage_ = null; + + /** + * Whether breakpoints should suspend execution. + * @type {boolean} + */ + this.breakpointsActivated_ = true; }; @@ -176,7 +181,7 @@ devtools.DebuggerAgent.prototype.initUI = function() // pending addition into the UI. for (var scriptId in this.parsedScripts_) { var script = this.parsedScripts_[scriptId]; - WebInspector.parsedScriptSource(scriptId, script.getUrl(), undefined /* script source */, script.getLineOffset()); + WebInspector.parsedScriptSource(scriptId, script.getUrl(), undefined /* script source */, script.getLineOffset() + 1); } return; } @@ -210,11 +215,14 @@ devtools.DebuggerAgent.prototype.resolveScriptSource = function(scriptId, callba // Force v8 execution so that it gets to processing the requested command. RemoteDebuggerAgent.processDebugCommands(); + var self = this; this.requestSeqToCallback_[cmd.getSequenceNumber()] = function(msg) { if (msg.isSuccess()) { var scriptJson = msg.getBody()[0]; - if (scriptJson) + if (scriptJson) { + script.source = scriptJson.source; callback(scriptJson.source); + } else callback(null); } else @@ -295,6 +303,36 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit /** + * Changes given line of the script. + */ +devtools.DebuggerAgent.prototype.editScriptLine = function(sourceId, line, newContent, callback) +{ + var script = this.parsedScripts_[sourceId]; + if (!script || !script.source) + return; + + var lines = script.source.split("\n"); + lines[line] = newContent; + + var commandArguments = { + "script_id": sourceId, + "new_source": lines.join("\n") + }; + + var cmd = new devtools.DebugCommand("changelive", commandArguments); + devtools.DebuggerAgent.sendCommand_(cmd); + this.requestSeqToCallback_[cmd.getSequenceNumber()] = function(msg) { + if (!msg.isSuccess()) + WebInspector.log("Unable to modify source code within given scope. Only function bodies are editable at the moment.", WebInspector.ConsoleMessage.MessageLevel.Warning); + this.resolveScriptSource(sourceId, callback); + if (WebInspector.panels.scripts.paused) + this.requestBacktrace_(); + }.bind(this); + RemoteDebuggerAgent.processDebugCommands(); +}; + + +/** * @param {number} sourceId Id of the script for the breakpoint. * @param {number} line Number of the line for the breakpoint. */ @@ -309,6 +347,8 @@ devtools.DebuggerAgent.prototype.removeBreakpoint = function(sourceId, line) var breakpointInfo; if (script.getUrl()) { var breakpoints = this.urlToBreakpoints_[script.getUrl()]; + if (!breakpoints) + return; breakpointInfo = breakpoints[line]; delete breakpoints[line]; } else { @@ -334,34 +374,11 @@ devtools.DebuggerAgent.prototype.removeBreakpoint = function(sourceId, line) /** - * @param {number} sourceId Id of the script for the breakpoint. - * @param {number} line Number of the line for the breakpoint. - * @param {?string} condition New breakpoint condition. + * @param {boolean} activated Whether breakpoints should be activated. */ -devtools.DebuggerAgent.prototype.updateBreakpoint = function(sourceId, line, condition) +devtools.DebuggerAgent.prototype.setBreakpointsActivated = function(activated) { - var script = this.parsedScripts_[sourceId]; - if (!script) - return; - - line = devtools.DebuggerAgent.webkitToV8LineNumber_(line); - - var breakpointInfo; - if (script.getUrl()) { - var breakpoints = this.urlToBreakpoints_[script.getUrl()]; - breakpointInfo = breakpoints[line]; - } else - breakpointInfo = script.getBreakpointInfo(line); - - var id = breakpointInfo.getV8Id(); - - // If we don't know id of this breakpoint in the v8 debugger we cannot send - // the "changebreakpoint" request. - if (id !== -1) { - // TODO(apavlov): make use of the real values for "enabled" and - // "ignoreCount" when appropriate. - this.requestChangeBreakpoint_(id, true, condition, null); - } + this.breakpointsActivated_ = activated; }; @@ -663,25 +680,6 @@ devtools.DebuggerAgent.prototype.requestClearBreakpoint_ = function(breakpointId /** - * Changes breakpoint parameters in the v8 debugger. - * @param {number} breakpointId Id of the breakpoint in the v8 debugger. - * @param {boolean} enabled Whether to enable the breakpoint. - * @param {?string} condition New breakpoint condition. - * @param {number} ignoreCount New ignore count for the breakpoint. - */ -devtools.DebuggerAgent.prototype.requestChangeBreakpoint_ = function(breakpointId, enabled, condition, ignoreCount) -{ - var cmd = new devtools.DebugCommand("changebreakpoint", { - "breakpoint": breakpointId, - "enabled": enabled, - "condition": condition, - "ignoreCount": ignoreCount - }); - devtools.DebuggerAgent.sendCommand_(cmd); -}; - - -/** * Sends "backtrace" request to v8. */ devtools.DebuggerAgent.prototype.requestBacktrace_ = function() @@ -800,6 +798,8 @@ devtools.DebuggerAgent.prototype.handleDebuggerOutput_ = function(output) this.invokeCallbackForResponse_(msg); else if (msg.getCommand() === "setbreakpoint") this.handleSetBreakpointResponse_(msg); + else if (msg.getCommand() === "changelive") + this.invokeCallbackForResponse_(msg); else if (msg.getCommand() === "clearbreakpoint") this.handleClearBreakpointResponse_(msg); else if (msg.getCommand() === "backtrace") @@ -819,7 +819,12 @@ devtools.DebuggerAgent.prototype.handleDebuggerOutput_ = function(output) */ devtools.DebuggerAgent.prototype.handleBreakEvent_ = function(msg) { - // Force scrips panel to be shown first. + if (!this.breakpointsActivated_) { + this.resumeExecution(); + return; + } + + // Force scripts panel to be shown first. WebInspector.currentPanel = WebInspector.panels.scripts; var body = msg.getBody(); @@ -834,9 +839,6 @@ devtools.DebuggerAgent.prototype.handleBreakEvent_ = function(msg) */ devtools.DebuggerAgent.prototype.handleExceptionEvent_ = function(msg) { - // Force scrips panel to be shown first. - WebInspector.currentPanel = WebInspector.panels.scripts; - var body = msg.getBody(); // No script field in the body means that v8 failed to parse the script. We // resume execution on parser errors automatically. @@ -844,6 +846,9 @@ devtools.DebuggerAgent.prototype.handleExceptionEvent_ = function(msg) var line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(body.sourceLine); this.createExceptionMessage_(body.script.name, line, body.exception.text); this.requestBacktrace_(); + + // Force scripts panel to be shown. + WebInspector.currentPanel = WebInspector.panels.scripts; } else this.resumeExecution(); }; @@ -956,7 +961,7 @@ devtools.DebuggerAgent.prototype.addScriptInfo_ = function(script, msg) this.parsedScripts_[script.id] = new devtools.ScriptInfo(script.id, script.name, script.lineOffset, contextType); if (this.scriptsPanelInitialized_) { // Only report script as parsed after scripts panel has been shown. - WebInspector.parsedScriptSource(script.id, script.name, script.source, script.lineOffset); + WebInspector.parsedScriptSource(script.id, script.name, script.source, script.lineOffset + 1); } }; @@ -994,7 +999,7 @@ devtools.DebuggerAgent.prototype.doHandleBacktraceResponse_ = function(msg) this.callFrames_.push(this.formatCallFrame_(frames[i])); WebInspector.pausedScript(this.callFrames_); this.showPendingExceptionMessage_(); - InspectorFrontendHost.activateWindow(); + InspectorFrontendHost.bringToFront(); }; diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js new file mode 100644 index 0000000..75c5467 --- /dev/null +++ b/WebKit/chromium/src/js/DebuggerScript.js @@ -0,0 +1,211 @@ +/* + * 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. + */ + +function debuggerScriptConstructor() { + +var DebuggerScript = {}; +DebuggerScript._breakpoints = {}; + + +DebuggerScript.getAfterCompileScript = function(execState, args) +{ + return DebuggerScript._formatScript(args.eventData.script_.script_); +} + +DebuggerScript.getScripts = function(execState, args) +{ + var scripts = Debug.scripts(); + var result = []; + for (var i = 0; i < scripts.length; ++i) { + result.push(DebuggerScript._formatScript(scripts[i])); + } + return result; +} + +DebuggerScript._formatScript = function(script) +{ + return { + id: script.id, + name: script.name, + source: script.source, + lineOffset: script.line_offset, + lineCount: script.lineCount(), + contextData: script.context_data + }; +} + +DebuggerScript.setBreakpoint = function(execState, args) +{ + args.lineNumber = DebuggerScript._webkitToV8LineNumber(args.lineNumber); + var key = args.scriptId + ":" + args.lineNumber; + var breakId = DebuggerScript._breakpoints[key]; + if (breakId) { + if (args.enabled) + Debug.enableScriptBreakPoint(breakId); + else + Debug.disableScriptBreakPoint(breakId); + Debug.changeScriptBreakPointCondition(breakId, args.condition); + return breakId; + } + + breakId = Debug.setScriptBreakPointById(args.scriptId, args.lineNumber, 0 /* column */, args.condition); + DebuggerScript._breakpoints[key] = breakId; + if (!args.enabled) + Debug.disableScriptBreakPoint(breakId); + return breakId; +} + +DebuggerScript.removeBreakpoint = function(execState, args) +{ + args.lineNumber = DebuggerScript._webkitToV8LineNumber(args.lineNumber); + var key = args.scriptId + ":" + args.lineNumber; + var breakId = DebuggerScript._breakpoints[key]; + if (breakId) + Debug.findBreakPoint(breakId, true); + delete DebuggerScript._breakpoints[key]; +} + +DebuggerScript.currentCallFrame = function(execState, args) +{ + var frameCount = execState.frameCount(); + if (frameCount === 0) + return undefined; + + var topFrame; + for (var i = frameCount - 1; i >= 0; i--) { + var frameMirror = execState.frame(i); + topFrame = DebuggerScript._frameMirrorToJSCallFrame(frameMirror, topFrame); + } + return topFrame; +} + +DebuggerScript.stepIntoStatement = function(execState, args) +{ + execState.prepareStep(Debug.StepAction.StepIn, 1); +} + +DebuggerScript.stepOverStatement = function(execState, args) +{ + execState.prepareStep(Debug.StepAction.StepNext, 1); +} + +DebuggerScript.stepOutOfFunction = function(execState, args) +{ + execState.prepareStep(Debug.StepAction.StepOut, 1); +} + +DebuggerScript.clearBreakpoints = function(execState, args) +{ + for (var key in DebuggerScript._breakpoints) { + var breakId = DebuggerScript._breakpoints[key]; + Debug.findBreakPoint(breakId, true); + } + DebuggerScript._breakpoints = {}; +} + +DebuggerScript.setBreakpointsActivated = function(execState, args) +{ + for (var key in DebuggerScript._breakpoints) { + var breakId = DebuggerScript._breakpoints[key]; + if (args.enabled) + Debug.enableScriptBreakPoint(breakId); + else + Debug.disableScriptBreakPoint(breakId); + } +} + +DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame) +{ + // Get function name. + var func; + try { + func = frameMirror.func(); + } catch(e) { + } + var functionName; + if (func) + functionName = func.name() || func.inferredName(); + if (!functionName) + functionName = "[anonymous]"; + + // Get script ID. + var script = func.script(); + var sourceID = script && script.id(); + + // Get line number. + var line = DebuggerScript._v8ToWwebkitLineNumber(frameMirror.sourceLine()); + + // Get this object. + var thisObject = frameMirror.details_.receiver(); + + // Get scope chain array in format: [<scope type>, <scope object>, <scope type>, <scope object>,...] + var scopeChain = []; + var scopeType = []; + for (var i = 0; i < frameMirror.scopeCount(); i++) { + var scopeMirror = frameMirror.scope(i); + var scopeObjectMirror = scopeMirror.scopeObject(); + var properties = scopeObjectMirror.properties(); + var scopeObject = {}; + for (var j = 0; j < properties.length; j++) + scopeObject[properties[j].name()] = properties[j].value_; + scopeType.push(scopeMirror.scopeType()); + scopeChain.push(scopeObject); + } + + function evaluate(expression) { + return frameMirror.evaluate(expression, false).value(); + } + + return { + "sourceID": sourceID, + "line": line, + "functionName": functionName, + "type": "function", + "thisObject": thisObject, + "scopeChain": scopeChain, + "scopeType": scopeType, + "evaluate": evaluate, + "caller": callerFrame + }; +} + +DebuggerScript._webkitToV8LineNumber = function(line) +{ + return line - 1; +}; + +DebuggerScript._v8ToWwebkitLineNumber = function(line) +{ + return line + 1; +}; + +return DebuggerScript; + +} diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js index dcb181b..a530fe5 100644 --- a/WebKit/chromium/src/js/DevTools.js +++ b/WebKit/chromium/src/js/DevTools.js @@ -151,31 +151,12 @@ devtools.ToolsAgent.prototype.evaluate = function(expr) /** - * Enables / disables resources panel in the ui. - * @param {boolean} enabled New panel status. - */ -WebInspector.setResourcesPanelEnabled = function(enabled) -{ - InspectorBackend._resourceTrackingEnabled = enabled; - WebInspector.panels.resources.reset(); -}; - - -/** * Prints string to the inspector console or shows alert if the console doesn't * exist. * @param {string} text */ function debugPrint(text) { - var console = WebInspector.console; - if (console) { - console.addMessage(new WebInspector.ConsoleMessage( - WebInspector.ConsoleMessage.MessageSource.JS, - WebInspector.ConsoleMessage.MessageType.Log, - WebInspector.ConsoleMessage.MessageLevel.Log, - 1, "chrome://devtools/<internal>", undefined, -1, text)); - } else - alert(text); + WebInspector.log(text); } @@ -200,54 +181,17 @@ WebInspector.loaded = function() Preferences.ignoreWhitespace = false; Preferences.samplingCPUProfiler = true; Preferences.heapProfilerPresent = true; + Preferences.debuggerAlwaysEnabled = true; + Preferences.profilerAlwaysEnabled = true; + RemoteDebuggerAgent.setDebuggerScriptSource("(" + debuggerScriptConstructor + ")();"); + oldLoaded.call(this); InspectorFrontendHost.loaded(); }; -(function() -{ - - /** - * Handles an F3 keydown event to focus the Inspector search box. - * @param {KeyboardEvent} event Event to optionally handle - * @return {boolean} whether the event has been handled - */ - function handleF3Keydown(event) { - if (event.keyIdentifier === "F3" && !event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) { - var searchField = document.getElementById("search"); - searchField.focus(); - searchField.select(); - event.preventDefault(); - return true; - } - return false; - } - - - var oldKeyDown = WebInspector.documentKeyDown; - /** - * This override allows to intercept keydown events we want to handle in a - * custom way. Some nested documents (iframes) delegate keydown handling to - * WebInspector.documentKeyDown (e.g. SourceFrame). - * @param {KeyboardEvent} event - * @override - */ - WebInspector.documentKeyDown = function(event) { - var isHandled = handleF3Keydown(event); - if (!isHandled) { - // Mute refresh action. - if (event.keyIdentifier === "F5") - event.preventDefault(); - else if (event.keyIdentifier === "U+0052" /* "R" */ && (event.ctrlKey || event.metaKey)) - event.preventDefault(); - else - oldKeyDown.call(this, event); - } - }; -})(); - +if (!window.v8ScriptDebugServerEnabled) { /** * This override is necessary for adding script source asynchronously. @@ -279,24 +223,12 @@ WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded = function() */ WebInspector.ScriptView.prototype.didResolveScriptSource_ = function() { - this.sourceFrame.setContent("text/javascript", this.script.source); + this.sourceFrame.setContent("text/javascript", this._prependWhitespace(this.script.source)); this._sourceFrameSetup = true; delete this._frameNeedsSetup; }; -/** - * @param {string} type Type of the the property value("object" or "function"). - * @param {string} className Class name of the property value. - * @constructor - */ -WebInspector.UnresolvedPropertyValue = function(type, className) -{ - this.type = type; - this.className = className; -}; - - (function() { var oldShow = WebInspector.ScriptsPanel.prototype.show; @@ -309,6 +241,47 @@ WebInspector.UnresolvedPropertyValue = function(type, className) })(); +(function () { +var orig = InjectedScriptAccess.prototype.getProperties; +InjectedScriptAccess.prototype.getProperties = function(objectProxy, ignoreHasOwnProperty, abbreviate, callback) +{ + if (objectProxy.isScope) + devtools.tools.getDebuggerAgent().resolveScope(objectProxy.objectId, callback); + else if (objectProxy.isV8Ref) + devtools.tools.getDebuggerAgent().resolveChildren(objectProxy.objectId, callback, false); + else + orig.apply(this, arguments); +}; +})(); + + +(function() +{ +InjectedScriptAccess.prototype.evaluateInCallFrame = function(callFrameId, code, objectGroup, callback) +{ + //TODO(pfeldman): remove once 49084 is rolled. + if (!callback) + callback = objectGroup; + devtools.tools.getDebuggerAgent().evaluateInCallFrame(callFrameId, code, callback); +}; +})(); + + +(function() +{ +var orig = InjectedScriptAccess.prototype.getCompletions; +InjectedScriptAccess.prototype.getCompletions = function(expressionString, includeInspectorCommandLineAPI, callFrameId, reportCompletions) +{ + if (typeof callFrameId === "number") + devtools.tools.getDebuggerAgent().resolveCompletionsOnFrame(expressionString, callFrameId, reportCompletions); + else + return orig.apply(this, arguments); +}; +})(); + +} + + (function InterceptProfilesPanelEvents() { var oldShow = WebInspector.ProfilesPanel.prototype.show; @@ -333,6 +306,17 @@ WebInspector.UIString = function(string) return String.vsprintf(string, Array.prototype.slice.call(arguments, 1)); }; +// Activate window upon node search complete. This will go away once InspectorFrontendClient is landed. +(function() { + var original = WebInspector.searchingForNodeWasDisabled; + WebInspector.searchingForNodeWasDisabled = function() + { + if (this.panels.elements._nodeSearchButton.toggled) + InspectorFrontendHost.bringToFront(); + original.apply(this, arguments); + } +})(); + // There is no clear way of setting frame title yet. So sniffing main resource // load. @@ -392,81 +376,6 @@ WebInspector.UIString = function(string) })(); -(function () { -var orig = InjectedScriptAccess.prototype.getProperties; -InjectedScriptAccess.prototype.getProperties = function(objectProxy, ignoreHasOwnProperty, abbreviate, callback) -{ - if (objectProxy.isScope) - devtools.tools.getDebuggerAgent().resolveScope(objectProxy.objectId, callback); - else if (objectProxy.isV8Ref) - devtools.tools.getDebuggerAgent().resolveChildren(objectProxy.objectId, callback, false); - else - orig.apply(this, arguments); -}; -})(); - - -(function() -{ -InjectedScriptAccess.prototype.evaluateInCallFrame = function(callFrameId, code, objectGroup, callback) -{ - //TODO(pfeldman): remove once 49084 is rolled. - if (!callback) - callback = objectGroup; - devtools.tools.getDebuggerAgent().evaluateInCallFrame(callFrameId, code, callback); -}; -})(); - - -WebInspector.resourceTrackingWasEnabled = function() -{ - InspectorBackend._resourceTrackingEnabled = true; - this.panels.resources.resourceTrackingWasEnabled(); -}; - -WebInspector.resourceTrackingWasDisabled = function() -{ - InspectorBackend._resourceTrackingEnabled = false; - this.panels.resources.resourceTrackingWasDisabled(); -}; - -(function() -{ -var orig = WebInspector.ConsoleMessage.prototype.setMessageBody; -WebInspector.ConsoleMessage.prototype.setMessageBody = function(args) -{ - for (var i = 0; i < args.length; ++i) { - if (typeof args[i] === "string") - args[i] = WebInspector.ObjectProxy.wrapPrimitiveValue(args[i]); - } - orig.call(this, args); -}; -})(); - - -(function() -{ -var orig = InjectedScriptAccess.prototype.getCompletions; -InjectedScriptAccess.prototype.getCompletions = function(expressionString, includeInspectorCommandLineAPI, callFrameId, reportCompletions) -{ - if (typeof callFrameId === "number") - devtools.tools.getDebuggerAgent().resolveCompletionsOnFrame(expressionString, callFrameId, reportCompletions); - else - return orig.apply(this, arguments); -}; -})(); - - -(function() -{ -WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked = function( event) -{ - InspectorBackend.toggleNodeSearch(); - this.nodeSearchButton.toggled = !this.nodeSearchButton.toggled; -}; -})(); - - // We need to have a place for postponed tasks // which should be executed when all the messages between agent and frontend // are processed. @@ -498,7 +407,92 @@ InspectorFrontendHost.addResourceSourceToFrame = function(identifier, element) }; })(); -WebInspector.pausedScript = function(callFrames) +// Chromium theme support. +WebInspector.setToolbarColors = function(backgroundColor, color) { - this.panels.scripts.debuggerPaused(callFrames); -}; + if (!WebInspector._themeStyleElement) { + WebInspector._themeStyleElement = document.createElement("style"); + document.head.appendChild(WebInspector._themeStyleElement); + } + WebInspector._themeStyleElement.textContent = + "body #toolbar, body.inactive #toolbar {\ + background-image: none !important;\ + background-color: " + backgroundColor + " !important;\ + }\ + \ + body .status-bar {\ + background-image: url(Images/statusbarBackgroundChromium2.png) !important;\ + background-color: " + backgroundColor + " !important;\ + }\ + \ + body button.status-bar-item {\ + background-image: none !important;\ + }\ + \ + button.status-bar-item {\ + background-image: none;\ + border-right: 1px solid " + backgroundColor + ";\ + }\ + \ + .status-bar {\ + background-image: none;\ + color: " + color + ";\ + }\ + \ + body #drawer {\ + background-image: none !important;\ + }\ + \ + #drawer-status-bar {\ + background-image: url(Images/statusbarBackgroundChromium2.png);\ + background-color: " + backgroundColor + ";\ + }\ + \ + \ + body.drawer-visible #main-status-bar {\ + background-image: url(Images/statusbarBackgroundChromium2.png) !important;\ + }\ + \ + body .crumbs .crumb, body .crumbs .crumb.end {\ + -webkit-border-image: url(Images/segmentChromium2.png) 0 12 0 2 !important;\ + background-color: " + backgroundColor + " !important;\ + }\ + \ + body .crumbs .crumb:hover, body .crumbs .crumb.dimmed:hover {\ + -webkit-border-image: url(Images/segmentHoverChromium2.png) 0 12 0 2 !important;\ + }\ + \ + body .crumbs .crumb.end {\ + -webkit-border-image: url(Images/segmentChromium2.png) 0 12 0 2 !important;\ + }\ + \ + body .crumbs .crumb.selected:hover, body .crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover {\ + -webkit-border-image: url(Images/segmentSelectedChromium2.png) 0 12 0 2 !important;\ + }\ + \ + body select.status-bar-item {\ + -webkit-border-image: url(Images/statusbarMenuButtonChromium2.png) 0 17 0 2 !important;\ + background-color: " + backgroundColor + " !important;\ + text-shadow: none !important;\ + }\ + \ + .glyph {\ + background-color: " + color + ";\ + }\ + \ + button.status-bar-item .glyph.shadow {\ + display: none;\ + }\ + \ + .crumbs, .crumbs .crumb:hover, #drawer .scope-bar:not(.console-filter-top) li, .toolbar-label, select.status-bar-item {\ + text-shadow: none;\ + color: " + color + ";\ + }"; +} + +WebInspector.resetToolbarColors = function() +{ + if (WebInspector._themeStyleElement) + WebInspector._themeStyleElement.textContent = ""; + +} diff --git a/WebKit/chromium/src/js/DevToolsHostStub.js b/WebKit/chromium/src/js/DevToolsHostStub.js index 8b2f46b..cae4a1e 100644 --- a/WebKit/chromium/src/js/DevToolsHostStub.js +++ b/WebKit/chromium/src/js/DevToolsHostStub.js @@ -55,6 +55,11 @@ RemoteDebuggerAgentStub.prototype.processDebugCommands = function() }; +RemoteDebuggerAgentStub.prototype.setDebuggerScriptSource = function(source) +{ +}; + + /** * @constructor */ diff --git a/WebKit/chromium/src/js/HeapProfilerPanel.js b/WebKit/chromium/src/js/HeapProfilerPanel.js index abbf580..0fc4418 100644 --- a/WebKit/chromium/src/js/HeapProfilerPanel.js +++ b/WebKit/chromium/src/js/HeapProfilerPanel.js @@ -205,7 +205,7 @@ WebInspector.HeapSnapshotView.prototype = { // Call searchCanceled since it will reset everything we need before doing a new search. this.searchCanceled(); - query = query.trimWhitespace(); + query = query.trim(); if (!query.length) return; @@ -937,7 +937,7 @@ WebInspector.HeapSnapshotProfileType.prototype = { get welcomeMessage() { - return WebInspector.UIString("Get a heap snapshot by pressing<br>the %s button on the status bar."); + return WebInspector.UIString("Get a heap snapshot by pressing the %s button on the status bar."); }, createSidebarTreeElementForProfile: function(profile) diff --git a/WebKit/chromium/src/js/Images/segmentChromium2.png b/WebKit/chromium/src/js/Images/segmentChromium2.png Binary files differnew file mode 100755 index 0000000..e94f570 --- /dev/null +++ b/WebKit/chromium/src/js/Images/segmentChromium2.png diff --git a/WebKit/chromium/src/js/Images/segmentHoverChromium2.png b/WebKit/chromium/src/js/Images/segmentHoverChromium2.png Binary files differnew file mode 100755 index 0000000..4d4a211 --- /dev/null +++ b/WebKit/chromium/src/js/Images/segmentHoverChromium2.png diff --git a/WebKit/chromium/src/js/Images/segmentSelectedChromium2.png b/WebKit/chromium/src/js/Images/segmentSelectedChromium2.png Binary files differnew file mode 100755 index 0000000..f2b695b --- /dev/null +++ b/WebKit/chromium/src/js/Images/segmentSelectedChromium2.png diff --git a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium2.png b/WebKit/chromium/src/js/Images/statusbarBackgroundChromium2.png Binary files differnew file mode 100755 index 0000000..12d62b1 --- /dev/null +++ b/WebKit/chromium/src/js/Images/statusbarBackgroundChromium2.png diff --git a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.png b/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.png Binary files differnew file mode 100755 index 0000000..9527ac8 --- /dev/null +++ b/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.png diff --git a/WebKit/chromium/src/js/InjectDispatch.js b/WebKit/chromium/src/js/InjectDispatch.js index e070c42..30caaf2 100644 --- a/WebKit/chromium/src/js/InjectDispatch.js +++ b/WebKit/chromium/src/js/InjectDispatch.js @@ -104,3 +104,10 @@ function dispatch(method, var_args) { var call = JSON.stringify(args); DevToolsAgentHost.dispatch(call); }; + +function close() { + // This method is called when InspectorFrontend closes in layout tests. +} + +function inspectedPageDestroyed() { +} diff --git a/WebKit/chromium/src/js/InspectorControllerImpl.js b/WebKit/chromium/src/js/InspectorControllerImpl.js index c92a94c..becc076 100644 --- a/WebKit/chromium/src/js/InspectorControllerImpl.js +++ b/WebKit/chromium/src/js/InspectorControllerImpl.js @@ -38,23 +38,30 @@ if (!this.devtools) devtools.InspectorBackendImpl = function() { WebInspector.InspectorBackendStub.call(this); + this.installInspectorControllerDelegate_("addScriptToEvaluateOnLoad"); this.installInspectorControllerDelegate_("clearMessages"); this.installInspectorControllerDelegate_("copyNode"); this.installInspectorControllerDelegate_("deleteCookie"); this.installInspectorControllerDelegate_("didEvaluateForTestInFrontend"); this.installInspectorControllerDelegate_("disableResourceTracking"); + this.installInspectorControllerDelegate_("disableSearchingForNode"); this.installInspectorControllerDelegate_("disableTimeline"); this.installInspectorControllerDelegate_("enableResourceTracking"); + this.installInspectorControllerDelegate_("enableSearchingForNode"); this.installInspectorControllerDelegate_("enableTimeline"); this.installInspectorControllerDelegate_("getChildNodes"); this.installInspectorControllerDelegate_("getCookies"); this.installInspectorControllerDelegate_("getDatabaseTableNames"); this.installInspectorControllerDelegate_("getDOMStorageEntries"); this.installInspectorControllerDelegate_("getEventListenersForNode"); + this.installInspectorControllerDelegate_("getProfile"); + this.installInspectorControllerDelegate_("getProfileHeaders"); this.installInspectorControllerDelegate_("getResourceContent"); this.installInspectorControllerDelegate_("highlightDOMNode"); this.installInspectorControllerDelegate_("hideDOMNodeHighlight"); this.installInspectorControllerDelegate_("releaseWrapperObjectGroup"); + this.installInspectorControllerDelegate_("removeAllScriptsToEvaluateOnLoad"); + this.installInspectorControllerDelegate_("reloadPage"); this.installInspectorControllerDelegate_("removeAttribute"); this.installInspectorControllerDelegate_("removeDOMStorageItem"); this.installInspectorControllerDelegate_("removeNode"); @@ -63,25 +70,39 @@ devtools.InspectorBackendImpl = function() this.installInspectorControllerDelegate_("setDOMStorageItem"); this.installInspectorControllerDelegate_("setInjectedScriptSource"); this.installInspectorControllerDelegate_("setTextNodeValue"); + this.installInspectorControllerDelegate_("startProfiling"); this.installInspectorControllerDelegate_("startTimelineProfiler"); + this.installInspectorControllerDelegate_("stopProfiling"); this.installInspectorControllerDelegate_("stopTimelineProfiler"); this.installInspectorControllerDelegate_("storeLastActivePanel"); -}; -devtools.InspectorBackendImpl.prototype.__proto__ = WebInspector.InspectorBackendStub.prototype; - -/** - * {@inheritDoc}. - */ -devtools.InspectorBackendImpl.prototype.toggleNodeSearch = function() -{ - WebInspector.InspectorBackendStub.prototype.toggleNodeSearch.call(this); - this.callInspectorController_.call(this, "toggleNodeSearch"); - if (!this.searchingForNode()) { - // This is called from ElementsPanel treeOutline's focusNodeChanged(). - DevToolsHost.activateWindow(); + this.installInspectorControllerDelegate_("getAllStyles"); + this.installInspectorControllerDelegate_("getStyles"); + this.installInspectorControllerDelegate_("getComputedStyle"); + this.installInspectorControllerDelegate_("getInlineStyle"); + this.installInspectorControllerDelegate_("applyStyleText"); + this.installInspectorControllerDelegate_("setStyleText"); + this.installInspectorControllerDelegate_("setStyleProperty"); + this.installInspectorControllerDelegate_("toggleStyleEnabled"); + this.installInspectorControllerDelegate_("setRuleSelector"); + this.installInspectorControllerDelegate_("addRule"); + + if (window.v8ScriptDebugServerEnabled) { + this.installInspectorControllerDelegate_("disableDebugger"); + this.installInspectorControllerDelegate_("enableDebugger"); + this.installInspectorControllerDelegate_("setBreakpoint"); + this.installInspectorControllerDelegate_("removeBreakpoint"); + this.installInspectorControllerDelegate_("activateBreakpoints"); + this.installInspectorControllerDelegate_("deactivateBreakpoints"); + this.installInspectorControllerDelegate_("pauseInDebugger"); + this.installInspectorControllerDelegate_("resumeDebugger"); + this.installInspectorControllerDelegate_("stepIntoStatementInDebugger"); + this.installInspectorControllerDelegate_("stepOutOfFunctionInDebugger"); + this.installInspectorControllerDelegate_("stepOverStatementInDebugger"); + this.installInspectorControllerDelegate_("setPauseOnExceptionsState"); } }; +devtools.InspectorBackendImpl.prototype.__proto__ = WebInspector.InspectorBackendStub.prototype; /** @@ -102,9 +123,13 @@ devtools.InspectorBackendImpl.prototype.profilerEnabled = function() }; -devtools.InspectorBackendImpl.prototype.addBreakpoint = function(sourceID, line, condition) +if (!window.v8ScriptDebugServerEnabled) { + +devtools.InspectorBackendImpl.prototype.setBreakpoint = function(sourceID, line, enabled, condition) { - devtools.tools.getDebuggerAgent().addBreakpoint(sourceID, line, condition); + this.removeBreakpoint(sourceID, line); + if (enabled) + devtools.tools.getDebuggerAgent().addBreakpoint(sourceID, line, condition); }; @@ -113,11 +138,27 @@ devtools.InspectorBackendImpl.prototype.removeBreakpoint = function(sourceID, li devtools.tools.getDebuggerAgent().removeBreakpoint(sourceID, line); }; -devtools.InspectorBackendImpl.prototype.updateBreakpoint = function(sourceID, line, condition) + +devtools.InspectorBackendImpl.prototype.editScriptLine = function(callID, sourceID, line, newContent) +{ + devtools.tools.getDebuggerAgent().editScriptLine(sourceID, line, newContent, function(newFullBody) { + WebInspector.didEditScriptLine(callID, newFullBody); + }); +}; + + +devtools.InspectorBackendImpl.prototype.activateBreakpoints = function() +{ + devtools.tools.getDebuggerAgent().setBreakpointsActivated(true); +}; + + +devtools.InspectorBackendImpl.prototype.deactivateBreakpoints = function() { - devtools.tools.getDebuggerAgent().updateBreakpoint(sourceID, line, condition); + devtools.tools.getDebuggerAgent().setBreakpointsActivated(false); }; + devtools.InspectorBackendImpl.prototype.pauseInDebugger = function() { devtools.tools.getDebuggerAgent().pauseExecution(); @@ -155,16 +196,10 @@ devtools.InspectorBackendImpl.prototype.setPauseOnExceptionsState = function(sta this._setPauseOnExceptionsState = state; // TODO(yurys): support all three states. See http://crbug.com/32877 var enabled = (state !== WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions); - return devtools.tools.getDebuggerAgent().setPauseOnExceptions(enabled); + WebInspector.updatePauseOnExceptionsState(enabled ? WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions : WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions); + devtools.tools.getDebuggerAgent().setPauseOnExceptions(enabled); }; -/** - * @override - */ -devtools.InspectorBackendImpl.prototype.pauseOnExceptionsState = function() -{ - return (this._setPauseOnExceptionsState || WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions); -}; /** * @override @@ -183,53 +218,7 @@ devtools.InspectorBackendImpl.prototype.setPauseOnExceptions = function(value) return devtools.tools.getDebuggerAgent().setPauseOnExceptions(value); }; - -/** - * @override - */ -devtools.InspectorBackendImpl.prototype.startProfiling = function() -{ - devtools.tools.getProfilerAgent().startProfiling(devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_CPU); -}; - - -/** - * @override - */ -devtools.InspectorBackendImpl.prototype.stopProfiling = function() -{ - devtools.tools.getProfilerAgent().stopProfiling( devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_CPU); -}; - - -/** - * @override - */ -devtools.InspectorBackendImpl.prototype.getProfileHeaders = function(callId) -{ - WebInspector.didGetProfileHeaders(callId, []); -}; - - -/** - * Emulate WebKit InspectorController behavior. It stores profiles on renderer side, - * and is able to retrieve them by uid using "getProfile". - */ -devtools.InspectorBackendImpl.prototype.addFullProfile = function(profile) -{ - WebInspector.__fullProfiles = WebInspector.__fullProfiles || {}; - WebInspector.__fullProfiles[profile.uid] = profile; -}; - - -/** - * @override - */ -devtools.InspectorBackendImpl.prototype.getProfile = function(callId, uid) -{ - if (WebInspector.__fullProfiles && (uid in WebInspector.__fullProfiles)) - WebInspector.didGetProfile(callId, WebInspector.__fullProfiles[uid]); -}; +} /** diff --git a/WebKit/chromium/src/js/ProfilerAgent.js b/WebKit/chromium/src/js/ProfilerAgent.js index e08c5d2..29de4a3 100644 --- a/WebKit/chromium/src/js/ProfilerAgent.js +++ b/WebKit/chromium/src/js/ProfilerAgent.js @@ -41,18 +41,6 @@ devtools.ProfilerAgent = function() RemoteProfilerAgent.didGetLogLines = this._didGetLogLines.bind(this); /** - * Active profiler modules flags. - * @type {number} - */ - this._activeProfilerModules = devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_NONE; - - /** - * Interval for polling profiler state. - * @type {number} - */ - this._getActiveProfilerModulesInterval = null; - - /** * Profiler log position. * @type {number} */ @@ -65,12 +53,6 @@ devtools.ProfilerAgent = function() this._lastRequestedLogPosition = -1; /** - * Whether log contents retrieval must be forced next time. - * @type {boolean} - */ - this._forceGetLogLines = false; - - /** * Profiler processor instance. * @type {devtools.profiler.Processor} */ @@ -92,50 +74,11 @@ devtools.ProfilerAgent.ProfilerModules = { /** - * Sets up callbacks that deal with profiles processing. - */ -devtools.ProfilerAgent.prototype.setupProfilerProcessorCallbacks = function() -{ - // A temporary icon indicating that the profile is being processed. - var processingIcon = new WebInspector.SidebarTreeElement( - "profile-sidebar-tree-item", - WebInspector.UIString("Processing..."), - '', null, false); - var profilesSidebar = WebInspector.panels.profiles.getProfileType(WebInspector.CPUProfileType.TypeId).treeElement; - - this._profilerProcessor.setCallbacks( - function onProfileProcessingStarted() { - // Set visually empty string. Subtitle hiding is done via styles - // manipulation which doesn't play well with dynamic append / removal. - processingIcon.subtitle = " "; - profilesSidebar.appendChild(processingIcon); - }, - function onProfileProcessingStatus(ticksCount) { - processingIcon.subtitle = WebInspector.UIString("%d ticks processed", ticksCount); - }, - function onProfileProcessingFinished(profile) { - profilesSidebar.removeChild(processingIcon); - profile.typeId = WebInspector.CPUProfileType.TypeId; - InspectorBackend.addFullProfile(profile); - WebInspector.addProfileHeader(profile); - // If no profile is currently shown, show the new one. - var profilesPanel = WebInspector.panels.profiles; - if (!profilesPanel.visibleView) { - profilesPanel.showProfile(profile); - } - } - ); -}; - - -/** * Initializes profiling state. */ devtools.ProfilerAgent.prototype.initializeProfiling = function() { - this.setupProfilerProcessorCallbacks(); - this._forceGetLogLines = true; - this._getActiveProfilerModulesInterval = setInterval(function() { RemoteProfilerAgent.getActiveProfilerModules(); }, 1000); + this._getNextLogLines(false); }; @@ -193,16 +136,6 @@ devtools.ProfilerAgent.prototype.stopProfiling = function(modules) */ devtools.ProfilerAgent.prototype._didGetActiveProfilerModules = function(modules) { - var profModules = devtools.ProfilerAgent.ProfilerModules; - var profModuleNone = profModules.PROFILER_MODULE_NONE; - if (this._forceGetLogLines || (modules !== profModuleNone && this._activeProfilerModules === profModuleNone)) { - this._forceGetLogLines = false; - // Start to query log data. - this._getNextLogLines(true); - } - this._activeProfilerModules = modules; - // Update buttons. - WebInspector.setRecordingProfile(modules & profModules.PROFILER_MODULE_CPU); }; @@ -214,14 +147,11 @@ devtools.ProfilerAgent.prototype._didGetActiveProfilerModules = function(modules devtools.ProfilerAgent.prototype._didGetLogLines = function(pos, log) { this._logPosition = pos; - if (log.length > 0) + if (log.length > 0) { this._profilerProcessor.processLogChunk(log); - else { + this._getNextLogLines(); + } else { // Allow re-reading from the last position. this._lastRequestedLogPosition = this._logPosition - 1; - if (this._activeProfilerModules === devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_NONE) - // No new data and profiling is stopped---suspend log reading. - return; } - this._getNextLogLines(); }; diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js index fa0c99f..758b8c0 100644 --- a/WebKit/chromium/src/js/Tests.js +++ b/WebKit/chromium/src/js/Tests.js @@ -295,19 +295,19 @@ TestSuite.prototype.testResourceContentLength = function() var resource = WebInspector.resources[identifier]; if (!resource || !resource.url) return; - if (resource.url.search("image.html$") !== -1) { + if (resource.url.search("image.html") !== -1) { var expectedLength = 87; test.assertTrue( - resource.contentLength <= expectedLength, + resource.resourceSize <= expectedLength, "image.html content length is greater thatn expected."); - if (expectedLength === resource.contentLength) + if (expectedLength === resource.resourceSize) html = true; } else if (resource.url.search("image.png") !== -1) { var expectedLength = 257796; test.assertTrue( - resource.contentLength <= expectedLength, + resource.resourceSize <= expectedLength, "image.png content length is greater than expected."); - if (expectedLength === resource.contentLength) + if (expectedLength === resource.resourceSize) png = true; } if (html && png) { @@ -425,39 +425,38 @@ TestSuite.prototype.testProfilerTab = function() { this.showPanel("profiles"); + var panel = WebInspector.panels.profiles; var test = this; - this.addSniffer(WebInspector.panels.profiles, "addProfileHeader", - function(typeOrProfile, profile) { - if (!profile) - profile = typeOrProfile; - var panel = WebInspector.panels.profiles; - panel.showProfile(profile); - var node = panel.visibleView.profileDataGridTree.children[0]; - // Iterate over displayed functions and search for a function - // that is called "fib" or "eternal_fib". If found, it will mean - // that we actually have profiled page's code. - while (node) { - if (node.functionName.indexOf("fib") !== -1) - test.releaseControl(); - node = node.traverseNextNode(true, null, true); - } - test.fail(); - }); - var ticksCount = 0; - var tickRecord = "\nt,"; - this.addSniffer(RemoteProfilerAgent, "didGetLogLines", - function(posIgnored, log) { - var pos = 0; - while ((pos = log.indexOf(tickRecord, pos)) !== -1) { - pos += tickRecord.length; - ticksCount++; - } - if (ticksCount > 100) - InspectorBackend.stopProfiling(); - }, true); + function findDisplayedNode() { + var node = panel.visibleView.profileDataGridTree.children[0]; + if (!node) { + // Profile hadn't been queried yet, re-schedule. + window.setTimeout(findDisplayedNode, 100); + return; + } - InspectorBackend.startProfiling(); + // Iterate over displayed functions and search for a function + // that is called "fib" or "eternal_fib". If found, this will mean + // that we actually have profiled page's code. + while (node) { + if (node.functionName.indexOf("fib") !== -1) + test.releaseControl(); + node = node.traverseNextNode(true, null, true); + } + + test.fail(); + } + + function findVisibleView() { + if (!panel.visibleView) { + setTimeout(findVisibleView, 0); + return; + } + setTimeout(findDisplayedNode, 0); + } + + findVisibleView(); this.takeControl(); }; @@ -470,7 +469,7 @@ TestSuite.prototype.testShowScriptsTab = function() this.showPanel("scripts"); var test = this; // There should be at least main page script. - this._waitUntilScriptsAreParsed(["debugger_test_page.html$"], + this._waitUntilScriptsAreParsed(["debugger_test_page.html"], function() { test.releaseControl(); }); @@ -502,7 +501,7 @@ TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function() var parsed = devtools.tools.getDebuggerAgent().parsedScripts_; for (var id in parsed) { var url = parsed[id].getUrl(); - if (url && url.search("debugger_test_page.html$") !== -1) { + if (url && url.search("debugger_test_page.html") !== -1) { checkScriptsPanel(); return; } @@ -512,7 +511,7 @@ TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function() function checkScriptsPanel() { test.showPanel("scripts"); - test.assertTrue(test._scriptsAreParsed(["debugger_test_page.html$"]), "Inspected script not found in the scripts list"); + test.assertTrue(test._scriptsAreParsed(["debugger_test_page.html"]), "Inspected script not found in the scripts list"); test.releaseControl(); } @@ -530,7 +529,7 @@ TestSuite.prototype.testContentScriptIsPresent = function() var test = this; test._waitUntilScriptsAreParsed( - ["page_with_content_script.html$", "simple_content_script.js$"], + ["page_with_content_script.html", "simple_content_script.js"], function() { test.releaseControl(); }); @@ -568,7 +567,7 @@ TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function() function checkScriptsPanel() { test.assertTrue(!!WebInspector.panels.scripts.visibleView, "No visible script view."); - test.assertTrue(test._scriptsAreParsed(["debugger_test_page.html$"]), "Some scripts are missing."); + test.assertTrue(test._scriptsAreParsed(["debugger_test_page.html"]), "Some scripts are missing."); checkNoDuplicates(); test.releaseControl(); } @@ -584,7 +583,7 @@ TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function() } test._waitUntilScriptsAreParsed( - ["debugger_test_page.html$"], + ["debugger_test_page.html"], function() { checkNoDuplicates(); setTimeout(switchToElementsTab, 0); @@ -635,15 +634,15 @@ TestSuite.prototype.testPauseOnException = function() // TODO(yurys): remove else branch once the states are supported. if (WebInspector.ScriptsPanel.PauseOnExceptionsState) { - while (WebInspector.currentPanel.pauseOnExceptionButton.state !== WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions) - WebInspector.currentPanel.pauseOnExceptionButton.element.click(); + while (WebInspector.currentPanel._pauseOnExceptionButton.state !== WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions) + WebInspector.currentPanel._pauseOnExceptionButton.element.click(); } else { // Make sure pause on exceptions is on. - if (!WebInspector.currentPanel.pauseOnExceptionButton.toggled) - WebInspector.currentPanel.pauseOnExceptionButton.element.click(); + if (!WebInspector.currentPanel._pauseOnExceptionButton.toggled) + WebInspector.currentPanel._pauseOnExceptionButton.element.click(); } - this._executeCodeWhenScriptsAreParsed("handleClick()", ["pause_on_exception.html$"]); + this._executeCodeWhenScriptsAreParsed("handleClick()", ["pause_on_exception.html"]); this._waitForScriptPause( { @@ -913,7 +912,7 @@ TestSuite.prototype.testCompletionOnPause = function() { this.showPanel("scripts"); var test = this; - this._executeCodeWhenScriptsAreParsed("handleClick()", ["completion_on_pause.html$"]); + this._executeCodeWhenScriptsAreParsed("handleClick()", ["completion_on_pause.html"]); this._waitForScriptPause( { @@ -974,7 +973,7 @@ TestSuite.prototype.testAutoContinueOnSyntaxError = function() // InjectedScript._ensureCommandLineAPIInstalled) since the page script // contains a syntax error. for (var i = 0 ; i < options.length; i++) { - if (options[i].text.search("script_syntax_error.html$") !== -1) + if (options[i].text.search("script_syntax_error.html") !== -1) test.fail("Script with syntax error should not be in the list of parsed scripts."); } } @@ -1173,7 +1172,7 @@ TestSuite.prototype._waitUntilScriptsAreParsed = function(expectedScripts, callb */ TestSuite.prototype._executeFunctionForStepTest = function() { - this._executeCodeWhenScriptsAreParsed("a()", ["debugger_step.html$", "debugger_step.js$"]); + this._executeCodeWhenScriptsAreParsed("a()", ["debugger_step.html", "debugger_step.js"]); }; @@ -1437,7 +1436,7 @@ TestSuite.prototype.testExpandScope = function() this.showPanel("scripts"); var test = this; - this._executeCodeWhenScriptsAreParsed("handleClick()", ["debugger_closure.html$"]); + this._executeCodeWhenScriptsAreParsed("handleClick()", ["debugger_closure.html"]); this._waitForScriptPause( { @@ -1551,7 +1550,7 @@ TestSuite.prototype.testDebugIntrinsicProperties = function() this.showPanel("scripts"); var test = this; - this._executeCodeWhenScriptsAreParsed("handleClick()", ["debugger_intrinsic_properties.html$"]); + this._executeCodeWhenScriptsAreParsed("handleClick()", ["debugger_intrinsic_properties.html"]); this._waitForScriptPause( { diff --git a/WebKit/chromium/src/linux/WebFontRenderStyle.cpp b/WebKit/chromium/src/linux/WebFontRenderStyle.cpp new file mode 100644 index 0000000..0b864d1 --- /dev/null +++ b/WebKit/chromium/src/linux/WebFontRenderStyle.cpp @@ -0,0 +1,60 @@ +/* + * 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 "WebFontRenderStyle.h" + +#include "FontRenderStyle.h" + +using WebCore::FontRenderStyle; + +namespace WebKit { + +void WebFontRenderStyle::toFontRenderStyle(FontRenderStyle* out) +{ + out->useBitmaps = useBitmaps; + out->useAutoHint = useAutoHint; + out->useHinting = useHinting; + out->hintStyle = hintStyle; + out->useAntiAlias = useAntiAlias; + out->useSubpixel = useSubpixel; +} + +void WebFontRenderStyle::setDefaults() +{ + useBitmaps = 2; + useAutoHint = 2; + useHinting = 2; + hintStyle = 0; + useAntiAlias = 2; + useSubpixel = 2; +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/mac/WebInputEventFactory.mm b/WebKit/chromium/src/mac/WebInputEventFactory.mm index 46b0afe..694155f 100644 --- a/WebKit/chromium/src/mac/WebInputEventFactory.mm +++ b/WebKit/chromium/src/mac/WebInputEventFactory.mm @@ -861,6 +861,29 @@ static inline int modifiersFromEvent(NSEvent* event) { return modifiers; } +static inline void setWebEventLocationFromEventInView(WebMouseEvent* result, + NSEvent* event, + NSView* view) { + NSPoint windowLocal = [event locationInWindow]; + + NSPoint screenLocal = [[view window] convertBaseToScreen:windowLocal]; + result->globalX = screenLocal.x; + // Flip y. + NSScreen* primaryScreen = ([[NSScreen screens] count] > 0) ? + [[NSScreen screens] objectAtIndex:0] : nil; + if (primaryScreen) + result->globalY = [primaryScreen frame].size.height - screenLocal.y; + else + result->globalY = screenLocal.y; + + NSPoint contentLocal = [view convertPoint:windowLocal fromView:nil]; + result->x = contentLocal.x; + result->y = [view frame].size.height - contentLocal.y; // Flip y. + + result->windowX = result->x; + result->windowY = result->y; +} + WebKeyboardEvent WebInputEventFactory::keyboardEvent(NSEvent* event) { WebKeyboardEvent result; @@ -1021,16 +1044,7 @@ WebMouseEvent WebInputEventFactory::mouseEvent(NSEvent* event, NSView* view) ASSERT_NOT_REACHED(); } - NSPoint location = [NSEvent mouseLocation]; // global coordinates - result.globalX = location.x; - result.globalY = [[[view window] screen] frame].size.height - location.y; - - NSPoint windowLocal = [event locationInWindow]; - location = [view convertPoint:windowLocal fromView:nil]; - result.y = [view frame].size.height - location.y; // flip y - result.x = location.x; - result.windowX = result.x; - result.windowY = result.y; + setWebEventLocationFromEventInView(&result, event, view); result.modifiers = modifiersFromEvent(event); @@ -1050,16 +1064,7 @@ WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(NSEvent* event, NSView* result.modifiers = modifiersFromEvent(event); - // Set coordinates by translating event coordinates from screen to client. - NSPoint location = [NSEvent mouseLocation]; // global coordinates - result.globalX = location.x; - result.globalY = location.y; - NSPoint windowLocal = [event locationInWindow]; - location = [view convertPoint:windowLocal fromView:nil]; - result.x = location.x; - result.y = [view frame].size.height - location.y; // flip y - result.windowX = result.x; - result.windowY = result.y; + setWebEventLocationFromEventInView(&result, event, view); // Of Mice and Men // --------------- diff --git a/WebKit/chromium/tests/DragImageTest.cpp b/WebKit/chromium/tests/DragImageTest.cpp new file mode 100644 index 0000000..6c9718e --- /dev/null +++ b/WebKit/chromium/tests/DragImageTest.cpp @@ -0,0 +1,136 @@ +/* + * 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 <gtest/gtest.h> + +#include "DragImage.h" +#include "Image.h" +#include "NativeImageSkia.h" + +using namespace WebCore; + +namespace { + +class TestImage : public Image { +public: + + explicit TestImage(const IntSize& size) + : Image(0) + , m_size(size) + { + m_nativeImage = new NativeImageSkia(); + m_nativeImage->setConfig(SkBitmap::kARGB_8888_Config, + size.width(), size.height(), 0); + m_nativeImage->allocPixels(); + } + + virtual ~TestImage() + { + delete m_nativeImage; + } + + virtual IntSize size() const + { + return m_size; + } + + virtual NativeImagePtr nativeImageForCurrentFrame() + { + if (m_size.isZero()) + return 0; + + return m_nativeImage; + } + + // Stub implementations of pure virtual Image functions. + virtual void destroyDecodedData(bool) + { + } + + virtual unsigned int decodedSize() const + { + return 0u; + } + + virtual void draw(WebCore::GraphicsContext*, const WebCore::FloatRect&, + const WebCore::FloatRect&, WebCore::ColorSpace, + WebCore::CompositeOperator) + { + } + +private: + + IntSize m_size; + + NativeImagePtr m_nativeImage; +}; + +TEST(DragImageTest, NullHandling) +{ + EXPECT_FALSE(createDragImageFromImage(0)); + + deleteDragImage(0); + EXPECT_TRUE(dragImageSize(0).isZero()); + EXPECT_FALSE(scaleDragImage(0, FloatSize(0.5, 0.5))); + EXPECT_FALSE(dissolveDragImageToFraction(0, 0.5)); + EXPECT_FALSE(createDragImageFromImage(0)); + EXPECT_FALSE(createDragImageIconForCachedImage(0)); +} + +TEST(DragImageTest, NonNullHandling) +{ + TestImage testImage(IntSize(2, 2)); + DragImageRef dragImage = createDragImageFromImage(&testImage); + ASSERT_TRUE(dragImage); + + dragImage = scaleDragImage(dragImage, FloatSize(0.5, 0.5)); + ASSERT_TRUE(dragImage); + IntSize size = dragImageSize(dragImage); + EXPECT_EQ(1, size.width()); + EXPECT_EQ(1, size.height()); + + // This is not implemented, so we don't do any output validation. + dragImage = dissolveDragImageToFraction(dragImage, 0.5); + ASSERT_TRUE(dragImage); + + deleteDragImage(dragImage); +} + +TEST(DragImageTest, CreateDragImageReturningNull) +{ + // Tests that the DrageImage implementation doesn't choke on null values + // of nativeImageForCurrentFrame(). + TestImage testImage((IntSize())); + EXPECT_FALSE(createDragImageFromImage(&testImage)); +} + +} // anonymous namespace diff --git a/WebKit/chromium/tests/KURLTest.cpp b/WebKit/chromium/tests/KURLTest.cpp index b316683..6be4966 100644 --- a/WebKit/chromium/tests/KURLTest.cpp +++ b/WebKit/chromium/tests/KURLTest.cpp @@ -381,10 +381,11 @@ TEST(KURLTest, ReplaceInvalid) EXPECT_FALSE(kurl.isEmpty()); EXPECT_STREQ("http://www.google.com:8000/favicon.ico", kurl.string().utf8().data()); - // Now let's test that giving an invalid replacement still fails. + // Now let's test that giving an invalid replacement fails. Invalid + // protocols fail without modifying the URL, which should remain valid. #if USE(GOOGLEURL) - kurl.setProtocol("f/sj#@"); - EXPECT_FALSE(kurl.isValid()); + EXPECT_FALSE(kurl.setProtocol("f/sj#@")); + EXPECT_TRUE(kurl.isValid()); #endif } diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp new file mode 100644 index 0000000..c98ea74 --- /dev/null +++ b/WebKit/chromium/tests/PopupMenuTest.cpp @@ -0,0 +1,362 @@ +/* + * 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 <gtest/gtest.h> + +#include "Color.h" +#include "KeyboardCodes.h" +#include "PopupMenu.h" +#include "PopupMenuClient.h" +#include "PopupMenuChromium.h" +#include "WebFrameClient.h" +#include "WebFrameImpl.h" +#include "WebInputEvent.h" +#include "WebPopupMenuImpl.h" +#include "WebScreenInfo.h" +#include "WebViewClient.h" +#include "WebViewImpl.h" + +using namespace WebCore; +using namespace WebKit; + +namespace { + +class TestPopupMenuClient : public PopupMenuClient { +public: + // Item at index 0 is selected by default. + TestPopupMenuClient() : m_selectIndex(0) { } + virtual ~TestPopupMenuClient() {} + virtual void valueChanged(unsigned listIndex, bool fireEvents = true) + { + m_selectIndex = listIndex; + } + + virtual String itemText(unsigned listIndex) const + { + String str("Item "); + str.append(String::number(listIndex)); + return str; + } + virtual String itemToolTip(unsigned listIndex) const { return itemText(listIndex); } + virtual String itemAccessibilityText(unsigned listIndex) const { return itemText(listIndex); } + virtual bool itemIsEnabled(unsigned listIndex) const { return true; } + virtual PopupMenuStyle itemStyle(unsigned listIndex) const + { + Font font(FontPlatformData(12.0, false, false), false); + return PopupMenuStyle(Color::black, Color::white, font, true, Length(), TextDirection()); + } + virtual PopupMenuStyle menuStyle() const { return itemStyle(0); } + virtual int clientInsetLeft() const { return 0; } + virtual int clientInsetRight() const { return 0; } + virtual int clientPaddingLeft() const { return 0; } + virtual int clientPaddingRight() const { return 0; } + virtual int listSize() const { return 10; } + virtual int selectedIndex() const { return m_selectIndex; } + virtual void popupDidHide() { } + virtual bool itemIsSeparator(unsigned listIndex) const { return false; } + virtual bool itemIsLabel(unsigned listIndex) const { return false; } + virtual bool itemIsSelected(unsigned listIndex) const { return listIndex == m_selectIndex; } + virtual bool shouldPopOver() const { return false; } + virtual bool valueShouldChangeOnHotTrack() const { return false; } + virtual void setTextFromItem(unsigned listIndex) { } + + virtual FontSelector* fontSelector() const { return 0; } + virtual HostWindow* hostWindow() const { return 0; } + + virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize) { return 0; } + +private: + unsigned m_selectIndex; +}; + +class TestWebWidgetClient : public WebWidgetClient { +public: + ~TestWebWidgetClient() { } +}; + +class TestWebPopupMenuImpl : public WebPopupMenuImpl { +public: + TestWebPopupMenuImpl(WebWidgetClient* client) : WebPopupMenuImpl(client) { } + ~TestWebPopupMenuImpl() { } +}; + +class TestWebWidget : public WebWidget { +public: + virtual ~TestWebWidget() { } + virtual void close() { } + virtual WebSize size() { return WebSize(100, 100); } + virtual void resize(const WebSize&) { } + virtual void layout() { } + virtual void paint(WebCanvas*, const WebRect&) { } + virtual bool handleInputEvent(const WebInputEvent&) { return true; } + virtual void mouseCaptureLost() { } + virtual void setFocus(bool) { } + virtual bool handleCompositionEvent(WebCompositionCommand command, + int cursorPosition, + int targetStart, + int targetEnd, + const WebString& text) { return true; } + virtual bool queryCompositionStatus(bool* enabled, WebRect* caretBounds) { return true; } + virtual void setTextDirection(WebTextDirection) { } +}; + +class TestWebViewClient : public WebViewClient { +public: + TestWebViewClient() : m_webPopupMenu(&m_webWidgetClient) { } + ~TestWebViewClient() { } + + virtual WebWidget* createPopupMenu(WebPopupType) { return &m_webPopupMenu; } + + // 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). + virtual WebScreenInfo screenInfo() + { + WebScreenInfo screenInfo; + screenInfo.availableRect.height = 2000; + screenInfo.availableRect.width = 2000; + return screenInfo; + } + +private: + TestWebWidgetClient m_webWidgetClient; + TestWebPopupMenuImpl m_webPopupMenu; +}; + +class TestWebFrameClient : public WebFrameClient { +public: + ~TestWebFrameClient() { } +}; + +class SelectPopupMenuTest : public testing::Test { +public: + SelectPopupMenuTest() + { + } + +protected: + virtual void SetUp() + { + m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webviewClient)); + m_webView->initializeMainFrame(&m_webFrameClient); + m_popupMenu = PopupMenu::create(&m_popupMenuClient); + } + + virtual void TearDown() + { + m_popupMenu = 0; + m_webView->close(); + } + + // Returns true if there currently is a select popup in the WebView. + bool popupOpen() const { return m_webView->selectPopup(); } + + int selectedIndex() const { return m_popupMenuClient.selectedIndex(); } + + void showPopup() + { + m_popupMenu->show(IntRect(0, 0, 100, 100), + static_cast<WebFrameImpl*>(m_webView->mainFrame())->frameView(), 0); + ASSERT_TRUE(popupOpen()); + EXPECT_TRUE(m_webView->selectPopup()->popupType() == PopupContainer::Select); + } + + void hidePopup() + { + m_popupMenu->hide(); + EXPECT_FALSE(popupOpen()); + } + + void simulateKeyDownEvent(int keyCode) + { + simulateKeyEvent(WebInputEvent::RawKeyDown, keyCode); + } + + void simulateKeyUpEvent(int keyCode) + { + simulateKeyEvent(WebInputEvent::KeyUp, keyCode); + } + + // Simulates a key event on the WebView. + // The WebView forwards the event to the select popup if one is open. + void simulateKeyEvent(WebInputEvent::Type eventType, int keyCode) + { + WebKeyboardEvent keyEvent; + keyEvent.windowsKeyCode = keyCode; + keyEvent.type = eventType; + m_webView->handleInputEvent(keyEvent); + } + + // Simulates a mouse event on the select popup. + void simulateLeftMouseDownEvent(const IntPoint& point) + { + PlatformMouseEvent mouseEvent(point, point, LeftButton, MouseEventPressed, + 1, false, false, false, false, 0); + m_webView->selectPopup()->handleMouseDownEvent(mouseEvent); + } + void simulateLeftMouseUpEvent(const IntPoint& point) + { + PlatformMouseEvent mouseEvent(point, point, LeftButton, MouseEventReleased, + 1, false, false, false, false, 0); + m_webView->selectPopup()->handleMouseReleaseEvent(mouseEvent); + } + +protected: + TestWebViewClient m_webviewClient; + WebViewImpl* m_webView; + TestWebFrameClient m_webFrameClient; + TestPopupMenuClient m_popupMenuClient; + RefPtr<PopupMenu> m_popupMenu; +}; + +// Tests that show/hide and repeats. Select popups are reused in web pages when +// they are reopened, that what this is testing. +TEST_F(SelectPopupMenuTest, ShowThenHide) +{ + for (int i = 0; i < 3; i++) { + showPopup(); + hidePopup(); + } +} + +// Tests that showing a select popup and deleting it does not cause problem. +// This happens in real-life if a page navigates while a select popup is showing. +TEST_F(SelectPopupMenuTest, ShowThenDelete) +{ + showPopup(); + // Nothing else to do, TearDown() deletes the popup. +} + +// Tests that losing focus closes the select popup. +TEST_F(SelectPopupMenuTest, ShowThenLoseFocus) +{ + showPopup(); + // Simulate losing focus. + m_webView->setFocus(false); + + // Popup should have closed. + EXPECT_FALSE(popupOpen()); +} + +// Tests that pressing ESC closes the popup. +TEST_F(SelectPopupMenuTest, ShowThenPressESC) +{ + showPopup(); + simulateKeyDownEvent(VKEY_ESCAPE); + // Popup should have closed. + EXPECT_FALSE(popupOpen()); +} + +// Tests selecting an item with the arrows and enter/esc/tab. +TEST_F(SelectPopupMenuTest, SelectWithKeys) +{ + showPopup(); + // Simulate selecting the 2nd item by pressing Down, Down, enter. + simulateKeyDownEvent(VKEY_DOWN); + simulateKeyDownEvent(VKEY_DOWN); + simulateKeyDownEvent(VKEY_RETURN); + + // Popup should have closed. + EXPECT_TRUE(!popupOpen()); + EXPECT_EQ(2, selectedIndex()); + + // It should work as well with ESC. + showPopup(); + simulateKeyDownEvent(VKEY_DOWN); + simulateKeyDownEvent(VKEY_ESCAPE); + EXPECT_FALSE(popupOpen()); + EXPECT_EQ(3, selectedIndex()); + + // It should work as well with TAB. + showPopup(); + simulateKeyDownEvent(VKEY_DOWN); + simulateKeyDownEvent(VKEY_TAB); + EXPECT_FALSE(popupOpen()); + EXPECT_EQ(4, selectedIndex()); +} + +// Tests that selecting an item with the mouse does select the item and close +// the popup. +TEST_F(SelectPopupMenuTest, ClickItem) +{ + showPopup(); + + // Y of 18 to be on the item at index 1 (12 font plus border and more to be safe). + IntPoint row1Point(2, 18); + // Simulate a click down/up on the first item. + simulateLeftMouseDownEvent(row1Point); + simulateLeftMouseUpEvent(row1Point); + + // Popup should have closed and the item at index 1 selected. + EXPECT_FALSE(popupOpen()); + EXPECT_EQ(1, selectedIndex()); +} + +// Tests that moving the mouse over an item and then clicking outside the select popup +// leaves the seleted item unchanged. +TEST_F(SelectPopupMenuTest, MouseOverItemClickOutside) +{ + showPopup(); + + // Y of 18 to be on the item at index 1 (12 font plus border and more to be safe). + IntPoint row1Point(2, 18); + // Simulate the mouse moving over the first item. + PlatformMouseEvent mouseEvent(row1Point, row1Point, NoButton, MouseEventMoved, + 1, false, false, false, false, 0); + m_webView->selectPopup()->handleMouseMoveEvent(mouseEvent); + + // Click outside the popup. + simulateLeftMouseDownEvent(IntPoint(1000, 1000)); + + // Popup should have closed and item 0 should still be selected. + EXPECT_FALSE(popupOpen()); + EXPECT_EQ(0, selectedIndex()); +} + +// Tests that selecting an item with the keyboard and then clicking outside the select +// popup does select that item. +TEST_F(SelectPopupMenuTest, SelectItemWithKeyboardItemClickOutside) +{ + showPopup(); + + // Simulate selecting the 2nd item by pressing Down, Down. + simulateKeyDownEvent(VKEY_DOWN); + simulateKeyDownEvent(VKEY_DOWN); + + // Click outside the popup. + simulateLeftMouseDownEvent(IntPoint(1000, 1000)); + + // Popup should have closed and the item should have been selected. + EXPECT_FALSE(popupOpen()); + EXPECT_EQ(2, selectedIndex()); +} + +} // namespace diff --git a/WebKit/efl/DefaultTheme/widget/button/img_button_focus.png b/WebKit/efl/DefaultTheme/widget/button/img_button_focus.png Binary files differnew file mode 100644 index 0000000..b9395d3 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/button/img_button_focus.png diff --git a/WebKit/efl/DefaultTheme/widget/button/img_button_hover.png b/WebKit/efl/DefaultTheme/widget/button/img_button_hover.png Binary files differnew file mode 100644 index 0000000..224f966 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/button/img_button_hover.png diff --git a/WebKit/efl/DefaultTheme/widget/button/img_button_normal.png b/WebKit/efl/DefaultTheme/widget/button/img_button_normal.png Binary files differnew file mode 100644 index 0000000..b546075 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/button/img_button_normal.png diff --git a/WebKit/efl/DefaultTheme/widget/button/img_button_press.png b/WebKit/efl/DefaultTheme/widget/button/img_button_press.png Binary files differnew file mode 100644 index 0000000..7434179 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/button/img_button_press.png diff --git a/WebKit/efl/DefaultTheme/widget/check/img_check_off.png b/WebKit/efl/DefaultTheme/widget/check/img_check_off.png Binary files differnew file mode 100644 index 0000000..4353276 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/check/img_check_off.png diff --git a/WebKit/efl/DefaultTheme/widget/check/img_check_off_focus.png b/WebKit/efl/DefaultTheme/widget/check/img_check_off_focus.png Binary files differnew file mode 100644 index 0000000..3d30818 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/check/img_check_off_focus.png diff --git a/WebKit/efl/DefaultTheme/widget/check/img_check_off_hover.png b/WebKit/efl/DefaultTheme/widget/check/img_check_off_hover.png Binary files differnew file mode 100644 index 0000000..6f397db --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/check/img_check_off_hover.png diff --git a/WebKit/efl/DefaultTheme/widget/check/img_check_on.png b/WebKit/efl/DefaultTheme/widget/check/img_check_on.png Binary files differnew file mode 100644 index 0000000..65750a7 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/check/img_check_on.png diff --git a/WebKit/efl/DefaultTheme/widget/check/img_check_on_focus.png b/WebKit/efl/DefaultTheme/widget/check/img_check_on_focus.png Binary files differnew file mode 100644 index 0000000..0abf6ee --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/check/img_check_on_focus.png diff --git a/WebKit/efl/DefaultTheme/widget/check/img_check_on_hover.png b/WebKit/efl/DefaultTheme/widget/check/img_check_on_hover.png Binary files differnew file mode 100644 index 0000000..522c238 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/check/img_check_on_hover.png diff --git a/WebKit/efl/DefaultTheme/widget/combo/combo_focus.png b/WebKit/efl/DefaultTheme/widget/combo/combo_focus.png Binary files differnew file mode 100644 index 0000000..cfdc309 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/combo/combo_focus.png diff --git a/WebKit/efl/DefaultTheme/widget/combo/combo_focus_button.png b/WebKit/efl/DefaultTheme/widget/combo/combo_focus_button.png Binary files differnew file mode 100644 index 0000000..9fc2d10 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/combo/combo_focus_button.png diff --git a/WebKit/efl/DefaultTheme/widget/combo/combo_hover.png b/WebKit/efl/DefaultTheme/widget/combo/combo_hover.png Binary files differnew file mode 100644 index 0000000..9aaa4ee --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/combo/combo_hover.png diff --git a/WebKit/efl/DefaultTheme/widget/combo/combo_hover_button.png b/WebKit/efl/DefaultTheme/widget/combo/combo_hover_button.png Binary files differnew file mode 100644 index 0000000..1f5c6b8 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/combo/combo_hover_button.png diff --git a/WebKit/efl/DefaultTheme/widget/combo/combo_normal.png b/WebKit/efl/DefaultTheme/widget/combo/combo_normal.png Binary files differnew file mode 100644 index 0000000..9afe713 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/combo/combo_normal.png diff --git a/WebKit/efl/DefaultTheme/widget/combo/combo_normal_button.png b/WebKit/efl/DefaultTheme/widget/combo/combo_normal_button.png Binary files differnew file mode 100644 index 0000000..d920d90 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/combo/combo_normal_button.png diff --git a/WebKit/efl/DefaultTheme/widget/combo/combo_press.png b/WebKit/efl/DefaultTheme/widget/combo/combo_press.png Binary files differnew file mode 100644 index 0000000..4b39c70 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/combo/combo_press.png diff --git a/WebKit/efl/DefaultTheme/widget/combo/combo_press_button.png b/WebKit/efl/DefaultTheme/widget/combo/combo_press_button.png Binary files differnew file mode 100644 index 0000000..da54328 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/combo/combo_press_button.png diff --git a/WebKit/efl/DefaultTheme/widget/combo/icon.png b/WebKit/efl/DefaultTheme/widget/combo/icon.png Binary files differnew file mode 100644 index 0000000..5d9fb96 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/combo/icon.png diff --git a/WebKit/efl/DefaultTheme/widget/entry/img_focused.png b/WebKit/efl/DefaultTheme/widget/entry/img_focused.png Binary files differnew file mode 100644 index 0000000..0069d1e --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/entry/img_focused.png diff --git a/WebKit/efl/DefaultTheme/widget/entry/img_hovered.png b/WebKit/efl/DefaultTheme/widget/entry/img_hovered.png Binary files differnew file mode 100644 index 0000000..fbd07af --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/entry/img_hovered.png diff --git a/WebKit/efl/DefaultTheme/widget/entry/img_normal.png b/WebKit/efl/DefaultTheme/widget/entry/img_normal.png Binary files differnew file mode 100644 index 0000000..7c5f1cf --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/entry/img_normal.png diff --git a/WebKit/efl/DefaultTheme/widget/file/file_focus.png b/WebKit/efl/DefaultTheme/widget/file/file_focus.png Binary files differnew file mode 100644 index 0000000..55f5bb8 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/file/file_focus.png diff --git a/WebKit/efl/DefaultTheme/widget/file/file_hover.png b/WebKit/efl/DefaultTheme/widget/file/file_hover.png Binary files differnew file mode 100644 index 0000000..be32454 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/file/file_hover.png diff --git a/WebKit/efl/DefaultTheme/widget/file/file_normal.png b/WebKit/efl/DefaultTheme/widget/file/file_normal.png Binary files differnew file mode 100644 index 0000000..794eba6 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/file/file_normal.png diff --git a/WebKit/efl/DefaultTheme/widget/file/file_press.png b/WebKit/efl/DefaultTheme/widget/file/file_press.png Binary files differnew file mode 100644 index 0000000..4471dc5 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/file/file_press.png diff --git a/WebKit/efl/DefaultTheme/widget/radio/img_radio_off.png b/WebKit/efl/DefaultTheme/widget/radio/img_radio_off.png Binary files differnew file mode 100644 index 0000000..e249d8f --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/radio/img_radio_off.png diff --git a/WebKit/efl/DefaultTheme/widget/radio/img_radio_off_focus.png b/WebKit/efl/DefaultTheme/widget/radio/img_radio_off_focus.png Binary files differnew file mode 100644 index 0000000..b25751c --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/radio/img_radio_off_focus.png diff --git a/WebKit/efl/DefaultTheme/widget/radio/img_radio_off_hover.png b/WebKit/efl/DefaultTheme/widget/radio/img_radio_off_hover.png Binary files differnew file mode 100644 index 0000000..9096ef8 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/radio/img_radio_off_hover.png diff --git a/WebKit/efl/DefaultTheme/widget/radio/img_radio_on.png b/WebKit/efl/DefaultTheme/widget/radio/img_radio_on.png Binary files differnew file mode 100644 index 0000000..b1f4085 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/radio/img_radio_on.png diff --git a/WebKit/efl/DefaultTheme/widget/radio/img_radio_on_focus.png b/WebKit/efl/DefaultTheme/widget/radio/img_radio_on_focus.png Binary files differnew file mode 100644 index 0000000..a28d3dd --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/radio/img_radio_on_focus.png diff --git a/WebKit/efl/DefaultTheme/widget/radio/img_radio_on_hover.png b/WebKit/efl/DefaultTheme/widget/radio/img_radio_on_hover.png Binary files differnew file mode 100644 index 0000000..3a3a35e --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/radio/img_radio_on_hover.png diff --git a/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png Binary files differnew file mode 100644 index 0000000..6e55557 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png diff --git a/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_hilight.png b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_hilight.png Binary files differnew file mode 100644 index 0000000..1116f4e --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_hilight.png diff --git a/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png Binary files differnew file mode 100644 index 0000000..bc65102 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png diff --git a/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png Binary files differnew file mode 100644 index 0000000..db3c685 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png diff --git a/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png Binary files differnew file mode 100644 index 0000000..9ebdac2 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png diff --git a/WebKit/efl/DefaultTheme/widget/search/cancel/cancel_normal_button.png b/WebKit/efl/DefaultTheme/widget/search/cancel/cancel_normal_button.png Binary files differnew file mode 100644 index 0000000..d496599 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/search/cancel/cancel_normal_button.png diff --git a/WebKit/efl/DefaultTheme/widget/search/cancel/cancel_normal_button2.png b/WebKit/efl/DefaultTheme/widget/search/cancel/cancel_normal_button2.png Binary files differnew file mode 100644 index 0000000..5ab4f5b --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/search/cancel/cancel_normal_button2.png diff --git a/WebKit/efl/DefaultTheme/widget/search/decoration/decoration_normal_button.png b/WebKit/efl/DefaultTheme/widget/search/decoration/decoration_normal_button.png Binary files differnew file mode 100644 index 0000000..3ed2219 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/search/decoration/decoration_normal_button.png diff --git a/WebKit/efl/DefaultTheme/widget/search/field/field_focused.png b/WebKit/efl/DefaultTheme/widget/search/field/field_focused.png Binary files differnew file mode 100644 index 0000000..0069d1e --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/search/field/field_focused.png diff --git a/WebKit/efl/DefaultTheme/widget/search/field/field_hovered.png b/WebKit/efl/DefaultTheme/widget/search/field/field_hovered.png Binary files differnew file mode 100644 index 0000000..fbd07af --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/search/field/field_hovered.png diff --git a/WebKit/efl/DefaultTheme/widget/search/field/field_normal.png b/WebKit/efl/DefaultTheme/widget/search/field/field_normal.png Binary files differnew file mode 100644 index 0000000..7c5f1cf --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/search/field/field_normal.png diff --git a/WebKit/efl/EWebLauncher/main.c b/WebKit/efl/EWebLauncher/main.c new file mode 100644 index 0000000..6a9e4fb --- /dev/null +++ b/WebKit/efl/EWebLauncher/main.c @@ -0,0 +1,771 @@ +/* + * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia + * Copyright (C) 2009, 2010 ProFUSION embedded systems + * Copyright (C) 2009, 2010 Samsung Electronics + * + * 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 "EWebKit.h" + +#include <ctype.h> +#include <Ecore.h> +#include <Ecore_Data.h> +#include <Ecore_Evas.h> +#include <Ecore_File.h> +#include <Ecore_Getopt.h> +#include <Ecore_X.h> +#include <Edje.h> +#include <Evas.h> +#include <limits.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <unistd.h> + +#define DEFAULT_WIDTH 800 +#define DEFAULT_HEIGHT 600 + +#define info(format, args...) \ + do { \ + if (verbose) \ + printf(format, ##args); \ + } while (0) + +#define REL_THEME_PATH "../../../WebKit/efl/DefaultTheme/default.edj" + +#define MIN_ZOOM_LEVEL 0 +#define DEFAULT_ZOOM_LEVEL 5 +#define MAX_ZOOM_LEVEL 13 + +static int currentZoomLevel = DEFAULT_ZOOM_LEVEL; + +// the zoom values are chosen to be like in Mozilla Firefox 3 +static int zoomLevels[] = {30, 50, 67, 80, 90, + 100, + 110, 120, 133, 150, 170, 200, 240, 300}; + +static int verbose = 0; + +static Eina_List *windows = NULL; + +static char *themePath = NULL; + +typedef struct _Window_Properties { + Eina_Bool toolbarsVisible:1; + Eina_Bool statusbarVisible:1; + Eina_Bool scrollbarsVisible:1; + Eina_Bool menubarVisible:1; +} Window_Properties; + +Window_Properties windowProperties = { /* Pretend we have them and they are initially visible */ + EINA_TRUE, + EINA_TRUE, + EINA_TRUE, + EINA_TRUE +}; + +static const Ecore_Getopt options = { + "EWebLauncher", + "%prog [options] [url]", + "0.0.1", + "(C)2008 INdT (The Nokia Technology Institute)\n" + "(C)2009, 2010 ProFUSION embedded systems\n" + "(C)2009, 2010 Samsung Electronics", + "GPL", + "Test Web Browser using the Enlightenment Foundation Libraries of WebKit", + EINA_TRUE, { + ECORE_GETOPT_STORE_STR + ('e', "engine", "ecore-evas engine to use."), + ECORE_GETOPT_CALLBACK_NOARGS + ('E', "list-engines", "list ecore-evas engines.", + ecore_getopt_callback_ecore_evas_list_engines, NULL), + ECORE_GETOPT_STORE_DEF_BOOL + ('F', "fullscreen", "fullscreen mode.", 0), + ECORE_GETOPT_CALLBACK_ARGS + ('g', "geometry", "geometry to use in x:y:w:h form.", "X:Y:W:H", + ecore_getopt_callback_geometry_parse, NULL), + ECORE_GETOPT_STORE_STR + ('t', "theme", "path to read the theme file from."), + ECORE_GETOPT_STORE_STR + ('U', "user-agent", "custom user agent string to use."), + ECORE_GETOPT_STORE_DEF_BOOL + ('S', "sudo-workaround", "Workaround mode for making Flash work with sudo.", 0), + ECORE_GETOPT_COUNT + ('v', "verbose", "be more verbose."), + ECORE_GETOPT_VERSION + ('V', "version"), + ECORE_GETOPT_COPYRIGHT + ('R', "copyright"), + ECORE_GETOPT_LICENSE + ('L', "license"), + ECORE_GETOPT_HELP + ('h', "help"), + ECORE_GETOPT_SENTINEL + } +}; + +typedef struct _ELauncher { + Ecore_Evas *ee; + Evas *evas; + Evas_Object *bg; + Evas_Object *browser; + const char *theme; + const char *userAgent; +} ELauncher; + +void browserDestroy(Ecore_Evas *ee); +void closeWindow(Ecore_Evas *ee); +int browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Rectangle geometry, const char *engine, unsigned char isFullscreen); + +void +print_history(Eina_List *list) +{ + Eina_List *l; + void *d; + + if (!verbose) + return; + + printf("Session history contains:\n"); + + EINA_LIST_FOREACH(list, l, d) { + Ewk_History_Item *item = (Ewk_History_Item*)d; + cairo_surface_t *cs = ewk_history_item_icon_surface_get(item); + char buf[PATH_MAX]; + ssize_t s = snprintf(buf, sizeof(buf), "/tmp/favicon-%s.png", ewk_history_item_uri_original_get(item)); + for (s--; s >= sizeof("/tmp/favicon-"); s--) { + if (!isalnum(buf[s]) && buf[s] != '.') + buf[s] = '_'; + } + cs = ewk_history_item_icon_surface_get(item); + + if (cs && cairo_surface_status(cs) == CAIRO_STATUS_SUCCESS) + cairo_surface_write_to_png(cs, buf); + else + buf[0] = '\0'; + + printf("* '%s' title='%s' icon='%s'\n", + ewk_history_item_uri_original_get(item), + ewk_history_item_title_get(item), buf); + } +} + +void +zoom_level_set(Evas_Object *webview, int level) +{ + float factor = ((float) zoomLevels[level]) / 100.0; + Evas_Coord ox, oy, mx, my, cx, cy; + evas_pointer_canvas_xy_get(evas_object_evas_get(webview), &mx, &my); + evas_object_geometry_get(webview, &ox, &oy, NULL, NULL); + cx = mx - ox; + cy = my - oy; + ewk_view_zoom_animated_set(webview, factor, 0.5, cx, cy); +} + +char* +join_path(const char *base, const char *path) +{ + char separator[] = "/"; + + char tmp[PATH_MAX + 1]; + char result[PATH_MAX + 1]; + result[0] = tmp[0] = '\0'; + + char *str = strdup(path); + + char *token = NULL; + token = strtok(str, separator); + int count = 0; + do { + if (!strcmp(token, "..")) + count++; + else + strcat(tmp, token); + token = strtok(NULL, separator); + if (!token) + break; + if (tmp[0]) + strcat(tmp, separator); + } while (EINA_TRUE); + + free(str); + str = strdup(base); + + char *base_ptr; + while (count--) { + base_ptr = strrchr(str, separator[0]); + if (!base_ptr) { + free(str); + return NULL; // couldn't resolve path + } + *base_ptr = '\0'; + } + + strcat(result, str); + strcat(result, separator); + strcat(result, tmp); + free(str); + + return strdup(result); +} + +static void +on_ecore_evas_resize(Ecore_Evas *ee) +{ + Evas_Object *webview; + Evas_Object *bg; + int w, h; + + ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + + bg = evas_object_name_find(ecore_evas_get(ee), "bg"); + evas_object_move(bg, 0, 0); + evas_object_resize(bg, w, h); + + webview = evas_object_name_find(ecore_evas_get(ee), "browser"); + evas_object_move(webview, 10, 10); + evas_object_resize(webview, w - 20, h - 20); +} + +static void +title_set(Ecore_Evas *ee, const char *title, int progress) +{ + const char *appname = "EFL Test Launcher"; + const char *separator = " - "; + char label[4096]; + int size; + + if (!title || !strcmp(title, "")) { + ecore_evas_title_set(ee, appname); + return; + } + + if (progress < 100) + size = snprintf(label, sizeof(label), "%s (%d%%)%s%s", title, progress, separator, appname); + else + size = snprintf(label, sizeof(label), "%s %s%s", title, separator, appname); + + if (size >= (int)sizeof(label)) + return; + + ecore_evas_title_set(ee, label); +} + +static void +on_title_changed(void *user_data, Evas_Object *webview, void *event_info) +{ + ELauncher *app = (ELauncher *)user_data; + const char *title = (const char *)event_info; + + title_set(app->ee, title, 100); +} + +static void +on_progress(void *user_data, Evas_Object *webview, void *event_info) +{ + ELauncher *app = (ELauncher *)user_data; + double *progress = (double *)event_info; + + title_set(app->ee, ewk_view_title_get(app->browser), *progress * 100); +} + +static void +on_load_finished(void *user_data, Evas_Object *webview, void *event_info) +{ + const Ewk_Frame_Load_Error *err = (const Ewk_Frame_Load_Error *)event_info; + + if (!err) + info("Succeeded loading page.\n"); + else if (err->is_cancellation) + info("Load was cancelled.\n"); + else + info("Failed loading page: %d %s \"%s\", url=%s\n", + err->code, err->domain, err->description, err->failing_url); +} + +static void +on_toolbars_visible_set(void* user_data, Evas_Object* webview, void* event_info) +{ + Eina_Bool *visible = (Eina_Bool *)event_info; + if (*visible) { + info("Toolbars visible changed: show"); + windowProperties.toolbarsVisible = EINA_TRUE; + } else { + info("Toolbars visible changed: hide"); + windowProperties.toolbarsVisible = EINA_FALSE; + } +} + +static void +on_toolbars_visible_get(void* user_data, Evas_Object* webview, void* event_info) +{ + Eina_Bool *visible = (Eina_Bool *)event_info; + *visible = windowProperties.toolbarsVisible; +} + +static void +on_statusbar_visible_set(void* user_data, Evas_Object* webview, void* event_info) +{ + Eina_Bool *visible = (Eina_Bool *)event_info; + if (*visible) { + info("Statusbar visible changed: show"); + windowProperties.statusbarVisible = EINA_TRUE; + } else { + info("Statusbar visible changed: hide"); + windowProperties.statusbarVisible = EINA_FALSE; + } +} + +static void +on_statusbar_visible_get(void* user_data, Evas_Object* webview, void* event_info) +{ + Eina_Bool *visible = (Eina_Bool *)event_info; + *visible = windowProperties.statusbarVisible; +} + +static void +on_scrollbars_visible_set(void* user_data, Evas_Object* webview, void* event_info) +{ + Eina_Bool *visible = (Eina_Bool *)event_info; + if (*visible) { + info("Scrollbars visible changed: show"); + windowProperties.scrollbarsVisible = EINA_TRUE; + } else { + info("Scrollbars visible changed: hide"); + windowProperties.scrollbarsVisible = EINA_FALSE; + } +} + +static void +on_scrollbars_visible_get(void* user_data, Evas_Object* webview, void* event_info) +{ + Eina_Bool *visible = (Eina_Bool *)event_info; + *visible = windowProperties.scrollbarsVisible; +} + +static void +on_menubar_visible_set(void* user_data, Evas_Object* webview, void* event_info) +{ + Eina_Bool *visible = (Eina_Bool *)event_info; + if (*visible) { + info("Menubar visible changed: show"); + windowProperties.menubarVisible = EINA_TRUE; + } else { + info("Menubar visible changed: hide"); + windowProperties.menubarVisible = EINA_FALSE; + } +} + +static void +on_menubar_visible_get(void* user_data, Evas_Object* webview, void* event_info) +{ + Eina_Bool *visible = (Eina_Bool *)event_info; + *visible = windowProperties.menubarVisible; +} + +static void +on_tooltip_text_set(void* user_data, Evas_Object* webview, void* event_info) +{ + const char *text = (const char *)event_info; + if (text && *text != '\0') + info("%s\n", text); +} + +void +on_mouse_down(void* data, Evas* e, Evas_Object* webview, void* event_info) +{ + Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down*) event_info; + if (ev->button == 2) + evas_object_focus_set(webview, !evas_object_focus_get(webview)); +} + +void +on_focus_out(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + info("the webview lost keyboard focus\n"); +} + +void +on_focus_in(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + info("the webview gained keyboard focus\n"); +} + +void +on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Coord w, h; + evas_object_geometry_get(obj, NULL, NULL, &w, &h); + ewk_view_fixed_layout_size_set(obj, w, h); +} + +void +on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*) event_info; + ELauncher *app = data; + + if (!strcmp(ev->key, "Escape")) { + closeWindow(app->ee); + } else if (!strcmp(ev->key, "F1")) { + info("Back (F1) was pressed\n"); + if (ewk_view_back_possible(obj)) { + Ewk_History *history = ewk_view_history_get(obj); + Eina_List *list = ewk_history_back_list_get(history); + print_history(list); + ewk_history_item_list_free(list); + ewk_view_back(obj); + } else + info("Back ignored: No back history\n"); + } else if (!strcmp(ev->key, "F2")) { + info("Forward (F2) was pressed\n"); + if (ewk_view_forward_possible(obj)) { + Ewk_History *history = ewk_view_history_get(obj); + Eina_List *list = ewk_history_forward_list_get(history); + print_history(list); + ewk_history_item_list_free(list); + ewk_view_forward(obj); + } else + info("Forward ignored: No forward history\n"); + } else if (!strcmp(ev->key, "F4")) { + Evas_Object *frame = ewk_view_frame_main_get(obj); + Evas_Coord x, y; + Ewk_Hit_Test *ht; + + evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y); + ht = ewk_frame_hit_test_new(frame, x, y); + if (!ht) + printf("No hit test returned for point %d,%d\n", x, y); + else { + printf("Hit test for point %d,%d\n" + " pos=%3d,%3d\n" + " bounding_box=%d,%d + %dx%d\n" + " title='%s'\n" + " alternate_text='%s'\n" + " frame=%p (%s)\n" + " link {\n" + " text='%s'\n" + " url='%s'\n" + " title='%s'\n" + " target frame=%p (%s)\n" + " }\n" + " flags {\n" + " editable=%hhu\n" + " selected=%hhu\n" + " }\n", + x, y, + ht->x, ht->y, + ht->bounding_box.x, ht->bounding_box.y, ht->bounding_box.w, ht->bounding_box.h, + ht->title, + ht->alternate_text, + ht->frame, evas_object_name_get(ht->frame), + ht->link.text, + ht->link.url, + ht->link.title, + ht->link.target_frame, evas_object_name_get(ht->link.target_frame), + ht->flags.editable, + ht->flags.selected); + ewk_frame_hit_test_free(ht); + } + + } else if (!strcmp(ev->key, "F5")) { + info("Reload (F5) was pressed, reloading.\n"); + ewk_view_reload(obj); + } else if (!strcmp(ev->key, "F6")) { + info("Stop (F6) was pressed, stop loading.\n"); + ewk_view_stop(obj); + /* } FIXME: uncomment code below after Bug 18662 lands upstream. + else if (!strcmp(ev->key, "F12")) { + bool status = ewk_webframe_object_keyboard_navigation_get(page); + ewk_webframe_object_keyboard_navigation_set(page, !status); + info("Command::keyboard navigation toggle\n");*/ + } else if (!strcmp(ev->key, "F7")) { + info("Zoom out (F7) was pressed.\n"); + if (currentZoomLevel > MIN_ZOOM_LEVEL) + zoom_level_set(obj, --currentZoomLevel); + } else if (!strcmp(ev->key, "F8")) { + info("Zoom in (F8) was pressed.\n"); + if (currentZoomLevel < MAX_ZOOM_LEVEL) + zoom_level_set(obj, ++currentZoomLevel); + } else if (!strcmp(ev->key, "F9")) { + info("Create new window (F9) was pressed.\n"); + Eina_Rectangle geometry = {0, 0, 0, 0}; + browserCreate("http://www.google.com", + app->theme, app->userAgent, geometry, NULL, 0); + } else if (!strcmp(ev->key, "F10")) { + Evas_Coord x, y, w, h; + Evas_Object *frame = ewk_view_frame_main_get(obj); + float zoom = zoomLevels[currentZoomLevel] / 100.0; + + ewk_frame_visible_content_geometry_get(frame, EINA_FALSE, &x, &y, &w, &h); + x -= w; + y -= h; + w *= 4; + h *= 4; + info("Pre-render %d,%d + %dx%d\n", x, y, w, h); + ewk_view_pre_render_region(obj, x, y, w, h, zoom); + } +} + +void +on_browser_del(void *data, Evas *evas, Evas_Object *browser, void *event) +{ + ELauncher *app = (ELauncher*) data; + + evas_object_event_callback_del(app->browser, EVAS_CALLBACK_KEY_DOWN, on_key_down); + evas_object_event_callback_del(app->browser, EVAS_CALLBACK_MOUSE_DOWN, on_mouse_down); + evas_object_event_callback_del(app->browser, EVAS_CALLBACK_FOCUS_IN, on_focus_in); + evas_object_event_callback_del(app->browser, EVAS_CALLBACK_FOCUS_OUT, on_focus_out); + evas_object_event_callback_del(app->browser, EVAS_CALLBACK_DEL, on_browser_del); +} + +void +on_closeWindow(Ecore_Evas *ee) +{ + browserDestroy(ee); +} + +int +quit(Eina_Bool success, const char *msg) +{ + edje_shutdown(); + ecore_evas_shutdown(); + + if (msg) + fputs(msg, (success) ? stdout : stderr); + + free(themePath); + + if (!success) + return EXIT_FAILURE; + + return EXIT_SUCCESS; +} + +int +browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Rectangle geometry, const char *engine, unsigned char isFullscreen) +{ + if ((geometry.w <= 0) && (geometry.h <= 0)) { + geometry.w = DEFAULT_WIDTH; + geometry.h = DEFAULT_HEIGHT; + } + + ELauncher *app = (ELauncher*) malloc(sizeof(ELauncher)); + if (!app) + return quit(EINA_FALSE, "ERROR: could not create EWebLauncher window\n"); + + app->ee = ecore_evas_new(engine, 0, 0, geometry.w, geometry.h, NULL); + + if (!app->ee) + return quit(EINA_FALSE, "ERROR: could not construct evas-ecore\n"); + + if (isFullscreen) + ecore_evas_fullscreen_set(app->ee, EINA_TRUE); + + ecore_evas_title_set(app->ee, "EFL Test Launcher"); + ecore_evas_callback_resize_set(app->ee, on_ecore_evas_resize); + ecore_evas_callback_delete_request_set(app->ee, closeWindow); + + app->evas = ecore_evas_get(app->ee); + + if (!app->evas) + return quit(EINA_FALSE, "ERROR: could not get evas from evas-ecore\n"); + + if (!theme) + theme = themePath; + + app->theme = theme; + app->userAgent = userAgent; + + app->bg = evas_object_rectangle_add(app->evas); + evas_object_name_set(app->bg, "bg"); + evas_object_color_set(app->bg, 255, 0, 255, 255); + evas_object_move(app->bg, 0, 0); + evas_object_resize(app->bg, geometry.w, geometry.h); + evas_object_layer_set(app->bg, EVAS_LAYER_MIN); + evas_object_show(app->bg); + app->browser = ewk_view_single_add(app->evas); + + ewk_view_theme_set(app->browser, theme); + if (userAgent) + ewk_view_setting_user_agent_set(app->browser, userAgent); + evas_object_name_set(app->browser, "browser"); + + 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, "toolbars,visible,set", on_toolbars_visible_set, app); + evas_object_smart_callback_add(app->browser, "toolbars,visible,get", on_toolbars_visible_get, app); + evas_object_smart_callback_add(app->browser, "statusbar,visible,set", on_statusbar_visible_set, app); + evas_object_smart_callback_add(app->browser, "statusbar,visible,get", on_statusbar_visible_get, app); + evas_object_smart_callback_add(app->browser, "scrollbars,visible,set", on_scrollbars_visible_set, app); + evas_object_smart_callback_add(app->browser, "scrollbars,visible,get", on_scrollbars_visible_get, app); + evas_object_smart_callback_add(app->browser, "menubar,visible,set", on_menubar_visible_set, app); + evas_object_smart_callback_add(app->browser, "menubar,visible,get", on_menubar_visible_get, app); + evas_object_smart_callback_add(app->browser, "tooltip,text,set", on_tooltip_text_set, app); + +/* ewk_callback_resize_requested_add(app->browser, on_resize_requested, app->ee); */ + + evas_object_event_callback_add(app->browser, EVAS_CALLBACK_RESIZE, on_resized, app); + evas_object_event_callback_add(app->browser, EVAS_CALLBACK_KEY_DOWN, on_key_down, app); + evas_object_event_callback_add(app->browser, EVAS_CALLBACK_MOUSE_DOWN, on_mouse_down, app); + evas_object_event_callback_add(app->browser, EVAS_CALLBACK_FOCUS_IN, on_focus_in, app); + evas_object_event_callback_add(app->browser, EVAS_CALLBACK_FOCUS_OUT, on_focus_out, app); + evas_object_event_callback_add(app->browser, EVAS_CALLBACK_DEL, on_browser_del, app); + + evas_object_move(app->browser, 10, 10); + evas_object_resize(app->browser, geometry.w - 20, geometry.h - 20); + + if (url && (url[0] != '\0')) + ewk_view_uri_set(app->browser, url); + + evas_object_show(app->browser); + ecore_evas_show(app->ee); + + evas_object_focus_set(app->browser, EINA_TRUE); + + windows = eina_list_append(windows, app); + + return 1; +} + +void +browserDestroy(Ecore_Evas *ee) +{ + ecore_evas_free(ee); + if (!eina_list_count(windows)) + ecore_main_loop_quit(); +} + +void +closeWindow(Ecore_Evas *ee) +{ + Eina_List *l; + void *app; + EINA_LIST_FOREACH(windows, l, app) + { + if (((ELauncher*) app)->ee == ee) + break; + } + windows = eina_list_remove(windows, app); + browserDestroy(ee); + free(app); +} + +static int +main_signal_exit(void *data, int ev_type, void *ev) +{ + ELauncher *app; + while (windows) { + app = (ELauncher*) eina_list_data_get(windows); + ecore_evas_free(app->ee); + windows = eina_list_remove(windows, app); + } + if (!eina_list_count(windows)) + ecore_main_loop_quit(); + return 1; +} + +int +main(int argc, char *argv[]) +{ + const char *default_url = "http://www.google.com/"; + + Eina_Rectangle geometry = {0, 0, 0, 0}; + char *url = NULL; + char *userAgent = NULL; + char *tmp; + char path[PATH_MAX]; + + char *engine = NULL; + char *theme = NULL; + + unsigned char quitOption = 0; + unsigned char isFullscreen = 0; + unsigned char sudoWorkaround = 0; + int args; + + Ecore_Getopt_Value values[] = { + ECORE_GETOPT_VALUE_STR(engine), + ECORE_GETOPT_VALUE_BOOL(quitOption), + ECORE_GETOPT_VALUE_BOOL(isFullscreen), + ECORE_GETOPT_VALUE_PTR_CAST(geometry), + ECORE_GETOPT_VALUE_STR(theme), + ECORE_GETOPT_VALUE_STR(userAgent), + ECORE_GETOPT_VALUE_BOOL(sudoWorkaround), + ECORE_GETOPT_VALUE_INT(verbose), + ECORE_GETOPT_VALUE_BOOL(quitOption), + ECORE_GETOPT_VALUE_BOOL(quitOption), + ECORE_GETOPT_VALUE_BOOL(quitOption), + ECORE_GETOPT_VALUE_BOOL(quitOption), + ECORE_GETOPT_VALUE_NONE + }; + + if (!ecore_evas_init()) + return EXIT_FAILURE; + + if (!edje_init()) { + ecore_evas_shutdown(); + return EXIT_FAILURE; + } + + ecore_app_args_set(argc, (const char**) argv); + args = ecore_getopt_parse(&options, values, argc, argv); + + if (args < 0) + return quit(EINA_FALSE, "ERROR: could not parse options.\n"); + + if (quitOption) + return quit(EINA_TRUE, NULL); + + if (args < argc) + url = argv[args]; + else + url = (char*) default_url; + + if (sudoWorkaround) + strcat(getenv("HOME"), "blah"); + + themePath = join_path(argv[0], REL_THEME_PATH); + + ewk_init(); + tmp = getenv("TMPDIR"); + if (!tmp) + tmp = "/tmp"; + snprintf(path, sizeof(path), "%s/.ewebkit-%u", tmp, getuid()); + ecore_file_mkpath(path); + ewk_settings_icon_database_path_set(path); + + browserCreate(url, theme, userAgent, geometry, engine, isFullscreen); + ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, &windows); + + ecore_main_loop_begin(); + + ewk_shutdown(); + + return quit(EINA_TRUE, NULL); +} diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp new file mode 100644 index 0000000..1174f83 --- /dev/null +++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp @@ -0,0 +1,395 @@ +/* + * Copyright (C) 2006 Zack Rusin <zack@kde.org> + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2008 Kenneth Rohde Christiansen + * Copyright (C) 2008 Diego Gonzalez + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 "ChromeClientEfl.h" + +#include "DatabaseTracker.h" +#include "EWebKit.h" +#include "FloatRect.h" +#include "FrameLoader.h" +#include "FrameLoaderClientEfl.h" +#include "HitTestResult.h" +#include "IntRect.h" +#include "KURL.h" +#include "NotImplemented.h" +#include "PlatformString.h" +#include "WindowFeatures.h" +#include "ewk_private.h" +#include <wtf/text/CString.h> + +using namespace WebCore; + +static inline Evas_Object* kit(WebCore::Frame* frame) +{ + if (!frame) + return 0; + + FrameLoaderClientEfl* client = static_cast<FrameLoaderClientEfl*>(frame->loader()->client()); + return client ? client->webFrame() : 0; +} + +namespace WebCore { + +ChromeClientEfl::ChromeClientEfl(Evas_Object *view) + : m_view(view) +{ +} + +ChromeClientEfl::~ChromeClientEfl() +{ +} + +void ChromeClientEfl::chromeDestroyed() +{ + delete this; +} + +void ChromeClientEfl::focusedNodeChanged(Node*) +{ + notImplemented(); +} + +FloatRect ChromeClientEfl::windowRect() +{ + notImplemented(); + return FloatRect(); +} + +void ChromeClientEfl::setWindowRect(const FloatRect& rect) +{ + notImplemented(); +} + +FloatRect ChromeClientEfl::pageRect() +{ + notImplemented(); + return FloatRect(); +} + +float ChromeClientEfl::scaleFactor() +{ + notImplemented(); + return 1.0; +} + +void ChromeClientEfl::focus() +{ + evas_object_focus_set(m_view, EINA_TRUE); +} + +void ChromeClientEfl::unfocus() +{ + evas_object_focus_set(m_view, EINA_FALSE); +} + +Page* ChromeClientEfl::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features) +{ + notImplemented(); + return 0; +} + +void ChromeClientEfl::show() +{ + ewk_view_ready(m_view); +} + +bool ChromeClientEfl::canRunModal() +{ + notImplemented(); + return false; +} + +void ChromeClientEfl::runModal() +{ + notImplemented(); +} + +void ChromeClientEfl::setToolbarsVisible(bool visible) +{ + ewk_view_toolbars_visible_set(m_view, visible); +} + +bool ChromeClientEfl::toolbarsVisible() +{ + Eina_Bool visible; + + ewk_view_toolbars_visible_get(m_view, &visible); + return visible; +} + +void ChromeClientEfl::setStatusbarVisible(bool visible) +{ + ewk_view_statusbar_visible_set(m_view, visible); +} + +bool ChromeClientEfl::statusbarVisible() +{ + Eina_Bool visible; + + ewk_view_statusbar_visible_get(m_view, &visible); + return visible; +} + +void ChromeClientEfl::setScrollbarsVisible(bool visible) +{ + ewk_view_scrollbars_visible_set(m_view, visible); +} + +bool ChromeClientEfl::scrollbarsVisible() +{ + Eina_Bool visible; + + ewk_view_scrollbars_visible_get(m_view, &visible); + return visible; +} + +void ChromeClientEfl::setMenubarVisible(bool visible) +{ + ewk_view_menubar_visible_set(m_view, visible); +} + +bool ChromeClientEfl::menubarVisible() +{ + Eina_Bool visible; + + ewk_view_menubar_visible_get(m_view, &visible); + return visible; +} + +void ChromeClientEfl::setResizable(bool) +{ + notImplemented(); +} + +void ChromeClientEfl::closeWindowSoon() +{ + ewk_view_stop(m_view); +} + +bool ChromeClientEfl::canTakeFocus(FocusDirection) +{ + // This is called when cycling through links/focusable objects and we + // reach the last focusable object. + return false; +} + +void ChromeClientEfl::takeFocus(FocusDirection) +{ + unfocus(); +} + +bool ChromeClientEfl::canRunBeforeUnloadConfirmPanel() +{ + return true; +} + +bool ChromeClientEfl::runBeforeUnloadConfirmPanel(const String& message, WebCore::Frame* frame) +{ + return runJavaScriptConfirm(frame, message); +} + +void ChromeClientEfl::addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, + unsigned int lineNumber, const String& sourceID) +{ + ewk_view_add_console_message(m_view, message.utf8().data(), lineNumber, sourceID.utf8().data()); +} + +void ChromeClientEfl::runJavaScriptAlert(Frame* frame, const String& message) +{ + ewk_view_run_javascript_alert(m_view, kit(frame), message.utf8().data()); +} + +bool ChromeClientEfl::runJavaScriptConfirm(Frame* frame, const String& message) +{ + return ewk_view_run_javascript_confirm(m_view, kit(frame), message.utf8().data()); +} + +bool ChromeClientEfl::runJavaScriptPrompt(Frame* frame, const String& message, const String& defaultValue, String& result) +{ + char* value = 0; + ewk_view_run_javascript_prompt(m_view, kit(frame), message.utf8().data(), defaultValue.utf8().data(), &value); + if (value) { + result = String::fromUTF8(value); + free(value); + return true; + } + return false; +} + +void ChromeClientEfl::setStatusbarText(const String& string) +{ + ewk_view_statusbar_text_set(m_view, string.utf8().data()); +} + +bool ChromeClientEfl::shouldInterruptJavaScript() +{ + return ewk_view_should_interrupt_javascript(m_view); +} + +bool ChromeClientEfl::tabsToLinks() const +{ + return true; +} + +IntRect ChromeClientEfl::windowResizerRect() const +{ + notImplemented(); + // Implementing this function will make repaint being + // called during resize, but as this will be done with + // a minor delay it adds a weird "filling" effect due + // to us using an evas image for showing the cairo + // context. So instead of implementing this function + // we call paint directly during resize with + // the new object size as its argument. + return IntRect(); +} + +void ChromeClientEfl::repaint(const IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly) +{ + Evas_Coord x, y, w, h; + + if (!contentChanged) + return; + + x = windowRect.x(); + y = windowRect.y(); + w = windowRect.width(); + h = windowRect.height(); + ewk_view_repaint(m_view, x, y, w, h); +} + +void ChromeClientEfl::contentsSizeChanged(Frame* frame, const IntSize& size) const +{ + ewk_frame_contents_size_changed(kit(frame), size.width(), size.height()); +} + +bool ChromeClientEfl::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect& clipRect, bool canBlit, bool isMainFrame) +{ + ewk_view_scroll(m_view, delta.width(), delta.height(), scrollViewRect.x(), scrollViewRect.y(), scrollViewRect.width(), scrollViewRect.height(), clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height(), isMainFrame); + return canBlit; +} + +IntRect ChromeClientEfl::windowToScreen(const IntRect& rect) const +{ + notImplemented(); + return rect; +} + +IntPoint ChromeClientEfl::screenToWindow(const IntPoint& point) const +{ + notImplemented(); + return point; +} + +PlatformPageClient ChromeClientEfl::platformPageClient() const +{ + return m_view; +} + +void ChromeClientEfl::scrollbarsModeDidChange() const +{ +} + +void ChromeClientEfl::mouseDidMoveOverElement(const HitTestResult& hit, unsigned modifierFlags) +{ + // FIXME, compare with old link, look at Qt impl. + bool isLink = hit.isLiveLink(); + if (isLink) { + KURL url = hit.absoluteLinkURL(); + if (!url.isEmpty() && url != m_hoveredLinkURL) { + const char *link[2]; + TextDirection dir; + CString urlStr = url.prettyURL().utf8(); + CString titleStr = hit.title(dir).utf8(); + link[0] = urlStr.data(); + link[1] = titleStr.data(); + ewk_view_mouse_link_hover_in(m_view, link); + m_hoveredLinkURL = url; + } + } else if (!isLink && !m_hoveredLinkURL.isEmpty()) { + ewk_view_mouse_link_hover_out(m_view); + m_hoveredLinkURL = KURL(); + } +} + +void ChromeClientEfl::setToolTip(const String& toolTip, TextDirection) +{ + ewk_view_tooltip_text_set(m_view, toolTip.utf8().data()); +} + +void ChromeClientEfl::print(Frame* frame) +{ + notImplemented(); +} + +#if ENABLE(OFFLINE_WEB_APPLICATIONS) +void ChromeClientEfl::reachedMaxAppCacheSize(int64_t spaceNeeded) +{ + // FIXME: Free some space. + notImplemented(); +} +#endif + +void ChromeClientEfl::exceededDatabaseQuota(Frame* frame, const String& databaseName) +{ + uint64_t quota = ewk_settings_web_database_default_quota_get(); + + if (!DatabaseTracker::tracker().hasEntryForOrigin(frame->document()->securityOrigin())) + DatabaseTracker::tracker().setQuota(frame->document()->securityOrigin(), quota); + + ewk_view_exceeded_database_quota(m_view, kit(frame), databaseName.utf8().data()); +} + +void ChromeClientEfl::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser) +{ + notImplemented(); +} + +void ChromeClientEfl::formStateDidChange(const Node*) +{ + notImplemented(); +} + +bool ChromeClientEfl::setCursor(PlatformCursorHandle) +{ + notImplemented(); + return false; +} + +void ChromeClientEfl::requestGeolocationPermissionForFrame(Frame*, Geolocation*) +{ + // See the comment in WebCore/page/ChromeClient.h + notImplemented(); +} + +} diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h new file mode 100644 index 0000000..0e17806 --- /dev/null +++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2007 Holger Hans Peter Freyther + * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef ChromeClientEfl_h +#define ChromeClientEfl_h + +#include "ChromeClient.h" +#include "KURL.h" +#include <Evas.h> + +namespace WebCore { + +class ChromeClientEfl : public ChromeClient { +public: + explicit ChromeClientEfl(Evas_Object *view); + virtual ~ChromeClientEfl(); + + virtual void chromeDestroyed(); + + virtual void setWindowRect(const FloatRect&); + virtual FloatRect windowRect(); + + virtual FloatRect pageRect(); + + virtual float scaleFactor(); + + virtual void focus(); + virtual void unfocus(); + + virtual bool canTakeFocus(FocusDirection); + virtual void takeFocus(FocusDirection); + + virtual void focusedNodeChanged(WebCore::Node*); + + virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&); + virtual void show(); + + virtual bool canRunModal(); + virtual void runModal(); + + virtual void setToolbarsVisible(bool); + virtual bool toolbarsVisible(); + + virtual void setStatusbarVisible(bool); + virtual bool statusbarVisible(); + + virtual void setScrollbarsVisible(bool); + virtual bool scrollbarsVisible(); + + virtual void setMenubarVisible(bool); + virtual bool menubarVisible(); + + virtual void setResizable(bool); + + virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, + unsigned int lineNumber, const String& sourceID); + + virtual bool canRunBeforeUnloadConfirmPanel(); + virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame* frame); + + virtual void closeWindowSoon(); + + virtual void runJavaScriptAlert(Frame*, const String&); + virtual bool runJavaScriptConfirm(Frame*, const String&); + virtual bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result); + virtual void setStatusbarText(const String&); + virtual bool shouldInterruptJavaScript(); + virtual bool tabsToLinks() const; + + virtual IntRect windowResizerRect() const; + + virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); + virtual void contentsSizeChanged(Frame*, const IntSize&) const; + virtual bool scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect, bool canBlit, bool isMainFrame); + virtual IntPoint screenToWindow(const IntPoint&) const; + virtual IntRect windowToScreen(const IntRect&) const; + virtual PlatformPageClient platformPageClient() const; + + virtual void scrollbarsModeDidChange() const; + virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags); + + virtual void setToolTip(const String&, TextDirection); + + virtual void print(Frame*); + +#if ENABLE(DATABASE) + virtual void exceededDatabaseQuota(Frame*, const String&); +#endif + +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); +#endif + + virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); + virtual void formStateDidChange(const Node*); + + virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; } + + virtual bool setCursor(PlatformCursorHandle); + + virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {} + + virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*); + + Evas_Object *m_view; + KURL m_hoveredLinkURL; +}; +} + +#endif // ChromeClientEfl_h diff --git a/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp b/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp new file mode 100644 index 0000000..aaa64d7 --- /dev/null +++ b/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2010 ProFUSION embedded systems + * Copyright (C) 2010 Samsung Electronics + * + * 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 "ContextMenuClientEfl.h" + +#include "ContextMenu.h" +#include "HitTestResult.h" +#include "KURL.h" +#include "NotImplemented.h" + +using namespace WebCore; + +namespace WebCore { + +ContextMenuClientEfl::ContextMenuClientEfl(Evas_Object* view) + : m_view(view) +{ +} + +void ContextMenuClientEfl::contextMenuDestroyed() +{ + delete this; +} + +PlatformMenuDescription ContextMenuClientEfl::getCustomMenuFromDefaultItems(ContextMenu*) +{ + notImplemented(); + return 0; +} + +void ContextMenuClientEfl::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) +{ + notImplemented(); +} + +void ContextMenuClientEfl::downloadURL(const KURL&) +{ + notImplemented(); +} + +void ContextMenuClientEfl::searchWithGoogle(const Frame*) +{ + notImplemented(); +} + +void ContextMenuClientEfl::lookUpInDictionary(Frame*) +{ + notImplemented(); +} + +bool ContextMenuClientEfl::isSpeaking() +{ + notImplemented(); + return false; +} + +void ContextMenuClientEfl::speak(const String&) +{ + notImplemented(); +} + +void ContextMenuClientEfl::stopSpeaking() +{ + notImplemented(); +} + +} diff --git a/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.h b/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.h new file mode 100644 index 0000000..2c3818c --- /dev/null +++ b/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2010 ProFUSION embedded systems + * Copyright (C) 2010 Samsung Electronics + * + * 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 ContextMenuClientEfl_h +#define ContextMenuClientEfl_h + +#include "ContextMenuClient.h" +#include "EWebKit.h" + +namespace WebCore { + +class ContextMenu; + +class ContextMenuClientEfl : public ContextMenuClient { + public: + explicit ContextMenuClientEfl(Evas_Object*); + + virtual void contextMenuDestroyed(); + + virtual PlatformMenuDescription getCustomMenuFromDefaultItems(ContextMenu*); + virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*); + + virtual void downloadURL(const KURL&); + virtual void searchWithGoogle(const Frame*); + virtual void lookUpInDictionary(Frame*); + virtual void speak(const String&); + virtual bool isSpeaking(); + virtual void stopSpeaking(); + + private: + Evas_Object* m_view; +}; +} + +#endif // ContextMenuClientEfl_h diff --git a/WebKit/efl/WebCoreSupport/DragClientEfl.cpp b/WebKit/efl/WebCoreSupport/DragClientEfl.cpp new file mode 100644 index 0000000..d6610e1 --- /dev/null +++ b/WebKit/efl/WebCoreSupport/DragClientEfl.cpp @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 "DragClientEfl.h" + +#include "NotImplemented.h" + +using namespace WebCore; + +namespace WebCore { + +void DragClientEfl::willPerformDragDestinationAction(DragDestinationAction, DragData*) +{ + notImplemented(); +} + +void DragClientEfl::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*) +{ + notImplemented(); +} + +DragDestinationAction DragClientEfl::actionMaskForDrag(DragData*) +{ + return DragDestinationActionAny; +} + +DragSourceAction DragClientEfl::dragSourceActionMaskForPoint(const IntPoint&) +{ + return DragSourceActionAny; +} + +void DragClientEfl::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool) +{ + notImplemented(); +} + +DragImageRef DragClientEfl::createDragImageForLink(KURL&, const String& label, Frame*) +{ + return 0; +} + +void DragClientEfl::dragControllerDestroyed() +{ + delete this; +} + +} diff --git a/WebKit/efl/WebCoreSupport/DragClientEfl.h b/WebKit/efl/WebCoreSupport/DragClientEfl.h new file mode 100644 index 0000000..40bb6ad --- /dev/null +++ b/WebKit/efl/WebCoreSupport/DragClientEfl.h @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007 Holger Hans Peter Freyther + * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * 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. + * 3. Neither the name of Apple, Inc. ("Apple") 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 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 DragClientEfl_h +#define DragClientEfl_h + +#include "DragClient.h" + +namespace WebCore { +class DragClientEfl : public WebCore::DragClient { +public: + virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData*); + virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*); + virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*); + + virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint); + + virtual void startDrag(WebCore::DragImageRef dragImage, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::Clipboard*, WebCore::Frame*, bool linkDrag = false); + virtual WebCore::DragImageRef createDragImageForLink(WebCore::KURL&, const WebCore::String& label, WebCore::Frame*); + + virtual void dragControllerDestroyed(); +}; +} + +#endif // DragClientEfl_h diff --git a/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp b/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp new file mode 100644 index 0000000..b87a91a --- /dev/null +++ b/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp @@ -0,0 +1,493 @@ +/* + * Copyright (C) 2007 Alp Toker <alp@atoker.com> + * Copyright (C) 2008 Nuanti Ltd. + * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" +#include "EditorClientEfl.h" + +#include "EWebKit.h" +#include "EditCommand.h" +#include "Editor.h" +#include "EventNames.h" +#include "FocusController.h" +#include "Frame.h" +#include "KeyboardEvent.h" +#include "NotImplemented.h" +#include "Page.h" +#include "PlatformKeyboardEvent.h" +#include "WindowsKeyboardCodes.h" +#include "ewk_private.h" + +using namespace WebCore; + +namespace WebCore { + +void EditorClientEfl::setInputMethodState(bool active) +{ + notImplemented(); +} + +bool EditorClientEfl::shouldDeleteRange(Range*) +{ + notImplemented(); + return true; +} + +bool EditorClientEfl::shouldShowDeleteInterface(HTMLElement*) +{ + return false; +} + +bool EditorClientEfl::isContinuousSpellCheckingEnabled() +{ + notImplemented(); + return false; +} + +bool EditorClientEfl::isGrammarCheckingEnabled() +{ + notImplemented(); + return false; +} + +int EditorClientEfl::spellCheckerDocumentTag() +{ + notImplemented(); + return 0; +} + +bool EditorClientEfl::shouldBeginEditing(Range*) +{ + notImplemented(); + return true; +} + +bool EditorClientEfl::shouldEndEditing(Range*) +{ + notImplemented(); + return true; +} + +bool EditorClientEfl::shouldInsertText(const String&, Range*, EditorInsertAction) +{ + notImplemented(); + return true; +} + +bool EditorClientEfl::shouldChangeSelectedRange(Range*, Range*, EAffinity, bool) +{ + notImplemented(); + return true; +} + +bool EditorClientEfl::shouldApplyStyle(CSSStyleDeclaration*, Range*) +{ + notImplemented(); + return true; +} + +bool EditorClientEfl::shouldMoveRangeAfterDelete(Range*, Range*) +{ + notImplemented(); + return true; +} + +void EditorClientEfl::didBeginEditing() +{ + notImplemented(); +} + +void EditorClientEfl::respondToChangedContents() +{ + notImplemented(); +} + +void EditorClientEfl::respondToChangedSelection() +{ + notImplemented(); +} + +void EditorClientEfl::didEndEditing() +{ + notImplemented(); +} + +void EditorClientEfl::didWriteSelectionToPasteboard() +{ + notImplemented(); +} + +void EditorClientEfl::didSetSelectionTypesForPasteboard() +{ + notImplemented(); +} + +bool EditorClientEfl::isEditable() +{ + notImplemented(); + return false; +} + +void EditorClientEfl::registerCommandForUndo(WTF::PassRefPtr<EditCommand>) +{ + notImplemented(); +} + +void EditorClientEfl::registerCommandForRedo(WTF::PassRefPtr<EditCommand>) +{ + notImplemented(); +} + +void EditorClientEfl::clearUndoRedoOperations() +{ + notImplemented(); +} + +bool EditorClientEfl::canUndo() const +{ + notImplemented(); + return false; +} + +bool EditorClientEfl::canRedo() const +{ + notImplemented(); + return false; +} + +void EditorClientEfl::undo() +{ + notImplemented(); +} + +void EditorClientEfl::redo() +{ + notImplemented(); +} + +bool EditorClientEfl::shouldInsertNode(Node*, Range*, EditorInsertAction) +{ + notImplemented(); + return true; +} + +void EditorClientEfl::pageDestroyed() +{ + delete this; +} + +bool EditorClientEfl::smartInsertDeleteEnabled() +{ + notImplemented(); + return false; +} + +bool EditorClientEfl::isSelectTrailingWhitespaceEnabled() +{ + notImplemented(); + return false; +} + +void EditorClientEfl::toggleContinuousSpellChecking() +{ + notImplemented(); +} + +void EditorClientEfl::toggleGrammarChecking() +{ + notImplemented(); +} + +static const unsigned CtrlKey = 1 << 0; +static const unsigned AltKey = 1 << 1; +static const unsigned ShiftKey = 1 << 2; + +struct KeyDownEntry { + unsigned virtualKey; + unsigned modifiers; + const char* name; +}; + +struct KeyPressEntry { + unsigned charCode; + unsigned modifiers; + const char* name; +}; + +static const KeyDownEntry keyDownEntries[] = { + { VK_LEFT, 0, "MoveLeft" }, + { VK_LEFT, ShiftKey, "MoveLeftAndModifySelection" }, + { VK_LEFT, CtrlKey, "MoveWordLeft" }, + { VK_LEFT, CtrlKey | ShiftKey, "MoveWordLeftAndModifySelection" }, + { VK_RIGHT, 0, "MoveRight" }, + { VK_RIGHT, ShiftKey, "MoveRightAndModifySelection" }, + { VK_RIGHT, CtrlKey, "MoveWordRight" }, + { VK_RIGHT, CtrlKey | ShiftKey, "MoveWordRightAndModifySelection" }, + { VK_UP, 0, "MoveUp" }, + { VK_UP, ShiftKey, "MoveUpAndModifySelection" }, + { VK_PRIOR, ShiftKey, "MovePageUpAndModifySelection" }, + { VK_DOWN, 0, "MoveDown" }, + { VK_DOWN, ShiftKey, "MoveDownAndModifySelection" }, + { VK_NEXT, ShiftKey, "MovePageDownAndModifySelection" }, + { VK_PRIOR, 0, "MovePageUp" }, + { VK_NEXT, 0, "MovePageDown" }, + { VK_HOME, 0, "MoveToBeginningOfLine" }, + { VK_HOME, ShiftKey, "MoveToBeginningOfLineAndModifySelection" }, + { VK_HOME, CtrlKey, "MoveToBeginningOfDocument" }, + { VK_HOME, CtrlKey | ShiftKey, "MoveToBeginningOfDocumentAndModifySelection" }, + + { VK_END, 0, "MoveToEndOfLine" }, + { VK_END, ShiftKey, "MoveToEndOfLineAndModifySelection" }, + { VK_END, CtrlKey, "MoveToEndOfDocument" }, + { VK_END, CtrlKey | ShiftKey, "MoveToEndOfDocumentAndModifySelection" }, + + { VK_BACK, 0, "DeleteBackward" }, + { VK_BACK, ShiftKey, "DeleteBackward" }, + { VK_DELETE, 0, "DeleteForward" }, + { VK_BACK, CtrlKey, "DeleteWordBackward" }, + { VK_DELETE, CtrlKey, "DeleteWordForward" }, + + { 'B', CtrlKey, "ToggleBold" }, + { 'I', CtrlKey, "ToggleItalic" }, + + { VK_ESCAPE, 0, "Cancel" }, + { VK_OEM_PERIOD, CtrlKey, "Cancel" }, + { VK_TAB, 0, "InsertTab" }, + { VK_TAB, ShiftKey, "InsertBacktab" }, + { VK_RETURN, 0, "InsertNewline" }, + { VK_RETURN, CtrlKey, "InsertNewline" }, + { VK_RETURN, AltKey, "InsertNewline" }, + { VK_RETURN, AltKey | ShiftKey, "InsertNewline" }, +}; + +static const KeyPressEntry keyPressEntries[] = { + { '\t', 0, "InsertTab" }, + { '\t', ShiftKey, "InsertBacktab" }, + { '\r', 0, "InsertNewline" }, + { '\r', CtrlKey, "InsertNewline" }, + { '\r', AltKey, "InsertNewline" }, + { '\r', AltKey | ShiftKey, "InsertNewline" }, +}; + +#define ARRAYSIZE(array) (sizeof(array) / sizeof((array)[0])) + +const char* EditorClientEfl::interpretKeyEvent(const KeyboardEvent* event) +{ + ASSERT(event->type() == eventNames().keydownEvent || event->type() == eventNames().keypressEvent); + + static HashMap<int, const char*>* keyDownCommandsMap = 0; + static HashMap<int, const char*>* keyPressCommandsMap = 0; + + if (!keyDownCommandsMap) { + keyDownCommandsMap = new HashMap<int, const char*>; + keyPressCommandsMap = new HashMap<int, const char*>; + + for (unsigned i = 0; i < ARRAYSIZE(keyDownEntries); i++) + keyDownCommandsMap->set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].name); + + for (unsigned i = 0; i < ARRAYSIZE(keyPressEntries); i++) + keyPressCommandsMap->set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name); + } + + unsigned modifiers = 0; + if (event->shiftKey()) + modifiers |= ShiftKey; + if (event->altKey()) + modifiers |= AltKey; + if (event->ctrlKey()) + modifiers |= CtrlKey; + + if (event->type() == eventNames().keydownEvent) { + int mapKey = modifiers << 16 | event->keyCode(); + return mapKey ? keyDownCommandsMap->get(mapKey) : 0; + } + + int mapKey = modifiers << 16 | event->charCode(); + return mapKey ? keyPressCommandsMap->get(mapKey) : 0; +} + +bool EditorClientEfl::handleEditingKeyboardEvent(KeyboardEvent* event) +{ + Node* node = event->target()->toNode(); + ASSERT(node); + Frame* frame = node->document()->frame(); + ASSERT(frame); + + const PlatformKeyboardEvent* keyEvent = event->keyEvent(); + if (!keyEvent) + return false; + + bool caretBrowsing = frame->settings()->caretBrowsingEnabled(); + if (caretBrowsing) { + switch (keyEvent->windowsVirtualKeyCode()) { + case VK_LEFT: + frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::EXTEND : SelectionController::MOVE, + SelectionController::LEFT, + keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity, + true); + return true; + case VK_RIGHT: + frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::EXTEND : SelectionController::MOVE, + SelectionController::RIGHT, + keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity, + true); + return true; + case VK_UP: + frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::EXTEND : SelectionController::MOVE, + SelectionController::BACKWARD, + keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity, + true); + return true; + case VK_DOWN: + frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::EXTEND : SelectionController::MOVE, + SelectionController::FORWARD, + keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity, + true); + return true; + } + } + + Editor::Command command = frame->editor()->command(interpretKeyEvent(event)); + + if (keyEvent->type() == PlatformKeyboardEvent::RawKeyDown) { + // WebKit doesn't have enough information about mode to decide how commands that just insert text if executed via Editor should be treated, + // so we leave it upon WebCore to either handle them immediately (e.g. Tab that changes focus) or let a keypress event be generated + // (e.g. Tab that inserts a Tab character, or Enter). + return !command.isTextInsertion() && command.execute(event); + } + + if (command.execute(event)) + return true; + + // Don't insert null or control characters as they can result in unexpected behaviour + if (event->charCode() < ' ') + return false; + + // Don't insert anything if a modifier is pressed + if (keyEvent->ctrlKey() || keyEvent->altKey()) + return false; + + return frame->editor()->insertText(event->keyEvent()->text(), event); +} + +void EditorClientEfl::handleKeyboardEvent(KeyboardEvent* event) +{ + if (handleEditingKeyboardEvent(event)) + event->setDefaultHandled(); +} + +void EditorClientEfl::handleInputMethodKeydown(KeyboardEvent* event) +{ +} + +EditorClientEfl::EditorClientEfl(Evas_Object *view) + : m_view(view) +{ + notImplemented(); +} + +EditorClientEfl::~EditorClientEfl() +{ + notImplemented(); +} + +void EditorClientEfl::textFieldDidBeginEditing(Element*) +{ +} + +void EditorClientEfl::textFieldDidEndEditing(Element*) +{ + notImplemented(); +} + +void EditorClientEfl::textDidChangeInTextField(Element*) +{ + notImplemented(); +} + +bool EditorClientEfl::doTextFieldCommandFromEvent(Element*, KeyboardEvent*) +{ + return false; +} + +void EditorClientEfl::textWillBeDeletedInTextField(Element*) +{ + notImplemented(); +} + +void EditorClientEfl::textDidChangeInTextArea(Element*) +{ + notImplemented(); +} + +void EditorClientEfl::ignoreWordInSpellDocument(const String&) +{ + notImplemented(); +} + +void EditorClientEfl::learnWord(const String&) +{ + notImplemented(); +} + +void EditorClientEfl::checkSpellingOfString(const UChar*, int, int*, int*) +{ + notImplemented(); +} + +String EditorClientEfl::getAutoCorrectSuggestionForMisspelledWord(const String&) +{ + notImplemented(); + return String(); +} + +void EditorClientEfl::checkGrammarOfString(const UChar*, int, Vector<GrammarDetail>&, int*, int*) +{ + notImplemented(); +} + +void EditorClientEfl::updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) +{ + notImplemented(); +} + +void EditorClientEfl::updateSpellingUIWithMisspelledWord(const String&) +{ + notImplemented(); +} + +void EditorClientEfl::showSpellingUI(bool) +{ + notImplemented(); +} + +bool EditorClientEfl::spellingUIIsShowing() +{ + notImplemented(); + return false; +} + +void EditorClientEfl::getGuessesForWord(const String&, Vector<String>&) +{ + notImplemented(); +} + +} diff --git a/WebKit/efl/WebCoreSupport/EditorClientEfl.h b/WebKit/efl/WebCoreSupport/EditorClientEfl.h new file mode 100644 index 0000000..ead1169 --- /dev/null +++ b/WebKit/efl/WebCoreSupport/EditorClientEfl.h @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> + * Copyright (C) 2006 Zack Rusin <zack@kde.org> + * Copyright (C) 2006 Apple Computer, Inc. + * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 EditorClientEfl_h +#define EditorClientEfl_h + +#include "EditorClient.h" +#include <Evas.h> + +#include <wtf/Forward.h> + +namespace WebCore { +class Page; + +class EditorClientEfl : public EditorClient { +public: + EditorClientEfl(Evas_Object *view); + ~EditorClientEfl(); + + // from EditorClient + virtual void pageDestroyed(); + + virtual bool shouldDeleteRange(Range*); + virtual bool shouldShowDeleteInterface(HTMLElement*); + virtual bool smartInsertDeleteEnabled(); + virtual bool isSelectTrailingWhitespaceEnabled(); + virtual bool isContinuousSpellCheckingEnabled(); + virtual void toggleContinuousSpellChecking(); + virtual bool isGrammarCheckingEnabled(); + virtual void toggleGrammarChecking(); + virtual int spellCheckerDocumentTag(); + + virtual bool isEditable(); + + virtual bool shouldBeginEditing(Range*); + virtual bool shouldEndEditing(Range*); + virtual bool shouldInsertNode(Node*, Range*, EditorInsertAction); + virtual bool shouldInsertText(const String&, Range*, EditorInsertAction); + virtual bool shouldChangeSelectedRange(Range* fromRange, Range* toRange, EAffinity, bool stillSelecting); + + virtual bool shouldApplyStyle(CSSStyleDeclaration*, Range*); + + virtual bool shouldMoveRangeAfterDelete(Range*, Range*); + + virtual void didBeginEditing(); + virtual void respondToChangedContents(); + virtual void respondToChangedSelection(); + virtual void didEndEditing(); + virtual void didWriteSelectionToPasteboard(); + virtual void didSetSelectionTypesForPasteboard(); + + virtual void registerCommandForUndo(WTF::PassRefPtr<EditCommand>); + virtual void registerCommandForRedo(WTF::PassRefPtr<EditCommand>); + virtual void clearUndoRedoOperations(); + + virtual bool canUndo() const; + virtual bool canRedo() const; + + virtual void undo(); + virtual void redo(); + + virtual const char* interpretKeyEvent(const KeyboardEvent* event); + virtual bool handleEditingKeyboardEvent(KeyboardEvent*); + virtual void handleKeyboardEvent(KeyboardEvent*); + virtual void handleInputMethodKeydown(KeyboardEvent*); + + virtual void textFieldDidBeginEditing(Element*); + virtual void textFieldDidEndEditing(Element*); + virtual void textDidChangeInTextField(Element*); + virtual bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*); + virtual void textWillBeDeletedInTextField(Element*); + virtual void textDidChangeInTextArea(Element*); + + virtual void ignoreWordInSpellDocument(const String&); + virtual void learnWord(const String&); + virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength); + virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord); + virtual void checkGrammarOfString(const UChar*, int length, WTF::Vector<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength); + virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail&); + virtual void updateSpellingUIWithMisspelledWord(const String&); + virtual void showSpellingUI(bool show); + virtual bool spellingUIIsShowing(); + virtual void getGuessesForWord(const String&, WTF::Vector<String>& guesses); + virtual void setInputMethodState(bool enabled); + +private: + Evas_Object *m_view; +}; +} + +#endif // EditorClientEfl_h diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp new file mode 100644 index 0000000..8a7fd2d --- /dev/null +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp @@ -0,0 +1,868 @@ +/* + * Copyright (C) 2006 Zack Rusin <zack@kde.org> + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2008 Collabora Ltd. All rights reserved. + * Copyright (C) 2008 Holger Hans Peter Freyther + * Copyright (C) 2008 Kenneth Rohde Christiansen + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 "FrameLoaderClientEfl.h" + +#include "DocumentLoader.h" +#include "EWebKit.h" +#include "FormState.h" +#include "FrameLoader.h" +#include "FrameTree.h" +#include "FrameView.h" +#include "HTMLFormElement.h" +#include "Language.h" +#include "MIMETypeRegistry.h" +#include "NotImplemented.h" +#include "PluginDatabase.h" +#include "ProgressTracker.h" +#include "RenderPart.h" +#include "ResourceRequest.h" +#include "ewk_private.h" +#include <wtf/text/CString.h> + +#if PLATFORM(UNIX) +#include <sys/utsname.h> +#endif + +#include <Ecore_Evas.h> + +using namespace WebCore; + +namespace WebCore { + +FrameLoaderClientEfl::FrameLoaderClientEfl(Evas_Object *view) + : m_view(view) + , m_frame(0) + , m_firstData(false) + , m_userAgent("") + , m_customUserAgent("") + , m_pluginView(0) + , m_hasSentResponseToPlugin(false) +{ +} + +static String agentPlatform() +{ + notImplemented(); + return "Unknown"; +} + +static String agentOS() +{ +#if PLATFORM(DARWIN) +#if PLATFORM(X86) + return "Intel Mac OS X"; +#else + return "PPC Mac OS X"; +#endif +#elif PLATFORM(UNIX) + struct utsname name; + if (uname(&name) != -1) + return String::format("%s %s", name.sysname, name.machine); + + return "Unknown"; +#elif PLATFORM(WIN_OS) + // FIXME: Compute the Windows version + return "Windows"; +#else + notImplemented(); + return "Unknown"; +#endif +} + +static String composeUserAgent() +{ + // This is a liberal interpretation of http://www.mozilla.org/build/revised-user-agent-strings.html + // See also http://developer.apple.com/internet/safari/faq.html#anchor2 + + String ua; + + // Product + ua += "Mozilla/5.0"; + + // Comment + ua += " ("; + ua += agentPlatform(); // Platform + ua += "; U; "; // Security + ua += agentOS(); // OS-or-CPU + ua += "; "; + ua += defaultLanguage(); // Localization information + ua += ") "; + + // WebKit Product + // FIXME: The WebKit version is hardcoded + static const String webKitVersion = "525.1+"; + ua += "AppleWebKit/" + webKitVersion; + ua += " (KHTML, like Gecko, "; + // We mention Safari since many broken sites check for it (OmniWeb does this too) + // We re-use the WebKit version, though it doesn't seem to matter much in practice + ua += "Safari/" + webKitVersion; + ua += ") "; + + // Vendor Product + // ua += g_get_prgname(); + + return ua; +} + +void FrameLoaderClientEfl::setCustomUserAgent(const String &agent) +{ + m_customUserAgent = agent; +} + +const String& FrameLoaderClientEfl::customUserAgent() const +{ + return m_customUserAgent; +} + +String FrameLoaderClientEfl::userAgent(const KURL&) +{ + if (!m_customUserAgent.isEmpty()) + return m_customUserAgent; + + if (m_userAgent.isEmpty()) + m_userAgent = composeUserAgent(); + return m_userAgent; +} + +void FrameLoaderClientEfl::callPolicyFunction(FramePolicyFunction function, PolicyAction action) +{ + Frame* f = ewk_frame_core_get(m_frame); + ASSERT(f); + (f->loader()->policyChecker()->*function)(action); +} + +WTF::PassRefPtr<DocumentLoader> FrameLoaderClientEfl::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData) +{ + RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData); + if (substituteData.isValid()) + loader->setDeferMainResourceDataLoad(false); + return loader.release(); +} + +void FrameLoaderClientEfl::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<FormState>) +{ + // FIXME: This is surely too simple + ASSERT(function); + callPolicyFunction(function, PolicyUse); +} + + +void FrameLoaderClientEfl::committedLoad(DocumentLoader* loader, const char* data, int length) +{ + if (!m_pluginView) { + if (!m_frame) + return; + + FrameLoader* fl = loader->frameLoader(); + if (m_firstData) { + fl->setEncoding(m_response.textEncodingName(), false); + m_firstData = false; + } + fl->addData(data, length); + } + + // We re-check here as the plugin can have been created + if (m_pluginView) { + if (!m_hasSentResponseToPlugin) { + m_pluginView->didReceiveResponse(loader->response()); + m_hasSentResponseToPlugin = true; + } + m_pluginView->didReceiveData(data, length); + } +} + +void FrameLoaderClientEfl::dispatchDidReplaceStateWithinPage() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidPushStateWithinPage() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidPopStateWithinPage() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidChangeBackForwardIndex() const +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidCancelAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest&, const ResourceResponse&) +{ + notImplemented(); +} + +bool FrameLoaderClientEfl::shouldUseCredentialStorage(DocumentLoader*, unsigned long) +{ + notImplemented(); + return false; +} + +void FrameLoaderClientEfl::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::postProgressStartedNotification() +{ + ewk_frame_load_started(m_frame); + postProgressEstimateChangedNotification(); +} + +void FrameLoaderClientEfl::postProgressEstimateChangedNotification() +{ + ewk_frame_load_progress_changed(m_frame); +} + +void FrameLoaderClientEfl::postProgressFinishedNotification() +{ + if (m_loadError.isNull()) + ewk_frame_load_finished(m_frame, 0, 0, 0, 0, 0); + else { + ewk_frame_load_finished(m_frame, + m_loadError.domain().utf8().data(), + m_loadError.errorCode(), + m_loadError.isCancellation(), + m_loadError.localizedDescription().utf8().data(), + m_loadError.failingURL().utf8().data()); + } +} + +void FrameLoaderClientEfl::frameLoaderDestroyed() +{ + if (m_frame) + ewk_frame_core_gone(m_frame); + m_frame = 0; + + delete this; +} + +void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader*, unsigned long, const ResourceResponse& response) +{ + m_response = response; + m_firstData = true; +} + +void FrameLoaderClientEfl::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String& MIMEType, const ResourceRequest&) +{ + // we need to call directly here (currently callPolicyFunction does that!) + ASSERT(function); + if (canShowMIMEType(MIMEType)) + callPolicyFunction(function, PolicyUse); + else + callPolicyFunction(function, PolicyDownload); +} + +void FrameLoaderClientEfl::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest&, PassRefPtr<FormState>, const String&) +{ + ASSERT(function); + ASSERT(m_frame); + // if not acceptNavigationRequest - look at Qt -> PolicyIgnore; + // FIXME: do proper check and only reset forms when on PolicyIgnore + Frame* f = ewk_frame_core_get(m_frame); + f->loader()->resetMultipleFormSubmissionProtection(); + callPolicyFunction(function, PolicyUse); +} + +void FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const NavigationAction& action, const ResourceRequest& resourceRequest, PassRefPtr<FormState>) +{ + ASSERT(function); + ASSERT(m_frame); + // if not acceptNavigationRequest - look at Qt -> PolicyIgnore; + // FIXME: do proper check and only reset forms when on PolicyIgnore + Frame* f = ewk_frame_core_get(m_frame); + f->loader()->resetMultipleFormSubmissionProtection(); + callPolicyFunction(function, PolicyUse); +} + +PassRefPtr<Widget> FrameLoaderClientEfl::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) +{ + ASSERT(m_frame); + ASSERT(m_view); + + return ewk_view_plugin_create(m_view, m_frame, pluginSize, + element, url, paramNames, paramValues, + mimeType, loadManually); +} + +PassRefPtr<Frame> FrameLoaderClientEfl::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) +{ + ASSERT(m_frame); + ASSERT(m_view); + + return ewk_view_frame_create(m_view, m_frame, name, ownerElement, url, referrer); +} + +void FrameLoaderClientEfl::didTransferChildFrameToNewDocument() +{ +} + +void FrameLoaderClientEfl::redirectDataToPlugin(Widget* pluginWidget) +{ + ASSERT(!m_pluginView); + m_pluginView = static_cast<PluginView*>(pluginWidget); + m_hasSentResponseToPlugin = false; +} + +PassRefPtr<Widget> FrameLoaderClientEfl::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, + const Vector<String>& paramNames, const Vector<String>& paramValues) +{ + notImplemented(); + return 0; +} + +ObjectContentType FrameLoaderClientEfl::objectContentType(const KURL& url, const String& mimeType) +{ + if (url.isEmpty() && mimeType.isEmpty()) + return ObjectContentNone; + + // We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure + String type = mimeType; + if (type.isEmpty()) + type = MIMETypeRegistry::getMIMETypeForExtension(url.path().substring(url.path().reverseFind('.') + 1)); + + if (type.isEmpty()) + return ObjectContentFrame; + + if (MIMETypeRegistry::isSupportedImageMIMEType(type)) + return ObjectContentImage; + +#if 0 // PluginDatabase is disabled until we have Plugin system done. + if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType)) + return ObjectContentNetscapePlugin; +#endif + + if (MIMETypeRegistry::isSupportedNonImageMIMEType(type)) + return ObjectContentFrame; + + if (url.protocol() == "about") + return ObjectContentFrame; + + return ObjectContentNone; +} + +String FrameLoaderClientEfl::overrideMediaType() const +{ + notImplemented(); + return String(); +} + +void FrameLoaderClientEfl::windowObjectCleared() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::documentElementAvailable() +{ + return; +} + +void FrameLoaderClientEfl::didPerformFirstNavigation() const +{ + notImplemented(); +} + +void FrameLoaderClientEfl::registerForIconNotification(bool) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::setMainFrameDocumentReady(bool) +{ + // this is only interesting once we provide an external API for the DOM +} + +bool FrameLoaderClientEfl::hasWebView() const +{ + // notImplemented(); + return true; +} + +bool FrameLoaderClientEfl::hasFrameView() const +{ + notImplemented(); + return true; +} + +void FrameLoaderClientEfl::dispatchDidFinishLoad() +{ + m_loadError = ResourceError(); /* clears previous error */ +} + +void FrameLoaderClientEfl::frameLoadCompleted() +{ + // Note: Can be called multiple times. +} + +void FrameLoaderClientEfl::saveViewStateToItem(HistoryItem*) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::restoreViewState() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::updateGlobalHistoryRedirectLinks() +{ +} + +bool FrameLoaderClientEfl::shouldGoToHistoryItem(HistoryItem* item) const +{ + // FIXME: This is a very simple implementation. More sophisticated + // implementation would delegate the decision to a PolicyDelegate. + // See mac implementation for example. + return item; +} + +void FrameLoaderClientEfl::didDisplayInsecureContent() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::didRunInsecureContent(SecurityOrigin*) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::makeRepresentation(DocumentLoader*) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::forceLayout() +{ + ewk_frame_force_layout(m_frame); +} + +void FrameLoaderClientEfl::forceLayoutForNonHTML() +{ +} + +void FrameLoaderClientEfl::setCopiesOnScroll() +{ + // apparently mac specific (Qt comment) +} + +void FrameLoaderClientEfl::detachedFromParent2() +{ +} + +void FrameLoaderClientEfl::detachedFromParent3() +{ +} + +void FrameLoaderClientEfl::loadedFromCachedPage() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidHandleOnloadEvents() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidReceiveServerRedirectForProvisionalLoad() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidCancelClientRedirect() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchWillPerformClientRedirect(const KURL&, double, double) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidChangeLocationWithinPage() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchWillClose() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidReceiveIcon() +{ +} + +void FrameLoaderClientEfl::dispatchDidStartProvisionalLoad() +{ +} + +void FrameLoaderClientEfl::dispatchDidReceiveTitle(const String& title) +{ + CString cs = title.utf8(); + ewk_frame_title_set(m_frame, cs.data()); + + if (ewk_view_frame_main_get(m_view) != m_frame) + return; + ewk_view_title_set(m_view, cs.data()); +} + +void FrameLoaderClientEfl::dispatchDidChangeIcons() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidCommitLoad() +{ + 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); +} + +void FrameLoaderClientEfl::dispatchDidFinishDocumentLoad() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidFirstLayout() +{ + // emit m_frame->initialLayoutCompleted(); + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidFirstVisuallyNonEmptyLayout() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchShow() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::cancelPolicyCheck() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidLoadMainResource(DocumentLoader*) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::revertToProvisionalState(DocumentLoader*) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::willChangeTitle(DocumentLoader*) +{ + // no need for, dispatchDidReceiveTitle is the right callback +} + +void FrameLoaderClientEfl::didChangeTitle(DocumentLoader *l) +{ + // no need for, dispatchDidReceiveTitle is the right callback +} + +bool FrameLoaderClientEfl::canHandleRequest(const ResourceRequest&) const +{ + notImplemented(); + return true; +} + +bool FrameLoaderClientEfl::canShowMIMEType(const String& MIMEType) const +{ + if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)) + return true; + + if (MIMETypeRegistry::isSupportedNonImageMIMEType(MIMEType)) + return true; + +#if 0 // PluginDatabase is disabled until we have Plugin system done. + if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(MIMEType)) + return true; +#endif + + return false; +} + +bool FrameLoaderClientEfl::representationExistsForURLScheme(const String&) const +{ + return false; +} + +String FrameLoaderClientEfl::generatedMIMETypeForURLScheme(const String&) const +{ + notImplemented(); + return String(); +} + +void FrameLoaderClientEfl::finishedLoading(DocumentLoader* loader) +{ + if (!m_pluginView) { + if (m_firstData) { + FrameLoader* fl = loader->frameLoader(); + fl->setEncoding(m_response.textEncodingName(), false); + m_firstData = false; + } + } else { + m_pluginView->didFinishLoading(); + m_pluginView = 0; + m_hasSentResponseToPlugin = false; + } +} + + +void FrameLoaderClientEfl::provisionalLoadStarted() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::didFinishLoad() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::prepareForDataSourceReplacement() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::setTitle(const String& title, const KURL& url) +{ + // no need for, dispatchDidReceiveTitle is the right callback +} + +void FrameLoaderClientEfl::dispatchDidReceiveContentLength(DocumentLoader*, unsigned long identifier, int lengthReceived) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError&) +{ + if (m_firstData) { + FrameLoader* fl = loader->frameLoader(); + fl->setEncoding(m_response.textEncodingName(), false); + m_firstData = false; + } + +} + +bool FrameLoaderClientEfl::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length) +{ + notImplemented(); + return false; +} + +void FrameLoaderClientEfl::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::dispatchDidFailProvisionalLoad(const ResourceError& err) +{ + dispatchDidFailLoad(err); +} + +void FrameLoaderClientEfl::dispatchDidFailLoad(const ResourceError& err) +{ + m_loadError = err; + ewk_frame_load_error(m_frame, + m_loadError.domain().utf8().data(), + m_loadError.errorCode(), m_loadError.isCancellation(), + m_loadError.localizedDescription().utf8().data(), + m_loadError.failingURL().utf8().data()); +} + +void FrameLoaderClientEfl::download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&) +{ + notImplemented(); +} + +// copied from WebKit/Misc/WebKitErrors[Private].h +enum { + WebKitErrorCannotShowMIMEType = 100, + WebKitErrorCannotShowURL = 101, + WebKitErrorFrameLoadInterruptedByPolicyChange = 102, + WebKitErrorCannotUseRestrictedPort = 103, + WebKitErrorCannotFindPlugIn = 200, + WebKitErrorCannotLoadPlugIn = 201, + WebKitErrorJavaUnavailable = 202, +}; + +ResourceError FrameLoaderClientEfl::cancelledError(const ResourceRequest& request) +{ + ResourceError error("Error", -999, request.url().prettyURL(), + "Request cancelled"); + error.setIsCancellation(true); + return error; +} + +ResourceError FrameLoaderClientEfl::blockedError(const ResourceRequest& request) +{ + return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(), + "Request blocked"); +} + +ResourceError FrameLoaderClientEfl::cannotShowURLError(const ResourceRequest& request) +{ + return ResourceError("Error", WebKitErrorCannotShowURL, request.url().string(), + "Cannot show URL"); +} + +ResourceError FrameLoaderClientEfl::interruptForPolicyChangeError(const ResourceRequest& request) +{ + return ResourceError("Error", WebKitErrorFrameLoadInterruptedByPolicyChange, + request.url().string(), "Frame load interruped by policy change"); +} + +ResourceError FrameLoaderClientEfl::cannotShowMIMETypeError(const ResourceResponse& response) +{ + return ResourceError("Error", WebKitErrorCannotShowMIMEType, response.url().string(), + "Cannot show mimetype"); +} + +ResourceError FrameLoaderClientEfl::fileDoesNotExistError(const ResourceResponse& response) +{ + return ResourceError("Error", -998 /* ### */, response.url().string(), + "File does not exist"); +} + +ResourceError FrameLoaderClientEfl::pluginWillHandleLoadError(const ResourceResponse&) +{ + notImplemented(); + return ResourceError("Error", 0, "", ""); +} + +bool FrameLoaderClientEfl::shouldFallBack(const ResourceError&) +{ + notImplemented(); + return false; +} + +bool FrameLoaderClientEfl::canCachePage() const +{ + return false; +} + +Frame* FrameLoaderClientEfl::dispatchCreatePage() +{ + notImplemented(); + return 0; +} + +void FrameLoaderClientEfl::dispatchUnableToImplementPolicy(const ResourceError&) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::setMainDocumentError(DocumentLoader* loader, const ResourceError& error) +{ + if (!m_pluginView) { + if (m_firstData) { + loader->frameLoader()->setEncoding(m_response.textEncodingName(), false); + m_firstData = false; + } + } else { + m_pluginView->didFail(error); + m_pluginView = 0; + m_hasSentResponseToPlugin = false; + } +} + +void FrameLoaderClientEfl::startDownload(const ResourceRequest&) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::updateGlobalHistory() +{ + notImplemented(); +} + +void FrameLoaderClientEfl::savePlatformDataToCachedFrame(CachedFrame*) +{ + notImplemented(); +} + +void FrameLoaderClientEfl::transitionToCommittedFromCachedFrame(CachedFrame*) +{ +} + +void FrameLoaderClientEfl::transitionToCommittedForNewPage() +{ + ASSERT(m_frame); + ASSERT(m_view); + ewk_frame_view_create_for_view(m_frame, m_view); +} + +} diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h new file mode 100644 index 0000000..47b5621 --- /dev/null +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h @@ -0,0 +1,219 @@ +/* + * Copyright (C) 2006 Zack Rusin <zack@kde.org> + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2008 Collabora Ltd. All rights reserved. + * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 FrameLoaderClientEfl_h +#define FrameLoaderClientEfl_h + +#include "EWebKit.h" +#include "FrameLoaderClient.h" +#include "PluginView.h" +#include "ResourceResponse.h" + +namespace WebCore { + +class FormState; + +class FrameLoaderClientEfl : public FrameLoaderClient { + public: + explicit FrameLoaderClientEfl(Evas_Object *view); + virtual ~FrameLoaderClientEfl() { } + virtual void frameLoaderDestroyed(); + + void setWebFrame(Evas_Object *frame) { m_frame = frame; } + Evas_Object* webFrame() const { return m_frame; } + Evas_Object* webView() const { return m_view; } + + void setCustomUserAgent(const String &agent); + const String& customUserAgent() const; + + virtual bool hasWebView() const; + virtual bool hasFrameView() const; + + void callPolicyFunction(FramePolicyFunction function, PolicyAction action); + + virtual void makeRepresentation(DocumentLoader*); + virtual void forceLayout(); + virtual void forceLayoutForNonHTML(); + + virtual void setCopiesOnScroll(); + + virtual void detachedFromParent2(); + virtual void detachedFromParent3(); + + virtual void loadedFromCachedPage(); + + virtual void assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&); + + virtual void dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse); + virtual bool shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier); + virtual void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&); + + virtual void dispatchDidPushStateWithinPage(); + virtual void dispatchDidPopStateWithinPage(); + virtual void dispatchDidReplaceStateWithinPage(); + virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; + virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; + virtual void dispatchDidChangeBackForwardIndex() const; + virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*); + + virtual void dispatchDidCancelAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&); + virtual void dispatchDidReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&); + virtual void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long identifier, int lengthReceived); + virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier); + virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&); + virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length); + virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString& sourceString); + + virtual void dispatchDidHandleOnloadEvents(); + virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); + virtual void dispatchDidCancelClientRedirect(); + virtual void dispatchWillPerformClientRedirect(const KURL&, double, double); + virtual void dispatchDidChangeLocationWithinPage(); + virtual void dispatchWillClose(); + virtual void dispatchDidReceiveIcon(); + virtual void dispatchDidStartProvisionalLoad(); + virtual void dispatchDidReceiveTitle(const String&); + virtual void dispatchDidChangeIcons(); + virtual void dispatchDidCommitLoad(); + virtual void dispatchDidFailProvisionalLoad(const ResourceError&); + virtual void dispatchDidFailLoad(const ResourceError&); + virtual void dispatchDidFinishDocumentLoad(); + virtual void dispatchDidFinishLoad(); + virtual void dispatchDidFirstLayout(); + virtual void dispatchDidFirstVisuallyNonEmptyLayout(); + + virtual Frame* dispatchCreatePage(); + virtual void dispatchShow(); + + virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String& MIMEType, const ResourceRequest&); + virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, WTF::PassRefPtr<FormState>, const String& frameName); + virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, WTF::PassRefPtr<FormState>); + virtual void cancelPolicyCheck(); + + virtual void dispatchUnableToImplementPolicy(const ResourceError&); + + virtual void dispatchWillSubmitForm(FramePolicyFunction, WTF::PassRefPtr<FormState>); + + virtual void dispatchDidLoadMainResource(DocumentLoader*); + virtual void revertToProvisionalState(DocumentLoader*); + virtual void setMainDocumentError(DocumentLoader*, const ResourceError&); + + virtual void postProgressStartedNotification(); + virtual void postProgressEstimateChangedNotification(); + virtual void postProgressFinishedNotification(); + + virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, + const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); + virtual void didTransferChildFrameToNewDocument(); + + virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const WTF::Vector<String>&, const WTF::Vector<String>&, const String&, bool); + virtual void redirectDataToPlugin(Widget* pluginWidget); + virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues); + virtual String overrideMediaType() const; + virtual void windowObjectCleared(); + virtual void documentElementAvailable(); + + virtual void didPerformFirstNavigation() const; + + virtual void registerForIconNotification(bool); + + virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType); + + virtual void setMainFrameDocumentReady(bool); + + virtual void startDownload(const ResourceRequest&); + + virtual void willChangeTitle(DocumentLoader*); + virtual void didChangeTitle(DocumentLoader*); + + virtual void committedLoad(DocumentLoader*, const char*, int); + virtual void finishedLoading(DocumentLoader*); + + virtual void updateGlobalHistory(); + virtual void updateGlobalHistoryRedirectLinks(); + virtual bool shouldGoToHistoryItem(HistoryItem*) const; + virtual void didDisplayInsecureContent(); + virtual void didRunInsecureContent(SecurityOrigin*); + + virtual ResourceError cancelledError(const ResourceRequest&); + virtual ResourceError blockedError(const ResourceRequest&); + virtual ResourceError cannotShowURLError(const ResourceRequest&); + virtual ResourceError interruptForPolicyChangeError(const ResourceRequest&); + + virtual ResourceError cannotShowMIMETypeError(const ResourceResponse&); + virtual ResourceError fileDoesNotExistError(const ResourceResponse&); + virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&); + + virtual bool shouldFallBack(const ResourceError&); + + virtual bool canHandleRequest(const ResourceRequest&) const; + virtual bool canShowMIMEType(const String&) const; + virtual bool representationExistsForURLScheme(const String&) const; + virtual String generatedMIMETypeForURLScheme(const String&) const; + + virtual void frameLoadCompleted(); + virtual void saveViewStateToItem(HistoryItem*); + virtual void restoreViewState(); + virtual void provisionalLoadStarted(); + virtual void didFinishLoad(); + virtual void prepareForDataSourceReplacement(); + + virtual WTF::PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&); + virtual void setTitle(const String& title, const KURL&); + + virtual String userAgent(const KURL&); + + virtual void savePlatformDataToCachedFrame(CachedFrame*); + virtual void transitionToCommittedFromCachedFrame(CachedFrame*); + virtual void transitionToCommittedForNewPage(); + + virtual bool canCachePage() const; + virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&); + private: + Evas_Object *m_view; + Evas_Object *m_frame; + + ResourceResponse m_response; + bool m_firstData; + String m_userAgent; + String m_customUserAgent; + + ResourceError m_loadError; + + // Plugin view to redirect data to + PluginView* m_pluginView; + bool m_hasSentResponseToPlugin; +}; + +} + +#endif // FrameLoaderClientEfl_h diff --git a/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp b/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp new file mode 100644 index 0000000..8892d7f --- /dev/null +++ b/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" +#include "InspectorClientEfl.h" + +#include "NotImplemented.h" +#include "PlatformString.h" + +using namespace WebCore; + +namespace WebCore { + +void InspectorClientEfl::inspectorDestroyed() +{ + delete this; +} + +void InspectorClientEfl::openInspectorFrontend(InspectorController*) +{ + notImplemented(); +} + +void InspectorClientEfl::highlight(Node* node) +{ + notImplemented(); +} + +void InspectorClientEfl::hideHighlight() +{ + notImplemented(); +} + +void InspectorClientEfl::populateSetting(const String&, String*) +{ + notImplemented(); +} + +void InspectorClientEfl::storeSetting(const String&, const String&) +{ + notImplemented(); +} + +} diff --git a/WebKit/efl/WebCoreSupport/InspectorClientEfl.h b/WebKit/efl/WebCoreSupport/InspectorClientEfl.h new file mode 100644 index 0000000..30c9caf --- /dev/null +++ b/WebKit/efl/WebCoreSupport/InspectorClientEfl.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia + * Copyright (C) 2009-2010 ProFUSION embedded systems + * Copyright (C) 2009-2010 Samsung Electronics + * + * 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 InspectorClientEfl_h +#define InspectorClientEfl_h + +#include "InspectorClient.h" + +namespace WebCore { +class Node; +class Page; +class String; + +class InspectorClientEfl : public WebCore::InspectorClient { +public: + virtual void inspectorDestroyed(); + + virtual void openInspectorFrontend(InspectorController*); + + virtual void highlight(Node*); + virtual void hideHighlight(); + + virtual void populateSetting(const String& key, String* value); + virtual void storeSetting(const String& key, const String& value); +}; +} + +#endif // InspectorClientEfl_h diff --git a/WebKit/efl/ewebkit.pc.in b/WebKit/efl/ewebkit.pc.in new file mode 100644 index 0000000..24f66e8 --- /dev/null +++ b/WebKit/efl/ewebkit.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: WebKit-EFL +Description: Web content engine for EFL applications +Version: @VERSION@ +Requires: cairo evas ecore +Libs: -L${libdir} -lewebkit +Cflags: -I${includedir}/EWebKit diff --git a/WebKit/efl/ewk/EWebKit.h b/WebKit/efl/ewk/EWebKit.h new file mode 100644 index 0000000..d87d204 --- /dev/null +++ b/WebKit/efl/ewk/EWebKit.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2008-2009 INdT - Instituto Nokia de Tecnologia + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef EWebKit_h +#define EWebKit_h + +#include "ewk_eapi.h" +#include "ewk_frame.h" +#include "ewk_history.h" +#include "ewk_main.h" +#include "ewk_settings.h" +#include "ewk_view.h" + +#include <Evas.h> + +#endif // EWebKit_h diff --git a/WebKit/efl/ewk/ewk_eapi.h b/WebKit/efl/ewk/ewk_eapi.h new file mode 100644 index 0000000..adb8d7b --- /dev/null +++ b/WebKit/efl/ewk/ewk_eapi.h @@ -0,0 +1,50 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ewk_eapi_h +#define ewk_eapi_h + +#ifdef EAPI +# undef EAPI +#endif + +#ifdef _WIN32 +# ifdef BUILDING_WEBKIT +# ifdef DLL_EXPORT +# define EAPI __declspec(dllexport) +# else +# define EAPI +# endif /* ! DLL_EXPORT */ +# else +# define EAPI __declspec(dllimport) +# endif /* ! EFL_EINA_BUILD */ +#else +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EAPI __attribute__ ((visibility("default"))) +# else +# define EAPI +# endif +# else +# define EAPI +# endif +#endif + +#endif // ewk_eapi_h diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp new file mode 100644 index 0000000..73d1d29 --- /dev/null +++ b/WebKit/efl/ewk/ewk_frame.cpp @@ -0,0 +1,1844 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +// Uncomment to view frame regions and debug messages +// #define EWK_FRAME_DEBUG + +#include "config.h" +#include "ewk_frame.h" + +#include "EWebKit.h" +#include "EventHandler.h" +#include "FocusController.h" +#include "FrameLoaderClientEfl.h" +#include "FrameTree.h" +#include "FrameView.h" +#include "HTMLPlugInElement.h" +#include "HitTestResult.h" +#include "KURL.h" +#include "PlatformKeyboardEvent.h" +#include "PlatformMouseEvent.h" +#include "PlatformWheelEvent.h" +#include "ProgressTracker.h" +#include "RefPtr.h" +#include "RenderTheme.h" +#include "ResourceRequest.h" +#include "ScriptValue.h" +#include "SharedBuffer.h" +#include "SubstituteData.h" +#include "WindowsKeyboardCodes.h" +#include "ewk_private.h" +#include <wtf/text/CString.h> + +#include <Eina.h> +#include <Evas.h> +#include <eina_safety_checks.h> + +static const char EWK_FRAME_TYPE_STR[] = "EWK_Frame"; + +struct Ewk_Frame_Smart_Data { + Evas_Object_Smart_Clipped_Data base; + Evas_Object* self; + Evas_Object* view; +#ifdef EWK_FRAME_DEBUG + Evas_Object* region; +#endif + WebCore::Frame* frame; + const char* theme; + const char* title; + const char* uri; + const char* name; + struct { + Evas_Coord w, h; + } contents_size; + Eina_Bool zoom_text_only:1; + Eina_Bool editable:1; +}; + +struct Eina_Iterator_Ewk_Frame { + Eina_Iterator base; + Evas_Object* obj; + WebCore::Frame* last; +}; + +#ifndef EWK_TYPE_CHECK +#define EWK_FRAME_TYPE_CHECK(o, ...) do { } while (0) +#else +#define EWK_FRAME_TYPE_CHECK(o, ...) \ + do { \ + const char* _tmp_otype = evas_object_type_get(o); \ + if (EINA_UNLIKELY(_tmp_otype != EWK_FRAME_TYPE_STR)) { \ + EINA_LOG_CRIT \ + ("%p (%s) is not of an ewk_frame!", o, \ + _tmp_otype ? _tmp_otype : "(null)"); \ + return __VA_ARGS__; \ + } \ + } while (0) +#endif + +#define EWK_FRAME_SD_GET(o, ptr) \ + Ewk_Frame_Smart_Data* ptr = (Ewk_Frame_Smart_Data*)evas_object_smart_data_get(o) + +#define EWK_FRAME_SD_GET_OR_RETURN(o, ptr, ...) \ + EWK_FRAME_TYPE_CHECK(o, __VA_ARGS__); \ + EWK_FRAME_SD_GET(o, ptr); \ + if (!ptr) { \ + CRITICAL("no smart data for object %p (%s)", \ + o, evas_object_type_get(o)); \ + return __VA_ARGS__; \ + } + +static Evas_Smart_Class _parent_sc = EVAS_SMART_CLASS_INIT_NULL; + +#ifdef EWK_FRAME_DEBUG +static inline void _ewk_frame_debug(Evas_Object* o) +{ + Evas_Object* clip, *parent; + Evas_Coord x, y, w, h, cx, cy, cw, ch; + int r, g, b, a, cr, cg, cb, ca; + + evas_object_color_get(o, &r, &g, &b, &a); + evas_object_geometry_get(o, &x, &y, &w, &h); + + clip = evas_object_clip_get(o); + evas_object_color_get(clip, &cr, &cg, &cb, &ca); + evas_object_geometry_get(clip, &cx, &cy, &cw, &ch); + + fprintf(stderr, "%p: type=%s name=%s, visible=%d, color=%02x%02x%02x%02x, %d,%d+%dx%d, clipper=%p (%d, %02x%02x%02x%02x, %d,%d+%dx%d)\n", + o, evas_object_type_get(o), evas_object_name_get(o), evas_object_visible_get(o), + r, g, b, a, x, y, w, h, + clip, evas_object_visible_get(clip), cr, cg, cb, ca, cx, cy, cw, ch); + parent = evas_object_smart_parent_get(o); + if (!parent) + fprintf(stderr, "\n"); + else + _ewk_frame_debug(parent); +} +#endif + +static WebCore::FrameLoaderClientEfl* _ewk_frame_loader_efl_get(WebCore::Frame* frame) +{ + return static_cast<WebCore::FrameLoaderClientEfl*>(frame->loader()->client()); +} + +static inline Evas_Object* kit(WebCore::Frame* frame) +{ + if (!frame) + return 0; + WebCore::FrameLoaderClientEfl* fl = _ewk_frame_loader_efl_get(frame); + if (!fl) + return 0; + return fl->webFrame(); +} + +static Eina_Bool _ewk_frame_children_iterator_next(Eina_Iterator_Ewk_Frame* it, Evas_Object** data) +{ + EWK_FRAME_SD_GET_OR_RETURN(it->obj, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + + WebCore::FrameTree* tree = sd->frame->tree(); // check if it's still valid + EINA_SAFETY_ON_NULL_RETURN_VAL(tree, EINA_FALSE); + + WebCore::Frame* frame; + if (it->last) + frame = it->last->tree()->nextSibling(); + else + frame = tree->firstChild(); + + if (!frame) + return EINA_FALSE; + + *data = kit(frame); + return EINA_TRUE; +} + +static Evas_Object* _ewk_frame_children_iterator_get_container(Eina_Iterator_Ewk_Frame* it) +{ + return it->obj; +} + +static void _ewk_frame_smart_add(Evas_Object* o) +{ + EWK_FRAME_SD_GET(o, sd); + + if (!sd) { + sd = (Ewk_Frame_Smart_Data*)calloc(1, sizeof(Ewk_Frame_Smart_Data)); + if (!sd) + CRITICAL("could not allocate Ewk_Frame_Smart_Data"); + else + evas_object_smart_data_set(o, sd); + } + + sd->self = o; + + _parent_sc.add(o); + evas_object_move(sd->base.clipper, 0, 0); + evas_object_resize(sd->base.clipper, 0, 0); + +#ifdef EWK_FRAME_DEBUG + sd->region = evas_object_rectangle_add(sd->base.evas); + static int i = 0; + switch (i) { + case 0: + evas_object_color_set(sd->region, 128, 0, 0, 128); + break; + case 1: + evas_object_color_set(sd->region, 0, 128, 0, 128); + break; + case 2: + evas_object_color_set(sd->region, 0, 0, 128, 128); + break; + case 3: + evas_object_color_set(sd->region, 128, 0, 0, 128); + break; + case 4: + evas_object_color_set(sd->region, 128, 128, 0, 128); + break; + case 5: + evas_object_color_set(sd->region, 128, 0, 128, 128); + break; + case 6: + evas_object_color_set(sd->region, 0, 128, 128, 128); + break; + default: + break; + } + i++; + if (i > 6) + i = 0; + + evas_object_smart_member_add(sd->region, o); + evas_object_hide(sd->region); +#endif +} + +static void _ewk_frame_smart_del(Evas_Object* o) +{ + WRN("o=%p", o); // XXX REMOVE ME LATER + EWK_FRAME_SD_GET(o, sd); + + if (sd) { + if (sd->frame) { + WebCore::FrameLoaderClientEfl* flc = _ewk_frame_loader_efl_get(sd->frame); + flc->setWebFrame(0); + sd->frame->loader()->cancelAndClear(); + sd->frame = 0; + } + + eina_stringshare_del(sd->title); + eina_stringshare_del(sd->uri); + eina_stringshare_del(sd->name); + } + + _parent_sc.del(o); +} + +static void _ewk_frame_smart_resize(Evas_Object* o, Evas_Coord w, Evas_Coord h) +{ + EWK_FRAME_SD_GET(o, sd); + evas_object_resize(sd->base.clipper, w, h); + +#ifdef EWK_FRAME_DEBUG + evas_object_resize(sd->region, w, h); + Evas_Coord x, y; + evas_object_geometry_get(sd->region, &x, &y, &w, &h); + INF("region=%p, visible=%d, geo=%d,%d + %dx%d", + sd->region, evas_object_visible_get(sd->region), x, y, w, h); + _ewk_frame_debug(o); +#endif +} + +static void _ewk_frame_smart_set(Evas_Smart_Class* api) +{ + evas_object_smart_clipped_smart_set(api); + api->add = _ewk_frame_smart_add; + api->del = _ewk_frame_smart_del; + api->resize = _ewk_frame_smart_resize; +} + +static inline Evas_Smart* _ewk_frame_smart_class_new(void) +{ + static Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION(EWK_FRAME_TYPE_STR); + static Evas_Smart* smart = 0; + + if (EINA_UNLIKELY(!smart)) { + evas_object_smart_clipped_smart_set(&_parent_sc); + _ewk_frame_smart_set(&sc); + smart = evas_smart_class_new(&sc); + } + + return smart; +} + +/** + * @internal + * + * Creates a new EFL WebKit Frame object. + * + * Frames are low level entries contained in a page that is contained + * by a view. Usually one operates on the view and not directly on the + * frame. + * + * @param e canvas where to create the frame object. + * + * @return frame object or @c NULL if errors. + */ +Evas_Object* ewk_frame_add(Evas* e) +{ + return evas_object_smart_add(e, _ewk_frame_smart_class_new()); +} + +/** + * Retrieves the ewk_view object that owns this frame. + * + * @param o frame object to get view from. + * + * @return view object or @c NULL if errors. + */ +Evas_Object* ewk_frame_view_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + return sd->view; +} + +/** + * Set the theme path to be used by this frame. + * + * Frames inherit theme from their parent, this will have all frames + * with unset theme to use this one. + * + * @param o frame object to change theme. + * @param path theme path, may be @c NULL to reset to default or inherit parent. + */ +void ewk_frame_theme_set(Evas_Object* o, const char* path) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + if (!eina_stringshare_replace(&sd->theme, path)) + return; + if (sd->frame && sd->frame->view()) { + sd->frame->view()->setEdjeTheme(WebCore::String(path)); + sd->frame->page()->theme()->themeChanged(); + } +} + +/** + * Gets the immediate theme set on this frame. + * + * This returns the value set by ewk_frame_theme_set(). Note that if + * it is @c NULL, the frame will inherit parent's theme. + * + * @param o frame object to get theme path. + * + * @return theme path, may be @c NULL if not set. + */ +const char* ewk_frame_theme_get(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + return sd->theme; +} + +/** + * Returns a new iterator over all direct children frames. + * + * Keep frame object intact while iteration happens otherwise frame + * may be destroyed while iterated. + * + * Iteration results are Evas_Object*, so give eina_iterator_next() a + * pointer to it. + * + * @return a newly allocated iterator, free using + * eina_iterator_free(). If not possible to create the + * iterator, @c NULL is returned. + */ +Eina_Iterator* ewk_frame_children_iterator_new(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + Eina_Iterator_Ewk_Frame* it = (Eina_Iterator_Ewk_Frame*) + calloc(1, sizeof(Eina_Iterator_Ewk_Frame)); + if (!it) + return 0; + + EINA_MAGIC_SET(&it->base, EINA_MAGIC_ITERATOR); + it->base.next = FUNC_ITERATOR_NEXT(_ewk_frame_children_iterator_next); + it->base.get_container = FUNC_ITERATOR_GET_CONTAINER(_ewk_frame_children_iterator_get_container); + it->base.free = FUNC_ITERATOR_FREE(free); + it->obj = o; + return &it->base; +} + +/** + * Finds a child frame by its name, recursively. + * + * For pre-defined names, returns @a o if @a name is "_self" or + * "_current", returns @a o's parent frame if @a name is "_parent", + * and returns the main frame if @a name is "_top". Also returns @a o + * if it is the main frame and @a name is either "_parent" or + * "_top". For other names, this function returns the first frame that + * matches @a name. This function searches @a o and its descendents + * first, then @a o's parent and its children moving up the hierarchy + * until a match is found. If no match is found in @a o's hierarchy, + * this function will search for a matching frame in other main frame + * hierarchies. + * + * @return object if found, @c NULL if nothing with that name. + */ +Evas_Object* ewk_frame_child_find(Evas_Object* o, const char* name) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(name, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, 0); + WebCore::String s = WebCore::String::fromUTF8(name); + return kit(sd->frame->tree()->find(WebCore::AtomicString(s))); +} + +/** + * Ask main frame to load the given URI. + * + * @param o frame object to load uri. + * @param uri uniform resource identifier to load. + */ +Eina_Bool ewk_frame_uri_set(Evas_Object* o, const char* uri) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + WebCore::KURL kurl(WebCore::KURL(), WebCore::String::fromUTF8(uri)); + WebCore::ResourceRequest req(kurl); + WebCore::FrameLoader* loader = sd->frame->loader(); + loader->load(req, false); + return EINA_TRUE; +} + +/** + * Gets the uri of this frame. + * + * @param o frame object to get uri. + * + * @return frame uri or @c NULL. It's a internal string and should + * not be modified. The string is guaranteed to be stringshared. + */ +const char* ewk_frame_uri_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + return sd->uri; +} + +/** + * Gets the title of this frame. + * + * @param o frame object to get title. + * + * @return frame title or @c NULL. It's a internal string and should + * not be modified. The string is guaranteed to be stringshared. + */ +const char* ewk_frame_title_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + return sd->title; +} + +/** + * Gets the name of this frame. + * + * @param o frame object to get name. + * + * @return frame name or @c NULL. It's a internal string and should + * not be modified. The string is guaranteed to be stringshared. + */ +const char* ewk_frame_name_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + + if (sd->name) + return sd->name; + + if (!sd->frame) { + ERR("could not get name of uninitialized frame."); + return 0; + } + + WebCore::String s = sd->frame->tree()->name(); + WTF::CString cs = s.utf8(); + sd->name = eina_stringshare_add_length(cs.data(), cs.length()); + return sd->name; +} + +/** + * Get last known contents size. + * + * @param o frame object to get contents size. + * @param w where to store contents size width. May be @c NULL. + * @param h where to store contents size height. May be @c NULL. + * + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure and + * @a w and @a h will be zeroed. + */ +Eina_Bool ewk_frame_contents_size_get(const Evas_Object* o, Evas_Coord* w, Evas_Coord* h) +{ + if (w) + *w = 0; + if (h) + *h = 0; + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + if (w) + *w = sd->contents_size.w; + if (h) + *h = sd->contents_size.h; + return EINA_TRUE; +} + +static Eina_Bool _ewk_frame_contents_set_internal(Ewk_Frame_Smart_Data *sd, const char* contents, size_t contents_size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri) +{ + if (contents_size < 1) + contents_size = strlen(contents); + if (!mime_type) + mime_type = "text/html"; + if (!encoding) + encoding = "UTF-8"; + if (!base_uri) + base_uri = "about:blank"; + + WebCore::KURL baseKURL(WebCore::KURL(), WebCore::String::fromUTF8(base_uri)); + WebCore::KURL unreachableKURL; + if (unreachable_uri) + unreachableKURL = WebCore::KURL(WebCore::KURL(), WebCore::String::fromUTF8(unreachable_uri)); + else + unreachableKURL = WebCore::KURL(); + + WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(contents, contents_size); + WebCore::SubstituteData substituteData + (buffer.release(), + WebCore::String::fromUTF8(mime_type), + WebCore::String::fromUTF8(encoding), + baseKURL, unreachableKURL); + WebCore::ResourceRequest request(baseKURL); + + sd->frame->loader()->load(request, substituteData, false); + return EINA_TRUE; +} + +/** + * Requests loading the given contents in this frame. + * + * @param o frame object to load document. + * @param contents what to load into frame. Must not be @c NULL. + * @param contents_size byte size of data in @a contents. + * If zero, strlen() is used. + * @param mime_type type of @a contents data. If @c NULL "text/html" is assumed. + * @param encoding used for @a contents data. If @c NULL "UTF-8" is assumed. + * @param base_uri base uri to use for relative resources. May be @c NULL. + * If provided must be an absolute uri. + * + * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors. + */ +Eina_Bool ewk_frame_contents_set(Evas_Object* o, const char* contents, size_t contents_size, const char* mime_type, const char* encoding, const char* base_uri) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(contents, EINA_FALSE); + return _ewk_frame_contents_set_internal + (sd, contents, contents_size, mime_type, encoding, base_uri, 0); +} + +/** + * Requests loading alternative contents for unreachable URI in this frame. + * + * This is similar to ewk_frame_contents_set(), but is used when some + * URI failed to load, using the provided content instead. The main + * difference is that back-forward navigation list is not changed. + * + * @param o frame object to load document. + * @param contents what to load into frame. Must not be @c NULL. + * @param contents_size byte size of data in @a contents. + * If zero, strlen() is used. + * @param mime_type type of @a contents data. If @c NULL "text/html" is assumed. + * @param encoding used for @a contents data. If @c NULL "UTF-8" is assumed. + * @param base_uri base uri to use for relative resources. May be @c NULL. + * If provided must be an absolute uri. + * @param unreachable_uri the URI that failed to load and is getting the + * alternative representation. + * + * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors. + */ +Eina_Bool ewk_frame_contents_alternate_set(Evas_Object* o, const char* contents, size_t contents_size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(contents, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(unreachable_uri, EINA_FALSE); + return _ewk_frame_contents_set_internal + (sd, contents, contents_size, mime_type, encoding, base_uri, + unreachable_uri); +} + +/** + * Requests execution of given script. + * + * @param o frame object to execute script. + * @param script java script to execute. + * + * @return @c EINA_TRUE if request was done, @c EINA_FALSE on errors. + */ +Eina_Bool ewk_frame_script_execute(Evas_Object* o, const char* script) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(script, EINA_FALSE); + sd->frame->script()->executeScript(WebCore::String::fromUTF8(script), true); + return EINA_TRUE; +} + +/** + * Gets if frame is editable. + * + * @param o frame object to get editable state. + * + * @return @c EINA_TRUE if editable, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_editable_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + return sd->editable; +} + +/** + * Sets if frame is editable. + * + * @param o frame object to set editable state. + * @param editable new state. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_editable_set(Evas_Object* o, Eina_Bool editable) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + editable = !!editable; + if (sd->editable == editable) + return EINA_TRUE; + if (editable) + sd->frame->applyEditingStyleToBodyElement(); + else + sd->frame->removeEditingStyleFromBodyElement(); + return EINA_TRUE; +} + +/** + * Get the copy of the selection text. + * + * @param o frame object to get selection text. + * + * @return newly allocated string or @c NULL if nothing is selected or failure. + */ +char* ewk_frame_selection_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, 0); + WTF::CString s = sd->frame->selectedText().utf8(); + if (s.isNull()) + return 0; + return strdup(s.data()); +} + +static inline Eina_Bool _ewk_frame_editor_command(Ewk_Frame_Smart_Data* sd, const char* command) +{ + return sd->frame->editor()->command(WebCore::String::fromUTF8(command)).execute(); +} + +/** + * Unselects whatever was selected. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_select_none(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + return _ewk_frame_editor_command(sd, "Unselect"); +} + +/** + * Selects everything. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_select_all(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + return _ewk_frame_editor_command(sd, "SelectAll"); +} + +/** + * Selects the current paragrah. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_select_paragraph(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + return _ewk_frame_editor_command(sd, "SelectParagraph"); +} + +/** + * Selects the current sentence. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_select_sentence(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + return _ewk_frame_editor_command(sd, "SelectSentence"); +} + +/** + * Selects the current line. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_select_line(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + return _ewk_frame_editor_command(sd, "SelectLine"); +} + +/** + * Selects the current word. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_select_word(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + return _ewk_frame_editor_command(sd, "SelectWord"); +} + +/** + * Search the given text string in document. + * + * @param o frame object where to search text. + * @param string reference string to search. + * @param case_sensitive if search should be case sensitive or not. + * @param forward if search is from cursor and on or backwards. + * @param wrap if search should wrap at end. + * + * @return @c EINA_TRUE if found, @c EINA_FALSE if not or failure. + */ +Eina_Bool ewk_frame_text_search(const Evas_Object* o, const char* string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(string, EINA_FALSE); + + return sd->frame->findString(WebCore::String::fromUTF8(string), forward, case_sensitive, wrap, true); +} + +/** + * Mark matches the given text string in document. + * + * @param o frame object where to search text. + * @param string reference string to match. + * @param case_sensitive if match should be case sensitive or not. + * @param highlight if matches should be highlighted. + * @param limit maximum amount of matches, or zero to unlimited. + * + * @return number of matches. + */ +unsigned int ewk_frame_text_matches_mark(Evas_Object* o, const char* string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(string, 0); + + sd->frame->setMarkedTextMatchesAreHighlighted(highlight); + return sd->frame->markAllMatchesForText(WebCore::String::fromUTF8(string), case_sensitive, limit); +} + +/** + * Reverses the effect of ewk_frame_text_matches_mark() + * + * @param o frame object where to search text. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE for failure. + */ +Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + + sd->frame->document()->removeMarkers(WebCore::DocumentMarker::TextMatch); + return EINA_TRUE; +} + +/** + * Set if should highlight matches marked with ewk_frame_text_matches_mark(). + * + * @param o frame object where to set if matches are highlighted or not. + * @param highlight if @c EINA_TRUE, matches will be highlighted. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE for failure. + */ +Eina_Bool ewk_frame_text_matches_highlight_set(Evas_Object* o, Eina_Bool highlight) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + sd->frame->setMarkedTextMatchesAreHighlighted(highlight); + return EINA_TRUE; +} + +/** + * Get if should highlight matches marked with ewk_frame_text_matches_mark(). + * + * @param o frame object to query if matches are highlighted or not. + * + * @return @c EINA_TRUE if they are highlighted, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + return sd->frame->markedTextMatchesAreHighlighted(); +} + +/** + * Ask frame to stop loading. + * + * @param o frame object to stop loading. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_stop(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + sd->frame->loader()->stopAllLoaders(); + return EINA_TRUE; +} + +/** + * Ask frame to reload current document. + * + * @param o frame object to reload. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_frame_reload_full() + */ +Eina_Bool ewk_frame_reload(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + sd->frame->loader()->reload(); + return EINA_TRUE; +} + +/** + * Ask frame to fully reload current document, using no previous caches. + * + * @param o frame object to reload. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_reload_full(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + sd->frame->loader()->reload(true); + return EINA_TRUE; +} + +/** + * Ask frame to navigate back in history. + * + * @param o frame object to navigate back. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_frame_navigate() + */ +Eina_Bool ewk_frame_back(Evas_Object* o) +{ + return ewk_frame_navigate(o, -1); +} + +/** + * Ask frame to navigate forward in history. + * + * @param o frame object to navigate forward. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_frame_navigate() + */ +Eina_Bool ewk_frame_forward(Evas_Object* o) +{ + return ewk_frame_navigate(o, 1); +} + +/** + * Navigate back or forward in history. + * + * @param o frame object to navigate. + * @param steps if positive navigates that amount forwards, if negative + * does backwards. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_navigate(Evas_Object* o, int steps) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + WebCore::Page* page = sd->frame->page(); + if (!page->canGoBackOrForward(steps)) + return EINA_FALSE; + page->goBackOrForward(steps); + return EINA_TRUE; +} + +/** + * Check if it is possible to navigate backwards one item in history. + * + * @param o frame object to check if backward navigation is possible. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise. + * + * @see ewk_frame_navigate_possible() + */ +Eina_Bool ewk_frame_back_possible(Evas_Object* o) +{ + return ewk_frame_navigate_possible(o, -1); +} + +/** + * Check if it is possible to navigate forwards one item in history. + * + * @param o frame object to check if forward navigation is possible. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise. + * + * @see ewk_frame_navigate_possible() + */ +Eina_Bool ewk_frame_forward_possible(Evas_Object* o) +{ + return ewk_frame_navigate_possible(o, 1); +} + +/** + * Check if it is possible to navigate given @a steps in history. + * + * @param o frame object to navigate. + * @param steps if positive navigates that amount forwards, if negative + * does backwards. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_navigate_possible(Evas_Object* o, int steps) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + WebCore::Page* page = sd->frame->page(); + return page->canGoBackOrForward(steps); +} + +/** + * Get current zoom level used by this frame. + * + * @param o frame object to query zoom level. + * + * @return zoom level or -1.0 on failure. + */ +float ewk_frame_zoom_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, -1.0); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, -1.0); + return sd->frame->zoomFactor(); +} + +/** + * Set current zoom level used by this frame. + * + * @param o frame object to change zoom level. + * @param zoom new level. + * + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. + * + * @see ewk_frame_zoom_text_only_set() + */ +Eina_Bool ewk_frame_zoom_set(Evas_Object* o, float zoom) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + sd->frame->setZoomFactor(zoom, sd->zoom_text_only); + return EINA_TRUE; +} + +/** + * Query if zoom level just applies to text and not other elements. + * + * @param o frame to query setting. + * + * @return @c EINA_TRUE if just text are scaled, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_zoom_text_only_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return sd->zoom_text_only; +} + +/** + * Set if zoom level just applies to text and not other elements. + * + * @param o frame to change setting. + * @param setting @c EINA_TRUE if zoom should just be applied to text. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_zoom_text_only_set(Evas_Object* o, Eina_Bool setting) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + setting = !!setting; + if (sd->zoom_text_only == setting) + return EINA_TRUE; + + sd->zoom_text_only = setting; + sd->frame->setZoomFactor(sd->frame->zoomFactor(), setting); + return EINA_TRUE; +} + +/** + * Free hit test created with ewk_frame_hit_test_new(). + * + * @param hit_test instance. Must @b not be @c NULL. + */ +void ewk_frame_hit_test_free(Ewk_Hit_Test* hit_test) +{ + EINA_SAFETY_ON_NULL_RETURN(hit_test); + eina_stringshare_del(hit_test->title); + eina_stringshare_del(hit_test->alternate_text); + eina_stringshare_del(hit_test->link.text); + eina_stringshare_del(hit_test->link.url); + eina_stringshare_del(hit_test->link.title); + free(hit_test); +} + +/** + * Creates a new hit test for given frame and point. + * + * @param o frame to do hit test on. + * @param x horizontal position to query. + * @param y vertical position to query. + * + * @return a newly allocated hit test on success, @c NULL otherwise. + * Free memory with ewk_frame_hit_test_free() + */ +Ewk_Hit_Test* ewk_frame_hit_test_new(const Evas_Object* o, int x, int y) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, 0); + + WebCore::FrameView* view = sd->frame->view(); + EINA_SAFETY_ON_NULL_RETURN_VAL(view, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->contentRenderer(), 0); + + WebCore::HitTestResult result = sd->frame->eventHandler()->hitTestResultAtPoint + (view->windowToContents(WebCore::IntPoint(x, y)), + /*allowShadowContent*/ false, /*ignoreClipping*/ true); + + if (result.scrollbar()) + return 0; + if (!result.innerNode()) + return 0; + + Ewk_Hit_Test* hit_test = (Ewk_Hit_Test*)calloc(1, sizeof(Ewk_Hit_Test)); + if (!hit_test) { + CRITICAL("Could not allocate memory for hit test."); + return 0; + } + + hit_test->x = result.point().x(); + hit_test->y = result.point().y(); +#if 0 + // FIXME + hit_test->bounding_box.x = result.boundingBox().x(); + hit_test->bounding_box.y = result.boundingBox().y(); + hit_test->bounding_box.w = result.boundingBox().width(); + hit_test->bounding_box.h = result.boundingBox().height(); +#else + hit_test->bounding_box.x = 0; + hit_test->bounding_box.y = 0; + hit_test->bounding_box.w = 0; + hit_test->bounding_box.h = 0; +#endif + + WebCore::TextDirection dir; + hit_test->title = eina_stringshare_add(result.title(dir).utf8().data()); + hit_test->alternate_text = eina_stringshare_add(result.altDisplayString().utf8().data()); + if (result.innerNonSharedNode() && result.innerNonSharedNode()->document() + && result.innerNonSharedNode()->document()->frame()) + hit_test->frame = kit(result.innerNonSharedNode()->document()->frame()); + + hit_test->link.text = eina_stringshare_add(result.textContent().utf8().data()); + hit_test->link.url = eina_stringshare_add(result.absoluteLinkURL().prettyURL().utf8().data()); + hit_test->link.title = eina_stringshare_add(result.titleDisplayString().utf8().data()); + hit_test->link.target_frame = kit(result.targetFrame()); + + hit_test->flags.editable = result.isContentEditable(); + hit_test->flags.selected = result.isSelected(); + + return hit_test; +} + +/** + * Relative scroll of given frame. + * + * @param o frame object to scroll. + * @param dx horizontal offset to scroll. + * @param dy vertical offset to scroll. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise. + */ +Eina_Bool +ewk_frame_scroll_add(Evas_Object* o, int dx, int dy) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE); + sd->frame->view()->scrollBy(IntSize(dx, dy)); + return EINA_TRUE; +} + +/** + * Set absolute scroll of given frame. + * + * Both values are from zero to the contents size minus the viewport + * size. See ewk_frame_scroll_size_get(). + * + * @param o frame object to scroll. + * @param x horizontal position to scroll. + * @param y vertical position to scroll. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise. + */ +Eina_Bool +ewk_frame_scroll_set(Evas_Object* o, int x, int y) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE); + sd->frame->view()->setScrollPosition(WebCore::IntPoint(x, y)); + return EINA_TRUE; +} + +/** + * Get the possible scroll size of given frame. + * + * Possible scroll size is contents size minus the viewport + * size. It's the last allowed value for ewk_frame_scroll_set() + * + * @param o frame object to scroll. + * @param w where to return horizontal size that is possible to + * scroll. May be @c NULL. + * @param h where to return vertical size that is possible to scroll. + * May be @c NULL. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise and + * values are zeroed. + */ +Eina_Bool +ewk_frame_scroll_size_get(const Evas_Object* o, int* w, int* h) +{ + if (w) + *w = 0; + if (h) + *h = 0; + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE); + WebCore::IntPoint point = sd->frame->view()->maximumScrollPosition(); + if (w) + *w = point.x(); + if (h) + *h = point.y(); + return EINA_TRUE; +} + +/** + * Get the current scroll position of given frame. + * + * @param o frame object to scroll. + * @param x where to return horizontal position. May be @c NULL. + * @param y where to return vertical position. May be @c NULL. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise and + * values are zeroed. + */ +Eina_Bool +ewk_frame_scroll_pos_get(const Evas_Object* o, int* x, int* y) +{ + if (x) + *x = 0; + if (y) + *y = 0; + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE); + WebCore::IntPoint pos = sd->frame->view()->scrollPosition(); + if (x) + *x = pos.x(); + if (y) + *y = pos.y(); + return EINA_TRUE; +} + +/** + * Get the current frame visible content geometry. + * + * @param o frame object to query visible content geometry. + * @param include_scrollbars whenever to include scrollbars size. + * @param x horizontal position. May be @c NULL. + * @param y vertical position. May be @c NULL. + * @param w width. May be @c NULL. + * @param h height. May be @c NULL. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise and + * values are zeroed. + */ +Eina_Bool ewk_frame_visible_content_geometry_get(const Evas_Object* o, Eina_Bool include_scrollbars, int* x, int* y, int* w, int* h) +{ + if (x) + *x = 0; + if (y) + *y = 0; + if (w) + *w = 0; + if (h) + *h = 0; + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE); + WebCore::IntRect rect = sd->frame->view()->visibleContentRect(include_scrollbars); + if (x) + *x = rect.x(); + if (y) + *y = rect.y(); + if (w) + *w = rect.width(); + if (h) + *h = rect.height(); + return EINA_TRUE; +} + +/** + * Get the current paintsEntireContents flag. + * + * This flag tells if dirty areas should be repainted even if they are + * out of the screen. + * + * @param o frame object to query paintsEntireContents flag. + * + * @return @c EINA_TRUE if repainting any dirty area, @c EINA_FALSE + * otherwise. + */ +Eina_Bool ewk_frame_paint_full_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE); + return sd->frame->view()->paintsEntireContents(); +} + +/** + * Set the current paintsEntireContents flag. + * + * This flag tells if dirty areas should be repainted even if they are + * out of the screen. + * + * @param o frame object to set paintsEntireContents flag. + * @param flag @c EINA_TRUE if want to always repaint any dirty area, + * @c EINA_FALSE otherwise. + */ +void ewk_frame_paint_full_set(Evas_Object* o, Eina_Bool flag) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->frame); + EINA_SAFETY_ON_NULL_RETURN(sd->frame->view()); + sd->frame->view()->setPaintsEntireContents(flag); +} + +/** + * Feed the focus in signal to this frame. + * + * @param o frame object to focus. + * + * @return @c EINA_TRUE if it was handled, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_feed_focus_in(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + WebCore::FocusController* c = sd->frame->page()->focusController(); + c->setFocusedFrame(sd->frame); + return EINA_TRUE; +} + +/** + * Feed the focus out signal to this frame. + * + * @param o frame object to remove focus. + */ +Eina_Bool ewk_frame_feed_focus_out(Evas_Object* o) +{ + // TODO: what to do on focus out? + ERR("what to do?"); + return EINA_FALSE; +} + +/** + * Feed the mouse wheel event to the frame. + * + * @param o frame object to feed event. + * @param ev mouse wheel event. + * + * @return @c EINA_TRUE if it was handled, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_feed_mouse_wheel(Evas_Object* o, const Evas_Event_Mouse_Wheel* ev) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE); + + WebCore::FrameView* view = sd->frame->view(); + DBG("o=%p, view=%p, direction=%d, z=%d, pos=%d,%d", + o, view, ev->direction, ev->z, ev->canvas.x, ev->canvas.y); + EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE); + + WebCore::PlatformWheelEvent event(ev); + return sd->frame->eventHandler()->handleWheelEvent(event); +} + +/** + * Feed the mouse down event to the frame. + * + * @param o frame object to feed event. + * @param ev mouse down event. + * + * @return @c EINA_TRUE if it was handled, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_feed_mouse_down(Evas_Object* o, const Evas_Event_Mouse_Down* ev) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE); + + WebCore::FrameView* view = sd->frame->view(); + DBG("o=%p, view=%p, button=%d, pos=%d,%d", + o, view, ev->button, ev->canvas.x, ev->canvas.y); + EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE); + + Evas_Coord x, y; + evas_object_geometry_get(sd->view, &x, &y, 0, 0); + + WebCore::PlatformMouseEvent event(ev, WebCore::IntPoint(x, y)); + return sd->frame->eventHandler()->handleMousePressEvent(event); +} + +/** + * Feed the mouse up event to the frame. + * + * @param o frame object to feed event. + * @param ev mouse up event. + * + * @return @c EINA_TRUE if it was handled, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_feed_mouse_up(Evas_Object* o, const Evas_Event_Mouse_Up* ev) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE); + + WebCore::FrameView* view = sd->frame->view(); + DBG("o=%p, view=%p, button=%d, pos=%d,%d", + o, view, ev->button, ev->canvas.x, ev->canvas.y); + EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE); + + Evas_Coord x, y; + evas_object_geometry_get(sd->view, &x, &y, 0, 0); + + WebCore::PlatformMouseEvent event(ev, WebCore::IntPoint(x, y)); + return sd->frame->eventHandler()->handleMouseReleaseEvent(event); +} + +/** + * Feed the mouse move event to the frame. + * + * @param o frame object to feed event. + * @param ev mouse move event. + * + * @return @c EINA_TRUE if it was handled, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_feed_mouse_move(Evas_Object* o, const Evas_Event_Mouse_Move* ev) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE); + + WebCore::FrameView* view = sd->frame->view(); + DBG("o=%p, view=%p, pos: old=%d,%d, new=%d,%d, buttons=%d", + o, view, ev->cur.canvas.x, ev->cur.canvas.y, + ev->prev.canvas.x, ev->prev.canvas.y, ev->buttons); + EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE); + + Evas_Coord x, y; + evas_object_geometry_get(sd->view, &x, &y, 0, 0); + + WebCore::PlatformMouseEvent event(ev, WebCore::IntPoint(x, y)); + return sd->frame->eventHandler()->mouseMoved(event); +} + +static inline Eina_Bool _ewk_frame_handle_key_scrolling(WebCore::Frame* frame, const WebCore::PlatformKeyboardEvent &event) +{ + WebCore::ScrollDirection direction; + WebCore::ScrollGranularity granularity; + + int keyCode = event.windowsVirtualKeyCode(); + + switch (keyCode) { + case WebCore::VK_SPACE: + granularity = WebCore::ScrollByPage; + if (event.shiftKey()) + direction = WebCore::ScrollUp; + else + direction = WebCore::ScrollDown; + break; + case WebCore::VK_NEXT: + granularity = WebCore::ScrollByPage; + direction = WebCore::ScrollDown; + break; + case WebCore::VK_PRIOR: + granularity = WebCore::ScrollByPage; + direction = WebCore::ScrollUp; + break; + case WebCore::VK_HOME: + granularity = WebCore::ScrollByDocument; + direction = WebCore::ScrollUp; + break; + case WebCore::VK_END: + granularity = WebCore::ScrollByDocument; + direction = WebCore::ScrollDown; + break; + case WebCore::VK_LEFT: + granularity = WebCore::ScrollByLine; + direction = WebCore::ScrollLeft; + break; + case WebCore::VK_RIGHT: + granularity = WebCore::ScrollByLine; + direction = WebCore::ScrollRight; + break; + case WebCore::VK_UP: + direction = WebCore::ScrollUp; + if (event.ctrlKey()) + granularity = WebCore::ScrollByDocument; + else + granularity = WebCore::ScrollByLine; + break; + case WebCore::VK_DOWN: + direction = WebCore::ScrollDown; + if (event.ctrlKey()) + granularity = WebCore::ScrollByDocument; + else + granularity = WebCore::ScrollByLine; + break; + default: + return EINA_FALSE; + } + + if (frame->eventHandler()->scrollOverflow(direction, granularity)) + return EINA_FALSE; + + frame->view()->scroll(direction, granularity); + return EINA_TRUE; +} + +/** + * Feed the keyboard key down event to the frame. + * + * @param o frame object to feed event. + * @param ev keyboard key down event. + * + * @return @c EINA_TRUE if it was handled, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_feed_key_down(Evas_Object* o, const Evas_Event_Key_Down* ev) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE); + + DBG("o=%p keyname=%s (key=%s, string=%s)", + o, ev->keyname, ev->key ? ev->key : "", ev->string ? ev->string : ""); + + WebCore::PlatformKeyboardEvent event(ev); + if (sd->frame->eventHandler()->keyEvent(event)) + return EINA_TRUE; + + return _ewk_frame_handle_key_scrolling(sd->frame, event); +} + +/** + * Feed the keyboard key up event to the frame. + * + * @param o frame object to feed event. + * @param ev keyboard key up event. + * + * @return @c EINA_TRUE if it was handled, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_frame_feed_key_up(Evas_Object* o, const Evas_Event_Key_Up* ev) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE); + + DBG("o=%p keyname=%s (key=%s, string=%s)", + o, ev->keyname, ev->key ? ev->key : "", ev->string ? ev->string : ""); + + WebCore::PlatformKeyboardEvent event(ev); + return sd->frame->eventHandler()->keyEvent(event); +} + +/* internal methods ****************************************************/ + +/** + * @internal + * + * Initialize frame based on actual WebKit frame. + * + * This is internal and should never be called by external users. + */ +Eina_Bool ewk_frame_init(Evas_Object* o, Evas_Object* view, WebCore::Frame* frame) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + if (!sd->frame) { + WebCore::FrameLoaderClientEfl* flc = _ewk_frame_loader_efl_get(frame); + flc->setWebFrame(o); + sd->frame = frame; + sd->view = view; + frame->init(); + return EINA_TRUE; + } + + ERR("frame %p already set for %p, ignored new %p", + sd->frame, o, frame); + return EINA_FALSE; +} + +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) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + char buf[256]; + Evas_Object* frame; + WebCore::Frame* cf; + + frame = ewk_frame_add(sd->base.evas); + if (!frame) { + ERR("Could not create ewk_frame object."); + return 0; + } + + cf = child.get(); + sd->frame->tree()->appendChild(child); + if (cf->tree()) + cf->tree()->setName(name); + else + ERR("no tree for child object"); + + if (!ewk_frame_init(frame, sd->view, cf)) { + evas_object_del(frame); + return 0; + } + snprintf(buf, sizeof(buf), "EWK_Frame:child/%s", name.utf8().data()); + evas_object_name_set(frame, buf); + evas_object_smart_member_add(frame, o); + evas_object_show(frame); + + if (!cf->page()) + goto died; + + cf->loader()->loadURLIntoChildFrame(url, referrer, cf); + if (!cf->tree()->parent()) + goto died; + + // TODO: announce frame was created? + return frame; + +died: + CRITICAL("does this work: BEGIN"); + ewk_frame_core_gone(frame); // CONFIRM + evas_object_del(frame); // CONFIRM + CRITICAL("does this work: END"); + return 0; +} + +/** + * @internal + * Frame was destroyed by loader, remove internal reference. + */ +void ewk_frame_core_gone(Evas_Object* o) +{ + DBG("o=%p", o); + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + sd->frame = 0; +} + +/** + * @internal + * Retrieve WebCore::Frame associated with this object. + * + * Avoid using this call from outside, add specific ewk_frame_* + * actions instead. + */ +WebCore::Frame* ewk_frame_core_get(const Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + return sd->frame; +} + + +/** + * @internal + * Reports the frame started loading something. + * + * Emits signal: "load,started" with no parameters. + */ +void ewk_frame_load_started(Evas_Object* o) +{ + Evas_Object* main_frame; + DBG("o=%p", o); + evas_object_smart_callback_call(o, "load,started", 0); + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + ewk_view_load_started(sd->view); + + main_frame = ewk_view_frame_main_get(sd->view); + if (main_frame == o) + ewk_view_frame_main_load_started(sd->view); +} + +/** + * @internal + * Reports load finished, optionally with error information. + * + * Emits signal: "load,finished" with pointer to Ewk_Frame_Load_Error + * if any error, or @c NULL if successful load. + * + * @note there should notbe any error stuff here, but trying to be + * compatible with previous WebKit. + */ +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) +{ + Ewk_Frame_Load_Error buf, *error; + if (!error_domain) { + DBG("o=%p, success.", o); + error = 0; + } else { + DBG("o=%p, error=%s (%d, cancellation=%hhu) \"%s\", url=%s", + o, error_domain, error_code, is_cancellation, + error_description, failing_url); + + buf.domain = error_domain; + buf.code = error_code; + buf.is_cancellation = is_cancellation; + buf.description = error_description; + buf.failing_url = failing_url; + buf.frame = o; + error = &buf; + } + evas_object_smart_callback_call(o, "load,finished", error); + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + ewk_view_load_finished(sd->view, error); +} + +/** + * @internal + * Reports load failed with error information. + * + * Emits signal: "load,error" with pointer to Ewk_Frame_Load_Error. + */ +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) +{ + Ewk_Frame_Load_Error error; + + DBG("o=%p, error=%s (%d, cancellation=%hhu) \"%s\", url=%s", + o, error_domain, error_code, is_cancellation, + error_description, failing_url); + + EINA_SAFETY_ON_NULL_RETURN(error_domain); + + error.code = error_code; + error.is_cancellation = is_cancellation; + error.domain = error_domain; + error.description = error_description; + error.failing_url = failing_url; + error.frame = o; + evas_object_smart_callback_call(o, "load,error", &error); + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + ewk_view_load_error(sd->view, &error); +} + +/** + * @internal + * Reports load progress changed. + * + * Emits signal: "load,progress" with pointer to a double from 0.0 to 1.0. + */ +void ewk_frame_load_progress_changed(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->frame); + + // TODO: this is per page, there should be a way to have per-frame. + double progress = sd->frame->page()->progress()->estimatedProgress(); + + DBG("o=%p (p=%0.3f)", o, progress); + + evas_object_smart_callback_call(o, "load,progress", &progress); + ewk_view_load_progress_changed(sd->view); +} + + +/** + * @internal + * + * Reports contents size changed. + */ +void ewk_frame_contents_size_changed(Evas_Object* o, Evas_Coord w, Evas_Coord h) +{ + DBG("o=%p: %dx%d", o, w, h); + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + if (sd->contents_size.w == w && sd->contents_size.h == h) + return; + sd->contents_size.w = w; + sd->contents_size.h = h; + // TODO: update something else internally? + + Evas_Coord size[2] = {w, h}; + evas_object_smart_callback_call(o, "contents,size,changed", size); +} + +/** + * @internal + * + * Reports title changed. + */ +void ewk_frame_title_set(Evas_Object* o, const char* title) +{ + DBG("o=%p, title=%s", o, title ? title : "(null)"); + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + if (!eina_stringshare_replace(&sd->title, title)) + return; + evas_object_smart_callback_call(o, "title,changed", (void*)sd->title); +} + +void ewk_frame_view_create_for_view(Evas_Object* o, Evas_Object* view) +{ + DBG("o=%p, view=%p", o, view); + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->frame); + Evas_Coord w, h; + + if (sd->frame->view()) + return; + + evas_object_geometry_get(view, 0, 0, &w, &h); + + WebCore::IntSize size(w, h); + int r, g, b, a; + WebCore::Color bg; + + ewk_view_bg_color_get(view, &r, &g, &b, &a); + if (!a) + bg = WebCore::Color(0, 0, 0, 0); + else if (a == 255) + bg = WebCore::Color(r, g, b, a); + else + bg = WebCore::Color(r * 255 / a, g * 255 / a, b * 255 / a, a); + + sd->frame->createView(size, bg, !a, WebCore::IntSize(), false); + if (!sd->frame->view()) + return; + sd->frame->view()->setEdjeTheme(sd->theme); + sd->frame->view()->setEvasObject(o); +} + +/** + * @internal + * Reports uri changed and swap internal string reference. + * + * Emits signal: "uri,changed" with new uri as parameter. + */ +Eina_Bool ewk_frame_uri_changed(Evas_Object* o) +{ + EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); + WTF::CString uri(sd->frame->loader()->url().prettyURL().utf8()); + + INF("uri=%s", uri.data()); + if (!uri.data()) { + ERR("no uri"); + return EINA_FALSE; + } + + eina_stringshare_replace(&sd->uri, uri.data()); + evas_object_smart_callback_call(o, "uri,changed", (void*)sd->uri); + return EINA_TRUE; +} + +void ewk_frame_force_layout(Evas_Object* o) +{ + DBG("o=%p", o); + EWK_FRAME_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->frame); + WebCore::FrameView* view = sd->frame->view(); + if (view) + view->forceLayout(true); +} + +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) +{ + DBG("o=%p, size=%dx%d, element=%p, url=%s, mimeType=%s", + o, pluginSize.width(), pluginSize.height(), element, + url.prettyURL().utf8().data(), mimeType.utf8().data()); + + EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); + + // TODO: emit signal and ask webkit users if something else should be done. + // like creating another x window (see gtk, it allows users to create + // GtkPluginWidget. + + WTF::RefPtr<WebCore::PluginView> pluginView = WebCore::PluginView::create + (sd->frame, pluginSize, element, url, paramNames, paramValues, + mimeType, loadManually); + + if (pluginView->status() == WebCore::PluginStatusLoadedSuccessfully) + return pluginView; + + return 0; +} diff --git a/WebKit/efl/ewk/ewk_frame.h b/WebKit/efl/ewk/ewk_frame.h new file mode 100644 index 0000000..c71269b --- /dev/null +++ b/WebKit/efl/ewk/ewk_frame.h @@ -0,0 +1,184 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ewk_frame_h +#define ewk_frame_h + +#include "ewk_eapi.h" +#include <Evas.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @file + * + * WebKit frame smart object. + * + * This object is the low level access to WebKit-EFL browser + * component. It represents both the main and internal frames that + * HTML pages contain. + * + * Every ewk_view has at least one frame, called "main frame" and + * retrieved with ewk_view_frame_main_get(). One can retrieve frame's + * owner view with ewk_frame_view_get(). Parent frame can be retrieved + * with standard smart object's evas_object_smart_parent_get(). + * Children can be accessed with ewk_frame_children_iterator_new() or + * ewk_frame_child_find(). + * + * The following signals (see evas_object_smart_callback_add()) are emitted: + * + * - "title,changed", const char*: title of the main frame changed. + * - "uri,changed", const char*: uri of the main frame changed. + * - "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,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. + */ + + +/** + * Structure used to report load errors. + * + * Load errors are reported as signal by ewk_view. All the strings are + * temporary references and should @b not be used after the signal + * callback returns. If required, make copies with strdup() or + * eina_stringshare_add() (they are not even guaranteed to be + * stringshared, so must use eina_stringshare_add() and not + * eina_stringshare_ref()). + */ +typedef struct _Ewk_Frame_Load_Error Ewk_Frame_Load_Error; +struct _Ewk_Frame_Load_Error { + int code; /**< numeric error code */ + Eina_Bool is_cancellation; /**< if load failed because it was canceled */ + const char *domain; /**< error domain name */ + const char *description; /**< error description already localized */ + const char *failing_url; /**< the url that failed to load */ + Evas_Object *frame; /**< frame where the failure happened */ +}; + +/** + * Structure used to report hit test results. + */ +typedef struct _Ewk_Hit_Test Ewk_Hit_Test; +struct _Ewk_Hit_Test { + int x, y; + struct { + int x, y, w, h; + } bounding_box; + const char *title; + const char *alternate_text; /**< for image, area, input and applet */ + Evas_Object *frame; + struct { + const char *text; + const char *url; + const char *title; + Evas_Object *target_frame; + } link; + struct { + Eina_Bool editable:1; + Eina_Bool selected:1; + } flags; +}; + + +EAPI Evas_Object *ewk_frame_view_get(const Evas_Object *o); +EAPI void ewk_frame_theme_set(Evas_Object *o, const char *path); +EAPI const char *ewk_frame_theme_get(Evas_Object *o); + +EAPI Eina_Iterator *ewk_frame_children_iterator_new(Evas_Object *o); +EAPI Evas_Object *ewk_frame_child_find(Evas_Object *o, const char *name); + +EAPI Eina_Bool ewk_frame_uri_set(Evas_Object *o, const char *uri); +EAPI const char *ewk_frame_uri_get(const Evas_Object *o); +EAPI const char *ewk_frame_title_get(const Evas_Object *o); +EAPI const char *ewk_frame_name_get(const Evas_Object *o); +EAPI Eina_Bool ewk_frame_contents_size_get(const Evas_Object *o, Evas_Coord *w, Evas_Coord *h); + +EAPI Eina_Bool ewk_frame_contents_set(Evas_Object *o, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri); +EAPI Eina_Bool ewk_frame_contents_alternate_set(Evas_Object *o, const char *contents, size_t contents_size, const char *mime_type, const char *encoding, const char *base_uri, const char *unreachable_uri); + +EAPI Eina_Bool ewk_frame_script_execute(Evas_Object *o, const char *script); + +EAPI Eina_Bool ewk_frame_editable_get(const Evas_Object *o); +EAPI Eina_Bool ewk_frame_editable_set(Evas_Object *o, Eina_Bool editable); + +EAPI char *ewk_frame_selection_get(const Evas_Object *o); + +EAPI Eina_Bool ewk_frame_text_search(const Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap); + +EAPI unsigned int ewk_frame_text_matches_mark(Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit); +EAPI Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object *o); +EAPI Eina_Bool ewk_frame_text_matches_highlight_set(Evas_Object *o, Eina_Bool highlight); +EAPI Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object *o); + +EAPI Eina_Bool ewk_frame_stop(Evas_Object *o); +EAPI Eina_Bool ewk_frame_reload(Evas_Object *o); +EAPI Eina_Bool ewk_frame_reload_full(Evas_Object *o); + +EAPI Eina_Bool ewk_frame_back(Evas_Object *o); +EAPI Eina_Bool ewk_frame_forward(Evas_Object *o); +EAPI Eina_Bool ewk_frame_navigate(Evas_Object *o, int steps); + +EAPI Eina_Bool ewk_frame_back_possible(Evas_Object *o); +EAPI Eina_Bool ewk_frame_forward_possible(Evas_Object *o); +EAPI Eina_Bool ewk_frame_navigate_possible(Evas_Object *o, int steps); + +EAPI float ewk_frame_zoom_get(const Evas_Object *o); +EAPI Eina_Bool ewk_frame_zoom_set(Evas_Object *o, float zoom); +EAPI Eina_Bool ewk_frame_zoom_text_only_get(const Evas_Object *o); +EAPI Eina_Bool ewk_frame_zoom_text_only_set(Evas_Object *o, Eina_Bool setting); + +EAPI void ewk_frame_hit_test_free(Ewk_Hit_Test *hit_test); +EAPI Ewk_Hit_Test *ewk_frame_hit_test_new(const Evas_Object *o, int x, int y); + +EAPI Eina_Bool ewk_frame_scroll_add(Evas_Object *o, int dx, int dy); +EAPI Eina_Bool ewk_frame_scroll_set(Evas_Object *o, int x, int y); + +EAPI Eina_Bool ewk_frame_scroll_size_get(const Evas_Object *o, int *w, int *h); +EAPI Eina_Bool ewk_frame_scroll_pos_get(const Evas_Object *o, int *x, int *y); + +EAPI Eina_Bool ewk_frame_visible_content_geometry_get(const Evas_Object *o, Eina_Bool include_scrollbars, int *x, int *y, int *w, int *h); + +EAPI Eina_Bool ewk_frame_paint_full_get(const Evas_Object *o); +EAPI void ewk_frame_paint_full_set(Evas_Object *o, Eina_Bool flag); + +EAPI Eina_Bool ewk_frame_feed_focus_in(Evas_Object *o); +EAPI Eina_Bool ewk_frame_feed_focus_out(Evas_Object *o); + +EAPI Eina_Bool ewk_frame_feed_mouse_wheel(Evas_Object *o, const Evas_Event_Mouse_Wheel *ev); +EAPI Eina_Bool ewk_frame_feed_mouse_down(Evas_Object *o, const Evas_Event_Mouse_Down *ev); +EAPI Eina_Bool ewk_frame_feed_mouse_up(Evas_Object *o, const Evas_Event_Mouse_Up *ev); +EAPI Eina_Bool ewk_frame_feed_mouse_move(Evas_Object *o, const Evas_Event_Mouse_Move *ev); +EAPI Eina_Bool ewk_frame_feed_key_down(Evas_Object *o, const Evas_Event_Key_Down *ev); +EAPI Eina_Bool ewk_frame_feed_key_up(Evas_Object *o, const Evas_Event_Key_Up *ev); + + +#ifdef __cplusplus +} +#endif +#endif // ewk_frame_h diff --git a/WebKit/efl/ewk/ewk_history.cpp b/WebKit/efl/ewk/ewk_history.cpp new file mode 100644 index 0000000..da48c33 --- /dev/null +++ b/WebKit/efl/ewk/ewk_history.cpp @@ -0,0 +1,704 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "ewk_history.h" + +#include "BackForwardList.h" +#include "EWebKit.h" +#include "HistoryItem.h" +#include "Image.h" +#include "ewk_private.h" +#include <wtf/text/CString.h> + +#include <Eina.h> +#include <eina_safety_checks.h> + +struct _Ewk_History { + WebCore::BackForwardList *core; +}; + +#define EWK_HISTORY_CORE_GET_OR_RETURN(history, core_, ...) \ + if (!(history)) { \ + CRITICAL("history is NULL."); \ + return __VA_ARGS__; \ + } \ + if (!(history)->core) { \ + CRITICAL("history->core is NULL."); \ + return __VA_ARGS__; \ + } \ + if (!(history)->core->enabled()) { \ + ERR("history->core is disabled!."); \ + return __VA_ARGS__; \ + } \ + WebCore::BackForwardList *core_ = (history)->core + + +struct _Ewk_History_Item { + WebCore::HistoryItem *core; + + const char *title; + const char *alternate_title; + const char *uri; + const char *original_uri; +}; + +#define EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core_, ...) \ + if (!(item)) { \ + CRITICAL("item is NULL."); \ + return __VA_ARGS__; \ + } \ + if (!(item)->core) { \ + CRITICAL("item->core is NULL."); \ + return __VA_ARGS__; \ + } \ + WebCore::HistoryItem *core_ = (item)->core + + +static inline Ewk_History_Item *_ewk_history_item_new(WebCore::HistoryItem *core) +{ + Ewk_History_Item* item; + + if (!core) { + ERR("WebCore::HistoryItem is NULL."); + return 0; + } + + item = (Ewk_History_Item *)calloc(1, sizeof(Ewk_History_Item)); + if (!item) { + CRITICAL("Could not allocate item memory."); + return 0; + } + + core->ref(); + item->core = core; + + return item; +} + +static inline Eina_List *_ewk_history_item_list_get(const WebCore::HistoryItemVector &core_items) +{ + Eina_List* ret = 0; + unsigned int i, size; + + size = core_items.size(); + for (i = 0; i < size; i++) { + Ewk_History_Item* item = _ewk_history_item_new(core_items[i].get()); + if (item) + ret = eina_list_append(ret, item); + } + + return ret; +} + +/** + * Go forward in history one item, if possible. + * + * @param history which history instance to modify. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + */ +Eina_Bool ewk_history_forward(Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, EINA_FALSE); + if (core->forwardListCount() < 1) + return EINA_FALSE; + core->goForward(); + return EINA_TRUE; +} + +/** + * Go back in history one item, if possible. + * + * @param history which history instance to modify. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + */ +Eina_Bool ewk_history_back(Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, EINA_FALSE); + if (core->backListCount() < 1) + return EINA_FALSE; + core->goBack(); + return EINA_TRUE; +} + +/** + * Adds the given item to history. + * + * Memory handling: This will not modify or even take references to + * given item (Ewk_History_Item), so you should still handle it with + * ewk_history_item_free(). + * + * @param history which history instance to modify. + * @param item reference to add to history. Unmodified. Must @b not be @c NULL. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + */ +Eina_Bool ewk_history_history_item_add(Ewk_History* history, const Ewk_History_Item* item) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, history_core, EINA_FALSE); + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, item_core, EINA_FALSE); + history_core->addItem(item_core); + return EINA_TRUE; +} + +/** + * Sets the given item as current in history (go to item). + * + * Memory handling: This will not modify or even take references to + * given item (Ewk_History_Item), so you should still handle it with + * ewk_history_item_free(). + * + * @param history which history instance to modify. + * @param item reference to go to history. Unmodified. Must @b not be @c NULL. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + */ +Eina_Bool ewk_history_history_item_set(Ewk_History* history, const Ewk_History_Item* item) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, history_core, EINA_FALSE); + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, item_core, EINA_FALSE); + history_core->goToItem(item_core); + return EINA_TRUE; +} + +/** + * Get the first item from back list, if any. + * + * @param history which history instance to query. + * + * @return the @b newly allocated item instance. This memory must be + * released with ewk_history_item_free() after use. + */ +Ewk_History_Item* ewk_history_history_item_back_get(const Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + return _ewk_history_item_new(core->backItem()); +} + +/** + * Get the current item in history, if any. + * + * @param history which history instance to query. + * + * @return the @b newly allocated item instance. This memory must be + * released with ewk_history_item_free() after use. + */ +Ewk_History_Item* ewk_history_history_item_current_get(const Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + return _ewk_history_item_new(core->currentItem()); +} + +/** + * Get the first item from forward list, if any. + * + * @param history which history instance to query. + * + * @return the @b newly allocated item instance. This memory must be + * released with ewk_history_item_free() after use. + */ +Ewk_History_Item* ewk_history_history_item_forward_get(const Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + return _ewk_history_item_new(core->forwardItem()); +} + +/** + * Get item at given position, if any at that index. + * + * @param history which history instance to query. + * @param index position of item to get. + * + * @return the @b newly allocated item instance. This memory must be + * released with ewk_history_item_free() after use. + */ +Ewk_History_Item* ewk_history_history_item_nth_get(const Ewk_History* history, int index) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + return _ewk_history_item_new(core->itemAtIndex(index)); +} + +/** + * Queries if given item is in history. + * + * Memory handling: This will not modify or even take references to + * given item (Ewk_History_Item), so you should still handle it with + * ewk_history_item_free(). + * + * @param history which history instance to modify. + * @param item reference to check in history. Must @b not be @c NULL. + * + * @return @c EINA_TRUE if in history, @c EINA_FALSE if not or failure. + */ +Eina_Bool ewk_history_history_item_contains(const Ewk_History* history, const Ewk_History_Item* item) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, history_core, EINA_FALSE); + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, item_core, EINA_FALSE); + return history_core->containsItem(item_core); +} + +/** + * Get the whole forward list. + * + * @param history which history instance to query. + * + * @return a newly allocated list of @b newly allocated item + * instance. This memory of each item must be released with + * ewk_history_item_free() after use. use + * ewk_history_item_list_free() for convenience. + * + * @see ewk_history_item_list_free() + * @see ewk_history_forward_list_get_with_limit() + */ +Eina_List* ewk_history_forward_list_get(const Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + WebCore::HistoryItemVector items; + int limit = core->forwardListCount(); + core->forwardListWithLimit(limit, items); + return _ewk_history_item_list_get(items); +} + +/** + * Get the forward list within the given limit. + * + * @param history which history instance to query. + * @param limit the maximum number of items to return. + * + * @return a newly allocated list of @b newly allocated item + * instance. This memory of each item must be released with + * ewk_history_item_free() after use. use + * ewk_history_item_list_free() for convenience. + * + * @see ewk_history_item_list_free() + * @see ewk_history_forward_list_length() + * @see ewk_history_forward_list_get() + */ +Eina_List* ewk_history_forward_list_get_with_limit(const Ewk_History* history, int limit) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + WebCore::HistoryItemVector items; + core->forwardListWithLimit(limit, items); + return _ewk_history_item_list_get(items); +} + +/** + * Get the whole size of forward list. + * + * @param history which history instance to query. + * + * @return number of elements in whole list. + * + * @see ewk_history_forward_list_get_with_limit() + */ +int ewk_history_forward_list_length(const Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + return core->forwardListCount(); +} + +/** + * Get the whole back list. + * + * @param history which history instance to query. + * + * @return a newly allocated list of @b newly allocated item + * instance. This memory of each item must be released with + * ewk_history_item_free() after use. use + * ewk_history_item_list_free() for convenience. + * + * @see ewk_history_item_list_free() + * @see ewk_history_back_list_get_with_limit() + */ +Eina_List* ewk_history_back_list_get(const Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + WebCore::HistoryItemVector items; + int limit = core->backListCount(); + core->backListWithLimit(limit, items); + return _ewk_history_item_list_get(items); +} + +/** + * Get the back list within the given limit. + * + * @param history which history instance to query. + * @param limit the maximum number of items to return. + * + * @return a newly allocated list of @b newly allocated item + * instance. This memory of each item must be released with + * ewk_history_item_free() after use. use + * ewk_history_item_list_free() for convenience. + * + * @see ewk_history_item_list_free() + * @see ewk_history_back_list_length() + * @see ewk_history_back_list_get() + */ +Eina_List* ewk_history_back_list_get_with_limit(const Ewk_History* history, int limit) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + WebCore::HistoryItemVector items; + core->backListWithLimit(limit, items); + return _ewk_history_item_list_get(items); +} + +/** + * Get the whole size of back list. + * + * @param history which history instance to query. + * + * @return number of elements in whole list. + * + * @see ewk_history_back_list_get_with_limit() + */ +int ewk_history_back_list_length(const Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + return core->backListCount(); +} + +/** + * Get maximum capacity of given history. + * + * @param history which history instance to query. + * + * @return maximum number of entries this history will hold. + */ +int ewk_history_limit_get(Ewk_History* history) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0); + return core->capacity(); +} + +/** + * Set maximum capacity of given history. + * + * @param history which history instance to modify. + * @param limit maximum size to allow. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_history_limit_set(const Ewk_History* history, int limit) +{ + EWK_HISTORY_CORE_GET_OR_RETURN(history, core, EINA_FALSE); + core->setCapacity(limit); + return EINA_TRUE; +} + +/** + * Create a new history item with given URI and title. + * + * @param uri where this resource is located. + * @param title resource title. + * + * @return newly allocated history item or @c NULL on errors. You must + * free this item with ewk_history_item_free(). + */ +Ewk_History_Item* ewk_history_item_new(const char* uri, const char* title) +{ + WebCore::String u = WebCore::String::fromUTF8(uri); + WebCore::String t = WebCore::String::fromUTF8(title); + WTF::RefPtr<WebCore::HistoryItem> core = WebCore::HistoryItem::create(u, t, 0); + Ewk_History_Item* item = _ewk_history_item_new(core.release().releaseRef()); + return item; +} + +static inline void _ewk_history_item_free(Ewk_History_Item* item, WebCore::HistoryItem* core) +{ + core->deref(); + free(item); +} + +/** + * Free given history item instance. + * + * @param item what to free. + */ +void ewk_history_item_free(Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core); + _ewk_history_item_free(item, core); +} + +/** + * Free given list and associated history items instances. + * + * @param history_items list of items to free (both list nodes and + * item instances). + */ +void ewk_history_item_list_free(Eina_List* history_items) +{ + void* d; + EINA_LIST_FREE(history_items, d) { + Ewk_History_Item* item = (Ewk_History_Item*)d; + _ewk_history_item_free(item, item->core); + } +} + +/** + * Query title for given history item. + * + * @param item history item to query. + * + * @return the title pointer, that may be @c NULL. This pointer is + * guaranteed to be eina_stringshare, so whenever possible + * save yourself some cpu cycles and use + * eina_stringshare_ref() instead of eina_stringshare_add() or + * strdup(). + */ +const char* ewk_history_item_title_get(const Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); + // hide the following optimzation from outside + Ewk_History_Item* i = (Ewk_History_Item*)item; + eina_stringshare_replace(&i->title, core->title().utf8().data()); + return i->title; +} + +/** + * Query alternate title for given history item. + * + * @param item history item to query. + * + * @return the alternate title pointer, that may be @c NULL. This + * pointer is guaranteed to be eina_stringshare, so whenever + * possible save yourself some cpu cycles and use + * eina_stringshare_ref() instead of eina_stringshare_add() or + * strdup(). + */ +const char* ewk_history_item_title_alternate_get(const Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); + // hide the following optimzation from outside + Ewk_History_Item* i = (Ewk_History_Item*)item; + eina_stringshare_replace(&i->alternate_title, + core->alternateTitle().utf8().data()); + return i->alternate_title; +} + +/** + * Set alternate title for given history item. + * + * @param item history item to query. + * @param title new alternate title to use for given item. No + * references are kept after this function returns. + */ +void ewk_history_item_title_alternate_set(Ewk_History_Item* item, const char* title) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core); + if (!eina_stringshare_replace(&item->alternate_title, title)) + return; + core->setAlternateTitle(WebCore::String::fromUTF8(title)); +} + +/** + * Query URI for given history item. + * + * @param item history item to query. + * + * @return the URI pointer, that may be @c NULL. This pointer is + * guaranteed to be eina_stringshare, so whenever possible + * save yourself some cpu cycles and use + * eina_stringshare_ref() instead of eina_stringshare_add() or + * strdup(). + */ +const char* ewk_history_item_uri_get(const Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); + // hide the following optimzation from outside + Ewk_History_Item* i = (Ewk_History_Item*)item; + eina_stringshare_replace(&i->uri, core->urlString().utf8().data()); + return i->uri; +} + +/** + * Query original URI for given history item. + * + * @param item history item to query. + * + * @return the original URI pointer, that may be @c NULL. This pointer + * is guaranteed to be eina_stringshare, so whenever possible + * save yourself some cpu cycles and use + * eina_stringshare_ref() instead of eina_stringshare_add() or + * strdup(). + */ +const char* ewk_history_item_uri_original_get(const Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); + // hide the following optimzation from outside + Ewk_History_Item* i = (Ewk_History_Item*)item; + eina_stringshare_replace(&i->original_uri, + core->originalURLString().utf8().data()); + return i->original_uri; +} + +/** + * Query last visited time for given history item. + * + * @param item history item to query. + * + * @return the time in seconds this item was visited. + */ +double ewk_history_item_time_last_visited_get(const Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0.0); + return core->lastVisitedTime(); +} + +/** + * Get the icon (aka favicon) associated with this history item. + * + * @note in order to have this working, one must open icon database + * with ewk_settings_icon_database_path_set(). + * + * @param item history item to query. + * + * @return the surface reference or @c NULL on errors. Note that the + * reference may be to a standard fallback icon. + */ +cairo_surface_t* ewk_history_item_icon_surface_get(const Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); + WebCore::Image* icon = core->icon(); + if (!icon) { + ERR("icon is NULL."); + return 0; + } + return icon->nativeImageForCurrentFrame(); +} + +/** + * Add an Evas_Object of type 'image' to given canvas with history item icon. + * + * This is an utility function that creates an Evas_Object of type + * image set to have fill always match object size + * (evas_object_image_filled_add()), saving some code to use it from Evas. + * + * @note in order to have this working, one must open icon database + * with ewk_settings_icon_database_path_set(). + * + * @param item history item to query. + * @param canvas evas instance where to add resulting object. + * + * @return newly allocated Evas_Object instance or @c NULL on + * errors. Delete the object with evas_object_del(). + */ +Evas_Object* ewk_history_item_icon_object_add(const Ewk_History_Item* item, Evas* canvas) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0); + WebCore::Image* icon = core->icon(); + cairo_surface_t* surface; + + if (!icon) { + ERR("icon is NULL."); + return 0; + } + + surface = icon->nativeImageForCurrentFrame(); + return ewk_util_image_from_cairo_surface_add(canvas, surface); +} + +/** + * Query if given item is still in page cache. + * + * @param item history item to query. + * + * @return @c EINA_TRUE if in cache, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_history_item_page_cache_exists(const Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, EINA_FALSE); + return core->isInPageCache(); +} + +/** + * Query number of times item was visited. + * + * @param item history item to query. + * + * @return number of visits. + */ +int ewk_history_item_visit_count(const Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0); + return core->visitCount(); +} + +/** + * Query if last visit to item was failure or not. + * + * @param item history item to query. + * + * @return @c EINA_TRUE if last visit was failure, @c EINA_FALSE if it + * was fine. + */ +Eina_Bool ewk_history_item_visit_last_failed(const Ewk_History_Item* item) +{ + EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, EINA_TRUE); + return core->lastVisitWasFailure(); +} + + +/* internal methods ****************************************************/ +/** + * @internal + * + * Creates history for given view. Called internally by ewk_view and + * should never be called from outside. + * + * @param core WebCore::BackForwardList instance to use internally. + * + * @return newly allocated history instance or @c NULL on errors. + */ +Ewk_History* ewk_history_new(WebCore::BackForwardList* core) +{ + Ewk_History* history; + EINA_SAFETY_ON_NULL_RETURN_VAL(core, 0); + DBG("core=%p", core); + + history = (Ewk_History*)malloc(sizeof(Ewk_History)); + if (!history) { + CRITICAL("Could not allocate history memory."); + return 0; + } + + core->ref(); + history->core = core; + + return history; +} + +/** + * @internal + * + * Destroys previously allocated history instance. This is called + * automatically by ewk_view and should never be called from outside. + * + * @param history instance to free + */ +void ewk_history_free(Ewk_History* history) +{ + DBG("history=%p", history); + history->core->deref(); + free(history); +} diff --git a/WebKit/efl/ewk/ewk_history.h b/WebKit/efl/ewk/ewk_history.h new file mode 100644 index 0000000..3943d7e --- /dev/null +++ b/WebKit/efl/ewk/ewk_history.h @@ -0,0 +1,96 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ewk_history_h +#define ewk_history_h + +#include "ewk_eapi.h" + +#include <Eina.h> +#include <Evas.h> +#include <cairo.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The history (back-forward list) associated with a given ewk_view. + * + * Changing the history affects immediately the view, changing the + * current uri, for example. + * + * When ewk_view is navigated or uris are set, history automatically + * updates. That's why no direct access to history structure is + * allowed. + */ +typedef struct _Ewk_History Ewk_History; + +/** + * Represents one item from Ewk_History. + */ +typedef struct _Ewk_History_Item Ewk_History_Item; + + + +EAPI Eina_Bool ewk_history_forward(Ewk_History *history); +EAPI Eina_Bool ewk_history_back(Ewk_History *history); + +EAPI Eina_Bool ewk_history_history_item_add(Ewk_History *history, const Ewk_History_Item *item); +EAPI Eina_Bool ewk_history_history_item_set(Ewk_History *history, const Ewk_History_Item *item); +EAPI Ewk_History_Item *ewk_history_history_item_back_get(const Ewk_History *history); +EAPI Ewk_History_Item *ewk_history_history_item_current_get(const Ewk_History *history); +EAPI Ewk_History_Item *ewk_history_history_item_forward_get(const Ewk_History *history); +EAPI Ewk_History_Item *ewk_history_history_item_nth_get(const Ewk_History *history, int index); +EAPI Eina_Bool ewk_history_history_item_contains(const Ewk_History *history, const Ewk_History_Item *item); + +EAPI Eina_List *ewk_history_forward_list_get(const Ewk_History *history); +EAPI Eina_List *ewk_history_forward_list_get_with_limit(const Ewk_History *history, int limit); +EAPI int ewk_history_forward_list_length(const Ewk_History *history); + +EAPI Eina_List *ewk_history_back_list_get(const Ewk_History *history); +EAPI Eina_List *ewk_history_back_list_get_with_limit(const Ewk_History *history, int limit); +EAPI int ewk_history_back_list_length(const Ewk_History *history); + +EAPI int ewk_history_limit_get(Ewk_History *history); +EAPI Eina_Bool ewk_history_limit_set(const Ewk_History *history, int limit); + +EAPI Ewk_History_Item *ewk_history_item_new(const char *uri, const char *title); +EAPI void ewk_history_item_free(Ewk_History_Item *item); +EAPI void ewk_history_item_list_free(Eina_List *history_items); + +EAPI const char *ewk_history_item_title_get(const Ewk_History_Item *item); +EAPI const char *ewk_history_item_title_alternate_get(const Ewk_History_Item *item); +EAPI void ewk_history_item_title_alternate_set(Ewk_History_Item *item, const char *title); +EAPI const char *ewk_history_item_uri_get(const Ewk_History_Item *item); +EAPI const char *ewk_history_item_uri_original_get(const Ewk_History_Item *item); +EAPI double ewk_history_item_time_last_visited_get(const Ewk_History_Item *item); + +EAPI cairo_surface_t *ewk_history_item_icon_surface_get(const Ewk_History_Item *item); +EAPI Evas_Object *ewk_history_item_icon_object_add(const Ewk_History_Item *item, Evas *canvas); + +EAPI Eina_Bool ewk_history_item_page_cache_exists(const Ewk_History_Item *item); +EAPI int ewk_history_item_visit_count(const Ewk_History_Item *item); +EAPI Eina_Bool ewk_history_item_visit_last_failed(const Ewk_History_Item *item); + +#ifdef __cplusplus +} +#endif +#endif // ewk_history_h diff --git a/WebKit/efl/ewk/ewk_logging.h b/WebKit/efl/ewk/ewk_logging.h new file mode 100644 index 0000000..045bd9c --- /dev/null +++ b/WebKit/efl/ewk/ewk_logging.h @@ -0,0 +1,31 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ewk_logging_h +#define ewk_logging_h + +extern int _ewk_log_dom; +#define CRITICAL(...) EINA_LOG_DOM_CRIT(_ewk_log_dom, __VA_ARGS__) +#define ERR(...) EINA_LOG_DOM_ERR(_ewk_log_dom, __VA_ARGS__) +#define WRN(...) EINA_LOG_DOM_WARN(_ewk_log_dom, __VA_ARGS__) +#define INF(...) EINA_LOG_DOM_INFO(_ewk_log_dom, __VA_ARGS__) +#define DBG(...) EINA_LOG_DOM_DBG(_ewk_log_dom, __VA_ARGS__) + +#endif // ewk_logging_h diff --git a/WebKit/efl/ewk/ewk_main.cpp b/WebKit/efl/ewk/ewk_main.cpp new file mode 100644 index 0000000..2c69b36 --- /dev/null +++ b/WebKit/efl/ewk/ewk_main.cpp @@ -0,0 +1,152 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "ewk_main.h" + +#include "EWebKit.h" +#include "Logging.h" +#include "PageCache.h" +#include "PageGroup.h" +#include "ewk_private.h" +#include "runtime/InitializeThreading.h" + +#include <Ecore.h> +#include <Ecore_Evas.h> +#include <Edje.h> +#include <Eina.h> +#include <Evas.h> + +#ifdef ENABLE_GLIB_SUPPORT +#include <glib-object.h> +#include <glib.h> + +#ifdef ENABLE_GTK_PLUGINS_SUPPORT +#include <gtk/gtk.h> +#endif + +#endif + +// REMOVE-ME: see todo below +#include "ResourceHandle.h" +#include <libsoup/soup.h> + +static int _ewk_init_count = 0; +int _ewk_log_dom = -1; + +int ewk_init(void) +{ + if (_ewk_init_count) + return ++_ewk_init_count; + + if (!eina_init()) + goto error_eina; + + _ewk_log_dom = eina_log_domain_register("ewebkit", EINA_COLOR_ORANGE); + if (_ewk_log_dom < 0) { + EINA_LOG_CRIT("could not register log domain 'ewebkit'"); + goto error_log_domain; + } + + if (!evas_init()) { + CRITICAL("could not init evas."); + goto error_evas; + } + + if (!ecore_init()) { + CRITICAL("could not init ecore."); + goto error_ecore; + } + + if (!ecore_evas_init()) { + CRITICAL("could not init ecore_evas."); + goto error_ecore_evas; + } + + if (!edje_init()) { + CRITICAL("could not init edje."); + goto error_edje; + } + +#ifdef ENABLE_GLIB_SUPPORT + g_type_init(); + + if (!g_thread_supported()) + g_thread_init(0); + +#ifdef ENABLE_GTK_PLUGINS_SUPPORT + gdk_threads_init(); + if (!gtk_init_check(0, 0)) + WRN("Could not initialize GTK support."); +#endif + + if (!ecore_main_loop_glib_integrate()) + WRN("Ecore was not compiled with GLib support, some plugins will not " + "work (ie: Adobe Flash)"); +#endif + + JSC::initializeThreading(); + WebCore::InitializeLoggingChannelsIfNecessary(); + + // Page cache capacity (in pages). Comment from Mac port: + // (Research indicates that value / page drops substantially after 3 pages.) + // FIXME: Expose this with an API and/or calculate based on available resources + WebCore::pageCache()->setCapacity(3); + WebCore::PageGroup::setShouldTrackVisitedLinks(true); + + // TODO: this should move to WebCore, already reported to webkit-gtk folks: + if (1) { + SoupSession* session = WebCore::ResourceHandle::defaultSession(); + soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_SNIFFER); + } + + return ++_ewk_init_count; + +error_edje: + ecore_evas_shutdown(); +error_ecore_evas: + ecore_shutdown(); +error_ecore: + evas_shutdown(); +error_evas: + eina_log_domain_unregister(_ewk_log_dom); + _ewk_log_dom = -1; +error_log_domain: + eina_shutdown(); +error_eina: + return 0; +} + +int ewk_shutdown(void) +{ + _ewk_init_count--; + if (_ewk_init_count) + return _ewk_init_count; + + ecore_evas_shutdown(); + ecore_shutdown(); + evas_shutdown(); + eina_log_domain_unregister(_ewk_log_dom); + _ewk_log_dom = -1; + eina_shutdown(); + + return 0; +} + diff --git a/WebKit/efl/ewk/ewk_main.h b/WebKit/efl/ewk/ewk_main.h new file mode 100644 index 0000000..3730e88 --- /dev/null +++ b/WebKit/efl/ewk/ewk_main.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ewk_main_h +#define ewk_main_h + +#include "ewk_eapi.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EAPI int ewk_init(void); +EAPI int ewk_shutdown(void); + +#ifdef __cplusplus +} +#endif +#endif // ewk_main_h diff --git a/WebKit/efl/ewk/ewk_private.h b/WebKit/efl/ewk/ewk_private.h new file mode 100644 index 0000000..947bd79 --- /dev/null +++ b/WebKit/efl/ewk/ewk_private.h @@ -0,0 +1,115 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ewk_private_h +#define ewk_private_h + +#include "BackForwardList.h" +#include "EWebKit.h" +#include "Frame.h" +#include "Page.h" +#include "Settings.h" +#include "Widget.h" +#include "ewk_logging.h" +#include "ewk_util.h" + +#include <cairo.h> +#include <wtf/PassRefPtr.h> +#include <wtf/Vector.h> + +#ifdef __cplusplus +extern "C" { +#endif + +// If defined, ewk will do type checking to ensure objects are of correct type +#define EWK_TYPE_CHECK 1 + +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); + +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_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_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_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); +void ewk_view_exceeded_database_quota(Evas_Object *o, Evas_Object *frame, const char *databaseName); + +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); + +Ewk_History *ewk_history_new(WebCore::BackForwardList *history); +void ewk_history_free(Ewk_History *history); + +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); + +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_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); + +#ifdef __cplusplus + +} +#endif +#endif // ewk_private_h diff --git a/WebKit/efl/ewk/ewk_settings.cpp b/WebKit/efl/ewk/ewk_settings.cpp new file mode 100644 index 0000000..0822dc2 --- /dev/null +++ b/WebKit/efl/ewk/ewk_settings.cpp @@ -0,0 +1,190 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "ewk_settings.h" + +#include "EWebKit.h" +#include "IconDatabase.h" +#include "Image.h" +#include "IntSize.h" +#include "KURL.h" +#include "ewk_private.h" +#include <wtf/text/CString.h> + +#include <eina_safety_checks.h> +#include <errno.h> +#include <string.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <unistd.h> + +static uint64_t _ewk_default_web_database_quota = 1 * 1024; + +/** + * Returns the default quota for Web Database databases. By default + * this value is 1MB. + * + * @return the current default database quota in bytes + **/ +uint64_t ewk_settings_web_database_default_quota_get() +{ + return _ewk_default_web_database_quota; +} + +/** + * Sets directory where to store icon database, opening database. + * + * @param directory where to store icon database, must be + * write-able. If @c NULL is given, then database is closed. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE on errors. + */ +Eina_Bool ewk_settings_icon_database_path_set(const char *directory) +{ + WebCore::iconDatabase()->delayDatabaseCleanup(); + + if (directory) { + struct stat st; + + if (stat(directory, &st)) { + ERR("could not stat(%s): %s", directory, strerror(errno)); + return EINA_FALSE; + } + + if (!S_ISDIR(st.st_mode)) { + ERR("not a directory: %s", directory); + return EINA_FALSE; + } + + if (access(directory, R_OK | W_OK)) { + ERR("could not access directory '%s' for read and write: %s", + directory, strerror(errno)); + return EINA_FALSE; + } + + WebCore::iconDatabase()->setEnabled(true); + WebCore::iconDatabase()->open(WebCore::String::fromUTF8(directory)); + } else { + WebCore::iconDatabase()->setEnabled(false); + WebCore::iconDatabase()->close(); + } + return EINA_TRUE; +} + +/** + * Return directory path where icon database is stored. + * + * @return newly allocated string with database path or @c NULL if + * none is set or database is closed. Note that return must be + * freed with free() as it's a strdup()ed copy of the string + * due reference counting. + */ +char* ewk_settings_icon_database_path_get(void) +{ + if (!WebCore::iconDatabase()->isEnabled()) + return 0; + if (!WebCore::iconDatabase()->isOpen()) + return 0; + + WebCore::String path = WebCore::iconDatabase()->databasePath(); + if (path.isEmpty()) + return 0; + return strdup(path.utf8().data()); +} + +/** + * Remove all known icons from database. + * + * Database must be opened with ewk_settings_icon_database_path_set() + * in order to work. + * + * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise, like + * closed database. + */ +Eina_Bool ewk_settings_icon_database_clear(void) +{ + if (!WebCore::iconDatabase()->isEnabled()) + return EINA_FALSE; + if (!WebCore::iconDatabase()->isOpen()) + return EINA_FALSE; + + WebCore::iconDatabase()->removeAllIcons(); + return EINA_TRUE; +} + +/** + * Query icon for given URL, returning associated cairo surface. + * + * @note in order to have this working, one must open icon database + * with ewk_settings_icon_database_path_set(). + * + * @param url which url to query icon. + * + * @return cairo surface if any, or NULL on failure. + */ +cairo_surface_t* ewk_settings_icon_database_icon_surface_get(const char *url) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0); + + WebCore::KURL kurl(WebCore::KURL(), WebCore::String::fromUTF8(url)); + WebCore::Image *icon = WebCore::iconDatabase()->iconForPageURL(kurl.string(), WebCore::IntSize(16, 16)); + + if (!icon) { + ERR("no icon for url %s", url); + return 0; + } + + return icon->nativeImageForCurrentFrame(); +} + +/** + * Create Evas_Object of type image representing the given URL. + * + * This is an utility function that creates an Evas_Object of type + * image set to have fill always match object size + * (evas_object_image_filled_add()), saving some code to use it from Evas. + * + * @note in order to have this working, one must open icon database + * with ewk_settings_icon_database_path_set(). + * + * @param url which url to query icon. + * @param canvas evas instance where to add resulting object. + * + * @return newly allocated Evas_Object instance or @c NULL on + * errors. Delete the object with evas_object_del(). + */ +Evas_Object* ewk_settings_icon_database_icon_object_add(const char* url, Evas* canvas) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0); + + WebCore::KURL kurl(WebCore::KURL(), WebCore::String::fromUTF8(url)); + WebCore::Image* icon = WebCore::iconDatabase()->iconForPageURL(kurl.string(), WebCore::IntSize(16, 16)); + cairo_surface_t* surface; + + if (!icon) { + ERR("no icon for url %s", url); + return 0; + } + + surface = icon->nativeImageForCurrentFrame(); + return ewk_util_image_from_cairo_surface_add(canvas, surface); +} diff --git a/WebKit/efl/ewk/ewk_settings.h b/WebKit/efl/ewk/ewk_settings.h new file mode 100644 index 0000000..e843fd1 --- /dev/null +++ b/WebKit/efl/ewk/ewk_settings.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ewk_settings_h +#define ewk_settings_h + +#include "ewk_eapi.h" + +#include <Eina.h> +#include <Evas.h> +#include <cairo.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @file + * + * General purpose settings, not tied to any view object. + */ + +EAPI uint64_t ewk_settings_web_database_default_quota_get(); + +EAPI Eina_Bool ewk_settings_icon_database_path_set(const char *path); +EAPI char *ewk_settings_icon_database_path_get(void); +EAPI Eina_Bool ewk_settings_icon_database_clear(void); + +EAPI cairo_surface_t *ewk_settings_icon_database_icon_surface_get(const char *url); +EAPI Evas_Object *ewk_settings_icon_database_icon_object_add(const char *url, Evas *canvas); + + +#ifdef __cplusplus +} +#endif +#endif // ewk_settings_h diff --git a/WebKit/efl/ewk/ewk_util.cpp b/WebKit/efl/ewk/ewk_util.cpp new file mode 100644 index 0000000..bf82695 --- /dev/null +++ b/WebKit/efl/ewk/ewk_util.cpp @@ -0,0 +1,98 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "ewk_util.h" + +#include "ewk_private.h" +#include <eina_safety_checks.h> + +Evas_Object* ewk_util_image_from_cairo_surface_add(Evas* canvas, cairo_surface_t* surface) +{ + cairo_status_t status; + cairo_surface_type_t type; + cairo_format_t format; + int w, h, stride; + Evas_Object* image; + const void* src; + void* dst; + + EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(surface, 0); + + status = cairo_surface_status(surface); + if (status != CAIRO_STATUS_SUCCESS) { + ERR("cairo surface is invalid: %s", cairo_status_to_string(status)); + return 0; + } + + type = cairo_surface_get_type(surface); + if (type != CAIRO_SURFACE_TYPE_IMAGE) { + ERR("unknown surface type %d, required %d (CAIRO_SURFACE_TYPE_IMAGE).", + type, CAIRO_SURFACE_TYPE_IMAGE); + return 0; + } + + format = cairo_image_surface_get_format(surface); + if (format != CAIRO_FORMAT_ARGB32 && format != CAIRO_FORMAT_RGB24) { + ERR("unknown surface format %d, expected %d or %d.", + format, CAIRO_FORMAT_ARGB32, CAIRO_FORMAT_RGB24); + return 0; + } + + w = cairo_image_surface_get_width(surface); + h = cairo_image_surface_get_height(surface); + stride = cairo_image_surface_get_stride(surface); + if (w <= 0 || h <= 0 || stride <= 0) { + ERR("invalid image size %dx%d, stride=%d", w, h, stride); + return 0; + } + + src = cairo_image_surface_get_data(surface); + if (!src) { + ERR("could not get source data."); + return 0; + } + + image = evas_object_image_filled_add(canvas); + if (!image) { + ERR("could not add image to canvas."); + return 0; + } + + evas_object_image_colorspace_set(image, EVAS_COLORSPACE_ARGB8888); + evas_object_image_size_set(image, w, h); + evas_object_image_alpha_set(image, format == CAIRO_FORMAT_ARGB32); + + if (evas_object_image_stride_get(image) * 4 != stride) { + ERR("evas' stride %d diverges from cairo's %d.", + evas_object_image_stride_get(image) * 4, stride); + evas_object_del(image); + return 0; + } + + dst = evas_object_image_data_get(image, EINA_TRUE); + memcpy(dst, src, h * stride); + evas_object_image_data_set(image, dst); + + evas_object_resize(image, w, h); // helpful but not really required + + return image; +} diff --git a/WebKit/efl/ewk/ewk_util.h b/WebKit/efl/ewk/ewk_util.h new file mode 100644 index 0000000..d9c8f9c --- /dev/null +++ b/WebKit/efl/ewk/ewk_util.h @@ -0,0 +1,29 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ewk_util_h +#define ewk_util_h + +#include <Evas.h> +#include <cairo.h> + +Evas_Object* ewk_util_image_from_cairo_surface_add(Evas* canvas, cairo_surface_t* surface); + +#endif // ewk_util_h diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp new file mode 100644 index 0000000..eeb6535 --- /dev/null +++ b/WebKit/efl/ewk/ewk_view.cpp @@ -0,0 +1,3644 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "ewk_view.h" + +#include "ChromeClientEfl.h" +#include "ContextMenuClientEfl.h" +#include "DocumentLoader.h" +#include "DragClientEfl.h" +#include "EWebKit.h" +#include "EditorClientEfl.h" +#include "FocusController.h" +#include "FrameLoaderClientEfl.h" +#include "FrameView.h" +#include "GraphicsContext.h" +#include "InspectorClientEfl.h" +#include "PopupMenuClient.h" +#include "ProgressTracker.h" +#include "ewk_private.h" + +#include <Ecore.h> +#include <Eina.h> +#include <Evas.h> +#include <eina_safety_checks.h> +#include <sys/time.h> + +#define ZOOM_MIN (0.05) +#define ZOOM_MAX (4.0) + +static const char EWK_VIEW_TYPE_STR[] = "EWK_View"; + +static const size_t EWK_VIEW_REPAINTS_SIZE_INITIAL = 32; +static const size_t EWK_VIEW_REPAINTS_SIZE_STEP = 8; +static const size_t EWK_VIEW_REPAINTS_SIZE_MAX_FREE = 64; + +static const size_t EWK_VIEW_SCROLLS_SIZE_INITIAL = 8; +static const size_t EWK_VIEW_SCROLLS_SIZE_STEP = 2; +static const size_t EWK_VIEW_SCROLLS_SIZE_MAX_FREE = 32; + +struct _Ewk_View_Private_Data { + WebCore::Page* page; + WebCore::Settings* page_settings; + WebCore::Frame* main_frame; + Ewk_History* history; + struct { + Ewk_Menu menu; + WebCore::PopupMenuClient* menu_client; + } popup; + struct { + Eina_Rectangle* array; + size_t count; + size_t allocated; + } repaints; + struct { + Ewk_Scroll_Request* array; + size_t count; + size_t allocated; + } scrolls; + struct { + const char* user_agent; + const char* user_stylesheet; + const char* encoding_default; + const char* encoding_custom; + int font_minimum_size; + int font_minimum_logical_size; + int font_default_size; + int font_monospace_size; + const char* font_standard; + const char* font_cursive; + const char* font_monospace; + const char* font_fantasy; + const char* font_serif; + const char* font_sans_serif; + Eina_Bool auto_load_images:1; + Eina_Bool auto_shrink_images:1; + Eina_Bool enable_scripts:1; + Eina_Bool enable_plugins:1; + Eina_Bool scripts_window_open:1; + Eina_Bool resizable_textareas:1; + Eina_Bool private_browsing:1; + Eina_Bool caret_browsing:1; + } settings; + struct { + struct { + double start; + double end; + double duration; + } time; + struct { + float start; + float end; + float range; + } zoom; + struct { + Evas_Coord x, y; + } center; + Ecore_Animator* animator; + } animated_zoom; + struct { + Evas_Coord w, h; + Eina_Bool use:1; + } fixed_layout; +}; + +#ifndef EWK_TYPE_CHECK +#define EWK_VIEW_TYPE_CHECK(o, ...) do { } while (0) +#else +#define EWK_VIEW_TYPE_CHECK(o, ...) \ + do { \ + const char* _tmp_otype = evas_object_type_get(o); \ + const Evas_Smart* _tmp_s = evas_object_smart_smart_get(o); \ + if (EINA_UNLIKELY(!_tmp_s)) { \ + EINA_LOG_CRIT \ + ("%p (%s) is not a smart object!", o, \ + _tmp_otype ? _tmp_otype : "(null)"); \ + return __VA_ARGS__; \ + } \ + const Evas_Smart_Class* _tmp_sc = evas_smart_class_get(_tmp_s); \ + if (EINA_UNLIKELY(!_tmp_sc)) { \ + EINA_LOG_CRIT \ + ("%p (%s) is not a smart object!", o, \ + _tmp_otype ? _tmp_otype : "(null)"); \ + return __VA_ARGS__; \ + } \ + if (EINA_UNLIKELY(_tmp_sc->data != EWK_VIEW_TYPE_STR)) { \ + EINA_LOG_CRIT \ + ("%p (%s) is not of an ewk_view (need %p, got %p)!", \ + o, _tmp_otype ? _tmp_otype : "(null)", \ + EWK_VIEW_TYPE_STR, _tmp_sc->data); \ + return __VA_ARGS__; \ + } \ + } while (0) +#endif + +#define EWK_VIEW_SD_GET(o, ptr) \ + Ewk_View_Smart_Data* ptr = (Ewk_View_Smart_Data*)evas_object_smart_data_get(o) + +#define EWK_VIEW_SD_GET_OR_RETURN(o, ptr, ...) \ + EWK_VIEW_TYPE_CHECK(o, __VA_ARGS__); \ + EWK_VIEW_SD_GET(o, ptr); \ + if (!ptr) { \ + CRITICAL("no smart data for object %p (%s)", \ + o, evas_object_type_get(o)); \ + return __VA_ARGS__; \ + } + +#define EWK_VIEW_PRIV_GET(sd, ptr) \ + Ewk_View_Private_Data* ptr = sd->_priv + +#define EWK_VIEW_PRIV_GET_OR_RETURN(sd, ptr, ...) \ + EWK_VIEW_PRIV_GET(sd, ptr); \ + if (!ptr) { \ + CRITICAL("no private data for object %p (%s)", \ + sd->self, evas_object_type_get(sd->self)); \ + return __VA_ARGS__; \ + } + +static void _ewk_view_smart_changed(Ewk_View_Smart_Data* sd) +{ + if (sd->changed.any) + return; + sd->changed.any = EINA_TRUE; + evas_object_smart_changed(sd->self); +} + +static Eina_Bool _ewk_view_repaints_resize(Ewk_View_Private_Data* priv, size_t size) +{ + void* tmp = realloc(priv->repaints.array, size * sizeof(Eina_Rectangle)); + if (!tmp) { + CRITICAL("could not realloc repaints array to %zu elements.", size); + return EINA_FALSE; + } + priv->repaints.allocated = size; + priv->repaints.array = (Eina_Rectangle*)tmp; + return EINA_TRUE; +} + +static void _ewk_view_repaint_add(Ewk_View_Private_Data* priv, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) +{ + Eina_Rectangle* r; + + // fprintf(stderr, ">>> repaint requested: %d,%d+%dx%d\n", x, y, w, h); + if (priv->repaints.allocated == priv->repaints.count) { + size_t size; + if (!priv->repaints.allocated) + size = EWK_VIEW_REPAINTS_SIZE_INITIAL; + else + size = priv->repaints.allocated + EWK_VIEW_REPAINTS_SIZE_STEP; + if (!_ewk_view_repaints_resize(priv, size)) + return; + } + + r = priv->repaints.array + priv->repaints.count; + priv->repaints.count++; + + r->x = x; + r->y = y; + r->w = w; + r->h = h; + + DBG("add repaint %d,%d+%dx%d", x, y, w, h); +} + +static void _ewk_view_repaints_flush(Ewk_View_Private_Data* priv) +{ + priv->repaints.count = 0; + if (priv->repaints.allocated <= EWK_VIEW_REPAINTS_SIZE_MAX_FREE) + return; + _ewk_view_repaints_resize(priv, EWK_VIEW_REPAINTS_SIZE_MAX_FREE); +} + +static Eina_Bool _ewk_view_scrolls_resize(Ewk_View_Private_Data* priv, size_t size) +{ + void* tmp = realloc(priv->scrolls.array, size * sizeof(Ewk_Scroll_Request)); + if (!tmp) { + CRITICAL("could not realloc scrolls array to %zu elements.", size); + return EINA_FALSE; + } + priv->scrolls.allocated = size; + priv->scrolls.array = (Ewk_Scroll_Request*)tmp; + return EINA_TRUE; +} + +static void _ewk_view_scroll_add(Ewk_View_Private_Data* priv, Evas_Coord dx, Evas_Coord dy, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool main_scroll) +{ + Ewk_Scroll_Request* r; + Ewk_Scroll_Request* r_end; + Evas_Coord x2 = x + w, y2 = y + h; + + r = priv->scrolls.array; + r_end = r + priv->scrolls.count; + for (; r < r_end; r++) { + if (r->x == x && r->y == y && r->w == w && r->h == h) { + DBG("region already scrolled %d,%d+%dx%d %+03d,%+03d add " + "%+03d,%+03d", + r->x, r->y, r->w, r->h, r->dx, r->dy, dx, dy); + r->dx += dx; + r->dy += dy; + return; + } + if ((x <= r->x && x2 >= r->x2) && (y <= r->y && y2 >= r->y2)) { + DBG("old viewport (%d,%d+%dx%d %+03d,%+03d) was scrolled itself, " + "add %+03d,%+03d", + r->x, r->y, r->w, r->h, r->dx, r->dy, dx, dy); + r->x += dx; + r->y += dy; + } + } + + if (priv->scrolls.allocated == priv->scrolls.count) { + size_t size; + if (!priv->scrolls.allocated) + size = EWK_VIEW_SCROLLS_SIZE_INITIAL; + else + size = priv->scrolls.allocated + EWK_VIEW_SCROLLS_SIZE_STEP; + if (!_ewk_view_scrolls_resize(priv, size)) + return; + } + + r = priv->scrolls.array + priv->scrolls.count; + priv->scrolls.count++; + + r->x = x; + r->y = y; + r->w = w; + r->h = h; + r->x2 = x2; + r->y2 = y2; + r->dx = dx; + r->dy = dy; + r->main_scroll = main_scroll; + DBG("add scroll in region: %d,%d+%dx%d %+03d,%+03d", x, y, w, h, dx, dy); + + Eina_Rectangle* pr; + Eina_Rectangle* pr_end; + size_t count; + pr = priv->repaints.array; + count = priv->repaints.count; + pr_end = pr + count; + for (; pr < pr_end; pr++) { + pr->x += dx; + pr->y += dy; + } +} + +static void _ewk_view_scrolls_flush(Ewk_View_Private_Data* priv) +{ + priv->scrolls.count = 0; + if (priv->scrolls.allocated <= EWK_VIEW_SCROLLS_SIZE_MAX_FREE) + return; + _ewk_view_scrolls_resize(priv, EWK_VIEW_SCROLLS_SIZE_MAX_FREE); +} + +// Default Event Handling ////////////////////////////////////////////// +static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* sd) +{ + EWK_VIEW_PRIV_GET(sd, priv); + WebCore::FocusController* fc = priv->page->focusController(); + DBG("o=%p, fc=%p", sd->self, fc); + EINA_SAFETY_ON_NULL_RETURN_VAL(fc, EINA_FALSE); + + fc->setActive(true); + fc->setFocused(true); + return EINA_TRUE; +} + +static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* sd) +{ + EWK_VIEW_PRIV_GET(sd, priv); + WebCore::FocusController* fc = priv->page->focusController(); + DBG("o=%p, fc=%p", sd->self, fc); + EINA_SAFETY_ON_NULL_RETURN_VAL(fc, EINA_FALSE); + + fc->setActive(false); + fc->setFocused(false); + return EINA_TRUE; +} + +static Eina_Bool _ewk_view_smart_mouse_wheel(Ewk_View_Smart_Data* sd, const Evas_Event_Mouse_Wheel* ev) +{ + return ewk_frame_feed_mouse_wheel(sd->main_frame, ev); +} + +static Eina_Bool _ewk_view_smart_mouse_down(Ewk_View_Smart_Data* sd, const Evas_Event_Mouse_Down* ev) +{ + return ewk_frame_feed_mouse_down(sd->main_frame, ev); +} + +static Eina_Bool _ewk_view_smart_mouse_up(Ewk_View_Smart_Data* sd, const Evas_Event_Mouse_Up* ev) +{ + return ewk_frame_feed_mouse_up(sd->main_frame, ev); +} + +static Eina_Bool _ewk_view_smart_mouse_move(Ewk_View_Smart_Data* sd, const Evas_Event_Mouse_Move* ev) +{ + return ewk_frame_feed_mouse_move(sd->main_frame, ev); +} + +static Eina_Bool _ewk_view_smart_key_down(Ewk_View_Smart_Data* sd, const Evas_Event_Key_Down* ev) +{ + Evas_Object* frame = ewk_view_frame_focused_get(sd->self); + + if (!frame) + frame = sd->main_frame; + + return ewk_frame_feed_key_down(frame, ev); +} + +static Eina_Bool _ewk_view_smart_key_up(Ewk_View_Smart_Data* sd, const Evas_Event_Key_Up* ev) +{ + Evas_Object* frame = ewk_view_frame_focused_get(sd->self); + + if (!frame) + frame = sd->main_frame; + + return ewk_frame_feed_key_up(frame, ev); +} + +static void _ewk_view_smart_add_console_message(Ewk_View_Smart_Data* sd, const char* message, unsigned int lineNumber, const char* sourceID) +{ + INF("console message: %s @%d: %s\n", sourceID, lineNumber, message); +} + +static void _ewk_view_smart_run_javascript_alert(Ewk_View_Smart_Data* sd, Evas_Object* frame, const char* message) +{ + INF("javascript alert: %s\n", message); +} + +static Eina_Bool _ewk_view_smart_run_javascript_confirm(Ewk_View_Smart_Data* sd, Evas_Object* frame, const char* message) +{ + INF("javascript confirm: %s", message); + INF("javascript confirm (HARD CODED)? YES"); + return EINA_TRUE; +} + +static Eina_Bool _ewk_view_smart_should_interrupt_javascript(Ewk_View_Smart_Data* sd) +{ + INF("should interrupt javascript?\n" + "\t(HARD CODED) NO"); + return EINA_FALSE; +} + +static Eina_Bool _ewk_view_smart_run_javascript_prompt(Ewk_View_Smart_Data* sd, Evas_Object* frame, const char* message, const char* defaultValue, char** value) +{ + *value = strdup("test"); + Eina_Bool ret = EINA_TRUE; + INF("javascript prompt:\n" + "\t message: %s\n" + "\tdefault value: %s\n" + "\tgiving answer: %s\n" + "\t button: %s", message, defaultValue, *value, ret?"ok":"cancel"); + + return ret; +} + +// Event Handling ////////////////////////////////////////////////////// +static void _ewk_view_on_focus_in(void* data, Evas* e, Evas_Object* o, void* event_info) +{ + Ewk_View_Smart_Data* sd = (Ewk_View_Smart_Data*)data; + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->focus_in); + sd->api->focus_in(sd); +} + +static void _ewk_view_on_focus_out(void* data, Evas* e, Evas_Object* o, void* event_info) +{ + Ewk_View_Smart_Data* sd = (Ewk_View_Smart_Data*)data; + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->focus_out); + sd->api->focus_out(sd); +} + +static void _ewk_view_on_mouse_wheel(void* data, Evas* e, Evas_Object* o, void* event_info) +{ + Evas_Event_Mouse_Wheel* ev = (Evas_Event_Mouse_Wheel*)event_info; + Ewk_View_Smart_Data* sd = (Ewk_View_Smart_Data*)data; + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->mouse_wheel); + sd->api->mouse_wheel(sd, ev); +} + +static void _ewk_view_on_mouse_down(void* data, Evas* e, Evas_Object* o, void* event_info) +{ + Evas_Event_Mouse_Down* ev = (Evas_Event_Mouse_Down*)event_info; + Ewk_View_Smart_Data* sd = (Ewk_View_Smart_Data*)data; + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->mouse_down); + sd->api->mouse_down(sd, ev); +} + +static void _ewk_view_on_mouse_up(void* data, Evas* e, Evas_Object* o, void* event_info) +{ + Evas_Event_Mouse_Up* ev = (Evas_Event_Mouse_Up*)event_info; + Ewk_View_Smart_Data* sd = (Ewk_View_Smart_Data*)data; + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->mouse_up); + sd->api->mouse_up(sd, ev); +} + +static void _ewk_view_on_mouse_move(void* data, Evas* e, Evas_Object* o, void* event_info) +{ + Evas_Event_Mouse_Move* ev = (Evas_Event_Mouse_Move*)event_info; + Ewk_View_Smart_Data* sd = (Ewk_View_Smart_Data*)data; + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->mouse_move); + sd->api->mouse_move(sd, ev); +} + +static void _ewk_view_on_key_down(void* data, Evas* e, Evas_Object* o, void* event_info) +{ + Evas_Event_Key_Down* ev = (Evas_Event_Key_Down*)event_info; + Ewk_View_Smart_Data* sd = (Ewk_View_Smart_Data*)data; + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->key_down); + sd->api->key_down(sd, ev); +} + +static void _ewk_view_on_key_up(void* data, Evas* e, Evas_Object* o, void* event_info) +{ + Evas_Event_Key_Up* ev = (Evas_Event_Key_Up*)event_info; + Ewk_View_Smart_Data* sd = (Ewk_View_Smart_Data*)data; + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->key_up); + sd->api->key_up(sd, ev); +} + +static WTF::PassRefPtr<WebCore::Frame> _ewk_view_core_frame_new(Ewk_View_Smart_Data* sd, Ewk_View_Private_Data* priv, WebCore::HTMLFrameOwnerElement* owner) +{ + WebCore::FrameLoaderClientEfl* flc = new WebCore::FrameLoaderClientEfl(sd->self); + if (!flc) { + CRITICAL("Could not create frame loader client."); + return 0; + } + flc->setCustomUserAgent(WebCore::String::fromUTF8(priv->settings.user_agent)); + + return WebCore::Frame::create(priv->page, owner, flc); +} + +static Evas_Smart_Class _parent_sc = EVAS_SMART_CLASS_INIT_0; + +static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) +{ + Ewk_View_Private_Data* priv = + (Ewk_View_Private_Data*)calloc(1, sizeof(Ewk_View_Private_Data)); + WebCore::AtomicString s; + WebCore::KURL url; + + if (!priv) { + CRITICAL("could not allocate Ewk_View_Private_Data"); + return 0; + } + priv->page = new WebCore::Page( + static_cast<WebCore::ChromeClient*>(new WebCore::ChromeClientEfl(sd->self)), + static_cast<WebCore::ContextMenuClient*>(new WebCore::ContextMenuClientEfl(sd->self)), + static_cast<WebCore::EditorClient*>(new WebCore::EditorClientEfl(sd->self)), + static_cast<WebCore::DragClient*>(new WebCore::DragClientEfl), + static_cast<WebCore::InspectorClient*>(new WebCore::InspectorClientEfl), + 0, + 0); + if (!priv->page) { + CRITICAL("Could not create WebKit Page"); + goto error_page; + } + + priv->page_settings = priv->page->settings(); + if (!priv->page_settings) { + CRITICAL("Could not get page settings."); + goto error_settings; + } + + priv->page_settings->setLoadsImagesAutomatically(true); + priv->page_settings->setDefaultFixedFontSize(12); + priv->page_settings->setDefaultFontSize(16); + priv->page_settings->setSerifFontFamily("serif"); + priv->page_settings->setFixedFontFamily("monotype"); + priv->page_settings->setSansSerifFontFamily("sans"); + priv->page_settings->setStandardFontFamily("sans"); + priv->page_settings->setJavaScriptEnabled(true); + priv->page_settings->setPluginsEnabled(true); + + url = priv->page_settings->userStyleSheetLocation(); + priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data()); + + priv->settings.encoding_default = eina_stringshare_add + (priv->page_settings->defaultTextEncodingName().utf8().data()); + priv->settings.encoding_custom = 0; + + priv->settings.font_minimum_size = priv->page_settings->minimumFontSize(); + priv->settings.font_minimum_logical_size = priv->page_settings->minimumLogicalFontSize(); + priv->settings.font_default_size = priv->page_settings->defaultFontSize(); + priv->settings.font_monospace_size = priv->page_settings->defaultFixedFontSize(); + + s = priv->page_settings->standardFontFamily(); + priv->settings.font_standard = eina_stringshare_add(s.string().utf8().data()); + s = priv->page_settings->cursiveFontFamily(); + priv->settings.font_cursive = eina_stringshare_add(s.string().utf8().data()); + s = priv->page_settings->fixedFontFamily(); + priv->settings.font_monospace = eina_stringshare_add(s.string().utf8().data()); + s = priv->page_settings->fantasyFontFamily(); + priv->settings.font_fantasy = eina_stringshare_add(s.string().utf8().data()); + s = priv->page_settings->serifFontFamily(); + priv->settings.font_serif = eina_stringshare_add(s.string().utf8().data()); + s = priv->page_settings->sansSerifFontFamily(); + priv->settings.font_sans_serif = eina_stringshare_add(s.string().utf8().data()); + + priv->settings.auto_load_images = priv->page_settings->loadsImagesAutomatically(); + priv->settings.auto_shrink_images = priv->page_settings->shrinksStandaloneImagesToFit(); + priv->settings.enable_scripts = priv->page_settings->isJavaScriptEnabled(); + priv->settings.enable_plugins = priv->page_settings->arePluginsEnabled(); + priv->settings.scripts_window_open = priv->page_settings->allowScriptsToCloseWindows(); + priv->settings.resizable_textareas = priv->page_settings->textAreasAreResizable(); + priv->settings.private_browsing = priv->page_settings->privateBrowsingEnabled(); + priv->settings.caret_browsing = priv->page_settings->caretBrowsingEnabled(); + + priv->main_frame = _ewk_view_core_frame_new(sd, priv, 0).get(); + if (!priv->main_frame) { + CRITICAL("Could not create main frame."); + goto error_main_frame; + } + + priv->history = ewk_history_new(priv->page->backForwardList()); + if (!priv->history) { + CRITICAL("Could not create history instance for view."); + goto error_history; + } + + return priv; + +error_history: + // delete priv->main_frame; /* do not delete priv->main_frame */ +error_main_frame: +error_settings: + delete priv->page; +error_page: + free(priv); + return 0; +} + +static void _ewk_view_priv_del(Ewk_View_Private_Data* priv) +{ + if (!priv) + return; + + /* do not delete priv->main_frame */ + + free(priv->repaints.array); + free(priv->scrolls.array); + + eina_stringshare_del(priv->settings.user_agent); + eina_stringshare_del(priv->settings.user_stylesheet); + eina_stringshare_del(priv->settings.encoding_default); + eina_stringshare_del(priv->settings.encoding_custom); + eina_stringshare_del(priv->settings.font_standard); + eina_stringshare_del(priv->settings.font_cursive); + eina_stringshare_del(priv->settings.font_monospace); + eina_stringshare_del(priv->settings.font_fantasy); + eina_stringshare_del(priv->settings.font_serif); + eina_stringshare_del(priv->settings.font_sans_serif); + + if (priv->animated_zoom.animator) + ecore_animator_del(priv->animated_zoom.animator); + + ewk_history_free(priv->history); + + delete priv->page; + free(priv); +} + +static void _ewk_view_smart_add(Evas_Object* o) +{ + const Evas_Smart* smart = evas_object_smart_smart_get(o); + const Evas_Smart_Class* sc = evas_smart_class_get(smart); + const Ewk_View_Smart_Class* api = (const Ewk_View_Smart_Class*)sc; + EINA_SAFETY_ON_NULL_RETURN(api->backing_store_add); + EWK_VIEW_SD_GET(o, sd); + + if (!sd) { + sd = (Ewk_View_Smart_Data*)calloc(1, sizeof(Ewk_View_Smart_Data)); + if (!sd) + CRITICAL("could not allocate Ewk_View_Smart_Data"); + else + evas_object_smart_data_set(o, sd); + } + + sd->bg_color.r = 255; + sd->bg_color.g = 255; + sd->bg_color.b = 255; + sd->bg_color.a = 255; + + sd->self = o; + sd->_priv = _ewk_view_priv_new(sd); + sd->api = api; + + _parent_sc.add(o); + + if (!sd->_priv) + return; + + EWK_VIEW_PRIV_GET(sd, priv); + + sd->backing_store = api->backing_store_add(sd); + if (!sd->backing_store) { + ERR("Could not create backing store object."); + return; + } + + evas_object_smart_member_add(sd->backing_store, o); + evas_object_show(sd->backing_store); + + sd->main_frame = ewk_frame_add(sd->base.evas); + if (!sd->main_frame) { + ERR("Could not create main frame object."); + return; + } + + if (!ewk_frame_init(sd->main_frame, o, priv->main_frame)) { + ERR("Could not initialize main frme object."); + evas_object_del(sd->main_frame); + sd->main_frame = 0; + + delete priv->main_frame; + priv->main_frame = 0; + return; + } + + evas_object_name_set(sd->main_frame, "EWK_Frame:main"); + evas_object_smart_member_add(sd->main_frame, o); + evas_object_show(sd->main_frame); + +#define CONNECT(s, c) evas_object_event_callback_add(o, s, c, sd) + CONNECT(EVAS_CALLBACK_FOCUS_IN, _ewk_view_on_focus_in); + CONNECT(EVAS_CALLBACK_FOCUS_OUT, _ewk_view_on_focus_out); + CONNECT(EVAS_CALLBACK_MOUSE_WHEEL, _ewk_view_on_mouse_wheel); + CONNECT(EVAS_CALLBACK_MOUSE_DOWN, _ewk_view_on_mouse_down); + CONNECT(EVAS_CALLBACK_MOUSE_UP, _ewk_view_on_mouse_up); + CONNECT(EVAS_CALLBACK_MOUSE_MOVE, _ewk_view_on_mouse_move); + CONNECT(EVAS_CALLBACK_KEY_DOWN, _ewk_view_on_key_down); + CONNECT(EVAS_CALLBACK_KEY_UP, _ewk_view_on_key_up); +#undef CONNECT +} + +static void _ewk_view_smart_del(Evas_Object* o) +{ + EWK_VIEW_SD_GET(o, sd); + Ewk_View_Private_Data* priv = sd ? sd->_priv : 0; + + _parent_sc.del(o); + _ewk_view_priv_del(priv); +} + +static void _ewk_view_smart_resize(Evas_Object* o, Evas_Coord w, Evas_Coord h) +{ + EWK_VIEW_SD_GET(o, sd); + + // these should be queued and processed in calculate as well! + evas_object_resize(sd->backing_store, w, h); + + sd->changed.size = EINA_TRUE; + _ewk_view_smart_changed(sd); +} + +static void _ewk_view_smart_move(Evas_Object* o, Evas_Coord x, Evas_Coord y) +{ + EWK_VIEW_SD_GET(o, sd); + sd->changed.position = EINA_TRUE; + _ewk_view_smart_changed(sd); +} + +static void _ewk_view_smart_calculate(Evas_Object* o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + EINA_SAFETY_ON_NULL_RETURN(sd->api->contents_resize); + EINA_SAFETY_ON_NULL_RETURN(sd->api->scrolls_process); + EINA_SAFETY_ON_NULL_RETURN(sd->api->repaints_process); + Evas_Coord x, y, w, h; + + sd->changed.any = EINA_FALSE; + + if (!sd->main_frame || !priv->main_frame) + return; + + evas_object_geometry_get(o, &x, &y, &w, &h); + + DBG("o=%p geo=[%d, %d + %dx%d], changed: size=%hhu, " + "scrolls=%zu, repaints=%zu", + o, x, y, w, h, sd->changed.size, + priv->scrolls.count, priv->repaints.count); + + if (sd->changed.size && ((w != sd->view.w) || (h != sd->view.h))) { + WebCore::FrameView* view = priv->main_frame->view(); + if (view) { + view->resize(w, h); + view->forceLayout(); + view->adjustViewSize(); + IntSize size = view->contentsSize(); + if (!sd->api->contents_resize(sd, size.width(), size.height())) + ERR("failed to resize contents to %dx%d", + size.width(), size.height()); + } + evas_object_resize(sd->main_frame, w, h); + sd->changed.frame_rect = EINA_TRUE; + sd->view.w = w; + sd->view.h = h; + } + sd->changed.size = EINA_FALSE; + + if (sd->changed.position && ((x != sd->view.x) || (y != sd->view.y))) { + evas_object_move(sd->main_frame, x, y); + evas_object_move(sd->backing_store, x, y); + sd->changed.frame_rect = EINA_TRUE; + sd->view.x = x; + sd->view.y = y; + } + sd->changed.position = EINA_FALSE; + + ewk_view_layout_if_needed_recursive(sd->_priv); + + if (!sd->api->scrolls_process(sd)) + ERR("failed to process scrolls."); + _ewk_view_scrolls_flush(priv); + + if (!sd->api->repaints_process(sd)) + ERR("failed to process repaints."); + _ewk_view_repaints_flush(priv); + + if (sd->changed.frame_rect) { + WebCore::FrameView* view = priv->main_frame->view(); + view->frameRectsChanged(); /* force tree to get position from root */ + sd->changed.frame_rect = EINA_FALSE; + } +} + +static Eina_Bool _ewk_view_smart_contents_resize(Ewk_View_Smart_Data* sd, int w, int h) +{ + return EINA_TRUE; +} + +static Eina_Bool _ewk_view_smart_zoom_set(Ewk_View_Smart_Data* sd, float zoom, Evas_Coord cx, Evas_Coord cy) +{ + double px, py; + Evas_Coord x, y, w, h; + Eina_Bool ret; + + ewk_frame_scroll_size_get(sd->main_frame, &w, &h); + ewk_frame_scroll_pos_get(sd->main_frame, &x, &y); + + if (w + sd->view.w > 0) + px = (double)(x + cx) / (w + sd->view.w); + else + px = 0.0; + + if (h + sd->view.h > 0) + py = (double)(y + cy) / (h + sd->view.h); + else + py = 0.0; + + ret = ewk_frame_zoom_set(sd->main_frame, zoom); + + ewk_frame_scroll_size_get(sd->main_frame, &w, &h); + x = (w + sd->view.w) * px - cx; + y = (h + sd->view.h) * py - cy; + ewk_frame_scroll_set(sd->main_frame, x, y); + return ret; +} + +static void _ewk_view_smart_flush(Ewk_View_Smart_Data* sd) +{ + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + _ewk_view_repaints_flush(priv); + _ewk_view_scrolls_flush(priv); +} + +static Eina_Bool _ewk_view_smart_pre_render_region(Ewk_View_Smart_Data* sd, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom) +{ + WRN("not supported by engine. sd=%p area=%d,%d+%dx%d, zoom=%f", + sd, x, y, w, h, zoom); + return EINA_FALSE; +} + +static void _ewk_view_smart_pre_render_cancel(Ewk_View_Smart_Data* sd) +{ + WRN("not supported by engine. sd=%p", sd); +} + +static void _ewk_view_zoom_animated_mark_stop(Ewk_View_Smart_Data* sd) +{ + sd->animated_zoom.zoom.start = 0.0; + sd->animated_zoom.zoom.end = 0.0; + sd->animated_zoom.zoom.current = 0.0; +} + +static void _ewk_view_zoom_animated_finish(Ewk_View_Smart_Data* sd) +{ + EWK_VIEW_PRIV_GET(sd, priv); + ecore_animator_del(priv->animated_zoom.animator); + priv->animated_zoom.animator = 0; + _ewk_view_zoom_animated_mark_stop(sd); + evas_object_smart_callback_call(sd->self, "zoom,animated,end", 0); +} + +static float _ewk_view_zoom_animated_current(Ewk_View_Private_Data* priv) +{ + double now = ecore_loop_time_get(); + double delta = now - priv->animated_zoom.time.start; + + if (delta > priv->animated_zoom.time.duration) + delta = priv->animated_zoom.time.duration; + if (delta < 0.0) // time went back, clock adjusted? + delta = 0.0; + + delta /= priv->animated_zoom.time.duration; + + return ((priv->animated_zoom.zoom.range * delta) + + priv->animated_zoom.zoom.start); +} + +static int _ewk_view_zoom_animator_cb(void* data) +{ + Ewk_View_Smart_Data* sd = (Ewk_View_Smart_Data*)data; + Evas_Coord cx, cy; + EWK_VIEW_PRIV_GET(sd, priv); + double now = ecore_loop_time_get(); + + cx = priv->animated_zoom.center.x; + cy = priv->animated_zoom.center.y; + + // TODO: progressively center (cx, cy) -> (view.x + view.h/2, view.y + view.h/2) + if (cx >= sd->view.w) + cx = sd->view.w - 1; + if (cy >= sd->view.h) + cy = sd->view.h - 1; + + if ((now >= priv->animated_zoom.time.end) + || (now < priv->animated_zoom.time.start)) { + _ewk_view_zoom_animated_finish(sd); + ewk_view_zoom_set(sd->self, priv->animated_zoom.zoom.end, cx, cy); + return 0; + } + + sd->animated_zoom.zoom.current = _ewk_view_zoom_animated_current(priv); + sd->api->zoom_weak_set(sd, sd->animated_zoom.zoom.current, cx, cy); + return 1; +} + +static void _ewk_view_zoom_animation_start(Ewk_View_Smart_Data* sd) +{ + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + if (priv->animated_zoom.animator) + return; + priv->animated_zoom.animator = ecore_animator_add + (_ewk_view_zoom_animator_cb, sd); +} + +/** + * Sets the smart class api without any backing store, enabling view + * to be inherited. + * + * @param api class definition to be set, all members with the + * exception of Evas_Smart_Class->data may be overridden. Must + * @b not be @c 0. + * + * @note Evas_Smart_Class->data is used to implement type checking and + * is not supposed to be changed/overridden. If you need extra + * data for your smart class to work, just extend + * Ewk_View_Smart_Class instead. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (probably + * version mismatch). + * + * @see ewk_view_single_smart_set() + * @see ewk_view_tiled_smart_set() + */ +Eina_Bool ewk_view_base_smart_set(Ewk_View_Smart_Class* api) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(api, EINA_FALSE); + + if (api->version != EWK_VIEW_SMART_CLASS_VERSION) { + EINA_LOG_CRIT + ("Ewk_View_Smart_Class %p is version %lu while %lu was expected.", + api, api->version, EWK_VIEW_SMART_CLASS_VERSION); + return EINA_FALSE; + } + + if (EINA_UNLIKELY(!_parent_sc.add)) + evas_object_smart_clipped_smart_set(&_parent_sc); + + evas_object_smart_clipped_smart_set(&api->sc); + api->sc.add = _ewk_view_smart_add; + api->sc.del = _ewk_view_smart_del; + api->sc.resize = _ewk_view_smart_resize; + api->sc.move = _ewk_view_smart_move; + api->sc.calculate = _ewk_view_smart_calculate; + api->sc.data = EWK_VIEW_TYPE_STR; /* used by type checking */ + + api->contents_resize = _ewk_view_smart_contents_resize; + api->zoom_set = _ewk_view_smart_zoom_set; + api->flush = _ewk_view_smart_flush; + api->pre_render_region = _ewk_view_smart_pre_render_region; + api->pre_render_cancel = _ewk_view_smart_pre_render_cancel; + + api->focus_in = _ewk_view_smart_focus_in; + api->focus_out = _ewk_view_smart_focus_out; + api->mouse_wheel = _ewk_view_smart_mouse_wheel; + api->mouse_down = _ewk_view_smart_mouse_down; + api->mouse_up = _ewk_view_smart_mouse_up; + api->mouse_move = _ewk_view_smart_mouse_move; + api->key_down = _ewk_view_smart_key_down; + api->key_up = _ewk_view_smart_key_up; + + api->add_console_message = _ewk_view_smart_add_console_message; + api->run_javascript_alert = _ewk_view_smart_run_javascript_alert; + api->run_javascript_confirm = _ewk_view_smart_run_javascript_confirm; + api->run_javascript_prompt = _ewk_view_smart_run_javascript_prompt; + api->should_interrupt_javascript = _ewk_view_smart_should_interrupt_javascript; + + return EINA_TRUE; +} + +/** + * Set a fixed layout size to be used, dissociating it from viewport size. + * + * Setting a width different than zero enables fixed layout on that + * size. It's automatically scaled based on zoom, but will not change + * if viewport changes. + * + * Setting both @a w and @a h to zero will disable fixed layout. + * + * @param o view object to change fixed layout. + * @param w fixed width to use. This size will be automatically scaled + * based on zoom level. + * @param h fixed height to use. This size will be automatically scaled + * based on zoom level. + */ +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::FrameView* view = sd->_priv->main_frame->view(); + if (w <= 0 && h <= 0) { + if (!priv->fixed_layout.use) + return; + priv->fixed_layout.w = 0; + priv->fixed_layout.h = 0; + priv->fixed_layout.use = EINA_FALSE; + } else { + if (priv->fixed_layout.use + && priv->fixed_layout.w == w && priv->fixed_layout.h == h) + return; + priv->fixed_layout.w = w; + priv->fixed_layout.h = h; + priv->fixed_layout.use = EINA_TRUE; + + if (view) + view->setFixedLayoutSize(WebCore::IntSize(w, h)); + } + + if (!view) + return; + view->setUseFixedLayout(priv->fixed_layout.use); + view->forceLayout(); +} + +/** + * Get fixed layout size in use. + * + * @param o view object to query fixed layout size. + * @param w where to return width. Returns 0 on error or if no fixed + * layout in use. + * @param h where to return height. Returns 0 on error or if no fixed + * layout in use. + */ +void ewk_view_fixed_layout_size_get(Evas_Object* o, Evas_Coord* w, Evas_Coord* h) +{ + if (w) + *w = 0; + if (h) + *h = 0; + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + if (priv->fixed_layout.use) { + if (w) + *w = priv->fixed_layout.w; + if (h) + *h = priv->fixed_layout.h; + } +} + +/** + * Set the theme path to be used by this view. + * + * This also sets the theme on the main frame. As frames inherit theme + * from their parent, this will have all frames with unset theme to + * use this one. + * + * @param o view object to change theme. + * @param path theme path, may be @c 0 to reset to default. + */ +void ewk_view_theme_set(Evas_Object* o, const char* path) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + ewk_frame_theme_set(sd->main_frame, path); +} + +/** + * Gets the theme set on this frame. + * + * This returns the value set by ewk_view_theme_set(). + * + * @param o view object to get theme path. + * + * @return theme path, may be @c 0 if not set. + */ +const char* ewk_view_theme_get(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + return ewk_frame_theme_get(sd->main_frame); +} + +/** + * Get the object that represents the main frame. + * + * @param o view object to get main frame. + * + * @return ewk_frame object or @c 0 if none yet. + */ +Evas_Object* ewk_view_frame_main_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + return sd->main_frame; +} + +/** + * Get the currently focused frame object. + * + * @param o view object to get focused frame. + * + * @return ewk_frame object or @c 0 if none yet. + */ +Evas_Object* ewk_view_frame_focused_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + + WebCore::Frame* core = priv->page->focusController()->focusedFrame(); + if (!core) + return 0; + + WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(core->loader()->client()); + if (!client) + return 0; + return client->webFrame(); +} + +/** + * Ask main frame to load the given URI. + * + * @param o view object to load uri. + * @param uri uniform resource identifier to load. + * + * @return @c EINA_TRUE on successful request, @c EINA_FALSE on failure. + * Note that it means the request was done, not that it was + * satisfied. + */ +Eina_Bool ewk_view_uri_set(Evas_Object* o, const char* uri) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_uri_set(sd->main_frame, uri); +} + +/** + * Get the current uri loaded by main frame. + * + * @param o view object to get current uri. + * + * @return current uri reference or @c 0. It's internal, don't change. + */ +const char* ewk_view_uri_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + return ewk_frame_uri_get(sd->main_frame); +} + +/** + * Get the current title of main frame. + * + * @param o view object to get current title. + * + * @return current title reference or @c 0. It's internal, don't change. + */ +const char* ewk_view_title_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + return ewk_frame_title_get(sd->main_frame); +} + +/** + * Gets if main frame is editable. + * + * @param o view object to get editable state. + * + * @return @c EINA_TRUE if editable, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_editable_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_editable_get(sd->main_frame); +} + +/** + * Set background color and transparency + * + * Just as in Evas, colors are pre-multiplied, so 50% red is + * (128, 0, 0, 128) and not (255, 0, 0, 128)! + * + * @warning Watch out performance issues with transparency! Object + * will be handled as transparent image by evas even if the + * webpage specifies a background color. That mean you'll pay + * a price even if it's not really transparent, thus + * scrolling/panning and zooming will be likely slower than + * if transparency is off. + * + * @param o view object to change. + * @param r red component. + * @param g green component. + * @param b blue component. + * @param a transparency. + */ +void ewk_view_bg_color_set(Evas_Object* o, int r, int g, int b, int a) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->bg_color_set); + + if (a < 0) { + WRN("Alpha less than zero (%d).", a); + a = 0; + } else if (a > 255) { + WRN("Alpha is larger than 255 (%d).", a); + a = 255; + } + +#define CHECK_PREMUL_COLOR(c, a) \ + if (c < 0) { \ + WRN("Color component "#c" is less than zero (%d).", c); \ + c = 0; \ + } else if (c > a) { \ + WRN("Color component "#c" is greater than alpha (%d, alpha=%d).", \ + c, a); \ + c = a; \ + } + CHECK_PREMUL_COLOR(r, a); + CHECK_PREMUL_COLOR(g, a); + CHECK_PREMUL_COLOR(b, a); +#undef CHECK_PREMUL_COLOR + + sd->bg_color.r = r; + sd->bg_color.g = g; + sd->bg_color.b = b; + sd->bg_color.a = a; + + sd->api->bg_color_set(sd, r, g, b, a); + + WebCore::FrameView* view = sd->_priv->main_frame->view(); + if (view) { + WebCore::Color color; + + if (!a) + color = WebCore::Color(0, 0, 0, 0); + else if (a == 255) + color = WebCore::Color(r, g, b, a); + else + color = WebCore::Color(r * 255 / a, g * 255 / a, b * 255 / a, a); + + view->updateBackgroundRecursively(color, !a); + } +} + +/** + * Query if view object background color. + * + * Just as in Evas, colors are pre-multiplied, so 50% red is + * (128, 0, 0, 128) and not (255, 0, 0, 128)! + * + * @param o view object to query. + * @param r where to return red color component. + * @param g where to return green color component. + * @param b where to return blue color component. + * @param a where to return alpha value. + */ +void ewk_view_bg_color_get(const Evas_Object* o, int* r, int* g, int* b, int* a) +{ + if (r) + *r = 0; + if (g) + *g = 0; + if (b) + *b = 0; + if (a) + *a = 0; + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + if (r) + *r = sd->bg_color.r; + if (g) + *g = sd->bg_color.g; + if (b) + *b = sd->bg_color.b; + if (a) + *a = sd->bg_color.a; +} + +/** + * Search the given text string in document. + * + * @param o view object where to search text. + * @param string reference string to search. + * @param case_sensitive if search should be case sensitive or not. + * @param forward if search is from cursor and on or backwards. + * @param wrap if search should wrap at end. + * + * @return @c EINA_TRUE if found, @c EINA_FALSE if not or failure. + */ +Eina_Bool ewk_view_text_search(const Evas_Object* o, const char* string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(string, EINA_FALSE); + WebCore::TextCaseSensitivity sensitive; + WebCore::FindDirection direction; + + if (case_sensitive) + sensitive = WebCore::TextCaseSensitive; + else + sensitive = WebCore::TextCaseInsensitive; + + if (forward) + direction = WebCore::FindDirectionForward; + else + direction = WebCore::FindDirectionBackward; + + return priv->page->findString(WebCore::String::fromUTF8(string), sensitive, direction, wrap); +} + +/** + * Mark matches the given text string in document. + * + * @param o view object where to search text. + * @param string reference string to match. + * @param case_sensitive if match should be case sensitive or not. + * @param highlight if matches should be highlighted. + * @param limit maximum amount of matches, or zero to unlimited. + * + * @return number of matches. + */ +unsigned int ewk_view_text_matches_mark(Evas_Object* o, const char* string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(string, 0); + WebCore::TextCaseSensitivity sensitive; + + if (case_sensitive) + sensitive = WebCore::TextCaseSensitive; + else + sensitive = WebCore::TextCaseInsensitive; + + return priv->page->markAllMatchesForText(WebCore::String::fromUTF8(string), sensitive, highlight, limit); +} + +/** + * Reverses the effect of ewk_view_text_matches_mark() + * + * @param o view object where to search text. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE for failure. + */ +Eina_Bool ewk_view_text_matches_unmark_all(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + priv->page->unmarkAllTextMatches(); + return EINA_TRUE; +} + +/** + * Set if should highlight matches marked with ewk_view_text_matches_mark(). + * + * @param o view object where to set if matches are highlighted or not. + * @param highlight if @c EINA_TRUE, matches will be highlighted. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE for failure. + */ +Eina_Bool ewk_view_text_matches_highlight_set(Evas_Object* o, Eina_Bool highlight) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_text_matches_highlight_set(sd->main_frame, highlight); +} + +/** + * Get if should highlight matches marked with ewk_view_text_matches_mark(). + * + * @param o view object to query if matches are highlighted or not. + * + * @return @c EINA_TRUE if they are highlighted, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_text_matches_highlight_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_text_matches_highlight_get(sd->main_frame); +} + +/** + * Sets if main frame is editable. + * + * @param o view object to set editable state. + * @param editable new state. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_editable_set(Evas_Object* o, Eina_Bool editable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_editable_set(sd->main_frame, editable); +} + +/** + * Get the copy of the selection text. + * + * @param o view object to get selection text. + * + * @return newly allocated string or @c 0 if nothing is selected or failure. + */ +char* ewk_view_selection_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + WebCore::CString s = priv->page->focusController()->focusedOrMainFrame()->selectedText().utf8(); + if (s.isNull()) + return 0; + return strdup(s.data()); +} + +static Eina_Bool _ewk_view_editor_command(Ewk_View_Private_Data* priv, const char* command) +{ + return priv->page->focusController()->focusedOrMainFrame()->editor()->command(WebCore::String::fromUTF8(command)).execute(); +} + +/** + * Unselects whatever was selected. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_select_none(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return _ewk_view_editor_command(priv, "Unselect"); +} + +/** + * Selects everything. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_select_all(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return _ewk_view_editor_command(priv, "SelectAll"); +} + +/** + * Selects the current paragrah. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_select_paragraph(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return _ewk_view_editor_command(priv, "SelectParagraph"); +} + +/** + * Selects the current sentence. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_select_sentence(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return _ewk_view_editor_command(priv, "SelectSentence"); +} + +/** + * Selects the current line. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_select_line(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return _ewk_view_editor_command(priv, "SelectLine"); +} + +/** + * Selects the current word. + * + * @return @c EINA_TRUE if operation was executed, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_select_word(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return _ewk_view_editor_command(priv, "SelectWord"); +} + +/** + * Get current load progress estimate from 0.0 to 1.0. + * + * @param o view object to get current progress. + * + * @return progres value from 0.0 to 1.0 or -1.0 on error. + */ +double ewk_view_load_progress_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, -1.0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, -1.0); + return priv->page->progress()->estimatedProgress(); +} + +/** + * Ask main frame to stop loading. + * + * @param o view object to stop loading. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_frame_stop() + */ +Eina_Bool ewk_view_stop(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_stop(sd->main_frame); +} + +/** + * Ask main frame to reload current document. + * + * @param o view object to reload. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_frame_reload() + */ +Eina_Bool ewk_view_reload(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_reload(sd->main_frame); +} + +/** + * Ask main frame to fully reload current document, using no caches. + * + * @param o view object to reload. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_frame_reload_full() + */ +Eina_Bool ewk_view_reload_full(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_reload_full(sd->main_frame); +} + +/** + * Ask main frame to navigate back in history. + * + * @param o view object to navigate back. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_frame_back() + */ +Eina_Bool ewk_view_back(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_back(sd->main_frame); +} + +/** + * Ask main frame to navigate forward in history. + * + * @param o view object to navigate forward. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_frame_forward() + */ +Eina_Bool ewk_view_forward(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_forward(sd->main_frame); +} + +/** + * Navigate back or forward in history. + * + * @param o view object to navigate. + * @param steps if positive navigates that amount forwards, if negative + * does backwards. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_frame_navigate() + */ +Eina_Bool ewk_view_navigate(Evas_Object* o, int steps) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_navigate(sd->main_frame, steps); +} + +/** + * Check if it is possible to navigate backwards one item in history. + * + * @param o view object to check if backward navigation is possible. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise. + * + * @see ewk_view_navigate_possible() + */ +Eina_Bool ewk_view_back_possible(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_back_possible(sd->main_frame); +} + +/** + * Check if it is possible to navigate forwards one item in history. + * + * @param o view object to check if forward navigation is possible. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise. + * + * @see ewk_view_navigate_possible() + */ +Eina_Bool ewk_view_forward_possible(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_forward_possible(sd->main_frame); +} + +/** + * Check if it is possible to navigate given @a steps in history. + * + * @param o view object to navigate. + * @param steps if positive navigates that amount forwards, if negative + * does backwards. + * + * @return @c EINA_TRUE if possible, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_navigate_possible(Evas_Object* o, int steps) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_navigate_possible(sd->main_frame, steps); +} + +/** + * Check if navigation history (back-forward lists) is enabled. + * + * @param o view object to check if navigation history is enabled. + * + * @return @c EINA_TRUE if view keeps history, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_history_enable_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->page->backForwardList()->enabled(); +} + +/** + * Sets if navigation history (back-forward lists) is enabled. + * + * @param o view object to set if navigation history is enabled. + * @param enable @c EINA_TRUE if we want to enable navigation history; + * @c EINA_FALSE otherwise. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_history_enable_set(Evas_Object* o, Eina_Bool enable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + priv->page->backForwardList()->setEnabled(enable); + return EINA_TRUE; +} + +/** + * Gets the history (back-forward list) associated with this view. + * + * @param o view object to get navigation history from. + * + * @return returns the history instance handle associated with this + * view or @c 0 on errors (including when history is not + * enabled with ewk_view_history_enable_set()). This instance + * is unique for this view and thus multiple calls to this + * function with the same view as parameter returns the same + * handle. This handle is alive while view is alive, thus one + * might want to listen for EVAS_CALLBACK_DEL on given view + * (@a o) to know when to stop using returned handle. + * + * @see ewk_view_history_enable_set() + */ +Ewk_History* ewk_view_history_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + if (!priv->page->backForwardList()->enabled()) { + ERR("asked history, but it's disabled! Returning 0!"); + return 0; + } + return priv->history; +} + +/** + * Get the current zoom level of main frame. + * + * @param o view object to query zoom level. + * + * @return current zoom level in use or -1.0 on error. + */ +float ewk_view_zoom_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, -1.0); + return ewk_frame_zoom_get(sd->main_frame); +} + +/** + * Set the current zoom level of main frame. + * + * @param o view object to set zoom level. + * @param zoom new level to use. + * @param cx x of center coordinate + * @param cy y of center coordinate + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +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); + 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); + return EINA_FALSE; + } + if (zoom > ZOOM_MAX) { + WRN("zoom level is > %f : %f", (double)ZOOM_MAX, (double)zoom); + return EINA_FALSE; + } + + if (cx >= sd->view.w) + cx = sd->view.w - 1; + if (cy >= sd->view.h) + cy = sd->view.h - 1; + if (cx < 0) + cx = 0; + if (cy < 0) + cy = 0; + _ewk_view_zoom_animated_mark_stop(sd); + return sd->api->zoom_set(sd, zoom, cx, cy); +} + +Eina_Bool ewk_view_zoom_weak_smooth_scale_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return sd->zoom_weak_smooth_scale; +} + +void ewk_view_zoom_weak_smooth_scale_set(Evas_Object* o, Eina_Bool smooth_scale) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + smooth_scale = !!smooth_scale; + if (sd->zoom_weak_smooth_scale == smooth_scale) + return; + sd->zoom_weak_smooth_scale = smooth_scale; + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->zoom_weak_smooth_scale_set); + sd->api->zoom_weak_smooth_scale_set(sd, smooth_scale); +} + +/** + * Set the current zoom level of backing store, centered at given point. + * + * Unlike ewk_view_zoom_set(), this call do not ask WebKit to render + * at new size, but scale what is already rendered, being much faster + * but worse quality. + * + * Often one should use ewk_view_zoom_animated_set(), it will call the + * same machinery internally. + * + * @note this will set variables used by ewk_view_zoom_animated_set() + * so sub-classes will not reset internal state on their + * "calculate" phase. To unset those and enable sub-classes to + * reset their internal state, call + * ewk_view_zoom_animated_mark_stop(). Namely, this call will + * set ewk_view_zoom_animated_mark_start() to actual webkit zoom + * level, ewk_view_zoom_animated_mark_end() and + * ewk_view_zoom_animated_mark_current() to given zoom level. + * + * @param o view object to set weak zoom level. + * @param zoom level to scale backing store. + * @param cx horizontal center offset, relative to object (w/2 is middle). + * @param cy vertical center offset, relative to object (h/2 is middle). + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +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); + 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); + return EINA_FALSE; + } + if (zoom > ZOOM_MAX) { + WRN("zoom level is > %f : %f", (double)ZOOM_MAX, (double)zoom); + return EINA_FALSE; + } + + if (cx >= sd->view.w) + cx = sd->view.w - 1; + if (cy >= sd->view.h) + cy = sd->view.h - 1; + if (cx < 0) + cx = 0; + if (cy < 0) + cy = 0; + + sd->animated_zoom.zoom.start = ewk_frame_zoom_get(sd->main_frame); + sd->animated_zoom.zoom.end = zoom; + sd->animated_zoom.zoom.current = zoom; + return sd->api->zoom_weak_set(sd, zoom, cx, cy); +} + +/** + * Mark internal zoom animation state to given zoom. + * + * This does not modify any actual zoom in WebKit or backing store, + * just set the Ewk_View_Smart_Data->animated_zoom.zoom.start so + * sub-classes will know they should not reset their internal state. + * + * @param o view object to change value. + * @param zoom new start value. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_view_zoom_animated_set() + * @see ewk_view_zoom_weak_set() + * @see ewk_view_zoom_animated_mark_stop() + * @see ewk_view_zoom_animated_mark_end() + * @see ewk_view_zoom_animated_mark_current() + */ +Eina_Bool ewk_view_zoom_animated_mark_start(Evas_Object* o, float zoom) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + sd->animated_zoom.zoom.start = zoom; + return EINA_TRUE; +} + +/** + * Mark internal zoom animation state to given zoom. + * + * This does not modify any actual zoom in WebKit or backing store, + * just set the Ewk_View_Smart_Data->animated_zoom.zoom.end so + * sub-classes will know they should not reset their internal state. + * + * @param o view object to change value. + * @param zoom new end value. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_view_zoom_animated_set() + * @see ewk_view_zoom_weak_set() + * @see ewk_view_zoom_animated_mark_stop() + * @see ewk_view_zoom_animated_mark_start() + * @see ewk_view_zoom_animated_mark_current() + */ +Eina_Bool ewk_view_zoom_animated_mark_end(Evas_Object* o, float zoom) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + sd->animated_zoom.zoom.end = zoom; + return EINA_TRUE; +} + +/** + * Mark internal zoom animation state to given zoom. + * + * This does not modify any actual zoom in WebKit or backing store, + * just set the Ewk_View_Smart_Data->animated_zoom.zoom.current so + * sub-classes will know they should not reset their internal state. + * + * @param o view object to change value. + * @param zoom new current value. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + * + * @see ewk_view_zoom_animated_set() + * @see ewk_view_zoom_weak_set() + * @see ewk_view_zoom_animated_mark_stop() + * @see ewk_view_zoom_animated_mark_start() + * @see ewk_view_zoom_animated_mark_end() + */ +Eina_Bool ewk_view_zoom_animated_mark_current(Evas_Object* o, float zoom) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + sd->animated_zoom.zoom.current = zoom; + return EINA_TRUE; +} + +/** + * Unmark internal zoom animation state. + * + * This zero all start, end and current values. + * + * @param o view object to mark as animated is stopped. + * + * @see ewk_view_zoom_animated_mark_start() + * @see ewk_view_zoom_animated_mark_end() + * @see ewk_view_zoom_animated_mark_current() + * @see ewk_view_zoom_weak_set() + */ +Eina_Bool ewk_view_zoom_animated_mark_stop(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + _ewk_view_zoom_animated_mark_stop(sd); + return EINA_TRUE; +} + +/** + * Set the current zoom level while animating. + * + * If the view was already animating to another zoom, it will start + * from current point to the next provided zoom (@a zoom parameter) + * and duration (@a duration parameter). + * + * This is the recommended way to do transitions from one level to + * another. However, one may wish to do those from outside, in that + * case use ewk_view_zoom_weak_set() and later control intermediate + * states with ewk_view_zoom_animated_mark_current(), + * ewk_view_zoom_animated_mark_end() and + * ewk_view_zoom_animated_mark_stop(). + * + * @param o view object to animate. + * @param zoom final zoom level to use. + * @param duration time in seconds the animation should take. + * @param cx offset inside object that defines zoom center. 0 is left side. + * @param cy offset inside object that defines zoom center. 0 is top side. + * @return @c EINA_TRUE if animation will be started, @c EINA_FALSE if not + * because zoom is too small/big. + */ +Eina_Bool ewk_view_zoom_animated_set(Evas_Object* o, float zoom, float duration, Evas_Coord cx, Evas_Coord cy) +{ + double now; + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + 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); + return EINA_FALSE; + } + if (zoom > ZOOM_MAX) { + WRN("zoom level is > %f : %f", (double)ZOOM_MAX, (double)zoom); + return EINA_FALSE; + } + + if (priv->animated_zoom.animator) + priv->animated_zoom.zoom.start = _ewk_view_zoom_animated_current(priv); + else { + priv->animated_zoom.zoom.start = ewk_frame_zoom_get(sd->main_frame); + _ewk_view_zoom_animation_start(sd); + } + + if (cx < 0) + cx = 0; + if (cy < 0) + cy = 0; + + now = ecore_loop_time_get(); + priv->animated_zoom.time.start = now; + priv->animated_zoom.time.end = now + duration; + priv->animated_zoom.time.duration = duration; + priv->animated_zoom.zoom.end = zoom; + priv->animated_zoom.zoom.range = (priv->animated_zoom.zoom.end - priv->animated_zoom.zoom.start); + priv->animated_zoom.center.x = cx; + priv->animated_zoom.center.y = cy; + sd->animated_zoom.zoom.current = priv->animated_zoom.zoom.start; + sd->animated_zoom.zoom.start = priv->animated_zoom.zoom.start; + sd->animated_zoom.zoom.end = priv->animated_zoom.zoom.end; + + return EINA_TRUE; +} + +/** + * Query if zoom level just applies to text and not other elements. + * + * @param o view to query setting. + * + * @return @c EINA_TRUE if just text are scaled, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_zoom_text_only_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_zoom_text_only_get(sd->main_frame); +} + +/** + * Set if zoom level just applies to text and not other elements. + * + * @param o view to change setting. + * @param setting @c EINA_TRUE if zoom should just be applied to text. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_zoom_text_only_set(Evas_Object* o, Eina_Bool setting) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + return ewk_frame_zoom_text_only_set(sd->main_frame, setting); +} + +/** + * Hint engine to pre-render region. + * + * Engines and backing store might be able to pre-render regions in + * order to speed up zooming or scrolling to that region. Not all + * engines might implement that and they will return @c EINA_FALSE + * in that case. + * + * The given region is a hint. Engines might do bigger or smaller area + * that covers that region. Pre-render might not be immediate, it may + * be postponed to a thread, operated cooperatively in the main loop + * and may be even ignored or cancelled afterwards. + * + * Multiple requests might be queued by engines. One can clear/forget + * about them with ewk_view_pre_render_cancel(). + * + * @param o view to ask pre-render of given region. + * @param x absolute coordinate (0=left) to pre-render at zoom. + * @param y absolute coordinate (0=top) to pre-render at zoom. + * @param w width to pre-render starting from @a x at zoom. + * @param h height to pre-render starting from @a y at zoom. + * @param zoom desired zoom. + * + * @return @c EINA_TRUE if request was accepted, @c EINA_FALSE + * otherwise (errors, pre-render not supported, etc). + * + * @see ewk_view_pre_render_cancel() + */ +Eina_Bool ewk_view_pre_render_region(Evas_Object* o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api->pre_render_region, EINA_FALSE); + float cur_zoom = ewk_frame_zoom_get(sd->main_frame); + Evas_Coord cw, ch; + + if (cur_zoom < 0.00001) + return EINA_FALSE; + if (!ewk_frame_contents_size_get(sd->main_frame, &cw, &ch)) + return EINA_FALSE; + + cw *= zoom / cur_zoom; + ch *= zoom / cur_zoom; + DBG("region %d,%d+%dx%d @ %f contents=%dx%d", x, y, w, h, zoom, cw, ch); + + if (x + w > cw) + w = cw - x; + + if (y + h > ch) + h = ch - y; + + if (x < 0) { + w += x; + x = 0; + } + if (y < 0) { + h += y; + y = 0; + } + + return sd->api->pre_render_region(sd, x, y, w, h, zoom); +} + +/** + * Cancel (clear) previous pre-render requests. + * + * @param o view to clear pre-render requests. + */ +void ewk_view_pre_render_cancel(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->api->pre_render_cancel); + sd->api->pre_render_cancel(sd); +} + +const char* ewk_view_setting_user_agent_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.user_agent; +} + +Eina_Bool ewk_view_setting_user_agent_set(Evas_Object* o, const char* user_agent) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.user_agent, user_agent)) { + WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(priv->main_frame->loader()->client()); + client->setCustomUserAgent(WebCore::String::fromUTF8(user_agent)); + } + return EINA_TRUE; +} + +const char* ewk_view_setting_user_stylesheet_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.user_stylesheet; +} + +Eina_Bool ewk_view_setting_user_stylesheet_set(Evas_Object* o, const char* uri) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.user_stylesheet, uri)) { + WebCore::KURL kurl(WebCore::KURL(), WebCore::String::fromUTF8(uri)); + priv->page_settings->setUserStyleSheetLocation(kurl); + } + return EINA_TRUE; +} + +Eina_Bool ewk_view_setting_auto_load_images_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.auto_load_images; +} + +Eina_Bool ewk_view_setting_auto_load_images_set(Evas_Object* o, Eina_Bool automatic) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + automatic = !!automatic; + if (priv->settings.auto_load_images != automatic) { + priv->page_settings->setLoadsImagesAutomatically(automatic); + priv->settings.auto_load_images = automatic; + } + return EINA_TRUE; +} + +Eina_Bool ewk_view_setting_auto_shrink_images_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.auto_shrink_images; +} + +Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object* o, Eina_Bool automatic) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + automatic = !!automatic; + if (priv->settings.auto_shrink_images != automatic) { + priv->page_settings->setShrinksStandaloneImagesToFit(automatic); + priv->settings.auto_shrink_images = automatic; + } + return EINA_TRUE; +} + +Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.enable_scripts; +} + +Eina_Bool ewk_view_setting_enable_scripts_set(Evas_Object* o, Eina_Bool enable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + enable = !!enable; + if (priv->settings.enable_scripts != enable) { + priv->page_settings->setJavaScriptEnabled(enable); + priv->settings.enable_scripts = enable; + } + return EINA_TRUE; +} + +Eina_Bool ewk_view_setting_enable_plugins_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.enable_plugins; +} + +Eina_Bool ewk_view_setting_enable_plugins_set(Evas_Object* o, Eina_Bool enable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + enable = !!enable; + if (priv->settings.enable_plugins != enable) { + priv->page_settings->setPluginsEnabled(enable); + priv->settings.enable_plugins = enable; + } + return EINA_TRUE; +} + +Eina_Bool ewk_view_setting_scripts_window_open_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.scripts_window_open; +} + +Eina_Bool ewk_view_setting_scripts_window_open_set(Evas_Object* o, Eina_Bool allow) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + allow = !!allow; + if (priv->settings.scripts_window_open != allow) { + priv->page_settings->setJavaScriptCanOpenWindowsAutomatically(allow); + priv->settings.scripts_window_open = allow; + } + return EINA_TRUE; +} + +Eina_Bool ewk_view_setting_resizable_textareas_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.resizable_textareas; +} + +Eina_Bool ewk_view_setting_resizable_textareas_set(Evas_Object* o, Eina_Bool enable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + enable = !!enable; + if (priv->settings.resizable_textareas != enable) { + priv->page_settings->setTextAreasAreResizable(enable); + priv->settings.resizable_textareas = enable; + } + return EINA_TRUE; +} + +Eina_Bool ewk_view_setting_private_browsing_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.private_browsing; +} + +Eina_Bool ewk_view_setting_private_browsing_set(Evas_Object* o, Eina_Bool enable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + enable = !!enable; + if (priv->settings.private_browsing != enable) { + priv->page_settings->setPrivateBrowsingEnabled(enable); + priv->settings.private_browsing = enable; + } + return EINA_TRUE; +} + +Eina_Bool ewk_view_setting_caret_browsing_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.caret_browsing; +} + +Eina_Bool ewk_view_setting_caret_browsing_set(Evas_Object* o, Eina_Bool enable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + enable = !!enable; + if (priv->settings.caret_browsing != enable) { + priv->page_settings->setCaretBrowsingEnabled(enable); + priv->settings.caret_browsing = enable; + } + return EINA_TRUE; +} + +/** + * Get current encoding of this View. + * + * @param o View. + * + * @return A pointer to an eina_strinshare containing the current custom + * encoding for View object @param o, or @c 0 if it's not set. + */ +const char* ewk_view_setting_encoding_custom_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + Evas_Object* main_frame = ewk_view_frame_main_get(o); + WebCore::Frame* core_frame = ewk_frame_core_get(main_frame); + + WebCore::String overrideEncoding = core_frame->loader()->documentLoader()->overrideEncoding(); + + if (overrideEncoding.isEmpty()) + return 0; + + eina_stringshare_replace(&priv->settings.encoding_custom, overrideEncoding.utf8().data()); + return priv->settings.encoding_custom; +} + +/** + * Set encoding of this View and reload page. + * + * @param o View. + * @param encoding The new encoding or @c 0 to restore the default encoding. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. + */ +Eina_Bool ewk_view_setting_encoding_custom_set(Evas_Object* o, const char *encoding) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + Evas_Object* main_frame = ewk_view_frame_main_get(o); + WebCore::Frame* core_frame = ewk_frame_core_get(main_frame); +DBG("%s", encoding); + eina_stringshare_replace(&priv->settings.encoding_custom, encoding); + core_frame->loader()->reloadWithOverrideEncoding(WebCore::String::fromUTF8(encoding)); + + return EINA_TRUE; +} + +const char* ewk_view_setting_encoding_default_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.encoding_default; +} + +Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* o, const char* encoding) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.encoding_default, encoding)) + priv->page_settings->setDefaultTextEncodingName(WebCore::String::fromUTF8(encoding)); + return EINA_TRUE; +} + +int ewk_view_setting_font_minimum_size_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_minimum_size; +} + +Eina_Bool ewk_view_setting_font_minimum_size_set(Evas_Object* o, int size) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (priv->settings.font_minimum_size != size) { + priv->page_settings->setMinimumFontSize(size); + priv->settings.font_minimum_size = size; + } + return EINA_TRUE; +} + +int ewk_view_setting_font_minimum_logical_size_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_minimum_logical_size; +} + +Eina_Bool ewk_view_setting_font_minimum_logical_size_set(Evas_Object* o, int size) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (priv->settings.font_minimum_logical_size != size) { + priv->page_settings->setMinimumLogicalFontSize(size); + priv->settings.font_minimum_logical_size = size; + } + return EINA_TRUE; +} + +int ewk_view_setting_font_default_size_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_default_size; +} + +Eina_Bool ewk_view_setting_font_default_size_set(Evas_Object* o, int size) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (priv->settings.font_default_size != size) { + priv->page_settings->setDefaultFontSize(size); + priv->settings.font_default_size = size; + } + return EINA_TRUE; +} + +int ewk_view_setting_font_monospace_size_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_monospace_size; +} + +Eina_Bool ewk_view_setting_font_monospace_size_set(Evas_Object* o, int size) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (priv->settings.font_monospace_size != size) { + priv->page_settings->setDefaultFixedFontSize(size); + priv->settings.font_monospace_size = size; + } + return EINA_TRUE; +} + +const char* ewk_view_setting_font_standard_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_standard; +} + +Eina_Bool ewk_view_setting_font_standard_set(Evas_Object* o, const char* family) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.font_standard, family)) { + WebCore::AtomicString s = WebCore::String::fromUTF8(family); + priv->page_settings->setStandardFontFamily(s); + } + return EINA_TRUE; +} + +const char* ewk_view_setting_font_cursive_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_cursive; +} + +Eina_Bool ewk_view_setting_font_cursive_set(Evas_Object* o, const char* family) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.font_cursive, family)) { + WebCore::AtomicString s = WebCore::String::fromUTF8(family); + priv->page_settings->setCursiveFontFamily(s); + } + return EINA_TRUE; +} + +const char* ewk_view_setting_font_fantasy_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_fantasy; +} + +Eina_Bool ewk_view_setting_font_fantasy_set(Evas_Object* o, const char* family) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.font_fantasy, family)) { + WebCore::AtomicString s = WebCore::String::fromUTF8(family); + priv->page_settings->setFantasyFontFamily(s); + } + return EINA_TRUE; +} + +const char* ewk_view_setting_font_monospace_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_monospace; +} + +Eina_Bool ewk_view_setting_font_monospace_set(Evas_Object* o, const char* family) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.font_monospace, family)) { + WebCore::AtomicString s = WebCore::String::fromUTF8(family); + priv->page_settings->setFixedFontFamily(s); + } + return EINA_TRUE; +} + +const char* ewk_view_setting_font_serif_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_serif; +} + +Eina_Bool ewk_view_setting_font_serif_set(Evas_Object* o, const char* family) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.font_serif, family)) { + WebCore::AtomicString s = WebCore::String::fromUTF8(family); + priv->page_settings->setSerifFontFamily(s); + } + return EINA_TRUE; +} + +const char* ewk_view_setting_font_sans_serif_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->settings.font_sans_serif; +} + +Eina_Bool ewk_view_setting_font_sans_serif_set(Evas_Object* o, const char* family) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + if (eina_stringshare_replace(&priv->settings.font_sans_serif, family)) { + WebCore::AtomicString s = WebCore::String::fromUTF8(family); + priv->page_settings->setSansSerifFontFamily(s); + } + return EINA_TRUE; +} + +/** + * Similar to evas_object_smart_data_get(), but does type checking. + * + * @param o view object to query internal data. + * @return internal data or @c 0 on errors (ie: incorrect type of @a o). + */ +Ewk_View_Smart_Data* ewk_view_smart_data_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + return sd; +} + +/** + * Gets the internal array of repaint requests. + * + * This array should not be modified anyhow. It should be processed + * immediately as any further ewk_view call might change it, like + * those that add repaints or flush them, so be sure that your code + * does not call any of those while you process the repaints, + * otherwise copy the array. + * + * @param priv private handle pointer of the view to get repaints. + * @param count where to return the number of elements of returned array. + * + * @return reference to array of requested repaints. + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +const Eina_Rectangle* ewk_view_repaints_get(const Ewk_View_Private_Data* priv, size_t* count) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(count, 0); + if (count) + *count = 0; + EINA_SAFETY_ON_NULL_RETURN_VAL(priv, 0); + if (count) + *count = priv->repaints.count; + return priv->repaints.array; +} + +/** + * Gets the internal array of scroll requests. + * + * This array should not be modified anyhow. It should be processed + * immediately as any further ewk_view call might change it, like + * those that add scrolls or flush them, so be sure that your code + * does not call any of those while you process the scrolls, + * otherwise copy the array. + * + * @param priv private handle pointer of the view to get scrolls. + * @param count where to return the number of elements of returned array. + * + * @return reference to array of requested scrolls. + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +const Ewk_Scroll_Request* ewk_view_scroll_requests_get(const Ewk_View_Private_Data* priv, size_t* count) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(count, 0); + if (count) + *count = 0; + EINA_SAFETY_ON_NULL_RETURN_VAL(priv, 0); + if (count) + *count = priv->scrolls.count; + return priv->scrolls.array; +} + +/** + * Add a new repaint request to queue. + * + * The repaints are assumed to be relative to current viewport. + * + * @param priv private handle pointer of the view to add repaint request. + * @param x horizontal position relative to current view port (scrolled). + * @param y vertical position relative to current view port (scrolled). + * @param w width of area to be repainted + * @param h height of area to be repainted + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +void ewk_view_repaint_add(Ewk_View_Private_Data* priv, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) +{ + EINA_SAFETY_ON_NULL_RETURN(priv); + _ewk_view_repaint_add(priv, x, y, w, h); +} + +/** + * Do layout if required, applied recursively. + * + * @param priv private handle pointer of the view to layout. + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +void ewk_view_layout_if_needed_recursive(Ewk_View_Private_Data* priv) +{ + EINA_SAFETY_ON_NULL_RETURN(priv); + + WebCore::FrameView* v = priv->main_frame->view(); + if (!v) { + ERR("no main frame view"); + return; + } + v->layoutIfNeededRecursive(); +} + +void ewk_view_scrolls_process(Ewk_View_Smart_Data* sd) +{ + EINA_SAFETY_ON_NULL_RETURN(sd); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + if (!sd->api->scrolls_process(sd)) + ERR("failed to process scrolls."); + _ewk_view_scrolls_flush(priv); +} + +struct _Ewk_View_Paint_Context { + WebCore::GraphicsContext* gc; + WebCore::FrameView* view; + cairo_t* cr; +}; + +/** + * Create a new paint context using the view as source and cairo as output. + * + * @param priv private handle pointer of the view to use as paint source. + * @param cr cairo context to use as paint destination. A new + * reference is taken, so it's safe to call cairo_destroy() + * after this function returns. + * + * @return newly allocated instance or @c 0 on errors. + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +Ewk_View_Paint_Context* ewk_view_paint_context_new(Ewk_View_Private_Data* priv, cairo_t* cr) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(priv, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(cr, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(priv->main_frame, 0); + WebCore::FrameView* view = priv->main_frame->view(); + EINA_SAFETY_ON_NULL_RETURN_VAL(view, 0); + Ewk_View_Paint_Context* ctxt = (Ewk_View_Paint_Context*)malloc(sizeof(*ctxt)); + EINA_SAFETY_ON_NULL_RETURN_VAL(ctxt, 0); + + ctxt->gc = new WebCore::GraphicsContext(cr); + if (!ctxt->gc) { + free(ctxt); + return 0; + } + ctxt->view = view; + ctxt->cr = cairo_reference(cr); + return ctxt; +} + +/** + * Destroy previously created paint context. + * + * @param ctxt paint context to destroy. Must @b not be @c 0. + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +void ewk_view_paint_context_free(Ewk_View_Paint_Context* ctxt) +{ + EINA_SAFETY_ON_NULL_RETURN(ctxt); + delete ctxt->gc; + cairo_destroy(ctxt->cr); + free(ctxt); +} + +/** + * Save (push to stack) paint context status. + * + * @param ctxt paint context to save. Must @b not be @c 0. + * + * @see ewk_view_paint_context_restore() + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +void ewk_view_paint_context_save(Ewk_View_Paint_Context* ctxt) +{ + EINA_SAFETY_ON_NULL_RETURN(ctxt); + cairo_save(ctxt->cr); + ctxt->gc->save(); +} + +/** + * Restore (pop from stack) paint context status. + * + * @param ctxt paint context to restore. Must @b not be @c 0. + * + * @see ewk_view_paint_context_save() + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +void ewk_view_paint_context_restore(Ewk_View_Paint_Context* ctxt) +{ + EINA_SAFETY_ON_NULL_RETURN(ctxt); + ctxt->gc->restore(); + cairo_restore(ctxt->cr); +} + +/** + * Clip paint context drawings to given area. + * + * @param ctxt paint context to clip. Must @b not be @c 0. + * @param area clip area to use. + * + * @see ewk_view_paint_context_save() + * @see ewk_view_paint_context_restore() + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +void ewk_view_paint_context_clip(Ewk_View_Paint_Context* ctxt, const Eina_Rectangle* area) +{ + EINA_SAFETY_ON_NULL_RETURN(ctxt); + EINA_SAFETY_ON_NULL_RETURN(area); + ctxt->gc->clip(WebCore::IntRect(area->x, area->y, area->w, area->h)); +} + +/** + * Paint using context using given area. + * + * @param ctxt paint context to paint. Must @b not be @c 0. + * @param area paint area to use. Coordinates are relative to current viewport, + * thus "scrolled". + * + * @note one may use cairo functions on the cairo context to + * translate, scale or any modification that may fit his desires. + * + * @see ewk_view_paint_context_clip() + * @see ewk_view_paint_context_paint_contents() + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +void ewk_view_paint_context_paint(Ewk_View_Paint_Context* ctxt, const Eina_Rectangle* area) +{ + EINA_SAFETY_ON_NULL_RETURN(ctxt); + EINA_SAFETY_ON_NULL_RETURN(area); + + WebCore::IntRect rect(area->x, area->y, area->w, area->h); + + if (ctxt->view->isTransparent()) + ctxt->gc->clearRect(rect); + ctxt->view->paint(ctxt->gc, rect); +} + +/** + * Paint just contents using context using given area. + * + * Unlike ewk_view_paint_context_paint(), this function paint just + * bare contents and ignores any scrolling, scrollbars and extras. It + * will walk the rendering tree and paint contents inside the given + * area to the cairo context specified in @a ctxt. + * + * @param ctxt paint context to paint. Must @b not be @c 0. + * @param area paint area to use. Coordinates are absolute to page. + * + * @note one may use cairo functions on the cairo context to + * translate, scale or any modification that may fit his desires. + * + * @see ewk_view_paint_context_clip() + * @see ewk_view_paint_context_paint() + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +void ewk_view_paint_context_paint_contents(Ewk_View_Paint_Context* ctxt, const Eina_Rectangle* area) +{ + EINA_SAFETY_ON_NULL_RETURN(ctxt); + EINA_SAFETY_ON_NULL_RETURN(area); + + WebCore::IntRect rect(area->x, area->y, area->w, area->h); + + if (ctxt->view->isTransparent()) + ctxt->gc->clearRect(rect); + + ctxt->view->paintContents(ctxt->gc, rect); +} + +/** + * Scale the contents by the given factors. + * + * This function applies a scaling transformation using Cairo. + * + * @param ctxt paint context to paint. Must @b not be @c 0. + * @param scale_x scale factor for the X dimension. + * @param scale_y scale factor for the Y dimension. + */ +void ewk_view_paint_context_scale(Ewk_View_Paint_Context* ctxt, float scale_x, float scale_y) +{ + EINA_SAFETY_ON_NULL_RETURN(ctxt); + + ctxt->gc->scale(WebCore::FloatSize(scale_x, scale_y)); +} + +/** + * Performs a translation of the origin coordinates. + * + * This function moves the origin coordinates by @p x and @p y pixels. + * + * @param ctxt paint context to paint. Must @b not be @c 0. + * @param x amount of pixels to translate in the X dimension. + * @param y amount of pixels to translate in the Y dimension. + */ +void ewk_view_paint_context_translate(Ewk_View_Paint_Context* ctxt, float x, float y) +{ + EINA_SAFETY_ON_NULL_RETURN(ctxt); + + ctxt->gc->translate(x, y); +} + +/** + * Paint using given graphics context the given area. + * + * This uses viewport relative area and will also handle scrollbars + * and other extra elements. See ewk_view_paint_contents() for the + * alternative function. + * + * @param priv private handle pointer of view to use as paint source. + * @param cr cairo context to use as paint destination. Its state will + * be saved before operation and restored afterwards. + * @param area viewport relative geometry to paint. + * + * @return @c EINA_TRUE on success and @c EINA_FALSE on failure, like + * incorrect parameters. + * + * @note this is an easy to use version, but internal structures are + * always created, then graphics context is clipped, then + * painted, restored and destroyed. This might not be optimum, + * so using #Ewk_View_Paint_Context may be a better solutions + * for large number of operations. + * + * @see ewk_view_paint_contents() + * @see ewk_view_paint_context_paint() + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +Eina_Bool ewk_view_paint(Ewk_View_Private_Data* priv, cairo_t* cr, const Eina_Rectangle* area) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(priv, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(cr, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(area, EINA_FALSE); + WebCore::FrameView* view = priv->main_frame->view(); + EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE); + + if (view->needsLayout()) + view->forceLayout(); + WebCore::GraphicsContext gc(cr); + WebCore::IntRect rect(area->x, area->y, area->w, area->h); + + cairo_save(cr); + gc.save(); + gc.clip(rect); + if (view->isTransparent()) + gc.clearRect(rect); + view->paint(&gc, rect); + gc.restore(); + cairo_restore(cr); + + return EINA_TRUE; +} + +/** + * Paint just contents using given graphics context the given area. + * + * This uses absolute coordinates for area and will just handle + * contents, no scrollbars or extras. See ewk_view_paint() for the + * alternative solution. + * + * @param priv private handle pointer of view to use as paint source. + * @param cr cairo context to use as paint destination. Its state will + * be saved before operation and restored afterwards. + * @param area absolute geometry to paint. + * + * @return @c EINA_TRUE on success and @c EINA_FALSE on failure, like + * incorrect parameters. + * + * @note this is an easy to use version, but internal structures are + * always created, then graphics context is clipped, then + * painted, restored and destroyed. This might not be optimum, + * so using #Ewk_View_Paint_Context may be a better solutions + * for large number of operations. + * + * @see ewk_view_paint() + * @see ewk_view_paint_context_paint_contents() + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +Eina_Bool ewk_view_paint_contents(Ewk_View_Private_Data* priv, cairo_t* cr, const Eina_Rectangle* area) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(priv, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(cr, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(area, EINA_FALSE); + WebCore::FrameView* view = priv->main_frame->view(); + EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE); + + WebCore::GraphicsContext gc(cr); + WebCore::IntRect rect(area->x, area->y, area->w, area->h); + + cairo_save(cr); + gc.save(); + gc.clip(rect); + if (view->isTransparent()) + gc.clearRect(rect); + view->paintContents(&gc, rect); + gc.restore(); + cairo_restore(cr); + + return EINA_TRUE; +} + + +/* internal methods ****************************************************/ +/** + * @internal + * Reports the view is ready to be displayed as all elements are aready. + * + * Emits signal: "ready" with no parameters. + */ +void ewk_view_ready(Evas_Object* o) +{ + DBG("o=%p", o); + evas_object_smart_callback_call(o, "ready", 0); +} + +/** + * @internal + * The view title was changed by the frame loader. + * + * Emits signal: "title,changed" with pointer to new title string. + */ +void ewk_view_title_set(Evas_Object* o, const char* title) +{ + DBG("o=%p, title=%s", o, title ? title : "(null)"); + evas_object_smart_callback_call(o, "title,changed", (void*)title); +} + +/** + * @internal + * Reports that main frame's uri changed. + * + * Emits signal: "uri,changed" with pointer to the new uri string. + */ +void ewk_view_uri_changed(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + const char* uri = ewk_frame_uri_get(sd->main_frame); + DBG("o=%p, uri=%s", o, uri ? uri : "(null)"); + evas_object_smart_callback_call(o, "uri,changed", (void*)uri); +} + +/** + * @internal + * Reports the view started loading something. + * + * @param o View. + * + * Emits signal: "load,started" with no parameters. + */ +void ewk_view_load_started(Evas_Object* o) +{ + DBG("o=%p", o); + evas_object_smart_callback_call(o, "load,started", 0); +} + +/** + * Reports the frame started loading something. + * + * @param o View. + * + * Emits signal: "load,started" on main frame with no parameters. + */ +void ewk_view_frame_main_load_started(Evas_Object* o) +{ + DBG("o=%p", o); + Evas_Object* frame = ewk_view_frame_main_get(o); + evas_object_smart_callback_call(frame, "load,started", 0); +} + +/** + * @internal + * Reports the main frame started provisional load. + * + * @param o View. + * + * Emits signal: "load,provisional" on View with no parameters. + */ +void ewk_view_load_provisional(Evas_Object* o) +{ + DBG("o=%p", o); + evas_object_smart_callback_call(o, "load,provisional", 0); +} + +/** + * @internal + * Reports view can be shown after a new window is created. + * + * @param o Frame. + * + * Emits signal: "load,newwindow,show" on view with no parameters. + */ +void ewk_view_load_show(Evas_Object* o) +{ + DBG("o=%p", o); + evas_object_smart_callback_call(o, "load,newwindow,show", 0); +} + + +/** + * @internal + * Reports the main frame was cleared. + * + * @param o View. + */ +void ewk_view_frame_main_cleared(Evas_Object* o) +{ + DBG("o=%p", o); + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->api->flush); + sd->api->flush(sd); +} + +/** + * @internal + * Reports the main frame received an icon. + * + * @param o View. + * + * Emits signal: "icon,received" with no parameters. + */ +void ewk_view_frame_main_icon_received(Evas_Object* o) +{ + DBG("o=%p", o); + Evas_Object* frame = ewk_view_frame_main_get(o); + evas_object_smart_callback_call(frame, "icon,received", 0); +} + +/** + * @internal + * Reports load finished, optionally with error information. + * + * Emits signal: "load,finished" with pointer to #Ewk_Frame_Load_Error + * if any error, or @c 0 if successful load. + * + * @note there should not be any error stuff here, but trying to be + * compatible with previous WebKit. + */ +void ewk_view_load_finished(Evas_Object* o, const Ewk_Frame_Load_Error* error) +{ + DBG("o=%p, error=%p", o, error); + evas_object_smart_callback_call(o, "load,finished", (void*)error); +} + +/** + * @internal + * Reports load failed with error information. + * + * Emits signal: "load,error" with pointer to Ewk_Frame_Load_Error. + */ +void ewk_view_load_error(Evas_Object* o, const Ewk_Frame_Load_Error* error) +{ + DBG("o=%p, error=%p", o, error); + evas_object_smart_callback_call(o, "load,error", (void*)error); +} + +/** + * @internal + * Reports load progress changed. + * + * Emits signal: "load,progress" with pointer to a double from 0.0 to 1.0. + */ +void ewk_view_load_progress_changed(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + + // Evas_Coord w, h; + double progress = priv->page->progress()->estimatedProgress(); + + DBG("o=%p (p=%0.3f)", o, progress); + + evas_object_smart_callback_call(o, "load,progress", &progress); +} + +/** + * @internal + * Reports view @param o should be restored to default conditions + * + * @param o View. + * @param frame Frame that originated restore. + * + * Emits signal: "restore" with frame. + */ +void ewk_view_restore_state(Evas_Object* o, Evas_Object* frame) +{ + evas_object_smart_callback_call(o, "restore", frame); +} + +/** + * @internal + * Delegates to browser the creation of a new window. If it is not implemented, + * current view is returned, so navigation might continue in same window. + * + * @param o Current view. + * + * @return New view, in case smart class implements the creation of new windows; + * else, current view @param o. + */ +Evas_Object* ewk_view_window_create(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + + if (!sd->api->window_create) + return o; + + return sd->api->window_create(sd); +} + +/** + * @internal + * Reports mouse has moved over a link. + * + * Emits signal: "link,hover,in" + */ +void ewk_view_mouse_link_hover_in(Evas_Object* o, void* data) +{ + evas_object_smart_callback_call(o, "link,hover,in", data); +} + +/** + * @internal + * Reports mouse is not over a link anymore. + * + * Emits signal: "link,hover,out" + */ +void ewk_view_mouse_link_hover_out(Evas_Object* o) +{ + evas_object_smart_callback_call(o, "link,hover,out", 0); +} + +/** + * @internal + * Set toolbar visible. + * + * Emits signal: "toolbars,visible,set" with a pointer to a boolean. + */ +void ewk_view_toolbars_visible_set(Evas_Object* o, Eina_Bool visible) +{ + DBG("o=%p (visible=%d)", o, !!visible); + evas_object_smart_callback_call(o, "toolbars,visible,set", &visible); +} + +/** + * @internal + * Get toolbar visibility. + * + * @param o View. + * @param visible boolean pointer in which to save the result. It defaults + * to @c FALSE, i.e. if browser does no listen to emitted signal, it means + * there are no toolbars and therefore they are not visible. + * + * Emits signal: "toolbars,visible,get" with a pointer to a boolean. + */ +void ewk_view_toolbars_visible_get(Evas_Object* o, Eina_Bool* visible) +{ + DBG("%s, o=%p", __func__, o); + *visible = EINA_FALSE; + evas_object_smart_callback_call(o, "toolbars,visible,get", visible); +} + +/** + * @internal + * Set statusbar visible. + * + * @param o View. + * @param visible @c TRUE if statusbar are visible, @c FALSE otherwise. + * + * Emits signal: "statusbar,visible,set" with a pointer to a boolean. + */ +void ewk_view_statusbar_visible_set(Evas_Object* o, Eina_Bool visible) +{ + DBG("o=%p (visible=%d)", o, !!visible); + evas_object_smart_callback_call(o, "statusbar,visible,set", &visible); +} + +/** + * @internal + * Get statusbar visibility. + * + * @param o View. + * @param visible boolean pointer in which to save the result. It defaults + * to @c FALSE, i.e. if browser does no listen to emitted signal, it means + * there is no statusbar and therefore it is not visible. + * + * Emits signal: "statusbar,visible,get" with a pointer to a boolean. + */ +void ewk_view_statusbar_visible_get(Evas_Object* o, Eina_Bool* visible) +{ + DBG("%s, o=%p", __func__, o); + *visible = EINA_FALSE; + evas_object_smart_callback_call(o, "statusbar,visible,get", visible); +} + +/** + * @internal + * Set text of statusbar + * + * @param o View. + * @param text New text to put on statusbar. + * + * Emits signal: "statusbar,text,set" with a string. + */ +void ewk_view_statusbar_text_set(Evas_Object* o, const char* text) +{ + DBG("o=%p (text=%s)", o, text); + INF("status bar text set: %s", text); + evas_object_smart_callback_call(o, "statusbar,text,set", (void *)text); +} + +/** + * @internal + * Set scrollbars visible. + * + * @param o View. + * @param visible @c TRUE if scrollbars are visible, @c FALSE otherwise. + * + * Emits signal: "scrollbars,visible,set" with a pointer to a boolean. + */ +void ewk_view_scrollbars_visible_set(Evas_Object* o, Eina_Bool visible) +{ + DBG("o=%p (visible=%d)", o, !!visible); + evas_object_smart_callback_call(o, "scrollbars,visible,set", &visible); +} + +/** + * @internal + * Get scrollbars visibility. + * + * @param o View. + * @param visible boolean pointer in which to save the result. It defaults + * to @c FALSE, i.e. if browser does no listen to emitted signal, it means + * there are no scrollbars and therefore they are not visible. + * + * Emits signal: "scrollbars,visible,get" with a pointer to a boolean. + */ +void ewk_view_scrollbars_visible_get(Evas_Object* o, Eina_Bool* visible) +{ + DBG("%s, o=%p", __func__, o); + *visible = EINA_FALSE; + evas_object_smart_callback_call(o, "scrollbars,visible,get", visible); +} + +/** + * @internal + * Set menubar visible. + * + * @param o View. + * @param visible @c TRUE if menubar is visible, @c FALSE otherwise. + * + * Emits signal: "menubar,visible,set" with a pointer to a boolean. + */ +void ewk_view_menubar_visible_set(Evas_Object* o, Eina_Bool visible) +{ + DBG("o=%p (visible=%d)", o, !!visible); + evas_object_smart_callback_call(o, "menubar,visible,set", &visible); +} + +/** + * @internal + * Get menubar visibility. + * + * @param o View. + * @param visible boolean pointer in which to save the result. It defaults + * to @c FALSE, i.e. if browser does no listen to emitted signal, it means + * there is no menubar and therefore it is not visible. + * + * Emits signal: "menubar,visible,get" with a pointer to a boolean. + */ +void ewk_view_menubar_visible_get(Evas_Object* o, Eina_Bool* visible) +{ + DBG("%s, o=%p", __func__, o); + *visible = EINA_FALSE; + evas_object_smart_callback_call(o, "menubar,visible,get", visible); +} + +/** + * @internal + * Set tooltip text and display if it is currently hidden. + * + * @param o View. + * @param text Text to set tooltip to. + * + * Emits signal: "tooltip,text,set" with a string. If tooltip must be actually + * removed, text will be 0 or '\0' + */ +void ewk_view_tooltip_text_set(Evas_Object* o, const char* text) +{ + DBG("o=%p text=%s", o, text); + evas_object_smart_callback_call(o, "tooltip,text,set", (void *)text); +} + +/** + * @internal + * + * @param o View. + * @param message String to show on console. + * @param lineNumber Line number. + * @sourceID Source id. + * + */ +void ewk_view_add_console_message(Evas_Object* o, const char* message, unsigned int lineNumber, const char* sourceID) +{ + DBG("o=%p message=%s lineNumber=%u sourceID=%s", o, message, lineNumber, sourceID); + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->add_console_message); + sd->api->add_console_message(sd, message, lineNumber, sourceID); +} + +void ewk_view_run_javascript_alert(Evas_Object* o, Evas_Object* frame, const char* message) +{ + DBG("o=%p frame=%p message=%s", o, frame, message); + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->api); + + if (!sd->api->run_javascript_alert) + return; + + sd->api->run_javascript_alert(sd, frame, message); +} + +Eina_Bool ewk_view_run_javascript_confirm(Evas_Object* o, Evas_Object* frame, const char* message) +{ + DBG("o=%p frame=%p message=%s", o, frame, message); + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE); + + if (!sd->api->run_javascript_confirm) + return EINA_FALSE; + + return sd->api->run_javascript_confirm(sd, frame, message); +} + +Eina_Bool ewk_view_run_javascript_prompt(Evas_Object* o, Evas_Object* frame, const char* message, const char* defaultValue, char** value) +{ + DBG("o=%p frame=%p message=%s", o, frame, message); + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE); + + if (!sd->api->run_javascript_prompt) + return EINA_FALSE; + + return sd->api->run_javascript_prompt(sd, frame, message, defaultValue, value); +} + +/** + * @internal + * Delegates to client to decide whether a script must be stopped because it's + * running for too long. If client does not implement it, it goes to default + * implementation, which logs and returns EINA_FALSE. Client may remove log by + * setting this function 0, which will just return EINA_FALSE. + * + * @param o View. + * + * @return @c EINA_TRUE if script should be stopped; @c EINA_FALSE otherwise + */ +Eina_Bool ewk_view_should_interrupt_javascript(Evas_Object* o) +{ + DBG("o=%p", o); + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE); + + if (!sd->api->should_interrupt_javascript) + return EINA_FALSE; + + return sd->api->should_interrupt_javascript(sd); +} + +/** + * @internal + * This is called whenever the web site shown in @param frame is asking to store data + * to the database @param databaseName and the quota allocated to that web site + * is exceeded. Browser may use this to increase the size of quota before the + * originating operationa fails. + * + * @param o View. + * @param frame The frame whose web page exceeded its database quota. + * @param databaseName Database name. + */ +void ewk_view_exceeded_database_quota(Evas_Object* o, Evas_Object* frame, const char* databaseName) +{ + DBG("o=%p", o); + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->exceeded_database_quota); + sd->api->exceeded_database_quota(sd, frame, databaseName); +} + +/** + * @internal + * Open panel to choose a file. + * + * @param o View. + * @param frame Frame in which operation is required. + * @param allows_multiple_files @c EINA_TRUE when more than one file may be + * selected, @c EINA_FALSE otherwise + * @suggested_filenames List of suggested files to select. It's advisable to + * just ignore this value, since it's a source of security flaw. + * @selected_filenames List of files selected. + * + * @return @EINA_FALSE if user canceled file selection; @EINA_TRUE if confirmed. + */ +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) +{ + DBG("o=%p frame=%p allows_multiple_files=%d", o, frame, allows_multiple_files); + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE); + Eina_Bool confirm; + + if (!sd->api->run_open_panel) + return EINA_FALSE; + + *selected_filenames = 0; + + confirm = sd->api->run_open_panel(sd, frame, allows_multiple_files, suggested_filenames, selected_filenames); + if (!confirm && *selected_filenames) + ERR("Canceled file selection, but selected filenames != 0. Free names before return."); + return confirm; +} + +void ewk_view_repaint(Evas_Object* o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) +{ + DBG("o=%p, region=%d,%d + %dx%d", o, x, y, w, h); + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + + if (!priv->main_frame->contentRenderer()) { + ERR("no main frame content renderer."); + return; + } + + _ewk_view_repaint_add(priv, x, y, w, h); + _ewk_view_smart_changed(sd); +} + +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) +{ + DBG("o=%p, delta: %d,%d, scroll: %d,%d+%dx%d, clip: %d,%d+%dx%d", + o, dx, dy, sx, sy, sw, sh, cx, cy, cw, ch); + + if ((sx != cx) || (sy != cy) || (sw != cw) || (sh != ch)) + WRN("scroll region and clip are different! %d,%d+%dx%d and %d,%d+%dx%d", + sx, sy, sw, sh, cx, cy, cw, ch); + + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + EINA_SAFETY_ON_TRUE_RETURN(!dx && !dy); + + _ewk_view_scroll_add(priv, dx, dy, sx, sy, sw, sh, main_frame); + _ewk_view_smart_changed(sd); +} + +WebCore::Page* ewk_view_core_page_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + return priv->page; +} + +/** + * Creates a new frame for given url and owner element. + * + * Emits "frame,created" with the new frame object on success. + */ +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) +{ + DBG("o=%p, frame=%p, name=%s, ownerElement=%p, url=%s, referrer=%s", + o, frame, name.utf8().data(), ownerElement, + url.prettyURL().utf8().data(), referrer.utf8().data()); + + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); + + WTF::RefPtr<WebCore::Frame> cf = _ewk_view_core_frame_new + (sd, priv, ownerElement); + if (!cf) { + ERR("Could not create child core frame '%s'", name.utf8().data()); + return 0; + } + + if (!ewk_frame_child_add(frame, cf, name, url, referrer)) { + ERR("Could not create child frame object '%s'", name.utf8().data()); + return 0; + } + + // The creation of the frame may have removed itself already. + if (!cf->page() || !cf->tree() || !cf->tree()->parent()) + return 0; + + sd->changed.frame_rect = EINA_TRUE; + _ewk_view_smart_changed(sd); + + evas_object_smart_callback_call(o, "frame,created", frame); + return cf.release(); +} + +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) +{ + DBG("o=%p, frame=%p, size=%dx%d, element=%p, url=%s, mimeType=%s", + o, frame, pluginSize.width(), pluginSize.height(), element, + url.prettyURL().utf8().data(), mimeType.utf8().data()); + + EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); + sd->changed.frame_rect = EINA_TRUE; + _ewk_view_smart_changed(sd); + + return ewk_frame_plugin_create + (frame, pluginSize, element, url, paramNames, paramValues, + mimeType, loadManually); +} + + +/** + * @internal + * + * Creates a new popup with options when a select widget was clicked. + * + * @param client PopupMenuClient instance that allows communication with webkit. + * @param selected Selected item. + * @param rect Menu's position. + * + * Emits: "popup,create" with a list of Ewk_Menu containing each item's data + */ +void ewk_view_popup_new(Evas_Object* o, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect) +{ + INF("o=%p", o); + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + + if (priv->popup.menu_client) + ewk_view_popup_destroy(o); + + priv->popup.menu_client = client; + + // populate items + const int size = client->listSize(); + for (int i = 0; i < size; ++i) { + Ewk_Menu_Item* item = (Ewk_Menu_Item*) malloc(sizeof(*item)); + if (client->itemIsSeparator(i)) + item->type = EWK_MENU_SEPARATOR; + else if (client->itemIsLabel(i)) + item->type = EWK_MENU_GROUP; + else + item->type = EWK_MENU_OPTION; + item->text = eina_stringshare_add(client->itemText(i).utf8().data()); + + priv->popup.menu.items = eina_list_append(priv->popup.menu.items, item); + } + + priv->popup.menu.x = rect.x(); + priv->popup.menu.y = rect.y(); + priv->popup.menu.width = rect.width(); + priv->popup.menu.height = rect.height(); + evas_object_smart_callback_call(o, "popup,create", &priv->popup.menu); +} + +/** + * Destroy a previously created menu. + * + * Before destroying, it informs client that menu's data is ready to be + * destroyed by sending a "popup,willdelete" with a list of menu items. Then it + * removes any reference to menu inside webkit. It's safe to call this + * function either from inside webkit or from browser. + * + * @param o View. + * + * @returns EINA_TRUE in case menu was successfully destroyed or EINA_TRUE in + * case there wasn't any menu to be destroyed. + */ +Eina_Bool ewk_view_popup_destroy(Evas_Object* o) +{ + INF("o=%p", o); + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + + if (!priv->popup.menu_client) + return EINA_FALSE; + + evas_object_smart_callback_call(o, "popup,willdelete", &priv->popup.menu); + + void* itemv; + EINA_LIST_FREE(priv->popup.menu.items, itemv) { + Ewk_Menu_Item* item = (Ewk_Menu_Item*)itemv; + eina_stringshare_del(item->text); + free(item); + } + priv->popup.menu_client->popupDidHide(); + priv->popup.menu_client = 0; + + return EINA_TRUE; +} + +/** + * Changes currently selected item. + * + * Changes the option selected in select widget. This is called by browser + * whenever user has chosen a different item. Most likely after calling this, a + * call to ewk_view_popup_destroy might be made in order to close the popup. + * + * @param o View. + * @index Index of selected item. + * + */ +void ewk_view_popup_selected_set(Evas_Object* o, int index) +{ + INF("o=%p", o); + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); + + priv->popup.menu_client->valueChanged(index); +} + +/** + * @internal + * Request a download to user. + * + * @param o View. + * @oaram download Ewk_Download struct to be sent. + * + * Emits: "download,request" with an Ewk_Download containing the details of the + * requested download. The download per se must be handled outside of webkit. + */ +void ewk_view_download_request(Evas_Object* o, Ewk_Download* download) +{ + DBG("view=%p", o); + evas_object_smart_callback_call(o, "download,request", download); +} diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h new file mode 100644 index 0000000..20df601 --- /dev/null +++ b/WebKit/efl/ewk/ewk_view.h @@ -0,0 +1,455 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ewk_view_h +#define ewk_view_h + +#include <Evas.h> +#include <cairo.h> +#include <ewk_history.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief WebKit main smart object. + * + * This object is the high level access to WebKit-EFL browser + * component. It is responsible for managing the main frame and other + * critical resources. + * + * Every ewk_view has at least one frame, called "main frame" and + * retrieved with ewk_view_frame_main_get(). Direct frame access is + * often discouraged, it is recommended to use ewk_view functions + * instead. + * + * The following signals (see evas_object_smart_callback_add()) are emitted: + * + * - "ready", void: page is fully loaded. + * - "title,changed", const char*: title of the main frame changed. + * - "uri,changed", const char*: uri of the main frame changed. + * - "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: view started provisional load. + * - "load,error", const Ewk_Frame_Load_Error*: reports load failed + * and as argument a pointer to structure defining the error. + * - "frame,created", Evas_Object*: when frames are created, they are + * emitted in this signal. + * - "zoom,animated,end", void: requested animated zoom is finished. + * - "menubar,visible,set", Eina_Bool: set menubar visibility. + * - "menubar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if menubar is + * visible; otherwise, @c EINA_FALSE. + * - "menubar,visible,set", Eina_Bool: set menubar visibility. + * - "menubar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if menubar is + * visible; @c EINA_FALSE, otherwise. + * - "scrollbars,visible,set", Eina_Bool: set scrollbars visibility. + * - "scrollbars,visible,get", Eina_Bool *: expects a @c EINA_TRUE if scrollbars + * are visible; @c EINA_FALSE, otherwise. + * - "statusbar,visible,set", Eina_Bool: set statusbar visibility. + * - "statusbar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if statusbar is + * visible; @c EINA_FALSE, otherwise. + * - "toolbar,visible,set", Eina_Bool: set toolbar visibility. + * - "toolbar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if toolbar + * is visible; @c EINA_FALSE, otherwise. + * - "link,hover,in", const char *link[2]: reports mouse is over a link and as + * argument gives the url in link[0] and link's title in link[1]. + * - "link,hover,out", const char *link[2]: reports mouse moved out from a link + * and as argument gives the url in link[0] and link's title in link[1]. + * - "popup,create", Ewk_Menu: reports that a new menu was created. + * - "popup,willdeleted", Ewk_Menu: reports that a previously created menu is + * about to be deleted. + * - "download,request", Ewk_Download: reports a download is being requested + * and as arguments gives its details. + * - "icon,received", void: main frame received an icon. + */ + +typedef struct _Ewk_View_Smart_Data Ewk_View_Smart_Data; + +/** + * Ewk view's class, to be overridden by sub-classes. + */ +typedef struct _Ewk_View_Smart_Class Ewk_View_Smart_Class; +struct _Ewk_View_Smart_Class { + Evas_Smart_Class sc; /**< all but 'data' is free to be changed. */ + unsigned long version; + + Evas_Object *(*window_create)(Ewk_View_Smart_Data *sd); /**< creates a new window, requested by webkit */ + // hooks to allow different backing stores + Evas_Object *(*backing_store_add)(Ewk_View_Smart_Data *sd); /**< must be defined */ + Eina_Bool (*scrolls_process)(Ewk_View_Smart_Data *sd); /**< must be defined */ + Eina_Bool (*repaints_process)(Ewk_View_Smart_Data *sd); /**< must be defined */ + Eina_Bool (*contents_resize)(Ewk_View_Smart_Data *sd, int w, int h); + Eina_Bool (*zoom_set)(Ewk_View_Smart_Data *sd, float zoom, Evas_Coord cx, Evas_Coord cy); + Eina_Bool (*zoom_weak_set)(Ewk_View_Smart_Data *sd, float zoom, Evas_Coord cx, Evas_Coord cy); + void (*zoom_weak_smooth_scale_set)(Ewk_View_Smart_Data *sd, Eina_Bool smooth_scale); + void (*bg_color_set)(Ewk_View_Smart_Data *sd, unsigned char r, unsigned char g, unsigned char b, unsigned char a); + void (*flush)(Ewk_View_Smart_Data *sd); + Eina_Bool (*pre_render_region)(Ewk_View_Smart_Data *sd, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom); + void (*pre_render_cancel)(Ewk_View_Smart_Data *sd); + // event handling: + // - returns true if handled + // - if overridden, have to call parent method if desired + Eina_Bool (*focus_in)(Ewk_View_Smart_Data *sd); + Eina_Bool (*focus_out)(Ewk_View_Smart_Data *sd); + Eina_Bool (*mouse_wheel)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Wheel *ev); + Eina_Bool (*mouse_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Down *ev); + Eina_Bool (*mouse_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Up *ev); + Eina_Bool (*mouse_move)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Move *ev); + Eina_Bool (*key_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Down *ev); + Eina_Bool (*key_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Up *ev); + + void (*add_console_message)(Ewk_View_Smart_Data *sd, const char *message, unsigned int lineNumber, const char *sourceID); + void (*run_javascript_alert)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *message); + Eina_Bool (*run_javascript_confirm)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *message); + Eina_Bool (*run_javascript_prompt)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *message, const char *defaultValue, char **value); + Eina_Bool (*should_interrupt_javascript)(Ewk_View_Smart_Data *sd); + void (*exceeded_database_quota)(Ewk_View_Smart_Data *sd, Evas_Object *frame, const char *databaseName); + + Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Eina_Bool allows_multiple_files, const Eina_List *suggested_filenames, Eina_List **selected_filenames); +}; + +#define EWK_VIEW_SMART_CLASS_VERSION 1UL /** the version you have to put into the version field in the Ewk_View_Smart_Class structure */ + +/** + * Initializer for whole Ewk_View_Smart_Class structure. + * + * @param smart_class_init initializer to use for the "base" field + * (Evas_Smart_Class). + * + * @see EWK_VIEW_SMART_CLASS_INIT_NULL + * @see EWK_VIEW_SMART_CLASS_INIT_VERSION + * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION + */ +#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} + +/** + * Initializer to zero a whole Ewk_View_Smart_Class structure. + * + * @see EWK_VIEW_SMART_CLASS_INIT_VERSION + * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION + * @see EWK_VIEW_SMART_CLASS_INIT + */ +#define EWK_VIEW_SMART_CLASS_INIT_NULL EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NULL) + +/** + * Initializer to zero a whole Ewk_View_Smart_Class structure and set version. + * + * Similar to EWK_VIEW_SMART_CLASS_INIT_NULL, but will set version field of + * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION + * + * @see EWK_VIEW_SMART_CLASS_INIT_NULL + * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION + * @see EWK_VIEW_SMART_CLASS_INIT + */ +#define EWK_VIEW_SMART_CLASS_INIT_VERSION EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_VERSION) + +/** + * Initializer to zero a whole Ewk_View_Smart_Class structure and set + * name and version. + * + * Similar to EWK_VIEW_SMART_CLASS_INIT_NULL, but will set version field of + * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION and name + * to the specific value. + * + * It will keep a reference to name field as a "const char *", that is, + * name must be available while the structure is used (hint: static or global!) + * and will not be modified. + * + * @see EWK_VIEW_SMART_CLASS_INIT_NULL + * @see EWK_VIEW_SMART_CLASS_INIT_VERSION + * @see EWK_VIEW_SMART_CLASS_INIT + */ +#define EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION(name) EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name)) + +/** + * @internal + * + * private data that is used internally by EFL WebKit and should never + * be modified from outside. + */ +typedef struct _Ewk_View_Private_Data Ewk_View_Private_Data; + +enum _Ewk_Menu_Item_Type { + EWK_MENU_SEPARATOR, + EWK_MENU_GROUP, + EWK_MENU_OPTION +}; +typedef enum _Ewk_Menu_Item_Type Ewk_Menu_Item_Type; + + +/** + * Structure do contain data of each menu item + */ +typedef struct _Ewk_Menu_Item Ewk_Menu_Item; +struct _Ewk_Menu_Item { + const char *text; /**< Item's text */ + Ewk_Menu_Item_Type type; /** Item's type */ +}; + +/** + * Structure to contain Popup menu data. + */ +typedef struct _Ewk_Menu Ewk_Menu; +struct _Ewk_Menu { + Eina_List* items; + int x; + int y; + int width; + int height; +}; + +/** + * Structure to contain Download data + */ +typedef struct _Ewk_Download Ewk_Download; +struct _Ewk_Download { + const char* url; + /* to be extended */ +}; + +/** + * Scroll request that should be processed by subclass implementations. + */ +typedef struct _Ewk_Scroll_Request Ewk_Scroll_Request; +struct _Ewk_Scroll_Request { + Evas_Coord dx, dy; + Evas_Coord x, y, w, h, x2, y2; + Eina_Bool main_scroll; +}; + +/** + * Structure to contain internal View data, it is to be considered + * private by users, but may be extended or changed by sub-classes + * (that's why it's in public header file). + */ +struct _Ewk_View_Smart_Data { + Evas_Object_Smart_Clipped_Data base; + const Ewk_View_Smart_Class *api; /**< reference to casted class instance */ + Evas_Object *self; /**< reference to owner object */ + Evas_Object *main_frame; /**< reference to main frame object */ + Evas_Object *backing_store; /**< reference to backing store */ + Ewk_View_Private_Data *_priv; /**< should never be accessed, c++ stuff */ + struct { + Evas_Coord x, y, w, h; /**< last used viewport */ + } view; + struct { + struct { + float start; + float end; + float current; /**< if > 0.0, then doing animated zoom. */ + } zoom; + } animated_zoom; + struct { + unsigned char r, g, b, a; + } bg_color; + Eina_Bool zoom_weak_smooth_scale:1; + struct { /**< what changed since last smart_calculate */ + Eina_Bool any:1; + Eina_Bool size:1; + Eina_Bool position:1; + Eina_Bool frame_rect:1; + } changed; +}; + +EAPI Eina_Bool ewk_view_base_smart_set(Ewk_View_Smart_Class *api); +EAPI Eina_Bool ewk_view_single_smart_set(Ewk_View_Smart_Class *api); + +EAPI Evas_Object *ewk_view_single_add(Evas *e); + +EAPI void ewk_view_fixed_layout_size_set(Evas_Object *o, Evas_Coord w, Evas_Coord h); +EAPI void ewk_view_fixed_layout_size_get(Evas_Object *o, Evas_Coord *w, Evas_Coord *h); + +EAPI void ewk_view_theme_set(Evas_Object *o, const char *path); +EAPI const char *ewk_view_theme_get(Evas_Object *o); + +EAPI Evas_Object *ewk_view_frame_main_get(const Evas_Object *o); +EAPI Evas_Object *ewk_view_frame_focused_get(const Evas_Object *o); + +EAPI Eina_Bool ewk_view_uri_set(Evas_Object *o, const char *uri); +EAPI const char *ewk_view_uri_get(const Evas_Object *o); +EAPI const char *ewk_view_title_get(const Evas_Object *o); + +EAPI Eina_Bool ewk_view_editable_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_editable_set(Evas_Object *o, Eina_Bool editable); + +EAPI void ewk_view_bg_color_set(Evas_Object *o, int r, int g, int b, int a); +EAPI void ewk_view_bg_color_get(const Evas_Object *o, int *r, int *g, int *b, int *a); + +EAPI char *ewk_view_selection_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_select_none(Evas_Object *o); +EAPI Eina_Bool ewk_view_select_all(Evas_Object *o); +EAPI Eina_Bool ewk_view_select_paragraph(Evas_Object *o); +EAPI Eina_Bool ewk_view_select_sentence(Evas_Object *o); +EAPI Eina_Bool ewk_view_select_line(Evas_Object *o); +EAPI Eina_Bool ewk_view_select_word(Evas_Object *o); + +EAPI void ewk_view_popup_selected_set(Evas_Object *o, int index); +EAPI Eina_Bool ewk_view_popup_destroy(Evas_Object *o); + +EAPI Eina_Bool ewk_view_text_search(const Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap); + +EAPI unsigned int ewk_view_text_matches_mark(Evas_Object *o, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit); +EAPI Eina_Bool ewk_view_text_matches_unmark_all(Evas_Object *o); +EAPI Eina_Bool ewk_view_text_matches_highlight_set(Evas_Object *o, Eina_Bool highlight); +EAPI Eina_Bool ewk_view_text_matches_highlight_get(const Evas_Object *o); + +EAPI double ewk_view_load_progress_get(const Evas_Object *o); + +EAPI Eina_Bool ewk_view_stop(Evas_Object *o); +EAPI Eina_Bool ewk_view_reload(Evas_Object *o); +EAPI Eina_Bool ewk_view_reload_full(Evas_Object *o); + +EAPI Eina_Bool ewk_view_back(Evas_Object *o); +EAPI Eina_Bool ewk_view_forward(Evas_Object *o); +EAPI Eina_Bool ewk_view_navigate(Evas_Object *o, int steps); + +EAPI Eina_Bool ewk_view_back_possible(Evas_Object *o); +EAPI Eina_Bool ewk_view_forward_possible(Evas_Object *o); +EAPI Eina_Bool ewk_view_navigate_possible(Evas_Object *o, int steps); + +EAPI Eina_Bool ewk_view_history_enable_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_history_enable_set(Evas_Object *o, Eina_Bool enable); +EAPI Ewk_History *ewk_view_history_get(const Evas_Object *o); + +EAPI float ewk_view_zoom_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_zoom_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy); + +EAPI Eina_Bool ewk_view_zoom_weak_smooth_scale_get(const Evas_Object *o); +EAPI void ewk_view_zoom_weak_smooth_scale_set(Evas_Object *o, Eina_Bool smooth_scale); + +EAPI Eina_Bool ewk_view_zoom_weak_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy); +EAPI Eina_Bool ewk_view_zoom_animated_mark_start(Evas_Object *o, float zoom); +EAPI Eina_Bool ewk_view_zoom_animated_mark_end(Evas_Object *o, float zoom); +EAPI Eina_Bool ewk_view_zoom_animated_mark_current(Evas_Object *o, float zoom); +EAPI Eina_Bool ewk_view_zoom_animated_mark_stop(Evas_Object *o); + +EAPI Eina_Bool ewk_view_zoom_animated_set(Evas_Object *o, float zoom, float duration, Evas_Coord cx, Evas_Coord cy); +EAPI Eina_Bool ewk_view_zoom_text_only_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_zoom_text_only_set(Evas_Object *o, Eina_Bool setting); + +EAPI Eina_Bool ewk_view_pre_render_region(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom); +EAPI void ewk_view_pre_render_cancel(Evas_Object *o); + +/* settings */ +EAPI const char *ewk_view_setting_user_agent_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_user_agent_set(Evas_Object *o, const char *user_agent); + +EAPI Eina_Bool ewk_view_setting_auto_load_images_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_auto_load_images_set(Evas_Object *o, Eina_Bool automatic); + +EAPI Eina_Bool ewk_view_setting_auto_shrink_images_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object *o, Eina_Bool automatic); + +EAPI Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_enable_scripts_set(Evas_Object *o, Eina_Bool enable); + +EAPI Eina_Bool ewk_view_setting_enable_plugins_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_enable_plugins_set(Evas_Object *o, Eina_Bool enable); + +EAPI Eina_Bool ewk_view_setting_scripts_window_open_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_scripts_window_open_set(Evas_Object *o, Eina_Bool allow); + +EAPI Eina_Bool ewk_view_setting_resizable_textareas_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_resizable_textareas_set(Evas_Object *o, Eina_Bool enable); + +EAPI const char *ewk_view_setting_user_stylesheet_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_user_stylesheet_set(Evas_Object *o, const char *uri); + +EAPI Eina_Bool ewk_view_setting_private_browsing_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_private_browsing_set(Evas_Object *o, Eina_Bool enable); + +EAPI Eina_Bool ewk_view_setting_caret_browsing_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_caret_browsing_set(Evas_Object *o, Eina_Bool enable); + +EAPI const char *ewk_view_setting_encoding_custom_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_encoding_custom_set(Evas_Object *o, const char *encoding); +EAPI const char *ewk_view_setting_encoding_default_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object *o, const char *encoding); + +EAPI int ewk_view_setting_font_minimum_size_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_minimum_size_set(Evas_Object *o, int size); +EAPI int ewk_view_setting_font_minimum_logical_size_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_minimum_logical_size_set(Evas_Object *o, int size); +EAPI int ewk_view_setting_font_default_size_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_default_size_set(Evas_Object *o, int size); +EAPI int ewk_view_setting_font_monospace_size_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_monospace_size_set(Evas_Object *o, int size); + +EAPI const char *ewk_view_setting_font_standard_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_standard_set(Evas_Object *o, const char *family); + +EAPI const char *ewk_view_setting_font_cursive_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_cursive_set(Evas_Object *o, const char *family); + +EAPI const char *ewk_view_setting_font_monospace_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_monospace_set(Evas_Object *o, const char *family); + +EAPI const char *ewk_view_setting_font_fantasy_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_fantasy_set(Evas_Object *o, const char *family); + +EAPI const char *ewk_view_setting_font_serif_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_serif_set(Evas_Object *o, const char *family); + +EAPI const char *ewk_view_setting_font_sans_serif_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_font_sans_serif_set(Evas_Object *o, const char *family); + +/* to be used by subclass implementations */ +EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o); + +EAPI const Eina_Rectangle *ewk_view_repaints_get(const Ewk_View_Private_Data *priv, size_t *count); +EAPI const Ewk_Scroll_Request *ewk_view_scroll_requests_get(const Ewk_View_Private_Data *priv, size_t *count); + +EAPI void ewk_view_repaint_add(Ewk_View_Private_Data *priv, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); + +EAPI void ewk_view_layout_if_needed_recursive(Ewk_View_Private_Data *priv); + +EAPI void ewk_view_scrolls_process(Ewk_View_Smart_Data *sd); + +/** + * Structure that keeps paint context. + * + * @note this is not for general use but just for subclasses that want + * to define their own backing store. + */ +typedef struct _Ewk_View_Paint_Context Ewk_View_Paint_Context; + +EAPI Ewk_View_Paint_Context *ewk_view_paint_context_new(Ewk_View_Private_Data *priv, cairo_t *cr); +EAPI void ewk_view_paint_context_free(Ewk_View_Paint_Context *ctxt); + +EAPI void ewk_view_paint_context_save(Ewk_View_Paint_Context *ctxt); +EAPI void ewk_view_paint_context_restore(Ewk_View_Paint_Context *ctxt); +EAPI void ewk_view_paint_context_clip(Ewk_View_Paint_Context *ctxt, const Eina_Rectangle *area); +EAPI void ewk_view_paint_context_paint(Ewk_View_Paint_Context *ctxt, const Eina_Rectangle *area); +EAPI void ewk_view_paint_context_paint_contents(Ewk_View_Paint_Context *ctxt, const Eina_Rectangle *area); +EAPI void ewk_view_paint_context_scale(Ewk_View_Paint_Context *ctxt, float scale_x, float scale_y); +EAPI void ewk_view_paint_context_translate(Ewk_View_Paint_Context *ctxt, float x, float y); + +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); + +#ifdef __cplusplus +} +#endif +#endif // ewk_view_h diff --git a/WebKit/efl/ewk/ewk_view_single.c b/WebKit/efl/ewk/ewk_view_single.c new file mode 100644 index 0000000..4111370 --- /dev/null +++ b/WebKit/efl/ewk/ewk_view_single.c @@ -0,0 +1,585 @@ +/* + Copyright (C) 2009-2010 ProFUSION embedded systems + Copyright (C) 2009-2010 Samsung Electronics + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "ewk_view.h" + +#include "ewk_frame.h" +#include "ewk_logging.h" + +#include <Evas.h> +#include <eina_safety_checks.h> +#include <string.h> + +static Ewk_View_Smart_Class _parent_sc = EWK_VIEW_SMART_CLASS_INIT_NULL; + +static void _ewk_view_single_on_del(void *data, Evas *e, Evas_Object *o, void *event_info) +{ + Evas_Object *clip = (Evas_Object*)data; + evas_object_del(clip); +} + +static Evas_Object *_ewk_view_single_smart_backing_store_add(Ewk_View_Smart_Data *sd) +{ + Evas_Object *bs = evas_object_image_add(sd->base.evas); + Evas_Object *clip = evas_object_rectangle_add(sd->base.evas); + evas_object_image_alpha_set(bs, EINA_FALSE); + evas_object_image_smooth_scale_set(bs, sd->zoom_weak_smooth_scale); + evas_object_clip_set(bs, clip); + evas_object_show(clip); + + evas_object_event_callback_add + (bs, EVAS_CALLBACK_DEL, _ewk_view_single_on_del, clip); + + return bs; +} + +static void _ewk_view_single_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) +{ + Ewk_View_Smart_Data *sd = (Ewk_View_Smart_Data*)evas_object_smart_data_get(o); + _parent_sc.sc.resize(o, w, h); + + // these should be queued and processed in calculate as well! + evas_object_image_size_set(sd->backing_store, w, h); + if (sd->animated_zoom.zoom.current < 0.00001) { + Evas_Object *clip = evas_object_clip_get(sd->backing_store); + Evas_Coord x, y, cw, ch; + evas_object_image_fill_set(sd->backing_store, 0, 0, w, h); + evas_object_geometry_get(sd->backing_store, &x, &y, 0, 0); + evas_object_move(clip, x, y); + ewk_frame_contents_size_get(sd->main_frame, &cw, &ch); + if (w > cw) + w = cw; + if (h > ch) + h = ch; + evas_object_resize(clip, w, h); + } +} + +static inline void _ewk_view_4b_move_region_up(uint32_t *image, size_t rows, size_t x, size_t y, size_t w, size_t h, size_t rowsize) +{ + uint32_t *src; + uint32_t *dst; + + dst = image + x + y * rowsize; + src = dst + rows * rowsize; + h -= rows; + + for (; h > 0; h--, dst += rowsize, src += rowsize) + memcpy(dst, src, w * 4); +} + +static inline void _ewk_view_4b_move_region_down(uint32_t *image, size_t rows, size_t x, size_t y, size_t w, size_t h, size_t rowsize) +{ + uint32_t *src; + uint32_t *dst; + + h -= rows; + src = image + x + (y + h - 1) * rowsize; + dst = src + rows * rowsize; + + for (; h > 0; h--, dst -= rowsize, src -= rowsize) + memcpy(dst, src, w * 4); +} + +static inline void _ewk_view_4b_move_line_left(uint32_t *dst, const uint32_t *src, size_t count) +{ + uint32_t *dst_end = dst + count; + /* no memcpy() as it does not allow overlapping regions */ + /* no memmove() as it will copy to a temporary buffer */ + /* TODO: loop unrolling, copying up to quad-words would help */ + for (; dst < dst_end; dst++, src++) + *dst = *src; +} + +static inline void _ewk_view_4b_move_line_right(uint32_t *dst, uint32_t *src, size_t count) +{ + uint32_t *dst_end = dst - count; + /* no memcpy() as it does not allow overlapping regions */ + /* no memmove() as it will copy to a temporary buffer */ + /* TODO: loop unrolling, copying up to quad-words would help */ + for (; dst > dst_end; dst--, src--) + *dst = *src; +} + +static inline void _ewk_view_4b_move_region_left(uint32_t *image, size_t cols, size_t x, size_t y, size_t w, size_t h, size_t rowsize) +{ + uint32_t *src; + uint32_t *dst; + + dst = image + x + y * rowsize; + src = dst + cols; + w -= cols; + + for (; h > 0; h--, dst += rowsize, src += rowsize) + _ewk_view_4b_move_line_left(dst, src, w); +} + +static inline void _ewk_view_4b_move_region_right(uint32_t *image, size_t cols, size_t x, size_t y, size_t w, size_t h, size_t rowsize) +{ + uint32_t *src; + uint32_t *dst; + + w -= cols; + src = image + (x + w - 1) + y * rowsize; + dst = src + cols; + + for (; h > 0; h--, dst += rowsize, src += rowsize) + _ewk_view_4b_move_line_right(dst, src, w); +} + +/* catch-all function, not as optimized as the others, but does the work. */ +static inline void _ewk_view_4b_move_region(uint32_t *image, int dx, int dy, size_t x, size_t y, size_t w, size_t h, size_t rowsize) +{ + uint32_t *src; + uint32_t *dst; + + if (dy < 0) { + h += dy; + dst = image + x + y * rowsize; + src = dst - dy * rowsize; + if (dx <= 0) { + w += dx; + src -= dx; + for (; h > 0; h--, dst += rowsize, src += rowsize) + _ewk_view_4b_move_line_left(dst, src, w); + } else { + w -= dx; + src += w - 1; + dst += w + dx -1; + for (; h > 0; h--, dst += rowsize, src += rowsize) + _ewk_view_4b_move_line_right(dst, src, w); + } + } else { + h -= dy; + src = image + x + (y + h - 1) * rowsize; + dst = src + dy * rowsize; + if (dx <= 0) { + w += dx; + src -= dx; + for (; h > 0; h--, dst -= rowsize, src -= rowsize) + _ewk_view_4b_move_line_left(dst, src, w); + } else { + w -= dx; + src += w - 1; + dst += w + dx - 1; + for (; h > 0; h--, dst -= rowsize, src -= rowsize) + _ewk_view_4b_move_line_right(dst, src, w); + } + } +} + +static inline void _ewk_view_single_scroll_process_single(Ewk_View_Smart_Data *sd, void *pixels, Evas_Coord ow, Evas_Coord oh, const Ewk_Scroll_Request *sr) +{ + Evas_Coord sx, sy, sw, sh; + + DBG("%d,%d + %d,%d %+03d,%+03d, store: %p %dx%d", + sr->x, sr->y, sr->w, sr->h, sr->dx, sr->dy, pixels, ow, oh); + + sx = sr->x; + sy = sr->y; + sw = sr->w; + sh = sr->h; + + if (abs(sr->dx) >= sw || abs(sr->dy) >= sh) { + /* doubt webkit would be so stupid... */ + DBG("full page scroll %+03d,%+03d. convert to repaint %d,%d + %dx%d", + sr->dx, sr->dy, sx, sy, sw, sh); + ewk_view_repaint_add(sd->_priv, sx, sy, sw, sh); + return; + } + + if (sx < 0) { + sw += sx; + sx = 0; + } + if (sy < 0) { + sh += sy; + sy = 0; + } + + if (sx + sw > ow) + sw = ow - sx; + if (sy + sh > oh) + sh = oh - sy; + + if (sw < 0) + sw = 0; + if (sh < 0) + sh = 0; + + EINA_SAFETY_ON_TRUE_RETURN(!sw || !sh); + if (!sr->dx) { + if (sr->dy < 0) { + DBG("scroll up: %+03d,%+03d update=%d,%d+%dx%d, " + "repaint=%d,%d+%dx%d", + sr->dx, sr->dy, sx, sy, sw, sh + sr->dy, + sx, sy + sh + sr->dy, sw, -sr->dy); + + _ewk_view_4b_move_region_up + ((uint32_t*)pixels, -sr->dy, sx, sy, sw, sh, ow); + evas_object_image_data_update_add + (sd->backing_store, sx, sy, sw, sh + sr->dy); + + ewk_view_repaint_add(sd->_priv, sx, sy + sh + sr->dy, sw, -sr->dy); + } else if (sr->dy > 0) { + DBG("scroll down: %+03d,%+03d update=%d,%d+%dx%d, " + "repaint=%d,%d+%dx%d", + sr->dx, sr->dy, sx, sy + sr->dy, sw, sh - sr->dy, + sx, sy, sw, sr->dy); + + _ewk_view_4b_move_region_down + ((uint32_t*)pixels, sr->dy, sx, sy, sw, sh, ow); + evas_object_image_data_update_add + (sd->backing_store, sx, sy + sr->dy, sw, sh - sr->dy); + + ewk_view_repaint_add(sd->_priv, sx, sy, sw, sr->dy); + } + } else if (!sr->dy) { + if (sr->dx < 0) { + DBG("scroll left: %+03d,%+03d update=%d,%d+%dx%d, " + "repaint=%d,%d+%dx%d", + sr->dx, sr->dy, sx, sy, sw + sr->dx, sh, + sx + sw + sr->dx, sy, -sr->dx, sh); + + _ewk_view_4b_move_region_left + ((uint32_t*)pixels, -sr->dx, sx, sy, sw, sh, ow); + evas_object_image_data_update_add + (sd->backing_store, sx, sy, sw + sr->dx, sh); + + ewk_view_repaint_add(sd->_priv, sx + sw + sr->dx, sy, -sr->dx, sh); + } else if (sr->dx > 0) { + DBG("scroll up: %+03d,%+03d update=%d,%d+%dx%d, " + "repaint=%d,%d+%dx%d", + sr->dx, sr->dy, sx + sr->dx, sy, sw - sr->dx, sh, + sx, sy, sr->dx, sh); + + _ewk_view_4b_move_region_right + ((uint32_t*)pixels, sr->dx, sx, sy, sw, sh, ow); + evas_object_image_data_update_add + (sd->backing_store, sx + sr->dx, sy, sw - sr->dx, sh); + + ewk_view_repaint_add(sd->_priv, sx, sy, sr->dx, sh); + } + } else { + Evas_Coord mx, my, mw, mh, ax, ay, aw, ah, bx, by, bw, bh; + + if (sr->dx < 0) { + mx = sx; + mw = sw + sr->dx; + ax = mx + mw; + aw = -sr->dx; + } else { + ax = sx; + aw = sr->dx; + mx = ax + aw; + mw = sw - sr->dx; + } + + if (sr->dy < 0) { + my = sy; + mh = sh + sr->dy; + by = my + mh; + bh = -sr->dy; + } else { + by = sy; + bh = sr->dy; + my = by + bh; + mh = sh - sr->dy; + } + + ay = my; + ah = mh; + bx = sx; + bw = sw; + + DBG("scroll diagonal: %+03d,%+03d update=%d,%d+%dx%d, " + "repaints: h=%d,%d+%dx%d v=%d,%d+%dx%d", + sr->dx, sr->dy, mx, my, mw, mh, ax, ay, aw, ah, bx, by, bw, bh); + + _ewk_view_4b_move_region + ((uint32_t*)pixels, sr->dx, sr->dy, sx, sy, sw, sh, ow); + + evas_object_image_data_update_add(sd->backing_store, mx, my, mw, mh); + ewk_view_repaint_add(sd->_priv, ax, ay, aw, ah); + ewk_view_repaint_add(sd->_priv, bx, by, bw, bh); + } +} + +static Eina_Bool _ewk_view_single_smart_scrolls_process(Ewk_View_Smart_Data *sd) +{ + const Ewk_Scroll_Request *sr; + const Ewk_Scroll_Request *sr_end; + Evas_Coord ow, oh; + size_t count; + void *pixels = evas_object_image_data_get(sd->backing_store, 1); + evas_object_image_size_get(sd->backing_store, &ow, &oh); + + sr = ewk_view_scroll_requests_get(sd->_priv, &count); + sr_end = sr + count; + for (; sr < sr_end; sr++) + _ewk_view_single_scroll_process_single(sd, pixels, ow, oh, sr); + + return EINA_TRUE; +} + +static Eina_Bool _ewk_view_single_smart_repaints_process(Ewk_View_Smart_Data *sd) +{ + Ewk_View_Paint_Context *ctxt; + Evas_Coord ow, oh; + void *pixels; + Eina_Rectangle r = {0, 0, 0, 0}; + const Eina_Rectangle *pr; + const Eina_Rectangle *pr_end; + Eina_Tiler *tiler; + Eina_Iterator *itr; + cairo_status_t status; + cairo_surface_t *surface; + cairo_format_t format; + cairo_t *cairo; + size_t count; + Eina_Bool ret = EINA_TRUE; + + if (sd->animated_zoom.zoom.current < 0.00001) { + Evas_Object *clip = evas_object_clip_get(sd->backing_store); + Evas_Coord w, h, cw, ch; + // reset effects of zoom_weak_set() + evas_object_image_fill_set + (sd->backing_store, 0, 0, sd->view.w, sd->view.h); + evas_object_move(clip, sd->view.x, sd->view.y); + + w = sd->view.w; + h = sd->view.h; + + ewk_frame_contents_size_get(sd->main_frame, &cw, &ch); + if (w > cw) + w = cw; + if (h > ch) + h = ch; + evas_object_resize(clip, w, h); + } + + pixels = evas_object_image_data_get(sd->backing_store, 1); + evas_object_image_size_get(sd->backing_store, &ow, &oh); + + if (sd->bg_color.a < 255) + format = CAIRO_FORMAT_ARGB32; + else + format = CAIRO_FORMAT_RGB24; + + surface = cairo_image_surface_create_for_data + ((unsigned char*)pixels, format, ow, oh, ow * 4); + status = cairo_surface_status(surface); + if (status != CAIRO_STATUS_SUCCESS) { + ERR("could not create surface from data %dx%d: %s", + ow, oh, cairo_status_to_string(status)); + ret = EINA_FALSE; + goto error_cairo_surface; + } + cairo = cairo_create(surface); + status = cairo_status(cairo); + if (status != CAIRO_STATUS_SUCCESS) { + ERR("could not create cairo from surface %dx%d: %s", + ow, oh, cairo_status_to_string(status)); + ret = EINA_FALSE; + goto error_cairo; + } + + ctxt = ewk_view_paint_context_new(sd->_priv, cairo); + if (!ctxt) { + ERR("could not create paint context"); + ret = EINA_FALSE; + goto error_paint_context; + } + + tiler = eina_tiler_new(ow, oh); + if (!tiler) { + ERR("could not create tiler %dx%d", ow, oh); + ret = EINA_FALSE; + goto error_tiler; + } + + pr = ewk_view_repaints_get(sd->_priv, &count); + pr_end = pr + count; + for (; pr < pr_end; pr++) + eina_tiler_rect_add(tiler, pr); + + itr = eina_tiler_iterator_new(tiler); + if (!itr) { + ERR("could not get iterator for tiler"); + ret = EINA_FALSE; + goto error_iterator; + } + + int sx, sy; + ewk_frame_scroll_pos_get(sd->main_frame, &sx, &sy); + + EINA_ITERATOR_FOREACH(itr, r) { + Eina_Rectangle scrolled_rect = { + r.x + sx, r.y + sy, + r.w, r.h + }; + + ewk_view_paint_context_save(ctxt); + + if ((sx) || (sy)) + ewk_view_paint_context_translate(ctxt, -sx, -sy); + + ewk_view_paint_context_clip(ctxt, &scrolled_rect); + ewk_view_paint_context_paint_contents(ctxt, &scrolled_rect); + + ewk_view_paint_context_restore(ctxt); + evas_object_image_data_update_add + (sd->backing_store, r.x, r.y, r.w, r.h); + } + eina_iterator_free(itr); + +error_iterator: + eina_tiler_free(tiler); +error_tiler: + ewk_view_paint_context_free(ctxt); +error_paint_context: + cairo_destroy(cairo); +error_cairo: + cairo_surface_destroy(surface); +error_cairo_surface: + evas_object_image_data_set(sd->backing_store, pixels); /* dec refcount */ + + return ret; +} + +static Eina_Bool _ewk_view_single_smart_zoom_weak_set(Ewk_View_Smart_Data *sd, float zoom, Evas_Coord cx, Evas_Coord cy) +{ + // TODO: review + float scale = zoom / sd->animated_zoom.zoom.start; + Evas_Coord w = sd->view.w * scale; + Evas_Coord h = sd->view.h * scale; + Evas_Coord dx, dy, cw, ch; + Evas_Object *clip = evas_object_clip_get(sd->backing_store); + + ewk_frame_contents_size_get(sd->main_frame, &cw, &ch); + if (sd->view.w > 0 && sd->view.h > 0) { + dx = (w * (sd->view.w - cx)) / sd->view.w; + dy = (h * (sd->view.h - cy)) / sd->view.h; + } else { + dx = 0; + dy = 0; + } + + evas_object_image_fill_set(sd->backing_store, cx + dx, cy + dy, w, h); + + if (sd->view.w > 0 && sd->view.h > 0) { + dx = ((sd->view.w - w) * cx) / sd->view.w; + dy = ((sd->view.h - h) * cy) / sd->view.h; + } else { + dx = 0; + dy = 0; + } + evas_object_move(clip, sd->view.x + dx, sd->view.y + dy); + + if (cw < sd->view.w) + w = cw * scale; + if (ch < sd->view.h) + h = ch * scale; + evas_object_resize(clip, w, h); + return EINA_TRUE; +} + +static void _ewk_view_single_smart_zoom_weak_smooth_scale_set(Ewk_View_Smart_Data *sd, Eina_Bool smooth_scale) +{ + evas_object_image_smooth_scale_set(sd->backing_store, smooth_scale); +} + +static void _ewk_view_single_smart_bg_color_set(Ewk_View_Smart_Data *sd, unsigned char r, unsigned char g, unsigned char b, unsigned char a) +{ + evas_object_image_alpha_set(sd->backing_store, a < 255); +} + +/** + * Sets the smart class api using single backing store, enabling view + * to be inherited. + * + * @param api class definition to be set, all members with the + * exception of Evas_Smart_Class->data may be overridden. Must + * @b not be @c NULL. + * + * @note Evas_Smart_Class->data is used to implement type checking and + * is not supposed to be changed/overridden. If you need extra + * data for your smart class to work, just extend + * Ewk_View_Smart_Class instead. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (probably + * version mismatch). + * + * @see ewk_view_base_smart_set() + */ +Eina_Bool ewk_view_single_smart_set(Ewk_View_Smart_Class *api) +{ + if (!ewk_view_base_smart_set(api)) + return EINA_FALSE; + + if (EINA_UNLIKELY(!_parent_sc.sc.add)) + ewk_view_base_smart_set(&_parent_sc); + + api->sc.resize = _ewk_view_single_smart_resize; + + api->backing_store_add = _ewk_view_single_smart_backing_store_add; + api->scrolls_process = _ewk_view_single_smart_scrolls_process; + api->repaints_process = _ewk_view_single_smart_repaints_process; + api->zoom_weak_set = _ewk_view_single_smart_zoom_weak_set; + api->zoom_weak_smooth_scale_set = _ewk_view_single_smart_zoom_weak_smooth_scale_set; + api->bg_color_set = _ewk_view_single_smart_bg_color_set; + + return EINA_TRUE; +} + +static inline Evas_Smart *_ewk_view_single_smart_class_new(void) +{ + static Ewk_View_Smart_Class api = EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION("Ewk_View_Single"); + static Evas_Smart *smart = 0; + + if (EINA_UNLIKELY(!smart)) { + ewk_view_single_smart_set(&api); + smart = evas_smart_class_new(&api.sc); + } + + return smart; +} + +/** + * Creates a new EFL WebKit View object. + * + * View objects are the recommended way to deal with EFL WebKit as it + * abstracts the complex pieces of the process. + * + * Each view is composed by a set of frames. The set has at least one + * frame, called 'main_frame'. See ewk_view_frame_main_get() and + * ewk_view_frame_focused_get(). + * + * @param e canvas where to create the view object. + * + * @return view object or @c NULL if errors. + * + * @see ewk_view_uri_set() + */ +Evas_Object *ewk_view_single_add(Evas *e) +{ + return evas_object_smart_add(e, _ewk_view_single_smart_class_new()); +} diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog index 43d2d20..0affc25 100644 --- a/WebKit/gtk/ChangeLog +++ b/WebKit/gtk/ChangeLog @@ -1,3 +1,867 @@ +2010-04-21 Jakub Wieczorek <jwieczorek@webkit.org> + + Reviewed by Darin Adler. + + List item markers are not always updated after changes in the DOM. + https://bugs.webkit.org/show_bug.cgi?id=37060 + + * webkit/webkitprivate.h: + * webkit/webkitwebframe.cpp: + (webkit_web_frame_marker_text_for_list_item): Add a private API to get the marker text for a list item. + +2010-04-21 Diego Escalante Urrelo <descalante@igalia.com> + + Reviewed by Xan Lopez. + + [Gtk] Evaluate and create tests for all the AtkRole's implemented by + WebKitGtk + https://bugs.webkit.org/show_bug.cgi?id=34449 + + Expand testatkroles to test ATK_ROLE_FORM. + + * tests/testatkroles.c: + (test_webkit_atk_get_role_form): + (main): + +2010-04-20 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::committedLoad): + (WebKit::FrameLoaderClient::finishedLoading): + * webkit/webkitwebview.cpp: + (webkit_web_view_get_encoding): + +2010-04-20 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Change a parameter type of chooseIconForFiles() + https://bugs.webkit.org/show_bug.cgi?id=37504 + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::chooseIconForFiles): + * WebCoreSupport/ChromeClientGtk.h: + +2010-04-20 Martin Robinson <mrobinson@webkit.org> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Enable DOM clipboard and drag-and-drop access + https://bugs.webkit.org/show_bug.cgi?id=30623 + + Move most of the PasteboardHelper logic into WebCore. This helps + prepare for WebKit2 and leads to a clearer separation of concerns + between the WebKit and WebCore layers. + + * WebCoreSupport/EditorClientGtk.cpp: + (WebKit::collapseSelection): Converted this logic to a GClosure callback. + (WebKit::EditorClient::respondToChangedSelection): Collapse selection via GClosure now. + * WebCoreSupport/PasteboardHelperGtk.cpp: Moved most of the code to WebCore. + (WebKit::PasteboardHelperGtk::PasteboardHelperGtk): This constructor just initializes the target list. + (WebKit::PasteboardHelperGtk::~PasteboardHelperGtk): The destructor no longer needs to free the target list. + (WebKit::PasteboardHelperGtk::getIdForTargetType): Added, virtual method for getting target ids. + (WebKit::PasteboardHelperGtk::usePrimarySelectionClipboard): Added, virtual method for querying current clipboard. + * WebCoreSupport/PasteboardHelperGtk.h: Update method list to reflect reduced functionality. + +2010-04-19 Diego Escalante Urrelo <descalante@igalia.com> + + Reviewed by Xan Lopez. + + [Gtk] Evaluate and create tests for all the AtkRole's implemented by + WebKitGtk + https://bugs.webkit.org/show_bug.cgi?id=34449 + + Expand testatkroles to test ATK form roles. + + * tests/testatkroles.c: + (test_webkit_atk_get_role_check_box): + (test_webkit_atk_get_role_entry): + (test_webkit_atk_get_role_label): + (test_webkit_atk_get_role_listbox): + (test_webkit_atk_get_role_password_text): + (test_webkit_atk_get_role_push_button): + (test_webkit_atk_get_role_radio_button): + (main): + +2010-04-19 Diego Escalante Urrelo <descalante@igalia.com> + + Reviewed by Xan Lopez. + + [Gtk] Evaluate and create tests for all the AtkRole's implemented by + WebKitGtk + https://bugs.webkit.org/show_bug.cgi?id=34449 + + Add testatkroles to test ATK non form roles. + + * tests/testatkroles.c: Added. + (finish_loading): + (atk_roles_fixture_setup): + (atk_roles_fixture_teardown): + (get_child_and_test_role): + (test_webkit_atk_get_role_document_frame): + (test_webkit_atk_get_role_heading): + (test_webkit_atk_get_role_image): + (test_webkit_atk_get_role_link): + (test_webkit_atk_get_role_list_and_item): + (test_webkit_atk_get_role_paragraph): + (test_webkit_atk_get_role_section): + (test_webkit_atk_get_role_table): + (main): + +2010-04-17 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Xan Lopez. + + We have to initialize the timer attribute after destroying it, not + doing it was causing crashes in some situations. + + * webkit/webkitdownload.cpp: + (webkit_download_finalize): + +2010-04-13 Timothy Hatcher <timothy@apple.com> + + Rename SecurityOrigin::whiteListAccessFromOrigin to addOriginAccessWhitelistEntry. + And SecurityOrigin::resetOriginAccessWhiteLists to resetOriginAccessWhitelists. + + SecurityOrigin needs a way to remove individual OriginAccessEntries + https://bugs.webkit.org/show_bug.cgi?id=37449 + + Reviewed by Dave Hyatt. + + * webkit/webkitprivate.cpp: + (webkit_white_list_access_from_origin): + (webkit_reset_origin_access_white_lists): + +2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57468. + http://trac.webkit.org/changeset/57468 + https://bugs.webkit.org/show_bug.cgi?id=37433 + + Broke the world... Must have applied the patch wrong + (Requested by abarth on #webkit). + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::committedLoad): + (WebKit::FrameLoaderClient::finishedLoading): + * webkit/webkitwebview.cpp: + (webkit_web_view_get_encoding): + +2010-04-11 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::committedLoad): + (WebKit::FrameLoaderClient::finishedLoading): + * webkit/webkitwebview.cpp: + (webkit_web_view_get_encoding): + +2010-04-07 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Yury Semikhatsky. + + Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest() + https://bugs.webkit.org/show_bug.cgi?id=36949 + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + * WebCoreSupport/FrameLoaderClientGtk.h: + +2010-04-01 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Holger Freyther. + + [GTK] webkit_get_default_session() should make sure webkit_init() is called + https://bugs.webkit.org/show_bug.cgi?id=36754 + + Make sure global functions that do not require a WebKitWebView to + be created call webkit_init() before doing their job. Also add an + API test to check for that. + + * tests/testglobals.c: Added. + (test_globals_default_session): + (main): + * webkit/webkitwebview.cpp: + (webkit_get_default_session): + (webkit_set_cache_model): + (webkit_get_cache_model): + +2010-03-31 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Adds Geolocation param for cancelGeolocationPermissionRequestForFrame. + https://bugs.webkit.org/show_bug.cgi?id=35031 + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::cancelGeolocationPermissionRequestForFrame): + * WebCoreSupport/ChromeClientGtk.h: + +2010-03-30 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=36866 + Move CString to WTF + + * WebCoreSupport/ChromeClientGtk.cpp: + * WebCoreSupport/ContextMenuClientGtk.cpp: + * WebCoreSupport/EditorClientGtk.cpp: + * WebCoreSupport/FrameLoaderClientGtk.cpp: + * WebCoreSupport/InspectorClientGtk.cpp: + * gdom/ConvertToGCharPrivate.h: + * webkit/webkitdownload.cpp: + * webkit/webkithittestresult.cpp: + * webkit/webkitnetworkrequest.cpp: + * webkit/webkitprivate.h: + * webkit/webkitsecurityorigin.cpp: + * webkit/webkitwebdatabase.cpp: + * webkit/webkitwebframe.cpp: + * webkit/webkitwebhistoryitem.cpp: + (webkit_web_history_item_finalize): + (webkit_web_history_item_get_target): + * webkit/webkitwebresource.cpp: + * webkit/webkitwebsettings.cpp: + * webkit/webkitwebview.cpp: + +2010-03-28 Alexey Proskuryakov <ap@apple.com> + + Build fix. Include WindowsKeyboardCodes.h instead of KeyboardCodes.h. + + * WebCoreSupport/EditorClientGtk.cpp: + +2010-03-27 Sergio Villar Senin <svillar@igalia.com> + + Reviewed by Eric Seidel. + + FrameLoader emits onload-event when handling + dispatchDidHandleOnloadEvents + + [GTK] Improve reporting of frame loader callbacks in DRT + https://bugs.webkit.org/show_bug.cgi?id=36454 + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::dispatchDidHandleOnloadEvents): + implemented, now it emits onload-event signal + * webkit/webkitwebview.cpp: added onload-event signal + +2010-03-25 Sergio Villar Senín <svillar@igalia.com> + + Reviewed by Xan Lopez. + + Added new API webkit_web_back_forward_list_clear. This function + clears the back forward list + + [GTK] http/history tests are failing + https://bugs.webkit.org/show_bug.cgi?id=36173 + + * tests/testwebbackforwardlist.c: + (test_webkit_web_back_forward_list_clear): + (main): added new unit test for the new API + * webkit/webkitwebbackforwardlist.cpp: + (webkit_web_back_forward_list_clear): + * webkit/webkitwebbackforwardlist.h: new function that clears the + back forward list + +2010-03-24 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Make Icon::createIconForFiles() optional. + https://bugs.webkit.org/show_bug.cgi?id=35072 + + - Rename iconForFiles() to chooseIconForFiles(). + - Call Icon::createIconForFiles() from chooseIconForFiles(). + + * WebCoreSupport/ChromeClientGtk.cpp: + * WebCoreSupport/ChromeClientGtk.h: + +2010-03-23 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Holger Freyther. + + [GTK] Does not build with latest GTK+ development release + https://bugs.webkit.org/show_bug.cgi?id=36398 + + Fix building with newest GTK+ versions. + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::windowRect): + (WebKit::ChromeClient::setWindowRect): + (WebKit::ChromeClient::unfocus): + (WebKit::ChromeClient::canTakeFocus): + (WebKit::ChromeClient::contentsSizeChanged): + * webkit/webkitprivate.cpp: + (currentToplevelCallback): + * webkit/webkitwebframe.cpp: + (webkit_web_frame_print_full): + (webkit_web_frame_print): + * webkit/webkitwebview.cpp: + (webkit_web_view_grab_focus): + (webkit_web_view_focus_in_event): + (webkit_web_view_script_dialog): + +2010-03-18 Philip Chimento <philip.chimento@gmail.com> + + Reviewed by Oliver Hunt. + + Setting the GObject WebKitWebView property 'window-features' to NULL + causes a crash. + https://bugs.webkit.org/show_bug.cgi?id=36144 + + * tests/testwebview.c: Add unit test for this bug. + * webkit/webkitwebview.cpp: Don't allow the 'window-features' property + to be set to NULL. + * webkit/webkitwebwindowfeatures.cpp: + (webkit_web_window_features_equal): Don't examine the members of either + web_window_features argument if either is NULL, just return that they + are not equal. Additionally, if they are the same object, return that + they are equal. + +2010-03-16 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Update for 1.1.90 release. + + * NEWS: + +2010-03-16 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Fix one too many empty lines in documentation of + window-obejct-cleared signal, which caused the documentation to be + rendered funny. Thanks to Martin Robinson for noticing. + + * webkit/webkitwebview.cpp: + +2010-03-16 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Unreviewed. Add missing symbol to GeoLocation documentation + section. + + * docs/webkitgtk-sections.txt: + +2010-03-16 Martin Robinson <mrobinson@webkit.org> + + Reviewed by Xan Lopez. + + can't input korean into lower all input box except adress input box in webkit gtk launcher + https://bugs.webkit.org/show_bug.cgi?id=32290 + + Make the GTK+ EditorClient properly handle different types of input module + behavior such as commit and preedit signals that happen outside of key event + filtering and multiple times in a row. Filter keyup events as well as keydown + events and call gtk_im_context_focus_{in/out} when the WebView focus changes. + + Added tests for this behavior to the GTK+ unit tests. + + * WebCoreSupport/EditorClientGtk.cpp: + (WebKit::imContextCommitted): Handle this signal properly when it happens outside of + key event filtering. + (WebKit::imContextPreeditChanged): Immediately update the preedit state and do not reject + empty preedits, so that cancellation works properly. + (WebKit::EditorClient::updatePendingComposition): Add this method, which handles the + situation where a commit signal happens when there is still a pending commit. + (WebKit::EditorClient::shouldBeginEditing): Clear pending composition state before editing + starts. + (WebKit::EditorClient::shouldEndEditing): Clear pending composition state before editing ends. + (WebKit::EditorClient::handleKeyboardEvent): No longer special case preedits which happen during + key event filtering. When confirming a pending composition use insertText instead of confirmComposition. + (WebKit::EditorClient::handleInputMethodKeydown): + * WebCoreSupport/EditorClientGtk.h: Make pendingComposition a member, so that multiple WebViews + do not share state. + (WebKit::EditorClient::webView): Added. + (WebKit::EditorClient::treatContextCommitAsKeyEvent): Added. + (WebKit::EditorClient::clearPendingComposition): Added. + * tests/testkeyevents.c: + (test_keypress_events_load_status_cb): + (map_event_cb): + (setup_keyevent_test): + (test_keypress_events): + (element_text_equal_to): + (test_ime_load_status_cb): + (test_ime): + (main): + * webkit/webkitwebview.cpp: + (webkit_web_view_key_release_event): + (webkit_web_view_focus_in_event): + +2010-03-16 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. + + Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder + https://bugs.webkit.org/show_bug.cgi?id=35036 + + * WebCoreSupport/InspectorClientGtk.cpp: + (WebKit::notifyWebViewDestroyed): + (WebKit::InspectorClient::InspectorClient): + (WebKit::InspectorClient::inspectorDestroyed): + (WebKit::InspectorClient::openInspectorFrontend): + (WebKit::InspectorClient::highlight): + (WebKit::InspectorClient::hideHighlight): + (WebKit::InspectorClient::populateSetting): + (WebKit::InspectorClient::storeSetting): + (WebKit::InspectorFrontendClient::InspectorFrontendClient): + (WebKit::InspectorFrontendClient::~InspectorFrontendClient): + (WebKit::InspectorFrontendClient::destroyInspectorWindow): + (WebKit::InspectorFrontendClient::localizedStringsURL): + (WebKit::InspectorFrontendClient::hiddenPanels): + (WebKit::InspectorFrontendClient::bringToFront): + (WebKit::InspectorFrontendClient::closeWindow): + (WebKit::InspectorFrontendClient::attachWindow): + (WebKit::InspectorFrontendClient::detachWindow): + (WebKit::InspectorFrontendClient::setAttachedWindowHeight): + (WebKit::InspectorFrontendClient::inspectedURLChanged): + * WebCoreSupport/InspectorClientGtk.h: + +2010-03-15 Joanmarie Diggs <joanmarie.diggs@gmail.com> + + Reviewed by Holger Freyther. + + https://bugs.webkit.org/show_bug.cgi?id=35502 + [Gtk] Objects of ATK_ROLE_TABLE should not implement AtkText + + New test to be sure we do not accidentally implement AtkText for tables + + * tests/testatk.c + (testWebkitAtkGetTextInTable): + (main): + +2010-03-09 Philippe Normand <pnormand@igalia.com> + + Reviewed by Holger Freyther. + + [GTK] GTK_WIDGET_IS_SENSITIVE is deprecated in GTK+ 2.20 + https://bugs.webkit.org/show_bug.cgi?id=35909 + + * webkit/webkitwebview.cpp: GTK_WIDGET_IS_SENSITIVE has been + deprecated in gtk 2.20. Use gtk_widget_is_sensitive when available. + +2010-03-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Rubber-stamped by Kenneth Rohde Christiansen. + + Misc documentation fixes. Fixes (almost) all warnings emitted by + the documentation build process. Only the broken references to JSC + objects remain. + + * webkit/webkitsecurityorigin.cpp: + * webkit/webkitwebbackforwardlist.cpp: + * webkit/webkitwebdatasource.cpp: + * webkit/webkitwebframe.cpp: + * webkit/webkitwebhistoryitem.cpp: + * webkit/webkitwebinspector.cpp: + (webkit_web_inspector_class_init): + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): + * webkit/webkitwebview.cpp: + (DNDContentsRequest::webkit_web_view_class_init): + +2010-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. + + * WebCoreSupport/ChromeClientGtk.cpp: + * WebCoreSupport/ChromeClientGtk.h: + +2010-03-09 Philippe Normand <pnormand@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] testkeyevents doesn't stop if input event injection fails + https://bugs.webkit.org/show_bug.cgi?id=35922 + + * tests/testkeyevents.c: + (load_status_cb): Added a safeguard to exit from the test if the + input event injection failed. + +2010-03-09 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Unreviewed. Documentation control files update for 1.1.23. + + * docs/webkitgtk-docs.sgml: + +2010-03-08 Csaba Osztrogonác <ossy@webkit.org> + + [GTK] Unreviewed buildfix after r55688. + + * webkit/webkitdownload.cpp: + (webkit_download_start): + +2010-03-02 Adam Treat <atreat@rim.com> + + Reviewed by Dave Hyatt. + + Adapt the gtk port to the refactoring of repaint methods. + + https://bugs.webkit.org/show_bug.cgi?id=34214 + + * WebCoreSupport/ChromeClientGtk.cpp: + * WebCoreSupport/ChromeClientGtk.h: + +2010-03-08 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + Remove the now-redundant Settings fields for the Database + https://bugs.webkit.org/show_bug.cgi?id=35763 + + No new tests; this code isn't called. + + * webkit/webkitwebview.cpp: Remove the calls into Settings. + (DNDContentsRequest::webkit_web_view_update_settings): + (DNDContentsRequest::webkit_web_view_settings_notify): + +2010-03-06 Arno Renevier <arno@renevier.net> + + Reviewed by Eric Seidel. + + [Gtk] GEOLOCATION_POLICY_DECISION_CANCELLED unused + https://bugs.webkit.org/show_bug.cgi?id=35803 + + * webkit/webkitwebview.cpp: + (DNDContentsRequest::webkit_web_view_class_init): + +2010-03-03 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Gustavo Noronha. + Patch by Antonio Gomes <tonikitoo@webkit.org> + + [Gtk] Add 'enable-spatial-navigation' setting for toggle Spatial Navigation on/off + https://bugs.webkit.org/show_bug.cgi?id=35701 + + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): + (webkit_web_settings_set_property): + (webkit_web_settings_get_property): + (webkit_web_settings_copy): + * webkit/webkitwebview.cpp: + (DNDContentsRequest::webkit_web_view_update_settings): + (DNDContentsRequest::webkit_web_view_settings_notify): + +2010-03-03 Fridrich Strba <fridrich.strba@bluewin.ch> + + Reviewed by Xan Lopez. + + Miscellaneous little fixes for the windows build of webkit-gtk + https://bugs.webkit.org/show_bug.cgi?id=35640 + + * webkit/webkitdownload.cpp: Windows headers define ERROR + which breaks the build. Undef ERROR if it is defined. + +2010-03-03 Philippe Normand <pnormand@igalia.com> + + Unreviewed, build fix after r55452. + + * webkit/webkitwebview.cpp: + (DNDContentsRequest::webkit_web_view_settings_notify): added missing braces. + +2010-03-02 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + Move database enable bit fully out of settings + This is stage one of a three-stage commit [webkit, then chromium, then + webkit again]. In this change I'm adding calls to + Database::setIsAvailable inside Settings::setDatabaseEnabled and + anywhere else that called it, and switching webkit fully over to using + that flag [added in a previous checkin]. Phase two will remove + Chromium's use of Settings for the Database, and phase three will remove + the Setting for the Database enable entirely, leaving only + Database::isAvailable/setIsAvailable. + + No new tests; tested by existing storage tests. + + https://bugs.webkit.org/show_bug.cgi?id=35310 + + * webkit/webkitwebview.cpp: Add calls to Database::setIsAvailable + (DNDContentsRequest::webkit_web_view_update_settings): + (DNDContentsRequest::webkit_web_view_settings_notify): + +2010-03-02 Arno Renevier <arno@renevier.net> + + Reviewed by Gustavo Noronha Silva. + + [Gtk] implements ChromeClient::requestGeolocationPermissionForFrame + https://bugs.webkit.org/show_bug.cgi?id=35210 + + * WebCoreSupport/ChromeClientGtk.cpp: + * WebCoreSupport/ChromeClientGtk.h: + * docs/webkitgtk-sections.txt: + * webkit/webkit.h: + * webkit/webkitdefines.h: + * webkit/webkitgeolocationpolicydecision.cpp: Added. + (webkit_geolocation_policy_decision_class_init): + (webkit_geolocation_policy_decision_init): + (webkit_geolocation_policy_decision_new): + (webkit_geolocation_policy_allow): + (webkit_geolocation_policy_deny): + * webkit/webkitgeolocationpolicydecision.h: Added. + * webkit/webkitprivate.h: + * webkit/webkitwebview.cpp: + (DNDContentsRequest::webkit_web_view_class_init): + * webkitmarshal.list: + +2010-03-01 José Millán Soto <jmillan@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Right click does not activate text entry + https://bugs.webkit.org/show_bug.cgi?id=29177 + + Makes the frame handle the mouse click event before sending the + context menu event. + + * webkit/webkitwebview.cpp: + (PopupMenuPositionFunc): + Function created to make the popup menu appear in the correct position, especially + when invoked from the keyboard. + (webkit_web_view_forward_context_menu_event): + Mouse click event is sent to frame before creating context menu, + PopupMenuPositionFunc used to determine the position where the menu should appear. + (webkit_web_view_popup_menu_handler): + Improved focused node position detection. Event button set to right button. + +2010-03-01 Jakob Petsovits <jpetsovits@rim.com> + + Reviewed by Adam Barth. + + Adapt to the new ZoomMode enum. + https://bugs.webkit.org/show_bug.cgi?id=35347 + + * webkit/webkitwebview.cpp: + (DNDContentsRequest::webkit_web_view_apply_zoom_level): + +2010-03-01 Kalle Vahlman <zuh@iki.fi> + + Reviewed by Gustavo Noronha Silva. + + Queue a resize when either of the content dimensions change + https://bugs.webkit.org/show_bug.cgi?id=35489 + + The check for size changes only queued a resize if both of the content + dimensions change, leaving the widget size out-of-sync if eg. only the + width changes. + + * WebCoreSupport/ChromeClientGtk.cpp: + +2009-12-04 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + [GTK] Needs proper reporting of frame loader callbacks, in DRT + https://bugs.webkit.org/show_bug.cgi?id=32170 + + Add new signal to report when the document load is finished for a + frame. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::dispatchDidFinishDocumentLoad): + * webkit/webkitwebview.cpp: + (webkit_web_view_class_init): + +2010-02-26 Antonio Gomes <tonikitoo@webkit.org> + + Complementary commit of r55300. Missing "notify::" to signal name. + + * tests/testwebview.c: + (test_webkit_web_view_grab_focus): + +2010-02-26 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Xan Lopez. + Patch by Antonio Gomes <tonikitoo@webkit.org> + + [GTK] Make webkit_web_view_grab_focus to active focus controller. + https://bugs.webkit.org/show_bug.cgi?id=35402 + + When programatically setting focus to an element in an inner document, + calling "hasFocus()" from this document returns FALSE, because + document's FocusController is not activated. It does not happen + if |document| is the main document. + + Making webkit_web_view_grab_focus to actually activate the FocusController, + fixes the issue. + + * tests/testwebview.c: + (server_callback): + (test_webkit_web_view_grab_focus): + * webkit/webkitwebview.cpp: + (webkit_web_view_grab_focus): + +2010-02-26 Alejandro G. Castro <alex@igalia.com> + + Unreviewed. + + Reverted last patch (r55295), it causes problems with the frames. + + * WebCoreSupport/ChromeClientGtk.cpp: + +2010-02-19 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] Some region checks in scroll are not required + https://bugs.webkit.org/show_bug.cgi?id=35142 + + Removes some of the operations checking the moved and invalidated + regions when scrolling, it is done already in + gdk_window_move_region. + + * WebCoreSupport/ChromeClientGtk.cpp: + +2010-02-25 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + [Gtk] crashed when destroying + https://bugs.webkit.org/show_bug.cgi?id=31271 + + NULL-check the page before relaying the focus out event, since + this might happen when destroying the widget without destroying + its parent, and we currently crash. + + * tests/testwebview.c: + (delayed_destroy): + (test_webkit_web_view_destroy): + (main): + * webkit/webkitwebview.cpp: + (webkit_web_view_focus_in_event): + +2010-02-24 Krzysztof Kotlenga <pocek@users.sf.net> + + Reviewed by Gustavo Noronha Silva. + + [Gtk] Creation of a WebkitWebView widget is very slow + https://bugs.webkit.org/show_bug.cgi?id=30032 + + * WebCoreSupport/EditorClientGtk.cpp: + (WebKit::EditorClient::ignoreWordInSpellDocument): Change 'langs' to 'dicts' + to reflect the fact that the list just holds Enchant dictionaries now. + (WebKit::EditorClient::learnWord): Ditto. + (WebKit::EditorClient::checkSpellingOfString): Ditto. + (WebKit::EditorClient::getGuessesForWord): Ditto. + * webkit/webkitprivate.h: Remove the now unused SpellLanguage struct. + * webkit/webkitwebsettings.cpp: Change function call to reflect new + webkit_web_settings_get_enchant_dicts name. + (get_enchant_broker): Add this method which returns the enchant broker singleton. + (free_spell_checking_language): The list contents have changed, so change + the way each element is freed. + (webkit_web_settings_finalize): Change to reflect 'spell_checking_languages_list' + to 'enchant_dicts' member name change. + (webkit_web_settings_set_property): Use the broker singleton here instead of making + a new one for each language. The Enchant dictionary is now the list payload. + (webkit_web_settings_copy): More name-change updates. + (webkit_web_settings_get_enchant_dicts): Ditto. + +2010-02-23 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Gustavo Noronha Silva. + + Fixes references to GOwnPtr and GRefPtr so the GTK+ port builds + again. + http://webkit.org/b/35084 + + * WebKit/gtk/webkit/webkitwebview.cpp: + +2010-02-23 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Eric Seidel. + + [Gtk] Implement layoutTestController.numberOfPages + https://bugs.webkit.org/show_bug.cgi?id=35228 + + * webkit/webkitprivate.h: + * webkit/webkitwebframe.cpp: + (webkit_web_frame_number_of_pages): + +2010-02-23 José Millán Soto <jmillan@igalia.com> + + Reviewed by Xan Lopez. + + [Gtk] Server message not shown on http authentication + https://bugs.webkit.org/show_bug.cgi?id=34219 + + * webkit/webkitsoupauthdialog.c: + (show_auth_dialog): + Server message is displayed, messageLabel and message variables were + renamed to avoid confusion. + +2010-02-23 Steve Block <steveblock@google.com> + + Reviewed by Darin Adler. + + Adds ChromeClient::cancelGeolocationPermissionRequestForFrame + https://bugs.webkit.org/show_bug.cgi?id=34962 + + This method is required so that a Geolocation object can cancel an + asynchronous permission request. This allows the chrome client to cancel + any UI it is showing for the permission request. + + * WebCoreSupport/ChromeClientGtk.h: + (WebKit::ChromeClient::cancelGeolocationPermissionRequestForFrame): + +2010-02-23 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Do not do unnecessary work during size_allocate. + + FrameView::resize will already queue a layout, so there's no need + to force one ourselves. On top of that, the layout function + already adjusts the view size when needed, so there's no need to + do that manually either. No change in the layout tests or unit + tests after this. + + * webkit/webkitwebview.cpp: + (webkit_web_view_size_allocate): + +2010-02-22 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Update for release. + + * NEWS: + +2010-02-22 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + [Soup] loses information related to message flags when converting from/to Resource{Request,Response} + https://bugs.webkit.org/show_bug.cgi?id=35093 + + Update the flags that are stored in the request, when the response + is received. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::dispatchDidReceiveResponse): + +2010-02-20 Gustavo Noronha Silva <gns@gnome.org> + + Unreviewed. Trivial fix - unnecessary variable got added by + mistake. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::dispatchDidReceiveResponse): + 2010-02-18 Diego Escalante Urrelo <descalante@igalia.com> Reviewed by Gustavo Noronha Silva. diff --git a/WebKit/gtk/NEWS b/WebKit/gtk/NEWS index 4e5bc2c..45e3121 100644 --- a/WebKit/gtk/NEWS +++ b/WebKit/gtk/NEWS @@ -1,4 +1,61 @@ ================= +WebKitGTK+ 1.1.90 +================= + +What's new in WebKitGTK+ 1.1.90? + + - Display server side messages during HTTP auth, since they + sometimes contain important information for the authentication + process. + - Reduce creation time for WebKitWebView widgets by reusing + dictionary structs used for spell-checking instead of creating a + new one for each instance. + - Implement WebKitWebView::geolocation-policy-decision-requested, + emitted when a frame inside the WebView wants to get its position + through geolocation. + - Add WebKitWebSettings::enable-spatial-navigation to control + whether Spatial Navigation is enabled or not. Spatial Navigation + allows the user to move through the elements in a page using only + the keyboard; this is similar to caret browsing, but with less + focus on accessibility since instead of presenting the exact + layout of the page to the user a more "logical" way of browsing + through its contents is allowed. A specification of this feature + can be seen at + http://www.w3.org/TR/WICD/#current-focus-point-algorithm + - Add a new build option, --enable-fast-mobile-scrolling. At the + moment this only disables fixed backgrounds when there are no + other fixed elements in a page, since they generally make + scrolling very slow and thus are a big burden in some mobile + environments. + - GTK+ Input Method support has received a big overhaul, and most of + them should work pretty well now. + - All known redraw issues in the plugin support (especially with the + Java plugin) have been fixed. + - Various fixes to the MediaPlayer code to improve responsiveness + and avoid lagging on position reporting. + - Lots of bugfixes and other improvements. + +================= +WebKitGTK+ 1.1.22 +================= + +What's new in WebKitGTK+ 1.1.22? + + - Preliminary support for Java plugins. Basic functionality is + there, but there are still a few rough edges. Also newly + introduced is a new WebKitWebSetting, 'enable-java-applet', which + controls whether WebKit will recognize the non-standard <applet> + tag. + - Add WebKitWebSettings::auto-resize-window; when enabled, WebKit + will act upon the DOM methods that change the size and/or position + of the window containing a WebView (window.{moveTo, resizeTo, + moveBy, resizeBy}). + - Add WebKitWebSettings::enable-file-access-from-file-uris; when + enabled, each file:// URI will be assigned its own security + domain. + - Lots of bugfixes, especially in the PageCache support. + +================= WebKitGTK+ 1.1.21 ================= diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp index 74f5e07..8a1d48b 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp @@ -28,11 +28,13 @@ #include "FileChooser.h" #include "FloatRect.h" #include "FrameLoadRequest.h" +#include "GtkVersioning.h" #include "IntRect.h" #include "PlatformString.h" -#include "CString.h" #include "HitTestResult.h" +#include "Icon.h" #include "KURL.h" +#include "webkitgeolocationpolicydecision.h" #include "webkitwebview.h" #include "webkitnetworkrequest.h" #include "webkitprivate.h" @@ -41,6 +43,7 @@ #if ENABLE(DATABASE) #include "DatabaseTracker.h" #endif +#include <wtf/text/CString.h> #include <glib.h> #include <glib/gi18n-lib.h> @@ -64,11 +67,7 @@ void ChromeClient::chromeDestroyed() FloatRect ChromeClient::windowRect() { GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); -#if GTK_CHECK_VERSION(2, 18, 0) if (gtk_widget_is_toplevel(window)) { -#else - if (GTK_WIDGET_TOPLEVEL(window)) { -#endif gint left, top, width, height; gtk_window_get_position(GTK_WINDOW(window), &left, &top); gtk_window_get_size(GTK_WINDOW(window), &width, &height); @@ -97,11 +96,7 @@ void ChromeClient::setWindowRect(const FloatRect& rect) return; GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); -#if GTK_CHECK_VERSION(2, 18, 0) if (gtk_widget_is_toplevel(window)) { -#else - if (GTK_WIDGET_TOPLEVEL(window)) { -#endif gtk_window_move(GTK_WINDOW(window), intrect.x(), intrect.y()); gtk_window_resize(GTK_WINDOW(window), intrect.width(), intrect.height()); } @@ -127,11 +122,7 @@ void ChromeClient::focus() void ChromeClient::unfocus() { GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); -#if GTK_CHECK_VERSION(2, 18, 0) if (gtk_widget_is_toplevel(window)) -#else - if (GTK_WIDGET_TOPLEVEL(window)) -#endif gtk_window_set_focus(GTK_WINDOW(window), NULL); } @@ -259,11 +250,7 @@ void ChromeClient::closeWindowSoon() bool ChromeClient::canTakeFocus(FocusDirection) { -#if GTK_CHECK_VERSION(2, 18, 0) return gtk_widget_get_can_focus(GTK_WIDGET(m_webView)); -#else - return GTK_WIDGET_CAN_FOCUS(m_webView); -#endif } void ChromeClient::takeFocus(FocusDirection) @@ -341,20 +328,29 @@ IntRect ChromeClient::windowResizerRect() const return IntRect(); } -void ChromeClient::repaint(const IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly) +void ChromeClient::invalidateWindow(const IntRect&, bool) { - GdkRectangle rect = windowRect; + notImplemented(); +} + +void ChromeClient::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate) +{ + GdkRectangle rect = updateRect; GdkWindow* window = GTK_WIDGET(m_webView)->window; if (window) { - if (contentChanged) - gdk_window_invalidate_rect(window, &rect, FALSE); + gdk_window_invalidate_rect(window, &rect, FALSE); // We don't currently do immediate updates since they delay other UI elements. //if (immediate) // gdk_window_process_updates(window, FALSE); } } +void ChromeClient::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) +{ + invalidateContentsAndWindow(updateRect, immediate); +} + void ChromeClient::scroll(const IntSize& delta, const IntRect& rectToScroll, const IntRect& clipRect) { GdkWindow* window = GTK_WIDGET(m_webView)->window; @@ -429,9 +425,9 @@ void ChromeClient::contentsSizeChanged(Frame* frame, const IntSize& size) const // We need to queue a resize request only if the size changed, // otherwise we get into an infinite loop! GtkWidget* widget = GTK_WIDGET(m_webView); - if (GTK_WIDGET_REALIZED(widget) && - (widget->requisition.height != size.height()) && - (widget->requisition.width != size.width())) + if (gtk_widget_get_realized(widget) + && (widget->requisition.height != size.height()) + || (widget->requisition.width != size.width())) gtk_widget_queue_resize_no_redraw(widget); } @@ -563,10 +559,9 @@ void ChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser) gtk_widget_destroy(dialog); } -void ChromeClient::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>) +void ChromeClient::chooseIconForFiles(const Vector<WebCore::String>& filenames, WebCore::FileChooser* chooser) { - // FIXME: Move the code in Icon::createIconForFiles() here. - notImplemented(); + chooser->iconLoaded(Icon::createIconForFiles(filenames)); } bool ChromeClient::setCursor(PlatformCursorHandle) @@ -575,10 +570,24 @@ bool ChromeClient::setCursor(PlatformCursorHandle) return false; } -void ChromeClient::requestGeolocationPermissionForFrame(Frame*, Geolocation*) +void ChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation) { - // See the comment in WebCore/page/ChromeClient.h - notImplemented(); + WebKitWebFrame* webFrame = kit(frame); + WebKitWebView* webView = getViewFromFrame(webFrame); + + WebKitGeolocationPolicyDecision* policyDecision = webkit_geolocation_policy_decision_new(webFrame, geolocation); + + gboolean isHandled = FALSE; + g_signal_emit_by_name(webView, "geolocation-policy-decision-requested", webFrame, policyDecision, &isHandled); + if (!isHandled) + webkit_geolocation_policy_deny(policyDecision); +} + +void ChromeClient::cancelGeolocationPermissionRequestForFrame(WebCore::Frame* frame, WebCore::Geolocation*) +{ + WebKitWebFrame* webFrame = kit(frame); + WebKitWebView* webView = getViewFromFrame(webFrame); + g_signal_emit_by_name(webView, "geolocation-policy-decision-cancelled", webFrame); } } diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h index 7e407d3..46d015e 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h @@ -87,8 +87,11 @@ namespace WebKit { virtual WebCore::IntRect windowResizerRect() const; - virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); + virtual void invalidateWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool); virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect); + virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const; virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const; virtual PlatformPageClient platformPageClient() const; @@ -107,7 +110,7 @@ namespace WebKit { virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); #endif virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); - virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>); + virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*); virtual void formStateDidChange(const WebCore::Node*) { } @@ -117,6 +120,7 @@ namespace WebKit { virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const {} virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); + virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*); private: WebKitWebView* m_webView; diff --git a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp index bf47ca8..5c1bc0b 100644 --- a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp @@ -21,10 +21,10 @@ #include "ContextMenu.h" #include "ContextMenuClientGtk.h" -#include "CString.h" #include "HitTestResult.h" #include "KURL.h" #include "NotImplemented.h" +#include <wtf/text/CString.h> #include <glib/gi18n-lib.h> #include <glib-object.h> diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp index 02d1a53..51172b4 100644 --- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp @@ -4,6 +4,7 @@ * Copyright (C) 2009 Diego Escalante Urrelo <diegoe@gnome.org> * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. * Copyright (C) 2009, Igalia S.L. + * Copyright (C) 2010, Martin Robinson <mrobinson@webkit.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,7 +24,6 @@ #include "config.h" #include "EditorClientGtk.h" -#include "CString.h" #include "DataObjectGtk.h" #include "EditCommand.h" #include "Editor.h" @@ -32,14 +32,16 @@ #include "FocusController.h" #include "Frame.h" #include <glib.h> -#include "KeyboardCodes.h" #include "KeyboardEvent.h" +#include "markup.h" #include "NotImplemented.h" #include "Page.h" #include "PasteboardHelperGtk.h" #include "PlatformKeyboardEvent.h" -#include "markup.h" +#include "WindowsKeyboardCodes.h" +#include "webkitmarshal.h" #include "webkitprivate.h" +#include <wtf/text/CString.h> // Arbitrary depth limit for the undo stack, to keep it from using // unbounded memory. This is the maximum number of distinct undoable @@ -51,40 +53,48 @@ using namespace WebCore; namespace WebKit { -static gchar* pendingComposition = 0; -static gchar* pendingPreedit = 0; - -static void setPendingComposition(gchar* newComposition) +static void imContextCommitted(GtkIMContext* context, const gchar* compositionString, EditorClient* client) { - g_free(pendingComposition); - pendingComposition = newComposition; -} + Frame* frame = core(client->webView())->focusController()->focusedOrMainFrame(); + if (!frame || !frame->editor()->canEdit()) + return; -static void setPendingPreedit(gchar* newPreedit) -{ - g_free(pendingPreedit); - pendingPreedit = newPreedit; -} + // If this signal fires during a keydown event when we are not in the middle + // of a composition, then treat this 'commit' as a normal key event and just + // change the editable area right before the keypress event. + if (client->treatContextCommitAsKeyEvent()) { + client->updatePendingComposition(compositionString); + return; + } -static void clearPendingIMData() -{ - setPendingComposition(0); - setPendingPreedit(0); -} -static void imContextCommitted(GtkIMContext* context, const gchar* str, EditorClient* client) -{ - // This signal will fire during a keydown event. We want the contents of the - // field to change right before the keyup event, so we wait until then to actually - // commit this composition. - setPendingComposition(g_strdup(str)); + frame->editor()->confirmComposition(String::fromUTF8(compositionString)); + client->clearPendingComposition(); } static void imContextPreeditChanged(GtkIMContext* context, EditorClient* client) { + Frame* frame = core(client->webView())->focusController()->focusedOrMainFrame(); + if (!frame || !frame->editor()->canEdit()) + return; + // We ignore the provided PangoAttrList for now. - gchar* newPreedit = 0; - gtk_im_context_get_preedit_string(context, &newPreedit, NULL, NULL); - setPendingPreedit(newPreedit); + GOwnPtr<gchar> newPreedit(0); + gtk_im_context_get_preedit_string(context, &newPreedit.outPtr(), 0, 0); + + String preeditString = String::fromUTF8(newPreedit.get()); + Vector<CompositionUnderline> underlines; + underlines.append(CompositionUnderline(0, preeditString.length(), Color(0, 0, 0), false)); + frame->editor()->setComposition(preeditString, underlines, 0, 0); +} + +void EditorClient::updatePendingComposition(const gchar* newComposition) +{ + // The IMContext may signal more than one completed composition in a row, + // in which case we want to append them, rather than overwrite the old one. + if (!m_pendingComposition) + m_pendingComposition.set(g_strdup(newComposition)); + else + m_pendingComposition.set(g_strconcat(m_pendingComposition.get(), newComposition, NULL)); } void EditorClient::setInputMethodState(bool active) @@ -139,7 +149,7 @@ int EditorClient::spellCheckerDocumentTag() bool EditorClient::shouldBeginEditing(WebCore::Range*) { - clearPendingIMData(); + clearPendingComposition(); notImplemented(); return true; @@ -147,7 +157,7 @@ bool EditorClient::shouldBeginEditing(WebCore::Range*) bool EditorClient::shouldEndEditing(WebCore::Range*) { - clearPendingIMData(); + clearPendingComposition(); notImplemented(); return true; @@ -187,6 +197,23 @@ void EditorClient::respondToChangedContents() notImplemented(); } +static WebKitWebView* viewSettingClipboard = 0; +static void collapseSelection(GtkClipboard* clipboard, WebKitWebView* webView) +{ + if (viewSettingClipboard && viewSettingClipboard == webView) + return; + + WebCore::Page* corePage = core(webView); + if (!corePage || !corePage->focusController()) + return; + + Frame* frame = corePage->focusController()->focusedOrMainFrame(); + + // Collapse the selection without clearing it + ASSERT(frame); + frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity()); +} + void EditorClient::respondToChangedSelection() { WebKitWebViewPrivate* priv = m_webView->priv; @@ -206,7 +233,12 @@ void EditorClient::respondToChangedSelection() if (targetFrame->selection()->isRange()) { dataObject->clear(); dataObject->setRange(targetFrame->selection()->toNormalizedRange()); - pasteboardHelperInstance()->writeClipboardContents(clipboard, m_webView); + + viewSettingClipboard = m_webView; + GClosure* callback = g_cclosure_new_object(G_CALLBACK(collapseSelection), G_OBJECT(m_webView)); + g_closure_set_marshal(callback, g_cclosure_marshal_VOID__VOID); + pasteboardHelperInstance()->writeClipboardContents(clipboard, callback); + viewSettingClipboard = 0; } #endif @@ -466,8 +498,12 @@ void EditorClient::handleKeyboardEvent(KeyboardEvent* event) if (!command.isTextInsertion() && command.execute(event)) event->setDefaultHandled(); + clearPendingComposition(); return; - } else if (command.execute(event)) { + } + + if (command.execute(event)) { + clearPendingComposition(); event->setDefaultHandled(); return; } @@ -478,25 +514,14 @@ void EditorClient::handleKeyboardEvent(KeyboardEvent* event) // be reflected in the contents of the field until the keyup DOM event. if (event->type() == eventNames().keypressEvent) { - if (pendingComposition) { - String compositionString = String::fromUTF8(pendingComposition); - frame->editor()->confirmComposition(compositionString); - - clearPendingIMData(); - event->setDefaultHandled(); - - } else if (pendingPreedit) { - String preeditString = String::fromUTF8(pendingPreedit); - - // Don't use an empty preedit as it will destroy the current - // selection, even if the composition is cancelled or fails later on. - if (!preeditString.isEmpty()) { - Vector<CompositionUnderline> underlines; - underlines.append(CompositionUnderline(0, preeditString.length(), Color(0, 0, 0), false)); - frame->editor()->setComposition(preeditString, underlines, 0, 0); - } - - clearPendingIMData(); + // If we have a pending composition at this point, it happened while + // filtering a keypress, so we treat it as a normal text insertion. + // This will also ensure that if the keypress event handler changed the + // currently focused node, the text is still inserted into the original + // node (insertText() has this logic, but confirmComposition() does not). + if (m_pendingComposition) { + frame->editor()->insertText(String::fromUTF8(m_pendingComposition.get()), event); + clearPendingComposition(); event->setDefaultHandled(); } else { @@ -520,15 +545,53 @@ void EditorClient::handleInputMethodKeydown(KeyboardEvent* event) if (!targetFrame || !targetFrame->editor()->canEdit()) return; - // TODO: We need to decide which filtered keystrokes should be treated as IM - // events and which should not. WebKitWebViewPrivate* priv = m_webView->priv; - gtk_im_context_filter_keypress(priv->imContext, event->keyEvent()->gdkEventKey()); + + + // Some IM contexts (e.g. 'simple') will act as if they filter every + // keystroke and just issue a 'commit' signal during handling. In situations + // where the 'commit' signal happens during filtering and there is no active + // composition, act as if the keystroke was not filtered. The one exception to + // this is when the keyval parameter of the GdkKeyEvent is 0, which is often + // a key event sent by the IM context for committing the current composition. + + // Here is a typical sequence of events for the 'simple' context: + // 1. GDK key press event -> webkit_web_view_key_press_event + // 2. Keydown event -> EditorClient::handleInputMethodKeydown + // gtk_im_context_filter_keypress returns true, but there is a pending + // composition so event->preventDefault is not called (below). + // 3. Keydown event bubbles through the DOM + // 4. Keydown event -> EditorClient::handleKeyboardEvent + // No action taken. + // 4. GDK key release event -> webkit_web_view_key_release_event + // 5. gtk_im_context_filter_keypress is called on the release event. + // Simple does not filter most key releases, so the event continues. + // 6. Keypress event bubbles through the DOM. + // 7. Keypress event -> EditorClient::handleKeyboardEvent + // pending composition is inserted. + // 8. Keyup event bubbles through the DOM. + // 9. Keyup event -> EditorClient::handleKeyboardEvent + // No action taken. + + // There are two situations where we do filter the keystroke: + // 1. The IMContext instructed us to filter and we have no pending composition. + // 2. The IMContext did not instruct us to filter, but the keystroke caused a + // composition in progress to finish. It seems that sometimes SCIM will finish + // a composition and not mark the keystroke as filtered. + m_treatContextCommitAsKeyEvent = (!targetFrame->editor()->hasComposition()) + && event->keyEvent()->gdkEventKey()->keyval; + clearPendingComposition(); + if ((gtk_im_context_filter_keypress(priv->imContext, event->keyEvent()->gdkEventKey()) && !m_pendingComposition) + || (!m_treatContextCommitAsKeyEvent && !targetFrame->editor()->hasComposition())) + event->preventDefault(); + + m_treatContextCommitAsKeyEvent = false; } EditorClient::EditorClient(WebKitWebView* webView) : m_isInRedo(false) , m_webView(webView) + , m_treatContextCommitAsKeyEvent(false) { WebKitWebViewPrivate* priv = m_webView->priv; g_signal_connect(priv->imContext, "commit", G_CALLBACK(imContextCommitted), this); @@ -571,30 +634,30 @@ void EditorClient::textDidChangeInTextArea(Element*) void EditorClient::ignoreWordInSpellDocument(const String& text) { - GSList* langs = webkit_web_settings_get_spell_languages(m_webView); + GSList* dicts = webkit_web_settings_get_enchant_dicts(m_webView); - for (; langs; langs = langs->next) { - SpellLanguage* lang = static_cast<SpellLanguage*>(langs->data); + for (; dicts; dicts = dicts->next) { + EnchantDict* dict = static_cast<EnchantDict*>(dicts->data); - enchant_dict_add_to_session(lang->speller, text.utf8().data(), -1); + enchant_dict_add_to_session(dict, text.utf8().data(), -1); } } void EditorClient::learnWord(const String& text) { - GSList* langs = webkit_web_settings_get_spell_languages(m_webView); + GSList* dicts = webkit_web_settings_get_enchant_dicts(m_webView); - for (; langs; langs = langs->next) { - SpellLanguage* lang = static_cast<SpellLanguage*>(langs->data); + for (; dicts; dicts = dicts->next) { + EnchantDict* dict = static_cast<EnchantDict*>(dicts->data); - enchant_dict_add_to_personal(lang->speller, text.utf8().data(), -1); + enchant_dict_add_to_personal(dict, text.utf8().data(), -1); } } void EditorClient::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength) { - GSList* langs = webkit_web_settings_get_spell_languages(m_webView); - if (!langs) + GSList* dicts = webkit_web_settings_get_enchant_dicts(m_webView); + if (!dicts) return; gchar* ctext = g_utf16_to_utf8(const_cast<gunichar2*>(text), length, 0, 0, 0); @@ -623,8 +686,8 @@ void EditorClient::checkSpellingOfString(const UChar* text, int length, int* mis // check characters twice. i = end; - for (; langs; langs = langs->next) { - SpellLanguage* lang = static_cast<SpellLanguage*>(langs->data); + for (; dicts; dicts = dicts->next) { + EnchantDict* dict = static_cast<EnchantDict*>(dicts->data); gchar* cstart = g_utf8_offset_to_pointer(ctext, start); gint bytes = static_cast<gint>(g_utf8_offset_to_pointer(ctext, end) - cstart); gchar* word = g_new0(gchar, bytes+1); @@ -632,7 +695,7 @@ void EditorClient::checkSpellingOfString(const UChar* text, int length, int* mis g_utf8_strncpy(word, cstart, end - start); - result = enchant_dict_check(lang->speller, word, -1); + result = enchant_dict_check(dict, word, -1); g_free(word); if (result) { *misspellingLocation = start; @@ -686,21 +749,21 @@ bool EditorClient::spellingUIIsShowing() void EditorClient::getGuessesForWord(const String& word, WTF::Vector<String>& guesses) { - GSList* langs = webkit_web_settings_get_spell_languages(m_webView); + GSList* dicts = webkit_web_settings_get_enchant_dicts(m_webView); guesses.clear(); - for (; langs; langs = langs->next) { + for (; dicts; dicts = dicts->next) { size_t numberOfSuggestions; size_t i; - SpellLanguage* lang = static_cast<SpellLanguage*>(langs->data); - gchar** suggestions = enchant_dict_suggest(lang->speller, word.utf8().data(), -1, &numberOfSuggestions); + EnchantDict* dict = static_cast<EnchantDict*>(dicts->data); + gchar** suggestions = enchant_dict_suggest(dict, word.utf8().data(), -1, &numberOfSuggestions); for (i = 0; i < numberOfSuggestions && i < 10; i++) guesses.append(String::fromUTF8(suggestions[i])); if (numberOfSuggestions > 0) - enchant_dict_free_suggestions(lang->speller, suggestions); + enchant_dict_free_suggestions(dict, suggestions); } } diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h index 9292651..825c146 100644 --- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h @@ -2,6 +2,7 @@ * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> * Copyright (C) 2006 Zack Rusin <zack@kde.org> * Copyright (C) 2006 Apple Computer, Inc. + * Copyright (C) 2010 Martin Robinson <mrobinson@webkit.org> * * All rights reserved. * @@ -34,8 +35,10 @@ #include <wtf/Deque.h> #include <wtf/Forward.h> +#include <wtf/gobject/GOwnPtr.h> typedef struct _WebKitWebView WebKitWebView; +typedef char gchar; namespace WebCore { class Page; @@ -53,6 +56,11 @@ namespace WebKit { public: EditorClient(WebKitWebView*); ~EditorClient(); + WebKitWebView* webView() { return m_webView; } + bool treatContextCommitAsKeyEvent() { return m_treatContextCommitAsKeyEvent; } + void clearPendingComposition() { m_pendingComposition.set(0); } + bool hasPendingComposition() { return m_pendingComposition; } + void updatePendingComposition(const char*); // from EditorClient virtual void pageDestroyed(); @@ -120,6 +128,8 @@ namespace WebKit { private: WebKitWebView* m_webView; + bool m_treatContextCommitAsKeyEvent; + GOwnPtr<gchar> m_pendingComposition; }; } diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index f900f05..27ff3c8 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -52,7 +52,6 @@ #include "RenderPart.h" #include "ResourceHandle.h" #include "ResourceRequest.h" -#include "CString.h" #include "ProgressTracker.h" #include "JSDOMBinding.h" #include "ScriptController.h" @@ -64,6 +63,7 @@ #include "webkitwebnavigationaction.h" #include "webkitwebpolicydecision.h" #include "webkitwebview.h" +#include <wtf/text/CString.h> #include <JavaScriptCore/APICast.h> #include <gio/gio.h> @@ -149,7 +149,7 @@ void FrameLoaderClient::committedLoad(WebCore::DocumentLoader* loader, const cha encoding = loader->response().textEncodingName(); FrameLoader* frameLoader = loader->frameLoader(); - frameLoader->setEncoding(encoding, userChosen); + frameLoader->writer()->setEncoding(encoding, userChosen); if (data) frameLoader->addData(data, length); @@ -276,8 +276,12 @@ void FrameLoaderClient::frameLoaderDestroyed() delete this; } -void FrameLoaderClient::dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long, const ResourceResponse& response) +void FrameLoaderClient::dispatchDidReceiveResponse(WebCore::DocumentLoader* loader, unsigned long, const ResourceResponse& response) { + // Update our knowledge of request soup flags - some are only set + // after the request is done. + loader->request().setSoupMessageFlags(response.soupMessageFlags()); + m_response = response; } @@ -658,7 +662,7 @@ void FrameLoaderClient::detachedFromParent3() void FrameLoaderClient::dispatchDidHandleOnloadEvents() { - notImplemented(); + g_signal_emit_by_name(getViewFromFrame(m_frame), "onload-event", m_frame); } void FrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad() @@ -784,7 +788,8 @@ void FrameLoaderClient::dispatchDidCommitLoad() void FrameLoaderClient::dispatchDidFinishDocumentLoad() { - notImplemented(); + WebKitWebView* webView = getViewFromFrame(m_frame); + g_signal_emit_by_name(webView, "document-load-finished", m_frame); } void FrameLoaderClient::dispatchDidFirstLayout() @@ -863,7 +868,7 @@ void FrameLoaderClient::finishedLoading(WebCore::DocumentLoader* documentLoader) { if (!m_pluginView) { FrameLoader* loader = documentLoader->frameLoader(); - loader->setEncoding(m_response.textEncodingName(), false); + loader->writer()->setEncoding(m_response.textEncodingName(), false); } else { m_pluginView->didFinishLoading(); m_pluginView = 0; @@ -940,11 +945,6 @@ void FrameLoaderClient::dispatchDidFailLoading(WebCore::DocumentLoader* loader, notImplemented(); } -void FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&) -{ - notImplemented(); -} - bool FrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length) { notImplemented(); diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h index d5db6d0..3819b9f 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h @@ -69,7 +69,6 @@ namespace WebKit { virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier); virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&); virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length); - virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const WebCore::ScriptString&); virtual void dispatchDidHandleOnloadEvents(); virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp index 99bc627..317a058 100644 --- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp @@ -22,76 +22,49 @@ #include "webkitwebview.h" #include "webkitwebinspector.h" #include "webkitprivate.h" -#include "CString.h" #include "InspectorController.h" #include "NotImplemented.h" #include "PlatformString.h" +#include <wtf/text/CString.h> using namespace WebCore; namespace WebKit { -static void notifyWebViewDestroyed(WebKitWebView* webView, InspectorClient* inspectorClient) +static void notifyWebViewDestroyed(WebKitWebView* webView, InspectorFrontendClient* inspectorFrontendClient) { - inspectorClient->webViewDestroyed(); + inspectorFrontendClient->destroyInspectorWindow(); } InspectorClient::InspectorClient(WebKitWebView* webView) - : m_webView(0) - , m_inspectedWebView(webView) - , m_webInspector(0) + : m_inspectedWebView(webView) {} void InspectorClient::inspectorDestroyed() { - if (m_webInspector) - g_object_unref(m_webInspector); - delete this; } -void InspectorClient::webViewDestroyed() -{ - m_webView = 0; - core(m_inspectedWebView)->inspectorController()->pageDestroyed(); - - // createPage will be called again, if the user chooses to inspect - // something else, and the inspector will be referenced again, - // there. - g_object_unref(m_webInspector); - m_webInspector = 0; -} - -Page* InspectorClient::createPage() +void InspectorClient::openInspectorFrontend(InspectorController* controller) { - if (m_webView) { - gboolean handled = FALSE; - g_signal_emit_by_name(m_webInspector, "destroy", &handled); - - /* we can now dispose our own reference */ - g_object_unref(m_webInspector); - } - // This g_object_get will ref the inspector. We're not doing an // unref if this method succeeds because the inspector object must // be alive even after the inspected WebView is destroyed - the // close-window and destroy signals still need to be // emitted. - WebKitWebInspector* webInspector; + WebKitWebInspector* webInspector = 0; g_object_get(m_inspectedWebView, "web-inspector", &webInspector, NULL); - m_webInspector = webInspector; + ASSERT(webInspector); - g_signal_emit_by_name(m_webInspector, "inspect-web-view", m_inspectedWebView, &m_webView); + WebKitWebView* inspectorWebView = 0; + g_signal_emit_by_name(webInspector, "inspect-web-view", m_inspectedWebView, &inspectorWebView); - if (!m_webView) { - g_object_unref(m_webInspector); - return 0; + if (!inspectorWebView) { + g_object_unref(webInspector); + return; } - webkit_web_inspector_set_web_view(m_webInspector, m_webView); - - g_signal_connect(m_webView, "destroy", - G_CALLBACK(notifyWebViewDestroyed), (gpointer)this); + webkit_web_inspector_set_web_view(webInspector, inspectorWebView); GOwnPtr<gchar> inspectorURI; @@ -103,14 +76,73 @@ Page* InspectorClient::createPage() } else inspectorURI.set(g_filename_to_uri(DATA_DIR"/webkit-1.0/webinspector/inspector.html", NULL, NULL)); - webkit_web_view_load_uri(m_webView, inspectorURI.get()); + webkit_web_view_load_uri(inspectorWebView, inspectorURI.get()); + + gtk_widget_show(GTK_WIDGET(inspectorWebView)); + + Page* inspectorPage = core(inspectorWebView); + inspectorPage->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClient(m_inspectedWebView, inspectorWebView, webInspector, inspectorPage)); +} + +void InspectorClient::highlight(Node* node) +{ + notImplemented(); +} + +void InspectorClient::hideHighlight() +{ + notImplemented(); +} + +void InspectorClient::populateSetting(const String& key, String* value) +{ + notImplemented(); +} + +void InspectorClient::storeSetting(const String& key, const String& value) +{ + notImplemented(); +} + + +bool destroyed = TRUE; + +InspectorFrontendClient::InspectorFrontendClient(WebKitWebView* inspectedWebView, WebKitWebView* inspectorWebView, WebKitWebInspector* webInspector, Page* inspectorPage) + : InspectorFrontendClientLocal(core(inspectedWebView)->inspectorController(), inspectorPage) + , m_inspectorWebView(inspectorWebView) + , m_inspectedWebView(inspectedWebView) + , m_webInspector(webInspector) +{ + g_signal_connect(m_inspectorWebView, "destroy", + G_CALLBACK(notifyWebViewDestroyed), (gpointer)this); +} + +InspectorFrontendClient::~InspectorFrontendClient() +{ + ASSERT(!m_webInspector); +} + +void InspectorFrontendClient::destroyInspectorWindow() +{ + if (!m_webInspector) + return; + WebKitWebInspector* webInspector = m_webInspector; + m_webInspector = 0; + + g_signal_handlers_disconnect_by_func(m_inspectorWebView, (gpointer)notifyWebViewDestroyed, (gpointer)this); + m_inspectorWebView = 0; + + core(m_inspectedWebView)->inspectorController()->disconnectFrontend(); - gtk_widget_show(GTK_WIDGET(m_webView)); + gboolean handled = FALSE; + g_signal_emit_by_name(webInspector, "close-window", &handled); + ASSERT(handled); - return core(m_webView); + /* we should now dispose our own reference */ + g_object_unref(webInspector); } -String InspectorClient::localizedStringsURL() +String InspectorFrontendClient::localizedStringsURL() { GOwnPtr<gchar> URL; @@ -126,89 +158,56 @@ String InspectorClient::localizedStringsURL() return String::fromUTF8(URL.get()); } -String InspectorClient::hiddenPanels() +String InspectorFrontendClient::hiddenPanels() { notImplemented(); return String(); } -void InspectorClient::showWindow() +void InspectorFrontendClient::bringToFront() { - if (!m_webView) + if (!m_inspectorWebView) return; gboolean handled = FALSE; g_signal_emit_by_name(m_webInspector, "show-window", &handled); - - core(m_inspectedWebView)->inspectorController()->setWindowVisible(true); } -void InspectorClient::closeWindow() +void InspectorFrontendClient::closeWindow() { - if (!m_webView) - return; - - gboolean handled = FALSE; - g_signal_emit_by_name(m_webInspector, "close-window", &handled); - - core(m_inspectedWebView)->inspectorController()->setWindowVisible(false); + destroyInspectorWindow(); } -void InspectorClient::attachWindow() +void InspectorFrontendClient::attachWindow() { - if (!m_webView) + if (!m_inspectorWebView) return; gboolean handled = FALSE; g_signal_emit_by_name(m_webInspector, "attach-window", &handled); } -void InspectorClient::detachWindow() +void InspectorFrontendClient::detachWindow() { - if (!m_webView) + if (!m_inspectorWebView) return; gboolean handled = FALSE; g_signal_emit_by_name(m_webInspector, "detach-window", &handled); } -void InspectorClient::setAttachedWindowHeight(unsigned height) -{ - notImplemented(); -} - -void InspectorClient::highlight(Node* node) -{ - notImplemented(); -} - -void InspectorClient::hideHighlight() +void InspectorFrontendClient::setAttachedWindowHeight(unsigned height) { notImplemented(); } -void InspectorClient::inspectedURLChanged(const String& newURL) +void InspectorFrontendClient::inspectedURLChanged(const String& newURL) { - if (!m_webView) + if (!m_inspectorWebView) return; webkit_web_inspector_set_inspected_uri(m_webInspector, newURL.utf8().data()); } -void InspectorClient::inspectorWindowObjectCleared() -{ - notImplemented(); -} - -void InspectorClient::populateSetting(const String& key, String* value) -{ - notImplemented(); -} - -void InspectorClient::storeSetting(const String& key, const String& value) -{ - notImplemented(); -} - } diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h index 297fd8f..cdb5375 100644 --- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h @@ -30,6 +30,7 @@ #define InspectorClientGtk_h #include "InspectorClient.h" +#include "InspectorFrontendClientLocal.h" #include "webkitwebview.h" #include "webkitwebinspector.h" @@ -46,15 +47,30 @@ namespace WebKit { InspectorClient(WebKitWebView* webView); virtual void inspectorDestroyed(); - void webViewDestroyed(); - virtual WebCore::Page* createPage(); + virtual void openInspectorFrontend(WebCore::InspectorController*); + + virtual void highlight(WebCore::Node*); + virtual void hideHighlight(); + + virtual void populateSetting(const WebCore::String& key, WebCore::String* value); + virtual void storeSetting(const WebCore::String& key, const WebCore::String& value); + + private: + WebKitWebView* m_inspectedWebView; + }; + + class InspectorFrontendClient : public WebCore::InspectorFrontendClientLocal { + public: + InspectorFrontendClient(WebKitWebView* inspectedWebView, WebKitWebView* inspectorWebView, WebKitWebInspector* webInspector, WebCore::Page* inspectorPage); + + void destroyInspectorWindow(); virtual WebCore::String localizedStringsURL(); virtual WebCore::String hiddenPanels(); - virtual void showWindow(); + virtual void bringToFront(); virtual void closeWindow(); virtual void attachWindow(); @@ -62,17 +78,12 @@ namespace WebKit { virtual void setAttachedWindowHeight(unsigned height); - virtual void highlight(WebCore::Node*); - virtual void hideHighlight(); virtual void inspectedURLChanged(const WebCore::String& newURL); - virtual void populateSetting(const WebCore::String& key, WebCore::String* value); - virtual void storeSetting(const WebCore::String& key, const WebCore::String& value); - - virtual void inspectorWindowObjectCleared(); - private: - WebKitWebView* m_webView; + virtual ~InspectorFrontendClient(); + + WebKitWebView* m_inspectorWebView; WebKitWebView* m_inspectedWebView; WebKitWebInspector* m_webInspector; }; diff --git a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp index b8eb92d..02da1d4 100644 --- a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2007 Luca Bruno <lethalman88@gmail.com> * Copyright (C) 2009 Holger Hans Peter Freyther + * Copyright (C) 2010 Martin Robinson <mrobinson@webkit.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -32,152 +33,32 @@ using namespace WebCore; namespace WebKit { -static GdkAtom gdkMarkupAtom = gdk_atom_intern("text/html", FALSE); - PasteboardHelperGtk::PasteboardHelperGtk() - : m_targetList(gtk_target_list_new(0, 0)) { - gtk_target_list_add_text_targets(m_targetList, WEBKIT_WEB_VIEW_TARGET_INFO_TEXT); - gtk_target_list_add(m_targetList, gdkMarkupAtom, 0, WEBKIT_WEB_VIEW_TARGET_INFO_HTML); + initializeTargetList(); } PasteboardHelperGtk::~PasteboardHelperGtk() { - gtk_target_list_unref(m_targetList); -} - -GtkClipboard* PasteboardHelperGtk::getCurrentTarget(Frame* frame) const -{ - WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame)); - - if (webkit_web_view_use_primary_for_paste(webView)) - return getPrimary(frame); - else - return getClipboard(frame); -} - -GtkClipboard* PasteboardHelperGtk::getClipboard(Frame* frame) const -{ - WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame)); - return gtk_widget_get_clipboard(GTK_WIDGET (webView), - GDK_SELECTION_CLIPBOARD); -} - -GtkClipboard* PasteboardHelperGtk::getPrimary(Frame* frame) const -{ - WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame)); - return gtk_widget_get_clipboard(GTK_WIDGET (webView), - GDK_SELECTION_PRIMARY); } -GtkTargetList* PasteboardHelperGtk::targetList() const +guint PasteboardHelperGtk::getIdForTargetType(PasteboardTargetType type) { - return m_targetList; + if (type == TargetTypeMarkup) + return WEBKIT_WEB_VIEW_TARGET_INFO_HTML; + if (type == TargetTypeImage) + return WEBKIT_WEB_VIEW_TARGET_INFO_IMAGE; + if (type == TargetTypeURIList) + return WEBKIT_WEB_VIEW_TARGET_INFO_URI_LIST; + if (type == TargetTypeNetscapeURL) + return WEBKIT_WEB_VIEW_TARGET_INFO_NETSCAPE_URL; + + return WEBKIT_WEB_VIEW_TARGET_INFO_TEXT; } -gint PasteboardHelperGtk::getWebViewTargetInfoHtml() const +bool PasteboardHelperGtk::usePrimarySelectionClipboard(GtkWidget* widget) { - return WEBKIT_WEB_VIEW_TARGET_INFO_HTML; -} - -static void fillSelectionData(GtkSelectionData* selectionData, guint info, DataObjectGtk* dataObject) -{ - if (info == WEBKIT_WEB_VIEW_TARGET_INFO_TEXT) - gtk_selection_data_set_text(selectionData, dataObject->text().utf8().data(), -1); - else if (info == WEBKIT_WEB_VIEW_TARGET_INFO_HTML) { - GOwnPtr<gchar> markup(g_strdup(dataObject->markup().utf8().data())); - gtk_selection_data_set(selectionData, selectionData->target, 8, - reinterpret_cast<const guchar*>(markup.get()), - strlen(markup.get())); - } -} - -static GtkTargetList* targetListForDataObject(DataObjectGtk* dataObject) -{ - GtkTargetList* list = gtk_target_list_new(0, 0); - - if (dataObject->hasText()) - gtk_target_list_add_text_targets(list, WEBKIT_WEB_VIEW_TARGET_INFO_TEXT); - - if (dataObject->hasMarkup()) - gtk_target_list_add(list, gdkMarkupAtom, 0, WEBKIT_WEB_VIEW_TARGET_INFO_HTML); - - return list; -} - -static DataObjectGtk* settingClipboardDataObject = 0; -static gpointer settingClipboardData = 0; -static void getClipboardContentsCallback(GtkClipboard* clipboard, GtkSelectionData *selectionData, guint info, gpointer data) -{ - DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard); - ASSERT(dataObject); - fillSelectionData(selectionData, info, dataObject); -} - -static void clearClipboardContentsCallback(GtkClipboard* clipboard, gpointer data) -{ - DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard); - ASSERT(dataObject); - - // Only clear the DataObject for this clipboard if we are not currently setting it. - if (dataObject != settingClipboardDataObject) - dataObject->clear(); - - // Only collapse the selection if this is an X11 primary clipboard - // and we aren't currently setting the clipboard for this WebView. - if (!data || data == settingClipboardData) - return; - - WebKitWebView* webView = reinterpret_cast<WebKitWebView*>(data); - WebCore::Page* corePage = core(webView); - - if (!corePage || !corePage->focusController()) { - g_object_unref(webView); - return; - } - - Frame* frame = corePage->focusController()->focusedOrMainFrame(); - - // Collapse the selection without clearing it - ASSERT(frame); - frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity()); - - g_object_unref(webView); -} - -void PasteboardHelperGtk::writeClipboardContents(GtkClipboard* clipboard, gpointer data) -{ - DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard); - GtkTargetList* list = targetListForDataObject(dataObject); - - int numberOfTargets; - GtkTargetEntry* table = gtk_target_table_new_from_list(list, &numberOfTargets); - - if (numberOfTargets > 0 && table) { - settingClipboardDataObject = dataObject; - settingClipboardData = data; - - // Protect the web view from being destroyed before one of the clipboard callbacks - // is called. Balanced in both getClipboardContentsCallback and - // clearClipboardContentsCallback. - WebKitWebView* webView = static_cast<WebKitWebView*>(data); - g_object_ref(webView); - - gboolean succeeded = gtk_clipboard_set_with_data(clipboard, table, numberOfTargets, - getClipboardContentsCallback, - clearClipboardContentsCallback, data); - if (!succeeded) - g_object_unref(webView); - - settingClipboardDataObject = 0; - settingClipboardData = 0; - } else - gtk_clipboard_clear(clipboard); - - if (table) - gtk_target_table_free(table, numberOfTargets); - - gtk_target_list_unref(list); + return webkit_web_view_use_primary_for_paste(WEBKIT_WEB_VIEW((widget))); } } diff --git a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h index 97eff90..64fcdba 100644 --- a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h +++ b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h @@ -1,6 +1,7 @@ /* * Copyright (C) 2007 Luca Bruno <lethalman88@gmail.com> * Copyright (C) 2009 Holger Hans Peter Freyther + * Copyright (C) 2010 Martin Robinson <mrobinson@webkit.org> * All rights reserved. * * This library is free software; you can redistribute it and/or @@ -41,16 +42,10 @@ class PasteboardHelperGtk : public PasteboardHelper { public: PasteboardHelperGtk(); ~PasteboardHelperGtk(); - virtual GtkClipboard* getCurrentTarget(Frame*) const; - virtual GtkClipboard* getClipboard(Frame*) const; - virtual GtkClipboard* getPrimary(Frame*) const; - virtual GtkTargetList* targetList() const; - virtual gint getWebViewTargetInfoHtml() const; + virtual guint getIdForTargetType(PasteboardTargetType); - void writeClipboardContents(GtkClipboard* clipboard, gpointer data = 0); - -private: - GtkTargetList* m_targetList; +protected: + virtual bool usePrimarySelectionClipboard(GtkWidget*); }; } diff --git a/WebKit/gtk/docs/webkitgtk-docs.sgml b/WebKit/gtk/docs/webkitgtk-docs.sgml index 77f3482..fb9ae09 100644 --- a/WebKit/gtk/docs/webkitgtk-docs.sgml +++ b/WebKit/gtk/docs/webkitgtk-docs.sgml @@ -18,6 +18,7 @@ <xi:include href="xml/webkitwebhistoryitem.xml"/> <xi:include href="xml/webkitwebnavigationaction.xml"/> <xi:include href="xml/webkitwebpolicydecision.xml"/> + <xi:include href="xml/webkitgeolocationpolicydecision.xml"/> <xi:include href="xml/webkitnetworkrequest.xml"/> <xi:include href="xml/webkitnetworkresponse.xml"/> <xi:include href="xml/webkitwebinspector.xml"/> @@ -103,4 +104,7 @@ <index id="index-1.1.20" role="1.1.20"> <title>Index of new symbols in 1.1.20</title> </index> + <index id="index-1.1.23" role="1.1.23"> + <title>Index of new symbols in 1.1.23</title> + </index> </book> diff --git a/WebKit/gtk/docs/webkitgtk-sections.txt b/WebKit/gtk/docs/webkitgtk-sections.txt index 2379c8b..7f37484 100644 --- a/WebKit/gtk/docs/webkitgtk-sections.txt +++ b/WebKit/gtk/docs/webkitgtk-sections.txt @@ -351,6 +351,26 @@ WebKitWebPolicyDecisionPrivate </SECTION> <SECTION> +<FILE>webkitgeolocationpolicydecision</FILE> +<TITLE>WebKitGeolocationPolicyDecision</TITLE> +WebKitGeolocationPolicyDecision +webkit_geolocation_policy_allow +webkit_geolocation_policy_deny +webkit_geolocation_policy_decision_get_type +<SUBSECTION Standard> +WEBKIT_IS_GEOLOCATION_POLICY_DECISION +WEBKIT_IS_GEOLOCATION_POLICY_DECISION_CLASS +WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION +WEBKIT_GEOLOCATION_POLICY_DECISION +WEBKIT_GEOLOCATION_POLICY_DECISION_CLASS +WEBKIT_GEOLOCATION_POLICY_DECISION_GET_CLASS +<SUBSECTION Private> +WebKitGeolocationPolicyDecision +WebKitGeolocationPolicyDecisionClass +WebKitGeolocationPolicyDecisionPrivate +</SECTION> + +<SECTION> <FILE>webkitnetworkrequest</FILE> <TITLE>WebKitNetworkRequest</TITLE> WebKitNetworkRequest diff --git a/WebKit/gtk/gdom/ConvertToGCharPrivate.h b/WebKit/gtk/gdom/ConvertToGCharPrivate.h index 621fb99..dd8c65e 100644 --- a/WebKit/gtk/gdom/ConvertToGCharPrivate.h +++ b/WebKit/gtk/gdom/ConvertToGCharPrivate.h @@ -21,9 +21,9 @@ #define ConvertToGCharPrivate_h #include "AtomicString.h" -#include "CString.h" #include "KURL.h" #include "PlatformString.h" +#include <wtf/text/CString.h> inline gchar* copyAsGchar(WebCore::String const& s) { diff --git a/WebKit/gtk/po/ChangeLog b/WebKit/gtk/po/ChangeLog index aabad74..b9f97fe 100644 --- a/WebKit/gtk/po/ChangeLog +++ b/WebKit/gtk/po/ChangeLog @@ -1,3 +1,142 @@ +2010-04-05 Lucas Lommer <llommer@svn.gnome.org> + + Reviewed by Gustavo Noronha. + + Czech translation for WebKitGtk + https://bugs.webkit.org/show_bug.cgi?id=36879 + + * cs.po: Added. + +2010-04-05 Christian Kirbach <Christian.Kirbach@googlemail.com> + + Reviewed by Gustavo Noronha. + + Updated German translation + https://bugs.webkit.org/show_bug.cgi?id=36453 + + * de.po: + +2010-04-05 Luca Ferretti <elle.uca@libero.it> + + Reviewed by Gustavo Noronha. + + Italian translation for 1.1.90 + https://bugs.webkit.org/show_bug.cgi?id=36323 + + * it.po: + +2010-03-25 Reinout van Schouwen <reinouts@gnome.org> + + Reviewed by Gustavo Noronha. + + Updated Dutch translation + https://bugs.webkit.org/show_bug.cgi?id=36432 + + * nl.po: + +2010-03-24 Yuri Chornoivan <yurchor@ukr.net> + + Reviewed by Gustavo Noronha. + + Ukrainian translation. + + * uk.po: Added. + +2010-03-16 Matej Urbančič <mateju@svn.gnome.org> + + Reviewed by Gustavo Noronha. + + Slovenian translation. + + * sl.po: Added. + +2010-03-16 António Lima <amrlima@gmail.com> + + Reviewed by Gustavo Noronha. + + Translation for pt (Portuguese) + https://bugs.webkit.org/show_bug.cgi?id=36148 + + * pt.po: Added. + +2010-03-10 Priit Laes <plaes@plaes.org> + + Reviewed by Gustavo Noronha. + + Estonian translation. + + * et.po: Added. + +2010-03-09 Peteris Krisjanis <pecisk@gmail.com> + + Reviewed by Gustavo Noronha. + + Latvian translation. + + * lv.po: Added. + +2010-03-09 Duy Nguyen <pclouds@gmail.com> + + Reviewed by Gustavo Noronha. + + Vietnamese translation update. + + * vi.po: + +2010-03-09 Rimas Kudelis <rq@akl.lt> + + Reviewed by Gustavo Noronha. + + Lithuanian translation update. + + * lt.po: + +2010-02-25 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Updated to accomodate the change done to the localized string. + + * de.po: + * en_GB.po: + * es.po: + * gu.po: + * he.po: + * it.po: + * lt.po: + * nl.po: + * pa.po: + * pt_BR.po: + * ru.po: + * sr.po: + * sr@latin.po: + * sv.po: + * vi.po: + * webkit.pot: + * zh_CN.po: + +2010-02-23 Mario Blättermann <mariobl@freenet.de> + + Reviewed by Gustavo Noronha. + + German translation update. + + * de.po: + +2010-02-23 Daniel Nylander <po@danielnylander.se> + + Reviewed by Gustavo Noronha. + + Swedish translation update. + + * sv.po: + +2010-02-23 Ankit Patel <ankit@redhat.com> + + Reviewed by Gustavo Noronha. + + Gujarati translation. + + * gu.po: Added. + 2010-02-18 A S Alam <amanpreet.alam@gmail.com> Punjabi translation. diff --git a/WebKit/gtk/po/cs.po b/WebKit/gtk/po/cs.po new file mode 100644 index 0000000..228ba22 --- /dev/null +++ b/WebKit/gtk/po/cs.po @@ -0,0 +1,1089 @@ +# Czech translation for webkit. +# Copyright (C) 2010 webkit's COPYRIGHT HOLDER +# This file is distributed under the same license as the webkit package. +# Lucas Lommer <llommer@svn.gnome.org>, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: webkit HEAD\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" +"PO-Revision-Date: 2010-03-31 13:07+0100\n" +"Last-Translator: Lucas Lommer <llommer@svn.gnome.org>\n" +"Language-Team: Czech <gnome-cs-list@gnome.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 +msgid "Upload File" +msgstr "Nahrát soubor" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 +msgid "Input _Methods" +msgstr "Vstupní _metody" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 +msgid "LRM _Left-to-right mark" +msgstr "LRM - značka z_leva doprava" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 +msgid "RLM _Right-to-left mark" +msgstr "RLM - značka zp_rava doleva" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 +msgid "LRE Left-to-right _embedding" +msgstr "LRE - _zapouzdření zleva doprava" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 +msgid "RLE Right-to-left e_mbedding" +msgstr "RLE - z_apouzdření zprava doleva" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 +msgid "LRO Left-to-right _override" +msgstr "LRO - _přepisování zleva doprava" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 +msgid "RLO Right-to-left o_verride" +msgstr "RLO - př_episování zprava doleva" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 +msgid "PDF _Pop directional formatting" +msgstr "PDF - zrušení směrovaného _formátování" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 +msgid "ZWS _Zero width space" +msgstr "ZWS - mezera _nulové šířky" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 +msgid "ZWJ Zero width _joiner" +msgstr "ZWJ - _spojovač nulové šířky" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 +msgid "ZWNJ Zero width _non-joiner" +msgstr "ZWNJ - nespojovač n_ulové šířky" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 +msgid "_Insert Unicode Control Character" +msgstr "Vloži_t řídící znak Unicode" + +#: WebKit/gtk/webkit/webkitdownload.cpp:266 +msgid "Network Request" +msgstr "Síťový požadavek" + +#: WebKit/gtk/webkit/webkitdownload.cpp:267 +msgid "The network request for the URI that should be downloaded" +msgstr "Síťový požadavek na adresu URI, která má být stažena" + +#: WebKit/gtk/webkit/webkitdownload.cpp:281 +msgid "Network Response" +msgstr "Síťová odpověď" + +#: WebKit/gtk/webkit/webkitdownload.cpp:282 +msgid "The network response for the URI that should be downloaded" +msgstr "Síťová odpověď na adresu URI, která má být stažena" + +#: WebKit/gtk/webkit/webkitdownload.cpp:296 +msgid "Destination URI" +msgstr "Cílová adresa URI" + +#: WebKit/gtk/webkit/webkitdownload.cpp:297 +msgid "The destination URI where to save the file" +msgstr "Cílová adresa URI, kam soubor uložit" + +#: WebKit/gtk/webkit/webkitdownload.cpp:311 +msgid "Suggested Filename" +msgstr "Navrhovaný název souboru" + +#: WebKit/gtk/webkit/webkitdownload.cpp:312 +msgid "The filename suggested as default when saving" +msgstr "Výchozí název souboru při uložení" + +#: WebKit/gtk/webkit/webkitdownload.cpp:329 +msgid "Progress" +msgstr "Průběh" + +#: WebKit/gtk/webkit/webkitdownload.cpp:330 +msgid "Determines the current progress of the download" +msgstr "Údaj o aktuálním průběhu stahování" + +#: WebKit/gtk/webkit/webkitdownload.cpp:343 +msgid "Status" +msgstr "Stav" + +#: WebKit/gtk/webkit/webkitdownload.cpp:344 +msgid "Determines the current status of the download" +msgstr "Údaj o aktuálním stavu stahování" + +#: WebKit/gtk/webkit/webkitdownload.cpp:359 +msgid "Current Size" +msgstr "Aktuální velikost" + +#: WebKit/gtk/webkit/webkitdownload.cpp:360 +msgid "The length of the data already downloaded" +msgstr "Objem již stažených dat" + +#: WebKit/gtk/webkit/webkitdownload.cpp:374 +msgid "Total Size" +msgstr "Celková velikost" + +#: WebKit/gtk/webkit/webkitdownload.cpp:375 +msgid "The total size of the file" +msgstr "Celková velikost souboru" + +#: WebKit/gtk/webkit/webkitdownload.cpp:526 +msgid "User cancelled the download" +msgstr "Stahování zrušeno uživatelem" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 +#, c-format +msgid "A username and password are being requested by the site %s" +msgstr "Požadované uživatelské jméno a heslo, které je vyžadováno stránkou %s" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "Zpráva serveru:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 +msgid "Username:" +msgstr "Uživatelské jméno:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 +msgid "Password:" +msgstr "Heslo:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 +msgid "_Remember password" +msgstr "Za_pamatovat si heslo" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 +msgid "Name" +msgstr "Název" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 +msgid "The name of the frame" +msgstr "Název rámu" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 +msgid "Title" +msgstr "Nadpis" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 +msgid "The document title of the frame" +msgstr "Nadpis dokumentu rámu" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 +msgid "URI" +msgstr "Adresa URI" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 +msgid "The current URI of the contents displayed by the frame" +msgstr "Aktuální adresa URI obsahu zobrazeného v rámci" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "Strategie pro vodorovný posuvník" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Údaj o aktuální strategii horizontálního posuvníku rámce." + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "Strategie pro svislý posuvník" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Údaj o aktuální strategii vertikálního posuvníku rámce." + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 +msgid "The title of the history item" +msgstr "Nadpis položky historie" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 +msgid "Alternate Title" +msgstr "Alternativní nadpis" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 +msgid "The alternate title of the history item" +msgstr "Alternativní nadpis položky historie" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 +msgid "The URI of the history item" +msgstr "Adresa URI položky historie" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 +msgid "Original URI" +msgstr "Původní adresa URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 +msgid "The original URI of the history item" +msgstr "Původní adresa URI položky historie" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 +msgid "Last visited Time" +msgstr "Čas poslední návštěvy" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 +msgid "The time at which the history item was last visited" +msgstr "Čas, kdy byla položka historie naposledy navštívena" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 +msgid "Web View" +msgstr "Zobrazení WWW" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 +msgid "The Web View that renders the Web Inspector itself" +msgstr "Zobrazení WWW, které vykresluje samotné Zkoumání WWW" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 +msgid "Inspected URI" +msgstr "Zkoumaná adresa URI" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 +msgid "The URI that is currently being inspected" +msgstr "Adresa URI, která je právě zkoumána" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 +msgid "Enable JavaScript profiling" +msgstr "Povolit profilování jazyka JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 +msgid "Profile the executed JavaScript." +msgstr "Profilovat spuštěné skripty jazyka JavaScript." + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +msgid "Enable Timeline profiling" +msgstr "Povolit profilování časové osy" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 +msgid "Reason" +msgstr "Důvod" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 +msgid "The reason why this navigation is occurring" +msgstr "Důvod, proč se objevila tato navigace" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 +msgid "The URI that was requested as the target for the navigation" +msgstr "Adresa URI, která byla požadována jako cíl navigace" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 +msgid "Button" +msgstr "Tlačítko" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 +msgid "The button used to click" +msgstr "Tlačítko používané ke klepnutí" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 +msgid "Modifier state" +msgstr "Stav modifikátoru" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 +msgid "A bitmask representing the state of the modifier keys" +msgstr "Bitová maska reprezentující stav modifikátorových kláves" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +msgid "Target frame" +msgstr "Cílový rám" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +msgid "The target frame for the navigation" +msgstr "Cílový rám navigace" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 +msgid "Default Encoding" +msgstr "Výchozí kódování" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 +msgid "The default encoding used to display text." +msgstr "Výchozí kódování textu použité k zobrazení textu." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 +msgid "Cursive Font Family" +msgstr "Rodina písma kurzíva" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 +msgid "The default Cursive font family used to display text." +msgstr "Výchozí písmo z rodiny kurzíva použité k zobrazení textu." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 +msgid "Default Font Family" +msgstr "Výchozí rodina písma" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 +msgid "The default font family used to display text." +msgstr "Výchozí rodina písma použitého k zobrazení textu." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 +msgid "Fantasy Font Family" +msgstr "Rodina písma Fantasy" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 +msgid "The default Fantasy font family used to display text." +msgstr "Výchozí rodina písma Fantasy použitého k zobrazení textu." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 +msgid "Monospace Font Family" +msgstr "Rodina písma s pevnou šířkou" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 +msgid "The default font family used to display monospace text." +msgstr "Výchozí rodina písma použitého k zobrazení textu s pevnou šířkou." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 +msgid "Sans Serif Font Family" +msgstr "Rodina písem Sans Serif" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 +msgid "The default Sans Serif font family used to display text." +msgstr "Výchozí písmo z rodiny Sans Serif použité k zobrazení textu." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 +msgid "Serif Font Family" +msgstr "Rodina písma Sans Serif" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 +msgid "The default Serif font family used to display text." +msgstr "Výchozí písmo z rodiny Serif použité k zobrazení textu." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 +msgid "Default Font Size" +msgstr "Výchozí velikost písma" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +msgid "The default font size used to display text." +msgstr "Výchozí velikost písma použitá k zobrazení textu." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 +msgid "Default Monospace Font Size" +msgstr "Výchozí velikost písma s pevnou šířkou" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 +msgid "The default font size used to display monospace text." +msgstr "Výchozí velikost písma použitá k zobrazení textu s pevnou šířkou." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +msgid "Minimum Font Size" +msgstr "Minimální velikost písma" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 +msgid "The minimum font size used to display text." +msgstr "Minimální velikost písma použitá k zobrazení textu." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 +msgid "Minimum Logical Font Size" +msgstr "Minimální logická velikost písma" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 +msgid "The minimum logical font size used to display text." +msgstr "Minimální logická velikost písma použítá k zobrazení textu." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 +msgid "Enforce 96 DPI" +msgstr "Vynutit 96 DPI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 +msgid "Enforce a resolution of 96 DPI" +msgstr "Vynutit rozlišení 96 DPI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 +msgid "Auto Load Images" +msgstr "Obrázky automaticky" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +msgid "Load images automatically." +msgstr "Automatický načíst obrázky." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 +msgid "Auto Shrink Images" +msgstr "Zmenšovat obrázky" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 +msgid "Automatically shrink standalone images to fit." +msgstr "" +"Automaticky zmenšovat samostatně zobrazené obrázky tak, aby se vešly na " +"obrazovku." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 +msgid "Print Backgrounds" +msgstr "Tisknout pozadí" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 +msgid "Whether background images should be printed." +msgstr "Zda mají být tisknuty obrázky na pozadí." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 +msgid "Enable Scripts" +msgstr "Povolit skripty" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 +msgid "Enable embedded scripting languages." +msgstr "Povolit vložené skriptovací jazyky." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 +msgid "Enable Plugins" +msgstr "Povolit zásuvné moduly" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 +msgid "Enable embedded plugin objects." +msgstr "Povolit vložené objekty zásuvných modulů." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 +msgid "Resizable Text Areas" +msgstr "Měnitelná velikost textového pole" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 +msgid "Whether text areas are resizable." +msgstr "Jestli je možno měnit velikost textového pole." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 +msgid "User Stylesheet URI" +msgstr "Cesta k předpisu vzhledu uživatele" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 +msgid "The URI of a stylesheet that is applied to every page." +msgstr "" +"Adresa URI, kde se nachází předpis vzhledu, který bude aplikován na každou " +"stránku." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 +msgid "Zoom Stepping Value" +msgstr "Hodnota kroků změn velikosti" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 +msgid "The value by which the zoom level is changed when zooming in or out." +msgstr "Hodnota změn velikosti jednotlivých kroků při zmenšování a zvětšování." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 +msgid "Enable Developer Extras" +msgstr "Povolit rozšíření pro vývojáře" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 +msgid "Enables special extensions that help developers" +msgstr "Povolit zvláštní rozšíření pomáhající vývojářům" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 +msgid "Enable Private Browsing" +msgstr "Povolit soukromé prohlížení" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 +msgid "Enables private browsing mode" +msgstr "Povolit režim soukromého prohlížení stránek" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 +msgid "Enable Spell Checking" +msgstr "Povolit kontrolu pravopisu" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 +msgid "Enables spell checking while typing" +msgstr "Povolit kontrolu pravopisu při psaní" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 +msgid "Languages to use for spell checking" +msgstr "Jazyk, který použít ke kontrole pravopisu" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 +msgid "Comma separated list of languages to use for spell checking" +msgstr "Seznam jazyků použitých ke kontrole pravopisu, oddělený čárkami" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 +msgid "Enable Caret Browsing" +msgstr "Povolit prohlížení s kurzorem" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "Jestli povolit zpřístupnění pomocí navigace klávesnicí" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 +msgid "Enable HTML5 Database" +msgstr "Povolit databázi HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 +msgid "Whether to enable HTML5 database support" +msgstr "Jeslti povolit podporu pro databázi HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 +msgid "Enable HTML5 Local Storage" +msgstr "Povolit místní úložiště HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "Jestli má být povolena podpora místního úložiště HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 +msgid "Enable XSS Auditor" +msgstr "Povolit revizi XSS" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 +msgid "Whether to enable teh XSS auditor" +msgstr "Jestli povolit revizi XSS" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 +msgid "User Agent" +msgstr "Identifikace prohlížeče" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 +msgid "The User-Agent string used by WebKitGtk" +msgstr "Řetězec identifikace prohlížeče (User agent), který WebKitGtk použije" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 +msgid "JavaScript can open windows automatically" +msgstr "JavaScript smí automaticky otevírat okna" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 +msgid "Whether JavaScript can open windows automatically" +msgstr "Jestli smí JavaScript automaticky otevírat okna" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 +msgid "Enable offline web application cache" +msgstr "Povolit ukládání stránek do vyrovnávací paměti" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 +msgid "Whether to enable offline web application cache" +msgstr "Povolit ukládání stránek do vyrovnávací paměti k použití při odpojení" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 +msgid "Editing behavior" +msgstr "Chování při úpravách" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 +msgid "The behavior mode to use in editing mode" +msgstr "Režim chování v režimu úprav" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 +msgid "Enable universal access from file URIs" +msgstr "Povolit univerzální přístup ze souboru s URI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 +msgid "Whether to allow universal access from file URIs" +msgstr "Povolit univerzální přístup ze souboru s adresami URI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 +msgid "Enable DOM paste" +msgstr "Povolit vkládání DOM" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 +msgid "Whether to enable DOM paste" +msgstr "Jestli povolit vkládání DOM" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 +msgid "Tab key cycles through elements" +msgstr "Tabulátor cyklicky prochází prvky" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 +msgid "Whether the tab key cycles through elements on the page." +msgstr "Jestli klávesa tabulátoru prochází cyklicky prvky stránky." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 +msgid "Enable Default Context Menu" +msgstr "Povolit výchozí kontextovou nabídku" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" +"Poboluje správu tvorby výchozí kontextové nabídky při klepnutí pravým " +"tlačítkem" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 +#, fuzzy +msgid "Enable Site Specific Quirks" +msgstr "Povolit řešení kompatibility" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 +msgid "Enables the site-specific compatibility workarounds" +msgstr "Povolit řešení komapatibility specifických stránek" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 +msgid "Enable page cache" +msgstr "Povolit vyrovnávací paměť stránky" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 +msgid "Whether the page cache should be used" +msgstr "Jestli použít vyrovnávací paměť pro stránky" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 +msgid "Auto Resize Window" +msgstr "Automatická změna velikosti okna" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "Automaticky změnit velikost okna, pokud o to stránka požádá" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +msgid "Enable Java Applet" +msgstr "Povolit applet jazyka Java" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "Jestli má být povolena podpora jazyka JavaScript skrze značku <applet>" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 +msgid "Returns the @web_view's document title" +msgstr "Vrací název dokumentu @web_view" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 +msgid "Returns the current URI of the contents displayed by the @web_view" +msgstr "Vrací aktuální adresu URI obsahu zobrazeného pomocí @web_view" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 +msgid "Copy target list" +msgstr "Seznam cílů kopírování" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 +msgid "The list of targets this web view supports for clipboard copying" +msgstr "" +"Seznam cílů, které zobrazení stránky podporuje pro operace kopírování pomocí " +"schránky" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 +msgid "Paste target list" +msgstr "Seznam cílů vkládání" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 +msgid "The list of targets this web view supports for clipboard pasting" +msgstr "" +"Seznam cílů, které zobrazení stránky podporuje pro operace vkládání pomocí " +"schránky" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 +msgid "Settings" +msgstr "Nastavení" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 +msgid "An associated WebKitWebSettings instance" +msgstr "Asociovaná instance WebKitWebSettings" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 +msgid "Web Inspector" +msgstr "Zkoumání WWW" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 +msgid "The associated WebKitWebInspector instance" +msgstr "Asociovaná instance WebKitWebInspector" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 +msgid "Editable" +msgstr "Upravitelné" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 +msgid "Whether content can be modified by the user" +msgstr "Jestli uživatel může upravovat obsah" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 +msgid "Transparent" +msgstr "Průhledné" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 +msgid "Whether content has a transparent background" +msgstr "Jestli má obsah průhledné pozadí" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 +msgid "Zoom level" +msgstr "Úroveň zvětšení" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 +msgid "The level of zoom of the content" +msgstr "Úroveň zvětšení obsahu" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 +msgid "Full content zoom" +msgstr "Změna velikosti celého obsahu" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 +msgid "Whether the full content is scaled when zooming" +msgstr "Jestli má být prováděna změna velikosti celého obsahu" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 +msgid "Encoding" +msgstr "Kódování" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 +msgid "The default encoding of the web view" +msgstr "Výchozí kódování zobrazení WWW" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 +msgid "Custom Encoding" +msgstr "Vlastní kódování" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 +msgid "The custom encoding of the web view" +msgstr "Vlastní kódování zobrazení WWW" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 +msgid "Icon URI" +msgstr "Adresa URI ikony" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "Adresa URI ikony stránky pro #WebKitWebView." + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 +msgid "Submit" +msgstr "Potvrdit" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 +msgid "Reset" +msgstr "Reset" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 +msgid "This is a searchable index. Enter search keywords: " +msgstr "Tento seznam lze prohledávat. Zadejte klíčová slova hledání:" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 +msgid "Choose File" +msgstr "Vybrat soubor" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 +msgid "(None)" +msgstr "(Nic)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 +msgid "Open Link in New _Window" +msgstr "Otevřít odkaz v novém _okně" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 +msgid "_Download Linked File" +msgstr "_Uložit odkazovaný soubor" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 +msgid "Copy Link Loc_ation" +msgstr "_Kopírovat adresu odkazu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 +msgid "Open _Image in New Window" +msgstr "Otevřít o_brázek v novém okně" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 +msgid "Sa_ve Image As" +msgstr "_Uložit obrázek jako" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 +msgid "Cop_y Image" +msgstr "Ko_pírovat obrázek" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 +msgid "Open _Frame in New Window" +msgstr "Otevřít _rám v novém okně" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 +msgid "_Reload" +msgstr "_Obnovit" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 +msgid "No Guesses Found" +msgstr "Nebyly nalezeny žádné návrhy" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 +msgid "_Ignore Spelling" +msgstr "_Ignorovat kontrolu pravopisu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 +msgid "_Learn Spelling" +msgstr "_Učit se kontrolu pravopisu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 +msgid "_Search the Web" +msgstr "_Vyhledat na WWW" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 +msgid "_Look Up in Dictionary" +msgstr "Vyh_ledat ve slovníku" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 +msgid "_Open Link" +msgstr "_Otevřít odkaz" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 +msgid "Ignore _Grammar" +msgstr "Ignorovat _gramatiku" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 +msgid "Spelling and _Grammar" +msgstr "Kontrola pravopisu a _gramatiky" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Show Spelling and Grammar" +msgstr "_Zobrazit kontrolu pravopisu a gramatiky" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Hide Spelling and Grammar" +msgstr "_Skrýt kontrolu pravopisu a gramatiky" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 +msgid "_Check Document Now" +msgstr "_Zkontrolovat dokument" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 +msgid "Check Spelling While _Typing" +msgstr "_Kontrola pravopisu během psaní" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 +msgid "Check _Grammar With Spelling" +msgstr "Kontrolovat _gramatiku pomocí pravopisu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 +msgid "_Font" +msgstr "_Písmo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 +msgid "_Outline" +msgstr "K_ontury" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 +msgid "Inspect _Element" +msgstr "Zkoumat _prvek" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 +msgid "No recent searches" +msgstr "Žádná nedávná hledání" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 +msgid "Recent searches" +msgstr "Nedávná hledání" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 +msgid "_Clear recent searches" +msgstr "_Vymazat nedávná hledání" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 +msgid "term" +msgstr "výraz" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 +msgid "definition" +msgstr "definice" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 +msgid "press" +msgstr "stisknutí" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 +msgid "select" +msgstr "výběr" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 +msgid "activate" +msgstr "aktivovat" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 +msgid "uncheck" +msgstr "zrušení výběru" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 +msgid "check" +msgstr "kontrola" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 +msgid "jump" +msgstr "přeskočit" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 +msgid " files" +msgstr " soubory" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 +msgid "Unknown" +msgstr "Neznámé" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "Načítá se…" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "Živý přenos" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "ovladač prvku zvuku" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "ovladač prvku videa" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "ztlumení" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "zrušit ztlumení" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "přehrát" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "pozastavit" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "čas videa" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "zpět 30 sekund" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "vrátit se do reálného času" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "uplynulý čas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "zbývající čas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +msgid "status" +msgstr "stav" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "celá obrazovka" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "rychle vpřed" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "rychle zpět" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "zobrazení ovládacích prvků a stavu prvku zvuku" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "zobrazení ovládacích prvků a stavu prvku videa" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "ztlumit hudební stopy" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "zrušit ztlumení hudebních stop" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "začít přehrávání" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "pozastavit přehrávání" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "přeskočit ve videu 30 sekund zpět" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "vrátit se v promítání videa do reálného šasu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "čas aktuálního videa v sekundách" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "počet zbývajících vteřin videa" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "aktuální stav videa" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "rychlý přechod zpět" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "rychlý přechod vpřed" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "Přehrát video na celou obrazovku" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +msgid "indefinite time" +msgstr "Nejasný čas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "chybějící hodnota" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "typ nesouhlasí" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "vzor nesouhlasí" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "příliš dlouhé" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "nedostatečně velký rozsah" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "příliš velký rozsah" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +#, fuzzy +msgid "step mismatch" +msgstr "krok nesouhlasí" diff --git a/WebKit/gtk/po/de.po b/WebKit/gtk/po/de.po index 1106587..b9fb99b 100644 --- a/WebKit/gtk/po/de.po +++ b/WebKit/gtk/po/de.po @@ -1,18 +1,22 @@ # German translations for WebKit package. -# Copyright (C) 2009 Christian Dywan <christian@twotoasts.de> -# +# This file is put in the public domain. +# Copyright (C) 2009 Christian Dywan <christian@twotoasts.de>, 2009. +# Mario Blättermann <mariobl@gnome.org>, 2010. +# Christian Kirbach <Christian.Kirbach@googlemail.com>, 2010. msgid "" msgstr "" -"Project-Id-Version: webkit 1.1.4\n" +"Project-Id-Version: webkit 1.1.21\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" -"PO-Revision-Date: 2009-04-07 00:27+0100\n" -"Last-Translator: Christian Dywan <christian@twotoasts.de>\n" -"Language-Team: German\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" +"PO-Revision-Date: 2010-03-21 21:14+0100\n" +"Last-Translator: Christian Kirbach <Christian.Kirbach@googlemail.com>\n" +"Language-Team: Deutsch <gnome-de@gnome.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"X-Poedit-Language: German\n" +"X-Poedit-Country: GERMANY\n" #: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" @@ -68,92 +72,94 @@ msgstr "ZWNJ-_Trenner mit Breite null" msgid "_Insert Unicode Control Character" msgstr "_Unicode-Steuerzeichen einfügen" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "Netzwerkanfrage" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" -msgstr "Die Netzwerkanfrage der URI welche heruntergeladen werden soll" +msgstr "Die Netzwerkanfrage der Adresse, welche heruntergeladen werden soll" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 -#, fuzzy +#: WebKit/gtk/webkit/webkitdownload.cpp:281 msgid "Network Response" -msgstr "Netzwerkanfrage" +msgstr "Netzwerkantwort" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 -#, fuzzy +#: WebKit/gtk/webkit/webkitdownload.cpp:282 msgid "The network response for the URI that should be downloaded" -msgstr "Die Netzwerkanfrage der URI welche heruntergeladen werden soll" +msgstr "Die Netzwerkantwort der Adresse, welche heruntergeladen werden soll" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" -msgstr "Ziel-URI" +msgstr "Zieladresse" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" -msgstr "Die Ziel-URI an welcher die Datei gespeichert werden soll" +msgstr "Die Zieladresse, an welcher die Datei gespeichert werden soll" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "Vorgeschlagener Dateiname" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" -msgstr "Der beim Speichern als Standard vorgeschlagene Dateiname" +msgstr "Der beim Speichern als Vorgabe vorgeschlagene Dateiname" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Fortschritt" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "Bestimmt den aktuellen Fortschritt des Herunterladens" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Status" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Bestimmt den aktuellen Status des Herunterladens" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Aktuelle Größe" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "Die Länge der bereits heruntergeladenen Daten" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Gesamtgröße" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "Die Gesamtgröße der Datei" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" -msgstr "" +msgstr "Download wurde vom Benutzer abgebrochen" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" -msgstr "" +msgstr "Ein Benutzername und ein Passwort sind für die Seite %s erforderlich" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "Server-Nachricht:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" -msgstr "" +msgstr "Benutzername:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" -msgstr "" +msgstr "Passwort:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 msgid "_Remember password" -msgstr "" +msgstr "An Passwort _erinnern" #: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" @@ -165,7 +171,7 @@ msgstr "Der Name des Rahmens" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Titel" @@ -175,549 +181,566 @@ msgstr "Der Titel des Dokuments in dem Rahmen" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" -msgstr "URI" +msgstr "Adresse" #: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" -msgstr "Die aktuelle URI der im Rahmen dargestellten Inhalte" +msgstr "Die aktuelle Adresse der im Rahmen dargestellten Inhalte" #: WebKit/gtk/webkit/webkitwebframe.cpp:344 msgid "Horizontal Scrollbar Policy" -msgstr "" +msgstr "Richtlinie für horizontal Rollbalken" #: WebKit/gtk/webkit/webkitwebframe.cpp:345 -#, fuzzy msgid "" "Determines the current policy for the horizontal scrollbar of the frame." -msgstr "Bestimmt den aktuellen Fortschritt des Herunterladens" +msgstr "" +"Bestimmt die aktuelle Richtlinie für den horizontalen Rollbalken des Rahmens." #: WebKit/gtk/webkit/webkitwebframe.cpp:362 msgid "Vertical Scrollbar Policy" -msgstr "" +msgstr "Richtlinie für vertikale Rollbalken" #: WebKit/gtk/webkit/webkitwebframe.cpp:363 -#, fuzzy msgid "Determines the current policy for the vertical scrollbar of the frame." -msgstr "Bestimmt den aktuellen Fortschritt des Herunterladens" +msgstr "" +"Bestimmt die aktuelle Richtlinie für den vertikalen Rollbalken des Rahmens." #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 -#, fuzzy msgid "The title of the history item" -msgstr "Die Gesamtgröße der Datei" +msgstr "Der Titel des Chronikeintrags" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" -msgstr "" +msgstr "Alternativer Titel" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 -#, fuzzy msgid "The alternate title of the history item" -msgstr "Der Titel des Dokuments in dem Rahmen" +msgstr "Der alternative Titel des Chronikeintrags" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" -msgstr "" +msgstr "Die Adresse des Chronikobjekts" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" -msgstr "" +msgstr "Originaladresse" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" -msgstr "" +msgstr "Die Originaladresse des Chronikeintrags" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" -msgstr "" +msgstr "Zeit des letzten Besuchs" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" -msgstr "" +msgstr "Der Zeitpunkt, an dem der Chronikeintrag zuletzt besucht wurde" #: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" -msgstr "" +msgstr "Webansicht" #: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" -msgstr "" +msgstr "Die Webansicht, die den Web-Inspektor selbst darstellt" #: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" -msgstr "" +msgstr "Untersuchte Adresse" #: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" -msgstr "" +msgstr "Die Adresse, die derzeit untersucht wird" #: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" -msgstr "" +msgstr "JavaScript-Profiling aktivieren" #: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." -msgstr "" +msgstr "Das ausgeführte JavaScript profilieren." #: WebKit/gtk/webkit/webkitwebinspector.cpp:315 msgid "Enable Timeline profiling" -msgstr "" +msgstr "Timeline-Profiling aktivieren" #: WebKit/gtk/webkit/webkitwebinspector.cpp:316 msgid "Profile the WebCore instrumentation." -msgstr "" +msgstr "Die WebCore-Instrumentation profilieren." #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" -msgstr "" +msgstr "Grund" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" -msgstr "" +msgstr "Der Grund, warum diese Navigation geschieht" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" -msgstr "" +msgstr "Die Adresse, die als Navigationsziel angefordert wurde" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" -msgstr "" +msgstr "Knopf" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" -msgstr "" +msgstr "Der angeklickte Knopf" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" -msgstr "" +msgstr "Modifikatorstatus" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" -msgstr "" +msgstr "Eine Bitmaske, die den Status der Zusatztasten darstellt." #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 -#, fuzzy msgid "Target frame" -msgstr "Der Name des Rahmens" +msgstr "Zielrahmen" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 msgid "The target frame for the navigation" -msgstr "" +msgstr "Der Zielrahmen der Navigation" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" -msgstr "" +msgstr "Voreingestellte Zeichenkodierung" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." -msgstr "" +msgstr "Die voreingestellte Zeichenkodierung zur Darstellung von Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" -msgstr "" +msgstr "Kursiv-Schriftfamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." -msgstr "" +msgstr "Die vorgegebene Kursiv-Schriftfamilie zur Darstellung von Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" -msgstr "" +msgstr "Voreingestellte Schriftfamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." -msgstr "" +msgstr "Die voreingestellte Schriftfamilie zur Darstellung von Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" -msgstr "" +msgstr "Fantasy-Schriftfamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." -msgstr "" +msgstr "Die voreingestellte Fantasy-Schriftfamilie zur Darstellung von Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" -msgstr "" +msgstr "Monospace-Schriftfamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "" +"Die voreingestellte Schriftfamilie zur Darstellung von dicktengleichem Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" -msgstr "" +msgstr "Sans-Serif-Schriftfamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "" +"Die voreingestellte Sans-Serif-Schriftfamilie zur Darstellung von Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" -msgstr "" +msgstr "Serif-Schriftfamilie" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." -msgstr "" +msgstr "Die voreingestellte Serif-Schriftfamilie zur Darstellung von Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" -msgstr "" +msgstr "Voreingestellte Schriftgröße" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." -msgstr "" +msgstr "Die voreingestellte Schriftgröße zur Darstellung von Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" -msgstr "" +msgstr "Voreingestellte Monospace-Schriftgröße" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "" +"Die voreingestellte Schriftgröße zur Darstellung von dicktengleichem Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" -msgstr "" +msgstr "Mindestschriftgröße" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." -msgstr "" +msgstr "Die Mindestgröße der Schrift zur Darstellung von Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" -msgstr "" +msgstr "Kleinste logische Schriftgröße" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." -msgstr "" +msgstr "Die kleinste logische Schriftgröße zur Darstellung von Text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" -msgstr "" +msgstr "96 dpi erzwingen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" -msgstr "" +msgstr "Eine Auflösung von 96 dpi erzwingen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" -msgstr "" +msgstr "Bilder automatisch laden" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." -msgstr "" +msgstr "Bilder automatisch laden." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" -msgstr "" +msgstr "Bilder automatisch verkleinern" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." -msgstr "" +msgstr "Größe alleinstehender Bilder automatisch anpassen." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" -msgstr "" +msgstr "Hintergründe drucken" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." -msgstr "" +msgstr "Gibt an, ob Hintergrundbilder gedruckt werden sollen." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" -msgstr "" +msgstr "Skripte aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." -msgstr "" +msgstr "Eingebettete Skriptsprachen aktivieren." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" -msgstr "" +msgstr "Plugins aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." -msgstr "" +msgstr "Eingebettete Plugin-Objekte aktivieren." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" -msgstr "" +msgstr "Größenänderung für Textfelder" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." -msgstr "" +msgstr "Gibt an, ob die Größe von Textfeldern geändert werden kann." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" -msgstr "" +msgstr "Adresse der Benutzer-Stilvorlage" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "" +"Die Adresse einer benutzerdefinierten Stilvorlage, die auf alle Seiten " +"angewendet werden soll." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" -msgstr "" +msgstr "Schrittweite für Größenänderungen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." -msgstr "" +msgstr "Der Wert für Größenänderungensstufen beim Vergrößern oder Verkleinern." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" -msgstr "" +msgstr "Erweiterungen für Entwickler aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" -msgstr "" +msgstr "Aktiviert spezielle Erweiterungen, die Entwickler unterstützen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +# Steht so im KDE-Browser rekonq. +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" -msgstr "" +msgstr "Privaten Modus aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" -msgstr "" +msgstr "Aktiviert den privaten Modus für den Browser." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" -msgstr "" +msgstr "Rechtschreibprüfung aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 msgid "Enables spell checking while typing" -msgstr "Rechtschreibung beim _Eintippen überprüfen" +msgstr "Rechtschreibung beim Tippen überprüfen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" -msgstr "" +msgstr "Sprachen für die Rechtschreibprüfung" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" -msgstr "" +msgstr "Durch Kommata getrennte Liste von Sprachen für die Rechtschreibprüfung" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 msgid "Enable Caret Browsing" -msgstr "" +msgstr "Caret-Modus aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" +"Legt fest, ob die barrierefreie Tastaturnavigation aktiviert werden soll" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" -msgstr "" +msgstr "HTML5-Datenbank aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" -msgstr "" +msgstr "Legt fest, ob HTML5-Datenbanken unterstützt werden" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" -msgstr "" +msgstr "Lokale Speicherung nach HTML5 aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" -msgstr "" +msgstr "Legt fest, ob lokale Speicherung nach HTML5 unterstützt wird" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 msgid "Enable XSS Auditor" -msgstr "" +msgstr "XSS-Auditor aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" -msgstr "" +msgstr "Legt fest, ob der XSS-Auditor aktiviert ist" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" -msgstr "" +msgstr "Benutzerprogramm" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" -msgstr "" +msgstr "Von WebKitGtk verwendete Zeichenkette für das Benutzerprogramm" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" -msgstr "" +msgstr "JavaScript darf Fenster automatisch öffnen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" -msgstr "" +msgstr "Legt fest, ob JavaScript Fenster automatisch öffnen darf" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" -msgstr "" +msgstr "Offline-Webanwendungscache aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" -msgstr "" +msgstr "Legt fest, ob der Offline-Webanwendungscache aktiviert wird" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" -msgstr "" +msgstr "Bearbeitungsverhalten" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" -msgstr "" +msgstr "Das Verhalten im Bearbeitungsmodus" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" -msgstr "" +msgstr "Unbeschränkten Zugriff von Datei-Adressen aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" -msgstr "" +msgstr "Legt fest, ob unbeschränkter Zugriff von Datei-Adressen aktiviert wird" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 msgid "Enable DOM paste" -msgstr "" +msgstr "Einfügen ins DOM aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" -msgstr "" +msgstr "Legt fest, ob Einfügen ins DOM aktiviert ist" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" -msgstr "" +msgstr "Tabulatortaste wechselt zwischen Elementen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" +"Legt fest, ob die Tabulatortaste zwischen Elementen auf der Seite wechselt." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" -msgstr "" +msgstr "Voreingestelltes Kontext-Menü aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" +"Drücken der rechten Maustaste blendet das voreingestellte Kontext-Menü ein" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" -msgstr "" +msgstr "Seitenspezifische Fehlerumgehungen aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" -msgstr "" +msgstr "Seitenspezifische Kompatibilitätsprobleme umgehen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" -msgstr "" +msgstr "Seiten-Cache aktivieren" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 msgid "Whether the page cache should be used" -msgstr "" +msgstr "Legt fest, ob Seiten-Cache verwendet werden soll" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" -msgstr "" +msgstr "Fenstergröße automatisch anpassen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" +"Die Größe des obersten Fensters auf Aufforderung einer Seite automatisch " +"anpassen" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +msgid "Enable Java Applet" +msgstr "Java-Applet aktivieren" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "Legt fest, ob Java-Applets mittels <applet> unterstützt werden sollen" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" -msgstr "" +msgstr "Gibt den Dokumenttitel von @web_view zurück" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" -msgstr "Die aktuelle URI der im Rahmen dargestellten Inhalte" +msgstr "Gibt die aktuelle Adresse des von @web_view angezeigten Inhalts zurück" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" -msgstr "" +msgstr "Liste der Kopierziele" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "" +"Die Liste der Ziele, die diese Webansicht für Kopieren in die Zwischenablage " +"unterstützt" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" -msgstr "" +msgstr "Liste der Einfügeziele" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" +"Die Liste der Ziele, die diese Webansicht für Einfügen der Zwischenablage " +"unterstützt" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" -msgstr "" +msgstr "Einstellungen" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" -msgstr "" +msgstr "Eine zugeordnete WebKitWebSettings-Instanz" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" -msgstr "" +msgstr "Web-Inspektor" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" -msgstr "" +msgstr "Die zugeordnete WebKitWebInspector-Instanz" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" -msgstr "Titel" +msgstr "Bearbeitbar" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" -msgstr "" +msgstr "Gibt an, ob der Inhalt vom Benutzer bearbeitet werden kann" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" -msgstr "" +msgstr "Transparent" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" -msgstr "" +msgstr "Gibt an, ob der Inhalt einen transparenten Hintergrund hat" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" -msgstr "" +msgstr "Vergrößerungsstufe" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" -msgstr "" +msgstr "Die Vergrößerungsstufe des Inhalts" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" -msgstr "" +msgstr "Vollständige Größenänderung" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" -msgstr "" +msgstr "Gibt an, ob Größenänderungen den gesamten Inhalt beeinflussen" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" -msgstr "" +msgstr "Zeichenkodierung" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" -msgstr "" +msgstr "Die vorgegebene Zeichenkodierung der Webansicht" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" -msgstr "" +msgstr "Benutzerdefinierte Zeichenkodierung" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" -msgstr "" +msgstr "Die benutzerdefinierte Zeichenkodierung der Webansicht" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" -msgstr "" +msgstr "Symboladresse" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." -msgstr "" +msgstr "Die Adresse des favicon-Symbols für #WebKitWebView." #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 @@ -729,8 +752,8 @@ msgid "Reset" msgstr "Zurücksetzen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "Durchsuchbarer _Index" +msgid "This is a searchable index. Enter search keywords: " +msgstr "Dieser Index ist durchsuchbar. Geben Sie Suchbegriffe ein: " #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -838,27 +861,27 @@ msgstr "Element _untersuchen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" -msgstr "Keine vergangen Suchen" +msgstr "Keine vergangenen Suchen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" -msgstr "Vergangene Suchen" +msgstr "Letzte Suchen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" -msgstr "_Limpar buscas recentes" +msgstr "Letzte Su_chen löschen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" -msgstr "begriff" +msgstr "Begriff" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" -msgstr "bedeutung" +msgstr "Festlegung" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" -msgstr "drucken" +msgstr "drücken" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" @@ -870,11 +893,11 @@ msgstr "aktivieren" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" -msgstr "auswählen" +msgstr "abwählen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" -msgstr "abwählen" +msgstr "wählen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" @@ -882,7 +905,7 @@ msgstr "überspringen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" -msgstr " dateien" +msgstr " Dateien" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" @@ -890,186 +913,187 @@ msgstr "Unbekannt" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 msgid "Loading..." -msgstr "" +msgstr "Ladevorgang …" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 msgid "Live Broadcast" -msgstr "" +msgstr "Live-Ausstrahlung" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 msgid "audio element controller" -msgstr "" +msgstr "Steuerung für Audio-Elemente" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 msgid "video element controller" -msgstr "" +msgstr "Steuerung für Video-Elemente" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 msgid "mute" -msgstr "" +msgstr "Stumm schalten" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 msgid "unmute" -msgstr "" +msgstr "Laut schalten" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 msgid "play" -msgstr "" +msgstr "Abspielen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 msgid "pause" -msgstr "" +msgstr "Pausieren" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 msgid "movie time" -msgstr "" +msgstr "Filmdauer" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 msgid "timeline slider thumb" -msgstr "" +msgstr "Rollbalken-Schieber der Zeitleiste" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 msgid "back 30 seconds" -msgstr "" +msgstr "30 Sekunden zurück" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 msgid "return to realtime" -msgstr "" +msgstr "Auf Echtzeit zurückstellen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 msgid "elapsed time" -msgstr "" +msgstr "Vergangene Zeit" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 msgid "remaining time" -msgstr "" +msgstr "Verbleibende Zeit" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 -#, fuzzy msgid "status" msgstr "Status" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 msgid "fullscreen" -msgstr "" +msgstr "Vollbild" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 msgid "fast forward" -msgstr "" +msgstr "Vorspulen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 msgid "fast reverse" -msgstr "" +msgstr "Zurückspulen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 msgid "show closed captions" -msgstr "" +msgstr "geschlossene Beschriftung zeigen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 msgid "hide closed captions" -msgstr "" +msgstr "geschlossene Beschriftung verbergen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 msgid "audio element playback controls and status display" -msgstr "" +msgstr "Wiedergabesteuerung und Statusanzeige für Audio-Elemente" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 msgid "video element playback controls and status display" -msgstr "" +msgstr "Wiedergabesteuerung und Statusanzeige für Video-Elemente" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 msgid "mute audio tracks" -msgstr "" +msgstr "Tonspuren stumm schalten" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 msgid "unmute audio tracks" -msgstr "" +msgstr "Tonspuren laut schalten" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 msgid "begin playback" -msgstr "" +msgstr "Wiedergabe starten" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 msgid "pause playback" -msgstr "" +msgstr "Wiedergabe pausieren" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 msgid "movie time scrubber" -msgstr "" +msgstr "Zeitschieber für Filme" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 msgid "movie time scrubber thumb" -msgstr "" +msgstr "Zeitschiebergriff für Filme" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 msgid "seek movie back 30 seconds" -msgstr "" +msgstr "Film 30 Sekunden zurückspulen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 msgid "return streaming movie to real time" -msgstr "" +msgstr "Streaming-Video auf Echtzeit zurückstellen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 msgid "current movie time in seconds" -msgstr "" +msgstr "Aktuelle Filmwiedergabezeit in Sekunden" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 msgid "number of seconds of movie remaining" -msgstr "" +msgstr "Anzahl verbleibender Sekunden des Films" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 msgid "current movie status" -msgstr "" +msgstr "Status des aktuellen Films" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 msgid "seek quickly back" -msgstr "" +msgstr "Schnell zurückspulen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 msgid "seek quickly forward" -msgstr "" +msgstr "Schnell vorspulen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 msgid "Play movie in fullscreen mode" -msgstr "" +msgstr "Den momentanen Film im Vollbildmodus wiedergeben" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 msgid "start displaying closed captions" -msgstr "" +msgstr "beginnen, geschlossene Beschriftung zu zeigen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 msgid "stop displaying closed captions" -msgstr "" +msgstr "beenden, geschlossene Beschriftung zu zeigen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 -#, fuzzy msgid "indefinite time" -msgstr "bedeutung" +msgstr "Unbegrenzte Zeit" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 msgid "value missing" -msgstr "" +msgstr "Wert fehlt" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 msgid "type mismatch" -msgstr "" +msgstr "Typ passt nicht" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 msgid "pattern mismatch" -msgstr "" +msgstr "Muster passt nicht" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 msgid "too long" -msgstr "" +msgstr "Zu lang" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 msgid "range underflow" -msgstr "" +msgstr "Bereich unterschritten" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 msgid "range overflow" -msgstr "" +msgstr "Bereich überschritten" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" -msgstr "" +msgstr "Schritt passt nicht" + +#~ msgid "_Searchable Index" +#~ msgstr "Durchsuchbarer _Index" diff --git a/WebKit/gtk/po/en_GB.po b/WebKit/gtk/po/en_GB.po index 77bf543..7174fc7 100644 --- a/WebKit/gtk/po/en_GB.po +++ b/WebKit/gtk/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit HEAD\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: 2009-07-14 02:01+0100\n" "Last-Translator: Bruce Cowan <bcowan@fastmail.co.uk>\n" "Language-Team: British English <en@li.org>\n" @@ -69,90 +69,94 @@ msgstr "ZWNJ Zero width _non-joiner" msgid "_Insert Unicode Control Character" msgstr "_Insert Unicode Control Character" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "Network Request" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "The network request for the URI that should be downloaded" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 #, fuzzy msgid "Network Response" msgstr "Network Request" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 #, fuzzy msgid "The network response for the URI that should be downloaded" msgstr "The network request for the URI that should be downloaded" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "Destination URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "The destination URI where to save the file" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "Suggested Filename" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "The filename suggested as default when saving" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Progress" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "Determines the current progress of the download" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Status" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Determines the current status of the download" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Current Size" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "The length of the data already downloaded" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Total Size" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "The total size of the file" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "User cancelled the download" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "A username and password are being requested by the site %s" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "Username:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "Password:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 #, fuzzy msgid "_Remember password" msgstr "Remember password" @@ -167,7 +171,7 @@ msgstr "The name of the frame" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Title" @@ -177,7 +181,7 @@ msgstr "The document title of the frame" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "URI" @@ -308,418 +312,427 @@ msgstr "The name of the frame" msgid "The target frame for the navigation" msgstr "The URI that was requested as the target for the navigation" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "Default Encoding" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "The default encoding used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "Cursive Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "The default Cursive font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "Default Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "The default font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "Fantasy Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "The default Fantasy font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "Monospace Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "The default font family used to display monospace text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "Sans Serif Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "The default Sans Serif font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "Serif Font Family" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "The default Serif font family used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "Default Font Size" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "The default font size used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "Default Monospace Font Size" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "The default font size used to display monospace text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "Minimum Font Size" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "The minimum font size used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "Minimum Logical Font Size" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "The minimum logical font size used to display text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "Enforce 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "Enforce a resolution of 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "Auto Load Images" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "Load images automatically." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "Auto Shrink Images" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "Automatically shrink standalone images to fit." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "Print Backgrounds" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "Whether background images should be printed." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "Enable Scripts" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "Enable embedded scripting languages." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "Enable Plugins" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "Enable embedded plugin objects." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "Resizable Text Areas" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "Whether text areas are resizable." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "User Stylesheet URI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "The URI of a stylesheet that is applied to every page." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "Zoom Stepping Value" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "The value by which the zoom level is changed when zooming in or out." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "Enable Developer Extras" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "Enables special extensions that help developers" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "Enable Private Browsing" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "Enables private browsing mode" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 #, fuzzy msgid "Enables spell checking while typing" msgstr "Check Spelling While _Typing" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 #, fuzzy msgid "Enable Caret Browsing" msgstr "Enable Private Browsing" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 #, fuzzy msgid "Enable XSS Auditor" msgstr "Enable Scripts" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 #, fuzzy msgid "Enable DOM paste" msgstr "Enable Scripts" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 #, fuzzy msgid "Whether the page cache should be used" msgstr "Whether background images should be printed." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "Enable JavaScript profiling" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "Returns the @web_view's document title" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Returns the current URI of the contents displayed by the @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "Copy target list" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "The list of targets this web view supports for clipboard copying" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "Paste target list" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "The list of targets this web view supports for clipboard pasting" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "Settings" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "An associated WebKitWebSettings instance" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "Web Inspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "The associated WebKitWebInspector instance" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "Editable" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "Whether content can be modified by the user" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "Transparent" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "Whether content has a transparent background" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "Zoom level" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "The level of zoom of the content" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "Full content zoom" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "Whether the full content is scaled when zooming" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "Encoding" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "The default encoding of the web view" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "Custom Encoding" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "The custom encoding of the web view" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -733,8 +746,8 @@ msgid "Reset" msgstr "Reset" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "_Searchable Index" +msgid "This is a searchable index. Enter search keywords: " +msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -1077,3 +1090,6 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" msgstr "" + +#~ msgid "_Searchable Index" +#~ msgstr "_Searchable Index" diff --git a/WebKit/gtk/po/es.po b/WebKit/gtk/po/es.po index 758dd58..b06ba1b 100644 --- a/WebKit/gtk/po/es.po +++ b/WebKit/gtk/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit.webkit.HEAD.es.po\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: 2009-06-11 15:36+0200\n" "Last-Translator: Jorge González <jorgegonz@svn.gnome.org>\n" "Language-Team: Español <gnome-es-list@gnome.org>\n" @@ -71,88 +71,92 @@ msgstr "_No ensamblador de ancho cero [ZWNJ]" msgid "_Insert Unicode Control Character" msgstr "_Insertar un carácter de control Unicode" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 msgid "Network Response" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 msgid "The network response for the URI that should be downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Progreso" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Estado" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Determina el estado actual de la descarga" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Tamaño actual" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Tamaño total" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "Nombre de usuario:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "Contraseña:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 #, fuzzy msgid "_Remember password" msgstr "Recordar contraseña" @@ -167,7 +171,7 @@ msgstr "" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Título" @@ -177,7 +181,7 @@ msgstr "" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "URI" @@ -304,413 +308,421 @@ msgstr "" msgid "The target frame for the navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "Codificación predeterminada" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "Tamaño de predeterminado de tipografía" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "Tamaño mínimo de tipografía" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "Activar complementos" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "URI de la hoja de estilo del usuario" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 msgid "Enables spell checking while typing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 msgid "Enable Caret Browsing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 msgid "Enable XSS Auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 msgid "Enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 msgid "Whether the page cache should be used" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +msgid "Enable Java Applet" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "Copiar la lista de destinos" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "Pegar la lista de destinos" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "Ajustes" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "Inspector web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "Editable" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "Transparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "Nivel de ampliación" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "El nivel de ampliación del contenido" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "Codificación" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "La codificación predeterminada de la vista web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -724,8 +736,8 @@ msgid "Reset" msgstr "Restablecer" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "Índice buscable" +msgid "This is a searchable index. Enter search keywords: " +msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -1068,3 +1080,6 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" msgstr "" + +#~ msgid "_Searchable Index" +#~ msgstr "Índice buscable" diff --git a/WebKit/gtk/po/et.po b/WebKit/gtk/po/et.po new file mode 100644 index 0000000..6bb9033 --- /dev/null +++ b/WebKit/gtk/po/et.po @@ -0,0 +1,803 @@ +# Webkit'i tõlge eesti keelde. +# Estonian translation for webkit. +# +# Copyright (C) 2010 The WebKitGTK+ Team +# This file is distributed under the same license as the webkit package. +# +# Rene Pärts <rene87 hot ee>, 2010. +# Priit Laes <plaes plaes org>, 2010 +# +msgid "" +msgstr "" +"Project-Id-Version: webkit 1.1.22\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" +"POT-Creation-Date: 2010-02-16 15:01-0200\n" +"PO-Revision-Date: 2010-02-23 14:25+0300\n" +"Last-Translator: Priit Laes <rene87@hot.ee>\n" +"Language-Team: Estonian <gnome-et@linux.ee>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Upload File" +msgstr "Faili valimine" + +msgid "Input _Methods" +msgstr "Sisestus_meetodid" + +msgid "LRM _Left-to-right mark" +msgstr "LRM _Vasakult paremale märk" + +msgid "RLM _Right-to-left mark" +msgstr "RLM _Paremalt vasakule märk" + +msgid "LRE Left-to-right _embedding" +msgstr "LRE Va_sakult paremale põimimine" + +msgid "RLE Right-to-left e_mbedding" +msgstr "RLE Pa_remalt vasakule põimimine" + +msgid "LRO Left-to-right _override" +msgstr "LRO Vasakult paremale ü_lekirjutamine" + +msgid "RLO Right-to-left o_verride" +msgstr "RLO Paremalt vasakule üle_kirjutamine" + +msgid "PDF _Pop directional formatting" +msgstr "PDF _Suundvormindus" + +msgid "ZWS _Zero width space" +msgstr "ZWS _Null-laiusega tühik" + +msgid "ZWJ Zero width _joiner" +msgstr "ZWJ Null-laiusega ü_hendaja" + +msgid "ZWNJ Zero width _non-joiner" +msgstr "ZWJ Null-laiusega _mitteühendaja" + +msgid "_Insert Unicode Control Character" +msgstr "L_isa Unicode'i juhtmärk" + +msgid "Network Request" +msgstr "Võrgupäring" + +msgid "The network request for the URI that should be downloaded" +msgstr "Võrgupäring allalaaditavale URI-le" + +msgid "Network Response" +msgstr "Võrgu vastus" + +msgid "The network response for the URI that should be downloaded" +msgstr "Võrgu vastus allalaaditavale URI-le" + +msgid "Destination URI" +msgstr "Sihtkoha URI" + +msgid "The destination URI where to save the file" +msgstr "Salvestatava faili sihtkoha URI" + +msgid "Suggested Filename" +msgstr "Soovitatav failinimi" + +msgid "The filename suggested as default when saving" +msgstr "Salvestamisel pakutav vaikimisi failinimi" + +msgid "Progress" +msgstr "Edenemine" + +msgid "Determines the current progress of the download" +msgstr "Tagastab allalaadimise edenemise" + +msgid "Status" +msgstr "Olek" + +msgid "Determines the current status of the download" +msgstr "Tagastab allalaadimise oleku" + +msgid "Current Size" +msgstr "Hetkesuurus" + +msgid "The length of the data already downloaded" +msgstr "Allalaetud andmete maht" + +msgid "Total Size" +msgstr "Kogusuurus" + +msgid "The total size of the file" +msgstr "Faili kogusuurus" + +msgid "User cancelled the download" +msgstr "Allalaadimine katkestatud kasutaja poolt" + +#, c-format +msgid "A username and password are being requested by the site %s" +msgstr "Saidi %s poolt küsitakse kasutajanime ja parooli" + +msgid "Username:" +msgstr "Kasutajanimi:" + +msgid "Password:" +msgstr "Parool:" + +msgid "_Remember password" +msgstr "_Parooli meeldejätmine" + +msgid "Name" +msgstr "Nimi" + +msgid "The name of the frame" +msgstr "Raami nimi" + +msgid "Title" +msgstr "Pealkiri" + +msgid "The document title of the frame" +msgstr "Raami dokumendi pealkiri" + +msgid "URI" +msgstr "URI" + +msgid "The current URI of the contents displayed by the frame" +msgstr "Raami sisu aktiivne URI" + +msgid "Horizontal Scrollbar Policy" +msgstr "Horisontaalse kerimisriba kasutusreegel" + +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Määrab raami horisontaalse kerimisriba kasutusreeglid." + +msgid "Vertical Scrollbar Policy" +msgstr "Vertikaalse kerimisriba reegel" + +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Määrab raami vertikaalse kerimisriba kasutusreeglid." + +msgid "The title of the history item" +msgstr "Ajalookirje pealkiri" + +msgid "Alternate Title" +msgstr "Alternatiivne pealkiri" + +msgid "The alternate title of the history item" +msgstr "Ajalookirje alternatiivne pealkiri" + +msgid "The URI of the history item" +msgstr "Ajalookirje URI" + +msgid "Original URI" +msgstr "Algne URI" + +msgid "The original URI of the history item" +msgstr "Ajalookirje algne URI" + +msgid "Last visited Time" +msgstr "Viimase külastuse aeg" + +msgid "The time at which the history item was last visited" +msgstr "Ajalookirje viimase külastuse aeg" + +msgid "Web View" +msgstr "Veebivaade" + +msgid "The Web View that renders the Web Inspector itself" +msgstr "Veebiinspektorit esitav veebivaade" + +msgid "Inspected URI" +msgstr "Inspekteeritav URI" + +msgid "The URI that is currently being inspected" +msgstr "Hetkel inspekteeritav URI" + +msgid "Enable JavaScript profiling" +msgstr "Luba JavaScript'i profileerimine" + +msgid "Profile the executed JavaScript." +msgstr "Käivitatava JavaScript'i profileerimine." + +msgid "Enable Timeline profiling" +msgstr "Luba ajatelje profileerimine" + +msgid "Profile the WebCore instrumentation." +msgstr "WebCore'i jälgimisvihjete profileerimine" + +msgid "Reason" +msgstr "Põhjus" + +msgid "The reason why this navigation is occurring" +msgstr "Navigeerimistegevuse esilekutsumise põhjus" + +msgid "The URI that was requested as the target for the navigation" +msgstr "" + +msgid "Button" +msgstr "Nupp" + +msgid "The button used to click" +msgstr "Klõpsamiseks kasutatud nupp" + +msgid "Modifier state" +msgstr "Muuteklahvi olek" + +msgid "A bitmask representing the state of the modifier keys" +msgstr "Muuteklahvide olekut esindav bitimask" + +msgid "Target frame" +msgstr "Sihtraam" + +msgid "The target frame for the navigation" +msgstr "Navigeerimise sihtraam" + +msgid "Default Encoding" +msgstr "Vaikimisi kodeering" + +msgid "The default encoding used to display text." +msgstr "Vaikimisi kasutatav kodeering teksti kuvamiseks." + +msgid "Cursive Font Family" +msgstr "Kursiivne kirjaperekond" + +msgid "The default Cursive font family used to display text." +msgstr "Teksti kuvamiseks kasutatav vaikimisi kursiivne kirjaperekond." + +msgid "Default Font Family" +msgstr "Vaikimisi kirjaperekond" + +msgid "The default font family used to display text." +msgstr "Teksti kuvamiseks kasutatav vaikimisi kirjaperekond." + +msgid "Fantasy Font Family" +msgstr "Erikujuline kirjaperekond" + +msgid "The default Fantasy font family used to display text." +msgstr "Teksti kuvamiseks kasutatav vaikimisi erikujuline kirjaperekond." + +msgid "Monospace Font Family" +msgstr "Püsisammuga kirjaperekond" + +msgid "The default font family used to display monospace text." +msgstr "Teksti kuvamiseks kasutatav vaikimisi püsisammuga kirjaperekond." + +msgid "Sans Serif Font Family" +msgstr "Seriifideta kirjaperekond" + +msgid "The default Sans Serif font family used to display text." +msgstr "Teksti kuvamiseks kasutatav vaikimisi seriifideta kirjaperekond." + +msgid "Serif Font Family" +msgstr "Seriifidega kirjaperekond" + +msgid "The default Serif font family used to display text." +msgstr "Teksti kuvamiseks kasutatav vaikimisi seriifidega kirjaperekond." + +msgid "Default Font Size" +msgstr "Vaikimisi kirjasuurus" + +msgid "The default font size used to display text." +msgstr "Vaikimisi kirjasuurus teksti kuvamiseks." + +msgid "Default Monospace Font Size" +msgstr "Vaikimisi püsisammuga kirja suurus" + +msgid "The default font size used to display monospace text." +msgstr "Vaikimisi kirjasuurus püsisammuga teksti kuvamiseks." + +msgid "Minimum Font Size" +msgstr "Väikseim kirjasuurus" + +msgid "The minimum font size used to display text." +msgstr "Väikseim kirjasuurus teksti kuvamiseks." + +msgid "Minimum Logical Font Size" +msgstr "Väikseim loogilise kirjatüübi kirjasuurus" + +msgid "The minimum logical font size used to display text." +msgstr "Väikseim loogilise kirjatüübi kirjasuurus teksti kuvamiseks." + +msgid "Enforce 96 DPI" +msgstr "Lahutusvõime jõuga 96 DPI" + +msgid "Enforce a resolution of 96 DPI" +msgstr "Pealesunnitud ekraanilahutus on 96 DPI" + +msgid "Auto Load Images" +msgstr "Automaatne piltide laadimine" + +msgid "Load images automatically." +msgstr "Pildid laaditakse automaatselt." + +msgid "Auto Shrink Images" +msgstr "Piltide automaatne vähendamine" + +msgid "Automatically shrink standalone images to fit." +msgstr "Pildid vähendatakse automaatselt sobivaks." + +msgid "Print Backgrounds" +msgstr "Tausta printimine" + +msgid "Whether background images should be printed." +msgstr "Kas printimisel kaasatakse taustapildid või mitte." + +msgid "Enable Scripts" +msgstr "Skriptide lubamine" + +msgid "Enable embedded scripting languages." +msgstr "Manus-skriptikeelte lubamine." + +msgid "Enable Plugins" +msgstr "Pluginate lubamine" + +msgid "Enable embedded plugin objects." +msgstr "Põimitud plugina objektide lubamine." + +msgid "Resizable Text Areas" +msgstr "Muudetav tekstiväljade suurus" + +msgid "Whether text areas are resizable." +msgstr "Kas teksiväljade suurus on muudetav." + +msgid "User Stylesheet URI" +msgstr "Kasutaja laaditabeli URI" + +msgid "The URI of a stylesheet that is applied to every page." +msgstr "Igale lehele rakendatava laaditabeli URI." + +msgid "Zoom Stepping Value" +msgstr "Suurenduse samm" + +msgid "The value by which the zoom level is changed when zooming in or out." +msgstr "Suurenduse muutumise samm suurendamisel ja vähendamisel." + +msgid "Enable Developer Extras" +msgstr "Arendaja lisade lubamine" + +msgid "Enables special extensions that help developers" +msgstr "Arendajaile mõeldud erilaienduste lubamine" + +msgid "Enable Private Browsing" +msgstr "Privaatns sirvimise lubamine" + +msgid "Enables private browsing mode" +msgstr "Privaatse sirvimisrežiimi lubamine" + +msgid "Enable Spell Checking" +msgstr "Õigekirjakontrolli lubamine" + +msgid "Enables spell checking while typing" +msgstr "Lubab trükkimisel kontrollida õigekirja" + +msgid "Languages to use for spell checking" +msgstr "Õigekirjakontrollis kasutatavad keeled" + +msgid "Comma separated list of languages to use for spell checking" +msgstr "" +"Komadega eraldatud loend õigekirja kontrollimisel kasutatavatest keeltest" + +msgid "Enable Caret Browsing" +msgstr "Kursoriga sirvimine lubatud" + +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "Kas lubada klaviatuurihõlbustused navigeerimiseks" + +msgid "Enable HTML5 Database" +msgstr "HTML5 andmebaasitoe lubamine" + +msgid "Whether to enable HTML5 database support" +msgstr "Kas lubada HTML5 andmebaasi tugi" + +msgid "Enable HTML5 Local Storage" +msgstr "HTML5 kohaliku salvesti lubamine" + +msgid "Whether to enable HTML5 Local Storage support" +msgstr "Kas lubada HTML5 kohaliku salvesti tugi" + +msgid "Enable XSS Auditor" +msgstr "XSS audiitori lubamine" + +msgid "Whether to enable teh XSS auditor" +msgstr "Kas lubada XSS audiitor" + +msgid "User Agent" +msgstr "Sirvija identiteet" + +msgid "The User-Agent string used by WebKitGtk" +msgstr "WebKitGtk poolt kasutatav identiteet" + +msgid "JavaScript can open windows automatically" +msgstr "JavaScript tohib aknaid automaatselt avada" + +msgid "Whether JavaScript can open windows automatically" +msgstr "Kas JavaScript tohib aknaid automaatselt avada või mitte" + +msgid "Enable offline web application cache" +msgstr "Ühenduseta veebirakenduste vahemälu lubamine" + +msgid "Whether to enable offline web application cache" +msgstr "Kas lubada ühenduseta veebirakenduste vahemälu" + +msgid "Editing behavior" +msgstr "Redigeerimisrežiimis käitumine" + +msgid "The behavior mode to use in editing mode" +msgstr "Redigeerimisrežiimis kasutatava käitumisrežiim" + +msgid "Enable universal access from file URIs" +msgstr "Faili URI-dele üleüldise ligipääsu lubamine" + +msgid "Whether to allow universal access from file URIs" +msgstr "Kas lubada faili URI-dele üleüldine ligipääs" + +msgid "Enable DOM paste" +msgstr "DOM-põhise asetamise lubamine" + +msgid "Whether to enable DOM paste" +msgstr "Kas lubada DOM-põhine asetamine" + +msgid "Tab key cycles through elements" +msgstr "Tabulaator liigub elementide vahel" + +msgid "Whether the tab key cycles through elements on the page." +msgstr "Kas tabulaatoriga liigutakse lehe elementide vahel või mitte." + +msgid "Enable Default Context Menu" +msgstr "Vaikimisi kontekstimenüü lubamine" + +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "Lubab parem-klõpsudel vaikimisi kontekstimenüüd luua" + +msgid "Enable Site Specific Quirks" +msgstr "Lehepõhiste ümbernurgalahenduste lubamine" + +msgid "Enables the site-specific compatibility workarounds" +msgstr "Lubab kasutada lehepõhiseid ümbernurgalahendusi" + +msgid "Enable page cache" +msgstr "Lehtede vahemälu lubamine" + +msgid "Whether the page cache should be used" +msgstr "Kas kasutada lehtede vahemälu" + +msgid "Auto Resize Window" +msgstr "Akna suuruse automaatne muutmine" + +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "Automaatne ülemtaseme akna suuruse muutmine lehepoolsel päringul" + +msgid "Returns the @web_view's document title" +msgstr "Tagastab @web_view dokumendi pealkirja" + +msgid "Returns the current URI of the contents displayed by the @web_view" +msgstr "Tagastab @web_view-s kuvatava sisu aktiivse URI" + +msgid "Copy target list" +msgstr "Kopeerimisoperatsiooni sihtkohtade loend" + +msgid "The list of targets this web view supports for clipboard copying" +msgstr "" + +msgid "Paste target list" +msgstr "Asetusoperatsiooni sihtkohtade loend" + +msgid "The list of targets this web view supports for clipboard pasting" +msgstr "" + +msgid "Settings" +msgstr "Seaded" + +msgid "An associated WebKitWebSettings instance" +msgstr "" + +msgid "Web Inspector" +msgstr "Veebiinspektor" + +msgid "The associated WebKitWebInspector instance" +msgstr "" + +msgid "Editable" +msgstr "Redigeeritav" + +msgid "Whether content can be modified by the user" +msgstr "Kas sisu on kasutaja poolt muudetav või mitte" + +msgid "Transparent" +msgstr "Läbipaistvus" + +msgid "Whether content has a transparent background" +msgstr "Kas sisul on läbipaistev taust või mitte" + +msgid "Zoom level" +msgstr "Suurendusaste" + +msgid "The level of zoom of the content" +msgstr "Sisu suurendusaste" + +msgid "Full content zoom" +msgstr "" + +msgid "Whether the full content is scaled when zooming" +msgstr "" + +msgid "Encoding" +msgstr "Kodeering" + +msgid "The default encoding of the web view" +msgstr "Vaikimisi kodeering veebivaate jaoks" + +msgid "Custom Encoding" +msgstr "Kohandatud kodeering" + +msgid "The custom encoding of the web view" +msgstr "Kohandatud kodeering veebivaate jaoks" + +msgid "Icon URI" +msgstr "Ikooni URI" + +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "Veebilehe tunnusikooni URI #WebKitWebView jaoks." + +msgid "Submit" +msgstr "Saada" + +msgid "Reset" +msgstr "Taasta" + +msgid "_Searchable Index" +msgstr "_Otsitav indeks" + +msgid "Choose File" +msgstr "Vali fail" + +msgid "(None)" +msgstr "(Puudub)" + +msgid "Open Link in New _Window" +msgstr "Ava link _uues aknas" + +msgid "_Download Linked File" +msgstr "Salvesta _link" + +msgid "Copy Link Loc_ation" +msgstr "K_opeeri lingi asukoht" + +msgid "Open _Image in New Window" +msgstr "Ava _pilt uues aknas" + +msgid "Sa_ve Image As" +msgstr "_Salvesta pilt" + +msgid "Cop_y Image" +msgstr "_Kopeeri pilt" + +msgid "Open _Frame in New Window" +msgstr "Ava _raam uues aknas" + +msgid "_Reload" +msgstr "_Laadi uuesti" + +msgid "No Guesses Found" +msgstr "Vastavusi ei leitud" + +msgid "_Ignore Spelling" +msgstr "_Eira õigekirja" + +msgid "_Learn Spelling" +msgstr "Õ_pi õigekirja" + +msgid "_Search the Web" +msgstr "_Otsi veebist" + +msgid "_Look Up in Dictionary" +msgstr "_Otsi sõnaraamatust" + +msgid "_Open Link" +msgstr "_Ava link" + +msgid "Ignore _Grammar" +msgstr "Eira _grammatikat" + +msgid "Spelling and _Grammar" +msgstr "Õigekiri ja _grammatika" + +msgid "_Show Spelling and Grammar" +msgstr "_Näita õigakirja ja grammatikat" + +msgid "_Hide Spelling and Grammar" +msgstr "_Peida õigakiri ja grammatika" + +msgid "_Check Document Now" +msgstr "_Kontrolli dokumenti" + +msgid "Check Spelling While _Typing" +msgstr "Õigekirjakontroll _sisestamise ajal" + +msgid "Check _Grammar With Spelling" +msgstr "Õigekirja ja _grammatika kontrollimine" + +msgid "_Font" +msgstr "_Kirjatüüp" + +msgid "_Outline" +msgstr "_Kontuur" + +msgid "Inspect _Element" +msgstr "Uuri _elementi" + +msgid "No recent searches" +msgstr "Hiljutised otsingud puuduvad" + +msgid "Recent searches" +msgstr "Hiljutised otsingud" + +msgid "_Clear recent searches" +msgstr "_Kustuta hiljutised otsingud" + +msgid "term" +msgstr "termin" + +msgid "definition" +msgstr "definitsoon" + +msgid "press" +msgstr "vajuta" + +msgid "select" +msgstr "vali" + +msgid "activate" +msgstr "aktiveeri" + +msgid "uncheck" +msgstr "" + +msgid "check" +msgstr "kontrolli" + +msgid "jump" +msgstr "hüppa" + +msgid " files" +msgstr " faili" + +msgid "Unknown" +msgstr "Tundmatu" + +msgid "Loading..." +msgstr "Laadimine..." + +msgid "Live Broadcast" +msgstr "Otseülekanne" + +msgid "audio element controller" +msgstr "helielemendi juhtija" + +msgid "video element controller" +msgstr "videoelemendi juhtija" + +msgid "mute" +msgstr "vaigista" + +msgid "unmute" +msgstr "taasta heli" + +msgid "play" +msgstr "esita" + +msgid "pause" +msgstr "paus" + +msgid "movie time" +msgstr "filmi aeg" + +msgid "timeline slider thumb" +msgstr "" + +msgid "back 30 seconds" +msgstr "30 sekundit tagasi" + +msgid "return to realtime" +msgstr "tagasta reaalajas" + +msgid "elapsed time" +msgstr "aega kulunud" + +msgid "remaining time" +msgstr "aega jäänud" + +msgid "status" +msgstr "olek" + +msgid "fullscreen" +msgstr "täisekraan" + +msgid "fast forward" +msgstr "edasikerimine" + +msgid "fast reverse" +msgstr "tagasikerimine" + +msgid "show closed captions" +msgstr "" + +msgid "hide closed captions" +msgstr "" + +msgid "audio element playback controls and status display" +msgstr "" + +msgid "video element playback controls and status display" +msgstr "" + +msgid "mute audio tracks" +msgstr "helide vaigistamine" + +msgid "unmute audio tracks" +msgstr "helide taastamine" + +msgid "begin playback" +msgstr "esitamise alustamine" + +msgid "pause playback" +msgstr "esitamise paus" + +msgid "movie time scrubber" +msgstr "" + +msgid "movie time scrubber thumb" +msgstr "" + +msgid "seek movie back 30 seconds" +msgstr "filmi kerimine 30 sekundit tagasi" + +msgid "return streaming movie to real time" +msgstr "filmi voogedastamine reaalajas" + +msgid "current movie time in seconds" +msgstr "filmi kestus sekundites" + +msgid "number of seconds of movie remaining" +msgstr "filmi lõpuni jäänud sekundite arv" + +msgid "current movie status" +msgstr "filmi olek" + +msgid "seek quickly back" +msgstr "kiire tagasikerimine" + +msgid "seek quickly forward" +msgstr "kiire edasikerimine" + +msgid "Play movie in fullscreen mode" +msgstr "Filmi esitamine täisekraanvaates" + +msgid "start displaying closed captions" +msgstr "alusta suletud alapealkirjade näitamist" + +msgid "stop displaying closed captions" +msgstr "lõpeta suletud alapealkirjade näitamine" + +msgid "indefinite time" +msgstr "umbmäärane aeg" + +msgid "value missing" +msgstr "puuduv väärtus" + +msgid "type mismatch" +msgstr "tüübi sobimatus" + +msgid "pattern mismatch" +msgstr "mustri sobimatus" + +msgid "too long" +msgstr "liiga pikk" + +msgid "range underflow" +msgstr "vahemiku alatäitumus" + +msgid "range overflow" +msgstr "vahemiku ületäitumus" + +msgid "step mismatch" +msgstr "astme sobimatus" diff --git a/WebKit/gtk/po/gu.po b/WebKit/gtk/po/gu.po new file mode 100644 index 0000000..b0556e7 --- /dev/null +++ b/WebKit/gtk/po/gu.po @@ -0,0 +1,1084 @@ +# translation of webkit.gu.po to Gujarati +# Gujarati translations for PACKAGE package. +# This file is put in the public domain. +# +# Ankitkumar Patel <ankit@redhat.com>, 2010. +# Ankit Patel <ankit@redhat.com>, 2010. +msgid "" +msgstr "" +"Project-Id-Version: webkit.gu\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" +"PO-Revision-Date: 2010-02-23 13:54+0530\n" +"Last-Translator: Ankit Patel <ankit@redhat.com>\n" +"Language-Team: Gujarati <fedora-trans-gu@redhat.com>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"\n" + +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 +msgid "Upload File" +msgstr "ફાઈલ અપલોડ કરો" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 +msgid "Input _Methods" +msgstr "ઈનપુટ પદ્ધતિઓ (_M)" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 +msgid "LRM _Left-to-right mark" +msgstr "LRM _Left-to-right mark" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 +msgid "RLM _Right-to-left mark" +msgstr "RLM _Right-to-left mark" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 +msgid "LRE Left-to-right _embedding" +msgstr "LRE Left-to-right _embedding" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 +msgid "RLE Right-to-left e_mbedding" +msgstr "RLE Right-to-left e_mbedding" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 +msgid "LRO Left-to-right _override" +msgstr "LRO Left-to-right _override" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 +msgid "RLO Right-to-left o_verride" +msgstr "RLO Right-to-left o_verride" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 +msgid "PDF _Pop directional formatting" +msgstr "PDF _Pop directional formatting" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 +msgid "ZWS _Zero width space" +msgstr "ZWS _Zero width space" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 +msgid "ZWJ Zero width _joiner" +msgstr "ZWJ Zero width _joiner" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 +msgid "ZWNJ Zero width _non-joiner" +msgstr "ZWNJ Zero width _non-joiner" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 +msgid "_Insert Unicode Control Character" +msgstr "યુનિકોડ નિયંત્રક અક્ષર દાખલ કરો (_I)" + +#: WebKit/gtk/webkit/webkitdownload.cpp:266 +msgid "Network Request" +msgstr "નેટવર્ક અરજી" + +#: WebKit/gtk/webkit/webkitdownload.cpp:267 +msgid "The network request for the URI that should be downloaded" +msgstr "જે URI ડાઉનલોડ થવી જોઈએ તે માટેની નેટવર્ક અરજી" + +#: WebKit/gtk/webkit/webkitdownload.cpp:281 +msgid "Network Response" +msgstr "નેટવર્ક પ્રત્યુત્તર" + +#: WebKit/gtk/webkit/webkitdownload.cpp:282 +msgid "The network response for the URI that should be downloaded" +msgstr "જે URI ડાઉનલોડ થવી જોઈએ તે માટેનો નેટવર્ક પ્રત્યુત્તર" + +#: WebKit/gtk/webkit/webkitdownload.cpp:296 +msgid "Destination URI" +msgstr "અંતિમ મુકામ URI" + +#: WebKit/gtk/webkit/webkitdownload.cpp:297 +msgid "The destination URI where to save the file" +msgstr "અંતિમ મુકામ URI કે જ્યાં ફાઈલ સંગ્રહવી જોઈએ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:311 +msgid "Suggested Filename" +msgstr "સૂચનીય ફાઈલનામ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:312 +msgid "The filename suggested as default when saving" +msgstr "સંગ્રહતી વખતે મૂળભૂત રીતે સૂચવાયેલ ફાઈલનામ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:329 +msgid "Progress" +msgstr "પ્રગતિ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:330 +msgid "Determines the current progress of the download" +msgstr "ડાઉનલોડની વર્તમાન પ્રગતિ નક્કી કરે છે" + +#: WebKit/gtk/webkit/webkitdownload.cpp:343 +msgid "Status" +msgstr "પરિસ્થિતિ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:344 +msgid "Determines the current status of the download" +msgstr "ડાઉનલોડની વર્તમાન પરિસ્થિતિ નક્કી કરે છે" + +#: WebKit/gtk/webkit/webkitdownload.cpp:359 +msgid "Current Size" +msgstr "વર્તમાન માપ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:360 +msgid "The length of the data already downloaded" +msgstr "ડાઉનલોડ થયેલ માહિતીની લંબાઈ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:374 +msgid "Total Size" +msgstr "કુલ માપ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:375 +msgid "The total size of the file" +msgstr "ફાઈલનું કુલ માપ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:526 +msgid "User cancelled the download" +msgstr "વપરાશકર્તાએ ડાઉનલોડ રદ કર્યું" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 +#, c-format +msgid "A username and password are being requested by the site %s" +msgstr "સાઈટ %s દ્વારા વપરાશકર્તાનામ અને પાસવર્ડની અરજી કરવામાં આવી છે" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 +msgid "Username:" +msgstr "વપરાશકર્તાનામ:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 +msgid "Password:" +msgstr "પાસવર્ડ:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 +msgid "_Remember password" +msgstr "પાસવર્ડ યાદ રાખો (_R)" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 +msgid "Name" +msgstr "નામ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 +msgid "The name of the frame" +msgstr "ચોકઠાંનું નામ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 +msgid "Title" +msgstr "શીર્ષક" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 +msgid "The document title of the frame" +msgstr "ચોકઠાંનું દસ્તાવેજ શીર્ષક" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 +msgid "URI" +msgstr "URI" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 +msgid "The current URI of the contents displayed by the frame" +msgstr "ચોકઠાં દ્વારા દર્શાવવામાં આવેલ સમાવિષ્ટોની વર્તમાન URI" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "આડી સરકપટ્ટી પોલીસિ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "ચોકઠાંની આડી સરકપટ્ટી માટે વર્તમાન પોલીસિ નક્કી કરે છે." + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "ઊભી સરકપટ્ટી પોલીસિ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "ચોકઠાંની ઊભી સરકપટ્ટી માટે વર્તમાન પોલીસિ નક્કી કરે છે." + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 +msgid "The title of the history item" +msgstr "ઈતિહાસ વસ્તુનું શીર્ષક" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 +msgid "Alternate Title" +msgstr "વૈકલ્પિક શીર્ષક" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 +msgid "The alternate title of the history item" +msgstr "ઈતિહાસ વસ્તુનું વૈકલ્પિક શીર્ષક" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 +msgid "The URI of the history item" +msgstr "ઈતિહાસ વસ્તુની URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 +msgid "Original URI" +msgstr "મૂળ URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 +msgid "The original URI of the history item" +msgstr "ઈતિહાસ વસ્તુનું મૂળ URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 +msgid "Last visited Time" +msgstr "છેલ્લો મુલાકાત લેવાયેલ સમય" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 +msgid "The time at which the history item was last visited" +msgstr "સમય કે જ્યારે ઈતિહાસ વસ્તુની છેલ્લે મુલાકાત લેવામાં આવી હતી" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 +msgid "Web View" +msgstr "વેબ દેખાવ" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 +msgid "The Web View that renders the Web Inspector itself" +msgstr "વેબ દેખાવ કે જે વેબ પરીક્ષકને પોતાને ઢાળ આપે છે" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 +msgid "Inspected URI" +msgstr "પરીક્ષિત URI" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 +msgid "The URI that is currently being inspected" +msgstr "URI કે જેની વર્તમાનમાં પરીક્ષા કરવામાં આવી છે" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 +msgid "Enable JavaScript profiling" +msgstr "JavaScript રૂપરેખાકરણ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 +msgid "Profile the executed JavaScript." +msgstr "ચલાવવામાં આવેલ JavaScript ની રૂપરેખા કરો." + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +msgid "Enable Timeline profiling" +msgstr "સમયરેખા રૂપરેખા સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "વેબકોર ઈન્સ્ટ્રુમેન્ટેશનની રૂપરેખા કરો." + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 +msgid "Reason" +msgstr "કારણ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 +msgid "The reason why this navigation is occurring" +msgstr "કારણ કે આ શોધખોળ થઈ રહી છે" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 +msgid "The URI that was requested as the target for the navigation" +msgstr "URI કે જેની શોધખોળના લક્ષ્ય તરીકે અરજી કરવામાં આવી હતી" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 +msgid "Button" +msgstr "બટન" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 +msgid "The button used to click" +msgstr "ક્લિક કરવા માટેનું બટન" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 +msgid "Modifier state" +msgstr "સુધારક સ્થિતિ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 +msgid "A bitmask representing the state of the modifier keys" +msgstr "સુધારક કીની સ્થિતિ રજૂ કરતું બીટમાસ્ક" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +msgid "Target frame" +msgstr "લક્ષ્ય ચોકઠું" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +msgid "The target frame for the navigation" +msgstr "શોધખોળ માટે લક્ષ્ય ચોકઠું" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 +msgid "Default Encoding" +msgstr "મૂળભૂત એનકોડીંગ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 +msgid "The default encoding used to display text." +msgstr "લખાણ દર્શાવવા માટેનું મૂળભૂત એનકોડીંગ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 +msgid "Cursive Font Family" +msgstr "કર્સીવ ફોન્ટ પરિવાર" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 +msgid "The default Cursive font family used to display text." +msgstr "લખાણ દર્શાવવા માટે વપરાતું મૂળભૂત કર્સીવ ફોન્ટ પરિવાર." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 +msgid "Default Font Family" +msgstr "મૂળભૂત ફોન્ટ પરિવાર" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 +msgid "The default font family used to display text." +msgstr "લખાણ દર્શાવવા માટે વપરાતો મૂળભૂત ફોન્ટ પરિવાર." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 +msgid "Fantasy Font Family" +msgstr "ફેન્ટસી ફોન્ટ પરિવાર" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 +msgid "The default Fantasy font family used to display text." +msgstr "લખાણ દર્શાવવા માટે વપરાતો મૂળભૂત ફોન્ટસી ફોન્ટ પરિવાર." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 +msgid "Monospace Font Family" +msgstr "મોનોસ્પેસ ફોન્ટ પરિવાર" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 +msgid "The default font family used to display monospace text." +msgstr "મોનોસ્પેસ લખાણ દર્શાવવા માટે વપરાતો મૂળભૂત ફોન્ટ પરિવાર." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 +msgid "Sans Serif Font Family" +msgstr "સાન્સ સેરીફ ફોન્ટ પરિવાર" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 +msgid "The default Sans Serif font family used to display text." +msgstr "લખાણ દર્શાવવા માટે વપરાતો મૂળભૂત સાન્સ સેરીફ ફોન્ટ પરિવાર." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 +msgid "Serif Font Family" +msgstr "સેરીફ ફોન્ટ પરિવાર" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 +msgid "The default Serif font family used to display text." +msgstr "લખાણ દર્શાવવા માટે વપરાતો મૂળભૂત સેરીફ ફોન્ટ પરિવાર." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 +msgid "Default Font Size" +msgstr "મૂળભૂત ફોન્ટ માપ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +msgid "The default font size used to display text." +msgstr "લખાણ દર્શાવવા માટે વપરાતું મૂળભૂત માપ." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 +msgid "Default Monospace Font Size" +msgstr "મૂળભૂત મોનોસ્પેસ ફોન્ટ માપ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 +msgid "The default font size used to display monospace text." +msgstr "મોનોસ્પેસ લખાણ દર્શાવવા માટે વપરાતું મૂળભૂત ફોન્ટ માપ." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +msgid "Minimum Font Size" +msgstr "ન્યૂનતમ ફોન્ટ માપ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 +msgid "The minimum font size used to display text." +msgstr "લખાણ દર્શાવવા માટે વપરાતું મૂળભૂત ફોન્ટ માપ." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 +msgid "Minimum Logical Font Size" +msgstr "ન્યૂનતમ તાર્કિક ફોન્ટ માપ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 +msgid "The minimum logical font size used to display text." +msgstr "લખાણ દર્શાવવા માટેનું ન્યૂનતમ તાર્કીક ફોન્ટ માપ." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 +msgid "Enforce 96 DPI" +msgstr "96 DPI નું દબાણ કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 +msgid "Enforce a resolution of 96 DPI" +msgstr "96 DPI ના રીઝોલ્યુશનનું દબાણ કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 +msgid "Auto Load Images" +msgstr "ચિત્રો આપોઆપ લાવો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +msgid "Load images automatically." +msgstr "ચિત્રો આપોઆપ લાવો." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 +msgid "Auto Shrink Images" +msgstr "ચિત્રો આપોઆપ સંકોચો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 +msgid "Automatically shrink standalone images to fit." +msgstr "બંધબેસાડવા માટે ચિત્રો આપોઆપ સંકોચો." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 +msgid "Print Backgrounds" +msgstr "પાશ્વભાગો છાપો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 +msgid "Whether background images should be printed." +msgstr "શું પાશ્વભાગ ચિત્રો છપાવા જોઈએ." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 +msgid "Enable Scripts" +msgstr "સ્ક્રિપ્ટો સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 +msgid "Enable embedded scripting languages." +msgstr "જડિત સ્ક્રિપ્ટીંગ ભાષાઓ સક્રિય કરો." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 +msgid "Enable Plugins" +msgstr "પ્લગઈનો સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 +msgid "Enable embedded plugin objects." +msgstr "જડિત પ્લગઈન ઓબ્જેક્ટો સક્રિય કરો." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 +msgid "Resizable Text Areas" +msgstr "માપ બદલી શકાય તેવા લખાણ વિસ્તારો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 +msgid "Whether text areas are resizable." +msgstr "શું લખાણ વિસ્તારોનું માપ બદલાવી શકાય." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 +msgid "User Stylesheet URI" +msgstr "વપરાશકર્તા સ્ટાઈલશીટ URI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 +msgid "The URI of a stylesheet that is applied to every page." +msgstr "સ્ટાઈલશીટની URI કે જે દરેક પાનાંને લાગુ પાડવામાં આવેલ છે." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 +msgid "Zoom Stepping Value" +msgstr "નાનામોટાપણાની પગલાંકીય કિંમત" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 +msgid "The value by which the zoom level is changed when zooming in or out." +msgstr "જ્યારે નાનું કે મોટું કરી રહ્યા હોય ત્યારે કિંમત કે જેના પ્રમાણે નાનું કે મોટું થવું જોઈએ." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 +msgid "Enable Developer Extras" +msgstr "વિકાસકર્તા ઉમેરાઓ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 +msgid "Enables special extensions that help developers" +msgstr "વિશિષ્ટ વિસ્તરણો સક્રિય કરો કે જે વિકાસકર્તાઓને મદદરૂપ થાય" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 +msgid "Enable Private Browsing" +msgstr "ખાનગી બ્રાઉઝીંગ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 +msgid "Enables private browsing mode" +msgstr "ખાનગી બ્રાઉઝીંગ સ્થિતિ સક્રિય કરે છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 +msgid "Enable Spell Checking" +msgstr "જોડણી ચકાસણી સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 +msgid "Enables spell checking while typing" +msgstr "લખતી વખતે જોડણી ચકાસણી સક્રિય કરે છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 +msgid "Languages to use for spell checking" +msgstr "જોડણી ચકાસણી માટે વાપરવાની ભાષાઓ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 +msgid "Comma separated list of languages to use for spell checking" +msgstr "જોડણી ચકાસણી માટે વાપરવાની ભાષાઓની અલ્પવિરામથી અલગ પડેલ યાદી" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 +msgid "Enable Caret Browsing" +msgstr "કેરેટ બ્રાઉઝીંગ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "શું સુલભતા ઉન્નત કીબોર્ડ શોધખોળ સક્રિય કરવી છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 +msgid "Enable HTML5 Database" +msgstr "HTML5 ડેટાબેઝ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 +msgid "Whether to enable HTML5 database support" +msgstr "શું HTML5 ડેટાબેઝ આધાર સક્રિય કરવો છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 +msgid "Enable HTML5 Local Storage" +msgstr "HTML5 સ્થાનિય સંગ્રહ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "શું HTML5 સ્થાનિય સંગ્રહ આધાર સક્રિય કરવો છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 +msgid "Enable XSS Auditor" +msgstr "XSS સંપાદક સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 +msgid "Whether to enable teh XSS auditor" +msgstr "શું XSS સંપાદક સક્રિય કરવું છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 +msgid "User Agent" +msgstr "વપરાશકર્તા એજન્ટ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 +msgid "The User-Agent string used by WebKitGtk" +msgstr "WebKitGtk દ્વારા વાપરવામાં આવતી વપરાશકર્તા-એજન્ટ શબ્દમાળા" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 +msgid "JavaScript can open windows automatically" +msgstr "JavaScript વિન્ડો આપોઆપ ખોલી શકે છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 +msgid "Whether JavaScript can open windows automatically" +msgstr "શું JavaScript વિન્ડો આપોઆપ ખોલી શકે છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 +msgid "Enable offline web application cache" +msgstr "ઓફલાઈન વેબ કાર્યક્રમ કેશ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 +msgid "Whether to enable offline web application cache" +msgstr "શું ઓફલાઈન વેબ કાર્યક્રમ કેશ સક્રિય કરવી છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 +msgid "Editing behavior" +msgstr "સંપાદન વર્તણૂક" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 +msgid "The behavior mode to use in editing mode" +msgstr "સંપાદન સ્થિતિમાં વાપરવાની વર્તણૂક સ્થિતિ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 +msgid "Enable universal access from file URIs" +msgstr "ફાઈલ URIs માંથી સાર્વત્રિક વપરાશ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 +msgid "Whether to allow universal access from file URIs" +msgstr "શું ફાઈલ URIs માંથી સાર્વત્રિક વપરાશને પરવાનગી આપવી છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 +msgid "Enable DOM paste" +msgstr "DOM ચોંટાડવાનું સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 +msgid "Whether to enable DOM paste" +msgstr "શું DOM ચોંટાડવાનું સક્રિય કરવું છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 +msgid "Tab key cycles through elements" +msgstr "ટેબ કી ઘટકોમાં ફરે છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 +msgid "Whether the tab key cycles through elements on the page." +msgstr "શું ટેબ કી પાનાં પરના ઘટકોમાં ફરે છે." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 +msgid "Enable Default Context Menu" +msgstr "મૂળભૂત સંદર્ભ મેનુ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "મૂળભૂત સંદર્ભ મેનુની બનાવટ માટે જમણું-ક્લિકનું નિયંત્રણ સક્રિય કરે છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 +msgid "Enable Site Specific Quirks" +msgstr "સાઈટ લગતી તરકીબો સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 +msgid "Enables the site-specific compatibility workarounds" +msgstr "સાઈટ-લગતા સુગતમા ઉકેલો સક્રિય કરે છે" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 +msgid "Enable page cache" +msgstr "પાનાં કેશ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 +msgid "Whether the page cache should be used" +msgstr "શું પાનાં કેશ વપરાવું જોઈએ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 +msgid "Auto Resize Window" +msgstr "વિન્ડોનું માપ આપોઆપ બદલો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "જ્યારે પાનું તેની અરજી કરે ત્યારે ટોચસ્તરની વિન્ડોનું માપ આપોઆપ બદલો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "JavaScript રૂપરેખાકરણ સક્રિય કરો" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 +msgid "Returns the @web_view's document title" +msgstr "@web_view's દસ્તાવેજ શીર્ષક આપે છે" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 +msgid "Returns the current URI of the contents displayed by the @web_view" +msgstr "@web_view પ્રમાણે દર્શાવવામાં આવેલ સમાવિષ્ટોની વર્તમાન URI આપે છે" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 +msgid "Copy target list" +msgstr "લક્ષ્ય યાદીની નકલ કરો" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 +msgid "The list of targets this web view supports for clipboard copying" +msgstr "ક્લિપબોર્ડ નકલ માટે આ વેબ દેખાવ જે લક્ષ્યોને આધાર આપે છે તેની યાદી" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 +msgid "Paste target list" +msgstr "લક્ષ્ય યાદી ચોંટાડો" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 +msgid "The list of targets this web view supports for clipboard pasting" +msgstr "ક્લિપબોર્ડ ચોંટાડવા માટે વેબ દેખાવ આધારના લક્ષ્યની યાદી" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 +msgid "Settings" +msgstr "સુયોજનો" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 +msgid "An associated WebKitWebSettings instance" +msgstr "સંકળાયેલ WebKitWebSettings વસ્તુ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 +msgid "Web Inspector" +msgstr "વેબ પરીક્ષક" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 +msgid "The associated WebKitWebInspector instance" +msgstr "સંકળાયેલ WebKitWebInspector વસ્તુ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 +msgid "Editable" +msgstr "સંપાદકીય" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 +msgid "Whether content can be modified by the user" +msgstr "શું વપરાશકર્તા દ્વારા સમાવિષ્ટો બદલી શકાશે" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 +msgid "Transparent" +msgstr "પારદર્શક" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 +msgid "Whether content has a transparent background" +msgstr "શું સમાવિષ્ટને પારદર્શક પાશ્વભાગ છે" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 +msgid "Zoom level" +msgstr "નાનામોટાપણાનું સ્તર" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 +msgid "The level of zoom of the content" +msgstr "સમાવિષ્ટનું નાનામોટાપણાનું સ્તર" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 +msgid "Full content zoom" +msgstr "સંપૂર્ણ સમાવિષ્ટ નાનામોટાપણું" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 +msgid "Whether the full content is scaled when zooming" +msgstr "શું નાનુંમોટું કરતી વખતે સંપૂર્ણ સમાવિષ્ટ ખેંચાય છે" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 +msgid "Encoding" +msgstr "સંગ્રહપદ્ધતિ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 +msgid "The default encoding of the web view" +msgstr "વેબ દેખાવનું મૂળભૂત એનકોડીંગ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 +msgid "Custom Encoding" +msgstr "વૈવિધ્યપૂર્ણ એનકોડીંગ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 +msgid "The custom encoding of the web view" +msgstr "વેબ દેખાવનું વૈવિધ્યપૂર્ણ એનકોડીંગ" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 +msgid "Icon URI" +msgstr "ચિહ્ન URI" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "#WebKitWebView માટે favicon માટે URI." + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 +msgid "Submit" +msgstr "જમા કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 +msgid "Reset" +msgstr "પુનઃસુયોજીત કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 +msgid "This is a searchable index. Enter search keywords: " +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 +msgid "Choose File" +msgstr "ફાઈલ પસંદ કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 +msgid "(None)" +msgstr "(કંઈ નહિં)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 +msgid "Open Link in New _Window" +msgstr "નવી વિન્ડોમાં કડી ખોલો (_W)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 +msgid "_Download Linked File" +msgstr "કડી થયેલ ફાઈલ ડાઉનલોડ કરો (_D)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 +msgid "Copy Link Loc_ation" +msgstr "કડી સ્થાનની નકલ કરો (_a)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 +msgid "Open _Image in New Window" +msgstr "નવી વિન્ડોમાં ચિત્ર ખોલો (_I)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 +msgid "Sa_ve Image As" +msgstr "ચિત્ર આ પ્રમાણે સંગ્રહો (_v)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 +msgid "Cop_y Image" +msgstr "ચિત્રની નકલ કરો (_y)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 +msgid "Open _Frame in New Window" +msgstr "ચોકઠાંને નવી વિન્ડોમાં ખોલો (_F)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 +msgid "_Reload" +msgstr "પુનઃલાવો (_R)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 +msgid "No Guesses Found" +msgstr "કોઈ ધારણાઓ મળી નહિં" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 +msgid "_Ignore Spelling" +msgstr "જોડણી અવગણો (_I)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 +msgid "_Learn Spelling" +msgstr "જોડણી શીખો (_L)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 +msgid "_Search the Web" +msgstr "વેબ શોધો (_S)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 +msgid "_Look Up in Dictionary" +msgstr "શબ્દકોષમાં જુઓ (_L)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 +msgid "_Open Link" +msgstr "કડી ખોલો (_O)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 +msgid "Ignore _Grammar" +msgstr "વ્યાકરણ અવગણો (_G)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 +msgid "Spelling and _Grammar" +msgstr "જોડણી અને વ્યાકરણ (_G)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Show Spelling and Grammar" +msgstr "જોડણી અને વ્યાકરણ બતાવો (_S)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Hide Spelling and Grammar" +msgstr "જોડણી અને વ્યાકરણ છુપાવો (_H)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 +msgid "_Check Document Now" +msgstr "દસ્તાવેજ હમણાં ચકાસો (_C)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 +msgid "Check Spelling While _Typing" +msgstr "લખતી વખતે જોડણી ચકાસો (_T)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 +msgid "Check _Grammar With Spelling" +msgstr "જોડણી સાથે વ્યાકરણ ચકાસો (_G)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 +msgid "_Font" +msgstr "ફોન્ટ (_F)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 +msgid "_Outline" +msgstr "બાહ્ય રેખા (_O)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 +msgid "Inspect _Element" +msgstr "ઘટકનું પરીક્ષણ કરો (_E)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 +msgid "No recent searches" +msgstr "કોઈ છેલ્લી શોધો નથી" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 +msgid "Recent searches" +msgstr "છેલ્લી શોધો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 +msgid "_Clear recent searches" +msgstr "છેલ્લી શોધો સાફ કરો (_C)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 +msgid "term" +msgstr "પદ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 +msgid "definition" +msgstr "વ્યાખ્યા" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 +msgid "press" +msgstr "દબાવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 +msgid "select" +msgstr "પસંદ કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 +msgid "activate" +msgstr "સક્રિયકૃત કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 +msgid "uncheck" +msgstr "ચકાસણી દૂર કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 +msgid "check" +msgstr "ચકાસો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 +msgid "jump" +msgstr "કૂદો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 +msgid " files" +msgstr " ફાઈલો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 +msgid "Unknown" +msgstr "અજ્ઞાત" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "લાવી રહ્યા છીએ..." + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "જીવંત પ્રસારણ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "અવાજ ઘટક નિયંત્રક" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "વીડિયો ઘટક નિયંત્રક" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "મૂંગુ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "મૂંગુ દૂર કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "વગાડો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "અટકાવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "ચિત્રપટ સમય" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "સમયરેખા સરકપટ્ટી થમ્બ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "૩૦ સેકન્ડો પાછળ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "વાસ્તવિક સમયે જાવ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "પસાર થયેલ સમય" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "બાકી રહેલ સમય" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +msgid "status" +msgstr "પરિસ્થિતિ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "સંપૂર્ણ સ્ક્રીન" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "ઝડપી આગળ ધપાવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "ઝડપી પાછા આવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "બંધ થયેલ કેપ્શનો બતાવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "બંધ થયેલ કેપ્શનો છુપાવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "અવાજ ઘટક વગાડવાના નિયંત્રણો અને પરિસ્થિતિ દર્શાવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "વીડિયો ઘટક વગાડવાના નિયંત્રણો અને પરિસ્થિતિ દર્શાવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "ઓડિયો ટ્રેક મૂંગા કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "ઓડિયો ટ્રેકનું મૂંગાપણું દૂર કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "વગાડવાનું શરૂ કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "વગાડવાનું અટકાવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "ચિત્રપટ સમય સ્ક્રબર" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "ચિત્રપટ સમય સ્ક્રબર થમ્બ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "ચિત્રપટ સમય ૩૦ સેકન્ડો પાછળ લઈ જાવ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "સ્ટ્રીમીંગ ચિત્રપટને વાસ્તવિક સમયે લાવે" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "વર્તમાન ચિત્રપટ સમય સેકન્ડોમાં" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "બાકી રહેલ ચિત્રપટનો સમય સેકન્ડોમાં" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "વર્તમાન ચિત્રપટ પરિસ્થિતિ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "ઝડપથી પાછા પહોંચો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "ઝડપથી આગળ પહોંચો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "ચિત્રપટને સંપૂર્ણસ્ક્રીન પરિસ્થિતિમાં વગાડો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "બંધ કેપ્શનો દર્શાવવાનું શરૂ કરો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "બંધ કેપ્શનો દર્શાવવાનું અટકાવો" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +msgid "indefinite time" +msgstr "અવ્યાખ્યાયિત સમય" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "કિંમત ગુમ થયેલ છે" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "પ્રકાર બંધબેસતો નથી" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "ભાત બંધબેસતી નથી" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "ખૂબ લાંબુ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "range underflow" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "range overflow" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "પગલું બંધબેસતું નથી" + +#~ msgid "_Searchable Index" +#~ msgstr "શોધી શકાય તેવો અનુક્રમ (_S)" diff --git a/WebKit/gtk/po/he.po b/WebKit/gtk/po/he.po index 90b5d88..5359feb 100644 --- a/WebKit/gtk/po/he.po +++ b/WebKit/gtk/po/he.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit HEAD\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: 2010-02-16 18:03+0200\n" "Last-Translator: Gil Osher <gilosher@gmail.com>\n" "Language-Team: Hebrew <he@li.org>\n" @@ -70,90 +70,94 @@ msgstr "ZWNJ מ_בטל חיבור ברוחב אפס" msgid "_Insert Unicode Control Character" msgstr "ה_כנס תו בקרה של יוניקוד" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "בקשת רשת" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "בקשת הרשת עבור הכתובת שיש להוריד" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 #, fuzzy msgid "Network Response" msgstr "בקשת רשת" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 #, fuzzy msgid "The network response for the URI that should be downloaded" msgstr "בקשת הרשת עבור הכתובת שיש להוריד" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "כתובת יעד" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "כתובת היעד אליה שומרים את הקובץ" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "שם קובץ מומלץ" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "שם הקובץ המומלץ כברירת מחדל כאשר שומרים" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "התקדמות" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "מציין את ההתקדמות הנוכחית של ההורדה" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "מצב" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "מציין את המצב הנוכחי של ההורדה" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "גודל נוכחי" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "אורך המידע שכבר הורד" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "גודל כללי" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "הגודל הכללי של הקובץ" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "משתמש ביטל את ההורדה" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "שם משתמש וסיסמה נדרשים על-ידי האתר %s" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "שם משתמש:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "סיסמה:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 #, fuzzy msgid "_Remember password" msgstr "זכור את הסיסמה" @@ -168,7 +172,7 @@ msgstr "שם המסגרת" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "כותרת" @@ -178,7 +182,7 @@ msgstr "כותרת המסמך של המסגרת" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "כתובת" @@ -309,418 +313,427 @@ msgstr "שם המסגרת" msgid "The target frame for the navigation" msgstr "הכתובת שנדרשה כמטרת הניווט" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "קידוד ברירת מחדל" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "קידוד ברירת המחדל להצגת טקסט." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "משפחת הגופנים מסוג Cursive" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "משפחת הגופנים מסוג Cursive ברירת מחדל המשמשים להצגת טקסט." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "משפחת גופנים ברירת מחדל" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "משפחת הגופנים לשימוש בהצגת טקסט כברירת מחדל." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "משפחת הגופנים מסוג Fantasy" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "משפחת הגופנים מסוג Fantasy ברירת מחדל המשמשים להצגת טקסט." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "משפחת הגופנים מסוג Monospace" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "משפחת הגופנים מסוג Monospace ברירת מחדל המשמשים להצגת טקסט." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "משפחת הגופנים מסוג Sans Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "משפחת הגופנים מסוג Sans Serif ברירת מחדל המשמשים להצגת טקסט." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "משפחת הגופנים מסוג Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "משפחת הגופנים מסוג Serif ברירת מחדל המשמשים להצגת טקסט." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "גודל גופן ברירת מחדל" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "גודל הגופן לשימוש בהצגת טקסט כברירת מחדל." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "גודל גופן Monospace ברירת מחדל" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "גודל גופן ברירת מחדל לשימוש בהצגת טקסט בגופן Monospace." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "גודל גופן מינימאלי" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "גודל הגופן המינימאלי לשימוש בהצגת טקסט." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "גודל גופן לוגי מינימאלי" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "גודל הגופן הלוגי המינימאלי לשימוש בהצגת טקסט." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "הכרח 96 נקודות לאינץ'" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "הכרח רזולוציה של 96 נקודות לאינץ'" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "טען תמונות אוטומטית" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "טוען תמונות אוטומטית." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "כווץ תמונות אוטומטית" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "אוטומטית מכווץ תמונות בודדות על-מנת שיתאימו." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "הדפס רקעים" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "האם תמונות הרקע צריכות להיות מודפסות." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "אפשר תסריטים" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "אפשר שפות תסריטים מוטבעות" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "אפשר תוספים" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "אפשר אובייקטי תוסף מוטבעים." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "אזורי טקסט שניתן לשנות את גודלם" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "האם לאפשר את שינוי הגודל של אזורי הטקסט." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "כתבות גיליון הסגנון של המשתמש" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "כתובת גיליון הסגנון שמוחל על כל עמוד." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "ערך צעדי הקירוב" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "הערך בו רמת הקירוב משתנה כאשר מתקרבים או מתרחקים." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "אפשר תוספות למפתחים" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "מאפשר תוספות מיוחדות שיעזרו למפתחים" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "אפשר גלישה פרטית" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "מאפשר את מצב הגלישה הפרטית" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 #, fuzzy msgid "Enables spell checking while typing" msgstr "בדוק איות בזמן ה_קלדב" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 #, fuzzy msgid "Enable Caret Browsing" msgstr "אפשר גלישה פרטית" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 #, fuzzy msgid "Enable XSS Auditor" msgstr "אפשר תסריטים" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 #, fuzzy msgid "Enable DOM paste" msgstr "אפשר תסריטים" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 #, fuzzy msgid "Whether the page cache should be used" msgstr "האם תמונות הרקע צריכות להיות מודפסות." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "אפשר אפיון JavaScript" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "מחזיר את כותרת המסמך של @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "מחזיר את הכתובת הנוכחית של התוכן המוצג על-ידי @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "העתק רשימת יעדים" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "רשימת היעדים בהם תצוגת ה-Web תומכת להעתקה ללוח" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "הדבק רשימת יעדים" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "רשימת היעדים בהם תצוגת ה-Web תומכת להדבקה מהלוח" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "הגדרות" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "מופע WebKitWebSettings משויך" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "בוחן Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "מופע ה-WebKitWebInspector המשויך" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "ניתן לעריכה" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "האם התוכן יכול להשתנות על-ידי המשתמש" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "שקוף" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "האם לתוכן יש רקע שקוף" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "רמת קירוב" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "רמת הקירוב של התוכן" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "קירוב תוכן מלא" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "האם התוכן המלא מתרחב כאשר מתקרבים" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "קידוד" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "הקידוד ברירת המחדל של תצוגת ה-Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "קידוד מותאם אישית" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "הקידוד המותאם אישית של תצוגת ה-Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -734,8 +747,8 @@ msgid "Reset" msgstr "נקה" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "אינקדס ניתן ל_חיפוש" +msgid "This is a searchable index. Enter search keywords: " +msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -1078,3 +1091,6 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" msgstr "" + +#~ msgid "_Searchable Index" +#~ msgstr "אינקדס ניתן ל_חיפוש" diff --git a/WebKit/gtk/po/it.po b/WebKit/gtk/po/it.po index 3329537..6d6f0ac 100644 --- a/WebKit/gtk/po/it.po +++ b/WebKit/gtk/po/it.po @@ -1,19 +1,18 @@ # This is the Italian locale translation for WebKitGtk # Copyright (C) 2009 Free Software Foundation, Inc. -# -# Luca Ferretti <elle.uca@libero.it>, 2009. +# Luca Ferretti <lferrett@gnome.org>, 2009, 2010. msgid "" msgstr "" "Project-Id-Version: WebKitGtk\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" -"PO-Revision-Date: 2009-05-11 14:10+0200\n" -"Last-Translator: Luca Ferretti <elle.uca@libero.it>\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" +"PO-Revision-Date: 2010-03-18 22:13+0100\n" +"Last-Translator: Luca Ferretti <lferrett@gnome.org>\n" "Language-Team: Italian <tp@lists.linux.it>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" #: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" @@ -22,152 +21,153 @@ msgstr "Carica file" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" -msgstr "_Metodi di input" +msgstr "Met_odi di input" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 msgid "LRM _Left-to-right mark" -msgstr "LRM marcatura _sinistra-destra" +msgstr "LRM - Contrassegno _sinistra-destra" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 msgid "RLM _Right-to-left mark" -msgstr "RLM marcatura _destra-sinistra" +msgstr "RLM - Contrassegno _destra-sinistra" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 msgid "LRE Left-to-right _embedding" -msgstr "LRE _inserimento sinistra-destra" +msgstr "LRE - _Inserimento sinistra-destra" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 msgid "RLE Right-to-left e_mbedding" -msgstr "RLE i_nserimento destra-sinistra" +msgstr "RLE - I_nserimento destra-sinistra" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 msgid "LRO Left-to-right _override" -msgstr "LRO _forza sinistra-destra" +msgstr "LRO - _Forza sinistra-destra" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 msgid "RLO Right-to-left o_verride" -msgstr "RLO f_orza destra-sinistra" +msgstr "RLO - F_orza destra-sinistra" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 msgid "PDF _Pop directional formatting" -msgstr "PDF cancella formattazione direzionale" +msgstr "PDF - Ca_ttura formattazione direzionale" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 msgid "ZWS _Zero width space" -msgstr "ZWS spa_zio a larghezza nulla" +msgstr "ZWS - Spa_zio a larghezza nulla" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 msgid "ZWJ Zero width _joiner" -msgstr "ZWJ spazio di _unione a larghezza nulla" +msgstr "ZWJ - Spazio di _unione a larghezza nulla" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 msgid "ZWNJ Zero width _non-joiner" -msgstr "ZWNJ spazio _non di unione a larghezza nulla" +msgstr "ZWNJ - Spazio non di unione a _larghezza nulla" # merge da gtk #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" -msgstr "_Inserisci carattere di controllo unicode" +msgstr "Inserisci carattere di controllo _Unicode" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "Richiesta di rete" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "La richiesta di rete per l'URI che dovrebbe essere scaricato" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 -#, fuzzy +#: WebKit/gtk/webkit/webkitdownload.cpp:281 msgid "Network Response" -msgstr "Richiesta di rete" +msgstr "Risposta di rete" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 -#, fuzzy +#: WebKit/gtk/webkit/webkitdownload.cpp:282 msgid "The network response for the URI that should be downloaded" -msgstr "La richiesta di rete per l'URI che dovrebbe essere scaricato" +msgstr "La risposta di rete per l'URI che dovrebbe essere scaricato" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "URI di destinazione" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "L'URI di destinazione in cui salvare il file" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "Nome file suggerito" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "Il nome di file suggerito come predefinito quando si salva" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Avanzamento" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "Determina l'avanzamento corrente dello scaricamento" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Stato" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Determina lo stato corrente dello scaricamento" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Dimensione corrente" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "La lunghezza dei dati già scaricati" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Dimensione totale" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "La dimensione totale del file" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "L'utente ha annullato lo scaricamento" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "Il sito %s richiede un nome utente e una password" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "Messaggio del server:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "Nome utente:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "Password:" # checkbox -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 -#, fuzzy +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 msgid "_Remember password" -msgstr "Ricordare la password" +msgstr "_Ricordare la password" #: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" @@ -179,7 +179,7 @@ msgstr "Il nome della cornice" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Titolo" @@ -189,7 +189,7 @@ msgstr "Il titolo del documento nella cornice" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "URI" @@ -199,22 +199,24 @@ msgstr "L'URI corrente del contenuto mostrato dalla cornice" #: WebKit/gtk/webkit/webkitwebframe.cpp:344 msgid "Horizontal Scrollbar Policy" -msgstr "" +msgstr "Politica barra scorrimento orizzontale" #: WebKit/gtk/webkit/webkitwebframe.cpp:345 -#, fuzzy msgid "" "Determines the current policy for the horizontal scrollbar of the frame." -msgstr "Determina l'avanzamento corrente dello scaricamento" +msgstr "" +"Determina la politica attuale per la barra di scorrimento orizzontale della " +"cornice." #: WebKit/gtk/webkit/webkitwebframe.cpp:362 msgid "Vertical Scrollbar Policy" -msgstr "" +msgstr "Politica barra scorrimento verticale" #: WebKit/gtk/webkit/webkitwebframe.cpp:363 -#, fuzzy msgid "Determines the current policy for the vertical scrollbar of the frame." -msgstr "Determina l'avanzamento corrente dello scaricamento" +msgstr "" +"Determina la politica attuale per la barra di scorrimento verticale del " +"cornice." #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" @@ -270,7 +272,7 @@ msgstr "L'URI che attualmente è ispezionato" #: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" -msgstr "Abilitare profiling JavaScript" +msgstr "Abilita profiling JavaScript" # FIXME # oppure Esegue il profiling? @@ -279,13 +281,12 @@ msgid "Profile the executed JavaScript." msgstr "Traccia un profilo del codice JavaScript eseguito." #: WebKit/gtk/webkit/webkitwebinspector.cpp:315 -#, fuzzy msgid "Enable Timeline profiling" -msgstr "Abilitare profiling JavaScript" +msgstr "Abilita profiling Timeline" #: WebKit/gtk/webkit/webkitwebinspector.cpp:316 msgid "Profile the WebCore instrumentation." -msgstr "" +msgstr "Traccia un profilo della strumentazione WebCore." #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" @@ -316,20 +317,18 @@ msgid "A bitmask representing the state of the modifier keys" msgstr "Una maschera di bit che rappresenta lo stato dei tasti modificatori" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 -#, fuzzy msgid "Target frame" -msgstr "Il nome della cornice" +msgstr "Cornice destinazione" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 -#, fuzzy msgid "The target frame for the navigation" -msgstr "L'URI che è stata richiesta come destinazione della navigazione" +msgstr "La cornice di destinazione per la navigazione" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "Codifica predefinita" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "La codifica predefinita usata per mostrare il testo." @@ -338,90 +337,90 @@ msgstr "La codifica predefinita usata per mostrare il testo." # * nella "breve" si lascia la forma inglese (es. sans serif) nella lunga # si mette la forma italiana (es. senza grazie) # Ciò per mantenere corte le "brevi" e per permettere che entrambe le diciture siano presenti -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "Famiglia carattere corsivo" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "" "La famiglia del tipo di carattere \"corsivo\" predefinito usata per mostrare " "il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "Famiglia carattere predefinita" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "" "La famiglia del tipo di carattere predefinito usata per mostrare il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "Famiglia carattere fantasia" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "" "La famiglia del tipo di carattere \"fantasia\" predefinito usata per " "mostrare il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "Famiglia carattere monospace" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "" "La famiglia del tipo di carattere predefinito usata per mostrare il testo a " "spaziatura fissa." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "Famiglia carattere sans serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "" "La famiglia del tipo di carattere \"senza grazie\" predefinito usata per " "mostrare il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "Famiglia carattere serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "" "La famiglia del tipo di carattere \"con grazie\" predefinito usata per " "mostrare il testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "Dimensione predefinita carattere" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "" "La dimensione predefinita per il tipo di carattere usato per mostrare il " "testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "Dimensione predefinita carattere monospace" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "" "La dimensione predefinita per il tipo di carattere usato per mostrare il " "testo a larghezza fissa." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "Dimensione minima carattere" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "" "La dimensione minima per il tipo di carattere usato per mostrare il testo." @@ -438,351 +437,364 @@ msgstr "" # size alone. This will assure that your content will never display at sizes less than 12 points, # but the functional font size boundary of the web view will remain at 9 points to prevent any # chance of displaying unnecessarily small text. -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "Dimensione minima naturale carattere" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "" "La dimensione minima naturale per il tipo di carattere usato per mostrare il " "testo." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "Forza 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "Forza la risoluzione a 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "Caricamento automatico immagini" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "Carica le immagini in modo automatico." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "Restringimento automatico immagini" # assolutamente libertario -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "Restringe automaticamente le immagini singole alla dimensione adatta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "Stampa sfondi" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "Indica se le immagini di sfondo devono essere stampate." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "Abilita script" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "Abilita i linguaggi di scripting incorporati." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "Abilita plugin" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "Abilita gli oggetti plugin incorporati." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "Aree testo ridimensionabili" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "Indica se le aree di testo sono ridimensionabili." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "URI foglio stile utente" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "L'URI di un foglio di stile che è applicato a ogni pagina." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "Valore passo ingrandimento" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "" "Il valore di variazione del livello di ingrandimento quando si aumenta o " "riduce l'ingrandimento." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "Abilita extra per sviluppatori" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "Abilita estensioni speciali che sono d'aiuto per gli sviluppatori" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "Abilita navigazione privata" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "Abilita la modalità di navigazione privata" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" -msgstr "" +msgstr "Abilita controllo ortografico" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 msgid "Enables spell checking while typing" -msgstr "Controlla ortografia durante _digitazione" +msgstr "Abilita il controllo ortografico durante la digitazione" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" -msgstr "" +msgstr "Lingue da usare per controllo ortografico" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" +"Elenco separato da virgole delle lingue da usare per il controllo ortografico" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 msgid "Enable Caret Browsing" -msgstr "Abilita navigazione privata" +msgstr "Abilita navigazione con cursore" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" +"Indica se abilitare la navigazione da tastiera ottimizzata per " +"l'accessibilità" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" -msgstr "" +msgstr "Abilita Database HTML5" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" -msgstr "" +msgstr "Indica se abilitare il supporto ai database di HTML5" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" -msgstr "" +msgstr "Abilita Local Storage HTML5" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" -msgstr "" +msgstr "Indica se abilitare il supporto a local storage di HTML5" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 msgid "Enable XSS Auditor" -msgstr "Abilita script" +msgstr "Abilita auditor XSS" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" -msgstr "" +msgstr "Indica se abilitare l'auditor XSS" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" -msgstr "" +msgstr "User Agent" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" -msgstr "" +msgstr "La stringa User-Agent usata da WebKitGtk" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" -msgstr "" +msgstr "JavaScript può aprire automatamente le fineste" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" -msgstr "" +msgstr "Indica se JavaScript può aprire automatamente le fineste" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" -msgstr "" +msgstr "Abilita cache per applicazioni web fuori rete" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" -msgstr "" +msgstr "Indica se abilitare la cache per le applicazioni web fuori rete" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" -msgstr "" +msgstr "Comportamento editing" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" -msgstr "" +msgstr "La modalità di comportamento da usare in modalità editing" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" -msgstr "" +msgstr "Abilita accesso univesale dagli URI di file" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" -msgstr "" +msgstr "Indica se abilitare l'accesso univesale dagli URI di file" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 msgid "Enable DOM paste" -msgstr "Abilita script" +msgstr "Abilita DOM pasting" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" -msgstr "" +msgstr "Indica se abilitare il DOM pasting" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" -msgstr "" +msgstr "Tasto TAB per passare tra gli elementi" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" +"Indica se il tasto TAB permette di passare ciclicamente tra gli elementi " +"della pagina." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" -msgstr "" +msgstr "Abilita menù contestuale predefinito" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" +"Abilita la gestione dei clic destri per la creazione del menù contestuale " +"predefinito" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" -msgstr "" +msgstr "Abilita scappatoie specifiche per siti" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" +"Abilita delle correzioni di compatibilità specifiche per determinati siti" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" -msgstr "" +msgstr "Abilita la cache di pagina" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 msgid "Whether the page cache should be used" -msgstr "Indica se le immagini di sfondo devono essere stampate." +msgstr "Indica se usare la cache delle pagine" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" -msgstr "" +msgstr "Ridimensionamento automatico finestra" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" +"Ridimensiona automaticamente la finestra di livello principale quando " +"richiesto da una pagina" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +msgid "Enable Java Applet" +msgstr "Abilita applet Java" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "Indica se abilitare il supporto alle applet Java attraverso <applet>" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "Restituisce il titolo del documento di @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Restituisce l'URI attuale del contenuto mostrato dalla @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "Copia elenco destinazioni" # ma ha senso?? -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "" "L'elenco di destinazioni che questa vista web supporta per copiare negli " "appunti" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "Incolla elenco destinazioni" # ma ha senso?? -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" "L'elenco di destinazioni che questa vista web supporta per incollare dagli " "appunti" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "Impostazioni" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "Un'istanza WebKitWebSettings associata" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "Ispettore web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "L'istanza WebKitWebInspector associata" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "Modificabile" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "Indica se il contenuto può essere modificato dall'utente" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "Trasparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "Indica se il contenuto ha uno sfondo trasparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "Livello ingrandimento" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "Il livello di ingrandimento del contenuto" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "Ingrandimento intero contenuto" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "Indica se all'ingrandimento viene scalato l'intero contenuto" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "Codifica" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "La codifica predefinita della vista web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "Codifica personalizzata" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "La codifica personalizzata della vista web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" -msgstr "" +msgstr "URI di icona" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." -msgstr "" +msgstr "L'URI per la favicon della #WebKitWebView." #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 @@ -793,12 +805,10 @@ msgstr "Invia" msgid "Reset" msgstr "Azzera" -# FIXME -# https://bugs.webkit.org/show_bug.cgi?id=25375 -# Aperto bug chiedeno lumi... #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "Indice _cercabile" +msgid "This is a searchable index. Enter search keywords: " +msgstr "" +"Questo indice consente ricerche. Inserire la parole chiave da cercare: " #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -974,187 +984,188 @@ msgstr "Sconosciuta" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 msgid "Loading..." -msgstr "" +msgstr "Caricamento..." #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 msgid "Live Broadcast" -msgstr "" +msgstr "Diffusione live" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 msgid "audio element controller" -msgstr "" +msgstr "controllore elemento audio" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 msgid "video element controller" -msgstr "" +msgstr "controllore elemento video" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 msgid "mute" -msgstr "" +msgstr "escludi audio" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 msgid "unmute" -msgstr "" +msgstr "abilita audio" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 msgid "play" -msgstr "" +msgstr "riproduci" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 msgid "pause" -msgstr "" +msgstr "pausa" +# name == "Slider" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 msgid "movie time" -msgstr "" +msgstr "tempo filmato" +# name == "SliderThumb" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 msgid "timeline slider thumb" -msgstr "" +msgstr "cursore dello scorrevole per linea temporale" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 msgid "back 30 seconds" -msgstr "" +msgstr "indietro 30 secondi" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 msgid "return to realtime" -msgstr "" +msgstr "ritorna a tempo effettivo" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 msgid "elapsed time" -msgstr "" +msgstr "tempo trascorso" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 msgid "remaining time" -msgstr "" +msgstr "tempo rimanente" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 -#, fuzzy msgid "status" -msgstr "Stato" +msgstr "stato" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 msgid "fullscreen" -msgstr "" +msgstr "schermo intero" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 msgid "fast forward" -msgstr "" +msgstr "avanti veloce" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 msgid "fast reverse" -msgstr "" +msgstr "indietro veloce" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 msgid "show closed captions" -msgstr "" +msgstr "mostra sottotitoli" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 msgid "hide closed captions" -msgstr "" +msgstr "nascondi sottotitoli" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 msgid "audio element playback controls and status display" -msgstr "" +msgstr "controlli di riproduzione e visualizzazione stato di elementi audio" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 msgid "video element playback controls and status display" -msgstr "" +msgstr "controlli di riproduzione e visualizzazione stato di elementi video" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 msgid "mute audio tracks" -msgstr "" +msgstr "escludi tracce audio" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 msgid "unmute audio tracks" -msgstr "" +msgstr "abilita tracce audio" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 msgid "begin playback" -msgstr "" +msgstr "inizia la riproduzione" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 msgid "pause playback" -msgstr "" +msgstr "mette in pausa la riproduzione" +# non so se è corretto... per induzione dovrebbe #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 msgid "movie time scrubber" -msgstr "" +msgstr "cambia con trascinamento il tempo del filmato" +# non so se è corretto... per induzione dovrebbe #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 msgid "movie time scrubber thumb" -msgstr "" +msgstr "cursore per cambiare con trascinamento il tempo del filmato" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 msgid "seek movie back 30 seconds" -msgstr "" +msgstr "posiziona il filmato indietro di 30 secondi" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 msgid "return streaming movie to real time" -msgstr "" +msgstr "riporta il filmato in streaming al tempo reale" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 msgid "current movie time in seconds" -msgstr "" +msgstr "tempo corrente del filmato in secondi" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 msgid "number of seconds of movie remaining" -msgstr "" +msgstr "numero di secondi rimanenti del filmato" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 msgid "current movie status" -msgstr "" +msgstr "stato attuale del filmato" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 msgid "seek quickly back" -msgstr "" +msgstr "posiziona indietro rapidamente" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 msgid "seek quickly forward" -msgstr "" +msgstr "posiziona avanti rapidamente" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 msgid "Play movie in fullscreen mode" -msgstr "" +msgstr "Riproduce il filmato in modalità schermo intero" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 msgid "start displaying closed captions" -msgstr "" +msgstr "avvia la visualizzazione dei sottotitoli" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 msgid "stop displaying closed captions" -msgstr "" +msgstr "interrompe la visualizzazione dei sottotitoli" -# String AXDefinitionListDefinitionText() #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 -#, fuzzy msgid "indefinite time" -msgstr "definizione" +msgstr "tempo indefinito" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 msgid "value missing" -msgstr "" +msgstr "valore mancante" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 msgid "type mismatch" -msgstr "" +msgstr "discrepanza di tipo" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 msgid "pattern mismatch" -msgstr "" +msgstr "discrepanza di modello" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 msgid "too long" -msgstr "" +msgstr "troppo lungo" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 msgid "range underflow" -msgstr "" +msgstr "superamento limite inferiore dell'intervallo" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 msgid "range overflow" -msgstr "" +msgstr "superamento limite superiore dell'intervallo" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" -msgstr "" +msgstr "discrepanza di passo" diff --git a/WebKit/gtk/po/lt.po b/WebKit/gtk/po/lt.po index 4c30200..fd449a2 100644 --- a/WebKit/gtk/po/lt.po +++ b/WebKit/gtk/po/lt.po @@ -1,21 +1,21 @@ # Lithuanian translation for WebKit GTK. # This file is put in the public domain. -# Rimas Kudelis <rq@akl.lt>, 2009. +# Rimas Kudelis <rq@akl.lt>, 2009, 2010. msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" -"PO-Revision-Date: 2009-10-09 18:42+0200\n" +"POT-Creation-Date: 2010-02-16 15:01-0200\n" +"PO-Revision-Date: 2010-02-26 20:07+0300\n" "Last-Translator: Rimas Kudelis <rq@akl.lt>\n" "Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n" +"Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: lt\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%" "100<10 || n%100>=20) ? 1 : 2);\n" -"X-Generator: Virtaal 0.4.0\n" +"X-Generator: Virtaal 0.5.2\n" #: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" @@ -72,28 +72,24 @@ msgid "_Insert Unicode Control Character" msgstr "Įterpti unikodo valdymo ženklą" #: WebKit/gtk/webkit/webkitdownload.cpp:262 -#, fuzzy msgid "Network Request" msgstr "Tinklo užklausa" #: WebKit/gtk/webkit/webkitdownload.cpp:263 -#, fuzzy msgid "The network request for the URI that should be downloaded" msgstr "" "Tinklo užklausa parsiųstino failo universaliajam ištekliaus identifikatoriui " "(URI)" #: WebKit/gtk/webkit/webkitdownload.cpp:277 -#, fuzzy msgid "Network Response" -msgstr "Tinklo užklausa" +msgstr "Tinklo atsakas" #: WebKit/gtk/webkit/webkitdownload.cpp:278 -#, fuzzy msgid "The network response for the URI that should be downloaded" msgstr "" -"Tinklo užklausa parsiųstino failo universaliajam ištekliaus identifikatoriui " -"(URI)" +"Tinklo atsakas į užklausą parsiųstino failo universaliajam ištekliaus " +"identifikatoriui (URI)" #: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" @@ -116,18 +112,16 @@ msgid "Progress" msgstr "Progresas" #: WebKit/gtk/webkit/webkitdownload.cpp:326 -#, fuzzy msgid "Determines the current progress of the download" -msgstr "Nurodo atsiuntimo progresą" +msgstr "Nurodo esamą atsiuntimo progresą" #: WebKit/gtk/webkit/webkitdownload.cpp:339 msgid "Status" msgstr "Būsena" #: WebKit/gtk/webkit/webkitdownload.cpp:340 -#, fuzzy msgid "Determines the current status of the download" -msgstr "Nurodo atsiuntimo būseną" +msgstr "Nurodo esamą atsiuntimo būseną" #: WebKit/gtk/webkit/webkitdownload.cpp:355 msgid "Current Size" @@ -163,9 +157,8 @@ msgid "Password:" msgstr "Slaptažodis:" #: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 -#, fuzzy msgid "_Remember password" -msgstr "Įsiminti slaptažodį" +msgstr "Įsi_minti slaptažodį" #: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" @@ -198,22 +191,20 @@ msgstr "" #: WebKit/gtk/webkit/webkitwebframe.cpp:344 msgid "Horizontal Scrollbar Policy" -msgstr "" +msgstr "Horizontalios slinkties juostos taisyklės" #: WebKit/gtk/webkit/webkitwebframe.cpp:345 -#, fuzzy msgid "" "Determines the current policy for the horizontal scrollbar of the frame." -msgstr "Nurodo atsiuntimo progresą" +msgstr "Taisyklės, taikomos kadro horizontaliai slinkties juostai." #: WebKit/gtk/webkit/webkitwebframe.cpp:362 msgid "Vertical Scrollbar Policy" -msgstr "" +msgstr "Vertikalios slinkties juostos taisyklės" #: WebKit/gtk/webkit/webkitwebframe.cpp:363 -#, fuzzy msgid "Determines the current policy for the vertical scrollbar of the frame." -msgstr "Nurodo atsiuntimo progresą" +msgstr "Taisyklės, taikomos kadro vertikaliai slinkties juostai." #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" @@ -274,20 +265,18 @@ msgid "Profile the executed JavaScript." msgstr "Profiliuoti vykdomą „JavaScript“ kodą." #: WebKit/gtk/webkit/webkitwebinspector.cpp:315 -#, fuzzy msgid "Enable Timeline profiling" -msgstr "Įjungti „JavaScript“ profiliavimą" +msgstr "Įjungti chronologinį profiliavimą" #: WebKit/gtk/webkit/webkitwebinspector.cpp:316 msgid "Profile the WebCore instrumentation." -msgstr "" +msgstr "Profiliuoti „WebCore“ instrumentuotę." #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "Priežastis" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 -#, fuzzy msgid "The reason why this navigation is occurring" msgstr "Tinklalapio atvėrimo priežastis" @@ -313,15 +302,12 @@ msgid "A bitmask representing the state of the modifier keys" msgstr "Bitų kaukė, atspindinti modifikavimo klavišų būseną" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 -#, fuzzy msgid "Target frame" -msgstr "Kadro pavadinimas" +msgstr "Paskirties kadras" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 -#, fuzzy msgid "The target frame for the navigation" -msgstr "" -"Mėginamo atverti tinklalapio universalusis ištekliaus identifikatorius (URI)" +msgstr "Kadras, kuriame tinklalapis turi būti atvertas." #: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" @@ -404,15 +390,13 @@ msgid "The minimum font size used to display text." msgstr "Mažiausias leistinas tekstui atvaizduoti naudojamo šrifto dydis." #: WebKit/gtk/webkit/webkitwebsettings.cpp:323 -#, fuzzy msgid "Minimum Logical Font Size" msgstr "Minimalus loginis šrifto dydis" #: WebKit/gtk/webkit/webkitwebsettings.cpp:324 -#, fuzzy msgid "The minimum logical font size used to display text." msgstr "" -"Mažiausias leistinas loginis tekstui atvaizduoti naudojamo šrifto dydis." +"Mažiausias leistinas tekstui atvaizduoti naudojamo šrifto loginis dydis." #: WebKit/gtk/webkit/webkitwebsettings.cpp:343 msgid "Enforce 96 DPI" @@ -506,146 +490,143 @@ msgstr "Įjungti privačiojo naršymo veikseną" #: WebKit/gtk/webkit/webkitwebsettings.cpp:477 msgid "Enable Spell Checking" -msgstr "" +msgstr "Tikrinti rašybą" #: WebKit/gtk/webkit/webkitwebsettings.cpp:478 -#, fuzzy msgid "Enables spell checking while typing" -msgstr "Tikrinti _rašybą rašant tekstą" +msgstr "Įjungti rašybos tikrinimą renkant tekstą" #: WebKit/gtk/webkit/webkitwebsettings.cpp:501 msgid "Languages to use for spell checking" -msgstr "" +msgstr "Rašybos tikrinimo kalbos" #: WebKit/gtk/webkit/webkitwebsettings.cpp:502 msgid "Comma separated list of languages to use for spell checking" -msgstr "" +msgstr "Kableliais atskirtas kalbų, kurių rašybą reikia tikrinti, sąrašas" #: WebKit/gtk/webkit/webkitwebsettings.cpp:516 -#, fuzzy msgid "Enable Caret Browsing" -msgstr "Įjungti privatųjį naršymą" +msgstr "Visuomet įjungti teksto žymeklį" #: WebKit/gtk/webkit/webkitwebsettings.cpp:517 msgid "Whether to enable accesibility enhanced keyboard navigation" -msgstr "" +msgstr "Ar įjungti teksto fragmentų žymėjimą klaviatūra" #: WebKit/gtk/webkit/webkitwebsettings.cpp:532 msgid "Enable HTML5 Database" -msgstr "" +msgstr "Įjungti HTML5 duomenų bazę" #: WebKit/gtk/webkit/webkitwebsettings.cpp:533 msgid "Whether to enable HTML5 database support" -msgstr "" +msgstr "Ar įjungti HTML5 duomenų bazės palaikymą" #: WebKit/gtk/webkit/webkitwebsettings.cpp:548 msgid "Enable HTML5 Local Storage" -msgstr "" +msgstr "Įjungti HTML5 vietinę saugyklą" #: WebKit/gtk/webkit/webkitwebsettings.cpp:549 msgid "Whether to enable HTML5 Local Storage support" -msgstr "" +msgstr "Ar įjungti HTML5 vietinės saugyklos palaikymą" #: WebKit/gtk/webkit/webkitwebsettings.cpp:563 -#, fuzzy msgid "Enable XSS Auditor" -msgstr "Įjungti scenarijus" +msgstr "Įjungti XSS auditavimą" #: WebKit/gtk/webkit/webkitwebsettings.cpp:564 msgid "Whether to enable teh XSS auditor" -msgstr "" +msgstr "Ar įjungti XSS auditavimą" #: WebKit/gtk/webkit/webkitwebsettings.cpp:582 msgid "User Agent" -msgstr "" +msgstr "Naudotojo agentas" #: WebKit/gtk/webkit/webkitwebsettings.cpp:583 msgid "The User-Agent string used by WebKitGtk" -msgstr "" +msgstr "„User-Agent“ eilutė, kurią „WebKitGtk“ turėtų naudoti" #: WebKit/gtk/webkit/webkitwebsettings.cpp:598 msgid "JavaScript can open windows automatically" -msgstr "" +msgstr "Leisti „JavaScript“ atverti langus automatiškai" #: WebKit/gtk/webkit/webkitwebsettings.cpp:599 msgid "Whether JavaScript can open windows automatically" -msgstr "" +msgstr "Ar „JavaScript“ leidžiama atverti langus automatiškai" #: WebKit/gtk/webkit/webkitwebsettings.cpp:614 msgid "Enable offline web application cache" -msgstr "" +msgstr "Įjungti žiniatinklio programų podėlį darbui neprisijungus" #: WebKit/gtk/webkit/webkitwebsettings.cpp:615 msgid "Whether to enable offline web application cache" -msgstr "" +msgstr "Ar įjungti žiniatinklio programų podėlį darbui neprisijungus" #: WebKit/gtk/webkit/webkitwebsettings.cpp:642 msgid "Editing behavior" -msgstr "" +msgstr "Redagavimo elgsena" #: WebKit/gtk/webkit/webkitwebsettings.cpp:643 msgid "The behavior mode to use in editing mode" -msgstr "" +msgstr "Elgsena naudotina redagavimo veiksenoje" #: WebKit/gtk/webkit/webkitwebsettings.cpp:659 msgid "Enable universal access from file URIs" -msgstr "" +msgstr "Įjungti universalią prieigą iš „file“ URI" #: WebKit/gtk/webkit/webkitwebsettings.cpp:660 msgid "Whether to allow universal access from file URIs" -msgstr "" +msgstr "Ar leisti universalią prieigą iš „file“ URI" #: WebKit/gtk/webkit/webkitwebsettings.cpp:675 -#, fuzzy msgid "Enable DOM paste" -msgstr "Įjungti scenarijus" +msgstr "Įjungti DOM įdėjimą" #: WebKit/gtk/webkit/webkitwebsettings.cpp:676 msgid "Whether to enable DOM paste" -msgstr "" +msgstr "Ar įjungti DOM įdėjimą" #: WebKit/gtk/webkit/webkitwebsettings.cpp:694 msgid "Tab key cycles through elements" -msgstr "" +msgstr "Tab klavišu šokti tarp elementų" #: WebKit/gtk/webkit/webkitwebsettings.cpp:695 msgid "Whether the tab key cycles through elements on the page." -msgstr "" +msgstr "Ar Tab klavišu galima šokti iš vieno elemento tinklalapyje į kitą." #: WebKit/gtk/webkit/webkitwebsettings.cpp:715 msgid "Enable Default Context Menu" -msgstr "" +msgstr "Įjungti numatytąjį kontekstinį meniu" #: WebKit/gtk/webkit/webkitwebsettings.cpp:716 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" +"Ar apdoroti dešiniojo pelės mygtuko spustelėjimus, suformuojant numatytąjį " +"kontekstinį meniu" #: WebKit/gtk/webkit/webkitwebsettings.cpp:736 msgid "Enable Site Specific Quirks" -msgstr "" +msgstr "Įjungti specifines svetainių pataisas" #: WebKit/gtk/webkit/webkitwebsettings.cpp:737 msgid "Enables the site-specific compatibility workarounds" -msgstr "" +msgstr "Įjungti kai kuriose svetainėse reikalingas specifines pataisas" #: WebKit/gtk/webkit/webkitwebsettings.cpp:759 msgid "Enable page cache" -msgstr "" +msgstr "Įjungti tinklalapių podėlį" #: WebKit/gtk/webkit/webkitwebsettings.cpp:760 -#, fuzzy msgid "Whether the page cache should be used" -msgstr "Ar spausdinti fono piešinius." +msgstr "Ar naudoti tinklalapių podėlį" #: WebKit/gtk/webkit/webkitwebsettings.cpp:780 msgid "Auto Resize Window" -msgstr "" +msgstr "Automatiškai keisti lango dydį" #: WebKit/gtk/webkit/webkitwebsettings.cpp:781 msgid "Automatically resize the toplevel window when a page requests it" -msgstr "" +msgstr "Tinklalapiui pareikalavus, automatiškai keisti pagrindinio lango dydį" #: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" @@ -659,19 +640,21 @@ msgstr "" #: WebKit/gtk/webkit/webkitwebview.cpp:2343 msgid "Copy target list" -msgstr "" +msgstr "Kopijuotinų taikinių sąrašas" #: WebKit/gtk/webkit/webkitwebview.cpp:2344 msgid "The list of targets this web view supports for clipboard copying" msgstr "" +"Šio žiniatinklio rodinio palaikomų taikinių kopijavimui į iškarpinę sąrašas" #: WebKit/gtk/webkit/webkitwebview.cpp:2357 msgid "Paste target list" -msgstr "" +msgstr "Įdėtinų taikinių sąrašas" #: WebKit/gtk/webkit/webkitwebview.cpp:2358 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" +"Šio žiniatinklio rodinio palaikomų taikinių įdėjimui iš iškarpinės sąrašas" #: WebKit/gtk/webkit/webkitwebview.cpp:2364 msgid "Settings" @@ -739,11 +722,11 @@ msgstr "Pasirinktinė žiniatinklio rodinio koduotė" #: WebKit/gtk/webkit/webkitwebview.cpp:2517 msgid "Icon URI" -msgstr "" +msgstr "Piktogramos URI" #: WebKit/gtk/webkit/webkitwebview.cpp:2518 msgid "The URI for the favicon for the #WebKitWebView." -msgstr "" +msgstr "#WebKitWebView naudotinos „favicon“ piktogramos URI" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 @@ -756,7 +739,7 @@ msgstr "Atkurti" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 msgid "_Searchable Index" -msgstr "" +msgstr "_Rodyklė paieškai" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -916,186 +899,184 @@ msgstr "Nežinoma" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 msgid "Loading..." -msgstr "" +msgstr "Įkeliama…" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 msgid "Live Broadcast" -msgstr "" +msgstr "Tiesioginė transliacija" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 msgid "audio element controller" -msgstr "" +msgstr "audio elemento skydelis" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 msgid "video element controller" -msgstr "" +msgstr "video elemento skydelis" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 msgid "mute" -msgstr "" +msgstr "išjungti garsą" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 msgid "unmute" -msgstr "" +msgstr "įjungti garsą" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 msgid "play" -msgstr "" +msgstr "groti" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 msgid "pause" -msgstr "" +msgstr "pristabdyti" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 msgid "movie time" -msgstr "" +msgstr "laiko juosta" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 msgid "timeline slider thumb" -msgstr "" +msgstr "laiko juostos slankiklis" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 msgid "back 30 seconds" -msgstr "" +msgstr "30 sek. atgal" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 msgid "return to realtime" -msgstr "" +msgstr "grįžti į realų laiką" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 msgid "elapsed time" -msgstr "" +msgstr "praėjęs laikas" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 msgid "remaining time" -msgstr "" +msgstr "likęs laikas" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 -#, fuzzy msgid "status" -msgstr "Būsena" +msgstr "būsena" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 msgid "fullscreen" -msgstr "" +msgstr "visame ekrane" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 msgid "fast forward" -msgstr "" +msgstr "prasukti pirmyn" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 msgid "fast reverse" -msgstr "" +msgstr "prasukti atgal" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 msgid "show closed captions" -msgstr "" +msgstr "rodyti titrus" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 msgid "hide closed captions" -msgstr "" +msgstr "nerodyti titrų" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 msgid "audio element playback controls and status display" -msgstr "" +msgstr "audio elemento valdikliai ir būsenos indikatorius" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 msgid "video element playback controls and status display" -msgstr "" +msgstr "video elemento valdikliai ir būsenos indikatorius" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 msgid "mute audio tracks" -msgstr "" +msgstr "išjungti garso takelio garsą" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 msgid "unmute audio tracks" -msgstr "" +msgstr "įjungti garso takelio garsą" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 msgid "begin playback" -msgstr "" +msgstr "pradėti grojimą" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 msgid "pause playback" -msgstr "" +msgstr "pristabdyti grojimą" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 msgid "movie time scrubber" -msgstr "" +msgstr "įrašo laiko juosta" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 msgid "movie time scrubber thumb" -msgstr "" +msgstr "įrašo laiko juostos slankiklis" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 msgid "seek movie back 30 seconds" -msgstr "" +msgstr "uždelsti įrašo atkūrimą 30 sek." #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 msgid "return streaming movie to real time" -msgstr "" +msgstr "grąžinti įrašo atkūrimą į realų laiką" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 msgid "current movie time in seconds" -msgstr "" +msgstr "praėjęs atkuriamo įrašo laikas sekundėmis" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 msgid "number of seconds of movie remaining" -msgstr "" +msgstr "likęs atkuriamo įrašo laikas sekundėmis" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 msgid "current movie status" -msgstr "" +msgstr "atkuriamo įrašo būsena" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 msgid "seek quickly back" -msgstr "" +msgstr "prasukti įrašą į priekį" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 msgid "seek quickly forward" -msgstr "" +msgstr "prasukti įrašą atgal" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 msgid "Play movie in fullscreen mode" -msgstr "" +msgstr "Rodyti įrašą visame ekrane" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 msgid "start displaying closed captions" -msgstr "" +msgstr "pradėti ekrane rodyti titrus" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 msgid "stop displaying closed captions" -msgstr "" +msgstr "nutraukti titrų rodymą ekrane" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 -#, fuzzy msgid "indefinite time" -msgstr "apibrėžtis" +msgstr "laikas neapibrėžtas" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 msgid "value missing" -msgstr "" +msgstr "trūksta reikšmės" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 msgid "type mismatch" -msgstr "" +msgstr "tipo nesutampimas" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 msgid "pattern mismatch" -msgstr "" +msgstr "šablono nesutampimas" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 msgid "too long" -msgstr "" +msgstr "per ilgas" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 msgid "range underflow" -msgstr "" +msgstr "reikšmė per maža" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 msgid "range overflow" -msgstr "" +msgstr "reikšmė per didelė" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" -msgstr "" +msgstr "žingsnio nesutapimas" diff --git a/WebKit/gtk/po/lv.po b/WebKit/gtk/po/lv.po new file mode 100644 index 0000000..3181ed3 --- /dev/null +++ b/WebKit/gtk/po/lv.po @@ -0,0 +1,704 @@ +# This file is put in the public domain. +# +# Peteris Krisjanis <pecisk@gmail.com>, 2010. +msgid "" +msgstr "" +"Project-Id-Version: webkit 1.1.4\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" +"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"PO-Revision-Date: 2010-03-07 19:37+0200\n" +"Last-Translator: Peteris Krisjanis <pecisk@gmail.com>\n" +"Language-Team: Latviešu <lata-l10n@googlegroups.com>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " +"2);\n" + +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +msgid "Upload File" +msgstr "Augšupielādēt failu" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +msgid "Input _Methods" +msgstr "Ievades _metodes" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 +msgid "LRM _Left-to-right mark" +msgstr "LRM _No kreisās uz labo atzīme" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 +msgid "RLM _Right-to-left mark" +msgstr "RLM No _labās uz kreiso atzīme" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 +msgid "LRE Left-to-right _embedding" +msgstr "LRE No kreisās uz labo _iegultīšana" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 +msgid "RLE Right-to-left e_mbedding" +msgstr "RLE No labās uz kreiso ie_gultīšana" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 +msgid "LRO Left-to-right _override" +msgstr "LRO No kreisās uz labo _pārrakstīšana" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 +msgid "RLO Right-to-left o_verride" +msgstr "RLO No labās uz kreiso pār_rakstīšana" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 +msgid "PDF _Pop directional formatting" +msgstr "PDF _izlēcošā virziena formatēšana" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 +msgid "ZWS _Zero width space" +msgstr "ZWS _Nulle ar tukšumu" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 +msgid "ZWJ Zero width _joiner" +msgstr "ZWJ Nulle ar _savienojumu" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 +msgid "ZWNJ Zero width _non-joiner" +msgstr "ZWNJ Nulle ar _nesavienojumu" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +msgid "_Insert Unicode Control Character" +msgstr "_Ievietot Unicode kontroles rakstzīmi" + +#: WebKit/gtk/webkit/webkitdownload.cpp:250 +msgid "Network Request" +msgstr "Tīkla pieprasījums" + +#: WebKit/gtk/webkit/webkitdownload.cpp:251 +msgid "The network request for the URI that should be downloaded" +msgstr "URI, kuru vajadzētu lejupielādēt, tīkla pieprasījums" + +#: WebKit/gtk/webkit/webkitdownload.cpp:265 +msgid "Destination URI" +msgstr "Mērķa URI" + +#: WebKit/gtk/webkit/webkitdownload.cpp:266 +msgid "The destination URI where to save the file" +msgstr "Mērķa URI, kur saglabāt failu" + +#: WebKit/gtk/webkit/webkitdownload.cpp:280 +msgid "Suggested Filename" +msgstr "Ieteiktais faila nosaukums" + +#: WebKit/gtk/webkit/webkitdownload.cpp:281 +msgid "The filename suggested as default when saving" +msgstr "Noklusēti ieteiktais faila nosaukums saglabājot" + +#: WebKit/gtk/webkit/webkitdownload.cpp:294 +msgid "Progress" +msgstr "Progress" + +#: WebKit/gtk/webkit/webkitdownload.cpp:295 +msgid "Determines the current progress of the download" +msgstr "Nosaka lejupielādes pašreizējo progresu" + +#: WebKit/gtk/webkit/webkitdownload.cpp:308 +msgid "Status" +msgstr "Statuss" + +#: WebKit/gtk/webkit/webkitdownload.cpp:309 +msgid "Determines the current status of the download" +msgstr "Nosaka lejupielādes pašreizējo statusu" + +#: WebKit/gtk/webkit/webkitdownload.cpp:324 +msgid "Current Size" +msgstr "Pašreizējais izmērs" + +#: WebKit/gtk/webkit/webkitdownload.cpp:325 +msgid "The length of the data already downloaded" +msgstr "Jau lejupielādēto datu apjoms" + +#: WebKit/gtk/webkit/webkitdownload.cpp:339 +msgid "Total Size" +msgstr "Galīgais izmērs" + +#: WebKit/gtk/webkit/webkitdownload.cpp:340 +msgid "The total size of the file" +msgstr "Galīgais faila izmērs" + +#: WebKit/gtk/webkit/webkitdownload.cpp:469 +msgid "User cancelled the download" +msgstr "Lietotājs atcēla lejupielādi" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#, c-format +msgid "A username and password are being requested by the site %s" +msgstr "Lietotājvārds un parole, ko pieprasa vietne %s" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +msgid "Username:" +msgstr "Lietotājvārds:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +msgid "Password:" +msgstr "Parole:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 +msgid "Remember password" +msgstr "Atcerēties paroli" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +msgid "Name" +msgstr "Nosaukums" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +msgid "The name of the frame" +msgstr "Rāmja nosaukums" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 +#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +msgid "Title" +msgstr "Virsraksts" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +msgid "The document title of the frame" +msgstr "Rāmja dokumenta virsraksts" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:225 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 +#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +msgid "URI" +msgstr "URI" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +msgid "The current URI of the contents displayed by the frame" +msgstr "Pašreizējais rāmī attēlotā satura URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +msgid "The title of the history item" +msgstr "Vēstures ieraksta virsraksts" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +msgid "Alternate Title" +msgstr "Alternatīvais virsraksts" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +msgid "The alternate title of the history item" +msgstr "Vēstures ieraksta alternatīvais virsraksts" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +msgid "The URI of the history item" +msgstr "Vēstures ieraksta URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +msgid "Original URI" +msgstr "Oriģinālais URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +msgid "The original URI of the history item" +msgstr "Vēstures ieraksta oriģinālais URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +msgid "Last visited Time" +msgstr "Pēdējā apmeklējuma laiks" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +msgid "The time at which the history item was last visited" +msgstr "Laiks, kad pēdējo reizi vēstures ieraksts tika apmeklēts" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +msgid "Web View" +msgstr "Tīmekļa skats" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +msgid "The Web View that renders the Web Inspector itself" +msgstr "Tīmekļa skats, kas renderē pašu tīmekļa inspektoru" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +msgid "Inspected URI" +msgstr "Inspektētais URI" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +msgid "The URI that is currently being inspected" +msgstr "URI, kuru pašreiz inspektē" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +msgid "Enable JavaScript profiling" +msgstr "Ieslēgt JavaScript profilēšanu" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +msgid "Profile the executed JavaScript." +msgstr "Profilēt izpildīto JavaScript kodu." + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +msgid "Reason" +msgstr "Iemesls" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +msgid "The reason why this navigation is occurring" +msgstr "Iemesls, kāpēc šī navigācija notiek" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +msgid "The URI that was requested as the target for the navigation" +msgstr "URI, kas tika pieprasīta kā navigācijas mērķis" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +msgid "Button" +msgstr "Poga" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +msgid "The button used to click" +msgstr "Poga, ko noklikšķināt" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +msgid "Modifier state" +msgstr "Modifīcētāja stāvoklis" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +msgid "A bitmask representing the state of the modifier keys" +msgstr "" +"Lubiņš stāsta, ka nodokļu slogs Latvijā ir pārāk liels, turklāt valsts no " +"uzņēmuma prasa, lai tas būtu konkurētspējīgs. Viņš uzskata, ka, samazinot " +"nodokļus, uzņēmēju aktivitāte palielinātos un augtu arī konkurētspēja." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +msgid "Default Encoding" +msgstr "Noklusētais kodējums" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +msgid "The default encoding used to display text." +msgstr "Noklusētais kodējums, ko izmanto teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +msgid "Cursive Font Family" +msgstr "Cursive fontu ģimene" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +msgid "The default Cursive font family used to display text." +msgstr "Noklusētā Cursive fontu ģimene, ko izmanto teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +msgid "Default Font Family" +msgstr "Noklusētā fontu ģimene" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +msgid "The default font family used to display text." +msgstr "Noklusētā fontu ģimene, ko izmanto teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +msgid "Fantasy Font Family" +msgstr "Fantasy fontu ģimene" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +msgid "The default Fantasy font family used to display text." +msgstr "Noklusētā Fantasy fontu ģimene, ko izmanto teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +msgid "Monospace Font Family" +msgstr "Monospace fontu ģimene" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +msgid "The default font family used to display monospace text." +msgstr "Noklusētā fontu ģimene, ko izmanto monospace teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +msgid "Sans Serif Font Family" +msgstr "Sans Serif fontu ģimene" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +msgid "The default Sans Serif font family used to display text." +msgstr "Noklusētā Sans Serif fontu ģimene, ko izmanto teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +msgid "Serif Font Family" +msgstr "Serif fontu ģimene" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +msgid "The default Serif font family used to display text." +msgstr "Noklusētā Serif fontu ģimene, ko izmanto teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +msgid "Default Font Size" +msgstr "Noklusētais fontu izmērs" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +msgid "The default font size used to display text." +msgstr "Noklusētais fontu izmērs, kuru izmantot teksta attēlošanā." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +msgid "Default Monospace Font Size" +msgstr "Noklusētais Monospace fontu izmērs" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +msgid "The default font size used to display monospace text." +msgstr "Noklusētais fonta izmērs monospace teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +msgid "Minimum Font Size" +msgstr "Minimālais fontu izmērs" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +msgid "The minimum font size used to display text." +msgstr "Minimālais fonta izmērs teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +msgid "Minimum Logical Font Size" +msgstr "Minimālais loģiskais fontu izmērs" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +msgid "The minimum logical font size used to display text." +msgstr "Minimālais loģiskais fontu izmērs teksta attēlošanai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +msgid "Enforce 96 DPI" +msgstr "Forsēt 96 DPI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +msgid "Enforce a resolution of 96 DPI" +msgstr "Forsēt 96 DPI izšķirtspēju" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +msgid "Auto Load Images" +msgstr "Automātiska attēlu ielāde" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +msgid "Load images automatically." +msgstr "Ielādēt attēlus automātiski." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +msgid "Auto Shrink Images" +msgstr "Automātiski samazināt attēlus" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +msgid "Automatically shrink standalone images to fit." +msgstr "" +"Automātiski samazināt atsevišķi parādītus attēlus, lai tie ietilptu logā." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +msgid "Print Backgrounds" +msgstr "Drukāt fonus" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +msgid "Whether background images should be printed." +msgstr "Vai fona attēlus vajadzētu drukāt." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +msgid "Enable Scripts" +msgstr "Aktivizēt skriptus" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +msgid "Enable embedded scripting languages." +msgstr "Aktivizēt iegultās skriptēšanas valodas." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +msgid "Enable Plugins" +msgstr "Aktivizēt spraudņus" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +msgid "Enable embedded plugin objects." +msgstr "Aktivizēt iegultos spraudņu objektus." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +msgid "Resizable Text Areas" +msgstr "Teksta lauki ar maināmu izmēru" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +msgid "Whether text areas are resizable." +msgstr "Vai teksta lauki ir ar maināmu izmēru" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +msgid "User Stylesheet URI" +msgstr "Lietotāja stila lapas URI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +msgid "The URI of a stylesheet that is applied to every page." +msgstr "Stila lapas URI, kuru pielietot katrai lapai." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +msgid "Zoom Stepping Value" +msgstr "Mērogošanas pakāpes vērtība" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +msgid "The value by which the zoom level is changed when zooming in or out." +msgstr "" +"Vērtība, par kuru mēroga līmenis tiek izmainīts palielinot vai samazinot " +"to." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +msgid "Enable Developer Extras" +msgstr "Aktivizēt izstrādātāja ekstras" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +msgid "Enables special extensions that help developers" +msgstr "Aktivizē speciālus paplašinājumus, kas palīdz izstrādātājiem" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +msgid "Enable Private Browsing" +msgstr "Aktivizēt privāto pārlūkošanu" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +msgid "Enables private browsing mode" +msgstr "Aktivizē privātās pārlūkošanas režīmu" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +msgid "Returns the @web_view's document title" +msgstr "Atgriež @web_view dokumenta virsrakstu" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +msgid "Returns the current URI of the contents displayed by the @web_view" +msgstr "Atgriež pašreizējo satura, kas attēlos @web_view, URI" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +msgid "Copy target list" +msgstr "Kopēt mērķu sarakstu" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +msgid "The list of targets this web view supports for clipboard copying" +msgstr "" +"Mērķu saraksts, ko šis tīmekļa skats atbalsta starpliktuves kopēšanai" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +msgid "Paste target list" +msgstr "Ielikt mērķu sarakstu" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +msgid "The list of targets this web view supports for clipboard pasting" +msgstr "" +"Mērķu saraksts, ko šis tīmekļa skats atbalsta starpliktuves kopēšanai" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +msgid "Settings" +msgstr "Iestatījumi" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +msgid "An associated WebKitWebSettings instance" +msgstr "Saistītā WebKitWebSettings instance" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +msgid "Web Inspector" +msgstr "Tīmekļa inspektors" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +msgid "The associated WebKitWebInspector instance" +msgstr "Saistītā WebKitInspector instance" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +msgid "Editable" +msgstr "Rediģējams" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +msgid "Whether content can be modified by the user" +msgstr "Vai lietotājs var mainīt saturu" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +msgid "Transparent" +msgstr "Caurspīdīgs" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +msgid "Whether content has a transparent background" +msgstr "Vai saturam ir caurspīdīgs fons" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +msgid "Zoom level" +msgstr "Mērogojuma līmenis" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +msgid "The level of zoom of the content" +msgstr "Satura mērogojuma līmenis" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +msgid "Full content zoom" +msgstr "Visa satura mērogojums" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +msgid "Whether the full content is scaled when zooming" +msgstr "Vai viss saturs tiek mērogots" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +msgid "Encoding" +msgstr "Kodējums" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +msgid "The default encoding of the web view" +msgstr "Tīmekļa skata noklusētais kodējums" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +msgid "Custom Encoding" +msgstr "Izvēlēts kodējums" + +#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +msgid "The custom encoding of the web view" +msgstr "Tīmekļa skata izvēlētais kodējums" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +msgid "Submit" +msgstr "Pieteikt" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +msgid "Reset" +msgstr "Pārstatīt" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 +msgid "_Searchable Index" +msgstr "_Meklējumu indekss" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +msgid "Choose File" +msgstr "Izvēlieties failu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +msgid "(None)" +msgstr "(Nekas)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +msgid "Open Link in New _Window" +msgstr "Atvērt saiti jau_nā logā" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +msgid "_Download Linked File" +msgstr "_Lejupielādēt saitēto failu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +msgid "Copy Link Loc_ation" +msgstr "Kopēt saites lokā_ciju" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +msgid "Open _Image in New Window" +msgstr "Atvērt _attēlu jaunā logā" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +msgid "Sa_ve Image As" +msgstr "Sa_glabāt attēlu kā" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +msgid "Cop_y Image" +msgstr "Kopē_t attēlu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +msgid "Open _Frame in New Window" +msgstr "Atvērt _rāmi jaunā logā" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +msgid "_Reload" +msgstr "_Pārlādēt" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +msgid "No Guesses Found" +msgstr "Nav neviena minējuma" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +msgid "_Ignore Spelling" +msgstr "_Ignorēt pareizrakstību" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +msgid "_Learn Spelling" +msgstr "_Iemācīties pareizrakstību" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +msgid "_Search the Web" +msgstr "_Meklēt tīmeklī" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +msgid "_Look Up in Dictionary" +msgstr "_Uzmeklēt vārdnīcā" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +msgid "_Open Link" +msgstr "_Atvērt saiti" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +msgid "Ignore _Grammar" +msgstr "Ignorēt _gramatiku" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +msgid "Spelling and _Grammar" +msgstr "Pareizrakstība un _gramatika" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +msgid "_Show Spelling and Grammar" +msgstr "_Rādīt pareizrakstību un gramatiku" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +msgid "_Hide Spelling and Grammar" +msgstr "_Slēpt pareizrakstību un gramatiku" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +msgid "_Check Document Now" +msgstr "_Pārbaudīt dokumentu tagad" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +msgid "Check Spelling While _Typing" +msgstr "Pārbaudīt pareizrakstību _rakstot" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +msgid "Check _Grammar With Spelling" +msgstr "Pārbaudīt _gramatiku kopā ar pareizrakstību" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +msgid "_Font" +msgstr "_Fonts" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +msgid "_Outline" +msgstr "_Kopskats" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +msgid "Inspect _Element" +msgstr "Inspektēt _elementu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +msgid "No recent searches" +msgstr "Nav nesen veiktu meklēšanu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +msgid "Recent searches" +msgstr "Nesen veiktās meklēšanas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +msgid "_Clear recent searches" +msgstr "_Attīrīt nesen veiktās meklēšanas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +msgid "term" +msgstr "termins" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +msgid "definition" +msgstr "definīcija" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +msgid "press" +msgstr "spiest" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +msgid "select" +msgstr "izvēlēties" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +msgid "activate" +msgstr "aktivizēt" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +msgid "uncheck" +msgstr "neatzīmēt" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +msgid "check" +msgstr "atzīmēt" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +msgid "jump" +msgstr "lekt" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +msgid " files" +msgstr " faili" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +msgid "Unknown" +msgstr "Nezināms" + + diff --git a/WebKit/gtk/po/nl.po b/WebKit/gtk/po/nl.po index a465b23..aa2da82 100644 --- a/WebKit/gtk/po/nl.po +++ b/WebKit/gtk/po/nl.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.10\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" -"PO-Revision-Date: 2009-07-05 18:58+0100\n" +"POT-Creation-Date: 2010-02-16 15:01-0200\n" +"PO-Revision-Date: 2010-03-22 00:27+0100\n" "Last-Translator: Reinout van Schouwen <reinouts@gnome.org>\n" "Language-Team: Dutch <vertaling@vrijschrift.org>\n" "MIME-Version: 1.0\n" @@ -77,14 +77,12 @@ msgid "The network request for the URI that should be downloaded" msgstr "De netwerkaanvraag voor de te downloaden URI" #: WebKit/gtk/webkit/webkitdownload.cpp:277 -#, fuzzy msgid "Network Response" -msgstr "Netwerkaanvraag" +msgstr "Netwerkantwoord" #: WebKit/gtk/webkit/webkitdownload.cpp:278 -#, fuzzy msgid "The network response for the URI that should be downloaded" -msgstr "De netwerkaanvraag voor de te downloaden URI" +msgstr "Het netwerkantwoord voor de te downloaden URI" #: WebKit/gtk/webkit/webkitdownload.cpp:292 msgid "Destination URI" @@ -152,9 +150,8 @@ msgid "Password:" msgstr "Wachtwoord:" #: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 -#, fuzzy msgid "_Remember password" -msgstr "Wachtwoord onthouden" +msgstr "_Wachtwoord onthouden" #: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" @@ -186,22 +183,21 @@ msgstr "De huidige URI van de in het frame weergegeven inhoud" #: WebKit/gtk/webkit/webkitwebframe.cpp:344 msgid "Horizontal Scrollbar Policy" -msgstr "" +msgstr "Beleid voor horizontale schuifbalk" #: WebKit/gtk/webkit/webkitwebframe.cpp:345 -#, fuzzy msgid "" "Determines the current policy for the horizontal scrollbar of the frame." -msgstr "Bepaalt de huidige voortgang van de download" +msgstr "" +"Bepaalt het beleid voor de horizontale schuifbalk van het frame" #: WebKit/gtk/webkit/webkitwebframe.cpp:362 msgid "Vertical Scrollbar Policy" -msgstr "" +msgstr "Beleid voor verticale schuifbalk" #: WebKit/gtk/webkit/webkitwebframe.cpp:363 -#, fuzzy msgid "Determines the current policy for the vertical scrollbar of the frame." -msgstr "Bepaalt de huidige voortgang van de download" +msgstr "Bepaalt het huidige beleid voor de verticale schuifbalk van het frame." #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" @@ -230,7 +226,7 @@ msgstr "De originele URI van het geschiedenis-item" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" -msgstr "Laatst bezocht op:" +msgstr "Laatst bezocht op" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" @@ -261,13 +257,12 @@ msgid "Profile the executed JavaScript." msgstr "De uitgevoerde JavaScript profileren." #: WebKit/gtk/webkit/webkitwebinspector.cpp:315 -#, fuzzy msgid "Enable Timeline profiling" -msgstr "JavaScript-profilering inschakelen" +msgstr "Tijdslijn-profilering inschakelen" #: WebKit/gtk/webkit/webkitwebinspector.cpp:316 msgid "Profile the WebCore instrumentation." -msgstr "" +msgstr "De instrumentering van WebCore profileren." #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" @@ -298,14 +293,12 @@ msgid "A bitmask representing the state of the modifier keys" msgstr "Een bitmask dat de staat van de optietoets representeert" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 -#, fuzzy msgid "Target frame" -msgstr "Naam van het frame" +msgstr "Doelframe" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 -#, fuzzy msgid "The target frame for the navigation" -msgstr "De URI die werd aangevraagd als bestemming voor de navigatie" +msgstr "Het doelframe voor de navigatie" #: WebKit/gtk/webkit/webkitwebsettings.cpp:233 msgid "Default Encoding" @@ -487,146 +480,143 @@ msgstr "Schakelt de stand voor privé-browsen in" #: WebKit/gtk/webkit/webkitwebsettings.cpp:477 msgid "Enable Spell Checking" -msgstr "" +msgstr "Spellingcontrole inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:478 -#, fuzzy msgid "Enables spell checking while typing" -msgstr "_Spelling controleren tijdens het typen" +msgstr "Schakelt spellingcontrole tijdens het typen in" #: WebKit/gtk/webkit/webkitwebsettings.cpp:501 msgid "Languages to use for spell checking" -msgstr "" +msgstr "Te gebruiken talen bij spellingcontrole" #: WebKit/gtk/webkit/webkitwebsettings.cpp:502 msgid "Comma separated list of languages to use for spell checking" -msgstr "" +msgstr "Kommagescheiden lijst van talen voor spellingcontrole" #: WebKit/gtk/webkit/webkitwebsettings.cpp:516 -#, fuzzy msgid "Enable Caret Browsing" -msgstr "Privé-browsen inschakelen" +msgstr "Cursor-browsen inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:517 msgid "Whether to enable accesibility enhanced keyboard navigation" -msgstr "" +msgstr "Of toegankelijkheidsgeoptimaliseerde toetsenbordnavigatie is ingeschakeld" #: WebKit/gtk/webkit/webkitwebsettings.cpp:532 msgid "Enable HTML5 Database" -msgstr "" +msgstr "HTML5-database inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:533 msgid "Whether to enable HTML5 database support" -msgstr "" +msgstr "Of HTML5-databaseondersteuning is ingeschakeld" #: WebKit/gtk/webkit/webkitwebsettings.cpp:548 msgid "Enable HTML5 Local Storage" -msgstr "" +msgstr "HTML5-lokale opslag inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:549 msgid "Whether to enable HTML5 Local Storage support" -msgstr "" +msgstr "Of HTML5-lokale opslag ingeschakeld moet zijn" #: WebKit/gtk/webkit/webkitwebsettings.cpp:563 -#, fuzzy msgid "Enable XSS Auditor" -msgstr "Scripts inschakelen" +msgstr "XSS-auditor inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:564 msgid "Whether to enable teh XSS auditor" -msgstr "" +msgstr "Of de XSS-auditor is ingeschakeld" #: WebKit/gtk/webkit/webkitwebsettings.cpp:582 msgid "User Agent" -msgstr "" +msgstr "User-agent" #: WebKit/gtk/webkit/webkitwebsettings.cpp:583 msgid "The User-Agent string used by WebKitGtk" -msgstr "" +msgstr "De User-Agent-tekenreeks die WebKitGtk gebruikt" #: WebKit/gtk/webkit/webkitwebsettings.cpp:598 msgid "JavaScript can open windows automatically" -msgstr "" +msgstr "JavaScript kan automatisch vensters openen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:599 msgid "Whether JavaScript can open windows automatically" -msgstr "" +msgstr "Of JavaScript automatisch vensters kan openen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:614 msgid "Enable offline web application cache" -msgstr "" +msgstr "Offline webapplicatiebuffer inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:615 msgid "Whether to enable offline web application cache" -msgstr "" +msgstr "Of de offline webapplicatiebuffer is ingeschakeld" #: WebKit/gtk/webkit/webkitwebsettings.cpp:642 msgid "Editing behavior" -msgstr "" +msgstr "Gedrag bij bewerken" #: WebKit/gtk/webkit/webkitwebsettings.cpp:643 msgid "The behavior mode to use in editing mode" -msgstr "" +msgstr "De gedragsmodus in de bewerkingsstand" #: WebKit/gtk/webkit/webkitwebsettings.cpp:659 msgid "Enable universal access from file URIs" -msgstr "" +msgstr "Universele toegang vanaf bestands-URI's inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:660 msgid "Whether to allow universal access from file URIs" -msgstr "" +msgstr "Of universele toegang vanaf bestands-URI's is ingeschakeld" #: WebKit/gtk/webkit/webkitwebsettings.cpp:675 -#, fuzzy msgid "Enable DOM paste" -msgstr "Scripts inschakelen" +msgstr "DOM-plakken inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:676 msgid "Whether to enable DOM paste" -msgstr "" +msgstr "Of plakken vanuit het DOM is ingeschakeld" #: WebKit/gtk/webkit/webkitwebsettings.cpp:694 msgid "Tab key cycles through elements" -msgstr "" +msgstr "Tab-toets wandelt door elementen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:695 msgid "Whether the tab key cycles through elements on the page." -msgstr "" +msgstr "Of de tab-toets door de elementen op de pagina wandelt." #: WebKit/gtk/webkit/webkitwebsettings.cpp:715 msgid "Enable Default Context Menu" -msgstr "" +msgstr "Standaard-contextmenu inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:716 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" +"Schakelt het afhandelen van klikken met de tweede muisknop in voor het creëren " +"van het standaard contextmenu" #: WebKit/gtk/webkit/webkitwebsettings.cpp:736 msgid "Enable Site Specific Quirks" -msgstr "" +msgstr "Site-specifieke eigenaardigheden inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:737 msgid "Enables the site-specific compatibility workarounds" -msgstr "" +msgstr "Schakelt omzeilingen in voor compatibiliteit met specifieke websites" #: WebKit/gtk/webkit/webkitwebsettings.cpp:759 msgid "Enable page cache" -msgstr "" +msgstr "Paginabuffer inschakelen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:760 -#, fuzzy msgid "Whether the page cache should be used" -msgstr "Of achtergrondafbeeldingen afgedrukt moeten worden." +msgstr "Of de paginabuffer gebruikt moet worden" #: WebKit/gtk/webkit/webkitwebsettings.cpp:780 msgid "Auto Resize Window" -msgstr "" +msgstr "Venstergrootte automatisch aanpassen" #: WebKit/gtk/webkit/webkitwebsettings.cpp:781 msgid "Automatically resize the toplevel window when a page requests it" -msgstr "" +msgstr "Grootte van topniveauvenster automatisch aanpassen wanneer pagina hierom vraagt" #: WebKit/gtk/webkit/webkitwebview.cpp:2316 msgid "Returns the @web_view's document title" @@ -722,11 +712,11 @@ msgstr "De aangepaste codering van de webweergave" #: WebKit/gtk/webkit/webkitwebview.cpp:2517 msgid "Icon URI" -msgstr "" +msgstr "Pictogram-URI" #: WebKit/gtk/webkit/webkitwebview.cpp:2518 msgid "The URI for the favicon for the #WebKitWebView." -msgstr "" +msgstr "De URI voor het favicon van de #WebKitWebView." #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 @@ -901,39 +891,39 @@ msgstr "Onbekend" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 msgid "Loading..." -msgstr "" +msgstr "Laden…" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 msgid "Live Broadcast" -msgstr "" +msgstr "Live-uitzending" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 msgid "audio element controller" -msgstr "" +msgstr "besturing audio-element" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 msgid "video element controller" -msgstr "" +msgstr "besturing video-element" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 msgid "mute" -msgstr "" +msgstr "dempen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 msgid "unmute" -msgstr "" +msgstr "geluid aan" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 msgid "play" -msgstr "" +msgstr "afspelen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 msgid "pause" -msgstr "" +msgstr "pauze" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 msgid "movie time" -msgstr "" +msgstr "afspeelduur" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 msgid "timeline slider thumb" @@ -941,68 +931,67 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 msgid "back 30 seconds" -msgstr "" +msgstr "30 seconden terug" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 msgid "return to realtime" -msgstr "" +msgstr "terug naar realtime" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 msgid "elapsed time" -msgstr "" +msgstr "verstreken tijd" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 msgid "remaining time" -msgstr "" +msgstr "tijd te gaan" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 -#, fuzzy msgid "status" -msgstr "Status" +msgstr "status" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 msgid "fullscreen" -msgstr "" +msgstr "volledig scherm" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 msgid "fast forward" -msgstr "" +msgstr "snel vooruit" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 msgid "fast reverse" -msgstr "" +msgstr "snel achteruit" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 msgid "show closed captions" -msgstr "" +msgstr "ondertiteling tonen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 msgid "hide closed captions" -msgstr "" +msgstr "ondertiteling verbergen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 msgid "audio element playback controls and status display" -msgstr "" +msgstr "afspeelbesturing en statusweergave audio-element" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 msgid "video element playback controls and status display" -msgstr "" +msgstr "afspeelbesturing en statusweergave video-element" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 msgid "mute audio tracks" -msgstr "" +msgstr "audiosporen dempen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 msgid "unmute audio tracks" -msgstr "" +msgstr "audiosporen laten horen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 msgid "begin playback" -msgstr "" +msgstr "afspelen beginnen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 msgid "pause playback" -msgstr "" +msgstr "afspelen pauzeren" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 msgid "movie time scrubber" @@ -1014,73 +1003,72 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 msgid "seek movie back 30 seconds" -msgstr "" +msgstr "30 seconden terugzoeken in film" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 msgid "return streaming movie to real time" -msgstr "" +msgstr "terugkeren naar realtime in streamende film" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 msgid "current movie time in seconds" -msgstr "" +msgstr "huidige filmtijd in seconden" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 msgid "number of seconds of movie remaining" -msgstr "" +msgstr "aantal seconden film te gaan" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 msgid "current movie status" -msgstr "" +msgstr "huidige filmstatus" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 msgid "seek quickly back" -msgstr "" +msgstr "snel achteruit zoeken" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 msgid "seek quickly forward" -msgstr "" +msgstr "snel vooruit zoeken" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 msgid "Play movie in fullscreen mode" -msgstr "" +msgstr "Film afspelen in volledig scherm" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 msgid "start displaying closed captions" -msgstr "" +msgstr "beginnen met tonen van ondertiteling" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 msgid "stop displaying closed captions" -msgstr "" +msgstr "stoppen met tonen van ondertiteling" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 -#, fuzzy msgid "indefinite time" -msgstr "definitie" +msgstr "onbepaalde tijd" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 msgid "value missing" -msgstr "" +msgstr "waarde ontbreekt" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 msgid "type mismatch" -msgstr "" +msgstr "type komt niet overeen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 msgid "pattern mismatch" -msgstr "" +msgstr "patroon komt niet overeen" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 msgid "too long" -msgstr "" +msgstr "te lang" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 msgid "range underflow" -msgstr "" +msgstr "onder bereik" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 msgid "range overflow" -msgstr "" +msgstr "over bereik" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" -msgstr "" +msgstr "stap komt niet overeen" diff --git a/WebKit/gtk/po/pa.po b/WebKit/gtk/po/pa.po index 19ac98d..418192e 100644 --- a/WebKit/gtk/po/pa.po +++ b/WebKit/gtk/po/pa.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2009-04-09 19:09-0300\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: 2010-02-18 18:25+0530\n" "Last-Translator: A S Alam <aalam@users.sf.net>\n" "Language-Team: Punjabi/Panjabi <kde-i18n-doc@kde.org>\n" @@ -15,12 +15,12 @@ msgstr "" "X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:425 +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 msgid "Upload File" msgstr "ਫਾਇਲ ਅੱਪਲੋਡ" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:139 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 msgid "Input _Methods" msgstr "ਇੰਪੁੱਟ ਢੰਗ(_M)" @@ -65,631 +65,1031 @@ msgid "ZWNJ Zero width _non-joiner" msgstr "ZWNJ ਸਿਫ਼ਰ ਚੌੜਾਈ ਨਾ-ਜੁਆਇੰਨਰ(_n)" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:134 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" msgstr "ਯੂਨੀਕੋਡ ਕੰਟਰੋਲ ਕਰੈਕਟਰ ਪਾਉ(_I)" -#: WebKit/gtk/webkit/webkitdownload.cpp:250 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "ਨੈੱਟਵਰਕ ਮੰਗ" -#: WebKit/gtk/webkit/webkitdownload.cpp:251 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "URL ਲਈ ਨੈੱਟਵਰਕ ਮੰਗ, ਜਿਸ ਨੂੰ ਡਾਊਨਲੋਡ ਕੀਤਾ ਜਾਣਾ ਹੈ" -#: WebKit/gtk/webkit/webkitdownload.cpp:265 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#, fuzzy +msgid "Network Response" +msgstr "ਨੈੱਟਵਰਕ ਮੰਗ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:282 +#, fuzzy +msgid "The network response for the URI that should be downloaded" +msgstr "URL ਲਈ ਨੈੱਟਵਰਕ ਮੰਗ, ਜਿਸ ਨੂੰ ਡਾਊਨਲੋਡ ਕੀਤਾ ਜਾਣਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "ਟਿਕਾਣਾ URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:266 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "ਟਿਕਾਣਾ URI, ਜਿੱਥੇ ਫਾਇਲ ਸੰਭਾਲਣੀ ਹੈ" -#: WebKit/gtk/webkit/webkitdownload.cpp:280 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "ਸੁਝਾਇਆ ਫਾਇਲ-ਨਾਂ" -#: WebKit/gtk/webkit/webkitdownload.cpp:281 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "ਜਦੋਂ ਸੰਭਾਲਿਆ ਜਾਂਦਾ ਹੋਵੇ ਤਾਂ ਡਿਫਾਲਟ ਸੁਝਾਇਆ ਫਾਇਲ-ਨਾਂ" -#: WebKit/gtk/webkit/webkitdownload.cpp:294 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "ਤਰੱਕੀ" -#: WebKit/gtk/webkit/webkitdownload.cpp:295 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "ਡਾਊਨਲੋਡ ਦੀ ਮੌਜੂਦ ਤਰੱਕੀ ਜਾਣੋ" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "ਹਾਲਤ" -#: WebKit/gtk/webkit/webkitdownload.cpp:309 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "ਮੌਜੂਦਾ ਡਾਊਨਲੋਡ ਦੀ ਹਾਲਤ ਜਾਣੋ" -#: WebKit/gtk/webkit/webkitdownload.cpp:324 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "ਮੌਜੂਦਾ ਸਾਈਜ਼" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "ਪਹਿਲਾਂ ਹੀ ਡਾਊਨਲੋਡ ਕੀਤੇ ਗਏ ਡਾਟੇ ਦੀ ਲੰਬਾਈ" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "ਕੁੱਲ ਸਾਈਜ਼" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "ਫਾਇਲ ਦਾ ਕੁੱਲ ਸਾਈਜ਼" -#: WebKit/gtk/webkit/webkitdownload.cpp:469 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "ਯੂਜ਼ਰ ਨੇ ਡਾਊਨਲੋਡ ਰੱਦ ਕੀਤਾ" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "ਸਾਈਟ %s ਨੇ ਯੂਜ਼ਰ ਨਾਂ ਅਤੇ ਪਾਸਵਰਡ ਦੀ ਮੰਗ ਕੀਤੀ ਹੈ" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "ਯੂਜ਼ਰ ਨਾਂ:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "ਪਾਸਵਰਡ:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:281 -msgid "Remember password" +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 +#, fuzzy +msgid "_Remember password" msgstr "ਪਾਸਵਰਡ ਯਾਦ ਰੱਖੋ" -#: WebKit/gtk/webkit/webkitwebframe.cpp:211 +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" msgstr "ਨਾਂ" -#: WebKit/gtk/webkit/webkitwebframe.cpp:212 +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 msgid "The name of the frame" msgstr "ਫਰੇਮ ਦਾ ਨਾਂ" -#: WebKit/gtk/webkit/webkitwebframe.cpp:218 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:154 -#: WebKit/gtk/webkit/webkitwebview.cpp:1715 +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "ਟਾਈਟਲ" -#: WebKit/gtk/webkit/webkitwebframe.cpp:219 +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 msgid "The document title of the frame" msgstr "ਫਰੇਮ ਦਾ ਡੌਕੂਮੈਂਟ ਟਾਈਟਲ" -#: WebKit/gtk/webkit/webkitwebframe.cpp:225 -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:186 -#: WebKit/gtk/webkit/webkitwebview.cpp:1729 +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "URI" -#: WebKit/gtk/webkit/webkitwebframe.cpp:226 +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" msgstr "ਫਰੇਮ ਵਲੋਂ ਵੇਖਾਈ ਜਾ ਰਹੀ ਸਮੱਗਰੀ ਦਾ ਮੌਜੂਦਾ URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:155 +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +#, fuzzy +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "ਡਾਊਨਲੋਡ ਦੀ ਮੌਜੂਦ ਤਰੱਕੀ ਜਾਣੋ" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +#, fuzzy +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "ਡਾਊਨਲੋਡ ਦੀ ਮੌਜੂਦ ਤਰੱਕੀ ਜਾਣੋ" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" msgstr "ਅਤੀਤ ਆਈਟਮ ਦਾ ਟਾਈਟਲ" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:170 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" msgstr "ਬਦਲਵਾਂ ਟਾਈਟਲ" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:171 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" msgstr "ਅਤੀਤ ਆਈਟਮ ਦਾ ਬਦਲਵਾਂ ਟਾਈਟਲ" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:187 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" msgstr "ਅਤੀਤ ਆਈਟਮ ਦਾ URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:202 -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:167 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" msgstr "ਅਸਲ URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:203 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" msgstr "ਅਤੀਤ ਆਈਟਮ ਦਾ ਅਸਲੀ URI" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:218 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" msgstr "ਆਖਰੀ ਵਾਰ ਖੋਲ੍ਹਣ ਸਮਾਂ" -#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:219 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" msgstr "ਸਮਾਂ, ਜਿਸ ਦੌਰਾਨ ਅਤੀਤ ਆਈਟਮ ਨੂੰ ਖੋਲ੍ਹਿਆ ਗਿਆ ਸੀ" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:260 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" msgstr "ਵੈੱਬ ਝਲਕ" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:261 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" msgstr "ਵੈੱਬ ਝਲਕ, ਜੋ ਕਿ ਵੈੱਬ ਇੰਸਪੈਕਟਰ ਖੁਦ ਰੈਂਡਰ ਕਰਦਾ ਹੈ" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:274 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" msgstr "ਜਾਂਚਿਆ URI" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:275 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" msgstr "URI ਜੋ ਇਸ ਸਮੇਂ ਜਾਂਚਿਆ ਜਾ ਰਿਹਾ ਹੈ" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:291 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" msgstr "ਜਾਵਾਸਕ੍ਰਿਪਟ ਪਰੋਫਾਇਲਿੰਗ ਯੋਗ" -#: WebKit/gtk/webkit/webkitwebinspector.cpp:292 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." msgstr "ਜਾਵਾਸਕ੍ਰਿਪਟ ਚਲਾਉਣ ਲਈ ਪਰੋਫਾਇਲ" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:152 +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +#, fuzzy +msgid "Enable Timeline profiling" +msgstr "ਜਾਵਾਸਕ੍ਰਿਪਟ ਪਰੋਫਾਇਲਿੰਗ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 msgid "Reason" msgstr "ਕਾਰਨ" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:153 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" msgstr "ਕਾਰਨ ਕਿ ਕਿਉਂ ਇਹ ਨੇਵੀਗੇਸ਼ਨ ਹੋਈ" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:168 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" msgstr "URI, ਜੋ ਕਿ ਨੇਵੀਗੇਸ਼ਨ ਲਈ ਟਾਰਗੇਟ ਵਜੋਂ ਚਾਹੀਦਾ ਹੈ" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:180 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" msgstr "ਬਟਨ" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:181 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" msgstr "ਕਲਿੱਕ ਕਰਨ ਵਰਤਣ ਵਾਸਤੇ ਬਟਨ" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:196 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" msgstr "ਮਾਡੀਫਾਇਰ ਹਾਲਤ" -#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:197 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" msgstr "ਬਿਟਮਾਸਕ ਮਾਡੀਫਾਈਰ ਸਵਿੱਚਾਂ ਦੀ ਹਾਲਤ ਵੇਖਾਉਦਾ ਹੈ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:129 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +#, fuzzy +msgid "Target frame" +msgstr "ਫਰੇਮ ਦਾ ਨਾਂ" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "URI, ਜੋ ਕਿ ਨੇਵੀਗੇਸ਼ਨ ਲਈ ਟਾਰਗੇਟ ਵਜੋਂ ਚਾਹੀਦਾ ਹੈ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "ਡਿਫਾਲਟ ਇੰਕੋਡਿੰਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:130 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "ਵੇਖਾਏ ਜਾ ਰਹੇ ਟੈਕਸਟ ਲਈ ਡਿਫਾਲਟ ਇੰਕੋਡਿੰਗ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:138 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "ਕਰਸਵ ਫੋਂਟ ਵਰਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:139 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਕਰਸਵ ਫੋਂਟ ਵਰਗ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:147 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "ਡਿਫਾਲਟ ਫੋਂਟ ਵਰਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:148 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਫੋਂਟ ਵਰਗ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:156 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "ਫੈਂਸੀ ਫੋਂਟ ਵਰਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:157 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਫੈਂਸੀ ਫੋਂਟ ਵਰਗ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:165 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "ਮੋਨੋਸਪੇਸ ਫੋਂਟ ਵਰਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:166 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "ਡਿਫਾਲਟ ਫੋਂਟ ਵਰਗ, ਜੋ ਮੋਨੋਸਪੇਸ ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣਾ ਹੈ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:174 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "ਸੈਨਜ਼ ਸੈਰੀਫ਼ ਫੋਂਟ ਵਰਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:175 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਸੈਨਜ਼ ਸੈਰੀਫ਼ ਫੋਂਟ ਵਰਗ ਹੈ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:183 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "ਸੈਰੀਫ਼ ਫੋਂਟ ਵਰਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:184 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਡਿਫਾਲਟ ਸੈਰੀਫ਼ ਫੋਂਟ ਵਰਗ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:192 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "ਡਿਫਾਲਟ ਫੋਂਟ ਸਾਈਜ਼" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:193 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਫੋਂਟ ਸਾਈਜ਼।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:201 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "ਡਿਫਾਲਟ ਮੋਨੋਸਮਪੇਸ ਫੋਂਟ ਸਾਈਜ਼" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:202 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "ਡਿਫਾਲਟ ਫੋਂਟ ਸਾਈਜ਼, ਜੋ ਮੋਨੋਸਪੇਸ ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤਣਾ ਹੈ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:210 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "ਘੱਟੋ-ਘੱਟ ਫੋਂਟ ਸਾਈਜ਼" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:211 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਵਰਤੇ ਜਾਣ ਵਾਸਤੇ ਘੱਟੋ-ਘੱਟ ਫੋਟ ਸਾਈਜ਼।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:219 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "ਘੱਟੋ-ਘੱਟ ਲਾਜ਼ੀਕਲ ਫੋਂਟ ਸਾਈਜ਼" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:220 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "ਡਿਸਪਲੇਅ ਟੈਕਸਟ ਵੇਖਾਉਣ ਲਈ ਘੱਟੋ-ਘੱਟ ਲਾਜ਼ੀਕਲ ਫੋਂਟ ਸਾਈਜ਼ ਹੈ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "96 DPI ਲਈ ਮਜ਼ਬੂਰ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "੯੬ DPI ਦੇ ਰੈਜ਼ੋਲੂਸ਼ਨ ਲਈ ਮਜ਼ਬੂਰ ਕਰੋ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "ਚਿੱਤਰ ਆਟੋ ਲੋਡ ਕਰੋ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "ਚਿੱਤਰ ਆਟੋਮੈਟਿਕ ਲੋਡ ਕਰੋ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "ਚਿੱਤਰ ਆਟੋ ਸੁੰਘੜੋ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "ਇੱਕਲੇ ਚਿੱਤਰਾਂ ਨੂੰ ਫਿੱਟ ਕਰਨ ਲਈ ਆਟੋਮੈਟਿਕ ਸੁੰਘੜੋ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "ਬੈਕਗਰਾਊਂਡ ਪਰਿੰਟ ਕਰੋ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "ਕੀ ਬੈਕਗਰਾਊਂਡ ਚਿੱਤਰਾਂ ਨੂੰ ਛਾਪਣਾ ਹੈ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "ਸਕ੍ਰਿਪਟਾਂ ਯੋਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "ਇੰਬੈੱਡ ਸਕ੍ਰਿਪਟ ਭਾਸ਼ਾਵਾਂ ਚਾਲੂ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "ਪਲੱਗਇਨ ਯੋਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "ਇੰਬੈੱਡ ਪਲੱਗਇਨ ਆਬਜੈਕਟ ਚਾਲੂ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "ਮੁੜ-ਆਕਾਰ ਯੋਗ ਟੈਕਸਟ ਖੇਤਰ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "ਕੀ ਟੈਕਸਟ ਖੇਤਰ ਮੁੜ-ਆਕਾਰ ਯੋਗ ਹੈ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "ਯੂਜ਼ਰ ਸਟਾਇਲਸ਼ੀਟ URI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "ਸਟਾਈਲਸ਼ੀਟ ਦਾ URI, ਜੋ ਕਿ ਹਰੇਕ ਪੇਜ਼ ਉੱਤੇ ਲਾਗੂ ਹੈ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:317 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "ਜ਼ੂਮ ਸਟਿੱਪਿੰਗ ਮੁੱਲ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "ਜਦੋਂ ਜ਼ੂਮ ਇਨ ਜਾਂ ਆਉਟ ਕੀਤਾ ਜਾਵੇ ਤਾਂ ਜ਼ੂਮ ਲੈਵਲ ਬਦਲਣ ਦਾ ਮੁੱਲ ਹੈ।" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:336 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "ਡਿਵੈਲਪਰ ਐਕਸਟਰਾ ਯੋਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:337 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "ਖਾਸ ਇਕਸਟੈਨਸ਼ਨ ਚਾਲੂ ਕਰਦਾ ਹੈ, ਜੋ ਡਿਵੈਲਪਰਾਂ ਲਈ ਸਹਾਇਕ ਹੈ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "ਪ੍ਰਾਈਵੇਟ ਬਰਾਊਜ਼ਿੰਗ ਯੋਗ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "ਪ੍ਰਾਈਵੇਟ ਬਰਾਊਜ਼ਡ ਮੋਡ ਚਾਲੂ ਕਰੋ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 +msgid "Enable Spell Checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 +#, fuzzy +msgid "Enables spell checking while typing" +msgstr "ਲਿਖਣ ਦੇ ਦੌਰਾਨ ਹੀ ਸਪੈਲਿੰਗ ਚੈੱਕ ਕਰੋ(_T)" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 +msgid "Languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 +#, fuzzy +msgid "Enable Caret Browsing" +msgstr "ਪ੍ਰਾਈਵੇਟ ਬਰਾਊਜ਼ਿੰਗ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 +msgid "Enable HTML5 Database" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 +msgid "Whether to enable HTML5 database support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 +msgid "Enable HTML5 Local Storage" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 +#, fuzzy +msgid "Enable XSS Auditor" +msgstr "ਸਕ੍ਰਿਪਟਾਂ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 +msgid "Whether to enable teh XSS auditor" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 +msgid "User Agent" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 +msgid "The User-Agent string used by WebKitGtk" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 +msgid "JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 +msgid "Whether JavaScript can open windows automatically" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 +msgid "Enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 +msgid "Whether to enable offline web application cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 +msgid "Editing behavior" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 +msgid "The behavior mode to use in editing mode" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 +msgid "Whether to allow universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 +#, fuzzy +msgid "Enable DOM paste" +msgstr "ਸਕ੍ਰਿਪਟਾਂ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 +msgid "Whether to enable DOM paste" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 +msgid "Tab key cycles through elements" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 +msgid "Enable Default Context Menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 +msgid "Enable Site Specific Quirks" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 +msgid "Enable page cache" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 +#, fuzzy +msgid "Whether the page cache should be used" +msgstr "ਕੀ ਬੈਕਗਰਾਊਂਡ ਚਿੱਤਰਾਂ ਨੂੰ ਛਾਪਣਾ ਹੈ।" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 +msgid "Auto Resize Window" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "ਜਾਵਾਸਕ੍ਰਿਪਟ ਪਰੋਫਾਇਲਿੰਗ ਯੋਗ" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "@web_view ਦਾ ਡੌਕੂਮੈਂਟ ਟਾਈਟਲ ਦਿੰਦਾ ਹੈ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1730 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "@web_view ਵਲੋਂ ਵੇਖਾਈ ਜਾ ਰਹੀ ਸਮੱਗਰੀ ਦਾ ਮੌਜੂਦਾ URI ਦਿੰਦਾ ਹੈ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1743 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "ਟਾਰਗੇਟ ਲਿਸਟ ਕਾਪੀ ਕਰੋ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1744 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "ਕਲਿੱਪਬੋਰਡ ਕਾਪੀ ਕਰਨ ਲਈ ਇਸ ਵੈੱਬ ਝਲਕ ਸਹਿਯੋਗ ਵਾਸਤੇ ਟਾਰਗੇਟ ਦੀ ਲਿਸਟ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1757 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "ਟਾਰਗੇਟ ਲਿਸਟ ਚੇਪੋ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1758 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "ਕਲਿੱਪਬੋਰਡ ਪੇਸਟਿੰਗ ਲਈ ਇਸ ਵੈੱਬ ਝਲਕ ਸਹਿਯੋਗ ਵਾਸਤੇ ਟਾਰਗੇਟ ਦੀ ਲਿਸਟ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1764 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "ਸੈਟਿੰਗ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1765 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "ਸਬੰਧਤ WebKitWebSettings ਮੌਕਾ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1778 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "ਵੈੱਬ ਇੰਸਪੈਕਟਰ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1779 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "ਸਬੰਧਤ WebKitWebInspector ਮੌਕਾ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1799 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "ਸੋਧਯੋਗ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1800 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "ਕੀ ਸਮੱਗਰੀ ਨੂੰ ਯੂਜ਼ਰ ਵਲੋਂ ਸੋਧਿਆ ਜਾ ਸਕਦਾ ਹੈ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1806 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "ਟਰਾਂਸਪਰੇਟ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1807 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "ਕੀ ਸਮੱਗਰੀ ਦੀ ਪਾਰਦਰਸ਼ੀ ਬੈਕਗਰਾਊਂਡ ਹੋਵੇ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1820 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "ਜ਼ੂਮ ਲੈਵਲ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1821 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "ਸਮੱਗਰੀ ਦਾ ਜ਼ੂਮ ਲੈਵਲ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1836 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "ਪੂਰੀ ਸਮੱਗਰੀ ਜ਼ੂਮ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1837 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "ਜਦੋਂ ਜ਼ੂਮ ਕਰਨਾ ਹੋਵੇ ਤਾਂ ਕੀ ਪੂਰੀ ਸਮਗੱਰੀ ਕਰਨੀ ਹੈ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1850 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "ਇੰਕੋਡਿੰਗ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1851 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "ਵੈਬ ਝਲਕ ਲਈ ਡਿਫਾਲਟ ਇੰਕੋਡਿੰਗ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1864 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "ਪਸੰਦੀਦਾ ਇੰਕੋਡਿੰਗ" -#: WebKit/gtk/webkit/webkitwebview.cpp:1865 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "ਵੈੱਬ ਝਲਕ ਲਈ ਕਸਟਮ ਇੰਕੋਡਿੰਗ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:51 -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:56 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 +msgid "Icon URI" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 msgid "Submit" msgstr "ਭੇਜੋ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 msgid "Reset" msgstr "ਮੁੜ-ਸੈੱਟ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:66 -msgid "_Searchable Index" -msgstr "ਖੋਜਯੋਗ ਇੰਡੈਕਸ(_S)" +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 +msgid "This is a searchable index. Enter search keywords: " +msgstr "" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:71 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" msgstr "ਫਾਇਲ ਚੁਣੋ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:76 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 msgid "(None)" msgstr "(ਕੋਈ ਨਹੀਂ)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:81 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 msgid "Open Link in New _Window" msgstr "ਲਿੰਕ ਨਵੀਂ ਵਿੰਡੋ ਵਿੱਚ ਖੋਲ੍ਹੋ(_W)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:86 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 msgid "_Download Linked File" msgstr "ਲਿੰਕ ਕੀਤੀ ਫਾਇਲ ਡਾਊਨਲੋਡ ਕਰੋ(_D)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:91 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 msgid "Copy Link Loc_ation" msgstr "ਲਿੰਕ ਟਿਕਾਣਾ ਕਾਪੀ ਕਰੋ(_a)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:96 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 msgid "Open _Image in New Window" msgstr "ਚਿੱਤਰ ਨਵੀਂ ਵਿੰਡੋ ਵਿੱਚ ਖੋਲ੍ਹੋ(_I)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:101 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 msgid "Sa_ve Image As" msgstr "ਚਿੱਤਰ ਇੰਝ ਸੰਭਾਲੋ(_v)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:106 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 msgid "Cop_y Image" msgstr "ਚਿੱਤਰ ਕਾਪੀ ਕਰੋ(_y)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:111 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 msgid "Open _Frame in New Window" msgstr "ਫਰੇਮ ਨਵੀਂ ਵਿੰਡੋ ਵਿੱਚ ਖੋਲ੍ਹੋ(_F)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:162 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 msgid "_Reload" msgstr "ਮੁੜ-ਲੋਡ ਕਰੋ(_R)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:179 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 msgid "No Guesses Found" msgstr "ਕੋਈ ਸੁਝਾਅ ਨਹੀਂ ਲੱਭਿਆ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:184 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 msgid "_Ignore Spelling" msgstr "ਸਪੈਲਿੰਗ ਅਣਡਿੱਠੇ(_I)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:189 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 msgid "_Learn Spelling" msgstr "ਸਪੈਲਿੰਗ ਸਿੱਖੋ(_L)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:194 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 msgid "_Search the Web" msgstr "ਵੈੱਬ ਉੱਤੇ ਖੋਜ(_S)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:199 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 msgid "_Look Up in Dictionary" msgstr "ਡਿਕਸ਼ਨਰੀ ਵਿੱਚ ਖੋਜੋ(_L)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:204 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 msgid "_Open Link" msgstr "ਲਿੰਕ ਖੋਲ੍ਹੋ(_O)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:209 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 msgid "Ignore _Grammar" msgstr "ਗਰਾਮਰਡ ਅਣਡਿੱਠੀ(_G)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:214 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 msgid "Spelling and _Grammar" msgstr "ਸਪੈਲਿੰਗ ਅਤੇ ਗਰਾਮਰ(_G)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Show Spelling and Grammar" msgstr "ਸਪੈਲਿੰਗ ਅਤੇ ਗਰਾਮਰ ਵੇਖੋ(_S)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:219 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 msgid "_Hide Spelling and Grammar" msgstr "ਸਪੈਲਿੰਗ ਅਤੇ ਗਰਾਮਰ ਓਹਲੇ(_H)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:224 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 msgid "_Check Document Now" msgstr "ਡੌਕੂਮੈਂਟ ਹੁਣੇ ਚੈੱਕ ਕਰੋ(_C)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:229 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 msgid "Check Spelling While _Typing" msgstr "ਲਿਖਣ ਦੇ ਦੌਰਾਨ ਹੀ ਸਪੈਲਿੰਗ ਚੈੱਕ ਕਰੋ(_T)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:234 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 msgid "Check _Grammar With Spelling" msgstr "ਗਰਾਮਰ ਨਾਲ ਸਪੈਲਿੰਗ ਚੈੱਕ ਕਰੋ(_G)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:239 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 msgid "_Font" msgstr "ਫੋਂਟ(_F)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:262 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 msgid "_Outline" msgstr "ਆਉਟਲਾਈਨ(_O)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:267 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" msgstr "ਐਲੀਮੈਂਟ ਜਾਂਚੋ(_E)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:272 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" msgstr "ਕੋਈ ਤਾਜ਼ਾ ਖੋਜ ਨਹੀਂ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:277 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 msgid "Recent searches" msgstr "ਤਾਜ਼ਾ ਖੋਜ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:282 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 msgid "_Clear recent searches" msgstr "ਤਾਜ਼ਾ ਖੋਜਾਂ ਸਾਫ਼ ਕਰੋ(_C)" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:287 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 msgid "term" msgstr "ਸ਼ਬਦ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:292 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 msgid "definition" msgstr "ਪ੍ਰੀਭਾਸ਼ਾ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:297 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 msgid "press" msgstr "ਦੱਬੋ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:302 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 msgid "select" msgstr "ਚੁਣੋ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:307 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 msgid "activate" msgstr "ਐਕਟੀਵੇਟ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:312 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 msgid "uncheck" msgstr "ਅਣ-ਚੋਣ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:317 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 msgid "check" msgstr "ਚੋਣ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:322 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 msgid "jump" msgstr "ਜੰਪ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:328 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 msgid " files" msgstr " ਫਾਇਲਾਂ" -#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:333 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 msgid "Unknown" msgstr "ਅਣਜਾਣ" +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +#, fuzzy +msgid "status" +msgstr "ਹਾਲਤ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +#, fuzzy +msgid "indefinite time" +msgstr "ਪ੍ਰੀਭਾਸ਼ਾ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "" +#~ msgid "_Searchable Index" +#~ msgstr "ਖੋਜਯੋਗ ਇੰਡੈਕਸ(_S)" diff --git a/WebKit/gtk/po/pt.po b/WebKit/gtk/po/pt.po new file mode 100644 index 0000000..b99048d --- /dev/null +++ b/WebKit/gtk/po/pt.po @@ -0,0 +1,1096 @@ +# webkit's Portuguese translation. +# This file is put in the public domain. +# António Lima <amrlima@gmail.com>, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: webkit 1.1.22\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" +"PO-Revision-Date: 2010-03-08 01:09+0000\n" +"Last-Translator: António Lima <amrlima@gmail.com>\n" +"Language-Team: gnome_pt@yahoogroups.com\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.5.1\n" + +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 +msgid "Upload File" +msgstr "Enviar Ficheiro" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 +msgid "Input _Methods" +msgstr "_Métodos de Introdução" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 +msgid "LRM _Left-to-right mark" +msgstr "LMR marca e_squerda-para-direita" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 +msgid "RLM _Right-to-left mark" +msgstr "RLM marca _direita-para-esquerda" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 +msgid "LRE Left-to-right _embedding" +msgstr "LRE _embutidura esquerda-para-direita" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 +msgid "RLE Right-to-left e_mbedding" +msgstr "RLE e_mbutidura direita-para-esquerda" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 +msgid "LRO Left-to-right _override" +msgstr "LRO s_obrepor esquerda-para-direita" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 +msgid "RLO Right-to-left o_verride" +msgstr "RLO so_brepor direita-para-esquerda" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 +msgid "PDF _Pop directional formatting" +msgstr "PDF formatação direccional _Pop" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 +msgid "ZWS _Zero width space" +msgstr "ZWS espaço de largura _zero" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 +msgid "ZWJ Zero width _joiner" +msgstr "ZWJ _união de largura zero" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 +msgid "ZWNJ Zero width _non-joiner" +msgstr "ZWNJ _não união de largura zero" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 +msgid "_Insert Unicode Control Character" +msgstr "_Inserir Carácter de Controlo Unicode" + +#: WebKit/gtk/webkit/webkitdownload.cpp:266 +msgid "Network Request" +msgstr "Pedido de Rede" + +#: WebKit/gtk/webkit/webkitdownload.cpp:267 +msgid "The network request for the URI that should be downloaded" +msgstr "O pedido de rede para o URI que deve ser transferido" + +#: WebKit/gtk/webkit/webkitdownload.cpp:281 +msgid "Network Response" +msgstr "Resposta de Rede" + +#: WebKit/gtk/webkit/webkitdownload.cpp:282 +msgid "The network response for the URI that should be downloaded" +msgstr "A resposta de rede para o URI que deve ser transferido" + +#: WebKit/gtk/webkit/webkitdownload.cpp:296 +msgid "Destination URI" +msgstr "URI de Destino" + +#: WebKit/gtk/webkit/webkitdownload.cpp:297 +msgid "The destination URI where to save the file" +msgstr "O URI de destino onde gravar o ficheiro" + +#: WebKit/gtk/webkit/webkitdownload.cpp:311 +msgid "Suggested Filename" +msgstr "Nome de Ficheiro Sugerido" + +#: WebKit/gtk/webkit/webkitdownload.cpp:312 +msgid "The filename suggested as default when saving" +msgstr "O nome de ficheiro sugerido por omissão ao gravar" + +#: WebKit/gtk/webkit/webkitdownload.cpp:329 +msgid "Progress" +msgstr "Progresso" + +#: WebKit/gtk/webkit/webkitdownload.cpp:330 +msgid "Determines the current progress of the download" +msgstr "Determina o processo actual da transferência" + +#: WebKit/gtk/webkit/webkitdownload.cpp:343 +msgid "Status" +msgstr "Estado" + +#: WebKit/gtk/webkit/webkitdownload.cpp:344 +msgid "Determines the current status of the download" +msgstr "Determina o estado actual da transferência" + +#: WebKit/gtk/webkit/webkitdownload.cpp:359 +msgid "Current Size" +msgstr "Tamanho Actual" + +#: WebKit/gtk/webkit/webkitdownload.cpp:360 +msgid "The length of the data already downloaded" +msgstr "O tamanho dos dados já transferidos" + +#: WebKit/gtk/webkit/webkitdownload.cpp:374 +msgid "Total Size" +msgstr "Tamanho Total" + +#: WebKit/gtk/webkit/webkitdownload.cpp:375 +msgid "The total size of the file" +msgstr "O tamanho total do ficheiro" + +#: WebKit/gtk/webkit/webkitdownload.cpp:526 +msgid "User cancelled the download" +msgstr "O utilizador cancelou a transferência" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 +#, c-format +msgid "A username and password are being requested by the site %s" +msgstr "Um nome de utilizador e senha estão a ser pedidos pelo site %s" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "Mensagem do servidor:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 +msgid "Username:" +msgstr "Nome de Utilizador:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 +msgid "Password:" +msgstr "Senha:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 +msgid "_Remember password" +msgstr "_Recordar senha" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 +msgid "Name" +msgstr "Nome" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 +msgid "The name of the frame" +msgstr "O nome da moldura" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 +msgid "Title" +msgstr "Título" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 +msgid "The document title of the frame" +msgstr "O título de documento da moldura" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 +msgid "URI" +msgstr "URI" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 +msgid "The current URI of the contents displayed by the frame" +msgstr "O URI actual dos conteúdos apresentados pela moldura" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "Política da Barra de Deslocamento Horizontal" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "" +"Determina a política actual para a barra de deslocamento horizontal da " +"moldura." + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "Política da Barra de Deslocamento Vertical" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "" +"Determina a política actual para a barra de deslocamento vertical da " +"moldura." + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 +msgid "The title of the history item" +msgstr "O titulo do item do histórico" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 +msgid "Alternate Title" +msgstr "Título Alternativo" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 +msgid "The alternate title of the history item" +msgstr "O titulo alternativo do item do histórico" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 +msgid "The URI of the history item" +msgstr "O URI do item do histórico" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 +msgid "Original URI" +msgstr "URI Original" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 +msgid "The original URI of the history item" +msgstr "O URI original do item do histórico" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 +msgid "Last visited Time" +msgstr "Hora da última visita" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 +msgid "The time at which the history item was last visited" +msgstr "A hora à qual o item do histórico foi visitado pela última vez" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 +msgid "Web View" +msgstr "Vista Web" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 +msgid "The Web View that renders the Web Inspector itself" +msgstr "A vista Web que renderiza o próprio Web Inspector" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 +msgid "Inspected URI" +msgstr "URI Inspeccionado" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 +msgid "The URI that is currently being inspected" +msgstr "O URI que se encontra actualmente a ser inspeccionado" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 +msgid "Enable JavaScript profiling" +msgstr "Activar Perfilar JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 +msgid "Profile the executed JavaScript." +msgstr "Perfilar o JavaScript executado." + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +msgid "Enable Timeline profiling" +msgstr "Activar perfilar linha temporal" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "Perfilar a instrumentação WebCore." + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 +msgid "Reason" +msgstr "Razão" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 +msgid "The reason why this navigation is occurring" +msgstr "A razão pela qual esta navegação está a ocorrer" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 +msgid "The URI that was requested as the target for the navigation" +msgstr "O URI que foi pedido como alvo para a navegação" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 +msgid "Button" +msgstr "Botão" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 +msgid "The button used to click" +msgstr "O botão utilizado para clicar" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 +msgid "Modifier state" +msgstr "Estado do modificador" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 +msgid "A bitmask representing the state of the modifier keys" +msgstr "Uma bitmask representando o estado das chaves do modificador" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +msgid "Target frame" +msgstr "Moldura alvo" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +msgid "The target frame for the navigation" +msgstr "A moldura alvo para a navegação" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 +msgid "Default Encoding" +msgstr "Codificação Por Omissão" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 +msgid "The default encoding used to display text." +msgstr "A codificação por omissão utilizada para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 +msgid "Cursive Font Family" +msgstr "Família de Fonte Cursive" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 +msgid "The default Cursive font family used to display text." +msgstr "A família de fonte Cursive utilizada por omissão para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 +msgid "Default Font Family" +msgstr "Família de Fonte Por Omissão" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 +msgid "The default font family used to display text." +msgstr "A família de fonte utilizada por omissão para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 +msgid "Fantasy Font Family" +msgstr "Família de Fonte Fantasy" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 +msgid "The default Fantasy font family used to display text." +msgstr "A família de fonte Fantasy utilizada por omissão para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 +msgid "Monospace Font Family" +msgstr "Família de Fonte Mono-espaçada" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 +msgid "The default font family used to display monospace text." +msgstr "" +"A família de fonte mono-espaçada utilizada por omissão para apresentar " +"texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 +msgid "Sans Serif Font Family" +msgstr "Família de Fonte Sem Serifa" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 +msgid "The default Sans Serif font family used to display text." +msgstr "" +"A família de fonte Sem Serifa utilizada por omissão para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 +msgid "Serif Font Family" +msgstr "Família de Fonte Serifa" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 +msgid "The default Serif font family used to display text." +msgstr "A família de fonte Serifa utilizada por omissão para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 +msgid "Default Font Size" +msgstr "Tamanho de Fonte Por Omissão" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +msgid "The default font size used to display text." +msgstr "O tamanho de fonte utilizado por omissão para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 +msgid "Default Monospace Font Size" +msgstr "Tamanho de Fonte Mono-espaçada Por Omissão" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 +msgid "The default font size used to display monospace text." +msgstr "O tamanho de fonte mono-espaçada utilizado para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +msgid "Minimum Font Size" +msgstr "Tamanho Mínimo de Fonte" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 +msgid "The minimum font size used to display text." +msgstr "O tamanho mínimo de fonte utilizado para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 +msgid "Minimum Logical Font Size" +msgstr "Tamanho Mínimo de Fonte Lógica" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 +msgid "The minimum logical font size used to display text." +msgstr "O tamanho mínimo de fonte lógica utilizado para apresentar texto." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 +msgid "Enforce 96 DPI" +msgstr "Forçar 96 DPI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 +msgid "Enforce a resolution of 96 DPI" +msgstr "Forçar uma resolução de 96 DPI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 +msgid "Auto Load Images" +msgstr "Carregar Imagens Automaticamente" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +msgid "Load images automatically." +msgstr "Carregar imagens automaticamente." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 +msgid "Auto Shrink Images" +msgstr "Diminuir Imagens Automaticamente" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 +msgid "Automatically shrink standalone images to fit." +msgstr "Diminuir automaticamente imagens individuais para caber." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 +msgid "Print Backgrounds" +msgstr "Imprimir Fundos" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 +msgid "Whether background images should be printed." +msgstr "Se as imagens de fundo devem ser impressas." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 +msgid "Enable Scripts" +msgstr "Activar Scripts" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 +msgid "Enable embedded scripting languages." +msgstr "Activar linguagens procedimentais embutidas." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 +msgid "Enable Plugins" +msgstr "Activar Plugins" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 +msgid "Enable embedded plugin objects." +msgstr "Activar objectos plugin embutidos." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 +msgid "Resizable Text Areas" +msgstr "Áreas de Texto Redimensionáveis" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 +msgid "Whether text areas are resizable." +msgstr "Se as áreas de texto são redimensionáveis." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 +msgid "User Stylesheet URI" +msgstr "URI de Folha de Estilos do Utilizador" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 +msgid "The URI of a stylesheet that is applied to every page." +msgstr "O URI de uma folha de estilos que é aplicada a todas as páginas." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 +msgid "Zoom Stepping Value" +msgstr "Valor de Alteração de Zoom" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 +msgid "The value by which the zoom level is changed when zooming in or out." +msgstr "" +"O valor pelo qual o nível de zoom é alterado ao ser aumentado ou diminuído." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 +msgid "Enable Developer Extras" +msgstr "Activar Extras de Programador" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 +msgid "Enables special extensions that help developers" +msgstr "Activar extensões especiais que ajudam os programadores" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 +msgid "Enable Private Browsing" +msgstr "Activar Navegação Privada" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 +msgid "Enables private browsing mode" +msgstr "Activa o modo de navegação privada" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 +msgid "Enable Spell Checking" +msgstr "Activar Verificação Ortográfica" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 +msgid "Enables spell checking while typing" +msgstr "Activa a verificação ortográfica ao escrever" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 +msgid "Languages to use for spell checking" +msgstr "Idiomas a utilizar para verificação ortográfica" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 +msgid "Comma separated list of languages to use for spell checking" +msgstr "" +"Lista separada por vírgulas de idiomas a utilizar na verificação ortográfica" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 +msgid "Enable Caret Browsing" +msgstr "Activar Navegação com Cursor" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" +"Se deve ser activada a navegação com teclado melhorada para acessibilidade" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 +msgid "Enable HTML5 Database" +msgstr "Activar Base de Dados HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 +msgid "Whether to enable HTML5 database support" +msgstr "Se deve ser activado o suporte a base de dados HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 +msgid "Enable HTML5 Local Storage" +msgstr "Activar Armazenamento Local HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "Se deve ser activado o suporte a armazenamento local HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 +msgid "Enable XSS Auditor" +msgstr "Activar Auditor XSS" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 +msgid "Whether to enable teh XSS auditor" +msgstr "Se deve ser activado o auditor XSS" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 +msgid "User Agent" +msgstr "Agente de Utilizador" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 +msgid "The User-Agent string used by WebKitGtk" +msgstr "A cadeia de caracteres de Agente de Utilizador utilizada pelo WebKitGtk" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 +msgid "JavaScript can open windows automatically" +msgstr "JavaScript pode abrir janelas automaticamente" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 +msgid "Whether JavaScript can open windows automatically" +msgstr "Se o JavaScript pode abrir janelas automaticamente" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 +msgid "Enable offline web application cache" +msgstr "Activar cache de aplicações web em modo desligado" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 +msgid "Whether to enable offline web application cache" +msgstr "Se deve ser activada a cache de aplicações web em modo desligado" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 +msgid "Editing behavior" +msgstr "Comportamento de edição" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 +msgid "The behavior mode to use in editing mode" +msgstr "O modo de comportamento utilizar no modo de edição" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 +msgid "Enable universal access from file URIs" +msgstr "Activar acesso universal a partir de URIs de ficheiro" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 +msgid "Whether to allow universal access from file URIs" +msgstr "Se deve ser activado o acesso universal a partir de URIs de ficheiro" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 +msgid "Enable DOM paste" +msgstr "Activar colar DOM" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 +msgid "Whether to enable DOM paste" +msgstr "Se deve ser activado o colar DOM" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 +msgid "Tab key cycles through elements" +msgstr "Tecla Tab circula pelos elementos" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 +msgid "Whether the tab key cycles through elements on the page." +msgstr "Se a tecla tab circula pelos elementos da página." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 +msgid "Enable Default Context Menu" +msgstr "Activar Menu de Contexto por Omissão" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" +"Activa a gestão de cliques com o botão direito para a criação do menu de " +"contexto por omissão" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 +msgid "Enable Site Specific Quirks" +msgstr "Activar Truques Específicos da Página" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 +msgid "Enables the site-specific compatibility workarounds" +msgstr "Activar as formas de contornar problemas específicas da página" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 +msgid "Enable page cache" +msgstr "Activar cache de página" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 +msgid "Whether the page cache should be used" +msgstr "Se a cache da página deve ser utilizada" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 +msgid "Auto Resize Window" +msgstr "Redimensionar Janela Automaticamente" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" +"Redimensionar automaticamente janela do nível superior quando é pedido pela " +"página" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +msgid "Enable Java Applet" +msgstr "Activar Applet Java" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "Se o suporte a Java Applet por <applet> deve estar activo" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 +msgid "Returns the @web_view's document title" +msgstr "Devolve o título de documento @web_view" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 +msgid "Returns the current URI of the contents displayed by the @web_view" +msgstr "Devolve o URI actual dos conteúdos apresentados pelo @web_view" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 +msgid "Copy target list" +msgstr "Copiar lista de destinos" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 +msgid "The list of targets this web view supports for clipboard copying" +msgstr "" +"A lista de destinos que esta vista web suporta para cópia da área de " +"transferência" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 +msgid "Paste target list" +msgstr "Colar lista de destinos" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 +msgid "The list of targets this web view supports for clipboard pasting" +msgstr "" +"A lista de destinos que esta vista web suporta para colagem da área de " +"transferência" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 +msgid "Settings" +msgstr "Definições" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 +msgid "An associated WebKitWebSettings instance" +msgstr "Uma instância associada WebKitWebSettings" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 +msgid "Web Inspector" +msgstr "Inspector Web" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 +msgid "The associated WebKitWebInspector instance" +msgstr "A instância associada WebKitWebInspector" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 +msgid "Editable" +msgstr "Possível Editar" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 +msgid "Whether content can be modified by the user" +msgstr "Se o conteúdo pode ser modificado pelo utilizador" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 +msgid "Transparent" +msgstr "Transparente" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 +msgid "Whether content has a transparent background" +msgstr "Se o conteúdo possui um fundo transparente" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 +msgid "Zoom level" +msgstr "Nível de zoom" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 +msgid "The level of zoom of the content" +msgstr "O nível de zoom do conteúdo" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 +msgid "Full content zoom" +msgstr "Zoom total de conteúdo" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 +msgid "Whether the full content is scaled when zooming" +msgstr "Se todo o conteúdo é escalado ao alterar o zoom" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 +msgid "Encoding" +msgstr "Codificação" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 +msgid "The default encoding of the web view" +msgstr "A codificação por omissão da vista web" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 +msgid "Custom Encoding" +msgstr "Codificação Personalizada" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 +msgid "The custom encoding of the web view" +msgstr "A codificação personalizada da vista web" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 +msgid "Icon URI" +msgstr "URI do Ícone" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "O URI do favicon para a #WebKitWebView." + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 +msgid "Submit" +msgstr "Submeter" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 +msgid "Reset" +msgstr "Reiniciar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 +msgid "This is a searchable index. Enter search keywords: " +msgstr "Este é um índice que permite procura. Digite palavras de procura:" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 +msgid "Choose File" +msgstr "Escolher Ficheiro" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 +msgid "(None)" +msgstr "(Nenhum)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 +msgid "Open Link in New _Window" +msgstr "Abrir Link numa Nova _Janela" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 +msgid "_Download Linked File" +msgstr "_Transferir Ficheiro Ligado" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 +msgid "Copy Link Loc_ation" +msgstr "Copiar Loc_alização do Link" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 +msgid "Open _Image in New Window" +msgstr "Abrir _Imagem em Nova Janela" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 +msgid "Sa_ve Image As" +msgstr "Gra_var Imagem Como" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 +msgid "Cop_y Image" +msgstr "Cop_iar Imagem" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 +msgid "Open _Frame in New Window" +msgstr "Abrir _Moldura em Nova Janela" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 +msgid "_Reload" +msgstr "_Reler" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 +msgid "No Guesses Found" +msgstr "Nenhum Palpite Encontrado" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 +msgid "_Ignore Spelling" +msgstr "_Ignorar Ortografia" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 +msgid "_Learn Spelling" +msgstr "_Aprender Ortografia" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 +msgid "_Search the Web" +msgstr "_Procurar na Web" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 +msgid "_Look Up in Dictionary" +msgstr "_Verificar no Dicionário" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 +msgid "_Open Link" +msgstr "_Abrir Link" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 +msgid "Ignore _Grammar" +msgstr "Ignorar _Gramática" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 +msgid "Spelling and _Grammar" +msgstr "Ortografia e _Gramática" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Show Spelling and Grammar" +msgstr "_Mostrar Ortografia e Gramática" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Hide Spelling and Grammar" +msgstr "_Ocultar Ortografia e Gramática" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 +msgid "_Check Document Now" +msgstr "_Verificar Documento Agora" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 +msgid "Check Spelling While _Typing" +msgstr "Verificar Ortografia ao _Digitar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 +msgid "Check _Grammar With Spelling" +msgstr "Verificar _Gramática com Ortografia" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 +msgid "_Font" +msgstr "_Fonte" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 +msgid "_Outline" +msgstr "C_ontorno" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 +msgid "Inspect _Element" +msgstr "Inspeccionar _Elemento" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 +msgid "No recent searches" +msgstr "Nenhuma pesquisa recente" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 +msgid "Recent searches" +msgstr "Pesquisas recentes" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 +msgid "_Clear recent searches" +msgstr "_Limpar pesquisas recentes" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 +msgid "term" +msgstr "termo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 +msgid "definition" +msgstr "definição" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 +msgid "press" +msgstr "pressionar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 +msgid "select" +msgstr "seleccionar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 +msgid "activate" +msgstr "activar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 +msgid "uncheck" +msgstr "desmarcar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 +msgid "check" +msgstr "marcar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 +msgid "jump" +msgstr "saltar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 +msgid " files" +msgstr " ficheiros" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 +msgid "Unknown" +msgstr "Desconhecido" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "A Carregar..." + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "Transmissão ao Vivo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "controlador de elemento de áudio" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "controlador de elemento de vídeo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "silenciar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "ligar" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "reproduzir" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "pausa" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "tempo de filme" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "deslocador de linha temporal thumb" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "para trás 30 segundos" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "voltar ao tempo real" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "tempo decorrido" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "tempo restante" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +msgid "status" +msgstr "estado" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "ecrã completo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "avançar rápido" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "retroceder rápido" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "mostrar legendas fechadas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "ocultar legendas fechadas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "controlos de reprodução de elemento áudio e apresentação de estado" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "controlos de reprodução de elemento vídeo e apresentação de estado" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "silenciar faixas áudio" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "ligar faixas áudio" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "iniciar reprodução" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "pausar reprodução" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "scrubber de tempo de filme " + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "scrubber thumb de tempo de filme " + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "retroceder filme 30 segundos" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "colocar filme em fluxo para tempo real" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "tempo actual do filme em segundos" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "número de segundos de filme remanescentes" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "estado actual do filme" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "retroceder rapidamente" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "avançar rapidamente" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "Reproduzir filme em modo de ecrã completo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "começar a apresentar legendas fechadas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "parar de apresentar legendas fechadas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +msgid "indefinite time" +msgstr "tempo indefinido" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "valor em falta" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "tipo não coincidente" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "padrão não coincidente" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "demasiado longo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "underflow de intervalo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "overflow de intervalo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "passo não coincidente" diff --git a/WebKit/gtk/po/pt_BR.po b/WebKit/gtk/po/pt_BR.po index 403a53b..026bb2c 100644 --- a/WebKit/gtk/po/pt_BR.po +++ b/WebKit/gtk/po/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: 2009-04-15 21:39-0300\n" "Last-Translator: Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>\n" "Language-Team: Brazilian Portuguese\n" @@ -68,90 +68,94 @@ msgstr "ZWNJ _Não-união de largura zero" msgid "_Insert Unicode Control Character" msgstr "_Inserir caractere de controle Unicode" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "Requisição de Rede" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "A requisição de rede para a URI que deve ser baixada" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 #, fuzzy msgid "Network Response" msgstr "Requisição de Rede" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 #, fuzzy msgid "The network response for the URI that should be downloaded" msgstr "A requisição de rede para a URI que deve ser baixada" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "URI de Destino" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "A URI de destino, onde deve ser salvo o arquivo" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "Nome de Arquivo Sugerido" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "O nome de arquivo que deve ser usado como padrão ao salvar" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Progresso" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "Determina o progresso atual do download" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Estado" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Determina o estado atual do download" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Tamanho Atual" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "A quantidade de dados já baixados" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Tamanho total" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "O tamanho total do arquivo" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "Usuário cancelou o download" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "Usuário e senha estão sendo pedidos pelo sítio %s" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "Usuário:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "Senha:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 #, fuzzy msgid "_Remember password" msgstr "Lembrar senha" @@ -166,7 +170,7 @@ msgstr "O nome do quadro" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Título" @@ -176,7 +180,7 @@ msgstr "O título do documento do quadro" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "URI" @@ -307,422 +311,431 @@ msgstr "O nome do quadro" msgid "The target frame for the navigation" msgstr "A URI que foi requisitada como alvo para a navegação" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "Codificação Padrão" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "A codificação padrão usada para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "Família de Fontes Cursivas" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "A família de fontes cursivas padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "Família de Fontes Padrão" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "A família de fontes padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "Família de Fontes Fantasia" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "A família de fontes fantasia padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "Família de Fontes Mono-espaçadas" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "A família de fontes mono-espaçadas padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "Família de Fontes Sem Serifa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "A família de fontes sem serifa padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "Família de Fontes Com Serifa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "A família de fontes com serifa padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "Tamanho de Fonte Padrão" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "O tamanho de fonte padrão para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "Tamanho de fonte mono-espaçada padrão" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "O tamanho de fonte padrão para exibir texto com fonte mono-espaçada." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "Tamanho Mínimo de Fonte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "O tamanho mínimo de fontes usadas para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "Tamanho de Fonte Mínimo Lógico" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "O tamanho lógico mínimo de fontes usadas para exibir texto." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "Forçar 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "Força uma resolução de 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "Auto-carregamento de Imagens" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "Carregar imagens automaticamente." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "Auto-Diminuição de Imagens" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "Automaticamente diminuir imagens sozinhas para caber na tela." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "Imprimir Fundos" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "Se as imagens de fundo devem ser impressas." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "Habilitar Scripts" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "Habilitar linguagens de script embutidas." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "Habilitar Plugins" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "Habilitar objetos de plugins embutidos." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "Áreas de Texto Redimensionáveis" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "Se as áreas de texto devem ser redimensionáveis." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "URI da Folha de Estilo do Usuário" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "A URI de uma folha de estilo que é aplicada a todas as páginas." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "Valor de Passo do Zoom" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "O valor da variação do zoom ao aproximar ou distanciar." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "Habilitar Extas de Desenvolvimento" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "Habilita extensões especiais que auxiliam desenvolvedores" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "Habilitar Navegação Privativa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "Habilita o modo de navegação privativa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 #, fuzzy msgid "Enables spell checking while typing" msgstr "Verifiação _Ortográfica ao Digitar" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 #, fuzzy msgid "Enable Caret Browsing" msgstr "Habilitar Navegação Privativa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 #, fuzzy msgid "Enable XSS Auditor" msgstr "Habilitar Scripts" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 #, fuzzy msgid "Enable DOM paste" msgstr "Habilitar Scripts" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 #, fuzzy msgid "Whether the page cache should be used" msgstr "Se as imagens de fundo devem ser impressas." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "Habilitar análise de desempenho de JavaScript" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "Retorna o título da visão web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Retorna a URI do conteúdo atualmente exibido pela visão web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "Lista de alvos de cópia" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "" "A lista de alvos que essa visão web suporta para cópia para área de " "transferência" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "Lista de alvos de cola" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" "A lista de alvos que essa visão web suporta para cola da área de " "transferência" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "Configurações" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "Uma instância de WebKitWebSettings associada" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "Inspetor Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "A instância de WebKitWebInspector que está associada a essa visão" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "Editável" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "Se o conteúdo pode ser modificado pelo usuário" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "Transparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "Se o conteúdo tem um fundo transparente" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "Nível de Zoom" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "O nível de zoom do conteúdo" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "Zoom Completo do Conteúdo" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "Se todo o conteúdo é redimensionado no zoom" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "Codificação" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "A codificação padrão da visão web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "Codificação Customizada" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "A codificação customizada da visão web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -736,8 +749,8 @@ msgid "Reset" msgstr "Limpar" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "Índice de bu_sca" +msgid "This is a searchable index. Enter search keywords: " +msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -1081,5 +1094,8 @@ msgstr "" msgid "step mismatch" msgstr "" +#~ msgid "_Searchable Index" +#~ msgstr "Índice de bu_sca" + #~ msgid "Select _All" #~ msgstr "Selecionar _Tudo" diff --git a/WebKit/gtk/po/ru.po b/WebKit/gtk/po/ru.po index b8038cc..248a921 100644 --- a/WebKit/gtk/po/ru.po +++ b/WebKit/gtk/po/ru.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit git\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: \n" "Last-Translator: Anton Shestakov <engored@ya.ru>\n" "Language-Team: Russian\n" @@ -69,90 +69,94 @@ msgstr "ZWNJ Нулевой ра_зъединитель" msgid "_Insert Unicode Control Character" msgstr "Вст_авить управляющий символ Юникод" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "Сетевой запрос" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "Сетевой запрос для заданного URI, который должен быть выполнен" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 #, fuzzy msgid "Network Response" msgstr "Сетевой запрос" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 #, fuzzy msgid "The network response for the URI that should be downloaded" msgstr "Сетевой запрос для заданного URI, который должен быть выполнен" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "URI назначения" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "Конечный URI для сохранения файла" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "Предлагаемое имя файла" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "Имя файла, которое предлагается при загрузке по умолчанию" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Прогресс" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "Текущий прогресс загрузки" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Состояние" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Текущее состояния загрузки" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Текущий размер" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "Объём уже загруженных данных" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Общий размер" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "Общий размер файла" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "Передача прервана пользователем" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "Для сайта %s требуется ввод имени пользователя и пароля" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "Имя пользователя:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "Пароль:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 #, fuzzy msgid "_Remember password" msgstr "Запомнить пароль" @@ -167,7 +171,7 @@ msgstr "Имя фрейма" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Заголовок" @@ -177,7 +181,7 @@ msgstr "Заголовок документа фрейма" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "URI" @@ -308,419 +312,428 @@ msgstr "Имя фрейма" msgid "The target frame for the navigation" msgstr "URI, который был указан в запросе на переход" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "Кодировка по умолчанию" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "Кодировка текста по умолчанию." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "Семейство курсивного шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "Семейство курсивного шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "Семейство шрифта по умолчанию" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "Семейство шрифта по умолчанию для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "Семейство декоративного шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "Семейство декоративного шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "Семейство моноширинного шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "Семейство моноширинного шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "Семейство шрифта без засечек" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "Семейство шрифта без засечек для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "Семейство шрифта с засечками" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "Семейство шрифта с засечками для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "Размер шрифта по умолчанию" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "Размер шрифта по умолчанию для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "Размер моноширинного шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "Размер моноширинного шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "Минимальный размер шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "Минимальный размер шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "Минимальный логический размер шрифта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "Минимальный логический размер шрифта для отображения текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "Всегда использовать 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "Принудительно использовать разрешение 96 точек на дюйм" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "Загружать изображения автоматически" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "Загружать изображения автоматически." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "Масштабировать изображения автоматически" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "Автоматически уменьшать отдельные изображения по размеру экрана." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "Печатать фоновые изображения" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "Должны ли быть выведены на печать фоновые изображения." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "Выполнять сценарии" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "Выполнять встроенные сценарии на страницах." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "Использовать модули" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "Разрешить встроенные объекты модулей на страницах." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "Изменяемый размер текстовых полей" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "Текстовые поля могут изменять размер." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "URI пользовательской таблицы стилей" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "URI таблицы стилей, которая будет применена для всех страниц." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "Приращение масштаба" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "Значение, на которое будет изменяться значение масштаба." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "Включить средства разработчика" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "Включить особые расширения, которые могут быть полезны разработчикам" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "Включить конфиденциальный режим" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "Включает конфиденциальный режим просмотра" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "Проверять орфографию" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 msgid "Enables spell checking while typing" msgstr "Выполнять проверку орфографии при вводе текста" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "Языки для проверки орфографии" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" "Список языков через запятую, которые будут использоваться для проверки " "орфографии" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 msgid "Enable Caret Browsing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 #, fuzzy msgid "Enable XSS Auditor" msgstr "Выполнять сценарии" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 #, fuzzy msgid "Enable DOM paste" msgstr "Выполнять сценарии" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 #, fuzzy msgid "Enable page cache" msgstr "Проверять орфографию" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 #, fuzzy msgid "Whether the page cache should be used" msgstr "Должны ли быть выведены на печать фоновые изображения." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "Включить профилирование JavaScript" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "Настройки" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "Связанный экземпляр WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "Веб-инспектор" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "Связанный экземпляр WebKitWebInspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "Изменяемое" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "Может ли содержимое быть изменено пользователем" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "Прозрачное" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "Имеется ли у содержимого прозрачный фон" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "Масштаб" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "Масштаб содержимого страницы" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "Кодировка" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "Особая кодировка" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -734,7 +747,7 @@ msgid "Reset" msgstr "Сброс" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" +msgid "This is a searchable index. Enter search keywords: " msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 diff --git a/WebKit/gtk/po/sl.po b/WebKit/gtk/po/sl.po new file mode 100644 index 0000000..22dcd8f --- /dev/null +++ b/WebKit/gtk/po/sl.po @@ -0,0 +1,1093 @@ +# Slovenian translation of webkit. +# Copyright (C) 2002-2007 Free Software Foundation, Inc. +# This file is distributed under the same license as the webkit package. +# +# Matej Urbančič <mateju@svn.gnome.org>, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: webkit HEAD\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" +"PO-Revision-Date: 2010-03-14 21:30+0100\n" +"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n" +"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n" +"X-Poedit-Country: SLOVENIA\n" +"X-Poedit-Language: Slovenian\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535 +msgid "Upload File" +msgstr "Naloži datoteko" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 +msgid "Input _Methods" +msgstr "_Načini vnosa" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 +msgid "LRM _Left-to-right mark" +msgstr "LRM oznaka _Leva-proti-desni" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 +msgid "RLM _Right-to-left mark" +msgstr "RLM oznaka _Desna-proti-levi" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 +msgid "LRE Left-to-right _embedding" +msgstr "LRE _Leva-proti-desni _vgradnja" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 +msgid "RLE Right-to-left e_mbedding" +msgstr "RLE Desna-proti-levi v_gradnja" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 +msgid "LRO Left-to-right _override" +msgstr "LRO Leva-proti-desni _prepis" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 +msgid "RLO Right-to-left o_verride" +msgstr "RLO Desna-proti-levi p_repis" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 +msgid "PDF _Pop directional formatting" +msgstr "PDF _Odprto usmerjeno oblikovanje" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 +msgid "ZWS _Zero width space" +msgstr "ZWS Presledek _nične dolžine" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 +msgid "ZWJ Zero width _joiner" +msgstr "ZWJ _združevalnik nične širine" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 +msgid "ZWNJ Zero width _non-joiner" +msgstr "ZWNJ _razdruževalnik nične širine" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 +msgid "_Insert Unicode Control Character" +msgstr "_Vstavi nadzorni znak Unicode" + +#: WebKit/gtk/webkit/webkitdownload.cpp:266 +msgid "Network Request" +msgstr "Omrežna zahteva" + +#: WebKit/gtk/webkit/webkitdownload.cpp:267 +msgid "The network request for the URI that should be downloaded" +msgstr "Zahteva omrežja za naslov URI, ki naj bo prejet" + +#: WebKit/gtk/webkit/webkitdownload.cpp:281 +msgid "Network Response" +msgstr "Omrežni odziv" + +#: WebKit/gtk/webkit/webkitdownload.cpp:282 +msgid "The network response for the URI that should be downloaded" +msgstr "Odgovor omrežja za naslov URI, ki naj bo prejet" + +#: WebKit/gtk/webkit/webkitdownload.cpp:296 +msgid "Destination URI" +msgstr "Ciljni URI" + +#: WebKit/gtk/webkit/webkitdownload.cpp:297 +msgid "The destination URI where to save the file" +msgstr "Ciljni naslov URI kamor bo shranjena datoteka" + +#: WebKit/gtk/webkit/webkitdownload.cpp:311 +msgid "Suggested Filename" +msgstr "Predlog imena datoteke" + +#: WebKit/gtk/webkit/webkitdownload.cpp:312 +msgid "The filename suggested as default when saving" +msgstr "Privzeto uporabljeno ime datoteke med shranjevanjem" + +#: WebKit/gtk/webkit/webkitdownload.cpp:329 +msgid "Progress" +msgstr "Napredek" + +#: WebKit/gtk/webkit/webkitdownload.cpp:330 +msgid "Determines the current progress of the download" +msgstr "Zazna trenutni napredek prejemanja" + +#: WebKit/gtk/webkit/webkitdownload.cpp:343 +msgid "Status" +msgstr "Stanje" + +#: WebKit/gtk/webkit/webkitdownload.cpp:344 +msgid "Determines the current status of the download" +msgstr "Zazna trenutno stanje prejemanja" + +#: WebKit/gtk/webkit/webkitdownload.cpp:359 +msgid "Current Size" +msgstr "Trenutna velikost" + +#: WebKit/gtk/webkit/webkitdownload.cpp:360 +msgid "The length of the data already downloaded" +msgstr "Količina že prejetih podatkov" + +#: WebKit/gtk/webkit/webkitdownload.cpp:374 +msgid "Total Size" +msgstr "Skupna velikost" + +#: WebKit/gtk/webkit/webkitdownload.cpp:375 +msgid "The total size of the file" +msgstr "Velikost datoteke" + +#: WebKit/gtk/webkit/webkitdownload.cpp:526 +msgid "User cancelled the download" +msgstr "Uporabnik je preklical prejemanje" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 +#, c-format +msgid "A username and password are being requested by the site %s" +msgstr "Za obisk strani %s sta zahtevana uporabniško ime in geslo." + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "Sporočilo strežnika:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 +msgid "Username:" +msgstr "Uporabniško ime:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 +msgid "Password:" +msgstr "Geslo:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 +msgid "_Remember password" +msgstr "Za_pomni si geslo" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:298 +msgid "Name" +msgstr "Ime" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 +msgid "The name of the frame" +msgstr "Ime okvirja" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:305 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 +msgid "Title" +msgstr "Naslov" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 +msgid "The document title of the frame" +msgstr "Naslov dokumenta okvirja" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:312 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 +msgid "URI" +msgstr "URI" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 +msgid "The current URI of the contents displayed by the frame" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:344 +msgid "Horizontal Scrollbar Policy" +msgstr "Obnašanje vodoravnega drsnika" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +msgid "Determines the current policy for the horizontal scrollbar of the frame." +msgstr "Določa trenutno obnašanje vodoravnega drsnika okvirja" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:362 +msgid "Vertical Scrollbar Policy" +msgstr "Obnašanje navpičnega drsnika" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "Določa trenutno obnašanje navpičnega drsnika okvirja" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 +msgid "The title of the history item" +msgstr "Naslov predmeta zgodovine" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 +msgid "Alternate Title" +msgstr "Drugotni naslov" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 +msgid "The alternate title of the history item" +msgstr "Drugotni naslov predmeta zgodovine" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 +msgid "The URI of the history item" +msgstr "Naslov URI predmeta zgodovine" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 +msgid "Original URI" +msgstr "Osnovni URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 +msgid "The original URI of the history item" +msgstr "Osnovni naslov URI predmeta zgodovine" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 +msgid "Last visited Time" +msgstr "Čas zadnjega obiska" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 +msgid "The time at which the history item was last visited" +msgstr "Čas ob katerem je bil predmet zgodovine zadnjič obiskan" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 +msgid "Web View" +msgstr "Spletni pogled" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 +msgid "The Web View that renders the Web Inspector itself" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 +#, fuzzy +msgid "Inspected URI" +msgstr "Osnovni URI" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 +msgid "The URI that is currently being inspected" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 +msgid "Enable JavaScript profiling" +msgstr "Omogoči profiliranje JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 +msgid "Profile the executed JavaScript." +msgstr "Profiliraj izveden JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +msgid "Enable Timeline profiling" +msgstr "Omogoči profiliranje časovnice" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +#, fuzzy +msgid "Profile the WebCore instrumentation." +msgstr "Ime profila vstavkov" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 +msgid "Reason" +msgstr "Vzrok" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 +msgid "The reason why this navigation is occurring" +msgstr "Vzrok, zakaj se krmarjenje pojavlja" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 +#, fuzzy +msgid "The URI that was requested as the target for the navigation" +msgstr "Naslov URI zahtevan za ciljno mesto" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 +msgid "Button" +msgstr "Gumb" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 +msgid "The button used to click" +msgstr "Gumb uporabljen za klik" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 +msgid "Modifier state" +msgstr "Stanje spremenilnika" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 +msgid "A bitmask representing the state of the modifier keys" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +msgid "Target frame" +msgstr "Ciljni okvir" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy +msgid "The target frame for the navigation" +msgstr "Osnovni URL ciljnega okvirja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 +msgid "Default Encoding" +msgstr "Privzet nabor znakov" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 +msgid "The default encoding used to display text." +msgstr "Pisava nabor znakov za prikazovanje besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 +msgid "Cursive Font Family" +msgstr "Družina pisave Cursive" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 +msgid "The default Cursive font family used to display text." +msgstr "Privzeta družina pisave Cursive za prikaz besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 +msgid "Default Font Family" +msgstr "Privzeta družina pisave" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 +msgid "The default font family used to display text." +msgstr "Privzeta družina pisave za prikaz besedila" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 +msgid "Fantasy Font Family" +msgstr "Družina pisave Fantasy" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 +msgid "The default Fantasy font family used to display text." +msgstr "Privzeta družina pisave Fantasy za prikaz besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 +msgid "Monospace Font Family" +msgstr "Družina pisave Monospace" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 +msgid "The default font family used to display monospace text." +msgstr "Privzeta družina pisave za prikaz monospace besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 +msgid "Sans Serif Font Family" +msgstr "Družina pisave Sans Serif" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 +msgid "The default Sans Serif font family used to display text." +msgstr "Privzeta družina pisave San Serif za prikaz besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 +msgid "Serif Font Family" +msgstr "Družina pisave Serif" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 +msgid "The default Serif font family used to display text." +msgstr "Privzeta družina pisave Serif za prikaz besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 +msgid "Default Font Size" +msgstr "Privzeta velikost pisave" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 +msgid "The default font size used to display text." +msgstr "Privzeta velikost pisave za prikaz besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 +msgid "Default Monospace Font Size" +msgstr "Privzeta velikost pisave Monospace" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 +msgid "The default font size used to display monospace text." +msgstr "Privzeta velikost pisave za prikaz monospace besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 +msgid "Minimum Font Size" +msgstr "Najmanjša velikost pisave" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 +msgid "The minimum font size used to display text." +msgstr "Najmanjša velikost pisave uporabljena za prikazovanje besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 +msgid "Minimum Logical Font Size" +msgstr "Najmanjša logična velikost pisave" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 +msgid "The minimum logical font size used to display text." +msgstr "Najmanjša logična velikost pisave za prikazovanje besedila." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 +msgid "Enforce 96 DPI" +msgstr "Vsili 96 DPI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 +msgid "Enforce a resolution of 96 DPI" +msgstr "Vsili ločljivost 96 DPI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 +msgid "Auto Load Images" +msgstr "Samodejno naloži slike" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 +msgid "Load images automatically." +msgstr "Samodejno nalaganje slik." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 +msgid "Auto Shrink Images" +msgstr "Samodejno skrči velikost okna" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 +msgid "Automatically shrink standalone images to fit." +msgstr "Samodejno skrči samostojne slike na širino okna." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 +msgid "Print Backgrounds" +msgstr "Natisni _ozadja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 +msgid "Whether background images should be printed." +msgstr "Ali naj bo mogoče slike ozadja natisniti" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 +msgid "Enable Scripts" +msgstr "Omogoči skripte" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 +msgid "Enable embedded scripting languages." +msgstr "Omogoči izvajanje skript skriptnih jezikov" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 +msgid "Enable Plugins" +msgstr "Omogoči vstavke" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 +msgid "Enable embedded plugin objects." +msgstr "Omogoči predmete vstavkov" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 +msgid "Resizable Text Areas" +msgstr "Prilagodljiva besedilna območja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 +msgid "Whether text areas are resizable." +msgstr "Ali je mogoče besedilna polja prilagajati po velikosti." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 +msgid "User Stylesheet URI" +msgstr "Naslov URI uporabniške slogovne predloge" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 +msgid "The URI of a stylesheet that is applied to every page." +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 +msgid "Zoom Stepping Value" +msgstr "Vrednost koraka približevanja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 +msgid "The value by which the zoom level is changed when zooming in or out." +msgstr "Vrednost, ki določa raven približevanja med približevanjem ali oddaljevanjem slike." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 +msgid "Enable Developer Extras" +msgstr "Omogoči dodatna razvojna orodja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 +msgid "Enables special extensions that help developers" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 +msgid "Enable Private Browsing" +msgstr "Omogoči zasebno brskanje" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 +msgid "Enables private browsing mode" +msgstr "Omogoči način varnega zasebnega brskanja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 +msgid "Enable Spell Checking" +msgstr "Omogoči črkovanje" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 +msgid "Enables spell checking while typing" +msgstr "Omogoči preverjanje črkovanja med tipkanjem" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 +msgid "Languages to use for spell checking" +msgstr "Izbor jezika za preverjanje črkovanja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 +msgid "Comma separated list of languages to use for spell checking" +msgstr "Z vejico ločen seznam jezikov za črkovanje" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 +msgid "Enable Caret Browsing" +msgstr "Omogoči brskanje s kazalko" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 +msgid "Enable HTML5 Database" +msgstr "Omogoči HTML5 podatkovno zbirko" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 +msgid "Whether to enable HTML5 database support" +msgstr "Ali naj se omogoči podpora HTML podatkovne zbirke" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 +msgid "Enable HTML5 Local Storage" +msgstr "Omogoči hTML5 krajevno shranjevanje" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "Ali naj se omogoči podpora HTML krajevnega shranjevanja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 +msgid "Enable XSS Auditor" +msgstr "Omogoči XSS Auditor" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 +msgid "Whether to enable teh XSS auditor" +msgstr "Ali naj se omogoči XSS auditor" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 +msgid "User Agent" +msgstr "Uporabniški agent" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 +msgid "The User-Agent string used by WebKitGtk" +msgstr "Niz uporabniškega agenta, ki ga uporablja WebKitGtk" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 +msgid "JavaScript can open windows automatically" +msgstr "JavaScript program lahko samodejno odpre okno" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 +msgid "Whether JavaScript can open windows automatically" +msgstr "Ali je mogoče z JavaScript programom samodejno odpreti okno" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 +msgid "Enable offline web application cache" +msgstr "Omogoči predpomnilnik za brskanje vsebine brez povezave" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 +msgid "Whether to enable offline web application cache" +msgstr "Ali naj bo omogočen predpomnilnik programa za brskanje brez povezave" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 +msgid "Editing behavior" +msgstr "Obnašanje urejanja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 +msgid "The behavior mode to use in editing mode" +msgstr "Način obnašanja uporabljen v načinu urejanja" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 +msgid "Enable universal access from file URIs" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 +msgid "Whether to allow universal access from file URIs" +msgstr "Ali je dovoljen splošen dostop preko naslova URI datoteke" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 +msgid "Enable DOM paste" +msgstr "Omogoči DOM prilepljenje" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 +msgid "Whether to enable DOM paste" +msgstr "Ali naj bo omogočeno DOM prilepljenje" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 +msgid "Tab key cycles through elements" +msgstr "Tipka tab kroži med predmeti" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 +msgid "Whether the tab key cycles through elements on the page." +msgstr "Ali tipka tab kroži med predmeti na strani." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 +msgid "Enable Default Context Menu" +msgstr "Omogoči privzeti vsebinski meni" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 +msgid "Enables the handling of right-clicks for the creation of the default context menu" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 +#, fuzzy +msgid "Enable Site Specific Quirks" +msgstr "Poganjanje posebnega ukaza za spletišče" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 +msgid "Enables the site-specific compatibility workarounds" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 +msgid "Enable page cache" +msgstr "Omogoči predpomnilnik strani" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 +msgid "Whether the page cache should be used" +msgstr "Ali naj bo uporabljen predpomnilnik strani" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 +msgid "Auto Resize Window" +msgstr "Samodejno prilagodi velikost okna" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "Samodejno prilagodi velikost vrhnjega okna, kadar to zahteva stran" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +msgid "Enable Java Applet" +msgstr "Omogoči Java aplet" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "Ali je omogočena podpora za Java aplete preko oznake <applet>" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 +msgid "Returns the @web_view's document title" +msgstr "Vrne @web_pogled naslov dokumenta" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 +msgid "Returns the current URI of the contents displayed by the @web_view" +msgstr "Vrne trenutni naslov URI vsebine prikazane preko @web_pogleda" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 +msgid "Copy target list" +msgstr "Kopiraj seznam ciljev" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 +#, fuzzy +msgid "The list of targets this web view supports for clipboard copying" +msgstr "Seznam ciljev katerih medpomnilnik podpira možnost kopiraj v odložišče in DND vire." + +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 +msgid "Paste target list" +msgstr "Prilepi seznam ciljev" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 +#, fuzzy +msgid "The list of targets this web view supports for clipboard pasting" +msgstr "Seznam ciljev katerih medpomnilnik podpira možnost prilepi v odložišče in DND cilje." + +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 +msgid "Settings" +msgstr "Nastavitve" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 +msgid "An associated WebKitWebSettings instance" +msgstr "Povezan primerek WebKitWebSettings" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 +msgid "Web Inspector" +msgstr "Spletni nadzornik" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 +msgid "The associated WebKitWebInspector instance" +msgstr "Povezan primerek WebKitWebInspector" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 +msgid "Editable" +msgstr "Uredljivo" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 +msgid "Whether content can be modified by the user" +msgstr "Ali lahko uporabnik spremeni vsebino" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 +msgid "Transparent" +msgstr "Prozorno" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 +msgid "Whether content has a transparent background" +msgstr "Ali ima vsebina prozorno ozadje" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 +msgid "Zoom level" +msgstr "Raven približanja" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 +msgid "The level of zoom of the content" +msgstr "Raven približanja vsebine" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 +msgid "Full content zoom" +msgstr "Polno približanje vsebine" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 +msgid "Whether the full content is scaled when zooming" +msgstr "Ali naj bo celotna vsebina prilagojena velikosti ob približevanju" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 +msgid "Encoding" +msgstr "Nabor znakov" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 +msgid "The default encoding of the web view" +msgstr "Privzeti nabor znakov spletnega pogleda" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 +msgid "Custom Encoding" +msgstr "Nabor znakov po meri" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 +msgid "The custom encoding of the web view" +msgstr "Nabor znakov spletnega pogleda po meri" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 +msgid "Icon URI" +msgstr "Ikona URI" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 +#, fuzzy +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "Zaznamek za URI '%s' že obstaja" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 +msgid "Submit" +msgstr "Pošlji" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 +msgid "Reset" +msgstr "Ponovno nastavi" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 +msgid "This is a searchable index. Enter search keywords: " +msgstr "Po kazalu je mogoče iskati. Vnesite ključne besede:" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 +msgid "Choose File" +msgstr "Izbor datoteke" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 +msgid "(None)" +msgstr "(Brez)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 +msgid "Open Link in New _Window" +msgstr "Odpri povezavo v _novem oknu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 +msgid "_Download Linked File" +msgstr "_Prejmi povezano datoteko" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 +msgid "Copy Link Loc_ation" +msgstr "Kopiraj mesto _povezave" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 +msgid "Open _Image in New Window" +msgstr "Odpri _sliko v novem oknu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 +msgid "Sa_ve Image As" +msgstr "S_hrani sliko kot" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 +msgid "Cop_y Image" +msgstr "_Kopiraj sliko" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 +msgid "Open _Frame in New Window" +msgstr "Odpri okvir v _novem oknu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 +msgid "_Reload" +msgstr "_Ponovno naloži" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 +#, fuzzy +msgid "No Guesses Found" +msgstr "Ni najdenih predmetov" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 +msgid "_Ignore Spelling" +msgstr "_Prezri črkovanje" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 +msgid "_Learn Spelling" +msgstr "_Zapomni si črkovanje" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 +msgid "_Search the Web" +msgstr "_Preišči splet" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 +msgid "_Look Up in Dictionary" +msgstr "_Poišči besede v slovarju" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 +msgid "_Open Link" +msgstr "_Odpri povezavo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 +msgid "Ignore _Grammar" +msgstr "Prezri _slovnico" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 +msgid "Spelling and _Grammar" +msgstr "Črkovanje in _slovnica" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Show Spelling and Grammar" +msgstr "_Pokaži črkovanje in slovnico" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Hide Spelling and Grammar" +msgstr "_Skrij črkovanje in slovnico" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 +msgid "_Check Document Now" +msgstr "_Takoj preveri dokument" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 +msgid "Check Spelling While _Typing" +msgstr "Preveri _črkovanja med tipkanjem" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 +msgid "Check _Grammar With Spelling" +msgstr "Preveri _slovnico med tipkanjem" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 +msgid "_Font" +msgstr "_Pisava" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 +msgid "_Outline" +msgstr "_Oris" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 +#, fuzzy +msgid "Inspect _Element" +msgstr "Preuči _predmet" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 +msgid "No recent searches" +msgstr "Ni nedavnih nizov iskanja" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 +msgid "Recent searches" +msgstr "_Nedavno iskanje" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 +msgid "_Clear recent searches" +msgstr "_Počisti nedavno iskanje" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 +msgid "term" +msgstr "pojem" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 +msgid "definition" +msgstr "določilo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 +msgid "press" +msgstr "pritisni" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 +msgid "select" +msgstr "izberi" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 +msgid "activate" +msgstr "omogoči" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 +msgid "uncheck" +msgstr "odstrani izbor" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 +msgid "check" +msgstr "preveri" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 +msgid "jump" +msgstr "skoči" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342 +msgid " files" +msgstr "datoteke" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 +msgid "Unknown" +msgstr "Neznano" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 +msgid "Loading..." +msgstr "Nalaganje ..." + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Live Broadcast" +msgstr "Oddajanje v živo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 +msgid "audio element controller" +msgstr "nadzornik zvočnega predmeta" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 +msgid "video element controller" +msgstr "nadzornik slikovnega predmeta" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 +msgid "mute" +msgstr "nemo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 +msgid "unmute" +msgstr "povrni glasnost" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 +msgid "play" +msgstr "predvajaj" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 +msgid "pause" +msgstr "premor" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 +msgid "movie time" +msgstr "čas filma" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 +msgid "timeline slider thumb" +msgstr "sličica časovnega drsnika" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 +msgid "back 30 seconds" +msgstr "nazaj 30 sekund" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 +msgid "return to realtime" +msgstr "vrni se na pravi čas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 +msgid "elapsed time" +msgstr "pretečeni čas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 +msgid "remaining time" +msgstr "preostali čas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 +msgid "status" +msgstr "stanje" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 +msgid "fullscreen" +msgstr "celozaslonski način" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 +msgid "fast forward" +msgstr "hitro naprej" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 +msgid "fast reverse" +msgstr "hitro nazaj" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 +msgid "show closed captions" +msgstr "pokaži zaprte naslove" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 +msgid "hide closed captions" +msgstr "skrij zaprte naslove" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 +msgid "audio element playback controls and status display" +msgstr "prikaz stanja in nadzora predvajanja zvočnih predmetov" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 +msgid "video element playback controls and status display" +msgstr "prikaz stanja in nadzora predvajanja slikovnih predmetov" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 +msgid "mute audio tracks" +msgstr "neme zvočne sledi" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 +msgid "unmute audio tracks" +msgstr "povrnjena glasnost zvočnih sledi" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 +msgid "begin playback" +msgstr "začetek predvajanja" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 +msgid "pause playback" +msgstr "premor predvajanja" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 +msgid "movie time scrubber" +msgstr "časovni drsnik posnetka" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432 +msgid "movie time scrubber thumb" +msgstr "sličica časovnega drsnika posnetka" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 +msgid "seek movie back 30 seconds" +msgstr "preskoči posnetek 30 sekund nazaj" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 +msgid "return streaming movie to real time" +msgstr "vrni pretok predvajanja na pravi čas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 +msgid "current movie time in seconds" +msgstr "trenuten čas predvajanja v sekundah" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 +msgid "number of seconds of movie remaining" +msgstr "preostali čas filmaštevilo sekund preden se časomer ustavi" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 +msgid "current movie status" +msgstr "trenutno stanje filma" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 +msgid "seek quickly back" +msgstr "hitro išči nazaj" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 +msgid "seek quickly forward" +msgstr "hitro išči naprej" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 +msgid "Play movie in fullscreen mode" +msgstr "Predvajanje filma v celozaslonskem načinu" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 +msgid "start displaying closed captions" +msgstr "začni prikazovanje zaprtih naslovov" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 +msgid "stop displaying closed captions" +msgstr "zaustavi prikazovanje zaprtih naslovov" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 +msgid "indefinite time" +msgstr "nedoločen čas" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 +msgid "value missing" +msgstr "manjka vrednost" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 +msgid "type mismatch" +msgstr "vrsta ne ustreza" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "pattern mismatch" +msgstr "vzorec ne ustreza" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "too long" +msgstr "predolgo" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "range underflow" +msgstr "pod območjem omejitve" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range overflow" +msgstr "prekoračitev območja" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "step mismatch" +msgstr "korak ne ustreza" + +#, fuzzy +#~ msgid "_Searchable Index" +#~ msgstr "Povrni določila" + diff --git a/WebKit/gtk/po/sr.po b/WebKit/gtk/po/sr.po index 9cd8267..b4d3d55 100644 --- a/WebKit/gtk/po/sr.po +++ b/WebKit/gtk/po/sr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.10\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: 2009-06-19 02:35+100\n" "Last-Translator: Милош Поповић <gpopac@gmail.com>\n" "Language-Team: Serbian <gnom@prevod.org>\n" @@ -75,90 +75,94 @@ msgstr "Н_епрецртана нула" msgid "_Insert Unicode Control Character" msgstr "_Уметни уникод контролни знак" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "Захтев на мрежи" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "Захтевана адресе датотеке коју желите да преузмете" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 #, fuzzy msgid "Network Response" msgstr "Захтев на мрежи" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 #, fuzzy msgid "The network response for the URI that should be downloaded" msgstr "Захтевана адресе датотеке коју желите да преузмете" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "Циљна адреса" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "Циљна адреса где желите да сачувате датотеку" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "Предложено име датотеке" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "Подразумевано име датотеке приликом чувања" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Преузето" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "Показује тренутни напредак преузимања" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Стање" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Показује тренутно стање преузимања" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Величина" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "Приказује величину преузете датотеке" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Укупна величина" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "Приказује укупну величину преузете датотеке" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "Прекинута преузимања" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "Страница %s захтева корисничко име и лозинку" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "Корисничко име:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "Лозинка:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 #, fuzzy msgid "_Remember password" msgstr "Упамти лозинку" @@ -173,7 +177,7 @@ msgstr "Име оквира" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Наслов" @@ -183,7 +187,7 @@ msgstr "Наслов документа унутар оквира" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "Адреса" @@ -318,419 +322,428 @@ msgstr "Име оквира" msgid "The target frame for the navigation" msgstr "Циљна адреса коју захтева навигација" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "Подразумевано кодирање" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "Подразумевано кодирање за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "Скуп искошених фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "Подразумевани скуп искошених фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "Подразумевани скуп фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "Подразумевани скуп фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "Скуп фантази фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "Подразумевани скуп фантази фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "Скуп равномерних фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "Подразумевани скуп равномерно широких фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "Скуп безсерифних фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "Подразумевани скуп безсерифних фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "Скуп серифних фонтова" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "Подразумевани скуп серифних фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "Подразумевана величина фонта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "Подразумевана величина фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "Подразумевана величина разномерног фонта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "Подразумевана величина равномерно широких фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "Најмања величина фонта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "Најмања величина фонта за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "Најмања логичка величина фонта" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "Најмања логичка величина фонтова за приказ текста." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "Приморај 96 ТПИ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "Приморава резолуцију од 96 ТПИ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "Сам учитај слике" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "Аутоматски учитава слике." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "Сам смањи слике" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "Аутоматску умањује слике тако да се уклопиле у страну." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "Исцртај позадину" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "Одређује да ли да се приказују позадинске слике." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "Омогући скрипте" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "Укључује језике за скрипте уметнуте унутар страница." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "Омогући додатке" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "Укључује објекте уметнуте унутар страница." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "Текст променљиве величине" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "Одређује да ли да област са текстом буде променљиве величине." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "Адреса датотеке са стилом" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "" "Путања до датотеке са сопственим стилом који се примењује на сваку страницу." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "Корак увећања" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "Вредност за коју се мења приказ приликом повећања или смањења." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "Укључи додатке за развој" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "Укључује додатке који помажу приликом развоја овог програма" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "Приватни режим" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "Укључује режим разгледања уз чување ваше приватности" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 #, fuzzy msgid "Enables spell checking while typing" msgstr "Провери писање _док куцам" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 #, fuzzy msgid "Enable Caret Browsing" msgstr "Приватни режим" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 #, fuzzy msgid "Enable XSS Auditor" msgstr "Омогући скрипте" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 #, fuzzy msgid "Enable DOM paste" msgstr "Омогући скрипте" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 #, fuzzy msgid "Whether the page cache should be used" msgstr "Одређује да ли да се приказују позадинске слике." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "Омогући учење Јава скрипте" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "Исписује наслов документа из @веб_прегледа" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Исписује тренутну адресу садржаја приказаног у @веб_прегледу" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "Умножи списак циљева" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "Циљева за копирање међу списак исечака које подржава веб преглед" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "Убаци списак циљева" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "Списак циљева за убацивање из оставе које подржава веб преглед" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "Подешавања" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "Повезано са WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "Веб инспектор" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "Повезано са WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "Измењиво" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "Омогућава кориснику да уређује приказани садржај" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "Провидност" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "Омогућава провидну позадину за садржај" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "Увећање" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "Ниво увећања приказаног садржаја" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "Увећавај све" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "Одређује да ли да се увећава целокупан садржај" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "Кодирање" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "Подразумевано кодирање веб странице" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "Произвољно кодирање" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "Произвољно кодирање веб странице" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -744,8 +757,8 @@ msgid "Reset" msgstr "Поништи" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "_Претражив индекс" +msgid "This is a searchable index. Enter search keywords: " +msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -1089,3 +1102,6 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" msgstr "" + +#~ msgid "_Searchable Index" +#~ msgstr "_Претражив индекс" diff --git a/WebKit/gtk/po/sr@latin.po b/WebKit/gtk/po/sr@latin.po index c52ab3f..d6a795a 100644 --- a/WebKit/gtk/po/sr@latin.po +++ b/WebKit/gtk/po/sr@latin.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.10\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: 2009-06-19 02:35+100\n" "Last-Translator: Miloš Popović <gpopac@gmail.com>\n" "Language-Team: Serbian <gnom@prevod.org>\n" @@ -75,90 +75,94 @@ msgstr "N_eprecrtana nula" msgid "_Insert Unicode Control Character" msgstr "_Umetni unikod kontrolni znak" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "Zahtev na mreži" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "Zahtevana adrese datoteke koju želite da preuzmete" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 #, fuzzy msgid "Network Response" msgstr "Zahtev na mreži" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 #, fuzzy msgid "The network response for the URI that should be downloaded" msgstr "Zahtevana adrese datoteke koju želite da preuzmete" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "Ciljna adresa" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "Ciljna adresa gde želite da sačuvate datoteku" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "Predloženo ime datoteke" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "Podrazumevano ime datoteke prilikom čuvanja" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Preuzeto" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "Pokazuje trenutni napredak preuzimanja" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Stanje" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Pokazuje trenutno stanje preuzimanja" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Veličina" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "Prikazuje veličinu preuzete datoteke" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Ukupna veličina" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "Prikazuje ukupnu veličinu preuzete datoteke" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "Prekinuta preuzimanja" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "Stranica %s zahteva korisničko ime i lozinku" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "Korisničko ime:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "Lozinka:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 #, fuzzy msgid "_Remember password" msgstr "Upamti lozinku" @@ -173,7 +177,7 @@ msgstr "Ime okvira" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Naslov" @@ -183,7 +187,7 @@ msgstr "Naslov dokumenta unutar okvira" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "Adresa" @@ -318,420 +322,429 @@ msgstr "Ime okvira" msgid "The target frame for the navigation" msgstr "Ciljna adresa koju zahteva navigacija" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "Podrazumevano kodiranje" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "Podrazumevano kodiranje za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "Skup iskošenih fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "Podrazumevani skup iskošenih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "Podrazumevani skup fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "Podrazumevani skup fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "Skup fantazi fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "Podrazumevani skup fantazi fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "Skup ravnomernih fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "Podrazumevani skup ravnomerno širokih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "Skup bezserifnih fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "Podrazumevani skup bezserifnih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "Skup serifnih fontova" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "Podrazumevani skup serifnih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "Podrazumevana veličina fonta" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "Podrazumevana veličina fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "Podrazumevana veličina raznomernog fonta" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "Podrazumevana veličina ravnomerno širokih fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "Najmanja veličina fonta" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "Najmanja veličina fonta za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "Najmanja logička veličina fonta" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "Najmanja logička veličina fontova za prikaz teksta." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "Primoraj 96 TPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "Primorava rezoluciju od 96 TPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "Sam učitaj slike" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "Automatski učitava slike." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "Sam smanji slike" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "Automatsku umanjuje slike tako da se uklopile u stranu." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "Iscrtaj pozadinu" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "Određuje da li da se prikazuju pozadinske slike." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "Omogući skripte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "Uključuje jezike za skripte umetnute unutar stranica." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "Omogući dodatke" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "Uključuje objekte umetnute unutar stranica." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "Tekst promenljive veličine" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "Određuje da li da oblast sa tekstom bude promenljive veličine." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "Adresa datoteke sa stilom" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "" "Putanja do datoteke sa sopstvenim stilom koji se primenjuje na svaku " "stranicu." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "Korak uvećanja" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "Vrednost za koju se menja prikaz prilikom povećanja ili smanjenja." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "Uključi dodatke za razvoj" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "Uključuje dodatke koji pomažu prilikom razvoja ovog programa" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "Privatni režim" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "Uključuje režim razgledanja uz čuvanje vaše privatnosti" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 #, fuzzy msgid "Enables spell checking while typing" msgstr "Proveri pisanje _dok kucam" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 #, fuzzy msgid "Enable Caret Browsing" msgstr "Privatni režim" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 #, fuzzy msgid "Enable XSS Auditor" msgstr "Omogući skripte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 #, fuzzy msgid "Enable DOM paste" msgstr "Omogući skripte" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 #, fuzzy msgid "Whether the page cache should be used" msgstr "Određuje da li da se prikazuju pozadinske slike." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "Omogući učenje Java skripte" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "Ispisuje naslov dokumenta iz @veb_pregleda" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Ispisuje trenutnu adresu sadržaja prikazanog u @veb_pregledu" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "Umnoži spisak ciljeva" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "Ciljeva za kopiranje među spisak isečaka koje podržava veb pregled" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "Ubaci spisak ciljeva" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "Spisak ciljeva za ubacivanje iz ostave koje podržava veb pregled" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "Podešavanja" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "Povezano sa WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "Veb inspektor" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "Povezano sa WebKitWebSettings" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "Izmenjivo" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "Omogućava korisniku da uređuje prikazani sadržaj" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "Providnost" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "Omogućava providnu pozadinu za sadržaj" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "Uvećanje" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "Nivo uvećanja prikazanog sadržaja" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "Uvećavaj sve" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "Određuje da li da se uvećava celokupan sadržaj" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "Kodiranje" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "Podrazumevano kodiranje veb stranice" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "Proizvoljno kodiranje" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "Proizvoljno kodiranje veb stranice" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -745,8 +758,8 @@ msgid "Reset" msgstr "Poništi" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "_Pretraživ indeks" +msgid "This is a searchable index. Enter search keywords: " +msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -1090,3 +1103,6 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" msgstr "" + +#~ msgid "_Searchable Index" +#~ msgstr "_Pretraživ indeks" diff --git a/WebKit/gtk/po/sv.po b/WebKit/gtk/po/sv.po index c9e202b..d8f7e34 100644 --- a/WebKit/gtk/po/sv.po +++ b/WebKit/gtk/po/sv.po @@ -1,13 +1,13 @@ # Swedish translation for webkitgtk+. # This file is put in the public domain. -# Daniel Nylander <po@danielnylander.se>, 2009. +# Daniel Nylander <po@danielnylander.se>, 2009, 2010. # msgid "" msgstr "" "Project-Id-Version: webkitgtk+\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" -"PO-Revision-Date: 2009-04-30 12:26+0100\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" +"PO-Revision-Date: 2010-02-21 10:35+0100\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" "MIME-Version: 1.0\n" @@ -25,132 +25,137 @@ msgstr "Inmatnings_metoder" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 msgid "LRM _Left-to-right mark" -msgstr "" +msgstr "LRM _Left-to-right mark" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 msgid "RLM _Right-to-left mark" -msgstr "" +msgstr "RLM _Right-to-left mark" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 msgid "LRE Left-to-right _embedding" -msgstr "" +msgstr "LRE Left-to-right _embedding" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 msgid "RLE Right-to-left e_mbedding" -msgstr "" +msgstr "RLE Right-to-left e_mbedding" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 msgid "LRO Left-to-right _override" -msgstr "" +msgstr "LRO Left-to-right _override" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 msgid "RLO Right-to-left o_verride" -msgstr "" +msgstr "RLO Right-to-left o_verride" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 msgid "PDF _Pop directional formatting" -msgstr "" +msgstr "PDF _Pop directional formatting" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 msgid "ZWS _Zero width space" -msgstr "" +msgstr "ZWS _Zero width space" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 msgid "ZWJ Zero width _joiner" -msgstr "" +msgstr "ZWJ Zero width _joiner" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 msgid "ZWNJ Zero width _non-joiner" -msgstr "" +msgstr "ZWNJ Zero width _non-joiner" #: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 msgid "_Insert Unicode Control Character" -msgstr "" +msgstr "_Infoga Unicode-styrtecken" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "Nätverksbegäran" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" -msgstr "" +msgstr "Nätverksbegäran för URI:n som ska hämtas" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 #, fuzzy msgid "Network Response" msgstr "Nätverksbegäran" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 +#, fuzzy msgid "The network response for the URI that should be downloaded" -msgstr "" +msgstr "Nätverksbegäran för URI:n som ska hämtas" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" -msgstr "" +msgstr "Destinations-URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" -msgstr "" +msgstr "Destinations-URI där sparning ska ske av filen" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "Föreslaget filnamn" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" -msgstr "" +msgstr "Föreslaget filnamn som standard vid sparning" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Förlopp" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "Fastställer aktuellt förlopp för hämtningen" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Status" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Fastställer aktuell status för hämtningen" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Aktuell storlek" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" -msgstr "" +msgstr "Längden för det data som redan hämtats" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Total storlek" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "Totala storleken för filen" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "Användaren avbröt hämtningen" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "Ett användarnamn och lösenord begärs av platsen %s" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "Användarnamn:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "Lösenord:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 #, fuzzy msgid "_Remember password" msgstr "Kom ihåg lösenordet" @@ -165,7 +170,7 @@ msgstr "Namnet på ramen" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Titel" @@ -175,13 +180,13 @@ msgstr "Dokumenttiteln för ramen" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "URI" #: WebKit/gtk/webkit/webkitwebframe.cpp:313 msgid "The current URI of the contents displayed by the frame" -msgstr "" +msgstr "Aktuella URI:n för innehållet som visas av ramen" #: WebKit/gtk/webkit/webkitwebframe.cpp:344 msgid "Horizontal Scrollbar Policy" @@ -204,7 +209,7 @@ msgstr "Fastställer aktuellt förlopp för hämtningen" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" -msgstr "" +msgstr "Titeln för historikobjektet" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 msgid "Alternate Title" @@ -212,20 +217,20 @@ msgstr "Alternativ titel" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 msgid "The alternate title of the history item" -msgstr "" +msgstr "Alternativ titel för historikobjektet" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 msgid "The URI of the history item" -msgstr "" +msgstr "URI:n för historikobjektet" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 msgid "Original URI" -msgstr "" +msgstr "Ursprunglig URI" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 msgid "The original URI of the history item" -msgstr "" +msgstr "Ursprungliga URI:n för historikobjektet" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 msgid "Last visited Time" @@ -233,36 +238,36 @@ msgstr "Senast besökt" #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 msgid "The time at which the history item was last visited" -msgstr "" +msgstr "Tiden för vilket historikobjektet senast besöktes" #: WebKit/gtk/webkit/webkitwebinspector.cpp:268 msgid "Web View" -msgstr "" +msgstr "Webbvy" #: WebKit/gtk/webkit/webkitwebinspector.cpp:269 msgid "The Web View that renders the Web Inspector itself" -msgstr "" +msgstr "Webbvyn som renderar själva Webbinspektören" #: WebKit/gtk/webkit/webkitwebinspector.cpp:282 msgid "Inspected URI" -msgstr "" +msgstr "Inspekterad URI" #: WebKit/gtk/webkit/webkitwebinspector.cpp:283 msgid "The URI that is currently being inspected" -msgstr "" +msgstr "URI:n som för närvarande inspekteras" #: WebKit/gtk/webkit/webkitwebinspector.cpp:299 msgid "Enable JavaScript profiling" -msgstr "" +msgstr "Aktivera JavaScript-profilering" #: WebKit/gtk/webkit/webkitwebinspector.cpp:300 msgid "Profile the executed JavaScript." -msgstr "" +msgstr "Profilera det körda JavaScript." #: WebKit/gtk/webkit/webkitwebinspector.cpp:315 #, fuzzy msgid "Enable Timeline profiling" -msgstr "Aktivera privat surfning" +msgstr "Aktivera JavaScript-profilering" #: WebKit/gtk/webkit/webkitwebinspector.cpp:316 msgid "Profile the WebCore instrumentation." @@ -274,11 +279,11 @@ msgstr "Anledning" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" -msgstr "" +msgstr "Anledningen varför denna navigering sker" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" -msgstr "" +msgstr "URI:n som begärdes som mål för navigeringen" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" @@ -286,15 +291,15 @@ msgstr "Knapp" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 msgid "The button used to click" -msgstr "" +msgstr "Knappen som användes för att klicka" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 msgid "Modifier state" -msgstr "" +msgstr "Modifierartillstånd" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 msgid "A bitmask representing the state of the modifier keys" -msgstr "" +msgstr "En bitmask som representerar tillståndet för modifierartangenterna" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 #, fuzzy @@ -302,426 +307,438 @@ msgid "Target frame" msgstr "Namnet på ramen" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +#, fuzzy msgid "The target frame for the navigation" -msgstr "" +msgstr "URI:n som begärdes som mål för navigeringen" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "Standardteckenkodning" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "Standardkodningen som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "Typsnittsfamiljen Cursive" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "Standardfamiljen för Cursive-typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "Standardfamilj för typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "Standardfamiljen för typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "Typsnittsfamiljen Fantasy" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "Standardfamiljen för Fantasy-typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "Typsnittsfamiljen Monospace" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "" "Standardfamiljen för typsnitt som används för att visa text med fast " "breddsteg." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "Typsnittsfamiljen Sans Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "" "Standardfamiljen för Sans Serif-typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "Typsnittsfamiljen Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "Standardfamiljen för Serif-typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "Standardstorlek för typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "Standardstorleken för typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "Standardstorlek för Monospace-typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "" "Standardstorleken för typsnitt som används för att visa text med fast " "breddsteg." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "Minimumstorlek för typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "Minimumstorlek för typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "Logisk minimumstorlek för typsnitt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "Logisk minimumstorlek för typsnitt som används för att visa text." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "Tvinga 96 punkter/tum" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "Tvinga en upplösning på 96 punkter/tum" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "Läs automatiskt in bilder" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "Läs in bilder automatiskt." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" -msgstr "" +msgstr "Minska bilder automatiskt" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." -msgstr "" +msgstr "Minska automatiskt fristående bilder till att passa." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "Skriv ut bakgrunder" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "Huruvida bakgrundsbilder ska skrivas ut." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "Aktivera skript" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "Aktivera inbäddade skriptspråk." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "Aktivera insticksmoduler" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "Aktivera inbäddade insticksobjekt." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" -msgstr "" +msgstr "Storleksändringsbara textområden " -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." -msgstr "" +msgstr "Huruvida textområden kan storleksändras." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" -msgstr "" +msgstr "URI för användarstilmall" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." -msgstr "" +msgstr "URI:n för en stilmall som tillämpas på varje sida." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" -msgstr "" +msgstr "Stegvärde för zoom" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." -msgstr "" +msgstr "Värdet med vilket zoomnivå ändras vid in- eller utzoomning." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" -msgstr "" +msgstr "Aktivera extrafunktioner för utvecklare" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" -msgstr "" +msgstr "Aktiverar speciella tillägg som hjälper utvecklarna" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "Aktivera privat surfning" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "Aktiverar läget för privat surfning" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 #, fuzzy msgid "Enables spell checking while typing" msgstr "Kontrollera stavning vid _inmatning" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 #, fuzzy msgid "Enable Caret Browsing" msgstr "Aktivera privat surfning" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 #, fuzzy msgid "Enable XSS Auditor" msgstr "Aktivera skript" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 #, fuzzy msgid "Enable DOM paste" msgstr "Aktivera skript" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 #, fuzzy msgid "Whether the page cache should be used" msgstr "Huruvida bakgrundsbilder ska skrivas ut." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 -msgid "Returns the @web_view's document title" +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "Aktivera JavaScript-profilering" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 +msgid "Returns the @web_view's document title" +msgstr "Returnerar dokumenttiteln för @web_view" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" -msgstr "" +msgstr "Returnerar den aktuella URI:a för innehållet som visas av @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "Kopiera mållista" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "" +"Listan över mål som denna webbvy har stöd för vid kopiering till urklipp" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" -msgstr "" +msgstr "Klistra in mållista" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" +"Listan över mål som denna webbvy har stöd för vid inklistring från urklipp" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "Inställningar" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" -msgstr "" +msgstr "En associerad WebKitWebSettings-instans" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" -msgstr "" +msgstr "Webbinspektör" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" -msgstr "" +msgstr "Den associerade WebKitWebInspector-instansen" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "Redigeringsbar" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" -msgstr "" +msgstr "Huruvida innehållet kan ändras av användaren" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "Genomskinlig" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "Huruvida innehållet har en genomskinlig bakgrund" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "Zoomnivå" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "Zoomnivån för innehållet" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" -msgstr "" +msgstr "Fullständig innehållszoom" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" -msgstr "" +msgstr "Huruvida hela innehållet skalas vid zoomning" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "Teckenkodning" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" -msgstr "" +msgstr "Standardkodning för webbvyn" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "Anpassad teckenkodning" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" -msgstr "" +msgstr "Anpassad kodning för webbvyn" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -735,8 +752,8 @@ msgid "Reset" msgstr "Återställ" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "_Sökbart index" +msgid "This is a searchable index. Enter search keywords: " +msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -840,7 +857,7 @@ msgstr "_Kontur" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 msgid "Inspect _Element" -msgstr "" +msgstr "Inspektera _element" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 msgid "No recent searches" @@ -1079,3 +1096,6 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" msgstr "" + +#~ msgid "_Searchable Index" +#~ msgstr "_Sökbart index" diff --git a/WebKit/gtk/po/uk.po b/WebKit/gtk/po/uk.po new file mode 100644 index 0000000..46f12be --- /dev/null +++ b/WebKit/gtk/po/uk.po @@ -0,0 +1,1108 @@ +# This file is put in the public domain. +# +# Yuri Chornoivan <yurchor@ukr.net>, 2010. +msgid "" +msgstr "" +"Project-Id-Version: webkit 1.1.22\n" +"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" +"POT-Creation-Date: 2010-03-24 20:05-0300\n" +"PO-Revision-Date: 2010-03-19 19:27+0200\n" +"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" +"Language-Team: Ukrainian <translation@linux.org.ua>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:531 +msgid "Upload File" +msgstr "Вивантажити файл" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143 +msgid "Input _Methods" +msgstr "_Способи введення" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78 +msgid "LRM _Left-to-right mark" +msgstr "LRM позначка з_ліва направо" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79 +msgid "RLM _Right-to-left mark" +msgstr "RLM позначка с_права наліво" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80 +msgid "LRE Left-to-right _embedding" +msgstr "LRE вс_тавка зліва направо" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81 +msgid "RLE Right-to-left e_mbedding" +msgstr "RLE вст_авка справа ліворуч" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82 +msgid "LRO Left-to-right _override" +msgstr "LRO п_ерезапис зліва праворуч" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83 +msgid "RLO Right-to-left o_verride" +msgstr "RLO пе_резапис справа ліворуч" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84 +msgid "PDF _Pop directional formatting" +msgstr "PDF _Вертикальне розташування" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85 +msgid "ZWS _Zero width space" +msgstr "ZWS Про_біл нульової ширини" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86 +msgid "ZWJ Zero width _joiner" +msgstr "ZWJ _Об’єднувач нульової ширини" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87 +msgid "ZWNJ Zero width _non-joiner" +msgstr "ZWNJ _Роз’єднувач нульової ширини" + +#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138 +msgid "_Insert Unicode Control Character" +msgstr "В_ставити керівний символ Unicode" + +#: WebKit/gtk/webkit/webkitdownload.cpp:270 +msgid "Network Request" +msgstr "Запит до мережі" + +#: WebKit/gtk/webkit/webkitdownload.cpp:271 +msgid "The network request for the URI that should be downloaded" +msgstr "Запит до мережі щодо адреси URI, вміст за якою слід звантажити" + +#: WebKit/gtk/webkit/webkitdownload.cpp:285 +msgid "Network Response" +msgstr "Відповідь мережі" + +#: WebKit/gtk/webkit/webkitdownload.cpp:286 +msgid "The network response for the URI that should be downloaded" +msgstr "Відповідь мережі щодо адреси URI, вміст за якою слід звантажити" + +#: WebKit/gtk/webkit/webkitdownload.cpp:300 +msgid "Destination URI" +msgstr "Адреса URI призначення" + +#: WebKit/gtk/webkit/webkitdownload.cpp:301 +msgid "The destination URI where to save the file" +msgstr "Адреса URI призначення, за якою слід зберегти файл" + +#: WebKit/gtk/webkit/webkitdownload.cpp:315 +msgid "Suggested Filename" +msgstr "Пропозиція щодо назви" + +#: WebKit/gtk/webkit/webkitdownload.cpp:316 +msgid "The filename suggested as default when saving" +msgstr "Типова назва, яку програма пропонуватиме під час збереження" + +#: WebKit/gtk/webkit/webkitdownload.cpp:333 +msgid "Progress" +msgstr "Поступ" + +#: WebKit/gtk/webkit/webkitdownload.cpp:334 +msgid "Determines the current progress of the download" +msgstr "Визначає поточний поступ звантаження" + +#: WebKit/gtk/webkit/webkitdownload.cpp:347 +msgid "Status" +msgstr "Стан" + +#: WebKit/gtk/webkit/webkitdownload.cpp:348 +msgid "Determines the current status of the download" +msgstr "Визначає поточний стан звантаження" + +#: WebKit/gtk/webkit/webkitdownload.cpp:363 +msgid "Current Size" +msgstr "Поточний розмір" + +#: WebKit/gtk/webkit/webkitdownload.cpp:364 +msgid "The length of the data already downloaded" +msgstr "Об’єм вже звантажених даних" + +#: WebKit/gtk/webkit/webkitdownload.cpp:378 +msgid "Total Size" +msgstr "Загальний розмір" + +#: WebKit/gtk/webkit/webkitdownload.cpp:379 +msgid "The total size of the file" +msgstr "Загальний об’єм даних файла" + +#: WebKit/gtk/webkit/webkitdownload.cpp:530 +msgid "User cancelled the download" +msgstr "Звантаження скасовано користувачем" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 +#, c-format +msgid "A username and password are being requested by the site %s" +msgstr "Надійшов запит від сайта %s щодо імені користувача і пароля" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "Повідомлення сервера:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 +msgid "Username:" +msgstr "Користувач:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 +msgid "Password:" +msgstr "Пароль:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 +msgid "_Remember password" +msgstr "_Запам’ятати пароль" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:299 +msgid "Name" +msgstr "Назва" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:300 +msgid "The name of the frame" +msgstr "Назва фрейма" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:306 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 +#: WebKit/gtk/webkit/webkitwebview.cpp:2443 +msgid "Title" +msgstr "Заголовок" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:307 +msgid "The document title of the frame" +msgstr "Заголовок документа фрейма" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:313 +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 +#: WebKit/gtk/webkit/webkitwebview.cpp:2457 +msgid "URI" +msgstr "URI" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:314 +msgid "The current URI of the contents displayed by the frame" +msgstr "Поточна адреса URI даних, показаних у фреймі" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:345 +msgid "Horizontal Scrollbar Policy" +msgstr "Правила горизонтальної смужки гортання" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:346 +msgid "" +"Determines the current policy for the horizontal scrollbar of the frame." +msgstr "" +"Визначає поточні правила створення горизонтальної смужки гортання у фреймі." + +#: WebKit/gtk/webkit/webkitwebframe.cpp:363 +msgid "Vertical Scrollbar Policy" +msgstr "Правила вертикальної смужки гортання" + +#: WebKit/gtk/webkit/webkitwebframe.cpp:364 +msgid "Determines the current policy for the vertical scrollbar of the frame." +msgstr "" +"Визначає поточні правила створення вертикальної смужки гортання у фреймі." + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 +msgid "The title of the history item" +msgstr "Заголовок запису журналу" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162 +msgid "Alternate Title" +msgstr "Альтернативний заголовок" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163 +msgid "The alternate title of the history item" +msgstr "Альтернативний заголовок запису журналу" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179 +msgid "The URI of the history item" +msgstr "Адреса URI запису журналу" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194 +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173 +msgid "Original URI" +msgstr "Початкова адреса URI" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195 +msgid "The original URI of the history item" +msgstr "Початкова адреса URI запису журналу" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210 +msgid "Last visited Time" +msgstr "Час останнього відвідування" + +#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211 +msgid "The time at which the history item was last visited" +msgstr "Час, коли ви востаннє відвідували запис журналу" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:268 +msgid "Web View" +msgstr "Веб-панель" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:269 +msgid "The Web View that renders the Web Inspector itself" +msgstr "Веб-панель, на якій показано дані веб-інспектора" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:282 +msgid "Inspected URI" +msgstr "Адреса URI, що перевіряється" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:283 +msgid "The URI that is currently being inspected" +msgstr "Адреса URI, яку перевіряють" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:299 +msgid "Enable JavaScript profiling" +msgstr "Увімкнути профілювання JavaScript" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:300 +msgid "Profile the executed JavaScript." +msgstr "Створити профіль виконаного JavaScript." + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:315 +msgid "Enable Timeline profiling" +msgstr "Увімкнути профілювання Timeline" + +#: WebKit/gtk/webkit/webkitwebinspector.cpp:316 +msgid "Profile the WebCore instrumentation." +msgstr "Профілювати інструментарій WebCore." + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158 +msgid "Reason" +msgstr "Підстава" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 +msgid "The reason why this navigation is occurring" +msgstr "Підстава цього переходу" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 +msgid "The URI that was requested as the target for the navigation" +msgstr "Адреса URI, на яку надійшов запит, як на адресу переходу" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 +msgid "Button" +msgstr "Кнопка" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189 +msgid "The button used to click" +msgstr "Кнопка для натискання" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204 +msgid "Modifier state" +msgstr "Стан модифікаторів" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205 +msgid "A bitmask representing the state of the modifier keys" +msgstr "Бітова маска, що відповідає стану натискання клавіш-модифікаторів" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 +msgid "Target frame" +msgstr "Фрейм призначення" + +#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 +msgid "The target frame for the navigation" +msgstr "Фрейм призначення під час переходу" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:239 +msgid "Default Encoding" +msgstr "Типове кодування" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:240 +msgid "The default encoding used to display text." +msgstr "Типове кодування для показу тексту." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:248 +msgid "Cursive Font Family" +msgstr "Гарнітура курсивного шрифту" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:249 +msgid "The default Cursive font family used to display text." +msgstr "Типова гарнітура курсивного шрифту для показу текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:257 +msgid "Default Font Family" +msgstr "Типова гарнітура шрифту" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:258 +msgid "The default font family used to display text." +msgstr "Типова гарнітура шрифту для показу текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:266 +msgid "Fantasy Font Family" +msgstr "Гарнітура декоративного шрифту" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:267 +msgid "The default Fantasy font family used to display text." +msgstr "Типова гарнітура декоративного шрифту для показу текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:275 +msgid "Monospace Font Family" +msgstr "Гарнітура моноширинного шрифту" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:276 +msgid "The default font family used to display monospace text." +msgstr "Типова гарнітура шрифту для показу моноширинних текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:284 +msgid "Sans Serif Font Family" +msgstr "Гарнітура шрифту без засічок" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:285 +msgid "The default Sans Serif font family used to display text." +msgstr "Типова гарнітура без засічок шрифту для показу текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:293 +msgid "Serif Font Family" +msgstr "Гарнітура шрифту з засічками" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:294 +msgid "The default Serif font family used to display text." +msgstr "Типова гарнітура шрифту з засічками для показу текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:302 +msgid "Default Font Size" +msgstr "Типовий розмір шрифту" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:303 +msgid "The default font size used to display text." +msgstr "Типовий розмір символів шрифту для показу текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:311 +msgid "Default Monospace Font Size" +msgstr "Типовий розмір моноширинного шрифту" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:312 +msgid "The default font size used to display monospace text." +msgstr "" +"Типовий розмір символів шрифту для показу моноширинних текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:320 +msgid "Minimum Font Size" +msgstr "Мінімальний розмір шрифту" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:321 +msgid "The minimum font size used to display text." +msgstr "Мінімальний розмір символів шрифту для показу текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:329 +msgid "Minimum Logical Font Size" +msgstr "Мінімальний розмір логічного шрифту" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:330 +msgid "The minimum logical font size used to display text." +msgstr "" +"Мінімальний розмір символів логічного шрифту для показу текстових даних." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:349 +msgid "Enforce 96 DPI" +msgstr "Використовувати 96 т/д" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:350 +msgid "Enforce a resolution of 96 DPI" +msgstr "Використовувати роздільну здатність 96 т/д" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:358 +msgid "Auto Load Images" +msgstr "Автоматично завантажувати зображення" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:359 +msgid "Load images automatically." +msgstr "Завантажувати зображення у автоматичному режимі" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:367 +msgid "Auto Shrink Images" +msgstr "Автоматично стискати зображення" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:368 +msgid "Automatically shrink standalone images to fit." +msgstr "Автоматично стискати окремі зображення відповідно до розмірів вікна." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:376 +msgid "Print Backgrounds" +msgstr "Друкувати тло" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:377 +msgid "Whether background images should be printed." +msgstr "Чи слід друкувати зображення тла сторінки." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:385 +msgid "Enable Scripts" +msgstr "Увімкнути скрипти" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:386 +msgid "Enable embedded scripting languages." +msgstr "Увімкнути вбудовані до сторінок скрипти." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:394 +msgid "Enable Plugins" +msgstr "Увімкнути додатки" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:395 +msgid "Enable embedded plugin objects." +msgstr "Увімкнути вбудовані об’єкти додатків." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:403 +msgid "Resizable Text Areas" +msgstr "Змінний розмір текстових полів" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:404 +msgid "Whether text areas are resizable." +msgstr "Чи можлива зміна розмірів текстових полів." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:411 +msgid "User Stylesheet URI" +msgstr "Адреса URI таблиці стилів користувача" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:412 +msgid "The URI of a stylesheet that is applied to every page." +msgstr "Адреса URI таблиці стилів, яку буде застосовано до всіх сторінок." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:427 +msgid "Zoom Stepping Value" +msgstr "Приріст масштабу" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:428 +msgid "The value by which the zoom level is changed when zooming in or out." +msgstr "" +"Значення приросту, на який змінюватиметься масштаб під час збільшення або " +"зменшення." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:446 +msgid "Enable Developer Extras" +msgstr "Увімкнути засоби розробки" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:447 +msgid "Enables special extensions that help developers" +msgstr "Увімкнути особливі додатки, які допоможуть у розробці" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:467 +msgid "Enable Private Browsing" +msgstr "Увімкнути конфіденційний перегляд" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:468 +msgid "Enables private browsing mode" +msgstr "Увімкнути режим конфіденційного перегляду" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:483 +msgid "Enable Spell Checking" +msgstr "Увімкнути перевірку орфографії" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:484 +msgid "Enables spell checking while typing" +msgstr "Увімкнути перевірку правопису під час введення тексту" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:507 +msgid "Languages to use for spell checking" +msgstr "Мови для перевірки правопису" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:508 +msgid "Comma separated list of languages to use for spell checking" +msgstr "Список записів мов для перевірки правопису, відокремлених комами" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:522 +msgid "Enable Caret Browsing" +msgstr "Увімкнути режим активного вказівника" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:523 +msgid "Whether to enable accesibility enhanced keyboard navigation" +msgstr "" +"Вмикає або вимикає додаткові можливості керування вказівником за допомогою " +"клавіатури" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:538 +msgid "Enable HTML5 Database" +msgstr "Увімкнути базу даних HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:539 +msgid "Whether to enable HTML5 database support" +msgstr "Чи слід вмикати підтримку бази даних HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:554 +msgid "Enable HTML5 Local Storage" +msgstr "Увімкнути локальне сховище HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:555 +msgid "Whether to enable HTML5 Local Storage support" +msgstr "Чи слід вмикати підтримку локального сховища HTML5" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:569 +msgid "Enable XSS Auditor" +msgstr "Увімкнути інструмент перевірки XSS" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:570 +msgid "Whether to enable teh XSS auditor" +msgstr "Чи слід вмикати інструмент перевірки XSS" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:588 +msgid "Enable Spatial Navigation" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:589 +#, fuzzy +msgid "Whether to enable Spatial Navigation" +msgstr "Чи слід вмикати інструмент перевірки XSS" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:606 +msgid "User Agent" +msgstr "Агент користувача" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:607 +msgid "The User-Agent string used by WebKitGtk" +msgstr "Рядок User-Agent, який буде використано WebKitGtk" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:622 +msgid "JavaScript can open windows automatically" +msgstr "JavaScript може відкривати вікна у автоматичному режимі" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:623 +msgid "Whether JavaScript can open windows automatically" +msgstr "Чи можуть скрипти JavaScript відкривати вікна у автоматичному режимі" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:638 +msgid "Enable offline web application cache" +msgstr "Увімкнути автономний кеш веб-програм" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:639 +msgid "Whether to enable offline web application cache" +msgstr "" +"Чи слід вмикати кеш веб-програм, призначений для автономної роботи без мережі" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:666 +msgid "Editing behavior" +msgstr "Поведінка під час редагування" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:667 +msgid "The behavior mode to use in editing mode" +msgstr "Режим поведінки під час редагування" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:683 +msgid "Enable universal access from file URIs" +msgstr "Увімкнути універсальний доступ з файлових адрес URI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:684 +msgid "Whether to allow universal access from file URIs" +msgstr "Чи слід дозволяти універсальний доступ з файлових адрес URI" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 +msgid "Enable DOM paste" +msgstr "Увімкнути вставку DOM" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:700 +msgid "Whether to enable DOM paste" +msgstr "Чи слід вмикати вставку DOM" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:718 +msgid "Tab key cycles through elements" +msgstr "Циклічний перехід елементами за клавішею Tab" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 +msgid "Whether the tab key cycles through elements on the page." +msgstr "" +"Чи виконуватиметься циклічний перехід елементами сторінки у відповідь на " +"натискання клавіші Tab." + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:739 +msgid "Enable Default Context Menu" +msgstr "Увімкнути типове контекстне меню" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 +msgid "" +"Enables the handling of right-clicks for the creation of the default context " +"menu" +msgstr "" +"Вмикає обробку клацання правою кнопкою миші для створення типового " +"контекстного меню" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +msgid "Enable Site Specific Quirks" +msgstr "Увімкнути підтримку особливостей сайта" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:761 +msgid "Enables the site-specific compatibility workarounds" +msgstr "Увімкнути специфічну для сайта зміну параметрів перегляду" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:783 +msgid "Enable page cache" +msgstr "Увімкнути кеш сторінок" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 +msgid "Whether the page cache should be used" +msgstr "Чи слід використовувати кешування сторінок" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:804 +msgid "Auto Resize Window" +msgstr "Автоматична зміна розмірів вікна" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:805 +msgid "Automatically resize the toplevel window when a page requests it" +msgstr "" +"Автоматично змінювати розміри вікна верхнього рівня у відповідь на запит з " +"боку сторінки" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:837 +msgid "Enable Java Applet" +msgstr "Увімкнути аплет Java" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:838 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "Чи слід вмикати підтримку аплетів Java за допомогою теґу <applet>" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2444 +msgid "Returns the @web_view's document title" +msgstr "Повертає заголовок документа @web_view" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2458 +msgid "Returns the current URI of the contents displayed by the @web_view" +msgstr "Повертає поточну адресу URI даних, показаних у @web_view" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2471 +msgid "Copy target list" +msgstr "Список цілей копіювання" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2472 +msgid "The list of targets this web view supports for clipboard copying" +msgstr "" +"Список адрес-цілей, які можна скопіювати з цієї веб-панелі до буфера обміну " +"даними" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2485 +msgid "Paste target list" +msgstr "Список вставки цілей" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2486 +msgid "The list of targets this web view supports for clipboard pasting" +msgstr "" +"Список цілей, які можна вставити до цієї веб-панелі з буфера обміну даними" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2492 +msgid "Settings" +msgstr "Параметри" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2493 +msgid "An associated WebKitWebSettings instance" +msgstr "Пов’язаний екземпляр WebKitWebSettings" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2506 +msgid "Web Inspector" +msgstr "Веб-ревізор" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2507 +msgid "The associated WebKitWebInspector instance" +msgstr "Пов’язаний екземпляр WebKitWebInspector" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2527 +msgid "Editable" +msgstr "Можна редагувати" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2528 +msgid "Whether content can be modified by the user" +msgstr "Чи може користувач змінювати вміст" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2534 +msgid "Transparent" +msgstr "Прозорий" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2535 +msgid "Whether content has a transparent background" +msgstr "Чи має вміст прозоре тло" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2548 +msgid "Zoom level" +msgstr "Масштабування" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2549 +msgid "The level of zoom of the content" +msgstr "Масштабування вмісту" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2564 +msgid "Full content zoom" +msgstr "Масштабування всього вмісту" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2565 +msgid "Whether the full content is scaled when zooming" +msgstr "Чи слід вмикати масштабування всього вмісту" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2578 +msgid "Encoding" +msgstr "Кодування" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2579 +msgid "The default encoding of the web view" +msgstr "Типове кодування веб-панелі" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2592 +msgid "Custom Encoding" +msgstr "Нетипове кодування" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2593 +msgid "The custom encoding of the web view" +msgstr "Нетипове кодування веб-панелі" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2645 +msgid "Icon URI" +msgstr "URI піктограми" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2646 +msgid "The URI for the favicon for the #WebKitWebView." +msgstr "URI піктограми для #WebKitWebView." + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 +msgid "Submit" +msgstr "Надіслати" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65 +msgid "Reset" +msgstr "Скинути" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 +msgid "This is a searchable index. Enter search keywords: " +msgstr "Це покажчик з можливістю пошуку. Введіть ключові слова для пошуку: " + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 +msgid "Choose File" +msgstr "Виберіть файл" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80 +msgid "(None)" +msgstr "(Немає)" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85 +msgid "Open Link in New _Window" +msgstr "Відкрити посилання у новому _вікні" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90 +msgid "_Download Linked File" +msgstr "_Звантажити пов’язаний файл" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95 +msgid "Copy Link Loc_ation" +msgstr "К_опіювати адресу посилання" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100 +msgid "Open _Image in New Window" +msgstr "Відкрити зо_браження у новому вікні" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105 +msgid "Sa_ve Image As" +msgstr "З_берегти зображення як" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110 +msgid "Cop_y Image" +msgstr "Коп_іювати зображення" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115 +msgid "Open _Frame in New Window" +msgstr "Відкрити _фрейм у новому вікні" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166 +msgid "_Reload" +msgstr "П_ерезавантажити" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183 +msgid "No Guesses Found" +msgstr "Не знайдено відповідників" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188 +msgid "_Ignore Spelling" +msgstr "П_ропустити слово" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193 +msgid "_Learn Spelling" +msgstr "_Додати слово" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198 +msgid "_Search the Web" +msgstr "_Шукати у інтернеті" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203 +msgid "_Look Up in Dictionary" +msgstr "Ш_укати у словнику" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208 +msgid "_Open Link" +msgstr "_Відкрити посилання" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213 +msgid "Ignore _Grammar" +msgstr "І_гнорувати граматику" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218 +msgid "Spelling and _Grammar" +msgstr "_Правопис і граматика" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Show Spelling and Grammar" +msgstr "По_казати перевірку правопису і граматики" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223 +msgid "_Hide Spelling and Grammar" +msgstr "С_ховати перевірку правопису і граматики" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228 +msgid "_Check Document Now" +msgstr "Пе_ревірити документ" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233 +msgid "Check Spelling While _Typing" +msgstr "Перевір_яти правопис під час введення" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238 +msgid "Check _Grammar With Spelling" +msgstr "Перевірити _граматику з правописом" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243 +msgid "_Font" +msgstr "_Шрифт" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266 +msgid "_Outline" +msgstr "_Обрис" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271 +msgid "Inspect _Element" +msgstr "Перевірити е_лемент" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276 +msgid "No recent searches" +msgstr "Немає нещодавніх пошуків" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281 +msgid "Recent searches" +msgstr "Нещодавні пошуки" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286 +msgid "_Clear recent searches" +msgstr "Сп_орожнити список пошуків" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291 +msgid "term" +msgstr "термін" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296 +msgid "definition" +msgstr "визначення" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301 +msgid "press" +msgstr "натиснути" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306 +msgid "select" +msgstr "вибрати" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311 +msgid "activate" +msgstr "задіяти" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316 +msgid "uncheck" +msgstr "зняти позначку" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321 +msgid "check" +msgstr "позначити" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326 +msgid "jump" +msgstr "перейти" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:341 +msgid "Missing Plug-in" +msgstr "" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347 +msgid " files" +msgstr " файлів" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:352 +msgid "Unknown" +msgstr "Невідомо" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 +msgid "Loading..." +msgstr "Завантаження..." + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:374 +msgid "Live Broadcast" +msgstr "Трансляція" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:380 +msgid "audio element controller" +msgstr "керування звуковим елементом" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:382 +msgid "video element controller" +msgstr "керування відеоелементом" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:384 +msgid "mute" +msgstr "вимкнути звук" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:386 +msgid "unmute" +msgstr "увімкнути звук" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:388 +msgid "play" +msgstr "відтворити" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:390 +msgid "pause" +msgstr "призупинити" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:392 +msgid "movie time" +msgstr "час відтворення відео" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:394 +msgid "timeline slider thumb" +msgstr "повзунок лінійки запису" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:396 +msgid "back 30 seconds" +msgstr "назад на 30 секунд" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:398 +msgid "return to realtime" +msgstr "повернутися до режиму реального часу" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:400 +msgid "elapsed time" +msgstr "час, що минув" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:402 +msgid "remaining time" +msgstr "час, що залишився:" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:404 +msgid "status" +msgstr "стан" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:406 +msgid "fullscreen" +msgstr "повноекранний режим" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:408 +msgid "fast forward" +msgstr "повний вперед" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:410 +msgid "fast reverse" +msgstr "повний назад" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:412 +msgid "show closed captions" +msgstr "показати вбудовані субтитри" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:414 +msgid "hide closed captions" +msgstr "приховати вбудовані субтитри" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:423 +msgid "audio element playback controls and status display" +msgstr "елементи керування відтворенням та показом стану аудіо" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:425 +msgid "video element playback controls and status display" +msgstr "елементи керування відтворенням та показом стану відео" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:427 +msgid "mute audio tracks" +msgstr "вимкнути звукові доріжки" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:429 +msgid "unmute audio tracks" +msgstr "увімкнути звукові доріжки" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:431 +msgid "begin playback" +msgstr "почати відтворення" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:433 +msgid "pause playback" +msgstr "призупинити відтворення" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:435 +msgid "movie time scrubber" +msgstr "зміна часу відтворення відео" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:437 +msgid "movie time scrubber thumb" +msgstr "позначка пересування часом відтворення відео" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:439 +msgid "seek movie back 30 seconds" +msgstr "перехід на 30 секунд назад" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:441 +msgid "return streaming movie to real time" +msgstr "повернути відтворення потокового відео у режим реального часу" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:443 +msgid "current movie time in seconds" +msgstr "поточний час відтворення відео у секундах" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:445 +msgid "number of seconds of movie remaining" +msgstr "кількість секунд до завершення відтворення відео" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:447 +msgid "current movie status" +msgstr "поточний стан відео" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:449 +msgid "seek quickly back" +msgstr "швидке перемотування назад" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:451 +msgid "seek quickly forward" +msgstr "швидке перемотування вперед" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:453 +msgid "Play movie in fullscreen mode" +msgstr "Відтворити відео у повноекранному режимі" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:455 +msgid "start displaying closed captions" +msgstr "почати показ вбудованих субтитрів" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:457 +msgid "stop displaying closed captions" +msgstr "припинити показ вбудованих субтитрів" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:466 +msgid "indefinite time" +msgstr "невизначений час" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:496 +msgid "value missing" +msgstr "не вистачає значення" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 +msgid "type mismatch" +msgstr "невідповідність типів" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 +msgid "pattern mismatch" +msgstr "невідповідність шаблонів" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 +msgid "too long" +msgstr "занадто довгий" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 +msgid "range underflow" +msgstr "від’ємне переповнення діапазону" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 +msgid "range overflow" +msgstr "переповнення діапазону" + +#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:527 +msgid "step mismatch" +msgstr "невідповідність кроків" diff --git a/WebKit/gtk/po/vi.po b/WebKit/gtk/po/vi.po index 3a684ae..838860c 100644 --- a/WebKit/gtk/po/vi.po +++ b/WebKit/gtk/po/vi.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" -"PO-Revision-Date: 2009-06-26 08:31+1000\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" +"PO-Revision-Date: 2010-03-01 20:49+0700\n" "Last-Translator: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n" "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" "MIME-Version: 1.0\n" @@ -68,93 +68,94 @@ msgstr "ZWNJ _Phi kết nối không kích thước" msgid "_Insert Unicode Control Character" msgstr "_Chèn kí tự Unicode" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "Yêu cầu mạng" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "Yêu cầu mạng cho URI cần tải về" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 -#, fuzzy +#: WebKit/gtk/webkit/webkitdownload.cpp:281 msgid "Network Response" -msgstr "Yêu cầu mạng" +msgstr "Hồi đáp mạng" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 -#, fuzzy +#: WebKit/gtk/webkit/webkitdownload.cpp:282 msgid "The network response for the URI that should be downloaded" -msgstr "Yêu cầu mạng cho URI cần tải về" +msgstr "Hồi đáp mạng cho URI cần tải về" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "URI đích" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "URI đích nơi lưu tập tin" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "Tên tập tin đề nghị" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "Tên tập tin đề nghị mặc định khi lưu" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "Tiến trình" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "Xác định tiến độ tải về hiện thời" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "Tình trạng" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "Xác định tình trạng tải về hiện thời" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "Kích thước hiện thời" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "Lượng dữ liệu đã tải về" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "Kích thước tổng cộng" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "Kích thước của toàn bộ tập tin" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "Người dùng đã huỷ tải về" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "Trang %s đang yêu cầu tên người dùng và mật khẩu" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "Thông điệp máy chủ:" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "Tên người dùng:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "Mật khẩu:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 -#, fuzzy +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 msgid "_Remember password" -msgstr "Nhớ mật khẩu" +msgstr "_Nhớ mật khẩu" #: WebKit/gtk/webkit/webkitwebframe.cpp:298 msgid "Name" @@ -166,7 +167,7 @@ msgstr "Tên khung" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "Tựa đề" @@ -176,7 +177,7 @@ msgstr "Tựa đề tài liệu của khung" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "URI" @@ -186,22 +187,20 @@ msgstr "URI hiện thời của nội dung khung đang hiển thị" #: WebKit/gtk/webkit/webkitwebframe.cpp:344 msgid "Horizontal Scrollbar Policy" -msgstr "" +msgstr "Quy tắc thanh cuộn ngang" #: WebKit/gtk/webkit/webkitwebframe.cpp:345 -#, fuzzy msgid "" "Determines the current policy for the horizontal scrollbar of the frame." -msgstr "Xác định tiến độ tải về hiện thời" +msgstr "Xác định quy tắc hiện thời cho thanh cuộn ngang của khung." #: WebKit/gtk/webkit/webkitwebframe.cpp:362 msgid "Vertical Scrollbar Policy" -msgstr "" +msgstr "Quy tắc thanh cuộn dọc" #: WebKit/gtk/webkit/webkitwebframe.cpp:363 -#, fuzzy msgid "Determines the current policy for the vertical scrollbar of the frame." -msgstr "Xác định tiến độ tải về hiện thời" +msgstr "Xác định quy tắc hiện thời cho thanh cuộn dọc của khung." #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147 msgid "The title of the history item" @@ -261,9 +260,8 @@ msgid "Profile the executed JavaScript." msgstr "Kiểm định JavaScript được thực thi." #: WebKit/gtk/webkit/webkitwebinspector.cpp:315 -#, fuzzy msgid "Enable Timeline profiling" -msgstr "Bật kiểm định JavaScript" +msgstr "Bật kiểm định trục thời gian" #: WebKit/gtk/webkit/webkitwebinspector.cpp:316 msgid "Profile the WebCore instrumentation." @@ -275,11 +273,11 @@ msgstr "Nguyên nhân" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159 msgid "The reason why this navigation is occurring" -msgstr "" +msgstr "Lý do duyệt gặp lỗi" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174 msgid "The URI that was requested as the target for the navigation" -msgstr "" +msgstr "URI được yêu cầu làm đích duyệt" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188 msgid "Button" @@ -298,426 +296,430 @@ msgid "A bitmask representing the state of the modifier keys" msgstr "Bitmask đại diện trạng thái phím bổ trợ" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220 -#, fuzzy msgid "Target frame" -msgstr "Tên khung" +msgstr "Khung đích" #: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221 msgid "The target frame for the navigation" -msgstr "" +msgstr "Khung đích để xem" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "Bảng mã mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "Bảng mã mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "Họ phông Cursive" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "Họ phông Cursive mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "Họ phông mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "Họ phông mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "Họ phông Fantasy" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "Họ phông Fantasy mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "Họ phông Monospace" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "Họ phông Monospace mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "Họ phông Sans Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "Họ phông Sans Serif mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "Họ phông Serif" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "Họ phông Serif mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "Cỡ phông mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "Cỡ phông mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "Cỡ phông Monospace mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "Cỡ phông Monospace mặc định để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "Cỡ phông tối thiểu" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "Cỡ phông tối thiểu để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "Cỡ phông logic tối thiểu" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "Cỡ phông logic tối thiểu dùng để hiển thị văn bản." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "Ép 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "Ép độ phân giảii 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "Tự động nạp ảnh" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "Nạp ảnh tự động." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "Tự động co ảnh." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "Tự động co ảnh độc lập cho khít." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "In ảnh nền" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "Có in ảnh nền hay không." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" -msgstr "" +msgstr "Bật script" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." -msgstr "" +msgstr "Bật ngôn ngữ nhúng dạng script." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "Bật phần mở rộng" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "Bật phần mở rộng," -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "Ô văn bản có thể thay đổi kích thước." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "Ô văn bản có thể thay đổi kích thước hay không." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "URI stylesheet người dùng" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "URI của stylesheet áp dụng cho mọi trang." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "Giá trị bước thu/phóng" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "Giá trị thay đổi mức thu phóng mỗi lần." -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "Bật Developer Extras" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "Bật các phần mở rộng đặc biệt, hữu dụng cho người phát triển" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "Bật duyệt riêng tư" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "Bật chế độ duyệt riêng tư" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" -msgstr "" +msgstr "Bật kiểm lỗi chính tả" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 msgid "Enables spell checking while typing" -msgstr "Kiểm tra khi đang _gõ" +msgstr "Kiểm lỗi chính tả khi đang gõ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" -msgstr "" +msgstr "Ngôn ngữ kiểm lỗi chính tả" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" -msgstr "" +msgstr "Danh sách ngôn ngữ kiểm lỗi chính tả, cách nhau bằng dấu phẩy" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 msgid "Enable Caret Browsing" -msgstr "Bật duyệt riêng tư" +msgstr "Bật con nháy" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" -msgstr "" +msgstr "Có bật khả năng duyệt tăng cường bằng bàn phím không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" -msgstr "" +msgstr "Bật Cơ sở dữ liệu HTML5" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" -msgstr "" +msgstr "Có bật hỗ trợ Cơ sở dữ liệu HTML5 không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" -msgstr "" +msgstr "Bật Kho chứa HTML5 cục bộ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" -msgstr "" +msgstr "Có bật hỗ trợ Kho chứa HTML5 cục bộ không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 msgid "Enable XSS Auditor" -msgstr "" +msgstr "Bật kiểm tra XSS" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" -msgstr "" +msgstr "Có bật kiểm tra XSS không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" -msgstr "" +msgstr "Đại diện người dùng" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" -msgstr "" +msgstr "Chuỗi User-Agent WebKitGtk sẽ dùng" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" -msgstr "" +msgstr "JavaScript được phép mở cửa sổ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" -msgstr "" +msgstr "JavaScript có được phép tự động mở cửa sổ không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" -msgstr "" +msgstr "Bật lưu tạm ứng dụng web ngoại tuyến" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" -msgstr "" +msgstr "Có bật lưu tạm ứng dụng web ngoại tuyến không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" -msgstr "" +msgstr "Cách sửa đổi" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" -msgstr "" +msgstr "Cách sửa đổi được sử dụng trong chế độ sửa đổi" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" -msgstr "" +msgstr "Bật truy cập thống nhất từ URI của tập tin" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" -msgstr "" +msgstr "Có cho phép truy cập thống nhất từ URI của tập tin không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 msgid "Enable DOM paste" -msgstr "" +msgstr "Cho dán DOM" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" -msgstr "" +msgstr "Có cho dán DOM không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" -msgstr "" +msgstr "Xoay vòng phím Tab qua các thành phần" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." -msgstr "" +msgstr "Có xoay vòng phím Tab trên các thành phần của trang không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" -msgstr "" +msgstr "Bật menu ngữ cảnh mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" -msgstr "" +msgstr "Cho phép phím chuột phải tạo menu ngữ cảnh mặc định" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" -msgstr "" +msgstr "Bật khắc phục đặc thù cho các trang" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" -msgstr "" +msgstr "Khắc phục những nhược điểm đặc thù của một số trang web" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" -msgstr "" +msgstr "Bật page cache" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 -#, fuzzy +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 msgid "Whether the page cache should be used" -msgstr "Có in ảnh nền hay không." +msgstr "Có bật tính năng page cache không" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" -msgstr "" +msgstr "Tự động đổi kích thước cửa sổ" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" -msgstr "" +msgstr "Tự động thay đổi kích thước cửa sổ trên cùng khi trang yêu cầu" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +msgid "Enable Java Applet" +msgstr "Bật tiểu dụng Java" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "Cho phép hỗ trợ tiểu dụng Java bằng <applet>" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "Trả về tiêu đề tài liệu của @web_view" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "Trả về URI hiện thời của tài liệu được @web_view hiển thị" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "Danh sách đích chép" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "Danh sách đích mà khung xem web này hỗ trợ khi chép vào clipboard." -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "Danh sách đích dán" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "Danh sách đích mà khung xem web này hỗ trợ khi dán clipboard." -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "Thiết lập" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "Một thể hiện WebKitWebSettings liên kết" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "Thanh tra Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "Một thể hiện WebKitWebInspector liên kết" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "Có thể thay đổi" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "Nội dung có thể bị người dùng thay đổi hay không" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "Trong suốt" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "Nội dung có ảnh nền trong suốt không." -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "Mức phóng" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "Mức phóng to/thu nhỏ nội dung" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "Phóng nội dung đầy đủ" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "Toàn bộ nội dung có bị co lại không." -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "Bảng mã" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "Bảng mã mặc định cho khung xem Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "Bảng mã tự chọn" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "Bảng mã tự chọn cho khung xem Web" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" -msgstr "" +msgstr "URI biểu tượng" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." -msgstr "" +msgstr "URI của biểu tượng trang (favicon) cho #WebKitWebView." #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55 #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60 @@ -729,8 +731,8 @@ msgid "Reset" msgstr "Phục hồi" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "Chỉ mục _tìm được" +msgid "This is a searchable index. Enter search keywords: " +msgstr "Đây là chỉ mục tìm kiếm được. Hãy nhập từ khoá cần tìm: " #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -890,108 +892,107 @@ msgstr "Không biết" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364 msgid "Loading..." -msgstr "" +msgstr "Đang nạp" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369 msgid "Live Broadcast" -msgstr "" +msgstr "Phát trực tiếp" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375 msgid "audio element controller" -msgstr "" +msgstr "bộ điều khiển phần tử âm thanh" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377 msgid "video element controller" -msgstr "" +msgstr "bộ điều khiển phần tử hình ảnh" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379 msgid "mute" -msgstr "" +msgstr "tắt tiếng" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381 msgid "unmute" -msgstr "" +msgstr "không tắt tiếng" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383 msgid "play" -msgstr "" +msgstr "phát" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385 msgid "pause" -msgstr "" +msgstr "tạm dừng" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387 msgid "movie time" -msgstr "" +msgstr "thời lượng phim" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389 msgid "timeline slider thumb" -msgstr "" +msgstr "con chạy thời gian" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391 msgid "back 30 seconds" -msgstr "" +msgstr "lùi 30 giây" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393 msgid "return to realtime" -msgstr "" +msgstr "trở về thời gian thực" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395 msgid "elapsed time" -msgstr "" +msgstr "thời gian đã qua" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397 msgid "remaining time" -msgstr "" +msgstr "thời gian còn lại" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399 -#, fuzzy msgid "status" -msgstr "Tình trạng" +msgstr "tình trạng" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401 msgid "fullscreen" -msgstr "" +msgstr "toàn màn hình" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403 msgid "fast forward" -msgstr "" +msgstr "tới nhanh" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405 msgid "fast reverse" -msgstr "" +msgstr "lùi lại" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407 msgid "show closed captions" -msgstr "" +msgstr "xay đầu đề" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409 msgid "hide closed captions" -msgstr "" +msgstr "ẩn đầu đề" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418 msgid "audio element playback controls and status display" -msgstr "" +msgstr "bộ điều khiển phần tử phát tiếng và hiển thị tình trạng" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420 msgid "video element playback controls and status display" -msgstr "" +msgstr "bộ điều khiển phần tử phát hình và hiển thị tình trạng" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422 msgid "mute audio tracks" -msgstr "" +msgstr "tắt tiếng" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424 msgid "unmute audio tracks" -msgstr "" +msgstr "không tắt tiếng" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426 msgid "begin playback" -msgstr "" +msgstr "bắt đầu phát" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428 msgid "pause playback" -msgstr "" +msgstr "tạm dừng phát" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430 msgid "movie time scrubber" @@ -1003,73 +1004,75 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434 msgid "seek movie back 30 seconds" -msgstr "" +msgstr "quay lùi phim 30 giây" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436 msgid "return streaming movie to real time" -msgstr "" +msgstr "trở về luồng thời gian thực" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438 msgid "current movie time in seconds" -msgstr "" +msgstr "thời gian của phim theo giây" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440 msgid "number of seconds of movie remaining" -msgstr "" +msgstr "số giây còn lại" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442 msgid "current movie status" -msgstr "" +msgstr "tình trạng phim hiện thời" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444 msgid "seek quickly back" -msgstr "" +msgstr "lùi ngược nhanh" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446 msgid "seek quickly forward" -msgstr "" +msgstr "chạy tới nhanh" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448 msgid "Play movie in fullscreen mode" -msgstr "" +msgstr "Xem phim toàn màn hình" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450 msgid "start displaying closed captions" -msgstr "" +msgstr "bắt đầu hiển thị đầu đề" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452 msgid "stop displaying closed captions" -msgstr "" +msgstr "ngưng hiển thị đầu đề" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461 -#, fuzzy msgid "indefinite time" -msgstr "định nghĩa" +msgstr "vô hạn" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491 msgid "value missing" -msgstr "" +msgstr "thiếu giá trị" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497 msgid "type mismatch" -msgstr "" +msgstr "kiểu không khớp" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502 msgid "pattern mismatch" -msgstr "" +msgstr "mẫu không khớp" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507 msgid "too long" -msgstr "" +msgstr "quá dài" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512 msgid "range underflow" -msgstr "" +msgstr "phạm vi quá ngắn" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517 msgid "range overflow" -msgstr "" +msgstr "phạm vi quá dài" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" -msgstr "" +msgstr "nhảy bước không khớp" + +#~ msgid "_Searchable Index" +#~ msgstr "Chỉ mục _tìm được" diff --git a/WebKit/gtk/po/webkit.pot b/WebKit/gtk/po/webkit.pot index 5adf34f..ebe1df7 100644 --- a/WebKit/gtk/po/webkit.pot +++ b/WebKit/gtk/po/webkit.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.22\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:01-0200\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -69,88 +69,92 @@ msgstr "" msgid "_Insert Unicode Control Character" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 msgid "Network Response" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 msgid "The network response for the URI that should be downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 msgid "_Remember password" msgstr "" @@ -164,7 +168,7 @@ msgstr "" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "" @@ -174,7 +178,7 @@ msgstr "" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "" @@ -300,413 +304,421 @@ msgstr "" msgid "The target frame for the navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 msgid "Enables spell checking while typing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 msgid "Enable Caret Browsing" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 msgid "Enable XSS Auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 msgid "Enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 msgid "Whether the page cache should be used" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +msgid "Enable Java Applet" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -720,7 +732,7 @@ msgid "Reset" msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" +msgid "This is a searchable index. Enter search keywords: " msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 diff --git a/WebKit/gtk/po/zh_CN.po b/WebKit/gtk/po/zh_CN.po index 19e4f44..8561fd8 100644 --- a/WebKit/gtk/po/zh_CN.po +++ b/WebKit/gtk/po/zh_CN.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: webkit 1.1.4\n" "Report-Msgid-Bugs-To: http://bugs.webkit.org/\n" -"POT-Creation-Date: 2010-02-16 15:00-0200\n" +"POT-Creation-Date: 2010-02-25 15:53-0300\n" "PO-Revision-Date: 2009-07-14 18:11+0800\n" "Last-Translator: Aron Xu <aronmalache@163.com>\n" "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" @@ -70,90 +70,94 @@ msgstr "" msgid "_Insert Unicode Control Character" msgstr "插入 Unicode 控制字符(_I)" -#: WebKit/gtk/webkit/webkitdownload.cpp:262 +#: WebKit/gtk/webkit/webkitdownload.cpp:266 msgid "Network Request" msgstr "网络请求" -#: WebKit/gtk/webkit/webkitdownload.cpp:263 +#: WebKit/gtk/webkit/webkitdownload.cpp:267 msgid "The network request for the URI that should be downloaded" msgstr "网络请求该 URI 应当被下载" -#: WebKit/gtk/webkit/webkitdownload.cpp:277 +#: WebKit/gtk/webkit/webkitdownload.cpp:281 #, fuzzy msgid "Network Response" msgstr "网络请求" -#: WebKit/gtk/webkit/webkitdownload.cpp:278 +#: WebKit/gtk/webkit/webkitdownload.cpp:282 #, fuzzy msgid "The network response for the URI that should be downloaded" msgstr "网络请求该 URI 应当被下载" -#: WebKit/gtk/webkit/webkitdownload.cpp:292 +#: WebKit/gtk/webkit/webkitdownload.cpp:296 msgid "Destination URI" msgstr "目的 URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:293 +#: WebKit/gtk/webkit/webkitdownload.cpp:297 msgid "The destination URI where to save the file" msgstr "保存文件的目的 URI" -#: WebKit/gtk/webkit/webkitdownload.cpp:307 +#: WebKit/gtk/webkit/webkitdownload.cpp:311 msgid "Suggested Filename" msgstr "建议文件名" -#: WebKit/gtk/webkit/webkitdownload.cpp:308 +#: WebKit/gtk/webkit/webkitdownload.cpp:312 msgid "The filename suggested as default when saving" msgstr "保存时默认建议使用的文件名" -#: WebKit/gtk/webkit/webkitdownload.cpp:325 +#: WebKit/gtk/webkit/webkitdownload.cpp:329 msgid "Progress" msgstr "进度" -#: WebKit/gtk/webkit/webkitdownload.cpp:326 +#: WebKit/gtk/webkit/webkitdownload.cpp:330 msgid "Determines the current progress of the download" msgstr "显示当前下载进度" -#: WebKit/gtk/webkit/webkitdownload.cpp:339 +#: WebKit/gtk/webkit/webkitdownload.cpp:343 msgid "Status" msgstr "状态" -#: WebKit/gtk/webkit/webkitdownload.cpp:340 +#: WebKit/gtk/webkit/webkitdownload.cpp:344 msgid "Determines the current status of the download" msgstr "显示当前下载状态" -#: WebKit/gtk/webkit/webkitdownload.cpp:355 +#: WebKit/gtk/webkit/webkitdownload.cpp:359 msgid "Current Size" msgstr "当前尺寸" -#: WebKit/gtk/webkit/webkitdownload.cpp:356 +#: WebKit/gtk/webkit/webkitdownload.cpp:360 msgid "The length of the data already downloaded" msgstr "当前已下载的数据大小" -#: WebKit/gtk/webkit/webkitdownload.cpp:370 +#: WebKit/gtk/webkit/webkitdownload.cpp:374 msgid "Total Size" msgstr "总尺寸" -#: WebKit/gtk/webkit/webkitdownload.cpp:371 +#: WebKit/gtk/webkit/webkitdownload.cpp:375 msgid "The total size of the file" msgstr "文件总尺寸" -#: WebKit/gtk/webkit/webkitdownload.cpp:522 +#: WebKit/gtk/webkit/webkitdownload.cpp:526 msgid "User cancelled the download" msgstr "用户取消了下载" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:244 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248 #, c-format msgid "A username and password are being requested by the site %s" msgstr "站点 %s 请求用户名和密码" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:269 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278 +msgid "Server message:" +msgstr "" + +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291 msgid "Username:" msgstr "用户名:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:271 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293 msgid "Password:" msgstr "密码:" -#: WebKit/gtk/webkit/webkitsoupauthdialog.c:280 +#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302 #, fuzzy msgid "_Remember password" msgstr "记住密码" @@ -168,7 +172,7 @@ msgstr "框架名称" #: WebKit/gtk/webkit/webkitwebframe.cpp:305 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146 -#: WebKit/gtk/webkit/webkitwebview.cpp:2315 +#: WebKit/gtk/webkit/webkitwebview.cpp:2318 msgid "Title" msgstr "标题" @@ -178,7 +182,7 @@ msgstr "标题名称" #: WebKit/gtk/webkit/webkitwebframe.cpp:312 #: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178 -#: WebKit/gtk/webkit/webkitwebview.cpp:2329 +#: WebKit/gtk/webkit/webkitwebview.cpp:2332 msgid "URI" msgstr "URI" @@ -309,418 +313,427 @@ msgstr "框架名称" msgid "The target frame for the navigation" msgstr "此 URI 是被作为导航目标而请求的" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:233 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:237 msgid "Default Encoding" msgstr "默认编码" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:234 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:238 msgid "The default encoding used to display text." msgstr "用以显示文本的默认编码。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:242 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:246 msgid "Cursive Font Family" msgstr "草书字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:243 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:247 msgid "The default Cursive font family used to display text." msgstr "用以显示文本的默认草书字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:251 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:255 msgid "Default Font Family" msgstr "默认字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:252 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:256 msgid "The default font family used to display text." msgstr "用以显示文本的默认字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:260 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:264 msgid "Fantasy Font Family" msgstr "幻想字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:261 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:265 msgid "The default Fantasy font family used to display text." msgstr "用以显示文本的默认幻想字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:269 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:273 msgid "Monospace Font Family" msgstr "等宽字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:270 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:274 msgid "The default font family used to display monospace text." msgstr "用以显示文本的默认等宽字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:278 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:282 msgid "Sans Serif Font Family" msgstr "Sans Serif 字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:279 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:283 msgid "The default Sans Serif font family used to display text." msgstr "用以显示文本的默认 Sans Serif 字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:287 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:291 msgid "Serif Font Family" msgstr "Serif 字体" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:288 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:292 msgid "The default Serif font family used to display text." msgstr "用以显示文本的默认 Serif 字体。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:296 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:300 msgid "Default Font Size" msgstr "默认字号" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:297 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:301 msgid "The default font size used to display text." msgstr "用以显示文本的默认字号。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:305 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:309 msgid "Default Monospace Font Size" msgstr "默认等宽字号" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:306 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:310 msgid "The default font size used to display monospace text." msgstr "用以显示等宽文本的默认字号。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:314 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:318 msgid "Minimum Font Size" msgstr "最小字号" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:315 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:319 msgid "The minimum font size used to display text." msgstr "用以显示文本的最小字号。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:323 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:327 msgid "Minimum Logical Font Size" msgstr "最小逻辑字号" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:324 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:328 msgid "The minimum logical font size used to display text." msgstr "用以显示文本的最小逻辑字号。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:343 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:347 msgid "Enforce 96 DPI" msgstr "强制为 96 DPI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:344 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:348 msgid "Enforce a resolution of 96 DPI" msgstr "强制 96 DPI 分辨率" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:352 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:356 msgid "Auto Load Images" msgstr "自动载入图像" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:353 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:357 msgid "Load images automatically." msgstr "自动载入图像。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:361 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:365 msgid "Auto Shrink Images" msgstr "自动缩小图像" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:362 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:366 msgid "Automatically shrink standalone images to fit." msgstr "自动缩小单个图像以适应需求。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:370 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:374 msgid "Print Backgrounds" msgstr "打印背景" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:371 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:375 msgid "Whether background images should be printed." msgstr "是否打印背景。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:379 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:383 msgid "Enable Scripts" msgstr "启用脚本" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:380 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:384 msgid "Enable embedded scripting languages." msgstr "启用嵌入式脚步语言" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:388 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:392 msgid "Enable Plugins" msgstr "启用插件" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:389 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:393 msgid "Enable embedded plugin objects." msgstr "启用嵌入式插件对象。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:397 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:401 msgid "Resizable Text Areas" msgstr "大小可变文本域" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:398 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:402 msgid "Whether text areas are resizable." msgstr "文本域大小是否是否可变。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:405 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:409 msgid "User Stylesheet URI" msgstr "用户样式表 URI" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:406 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:410 msgid "The URI of a stylesheet that is applied to every page." msgstr "应用于每个页面的样式表的 URI。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:421 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:425 msgid "Zoom Stepping Value" msgstr "缩放步值" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:422 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:426 msgid "The value by which the zoom level is changed when zooming in or out." msgstr "在放大或缩小中每次缩放的步值。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:440 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:444 msgid "Enable Developer Extras" msgstr "启用开发者附加" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:441 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:445 msgid "Enables special extensions that help developers" msgstr "启用帮助开发者的特殊扩展" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:461 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:465 msgid "Enable Private Browsing" msgstr "启用隐私浏览" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:462 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:466 msgid "Enables private browsing mode" msgstr "启用隐私浏览模式" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:477 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:481 msgid "Enable Spell Checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:478 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:482 #, fuzzy msgid "Enables spell checking while typing" msgstr "输入时检查拼写(_T)" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:501 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:505 msgid "Languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:502 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:506 msgid "Comma separated list of languages to use for spell checking" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:516 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:520 #, fuzzy msgid "Enable Caret Browsing" msgstr "启用隐私浏览" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:517 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:521 msgid "Whether to enable accesibility enhanced keyboard navigation" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:532 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:536 msgid "Enable HTML5 Database" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:533 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:537 msgid "Whether to enable HTML5 database support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:548 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:552 msgid "Enable HTML5 Local Storage" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:549 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:553 msgid "Whether to enable HTML5 Local Storage support" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:563 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:567 #, fuzzy msgid "Enable XSS Auditor" msgstr "启用脚本" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:564 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:568 msgid "Whether to enable teh XSS auditor" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:582 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:586 msgid "User Agent" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:583 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:587 msgid "The User-Agent string used by WebKitGtk" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:598 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:602 msgid "JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:599 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:603 msgid "Whether JavaScript can open windows automatically" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:614 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:618 msgid "Enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:615 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:619 msgid "Whether to enable offline web application cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:642 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:646 msgid "Editing behavior" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:643 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:647 msgid "The behavior mode to use in editing mode" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:659 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:663 msgid "Enable universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:660 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:664 msgid "Whether to allow universal access from file URIs" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:675 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:679 #, fuzzy msgid "Enable DOM paste" msgstr "启用脚本" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:676 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:680 msgid "Whether to enable DOM paste" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:694 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:698 msgid "Tab key cycles through elements" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:695 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:699 msgid "Whether the tab key cycles through elements on the page." msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:715 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:719 msgid "Enable Default Context Menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:716 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:720 msgid "" "Enables the handling of right-clicks for the creation of the default context " "menu" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:736 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:740 msgid "Enable Site Specific Quirks" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:737 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:741 msgid "Enables the site-specific compatibility workarounds" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:759 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:763 msgid "Enable page cache" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:760 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:764 #, fuzzy msgid "Whether the page cache should be used" msgstr "是否打印背景。" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:780 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:784 msgid "Auto Resize Window" msgstr "" -#: WebKit/gtk/webkit/webkitwebsettings.cpp:781 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:785 msgid "Automatically resize the toplevel window when a page requests it" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2316 +#: WebKit/gtk/webkit/webkitwebsettings.cpp:817 +#, fuzzy +msgid "Enable Java Applet" +msgstr "启用 JavaScript 摘要" + +#: WebKit/gtk/webkit/webkitwebsettings.cpp:818 +msgid "Whether Java Applet support through <applet> should be enabled" +msgstr "" + +#: WebKit/gtk/webkit/webkitwebview.cpp:2319 msgid "Returns the @web_view's document title" msgstr "返回 @web_view 的文档标题" -#: WebKit/gtk/webkit/webkitwebview.cpp:2330 +#: WebKit/gtk/webkit/webkitwebview.cpp:2333 msgid "Returns the current URI of the contents displayed by the @web_view" msgstr "返回当前由 @web_view 显示的内容的 URI" -#: WebKit/gtk/webkit/webkitwebview.cpp:2343 +#: WebKit/gtk/webkit/webkitwebview.cpp:2346 msgid "Copy target list" msgstr "复制目标列表" -#: WebKit/gtk/webkit/webkitwebview.cpp:2344 +#: WebKit/gtk/webkit/webkitwebview.cpp:2347 msgid "The list of targets this web view supports for clipboard copying" msgstr "目标 Web View 列表支持剪贴簿复制" -#: WebKit/gtk/webkit/webkitwebview.cpp:2357 +#: WebKit/gtk/webkit/webkitwebview.cpp:2360 msgid "Paste target list" msgstr "粘贴目标列表" -#: WebKit/gtk/webkit/webkitwebview.cpp:2358 +#: WebKit/gtk/webkit/webkitwebview.cpp:2361 msgid "The list of targets this web view supports for clipboard pasting" msgstr "目标 Web View 列表支持剪贴簿粘贴" -#: WebKit/gtk/webkit/webkitwebview.cpp:2364 +#: WebKit/gtk/webkit/webkitwebview.cpp:2367 msgid "Settings" msgstr "设置" -#: WebKit/gtk/webkit/webkitwebview.cpp:2365 +#: WebKit/gtk/webkit/webkitwebview.cpp:2368 msgid "An associated WebKitWebSettings instance" msgstr "一个关联的 WebKitWebSettings 样例" -#: WebKit/gtk/webkit/webkitwebview.cpp:2378 +#: WebKit/gtk/webkit/webkitwebview.cpp:2381 msgid "Web Inspector" msgstr "Web Inspector" -#: WebKit/gtk/webkit/webkitwebview.cpp:2379 +#: WebKit/gtk/webkit/webkitwebview.cpp:2382 msgid "The associated WebKitWebInspector instance" msgstr "一个关联的 WebKitWebInspector 样例" -#: WebKit/gtk/webkit/webkitwebview.cpp:2399 +#: WebKit/gtk/webkit/webkitwebview.cpp:2402 msgid "Editable" msgstr "可编辑" -#: WebKit/gtk/webkit/webkitwebview.cpp:2400 +#: WebKit/gtk/webkit/webkitwebview.cpp:2403 msgid "Whether content can be modified by the user" msgstr "用户是否可编辑内容" -#: WebKit/gtk/webkit/webkitwebview.cpp:2406 +#: WebKit/gtk/webkit/webkitwebview.cpp:2409 msgid "Transparent" msgstr "透明" -#: WebKit/gtk/webkit/webkitwebview.cpp:2407 +#: WebKit/gtk/webkit/webkitwebview.cpp:2410 msgid "Whether content has a transparent background" msgstr "内容是否包含透明背景" -#: WebKit/gtk/webkit/webkitwebview.cpp:2420 +#: WebKit/gtk/webkit/webkitwebview.cpp:2423 msgid "Zoom level" msgstr "缩放级别" -#: WebKit/gtk/webkit/webkitwebview.cpp:2421 +#: WebKit/gtk/webkit/webkitwebview.cpp:2424 msgid "The level of zoom of the content" msgstr "内容缩放级别" -#: WebKit/gtk/webkit/webkitwebview.cpp:2436 +#: WebKit/gtk/webkit/webkitwebview.cpp:2439 msgid "Full content zoom" msgstr "完整内容缩放" -#: WebKit/gtk/webkit/webkitwebview.cpp:2437 +#: WebKit/gtk/webkit/webkitwebview.cpp:2440 msgid "Whether the full content is scaled when zooming" msgstr "是否将所有内容完整缩放" -#: WebKit/gtk/webkit/webkitwebview.cpp:2450 +#: WebKit/gtk/webkit/webkitwebview.cpp:2453 msgid "Encoding" msgstr "编码" -#: WebKit/gtk/webkit/webkitwebview.cpp:2451 +#: WebKit/gtk/webkit/webkitwebview.cpp:2454 msgid "The default encoding of the web view" msgstr "Web View 的默认编码" -#: WebKit/gtk/webkit/webkitwebview.cpp:2464 +#: WebKit/gtk/webkit/webkitwebview.cpp:2467 msgid "Custom Encoding" msgstr "自定义编码" -#: WebKit/gtk/webkit/webkitwebview.cpp:2465 +#: WebKit/gtk/webkit/webkitwebview.cpp:2468 msgid "The custom encoding of the web view" msgstr "Web View的自定义编码" -#: WebKit/gtk/webkit/webkitwebview.cpp:2517 +#: WebKit/gtk/webkit/webkitwebview.cpp:2520 msgid "Icon URI" msgstr "" -#: WebKit/gtk/webkit/webkitwebview.cpp:2518 +#: WebKit/gtk/webkit/webkitwebview.cpp:2521 msgid "The URI for the favicon for the #WebKitWebView." msgstr "" @@ -734,8 +747,8 @@ msgid "Reset" msgstr "重置" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70 -msgid "_Searchable Index" -msgstr "可搜索索引(_S)" +msgid "This is a searchable index. Enter search keywords: " +msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75 msgid "Choose File" @@ -1078,3 +1091,6 @@ msgstr "" #: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522 msgid "step mismatch" msgstr "" + +#~ msgid "_Searchable Index" +#~ msgstr "可搜索索引(_S)" diff --git a/WebKit/gtk/tests/test_utils.c b/WebKit/gtk/tests/test_utils.c new file mode 100644 index 0000000..646fd25 --- /dev/null +++ b/WebKit/gtk/tests/test_utils.c @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2010 Arno Renevier + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "test_utils.h" + +#include <glib.h> +#include <glib/gstdio.h> + +int testutils_relative_chdir(const gchar* target_filename, const gchar* executable_path) +{ + if (g_path_is_absolute(executable_path)) { + if (g_chdir(g_path_get_dirname(executable_path))) { + return -1; + } + } + + while (!g_file_test(target_filename, G_FILE_TEST_EXISTS)) { + gchar *path_name; + if (g_chdir("..")) { + return -1; + } + g_assert(!g_str_equal((path_name = g_get_current_dir()), "/")); + g_free(path_name); + } + + gchar* dirname = g_path_get_dirname(target_filename); + if (g_chdir(dirname)) { + g_free(dirname); + return -1; + } + + g_free(dirname); + return 0; +} diff --git a/WebKit/gtk/tests/test_utils.h b/WebKit/gtk/tests/test_utils.h new file mode 100644 index 0000000..e761f74 --- /dev/null +++ b/WebKit/gtk/tests/test_utils.h @@ -0,0 +1,3 @@ +#include <glib.h> + +int testutils_relative_chdir(const gchar*, const gchar*); diff --git a/WebKit/gtk/tests/testatk.c b/WebKit/gtk/tests/testatk.c index 7db274a..1f1ab0c 100644 --- a/WebKit/gtk/tests/testatk.c +++ b/WebKit/gtk/tests/testatk.c @@ -38,6 +38,8 @@ static const char* contentsInParagraphAndBodySimple = "<html><body><p>This is a static const char* contentsInParagraphAndBodyModerate = "<html><body><p>This is a test.</p>Hello world.<br /><font color='#00cc00'>This sentence is green.</font><br />This one is not.</body></html>"; +static const char* contentsInTable = "<html><body><table><tr><td>foo</td><td>bar</td></tr></table></body></html>"; + static gboolean bail_out(GMainLoop* loop) { if (g_main_loop_is_running(loop)) @@ -450,6 +452,34 @@ static void testWebkitAtkGetTextInParagraphAndBodyModerate(void) g_object_unref(webView); } +static void testWebkitAtkGetTextInTable(void) +{ + WebKitWebView* webView; + AtkObject* obj; + GMainLoop* loop; + + webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(webView); + GtkAllocation alloc = { 0, 0, 800, 600 }; + gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc); + webkit_web_view_load_string(webView, contentsInTable, NULL, NULL, NULL); + loop = g_main_loop_new(NULL, TRUE); + + g_timeout_add(100, (GSourceFunc)bail_out, loop); + g_main_loop_run(loop); + + obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); + g_assert(obj); + obj = atk_object_ref_accessible_child(obj, 0); + g_assert(obj); + + /* Tables should not implement AtkText */ + g_assert(G_TYPE_INSTANCE_GET_INTERFACE(obj, ATK_TYPE_TEXT, AtkTextIface) == NULL); + + g_object_unref(obj); + g_object_unref(webView); +} + int main(int argc, char** argv) { g_thread_init(NULL); @@ -463,6 +493,7 @@ int main(int argc, char** argv) g_test_add_func("/webkit/atk/get_text_at_offset_text_input", test_webkit_atk_get_text_at_offset_text_input); g_test_add_func("/webkit/atk/getTextInParagraphAndBodySimple", testWebkitAtkGetTextInParagraphAndBodySimple); g_test_add_func("/webkit/atk/getTextInParagraphAndBodyModerate", testWebkitAtkGetTextInParagraphAndBodyModerate); + g_test_add_func("/webkit/atk/getTextInTable", testWebkitAtkGetTextInTable); return g_test_run (); } diff --git a/WebKit/gtk/tests/testatkroles.c b/WebKit/gtk/tests/testatkroles.c new file mode 100644 index 0000000..d3ade6e --- /dev/null +++ b/WebKit/gtk/tests/testatkroles.c @@ -0,0 +1,383 @@ +/* + * Copyright © 2010 Joanmarie Diggs + * Copyright © 2010 Igalia S.L. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include <glib.h> +#include <glib/gstdio.h> +#include <gtk/gtk.h> +#include <webkit/webkit.h> + +#if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0) + +/* Non form roles */ +#define HTML_DOCUMENT_FRAME "<html><body>This is a test.</body></html>" +#define HTML_HEADING "<html><body><h1>1</h1><h2>2</h2><h3>3</h3><h4>4</h4><h5>5</h5><h6>6</h6></body></html>" +#define HTML_IMAGE "<html><body><img src='foobar.png' alt='This is a test.'/></body></html>" +#define HTML_LINK_TEXT "<html><body><a href='foobar.html'>This is a test.</a></body></html>" +#define HTML_LIST "<html><body><ul><li>1</li><li>2</li></ul><ol><li>1</li><li>2</li></ol></body></html>" +#define HTML_PARAGRAPH "<html><body><p>This is a test.</p></body></html>" +#define HTML_SECTION "<html><body><div>This is a test.</div></body></html>" +#define HTML_TABLE "<html><body><table border='1'><tr><td>This is</td><td>a test.</td></tr></table></body></html>" +/* Form roles */ +#define HTML_FORM "<html><body><form>This is a test.</form></body></html>" +#define HTML_CHECK_BOX "<html><body><input type='checkbox' />This is a test.</body></html>" +#define HTML_LABELED_ENTRY "<html><body><label for='foo'>Name:</label><input type='text' id='foo' /></body></html>" +#define HTML_LISTBOX "<html><body><select size='3'><option>one</option><option>two</option><option>three</option></select></body></html>" +#define HTML_PASSWORD_TEXT "<html><body><input type='password' /></body></html>" +#define HTML_PUSH_BUTTON "<html><body><input type='submit' value='ok' />This is a test.</body></html>" +#define HTML_RADIO_BUTTON "<html><body><input type='radio' />This is a test.</body></html>" + +typedef struct { + AtkObject* documentFrame; + AtkObject* obj; + AtkRole role; + GtkWidget* webView; + GtkAllocation alloc; + GMainLoop* loop; +} AtkRolesFixture; + +static gboolean finish_loading(AtkRolesFixture* fixture) +{ + if (g_main_loop_is_running(fixture->loop)) + g_main_loop_quit(fixture->loop); + + fixture->documentFrame = gtk_widget_get_accessible(fixture->webView); + g_assert(fixture->documentFrame); + + return FALSE; +} + +static void atk_roles_fixture_setup(AtkRolesFixture* fixture, gconstpointer data) +{ + fixture->loop = g_main_loop_new(NULL, TRUE); + fixture->alloc = (GtkAllocation) { 0, 0, 800, 600 }; + fixture->webView = webkit_web_view_new(); + g_object_ref_sink(fixture->webView); + + gtk_widget_size_allocate(fixture->webView, &fixture->alloc); + + if (data != NULL) + webkit_web_view_load_string(WEBKIT_WEB_VIEW (fixture->webView), (const char*) data, NULL, NULL, NULL); + + g_idle_add((GSourceFunc) finish_loading, fixture); + g_main_loop_run(fixture->loop); +} + +static void atk_roles_fixture_teardown(AtkRolesFixture* fixture, gconstpointer data) +{ + g_object_unref(fixture->webView); + g_main_loop_unref(fixture->loop); +} + +static void get_child_and_test_role(AtkObject* obj, gint pos, AtkRole role) +{ + AtkObject* child; + AtkRole child_role; + + child = atk_object_ref_accessible_child(obj, pos); + g_assert(child); + child_role = atk_object_get_role(child); + g_assert(child_role == role); + + g_object_unref(child); +} + +static void test_webkit_atk_get_role_document_frame(AtkRolesFixture* fixture, gconstpointer data) +{ + fixture->role = atk_object_get_role(fixture->documentFrame); + g_assert(fixture->role == ATK_ROLE_DOCUMENT_FRAME); +} + +static void test_webkit_atk_get_role_heading(AtkRolesFixture* fixture, gconstpointer data) +{ + get_child_and_test_role(fixture->documentFrame, 0, ATK_ROLE_HEADING); + get_child_and_test_role(fixture->documentFrame, 1, ATK_ROLE_HEADING); + get_child_and_test_role(fixture->documentFrame, 2, ATK_ROLE_HEADING); + get_child_and_test_role(fixture->documentFrame, 3, ATK_ROLE_HEADING); + get_child_and_test_role(fixture->documentFrame, 4, ATK_ROLE_HEADING); + get_child_and_test_role(fixture->documentFrame, 5, ATK_ROLE_HEADING); +} + +static void test_webkit_atk_get_role_image(AtkRolesFixture* fixture, gconstpointer data) +{ + // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of. + fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(fixture->obj); + + get_child_and_test_role(fixture->obj, 0, ATK_ROLE_IMAGE); + + g_object_unref(fixture->obj); +} + +static void test_webkit_atk_get_role_link(AtkRolesFixture* fixture, gconstpointer data) +{ + // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of. + fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(fixture->obj); + + get_child_and_test_role(fixture->obj, 0, ATK_ROLE_LINK); + + g_object_unref(fixture->obj); +} + +static void test_webkit_atk_get_role_list_and_item(AtkRolesFixture* fixture, gconstpointer data) +{ + AtkObject* listObj; + + listObj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(listObj); + fixture->role = atk_object_get_role(listObj); + g_assert(fixture->role == ATK_ROLE_LIST); + + get_child_and_test_role(listObj, 0, ATK_ROLE_LIST_ITEM); + get_child_and_test_role(listObj, 1, ATK_ROLE_LIST_ITEM); + g_object_unref(listObj); + + listObj = atk_object_ref_accessible_child(fixture->documentFrame, 1); + g_assert(listObj); + fixture->role = atk_object_get_role(listObj); + g_assert(fixture->role == ATK_ROLE_LIST); + + get_child_and_test_role(listObj, 0, ATK_ROLE_LIST_ITEM); + get_child_and_test_role(listObj, 1, ATK_ROLE_LIST_ITEM); + g_object_unref(listObj); +} + +static void test_webkit_atk_get_role_paragraph(AtkRolesFixture* fixture, gconstpointer data) +{ + get_child_and_test_role(fixture->documentFrame, 0, ATK_ROLE_PARAGRAPH); +} + +static void test_webkit_atk_get_role_section(AtkRolesFixture* fixture, gconstpointer data) +{ + get_child_and_test_role(fixture->documentFrame, 0, ATK_ROLE_SECTION); +} + +// Does not yet test table cells because of bug 30895. +static void test_webkit_atk_get_role_table(AtkRolesFixture* fixture, gconstpointer data) +{ + get_child_and_test_role(fixture->documentFrame, 0, ATK_ROLE_TABLE); +} + +/* Form roles */ +static void test_webkit_atk_get_role_form(AtkRolesFixture *fixture, gconstpointer data) +{ + get_child_and_test_role(fixture->documentFrame, 0, ATK_ROLE_FORM); +} + +static void test_webkit_atk_get_role_check_box(AtkRolesFixture* fixture, gconstpointer data) +{ + // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of. + fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(fixture->obj); + + get_child_and_test_role(fixture->obj, 0, ATK_ROLE_CHECK_BOX); + + g_object_unref(fixture->obj); +} + +static void test_webkit_atk_get_role_entry(AtkRolesFixture* fixture, gconstpointer data) +{ + // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of. + fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(fixture->obj); + + get_child_and_test_role(fixture->obj, 1, ATK_ROLE_ENTRY); + + g_object_unref(fixture->obj); +} + +static void test_webkit_atk_get_role_label(AtkRolesFixture* fixture, gconstpointer data) +{ + // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of. + fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(fixture->obj); + + get_child_and_test_role(fixture->obj, 0, ATK_ROLE_LABEL); + + g_object_unref(fixture->obj); +} + +static void test_webkit_atk_get_role_listbox(AtkRolesFixture* fixture, gconstpointer data) +{ + AtkObject* listboxObj; + // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of. + fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(fixture->obj); + + listboxObj = atk_object_ref_accessible_child(fixture->obj, 0); + g_assert(listboxObj); + fixture->role = atk_object_get_role(listboxObj); + g_assert(fixture->role == ATK_ROLE_LIST); + + get_child_and_test_role(listboxObj, 0, ATK_ROLE_LIST_ITEM); + get_child_and_test_role(listboxObj, 1, ATK_ROLE_LIST_ITEM); + get_child_and_test_role(listboxObj, 2, ATK_ROLE_LIST_ITEM); + + g_object_unref(fixture->obj); + g_object_unref(listboxObj); +} + +static void test_webkit_atk_get_role_password_text(AtkRolesFixture* fixture, gconstpointer data) +{ + // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of. + fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(fixture->obj); + + get_child_and_test_role(fixture->obj, 0, ATK_ROLE_PASSWORD_TEXT); + + g_object_unref(fixture->obj); +} + +static void test_webkit_atk_get_role_push_button(AtkRolesFixture* fixture, gconstpointer data) +{ + // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of. + fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(fixture->obj); + + get_child_and_test_role(fixture->obj, 0, ATK_ROLE_PUSH_BUTTON); + + g_object_unref(fixture->obj); +} + +static void test_webkit_atk_get_role_radio_button(AtkRolesFixture* fixture, gconstpointer data) +{ + // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of. + fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0); + g_assert(fixture->obj); + + get_child_and_test_role(fixture->obj, 0, ATK_ROLE_RADIO_BUTTON); + + g_object_unref(fixture->obj); +} + +int main(int argc, char** argv) +{ + g_thread_init(NULL); + gtk_test_init(&argc, &argv, NULL); + + g_test_bug_base("https://bugs.webkit.org/"); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_document_frame", + AtkRolesFixture, HTML_DOCUMENT_FRAME, + atk_roles_fixture_setup, + test_webkit_atk_get_role_document_frame, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_heading", + AtkRolesFixture, HTML_HEADING, + atk_roles_fixture_setup, + test_webkit_atk_get_role_heading, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_image", + AtkRolesFixture, HTML_IMAGE, + atk_roles_fixture_setup, + test_webkit_atk_get_role_image, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_link", + AtkRolesFixture, HTML_LINK_TEXT, + atk_roles_fixture_setup, + test_webkit_atk_get_role_link, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_list_and_item", + AtkRolesFixture, HTML_LIST, + atk_roles_fixture_setup, + test_webkit_atk_get_role_list_and_item, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_paragraph", + AtkRolesFixture, HTML_PARAGRAPH, + atk_roles_fixture_setup, + test_webkit_atk_get_role_paragraph, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_section", + AtkRolesFixture, HTML_SECTION, + atk_roles_fixture_setup, + test_webkit_atk_get_role_section, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_table", + AtkRolesFixture, HTML_TABLE, + atk_roles_fixture_setup, + test_webkit_atk_get_role_table, + atk_roles_fixture_teardown); + + /* Form roles */ + g_test_add("/webkit/atk/test_webkit_atk_get_role_form", + AtkRolesFixture, HTML_FORM, + atk_roles_fixture_setup, + test_webkit_atk_get_role_form, + atk_roles_fixture_teardown); + g_test_add("/webkit/atk/test_webkit_atk_get_role_check_box", + AtkRolesFixture, HTML_CHECK_BOX, + atk_roles_fixture_setup, + test_webkit_atk_get_role_check_box, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_entry", + AtkRolesFixture, HTML_LABELED_ENTRY, + atk_roles_fixture_setup, + test_webkit_atk_get_role_entry, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_label", + AtkRolesFixture, HTML_LABELED_ENTRY, + atk_roles_fixture_setup, + test_webkit_atk_get_role_label, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_listbox", + AtkRolesFixture, HTML_LISTBOX, + atk_roles_fixture_setup, + test_webkit_atk_get_role_listbox, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_password_text", + AtkRolesFixture, HTML_PASSWORD_TEXT, + atk_roles_fixture_setup, + test_webkit_atk_get_role_password_text, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_push_button", + AtkRolesFixture, HTML_PUSH_BUTTON, + atk_roles_fixture_setup, + test_webkit_atk_get_role_push_button, + atk_roles_fixture_teardown); + + g_test_add("/webkit/atk/test_webkit_atk_get_role_radio_button", + AtkRolesFixture, HTML_RADIO_BUTTON, + atk_roles_fixture_setup, + test_webkit_atk_get_role_radio_button, + atk_roles_fixture_teardown); + + return g_test_run(); +} + +#else +int main(int argc, char** argv) +{ + g_critical("You will need at least glib-2.16.0 and gtk-2.14.0 to run the unit tests. Doing nothing now."); + return 0; +} + +#endif diff --git a/WebKit/gtk/tests/testglobals.c b/WebKit/gtk/tests/testglobals.c new file mode 100644 index 0000000..e53edf4 --- /dev/null +++ b/WebKit/gtk/tests/testglobals.c @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2010 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include <gtk/gtk.h> +#include <libsoup/soup.h> +#include <webkit/webkit.h> + +#if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0) + +// Make sure the session is initialized properly when webkit_get_default_session() is called. +static void test_globals_default_session() +{ + g_test_bug("36754"); + + SoupSession* session = webkit_get_default_session(); + soup_session_remove_feature_by_type(session, WEBKIT_TYPE_SOUP_AUTH_DIALOG); + + // This makes sure our initialization ran. + g_assert(soup_session_get_feature(session, SOUP_TYPE_CONTENT_DECODER) != NULL); + + // Creating a WebView should make sure the session is + // initialized, and not mess with our changes. + WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(web_view); + g_object_unref(web_view); + + // These makes sure our modification was kept. + g_assert(soup_session_get_feature(session, SOUP_TYPE_CONTENT_DECODER) != NULL); + g_assert(soup_session_get_feature(session, WEBKIT_TYPE_SOUP_AUTH_DIALOG) == NULL); +} + +int main(int argc, char** argv) +{ + g_thread_init(NULL); + gtk_test_init(&argc, &argv, NULL); + + g_test_bug_base("https://bugs.webkit.org/"); + g_test_add_func("/webkit/globals/default_session", + test_globals_default_session); + return g_test_run(); +} + +#else +int main(int argc, char** argv) +{ + g_critical("You will need at least glib-2.16.0 and gtk-2.14.0 to run the unit tests. Doing nothing now."); + return 0; +} + +#endif diff --git a/WebKit/gtk/tests/testkeyevents.c b/WebKit/gtk/tests/testkeyevents.c index ee7728c..b41a032 100644 --- a/WebKit/gtk/tests/testkeyevents.c +++ b/WebKit/gtk/tests/testkeyevents.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Martin Robinson + * Copyright (C) 2009, 2010 Martin Robinson <mrobinson@webkit.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,12 +22,16 @@ #include <string.h> #include <glib/gstdio.h> #include <webkit/webkit.h> +#include <JavaScriptCore/JSStringRef.h> +#include <JavaScriptCore/JSContextRef.h> + #if GTK_CHECK_VERSION(2, 14, 0) typedef struct { - char* page; - gboolean shouldBeHandled; + char* page; + char* text; + gboolean shouldBeHandled; } TestInfo; typedef struct { @@ -45,6 +49,7 @@ test_info_new(const char* page, gboolean shouldBeHandled) info = g_slice_new(TestInfo); info->page = g_strdup(page); info->shouldBeHandled = shouldBeHandled; + info->text = 0; return info; } @@ -53,6 +58,7 @@ void test_info_destroy(TestInfo* info) { g_free(info->page); + g_free(info->text); g_slice_free(TestInfo, info); } @@ -82,7 +88,6 @@ static gboolean key_press_event_cb(WebKitWebView* webView, GdkEvent* event, gpoi return FALSE; } - static gboolean key_release_event_cb(WebKitWebView* webView, GdkEvent* event, gpointer data) { // WebCore never seems to mark keyup events as handled. @@ -95,13 +100,18 @@ static gboolean key_release_event_cb(WebKitWebView* webView, GdkEvent* event, gp return FALSE; } -static void load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data) +static void test_keypress_events_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data) { KeyEventFixture* fixture = (KeyEventFixture*)data; WebKitLoadStatus status = webkit_web_view_get_load_status(webView); if (status == WEBKIT_LOAD_FINISHED) { - gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), - gdk_unicode_to_keyval('a'), 0); + g_signal_connect(fixture->webView, "key-press-event", + G_CALLBACK(key_press_event_cb), fixture); + g_signal_connect(fixture->webView, "key-release-event", + G_CALLBACK(key_release_event_cb), fixture); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('a'), 0)) + g_assert_not_reached(); } } @@ -110,25 +120,14 @@ gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data) { gtk_widget_grab_focus(widget); KeyEventFixture* fixture = (KeyEventFixture*)data; - - g_signal_connect(fixture->webView, "key-press-event", - G_CALLBACK(key_press_event_cb), fixture); - g_signal_connect(fixture->webView, "key-release-event", - G_CALLBACK(key_release_event_cb), fixture); - - g_signal_connect(fixture->webView, "notify::load-status", - G_CALLBACK(load_status_cb), fixture); - webkit_web_view_load_string(fixture->webView, fixture->info->page, "text/html", "utf-8", "file://"); - return FALSE; } -static void test_keypress(KeyEventFixture* fixture, gconstpointer data) +static void setup_keyevent_test(KeyEventFixture* fixture, gconstpointer data, GCallback load_event_callback) { fixture->info = (TestInfo*)data; - g_signal_connect(fixture->window, "map-event", G_CALLBACK(map_event_cb), fixture); @@ -136,10 +135,172 @@ static void test_keypress(KeyEventFixture* fixture, gconstpointer data) gtk_widget_show(GTK_WIDGET(fixture->webView)); gtk_window_present(GTK_WINDOW(fixture->window)); + g_signal_connect(fixture->webView, "notify::load-status", + load_event_callback, fixture); + g_main_loop_run(fixture->loop); +} + +static void test_keypress_events(KeyEventFixture* fixture, gconstpointer data) +{ + setup_keyevent_test(fixture, data, G_CALLBACK(test_keypress_events_load_status_cb)); +} + +static gboolean element_text_equal_to(JSContextRef context, const gchar* text) +{ + JSStringRef scriptString = JSStringCreateWithUTF8CString( + "window.document.getElementById(\"in\").value;"); + JSValueRef value = JSEvaluateScript(context, scriptString, 0, 0, 0, 0); + JSStringRelease(scriptString); + + // If the value isn't a string, the element is probably a div + // so grab the innerText instead. + if (!JSValueIsString(context, value)) { + JSStringRef scriptString = JSStringCreateWithUTF8CString( + "window.document.getElementById(\"in\").innerText;"); + value = JSEvaluateScript(context, scriptString, 0, 0, 0, 0); + JSStringRelease(scriptString); + } + + g_assert(JSValueIsString(context, value)); + JSStringRef inputString = JSValueToStringCopy(context, value, 0); + g_assert(inputString); + + gint size = JSStringGetMaximumUTF8CStringSize(inputString); + gchar* cString = g_malloc(size); + JSStringGetUTF8CString(inputString, cString, size); + JSStringRelease(inputString); + + gboolean result = g_utf8_collate(cString, text) == 0; + g_free(cString); + return result; +} + +static void test_ime_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data) +{ + KeyEventFixture* fixture = (KeyEventFixture*)data; + WebKitLoadStatus status = webkit_web_view_get_load_status(webView); + if (status != WEBKIT_LOAD_FINISHED) + return; + + JSGlobalContextRef context = webkit_web_frame_get_global_context( + webkit_web_view_get_main_frame(webView)); + g_assert(context); + + GtkIMContext* imContext = 0; + g_object_get(webView, "im-context", &imContext, NULL); + g_assert(imContext); + + // Test that commits that happen outside of key events + // change the text field immediately. This closely replicates + // the behavior of SCIM. + g_assert(element_text_equal_to(context, "")); + g_signal_emit_by_name(imContext, "commit", "a"); + g_assert(element_text_equal_to(context, "a")); + g_signal_emit_by_name(imContext, "commit", "b"); + g_assert(element_text_equal_to(context, "ab")); + g_signal_emit_by_name(imContext, "commit", "c"); + g_assert(element_text_equal_to(context, "abc")); + + g_object_unref(imContext); + g_main_loop_quit(fixture->loop); +} + +static void test_ime(KeyEventFixture* fixture, gconstpointer data) +{ + setup_keyevent_test(fixture, data, G_CALLBACK(test_ime_load_status_cb)); +} + +static gboolean verify_contents(gpointer data) +{ + KeyEventFixture* fixture = (KeyEventFixture*)data; + JSGlobalContextRef context = webkit_web_frame_get_global_context( + webkit_web_view_get_main_frame(fixture->webView)); + g_assert(context); + + g_assert(element_text_equal_to(context, fixture->info->text)); + g_main_loop_quit(fixture->loop); + return FALSE; +} + +static void test_blocking_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data) +{ + KeyEventFixture* fixture = (KeyEventFixture*)data; + WebKitLoadStatus status = webkit_web_view_get_load_status(webView); + if (status != WEBKIT_LOAD_FINISHED) + return; + + // The first keypress event should not modify the field. + fixture->info->text = g_strdup("bc"); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('a'), 0)) + g_assert_not_reached(); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('b'), 0)) + g_assert_not_reached(); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('c'), 0)) + g_assert_not_reached(); + + g_idle_add(verify_contents, fixture); +} + +static void test_blocking(KeyEventFixture* fixture, gconstpointer data) +{ + setup_keyevent_test(fixture, data, G_CALLBACK(test_blocking_load_status_cb)); +} +#if defined(GDK_WINDOWING_X11) && GTK_CHECK_VERSION(2, 16, 0) +static void test_xim_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data) +{ + KeyEventFixture* fixture = (KeyEventFixture*)data; + WebKitLoadStatus status = webkit_web_view_get_load_status(webView); + if (status != WEBKIT_LOAD_FINISHED) + return; + + GtkIMContext* imContext = 0; + g_object_get(webView, "im-context", &imContext, NULL); + g_assert(imContext); + + gchar* originalId = g_strdup(gtk_im_multicontext_get_context_id(GTK_IM_MULTICONTEXT(imContext))); + gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(imContext), "xim"); + + // Test that commits that happen outside of key events + // change the text field immediately. This closely replicates + // the behavior of SCIM. + fixture->info->text = g_strdup("debian"); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('d'), 0)) + g_assert_not_reached(); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('e'), 0)) + g_assert_not_reached(); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('b'), 0)) + g_assert_not_reached(); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('i'), 0)) + g_assert_not_reached(); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('a'), 0)) + g_assert_not_reached(); + if (!gtk_test_widget_send_key(GTK_WIDGET(fixture->webView), + gdk_unicode_to_keyval('n'), 0)) + g_assert_not_reached(); + + gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(imContext), originalId); + g_free(originalId); + g_object_unref(imContext); + + g_idle_add(verify_contents, fixture); } +static void test_xim(KeyEventFixture* fixture, gconstpointer data) +{ + setup_keyevent_test(fixture, data, G_CALLBACK(test_xim_load_status_cb)); +} +#endif + int main(int argc, char** argv) { g_thread_init(NULL); @@ -147,30 +308,85 @@ int main(int argc, char** argv) g_test_bug_base("https://bugs.webkit.org/"); - g_test_add("/webkit/keyevent/textfield", KeyEventFixture, - test_info_new("<html><body><input id=\"in\" type=\"text\">" - "<script>document.getElementById('in').focus();" - "</script></body></html>", TRUE), + + // We'll test input on a slew of different node types. Key events to + // text inputs and editable divs should be marked as handled. Key events + // to buttons and links should not. + const char* textinput_html = "<html><body><input id=\"in\" type=\"text\">" + "<script>document.getElementById('in').focus();</script></body></html>"; + const char* button_html = "<html><body><input id=\"in\" type=\"button\">" + "<script>document.getElementById('in').focus();</script></body></html>"; + const char* link_html = "<html><body><a href=\"http://www.gnome.org\" id=\"in\">" + "LINKY MCLINKERSON</a><script>document.getElementById('in').focus();</script>" + "</body></html>"; + const char* div_html = "<html><body><div id=\"in\" contenteditable=\"true\">" + "<script>document.getElementById('in').focus();</script></body></html>"; + + // These are similar to the blocks above, but they should block the first + // keypress modifying the editable node. + const char* textinput_html_blocking = "<html><body>" + "<input id=\"in\" type=\"text\" " + "onkeypress=\"if (first) {event.preventDefault();first=false;}\">" + "<script>first = true;\ndocument.getElementById('in').focus();</script>\n" + "</script></body></html>"; + const char* div_html_blocking = "<html><body>" + "<div id=\"in\" contenteditable=\"true\" " + "onkeypress=\"if (first) {event.preventDefault();first=false;}\">" + "<script>first = true; document.getElementById('in').focus();</script>\n" + "</script></body></html>"; + + g_test_add("/webkit/keyevents/event-textinput", KeyEventFixture, + test_info_new(textinput_html, TRUE), key_event_fixture_setup, - test_keypress, + test_keypress_events, key_event_fixture_teardown); - - g_test_add("/webkit/keyevent/buttons", KeyEventFixture, - test_info_new("<html><body><input id=\"in\" type=\"button\">" - "<script>document.getElementById('in').focus();" - "</script></body></html>", FALSE), + g_test_add("/webkit/keyevents/event-buttons", KeyEventFixture, + test_info_new(button_html, FALSE), key_event_fixture_setup, - test_keypress, + test_keypress_events, key_event_fixture_teardown); - - g_test_add("/webkit/keyevent/link", KeyEventFixture, - test_info_new("<html><body><a href=\"http://www.gnome.org\" id=\"in\">" - "LINKY MCLINKERSON</a><script>" - "document.getElementById('in').focus();</script>" - "</body></html>", FALSE), + g_test_add("/webkit/keyevents/event-link", KeyEventFixture, + test_info_new(link_html, FALSE), key_event_fixture_setup, - test_keypress, + test_keypress_events, key_event_fixture_teardown); + g_test_add("/webkit/keyevent/event-div", KeyEventFixture, + test_info_new(div_html, TRUE), + key_event_fixture_setup, + test_keypress_events, + key_event_fixture_teardown); + g_test_add("/webkit/keyevent/ime-textinput", KeyEventFixture, + test_info_new(textinput_html, TRUE), + key_event_fixture_setup, + test_ime, + key_event_fixture_teardown); + g_test_add("/webkit/keyevent/ime-div", KeyEventFixture, + test_info_new(div_html, TRUE), + key_event_fixture_setup, + test_ime, + key_event_fixture_teardown); + g_test_add("/webkit/keyevent/block-textinput", KeyEventFixture, + test_info_new(textinput_html_blocking, TRUE), + key_event_fixture_setup, + test_blocking, + key_event_fixture_teardown); + g_test_add("/webkit/keyevent/block-div", KeyEventFixture, + test_info_new(div_html_blocking, TRUE), + key_event_fixture_setup, + test_blocking, + key_event_fixture_teardown); +#if defined(GDK_WINDOWING_X11) && GTK_CHECK_VERSION(2, 16, 0) + g_test_add("/webkit/keyevent/xim-textinput", KeyEventFixture, + test_info_new(textinput_html, TRUE), + key_event_fixture_setup, + test_xim, + key_event_fixture_teardown); + g_test_add("/webkit/keyevent/xim-div", KeyEventFixture, + test_info_new(div_html, TRUE), + key_event_fixture_setup, + test_xim, + key_event_fixture_teardown); +#endif return g_test_run(); } diff --git a/WebKit/gtk/tests/testmimehandling.c b/WebKit/gtk/tests/testmimehandling.c index e6e8d45..2ab0257 100644 --- a/WebKit/gtk/tests/testmimehandling.c +++ b/WebKit/gtk/tests/testmimehandling.c @@ -18,6 +18,8 @@ * Boston, MA 02110-1301, USA. */ +#include "test_utils.h" + #include <glib.h> #include <glib/gstdio.h> #include <libsoup/soup.h> @@ -182,16 +184,7 @@ int main(int argc, char** argv) gtk_test_init(&argc, &argv, NULL); /* Hopefully make test independent of the path it's called from. */ - while (!g_file_test ("WebKit/gtk/tests/resources/test.html", G_FILE_TEST_EXISTS)) { - gchar *path_name; - - g_chdir(".."); - - g_assert(!g_str_equal((path_name = g_get_current_dir()), "/")); - g_free(path_name); - } - - g_chdir("WebKit/gtk/tests/resources/"); + testutils_relative_chdir("WebKit/gtk/tests/resources/test.html", argv[0]); server = soup_server_new(SOUP_SERVER_PORT, 0, NULL); soup_server_run_async(server); diff --git a/WebKit/gtk/tests/testwebbackforwardlist.c b/WebKit/gtk/tests/testwebbackforwardlist.c index 115c079..2109840 100644 --- a/WebKit/gtk/tests/testwebbackforwardlist.c +++ b/WebKit/gtk/tests/testwebbackforwardlist.c @@ -266,6 +266,54 @@ static void test_webkit_web_back_forward_list_add_item(void) g_object_unref(webView); } +static void test_webkit_web_back_forward_list_clear(void) +{ + WebKitWebView* webView; + WebKitWebBackForwardList* webBackForwardList; + WebKitWebHistoryItem* addItem; + g_test_bug("36173"); + + webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(webView); + + webBackForwardList = webkit_web_view_get_back_forward_list(webView); + g_assert(webBackForwardList); + + // Check that there is no item. + g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0); + g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0); + g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList)); + g_assert(!webkit_web_view_can_go_forward(webView)); + g_assert(!webkit_web_view_can_go_back(webView)); + + // Check that clearing the empty list does not modify counters + webkit_web_back_forward_list_clear(webBackForwardList); + g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0); + g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0); + g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList)); + g_assert(!webkit_web_view_can_go_forward(webView)); + g_assert(!webkit_web_view_can_go_back(webView)); + + // Add a new item + addItem = webkit_web_history_item_new_with_data("http://example.com/", "Added site"); + webkit_web_back_forward_list_add_item(webBackForwardList, addItem); + g_object_unref(addItem); + g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, addItem)); + + // Check that after clearing the list the added item is no longer in the list + webkit_web_back_forward_list_clear(webBackForwardList); + g_assert(!webkit_web_back_forward_list_contains_item(webBackForwardList, addItem)); + + // Check that after clearing it, the list is empty + g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0); + g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0); + g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList)); + g_assert(!webkit_web_view_can_go_forward(webView)); + g_assert(!webkit_web_view_can_go_back(webView)); + + g_object_unref(webView); +} + int main(int argc, char** argv) { g_thread_init(NULL); @@ -275,6 +323,7 @@ int main(int argc, char** argv) g_test_add_func("/webkit/webbackforwardlist/add_item", test_webkit_web_back_forward_list_add_item); g_test_add_func("/webkit/webbackforwardlist/list_order", test_webkit_web_back_forward_list_order); g_test_add_func("/webkit/webhistoryitem/lifetime", test_webkit_web_history_item_lifetime); + g_test_add_func("/webkit/webbackforwardlist/clear", test_webkit_web_back_forward_list_clear); return g_test_run (); } diff --git a/WebKit/gtk/tests/testwebview.c b/WebKit/gtk/tests/testwebview.c index 34b6867..36511d7 100644 --- a/WebKit/gtk/tests/testwebview.c +++ b/WebKit/gtk/tests/testwebview.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2008 Holger Hans Peter Freyther - * Copyright (C) 2009 Collabora Ltd. + * Copyright (C) 2009, 2010 Collabora Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -18,6 +18,8 @@ * Boston, MA 02110-1301, USA. */ +#include "test_utils.h" + #include <errno.h> #include <unistd.h> #include <string.h> @@ -56,10 +58,10 @@ server_callback(SoupServer* server, SoupMessage* msg, soup_message_body_append(msg->response_body, SOUP_MEMORY_TAKE, contents, length); } else if (g_str_equal(path, "/bigdiv.html")) { - char* contents = g_strdup("<html><body><div style=\"background-color: green; height: 1200px;\"></div></body></html>"); + char* contents = g_strdup("<html><body><a id=\"link\" href=\"http://abc.def\">test</a><div style=\"background-color: green; height: 1200px;\"></div></body></html>"); soup_message_body_append(msg->response_body, SOUP_MEMORY_TAKE, contents, strlen(contents)); } else if (g_str_equal(path, "/iframe.html")) { - char* contents = g_strdup("<html><body><div style=\"background-color: green; height: 50px;\"></div><iframe src=\"bigdiv.html\"></iframe></body></html>"); + char* contents = g_strdup("<html><body id=\"some-content\"><div style=\"background-color: green; height: 50px;\"></div><iframe src=\"bigdiv.html\"></iframe></body></html>"); soup_message_body_append(msg->response_body, SOUP_MEMORY_TAKE, contents, strlen(contents)); } else { char* contents = g_strdup("<html><body>test</body></html>"); @@ -135,6 +137,61 @@ static gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data) return FALSE; } +static void test_webkit_web_view_grab_focus() +{ + char* uri = g_strconcat(base_uri, "iframe.html", NULL); + GtkWidget* window = gtk_window_new(GTK_WINDOW_POPUP); + GtkWidget* scrolled_window = gtk_scrolled_window_new(NULL, NULL); + WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new()); + GtkAdjustment* adjustment; + + gtk_window_set_default_size(GTK_WINDOW(window), 400, 200); + + gtk_container_add(GTK_CONTAINER(window), scrolled_window); + gtk_container_add(GTK_CONTAINER(scrolled_window), GTK_WIDGET(view)); + + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + loop = g_main_loop_new(NULL, TRUE); + + g_signal_connect(view, "notify::progress", G_CALLBACK (idle_quit_loop_cb), NULL); + + /* Wait for window to show up */ + gtk_widget_show_all(window); + g_signal_connect(window, "map-event", + G_CALLBACK(map_event_cb), loop); + g_main_loop_run(loop); + + /* Load a page with a big div that will cause scrollbars to appear */ + webkit_web_view_load_uri(view, uri); + g_main_loop_run(loop); + + adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scrolled_window)); + g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 0.0); + + /* Since webkit_web_view_execute_script does not return a value, + it is impossible to know if an inner document has focus after + a node of it was focused via .focus() method. + The code below is an workaround: if the node has focus, a scroll + action is performed and afterward it is checked if the adjustment + has to be different from 0. + */ + char script[] = "var innerDoc = document.defaultView.frames[0].document; \ + innerDoc.getElementById(\"link\").focus(); \ + if (innerDoc.hasFocus()) \ + window.scrollBy(0, 100);"; + + /* Focus an element using JavaScript */ + webkit_web_view_execute_script(view, script); + + /* Make sure the ScrolledWindow noticed the scroll */ + g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), !=, 0.0); + + g_free(uri); + gtk_widget_destroy(window); +} + static void do_test_webkit_web_view_adjustments(gboolean with_page_cache) { char* effective_uri = g_strconcat(base_uri, "bigdiv.html", NULL); @@ -224,6 +281,61 @@ static void test_webkit_web_view_adjustments() do_test_webkit_web_view_adjustments(TRUE); } +gboolean delayed_destroy(gpointer data) +{ + gtk_widget_destroy(GTK_WIDGET(data)); + g_main_loop_quit(loop); + return FALSE; +} + +static void test_webkit_web_view_destroy() +{ + GtkWidget* window; + GtkWidget* web_view; + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + web_view = webkit_web_view_new(); + + gtk_container_add(GTK_CONTAINER(window), web_view); + + gtk_widget_show_all(window); + + loop = g_main_loop_new(NULL, TRUE); + + g_signal_connect(window, "map-event", + G_CALLBACK(map_event_cb), loop); + g_main_loop_run(loop); + + g_idle_add(delayed_destroy, web_view); + g_main_loop_run(loop); + + gtk_widget_destroy(window); +} + +static void test_webkit_web_view_window_features() +{ + GtkWidget* window; + GtkWidget* web_view; + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + web_view = webkit_web_view_new(); + + gtk_container_add(GTK_CONTAINER(window), web_view); + + gtk_widget_show_all(window); + + loop = g_main_loop_new(NULL, TRUE); + + g_signal_connect(window, "map-event", + G_CALLBACK(map_event_cb), loop); + g_main_loop_run(loop); + + /* Bug #36144 */ + g_object_set(G_OBJECT(web_view), "window-features", NULL, NULL); + + gtk_widget_destroy(window); +} + int main(int argc, char** argv) { SoupServer* server; @@ -233,16 +345,7 @@ int main(int argc, char** argv) gtk_test_init(&argc, &argv, NULL); /* Hopefully make test independent of the path it's called from. */ - while (!g_file_test ("WebKit/gtk/tests/resources/test.html", G_FILE_TEST_EXISTS)) { - gchar *path_name; - - g_chdir(".."); - - g_assert(!g_str_equal((path_name = g_get_current_dir()), "/")); - g_free(path_name); - } - - g_chdir("WebKit/gtk/tests/resources/"); + testutils_relative_chdir("WebKit/gtk/tests/resources/test.html", argv[0]); server = soup_server_new(SOUP_SERVER_PORT, 0, NULL); soup_server_run_async(server); @@ -258,6 +361,9 @@ int main(int argc, char** argv) g_test_bug_base("https://bugs.webkit.org/"); g_test_add_func("/webkit/webview/icon-uri", test_webkit_web_view_icon_uri); g_test_add_func("/webkit/webview/adjustments", test_webkit_web_view_adjustments); + g_test_add_func("/webkit/webview/destroy", test_webkit_web_view_destroy); + g_test_add_func("/webkit/webview/grab_focus", test_webkit_web_view_grab_focus); + g_test_add_func("/webkit/webview/window-features", test_webkit_web_view_window_features); return g_test_run (); } diff --git a/WebKit/gtk/webkit/webkit.h b/WebKit/gtk/webkit/webkit.h index 4cd0709..17b197b 100644 --- a/WebKit/gtk/webkit/webkit.h +++ b/WebKit/gtk/webkit/webkit.h @@ -24,6 +24,7 @@ #include <webkit/webkitversion.h> #include <webkit/webkitdefines.h> #include <webkit/webkitdownload.h> +#include <webkit/webkitgeolocationpolicydecision.h> #include <webkit/webkithittestresult.h> #include <webkit/webkitnetworkrequest.h> #include <webkit/webkitnetworkresponse.h> diff --git a/WebKit/gtk/webkit/webkitdefines.h b/WebKit/gtk/webkit/webkitdefines.h index a5884f3..b06a3bf 100644 --- a/WebKit/gtk/webkit/webkitdefines.h +++ b/WebKit/gtk/webkit/webkitdefines.h @@ -89,6 +89,9 @@ typedef struct _WebKitSecurityOriginClass WebKitSecurityOriginClass; typedef struct _WebKitHitTestResult WebKitHitTestResult; typedef struct _WebKitHitTestResultClass WebKitHitTestResultClass; +typedef struct _WebKitGeolocationPolicyDecision WebKitGeolocationPolicyDecision; +typedef struct _WebKitGeolocationPolicyDecisionClass WebKitGeolocationPolicyDecisionClass; + G_END_DECLS #endif diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp index 8f3214e..0717e7c 100644 --- a/WebKit/gtk/webkit/webkitdownload.cpp +++ b/WebKit/gtk/webkit/webkitdownload.cpp @@ -20,7 +20,6 @@ #include "config.h" -#include "CString.h" #include <glib/gi18n-lib.h> #include "GRefPtr.h" #include "Noncopyable.h" @@ -34,9 +33,14 @@ #include "webkitmarshal.h" #include "webkitnetworkresponse.h" #include "webkitprivate.h" +#include <wtf/text/CString.h> #include <glib/gstdio.h> +#ifdef ERROR +#undef ERROR +#endif + using namespace WebKit; using namespace WebCore; @@ -149,8 +153,10 @@ static void webkit_download_finalize(GObject* object) // The download object may never have _start called on it, so we // need to make sure timer is non-NULL. - if (priv->timer) + if (priv->timer) { g_timer_destroy(priv->timer); + priv->timer = NULL; + } g_free(priv->destinationURI); g_free(priv->suggestedFilename); @@ -480,7 +486,7 @@ void webkit_download_start(WebKitDownload* download) g_return_if_fail(priv->timer == NULL); if (!priv->resourceHandle) - priv->resourceHandle = ResourceHandle::create(core(priv->networkRequest), priv->downloadClient, 0, false, false, false); + priv->resourceHandle = ResourceHandle::create(core(priv->networkRequest), priv->downloadClient, 0, false, false); else { priv->resourceHandle->setClient(priv->downloadClient); diff --git a/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp b/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp new file mode 100644 index 0000000..7afd8fa --- /dev/null +++ b/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2010 Arno Renevier + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" +#include "webkitgeolocationpolicydecision.h" + +#include "webkitprivate.h" +#include "Geolocation.h" + +using namespace WebKit; +using namespace WebCore; + +/** + * SECTION:webkitgeolocationpolicydecision + * @short_description: Liaison between WebKit and the application regarding asynchronous geolocation policy decisions + * + * #WebKitGeolocationPolicyDecision objects are given to the application when + * geolocation-policy-decision-requested signal is emitted. The application + * uses it to tell the engine whether it wants to allow or deny geolocation for + * a given frame. + */ + +G_DEFINE_TYPE(WebKitGeolocationPolicyDecision, webkit_geolocation_policy_decision, G_TYPE_OBJECT); + +struct _WebKitGeolocationPolicyDecisionPrivate { + WebKitWebFrame* frame; + Geolocation* geolocation; +}; + +#define WEBKIT_GEOLOCATION_POLICY_DECISION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION, WebKitGeolocationPolicyDecisionPrivate)) + +static void webkit_geolocation_policy_decision_class_init(WebKitGeolocationPolicyDecisionClass* decisionClass) +{ + g_type_class_add_private(decisionClass, sizeof(WebKitGeolocationPolicyDecisionPrivate)); +} + +static void webkit_geolocation_policy_decision_init(WebKitGeolocationPolicyDecision* decision) +{ + decision->priv = WEBKIT_GEOLOCATION_POLICY_DECISION_GET_PRIVATE(decision); +} + +WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWebFrame* frame, Geolocation* geolocation) +{ + g_return_val_if_fail(frame, NULL); + WebKitGeolocationPolicyDecision* decision = WEBKIT_GEOLOCATION_POLICY_DECISION(g_object_new(WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION, NULL)); + WebKitGeolocationPolicyDecisionPrivate* priv = decision->priv; + + priv->frame = frame; + priv->geolocation = geolocation; + return decision; +} + +/** + * webkit_geolocation_policy_allow + * @decision: a #WebKitGeolocationPolicyDecision + * + * Will send the allow decision to the policy implementer. + * + * Since: 1.1.23 + */ +void webkit_geolocation_policy_allow(WebKitGeolocationPolicyDecision* decision) +{ + g_return_if_fail(WEBKIT_IS_GEOLOCATION_POLICY_DECISION(decision)); + + WebKitGeolocationPolicyDecisionPrivate* priv = decision->priv; + priv->geolocation->setIsAllowed(TRUE); +} + +/** + * webkit_geolocation_policy_deny + * @decision: a #WebKitGeolocationPolicyDecision + * + * Will send the deny decision to the policy implementer. + * + * Since: 1.1.23 + */ +void webkit_geolocation_policy_deny(WebKitGeolocationPolicyDecision* decision) +{ + g_return_if_fail(WEBKIT_IS_GEOLOCATION_POLICY_DECISION(decision)); + + WebKitGeolocationPolicyDecisionPrivate* priv = decision->priv; + priv->geolocation->setIsAllowed(FALSE); +} + diff --git a/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h b/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h new file mode 100644 index 0000000..27e0ef2 --- /dev/null +++ b/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2010 Arno Renevier + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef webkitgeolocationpolicydecision_h +#define webkitgeolocationpolicydecision_h + +#include <glib-object.h> +#include <webkit/webkitdefines.h> + +G_BEGIN_DECLS + +#define WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION (webkit_geolocation_policy_decision_get_type()) +#define WEBKIT_GEOLOCATION_POLICY_DECISION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION, WebKitGeolocationPolicyDecision)) +#define WEBKIT_GEOLOCATION_POLICY_DECISION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION, WebKitGeolocationPolicyDecisionClass)) +#define WEBKIT_IS_GEOLOCATION_POLICY_DECISION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION)) +#define WEBKIT_IS_GEOLOCATION_POLICY_DECISION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION)) +#define WEBKIT_GEOLOCATION_POLICY_DECISION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION, WebKitGeolocationPolicyDecisionClass)) + +typedef struct _WebKitGeolocationPolicyDecisionPrivate WebKitGeolocationPolicyDecisionPrivate; +struct _WebKitGeolocationPolicyDecision { + GObject parent_instance; + + /*< private >*/ + WebKitGeolocationPolicyDecisionPrivate* priv; +}; + +struct _WebKitGeolocationPolicyDecisionClass { + GObjectClass parent_class; + + /* Padding for future expansion */ + void (*_webkit_reserved0) (void); + void (*_webkit_reserved1) (void); + void (*_webkit_reserved2) (void); + void (*_webkit_reserved3) (void); +}; + +WEBKIT_API GType +webkit_geolocation_policy_decision_get_type (void); + +WEBKIT_API void +webkit_geolocation_policy_allow (WebKitGeolocationPolicyDecision* decision); + +WEBKIT_API void +webkit_geolocation_policy_deny (WebKitGeolocationPolicyDecision* decision); + +G_END_DECLS + +#endif diff --git a/WebKit/gtk/webkit/webkithittestresult.cpp b/WebKit/gtk/webkit/webkithittestresult.cpp index be97933..1f8dce6 100644 --- a/WebKit/gtk/webkit/webkithittestresult.cpp +++ b/WebKit/gtk/webkit/webkithittestresult.cpp @@ -21,10 +21,10 @@ #include "config.h" #include "webkithittestresult.h" -#include "CString.h" #include "GOwnPtr.h" #include "webkitenumtypes.h" #include "webkitprivate.h" +#include <wtf/text/CString.h> #include <glib/gi18n-lib.h> diff --git a/WebKit/gtk/webkit/webkitnetworkrequest.cpp b/WebKit/gtk/webkit/webkitnetworkrequest.cpp index be6d5ff..78044aa 100644 --- a/WebKit/gtk/webkit/webkitnetworkrequest.cpp +++ b/WebKit/gtk/webkit/webkitnetworkrequest.cpp @@ -21,10 +21,10 @@ #include "config.h" #include "webkitnetworkrequest.h" -#include "CString.h" #include "GOwnPtr.h" #include "ResourceRequest.h" #include "webkitprivate.h" +#include <wtf/text/CString.h> #include <glib/gi18n-lib.h> diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp index be88bb5..971922f 100644 --- a/WebKit/gtk/webkit/webkitprivate.cpp +++ b/WebKit/gtk/webkit/webkitprivate.cpp @@ -28,6 +28,7 @@ #include "Frame.h" #include "FrameLoader.h" #include "FrameLoaderClientGtk.h" +#include "GtkVersioning.h" #include "HitTestResult.h" #include "IconDatabase.h" #include <libintl.h> @@ -223,11 +224,7 @@ static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMes return NULL; GtkWidget* toplevel = gtk_widget_get_toplevel(GTK_WIDGET(frame->page()->chrome()->platformPageClient())); -#if GTK_CHECK_VERSION(2, 18, 0) if (gtk_widget_is_toplevel(toplevel)) -#else - if (GTK_WIDGET_TOPLEVEL(toplevel)) -#endif return toplevel; else return NULL; @@ -296,10 +293,10 @@ void webkit_init() void webkit_white_list_access_from_origin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains) { - SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains); + SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains); } void webkit_reset_origin_access_white_lists() { - SecurityOrigin::resetOriginAccessWhiteLists(); + SecurityOrigin::resetOriginAccessWhitelists(); } diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h index 44b4d0c..2642d50 100644 --- a/WebKit/gtk/webkit/webkitprivate.h +++ b/WebKit/gtk/webkit/webkitprivate.h @@ -46,9 +46,9 @@ #include "ArchiveResource.h" #include "BackForwardList.h" -#include "CString.h" #include <enchant.h> #include "GOwnPtr.h" +#include "Geolocation.h" #include "HistoryItem.h" #include "Settings.h" #include "Page.h" @@ -60,6 +60,7 @@ #include "ResourceResponse.h" #include "WindowFeatures.h" #include "SecurityOrigin.h" +#include <wtf/text/CString.h> #include <atk/atk.h> #include <glib.h> @@ -102,11 +103,6 @@ namespace WebKit { WebKit::PasteboardHelperGtk* pasteboardHelperInstance(); } -typedef struct { - EnchantBroker* config; - EnchantDict* speller; -} SpellLanguage; - extern "C" { void webkit_init(); @@ -276,6 +272,9 @@ extern "C" { WebKitNetworkResponse* webkit_network_response_new_with_core_response(const WebCore::ResourceResponse& resourceResponse); + WebKitGeolocationPolicyDecision* + webkit_geolocation_policy_decision_new(WebKitWebFrame*, WebCore::Geolocation*); + // FIXME: move this to webkitnetworkrequest.h once the API is agreed upon. WEBKIT_API SoupMessage* webkit_network_request_get_message(WebKitNetworkRequest* request); @@ -301,6 +300,9 @@ extern "C" { WEBKIT_API int webkit_web_frame_page_number_for_element_by_id(WebKitWebFrame* frame, const gchar* id, float pageWidth, float pageHeight); + WEBKIT_API int + webkit_web_frame_number_of_pages(WebKitWebFrame* frame, float pageWidth, float pageHeight); + WEBKIT_API guint webkit_web_frame_get_pending_unload_event_count(WebKitWebFrame* frame); @@ -313,6 +315,9 @@ extern "C" { WEBKIT_API bool webkit_web_frame_pause_svg_animation(WebKitWebFrame* frame, const gchar* animationId, double time, const gchar* elementId); + WEBKIT_API gchar* + webkit_web_frame_marker_text_for_list_item(WebKitWebFrame* frame, JSContextRef context, JSValueRef nodeObject); + WEBKIT_API unsigned int webkit_web_frame_number_of_active_animations(WebKitWebFrame* frame); @@ -332,7 +337,7 @@ extern "C" { webkit_web_settings_add_extra_plugin_directory (WebKitWebView *web_view, const gchar* directory); GSList* - webkit_web_settings_get_spell_languages(WebKitWebView* web_view); + webkit_web_settings_get_enchant_dicts(WebKitWebView* web_view); bool webkit_web_view_use_primary_for_paste(WebKitWebView* web_view); diff --git a/WebKit/gtk/webkit/webkitsecurityorigin.cpp b/WebKit/gtk/webkit/webkitsecurityorigin.cpp index cd80236..0ab0a9c 100644 --- a/WebKit/gtk/webkit/webkitsecurityorigin.cpp +++ b/WebKit/gtk/webkit/webkitsecurityorigin.cpp @@ -22,9 +22,9 @@ #include "webkitprivate.h" -#include "CString.h" #include "PlatformString.h" #include "DatabaseTracker.h" +#include <wtf/text/CString.h> #include <glib/gi18n-lib.h> @@ -353,7 +353,7 @@ void webkit_security_origin_set_web_database_quota(WebKitSecurityOrigin* securit * * Returns a list of all Web Databases in the security origin. * - * Returns: a #Glist of databases in the security origin. + * Returns: a #GList of databases in the security origin. * * Since: 1.1.14 **/ diff --git a/WebKit/gtk/webkit/webkitsoupauthdialog.c b/WebKit/gtk/webkit/webkitsoupauthdialog.c index 538dbfa..15863b3 100644 --- a/WebKit/gtk/webkit/webkitsoupauthdialog.c +++ b/WebKit/gtk/webkit/webkitsoupauthdialog.c @@ -190,8 +190,12 @@ static void show_auth_dialog(WebKitAuthData* authData, const char* login, const GtkWidget* vbox; GtkWidget* icon; GtkWidget* table; - GtkWidget* messageLabel; - char* message; + GtkWidget* serverMessageDescriptionLabel; + GtkWidget* serverMessageLabel; + GtkWidget* descriptionLabel; + char* description; + const char* realm; + gboolean hasRealm; SoupURI* uri; GtkWidget* rememberBox; GtkWidget* checkButton; @@ -241,12 +245,12 @@ static void show_auth_dialog(WebKitAuthData* authData, const char* login, const gtk_box_pack_start(GTK_BOX(hbox), mainVBox, TRUE, TRUE, 0); uri = soup_message_get_uri(authData->msg); - message = g_strdup_printf(_("A username and password are being requested by the site %s"), uri->host); - messageLabel = gtk_label_new(message); - g_free(message); - gtk_misc_set_alignment(GTK_MISC(messageLabel), 0.0, 0.5); - gtk_label_set_line_wrap(GTK_LABEL(messageLabel), TRUE); - gtk_box_pack_start(GTK_BOX(mainVBox), GTK_WIDGET(messageLabel), + description = g_strdup_printf(_("A username and password are being requested by the site %s"), uri->host); + descriptionLabel = gtk_label_new(description); + g_free(description); + gtk_misc_set_alignment(GTK_MISC(descriptionLabel), 0.0, 0.5); + gtk_label_set_line_wrap(GTK_LABEL(descriptionLabel), TRUE); + gtk_box_pack_start(GTK_BOX(mainVBox), GTK_WIDGET(descriptionLabel), FALSE, FALSE, 0); vbox = gtk_vbox_new(FALSE, 6); @@ -261,14 +265,32 @@ static void show_auth_dialog(WebKitAuthData* authData, const char* login, const gtk_box_pack_start(GTK_BOX(vbox), entryContainer, FALSE, FALSE, 0); - table = gtk_table_new(2, 2, FALSE); + realm = soup_auth_get_realm(authData->auth); + // Checking that realm is not an empty string + hasRealm = (realm && (strlen(realm) > 0)); + + table = gtk_table_new(hasRealm ? 3 : 2, 2, FALSE); gtk_table_set_col_spacings(GTK_TABLE(table), 12); gtk_table_set_row_spacings(GTK_TABLE(table), 6); gtk_container_add(GTK_CONTAINER(entryContainer), table); - authData->loginEntry = table_add_entry(table, 0, _("Username:"), + if (hasRealm) { + serverMessageDescriptionLabel = gtk_label_new(_("Server message:")); + serverMessageLabel = gtk_label_new(realm); + gtk_misc_set_alignment(GTK_MISC(serverMessageDescriptionLabel), 0.0, 0.5); + gtk_label_set_line_wrap(GTK_LABEL(serverMessageDescriptionLabel), TRUE); + gtk_misc_set_alignment(GTK_MISC(serverMessageLabel), 0.0, 0.5); + gtk_label_set_line_wrap(GTK_LABEL(serverMessageLabel), TRUE); + + gtk_table_attach_defaults(GTK_TABLE(table), serverMessageDescriptionLabel, + 0, 1, 0, 1); + gtk_table_attach_defaults(GTK_TABLE(table), serverMessageLabel, + 1, 2, 0, 1); + } + + authData->loginEntry = table_add_entry(table, hasRealm ? 1 : 0, _("Username:"), login, NULL); - authData->passwordEntry = table_add_entry(table, 1, _("Password:"), + authData->passwordEntry = table_add_entry(table, hasRealm ? 2 : 1, _("Password:"), password, NULL); gtk_entry_set_visibility(GTK_ENTRY(authData->passwordEntry), FALSE); diff --git a/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp b/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp index 31631a5..b23aeb9 100644 --- a/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp +++ b/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp @@ -252,7 +252,7 @@ GList* webkit_web_back_forward_list_get_back_list_with_limit(WebKitWebBackForwar /** * webkit_web_back_forward_list_get_back_item: - * @web_back_forward_list: a #WebBackForwardList + * @web_back_forward_list: a #WebKitWebBackForwardList * * Returns the item that precedes the current item * @@ -383,7 +383,7 @@ gint webkit_web_back_forward_list_get_forward_length(WebKitWebBackForwardList* w * * Returns the maximum limit of the back forward list. * - * Return value: a #gint indicating the number of #WebHistoryItem the back forward list can hold + * Return value: a #gint indicating the number of #WebKitWebHistoryItem the back forward list can hold */ gint webkit_web_back_forward_list_get_limit(WebKitWebBackForwardList* webBackForwardList) { @@ -438,6 +438,29 @@ void webkit_web_back_forward_list_add_item(WebKitWebBackForwardList *webBackForw backForwardList->addItem(historyItem); } +/** + * webkit_web_back_forward_list_clear: + * @webBackForwardList: a #WebKitWebBackForwardList + * + * Clears the @webBackForwardList by removing all its elements. Note that not even + * the current page is kept in list when cleared so you would have to add it later. + * + * Since: 1.1.30 + **/ +void webkit_web_back_forward_list_clear(WebKitWebBackForwardList* webBackForwardList) +{ + g_return_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList)); + + WebCore::BackForwardList* backForwardList = core(webBackForwardList); + if (!backForwardList || !backForwardList->enabled() || !backForwardList->entries().size()) + return; + + // Clear the current list by setting capacity to 0 + int capacity = backForwardList->capacity(); + backForwardList->setCapacity(0); + backForwardList->setCapacity(capacity); +} + WebCore::BackForwardList* WebKit::core(WebKitWebBackForwardList* webBackForwardList) { g_return_val_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList), NULL); diff --git a/WebKit/gtk/webkit/webkitwebbackforwardlist.h b/WebKit/gtk/webkit/webkitwebbackforwardlist.h index d08566e..2cffc68 100644 --- a/WebKit/gtk/webkit/webkitwebbackforwardlist.h +++ b/WebKit/gtk/webkit/webkitwebbackforwardlist.h @@ -110,6 +110,8 @@ webkit_web_back_forward_list_set_limit (WebKitWebBackForwardLi WEBKIT_API void webkit_web_back_forward_list_add_item (WebKitWebBackForwardList *web_back_forward_list, WebKitWebHistoryItem *history_item); +WEBKIT_API void +webkit_web_back_forward_list_clear (WebKitWebBackForwardList *web_back_forward_list); G_END_DECLS diff --git a/WebKit/gtk/webkit/webkitwebdatabase.cpp b/WebKit/gtk/webkit/webkitwebdatabase.cpp index 100176e..e92c400 100644 --- a/WebKit/gtk/webkit/webkitwebdatabase.cpp +++ b/WebKit/gtk/webkit/webkitwebdatabase.cpp @@ -22,9 +22,9 @@ #include "webkitprivate.h" -#include "CString.h" #include "DatabaseDetails.h" #include "DatabaseTracker.h" +#include <wtf/text/CString.h> #include <glib/gi18n-lib.h> diff --git a/WebKit/gtk/webkit/webkitwebdatasource.cpp b/WebKit/gtk/webkit/webkitwebdatasource.cpp index 059688e..9b755ad 100644 --- a/WebKit/gtk/webkit/webkitwebdatasource.cpp +++ b/WebKit/gtk/webkit/webkitwebdatasource.cpp @@ -418,9 +418,9 @@ G_CONST_RETURN gchar* webkit_web_data_source_get_unreachable_uri(WebKitWebDataSo * @data_source: a #WebKitWebDataSource * * Gives you a #GList of #WebKitWebResource objects that compose the - * #WebView to which this #WebKitWebDataSource is attached. + * #WebKitWebView to which this #WebKitWebDataSource is attached. * - * Return value: a #GList of #WebKitResource objects; the objects are + * Return value: a #GList of #WebKitWebResource objects; the objects are * owned by WebKit, but the GList must be freed. * * Since: 1.1.15 diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp index fbd246d..344f94e 100644 --- a/WebKit/gtk/webkit/webkitwebframe.cpp +++ b/WebKit/gtk/webkit/webkitwebframe.cpp @@ -35,7 +35,6 @@ #include "AccessibilityObjectWrapperAtk.h" #include "AnimationController.h" #include "AXObjectCache.h" -#include "CString.h" #include "DocumentLoader.h" #include "DocumentLoaderGtk.h" #include "FrameLoader.h" @@ -45,10 +44,13 @@ #include <glib/gi18n-lib.h> #include "GCController.h" #include "GraphicsContext.h" +#include "GtkVersioning.h" #include "HTMLFrameOwnerElement.h" #include "JSDOMWindow.h" +#include "JSElement.h" #include "JSLock.h" #include "PrintContext.h" +#include "RenderListItem.h" #include "RenderView.h" #include "RenderTreeAsText.h" #include "JSDOMBinding.h" @@ -60,6 +62,7 @@ #include <atk/atk.h> #include <JavaScriptCore/APICast.h> +#include <wtf/text/CString.h> /** * SECTION:webkitwebframe @@ -867,6 +870,25 @@ int webkit_web_frame_page_number_for_element_by_id(WebKitWebFrame* frame, const } /** + * webkit_web_frame_number_of_pages + * @frame: a #WebKitWebFrame + * @pageWidth: width of a page + * @pageHeight: height of a page + * + * Return value: The number of pages to be printed. + */ +int webkit_web_frame_number_of_pages(WebKitWebFrame* frame, float pageWidth, float pageHeight) +{ + g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL); + + Frame* coreFrame = core(frame); + if (!coreFrame) + return -1; + + return PrintContext::numberOfPages(coreFrame, FloatSize(pageWidth, pageHeight)); +} + +/** * webkit_web_frame_get_pending_unload_event_count: * @frame: a #WebKitWebFrame * @@ -923,7 +945,7 @@ static void end_print_callback(GtkPrintOperation* op, GtkPrintContext* context, * @action: the #GtkPrintOperationAction to be performed * @error: #GError for error return * - * Prints the given #WebKitFrame, using the given #GtkPrintOperation + * Prints the given #WebKitWebFrame, using the given #GtkPrintOperation * and #GtkPrintOperationAction. This function wraps a call to * gtk_print_operation_run() for printing the contents of the * #WebKitWebFrame. @@ -937,11 +959,7 @@ GtkPrintOperationResult webkit_web_frame_print_full(WebKitWebFrame* frame, GtkPr GtkWidget* topLevel = gtk_widget_get_toplevel(GTK_WIDGET(webkit_web_frame_get_web_view(frame))); -#if GTK_CHECK_VERSION(2, 18, 0) if (!gtk_widget_is_toplevel(topLevel)) -#else - if (!GTK_WIDGET_TOPLEVEL(topLevel)) -#endif topLevel = NULL; Frame* coreFrame = core(frame); @@ -961,7 +979,7 @@ GtkPrintOperationResult webkit_web_frame_print_full(WebKitWebFrame* frame, GtkPr * webkit_web_frame_print: * @frame: a #WebKitWebFrame * - * Prints the given #WebKitFrame, by presenting a print dialog to the + * Prints the given #WebKitWebFrame, by presenting a print dialog to the * user. If you need more control over the printing process, see * webkit_web_frame_print_full(). * @@ -980,19 +998,11 @@ void webkit_web_frame_print(WebKitWebFrame* frame) if (error) { GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(priv->webView)); -#if GTK_CHECK_VERSION(2, 18, 0) GtkWidget* dialog = gtk_message_dialog_new(gtk_widget_is_toplevel(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", error->message); -#else - GtkWidget* dialog = gtk_message_dialog_new(GTK_WIDGET_TOPLEVEL(window) ? GTK_WINDOW(window) : 0, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - "%s", error->message); -#endif g_error_free(error); @@ -1035,6 +1045,16 @@ bool webkit_web_frame_pause_svg_animation(WebKitWebFrame* frame, const gchar* an #endif } +gchar* webkit_web_frame_marker_text_for_list_item(WebKitWebFrame* frame, JSContextRef context, JSValueRef nodeObject) +{ + JSC::ExecState* exec = toJS(context); + Element* element = toElement(toJS(exec, nodeObject)); + if (!element) + return 0; + + return g_strdup(markerTextForListItem(element).utf8().data()); +} + unsigned int webkit_web_frame_number_of_active_animations(WebKitWebFrame* frame) { Frame* coreFrame = core(frame); diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp index f2811ea..5177c4c 100644 --- a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp +++ b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp @@ -26,9 +26,9 @@ #include <glib.h> #include <glib/gi18n-lib.h> -#include "CString.h" #include "HistoryItem.h" #include "PlatformString.h" +#include <wtf/text/CString.h> /** * SECTION:webkitwebhistoryitem @@ -37,7 +37,7 @@ * * A history item consists out of a title and a uri. It can be part of the * #WebKitWebBackForwardList and the global history. The global history is used - * for coloring the links of visited sites. #WebKitHistoryItem's constructed with + * for coloring the links of visited sites. #WebKitWebHistoryItem's constructed with * #webkit_web_history_item_new and #webkit_web_history_item_new_with_data are * automatically added to the global history. * @@ -54,10 +54,10 @@ using namespace WebKit; struct _WebKitWebHistoryItemPrivate { WebCore::HistoryItem* historyItem; - WebCore::CString title; - WebCore::CString alternateTitle; - WebCore::CString uri; - WebCore::CString originalUri; + WTF::CString title; + WTF::CString alternateTitle; + WTF::CString uri; + WTF::CString originalUri; gboolean disposed; }; @@ -113,10 +113,10 @@ static void webkit_web_history_item_finalize(GObject* object) WebKitWebHistoryItem* webHistoryItem = WEBKIT_WEB_HISTORY_ITEM(object); WebKitWebHistoryItemPrivate* priv = webHistoryItem->priv; - priv->title = WebCore::CString(); - priv->alternateTitle = WebCore::CString(); - priv->uri = WebCore::CString(); - priv->originalUri = WebCore::CString(); + priv->title = WTF::CString(); + priv->alternateTitle = WTF::CString(); + priv->uri = WTF::CString(); + priv->originalUri = WTF::CString(); G_OBJECT_CLASS(webkit_web_history_item_parent_class)->finalize(object); } @@ -469,7 +469,7 @@ G_CONST_RETURN gchar* webkit_web_history_item_get_target(WebKitWebHistoryItem* w g_return_val_if_fail(item, NULL); - WebCore::CString t = item->target().utf8(); + WTF::CString t = item->target().utf8(); return g_strdup(t.data()); } diff --git a/WebKit/gtk/webkit/webkitwebinspector.cpp b/WebKit/gtk/webkit/webkitwebinspector.cpp index 2feb064..820b20f 100644 --- a/WebKit/gtk/webkit/webkitwebinspector.cpp +++ b/WebKit/gtk/webkit/webkitwebinspector.cpp @@ -125,7 +125,7 @@ static void webkit_web_inspector_class_init(WebKitWebInspectorClass* klass) /** * WebKitWebInspector::inspect-web-view: * @web_inspector: the object on which the signal is emitted - * @web_view: the #WebKitWeb which will be inspected + * @web_view: the #WebKitWebView which will be inspected * @return: a newly allocated #WebKitWebView or %NULL * * Emitted when the user activates the 'inspect' context menu item diff --git a/WebKit/gtk/webkit/webkitwebresource.cpp b/WebKit/gtk/webkit/webkitwebresource.cpp index bd3cd69..ba9c3af 100644 --- a/WebKit/gtk/webkit/webkitwebresource.cpp +++ b/WebKit/gtk/webkit/webkitwebresource.cpp @@ -23,13 +23,13 @@ #include "webkitprivate.h" #include "ArchiveResource.h" -#include "CString.h" #include "KURL.h" #include "PlatformString.h" #include "SharedBuffer.h" #include "webkitenumtypes.h" #include "webkitmarshal.h" #include "wtf/Assertions.h" +#include <wtf/text/CString.h> #include <glib.h> #include <glib/gi18n-lib.h> diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp index 4ff4a8e..5d2d658 100644 --- a/WebKit/gtk/webkit/webkitwebsettings.cpp +++ b/WebKit/gtk/webkit/webkitwebsettings.cpp @@ -30,11 +30,11 @@ #include "webkitprivate.h" #include "webkitversion.h" -#include "CString.h" #include "FileSystem.h" #include "PluginDatabase.h" #include "Language.h" #include "PlatformString.h" +#include <wtf/text/CString.h> #include <glib/gi18n-lib.h> #if OS(UNIX) @@ -88,11 +88,12 @@ struct _WebKitWebSettingsPrivate { gboolean enable_private_browsing; gboolean enable_spell_checking; gchar* spell_checking_languages; - GSList* spell_checking_languages_list; + GSList* enchant_dicts; gboolean enable_caret_browsing; gboolean enable_html5_database; gboolean enable_html5_local_storage; gboolean enable_xss_auditor; + gboolean enable_spatial_navigation; gchar* user_agent; gboolean javascript_can_open_windows_automatically; gboolean enable_offline_web_application_cache; @@ -141,6 +142,7 @@ enum { PROP_ENABLE_HTML5_DATABASE, PROP_ENABLE_HTML5_LOCAL_STORAGE, PROP_ENABLE_XSS_AUDITOR, + PROP_ENABLE_SPATIAL_NAVIGATION, PROP_USER_AGENT, PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY, PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE, @@ -568,7 +570,25 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass) _("Whether to enable teh XSS auditor"), TRUE, flags)); - + /** + * WebKitWebSettings:enable-spatial-navigation + * + * Whether to enable the Spatial Navigation. This feature consists in the ability + * to navigate between focusable elements in a Web page, such as hyperlinks and + * form controls, by using Left, Right, Up and Down arrow keys. For example, if + * an user presses the Right key, heuristics determine whether there is an element + * he might be trying to reach towards the right, and if there are multiple elements, + * which element he probably wants. + * + * Since: 1.1.23 + */ + g_object_class_install_property(gobject_class, + PROP_ENABLE_SPATIAL_NAVIGATION, + g_param_spec_boolean("enable-spatial-navigation", + _("Enable Spatial Navigation"), + _("Whether to enable Spatial Navigation"), + FALSE, + flags)); /** * WebKitWebSettings:user-agent: * @@ -805,9 +825,9 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass) /** * WebKitWebSettings:enable-java-applet: * - * Enable or disable support for the Java <applet> tag. Keep in + * Enable or disable support for the Java <applet> tag. Keep in * mind that Java content can be still shown in the page through - * <object> or <embed>, which are the preferred tags for this task. + * <object> or <embed>, which are the preferred tags for this task. * * Since: 1.1.22 */ @@ -827,16 +847,21 @@ static void webkit_web_settings_init(WebKitWebSettings* web_settings) web_settings->priv = WEBKIT_WEB_SETTINGS_GET_PRIVATE(web_settings); } +static EnchantBroker* get_enchant_broker() +{ + static EnchantBroker* broker = 0; + if (!broker) + broker = enchant_broker_init(); + + return broker; +} + static void free_spell_checking_language(gpointer data, gpointer user_data) { - SpellLanguage* language = static_cast<SpellLanguage*>(data); - if (language->config) { - if (language->speller) - enchant_broker_free_dict(language->config, language->speller); + EnchantDict* dict = static_cast<EnchantDict*>(data); + EnchantBroker* broker = get_enchant_broker(); - enchant_broker_free(language->config); - } - g_slice_free(SpellLanguage, language); + enchant_broker_free_dict(broker, dict); } static void webkit_web_settings_finalize(GObject* object) @@ -854,8 +879,8 @@ static void webkit_web_settings_finalize(GObject* object) g_free(priv->user_stylesheet_uri); g_free(priv->spell_checking_languages); - g_slist_foreach(priv->spell_checking_languages_list, free_spell_checking_language, NULL); - g_slist_free(priv->spell_checking_languages_list); + g_slist_foreach(priv->enchant_dicts, free_spell_checking_language, 0); + g_slist_free(priv->enchant_dicts); g_free(priv->user_agent); @@ -867,8 +892,8 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con WebKitWebSettings* web_settings = WEBKIT_WEB_SETTINGS(object); WebKitWebSettingsPrivate* priv = web_settings->priv; EnchantBroker* broker; - SpellLanguage* lang; - GSList* spellLanguages = NULL; + EnchantDict* dict; + GSList* spellDictionaries = 0; switch(prop_id) { case PROP_DEFAULT_ENCODING: @@ -958,41 +983,36 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con priv->enable_spell_checking = g_value_get_boolean(value); break; case PROP_SPELL_CHECKING_LANGUAGES: + g_free(priv->spell_checking_languages); priv->spell_checking_languages = g_strdup(g_value_get_string(value)); - broker = enchant_broker_init(); + broker = get_enchant_broker(); if (priv->spell_checking_languages) { char** langs = g_strsplit(priv->spell_checking_languages, ",", -1); for (int i = 0; langs[i]; i++) { if (enchant_broker_dict_exists(broker, langs[i])) { - lang = g_slice_new0(SpellLanguage); - lang->config = enchant_broker_init(); - lang->speller = enchant_broker_request_dict(lang->config, langs[i]); - - spellLanguages = g_slist_append(spellLanguages, lang); + dict = enchant_broker_request_dict(broker, langs[i]); + spellDictionaries = g_slist_append(spellDictionaries, dict); } } - g_strfreev(langs); } else { const char* language = pango_language_to_string(gtk_get_default_language()); - if (enchant_broker_dict_exists(broker, language)) { - lang = g_slice_new0(SpellLanguage); - lang->config = enchant_broker_init(); - lang->speller = enchant_broker_request_dict(lang->config, language); - - spellLanguages = g_slist_append(spellLanguages, lang); + dict = enchant_broker_request_dict(broker, language); + spellDictionaries = g_slist_append(spellDictionaries, dict); } } - enchant_broker_free(broker); - g_slist_foreach(priv->spell_checking_languages_list, free_spell_checking_language, NULL); - g_slist_free(priv->spell_checking_languages_list); - priv->spell_checking_languages_list = spellLanguages; + g_slist_foreach(priv->enchant_dicts, free_spell_checking_language, 0); + g_slist_free(priv->enchant_dicts); + priv->enchant_dicts = spellDictionaries; break; case PROP_ENABLE_XSS_AUDITOR: priv->enable_xss_auditor = g_value_get_boolean(value); break; + case PROP_ENABLE_SPATIAL_NAVIGATION: + priv->enable_spatial_navigation = g_value_get_boolean(value); + break; case PROP_USER_AGENT: g_free(priv->user_agent); if (!g_value_get_string(value) || !strlen(g_value_get_string(value))) @@ -1132,6 +1152,9 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa case PROP_ENABLE_XSS_AUDITOR: g_value_set_boolean(value, priv->enable_xss_auditor); break; + case PROP_ENABLE_SPATIAL_NAVIGATION: + g_value_set_boolean(value, priv->enable_spatial_navigation); + break; case PROP_USER_AGENT: g_value_set_string(value, priv->user_agent); break; @@ -1225,11 +1248,11 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings) "enable-private-browsing", priv->enable_private_browsing, "enable-spell-checking", priv->enable_spell_checking, "spell-checking-languages", priv->spell_checking_languages, - "spell-checking-languages-list", priv->spell_checking_languages_list, "enable-caret-browsing", priv->enable_caret_browsing, "enable-html5-database", priv->enable_html5_database, "enable-html5-local-storage", priv->enable_html5_local_storage, "enable-xss-auditor", priv->enable_xss_auditor, + "enable-spatial-navigation", priv->enable_spatial_navigation, "user-agent", webkit_web_settings_get_user_agent(web_settings), "javascript-can-open-windows-automatically", priv->javascript_can_open_windows_automatically, "enable-offline-web-application-cache", priv->enable_offline_web_application_cache, @@ -1265,23 +1288,21 @@ void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* webView, cons } /** - * webkit_web_settings_get_spell_languages: + * webkit_web_settings_get_enchant_dicts: * @web_view: a #WebKitWebView * - * Internal use only. Retrieves a GSList of SpellLanguages from the + * Internal use only. Retrieves a GSList of EnchantDicts from the * #WebKitWebSettings of @web_view. * - * Since: 1.1.6 + * Since: 1.1.22 */ -GSList* webkit_web_settings_get_spell_languages(WebKitWebView *web_view) +GSList* webkit_web_settings_get_enchant_dicts(WebKitWebView* webView) { - g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(web_view), 0); + g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0); - WebKitWebSettings* settings = webkit_web_view_get_settings(web_view); - WebKitWebSettingsPrivate* priv = settings->priv; - GSList* list = priv->spell_checking_languages_list; + WebKitWebSettings* settings = webkit_web_view_get_settings(webView); - return list; + return settings->priv->enchant_dicts; } /** diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp index d6a8b83..22f6d04 100644 --- a/WebKit/gtk/webkit/webkitwebview.cpp +++ b/WebKit/gtk/webkit/webkitwebview.cpp @@ -6,7 +6,7 @@ * Copyright (C) 2008 Jan Alonzo <jmalonzo@unpluggable.com> * Copyright (C) 2008 Gustavo Noronha Silva <gns@gnome.org> * Copyright (C) 2008 Nuanti Ltd. - * Copyright (C) 2008, 2009 Collabora Ltd. + * Copyright (C) 2008, 2009, 2010 Collabora Ltd. * Copyright (C) 2009 Igalia S.L. * Copyright (C) 2009 Movial Creative Technologies Inc. * Copyright (C) 2009 Bobby Powers @@ -31,6 +31,7 @@ #include "webkitdownload.h" #include "webkitenumtypes.h" +#include "webkitgeolocationpolicydecision.h" #include "webkitmarshal.h" #include "webkitnetworkrequest.h" #include "webkitnetworkresponse.h" @@ -40,45 +41,47 @@ #include "webkitwebhistoryitem.h" #include "AXObjectCache.h" -#include "NotImplemented.h" #include "BackForwardList.h" #include "Cache.h" -#include "CString.h" #include "ChromeClientGtk.h" -#include "ContextMenu.h" #include "ContextMenuClientGtk.h" #include "ContextMenuController.h" +#include "ContextMenu.h" #include "Cursor.h" +#include "Database.h" #include "Document.h" #include "DocumentLoader.h" #include "DragClientGtk.h" -#include "Editor.h" #include "EditorClientGtk.h" +#include "Editor.h" #include "EventHandler.h" #include "FloatQuad.h" #include "FocusController.h" +#include "FrameLoader.h" #include "FrameLoaderTypes.h" -#include "HitTestRequest.h" -#include "HitTestResult.h" +#include "FrameView.h" #include <glib/gi18n-lib.h> +#include <GOwnPtr.h> #include "GraphicsContext.h" +#include "GtkVersioning.h" +#include "HitTestRequest.h" +#include "HitTestResult.h" #include "IconDatabase.h" #include "InspectorClientGtk.h" -#include "FrameLoader.h" -#include "FrameView.h" #include "MouseEventWithHitTestResults.h" +#include "NotImplemented.h" #include "PageCache.h" #include "Pasteboard.h" -#include "PasteboardHelper.h" #include "PasteboardHelperGtk.h" +#include "PasteboardHelper.h" #include "PlatformKeyboardEvent.h" #include "PlatformWheelEvent.h" #include "ProgressTracker.h" -#include "ResourceHandle.h" #include "RenderView.h" +#include "ResourceHandle.h" #include "ScriptValue.h" #include "Scrollbar.h" -#include <wtf/gtk/GOwnPtr.h> +#include <wtf/text/CString.h> #include <gdk/gdkkeysyms.h> @@ -158,6 +161,10 @@ enum { REDO, DATABASE_QUOTA_EXCEEDED, RESOURCE_REQUEST_STARTING, + DOCUMENT_LOAD_FINISHED, + GEOLOCATION_POLICY_DECISION_REQUESTED, + GEOLOCATION_POLICY_DECISION_CANCELLED, + ONLOAD_EVENT, LAST_SIGNAL }; @@ -201,33 +208,69 @@ static void destroy_menu_cb(GtkObject* object, gpointer data) priv->currentMenu = NULL; } +static void PopupMenuPositionFunc(GtkMenu* menu, gint *x, gint *y, gboolean *pushIn, gpointer userData) +{ + WebKitWebView* view = WEBKIT_WEB_VIEW(userData); + WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(view); + GdkScreen* screen = gtk_widget_get_screen(GTK_WIDGET(view)); + GtkRequisition menuSize; + + gtk_widget_size_request(GTK_WIDGET(menu), &menuSize); + + *x = priv->lastPopupXPosition; + if ((*x + menuSize.width) >= gdk_screen_get_width(screen)) + *x -= menuSize.width; + + *y = priv->lastPopupYPosition; + if ((*y + menuSize.height) >= gdk_screen_get_height(screen)) + *y -= menuSize.height; + + *pushIn = FALSE; +} + static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webView, const PlatformMouseEvent& event) { Page* page = core(webView); page->contextMenuController()->clearContextMenu(); - Frame* focusedFrame = page->focusController()->focusedOrMainFrame(); + Frame* focusedFrame; + Frame* mainFrame = page->mainFrame(); + gboolean mousePressEventResult = FALSE; - if (!focusedFrame->view()) + if (!mainFrame->view()) return FALSE; - focusedFrame->view()->setCursor(pointerCursor()); + mainFrame->view()->setCursor(pointerCursor()); + if (page->frameCount()) { + HitTestRequest request(HitTestRequest::Active); + IntPoint point = mainFrame->view()->windowToContents(event.pos()); + MouseEventWithHitTestResults mev = mainFrame->document()->prepareMouseEvent(request, point, event); + + Frame* targetFrame = EventHandler::subframeForTargetNode(mev.targetNode()); + if (!targetFrame) + targetFrame = mainFrame; + + focusedFrame = page->focusController()->focusedOrMainFrame(); + if (targetFrame != focusedFrame) { + page->focusController()->setFocusedFrame(targetFrame); + focusedFrame = targetFrame; + } + } else + focusedFrame = mainFrame; + + if (focusedFrame->view() && focusedFrame->eventHandler()->handleMousePressEvent(event)) + mousePressEventResult = TRUE; + + bool handledEvent = focusedFrame->eventHandler()->sendContextMenuEvent(event); if (!handledEvent) return FALSE; // If coreMenu is NULL, this means WebCore decided to not create - // the default context menu; this may still mean that the frame - // wants to consume the event - this happens when the page is - // handling the right-click for reasons other than a context menu, - // so we give it to it. + // the default context menu; this may happen when the page is + // handling the right-click for reasons other than the context menu. ContextMenu* coreMenu = page->contextMenuController()->contextMenu(); - if (!coreMenu) { - Frame* frame = core(webView)->mainFrame(); - if (frame->view() && frame->eventHandler()->handleMousePressEvent(PlatformMouseEvent(event))) - return TRUE; - - return FALSE; - } + if (!coreMenu) + return mousePressEventResult; // If we reach here, it's because WebCore is going to show the // default context menu. We check our setting to figure out @@ -261,8 +304,8 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie NULL); gtk_menu_popup(menu, NULL, NULL, - NULL, - priv, event.button() + 1, gtk_get_current_event_time()); + &PopupMenuPositionFunc, + webView, event.button() + 1, gtk_get_current_event_time()); return TRUE; } @@ -272,17 +315,19 @@ static gboolean webkit_web_view_popup_menu_handler(GtkWidget* widget) // The context menu event was generated from the keyboard, so show the context menu by the current selection. Page* page = core(WEBKIT_WEB_VIEW(widget)); - FrameView* view = page->mainFrame()->view(); + Frame* frame = page->focusController()->focusedOrMainFrame(); + FrameView* view = frame->view(); if (!view) return FALSE; - Position start = page->mainFrame()->selection()->selection().start(); - Position end = page->mainFrame()->selection()->selection().end(); + Position start = frame->selection()->selection().start(); + Position end = frame->selection()->selection().end(); int rightAligned = FALSE; IntPoint location; - if (!start.node() || !end.node()) + if (!start.node() || !end.node() + || (frame->selection()->selection().isCaret() && !frame->selection()->selection().isContentEditable())) location = IntPoint(rightAligned ? view->contentsWidth() - contextMenuMargin : contextMenuMargin, contextMenuMargin); else { RenderObject* renderer = start.node()->renderer(); @@ -328,8 +373,17 @@ static gboolean webkit_web_view_popup_menu_handler(GtkWidget* widget) // 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); + if (location.y() < 0) + location.setY(contextMenuMargin); + else if (location.y() > view->height()) + location.setY(view->height() - contextMenuMargin); + if (location.x() < 0) + location.setX(contextMenuMargin); + else if (location.x() > view->width()) + location.setX(view->width() - contextMenuMargin); IntPoint global = location + IntSize(x, y); - PlatformMouseEvent event(location, global, NoButton, MouseEventPressed, 0, false, false, false, false, gtk_get_current_event_time()); + + PlatformMouseEvent event(location, global, RightButton, MouseEventPressed, 0, false, false, false, false, gtk_get_current_event_time()); return webkit_web_view_forward_context_menu_event(WEBKIT_WEB_VIEW(widget), event); } @@ -510,12 +564,19 @@ static gboolean webkit_web_view_key_release_event(GtkWidget* widget, GdkEventKey { WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); + // GTK+ IM contexts often require us to filter key release events, which + // WebCore does not do by default, so we filter the event here. We only block + // the event if we don't have a pending composition, because that means we + // are using a context like 'simple' which marks every keystroke as filtered. + WebKit::EditorClient* client = static_cast<WebKit::EditorClient*>(core(webView)->editorClient()); + if (gtk_im_context_filter_keypress(webView->priv->imContext, event) && !client->hasPendingComposition()) + return TRUE; + Frame* frame = core(webView)->focusController()->focusedOrMainFrame(); if (!frame->view()) return FALSE; PlatformKeyboardEvent keyboardEvent(event); - if (frame->eventHandler()->keyEvent(keyboardEvent)) return TRUE; @@ -632,16 +693,17 @@ static void webkit_web_view_size_allocate(GtkWidget* widget, GtkAllocation* allo return; frame->view()->resize(allocation->width, allocation->height); - frame->view()->forceLayout(); - frame->view()->adjustViewSize(); } static void webkit_web_view_grab_focus(GtkWidget* widget) { - if (GTK_WIDGET_IS_SENSITIVE(widget)) { + + if (gtk_widget_is_sensitive(widget)) { WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); FocusController* focusController = core(webView)->focusController(); + focusController->setActive(true); + if (focusController->focusedFrame()) focusController->setFocused(true); else @@ -656,11 +718,7 @@ static gboolean webkit_web_view_focus_in_event(GtkWidget* widget, GdkEventFocus* // TODO: Improve focus handling as suggested in // http://bugs.webkit.org/show_bug.cgi?id=16910 GtkWidget* toplevel = gtk_widget_get_toplevel(widget); -#if GTK_CHECK_VERSION(2, 18, 0) if (gtk_widget_is_toplevel(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) { -#else - if (GTK_WIDGET_TOPLEVEL(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) { -#endif WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); FocusController* focusController = core(webView)->focusController(); @@ -670,6 +728,8 @@ static gboolean webkit_web_view_focus_in_event(GtkWidget* widget, GdkEventFocus* focusController->setFocused(true); else focusController->setFocusedFrame(core(webView)->mainFrame()); + + gtk_im_context_focus_in(webView->priv->imContext); } return GTK_WIDGET_CLASS(webkit_web_view_parent_class)->focus_in_event(widget, event); } @@ -678,8 +738,16 @@ static gboolean webkit_web_view_focus_out_event(GtkWidget* widget, GdkEventFocus { WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); - core(webView)->focusController()->setActive(false); - core(webView)->focusController()->setFocused(false); + // We may hit this code while destroying the widget, and we might + // no longer have a page, then. + Page* page = core(webView); + if (page) { + page->focusController()->setActive(false); + page->focusController()->setFocused(false); + } + + if (webView->priv->imContext) + gtk_im_context_focus_out(webView->priv->imContext); return GTK_WIDGET_CLASS(webkit_web_view_parent_class)->focus_out_event(widget, event); } @@ -849,11 +917,7 @@ static gboolean webkit_web_view_script_dialog(WebKitWebView* webView, WebKitWebF } window = gtk_widget_get_toplevel(GTK_WIDGET(webView)); -#if GTK_CHECK_VERSION(2, 18, 0) dialog = gtk_message_dialog_new(gtk_widget_is_toplevel(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, messageType, buttons, "%s", message); -#else - dialog = gtk_message_dialog_new(GTK_WIDGET_TOPLEVEL(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, messageType, buttons, "%s", message); -#endif gchar* title = g_strconcat("JavaScript - ", webkit_web_frame_get_uri(frame), NULL); gtk_window_set_title(GTK_WINDOW(dialog), title); g_free(title); @@ -1432,7 +1496,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * @web_view: the object on which the signal is emitted * @frame: the #WebKitWebFrame that required the navigation * @request: a #WebKitNetworkRequest - * @navigation_action: a #WebKitWebNavigation + * @navigation_action: a #WebKitWebNavigationAction * @policy_decision: a #WebKitWebPolicyDecision * * Emitted when @frame requests opening a new window. With this @@ -1479,7 +1543,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * @web_view: the object on which the signal is emitted * @frame: the #WebKitWebFrame that required the navigation * @request: a #WebKitNetworkRequest - * @navigation_action: a #WebKitWebNavigation + * @navigation_action: a #WebKitWebNavigationAction * @policy_decision: a #WebKitWebPolicyDecision * * Emitted when @frame requests a navigation to another page. @@ -1560,7 +1624,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * @context: the #JSGlobalContextRef holding the global object and other * execution state; equivalent to the return value of * webkit_web_frame_get_global_context(@frame) - * * @window_object: the #JSObjectRef representing the frame's JavaScript * window object * @@ -1724,6 +1787,23 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) WEBKIT_TYPE_WEB_FRAME); /** + * WebKitWebView::onload-event: + * @web_view: the object on which the signal is emitted + * @frame: the frame + * + * When a #WebKitWebFrame receives an onload event this signal is emitted. + */ + webkit_web_view_signals[LOAD_STARTED] = g_signal_new("onload-event", + G_TYPE_FROM_CLASS(webViewClass), + (GSignalFlags)G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, + WEBKIT_TYPE_WEB_FRAME); + + /** * WebKitWebView::title-changed: * @web_view: the object on which the signal is emitted * @frame: the main frame @@ -2075,7 +2155,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * @uri: the URI to load * @param: a #GHashTable with additional attributes (strings) * - * The #WebKitWebView::create-plugin signal will be emitted to + * The #WebKitWebView::create-plugin-widget signal will be emitted to * create a plugin widget for embed or object HTML tags. This * allows to embed a GtkWidget as a plugin into HTML content. In * case of a textual selection of the GtkWidget WebCore will attempt @@ -2102,7 +2182,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * @frame: the relevant frame * @database: the #WebKitWebDatabase which exceeded the quota of its #WebKitSecurityOrigin * - * The #WebKitWebView::database-exceeded-quota signal will be emitted when + * The #WebKitWebView::database-quota-exceeded signal will be emitted when * a Web Database exceeds the quota of its security origin. This signal * may be used to increase the size of the quota before the originating * operation fails. @@ -2159,6 +2239,72 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) WEBKIT_TYPE_NETWORK_REQUEST, WEBKIT_TYPE_NETWORK_RESPONSE); + /** + * WebKitWebView::geolocation-policy-decision-requested: + * @web_view: the object on which the signal is emitted + * @frame: the frame that requests permission + * @policy_decision: a WebKitGeolocationPolicyDecision + * + * When a @frame wants to get its geolocation permission. + * The receiver must reply with a boolean wether it handled or not the + * request. If the request is not handled, default behaviour is to deny + * geolocation. + * + * Since: 1.1.23 + */ + webkit_web_view_signals[GEOLOCATION_POLICY_DECISION_REQUESTED] = g_signal_new("geolocation-policy-decision-requested", + G_TYPE_FROM_CLASS(webViewClass), + (GSignalFlags)(G_SIGNAL_RUN_LAST), + 0, + NULL, NULL, + webkit_marshal_BOOLEAN__OBJECT_OBJECT, + G_TYPE_BOOLEAN, 2, + WEBKIT_TYPE_WEB_FRAME, + WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION); + + /** + * WebKitWebView::geolocation-policy-decision-cancelled: + * @web_view: the object on which the signal is emitted + * @frame: the frame that cancels geolocation request. + * + * When a @frame wants to cancel geolocation permission it had requested + * before. + * + * Since: 1.1.23 + */ + webkit_web_view_signals[GEOLOCATION_POLICY_DECISION_CANCELLED] = g_signal_new("geolocation-policy-decision-cancelled", + G_TYPE_FROM_CLASS(webViewClass), + (GSignalFlags)(G_SIGNAL_RUN_LAST), + 0, + NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, + WEBKIT_TYPE_WEB_FRAME); + + /* + * DOM-related signals. These signals are experimental, for now, + * and may change API and ABI. Their comments lack one * on + * purpose, to make them not be catched by gtk-doc. + */ + + /* + * WebKitWebView::document-load-finished + * @web_view: the object which received the signal + * @web_frame: the #WebKitWebFrame whose load dispatched this request + * + * Emitted when the DOM document object load is finished for the + * given frame. + */ + webkit_web_view_signals[DOCUMENT_LOAD_FINISHED] = g_signal_new("document-load-finished", + G_TYPE_FROM_CLASS(webViewClass), + (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), + 0, + NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, + WEBKIT_TYPE_WEB_FRAME); + + /* * implementations of virtual methods */ @@ -2549,7 +2695,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) gboolean autoLoadImages, autoShrinkImages, printBackgrounds, enableScripts, enablePlugins, enableDeveloperExtras, resizableTextAreas, enablePrivateBrowsing, enableCaretBrowsing, enableHTML5Database, enableHTML5LocalStorage, - enableXSSAuditor, javascriptCanOpenWindows, enableOfflineWebAppCache, + enableXSSAuditor, enableSpatialNavigation, javascriptCanOpenWindows, enableOfflineWebAppCache, enableUniversalAccessFromFileURI, enableFileAccessFromFileURI, enableDOMPaste, tabKeyCyclesThroughElements, enableSiteSpecificQuirks, usePageCache, enableJavaApplet; @@ -2577,6 +2723,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) "enable-html5-database", &enableHTML5Database, "enable-html5-local-storage", &enableHTML5LocalStorage, "enable-xss-auditor", &enableXSSAuditor, + "enable-spatial-navigation", &enableSpatialNavigation, "javascript-can-open-windows-automatically", &javascriptCanOpenWindows, "enable-offline-web-application-cache", &enableOfflineWebAppCache, "editing-behavior", &editingBehavior, @@ -2606,9 +2753,12 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) settings->setDeveloperExtrasEnabled(enableDeveloperExtras); settings->setPrivateBrowsingEnabled(enablePrivateBrowsing); settings->setCaretBrowsingEnabled(enableCaretBrowsing); - settings->setDatabasesEnabled(enableHTML5Database); +#if ENABLE(DATABASE) + Database::setIsAvailable(enableHTML5Database); +#endif settings->setLocalStorageEnabled(enableHTML5LocalStorage); settings->setXSSAuditorEnabled(enableXSSAuditor); + settings->setSpatialNavigationEnabled(enableSpatialNavigation); settings->setJavaScriptCanOpenWindowsAutomatically(javascriptCanOpenWindows); settings->setOfflineWebApplicationCacheEnabled(enableOfflineWebAppCache); settings->setEditingBehavior(core(editingBehavior)); @@ -2694,12 +2844,17 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar settings->setPrivateBrowsingEnabled(g_value_get_boolean(&value)); else if (name == g_intern_string("enable-caret-browsing")) settings->setCaretBrowsingEnabled(g_value_get_boolean(&value)); - else if (name == g_intern_string("enable-html5-database")) - settings->setDatabasesEnabled(g_value_get_boolean(&value)); +#if ENABLE(DATABASE) + else if (name == g_intern_string("enable-html5-database")) { + Database::setIsAvailable(g_value_get_boolean(&value)); + } +#endif else if (name == g_intern_string("enable-html5-local-storage")) settings->setLocalStorageEnabled(g_value_get_boolean(&value)); else if (name == g_intern_string("enable-xss-auditor")) settings->setXSSAuditorEnabled(g_value_get_boolean(&value)); + else if (name == g_intern_string("enable-spatial-navigation")) + settings->setSpatialNavigationEnabled(g_value_get_boolean(&value)); else if (name == g_intern_string("javascript-can-open-windows-automatically")) settings->setJavaScriptCanOpenWindowsAutomatically(g_value_get_boolean(&value)); else if (name == g_intern_string("enable-offline-web-application-cache")) @@ -2866,8 +3021,11 @@ WebKitWebInspector* webkit_web_view_get_inspector(WebKitWebView* webView) static void webkit_web_view_set_window_features(WebKitWebView* webView, WebKitWebWindowFeatures* webWindowFeatures) { WebKitWebViewPrivate* priv = webView->priv; + + if (!webWindowFeatures) + return; - if(webkit_web_window_features_equal(priv->webWindowFeatures, webWindowFeatures)) + if (webkit_web_window_features_equal(priv->webWindowFeatures, webWindowFeatures)) return; g_object_unref(priv->webWindowFeatures); @@ -3259,7 +3417,7 @@ gboolean webkit_web_view_search_text(WebKitWebView* webView, const gchar* string * @web_view: a #WebKitWebView * @string: a string to look for * @case_sensitive: whether to respect the case of text - * @limit: the maximum number of strings to look for or %0 for all + * @limit: the maximum number of strings to look for or 0 for all * * Attempts to highlight all occurances of #string inside #web_view. * @@ -3557,7 +3715,7 @@ void webkit_web_view_set_editable(WebKitWebView* webView, gboolean flag) * * This function returns the list of targets this #WebKitWebView can * provide for clipboard copying and as DND source. The targets in the list are - * added with %info values from the #WebKitWebViewTargetInfo enum, + * added with values from the #WebKitWebViewTargetInfo enum, * using gtk_target_list_add() and * gtk_target_list_add_text_targets(). * @@ -3574,7 +3732,7 @@ GtkTargetList* webkit_web_view_get_copy_target_list(WebKitWebView* webView) * * This function returns the list of targets this #WebKitWebView can * provide for clipboard pasting and as DND destination. The targets in the list are - * added with %info values from the #WebKitWebViewTargetInfo enum, + * added with values from the #WebKitWebViewTargetInfo enum, * using gtk_target_list_add() and * gtk_target_list_add_text_targets(). * @@ -3681,7 +3839,7 @@ static void webkit_web_view_apply_zoom_level(WebKitWebView* webView, gfloat zoom return; WebKitWebViewPrivate* priv = webView->priv; - frame->setZoomFactor(zoomLevel, !priv->zoomFullContent); + frame->setZoomFactor(zoomLevel, priv->zoomFullContent ? ZoomPage : ZoomTextOnly); } /** @@ -3804,6 +3962,7 @@ void webkit_web_view_set_full_content_zoom(WebKitWebView* webView, gboolean zoom */ SoupSession* webkit_get_default_session () { + webkit_init(); return ResourceHandle::defaultSession(); } @@ -3852,7 +4011,7 @@ const gchar* webkit_web_view_get_encoding(WebKitWebView* webView) { g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), NULL); - String encoding = core(webView)->mainFrame()->loader()->encoding(); + String encoding = core(webView)->mainFrame()->loader()->writer()->encoding(); if (!encoding.isEmpty()) { WebKitWebViewPrivate* priv = webView->priv; @@ -4219,6 +4378,8 @@ G_CONST_RETURN gchar* webkit_web_view_get_icon_uri(WebKitWebView* webView) */ void webkit_set_cache_model(WebKitCacheModel model) { + webkit_init(); + if (cacheModel == model) return; @@ -4267,5 +4428,6 @@ void webkit_set_cache_model(WebKitCacheModel model) */ WebKitCacheModel webkit_get_cache_model() { + webkit_init(); return cacheModel; } diff --git a/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp b/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp index cdb6858..a6fe1df 100644 --- a/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp +++ b/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp @@ -422,19 +422,24 @@ WebKitWebWindowFeatures* webkit_web_window_features_new_from_core_features(const */ gboolean webkit_web_window_features_equal(WebKitWebWindowFeatures* features1, WebKitWebWindowFeatures* features2) { + if (features1 == features2) + return TRUE; + if (!features1 || !features2) + return FALSE; + WebKitWebWindowFeaturesPrivate* priv1 = features1->priv; WebKitWebWindowFeaturesPrivate* priv2 = features2->priv; - if((priv1->x == priv2->x) && - (priv1->y == priv2->y) && - (priv1->width == priv2->width) && - (priv1->height == priv2->height) && - (priv1->toolbar_visible == priv2->toolbar_visible) && - (priv1->statusbar_visible == priv2->statusbar_visible) && - (priv1->scrollbar_visible == priv2->scrollbar_visible) && - (priv1->menubar_visible == priv2->menubar_visible) && - (priv1->locationbar_visible == priv2->locationbar_visible) && - (priv1->fullscreen == priv2->fullscreen)) + if ((priv1->x == priv2->x) + && (priv1->y == priv2->y) + && (priv1->width == priv2->width) + && (priv1->height == priv2->height) + && (priv1->toolbar_visible == priv2->toolbar_visible) + && (priv1->statusbar_visible == priv2->statusbar_visible) + && (priv1->scrollbar_visible == priv2->scrollbar_visible) + && (priv1->menubar_visible == priv2->menubar_visible) + && (priv1->locationbar_visible == priv2->locationbar_visible) + && (priv1->fullscreen == priv2->fullscreen)) return TRUE; return FALSE; } diff --git a/WebKit/gtk/webkitmarshal.list b/WebKit/gtk/webkitmarshal.list index fefdff3..d8caa4c 100644 --- a/WebKit/gtk/webkitmarshal.list +++ b/WebKit/gtk/webkitmarshal.list @@ -1,6 +1,7 @@ BOOLEAN:ENUM,INT BOOLEAN:INT,INT,STRING BOOLEAN:OBJECT +BOOLEAN:OBJECT,OBJECT BOOLEAN:OBJECT,OBJECT,OBJECT,OBJECT BOOLEAN:OBJECT,OBJECT,STRING,OBJECT BOOLEAN:OBJECT,STRING diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog index 93833fc..f09c456 100644 --- a/WebKit/haiku/ChangeLog +++ b/WebKit/haiku/ChangeLog @@ -1,3 +1,141 @@ +2010-04-20 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebCoreSupport/FrameLoaderClientHaiku.cpp: + (WebCore::FrameLoaderClientHaiku::committedLoad): + +2010-04-20 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Change a parameter type of chooseIconForFiles() + https://bugs.webkit.org/show_bug.cgi?id=37504 + + * WebCoreSupport/ChromeClientHaiku.cpp: + (WebCore::ChromeClientHaiku::chooseIconForFiles): + * WebCoreSupport/ChromeClientHaiku.h: + +2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57468. + http://trac.webkit.org/changeset/57468 + https://bugs.webkit.org/show_bug.cgi?id=37433 + + Broke the world... Must have applied the patch wrong + (Requested by abarth on #webkit). + + * WebCoreSupport/FrameLoaderClientHaiku.cpp: + (WebCore::FrameLoaderClientHaiku::committedLoad): + +2010-04-11 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebCoreSupport/FrameLoaderClientHaiku.cpp: + (WebCore::FrameLoaderClientHaiku::committedLoad): + +2010-04-07 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Yury Semikhatsky. + + Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest() + https://bugs.webkit.org/show_bug.cgi?id=36949 + + * WebCoreSupport/FrameLoaderClientHaiku.cpp: + * WebCoreSupport/FrameLoaderClientHaiku.h: + +2010-03-31 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Adds Geolocation param for cancelGeolocationPermissionRequestForFrame. + https://bugs.webkit.org/show_bug.cgi?id=35031 + + * WebCoreSupport/ChromeClientHaiku.h: + (WebCore::ChromeClientHaiku::cancelGeolocationPermissionRequestForFrame): + +2010-03-28 Alexey Proskuryakov <ap@apple.com> + + Build fix. Include WindowsKeyboardCodes.h instead of KeyboardCodes.h. + + * WebCoreSupport/EditorClientHaiku.cpp: + +2010-03-24 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Make Icon::createIconForFiles() optional. + https://bugs.webkit.org/show_bug.cgi?id=35072 + + - Rename iconForFiles() to chooseIconForFiles(). + - Call Icon::createIconForFiles() from chooseIconForFiles(). + + * WebCoreSupport/ChromeClientHaiku.cpp: + (WebCore::ChromeClientHaiku::chooseIconForFiles): + * WebCoreSupport/ChromeClientHaiku.h: + +2010-03-16 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. + + Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder + https://bugs.webkit.org/show_bug.cgi?id=35036 + + * WebCoreSupport/InspectorClientHaiku.cpp: + (WebCore::InspectorClientHaiku::openInspectorFrontend): + * WebCoreSupport/InspectorClientHaiku.h: + +2010-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. + + * WebCoreSupport/ChromeClientHaiku.cpp: + * WebCoreSupport/ChromeClientHaiku.h: + +2010-03-02 Adam Treat <atreat@rim.com> + + Reviewed by Dave Hyatt. + + Adapt the haiku port to the refactoring of repaint methods. + + https://bugs.webkit.org/show_bug.cgi?id=34214 + + * WebCoreSupport/ChromeClientHaiku.cpp: + (WebCore::ChromeClientHaiku::invalidateContents): + (WebCore::ChromeClientHaiku::invalidateWindow): + (WebCore::ChromeClientHaiku::invalidateContentsAndWindow): + (WebCore::ChromeClient::invalidateContentsForSlowScroll): + * WebCoreSupport/ChromeClientHaiku.h: + +2010-02-23 Steve Block <steveblock@google.com> + + Reviewed by Darin Adler. + + Adds ChromeClient::cancelGeolocationPermissionRequestForFrame + https://bugs.webkit.org/show_bug.cgi?id=34962 + + This method is required so that a Geolocation object can cancel an + asynchronous permission request. This allows the chrome client to cancel + any UI it is showing for the permission request. + + * WebCoreSupport/ChromeClientHaiku.h: + (WebCore::ChromeClientHaiku::cancelGeolocationPermissionRequestForFrame): + 2010-02-17 Dmitry Titov <dimich@chromium.org> Reviewed by David Levin, Darin Fisher, Simon Hausmann. diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp index a7f1145..2cf5c31 100644 --- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp +++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp @@ -32,6 +32,7 @@ #include "FrameLoadRequest.h" #include "FrameView.h" #include "HitTestResult.h" +#include "Icon.h" #include "NotImplemented.h" #include "PlatformString.h" @@ -253,7 +254,17 @@ IntRect ChromeClientHaiku::windowResizerRect() const return IntRect(); } -void ChromeClientHaiku::repaint(const IntRect&, bool contentChanged, bool immediate, bool repaintContentOnly) +void ChromeClientHaiku::invalidateWindow(const IntRect&, bool) +{ + notImplemented(); +} + +void ChromeClientHaiku::invalidateContentsAndWindow(const IntRect&, bool) +{ + notImplemented(); +} + +void ChromeClientHaiku::invalidateContentsForSlowScroll(const IntRect&, bool) { notImplemented(); } @@ -346,9 +357,9 @@ void ChromeClientHaiku::runOpenPanel(Frame*, PassRefPtr<FileChooser>) notImplemented(); } -void ChromeClientHaiku::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) +void ChromeClientHaiku::chooseIconForFiles(const Vector<String>& filenames, FileChooser* chooser) { - notImplemented(); + chooser->iconLoaded(Icon::createIconForFiles(filenames)); } bool ChromeClientHaiku::setCursor(PlatformCursorHandle) diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h index 3b0841b..d5a372b 100644 --- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h +++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h @@ -102,8 +102,11 @@ namespace WebCore { bool tabsToLinks() const; IntRect windowResizerRect() const; - void repaint(const IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); + void invalidateWindow(const IntRect&, bool); + void invalidateContentsAndWindow(const IntRect&, bool); + void invalidateContentsForSlowScroll(const IntRect&, bool); void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect); + IntPoint screenToWindow(const IntPoint&) const; IntRect windowToScreen(const IntRect&) const; PlatformPageClient platformPageClient() const; @@ -130,11 +133,12 @@ namespace WebCore { #endif // This is an asynchronous call. The ChromeClient can display UI asking the user for permission - // to use Geolococation. The ChromeClient must call Geolocation::setShouldClearCache() appropriately. + // to use Geolococation. void requestGeolocationPermissionForFrame(Frame*, Geolocation*); + void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { } void runOpenPanel(Frame*, PassRefPtr<FileChooser>); - void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); + void chooseIconForFiles(const Vector<String>&, FileChooser*); bool setCursor(PlatformCursorHandle); diff --git a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp index a51e361..48957a0 100644 --- a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp +++ b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp @@ -36,10 +36,10 @@ #include "Editor.h" #include "FocusController.h" #include "Frame.h" -#include "KeyboardCodes.h" #include "KeyboardEvent.h" #include "Page.h" #include "PlatformKeyboardEvent.h" +#include "WindowsKeyboardCodes.h" #include "NotImplemented.h" diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp index 77c7cfc..430194a 100644 --- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp +++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp @@ -510,7 +510,7 @@ void FrameLoaderClientHaiku::committedLoad(WebCore::DocumentLoader* loader, cons return; FrameLoader* frameLoader = loader->frameLoader(); - frameLoader->setEncoding(m_response.textEncodingName(), false); + frameLoader->writer()->setEncoding(m_response.textEncodingName(), false); frameLoader->addData(data, length); } @@ -634,11 +634,6 @@ bool FrameLoaderClientHaiku::dispatchDidLoadResourceFromMemoryCache(DocumentLoad return false; } -void FrameLoaderClientHaiku::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&) -{ - notImplemented(); -} - void FrameLoaderClientHaiku::dispatchDidFailProvisionalLoad(const ResourceError&) { notImplemented(); diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h index dadda19..cf2fb06 100644 --- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h +++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h @@ -194,7 +194,6 @@ namespace WebCore { virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int); - virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&); virtual void dispatchDidFailProvisionalLoad(const ResourceError&); virtual void dispatchDidFailLoad(const ResourceError&); diff --git a/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp index f06e96b..59232e9 100644 --- a/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp +++ b/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp @@ -42,45 +42,7 @@ void InspectorClientHaiku::inspectorDestroyed() notImplemented(); } -Page* InspectorClientHaiku::createPage() -{ - notImplemented(); - return 0; -} - -String InspectorClientHaiku::localizedStringsURL() -{ - notImplemented(); - return String(); -} - -String InspectorClientHaiku::hiddenPanels() -{ - notImplemented(); - return String(); -} - -void InspectorClientHaiku::showWindow() -{ - notImplemented(); -} - -void InspectorClientHaiku::closeWindow() -{ - notImplemented(); -} - -void InspectorClientHaiku::attachWindow() -{ - notImplemented(); -} - -void InspectorClientHaiku::detachWindow() -{ - notImplemented(); -} - -void InspectorClientHaiku::setAttachedWindowHeight(unsigned height) +void InspectorClientHaiku::openInspectorFrontend(WebCore::InspectorController*) { notImplemented(); } @@ -95,16 +57,6 @@ void InspectorClientHaiku::hideHighlight() notImplemented(); } -void InspectorClientHaiku::inspectedURLChanged(const String&) -{ - notImplemented(); -} - -void InspectorClientHaiku::inspectorWindowObjectCleared() -{ - notImplemented(); -} - void InspectorClientHaiku::populateSetting(const String& key, String* value) { notImplemented(); diff --git a/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h b/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h index 8788a5f..d427670 100644 --- a/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h +++ b/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h @@ -42,29 +42,13 @@ namespace WebCore { public: virtual void inspectorDestroyed(); - virtual Page* createPage(); - - virtual String localizedStringsURL(); - - virtual String hiddenPanels(); - - virtual void showWindow(); - virtual void closeWindow(); - - virtual void attachWindow(); - virtual void detachWindow(); - - virtual void setAttachedWindowHeight(unsigned height); + virtual void openInspectorFrontend(WebCore::InspectorController*); virtual void highlight(Node*); virtual void hideHighlight(); - virtual void inspectedURLChanged(const String& newURL); - virtual void populateSetting(const WebCore::String& key, WebCore::String* value); virtual void storeSetting(const WebCore::String& key, const WebCore::String& value); - - virtual void inspectorWindowObjectCleared(); }; } // namespace WebCore diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index e1d0cc3..e45527f 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,1755 @@ +2010-04-21 Mark Rowe <mrowe@apple.com> + + Tiger build fix. + + * Plugins/WebPluginController.mm: Add an #import that is necessary on Tiger. + +2010-04-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Eric Carlson. + + <rdar://problem/7313430> Many crashes in Safari inside Flip4Mac below -[NSAlert didEndAlert:returnCode:contextInfo:] + + Existing versions of the Flip4Mac WebKit plug-in have an object lifetime bug related to an NSAlert that is + used to notify the user about updates to the plug-in. This bug can result in Safari crashing if the page + containing the plug-in navigates while the alert is displayed (<rdar://problem/7313430>). + + The gist of the bug is thus: Flip4Mac sets an instance of the TSUpdateCheck class as the modal delegate of the + NSAlert instance. This TSUpdateCheck instance itself has a delegate. The delegate is set to the WmvPlugin + instance which is the NSView subclass that is exposed to WebKit as the plug-in view. Since this relationship + is that of delegates the TSUpdateCheck does not retain the WmvPlugin. This leads to a bug if the WmvPlugin + instance is destroyed before the TSUpdateCheck instance as the TSUpdateCheck instance will be left with a + pointer to a stale object. This will happen if a page containing the Flip4Mac plug-in triggers a navigation + while the update sheet is visible as the WmvPlugin instance is removed from the view hierarchy and there are + no other references to keep the object alive. + + We work around this bug by patching the following two messages: + + 1) -[NSAlert beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:] + 2) -[TSUpdateCheck alertDidEnd:returnCode:contextInfo:] + + Our override of 1) detects whether it is Flip4Mac's update sheet triggering the alert by checking whether the + modal delegate is an instance of TSUpdateCheck. If it is, it retains the modal delegate's delegate. + + Our override of 2) then autoreleases the delegate, balancing the retain we added in 1). + + These two overrides have the effect of ensuring that the WmvPlugin instance will always outlive the TSUpdateCheck + instance, preventing the TSUpdateCheck instance from accessing a stale delegate pointer and crashing the application. + + * Plugins/WebPluginController.mm: + (-[WebPluginController addPlugin:]): Check whether the plug-in being instantiated is the Flip4Mac plug-in and + install our workaround if it is. + (isKindOfClass): Helper function that checks whether the given object is an instance of the named class. + (WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_): Autorelease the delegate. + (WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_): Retain the modal delegate's + delegate if this NSAlert belongs to the Flip4Mac plug-in. + (installFlip4MacPlugInWorkaroundIfNecessary): Swizzle the necessary methods. We swizzle the TSUpdateCheck methods + first since it is possible that in some versions of Flip4Mac the TSUpdateCheck class may not exist or may not have + the method we're interested in. In that case we want to bail out before patching any methods. + +2010-04-20 Mark Rowe <mrowe@apple.com> + + Reviewed by Maciej Stachowiak. + + <rdar://problem/7856151> REGRESSION: NPP_Destroy is not called when page navigates when plug-in is displaying modal dialog + + An interaction between the plug-in host and WebKit was resulting in WKPCSetModal being called while + NetscapePluginInstanceProxy was waiting on a reply to the GetScriptableNPObject message. This resulted + in calls to stop the plug-in being deferred due to the presence of plug-in code up the stack. This + could lead to crashes as it was possible for the plug-in view to be deallocated during the modal runloop. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCInvalidateRect): + (WKPCSetModal): Defer the handling of setModal until the next runloop iteration if the host proxy + is already processing requests. This ensures that there will be no plug-in code on the stack when + the modal runloop is entered, which allows the plug-in to be stopped when the page is navigated while + a modal dialog is displayed. + +2010-04-20 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebView/WebFrame.mm: + (-[WebFrame _canProvideDocumentSource]): + (-[WebFrame _receivedData:textEncodingName:]): + +2010-04-20 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Change a parameter type of chooseIconForFiles() + https://bugs.webkit.org/show_bug.cgi?id=37504 + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::chooseIconForFiles): + +2010-04-20 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57892. + http://trac.webkit.org/changeset/57892 + https://bugs.webkit.org/show_bug.cgi?id=37864 + + Caused an assertion in Mac builds (Requested by smfr on + #webkit). + + * WebView/WebFrame.mm: + (-[WebFrame _getVisibleRect:]): + * WebView/WebFrameView.mm: + (-[WebFrameView _install]): + +2010-04-20 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + Clean up RenderPart/RenderPartObject/RenderFrame/RenderEmbeddedObject + https://bugs.webkit.org/show_bug.cgi?id=37741 + + Make Frame::ownerRenderer() return a RenderFrameBase* rather than a + RenderPart*, and add the necessary toRenderFrameBase() and isRenderFrameBase(). + + * WebView/WebFrame.mm: + (-[WebFrame _getVisibleRect:]): + * WebView/WebFrameView.mm: + (-[WebFrameView _install]): + +2010-04-19 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + Finish exposing extremal shrink factors WebHTMLView uses when shrinking pages to fit in the + printing width as SPI. + + * WebKit.exp: Export _WebHTMLViewPrintingMinimumShrinkFactor and _WebHTMLViewPrintingMaximumShrinkFactor. + +2010-04-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig & Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=37675 + Remove casts/constructors to/from JSC::UString type from WebCore::String + + WebCore's strings should not know about JSC::UString, this should be abstracted + away in the bindings. Add explicit conversion methods rather than relying on + overloaded cast operators / constructors being implicitly called. + + This patch only changes the class String, once this has landed StringImpl, and + hopefully AtomicString too, should follow suit. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (identifierFromIdentifierRep): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::addValueToArray): + (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState): + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::getPropertyNames): + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): + * WebView/WebScriptDebugger.mm: + (toNSURL): + * WebView/WebView.mm: + (aeDescFromJSValue): + +2010-04-16 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + Expose the extremal shrink factors WebHTMLView uses when shrinking pages to fit in the + printing width as SPI. + + * WebView/WebHTMLView.mm: + Replaced two macros with constants. + (-[WebHTMLView _beginPrintModeWithPageWidth:shrinkToFit:]): Changed to use the constants. + (-[WebHTMLView _scaleFactorForPrintOperation:]): Ditto. + * WebView/WebHTMLViewPrivate.h: Declared _WebHTMLViewPrintingMinimumShrinkFactor and + _WebHTMLViewPrintingMaximumShrinkFactor. + +2010-04-15 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/7870651> WebDynamicScrollBarsView.h generates compile errors when included in plain Objective-C files. + + * WebView/WebDynamicScrollBarsView.h: + +2010-04-15 Adam Roben <aroben@apple.com> + + Export WebUserContentURLPattern from WebKit + + Rubber-stamped by Mark Rowe. + + * WebKit.exp: + +2010-04-15 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + Made consecutive calls to -[WebHTMLView _beginPrintModeWithPageWidth:shrinkToFit:] work + without intermediate calls -[WebHTMLView _endPrintMode]. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]): + +2010-04-15 Adam Roben <aroben@apple.com> + + Expose UserContentURLPattern as WebKit SPI + + Fixes <http://webkit.org/b/37354>. + + Reviewed by Tim Hatcher. + + * Misc/WebUserContentURLPattern.h: Added. + + * Misc/WebUserContentURLPattern.mm: Added. + (-[WebUserContentURLPattern initWithPatternString:]): Initialize + _private and then parse the passed-in string into a + UserContentURLPattern. + (-[WebUserContentURLPattern dealloc]): Release _private. + + (-[WebUserContentURLPattern isValid]): + (-[WebUserContentURLPattern scheme]): + (-[WebUserContentURLPattern host]): + (-[WebUserContentURLPattern matchesSubdomains]): + Call through to UserContentURLPattern. + +2010-04-13 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Separated a DOMWrapperWorld's behavior of keeping wrappers alive from + its own lifetime, so a DOMWrapperWorld's controller can throw away + its wrappers even before its refcount reaches 0. + + * WebView/WebScriptWorld.h: + * WebView/WebScriptWorld.mm: + (-[WebScriptWorld unregisterWorld]): Exported this function through WebKit. + +2010-04-12 Timothy Hatcher <timothy@apple.com> + + SecurityOrigin needs a way to remove individual OriginAccessEntries + https://bugs.webkit.org/show_bug.cgi?id=37449 + + Reviewed by Dave Hyatt. + + * WebView/WebView.mm: + (+[WebView _removeOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]): + Call SecurityOrigin::removeOriginAccessWhitelistEntry. + * WebView/WebViewPrivate.h: Added _removeOriginAccessWhitelistEntryWithSourceOrigin. + +2010-04-13 Timothy Hatcher <timothy@apple.com> + + Rename SecurityOrigin::whiteListAccessFromOrigin to addOriginAccessWhitelistEntry. + And SecurityOrigin::resetOriginAccessWhiteLists to resetOriginAccessWhitelists. + + SecurityOrigin needs a way to remove individual OriginAccessEntries + https://bugs.webkit.org/show_bug.cgi?id=37449 + + Reviewed by Dave Hyatt. + + * WebView/WebView.mm: + (+[WebView _addOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]): + (+[WebView _resetOriginAccessWhitelists]): + * WebView/WebViewPrivate.h: + +2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57468. + http://trac.webkit.org/changeset/57468 + https://bugs.webkit.org/show_bug.cgi?id=37433 + + Broke the world... Must have applied the patch wrong + (Requested by abarth on #webkit). + + * WebView/WebFrame.mm: + (-[WebFrame _canProvideDocumentSource]): + (-[WebFrame _receivedData:textEncodingName:]): + +2010-04-11 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebView/WebFrame.mm: + (-[WebFrame _canProvideDocumentSource]): + (-[WebFrame _receivedData:textEncodingName:]): + +2010-04-10 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7845305> Further adoption of formal protocols for delegates. + + Move EmptyProtocolDefinitions.h down in to WebCore, and add the new protocols. Adopt the protocols in the appropriate places. + + * Misc/EmptyProtocolDefinitions.h: Removed. + * Misc/WebDownload.mm: + * WebKitPrefix.h: + +2010-04-09 Jer Noble <jer.noble@apple.com> + + Reviewed by Darin Adler. + + Work around QTMovieView bug (<rdar://problem/7712713>) by using a QTMovieLayer instead. + https://bugs.webkit.org/show_bug.cgi?id=37311 / <rdar://problem/7749993> + + * WebView/WebVideoFullscreenController.mm: + (-[WebVideoFullscreenController windowDidLoad]): + (-[WebVideoFullscreenController setMediaElement:WebCore::]): + +2010-04-09 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Maciej Stachowiak. + + https://bugs.webkit.org/show_bug.cgi?id=24572 + XMLHttpRequest.statusText returns always "OK" on Mac + + * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): + +2010-04-09 Eric Seidel <eric@webkit.org> + + Unreviewed, rolling out r57343. + http://trac.webkit.org/changeset/57343 + https://bugs.webkit.org/show_bug.cgi?id=37311 + + Broke Tiger compile. + + * WebView/WebVideoFullscreenController.mm: + (-[WebVideoFullscreenController windowDidLoad]): + (-[WebVideoFullscreenController setMediaElement:WebCore::]): + +2010-04-09 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7846015> REGRESSION (r57332) - Crash in [WebDynamicScrollBarsView(WebInternal) reflectScrolledClipView:] when opening the Downloads window + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView initWithCoder:]): Added. Calls super and then initializes _private. + +2010-04-09 Jer Noble <jer.noble@apple.com> + + Reviewed by Darin Adler. + + Work around QTMovieView bug (<rdar://problem/7712713>) by using a QTMovieLayer instead. + https://bugs.webkit.org/show_bug.cgi?id=37311 / <rdar://problem/7749993> + + * WebView/WebVideoFullscreenController.mm: + (-[WebVideoFullscreenController windowDidLoad]): + (-[WebVideoFullscreenController setMediaElement:WebCore::]): + +2010-04-08 Mark Rowe <mrowe@apple.com> + + Reviewed by John Sullivan. + + <rdar://problem/7814899> REGRESSION(r56008): iTunes crashes on quit inside -[NSScrollView dealloc] + + In r56008 new instance variables were added to WebDynamicScrollBarsView, increasing its size. + This causes problems for 32-bit applications that derive from WebDynamicScrollBarsView, as the + size and layout of their subclasses is baked in at compile time. This results in instances + being allocated that are smaller than the new code expects, and may result in the new instance + variables sharing the same memory space as any instance variables that the subclass defines. + + We can avoid this problem by having the class contain only a single member that acts as a pointer + to a heap-allocated structure that acts as storage for the real instance variables. This makes + us free to add instance variables in the future without risk of changing the size of the class. + To ensure that 32-bit applications that are built against this new WebDynamicScrollBarsView header + are able to run against older versions of WebKit we pad the class out to its previous size. This + results in any subclasses of WebDynamicScrollBarsView being created with a layout that is compatible + with both versions of the code. + + This change could potentially break a subclass of WebDynamicScrollBarsView that directly accesses + instance variables of its superclass. However, this is a private header and no known subclasses + of WebDynamicScrollBarsView access superclass instance variables in this fashion. + + * WebView/WebDynamicScrollBarsView.h: + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView initWithFrame:]): + (-[WebDynamicScrollBarsView dealloc]): + (-[WebDynamicScrollBarsView finalize]): + (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]): + (-[WebDynamicScrollBarsView setAllowsScrollersToOverlapContent:]): + (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]): + (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]): + (-[WebDynamicScrollBarsView horizontalScrollingAllowed]): + (-[WebDynamicScrollBarsView verticalScrollingAllowed]): + (-[WebDynamicScrollBarsView contentViewFrame]): + (-[WebDynamicScrollBarsView tile]): + (-[WebDynamicScrollBarsView setSuppressLayout:]): + (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]): + (-[WebDynamicScrollBarsView updateScrollers]): + (-[WebDynamicScrollBarsView reflectScrolledClipView:]): + (-[WebDynamicScrollBarsView allowsHorizontalScrolling]): + (-[WebDynamicScrollBarsView allowsVerticalScrolling]): + (-[WebDynamicScrollBarsView scrollingModes:WebCore::vertical:WebCore::]): + (-[WebDynamicScrollBarsView horizontalScrollingMode]): + (-[WebDynamicScrollBarsView verticalScrollingMode]): + (-[WebDynamicScrollBarsView setScrollingModes:vertical:andLock:]): + (-[WebDynamicScrollBarsView setHorizontalScrollingModeLocked:]): + (-[WebDynamicScrollBarsView setVerticalScrollingModeLocked:]): + (-[WebDynamicScrollBarsView setScrollingModesLocked:]): + (-[WebDynamicScrollBarsView horizontalScrollingModeLocked]): + (-[WebDynamicScrollBarsView verticalScrollingModeLocked]): + (-[WebDynamicScrollBarsView scrollWheel:]): + +2010-04-07 David Hyatt <hyatt@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=24300, don't expose history info via CSS + + Add SPI so that layout tests can access computed style including :visited information. + + * WebView/WebRenderNode.mm: + (copyRenderNode): + * WebView/WebView.mm: + (-[WebView _computedStyleIncludingVisitedInfo:forElement:]): + * WebView/WebViewInternal.h: + * WebView/WebViewPrivate.h: + +2010-04-07 Dan Bernstein <mitz@apple.com> + + Reviewed by Adele Peterson. + + Refactor WebHTMLView printing code and add private methods to enter and exit printing mode. + https://bugs.webkit.org/show_bug.cgi?id=37246 + + * Misc/WebNSPrintOperationExtras.h: Declared -_web_availablePaperWidth and -_web_availablePaperHeight. + * Misc/WebNSPrintOperationExtras.m: + (-[NSPrintOperation _web_availablePaperWidth]): Turned -[WebHTMLView _availablePaperWidthForPrintOperation:] + into this method. + (-[NSPrintOperation _web_availablePaperHeight]): Turned -[WebHTMLView _calculatePrintHeight] into this + method. + * WebView/WebHTMLView.mm: + (-[WebHTMLView _isInPrintMode]): Added this accessor. + (-[WebHTMLView _beginPrintModeWithPageWidth:shrinkToFit:]): Added. Moved the code from -knowsPageRange: that + computes the layout widths and enters printing mode into this private method. + (-[WebHTMLView _endPrintMode]): New private method (the old -_endPrintMode has been renamed). + (-[WebHTMLView _scaleFactorForPrintOperation:]): Use -[NSPrintOperation _web_availablePaperWidth]. + (-[WebHTMLView _endPrintModeAndRestoreWindowAutodisplay]): Renamed -_endPrintMode to this, changed it to call + _endPrintMode. + (-[WebHTMLView _delayedEndPrintMode:]): Updated for rename. + (-[WebHTMLView knowsPageRange:]): Use -_beginPrintModeWithPageWidth:shrintToFit:, + -[NSPrintOperation _web_availablePaperWidth], and -[NSPrintOperation _web_availablePaperHeight]. Updated for + rename. + (-[WebHTMLView beginDocument]): Updated for rename. + (-[WebHTMLView endDocument]): Ditto. + * WebView/WebHTMLViewPrivate.h: Declared new private methods -_isInPrintMode, + -_beginPrintModeWithPageWidth:shrinkToFit: and -_endPrintMode. + +2010-04-07 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Yury Semikhatsky. + + Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest() + https://bugs.webkit.org/show_bug.cgi?id=36949 + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + +2010-04-06 Dan Bernstein <mitz@apple.com> + + Tiger build fix after r57184. + + * WebView/WebHTMLViewPrivate.h: + +2010-04-06 Dan Bernstein <mitz@apple.com> + + Tiger build fix after r57184. + + * WebView/WebHTMLViewPrivate.h: + +2010-04-06 Adam Barth <abarth@webkit.org> + + Unreviewed. + + Speculative build fix for Tiger. + + * WebView/WebHTMLViewPrivate.h: + +2010-04-06 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig and Anders Carlsson. + + Expose WebHTMLView’s page breaking logic as SPI. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]): Factored out of -adjustPageHeightNew:top:bottom:limit: + (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Call -_adjustedBottomOfPageWithTop:bottom:limit: + * WebView/WebHTMLViewPrivate.h: Declared -_adjustedBottomOfPageWithTop:bottom:limit: + +2010-04-06 Mark Rowe <mrowe@apple.com> + + Add an #if in order to make Tiger happy. + + * WebView/WebViewData.mm: + (-[WebViewPrivate init]): + +2010-04-06 Mark Rowe <mrowe@apple.com> + + Build fix. + + * WebView/WebViewData.mm: + (-[WebViewPrivate init]): Use objc_collectingEnabled like we do elsewhere in WebKit. + +2010-04-05 Mark Rowe <mrowe@apple.com> + + Reviewed by Adele Peterson. + + Test case for <http://webkit.org/b/37115> / <rdar://problem/7829331>. + REGRESSION(r56989): Crash in Mail in WebCore::Position::isCandidate when deleting block using block deletion UI + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _updateFontPanel]): Ask the window whether it is the key window rather than doing the comparison + manually. This allows DumpRenderTree's override of isKeyWindow to force this code path to be taken during tests. + +2010-04-05 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=37111 + <rdar://problem/7790327> Draw replacement text when plug-in host crashes + + * Plugins/Hosted/WebHostedNetscapePluginView.h: Removed _pluginDied - it was only used + for drawing replacement icon, and this information is now in WebCore. + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView pluginHostDied]): Tell RenderEmbeddedObject that the plug-in + has crashed. + (-[WebHostedNetscapePluginView drawRect:]): Removed the case for crashed plug-in host. It is + handled by WebCore now. + + * WebCoreSupport/WebViewFactory.mm: (-[WebViewFactory crashedPluginText]): Added a string + for plug-in failure. + +2010-04-03 yael aharon <yael.aharon@nokia.com> + + Reviewed by Darin Adler. + + Enable HTMLProgressElement for Safari on OSX + https://bugs.webkit.org/show_bug.cgi?id=36961 + + * Configurations/FeatureDefines.xcconfig: + +2010-04-02 Jer Noble <jer.noble@apple.com> + + Reviewed by Eric Carlson. + + https://bugs.webkit.org/show_bug.cgi?id=36624 + Add an INIT macro for the WebKitSystemInterface function wkQTMovieSelectPreferredAlternates. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2010-04-02 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=37043 + Java regression tests spam stderr about being unable to set status message + + With this change, there is still spam about "Attempt to access JavaScript from destroyed + applet, type 9." I haven't investigated if that indicates a problem or not. + + * Plugins/WebPluginController.mm: (-[WebPluginController webPlugInContainerShowStatus:]): + Removed check for _documentView. We don't seem to care. + +2010-04-01 Kinuko Yasuda <kinuko@chromium.org> + + Reviewed by Dmitry Titov. + + Add FileThread for async file operation support in FileReader and FileWriter + https://bugs.webkit.org/show_bug.cgi?id=36896 + + Add FILE_READER or FILE_WRITER feature defines. + + * Configurations/FeatureDefines.xcconfig: + +2010-04-01 Ada Chan <adachan@apple.com> + + Reviewed by Darin Adler. + + Change WebDatabaseManager::deleteOrigin() to return true if there are no errors in deleting the origin. + Ditto for WebDatabaseManager::deleteDatabase(). + + https://bugs.webkit.org/show_bug.cgi?id=36988 + + * Storage/WebDatabaseManager.mm: + (-[WebDatabaseManager deleteOrigin:]): + (-[WebDatabaseManager deleteDatabase:withOrigin:]): + * Storage/WebDatabaseManagerPrivate.h: + +2010-04-01 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=36976 + <rdar://problem/7817498> + REGRESSION(r54783): Silverlight plug-in causes Safari to crash if JavaScript is disabled + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::get): The HashTable assertions aren't + there to catch potential future attempts to store empty/deleted values before these happen - + it's actually wrong to try to look up these values. Added an early return. + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget): Ditto. + +2010-04-01 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + Added layerTreeAsText function to DRT (for Mac) + https://bugs.webkit.org/show_bug.cgi?id=36782 + + This is the WebKit side for Mac. It plumbs the + call from WebCore to DRT. + + * WebView/WebFrame.mm:WebKit (Mac) side of plumbing + (-[WebFrame _layerTreeAsText]): + * WebView/WebFramePrivate.h: + +2010-04-01 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=36976 + <rdar://problem/7817498> + REGRESSION(r54783): Silverlight plug-in causes Safari to crash if JavaScript is disabled + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::get): Use find() instead of get(), + because the latter fails with an assertion when looking up 0 or -1. + (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget): Be prepared for unexpected + object IDs coming from plug-in host. + +2010-03-31 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + Bug 36845 - AX: need a way to set the label of a AXWebArea through WebKit + https://bugs.webkit.org/show_bug.cgi?id=36845 + + Provide a way through WebKit to set an accessible label that describes the web area. + + * WebView/WebFrame.mm: + (-[WebFrame setAccessibleName:]): + * WebView/WebFramePrivate.h: + +2010-03-31 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Adds Geolocation param for cancelGeolocationPermissionRequestForFrame. + https://bugs.webkit.org/show_bug.cgi?id=35031 + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::cancelGeolocationPermissionRequestForFrame): + +2010-03-30 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=36866 + Move CString to WTF + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::getCookies): + (WebKit::NetscapePluginInstanceProxy::getProxy): + (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo): + (WebKit::NetscapePluginInstanceProxy::resolveURL): + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView resolveURL:forTarget:]): + +2010-03-30 John Sullivan <sullivan@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=36848 + <rdar://problem/7362913> + Menu items appropriate only for rich-content editing can appear in plain-text contexts + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validRequestorForSendType:returnType:]): + Don't return self for non-string content if _canEditRichly is false. + +2010-03-29 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=36791 + Add assertions for instance proxy validity + + Add some assertions that the instance proxy hasn't been deleted. We sometimes keep a raw + pointer to one across complicated function calls, relying on the caller to protect the + reference. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::renderContextID): + (WebKit::NetscapePluginInstanceProxy::pluginView): + (WebKit::NetscapePluginInstanceProxy::hostProxy): + +2010-03-30 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by David Kilzer. + + Explicit guards for ENABLE_GEOLOCATION + https://bugs.webkit.org/show_bug.cgi?id=25756 + + * WebCoreSupport/WebGeolocationMock.mm: + (-[WebGeolocationMock setError:code:]): Make the body conditional on + ENABLE(GEOLOCATION) + (-[WebGeolocationMock setPosition:]): Ditto. + +2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Antti Koivisto. + + Change method name due to it dealing with both flattening + of frame sets and inner frames. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences isFrameFlatteningEnabled]): + (-[WebPreferences setFrameFlatteningEnabled:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2010-03-27 Darin Adler <darin@apple.com> + + * Misc/WebNSFileManagerExtras.m: + (-[NSFileManager _webkit_pathWithUniqueFilenameForPath:]): + Removed stray "!". How did that get in there? + +2010-03-27 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + WebKit NSFileManager methods don't handle broken symlinks correctly. + Part of <rdar://problem/7574046>. + + * Misc/WebNSFileManagerExtras.h: Removed unused defines and methods. + * Misc/WebNSFileManagerExtras.m: Removed unused methods. + (fileExists): Added. For use instead of fileExistsAtPath: for cases where we'd like + to treat a broken symlink as a file that does indeed exist. + (-[NSFileManager _webkit_pathWithUniqueFilenameForPath:]): Use fileExists. + +2010-03-25 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Mark Rowe. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCRunSyncOpenPanel): Re-fetch host proxy in + a way that works in a function that doesn't have a pluginID argument for some reason. + +2010-03-25 Simon Fraser <simon.fraser@apple.com> + + Build fix: no review. + + Another c_str() -> data(). + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::enumerate): + +2010-03-25 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Mark Rowe. + + Correctness fix after r56493. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCRunSyncOpenPanel): We still need to update + our hostProxy reference, even though we didn't use to have instanceProxy. Nothing guarantees + that the host proxy won't go away while the open panel is up. + +2010-03-24 Mark Rowe <mrowe@apple.com> + + Build fix after r56474. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCRunSyncOpenPanel): + +2010-03-24 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Anders Carlsson. + + https://bugs.webkit.org/show_bug.cgi?id=36563 + A plug-in makes Safari crash on http://www.itscodingtime.com/ + + * Plugins/Hosted/NetscapePluginHostProxy.h: + (WebKit::NetscapePluginHostProxy::port): Assert that the object is still alive. This isn't + beautifully systemic, but helped catch a bug, and may help catch more. + (WebKit::NetscapePluginHostProxy::clientPort): Ditto. + (WebKit::NetscapePluginHostProxy::isProcessingRequests): Changed m_processingRequests to a + static. This doesn't change behavior much, but helps avoid writing into deallocated memory. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Changed m_processingRequests + to a static. + (WebKit::NetscapePluginHostProxy::processRequests): Ditto. Changing m_processingRequests + after destroying the object in pluginHostDied() was wrong, but reasonably harmless, as there + wasn't much time for some other object to be allocated at this address. + (WKPCEvaluate): Refetch host proxy, as it may have been destroyed. + (WKPCInvoke): Ditto. + (WKPCInvokeDefault): Ditto. + (WKPCGetProperty): Ditto. + (WKPCSetProperty): Ditto. + (WKPCRemoveProperty): Ditto. + (WKPCHasProperty): Ditto. + (WKPCHasMethod): Ditto. + (WKPCEnumerate): Ditto. + (WKPCRunSyncOpenPanel): Ditto. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply): Bail out of the + "event loop" if host proxy went away while processing a request. + +2010-03-24 Hayato Ito <hayato@chromium.org> + + Reviewed by Shinichiro Hamaji. + + Refactor computePageRects so that Mac can make use of it. + https://bugs.webkit.org/show_bug.cgi?id=36159 + + Refactoring only, so no new tests. + + * WebView/WebFrame.mm: + (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): + +2010-03-24 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Make Icon::createIconForFiles() optional. + https://bugs.webkit.org/show_bug.cgi?id=35072 + + - Rename iconForFiles() to chooseIconForFiles(). + - Call Icon::createIconForFiles() from chooseIconForFiles(). + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::chooseIconForFiles): + +2010-03-23 Dan Bernstein <mitz@apple.com> + + Reverted accidental change from r56429. + + * WebCoreSupport/WebContextMenuClient.mm: + (WebContextMenuClient::getCustomMenuFromDefaultItems): + +2010-03-23 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + WebKit part of + <rdar://problem/7197736> Plug-in clip rect does not update when overflow + clip changes + https://bugs.webkit.org/show_bug.cgi?id=36479. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView visibleRectDidChange]): Added. Calls + WKSyncSurfaceToView(). + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView _windowClipRect]): Changed to use Widget::windowClipRect(). + (-[WebBaseNetscapePluginView visibleRectDidChange]): Added. Invokes -renewGState. + +2010-03-22 Kevin Decker <kdecker@apple.com> + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=36328 + + This patch entirely WebNullPluginView. + + * Plugins/WebNetscapePluginView.mm: + * Plugins/WebNullPluginView.h: Removed. + * Plugins/WebNullPluginView.mm: Removed. + * Resources/nullplugin.tiff: Removed. + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): Invoke the resource load delegate if the plug-in failed to load. + +2010-03-22 Alexey Proskuryakov <ap@apple.com> + + Reviewed by John Sullivan. + + https://bugs.webkit.org/show_bug.cgi?id=36455 + Make WebKit more resistant against plug-in crashes + + No tests, because crashing on build bots isn't good, even if it's only helper processes + that crash. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::waitForReply): Protect "this", because this function + needs it after waiting for reply. Some callers used to do this, but not all, and we really + shouldn't depend on callers here. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::wheelEvent): Don't protect the plug-in instance proxy, + because this function doesn't use it after waiting for reply. + (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): Ditto. + + * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyInstance::invoke): Added an m_instanceProxy + null check for another code path. + +2010-03-22 Kevin Decker <kdecker@apple.com> + + Reviewed by John Sullivan. + + https://bugs.webkit.org/show_bug.cgi?id=36328 + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory missingPluginText]): Added. + +2010-03-18 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=36337 + Log an error when an OOP plug-in sends an unknown object id + + Making these LOG_ERROR and not ASSERTs, because I don't want early returns to look + temporary or redundant. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::evaluate): + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::invokeDefault): + (WebKit::NetscapePluginInstanceProxy::construct): + (WebKit::NetscapePluginInstanceProxy::getProperty): + (WebKit::NetscapePluginInstanceProxy::setProperty): + (WebKit::NetscapePluginInstanceProxy::removeProperty): + (WebKit::NetscapePluginInstanceProxy::hasProperty): + (WebKit::NetscapePluginInstanceProxy::hasMethod): + (WebKit::NetscapePluginInstanceProxy::enumerate): + +2010-03-16 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=36184 + YouTube video resizing doesn't work with OOP plug-ins + + Test: plugins/resize-from-plugin.html + + We were calling _WKPHResizePluginInstance synchronously or asynchronously, depending on + whether the size has changed. But sync and async messages are not necessarily delivered in + order - plug-in host listens only to the former while waiting for a response to a message it + sent (a call to invoke() in this case). + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::resize): + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView updateAndSetWindow]): + +2010-03-16 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. + + Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder + https://bugs.webkit.org/show_bug.cgi?id=35036 + + * WebCoreSupport/WebInspectorClient.h: + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::WebInspectorClient): + (WebInspectorClient::inspectorDestroyed): + (WebInspectorClient::openInspectorFrontend): + (WebInspectorClient::highlight): + (WebInspectorClient::hideHighlight): + (WebInspectorFrontendClient::WebInspectorFrontendClient): + (WebInspectorFrontendClient::frontendLoaded): + (WebInspectorFrontendClient::localizedStringsURL): + (WebInspectorFrontendClient::hiddenPanels): + (WebInspectorFrontendClient::bringToFront): + (WebInspectorFrontendClient::closeWindow): + (WebInspectorFrontendClient::attachWindow): + (WebInspectorFrontendClient::detachWindow): + (WebInspectorFrontendClient::setAttachedWindowHeight): + (WebInspectorFrontendClient::inspectedURLChanged): + (WebInspectorFrontendClient::updateWindowTitle): + (-[WebInspectorWindowController dealloc]): + (-[WebInspectorWindowController windowShouldClose:]): + (-[WebInspectorWindowController close]): + (-[WebInspectorWindowController showWindow:]): + (-[WebInspectorWindowController attach]): + (-[WebInspectorWindowController detach]): + (-[WebInspectorWindowController attached]): + (-[WebInspectorWindowController setFrontendClient:]): + (-[WebInspectorWindowController destroyInspectorView]): + (-[WebNodeHighlighter initWithInspectedWebView:]): + (-[WebNodeHighlighter dealloc]): + (-[WebNodeHighlighter highlightNode:]): + (-[WebNodeHighlighter hideHighlight]): + (-[WebNodeHighlighter didAttachWebNodeHighlight:]): + (-[WebNodeHighlighter willDetachWebNodeHighlight:]): + * WebInspector/WebInspector.mm: + (-[WebInspector attach:]): + (-[WebInspector detach:]): + +2010-03-15 Andy Estes <aestes@apple.com> + + Reviewed by John Sullivan. + + Updated call to WKGetWheelEventDeltas() to match new method signature. + + https://bugs.webkit.org/show_bug.cgi?id=29601 + <rdar://problem/7453254> + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView scrollWheel:]): + +2010-03-15 John Sullivan <sullivan@apple.com> + + Reviewed by Adam Roben. + + -[WebFrame setAlwaysHideHorizontal/VerticalScroller:] prevents keyboard scrolling + <https://bugs.webkit.org/show_bug.cgi?id=36125> + + * WebView/WebDynamicScrollBarsView.h: + Added instance variables horizontalScrollingAllowedButScrollerHidden and + verticalScrollingAllowedButScrollerHidden. Renamed instance variables + hideHorizontal/VerticalScroller to alwaysHideHorizontal/VerticalScroller for clarity. + Declared methods -horizontalScrollingAllowed and -verticalScrollingAllowed. + Added comments. + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]): + Updated for instance variable renaming. + (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]): + Ditto. + (-[WebDynamicScrollBarsView horizontalScrollingAllowed]): + New method, returns YES if the scroller is showing or the only reason that the scroller + is not showing is that setAlwaysHideHorizontalScrolling has been called. + (-[WebDynamicScrollBarsView verticalScrollingAllowed]): + New method, returns YES if the scroller is showing or the only reason that the scroller + is not showing is that setAlwaysHideVerticalScrolling has been called. + (-[WebDynamicScrollBarsView updateScrollers]): + Updated for instance variable renamings. Now updates horizontalScrollingAllowedButScrollerHidden + and verticalScrollingAllowedButScrollerHidden. Now takes the always-hidden state into account + in the early-return code path, to avoid taking it into account twice in the regular code path. + + * WebView/WebFrameView.mm: + (-[WebFrameView _scrollToBeginningOfDocument]): + Use _isScrollable instead of _hasScrollBars. + (-[WebFrameView _scrollToEndOfDocument]): + Ditto. + (-[WebFrameView scrollToBeginningOfDocument:]): + Use _largestScrollableChild instead of _largestChildWithScrollBars. + (-[WebFrameView scrollToEndOfDocument:]): + Ditto. + (-[WebFrameView _pageVertically:]): + Use _isScrollable and _largestScrollableChild instead of _hasScrollBars + and _largestChildWithScrollBars. + (-[WebFrameView _pageHorizontally:]): + Ditto. + (-[WebFrameView _scrollLineVertically:]): + Ditto. + (-[WebFrameView _scrollLineHorizontally:]): + Ditto. + (-[WebFrameView keyDown:]): + Use _largestScrollableChild instead of _largestChildWithScrollBars. + (-[WebFrameView _isScrollable]): + New method, calls -[WebDynamicScrollBarsView horizontalScrollingAllowed] and + -[WebDynamicScrollBarsView verticalScrollingAllowed] + (-[WebFrameView _largestScrollableChild]): + New method, like _largestChildWithScrollBars but uses _isScrollable. + (-[WebFrameView _hasScrollBars]): + Added a comment that this is no longer used by Safari, and can thus probably be + deleted once we no longer want to support it for nightly build compatibility with + old versions of Safari. + (-[WebFrameView _largestChildWithScrollBars]): + Ditto. + + * WebView/WebFrameViewPrivate.h: + Declared -_isScrollable and -_largestScrollableChild. Added comments to + _hasScrollBars and _largestChildWithScrollBars saying that they are no longer + used by Safari, and can thus probably be deleted once we no longer want to + support them for nightly build compatibility with old versions of Safari. + +2010-03-15 John Sullivan <sullivan@apple.com> + + Method name and parameter name mistakes from recent SPI addition + <https://bugs.webkit.org/show_bug.cgi?id=36119> + + Reviewed by Dan Bernstein. + + * WebView/WebDynamicScrollBarsView.h: + Renamed instance variable and method name from "setAllowXXX" to "setAllowsXXX". + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView setAllowsScrollersToOverlapContent:]): + Updated for renamed instance variable and method. + (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]): + Changed parameter name from shouldBeVisible to shouldBeHidden. + (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]): + Ditto. + (-[WebDynamicScrollBarsView contentViewFrame]): + Updated for renamed instance variable. + (-[WebDynamicScrollBarsView tile]): + Ditto. + (-[WebDynamicScrollBarsView reflectScrolledClipView:]): + Ditto. + + * WebView/WebFrame.mm: + (-[WebFrame setAllowsScrollersToOverlapContent:]): + Renamed method from setAllowXXX, and updated for same change in WebDynamicScrollBarsView. + + * WebView/WebFramePrivate.h: + Renamed method name from "setAllowXXX" to "setAllowsXXX". + +2010-03-14 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + Remove unneeded dependency on non-string identifier for an NSTableColumn + https://bugs.webkit.org/show_bug.cgi?id=36106 + + * WebView/WebTextCompletionController.mm: + (-[WebTextCompletionController _buildUI]): Use init instead of initWithIdentifier: + because the table has only one column and that column does not need an identifier. + +2010-03-12 Beth Dakin <bdakin@apple.com> + + Reviewed by Simon Fraser. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen + API naming is inconsistent + -and corresponding- + <rdar://problem/7729165> + + This patch changes all occurrences of "fullScreen" to the more + popular "fullscreen." + + * Plugins/Hosted/NetscapePluginHostProxy.h: + (WebKit::NetscapePluginHostProxy::isFullscreenWindowShowing): + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + (WebKit::NetscapePluginHostProxy::didEnterFullscreen): + (WebKit::NetscapePluginHostProxy::didExitFullscreen): + (WebKit::NetscapePluginHostProxy::setFullscreenWindowIsShowing): + (WKPCSetFullscreenWindowIsShowing): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView _workaroundSilverlightFullscreenBug:]): + (-[WebNetscapePluginView _createPlugin]): + (-[WebNetscapePluginView _destroyPlugin]): + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController windowDidLoad]): + +2010-03-12 Andy Estes <aestes@apple.com> + + Reviewed by Brady Eidson. + + Expose WebPDFView's underlying PDFDocument. + + https://bugs.webkit.org/show_bug.cgi?id=36045 + + * WebView/WebDocumentPrivate.h: Create a new protocol called + WebDocumentPDF. + * WebView/WebPDFView.h: Have WebPDFView implement said protocol. + * WebView/WebPDFView.mm: + (-[WebPDFView PDFDocument]): Expose WebPDFView's underlying + PDFDocument by implementing -(PDFDocument*)PDFDocument from + WebDocumentPDF. + +2010-03-12 Andy Estes <aestes@apple.com> + + Reviewed by Brady Eidson. + + Remove an unused method. + + https://bugs.webkit.org/show_bug.cgi?id=35940 + + * Plugins/WebPluginController.mm: + removed - (void)showURL:(NSURL *) inFrame:(NSString *) + +2010-03-11 Mark Rowe <mrowe@apple.com> + + Reviewed by David Kilzer. + + <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version + + Default to using the appropriate SDK if the target Mac OS X version is not the current Mac OS X version. + + * Configurations/Base.xcconfig: + +2010-03-11 Mark Rowe <mrowe@apple.com> + + Reviewed by Tim Hatcher. + + <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version + + Introduce TARGET_MAC_OS_X_VERSION_MAJOR to represent the Mac OS X version that is being targeted. It defaults to the + current Mac OS X version unless otherwise specified. + + Key off TARGET_MAC_OS_X_VERSION_MAJOR where we'd previously been keying off MAC_OS_X_VERSION_MAJOR. + + Explicitly map from the target Mac OS X version to the preferred compiler since Xcode's default compiler choice + may not be usable when targetting a different Mac OS X version. + + Key off TARGET_GCC_VERSION rather than MAC_OS_X_VERSION_MAJOR in locations where we'd previously been keying off + MAC_OS_X_VERSION_MAJOR but the decision is really related to the compiler version being used. + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + * Configurations/FeatureDefines.xcconfig: + * Configurations/Version.xcconfig: + +2010-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + +2010-03-11 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=35965 + <rdar://problem/7742771> Crash when passing an object returned from plug-in back to the plug-in + + Test: plugins/round-trip-npobject.html + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::retainLocalObject): Corrected the check - there is + now a separate ProxyRuntimeObject class for proxy pbjects. + (WebKit::NetscapePluginInstanceProxy::releaseLocalObject): Ditto. + + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::invoke): Check if m_instanceProxy is still non-zero. The plug-in + could have crashed while we were waiting for response. + (WebKit::ProxyInstance::setFieldValue): Ditto. + +2010-03-10 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=35975 + <rdar://problem/7739922> Flash 10.1b crashes when generating snapshots + + Do a version check before sending a drawRect event to a Flash plugin, + since 10.1.d51 has a bug that crashes when called this way. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView drawRect:]): + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView supportsSnapshotting]): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView drawRect:]): + +2010-03-10 John Sullivan <sullivan@apple.com> + + Reviewed by Tim Hatcher. + + <rdar://problem/7735387> input type other than text won't work with autofill + <https://bugs.webkit.org/show_bug.cgi?id=35963> + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation elementDoesAutoComplete:]): + Return true for any text field that's not a password, rather than only + for TEXT type. + +2010-03-09 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher. + + REGRESSION: WebInspector docking busted on Windows + <rdar://problem/7728433> and https://bugs.webkit.org/show_bug.cgi?id=35953 + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController showWindow:]): Use the InspectorController:: copy of the should attach settings key. + (-[WebInspectorWindowController attach]): Ditto. + (-[WebInspectorWindowController detach]): Ditto. + +2010-03-09 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + Updated for FastMalloc reporting changes. + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics memoryStatistics]): + +2010-03-08 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Mark Rowe. + + Move the new method to the end of the MIG definitions file, to avoid breaking + compatibility between WebKit and older versions of WebKitPluginHost. + + * Plugins/Hosted/WebKitPluginHost.defs: + +2010-03-08 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/7714340> Need to grab image snapshot of Core Animation plugins + + Allow plug-ins using the Core Animation drawing model to be captured when doing a flattening paint, + by sending them a drawRect event as if they were software-painting. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::snapshot): + New snapshot() method that calls over to the plugin host, and then draws the image that comes back. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView drawRect:]): If we don't have a software renderer, but we're doing + a flattening paint, then call the snapshot method. + + * Plugins/Hosted/WebKitPluginHost.defs: Added snapshot method. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView inFlatteningPaint]): + New utility method that asks the FrameView whether the current paint behavior is + flattening. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView drawRect:]): If the plug-in is using CA but this is a flattening + paint, go ahead and send a drawRect event to the plug-in. + +2010-03-08 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + Fix crash when you quit inside an unload handler. + rdar://problem/6958347 + + Test: manual-tests/quit-inside-unload.html + + * WebView/WebView.mm: + (-[WebView _closeWithFastTeardown]): Removed code to set + _private->closed since _close now does this earlier, before + calling this method. + (-[WebView _close]): Moved code to set _private->closed to the + top of this method. + (-[WebView setHostWindow:]): Rewrote the code that forbade + setting the host window after closing so that it only forbids + non-nil host windows. That way, the code to clear away the host + window can run safely after setting _private->closed, yet client + code cannot set a new host window after closing. + +2010-03-08 Darin Adler <darin@apple.com> + + Roll out a file I checked in by accident. + + * WebView/WebView.mm: Back to previous version. + +2010-03-08 Chris Marrin <cmarrin@apple.com> + + Reviewed by Darin Adler. + + Turn on HW accel on Leopard even if coreVideoHas7228836Fix() is false, when WebGL is enabled + https://bugs.webkit.org/show_bug.cgi?id=35759 + + This allows WebGL to work on Leopard without the fix. It exposes these users to the crash + that happens because of the CoreVideo bug, but it limits the exposure to those who have + chosen to enable WebGL. + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2010-03-02 Adam Treat <atreat@rim.com> + + Reviewed by Dave Hyatt. + + Adapt the mac port to the refactoring of repaint methods. + + https://bugs.webkit.org/show_bug.cgi?id=34214 + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::invalidateContents): + (WebChromeClient::invalidateWindow): + (WebChromeClient::invalidateContentsAndWindow): + (WebChromeClient::invalidateContentsForSlowScroll): + +2010-03-08 Jian Li <jianli@chromium.org> + + Reviewed by Dmitry Titov. + + Blob.slice support. + https://bugs.webkit.org/show_bug.cgi?id=32993 + + Add ENABLE_BLOB_SLICE feature define. + + * Configurations/FeatureDefines.xcconfig: + +2010-03-08 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + Remove the now-redundant Settings fields for the Database + https://bugs.webkit.org/show_bug.cgi?id=35763 + + No new tests; this code isn't called. + + * WebView/WebView.mm: Remove the call into Settings. + (-[WebView _preferencesChangedNotification:]): + +2010-03-07 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Cameron Zwarich. + + Remove unnecessary includes from header files, adding them to the handful of implementation files that need them. + + * Misc/WebIconDatabase.mm: + +2010-03-07 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Cameron Zwarich. + + Remove unnecessary includes from header files, adding them to the handful of implementation files that need them. + + * Misc/WebNSPasteboardExtras.mm: + +2010-03-04 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/7717249> DOMSVG.h includes a non-existent DOMSVGFEMorphologyElement.h + + * MigrateHeaders.make: Migrate DOMSVGFEMorphologyElement.h and DOMSVGFEMorphologyElementInternal.h. + +2010-03-04 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Use a framework-style include to pull in WebInspector.h for consistency + with other parts of WebKit. + + * WebInspector/WebInspectorPrivate.h: + +2010-03-04 Brady Eidson <beidson@apple.com> + + Reviewed by Geoff Garen. + + REGRESSION (31281): -[WebArchive initWithCoder:] leaks + <rdar://problem/7702420> and https://bugs.webkit.org/show_bug.cgi?id=35534 + + * WebView/WebArchive.mm: + (-[WebArchive initWithCoder:]): Don't retain objects we don't own. + +2010-03-03 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Timothy Hatcher. + + https://bugs.webkit.org/show_bug.cgi?id=35692 + <rdar://problem/7703622> Crash when calling abort() on an XHR while in a windowless WebView + + * Panels/WebAuthenticationPanel.m: (-[WebAuthenticationPanel runAsModalDialogWithChallenge:]): + Retain the challenge, just like it's done for sheet. + +2010-03-02 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + Move database enable bit fully out of settings + This is stage one of a three-stage commit [webkit, then chromium, then + webkit again]. In this change I'm adding calls to + Database::setIsAvailable inside Settings::setDatabaseEnabled and + anywhere else that called it, and switching webkit fully over to using + that flag [added in a previous checkin]. Phase two will remove + Chromium's use of Settings for the Database, and phase three will remove + the Setting for the Database enable entirely, leaving only + Database::isAvailable/setIsAvailable. + + No new tests; tested by existing storage tests. + + https://bugs.webkit.org/show_bug.cgi?id=35310 + + * WebView/WebView.mm: Added a call to Database::setIsAvailable. + (-[WebView _preferencesChangedNotification:]): + +2010-03-02 Adam Roben <aroben@apple.com> + + Add -[WebView _registerURLSchemeAsSecure:] + + Fixes <http://webkit.org/b/35580> <rdar://problem/7706407> Expose + SecurityOrigin::registerURLSchemeAsSecure as WebKit SPI + + Reviewed by Tim Hatcher. + + * WebView/WebView.mm: + (+[WebView _registerURLSchemeAsSecure:]): + * WebView/WebViewPrivate.h: + Added. Calls through to SecurityOrigin::registerURLSchemeAsSecure. + +2010-03-01 Jakob Petsovits <jpetsovits@rim.com> + + Reviewed by Adam Barth. + + Adapt to the new ZoomMode enum. + https://bugs.webkit.org/show_bug.cgi?id=35347 + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + (-[WebView _setZoomMultiplier:isTextOnly:]): + (-[WebView _realZoomMultiplierIsTextOnly]): + +2010-02-27 Jing Jin <jjin@apple.com> + + Reviewed by Timothy Hatcher. + + Move implementation of Bug 35449 into WebFramePrivate. + + * WebView/WebFrame.h: + * WebView/WebFrame.mm: + (-[WebFrame setAllowScrollersToOverlapContent:]): + (-[WebFrame setAlwaysHideHorizontalScroller:]): + (-[WebFrame setAlwaysHideVerticalScroller:]): + * WebView/WebFramePrivate.h: + +2010-02-26 Jing Jin <jjin@apple.com> + + Reviewed by Timothy Hatcher. + + https://bugs.webkit.org/show_bug.cgi?id=35449 + Add ability to hide WebFrame scrollbars and to allow scrollbars to overlap with content. + + * WebView/WebDynamicScrollBarsView.h: + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView setAllowScrollersToOverlapContent:]): Allows scrollbars to + overlap with the document and re-layouts the document. + (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]): Hides the horizontal scrollbar. + (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]): Hides the vertical scrollbar. + (-[WebDynamicScrollBarsView contentViewFrame]): Calculates the appropriate frame based + on allowScrollersToOverlapContent. + (-[WebDynamicScrollBarsView tile]): If allowScrollersToOverlapContent is YES, set the + contentView's frame so it overlaps with the scrollbar. + (-[WebDynamicScrollBarsView updateScrollers]): Take into account hideHorizontalScroller + and hideVerticalScroller. + (-[WebDynamicScrollBarsView reflectScrolledClipView:]): set drawsBackground to NO when + scrollbars are overlapping with content, so we don't get trails during scrollbar draw updates. + * WebView/WebDynamicScrollBarsViewInternal.h: + * WebView/WebFrame.h: + * WebView/WebFrame.mm: + (-[WebFrame setAllowScrollersToOverlapContent:]): Hook for [WebDynamicScrollBarsView setAllowScrollersToOverlapContent:] + (-[WebFrame setAlwaysHideHorizontalScroller:]): Hook for [WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:] + (-[WebFrame setAlwaysHideVerticalScroller:]): Hook for [WebDynamicScrollBarsView setAlwaysHideVerticalScroller:] + +2010-02-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Alexey Proskuryakov. + + Bug 35401 - Fix handling of errors in handling calls over bridge, + where base object bridge-type does not match method bridge-type. + + The code assumes users will only attempt to invoke a Java method + on a Java base object, etc. + Add language specific subclasses of RuntimeMethod, and pass the + RuntimeMethod into invokeMethod, so we can typecheck before + casting. Throw an exception on type mismatch. + + * Plugins/Hosted/ProxyInstance.h: + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::PluginRuntimeMethod::PluginRuntimeMethod): new class to distinguish this type of RuntimeMethod. + (WebKit::ProxyInstance::getMethod): create an appropriate sublclass of RuntimeMethod. + (WebKit::ProxyInstance::invokeMethod): dynamically check the type of the RuntimeMethod. + +2010-02-25 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=35394 + <rdar://problem/7685262> Make passing objects between Java and plug-ins work + + Added a ProxyInstance implementation of RuntimeObject. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::addValueToArray): + * Plugins/Hosted/ProxyInstance.h: + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::newRuntimeObject): + (WebKit::ProxyInstance::getClass): + * Plugins/Hosted/ProxyRuntimeObject.h: Added. + (WebKit::ProxyRuntimeObject::classInfo): + * Plugins/Hosted/ProxyRuntimeObject.mm: Added. + (WebKit::ProxyRuntimeObject::ProxyRuntimeObject): + (WebKit::ProxyRuntimeObject::~ProxyRuntimeObject): + (WebKit::ProxyRuntimeObject::getInternalProxyInstance): + +2010-02-24 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Fisher. + + [Chromium API] Disambiguate allowJavaScript from didNotAllowScript + https://bugs.webkit.org/show_bug.cgi?id=35205 + + Make these two callsites explicit about not running script immediately. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::getWindowNPObject): + (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): + +2010-02-23 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher and Pavel Feldman. + + Regression (r55107) - WebInspector docking is busted. + https://bugs.webkit.org/show_bug.cgi?id=35274 + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController showWindow:]): Swap the order of the "should attach?" check + to get the expected behavior. + +2010-02-23 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + <rdar://problem/7611158> Incomplete repaint of YouTube timeline thumb while scrolling + https://bugs.webkit.org/show_bug.cgi?id=34381 + + Test: fast/repaint/repaint-during-scroll.html + + NSClipView offsets any rects marked as needing display during scrolling + by the scroll offset. Compensate for this when -setNeedsDisplay: is called + during scrolling. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _frameOrBoundsChanged]): Set inScrollPositionChanged to YES + around to call to FrameView::scrollPositionChanged(). + (-[WebHTMLView setNeedsDisplayInRect:]): When called beneath + scrollPositionChanged(), adjust the rect by the inverse of the scroll offset. + +2010-02-23 Steve Block <steveblock@google.com> + + Reviewed by Darin Adler. + + Adds ChromeClient::cancelGeolocationPermissionRequestForFrame + https://bugs.webkit.org/show_bug.cgi?id=34962 + + This method is required so that a Geolocation object can cancel an + asynchronous permission request. This allows the chrome client to cancel + any UI it is showing for the permission request. + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::cancelGeolocationPermissionRequestForFrame): + +2010-02-22 Alexey Proskuryakov <ap@apple.com> + + Rubber-stamped by Geoff Garen. + + Rename RuntimeObjectImp to RuntimeObject. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::addValueToArray): + (WebKit::NetscapePluginInstanceProxy::retainLocalObject): + (WebKit::NetscapePluginInstanceProxy::releaseLocalObject): + +2010-02-22 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher. + + Disable WebView docking to views that are too small. + <rdar://problem/7248409> and https://bugs.webkit.org/show_bug.cgi?id=35254 + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController showWindow:]): No matter the preference, don't open the inspector + window attached if WebCore says it shouldn't be attached. + +2010-02-22 Simon Fraser <simon.fraser@apple.com> + + Reviewed by John Sullivan. + + <rdar://problem/7285392> + On Leopard, we have to disable hardware acceleration if we detect that the + installed Core Video framework has bug <rdar://problem/7228836>. + + * WebView/WebView.mm: + (coreVideoHas7228836Fix): + (-[WebView _preferencesChangedNotification:]): + +2010-02-21 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + False warnings about needing layout in + -[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + https://bugs.webkit.org/show_bug.cgi?id=35218 + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]): + Suppress the warning and the forced layout if the view is not being drawn + in this display operation. + +2010-02-21 Kevin Decker <kdecker@apple.com> + + Reviewed by Sam Weinig. + + plugInViewWithArguments: API sends wrong parameter for WebPlugInBaseURLKey + https://bugs.webkit.org/show_bug.cgi?id=35215 + <rdar://problem/7673157> + + The plugInViewWithArguments: API passes a dictionary of plugin arguments. One of the parameters + is WebPlugInBaseURLKey, which is a key that represents the base URL of the document containing + the plug-in's view. Instead of sending the base URL, code in WebFrameLoaderClient::createPlugin + would incorrectly pass the source URL of the plug-in resource. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): When building the plug-in arguments dictionary, pass the + real base URL for the WebPlugInBaseURLKey key. + +2010-02-19 Maciej Stachowiak <mjs@apple.com> + + Reviewed by David Levin. + + Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases + https://bugs.webkit.org/show_bug.cgi?id=35147 + + * Configurations/FeatureDefines.xcconfig: + +2010-02-19 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Maciej Stachowiak. + + https://bugs.webkit.org/show_bug.cgi?id=35132 + <rdar://problem/7664353> Mouse cursor sometimes flickers over Flash content (35132) + + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + (WebNetscapePluginEventHandlerCarbon::mouseMoved): Send adjustCursor events on every mouse + move. This matches Firefox, and is actually required for plug-ins to manipulate cursor wihout + resorting to techniques such as fast firing timers. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView handleMouseEntered:]): Some plug-ins handle mouse cursor internally, + but those that don't just need to get an arrow cursor (matching Firefox). This means that + e.g. a plugin inside <A> won't get a finger mouse pointer. + + * Plugins/WebHostedNetscapePluginView.mm: + (-[WebNetscapePluginView handleMouseEntered:]): + (-[WebNetscapePluginView handleMouseExited:]): + Implement this behavior here, too. Also, out of process code didn't reset mouse pointer on + mouse exit, which it needed to do. + + * WebView/WebHTMLView.mm: + (needsCursorRectsSupportAtPoint): + (setCursor): + (resetCursorRects): + Make sure that the same workaround we have for Web content also applies to Netscape plug-ins, + as AppKit would reset the mouse pointer to arrow if given a chance. + (+[WebHTMLViewPrivate initialize]): Renamed setCursorIMP on Leopard and higher to prevent + confusion - the method we override is completely different. + (-[WebHTMLView hitTest:]): Added a FIXME about a likely bug. + 2010-02-19 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein. diff --git a/WebKit/mac/Configurations/Base.xcconfig b/WebKit/mac/Configurations/Base.xcconfig index eb16d36..7914aed 100644 --- a/WebKit/mac/Configurations/Base.xcconfig +++ b/WebKit/mac/Configurations/Base.xcconfig @@ -53,6 +53,8 @@ REAL_PLATFORM_NAME = $(REAL_PLATFORM_NAME_$(PLATFORM_NAME)); REAL_PLATFORM_NAME_ = $(REAL_PLATFORM_NAME_macosx); REAL_PLATFORM_NAME_macosx = macosx; +TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR); + // DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants. // We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant. @@ -78,6 +80,26 @@ SECTORDER_FLAGS = -sectorder __TEXT __text mac/WebKit.order; // Note that Xcode versions as new as 3.1.2 use XCODE_VERSION_ACTUAL for the minor version // number. Newer versions of Xcode use XCODE_VERSION_MINOR for the minor version, and // XCODE_VERSION_ACTUAL for the full version number. -GCC_VERSION = $(GCC_VERSION_$(XCODE_VERSION_MINOR)); -GCC_VERSION_ = $(GCC_VERSION_$(XCODE_VERSION_ACTUAL)); -GCC_VERSION_0310 = 4.2; +TARGET_GCC_VERSION = $(TARGET_GCC_VERSION_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +TARGET_GCC_VERSION_ = $(TARGET_GCC_VERSION_1040); +TARGET_GCC_VERSION_1040 = GCC_40; +TARGET_GCC_VERSION_1050 = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_MINOR)); +TARGET_GCC_VERSION_1050_ = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_ACTUAL)); +TARGET_GCC_VERSION_1050_0310 = GCC_42; +TARGET_GCC_VERSION_1050_0320 = GCC_42; +TARGET_GCC_VERSION_1060 = GCC_42; +TARGET_GCC_VERSION_1070 = LLVM_GCC_42; + +GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION)); +GCC_VERSION_GCC_40 = 4.0; +GCC_VERSION_GCC_42 = 4.2; +GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42; + +// If the target Mac OS X version does not match the current Mac OS X version then we'll want to build using the target version's SDK. +SDKROOT = $(SDKROOT_$(MAC_OS_X_VERSION_MAJOR)_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +SDKROOT_1050_1040 = macosx10.4; +SDKROOT_1060_1040 = macosx10.4; +SDKROOT_1060_1050 = macosx10.5; +SDKROOT_1070_1040 = macosx10.4; +SDKROOT_1070_1050 = macosx10.5; +SDKROOT_1070_1060 = macosx10.6; diff --git a/WebKit/mac/Configurations/DebugRelease.xcconfig b/WebKit/mac/Configurations/DebugRelease.xcconfig index 11a94ca..77f7893 100644 --- a/WebKit/mac/Configurations/DebugRelease.xcconfig +++ b/WebKit/mac/Configurations/DebugRelease.xcconfig @@ -23,7 +23,7 @@ #include "Base.xcconfig" -ARCHS = $(ARCHS_$(MAC_OS_X_VERSION_MAJOR)); +ARCHS = $(ARCHS_$(TARGET_MAC_OS_X_VERSION_MAJOR)); ARCHS_ = $(ARCHS_1040); ARCHS_1040 = $(NATIVE_ARCH); ARCHS_1050 = $(NATIVE_ARCH); @@ -32,7 +32,7 @@ ARCHS_1070 = $(ARCHS_STANDARD_32_64_BIT); ONLY_ACTIVE_ARCH = YES; -MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(MAC_OS_X_VERSION_MAJOR)); +MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(TARGET_MAC_OS_X_VERSION_MAJOR)); MACOSX_DEPLOYMENT_TARGET_ = 10.4; MACOSX_DEPLOYMENT_TARGET_1040 = 10.4; MACOSX_DEPLOYMENT_TARGET_1050 = 10.5; @@ -43,7 +43,7 @@ GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; SECTORDER_FLAGS = ; -WEBKIT_SYSTEM_INTERFACE_LIBRARY = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_$(MAC_OS_X_VERSION_MAJOR)); +WEBKIT_SYSTEM_INTERFACE_LIBRARY = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_$(TARGET_MAC_OS_X_VERSION_MAJOR)); WEBKIT_SYSTEM_INTERFACE_LIBRARY_ = WebKitSystemInterfaceTiger; WEBKIT_SYSTEM_INTERFACE_LIBRARY_1040 = WebKitSystemInterfaceTiger; WEBKIT_SYSTEM_INTERFACE_LIBRARY_1050 = WebKitSystemInterfaceLeopard; diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig index 8343ce7..881c788 100644 --- a/WebKit/mac/Configurations/FeatureDefines.xcconfig +++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig @@ -31,16 +31,17 @@ // Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature. -ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(MAC_OS_X_VERSION_MAJOR)); +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; ENABLE_3D_CANVAS_1070 = ENABLE_3D_CANVAS; -ENABLE_3D_RENDERING = $(ENABLE_3D_RENDERING_$(MAC_OS_X_VERSION_MAJOR)); +ENABLE_3D_RENDERING = $(ENABLE_3D_RENDERING_$(TARGET_MAC_OS_X_VERSION_MAJOR)); ENABLE_3D_RENDERING_1050 = ENABLE_3D_RENDERING; ENABLE_3D_RENDERING_1060 = ENABLE_3D_RENDERING; ENABLE_3D_RENDERING_1070 = ENABLE_3D_RENDERING; +ENABLE_BLOB_SLICE = ENABLE_BLOB_SLICE; ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING; ENABLE_CLIENT_BASED_GEOLOCATION = ENABLE_CLIENT_BASED_GEOLOCATION; ENABLE_DATABASE = ENABLE_DATABASE; @@ -49,6 +50,8 @@ ENABLE_DATALIST = ENABLE_DATALIST; ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE; ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE; ENABLE_FILTERS = ENABLE_FILTERS; +ENABLE_FILE_READER = ; +ENABLE_FILE_WRITER = ; ENABLE_GEOLOCATION = ENABLE_GEOLOCATION; ENABLE_ICONDATABASE = ENABLE_ICONDATABASE; ENABLE_INDEXED_DATABASE = ; @@ -56,7 +59,9 @@ ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER; ENABLE_MATHML = ; ENABLE_NOTIFICATIONS = ; ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS; +ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG; ENABLE_RUBY = ENABLE_RUBY; +ENABLE_SANDBOX = ENABLE_SANDBOX; ENABLE_SHARED_WORKERS = ENABLE_SHARED_WORKERS; ENABLE_SVG = ENABLE_SVG; ENABLE_SVG_ANIMATION = ENABLE_SVG_ANIMATION; @@ -73,4 +78,4 @@ ENABLE_XHTMLMP = ; ENABLE_XPATH = ENABLE_XPATH; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_RUBY) $(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_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(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_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(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_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig index 0e289b1..6aeb263 100644 --- a/WebKit/mac/Configurations/Version.xcconfig +++ b/WebKit/mac/Configurations/Version.xcconfig @@ -22,7 +22,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. MAJOR_VERSION = 533; -MINOR_VERSION = 1; +MINOR_VERSION = 6; TINY_VERSION = 0; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); @@ -31,7 +31,7 @@ BUNDLE_VERSION = $(BUNDLE_VERSION_$(CONFIGURATION)); SHORT_VERSION_STRING = $(SHORT_VERSION_STRING_$(CONFIGURATION)) // The system version prefix is based on the current system version. -SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(MAC_OS_X_VERSION_MAJOR)); +SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(TARGET_MAC_OS_X_VERSION_MAJOR)); SYSTEM_VERSION_PREFIX_ = 4; // Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR. SYSTEM_VERSION_PREFIX_1040 = 4; SYSTEM_VERSION_PREFIX_1050 = 5; diff --git a/WebKit/mac/ForwardingHeaders/runtime/Error.h b/WebKit/mac/ForwardingHeaders/runtime/Error.h new file mode 100644 index 0000000..05d7752 --- /dev/null +++ b/WebKit/mac/ForwardingHeaders/runtime/Error.h @@ -0,0 +1 @@ +#import <JavaScriptCore/Error.h> diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make index f4bf744..061169e 100644 --- a/WebKit/mac/MigrateHeaders.make +++ b/WebKit/mac/MigrateHeaders.make @@ -291,6 +291,8 @@ all : \ $(INTERNAL_HEADERS_DIR)/DOMSVGFEMergeElementInternal.h \ $(PRIVATE_HEADERS_DIR)/DOMSVGFEMergeNodeElement.h \ $(INTERNAL_HEADERS_DIR)/DOMSVGFEMergeNodeElementInternal.h \ + $(PRIVATE_HEADERS_DIR)/DOMSVGFEMorphologyElement.h \ + $(INTERNAL_HEADERS_DIR)/DOMSVGFEMorphologyElementInternal.h \ $(PRIVATE_HEADERS_DIR)/DOMSVGFEOffsetElement.h \ $(INTERNAL_HEADERS_DIR)/DOMSVGFEOffsetElementInternal.h \ $(PRIVATE_HEADERS_DIR)/DOMSVGFEPointLightElement.h \ diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm index 9e8ae05..1351fe5 100644 --- a/WebKit/mac/Misc/WebCoreStatistics.mm +++ b/WebKit/mac/Misc/WebCoreStatistics.mm @@ -196,10 +196,9 @@ using namespace WebCore; JSLock lock(SilenceAssertionsOnly); Heap::Statistics jsHeapStatistics = JSDOMWindow::commonJSGlobalData()->heap.statistics(); return [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInt:fastMallocStatistics.heapSize], @"FastMallocHeapSize", - [NSNumber numberWithInt:fastMallocStatistics.freeSizeInHeap], @"FastMallocFreeSizeInHeap", - [NSNumber numberWithInt:fastMallocStatistics.freeSizeInCaches], @"FastMallocFreeSizeInCaches", - [NSNumber numberWithInt:fastMallocStatistics.returnedSize], @"FastMallocReturnedSize", + [NSNumber numberWithInt:fastMallocStatistics.reservedVMBytes], @"FastMallocReservedVMBytes", + [NSNumber numberWithInt:fastMallocStatistics.committedVMBytes], @"FastMallocCommittedVMBytes", + [NSNumber numberWithInt:fastMallocStatistics.freeListBytes], @"FastMallocFreeListBytes", [NSNumber numberWithInt:jsHeapStatistics.size], @"JavaScriptHeapSize", [NSNumber numberWithInt:jsHeapStatistics.free], @"JavaScriptFreeSize", nil]; diff --git a/WebKit/mac/Misc/WebDownload.mm b/WebKit/mac/Misc/WebDownload.mm index 01ed767..82c1259 100644 --- a/WebKit/mac/Misc/WebDownload.mm +++ b/WebKit/mac/Misc/WebDownload.mm @@ -56,7 +56,7 @@ using namespace WebCore; directory:(NSString *)directory; @end -@interface WebDownloadInternal : NSObject +@interface WebDownloadInternal : NSObject <NSURLDownloadDelegate> { @public id realDelegate; diff --git a/WebKit/mac/Misc/WebIconDatabase.mm b/WebKit/mac/Misc/WebIconDatabase.mm index 62c8e2f..0ded0d5 100644 --- a/WebKit/mac/Misc/WebIconDatabase.mm +++ b/WebKit/mac/Misc/WebIconDatabase.mm @@ -40,6 +40,7 @@ #import <WebCore/IconDatabase.h> #import <WebCore/Image.h> #import <WebCore/IntSize.h> +#import <WebCore/SharedBuffer.h> #import <WebCore/ThreadCheck.h> using namespace WebCore; diff --git a/WebKit/mac/Misc/WebNSFileManagerExtras.h b/WebKit/mac/Misc/WebNSFileManagerExtras.h index c2287f9..dcf62d0 100644 --- a/WebKit/mac/Misc/WebNSFileManagerExtras.h +++ b/WebKit/mac/Misc/WebNSFileManagerExtras.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2005, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,19 +28,10 @@ #import <Foundation/Foundation.h> -#define WEB_UREAD (00400) /* Read by owner */ -#define WEB_UWRITE (00200) /* Write by owner */ -#define WEB_UEXEC (00100) /* Execute/Search by owner */ - @interface NSFileManager (WebNSFileManagerExtras) - -- (void)_webkit_backgroundRemoveFileAtPath:(NSString *)path; -- (void)_webkit_backgroundRemoveLeftoverFiles:(NSString *)path; -- (BOOL)_webkit_removeFileOnlyAtPath:(NSString *)path; - (void)_webkit_setMetadataURL:(NSString *)URLString referrer:(NSString *)referrer atPath:(NSString *)path; - (NSString *)_webkit_startupVolumeName; - (NSString *)_webkit_pathWithUniqueFilenameForPath:(NSString *)path; - @end diff --git a/WebKit/mac/Misc/WebNSFileManagerExtras.m b/WebKit/mac/Misc/WebNSFileManagerExtras.m index fb1286f..f10781b 100644 --- a/WebKit/mac/Misc/WebNSFileManagerExtras.m +++ b/WebKit/mac/Misc/WebNSFileManagerExtras.m @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,74 +30,13 @@ #import "WebKitNSStringExtras.h" #import "WebNSURLExtras.h" +#import <JavaScriptCore/Assertions.h> #import <WebCore/FoundationExtras.h> #import <WebKitSystemInterface.h> -#import <pthread.h> -#import <sys/mount.h> -#import <JavaScriptCore/Assertions.h> +#import <sys/stat.h> @implementation NSFileManager (WebNSFileManagerExtras) -- (BOOL)_webkit_removeFileOnlyAtPath:(NSString *)path -{ - struct statfs buf; - BOOL result = unlink([path fileSystemRepresentation]) == 0; - - // For mysterious reasons, MNT_DOVOLFS is the flag for "supports resource fork" - if ((statfs([path fileSystemRepresentation], &buf) == 0) && !(buf.f_flags & MNT_DOVOLFS)) { - NSString *lastPathComponent = [path lastPathComponent]; - if ([lastPathComponent length] != 0 && ![lastPathComponent isEqualToString:@"/"]) { - NSString *resourcePath = [[path stringByDeletingLastPathComponent] stringByAppendingString:[@"._" stringByAppendingString:lastPathComponent]]; - if (unlink([resourcePath fileSystemRepresentation]) != 0) { - result = NO; - } - } - } - - return result; -} - -- (void)_webkit_backgroundRemoveFileAtPath:(NSString *)path -{ - NSFileManager *manager; - NSString *moveToSubpath; - NSString *moveToPath; - int i; - - manager = [NSFileManager defaultManager]; - - i = 0; - moveToSubpath = [path stringByDeletingLastPathComponent]; - do { - moveToPath = [NSString stringWithFormat:@"%@/.tmp%d", moveToSubpath, i]; - i++; - } while ([manager fileExistsAtPath:moveToPath]); - - if ([manager moveItemAtPath:path toPath:moveToPath error:NULL]) - [NSThread detachNewThreadSelector:@selector(_performRemoveFileAtPath:) toTarget:self withObject:moveToPath]; -} - -- (void)_webkit_backgroundRemoveLeftoverFiles:(NSString *)path -{ - NSFileManager *manager; - NSString *leftoverSubpath; - NSString *leftoverPath; - int i; - - manager = [NSFileManager defaultManager]; - leftoverSubpath = [path stringByDeletingLastPathComponent]; - - i = 0; - while (1) { - leftoverPath = [NSString stringWithFormat:@"%@/.tmp%d", leftoverSubpath, i]; - if (![manager fileExistsAtPath:leftoverPath]) { - break; - } - [NSThread detachNewThreadSelector:@selector(_performRemoveFileAtPath:) toTarget:self withObject:leftoverPath]; - i++; - } -} - - (NSString *)_webkit_carbonPathForPath:(NSString *)posixPath { OSStatus error; @@ -199,14 +138,22 @@ static void *setMetaData(void* context) return [path substringToIndex:[path length]-1]; } +// -[NSFileManager fileExistsAtPath:] returns NO if there is a broken symlink at the path. +// So we use this function instead, which returns YES if there is anything there, including +// a broken symlink. +static BOOL fileExists(NSString *path) +{ + struct stat statBuffer; + return !lstat([path fileSystemRepresentation], &statBuffer); +} + - (NSString *)_webkit_pathWithUniqueFilenameForPath:(NSString *)path { // "Fix" the filename of the path. NSString *filename = [[path lastPathComponent] _webkit_filenameByFixingIllegalCharacters]; path = [[path stringByDeletingLastPathComponent] stringByAppendingPathComponent:filename]; - NSFileManager *fileManager = [NSFileManager defaultManager]; - if ([fileManager fileExistsAtPath:path]) { + if (fileExists(path)) { // Don't overwrite existing file by appending "-n", "-n.ext" or "-n.ext.ext" to the filename. NSString *extensions = nil; NSString *pathWithoutExtensions; @@ -221,15 +168,11 @@ static void *setMetaData(void* context) pathWithoutExtensions = [[path stringByDeletingLastPathComponent] stringByAppendingPathComponent:lastPathComponent]; } - NSString *pathWithAppendedNumber; - unsigned i; - - for (i = 1; 1; i++) { - pathWithAppendedNumber = [NSString stringWithFormat:@"%@-%d", pathWithoutExtensions, i]; + for (unsigned i = 1; ; i++) { + NSString *pathWithAppendedNumber = [NSString stringWithFormat:@"%@-%d", pathWithoutExtensions, i]; path = [extensions length] ? [pathWithAppendedNumber stringByAppendingPathExtension:extensions] : pathWithAppendedNumber; - if (![fileManager fileExistsAtPath:path]) { + if (!fileExists(path)) break; - } } } @@ -238,8 +181,8 @@ static void *setMetaData(void* context) @end - #ifdef BUILDING_ON_TIGER + @implementation NSFileManager (WebNSFileManagerTigerForwardCompatibility) - (NSArray *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error @@ -293,4 +236,5 @@ static void *setMetaData(void* context) } @end + #endif diff --git a/WebKit/mac/Misc/WebNSPasteboardExtras.mm b/WebKit/mac/Misc/WebNSPasteboardExtras.mm index 3cc1c7c..8cebeb6 100644 --- a/WebKit/mac/Misc/WebNSPasteboardExtras.mm +++ b/WebKit/mac/Misc/WebNSPasteboardExtras.mm @@ -37,14 +37,15 @@ #import "WebURLsWithTitles.h" #import "WebViewPrivate.h" #import <WebCore/Element.h> +#import <WebCore/Image.h> #import <WebCore/MIMETypeRegistry.h> #import <WebCore/RenderImage.h> #import <WebKit/DOMExtensions.h> #import <WebKit/DOMPrivate.h> +#import <WebKitSystemInterface.h> #import <wtf/Assertions.h> -#import <wtf/StdLibExtras.h> #import <wtf/RetainPtr.h> -#import <WebKitSystemInterface.h> +#import <wtf/StdLibExtras.h> @interface NSFilePromiseDragSource : NSObject - initWithSource:(id)draggingSource; diff --git a/WebKit/mac/Misc/WebNSPrintOperationExtras.h b/WebKit/mac/Misc/WebNSPrintOperationExtras.h index 44eb3df..3535369 100644 --- a/WebKit/mac/Misc/WebNSPrintOperationExtras.h +++ b/WebKit/mac/Misc/WebNSPrintOperationExtras.h @@ -31,5 +31,7 @@ @interface NSPrintOperation (WebKitExtras) - (float)_web_pageSetupScaleFactor; +- (float)_web_availablePaperWidth; +- (float)_web_availablePaperHeight; @end diff --git a/WebKit/mac/Misc/WebNSPrintOperationExtras.m b/WebKit/mac/Misc/WebNSPrintOperationExtras.m index 4c45f17..0982b96 100644 --- a/WebKit/mac/Misc/WebNSPrintOperationExtras.m +++ b/WebKit/mac/Misc/WebNSPrintOperationExtras.m @@ -35,4 +35,16 @@ return [[[[self printInfo] dictionary] objectForKey:NSPrintScalingFactor] floatValue]; } +- (float)_web_availablePaperWidth +{ + NSPrintInfo *printInfo = [self printInfo]; + return [printInfo paperSize].width - [printInfo leftMargin] - [printInfo rightMargin]; +} + +- (float)_web_availablePaperHeight +{ + NSPrintInfo *printInfo = [self printInfo]; + return [printInfo paperSize].height - [printInfo topMargin] - [printInfo bottomMargin]; +} + @end diff --git a/WebKit/mac/Misc/WebUserContentURLPattern.h b/WebKit/mac/Misc/WebUserContentURLPattern.h new file mode 100644 index 0000000..6ec4bcf --- /dev/null +++ b/WebKit/mac/Misc/WebUserContentURLPattern.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +@class WebUserContentURLPatternPrivate; + +@interface WebUserContentURLPattern : NSObject { + WebUserContentURLPatternPrivate *_private; +} + +- (id)initWithPatternString:(NSString *)patternString; + +- (BOOL)isValid; +- (NSString *)scheme; +- (NSString *)host; +- (BOOL)matchesSubdomains; + +@end diff --git a/WebKit/mac/Misc/WebUserContentURLPattern.mm b/WebKit/mac/Misc/WebUserContentURLPattern.mm new file mode 100644 index 0000000..5d9f49e --- /dev/null +++ b/WebKit/mac/Misc/WebUserContentURLPattern.mm @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "WebUserContentURLPattern.h" + +#import <WebCore/UserContentURLPattern.h> + +using namespace WebCore; + +@interface WebUserContentURLPatternPrivate : NSObject +{ +@public + UserContentURLPattern pattern; +} +@end + +@implementation WebUserContentURLPatternPrivate +@end + +@implementation WebUserContentURLPattern + +- (id)initWithPatternString:(NSString *)patternString +{ + self = [super init]; + if (!self) + return nil; + + _private = [[WebUserContentURLPatternPrivate alloc] init]; + _private->pattern = UserContentURLPattern(patternString); + + return self; +} + +- (void)dealloc +{ + [_private release]; + _private = nil; + + [super dealloc]; +} + +- (BOOL)isValid +{ + return _private->pattern.isValid(); +} + +- (NSString *)scheme +{ + return _private->pattern.scheme(); +} + +- (NSString *)host +{ + return _private->pattern.host(); +} + +- (BOOL)matchesSubdomains +{ + return _private->pattern.matchSubdomains(); +} + +@end diff --git a/WebKit/mac/Panels/WebAuthenticationPanel.m b/WebKit/mac/Panels/WebAuthenticationPanel.m index f207d0c..c9442da 100644 --- a/WebKit/mac/Panels/WebAuthenticationPanel.m +++ b/WebKit/mac/Panels/WebAuthenticationPanel.m @@ -218,7 +218,9 @@ - (void)runAsModalDialogWithChallenge:(NSURLAuthenticationChallenge *)chall { [self setUpForChallenge:chall]; + usingSheet = FALSE; + [chall retain]; NSURLCredential *credential = nil; if ([[NSApplication sharedApplication] runModalForWindow:panel] == 0) { @@ -227,6 +229,7 @@ [callback performSelector:selector withObject:chall withObject:credential]; [credential release]; + [chall release]; } - (void)runAsSheetOnWindow:(NSWindow *)window withChallenge:(NSURLAuthenticationChallenge *)chall diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h index cd3729f..d35503f 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h @@ -43,8 +43,8 @@ class NetscapePluginHostProxy { public: NetscapePluginHostProxy(mach_port_t clientPort, mach_port_t pluginHostPort, const ProcessSerialNumber& pluginHostPSN, bool shouldCacheMissingPropertiesAndMethods); - mach_port_t port() const { return m_pluginHostPort; } - mach_port_t clientPort() const { return m_clientPort; } + mach_port_t port() const { ASSERT(fastMallocSize(this)); return m_pluginHostPort; } + mach_port_t clientPort() const { ASSERT(fastMallocSize(this)); return m_clientPort; } void addPluginInstance(NetscapePluginInstanceProxy*); void removePluginInstance(NetscapePluginInstanceProxy*); @@ -54,15 +54,15 @@ public: bool isMenuBarVisible() const { return m_menuBarIsVisible; } void setMenuBarVisible(bool); - bool isFullScreenWindowShowing() const { return m_fullScreenWindowIsShowing; } - void setFullScreenWindowIsShowing(bool); + bool isFullscreenWindowShowing() const { return m_fullscreenWindowIsShowing; } + void setFullscreenWindowIsShowing(bool); void setModal(bool); void applicationDidBecomeActive(); bool processRequests(); - bool isProcessingRequests() const { return m_processingRequests; } + static bool isProcessingRequests() { return s_processingRequests; } bool shouldCacheMissingPropertiesAndMethods() const { return m_shouldCacheMissingPropertiesAndMethods; } @@ -73,8 +73,8 @@ private: void beginModal(); void endModal(); - void didEnterFullScreen() const; - void didExitFullScreen() const; + void didEnterFullscreen() const; + void didExitFullscreen() const; static void deadNameNotificationCallback(CFMachPortRef, void *msg, CFIndex size, void *info); @@ -96,10 +96,10 @@ private: RetainPtr<WebPlaceholderModalWindow *> m_placeholderWindow; unsigned m_isModal; bool m_menuBarIsVisible; - bool m_fullScreenWindowIsShowing; + bool m_fullscreenWindowIsShowing; const ProcessSerialNumber m_pluginHostPSN; - unsigned m_processingRequests; + static unsigned s_processingRequests; bool m_shouldCacheMissingPropertiesAndMethods; }; diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm index 836277c..b437012 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm @@ -89,15 +89,16 @@ static PluginProxyMap& pluginProxyMap() return pluginProxyMap; } +unsigned NetscapePluginHostProxy::s_processingRequests; + NetscapePluginHostProxy::NetscapePluginHostProxy(mach_port_t clientPort, mach_port_t pluginHostPort, const ProcessSerialNumber& pluginHostPSN, bool shouldCacheMissingPropertiesAndMethods) : m_clientPort(clientPort) , m_portSet(MACH_PORT_NULL) , m_pluginHostPort(pluginHostPort) , m_isModal(false) , m_menuBarIsVisible(true) - , m_fullScreenWindowIsShowing(false) + , m_fullscreenWindowIsShowing(false) , m_pluginHostPSN(pluginHostPSN) - , m_processingRequests(0) , m_shouldCacheMissingPropertiesAndMethods(shouldCacheMissingPropertiesAndMethods) { pluginProxyMap().add(m_clientPort, this); @@ -184,7 +185,9 @@ void NetscapePluginHostProxy::removePluginInstance(NetscapePluginInstanceProxy* NetscapePluginInstanceProxy* NetscapePluginHostProxy::pluginInstance(uint32_t pluginID) { - return m_instances.get(pluginID).get(); + NetscapePluginInstanceProxy* result = m_instances.get(pluginID).get(); + ASSERT(!result || result->hostProxy() == this); + return result; } void NetscapePluginHostProxy::deadNameNotificationCallback(CFMachPortRef port, void *msg, CFIndex size, void *info) @@ -202,12 +205,12 @@ void NetscapePluginHostProxy::setMenuBarVisible(bool visible) [NSMenu setMenuBarVisible:visible]; } -void NetscapePluginHostProxy::didEnterFullScreen() const +void NetscapePluginHostProxy::didEnterFullscreen() const { SetFrontProcess(&m_pluginHostPSN); } -void NetscapePluginHostProxy::didExitFullScreen() const +void NetscapePluginHostProxy::didExitFullscreen() const { // If the plug-in host is the current application then we should bring ourselves to the front when it exits full-screen mode. @@ -223,16 +226,16 @@ void NetscapePluginHostProxy::didExitFullScreen() const SetFrontProcess(¤tProcess); } -void NetscapePluginHostProxy::setFullScreenWindowIsShowing(bool isShowing) +void NetscapePluginHostProxy::setFullscreenWindowIsShowing(bool isShowing) { - if (m_fullScreenWindowIsShowing == isShowing) + if (m_fullscreenWindowIsShowing == isShowing) return; - m_fullScreenWindowIsShowing = isShowing; - if (m_fullScreenWindowIsShowing) - didEnterFullScreen(); + m_fullscreenWindowIsShowing = isShowing; + if (m_fullscreenWindowIsShowing) + didEnterFullscreen(); else - didExitFullScreen(); + didExitFullscreen(); } @@ -294,7 +297,7 @@ void NetscapePluginHostProxy::setModal(bool modal) bool NetscapePluginHostProxy::processRequests() { - m_processingRequests++; + s_processingRequests++; if (!m_portSet) { mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_PORT_SET, &m_portSet); @@ -310,7 +313,7 @@ bool NetscapePluginHostProxy::processRequests() if (kr != KERN_SUCCESS) { LOG_ERROR("Could not receive mach message, error %x", kr); - m_processingRequests--; + s_processingRequests--; return false; } @@ -323,24 +326,24 @@ bool NetscapePluginHostProxy::processRequests() if (kr != KERN_SUCCESS) { LOG_ERROR("Could not send mach message, error %x", kr); - m_processingRequests--; + s_processingRequests--; return false; } } - m_processingRequests--; + s_processingRequests--; return true; } if (msg->msgh_local_port == CFMachPortGetPort(m_deadNameNotificationPort.get())) { ASSERT(msg->msgh_id == MACH_NOTIFY_DEAD_NAME); pluginHostDied(); - m_processingRequests--; + s_processingRequests--; return false; } ASSERT_NOT_REACHED(); - m_processingRequests--; + s_processingRequests--; return false; } @@ -437,7 +440,7 @@ kern_return_t WKPCInvalidateRect(mach_port_t clientPort, uint32_t pluginID, doub if (NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID)) instanceProxy->invalidateRect(x, y, width, height); return KERN_SUCCESS; - } + } // Defer the work CFRunLoopPerformBlock(CFRunLoopGetMain(), kCFRunLoopDefaultMode, ^{ @@ -578,7 +581,11 @@ kern_return_t WKPCEvaluate(mach_port_t clientPort, uint32_t pluginID, uint32_t r data_t resultData = 0; mach_msg_type_number_t resultLength = 0; boolean_t returnValue = instanceProxy->evaluate(objectID, script, resultData, resultLength, allowPopups); - + + hostProxy = instanceProxy->hostProxy(); + if (!hostProxy) + return KERN_FAILURE; + _WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength); if (resultData) mig_deallocate(reinterpret_cast<vm_address_t>(resultData), resultLength); @@ -610,7 +617,7 @@ static Identifier identifierFromIdentifierRep(IdentifierRep* identifier) ASSERT(identifier->isString()); const char* str = identifier->string(); - return Identifier(JSDOMWindow::commonJSGlobalData(), String::fromUTF8WithLatin1Fallback(str, strlen(str))); + return Identifier(JSDOMWindow::commonJSGlobalData(), stringToUString(String::fromUTF8WithLatin1Fallback(str, strlen(str)))); } kern_return_t WKPCInvoke(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, uint32_t objectID, uint64_t serverIdentifier, @@ -637,7 +644,11 @@ kern_return_t WKPCInvoke(mach_port_t clientPort, uint32_t pluginID, uint32_t req data_t resultData = 0; mach_msg_type_number_t resultLength = 0; boolean_t returnValue = instanceProxy->invoke(objectID, methodNameIdentifier, argumentsData, argumentsLength, resultData, resultLength); - + + hostProxy = instanceProxy->hostProxy(); + if (!hostProxy) + return KERN_FAILURE; + _WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength); if (resultData) mig_deallocate(reinterpret_cast<vm_address_t>(resultData), resultLength); @@ -663,7 +674,11 @@ kern_return_t WKPCInvokeDefault(mach_port_t clientPort, uint32_t pluginID, uint3 data_t resultData = 0; mach_msg_type_number_t resultLength = 0; boolean_t returnValue = instanceProxy->invokeDefault(objectID, argumentsData, argumentsLength, resultData, resultLength); - + + hostProxy = instanceProxy->hostProxy(); + if (!hostProxy) + return KERN_FAILURE; + _WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength); if (resultData) mig_deallocate(reinterpret_cast<vm_address_t>(resultData), resultLength); @@ -701,7 +716,7 @@ kern_return_t WKPCGetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_ NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID); if (!instanceProxy) return KERN_FAILURE; - + IdentifierRep* identifier = reinterpret_cast<IdentifierRep*>(serverIdentifier); if (!IdentifierRep::isValid(identifier)) return KERN_FAILURE; @@ -717,7 +732,11 @@ kern_return_t WKPCGetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_ returnValue = instanceProxy->getProperty(objectID, propertyNameIdentifier, resultData, resultLength); } else returnValue = instanceProxy->setProperty(objectID, identifier->number(), resultData, resultLength); - + + hostProxy = instanceProxy->hostProxy(); + if (!hostProxy) + return KERN_FAILURE; + _WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength); if (resultData) mig_deallocate(reinterpret_cast<vm_address_t>(resultData), resultLength); @@ -750,6 +769,10 @@ kern_return_t WKPCSetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_ } else result = instanceProxy->setProperty(objectID, identifier->number(), valueData, valueLength); + hostProxy = instanceProxy->hostProxy(); + if (!hostProxy) + return KERN_FAILURE; + _WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, result); return KERN_SUCCESS; @@ -778,6 +801,10 @@ kern_return_t WKPCRemoveProperty(mach_port_t clientPort, uint32_t pluginID, uint } else result = instanceProxy->removeProperty(objectID, identifier->number()); + hostProxy = instanceProxy->hostProxy(); + if (!hostProxy) + return KERN_FAILURE; + _WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, result); return KERN_SUCCESS; @@ -805,7 +832,11 @@ kern_return_t WKPCHasProperty(mach_port_t clientPort, uint32_t pluginID, uint32_ returnValue = instanceProxy->hasProperty(objectID, propertyNameIdentifier); } else returnValue = instanceProxy->hasProperty(objectID, identifier->number()); - + + hostProxy = instanceProxy->hostProxy(); + if (!hostProxy) + return KERN_FAILURE; + _WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue); return KERN_SUCCESS; @@ -830,6 +861,10 @@ kern_return_t WKPCHasMethod(mach_port_t clientPort, uint32_t pluginID, uint32_t Identifier methodNameIdentifier = identifierFromIdentifierRep(identifier); boolean_t returnValue = instanceProxy->hasMethod(objectID, methodNameIdentifier); + hostProxy = instanceProxy->hostProxy(); + if (!hostProxy) + return KERN_FAILURE; + _WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue); return KERN_SUCCESS; @@ -872,7 +907,11 @@ kern_return_t WKPCEnumerate(mach_port_t clientPort, uint32_t pluginID, uint32_t data_t resultData = 0; mach_msg_type_number_t resultLength = 0; boolean_t returnValue = instanceProxy->enumerate(objectID, resultData, resultLength); - + + hostProxy = instanceProxy->hostProxy(); + if (!hostProxy) + return KERN_FAILURE; + _WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, returnValue, resultData, resultLength); if (resultData) @@ -892,13 +931,13 @@ kern_return_t WKPCSetMenuBarVisible(mach_port_t clientPort, boolean_t menuBarVis return KERN_SUCCESS; } -kern_return_t WKPCSetFullScreenWindowIsShowing(mach_port_t clientPort, boolean_t fullScreenWindowIsShowing) +kern_return_t WKPCSetFullscreenWindowIsShowing(mach_port_t clientPort, boolean_t fullscreenWindowIsShowing) { NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort); if (!hostProxy) return KERN_FAILURE; - hostProxy->setFullScreenWindowIsShowing(fullScreenWindowIsShowing); + hostProxy->setFullscreenWindowIsShowing(fullscreenWindowIsShowing); return KERN_SUCCESS; } @@ -908,9 +947,18 @@ kern_return_t WKPCSetModal(mach_port_t clientPort, boolean_t modal) NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort); if (!hostProxy) return KERN_FAILURE; - - hostProxy->setModal(modal); - + + if (!hostProxy->isProcessingRequests()) { + hostProxy->setModal(modal); + return KERN_SUCCESS; + } + + // Defer the work + CFRunLoopPerformBlock(CFRunLoopGetMain(), kCFRunLoopDefaultMode, ^{ + if (NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort)) + hostProxy->setModal(modal); + }); + return KERN_SUCCESS; } @@ -1090,7 +1138,7 @@ kern_return_t WKPCRunSyncOpenPanel(mach_port_t clientPort, data_t panelData, mac NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort); if (!hostProxy) return KERN_FAILURE; - + NSOpenPanel *sheet = [NSOpenPanel openPanel]; NSDictionary *panelState = [NSPropertyListSerialization propertyListFromData:[NSData dataWithBytes:panelData length:panelDataLength] mutabilityOption:NSPropertyListImmutable @@ -1114,7 +1162,11 @@ kern_return_t WKPCRunSyncOpenPanel(mach_port_t clientPort, data_t panelData, mac [sheet setRequiredFileType:[panelState objectForKey:@"requiredFileType"]]; [sheet setTitle:[panelState objectForKey:@"title"]]; [sheet runModal]; - + + NetscapePluginHostProxy* newHostProxy = pluginProxyMap().get(clientPort); + if (newHostProxy != hostProxy) + return KERN_FAILURE; + NSDictionary *ret = [NSDictionary dictionaryWithObjectsAndKeys: [sheet filenames], @"filenames", WKNoteOpenPanelFiles([sheet filenames]), @"extensions", diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h index 29a5a2d..593d336 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h @@ -72,14 +72,14 @@ public: return m_pluginID; } - uint32_t renderContextID() const { return m_renderContextID; } + uint32_t renderContextID() const { ASSERT(fastMallocSize(this)); return m_renderContextID; } void setRenderContextID(uint32_t renderContextID) { m_renderContextID = renderContextID; } bool useSoftwareRenderer() const { return m_useSoftwareRenderer; } void setUseSoftwareRenderer(bool useSoftwareRenderer) { m_useSoftwareRenderer = useSoftwareRenderer; } - WebHostedNetscapePluginView *pluginView() const { return m_pluginView; } - NetscapePluginHostProxy* hostProxy() const { return m_pluginHostProxy; } + WebHostedNetscapePluginView *pluginView() const { ASSERT(fastMallocSize(this)); return m_pluginView; } + NetscapePluginHostProxy* hostProxy() const { ASSERT(fastMallocSize(this)); return m_pluginHostProxy; } bool cancelStreamLoad(uint32_t streamID, NPReason); void disconnectStream(HostedNetscapePluginStream*); @@ -89,7 +89,7 @@ public: void pluginHostDied(); - void resize(NSRect size, NSRect clipRect, bool sync); + void resize(NSRect size, NSRect clipRect); void destroy(); void focusChanged(bool hasFocus); void windowFocusChanged(bool hasFocus); @@ -102,6 +102,7 @@ public: void syntheticKeyDownWithCommandModifier(int keyCode, char character); void flagsChanged(NSEvent *); void print(CGContextRef, unsigned width, unsigned height); + void snapshot(CGContextRef, unsigned width, unsigned height); void startTimers(bool throttleTimers); void stopTimers(); @@ -256,8 +257,9 @@ public: template <typename T> std::auto_ptr<T> waitForReply(uint32_t requestID) { + RefPtr<NetscapePluginInstanceProxy> protect(this); // Plug-in host may crash while we are waiting for reply, releasing all instances to the instance proxy. + willCallPluginFunction(); - m_waitingForReply = true; Reply* reply = processRequestsAndWaitForReply(requestID); diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm index 515f9f7..f027534 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm @@ -30,6 +30,7 @@ #import "HostedNetscapePluginStream.h" #import "NetscapePluginHostProxy.h" #import "ProxyInstance.h" +#import "ProxyRuntimeObject.h" #import "WebDataSourceInternal.h" #import "WebFrameInternal.h" #import "WebHostedNetscapePluginView.h" @@ -43,7 +44,6 @@ #import <JavaScriptCore/Error.h> #import <JavaScriptCore/JSLock.h> #import <JavaScriptCore/PropertyNameArray.h> -#import <WebCore/CString.h> #import <WebCore/CookieJar.h> #import <WebCore/DocumentLoader.h> #import <WebCore/Frame.h> @@ -60,6 +60,7 @@ #import <mach/mach.h> #import <utility> #import <wtf/RefCountedLeakCounter.h> +#import <wtf/text/CString.h> extern "C" { #import "WebKitPluginClientServer.h" @@ -116,6 +117,9 @@ inline bool NetscapePluginInstanceProxy::LocalObjectMap::contains(uint32_t objec inline JSC::JSObject* NetscapePluginInstanceProxy::LocalObjectMap::get(uint32_t objectID) const { + if (objectID == HashTraits<uint32_t>::emptyValue() || HashTraits<uint32_t>::isDeletedValue(objectID)) + return 0; + return m_idToJSObjectMap.get(objectID); } @@ -178,8 +182,16 @@ void NetscapePluginInstanceProxy::LocalObjectMap::clear() bool NetscapePluginInstanceProxy::LocalObjectMap::forget(uint32_t objectID) { + if (objectID == HashTraits<uint32_t>::emptyValue() || HashTraits<uint32_t>::isDeletedValue(objectID)) { + LOG_ERROR("NetscapePluginInstanceProxy::LocalObjectMap::forget: local object id %u is not valid.", objectID); + return true; + } + HashMap<uint32_t, JSC::ProtectedPtr<JSC::JSObject> >::iterator iter = m_idToJSObjectMap.find(objectID); - ASSERT(iter != m_idToJSObjectMap.end()); + if (iter == m_idToJSObjectMap.end()) { + LOG_ERROR("NetscapePluginInstanceProxy::LocalObjectMap::forget: local object %u doesn't exist.", objectID); + return true; + } HashMap<JSC::JSObject*, pair<uint32_t, uint32_t> >::iterator rIter = m_jsObjectToIDMap.find(iter->second.get()); @@ -245,19 +257,17 @@ NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy() #endif } -void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect, bool sync) +void NetscapePluginInstanceProxy::resize(NSRect size, NSRect clipRect) { uint32_t requestID = 0; - if (sync) - requestID = nextRequestID(); + requestID = nextRequestID(); _WKPHResizePluginInstance(m_pluginHostProxy->port(), m_pluginID, requestID, size.origin.x, size.origin.y, size.size.width, size.size.height, clipRect.origin.x, clipRect.origin.y, clipRect.size.width, clipRect.size.height); - if (sync) - waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); + waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); } void NetscapePluginInstanceProxy::stopAllStreams() @@ -464,9 +474,6 @@ bool NetscapePluginInstanceProxy::wheelEvent(NSView *pluginView, NSEvent *event) pluginPoint.x, pluginPoint.y, [event buttonNumber], [event deltaX], [event deltaY], [event deltaZ]); - // Protect ourselves in case waiting for the reply causes us to be deleted. - RefPtr<NetscapePluginInstanceProxy> protect(this); - auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); if (!reply.get() || !reply->m_result) return false; @@ -497,6 +504,22 @@ void NetscapePluginInstanceProxy::print(CGContextRef context, unsigned width, un CGContextRestoreGState(context); } +void NetscapePluginInstanceProxy::snapshot(CGContextRef context, unsigned width, unsigned height) +{ + uint32_t requestID = nextRequestID(); + _WKPHPluginInstanceSnapshot(m_pluginHostProxy->port(), m_pluginID, requestID, width, height); + + auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); + if (!reply.get() || !reply->m_returnValue) + return; + + RetainPtr<CGDataProvider> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(reply->m_result.get())); + RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB()); + RetainPtr<CGImageRef> image(AdoptCF, CGImageCreate(width, height, 8, 32, width * 4, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, dataProvider.get(), 0, false, kCGRenderingIntentDefault)); + + CGContextDrawImage(context, CGRectMake(0, 0, width, height), image.get()); +} + void NetscapePluginInstanceProxy::stopTimers() { _WKPHPluginInstanceStopTimers(m_pluginHostProxy->port(), m_pluginID); @@ -765,10 +788,16 @@ NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const ch NetscapePluginInstanceProxy::Reply* NetscapePluginInstanceProxy::processRequestsAndWaitForReply(uint32_t requestID) { Reply* reply = 0; - + + ASSERT(m_pluginHostProxy); while (!(reply = m_replies.take(requestID))) { if (!m_pluginHostProxy->processRequests()) return 0; + + // The host proxy can be destroyed while executing a nested processRequests() call, in which case it's normal + // to get a success result, but be unable to keep looping. + if (!m_pluginHostProxy) + return 0; } ASSERT(reply); @@ -782,7 +811,7 @@ bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID) if (!frame) return false; - if (!frame->script()->canExecuteScripts()) + if (!frame->script()->canExecuteScripts(NotAboutToExecuteScript)) objectID = 0; else objectID = m_localObjects.idForObject(frame->script()->windowShell(pluginWorld())->window()); @@ -814,8 +843,10 @@ bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& scri resultData = 0; resultLength = 0; - if (!m_localObjects.contains(objectID)) + if (!m_localObjects.contains(objectID)) { + LOG_ERROR("NetscapePluginInstanceProxy::evaluate: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -857,8 +888,10 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::invoke: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -891,8 +924,10 @@ bool NetscapePluginInstanceProxy::invokeDefault(uint32_t objectID, data_t argume return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::invokeDefault: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -924,8 +959,10 @@ bool NetscapePluginInstanceProxy::construct(uint32_t objectID, data_t argumentsD return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::construct: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -958,8 +995,10 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, const Identifie return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::getProperty: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -977,8 +1016,10 @@ bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, const Identifie bool NetscapePluginInstanceProxy::getProperty(uint32_t objectID, unsigned propertyName, data_t& resultData, mach_msg_type_number_t& resultLength) { JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::getProperty: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -999,8 +1040,10 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, const Identifie return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::setProperty: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -1023,8 +1066,10 @@ bool NetscapePluginInstanceProxy::setProperty(uint32_t objectID, unsigned proper return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::setProperty: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -1046,8 +1091,10 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, const Identi return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::removeProperty: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -1071,8 +1118,10 @@ bool NetscapePluginInstanceProxy::removeProperty(uint32_t objectID, unsigned pro return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::removeProperty: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -1096,8 +1145,10 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, const Identifie return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::hasProperty: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -1116,8 +1167,10 @@ bool NetscapePluginInstanceProxy::hasProperty(uint32_t objectID, unsigned proper return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::hasProperty: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -1136,8 +1189,10 @@ bool NetscapePluginInstanceProxy::hasMethod(uint32_t objectID, const Identifier& return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::hasMethod: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -1156,8 +1211,10 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat return false; JSObject* object = m_localObjects.get(objectID); - if (!object) + if (!object) { + LOG_ERROR("NetscapePluginInstanceProxy::enumerate: local object %u doesn't exist.", objectID); return false; + } Frame* frame = core([m_pluginView webFrame]); if (!frame) @@ -1171,7 +1228,7 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat RetainPtr<NSMutableArray*> array(AdoptNS, [[NSMutableArray alloc] init]); for (unsigned i = 0; i < propertyNames.size(); i++) { - uint64_t methodName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(propertyNames[i].ustring().UTF8String().c_str())); + uint64_t methodName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(propertyNames[i].ustring().UTF8String().data())); [array.get() addObject:[NSNumber numberWithLongLong:methodName]]; } @@ -1195,7 +1252,7 @@ void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecSta if (value.isString()) { [array addObject:[NSNumber numberWithInt:StringValueType]]; - [array addObject:String(value.toString(exec))]; + [array addObject:ustringToString(value.toString(exec))]; } else if (value.isNumber()) { [array addObject:[NSNumber numberWithInt:DoubleValueType]]; [array addObject:[NSNumber numberWithDouble:value.toNumber(exec)]]; @@ -1206,9 +1263,9 @@ void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecSta [array addObject:[NSNumber numberWithInt:NullValueType]]; else if (value.isObject()) { JSObject* object = asObject(value); - if (object->classInfo() == &RuntimeObjectImp::s_info) { - RuntimeObjectImp* imp = static_cast<RuntimeObjectImp*>(object); - if (ProxyInstance* instance = static_cast<ProxyInstance*>(imp->getInternalInstance())) { + if (object->classInfo() == &ProxyRuntimeObject::s_info) { + ProxyRuntimeObject* runtimeObject = static_cast<ProxyRuntimeObject*>(object); + if (ProxyInstance* instance = runtimeObject->getInternalProxyInstance()) { [array addObject:[NSNumber numberWithInt:NPObjectValueType]]; [array addObject:[NSNumber numberWithInt:instance->objectID()]]; } @@ -1287,7 +1344,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr if (!frame) return false; - if (!frame->script()->canExecuteScripts()) + if (!frame->script()->canExecuteScripts(NotAboutToExecuteScript)) return false; RefPtr<RootObject> rootObject = frame->script()->createRootObject(m_pluginView); @@ -1335,26 +1392,18 @@ void NetscapePluginInstanceProxy::demarshalValues(ExecState* exec, data_t values void NetscapePluginInstanceProxy::retainLocalObject(JSC::JSValue value) { - if (!value.isObject()) - return; - - JSObject* object = asObject(value); - if (object->classInfo() == &RuntimeObjectImp::s_info) + if (!value.isObject() || value.inherits(&ProxyRuntimeObject::s_info)) return; - m_localObjects.retain(object); + m_localObjects.retain(asObject(value)); } void NetscapePluginInstanceProxy::releaseLocalObject(JSC::JSValue value) { - if (!value.isObject()) + if (!value.isObject() || value.inherits(&ProxyRuntimeObject::s_info)) return; - JSObject* object = asObject(value); - if (object->classInfo() == &RuntimeObjectImp::s_info) - return; - - m_localObjects.release(object); + m_localObjects.release(asObject(value)); } PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRefPtr<RootObject> rootObject) @@ -1364,10 +1413,6 @@ PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRef if (_WKPHGetScriptableNPObject(m_pluginHostProxy->port(), m_pluginID, requestID) != KERN_SUCCESS) return 0; - // If the plug-in host crashes while we're waiting for a reply, the last reference to the instance proxy - // will go away. Prevent this by protecting it here. - RefPtr<NetscapePluginInstanceProxy> protect(this); - auto_ptr<GetScriptableNPObjectReply> reply = waitForReply<GetScriptableNPObjectReply>(requestID); if (!reply.get()) return 0; @@ -1375,6 +1420,7 @@ PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRef if (!reply->m_objectID) return 0; + // Since the reply was non-null, "this" is still a valid pointer. return ProxyInstance::create(rootObject, this, reply->m_objectID); } @@ -1458,7 +1504,7 @@ bool NetscapePluginInstanceProxy::getCookies(data_t urlData, mach_msg_type_numbe if (Frame* frame = core([m_pluginView webFrame])) { String cookieString = cookies(frame->document(), url); - WebCore::CString cookieStringUTF8 = cookieString.utf8(); + WTF::CString cookieStringUTF8 = cookieString.utf8(); if (cookieStringUTF8.isNull()) return false; @@ -1500,7 +1546,7 @@ bool NetscapePluginInstanceProxy::getProxy(data_t urlData, mach_msg_type_number_ if (!url) return false; - WebCore::CString proxyStringUTF8 = proxiesForURL(url); + WTF::CString proxyStringUTF8 = proxiesForURL(url); proxyLength = proxyStringUTF8.length(); mig_allocate(reinterpret_cast<vm_address_t*>(&proxyData), proxyLength); @@ -1512,8 +1558,8 @@ bool NetscapePluginInstanceProxy::getProxy(data_t urlData, mach_msg_type_number_ bool NetscapePluginInstanceProxy::getAuthenticationInfo(data_t protocolData, data_t hostData, uint32_t port, data_t schemeData, data_t realmData, data_t& usernameData, mach_msg_type_number_t& usernameLength, data_t& passwordData, mach_msg_type_number_t& passwordLength) { - WebCore::CString username; - WebCore::CString password; + WTF::CString username; + WTF::CString password; if (!WebKit::getAuthenticationInfo(protocolData, hostData, port, schemeData, realmData, username, password)) return false; @@ -1583,7 +1629,7 @@ void NetscapePluginInstanceProxy::resolveURL(const char* url, const char* target { ASSERT(m_pluginView); - WebCore::CString resolvedURL = [m_pluginView resolvedURLStringForURL:url target:target]; + WTF::CString resolvedURL = [m_pluginView resolvedURLStringForURL:url target:target]; resolvedURLLength = resolvedURL.length(); mig_allocate(reinterpret_cast<vm_address_t*>(&resolvedURLData), resolvedURLLength); @@ -1613,10 +1659,10 @@ void NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(ExecState* exec { JSLock lock(SilenceAssertionsOnly); - throwError(exec, GeneralError, globalExceptionString()); + throwError(exec, GeneralError, stringToUString(globalExceptionString())); } - globalExceptionString() = UString(); + globalExceptionString() = String(); } } // namespace WebKit diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.h b/WebKit/mac/Plugins/Hosted/ProxyInstance.h index 6e8ac47..c8fb118 100644 --- a/WebKit/mac/Plugins/Hosted/ProxyInstance.h +++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.h @@ -58,10 +58,13 @@ public: private: ProxyInstance(PassRefPtr<JSC::Bindings::RootObject>, NetscapePluginInstanceProxy*, uint32_t objectID); - - virtual JSC::Bindings::Class *getClass() const; - virtual JSC::JSValue invokeMethod(JSC::ExecState*, const JSC::Bindings::MethodList&, const JSC::ArgList& args); + virtual JSC::Bindings::RuntimeObject* newRuntimeObject(JSC::ExecState*); + + virtual JSC::Bindings::Class* getClass() const; + + virtual JSC::JSValue getMethod(JSC::ExecState* exec, const JSC::Identifier& propertyName); + virtual JSC::JSValue invokeMethod(JSC::ExecState*, JSC::RuntimeMethod*, const JSC::ArgList& args); virtual bool supportsInvokeDefaultMethod() const; virtual JSC::JSValue invokeDefaultMethod(JSC::ExecState*, const JSC::ArgList&); diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm index c7a0ebe..9a976f9 100644 --- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm +++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm @@ -28,9 +28,12 @@ #import "ProxyInstance.h" #import "NetscapePluginHostProxy.h" +#import "ProxyRuntimeObject.h" #import <WebCore/IdentifierRep.h> #import <WebCore/JSDOMWindow.h> #import <WebCore/npruntime_impl.h> +#import <WebCore/runtime_method.h> +#import <runtime/Error.h> #import <runtime/PropertyNameArray.h> extern "C" { @@ -128,7 +131,12 @@ ProxyInstance::~ProxyInstance() invalidate(); } -JSC::Bindings::Class *ProxyInstance::getClass() const +RuntimeObject* ProxyInstance::newRuntimeObject(ExecState* exec) +{ + return new (exec) ProxyRuntimeObject(exec, this); +} + +JSC::Bindings::Class* ProxyInstance::getClass() const { return proxyClass(); } @@ -147,16 +155,20 @@ JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id if (_WKPHNPObjectInvoke(m_instanceProxy->hostProxy()->port(), m_instanceProxy->pluginID(), requestID, m_objectID, type, identifier, (char*)[arguments.get() bytes], [arguments.get() length]) != KERN_SUCCESS) { - for (unsigned i = 0; i < args.size(); i++) - m_instanceProxy->releaseLocalObject(args.at(i)); + if (m_instanceProxy) { + for (unsigned i = 0; i < args.size(); i++) + m_instanceProxy->releaseLocalObject(args.at(i)); + } return jsUndefined(); } auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); - for (unsigned i = 0; i < args.size(); i++) - m_instanceProxy->releaseLocalObject(args.at(i)); + if (m_instanceProxy) { + for (unsigned i = 0; i < args.size(); i++) + m_instanceProxy->releaseLocalObject(args.at(i)); + } if (!reply.get() || !reply->m_returnValue) return jsUndefined(); @@ -164,8 +176,33 @@ JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id return m_instanceProxy->demarshalValue(exec, (char*)CFDataGetBytePtr(reply->m_result.get()), CFDataGetLength(reply->m_result.get())); } -JSValue ProxyInstance::invokeMethod(ExecState* exec, const MethodList& methodList, const ArgList& args) +class ProxyRuntimeMethod : public RuntimeMethod { +public: + ProxyRuntimeMethod(ExecState* exec, const Identifier& name, Bindings::MethodList& list) + : RuntimeMethod(exec, name, list) + { + } + + virtual const ClassInfo* classInfo() const { return &s_info; } + + static const ClassInfo s_info; +}; + +const ClassInfo ProxyRuntimeMethod::s_info = { "ProxyRuntimeMethod", &RuntimeMethod::s_info, 0, 0 }; + +JSValue ProxyInstance::getMethod(JSC::ExecState* exec, const JSC::Identifier& propertyName) +{ + MethodList methodList = getClass()->methodsNamed(propertyName, this); + return new (exec) ProxyRuntimeMethod(exec, propertyName, methodList); +} + +JSValue ProxyInstance::invokeMethod(ExecState* exec, JSC::RuntimeMethod* runtimeMethod, const ArgList& args) { + if (!asObject(runtimeMethod)->inherits(&ProxyRuntimeMethod::s_info)) + return throwError(exec, TypeError, "Attempt to invoke non-plug-in method on plug-in object."); + + const MethodList& methodList = *runtimeMethod->methods(); + ASSERT(methodList.size() == 1); ProxyMethod* method = static_cast<ProxyMethod*>(methodList[0]); @@ -280,7 +317,7 @@ void ProxyInstance::getPropertyNames(ExecState* exec, PropertyNameArray& nameArr if (identifier->isString()) { const char* str = identifier->string(); - nameArray.add(Identifier(JSDOMWindow::commonJSGlobalData(), String::fromUTF8WithLatin1Fallback(str, strlen(str)))); + nameArray.add(Identifier(JSDOMWindow::commonJSGlobalData(), stringToUString(String::fromUTF8WithLatin1Fallback(str, strlen(str))))); } else nameArray.add(Identifier::from(exec, identifier->number())); } @@ -396,7 +433,8 @@ void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValue v m_instanceProxy->pluginID(), requestID, m_objectID, serverIdentifier, valueData, valueLength); mig_deallocate(reinterpret_cast<vm_address_t>(valueData), valueLength); - m_instanceProxy->releaseLocalObject(value); + if (m_instanceProxy) + m_instanceProxy->releaseLocalObject(value); if (kr != KERN_SUCCESS) return; diff --git a/WebKit/mac/Misc/EmptyProtocolDefinitions.h b/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h index c52d8ce..af3c5db 100644 --- a/WebKit/mac/Misc/EmptyProtocolDefinitions.h +++ b/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,36 +13,41 @@ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. 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. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if defined(__OBJC__) +#if USE(PLUGIN_HOST_PROCESS) -#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) -#define DELEGATES_DECLARED_AS_FORMAL_PROTOCOLS 0 -#else -#define DELEGATES_DECLARED_AS_FORMAL_PROTOCOLS 1 -#endif +#ifndef ProxyRuntimeObject_h +#define ProxyRuntimeObject_h + +#include <WebCore/runtime_object.h> + +namespace WebKit { -#if !DELEGATES_DECLARED_AS_FORMAL_PROTOCOLS +class ProxyInstance; -#define EMPTY_PROTOCOL(NAME) \ -@protocol NAME <NSObject> \ -@end +class ProxyRuntimeObject : public JSC::Bindings::RuntimeObject { +public: + ProxyRuntimeObject(JSC::ExecState*, PassRefPtr<ProxyInstance>); + virtual ~ProxyRuntimeObject(); -EMPTY_PROTOCOL(NSTableViewDataSource) -EMPTY_PROTOCOL(NSTableViewDelegate) -EMPTY_PROTOCOL(NSWindowDelegate) + ProxyInstance* getInternalProxyInstance() const; -#undef EMPTY_PROTOCOL + static const JSC::ClassInfo s_info; -#endif /* !DELEGATES_DECLARED_AS_FORMAL_PROTOCOLS */ +private: + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } +}; -#endif /* defined(__OBJC__) */ +} + +#endif +#endif diff --git a/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm b/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm new file mode 100644 index 0000000..5ba6e15 --- /dev/null +++ b/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 COMPUTER, INC. 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. + */ + +#if USE(PLUGIN_HOST_PROCESS) + +#include "ProxyInstance.h" +#include "ProxyRuntimeObject.h" + +using namespace JSC; + +namespace WebKit { + + +const ClassInfo ProxyRuntimeObject::s_info = { "ProxyRuntimeObject", &RuntimeObject::s_info, 0, 0 }; + +ProxyRuntimeObject::ProxyRuntimeObject(ExecState* exec, PassRefPtr<ProxyInstance> instance) + : RuntimeObject(exec, instance) +{ +} + +ProxyRuntimeObject::~ProxyRuntimeObject() +{ +} + +ProxyInstance* ProxyRuntimeObject::getInternalProxyInstance() const +{ + return static_cast<ProxyInstance*>(getInternalInstance()); +} + + +} + +#endif diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h index 5313ff2..1eb164d 100644 --- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h +++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h @@ -45,7 +45,6 @@ namespace WebKit { NSSize _previousSize; RefPtr<WebKit::NetscapePluginInstanceProxy> _proxy; - BOOL _pluginHostDied; } - (id)initWithFrame:(NSRect)r diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm index 0ad76f0..cd3724e 100644 --- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm +++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm @@ -41,8 +41,9 @@ #import <WebCore/Frame.h> #import <WebCore/FrameLoaderTypes.h> #import <WebCore/HTMLPlugInElement.h> -#import <WebCore/runtime_root.h> +#import <WebCore/RenderEmbeddedObject.h> #import <WebCore/WebCoreObjCExtras.h> +#import <WebCore/runtime_root.h> #import <runtime/InitializeThreading.h> #import <wtf/Assertions.h> @@ -180,10 +181,9 @@ extern "C" { if (!shouldClipOutPlugin) visibleRectInWindow.origin.y = borderViewHeight - NSMaxY(visibleRectInWindow); - BOOL sizeChanged = !NSEqualSizes(_previousSize, boundsInWindow.size); _previousSize = boundsInWindow.size; - _proxy->resize(boundsInWindow, visibleRectInWindow, sizeChanged); + _proxy->resize(boundsInWindow, visibleRectInWindow); } - (void)windowFocusChanged:(BOOL)hasFocus @@ -287,6 +287,9 @@ extern "C" { - (void)handleMouseEntered:(NSEvent *)event { + // Set cursor to arrow. Plugins often handle cursor internally, but those that don't will just get this default one. + [[NSCursor arrowCursor] set]; + if (_isStarted && _proxy) _proxy->mouseEvent(self, event, NPCocoaEventMouseEntered); } @@ -295,6 +298,11 @@ extern "C" { { if (_isStarted && _proxy) _proxy->mouseEvent(self, event, NPCocoaEventMouseExited); + + // Set cursor back to arrow cursor. Because NSCursor doesn't know about changes that the plugin made, we could get confused about what we think the + // current cursor is otherwise. Therefore we have no choice but to unconditionally reset the cursor when the mouse exits the plugin. + // FIXME: This should be job of plugin host, see <rdar://problem/7654434>. + [[NSCursor arrowCursor] set]; } - (void)scrollWheel:(NSEvent *)event @@ -348,7 +356,9 @@ extern "C" { - (void)pluginHostDied { - _pluginHostDied = YES; + RenderEmbeddedObject* renderer = toRenderEmbeddedObject(_element->renderer()); + if (renderer) + renderer->setShowsCrashedPluginIndicator(); _pluginLayer = nil; _proxy = 0; @@ -359,6 +369,11 @@ extern "C" { [self invalidatePluginContentRect:[self bounds]]; } +- (void)visibleRectDidChange +{ + [super visibleRectDidChange]; + WKSyncSurfaceToView(self); +} - (void)drawRect:(NSRect)rect { @@ -369,28 +384,12 @@ extern "C" { _proxy->didDraw(); } else _proxy->print(reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), [self bounds].size.width, [self bounds].size.height); + } else if ([self inFlatteningPaint] && [self supportsSnapshotting]) { + _proxy->snapshot(reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), [self bounds].size.width, [self bounds].size.height); } - + return; } - - if (_pluginHostDied) { - static NSImage *nullPlugInImage; - if (!nullPlugInImage) { - NSBundle *bundle = [NSBundle bundleForClass:[WebHostedNetscapePluginView class]]; - nullPlugInImage = [[NSImage alloc] initWithContentsOfFile:[bundle pathForResource:@"nullplugin" ofType:@"tiff"]]; - [nullPlugInImage setFlipped:YES]; - } - - if (!nullPlugInImage) - return; - - NSSize imageSize = [nullPlugInImage size]; - NSSize viewSize = [self bounds].size; - - NSPoint point = NSMakePoint((viewSize.width - imageSize.width) / 2.0, (viewSize.height - imageSize.height) / 2.0); - [nullPlugInImage drawAtPoint:point fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; - } } - (PassRefPtr<JSC::Bindings::Instance>)createPluginBindingsInstance:(PassRefPtr<JSC::Bindings::RootObject>)rootObject diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs index 6522bf7..6b1a319 100644 --- a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs +++ b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs @@ -234,7 +234,7 @@ simpleroutine PCBooleanAndDataReply(clientPort :mach_port_t; simpleroutine PCRunSyncOpenPanel(clientPort :mach_port_t; panelData :data_t); -simpleroutine PCSetFullScreenWindowIsShowing(clientPort :mach_port_t; +simpleroutine PCSetFullscreenWindowIsShowing(clientPort :mach_port_t; isShowing :boolean_t); simpleroutine PCSetException(clientPort :mach_port_t; diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs index c7cec89..5d9df45 100644 --- a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs +++ b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs @@ -242,3 +242,9 @@ simpleroutine PHPluginInstancePrivateBrowsingModeDidChange(pluginHostPort :mach_ simpleroutine PHSyncOpenPanelReply(pluginHostPort :mach_port_t; filenames :data_t); + +simpleroutine PHPluginInstanceSnapshot(pluginHostPort :mach_port_t; + pluginID :uint32_t; + requestID :uint32_t; + width :uint32_t; + height :uint32_t); diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h index 18dc004..81d801a 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h +++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h @@ -41,13 +41,21 @@ @class WebFrame; @class WebView; -namespace WebCore { +namespace WTF { class CString; +} + +namespace WebCore { class HTMLPlugInElement; } class WebHaltablePlugin; +// Also declared in WebCore/WidgetMac.mm +@interface NSView (Widget) +- (void)visibleRectDidChange; +@end + @interface WebBaseNetscapePluginView : NSView { RetainPtr<WebNetscapePluginPackage> _pluginPackage; @@ -123,10 +131,12 @@ class WebHaltablePlugin; - (void)addWindowObservers; - (void)removeWindowObservers; - (BOOL)shouldClipOutPlugin; +- (BOOL)inFlatteningPaint; +- (BOOL)supportsSnapshotting; - (BOOL)convertFromX:(double)sourceX andY:(double)sourceY space:(NPCoordinateSpace)sourceSpace toX:(double *)destX andY:(double *)destY space:(NPCoordinateSpace)destSpace; -- (WebCore::CString)resolvedURLStringForURL:(const char*)url target:(const char*)target; +- (WTF::CString)resolvedURLStringForURL:(const char*)url target:(const char*)target; - (void)invalidatePluginContentRect:(NSRect)rect; @@ -135,11 +145,11 @@ class WebHaltablePlugin; namespace WebKit { #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) -WebCore::CString proxiesForURL(NSURL *); +WTF::CString proxiesForURL(NSURL *); #endif bool getAuthenticationInfo(const char* protocolStr, const char* hostStr, int32_t port, const char* schemeStr, const char* realmStr, - WebCore::CString& username, WebCore::CString& password); + WTF::CString& username, WTF::CString& password); } #endif diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm index 04a42ea..eec80f8 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm @@ -46,7 +46,6 @@ #import <WebCore/BitmapImage.h> #import <WebCore/Credential.h> #import <WebCore/CredentialStorage.h> -#import <WebCore/CString.h> #import <WebCore/Document.h> #import <WebCore/Element.h> #import <WebCore/Frame.h> @@ -60,6 +59,7 @@ #import <WebKit/DOMPrivate.h> #import <runtime/InitializeThreading.h> #import <wtf/Assertions.h> +#import <wtf/text/CString.h> #define LoginWindowDidSwitchFromUserNotification @"WebLoginWindowDidSwitchFromUserNotification" #define LoginWindowDidSwitchToUserNotification @"WebLoginWindowDidSwitchToUserNotification" @@ -337,13 +337,10 @@ String WebHaltablePlugin::pluginName() const - (NSRect)_windowClipRect { RenderObject* renderer = _element->renderer(); - - if (renderer && renderer->view()) { - if (FrameView* frameView = renderer->view()->frameView()) - return frameView->windowClipRectForLayer(renderer->enclosingLayer(), true); - } - - return NSZeroRect; + if (!renderer || !renderer->view()) + return NSZeroRect; + + return toRenderWidget(renderer)->windowClipRect(); } - (NSRect)visibleRect @@ -353,6 +350,11 @@ String WebHaltablePlugin::pluginName() const return NSIntersectionRect([self convertRect:[self _windowClipRect] fromView:nil], [super visibleRect]); } +- (void)visibleRectDidChange +{ + [self renewGState]; +} + - (BOOL)acceptsFirstResponder { return YES; @@ -560,7 +562,30 @@ String WebHaltablePlugin::pluginName() const NSWindow *window = [self window]; return !window || [window isMiniaturized] || [NSApp isHidden] || ![self isDescendantOf:[[self window] contentView]] || [self isHiddenOrHasHiddenAncestor]; } + +- (BOOL)inFlatteningPaint +{ + RenderObject* renderer = _element->renderer(); + if (renderer && renderer->view()) { + if (FrameView* frameView = renderer->view()->frameView()) + return frameView->paintBehavior() & PaintBehaviorFlattenCompositingLayers; + } + + return NO; +} + +- (BOOL)supportsSnapshotting +{ + NSBundle *pluginBundle = [_pluginPackage.get() bundle]; + if (![[pluginBundle bundleIdentifier] isEqualToString:@"com.macromedia.Flash Player.plugin"]) + return YES; + // Flash has a bogus Info.plist entry for CFBundleVersionString, so use CFBundleShortVersionString. + NSString *versionString = [pluginBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + // Flash 10.1d51 has a crashing bug if sent a drawRect event when using the CA rendering model: <rdar://problem/7739922> + return ![versionString isEqual:@"10.1.51.95"]; +} + - (BOOL)hasBeenHalted { return _hasBeenHalted; diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm index d8324f7..a5e8f73 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm @@ -199,8 +199,17 @@ void WebNetscapePluginEventHandlerCarbon::mouseDragged(NSEvent*) { } -void WebNetscapePluginEventHandlerCarbon::mouseMoved(NSEvent*) +void WebNetscapePluginEventHandlerCarbon::mouseMoved(NSEvent* theEvent) { + EventRecord event; + + getCarbonEvent(&event, theEvent); + event.what = adjustCursorEvent; + + BOOL acceptedEvent; + acceptedEvent = sendEvent(&event); + + LOG(PluginEvents, "NPP_HandleEvent(mouseMoved): %d", acceptedEvent); } void WebNetscapePluginEventHandlerCarbon::keyDown(NSEvent *theEvent) diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm index 8fb1503..388b84b 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm @@ -50,7 +50,6 @@ #import "WebPluginContainerCheck.h" #import "WebNetscapeContainerCheckContextInfo.h" #import "WebNetscapePluginEventHandler.h" -#import "WebNullPluginView.h" #import "WebPreferences.h" #import "WebPluginRequest.h" #import "WebViewInternal.h" @@ -59,7 +58,6 @@ #import <runtime/JSLock.h> #import <WebCore/npruntime_impl.h> #import <WebCore/CookieJar.h> -#import <WebCore/CString.h> #import <WebCore/DocumentLoader.h> #import <WebCore/Element.h> #import <WebCore/Frame.h> @@ -77,12 +75,13 @@ #import <WebKit/WebUIDelegate.h> #import <runtime/InitializeThreading.h> #import <wtf/Assertions.h> +#import <wtf/text/CString.h> #import <objc/objc-runtime.h> #define LoginWindowDidSwitchFromUserNotification @"WebLoginWindowDidSwitchFromUserNotification" #define LoginWindowDidSwitchToUserNotification @"WebLoginWindowDidSwitchToUserNotification" #define WKNVSupportsCompositingCoreAnimationPluginsBool 74656 /* TRUE if the browser supports hardware compositing of Core Animation plug-ins */ -static const int WKNVSilverlightFullScreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying bug in <rdar://problem/7288546> */ +static const int WKNVSilverlightFullscreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying bug in <rdar://problem/7288546> */ using namespace WebCore; using namespace WebKit; @@ -754,6 +753,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) if (!_isStarted) return; + // Set cursor to arrow. Plugins often handle cursor internally, but those that don't will just get this default one. + [[NSCursor arrowCursor] set]; + _eventHandler->mouseEntered(theEvent); } @@ -1394,7 +1396,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) - (void)drawRect:(NSRect)rect { - if (drawingModel == NPDrawingModelCoreAnimation) + if (drawingModel == NPDrawingModelCoreAnimation && (![self inFlatteningPaint] || ![self supportsSnapshotting])) return; if (!_isStarted) @@ -2276,7 +2278,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) - (char*)resolveURL:(const char*)url forTarget:(const char*)target { - WebCore::CString location = [self resolvedURLStringForURL:url target:target]; + CString location = [self resolvedURLStringForURL:url target:target]; if (location.isNull()) return 0; @@ -2307,13 +2309,13 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) // 1) Microsoft releases a genuine fix for 7288546. // 2) Enough Silverlight users update to the new Silverlight. // For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it resolved its full screen badness. -- (void)_workaroundSilverlightFullScreenBug:(BOOL)initializedPlugin +- (void)_workaroundSilverlightFullscreenBug:(BOOL)initializedPlugin { #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) ASSERT(_isSilverlight); - NPBool isFullScreenPerformanceIssueFixed = 0; + NPBool isFullscreenPerformanceIssueFixed = 0; NPPluginFuncs *pluginFuncs = [_pluginPackage.get() pluginFuncs]; - if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullScreenPerformanceIssueFixed), &isFullScreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullScreenPerformanceIssueFixed) + if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullscreenPerformanceIssueFixed), &isFullscreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullscreenPerformanceIssueFixed) return; static CGLPixelFormatObj pixelFormatObject = 0; @@ -2354,7 +2356,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) NPError npErr = [_pluginPackage.get() pluginFuncs]->newp((char *)[_MIMEType.get() cString], plugin, _mode, argsCount, cAttributes, cValues, NULL); [[self class] setCurrentPluginView:nil]; if (_isSilverlight) - [self _workaroundSilverlightFullScreenBug:YES]; + [self _workaroundSilverlightFullscreenBug:YES]; LOG(Plugins, "NPP_New: %d", npErr); return npErr; } @@ -2364,7 +2366,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) PluginMainThreadScheduler::scheduler().unregisterPlugin(plugin); if (_isSilverlight) - [self _workaroundSilverlightFullScreenBug:NO]; + [self _workaroundSilverlightFullscreenBug:NO]; NPError npErr; npErr = ![_pluginPackage.get() pluginFuncs]->destroy(plugin, NULL); diff --git a/WebKit/mac/Plugins/WebNullPluginView.mm b/WebKit/mac/Plugins/WebNullPluginView.mm deleted file mode 100644 index bcc7a4b..0000000 --- a/WebKit/mac/Plugins/WebNullPluginView.mm +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2005, 2007 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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. - */ - -#import "WebNullPluginView.h" - -#import "DOMElementInternal.h" -#import "WebDelegateImplementationCaching.h" -#import "WebFrameInternal.h" -#import "WebViewInternal.h" -#import <WebCore/Document.h> -#import <WebCore/Element.h> - -@implementation WebNullPluginView - -- initWithFrame:(NSRect)frame error:(NSError *)err DOMElement:(DOMElement *)elem -{ - static NSImage *nullPlugInImage; - if (!nullPlugInImage) { - NSBundle *bundle = [NSBundle bundleForClass:[WebNullPluginView class]]; - NSString *imagePath = [bundle pathForResource:@"nullplugin" ofType:@"tiff"]; - nullPlugInImage = [[NSImage alloc] initWithContentsOfFile:imagePath]; - } - - self = [super initWithFrame:frame]; - if (!self) - return nil; - - error = [err retain]; - if (err) - element = [elem retain]; - - [self setImage:nullPlugInImage]; - - return self; -} - -- (void)dealloc - -{ - [error release]; - [element release]; - [super dealloc]; -} - -- (void)reportFailure -{ - NSError *localError = error; - DOMElement *localElement = element; - - error = nil; - element = nil; - - WebFrame *webFrame = kit(core(localElement)->document()->frame()); - if (webFrame) { - WebView *webView = [webFrame webView]; - WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView); - if (implementations->plugInFailedWithErrorFunc) - CallResourceLoadDelegate(implementations->plugInFailedWithErrorFunc, webView, - @selector(webView:plugInFailedWithError:dataSource:), localError, [webFrame _dataSource]); - } - - [localError release]; - [localElement release]; -} - -- (void)viewDidMoveToWindow -{ - if (!error) - return; - - if ([self window]) - [self reportFailure]; -} - -@end diff --git a/WebKit/mac/Plugins/WebPluginController.mm b/WebKit/mac/Plugins/WebPluginController.mm index 4343119..1c85862 100644 --- a/WebKit/mac/Plugins/WebPluginController.mm +++ b/WebKit/mac/Plugins/WebPluginController.mm @@ -36,6 +36,7 @@ #import "WebHTMLViewPrivate.h" #import "WebKitErrorsPrivate.h" #import "WebKitLogging.h" +#import "WebNSObjectExtras.h" #import "WebNSURLExtras.h" #import "WebNSViewExtras.h" #import "WebPlugin.h" @@ -57,6 +58,7 @@ #import <WebCore/ResourceRequest.h> #import <WebCore/ScriptController.h> #import <WebCore/WebCoreURLResponse.h> +#import <objc/objc-runtime.h> #import <runtime/JSLock.h> using namespace WebCore; @@ -78,6 +80,10 @@ using namespace HTMLNames; - (void)pluginDestroy; @end +static bool isKindOfClass(id, NSString* className); +static void installFlip4MacPlugInWorkaroundIfNecessary(); + + static NSMutableSet *pluginViews = nil; @implementation WebPluginController @@ -209,7 +215,10 @@ static NSMutableSet *pluginViews = nil; BOOL oldDefersCallbacks = [[self webView] defersCallbacks]; if (!oldDefersCallbacks) [[self webView] setDefersCallbacks:YES]; - + + if (isKindOfClass(view, @"WmvPlugin")) + installFlip4MacPlugInWorkaroundIfNecessary(); + LOG(Plugins, "initializing plug-in %@", view); if ([view respondsToSelector:@selector(webPlugInInitialize)]) { JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); @@ -351,21 +360,11 @@ static void cancelOutstandingCheck(const void *item, void *context) } } -// For compatibility only. -- (void)showURL:(NSURL *)URL inFrame:(NSString *)target -{ - [self webPlugInContainerLoadRequest:[NSURLRequest requestWithURL:URL] inFrame:target]; -} - - (void)webPlugInContainerShowStatus:(NSString *)message { - if (!message) { + if (!message) message = @""; - } - if (!_documentView) { - LOG_ERROR("could not show status message (%@) because plug-in has already been destroyed", message); - return; - } + WebView *v = [_dataSource _webView]; [[v _UIDelegateForwarder] webView:v setStatusText:message]; } @@ -475,3 +474,85 @@ static WebCore::HTMLMediaElement* mediaProxyClient(DOMElement* element) #endif @end + +static bool isKindOfClass(id object, NSString *className) +{ + Class cls = NSClassFromString(className); + + if (!cls) + return false; + + return [object isKindOfClass:cls]; +} + + +// Existing versions of the Flip4Mac WebKit plug-in have an object lifetime bug related to an NSAlert that is +// used to notify the user about updates to the plug-in. This bug can result in Safari crashing if the page +// containing the plug-in navigates while the alert is displayed (<rdar://problem/7313430>). +// +// The gist of the bug is thus: Flip4Mac sets an instance of the TSUpdateCheck class as the modal delegate of the +// NSAlert instance. This TSUpdateCheck instance itself has a delegate. The delegate is set to the WmvPlugin +// instance which is the NSView subclass that is exposed to WebKit as the plug-in view. Since this relationship +// is that of delegates the TSUpdateCheck does not retain the WmvPlugin. This leads to a bug if the WmvPlugin +// instance is destroyed before the TSUpdateCheck instance as the TSUpdateCheck instance will be left with a +// pointer to a stale object. This will happen if a page containing the Flip4Mac plug-in triggers a navigation +// while the update sheet is visible as the WmvPlugin instance is removed from the view hierarchy and there are +// no other references to keep the object alive. +// +// We work around this bug by patching the following two messages: +// +// 1) -[NSAlert beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:] +// 2) -[TSUpdateCheck alertDidEnd:returnCode:contextInfo:] +// +// Our override of 1) detects whether it is Flip4Mac's update sheet triggering the alert by checking whether the +// modal delegate is an instance of TSUpdateCheck. If it is, it retains the modal delegate's delegate. +// +// Our override of 2) then autoreleases the delegate, balancing the retain we added in 1). +// +// These two overrides have the effect of ensuring that the WmvPlugin instance will always outlive the TSUpdateCheck +// instance, preventing the TSUpdateCheck instance from accessing a stale delegate pointer and crashing the application. + + +typedef void (*beginSheetModalForWindowIMP)(id, SEL, NSWindow *, id, SEL, void*); +static beginSheetModalForWindowIMP original_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_; + +typedef void (*alertDidEndIMP)(id, SEL, NSAlert *, NSInteger, void*); +static alertDidEndIMP original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_; + +static void WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_(id object, SEL selector, NSAlert *alert, NSInteger returnCode, void* contextInfo) +{ + [[object delegate] autorelease]; + + original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_(object, selector, alert, returnCode, contextInfo); +} + +static void WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(id object, SEL selector, NSWindow *window, id modalDelegate, SEL didEndSelector, void* contextInfo) +{ + if (isKindOfClass(modalDelegate, @"TSUpdateCheck")) + [[modalDelegate delegate] retain]; + + original_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(object, selector, window, modalDelegate, didEndSelector, contextInfo); +} + +static void installFlip4MacPlugInWorkaroundIfNecessary() +{ + static bool hasInstalledFlip4MacPlugInWorkaround; + if (!hasInstalledFlip4MacPlugInWorkaround) { + Class TSUpdateCheck = objc_lookUpClass("TSUpdateCheck"); + if (!TSUpdateCheck) + return; + + Method methodToPatch = class_getInstanceMethod(TSUpdateCheck, @selector(alertDidEnd:returnCode:contextInfo:)); + if (!methodToPatch) + return; + + IMP originalMethod = method_setImplementation(methodToPatch, reinterpret_cast<IMP>(WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_)); + original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_ = reinterpret_cast<alertDidEndIMP>(originalMethod); + + methodToPatch = class_getInstanceMethod(objc_getRequiredClass("NSAlert"), @selector(beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:)); + originalMethod = method_setImplementation(methodToPatch, reinterpret_cast<IMP>(WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_)); + original_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ = reinterpret_cast<beginSheetModalForWindowIMP>(originalMethod); + + hasInstalledFlip4MacPlugInWorkaround = true; + } +} diff --git a/WebKit/mac/Resources/nullplugin.tiff b/WebKit/mac/Resources/nullplugin.tiff Binary files differdeleted file mode 100644 index 8a2d9df..0000000 --- a/WebKit/mac/Resources/nullplugin.tiff +++ /dev/null diff --git a/WebKit/mac/Storage/WebDatabaseManager.mm b/WebKit/mac/Storage/WebDatabaseManager.mm index a84f235..2c58889 100644 --- a/WebKit/mac/Storage/WebDatabaseManager.mm +++ b/WebKit/mac/Storage/WebDatabaseManager.mm @@ -107,14 +107,14 @@ NSString *WebDatabaseIdentifierKey = @"WebDatabaseIdentifierKey"; DatabaseTracker::tracker().deleteAllDatabases(); } -- (void)deleteOrigin:(WebSecurityOrigin *)origin +- (BOOL)deleteOrigin:(WebSecurityOrigin *)origin { - DatabaseTracker::tracker().deleteOrigin([origin _core]); + return DatabaseTracker::tracker().deleteOrigin([origin _core]); } -- (void)deleteDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin +- (BOOL)deleteDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin { - DatabaseTracker::tracker().deleteDatabase([origin _core], databaseIdentifier); + return DatabaseTracker::tracker().deleteDatabase([origin _core], databaseIdentifier); } @end diff --git a/WebKit/mac/Storage/WebDatabaseManagerPrivate.h b/WebKit/mac/Storage/WebDatabaseManagerPrivate.h index e373b1c..94d8109 100644 --- a/WebKit/mac/Storage/WebDatabaseManagerPrivate.h +++ b/WebKit/mac/Storage/WebDatabaseManagerPrivate.h @@ -60,8 +60,8 @@ extern NSString *WebDatabaseIdentifierKey; - (NSDictionary *)detailsForDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin; - (void)deleteAllDatabases; // Deletes all databases and all origins. -- (void)deleteOrigin:(WebSecurityOrigin *)origin; -- (void)deleteDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin; +- (BOOL)deleteOrigin:(WebSecurityOrigin *)origin; +- (BOOL)deleteDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin; @end diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h index c8da53b..478269c 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.h +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h @@ -91,8 +91,11 @@ public: virtual WebCore::IntRect windowResizerRect() const; - virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); + virtual void invalidateWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool); virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect); + virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const; virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const; virtual PlatformPageClient platformPageClient() const; @@ -120,7 +123,7 @@ public: #endif virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); - virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>); + virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*); virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; } @@ -160,7 +163,11 @@ public: #endif virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); +<<<<<<< HEAD virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*) { } +======= + virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { } +>>>>>>> webkit.org at r58033 private: WebView *m_webView; diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm index b2240d9..d27a19c 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm @@ -56,6 +56,7 @@ #import <WebCore/Geolocation.h> #import <WebCore/HitTestResult.h> #import <WebCore/HTMLNames.h> +#import <WebCore/Icon.h> #import <WebCore/IntRect.h> #import <WebCore/Page.h> #import <WebCore/PlatformScreen.h> @@ -439,20 +440,32 @@ IntRect WebChromeClient::windowResizerRect() const return enclosingIntRect([m_webView convertRect:rect fromView:nil]); } -void WebChromeClient::repaint(const IntRect& rect, bool contentChanged, bool immediate, bool repaintContentOnly) +void WebChromeClient::invalidateWindow(const IntRect&, bool immediate) +{ + if (immediate) { + [[m_webView window] displayIfNeeded]; + [[m_webView window] flushWindowIfNeeded]; + } +} + +void WebChromeClient::invalidateContentsAndWindow(const IntRect& rect, bool immediate) { if ([m_webView _usesDocumentViews]) return; - - if (contentChanged) - [m_webView setNeedsDisplayInRect:rect]; - + + [m_webView setNeedsDisplayInRect:rect]; + if (immediate) { [[m_webView window] displayIfNeeded]; [[m_webView window] flushWindowIfNeeded]; } } +void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool immediate) +{ + invalidateContentsAndWindow(rect, immediate); +} + void WebChromeClient::scroll(const IntSize&, const IntRect&, const IntRect&) { } @@ -631,9 +644,9 @@ void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> chooser) END_BLOCK_OBJC_EXCEPTIONS; } -void WebChromeClient::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) +void WebChromeClient::chooseIconForFiles(const Vector<String>& filenames, FileChooser* chooser) { - // FIXME: Move the code of Icon::createIconForFiles() here. + chooser->iconLoaded(Icon::createIconForFiles(filenames)); } KeyboardUIMode WebChromeClient::keyboardUIMode() diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h index 988b8a6..d497513 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h @@ -126,7 +126,6 @@ private: virtual void revertToProvisionalState(WebCore::DocumentLoader*); virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&); virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length); - virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString&); virtual void willChangeEstimatedProgress(); virtual void didChangeEstimatedProgress(); diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index 52a24b4..0088eae 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -60,7 +60,6 @@ #import "WebNSURLExtras.h" #import "WebNetscapePluginView.h" #import "WebNetscapePluginPackage.h" -#import "WebNullPluginView.h" #import "WebPanelAuthenticationHandler.h" #import "WebPluginController.h" #import "WebPluginPackage.h" @@ -349,10 +348,6 @@ bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader return true; } -void WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString) -{ -} - void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request) { WebView *webView = getWebView(m_webFrame.get()); @@ -1524,8 +1519,11 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP WebView *webView = getWebView(m_webFrame.get()); SEL selector = @selector(webView:plugInViewWithArguments:); - NSURL *URL = url; + Document* document = core(m_webFrame.get())->document(); + NSURL *baseURL = document->baseURL(); + NSURL *pluginURL = url; + if ([[webView UIDelegate] respondsToSelector:selector]) { NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:kit(paramNames)]; NSDictionary *arguments = [[NSDictionary alloc] initWithObjectsAndKeys: @@ -1533,7 +1531,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP [NSNumber numberWithInt:loadManually ? WebPlugInModeFull : WebPlugInModeEmbed], WebPlugInModeKey, [NSNumber numberWithBool:!loadManually], WebPlugInShouldLoadMainResourceKey, kit(element), WebPlugInContainingElementKey, - URL, WebPlugInBaseURLKey, // URL might be nil, so add it last + baseURL, WebPlugInBaseURLKey, nil]; NSView *view = CallUIDelegate(webView, selector, arguments); @@ -1555,7 +1553,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP pluginPackage = [webView _pluginForMIMEType:mimeType]; } - NSString *extension = [[URL path] pathExtension]; + NSString *extension = [[pluginURL path] pathExtension]; #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) // don't allow proxy plug-in selection by file extension if (element->hasTagName(videoTag) || element->hasTagName(audioTag)) @@ -1573,8 +1571,6 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP NSView *view = nil; - Document* document = core(m_webFrame.get())->document(); - NSURL *baseURL = document->baseURL(); if (pluginPackage) { if ([pluginPackage isKindOfClass:[WebPluginPackage class]]) view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, kit(paramNames), kit(paramValues), baseURL, kit(element), loadManually); @@ -1584,7 +1580,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP WebBaseNetscapePluginView *pluginView = [[[NETSCAPE_PLUGIN_VIEW alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height()) pluginPackage:(WebNetscapePluginPackage *)pluginPackage - URL:URL + URL:pluginURL baseURL:baseURL MIMEType:MIMEType attributeKeys:kit(paramNames) @@ -1600,17 +1596,21 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP if (!errorCode && !view) errorCode = WebKitErrorCannotLoadPlugIn; + + if (errorCode && m_webFrame) { + WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView); + if (implementations->plugInFailedWithErrorFunc) { + KURL pluginPageURL = document->completeURL(deprecatedParseURL(parameterValue(paramNames, paramValues, "pluginspage"))); + if (!pluginPageURL.protocolInHTTPFamily()) + pluginPageURL = KURL(); + NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode + contentURL:pluginURL pluginPageURL:pluginPageURL pluginName:[pluginPackage name] MIMEType:MIMEType]; + CallResourceLoadDelegate(implementations->plugInFailedWithErrorFunc, [m_webFrame.get() webView], + @selector(webView:plugInFailedWithError:dataSource:), error, [m_webFrame.get() _dataSource]); + [error release]; + } - if (errorCode) { - KURL pluginPageURL = document->completeURL(deprecatedParseURL(parameterValue(paramNames, paramValues, "pluginspage"))); - if (!pluginPageURL.protocolInHTTPFamily()) - pluginPageURL = KURL(); - NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode - contentURL:URL pluginPageURL:pluginPageURL pluginName:[pluginPackage name] MIMEType:MIMEType]; - WebNullPluginView *nullView = [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height()) - error:error DOMElement:kit(element)] autorelease]; - view = nullView; - [error release]; + return 0; } ASSERT(view); @@ -1691,14 +1691,13 @@ PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s } if (!view) { - NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorJavaUnavailable - contentURL:nil - pluginPageURL:nil - pluginName:[pluginPackage name] - MIMEType:MIMEType]; - view = [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height()) - error:error DOMElement:kit(element)] autorelease]; - [error release]; + WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(getWebView(m_webFrame.get())); + if (implementations->plugInFailedWithErrorFunc) { + NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorJavaUnavailable contentURL:nil pluginPageURL:nil pluginName:[pluginPackage name] MIMEType:MIMEType]; + CallResourceLoadDelegate(implementations->plugInFailedWithErrorFunc, [m_webFrame.get() webView], + @selector(webView:plugInFailedWithError:dataSource:), error, [m_webFrame.get() _dataSource]); + [error release]; + } } ASSERT(view); diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm b/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm index 32e8d0d..1bdb616 100644 --- a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm +++ b/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm @@ -38,6 +38,7 @@ using namespace WTF; + (void)setPosition:(double)latitude:(double)longitude:(double)accuracy { +#if ENABLE(GEOLOCATION) RefPtr<Coordinates> coordinates = Coordinates::create(latitude, longitude, false, 0.0, // altitude @@ -47,13 +48,16 @@ using namespace WTF; false, 0.0); // speed RefPtr<Geoposition> position = Geoposition::create(coordinates.release(), currentTime() * 1000.0); GeolocationServiceMock::setPosition(position.release()); +#endif } + (void)setError:(int)code:(NSString *)message { +#if ENABLE(GEOLOCATION) PositionError::ErrorCode codeEnum = static_cast<PositionError::ErrorCode>(code); RefPtr<PositionError> error = PositionError::create(codeEnum, message); GeolocationServiceMock::setError(error.release()); +#endif } @end diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.h b/WebKit/mac/WebCoreSupport/WebInspectorClient.h index 64621f8..ee81b25 100644 --- a/WebKit/mac/WebCoreSupport/WebInspectorClient.h +++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.h @@ -27,15 +27,18 @@ */ #import <WebCore/InspectorClient.h> +#import <WebCore/InspectorFrontendClientLocal.h> #import <WebCore/PlatformString.h> #import <wtf/RetainPtr.h> #ifdef __OBJC__ @class WebInspectorWindowController; +@class WebNodeHighlighter; @class WebView; #else class WebInspectorWindowController; +class WebNodeHighlighter; class WebView; #endif @@ -45,32 +48,41 @@ public: virtual void inspectorDestroyed(); - virtual WebCore::Page* createPage(); - virtual WebCore::String localizedStringsURL(); - - virtual WebCore::String hiddenPanels(); - - virtual void showWindow(); - virtual void closeWindow(); - - virtual void attachWindow(); - virtual void detachWindow(); - - virtual void setAttachedWindowHeight(unsigned height); + virtual void openInspectorFrontend(WebCore::InspectorController*); virtual void highlight(WebCore::Node*); virtual void hideHighlight(); - virtual void inspectedURLChanged(const WebCore::String& newURL); virtual void populateSetting(const WebCore::String& key, WebCore::String* value); virtual void storeSetting(const WebCore::String& key, const WebCore::String& value); - virtual void inspectorWindowObjectCleared(); +private: + WebView *m_webView; + RetainPtr<WebNodeHighlighter> m_highlighter; +}; + +class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal { +public: + WebInspectorFrontendClient(WebView*, WebInspectorWindowController*, WebCore::InspectorController*, WebCore::Page*); + + virtual void frontendLoaded(); + + virtual WebCore::String localizedStringsURL(); + virtual WebCore::String hiddenPanels(); + + virtual void bringToFront(); + virtual void closeWindow(); + + virtual void attachWindow(); + virtual void detachWindow(); + + virtual void setAttachedWindowHeight(unsigned height); + virtual void inspectedURLChanged(const WebCore::String& newURL); private: void updateWindowTitle() const; - WebView *m_webView; + WebView* m_inspectedWebView; RetainPtr<WebInspectorWindowController> m_windowController; WebCore::String m_inspectedURL; }; diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm index 01515b1..00c51a9 100644 --- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm +++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm @@ -41,54 +41,102 @@ #import <WebCore/Page.h> #import <WebKit/DOMExtensions.h> #import <WebKitSystemInterface.h> +#import <wtf/PassOwnPtr.h> using namespace WebCore; -static const char* const inspectorStartsAttachedName = "inspectorStartsAttached"; - @interface WebInspectorWindowController : NSWindowController <NSWindowDelegate> { @private WebView *_inspectedWebView; WebView *_webView; - WebNodeHighlight *_currentHighlight; + WebInspectorFrontendClient* _frontendClient; BOOL _attachedToInspectedWebView; BOOL _shouldAttach; BOOL _visible; - BOOL _movingWindows; + BOOL _destroyingInspectorView; } - (id)initWithInspectedWebView:(WebView *)webView; -- (BOOL)inspectorVisible; - (WebView *)webView; - (void)attach; - (void)detach; +- (BOOL)attached; +- (void)setFrontendClient:(WebInspectorFrontendClient*)frontendClient; - (void)setAttachedWindowHeight:(unsigned)height; +- (void)destroyInspectorView; +@end + +#pragma mark - + +@interface WebNodeHighlighter : NSObject { +@private + WebView *_inspectedWebView; + WebNodeHighlight *_currentHighlight; +} +- (id)initWithInspectedWebView:(WebView *)webView; - (void)highlightNode:(DOMNode *)node; - (void)hideHighlight; @end #pragma mark - + WebInspectorClient::WebInspectorClient(WebView *webView) : m_webView(webView) +, m_highlighter(AdoptNS, [[WebNodeHighlighter alloc] initWithInspectedWebView:webView]) { } void WebInspectorClient::inspectorDestroyed() { - [[m_windowController.get() webView] close]; delete this; } -Page* WebInspectorClient::createPage() +void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorController) +{ + RetainPtr<WebInspectorWindowController> windowController(AdoptNS, [[WebInspectorWindowController alloc] initWithInspectedWebView:m_webView]); + Page* frontendPage = core([windowController.get() webView]); + + frontendPage->inspectorController()->setInspectorFrontendClient(new WebInspectorFrontendClient(m_webView, windowController.get(), inspectorController, frontendPage)); +} + +void WebInspectorClient::highlight(Node* node) +{ + [m_highlighter.get() highlightNode:kit(node)]; +} + +void WebInspectorClient::hideHighlight() +{ + [m_highlighter.get() hideHighlight]; +} + +WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage) + : InspectorFrontendClientLocal(inspectorController, frontendPage) + , m_inspectedWebView(inspectedWebView) + , m_windowController(windowController) +{ + [windowController setFrontendClient:this]; +} + +void WebInspectorFrontendClient::frontendLoaded() { - if (m_windowController) - [[m_windowController.get() webView] close]; - m_windowController.adoptNS([[WebInspectorWindowController alloc] initWithInspectedWebView:m_webView]); + [m_windowController.get() showWindow:nil]; + if ([m_windowController.get() attached]) + restoreAttachedWindowHeight(); + + InspectorFrontendClientLocal::frontendLoaded(); + + WebFrame *frame = [m_inspectedWebView mainFrame]; + + WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(m_inspectedWebView); + if (implementations->didClearInspectorWindowObjectForFrameFunc) + CallFrameLoadDelegate(implementations->didClearInspectorWindowObjectForFrameFunc, m_inspectedWebView, + @selector(webView:didClearInspectorWindowObject:forFrame:), [frame windowObject], frame); - return core([m_windowController.get() webView]); + bool attached = [m_windowController.get() attached]; + setAttachedWindow(attached); } -String WebInspectorClient::localizedStringsURL() +String WebInspectorFrontendClient::localizedStringsURL() { NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"localizedStrings" ofType:@"js"]; if (path) @@ -96,7 +144,7 @@ String WebInspectorClient::localizedStringsURL() return String(); } -String WebInspectorClient::hiddenPanels() +String WebInspectorFrontendClient::hiddenPanels() { NSString *hiddenPanels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebKitInspectorHiddenPanels"]; if (hiddenPanels) @@ -104,63 +152,47 @@ String WebInspectorClient::hiddenPanels() return String(); } -void WebInspectorClient::showWindow() +void WebInspectorFrontendClient::bringToFront() { updateWindowTitle(); [m_windowController.get() showWindow:nil]; } -void WebInspectorClient::closeWindow() +void WebInspectorFrontendClient::closeWindow() { - [m_windowController.get() close]; + [m_windowController.get() destroyInspectorView]; } -void WebInspectorClient::attachWindow() +void WebInspectorFrontendClient::attachWindow() { + if ([m_windowController.get() attached]) + return; [m_windowController.get() attach]; + restoreAttachedWindowHeight(); } -void WebInspectorClient::detachWindow() +void WebInspectorFrontendClient::detachWindow() { [m_windowController.get() detach]; } -void WebInspectorClient::setAttachedWindowHeight(unsigned height) +void WebInspectorFrontendClient::setAttachedWindowHeight(unsigned height) { [m_windowController.get() setAttachedWindowHeight:height]; } -void WebInspectorClient::highlight(Node* node) -{ - [m_windowController.get() highlightNode:kit(node)]; -} - -void WebInspectorClient::hideHighlight() -{ - [m_windowController.get() hideHighlight]; -} - -void WebInspectorClient::inspectedURLChanged(const String& newURL) +void WebInspectorFrontendClient::inspectedURLChanged(const String& newURL) { m_inspectedURL = newURL; updateWindowTitle(); } -void WebInspectorClient::updateWindowTitle() const +void WebInspectorFrontendClient::updateWindowTitle() const { NSString *title = [NSString stringWithFormat:UI_STRING("Web Inspector — %@", "Web Inspector window title"), (NSString *)m_inspectedURL]; [[m_windowController.get() window] setTitle:title]; } -void WebInspectorClient::inspectorWindowObjectCleared() -{ - WebFrame *frame = [m_webView mainFrame]; - - WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(m_webView); - if (implementations->didClearInspectorWindowObjectForFrameFunc) - CallFrameLoadDelegate(implementations->didClearInspectorWindowObjectForFrameFunc, m_webView, - @selector(webView:didClearInspectorWindowObject:forFrame:), [frame windowObject], frame); -} #pragma mark - @@ -223,18 +255,12 @@ void WebInspectorClient::inspectorWindowObjectCleared() - (void)dealloc { - ASSERT(!_currentHighlight); [_webView release]; [super dealloc]; } #pragma mark - -- (BOOL)inspectorVisible -{ - return _visible; -} - - (WebView *)webView { return _webView; @@ -273,11 +299,7 @@ void WebInspectorClient::inspectorWindowObjectCleared() - (BOOL)windowShouldClose:(id)sender { - _visible = NO; - - [_inspectedWebView page]->inspectorController()->setWindowVisible(false); - - [self hideHighlight]; + [self destroyInspectorView]; return YES; } @@ -289,11 +311,6 @@ void WebInspectorClient::inspectorWindowObjectCleared() _visible = NO; - if (!_movingWindows) - [_inspectedWebView page]->inspectorController()->setWindowVisible(false); - - [self hideHighlight]; - if (_attachedToInspectedWebView) { if ([_inspectedWebView _isClosed]) return; @@ -327,8 +344,11 @@ void WebInspectorClient::inspectorWindowObjectCleared() _visible = YES; // If no preference is set - default to an attached window. This is important for inspector LayoutTests. - String shouldAttach = [_inspectedWebView page]->inspectorController()->setting(inspectorStartsAttachedName); + String shouldAttach = [_inspectedWebView page]->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName()); _shouldAttach = shouldAttach != "false"; + + if (_shouldAttach && !_frontendClient->canAttachWindow()) + _shouldAttach = NO; if (_shouldAttach) { WebFrameView *frameView = [[_inspectedWebView mainFrame] frameView]; @@ -351,8 +371,6 @@ void WebInspectorClient::inspectorWindowObjectCleared() [super showWindow:nil]; } - - [_inspectedWebView page]->inspectorController()->setWindowVisible(true, _shouldAttach); } #pragma mark - @@ -362,13 +380,10 @@ void WebInspectorClient::inspectorWindowObjectCleared() if (_attachedToInspectedWebView) return; - [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, "true"); - _movingWindows = YES; + [_inspectedWebView page]->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "true"); [self close]; [self showWindow:nil]; - - _movingWindows = NO; } - (void)detach @@ -376,14 +391,20 @@ void WebInspectorClient::inspectorWindowObjectCleared() if (!_attachedToInspectedWebView) return; - [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, "false"); - _movingWindows = YES; + [_inspectedWebView page]->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "false"); [self close]; [self showWindow:nil]; +} - _movingWindows = NO; +- (BOOL)attached +{ + return _attachedToInspectedWebView; +} +- (void)setFrontendClient:(WebInspectorFrontendClient*)frontendClient +{ + _frontendClient = frontendClient; } - (void)setAttachedWindowHeight:(unsigned)height @@ -404,29 +425,17 @@ void WebInspectorClient::inspectorWindowObjectCleared() [frameView setFrame:frameViewRect]; } -#pragma mark - - -- (void)highlightNode:(DOMNode *)node +- (void)destroyInspectorView { - // The scrollview's content view stays around between page navigations, so target it - NSView *view = [[[[[_inspectedWebView mainFrame] frameView] documentView] enclosingScrollView] contentView]; - if (![view window]) - return; // skip the highlight if we have no window (e.g. hidden tab) - - if (!_currentHighlight) { - _currentHighlight = [[WebNodeHighlight alloc] initWithTargetView:view inspectorController:[_inspectedWebView page]->inspectorController()]; - [_currentHighlight setDelegate:self]; - [_currentHighlight attach]; - } else - [[_currentHighlight highlightView] setNeedsDisplay:YES]; -} + if (_destroyingInspectorView) + return; + _destroyingInspectorView = YES; -- (void)hideHighlight -{ - [_currentHighlight detach]; - [_currentHighlight setDelegate:nil]; - [_currentHighlight release]; - _currentHighlight = nil; + if (_attachedToInspectedWebView) + [self close]; + _visible = NO; + [_inspectedWebView page]->inspectorController()->disconnectFrontend(); + [_webView close]; } #pragma mark - @@ -496,3 +505,60 @@ void WebInspectorClient::inspectorWindowObjectCleared() } @end + + +#pragma mark - + +@implementation WebNodeHighlighter +- (id)initWithInspectedWebView:(WebView *)webView +{ + // Don't retain to avoid a circular reference + _inspectedWebView = webView; + return self; +} + +- (void)dealloc +{ + ASSERT(!_currentHighlight); + [super dealloc]; +} + +#pragma mark - + +- (void)highlightNode:(DOMNode *)node +{ + // The scrollview's content view stays around between page navigations, so target it + NSView *view = [[[[[_inspectedWebView mainFrame] frameView] documentView] enclosingScrollView] contentView]; + if (![view window]) + return; // skip the highlight if we have no window (e.g. hidden tab) + + if (!_currentHighlight) { + _currentHighlight = [[WebNodeHighlight alloc] initWithTargetView:view inspectorController:[_inspectedWebView page]->inspectorController()]; + [_currentHighlight setDelegate:self]; + [_currentHighlight attach]; + } else + [[_currentHighlight highlightView] setNeedsDisplay:YES]; +} + +- (void)hideHighlight +{ + [_currentHighlight detach]; + [_currentHighlight setDelegate:nil]; + [_currentHighlight release]; + _currentHighlight = nil; +} + +#pragma mark - +#pragma mark WebNodeHighlight delegate + +- (void)didAttachWebNodeHighlight:(WebNodeHighlight *)highlight +{ + [_inspectedWebView setCurrentNodeHighlight:highlight]; +} + +- (void)willDetachWebNodeHighlight:(WebNodeHighlight *)highlight +{ + [_inspectedWebView setCurrentNodeHighlight:nil]; +} + +@end diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.m b/WebKit/mac/WebCoreSupport/WebSystemInterface.m index 7f4effd..b792707 100644 --- a/WebKit/mac/WebCoreSupport/WebSystemInterface.m +++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.m @@ -45,6 +45,7 @@ void InitWebCoreSystemInterface(void) INIT(AdvanceDefaultButtonPulseAnimation); INIT(CGContextGetShouldSmoothFonts); INIT(CopyCONNECTProxyResponse); + INIT(CopyNSURLResponseStatusLine); INIT(CreateCustomCFReadStream); INIT(CreateNSURLConnectionDelegateProxy); INIT(DrawCapsLockIndicator); @@ -89,6 +90,7 @@ void InitWebCoreSystemInterface(void) INIT(QTMovieGetType); INIT(QTMovieHasClosedCaptions); INIT(QTMovieSetShowClosedCaptions); + INIT(QTMovieSelectPreferredAlternates); INIT(QTMovieViewSetDrawSynchronously); #ifndef BUILDING_ON_TIGER diff --git a/WebKit/mac/WebCoreSupport/WebViewFactory.mm b/WebKit/mac/WebCoreSupport/WebViewFactory.mm index 2607f18..fd6d5b0 100644 --- a/WebKit/mac/WebCoreSupport/WebViewFactory.mm +++ b/WebKit/mac/WebCoreSupport/WebViewFactory.mm @@ -640,6 +640,16 @@ return nil; } +- (NSString *)missingPluginText +{ + return UI_STRING("Missing Plug-in", "Label text to be used when a plugin is missing"); +} + +- (NSString *)crashedPluginText +{ + return UI_STRING("Plug-in Failure", "Label text to be used if plugin host process has crashed"); +} + - (NSString *)multipleFileUploadTextForNumberOfFiles:(unsigned)numberOfFiles { return [NSString stringWithFormat:UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles]; diff --git a/WebKit/mac/WebInspector/WebInspector.mm b/WebKit/mac/WebInspector/WebInspector.mm index 258dd01..9b17459 100644 --- a/WebKit/mac/WebInspector/WebInspector.mm +++ b/WebKit/mac/WebInspector/WebInspector.mm @@ -175,14 +175,10 @@ using namespace WebCore; - (void)attach:(id)sender { - if (Page* page = core(_webView)) - page->inspectorController()->attachWindow(); } - (void)detach:(id)sender { - if (Page* page = core(_webView)) - page->inspectorController()->detachWindow(); } - (void)evaluateInFrontend:(id)sender callId:(long)callId script:(NSString *)script diff --git a/WebKit/mac/WebInspector/WebInspectorPrivate.h b/WebKit/mac/WebInspector/WebInspectorPrivate.h index c82bb92..d18f804 100644 --- a/WebKit/mac/WebInspector/WebInspectorPrivate.h +++ b/WebKit/mac/WebInspector/WebInspectorPrivate.h @@ -28,7 +28,7 @@ // This header contains the WebInspector SPI. -#import "WebInspector.h" +#import <WebKit/WebInspector.h> @interface WebInspector (WebPrivate) - (void)evaluateInFrontend:(id)sender callId:(long)callId script:(NSString *)script; diff --git a/WebKit/mac/WebKit.exp b/WebKit/mac/WebKit.exp index 904f389..d14d805 100644 --- a/WebKit/mac/WebKit.exp +++ b/WebKit/mac/WebKit.exp @@ -35,6 +35,7 @@ .objc_class_name_WebStringTruncator .objc_class_name_WebTextIterator .objc_class_name_WebURLsWithTitles +.objc_class_name_WebUserContentURLPattern .objc_class_name_WebView .objc_class_name_WebWorkersPrivate _HIWebViewCreate @@ -120,4 +121,6 @@ _WebViewDidEndEditingNotification _WebViewProgressEstimateChangedNotification _WebViewProgressFinishedNotification _WebViewProgressStartedNotification +__WebHTMLViewPrintingMaximumShrinkFactor +__WebHTMLViewPrintingMinimumShrinkFactor __WebViewDidStartAcceleratedCompositingNotification diff --git a/WebKit/mac/WebKitPrefix.h b/WebKit/mac/WebKitPrefix.h index 2a894e6..fe0f214 100644 --- a/WebKit/mac/WebKitPrefix.h +++ b/WebKit/mac/WebKitPrefix.h @@ -72,7 +72,7 @@ typedef float CGFloat; #include <wtf/Platform.h> -#include "EmptyProtocolDefinitions.h" +#include <WebCore/EmptyProtocolDefinitions.h> /* WebKit has no way to pull settings from WebCore/config.h for now */ /* so we assume WebKit is always being compiled on top of JavaScriptCore */ diff --git a/WebKit/mac/WebView/WebArchive.mm b/WebKit/mac/WebView/WebArchive.mm index 89c8335..86e29c8 100644 --- a/WebKit/mac/WebView/WebArchive.mm +++ b/WebKit/mac/WebView/WebArchive.mm @@ -239,13 +239,13 @@ static BOOL isArrayOfClass(id object, Class elementClass) @try { id object = [decoder decodeObjectForKey:WebMainResourceKey]; if ([object isKindOfClass:[WebResource class]]) - mainResource = [object retain]; + mainResource = object; object = [decoder decodeObjectForKey:WebSubresourcesKey]; if (isArrayOfClass(object, [WebResource class])) - subresources = [object retain]; + subresources = object; object = [decoder decodeObjectForKey:WebSubframeArchivesKey]; if (isArrayOfClass(object, [WebArchive class])) - subframeArchives = [object retain]; + subframeArchives = object; } @catch(id) { [self release]; return nil; diff --git a/WebKit/mac/WebView/WebDocumentPrivate.h b/WebKit/mac/WebView/WebDocumentPrivate.h index f09d3bd..a495e4b 100644 --- a/WebKit/mac/WebView/WebDocumentPrivate.h +++ b/WebKit/mac/WebView/WebDocumentPrivate.h @@ -30,6 +30,7 @@ #import <WebKit/WebHTMLView.h> @class DOMDocument; +@class PDFDocument; @protocol WebDocumentImage <NSObject> - (NSImage *)image; @@ -64,6 +65,10 @@ - (NSView *)selectionView; @end +@protocol WebDocumentPDF <WebDocumentText> +- (PDFDocument *)PDFDocument; +@end + @protocol WebDocumentIncrementalSearching /*! @method searchFor:direction:caseSensitive:wrap:startInSelection: diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.h b/WebKit/mac/WebView/WebDynamicScrollBarsView.h index 15ed7e4..c289a04 100644 --- a/WebKit/mac/WebView/WebDynamicScrollBarsView.h +++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.h @@ -1,53 +1,61 @@ /* - * Copyright (C) 2005, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. - * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. */ // This is a Private header (containing SPI), despite the fact that its name // does not contain the word Private. -// This was once used by Safari, but has not been for a long time. +#import <AppKit/NSScrollView.h> // FIXME: <rdar://problem/5898985> Mail currently expects this header to define WebCoreScrollbarAlwaysOn. extern const int WebCoreScrollbarAlwaysOn; +struct WebDynamicScrollBarsViewPrivate; @interface WebDynamicScrollBarsView : NSScrollView { - int hScroll; // FIXME: Should be WebCore::ScrollbarMode if this was an ObjC++ header. - int vScroll; // Ditto. - BOOL hScrollModeLocked; - BOOL vScrollModeLocked; - BOOL suppressLayout; - BOOL suppressScrollers; - BOOL inUpdateScrollers; - BOOL verticallyPinnedByPreviousWheelEvent; - BOOL horizontallyPinnedByPreviousWheelEvent; - unsigned inUpdateScrollersLayoutPass; +@private + struct WebDynamicScrollBarsViewPrivate *_private; + +#ifndef __OBJC2__ + // We need to pad the class out to its former size. See <rdar://problem/7814899> for more information. + char padding[16]; +#endif } // This was originally added for Safari's benefit, but Safari has not used it for a long time. // Perhaps it can be removed. - (void)setAllowsHorizontalScrolling:(BOOL)flag; + +// Determines whether the scrollers should be drawn outside of the content (as in normal scroll views) +// or should overlap the content. +- (void)setAllowsScrollersToOverlapContent:(BOOL)flag; + +// These methods hide the scrollers in a way that does not prevent scrolling. +- (void)setAlwaysHideHorizontalScroller:(BOOL)flag; +- (void)setAlwaysHideVerticalScroller:(BOOL)flag; + +// These methods return YES if the scrollers are visible, or if the only reason that they are not +// visible is that they have been suppressed by setAlwaysHideHorizontal/VerticalScroller:. +- (BOOL)horizontalScrollingAllowed; +- (BOOL)verticalScrollingAllowed; @end diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm index b4424e1..3aaea46 100644 --- a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm +++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm @@ -1,29 +1,26 @@ /* - * Copyright (C) 2005, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. - * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. */ #import "WebDynamicScrollBarsViewInternal.h" @@ -41,31 +38,150 @@ using namespace WebCore; // FIXME: <rdar://problem/5898985> Mail expects a constant of this name to exist. const int WebCoreScrollbarAlwaysOn = ScrollbarAlwaysOn; +#ifndef __OBJC2__ +// In <rdar://problem/7814899> we saw crashes because WebDynamicScrollBarsView increased in size, breaking ABI compatiblity. +COMPILE_ASSERT(sizeof(WebDynamicScrollBarsView) == 0x8c, WebDynamicScrollBarsView_is_expected_size); +#endif + +struct WebDynamicScrollBarsViewPrivate { + unsigned inUpdateScrollersLayoutPass; + + WebCore::ScrollbarMode hScroll; + WebCore::ScrollbarMode vScroll; + + bool hScrollModeLocked; + bool vScrollModeLocked; + bool suppressLayout; + bool suppressScrollers; + bool inUpdateScrollers; + bool verticallyPinnedByPreviousWheelEvent; + bool horizontallyPinnedByPreviousWheelEvent; + + bool allowsScrollersToOverlapContent; + bool alwaysHideHorizontalScroller; + bool alwaysHideVerticalScroller; + bool horizontalScrollingAllowedButScrollerHidden; + bool verticalScrollingAllowedButScrollerHidden; +}; + @implementation WebDynamicScrollBarsView +- (id)initWithFrame:(NSRect)frame +{ + if (!(self = [super initWithFrame:frame])) + return nil; + + _private = new WebDynamicScrollBarsViewPrivate; + memset(_private, 0, sizeof(WebDynamicScrollBarsViewPrivate)); + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + if (!(self = [super initWithCoder:aDecoder])) + return nil; + + _private = new WebDynamicScrollBarsViewPrivate; + memset(_private, 0, sizeof(WebDynamicScrollBarsViewPrivate)); + return self; +} + +- (void)dealloc +{ + delete _private; + [super dealloc]; +} + +- (void)finalize +{ + delete _private; + [super finalize]; +} + - (void)setAllowsHorizontalScrolling:(BOOL)flag { - if (hScrollModeLocked) + if (_private->hScrollModeLocked) return; - if (flag && hScroll == ScrollbarAlwaysOff) - hScroll = ScrollbarAuto; - else if (!flag && hScroll != ScrollbarAlwaysOff) - hScroll = ScrollbarAlwaysOff; + if (flag && _private->hScroll == ScrollbarAlwaysOff) + _private->hScroll = ScrollbarAuto; + else if (!flag && _private->hScroll != ScrollbarAlwaysOff) + _private->hScroll = ScrollbarAlwaysOff; [self updateScrollers]; } +- (void)setAllowsScrollersToOverlapContent:(BOOL)flag +{ + if (_private->allowsScrollersToOverlapContent == flag) + return; + + _private->allowsScrollersToOverlapContent = flag; + + [[self contentView] setFrame:[self contentViewFrame]]; + [[self documentView] setNeedsLayout:YES]; + [[self documentView] layout]; +} + +- (void)setAlwaysHideHorizontalScroller:(BOOL)shouldBeHidden +{ + if (_private->alwaysHideHorizontalScroller == shouldBeHidden) + return; + + _private->alwaysHideHorizontalScroller = shouldBeHidden; + [self updateScrollers]; +} + +- (void)setAlwaysHideVerticalScroller:(BOOL)shouldBeHidden +{ + if (_private->alwaysHideVerticalScroller == shouldBeHidden) + return; + + _private->alwaysHideVerticalScroller = shouldBeHidden; + [self updateScrollers]; +} + +- (BOOL)horizontalScrollingAllowed +{ + return _private->horizontalScrollingAllowedButScrollerHidden || [self hasHorizontalScroller]; +} + +- (BOOL)verticalScrollingAllowed +{ + return _private->verticalScrollingAllowedButScrollerHidden || [self hasVerticalScroller]; +} + @end @implementation WebDynamicScrollBarsView (WebInternal) +- (NSRect)contentViewFrame +{ + NSRect frame = [[self contentView] frame]; + + if ([self hasHorizontalScroller]) + frame.size.height = (_private->allowsScrollersToOverlapContent ? NSMaxY([[self horizontalScroller] frame]) : NSMinY([[self horizontalScroller] frame])); + if ([self hasVerticalScroller]) + frame.size.width = (_private->allowsScrollersToOverlapContent ? NSMaxX([[self verticalScroller] frame]) : NSMinX([[self verticalScroller] frame])); + return frame; +} + +- (void)tile +{ + [super tile]; + + // [super tile] sets the contentView size so that it does not overlap with the scrollers, + // we want to re-set the contentView to overlap scrollers before displaying. + if (_private->allowsScrollersToOverlapContent) + [[self contentView] setFrame:[self contentViewFrame]]; +} + - (void)setSuppressLayout:(BOOL)flag; { - suppressLayout = flag; + _private->suppressLayout = flag; } - (void)setScrollBarsSuppressed:(BOOL)suppressed repaintOnUnsuppress:(BOOL)repaint { - suppressScrollers = suppressed; + _private->suppressScrollers = suppressed; // This code was originally changes for a Leopard performance imporvement. We decided to // ifdef it to fix correctness issues on Tiger documented in <rdar://problem/5441823>. @@ -74,13 +190,13 @@ const int WebCoreScrollbarAlwaysOn = ScrollbarAlwaysOn; [[self verticalScroller] setNeedsDisplay:NO]; [[self horizontalScroller] setNeedsDisplay:NO]; } - + if (!suppressed && repaint) [super reflectScrolledClipView:[self contentView]]; #else - if (suppressed || repaint) { - [[self verticalScroller] setNeedsDisplay: !suppressed]; - [[self horizontalScroller] setNeedsDisplay: !suppressed]; + if (suppressed || repaint) { + [[self verticalScroller] setNeedsDisplay:!suppressed]; + [[self horizontalScroller] setNeedsDisplay:!suppressed]; } #endif } @@ -94,42 +210,50 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; // If we came in here with the view already needing a layout, then go ahead and do that // first. (This will be the common case, e.g., when the page changes due to window resizing for example). // This layout will not re-enter updateScrollers and does not count towards our max layout pass total. - if (!suppressLayout && !suppressScrollers && [documentView isKindOfClass:[WebHTMLView class]]) { + if (!_private->suppressLayout && !_private->suppressScrollers && [documentView isKindOfClass:[WebHTMLView class]]) { WebHTMLView* htmlView = (WebHTMLView*)documentView; if ([htmlView _needsLayout]) { - inUpdateScrollers = YES; + _private->inUpdateScrollers = YES; [(id <WebDocumentView>)documentView layout]; - inUpdateScrollers = NO; + _private->inUpdateScrollers = NO; } } BOOL hasHorizontalScroller = [self hasHorizontalScroller]; BOOL hasVerticalScroller = [self hasVerticalScroller]; - + BOOL newHasHorizontalScroller = hasHorizontalScroller; BOOL newHasVerticalScroller = hasVerticalScroller; - + if (!documentView) { newHasHorizontalScroller = NO; newHasVerticalScroller = NO; - } + } - if (hScroll != ScrollbarAuto) - newHasHorizontalScroller = (hScroll == ScrollbarAlwaysOn); - if (vScroll != ScrollbarAuto) - newHasVerticalScroller = (vScroll == ScrollbarAlwaysOn); - - if (!documentView || suppressLayout || suppressScrollers || (hScroll != ScrollbarAuto && vScroll != ScrollbarAuto)) { - inUpdateScrollers = YES; + if (_private->hScroll != ScrollbarAuto) + newHasHorizontalScroller = (_private->hScroll == ScrollbarAlwaysOn); + if (_private->vScroll != ScrollbarAuto) + newHasVerticalScroller = (_private->vScroll == ScrollbarAlwaysOn); + + if (!documentView || _private->suppressLayout || _private->suppressScrollers || (_private->hScroll != ScrollbarAuto && _private->vScroll != ScrollbarAuto)) { + _private->horizontalScrollingAllowedButScrollerHidden = newHasHorizontalScroller && _private->alwaysHideHorizontalScroller; + if (_private->horizontalScrollingAllowedButScrollerHidden) + newHasHorizontalScroller = NO; + + _private->verticalScrollingAllowedButScrollerHidden = newHasVerticalScroller && _private->alwaysHideVerticalScroller; + if (_private->verticalScrollingAllowedButScrollerHidden) + newHasVerticalScroller = NO; + + _private->inUpdateScrollers = YES; if (hasHorizontalScroller != newHasHorizontalScroller) [self setHasHorizontalScroller:newHasHorizontalScroller]; if (hasVerticalScroller != newHasVerticalScroller) [self setHasVerticalScroller:newHasVerticalScroller]; - if (suppressScrollers) { + if (_private->suppressScrollers) { [[self verticalScroller] setNeedsDisplay:NO]; [[self horizontalScroller] setNeedsDisplay:NO]; } - inUpdateScrollers = NO; + _private->inUpdateScrollers = NO; return; } @@ -139,42 +263,50 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; NSSize visibleSize = [self documentVisibleRect].size; NSSize frameSize = [self frame].size; - if (hScroll == ScrollbarAuto) { + if (_private->hScroll == ScrollbarAuto) { newHasHorizontalScroller = documentSize.width > visibleSize.width; - if (newHasHorizontalScroller && !inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width) + if (newHasHorizontalScroller && !_private->inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width) newHasHorizontalScroller = NO; } - - if (vScroll == ScrollbarAuto) { + + if (_private->vScroll == ScrollbarAuto) { newHasVerticalScroller = documentSize.height > visibleSize.height; - if (newHasVerticalScroller && !inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width) + if (newHasVerticalScroller && !_private->inUpdateScrollersLayoutPass && documentSize.height <= frameSize.height && documentSize.width <= frameSize.width) newHasVerticalScroller = NO; } // Unless in ScrollbarsAlwaysOn mode, if we ever turn one scrollbar off, always turn the other one off too. // Never ever try to both gain/lose a scrollbar in the same pass. - if (!newHasHorizontalScroller && hasHorizontalScroller && vScroll != ScrollbarAlwaysOn) + if (!newHasHorizontalScroller && hasHorizontalScroller && _private->vScroll != ScrollbarAlwaysOn) newHasVerticalScroller = NO; - if (!newHasVerticalScroller && hasVerticalScroller && hScroll != ScrollbarAlwaysOn) + if (!newHasVerticalScroller && hasVerticalScroller && _private->hScroll != ScrollbarAlwaysOn) + newHasHorizontalScroller = NO; + + _private->horizontalScrollingAllowedButScrollerHidden = newHasHorizontalScroller && _private->alwaysHideHorizontalScroller; + if (_private->horizontalScrollingAllowedButScrollerHidden) newHasHorizontalScroller = NO; + _private->verticalScrollingAllowedButScrollerHidden = newHasVerticalScroller && _private->alwaysHideVerticalScroller; + if (_private->verticalScrollingAllowedButScrollerHidden) + newHasVerticalScroller = NO; + if (hasHorizontalScroller != newHasHorizontalScroller) { - inUpdateScrollers = YES; + _private->inUpdateScrollers = YES; [self setHasHorizontalScroller:newHasHorizontalScroller]; - inUpdateScrollers = NO; + _private->inUpdateScrollers = NO; needsLayout = YES; } if (hasVerticalScroller != newHasVerticalScroller) { - inUpdateScrollers = YES; + _private->inUpdateScrollers = YES; [self setHasVerticalScroller:newHasVerticalScroller]; - inUpdateScrollers = NO; + _private->inUpdateScrollers = NO; needsLayout = YES; } - if (needsLayout && inUpdateScrollersLayoutPass < cMaxUpdateScrollbarsPass && + if (needsLayout && _private->inUpdateScrollersLayoutPass < cMaxUpdateScrollbarsPass && [documentView conformsToProtocol:@protocol(WebDocumentView)]) { - inUpdateScrollersLayoutPass++; + _private->inUpdateScrollersLayoutPass++; [(id <WebDocumentView>)documentView setNeedsLayout:YES]; [(id <WebDocumentView>)documentView layout]; NSSize newDocumentSize = [documentView frame].size; @@ -184,7 +316,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; // Recur manually. [self updateScrollers]; } - inUpdateScrollersLayoutPass--; + _private->inUpdateScrollersLayoutPass--; } } @@ -192,6 +324,10 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; - (void)reflectScrolledClipView:(NSClipView *)clipView { if (clipView == [self contentView]) { + // Prevent appearance of trails because of overlapping views + if (_private->allowsScrollersToOverlapContent) + [self setDrawsBackground:NO]; + // FIXME: This hack here prevents infinite recursion that takes place when we // gyrate between having a vertical scroller and not having one. A reproducible // case is clicking on the "the Policy Routing text" link at @@ -199,7 +335,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; // The underlying cause is some problem in the NSText machinery, but I was not // able to pin it down. NSGraphicsContext *currentContext = [NSGraphicsContext currentContext]; - if (!inUpdateScrollers && (!currentContext || [currentContext isDrawingToScreen])) + if (!_private->inUpdateScrollers && (!currentContext || [currentContext isDrawingToScreen])) [self updateScrollers]; } @@ -207,15 +343,15 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; // ifdef it to fix correctness issues on Tiger documented in <rdar://problem/5441823>. #ifndef BUILDING_ON_TIGER // Update the scrollers if they're not being suppressed. - if (!suppressScrollers) + if (!_private->suppressScrollers) [super reflectScrolledClipView:clipView]; #else - [super reflectScrolledClipView:clipView]; - - // Validate the scrollers if they're being suppressed. - if (suppressScrollers) { - [[self verticalScroller] setNeedsDisplay: NO]; - [[self horizontalScroller] setNeedsDisplay: NO]; + [super reflectScrolledClipView:clipView]; + + // Validate the scrollers if they're being suppressed. + if (_private->suppressScrollers) { + [[self verticalScroller] setNeedsDisplay:NO]; + [[self horizontalScroller] setNeedsDisplay:NO]; } #endif @@ -231,28 +367,28 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; - (BOOL)allowsHorizontalScrolling { - return hScroll != ScrollbarAlwaysOff; + return _private->hScroll != ScrollbarAlwaysOff; } - (BOOL)allowsVerticalScrolling { - return vScroll != ScrollbarAlwaysOff; + return _private->vScroll != ScrollbarAlwaysOff; } - (void)scrollingModes:(WebCore::ScrollbarMode*)hMode vertical:(WebCore::ScrollbarMode*)vMode { - *hMode = static_cast<ScrollbarMode>(hScroll); - *vMode = static_cast<ScrollbarMode>(vScroll); + *hMode = _private->hScroll; + *vMode = _private->vScroll; } - (ScrollbarMode)horizontalScrollingMode { - return static_cast<ScrollbarMode>(hScroll); + return _private->hScroll; } - (ScrollbarMode)verticalScrollingMode { - return static_cast<ScrollbarMode>(vScroll); + return _private->vScroll; } - (void)setHorizontalScrollingMode:(ScrollbarMode)horizontalMode andLock:(BOOL)lock @@ -274,13 +410,13 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; - (void)setScrollingModes:(ScrollbarMode)horizontalMode vertical:(ScrollbarMode)verticalMode andLock:(BOOL)lock { BOOL update = NO; - if (verticalMode != vScroll && !vScrollModeLocked) { - vScroll = verticalMode; + if (verticalMode != _private->vScroll && !_private->vScrollModeLocked) { + _private->vScroll = verticalMode; update = YES; } - if (horizontalMode != hScroll && !hScrollModeLocked) { - hScroll = horizontalMode; + if (horizontalMode != _private->hScroll && !_private->hScrollModeLocked) { + _private->hScroll = horizontalMode; update = YES; } @@ -293,27 +429,27 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; - (void)setHorizontalScrollingModeLocked:(BOOL)locked { - hScrollModeLocked = locked; + _private->hScrollModeLocked = locked; } - (void)setVerticalScrollingModeLocked:(BOOL)locked { - vScrollModeLocked = locked; + _private->vScrollModeLocked = locked; } - (void)setScrollingModesLocked:(BOOL)locked { - hScrollModeLocked = vScrollModeLocked = locked; + _private->hScrollModeLocked = _private->vScrollModeLocked = locked; } - (BOOL)horizontalScrollingModeLocked { - return hScrollModeLocked; + return _private->hScrollModeLocked; } - (BOOL)verticalScrollingModeLocked { - return vScrollModeLocked; + return _private->vScrollModeLocked; } - (BOOL)autoforwardsScrollWheelEvents @@ -325,8 +461,10 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; { float deltaX; float deltaY; + float wheelTicksX; + float wheelTicksY; BOOL isContinuous; - WKGetWheelEventDeltas(event, &deltaX, &deltaY, &isContinuous); + WKGetWheelEventDeltas(event, &deltaX, &deltaY, &wheelTicksX, &wheelTicksY, &isContinuous); BOOL isLatchingEvent = WKIsLatchingWheelEvent(event); @@ -336,7 +474,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; return; } - if (isLatchingEvent && !verticallyPinnedByPreviousWheelEvent) { + if (isLatchingEvent && !_private->verticallyPinnedByPreviousWheelEvent) { double verticalPosition = [[self verticalScroller] doubleValue]; if ((deltaY >= 0.0 && verticalPosition == 0.0) || (deltaY <= 0.0 && verticalPosition == 1.0)) return; @@ -347,7 +485,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; return; } - if (isLatchingEvent && !horizontallyPinnedByPreviousWheelEvent) { + if (isLatchingEvent && !_private->horizontallyPinnedByPreviousWheelEvent) { double horizontalPosition = [[self horizontalScroller] doubleValue]; if ((deltaX >= 0.0 && horizontalPosition == 0.0) || (deltaX <= 0.0 && horizontalPosition == 1.0)) return; @@ -364,8 +502,8 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; double verticalPosition = [[self verticalScroller] doubleValue]; double horizontalPosition = [[self horizontalScroller] doubleValue]; - verticallyPinnedByPreviousWheelEvent = (verticalPosition == 0.0 || verticalPosition == 1.0); - horizontallyPinnedByPreviousWheelEvent = (horizontalPosition == 0.0 || horizontalPosition == 1.0); + _private->verticallyPinnedByPreviousWheelEvent = (verticalPosition == 0.0 || verticalPosition == 1.0); + _private->horizontallyPinnedByPreviousWheelEvent = (horizontalPosition == 0.0 || horizontalPosition == 1.0); } [self release]; diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsViewInternal.h b/WebKit/mac/WebView/WebDynamicScrollBarsViewInternal.h index 312cf9d..40be88d 100644 --- a/WebKit/mac/WebView/WebDynamicScrollBarsViewInternal.h +++ b/WebKit/mac/WebView/WebDynamicScrollBarsViewInternal.h @@ -53,4 +53,6 @@ - (void)updateScrollers; - (void)setSuppressLayout:(BOOL)flag; +// Calculate the appropriate frame for the contentView based on allowsScrollersToOverlapContent. +- (NSRect)contentViewFrame; @end diff --git a/WebKit/mac/WebView/WebFrame.h b/WebKit/mac/WebView/WebFrame.h index a6cdebb..64015fd 100644 --- a/WebKit/mac/WebView/WebFrame.h +++ b/WebKit/mac/WebView/WebFrame.h @@ -213,5 +213,4 @@ bridge between the WebKit and JavaScriptCore APIs. */ - (JSGlobalContextRef)globalContext; - @end diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm index 267d319..b4169b6 100644 --- a/WebKit/mac/WebView/WebFrame.mm +++ b/WebKit/mac/WebView/WebFrame.mm @@ -39,6 +39,7 @@ #import "WebChromeClient.h" #import "WebDataSourceInternal.h" #import "WebDocumentLoaderMac.h" +#import "WebDynamicScrollBarsView.h" #import "WebFrameLoaderClient.h" #import "WebFrameViewInternal.h" #import "WebHTMLView.h" @@ -73,6 +74,7 @@ #import <WebCore/LegacyWebArchive.h> #import <WebCore/Page.h> #import <WebCore/PluginData.h> +#import <WebCore/PrintContext.h> #import <WebCore/RenderLayer.h> #import <WebCore/RenderPart.h> #import <WebCore/RenderView.h> @@ -581,22 +583,16 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) if (!documentView) return pages; - float currPageHeight = printHeight; - float docHeight = root->layer()->height(); float docWidth = root->layer()->width(); - float printWidth = docWidth/printWidthScaleFactor; - - // We need to give the part the opportunity to adjust the page height at each step. - for (float i = 0; i < docHeight; i += currPageHeight) { - float proposedBottom = min(docHeight, i + printHeight); - view->adjustPageHeight(&proposedBottom, i, proposedBottom, i); - currPageHeight = max(1.0f, proposedBottom - i); - for (float j = 0; j < docWidth; j += printWidth) { - NSValue* val = [NSValue valueWithRect: NSMakeRect(j, i, printWidth, currPageHeight)]; - [pages addObject: val]; - } - } - + float printWidth = docWidth / printWidthScaleFactor; + + PrintContext printContext(_private->coreFrame); + printContext.computePageRectsWithPageSize(FloatSize(printWidth, printHeight), true); + + const Vector<IntRect>& pageRects = printContext.pageRects(); + const size_t pageCount = pageRects.size(); + for (size_t pageNumber = 0; pageNumber < pageCount; ++pageNumber) + [pages addObject: [NSValue valueWithRect: NSRect(pageRects[pageNumber])]]; return pages; } @@ -634,7 +630,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) return @""; JSLock lock(SilenceAssertionsOnly); - return String(result.toString(_private->coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec())); + return ustringToString(result.toString(_private->coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec())); } - (NSRect)_caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity @@ -965,7 +961,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) - (BOOL)_canProvideDocumentSource { Frame* frame = _private->coreFrame; - String mimeType = frame->loader()->responseMIMEType(); + String mimeType = frame->loader()->writer()->mimeType(); PluginData* pluginData = frame->page() ? frame->page()->pluginData() : 0; if (WebCore::DOMImplementation::isTextMIMEType(mimeType) || @@ -990,7 +986,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) bool userChosen = !encoding.isNull(); if (encoding.isNull()) encoding = textEncodingName; - _private->coreFrame->loader()->setEncoding(encoding, userChosen); + _private->coreFrame->loader()->writer()->setEncoding(encoding, userChosen); [self _addData:data]; } @@ -1267,7 +1263,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) return @""; JSLock lock(SilenceAssertionsOnly); - return String(result.toString(anyWorldGlobalObject->globalExec())); + return ustringToString(result.toString(anyWorldGlobalObject->globalExec())); } - (JSGlobalContextRef)_globalContextForScriptWorld:(WebScriptWorld *)world @@ -1281,6 +1277,48 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) return toGlobalRef(coreFrame->script()->globalObject(coreWorld)->globalExec()); } +- (void)setAllowsScrollersToOverlapContent:(BOOL)flag +{ + ASSERT([[[self frameView] _scrollView] isKindOfClass:[WebDynamicScrollBarsView class]]); + [(WebDynamicScrollBarsView *)[[self frameView] _scrollView] setAllowsScrollersToOverlapContent:flag]; +} + +- (void)setAlwaysHideHorizontalScroller:(BOOL)flag +{ + ASSERT([[[self frameView] _scrollView] isKindOfClass:[WebDynamicScrollBarsView class]]); + [(WebDynamicScrollBarsView *)[[self frameView] _scrollView] setAlwaysHideHorizontalScroller:flag]; +} +- (void)setAlwaysHideVerticalScroller:(BOOL)flag +{ + ASSERT([[[self frameView] _scrollView] isKindOfClass:[WebDynamicScrollBarsView class]]); + [(WebDynamicScrollBarsView *)[[self frameView] _scrollView] setAlwaysHideVerticalScroller:flag]; +} + +- (void)setAccessibleName:(NSString *)name +{ +#if HAVE(ACCESSIBILITY) + if (!AXObjectCache::accessibilityEnabled()) + return; + + RenderView* root = toRenderView(_private->coreFrame->document()->renderer()); + if (!root) + return; + + AccessibilityObject* rootObject = _private->coreFrame->document()->axObjectCache()->getOrCreate(root); + String strName(name); + rootObject->setAccessibleName(strName); +#endif +} + +- (NSString*)_layerTreeAsText +{ + Frame* coreFrame = _private->coreFrame; + if (!coreFrame) + return @""; + + return coreFrame->layerTreeAsText(); +} + @end @implementation WebFrame diff --git a/WebKit/mac/WebView/WebFramePrivate.h b/WebKit/mac/WebView/WebFramePrivate.h index 462686f..0bda966 100644 --- a/WebKit/mac/WebView/WebFramePrivate.h +++ b/WebKit/mac/WebView/WebFramePrivate.h @@ -120,4 +120,20 @@ typedef enum { - (NSMutableDictionary *)_cacheabilityDictionary; - (BOOL)_allowsFollowingLink:(NSURL *)URL; + +// Sets whether the scrollbars, if any, should be shown inside the document's border +// (thus overlapping some content) or outside the webView's border (default behavior). +// Changing this flag changes the size of the contentView and maintains the size of the frameView. +- (void)setAllowsScrollersToOverlapContent:(BOOL)flag; + +// Sets if the scrollbar is always hidden, regardless of other scrollbar visibility settings. +// This does not affect the scrollability of the document. +- (void)setAlwaysHideHorizontalScroller:(BOOL)flag; +- (void)setAlwaysHideVerticalScroller:(BOOL)flag; + +// Sets the name presented to accessibility clients for the web area object. +- (void)setAccessibleName:(NSString *)name; + +- (NSString*)_layerTreeAsText; + @end diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm index 422b605..9ded8e1 100644 --- a/WebKit/mac/WebView/WebFrameView.mm +++ b/WebKit/mac/WebView/WebFrameView.mm @@ -532,7 +532,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl { if ([self _scrollOverflowInDirection:ScrollUp granularity:ScrollByDocument]) return YES; - if (![self _hasScrollBars]) + if (![self _isScrollable]) return NO; NSPoint point = [[[self _scrollView] documentView] frame].origin; return [[self _contentView] _scrollTo:&point animate:YES]; @@ -542,7 +542,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl { if ([self _scrollOverflowInDirection:ScrollDown granularity:ScrollByDocument]) return YES; - if (![self _hasScrollBars]) + if (![self _isScrollable]) return NO; NSRect frame = [[[self _scrollView] documentView] frame]; NSPoint point = NSMakePoint(frame.origin.x, NSMaxY(frame)); @@ -554,7 +554,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl if ([self _scrollToBeginningOfDocument]) return; - if (WebFrameView *child = [self _largestChildWithScrollBars]) { + if (WebFrameView *child = [self _largestScrollableChild]) { if ([child _scrollToBeginningOfDocument]) return; } @@ -566,7 +566,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl if ([self _scrollToEndOfDocument]) return; - if (WebFrameView *child = [self _largestChildWithScrollBars]) { + if (WebFrameView *child = [self _largestScrollableChild]) { if ([child _scrollToEndOfDocument]) return; } @@ -619,8 +619,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByPage]) return YES; - if (![self _hasScrollBars]) - return [[self _largestChildWithScrollBars] _pageVertically:up]; + if (![self _isScrollable]) + return [[self _largestScrollableChild] _pageVertically:up]; float delta = [self _verticalPageScrollDistance]; return [self _scrollVerticallyBy:up ? -delta : delta]; @@ -631,8 +631,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByPage]) return YES; - if (![self _hasScrollBars]) - return [[self _largestChildWithScrollBars] _pageHorizontally:left]; + if (![self _isScrollable]) + return [[self _largestScrollableChild] _pageHorizontally:left]; float delta = [self _horizontalPageScrollDistance]; return [self _scrollHorizontallyBy:left ? -delta : delta]; @@ -643,8 +643,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByLine]) return YES; - if (![self _hasScrollBars]) - return [[self _largestChildWithScrollBars] _scrollLineVertically:up]; + if (![self _isScrollable]) + return [[self _largestScrollableChild] _scrollLineVertically:up]; float delta = [self _verticalKeyboardScrollDistance]; return [self _scrollVerticallyBy:up ? -delta : delta]; @@ -655,8 +655,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByLine]) return YES; - if (![self _hasScrollBars]) - return [[self _largestChildWithScrollBars] _scrollLineHorizontally:left]; + if (![self _isScrollable]) + return [[self _largestScrollableChild] _scrollLineHorizontally:left]; float delta = [self _horizontalKeyboardScrollDistance]; return [self _scrollHorizontallyBy:left ? -delta : delta]; @@ -730,7 +730,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl // Checking for a control will allow events to percolate // correctly when the focus is on a form control and we // are in full keyboard access mode. - if ((![self allowsScrolling] && ![self _largestChildWithScrollBars]) || [self _firstResponderIsFormControl]) { + if ((![self allowsScrolling] && ![self _largestScrollableChild]) || [self _firstResponderIsFormControl]) { callSuper = YES; break; } @@ -742,7 +742,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl callSuper = NO; break; case NSPageUpFunctionKey: - if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) { + if (![self allowsScrolling] && ![self _largestScrollableChild]) { callSuper = YES; break; } @@ -750,7 +750,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl callSuper = NO; break; case NSPageDownFunctionKey: - if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) { + if (![self allowsScrolling] && ![self _largestScrollableChild]) { callSuper = YES; break; } @@ -758,7 +758,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl callSuper = NO; break; case NSHomeFunctionKey: - if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) { + if (![self allowsScrolling] && ![self _largestScrollableChild]) { callSuper = YES; break; } @@ -766,7 +766,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl callSuper = NO; break; case NSEndFunctionKey: - if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) { + if (![self allowsScrolling] && ![self _largestScrollableChild]) { callSuper = YES; break; } @@ -779,7 +779,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl callSuper = YES; break; } - if ((![self allowsScrolling] && ![self _largestChildWithScrollBars]) || + if ((![self allowsScrolling] && ![self _largestScrollableChild]) || [[[self window] firstResponder] isKindOfClass:[NSPopUpButton class]]) { // Let arrow keys go through to pop up buttons // <rdar://problem/3455910>: hitting up or down arrows when focus is on a @@ -802,7 +802,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl callSuper = YES; break; } - if ((![self allowsScrolling] && ![self _largestChildWithScrollBars]) || + if ((![self allowsScrolling] && ![self _largestScrollableChild]) || [[[self window] firstResponder] isKindOfClass:[NSPopUpButton class]]) { // Let arrow keys go through to pop up buttons // <rdar://problem/3455910>: hitting up or down arrows when focus is on a @@ -834,7 +834,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl [self _goBack]; } else { // Now check scrolling related keys. - if ((![self allowsScrolling] && ![self _largestChildWithScrollBars])) { + if ((![self allowsScrolling] && ![self _largestScrollableChild])) { callSuper = YES; break; } @@ -862,7 +862,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl [self _goForward]; } else { // Now check scrolling related keys. - if ((![self allowsScrolling] && ![self _largestChildWithScrollBars])) { + if ((![self allowsScrolling] && ![self _largestScrollableChild])) { callSuper = YES; break; } @@ -939,14 +939,52 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl return frame.size.height * frame.size.width; } +- (BOOL)_isScrollable +{ + WebDynamicScrollBarsView *scrollView = [self _scrollView]; + return [scrollView horizontalScrollingAllowed] || [scrollView verticalScrollingAllowed]; +} + +- (WebFrameView *)_largestScrollableChild +{ + WebFrameView *largest = nil; + NSArray *frameChildren = [[self webFrame] childFrames]; + + unsigned i; + for (i=0; i < [frameChildren count]; i++) { + WebFrameView *childFrameView = [[frameChildren objectAtIndex:i] frameView]; + WebFrameView *scrollableFrameView = [childFrameView _isScrollable] ? childFrameView : [childFrameView _largestScrollableChild]; + if (!scrollableFrameView) + continue; + + // Some ads lurk in child frames of zero width and height, see radar 4406994. These don't count as scrollable. + // Maybe someday we'll discover that this minimum area check should be larger, but this covers the known cases. + float area = [scrollableFrameView _area]; + if (area < 1.0) + continue; + + if (!largest || (area > [largest _area])) { + largest = scrollableFrameView; + } + } + + return largest; +} + - (BOOL)_hasScrollBars { + // FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit + // clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed + // once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier. NSScrollView *scrollView = [self _scrollView]; return [scrollView hasHorizontalScroller] || [scrollView hasVerticalScroller]; } - (WebFrameView *)_largestChildWithScrollBars { + // FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit + // clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed + // once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier. WebFrameView *largest = nil; NSArray *frameChildren = [[self webFrame] childFrames]; diff --git a/WebKit/mac/WebView/WebFrameViewPrivate.h b/WebKit/mac/WebView/WebFrameViewPrivate.h index 47c053e..93d36ec 100644 --- a/WebKit/mac/WebView/WebFrameViewPrivate.h +++ b/WebKit/mac/WebView/WebFrameViewPrivate.h @@ -30,13 +30,19 @@ @interface WebFrameView (WebPrivate) +// FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit +// clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed +// once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier. /*! @method _largestChildWithScrollBars @abstract Of the child WebFrameViews that are displaying scroll bars, determines which has the largest area. @result A child WebFrameView that is displaying scroll bars, or nil if none. -*/ + */ - (WebFrameView *)_largestChildWithScrollBars; +// FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit +// clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed +// once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier. /*! @method _hasScrollBars @result YES if at least one scroll bar is currently displayed @@ -44,6 +50,21 @@ - (BOOL)_hasScrollBars; /*! + @method _largestScrollableChild + @abstract Of the child WebFrameViews that allow scrolling, determines which has the largest area. + @result A child WebFrameView that is scrollable, or nil if none. + */ +- (WebFrameView *)_largestScrollableChild; + +/*! + @method _isScrollable + @result YES if scrolling is currently possible, whether or not scroll bars are currently showing. This + differs from -allowsScrolling in that the latter method only checks whether scrolling has been + explicitly disallowed via a call to setAllowsScrolling:NO. + */ +- (BOOL)_isScrollable; + +/*! @method _contentView @result The content view (NSClipView) of the WebFrameView's scroll view. */ diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm index 3aaa914..2684004 100644 --- a/WebKit/mac/WebView/WebHTMLRepresentation.mm +++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm @@ -302,7 +302,8 @@ static HTMLInputElement* inputElementFromDOMElement(DOMElement* element) { HTMLInputElement* inputElement = inputElementFromDOMElement(element); return inputElement - && inputElement->inputType() == HTMLInputElement::TEXT + && inputElement->isTextField() + && inputElement->inputType() != HTMLInputElement::PASSWORD && inputElement->autoComplete(); } diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm index aa65920..daeeb10 100644 --- a/WebKit/mac/WebView/WebHTMLView.mm +++ b/WebKit/mac/WebView/WebHTMLView.mm @@ -148,26 +148,52 @@ using namespace std; - (BOOL)receivedUnhandledCommand; @end -static IMP oldSetCursorIMP = NULL; +// if YES, do the standard NSView hit test (which can't give the right result when HTML overlaps a view) +static BOOL forceNSViewHitTest; -#ifdef BUILDING_ON_TIGER +// if YES, do the "top WebHTMLView" hit test (which we'd like to do all the time but can't because of Java requirements [see bug 4349721]) +static BOOL forceWebHTMLViewHitTest; + +static WebHTMLView *lastHitView; + +static bool needsCursorRectsSupportAtPoint(NSWindow* window, NSPoint point) +{ + forceNSViewHitTest = YES; + NSView* view = [[window _web_borderView] hitTest:point]; + forceNSViewHitTest = NO; + + // WebHTMLView doesn't use cursor rects. + if ([view isKindOfClass:[WebHTMLView class]]) + return false; + + // Neither do NPAPI plug-ins. + if ([view isKindOfClass:[WebBaseNetscapePluginView class]]) + return false; + + // Non-Web content, WebPDFView, and WebKit plug-ins use normal cursor handling. + return true; +} + +#ifndef BUILDING_ON_TIGER + +static IMP oldSetCursorForMouseLocationIMP; + +// Overriding an internal method is a hack; <rdar://problem/7662987> tracks finding a better solution. +static void setCursor(NSWindow* self, SEL cmd, NSPoint point) +{ + if (needsCursorRectsSupportAtPoint(self, point)) + oldSetCursorForMouseLocationIMP(self, cmd, point); +} + +#else -static IMP oldResetCursorRectsIMP = NULL; +static IMP oldResetCursorRectsIMP; +static IMP oldSetCursorIMP; static BOOL canSetCursor = YES; static void resetCursorRects(NSWindow* self, SEL cmd) { - NSPoint point = [self mouseLocationOutsideOfEventStream]; - NSView* view = [[self _web_borderView] hitTest:point]; - if ([view isKindOfClass:[WebHTMLView class]]) { - WebHTMLView *htmlView = (WebHTMLView*)view; - NSPoint localPoint = [htmlView convertPoint:point fromView:nil]; - NSDictionary *dict = [htmlView elementAtPoint:localPoint allowShadowContent:NO]; - DOMElement *element = [dict objectForKey:WebElementDOMNodeKey]; - if (![element isKindOfClass:[DOMHTMLAppletElement class]] && ![element isKindOfClass:[DOMHTMLObjectElement class]] && - ![element isKindOfClass:[DOMHTMLEmbedElement class]]) - canSetCursor = NO; - } + canSetCursor = needsCursorRectsSupportAtPoint(self, [self mouseLocationOutsideOfEventStream]); oldResetCursorRectsIMP(self, cmd); canSetCursor = YES; } @@ -178,23 +204,6 @@ static void setCursor(NSCursor* self, SEL cmd) oldSetCursorIMP(self, cmd); } -#else - -static void setCursor(NSWindow* self, SEL cmd, NSPoint point) -{ - NSView* view = [[self _web_borderView] hitTest:point]; - if ([view isKindOfClass:[WebHTMLView class]]) { - WebHTMLView *htmlView = (WebHTMLView*)view; - NSPoint localPoint = [htmlView convertPoint:point fromView:nil]; - NSDictionary *dict = [htmlView elementAtPoint:localPoint allowShadowContent:NO]; - DOMElement *element = [dict objectForKey:WebElementDOMNodeKey]; - if (![element isKindOfClass:[DOMHTMLAppletElement class]] && ![element isKindOfClass:[DOMHTMLObjectElement class]] && - ![element isKindOfClass:[DOMHTMLEmbedElement class]]) - return; - } - oldSetCursorIMP(self, cmd, point); -} - #endif extern "C" { @@ -241,13 +250,13 @@ extern NSString *NSTextInputReplacementRangeAttributeName; // print in IE and Camino. This lets them use fewer sheets than they // would otherwise, which is presumably why other browsers do this. // Wide pages will be scaled down more than this. -#define PrintingMinimumShrinkFactor 1.25f +const float _WebHTMLViewPrintingMinimumShrinkFactor = 1.25; // This number determines how small we are willing to reduce the page content // in order to accommodate the widest line. If the page would have to be // reduced smaller to make the widest line fit, we just clip instead (this // behavior matches MacIE and Mozilla, at least) -#define PrintingMaximumShrinkFactor 2.0f +const float _WebHTMLViewPrintingMaximumShrinkFactor = 2; // This number determines how short the last printed page of a multi-page print session // can be before we try to shrink the scale in order to reduce the number of pages, and @@ -294,14 +303,6 @@ extern NSString *NSTextInputReplacementRangeAttributeName; @implementation WebCoreScrollView @end -// if YES, do the standard NSView hit test (which can't give the right result when HTML overlaps a view) -static BOOL forceNSViewHitTest; - -// if YES, do the "top WebHTMLView" hit test (which we'd like to do all the time but can't because of Java requirements [see bug 4349721]) -static BOOL forceWebHTMLViewHitTest; - -static WebHTMLView *lastHitView; - // We need this to be able to safely reference the CachedImage for the promised drag data static CachedResourceClient* promisedDataClient() { @@ -321,7 +322,6 @@ static CachedResourceClient* promisedDataClient() - (BOOL)_shouldInsertFragment:(DOMDocumentFragment *)fragment replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action; - (BOOL)_shouldInsertText:(NSString *)text replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action; - (BOOL)_shouldReplaceSelectionWithText:(NSString *)text givenAction:(WebViewInsertAction)action; -- (float)_calculatePrintHeight; - (DOMRange *)_selectedRange; - (BOOL)_shouldDeleteRange:(DOMRange *)range; - (NSView *)_hitViewForEvent:(NSEvent *)event; @@ -428,6 +428,9 @@ struct WebHTMLViewInterpretKeyEventsParameters { BOOL exposeInputContext; NSPoint lastScrollPosition; +#ifndef BUILDING_ON_TIGER + BOOL inScrollPositionChanged; +#endif WebPluginController *pluginController; @@ -490,20 +493,21 @@ static NSCellStateValue kit(TriState state) #ifndef BUILDING_ON_TIGER WebCoreObjCFinalizeOnMainThread(self); #endif - + +#ifndef BUILDING_ON_TIGER + if (!oldSetCursorForMouseLocationIMP) { + Method setCursorMethod = class_getInstanceMethod([NSWindow class], @selector(_setCursorForMouseLocation:)); + ASSERT(setCursorMethod); + oldSetCursorForMouseLocationIMP = method_setImplementation(setCursorMethod, (IMP)setCursor); + ASSERT(oldSetCursorForMouseLocationIMP); + } +#else if (!oldSetCursorIMP) { -#ifdef BUILDING_ON_TIGER Method setCursorMethod = class_getInstanceMethod([NSCursor class], @selector(set)); -#else - Method setCursorMethod = class_getInstanceMethod([NSWindow class], @selector(_setCursorForMouseLocation:)); -#endif ASSERT(setCursorMethod); - oldSetCursorIMP = method_setImplementation(setCursorMethod, (IMP)setCursor); ASSERT(oldSetCursorIMP); } - -#ifdef BUILDING_ON_TIGER if (!oldResetCursorRectsIMP) { Method resetCursorRectsMethod = class_getInstanceMethod([NSWindow class], @selector(resetCursorRects)); ASSERT(resetCursorRectsMethod); @@ -896,17 +900,6 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart) return [self _shouldInsertText:text replacingDOMRange:[self _selectedRange] givenAction:action]; } -// Calculate the vertical size of the view that fits on a single page -- (float)_calculatePrintHeight -{ - // Obtain the print info object for the current operation - NSPrintInfo *pi = [[NSPrintOperation currentOperation] printInfo]; - - // Calculate the page height in points - NSSize paperSize = [pi paperSize]; - return paperSize.height - [pi topMargin] - [pi bottomMargin]; -} - - (DOMRange *)_selectedRange { Frame* coreFrame = core([self _frame]); @@ -1169,8 +1162,15 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info) NSPoint origin = [[self superview] bounds].origin; if (!NSEqualPoints(_private->lastScrollPosition, origin)) { if (Frame* coreFrame = core([self _frame])) { - if (FrameView* coreView = coreFrame->view()) + if (FrameView* coreView = coreFrame->view()) { +#ifndef BUILDING_ON_TIGER + _private->inScrollPositionChanged = YES; +#endif coreView->scrollPositionChanged(); +#ifndef BUILDING_ON_TIGER + _private->inScrollPositionChanged = NO; +#endif + } } [_private->completionController endRevertingChange:NO moveLeft:NO]; @@ -1290,11 +1290,15 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info) // There are known cases where -viewWillDraw is not called on all views being drawn. // See <rdar://problem/6964278> for example. Performing layout at this point prevents us from // trying to paint without layout (which WebCore now refuses to do, instead bailing out without - // drawing at all), but we may still fail to update and regions dirtied by the layout which are + // drawing at all), but we may still fail to update any regions dirtied by the layout which are // not already dirty. if ([self _needsLayout]) { - LOG_ERROR("View needs layout. Either -viewWillDraw wasn't called or layout was invalidated during the display operation. Performing layout now."); - [self _web_layoutIfNeededRecursive]; + NSInteger rectCount; + [self getRectsBeingDrawn:0 count:&rectCount]; + if (rectCount) { + LOG_ERROR("View needs layout. Either -viewWillDraw wasn't called or layout was invalidated during the display operation. Performing layout now."); + [self _web_layoutIfNeededRecursive]; + } } #else // Because Tiger does not have viewWillDraw we need to do layout here. @@ -1421,6 +1425,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info) else if (forceWebHTMLViewHitTest) captureHitsOnSubviews = YES; else { + // FIXME: Why doesn't this include mouse entered/exited events, or other mouse button events? NSEvent *event = [[self window] currentEvent]; captureHitsOnSubviews = !([event type] == NSMouseMoved || [event type] == NSRightMouseDown @@ -2185,6 +2190,59 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info) #endif } +- (BOOL)_isInPrintMode +{ + return _private->printing; +} + +- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth shrinkToFit:(BOOL)shrinkToFit +{ + Frame* frame = core([self _frame]); + if (!frame) + return NO; + + float minLayoutWidth = 0; + float maxLayoutWidth = 0; + + // If we are a frameset just print with the layout we have onscreen, otherwise relayout + // according to the page width. + if (!frame->document() || !frame->document()->isFrameSet()) { + minLayoutWidth = shrinkToFit ? pageWidth * _WebHTMLViewPrintingMinimumShrinkFactor : pageWidth; + maxLayoutWidth = shrinkToFit ? pageWidth * _WebHTMLViewPrintingMaximumShrinkFactor : pageWidth; + } + [self _setPrinting:YES minimumPageWidth:minLayoutWidth maximumPageWidth:maxLayoutWidth adjustViewSize:YES]; + + return YES; +} + +- (void)_endPrintMode +{ + [self _setPrinting:NO minimumPageWidth:0 maximumPageWidth:0 adjustViewSize:YES]; +} + +- (CGFloat)_adjustedBottomOfPageWithTop:(CGFloat)top bottom:(CGFloat)bottom limit:(CGFloat)bottomLimit +{ + Frame* frame = core([self _frame]); + if (!frame) + return bottom; + + FrameView* view = frame->view(); + if (!view) + return bottom; + + float newBottom; + view->adjustPageHeight(&newBottom, top, bottom, bottomLimit); + +#ifdef __LP64__ + // If the new bottom is equal to the old bottom (when both are treated as floats), we just return the original + // bottom. This prevents rounding errors that can occur when converting newBottom to a double. + if (fabs(static_cast<float>(bottom) - newBottom) <= numeric_limits<float>::epsilon()) + return bottom; + else +#endif + return newBottom; +} + @end @implementation NSView (WebHTMLViewFileInternal) @@ -2522,7 +2580,13 @@ WEBCORE_COMMAND(yankAndSelect) - (id)validRequestorForSendType:(NSString *)sendType returnType:(NSString *)returnType { BOOL isSendTypeOK = !sendType || ([[self pasteboardTypesForSelection] containsObject:sendType] && [self _hasSelection]); - BOOL isReturnTypeOK = !returnType || ([[[self class] _insertablePasteboardTypes] containsObject:returnType] && [self _isEditable]); + BOOL isReturnTypeOK = NO; + if (!returnType) + isReturnTypeOK = YES; + else if ([[[self class] _insertablePasteboardTypes] containsObject:returnType] && [self _isEditable]) { + // We can insert strings in any editable context. We can insert other types, like images, only in rich edit contexts. + isReturnTypeOK = [returnType isEqualToString:NSStringPboardType] || [self _canEditRichly]; + } if (isSendTypeOK && isReturnTypeOK) return self; return [[self nextResponder] validRequestorForSendType:sendType returnType:returnType]; @@ -3130,11 +3194,29 @@ WEBCORE_COMMAND(yankAndSelect) return [[self _webView] drawsBackground]; } +#if !LOG_DISABLED - (void)setNeedsDisplay:(BOOL)flag { LOG(View, "%@ setNeedsDisplay:%@", self, flag ? @"YES" : @"NO"); [super setNeedsDisplay:flag]; } +#endif + +#ifndef BUILDING_ON_TIGER +- (void)setNeedsDisplayInRect:(NSRect)invalidRect +{ + if (_private->inScrollPositionChanged) { + // When scrolling, the dirty regions are adjusted for the scroll only + // after NSViewBoundsDidChangeNotification is sent. Translate the invalid + // rect to pre-scrolled coordinates in order to get the right dirty region + // after adjustment. See <rdar://problem/7678927>. + NSPoint origin = [[self superview] bounds].origin; + invalidRect.origin.x -= _private->lastScrollPosition.x - origin.x; + invalidRect.origin.y -= _private->lastScrollPosition.y - origin.y; + } + [super setNeedsDisplayInRect:invalidRect]; +} +#endif - (void)setNeedsLayout: (BOOL)flag { @@ -3720,7 +3802,7 @@ static BOOL isInPasswordField(Frame* coreFrame) } } - if (printing != _private->printing) { + if (printing || _private->printing) { [_private->pageRects release]; _private->pageRects = nil; _private->printing = printing; @@ -3751,21 +3833,8 @@ static BOOL isInPasswordField(Frame* coreFrame) if (!wasInPrintingMode) [self _setPrinting:YES minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:NO]; - float newBottomFloat = *newBottom; - if (Frame* frame = core([self _frame])) { - if (FrameView* view = frame->view()) - view->adjustPageHeight(&newBottomFloat, oldTop, oldBottom, bottomLimit); - } + *newBottom = [self _adjustedBottomOfPageWithTop:oldTop bottom:oldBottom limit:bottomLimit]; -#ifdef __LP64__ - // If the new bottom is equal to the old bottom (when both are treated as floats), we just copy - // oldBottom over to newBottom. This prevents rounding errors that can occur when converting newBottomFloat to a double. - if (fabs((float)oldBottom - newBottomFloat) <= numeric_limits<float>::epsilon()) - *newBottom = oldBottom; - else -#endif - *newBottom = newBottomFloat; - if (!wasInPrintingMode) { NSPrintOperation *currenPrintOperation = [NSPrintOperation currentOperation]; if (currenPrintOperation) @@ -3777,12 +3846,6 @@ static BOOL isInPasswordField(Frame* coreFrame) } } -- (float)_availablePaperWidthForPrintOperation:(NSPrintOperation *)printOperation -{ - NSPrintInfo *printInfo = [printOperation printInfo]; - return [printInfo paperSize].width - [printInfo leftMargin] - [printInfo rightMargin]; -} - - (float)_scaleFactorForPrintOperation:(NSPrintOperation *)printOperation { float viewWidth = NSWidth([self bounds]); @@ -3792,8 +3855,8 @@ static BOOL isInPasswordField(Frame* coreFrame) } float userScaleFactor = [printOperation _web_pageSetupScaleFactor]; - float maxShrinkToFitScaleFactor = 1.0f / PrintingMaximumShrinkFactor; - float shrinkToFitScaleFactor = [self _availablePaperWidthForPrintOperation:printOperation]/viewWidth; + float maxShrinkToFitScaleFactor = 1.0f / _WebHTMLViewPrintingMaximumShrinkFactor; + float shrinkToFitScaleFactor = [printOperation _web_availablePaperWidth] / viewWidth; float shrinkToAvoidOrphan = _private->avoidingPrintOrphan ? (1.0f / PrintingOrphanShrinkAdjustment) : 1.0f; return userScaleFactor * max(maxShrinkToFitScaleFactor, shrinkToFitScaleFactor) * shrinkToAvoidOrphan; } @@ -3813,9 +3876,9 @@ static BOOL isInPasswordField(Frame* coreFrame) [self _setPrinting:YES minimumPageWidth:pageWidth maximumPageWidth:pageWidth adjustViewSize:YES]; } -- (void)_endPrintMode +- (void)_endPrintModeAndRestoreWindowAutodisplay { - [self _setPrinting:NO minimumPageWidth:0.0f maximumPageWidth:0.0f adjustViewSize:YES]; + [self _endPrintMode]; [[self window] setAutodisplay:YES]; } @@ -3841,7 +3904,7 @@ static BOOL isInPasswordField(Frame* coreFrame) // cancelled, beginDocument and endDocument must not have been called, and we need to clean up // the print mode here. ASSERT(currentOperation == nil); - [self _endPrintMode]; + [self _endPrintModeAndRestoreWindowAutodisplay]; } } @@ -3851,22 +3914,12 @@ static BOOL isInPasswordField(Frame* coreFrame) // Must do this explicit display here, because otherwise the view might redisplay while the print // sheet was up, using printer fonts (and looking different). [self displayIfNeeded]; - [[self window] setAutodisplay:NO]; - - // If we are a frameset just print with the layout we have onscreen, otherwise relayout - // according to the paper size - float minLayoutWidth = 0.0f; - float maxLayoutWidth = 0.0f; - Frame* frame = core([self _frame]); - if (!frame) - return NO; - if (!frame->document() || !frame->document()->isFrameSet()) { - float paperWidth = [self _availablePaperWidthForPrintOperation:[NSPrintOperation currentOperation]]; - minLayoutWidth = paperWidth * PrintingMinimumShrinkFactor; - maxLayoutWidth = paperWidth * PrintingMaximumShrinkFactor; - } - [self _setPrinting:YES minimumPageWidth:minLayoutWidth maximumPageWidth:maxLayoutWidth adjustViewSize:YES]; // will relayout + [[self window] setAutodisplay:NO]; + NSPrintOperation *printOperation = [NSPrintOperation currentOperation]; + if (![self _beginPrintModeWithPageWidth:[printOperation _web_availablePaperWidth] shrinkToFit:YES]) + return NO; + // Certain types of errors, including invalid page ranges, can cause beginDocument and // endDocument to be skipped after we've put ourselves in print mode (see 4145905). In those cases // we need to get out of print mode without relying on any more callbacks from the printing mechanism. @@ -3884,9 +3937,9 @@ static BOOL isInPasswordField(Frame* coreFrame) float totalScaleFactor = [self _scaleFactorForPrintOperation:printOperation]; float userScaleFactor = [printOperation _web_pageSetupScaleFactor]; [_private->pageRects release]; - float fullPageHeight = floorf([self _calculatePrintHeight]/totalScaleFactor); - NSArray *newPageRects = [[self _frame] _computePageRectsWithPrintWidthScaleFactor:userScaleFactor - printHeight:fullPageHeight]; + float fullPageHeight = floorf([printOperation _web_availablePaperHeight] / totalScaleFactor); + WebFrame *frame = [self _frame]; + NSArray *newPageRects = [frame _computePageRectsWithPrintWidthScaleFactor:userScaleFactor printHeight:fullPageHeight]; // AppKit gets all messed up if you give it a zero-length page count (see 3576334), so if we // hit that case we'll pass along a degenerate 1 pixel square to print. This will print @@ -3899,8 +3952,7 @@ static BOOL isInPasswordField(Frame* coreFrame) // content onto one fewer page. If it does, use the adjusted scale. If not, use the original scale. float lastPageHeight = NSHeight([[newPageRects lastObject] rectValue]); if (lastPageHeight/fullPageHeight < LastPrintedPageOrphanRatio) { - NSArray *adjustedPageRects = [[self _frame] _computePageRectsWithPrintWidthScaleFactor:userScaleFactor - printHeight:fullPageHeight*PrintingOrphanShrinkAdjustment]; + NSArray *adjustedPageRects = [frame _computePageRectsWithPrintWidthScaleFactor:userScaleFactor printHeight:fullPageHeight * PrintingOrphanShrinkAdjustment]; // Use the adjusted rects only if the page count went down if ([adjustedPageRects count] < [newPageRects count]) { newPageRects = adjustedPageRects; @@ -3940,7 +3992,7 @@ static BOOL isInPasswordField(Frame* coreFrame) } @catch (NSException *localException) { // Exception during [super beginDocument] means that endDocument will not get called, // so we need to clean up our "print mode" here. - [self _endPrintMode]; + [self _endPrintModeAndRestoreWindowAutodisplay]; } } @@ -3948,7 +4000,7 @@ static BOOL isInPasswordField(Frame* coreFrame) { [super endDocument]; // Note sadly at this point [NSGraphicsContext currentContextDrawingToScreen] is still NO - [self _endPrintMode]; + [self _endPrintModeAndRestoreWindowAutodisplay]; } - (void)keyDown:(NSEvent *)event @@ -4986,22 +5038,21 @@ static BOOL writingDirectionKeyBindingsEnabled() { // FIXME: NSTextView bails out if becoming or resigning first responder, for which it has ivar flags. Not // sure if we need to do something similar. - + if (![self _canEdit]) return; - + NSWindow *window = [self window]; // FIXME: is this first-responder check correct? What happens if a subframe is editable and is first responder? - if ([NSApp keyWindow] != window || [window firstResponder] != self) + if (![window isKeyWindow] || [window firstResponder] != self) return; - + bool multipleFonts = false; NSFont *font = nil; if (Frame* coreFrame = core([self _frame])) { if (const SimpleFontData* fd = coreFrame->editor()->fontForSelection(multipleFonts)) font = fd->getNSFont(); } - // FIXME: for now, return a bogus font that distinguishes the empty selection from the non-empty // selection. We should be able to remove this once the rest of this code works properly. diff --git a/WebKit/mac/WebView/WebHTMLViewPrivate.h b/WebKit/mac/WebView/WebHTMLViewPrivate.h index cb121d8..3beb0d6 100644 --- a/WebKit/mac/WebView/WebHTMLViewPrivate.h +++ b/WebKit/mac/WebView/WebHTMLViewPrivate.h @@ -32,6 +32,12 @@ #define ENABLE_NETSCAPE_PLUGIN_API 1 #endif +#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 +#define WebCGFloat float +#else +#define WebCGFloat CGFloat +#endif + @class DOMDocumentFragment; @class DOMNode; @class DOMRange; @@ -46,6 +52,9 @@ - (void)paintHighlightForBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line; @end +extern const float _WebHTMLViewPrintingMinimumShrinkFactor; +extern const float _WebHTMLViewPrintingMaximumShrinkFactor; + @interface WebHTMLView (WebPrivate) + (NSArray *)supportedMIMETypes; @@ -124,7 +133,13 @@ // directly, this method must be called before paginating, or the computed height might be incorrect. // Typically this would be called from inside an override of -[NSView knowsPageRange:]. - (void)_layoutForPrinting; +- (WebCGFloat)_adjustedBottomOfPageWithTop:(WebCGFloat)top bottom:(WebCGFloat)bottom limit:(WebCGFloat)bottomLimit; +- (BOOL)_isInPrintMode; +- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth shrinkToFit:(BOOL)shrinkToFit; +- (void)_endPrintMode; - (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard; @end + +#undef WebCGFloat diff --git a/WebKit/mac/WebView/WebPDFView.h b/WebKit/mac/WebView/WebPDFView.h index bdd2a6e..e480a1b 100644 --- a/WebKit/mac/WebView/WebPDFView.h +++ b/WebKit/mac/WebView/WebPDFView.h @@ -32,7 +32,7 @@ @class PDFView; @class WebDataSource; -@interface WebPDFView : NSView <WebDocumentView, WebDocumentSearching, WebDocumentIncrementalSearching, WebMultipleTextMatches, WebDocumentSelection, WebDocumentElement, _WebDocumentViewState, _WebDocumentZooming> +@interface WebPDFView : NSView <WebDocumentView, WebDocumentSearching, WebDocumentIncrementalSearching, WebMultipleTextMatches, WebDocumentSelection, WebDocumentElement, WebDocumentPDF, _WebDocumentViewState, _WebDocumentZooming> { NSView *previewView; PDFView *PDFSubview; @@ -51,5 +51,6 @@ + (NSBundle *)PDFKitBundle; - (void)setPDFDocument:(PDFDocument *)doc; +- (PDFDocument *)PDFDocument; @end diff --git a/WebKit/mac/WebView/WebPDFView.mm b/WebKit/mac/WebView/WebPDFView.mm index a38412e..1be3033 100644 --- a/WebKit/mac/WebView/WebPDFView.mm +++ b/WebKit/mac/WebView/WebPDFView.mm @@ -182,6 +182,11 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec _ignoreScaleAndDisplayModeAndPageNotifications = NO; } +- (PDFDocument *)PDFDocument +{ + return [PDFSubview document]; +} + #pragma mark NSObject OVERRIDES - (void)dealloc diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h index 150a020..e74d0e5 100644 --- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h +++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h @@ -91,7 +91,7 @@ #define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled" #define WebKitUsesProxiedOpenPanelPreferenceKey @"WebKitUsesProxiedOpenPanel" #define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime" -#define WebKitFrameSetFlatteningEnabledPreferenceKey @"WebKitFrameSetFlatteningEnabled" +#define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled" // These are private both because callers should be using the cover methods and because the // cover methods themselves are private. diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm index bd3c2a7..84a6e9e 100644 --- a/WebKit/mac/WebView/WebPreferences.mm +++ b/WebKit/mac/WebView/WebPreferences.mm @@ -357,7 +357,7 @@ static WebCacheModel cacheModelForMainBundle(void) [NSNumber numberWithBool:NO], WebKitWebGLEnabledPreferenceKey, [NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey, [NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey, - [NSNumber numberWithBool:NO], WebKitFrameSetFlatteningEnabledPreferenceKey, + [NSNumber numberWithBool:NO], WebKitFrameFlatteningEnabledPreferenceKey, nil]; // This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above @@ -1216,14 +1216,14 @@ static NSString *classIBCreatorID = nil; return [self _setIntegerValue:allowedRunTime forKey:WebKitPluginAllowedRunTimePreferenceKey]; } -- (BOOL)isFrameSetFlatteningEnabled +- (BOOL)isFrameFlatteningEnabled { - return [self _boolValueForKey:WebKitFrameSetFlatteningEnabledPreferenceKey]; + return [self _boolValueForKey:WebKitFrameFlatteningEnabledPreferenceKey]; } -- (void)setFrameSetFlatteningEnabled:(BOOL)flag +- (void)setFrameFlatteningEnabled:(BOOL)flag { - [self _setBoolValue:flag forKey:WebKitFrameSetFlatteningEnabledPreferenceKey]; + [self _setBoolValue:flag forKey:WebKitFrameFlatteningEnabledPreferenceKey]; } - (void)didRemoveFromWebView diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h index b516640..0b5f969 100644 --- a/WebKit/mac/WebView/WebPreferencesPrivate.h +++ b/WebKit/mac/WebView/WebPreferencesPrivate.h @@ -116,8 +116,8 @@ extern NSString *WebPreferencesRemovedNotification; - (unsigned)pluginAllowedRunTime; - (void)setPluginAllowedRunTime:(unsigned)allowedRunTime; -- (BOOL)isFrameSetFlatteningEnabled; -- (void)setFrameSetFlatteningEnabled:(BOOL)flag; +- (BOOL)isFrameFlatteningEnabled; +- (void)setFrameFlatteningEnabled:(BOOL)flag; // zero means do AutoScale - (float)PDFScaleFactor; diff --git a/WebKit/mac/WebView/WebRenderNode.mm b/WebKit/mac/WebView/WebRenderNode.mm index 4a839a5..eff1929 100644 --- a/WebKit/mac/WebView/WebRenderNode.mm +++ b/WebKit/mac/WebView/WebRenderNode.mm @@ -118,8 +118,15 @@ static WebRenderNode *copyRenderNode(RenderObject* node) IntRect box = text->linesBoundingBox(); width = box.width(); height = box.height(); + } else if (node->isRenderInline()) { + RenderBoxModelObject* inlineFlow = toRenderBoxModelObject(node); + IntRect boundingBox = inlineFlow->borderBoundingBox(); + x = boundingBox.x(); + y = boundingBox.y(); + width = boundingBox.width(); + height = boundingBox.height(); } - + WebRenderNode *result = [[WebRenderNode alloc] _initWithName:name position:absPos rect:NSMakeRect(x, y, width, height) coreFrame:frame children:children]; diff --git a/WebKit/mac/WebView/WebScriptDebugDelegate.mm b/WebKit/mac/WebView/WebScriptDebugDelegate.mm index 8489c9b..9ffd36e 100644 --- a/WebKit/mac/WebView/WebScriptDebugDelegate.mm +++ b/WebKit/mac/WebView/WebScriptDebugDelegate.mm @@ -242,14 +242,14 @@ NSString * const WebScriptErrorLineNumberKey = @"WebScriptErrorLineNumber"; DynamicGlobalObjectScope globalObjectScope(globalObject->globalExec(), globalObject); JSValue exception; - JSValue result = evaluateInGlobalCallFrame(String(script), exception, globalObject); + JSValue result = evaluateInGlobalCallFrame(stringToUString(script), exception, globalObject); if (exception) return [self _convertValueToObjcValue:exception]; return result ? [self _convertValueToObjcValue:result] : nil; } JSValue exception; - JSValue result = _private->debuggerCallFrame->evaluate(String(script), exception); + JSValue result = _private->debuggerCallFrame->evaluate(stringToUString(script), exception); if (exception) return [self _convertValueToObjcValue:exception]; return result ? [self _convertValueToObjcValue:result] : nil; diff --git a/WebKit/mac/WebView/WebScriptDebugger.mm b/WebKit/mac/WebView/WebScriptDebugger.mm index a71d78b..c5e0ac8 100644 --- a/WebKit/mac/WebView/WebScriptDebugger.mm +++ b/WebKit/mac/WebView/WebScriptDebugger.mm @@ -69,7 +69,7 @@ static NSURL *toNSURL(const UString& s) { if (s.isEmpty()) return nil; - return KURL(ParsedURLString, s); + return KURL(ParsedURLString, ustringToString(s)); } static WebFrame *toWebFrame(JSGlobalObject* globalObject) diff --git a/WebKit/mac/WebView/WebScriptWorld.h b/WebKit/mac/WebView/WebScriptWorld.h index 7059b76..9a05f7f 100644 --- a/WebKit/mac/WebView/WebScriptWorld.h +++ b/WebKit/mac/WebView/WebScriptWorld.h @@ -36,4 +36,6 @@ typedef struct OpaqueJSContext* JSGlobalContextRef; + (WebScriptWorld *)scriptWorldForGlobalContext:(JSGlobalContextRef)globalContext; +- (void)unregisterWorld; + @end diff --git a/WebKit/mac/WebView/WebScriptWorld.mm b/WebKit/mac/WebView/WebScriptWorld.mm index 7dab1b3..8ca6f44 100644 --- a/WebKit/mac/WebView/WebScriptWorld.mm +++ b/WebKit/mac/WebView/WebScriptWorld.mm @@ -75,6 +75,11 @@ static WorldMap& allWorlds() return [self initWithWorld:ScriptController::createWorld()]; } +- (void)unregisterWorld +{ + _private->world->unregisterWorld(); +} + - (void)dealloc { ASSERT(allWorlds().contains(_private->world.get())); diff --git a/WebKit/mac/WebView/WebTextCompletionController.mm b/WebKit/mac/WebView/WebTextCompletionController.mm index 4f8e6e0..2421fd7 100644 --- a/WebKit/mac/WebView/WebTextCompletionController.mm +++ b/WebKit/mac/WebView/WebTextCompletionController.mm @@ -84,8 +84,7 @@ using namespace std; NSRect scrollFrame = NSMakeRect(0, 0, 100, 100); NSRect tableFrame = NSZeroRect; tableFrame.size = [NSScrollView contentSizeForFrameSize:scrollFrame.size hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder]; - // Added cast to work around problem with multiple Foundation initWithIdentifier: methods with different parameter types. - NSTableColumn *column = [(NSTableColumn *)[NSTableColumn alloc] initWithIdentifier:[NSNumber numberWithInt:0]]; + NSTableColumn *column = [[NSTableColumn alloc] init]; [column setWidth:tableFrame.size.width]; [column setEditable:NO]; diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.mm b/WebKit/mac/WebView/WebVideoFullscreenController.mm index e5fde5e..21e4814 100644 --- a/WebKit/mac/WebView/WebVideoFullscreenController.mm +++ b/WebKit/mac/WebView/WebVideoFullscreenController.mm @@ -37,7 +37,7 @@ #import <wtf/UnusedParam.h> SOFT_LINK_FRAMEWORK(QTKit) -SOFT_LINK_CLASS(QTKit, QTMovieView) +SOFT_LINK_CLASS(QTKit, QTMovieLayer) SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *) @@ -85,17 +85,20 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *) - (void)windowDidLoad { +#ifdef BUILDING_ON_TIGER + // WebVideoFullscreenController is not supported on Tiger: + ASSERT_NOT_REACHED(); +#else WebVideoFullscreenWindow *window = [self fullscreenWindow]; - QTMovieView *view = [[getQTMovieViewClass() alloc] init]; - [view setFillColor:[NSColor clearColor]]; - [window setContentView:view]; - [view setControllerVisible:NO]; - [view setPreservesAspectRatio:YES]; + QTMovieLayer *layer = [[getQTMovieLayerClass() alloc] init]; + [[window contentView] setLayer:layer]; + [[window contentView] setWantsLayer:YES]; if (_mediaElement) - [view setMovie:_mediaElement->platformMedia().qtMovie]; + [layer setMovie:_mediaElement->platformMedia().qtMovie]; [window setHasShadow:YES]; // This is nicer with a shadow. [window setLevel:NSPopUpMenuWindowLevel-1]; - [view release]; + [layer release]; +#endif } - (WebCore::HTMLMediaElement*)mediaElement; @@ -105,19 +108,24 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *) - (void)setMediaElement:(WebCore::HTMLMediaElement*)mediaElement; { +#ifdef BUILDING_ON_TIGER + // WebVideoFullscreenController is not supported on Tiger: + ASSERT_NOT_REACHED(); +#else _mediaElement = mediaElement; if ([self isWindowLoaded]) { - QTMovieView *movieView = (QTMovieView *)[[self fullscreenWindow] contentView]; QTMovie *movie = _mediaElement->platformMedia().qtMovie; + QTMovieLayer *movieLayer = (QTMovieLayer *)[[[self fullscreenWindow] contentView] layer]; - ASSERT(movieView && [movieView isKindOfClass:[getQTMovieViewClass() class]]); + ASSERT(movieLayer && [movieLayer isKindOfClass:[getQTMovieLayerClass() class]]); ASSERT(movie); - [movieView setMovie:movie]; + [movieLayer setMovie:movie]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rateChanged:) name:QTMovieRateDidChangeNotification object:movie]; } +#endif } - (id <WebVideoFullscreenControllerDelegate>)delegate diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm index 83e2d09..1aa501e 100644 --- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm +++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm @@ -346,9 +346,9 @@ static NSTextField *createTimeTextField(NSRect frame) static const CGFloat volumeButtonHeight = 16; static const CGFloat volumeUpButtonLeftMargin = 4; static const CGFloat volumeControlsTopMargin = 13; - static const CGFloat exitFullScreenButtonWidth = 25; - static const CGFloat exitFullScreenButtonHeight = 21; - static const CGFloat exitFullScreenButtonTopMargin = 11; + static const CGFloat exitFullscreenButtonWidth = 25; + static const CGFloat exitFullscreenButtonHeight = 21; + static const CGFloat exitFullscreenButtonTopMargin = 11; static const CGFloat timelineWidth = 315; static const CGFloat timelineHeight = 14; static const CGFloat timelineBottomMargin = 7; @@ -380,8 +380,8 @@ static NSTextField *createTimeTextField(NSRect frame) [_playButton setAction:@selector(togglePlaying:)]; [contentView addSubview:_playButton]; - CGFloat closeToRight = windowWidth - horizontalMargin - exitFullScreenButtonWidth; - NSControl *exitFullscreenButton = createControlWithMediaUIControlType(WKMediaUIControlExitFullscreenButton, NSMakeRect(closeToRight, windowHeight - exitFullScreenButtonTopMargin - exitFullScreenButtonHeight, exitFullScreenButtonWidth, exitFullScreenButtonHeight)); + CGFloat closeToRight = windowWidth - horizontalMargin - exitFullscreenButtonWidth; + NSControl *exitFullscreenButton = createControlWithMediaUIControlType(WKMediaUIControlExitFullscreenButton, NSMakeRect(closeToRight, windowHeight - exitFullscreenButtonTopMargin - exitFullscreenButtonHeight, exitFullscreenButtonWidth, exitFullscreenButtonHeight)); [exitFullscreenButton setAction:@selector(exitFullscreen:)]; [exitFullscreenButton setTarget:self]; [contentView addSubview:exitFullscreenButton]; diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm index 44d4b58..b1b5c38 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -101,11 +101,15 @@ #import "WebVideoFullscreenController.h" #import <CoreFoundation/CFSet.h> #import <Foundation/NSURLConnection.h> +#import <JavaScriptCore/APICast.h> +#import <JavaScriptCore/JSValueRef.h> #import <WebCore/ApplicationCacheStorage.h> #import <WebCore/BackForwardList.h> #import <WebCore/Cache.h> #import <WebCore/ColorMac.h> +#import <WebCore/CSSComputedStyleDeclaration.h> #import <WebCore/Cursor.h> +#import <WebCore/Database.h> #import <WebCore/Document.h> #import <WebCore/DocumentLoader.h> #import <WebCore/DragController.h> @@ -123,6 +127,8 @@ #import <WebCore/HTMLNames.h> #import <WebCore/HistoryItem.h> #import <WebCore/IconDatabase.h> +#import <WebCore/JSCSSStyleDeclaration.h> +#import <WebCore/JSElement.h> #import <WebCore/Logging.h> #import <WebCore/MIMETypeRegistry.h> #import <WebCore/Page.h> @@ -558,6 +564,16 @@ static bool runningTigerMail() return NO; } +static bool coreVideoHas7228836Fix() +{ +#ifdef BUILDING_ON_LEOPARD + NSBundle* coreVideoFrameworkBundle = [NSBundle bundleWithPath:@"/System/Library/Frameworks/CoreVideo.framework"]; + double version = [[coreVideoFrameworkBundle objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] doubleValue]; + return (version >= 48); +#endif + return true; +} + static bool shouldEnableLoadDeferring() { return !applicationIsAdobeInstaller(); @@ -964,8 +980,6 @@ static bool shouldEnableLoadDeferring() WTF::RefCountedLeakCounter::suppressMessages("At least one WebView was closed with fast teardown."); #endif - _private->closed = YES; - [[NSDistributedNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self]; @@ -998,6 +1012,8 @@ static bool fastDocumentTeardownEnabled() if (!_private || _private->closed) return; + _private->closed = YES; + [self _closingEventHandling]; #ifndef NDEBUG @@ -1031,9 +1047,6 @@ static bool fastDocumentTeardownEnabled() [_private->inspector webViewClosed]; - // setHostWindow:nil must be called before this value is set (see 5408186) - _private->closed = YES; - // To avoid leaks, call removeDragCaret in case it wasn't called after moveDragCaretToPoint. [self removeDragCaret]; @@ -1294,7 +1307,9 @@ static bool fastDocumentTeardownEnabled() settings->setMinimumFontSize([preferences minimumFontSize]); settings->setMinimumLogicalFontSize([preferences minimumLogicalFontSize]); settings->setPluginsEnabled([preferences arePlugInsEnabled]); - settings->setDatabasesEnabled([preferences databasesEnabled]); +#if ENABLE(DATABASE) + Database::setIsAvailable([preferences databasesEnabled]); +#endif settings->setLocalStorageEnabled([preferences localStorageEnabled]); settings->setExperimentalNotificationsEnabled([preferences experimentalNotificationsEnabled]); settings->setPrivateBrowsingEnabled([preferences privateBrowsingEnabled]); @@ -1329,16 +1344,19 @@ static bool fastDocumentTeardownEnabled() settings->setWebArchiveDebugModeEnabled([preferences webArchiveDebugModeEnabled]); settings->setLocalFileContentSniffingEnabled([preferences localFileContentSniffingEnabled]); settings->setOfflineWebApplicationCacheEnabled([preferences offlineWebApplicationCacheEnabled]); - settings->setZoomsTextOnly([preferences zoomsTextOnly]); + settings->setZoomMode([preferences zoomsTextOnly] ? ZoomTextOnly : ZoomPage); settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]); settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1)); - settings->setAcceleratedCompositingEnabled([preferences acceleratedCompositingEnabled]); + + // FIXME: Enabling accelerated compositing when WebGL is enabled causes tests to fail on Leopard which expect HW compositing to be disabled. + // Until we fix that, I will comment out the test (CFM) + settings->setAcceleratedCompositingEnabled((coreVideoHas7228836Fix() || [preferences webGLEnabled]) && [preferences acceleratedCompositingEnabled]); settings->setShowDebugBorders([preferences showDebugBorders]); settings->setShowRepaintCounter([preferences showRepaintCounter]); settings->setPluginAllowedRunTime([preferences pluginAllowedRunTime]); settings->setWebGLEnabled([preferences webGLEnabled]); settings->setLoadDeferringEnabled(shouldEnableLoadDeferring()); - settings->setFrameSetFlatteningEnabled([preferences isFrameSetFlatteningEnabled]); + settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]); } static inline IMP getMethod(id o, SEL s) @@ -2229,14 +2247,19 @@ static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node) return _private ? _private->insertionPasteboard : nil; } -+ (void)_whiteListAccessFromOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains ++ (void)_addOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains { - SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains); + SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains); } -+(void)_resetOriginAccessWhiteLists ++ (void)_removeOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains { - SecurityOrigin::resetOriginAccessWhiteLists(); + SecurityOrigin::removeOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains); +} + ++(void)_resetOriginAccessWhitelists +{ + SecurityOrigin::resetOriginAccessWhitelists(); } - (void)_updateActiveState @@ -2378,6 +2401,11 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns) SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme); } ++ (void)_registerURLSchemeAsSecure:(NSString *)scheme +{ + SecurityOrigin::registerURLSchemeAsSecure(scheme); +} + @end @implementation _WebSafeForwarder @@ -3105,13 +3133,13 @@ static bool needsWebViewInitThreadWorkaround() _private->zoomMultiplier = m; ASSERT(_private->page); if (_private->page) - _private->page->settings()->setZoomsTextOnly(isTextOnly); + _private->page->settings()->setZoomMode(isTextOnly ? ZoomTextOnly : ZoomPage); // FIXME: it would be nice to rework this code so that _private->zoomMultiplier doesn't exist and callers // all access _private->page->settings(). Frame* coreFrame = [self _mainCoreFrame]; if (coreFrame) - coreFrame->setZoomFactor(m, isTextOnly); + coreFrame->setZoomFactor(m, isTextOnly ? ZoomTextOnly : ZoomPage); } - (float)_zoomMultiplier:(BOOL)isTextOnly @@ -3131,7 +3159,7 @@ static bool needsWebViewInitThreadWorkaround() if (!_private->page) return NO; - return _private->page->settings()->zoomsTextOnly(); + return _private->page->settings()->zoomMode() == ZoomTextOnly; } #define MinimumZoomMultiplier 0.5f @@ -3318,7 +3346,7 @@ static bool needsWebViewInitThreadWorkaround() - (void)setHostWindow:(NSWindow *)hostWindow { - if (_private->closed) + if (_private->closed && hostWindow) return; if (hostWindow == _private->hostWindow) return; @@ -4130,7 +4158,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu if (jsValue.isBoolean()) return [NSAppleEventDescriptor descriptorWithBoolean:jsValue.getBoolean()]; if (jsValue.isString()) - return [NSAppleEventDescriptor descriptorWithString:String(jsValue.getString(exec))]; + return [NSAppleEventDescriptor descriptorWithString:ustringToString(jsValue.getString(exec))]; if (jsValue.isNumber()) { double value = jsValue.uncheckedGetNumber(); int intValue = value; @@ -5681,6 +5709,25 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi @end +@implementation WebView (WebViewPrivateStyleInfo) + +- (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value +{ + JSLock lock(SilenceAssertionsOnly); + ExecState* exec = toJS(context); + if (!value) + return JSValueMakeUndefined(context); + JSValue jsValue = toJS(exec, value); + if (!jsValue.inherits(&JSElement::s_info)) + return JSValueMakeUndefined(context); + JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue)); + Element* element = jsElement->impl(); + RefPtr<CSSComputedStyleDeclaration> style = computedStyle(element, true); + return toRef(exec, toJS(exec, jsElement->globalObject(), style.get())); +} + +@end + #ifdef BUILDING_ON_LEOPARD static IMP originalRecursivelyRemoveMailAttributesImp; diff --git a/WebKit/mac/WebView/WebViewData.mm b/WebKit/mac/WebView/WebViewData.mm index 21ba4c8..bf81dad 100644 --- a/WebKit/mac/WebView/WebViewData.mm +++ b/WebKit/mac/WebView/WebViewData.mm @@ -65,7 +65,11 @@ int pluginDatabaseClientCount = 0; dashboardBehaviorAllowWheelScrolling = YES; #endif - shouldCloseWithWindow = objc_collecting_enabled(); +#if !defined(BUILDING_ON_TIGER) + shouldCloseWithWindow = objc_collectingEnabled(); +#else + shouldCloseWithWindow = NO; +#endif smartInsertDeleteEnabled = ![[NSUserDefaults standardUserDefaults] objectForKey:WebSmartInsertDeleteEnabled] || [[NSUserDefaults standardUserDefaults] boolForKey:WebSmartInsertDeleteEnabled]; diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h index 3f38d58..a2ce646 100644 --- a/WebKit/mac/WebView/WebViewInternal.h +++ b/WebKit/mac/WebView/WebViewInternal.h @@ -174,4 +174,6 @@ namespace WebCore { - (void)_exitFullscreen; #endif +- (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value; + @end diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h index b0a7039..327743a 100644 --- a/WebKit/mac/WebView/WebViewPrivate.h +++ b/WebKit/mac/WebView/WebViewPrivate.h @@ -489,10 +489,11 @@ Could be worth adding to the API. // - destinationProtocol: The protocol to grant access to. // - destinationHost: The host to grant access to. // - allowDestinationSubdomains: If host is a domain, setting this to YES will whitelist host and all its subdomains, recursively. -+ (void)_whiteListAccessFromOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains; ++ (void)_addOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains; ++ (void)_removeOriginAccessWhitelistEntryWithSourceOrigin:(NSString *)sourceOrigin destinationProtocol:(NSString *)destinationProtocol destinationHost:(NSString *)destinationHost allowDestinationSubdomains:(BOOL)allowDestinationSubdomains; -// Removes all white list entries created with _whiteListAccessFromOrigin. -+ (void)_resetOriginAccessWhiteLists; +// Removes all white list entries created with _addOriginAccessWhitelistEntryWithSourceOrigin. ++ (void)_resetOriginAccessWhitelists; + (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; @@ -517,6 +518,7 @@ Could be worth adding to the API. - (void)setCSSAnimationsSuspended:(BOOL)suspended; + (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme; ++ (void)_registerURLSchemeAsSecure:(NSString *)scheme; @end @@ -598,6 +600,10 @@ Could be worth adding to the API. - (void)_geolocationDidFailWithError:(NSError *)error; @end +@interface WebView (WebViewPrivateStyleInfo) +- (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value; +@end + @interface NSObject (WebFrameLoadDelegatePrivate) - (void)webView:(WebView *)sender didFirstLayoutInFrame:(WebFrame *)frame; diff --git a/WebKit/qt/Api/DerivedSources.pro b/WebKit/qt/Api/DerivedSources.pro index a8f2684..389fb5f 100644 --- a/WebKit/qt/Api/DerivedSources.pro +++ b/WebKit/qt/Api/DerivedSources.pro @@ -32,8 +32,6 @@ regex = ".*\sclass\sQWEBKIT_EXPORT\s(\w+)\s(.*)" for(HEADER, WEBKIT_API_HEADERS) { # 1. Append to QtWebKit header that includes all other header files - - qtheader_module.depends += $$HEADER # Quotes need to be escaped once more when placed in eval() eval(qtheader_module.commands += echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$basename(HEADER)\\\"$${DOUBLE_ESCAPED_QUOTE} >> $${qtheader_module.target} &&) @@ -53,6 +51,7 @@ for(HEADER, WEBKIT_API_HEADERS) { eval($${HEADER_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$PATH_TO_HEADER\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${HEADER_TARGET}.target)) QMAKE_EXTRA_TARGETS += $$HEADER_TARGET + qtheader_module.depends += $$eval($${HEADER_TARGET}.target) # 3. Extract class names of exported classes from the headers and generate # the class name header files @@ -97,7 +96,7 @@ qtheader_module.commands += echo $${QUOTE}$${LITERAL_HASH}endif // QT_QTWEBKIT_M QMAKE_EXTRA_TARGETS += qtheader_module qtheader_pri.target = $${DESTDIR}/classheaders.pri -qtheader_pri.depends = $${WEBKIT_API_HEADERS} $${_PRO_FILE_} +qtheader_pri.depends += $${_PRO_FILE_} qtheader_pri.commands = echo $${QUOTE}WEBKIT_CLASS_HEADERS = $${WEBKIT_CLASS_HEADERS}$${QUOTE} > $${qtheader_pri.target} QMAKE_EXTRA_TARGETS += qtheader_pri diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp index 9720e0c..c865c4d 100644 --- a/WebKit/qt/Api/qgraphicswebview.cpp +++ b/WebKit/qt/Api/qgraphicswebview.cpp @@ -26,7 +26,10 @@ #include "qwebpage.h" #include "qwebpage_p.h" #include "QWebPageClient.h" -#include <FrameView.h> +#include "FrameView.h" +#include "GraphicsContext.h" +#include "IntRect.h" +#include "TiledBackingStore.h" #include <QtCore/qmetaobject.h> #include <QtCore/qsharedpointer.h> #include <QtCore/qtimer.h> @@ -35,14 +38,14 @@ #include <QtGui/qgraphicssceneevent.h> #include <QtGui/qgraphicsview.h> #include <QtGui/qpixmapcache.h> +#include <QtGui/qscrollbar.h> #include <QtGui/qstyleoption.h> +#include <QtGui/qinputcontext.h> #if defined(Q_WS_X11) #include <QX11Info> #endif #include <Settings.h> -#if USE(ACCELERATED_COMPOSITING) - // the overlay is here for one reason only: to have the scroll-bars and other // extra UI elements appear on top of any QGraphicsItems created by CSS compositing layers class QGraphicsWebViewOverlay : public QGraphicsItem { @@ -52,7 +55,9 @@ class QGraphicsWebViewOverlay : public QGraphicsItem { , q(view) { setPos(0, 0); +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); +#endif setCacheMode(QGraphicsItem::DeviceCoordinateCache); } @@ -70,8 +75,6 @@ class QGraphicsWebViewOverlay : public QGraphicsItem { QGraphicsWebView* q; }; -#endif - class QGraphicsWebViewPrivate : public QWebPageClient { public: QGraphicsWebViewPrivate(QGraphicsWebView* parent) @@ -92,6 +95,7 @@ public: } virtual ~QGraphicsWebViewPrivate(); + virtual void scroll(int dx, int dy, const QRect&); virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); @@ -108,6 +112,7 @@ public: virtual QPalette palette() const; virtual int screenNumber() const; virtual QWidget* ownerWidget() const; + virtual QRect geometryRelativeToOwnerWidget() const; virtual QObject* pluginParent() const; @@ -117,34 +122,49 @@ public: virtual void setRootGraphicsLayer(QGraphicsItem* layer); virtual void markForSync(bool scheduleSync); void updateCompositingScrollPosition(); + + // QGraphicsWebView can render composited layers + virtual bool allowsAcceleratedCompositing() const { return true; } #endif - + void updateResizesToContentsForPage(); + QRectF graphicsItemVisibleRect() const; +#if ENABLE(TILED_BACKING_STORE) + void updateTiledBackingStoreScale(); +#endif + + void createOrDeleteOverlay(); void syncLayers(); + + void unsetPageIfExists(); + void _q_doLoadFinished(bool success); void _q_contentsSizeChanged(const QSize&); + void _q_scaleChanged(); + + void _q_updateMicroFocus(); + void _q_pageDestroyed(); QGraphicsWebView* q; QWebPage* page; bool resizesToContents; -#if USE(ACCELERATED_COMPOSITING) - QGraphicsItem* rootGraphicsLayer; - // the overlay gets instantiated when the root layer is attached, and get deleted when it's detached QSharedPointer<QGraphicsWebViewOverlay> overlay; + // we need to put the root graphics layer behind the overlay (which contains the scrollbar) + enum { RootGraphicsLayerZValue, OverlayZValue }; + +#if USE(ACCELERATED_COMPOSITING) + QGraphicsItem* rootGraphicsLayer; // we need to sync the layers if we get a special call from the WebCore // compositor telling us to do so. We'll get that call from ChromeClientQt bool shouldSync; // we have to flush quite often, so we use a meta-method instead of QTimer::singleShot for putting the event in the queue QMetaMethod syncMetaMethod; - - // we need to put the root graphics layer behind the overlay (which contains the scrollbar) - enum { RootGraphicsLayerZValue, OverlayZValue }; #endif }; @@ -160,6 +180,26 @@ QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate() #endif } +void QGraphicsWebViewPrivate::createOrDeleteOverlay() +{ + bool useOverlay = false; + if (!resizesToContents) { +#if USE(ACCELERATED_COMPOSITING) + useOverlay = useOverlay || rootGraphicsLayer; +#endif +#if ENABLE(TILED_BACKING_STORE) + useOverlay = useOverlay || QWebFramePrivate::core(q->page()->mainFrame())->tiledBackingStore(); +#endif + } + if (useOverlay == !!overlay) + return; + if (useOverlay) { + overlay = QSharedPointer<QGraphicsWebViewOverlay>(new QGraphicsWebViewOverlay(q)); + overlay->setZValue(OverlayZValue); + } else + overlay.clear(); +} + #if USE(ACCELERATED_COMPOSITING) void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer) { @@ -175,15 +215,9 @@ void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer) layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); layer->setParentItem(q); layer->setZValue(RootGraphicsLayerZValue); - if (!overlay) { - overlay = QSharedPointer<QGraphicsWebViewOverlay>(new QGraphicsWebViewOverlay(q)); - overlay->setZValue(OverlayZValue); - } updateCompositingScrollPosition(); - } else { - // we don't have compositing layers, we can render the scrollbars and content in one go - overlay.clear(); } + createOrDeleteOverlay(); } void QGraphicsWebViewPrivate::markForSync(bool scheduleSync) @@ -200,7 +234,6 @@ void QGraphicsWebViewPrivate::updateCompositingScrollPosition() rootGraphicsLayer->setPos(-scrollPosition); } } - #endif void QGraphicsWebViewPrivate::syncLayers() @@ -222,9 +255,30 @@ void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success) emit q->loadFinished(success); } +void QGraphicsWebViewPrivate::_q_updateMicroFocus() +{ +#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)) + // Ideally, this should be handled by a common call to an updateMicroFocus function + // in QGraphicsItem. See http://bugreports.qt.nokia.com/browse/QTBUG-7578. + QList<QGraphicsView*> views = q->scene()->views(); + for (int c = 0; c < views.size(); ++c) { + QInputContext* ic = views.at(c)->inputContext(); + if (ic) + ic->update(); + } +#endif +} + +void QGraphicsWebViewPrivate::_q_pageDestroyed() +{ + page = 0; + q->setPage(0); +} + void QGraphicsWebViewPrivate::scroll(int dx, int dy, const QRect& rectToScroll) { q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll)); + #if USE(ACCELERATED_COMPOSITING) updateCompositingScrollPosition(); #endif @@ -233,9 +287,11 @@ void QGraphicsWebViewPrivate::scroll(int dx, int dy, const QRect& rectToScroll) void QGraphicsWebViewPrivate::update(const QRect & dirtyRect) { q->update(QRectF(dirtyRect)); -#if USE(ACCELERATED_COMPOSITING) + + createOrDeleteOverlay(); if (overlay) overlay->update(QRectF(dirtyRect)); +#if USE(ACCELERATED_COMPOSITING) syncLayers(); #endif } @@ -286,10 +342,12 @@ QPalette QGraphicsWebViewPrivate::palette() const int QGraphicsWebViewPrivate::screenNumber() const { #if defined(Q_WS_X11) - const QList<QGraphicsView*> views = q->scene()->views(); + if (QGraphicsScene* scene = q->scene()) { + const QList<QGraphicsView*> views = scene->views(); - if (!views.isEmpty()) - return views.at(0)->x11Info().screen(); + if (!views.isEmpty()) + return views.at(0)->x11Info().screen(); + } #endif return 0; @@ -297,8 +355,24 @@ int QGraphicsWebViewPrivate::screenNumber() const QWidget* QGraphicsWebViewPrivate::ownerWidget() const { - const QList<QGraphicsView*> views = q->scene()->views(); - return views.value(0); + if (QGraphicsScene* scene = q->scene()) { + const QList<QGraphicsView*> views = scene->views(); + return views.value(0); + } + return 0; +} + +QRect QGraphicsWebViewPrivate::geometryRelativeToOwnerWidget() const +{ + if (!q->scene()) + return QRect(); + + QList<QGraphicsView*> views = q->scene()->views(); + if (views.isEmpty()) + return QRect(); + + QGraphicsView* view = views.at(0); + return view->mapFromScene(q->boundingRect()).boundingRect(); } QObject* QGraphicsWebViewPrivate::pluginParent() const @@ -340,6 +414,42 @@ void QGraphicsWebViewPrivate::_q_contentsSizeChanged(const QSize& size) q->setGeometry(QRectF(q->geometry().topLeft(), size)); } +void QGraphicsWebViewPrivate::_q_scaleChanged() +{ +#if ENABLE(TILED_BACKING_STORE) + updateTiledBackingStoreScale(); +#endif +} + +QRectF QGraphicsWebViewPrivate::graphicsItemVisibleRect() const +{ + if (!q->scene()) + return QRectF(); + QList<QGraphicsView*> views = q->scene()->views(); + if (views.size() > 1) { +#ifndef QT_NO_DEBUG_STREAM + qDebug() << "QGraphicsWebView is in more than one graphics views, unable to compute the visible rect"; +#endif + return QRectF(); + } + if (views.size() < 1) + return QRectF(); + + int xPosition = views[0]->horizontalScrollBar()->value(); + int yPosition = views[0]->verticalScrollBar()->value(); + return q->mapRectFromScene(QRectF(QPoint(xPosition, yPosition), views[0]->viewport()->size())); +} + +#if ENABLE(TILED_BACKING_STORE) +void QGraphicsWebViewPrivate::updateTiledBackingStoreScale() +{ + WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page->mainFrame())->tiledBackingStore(); + if (!backingStore) + return; + backingStore->setContentsScale(q->scale()); +} +#endif + /*! \class QGraphicsWebView \brief The QGraphicsWebView class allows Web content to be added to a GraphicsView. @@ -433,6 +543,9 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent) #endif setFocusPolicy(Qt::StrongFocus); setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); +#if ENABLE(TILED_BACKING_STORE) + QObject::connect(this, SIGNAL(scaleChanged()), this, SLOT(_q_scaleChanged())); +#endif } /*! @@ -482,6 +595,21 @@ QWebPage* QGraphicsWebView::page() const */ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget*) { +#if ENABLE(TILED_BACKING_STORE) + if (WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore()) { + // FIXME: We should set the backing store viewport earlier than in paint + if (d->resizesToContents) + backingStore->viewportChanged(WebCore::IntRect(d->graphicsItemVisibleRect())); + else { + QRectF visibleRect(d->page->mainFrame()->scrollPosition(), d->page->mainFrame()->geometry().size()); + backingStore->viewportChanged(WebCore::IntRect(visibleRect)); + } + // QWebFrame::render is a public API, bypass it for tiled rendering so behavior does not need to change. + WebCore::GraphicsContext context(painter); + page()->mainFrame()->d->renderFromTiledBackingStore(&context, option->exposedRect.toAlignedRect()); + return; + } +#endif #if USE(ACCELERATED_COMPOSITING) page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect()); #else @@ -589,6 +717,29 @@ bool QGraphicsWebView::event(QEvent* event) return QGraphicsWidget::event(event); } +void QGraphicsWebViewPrivate::unsetPageIfExists() +{ + if (!page) + return; + + // if the page client is the special client constructed for + // delegating the responsibilities to a QWidget, we need + // to destroy it. + + if (page->d->client && page->d->client->isQWidgetClient()) + delete page->d->client; + + page->d->client = 0; + + // if the page was created by us, we own it and need to + // destroy it as well. + + if (page->parent() == q) + delete page; + else + page->disconnect(q); +} + /*! Makes \a page the new web page of the web graphicsitem. @@ -603,26 +754,20 @@ void QGraphicsWebView::setPage(QWebPage* page) if (d->page == page) return; - if (d->page) { - d->page->d->client = 0; // unset the page client - if (d->page->parent() == this) - delete d->page; - else - d->page->disconnect(this); - } - + d->unsetPageIfExists(); d->page = page; + if (!d->page) return; -#if USE(ACCELERATED_COMPOSITING) + + d->page->d->client = d; // set the page client + if (d->overlay) d->overlay->prepareGeometryChange(); -#endif - d->page->d->client = d; // set the page client QSize size = geometry().size().toSize(); page->setViewportSize(size); - + if (d->resizesToContents) d->updateResizesToContentsForPage(); @@ -644,6 +789,10 @@ void QGraphicsWebView::setPage(QWebPage* page) this, SIGNAL(statusBarMessage(QString))); connect(d->page, SIGNAL(linkClicked(QUrl)), this, SIGNAL(linkClicked(QUrl))); + connect(d->page, SIGNAL(microFocusChanged()), + this, SLOT(_q_updateMicroFocus())); + connect(d->page, SIGNAL(destroyed()), + this, SLOT(_q_pageDestroyed())); } /*! @@ -724,11 +873,8 @@ qreal QGraphicsWebView::zoomFactor() const */ void QGraphicsWebView::updateGeometry() { - -#if USE(ACCELERATED_COMPOSITING) if (d->overlay) d->overlay->prepareGeometryChange(); -#endif QGraphicsWidget::updateGeometry(); @@ -745,10 +891,8 @@ void QGraphicsWebView::setGeometry(const QRectF& rect) { QGraphicsWidget::setGeometry(rect); -#if USE(ACCELERATED_COMPOSITING) if (d->overlay) d->overlay->prepareGeometryChange(); -#endif if (!d->page) return; @@ -920,7 +1064,12 @@ QWebSettings* QGraphicsWebView::settings() const */ QAction *QGraphicsWebView::pageAction(QWebPage::WebAction action) const { +#ifdef QT_NO_ACTION + Q_UNUSED(action) + return 0; +#else return page()->action(action); +#endif } /*! @@ -964,12 +1113,13 @@ bool QGraphicsWebView::findText(const QString &subString, QWebPage::FindFlags op If this property is set, the QGraphicsWebView will automatically change its size to match the size of the main frame contents. As a result the top level frame - will never have scrollbars. + will never have scrollbars. It will also make CSS fixed positioning to behave like absolute positioning + with elements positioned relative to the document instead of the viewport. This property should be used in conjunction with the QWebPage::preferredContentsSize property. If not explicitly set, the preferredContentsSize is automatically set to a reasonable value. - \sa QWebPage::setPreferredContentsSize + \sa QWebPage::setPreferredContentsSize() */ void QGraphicsWebView::setResizesToContents(bool enabled) { @@ -985,6 +1135,48 @@ bool QGraphicsWebView::resizesToContents() const return d->resizesToContents; } +/*! + \property QGraphicsWebView::tiledBackingStoreFrozen + \brief whether the tiled backing store updates its contents + \since 4.7 + + If the tiled backing store is enabled using QWebSettings::TiledBackingStoreEnabled attribute, this property + can be used to disable backing store updates temporarily. This can be useful for example for running + a smooth animation that changes the scale of the QGraphicsWebView. + + When the backing store is unfrozen, its contents will be automatically updated to match the current + state of the document. If the QGraphicsWebView scale was changed, the backing store is also + re-rendered using the new scale. + + If the tiled backing store is not enabled, this property does nothing. + + \sa QWebSettings::TiledBackingStoreEnabled + \sa QGraphicsObject::scale +*/ +bool QGraphicsWebView::isTiledBackingStoreFrozen() const +{ +#if ENABLE(TILED_BACKING_STORE) + WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore(); + if (!backingStore) + return false; + return backingStore->contentsFrozen(); +#else + return false; +#endif +} + +void QGraphicsWebView::setTiledBackingStoreFrozen(bool frozen) +{ +#if ENABLE(TILED_BACKING_STORE) + WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore(); + if (!backingStore) + return; + backingStore->setContentsFrozen(frozen); +#else + UNUSED_PARAM(frozen); +#endif +} + /*! \reimp */ void QGraphicsWebView::hoverMoveEvent(QGraphicsSceneHoverEvent* ev) diff --git a/WebKit/qt/Api/qgraphicswebview.h b/WebKit/qt/Api/qgraphicswebview.h index 14de9d5..88729d3 100644 --- a/WebKit/qt/Api/qgraphicswebview.h +++ b/WebKit/qt/Api/qgraphicswebview.h @@ -46,6 +46,7 @@ class QWEBKIT_EXPORT QGraphicsWebView : public QGraphicsWidget { Q_PROPERTY(bool modified READ isModified) Q_PROPERTY(bool resizesToContents READ resizesToContents WRITE setResizesToContents) + Q_PROPERTY(bool tiledBackingStoreFrozen READ isTiledBackingStoreFrozen WRITE setTiledBackingStoreFrozen) public: explicit QGraphicsWebView(QGraphicsItem* parent = 0); @@ -82,6 +83,9 @@ public: bool resizesToContents() const; void setResizesToContents(bool enabled); + + bool isTiledBackingStoreFrozen() const; + void setTiledBackingStoreFrozen(bool frozen); virtual void setGeometry(const QRectF& rect); virtual void updateGeometry(); @@ -138,10 +142,13 @@ protected: private: Q_PRIVATE_SLOT(d, void _q_doLoadFinished(bool success)) + Q_PRIVATE_SLOT(d, void _q_updateMicroFocus()) + Q_PRIVATE_SLOT(d, void _q_pageDestroyed()) // we don't want to change the moc based on USE() macro, so this function is here // but will be empty if ACCLERATED_COMPOSITING is disabled Q_PRIVATE_SLOT(d, void syncLayers()) Q_PRIVATE_SLOT(d, void _q_contentsSizeChanged(const QSize&)) + Q_PRIVATE_SLOT(d, void _q_scaleChanged()) QGraphicsWebViewPrivate* const d; friend class QGraphicsWebViewPrivate; diff --git a/WebKit/qt/Api/qwebelement.cpp b/WebKit/qt/Api/qwebelement.cpp index 9d4d0d0..8af7203 100644 --- a/WebKit/qt/Api/qwebelement.cpp +++ b/WebKit/qt/Api/qwebelement.cpp @@ -26,7 +26,6 @@ #include "CSSRule.h" #include "CSSRuleList.h" #include "CSSStyleRule.h" -#include "CString.h" #include "Document.h" #include "DocumentFragment.h" #include "FrameView.h" @@ -45,6 +44,7 @@ #include "runtime_root.h" #include <parser/SourceCode.h> #include <wtf/Vector.h> +#include <wtf/text/CString.h> #include <QPainter> @@ -864,25 +864,7 @@ QStringList QWebElement::classes() const return QStringList(); QStringList classes = attribute(QLatin1String("class")).simplified().split(QLatin1Char(' '), QString::SkipEmptyParts); -#if QT_VERSION >= 0x040500 classes.removeDuplicates(); -#else - int n = classes.size(); - int j = 0; - QSet<QString> seen; - seen.reserve(n); - for (int i = 0; i < n; ++i) { - const QString& s = classes.at(i); - if (seen.contains(s)) - continue; - seen.insert(s); - if (j != i) - classes[j] = s; - ++j; - } - if (n != j) - classes.erase(classes.begin() + j, classes.end()); -#endif return classes; } diff --git a/WebKit/qt/Api/qwebelement.h b/WebKit/qt/Api/qwebelement.h index 156d24b..c488d12 100644 --- a/WebKit/qt/Api/qwebelement.h +++ b/WebKit/qt/Api/qwebelement.h @@ -20,11 +20,11 @@ #ifndef QWEBELEMENT_H #define QWEBELEMENT_H -#include <QString> -#include <QStringList> -#include <QRect> -#include <QVariant> -#include <QExplicitlySharedDataPointer> +#include <QtCore/qstring.h> +#include <QtCore/qstringlist.h> +#include <QtCore/qrect.h> +#include <QtCore/qvariant.h> +#include <QtCore/qshareddata.h> #include "qwebkitglobal.h" namespace WebCore { @@ -154,6 +154,7 @@ private: static QWebElement enclosingElement(WebCore::Node*); + friend class DumpRenderTreeSupportQt; friend class QWebFrame; friend class QWebElementCollection; friend class QWebHitTestResult; diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp index 15b5c00..e6ee00f 100644 --- a/WebKit/qt/Api/qwebframe.cpp +++ b/WebKit/qt/Api/qwebframe.cpp @@ -58,6 +58,7 @@ #include "SelectionController.h" #include "SubstituteData.h" #include "SVGSMILElement.h" +#include "TiledBackingStore.h" #include "htmlediting.h" #include "markup.h" #include "qt_instance.h" @@ -87,182 +88,80 @@ QT_BEGIN_NAMESPACE extern Q_GUI_EXPORT int qt_defaultDpi(); QT_END_NAMESPACE -bool QWEBKIT_EXPORT qt_drt_hasDocumentElement(QWebFrame* qframe) +static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy, const QPoint& pos) { - return QWebFramePrivate::core(qframe)->document()->documentElement(); -} - -void QWEBKIT_EXPORT qt_drt_setJavaScriptProfilingEnabled(QWebFrame* qframe, bool enabled) -{ -#if ENABLE(JAVASCRIPT_DEBUGGER) - Frame* frame = QWebFramePrivate::core(qframe); - InspectorController* controller = frame->page()->inspectorController(); - if (!controller) - return; - if (enabled) - controller->enableProfiler(); - else - controller->disableProfiler(); -#endif -} - -// Pause a given CSS animation or transition on the target node at a specific time. -// If the animation or transition is already paused, it will update its pause time. -// This method is only intended to be used for testing the CSS animation and transition system. -bool QWEBKIT_EXPORT qt_drt_pauseAnimation(QWebFrame *qframe, const QString &animationName, double time, const QString &elementId) -{ - Frame* frame = QWebFramePrivate::core(qframe); - if (!frame) - return false; - - AnimationController* controller = frame->animation(); - if (!controller) + if (!frame || !frame->document() || !frame->view() || !frame->eventHandler()) return false; - Document* doc = frame->document(); - Q_ASSERT(doc); - - Node* coreNode = doc->getElementById(elementId); - if (!coreNode || !coreNode->renderer()) - return false; - - return controller->pauseAnimationAtTime(coreNode->renderer(), animationName, time); -} - -bool QWEBKIT_EXPORT qt_drt_pauseTransitionOfProperty(QWebFrame *qframe, const QString &propertyName, double time, const QString &elementId) -{ - Frame* frame = QWebFramePrivate::core(qframe); - if (!frame) - return false; - - AnimationController* controller = frame->animation(); - if (!controller) - return false; - - Document* doc = frame->document(); - Q_ASSERT(doc); - - Node* coreNode = doc->getElementById(elementId); - if (!coreNode || !coreNode->renderer()) - return false; - - return controller->pauseTransitionAtTime(coreNode->renderer(), propertyName, time); -} - -// Pause a given SVG animation on the target node at a specific time. -// This method is only intended to be used for testing the SVG animation system. -bool QWEBKIT_EXPORT qt_drt_pauseSVGAnimation(QWebFrame *qframe, const QString &animationId, double time, const QString &elementId) -{ -#if !ENABLE(SVG) - return false; -#else - Frame* frame = QWebFramePrivate::core(qframe); - if (!frame) - return false; - - Document* doc = frame->document(); - Q_ASSERT(doc); - - if (!doc->svgExtensions()) + QPoint contentsPos = frame->view()->windowToContents(pos); + Node* node = frame->document()->elementFromPoint(contentsPos.x(), contentsPos.y()); + if (!node) return false; - Node* coreNode = doc->getElementById(animationId); - if (!coreNode || !SVGSMILElement::isSMILElement(coreNode)) + RenderObject* renderer = node->renderer(); + if (!renderer) return false; - return doc->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreNode), time); -#endif -} - -// Returns the total number of currently running animations (includes both CSS transitions and CSS animations). -int QWEBKIT_EXPORT qt_drt_numberOfActiveAnimations(QWebFrame *qframe) -{ - Frame* frame = QWebFramePrivate::core(qframe); - if (!frame) + if (renderer->isListBox()) return false; - AnimationController* controller = frame->animation(); - if (!controller) + RenderLayer* renderLayer = renderer->enclosingLayer(); + if (!renderLayer) return false; - return controller->numberOfActiveAnimations(); -} - -void QWEBKIT_EXPORT qt_drt_clearFrameName(QWebFrame* qFrame) -{ - Frame* frame = QWebFramePrivate::core(qFrame); - frame->tree()->clearName(); -} + bool scrolledHorizontal = false; + bool scrolledVertical = false; -int QWEBKIT_EXPORT qt_drt_javaScriptObjectsCount() -{ - return JSDOMWindowBase::commonJSGlobalData()->heap.globalObjectCount(); -} + if (dx > 0) + scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx); + else if (dx < 0) + scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx)); -void QWEBKIT_EXPORT qt_drt_garbageCollector_collect() -{ - gcController().garbageCollectNow(); -} + if (dy > 0) + scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy); + else if (dy < 0) + scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy)); -void QWEBKIT_EXPORT qt_drt_garbageCollector_collectOnAlternateThread(bool waitUntilDone) -{ - gcController().garbageCollectOnAlternateThreadForDebugging(waitUntilDone); + return (scrolledHorizontal || scrolledVertical); } -// Returns the value of counter in the element specified by \a id. -QString QWEBKIT_EXPORT qt_drt_counterValueForElementById(QWebFrame* qFrame, const QString& id) -{ - Frame* frame = QWebFramePrivate::core(qFrame); - if (Document* document = frame->document()) { - Element* element = document->getElementById(id); - return WebCore::counterValueForElement(element); - } - return QString(); -} -int QWEBKIT_EXPORT qt_drt_pageNumberForElementById(QWebFrame* qFrame, const QString& id, float width, float height) +/*! + \internal + Scrolls nested frames starting at this frame, \a dx pixels to the right + and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts + to scroll elements with CSS overflow at position pos, followed by this frame. If this + frame doesn't scroll, attempts to scroll the parent +*/ +void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos) { - Frame* frame = QWebFramePrivate::core(qFrame); - if (!frame) - return -1; + if (!qFrame) + return; - Element* element = frame->document()->getElementById(AtomicString(id)); - if (!element) - return -1; + if (webframe_scrollOverflow(QWebFramePrivate::core(qFrame), dx, dy, pos)) + return; - return PrintContext::pageNumberForElement(element, FloatSize(width, height)); -} + bool scrollHorizontal = false; + bool scrollVertical = false; -int QWEBKIT_EXPORT qt_drt_numberOfPages(QWebFrame* qFrame, float width, float height) -{ - Frame* frame = QWebFramePrivate::core(qFrame); - if (!frame) - return -1; + do { + if (dx > 0) // scroll right + scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) < qFrame->scrollBarMaximum(Qt::Horizontal); + else if (dx < 0) // scroll left + scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) > qFrame->scrollBarMinimum(Qt::Horizontal); - return PrintContext::numberOfPages(frame, FloatSize(width, height)); -} + if (dy > 0) // scroll down + scrollVertical = qFrame->scrollBarValue(Qt::Vertical) < qFrame->scrollBarMaximum(Qt::Vertical); + else if (dy < 0) //scroll up + scrollVertical = qFrame->scrollBarValue(Qt::Vertical) > qFrame->scrollBarMinimum(Qt::Vertical); -// Suspend active DOM objects in this frame. -void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* qFrame) -{ - Frame* frame = QWebFramePrivate::core(qFrame); - if (frame->document()) - frame->document()->suspendActiveDOMObjects(); -} - -// Resume active DOM objects in this frame. -void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* qFrame) -{ - Frame* frame = QWebFramePrivate::core(qFrame); - if (frame->document()) - frame->document()->resumeActiveDOMObjects(); -} + if (scrollHorizontal || scrollVertical) { + qFrame->scroll(dx, dy); + return; + } -void QWEBKIT_EXPORT qt_drt_evaluateScriptInIsolatedWorld(QWebFrame* qFrame, int worldId, const QString& script) -{ - Frame* frame = QWebFramePrivate::core(qFrame); - if (frame) - JSC::JSValue result = frame->script()->executeScriptInWorld(mainThreadNormalWorld(), script, true).jsValue(); + qFrame = qFrame->parentFrame(); + } while (qFrame); } QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame, @@ -327,8 +226,11 @@ WebCore::Scrollbar* QWebFramePrivate::verticalScrollBar() const return frame->view()->verticalScrollbar(); } -void QWebFramePrivate::renderContentsLayerAbsoluteCoords(GraphicsContext* context, const QRegion& clip) +#if ENABLE(TILED_BACKING_STORE) +void QWebFramePrivate::renderFromTiledBackingStore(GraphicsContext* context, const QRegion& clip) { + ASSERT(frame->tiledBackingStore()); + if (!frame->view() || !frame->contentRenderer()) return; @@ -339,21 +241,25 @@ void QWebFramePrivate::renderContentsLayerAbsoluteCoords(GraphicsContext* contex QPainter* painter = context->platformContext(); WebCore::FrameView* view = frame->view(); - view->layoutIfNeededRecursive(); + + int scrollX = view->scrollX(); + int scrollY = view->scrollY(); + context->translate(-scrollX, -scrollY); for (int i = 0; i < vector.size(); ++i) { const QRect& clipRect = vector.at(i); painter->save(); - painter->setClipRect(clipRect, Qt::IntersectClip); + + QRect rect = clipRect.translated(scrollX, scrollY); + painter->setClipRect(rect, Qt::IntersectClip); - context->save(); - view->paintContents(context, clipRect); - context->restore(); + frame->tiledBackingStore()->paint(context, rect); painter->restore(); } } +#endif void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame::RenderLayer layer, const QRegion& clip) { @@ -421,45 +327,6 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame: } } -bool QWebFramePrivate::scrollOverflow(int dx, int dy) -{ - if (!frame || !frame->document() || !frame->eventHandler()) - return false; - - Node* node = frame->document()->focusedNode(); - if (!node) - node = frame->document()->elementFromPoint(frame->eventHandler()->currentMousePosition().x(), - frame->eventHandler()->currentMousePosition().y()); - if (!node) - return false; - - RenderObject* renderer = node->renderer(); - if (!renderer) - return false; - - if (renderer->isListBox()) - return false; - - RenderLayer* renderLayer = renderer->enclosingLayer(); - if (!renderLayer) - return false; - - bool scrolledHorizontal = false; - bool scrolledVertical = false; - - if (dx > 0) - scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx); - else if (dx < 0) - scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx)); - - if (dy > 0) - scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy); - else if (dy < 0) - scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy)); - - return (scrolledHorizontal || scrolledVertical); -} - /*! \class QWebFrame \since 4.4 @@ -731,8 +598,8 @@ static inline QUrl ensureAbsoluteUrl(const QUrl &url) void QWebFrame::setUrl(const QUrl &url) { - d->frame->loader()->begin(ensureAbsoluteUrl(url)); - d->frame->loader()->end(); + d->frame->loader()->writer()->begin(ensureAbsoluteUrl(url)); + d->frame->loader()->writer()->end(); load(ensureAbsoluteUrl(url)); } @@ -807,6 +674,8 @@ QString QWebFrame::frameName() const /*! The web page that contains this frame. + + \sa pageChanged() */ QWebPage *QWebFrame::page() const { @@ -831,7 +700,7 @@ void QWebFrame::load(const QUrl &url) \a body is optional and is only used for POST operations. - \note The view remains the same until enough data has arrived to display the new \a url. + \note The view remains the same until enough data has arrived to display the new content. \sa setUrl() */ @@ -990,13 +859,13 @@ void QWebFrame::setScrollBarPolicy(Qt::Orientation orientation, Qt::ScrollBarPol if (orientation == Qt::Horizontal) { d->horizontalScrollBarPolicy = policy; if (d->frame->view()) { - d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy); + d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy, policy != Qt::ScrollBarAsNeeded /* lock */); d->frame->view()->updateCanHaveScrollbars(); } } else { d->verticalScrollBarPolicy = policy; if (d->frame->view()) { - d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy); + d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy, policy != Qt::ScrollBarAsNeeded /* lock */); d->frame->view()->updateCanHaveScrollbars(); } } @@ -1099,55 +968,6 @@ void QWebFrame::scroll(int dx, int dy) } /*! - \since 4.7 - Scrolls nested frames starting at this frame, \a dx pixels to the right - and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts - to scroll elements with CSS overflow followed by this frame. If this - frame doesn't scroll, attempts to scroll the parent - - \sa QWebFrame::scroll -*/ -bool QWebFrame::scrollRecursively(int dx, int dy) -{ - bool scrolledHorizontal = false; - bool scrolledVertical = false; - bool scrolledOverflow = d->scrollOverflow(dx, dy); - - if (!scrolledOverflow) { - Frame* frame = d->frame; - if (!frame || !frame->view()) - return false; - - do { - IntSize scrollOffset = frame->view()->scrollOffset(); - IntPoint maxScrollOffset = frame->view()->maximumScrollPosition(); - - if (dx > 0) // scroll right - scrolledHorizontal = scrollOffset.width() < maxScrollOffset.x(); - else if (dx < 0) // scroll left - scrolledHorizontal = scrollOffset.width() > 0; - - if (dy > 0) // scroll down - scrolledVertical = scrollOffset.height() < maxScrollOffset.y(); - else if (dy < 0) //scroll up - scrolledVertical = scrollOffset.height() > 0; - - if (scrolledHorizontal || scrolledVertical) { - frame->view()->scrollBy(IntSize(dx, dy)); - return true; - } - frame = frame->tree()->parent(); - } while (frame && frame->view()); - } - return (scrolledHorizontal || scrolledVertical || scrolledOverflow); -} - -bool QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy) -{ - return qFrame->scrollRecursively(dx, dy); -} - -/*! \property QWebFrame::scrollPosition \since 4.5 \brief the position the frame is currently scrolled to. @@ -1245,7 +1065,7 @@ void QWebFrame::render(QPainter* painter) */ void QWebFrame::setTextSizeMultiplier(qreal factor) { - d->frame->setZoomFactor(factor, /*isTextOnly*/true); + d->frame->setZoomFactor(factor, ZoomTextOnly); } /*! @@ -1264,7 +1084,7 @@ qreal QWebFrame::textSizeMultiplier() const void QWebFrame::setZoomFactor(qreal factor) { - d->frame->setZoomFactor(factor, d->frame->isZoomFactorTextOnly()); + d->frame->setZoomFactor(factor, d->frame->zoomMode()); } qreal QWebFrame::zoomFactor() const @@ -1621,6 +1441,15 @@ QWebFrame* QWebFramePrivate::kit(WebCore::Frame* coreFrame) */ /*! + \fn void QWebFrame::pageChanged() + \since 4.7 + + This signal is emitted when this frame has been moved to a different QWebPage. + + \sa page() +*/ + +/*! \class QWebHitTestResult \since 4.4 \brief The QWebHitTestResult class provides information about the web diff --git a/WebKit/qt/Api/qwebframe.h b/WebKit/qt/Api/qwebframe.h index 68594fd..ecd31de 100644 --- a/WebKit/qt/Api/qwebframe.h +++ b/WebKit/qt/Api/qwebframe.h @@ -50,6 +50,7 @@ class QWebSecurityOrigin; class QWebElement; class QWebElementCollection; +class DumpRenderTreeSupportQt; namespace WebCore { class WidgetPrivate; class FrameLoaderClientQt; @@ -156,7 +157,6 @@ public: QRect scrollBarGeometry(Qt::Orientation orientation) const; void scroll(int, int); - bool scrollRecursively(int, int); QPoint scrollPosition() const; void setScrollPosition(const QPoint &pos); @@ -222,9 +222,11 @@ Q_SIGNALS: void pageChanged(); private: + friend class QGraphicsWebView; friend class QWebPage; friend class QWebPagePrivate; friend class QWebFramePrivate; + friend class DumpRenderTreeSupportQt; friend class WebCore::WidgetPrivate; friend class WebCore::FrameLoaderClientQt; friend class WebCore::ChromeClientQt; diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h index 7d79474..fcc37e7 100644 --- a/WebKit/qt/Api/qwebframe_p.h +++ b/WebKit/qt/Api/qwebframe_p.h @@ -84,9 +84,9 @@ public: static QWebFrame* kit(WebCore::Frame*); void renderRelativeCoords(WebCore::GraphicsContext*, QWebFrame::RenderLayer, const QRegion& clip); - void renderContentsLayerAbsoluteCoords(WebCore::GraphicsContext*, const QRegion& clip); - - bool scrollOverflow(int dx, int dy); +#if ENABLE(TILED_BACKING_STORE) + void renderFromTiledBackingStore(WebCore::GraphicsContext*, const QRegion& clip); +#endif QWebFrame *q; Qt::ScrollBarPolicy horizontalScrollBarPolicy; diff --git a/WebKit/qt/Api/qwebinspector.cpp b/WebKit/qt/Api/qwebinspector.cpp index c3ef530..c0e5277 100644 --- a/WebKit/qt/Api/qwebinspector.cpp +++ b/WebKit/qt/Api/qwebinspector.cpp @@ -161,6 +161,10 @@ void QWebInspector::showEvent(QShowEvent* event) /*! \reimp */ void QWebInspector::hideEvent(QHideEvent* event) { +#if ENABLE(INSPECTOR) + if (d->page) + d->page->d->inspectorController()->close(); +#endif } /*! \reimp */ @@ -168,7 +172,7 @@ void QWebInspector::closeEvent(QCloseEvent* event) { #if ENABLE(INSPECTOR) if (d->page) - d->page->d->inspectorController()->setWindowVisible(false); + d->page->d->inspectorController()->close(); #endif } diff --git a/WebKit/qt/Api/qwebinspector.h b/WebKit/qt/Api/qwebinspector.h index 6cda479..f192e92 100644 --- a/WebKit/qt/Api/qwebinspector.h +++ b/WebKit/qt/Api/qwebinspector.h @@ -52,5 +52,6 @@ private: friend class QWebPage; friend class QWebPagePrivate; friend class WebCore::InspectorClientQt; + friend class WebCore::InspectorFrontendClientQt; }; #endif diff --git a/WebKit/qt/Api/qwebkitglobal.h b/WebKit/qt/Api/qwebkitglobal.h index 9e8979f..665bf1b 100644 --- a/WebKit/qt/Api/qwebkitglobal.h +++ b/WebKit/qt/Api/qwebkitglobal.h @@ -22,6 +22,12 @@ #include <QtCore/qglobal.h> +#define QTWEBKIT_VERSION_STR "2.0.0" +// QTWEBKIT_VERSION is (major << 16) + (minor << 8) + patch. Similar to Qt. +#define QTWEBKIT_VERSION 0x020000 +// Use: #if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 0, 0)). Similar to Qt. +#define QTWEBKIT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) + #if defined(QT_MAKEDLL) /* create a Qt DLL library */ # if defined(BUILD_WEBKIT) # define QWEBKIT_EXPORT Q_DECL_EXPORT diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp index 2a8aced..0e11c15 100644 --- a/WebKit/qt/Api/qwebpage.cpp +++ b/WebKit/qt/Api/qwebpage.cpp @@ -80,6 +80,7 @@ #include "Cache.h" #include "runtime/InitializeThreading.h" #include "PageGroup.h" +#include "NotificationPresenterClientQt.h" #include "QWebPageClient.h" #include "WorkerThread.h" @@ -119,81 +120,16 @@ using namespace WebCore; -void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories() +void QWEBKIT_EXPORT qt_wrt_setViewMode(QWebPage* page, const QString& mode) { - PluginDatabase* db = PluginDatabase::installedPlugins(/* populate */ false); - - Vector<String> paths; - String qtPath(qgetenv("QTWEBKIT_PLUGIN_PATH").data()); - qtPath.split(UChar(':'), /* allowEmptyEntries */ false, paths); - - db->setPluginDirectories(paths); - db->refresh(); -} - -int QWEBKIT_EXPORT qt_drt_workerThreadCount() -{ -#if ENABLE(WORKERS) - return WebCore::WorkerThread::workerThreadCount(); -#else - return 0; -#endif + QWebPagePrivate::priv(page)->viewMode = mode; + WebCore::Frame* frame = QWebFramePrivate::core(page->mainFrame()); + WebCore::FrameView* view = frame->view(); + frame->document()->updateStyleSelector(); + view->forceLayout(); } bool QWebPagePrivate::drtRun = false; -void QWEBKIT_EXPORT qt_drt_run(bool b) -{ - QWebPagePrivate::drtRun = b; -} - -void QWEBKIT_EXPORT qt_drt_setFrameSetFlatteningEnabled(QWebPage* page, bool enabled) -{ - QWebPagePrivate::core(page)->settings()->setFrameSetFlatteningEnabled(enabled); -} - -void QWEBKIT_EXPORT qt_webpage_setGroupName(QWebPage* page, const QString& groupName) -{ - page->handle()->page->setGroupName(groupName); -} - -QString QWEBKIT_EXPORT qt_webpage_groupName(QWebPage* page) -{ - return page->handle()->page->groupName(); -} - -#if ENABLE(INSPECTOR) -void QWEBKIT_EXPORT qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script) -{ - if (!page->handle()->page->inspectorController()) - return; - page->handle()->page->inspectorController()->evaluateForTestInFrontend(callId, script); -} - -void QWEBKIT_EXPORT qt_drt_webinspector_close(QWebPage* page) -{ - if (!page->handle()->page->inspectorController()) - return; - page->handle()->page->inspectorController()->close(); -} - -void QWEBKIT_EXPORT qt_drt_webinspector_show(QWebPage* page) -{ - if (!page->handle()->page->inspectorController()) - return; - page->handle()->page->inspectorController()->show(); -} - -void QWEBKIT_EXPORT qt_drt_setTimelineProfilingEnabled(QWebPage* page, bool enabled) -{ - InspectorController* controller = page->handle()->page->inspectorController(); - if (!controller) - return; - if (enabled) - controller->startTimelineProfiler(); - else - controller->stopTimelineProfiler(); -} -#endif class QWebPageWidgetClient : public QWebPageClient { public: @@ -203,6 +139,8 @@ public: Q_ASSERT(view); } + virtual bool isQWidgetClient() const { return true; } + virtual void scroll(int dx, int dy, const QRect&); virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); @@ -219,6 +157,7 @@ public: virtual QPalette palette() const; virtual int screenNumber() const; virtual QWidget* ownerWidget() const; + virtual QRect geometryRelativeToOwnerWidget() const; virtual QObject* pluginParent() const; @@ -276,10 +215,8 @@ QPalette QWebPageWidgetClient::palette() const int QWebPageWidgetClient::screenNumber() const { #if defined(Q_WS_X11) - if (view) - return view->x11Info().screen(); + return view->x11Info().screen(); #endif - return 0; } @@ -288,6 +225,11 @@ QWidget* QWebPageWidgetClient::ownerWidget() const return view; } +QRect QWebPageWidgetClient::geometryRelativeToOwnerWidget() const +{ + return view->geometry(); +} + QObject* QWebPageWidgetClient::pluginParent() const { return view; @@ -464,11 +406,17 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq) #ifndef QT_NO_CONTEXTMENU currentContextMenu = 0; #endif + smartInsertDeleteEnabled = false; + selectTrailingWhitespaceEnabled = false; history.d = new QWebHistoryPrivate(page->backForwardList()); memset(actions, 0, sizeof(actions)); PageGroup::setShouldTrackVisitedLinks(true); + +#if ENABLE(NOTIFICATIONS) + notificationPresenterClient = new NotificationPresenterClientQt(); +#endif } QWebPagePrivate::~QWebPagePrivate() @@ -481,6 +429,10 @@ QWebPagePrivate::~QWebPagePrivate() #endif delete settings; delete page; + +#if ENABLE(NOTIFICATIONS) + delete notificationPresenterClient; +#endif } WebCore::Page* QWebPagePrivate::core(QWebPage* page) @@ -488,6 +440,11 @@ WebCore::Page* QWebPagePrivate::core(QWebPage* page) return page->d->page; } +QWebPagePrivate* QWebPagePrivate::priv(QWebPage* page) +{ + return page->d; +} + bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type) { if (insideOpenCall @@ -542,7 +499,10 @@ static QWebPage::WebAction webActionForContextMenuAction(WebCore::ContextMenuAct QMenu *QWebPagePrivate::createContextMenu(const WebCore::ContextMenu *webcoreMenu, const QList<WebCore::ContextMenuItem> *items, QBitArray *visitedWebActions) { - QMenu* menu = new QMenu(q->view()); + if (!client) + return 0; + + QMenu* menu = new QMenu(client->ownerWidget()); for (int i = 0; i < items->count(); ++i) { const ContextMenuItem &item = items->at(i); switch (item.type()) { @@ -591,6 +551,7 @@ QMenu *QWebPagePrivate::createContextMenu(const WebCore::ContextMenu *webcoreMen } #endif // QT_NO_CONTEXTMENU +#ifndef QT_NO_ACTION void QWebPagePrivate::_q_webActionTriggered(bool checked) { QAction *a = qobject_cast<QAction *>(q->sender()); @@ -599,6 +560,7 @@ void QWebPagePrivate::_q_webActionTriggered(bool checked) QWebPage::WebAction action = static_cast<QWebPage::WebAction>(a->data().toInt()); q->triggerAction(action, checked); } +#endif // QT_NO_ACTION void QWebPagePrivate::_q_cleanupLeakMessages() { @@ -610,6 +572,9 @@ void QWebPagePrivate::_q_cleanupLeakMessages() void QWebPagePrivate::updateAction(QWebPage::WebAction action) { +#ifdef QT_NO_ACTION + Q_UNUSED(action) +#else QAction *a = actions[action]; if (!a || !mainFrame) return; @@ -669,6 +634,7 @@ void QWebPagePrivate::updateAction(QWebPage::WebAction action) if (a->isCheckable()) a->setChecked(checked); +#endif // QT_NO_ACTION } void QWebPagePrivate::updateNavigationActions() @@ -769,6 +735,11 @@ void QWebPagePrivate::mousePressEvent(QGraphicsSceneMouseEvent* ev) if (!frame->view()) return; + RefPtr<WebCore::Node> oldNode; + Frame* focusedFrame = page->focusController()->focusedFrame(); + if (Document* focusedDocument = focusedFrame ? focusedFrame->document() : 0) + oldNode = focusedDocument->focusedNode(); + if (tripleClickTimer.isActive() && (ev->pos().toPoint() - tripleClick).manhattanLength() < QApplication::startDragDistance()) { @@ -782,6 +753,14 @@ void QWebPagePrivate::mousePressEvent(QGraphicsSceneMouseEvent* ev) if (mev.button() != NoButton) accepted = frame->eventHandler()->handleMousePressEvent(mev); ev->setAccepted(accepted); + + RefPtr<WebCore::Node> newNode; + focusedFrame = page->focusController()->focusedFrame(); + if (Document* focusedDocument = focusedFrame ? focusedFrame->document() : 0) + newNode = focusedDocument->focusedNode(); + + if (newNode && oldNode != newNode) + clickCausedFocus = true; } void QWebPagePrivate::mousePressEvent(QMouseEvent *ev) @@ -791,9 +770,9 @@ void QWebPagePrivate::mousePressEvent(QMouseEvent *ev) return; RefPtr<WebCore::Node> oldNode; - if (page->focusController()->focusedFrame() - && page->focusController()->focusedFrame()->document()) - oldNode = page->focusController()->focusedFrame()->document()->focusedNode(); + Frame* focusedFrame = page->focusController()->focusedFrame(); + if (Document* focusedDocument = focusedFrame ? focusedFrame->document() : 0) + oldNode = focusedDocument->focusedNode(); if (tripleClickTimer.isActive() && (ev->pos() - tripleClick).manhattanLength() @@ -810,9 +789,9 @@ void QWebPagePrivate::mousePressEvent(QMouseEvent *ev) ev->setAccepted(accepted); RefPtr<WebCore::Node> newNode; - if (page->focusController()->focusedFrame() - && page->focusController()->focusedFrame()->document()) - newNode = page->focusController()->focusedFrame()->document()->focusedNode(); + focusedFrame = page->focusController()->focusedFrame(); + if (Document* focusedDocument = focusedFrame ? focusedFrame->document() : 0) + newNode = focusedDocument->focusedNode(); if (newNode && oldNode != newNode) clickCausedFocus = true; @@ -1050,10 +1029,8 @@ QWebPage::WebAction QWebPagePrivate::editorActionForKeyEvent(QKeyEvent* event) { QKeySequence::SelectEndOfDocument, QWebPage::SelectEndOfDocument }, { QKeySequence::DeleteStartOfWord, QWebPage::DeleteStartOfWord }, { QKeySequence::DeleteEndOfWord, QWebPage::DeleteEndOfWord }, -#if QT_VERSION >= 0x040500 { QKeySequence::InsertParagraphSeparator, QWebPage::InsertParagraphSeparator }, { QKeySequence::InsertLineSeparator, QWebPage::InsertLineSeparator }, -#endif { QKeySequence::SelectAll, QWebPage::SelectAll }, { QKeySequence::UnknownKey, QWebPage::NoWebAction } }; @@ -1078,8 +1055,8 @@ void QWebPagePrivate::keyPressEvent(QKeyEvent *ev) if (!handled) { handled = true; QFont defaultFont; - if (q->view()) - defaultFont = q->view()->font(); + if (client) + defaultFont = client->ownerWidget()->font(); QFontMetrics fm(defaultFont); if (!handleScrolling(ev, frame)) { switch (ev->key()) { @@ -1294,7 +1271,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) case QInputMethodEvent::TextFormat: { QTextCharFormat textCharFormat = a.value.value<QTextFormat>().toCharFormat(); QColor qcolor = textCharFormat.underlineColor(); - underlines.append(CompositionUnderline(a.start, a.length, Color(makeRGBA(qcolor.red(), qcolor.green(), qcolor.blue(), qcolor.alpha())), false)); + underlines.append(CompositionUnderline(qMin(a.start, (a.start + a.length)), qMax(a.start, (a.start + a.length)), Color(makeRGBA(qcolor.red(), qcolor.green(), qcolor.blue(), qcolor.alpha())), false)); break; } case QInputMethodEvent::Cursor: { @@ -1311,8 +1288,8 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) #if QT_VERSION >= 0x040600 case QInputMethodEvent::Selection: { if (renderTextControl) { - renderTextControl->setSelectionStart(a.start); - renderTextControl->setSelectionEnd(a.start + a.length); + renderTextControl->setSelectionStart(qMin(a.start, (a.start + a.length))); + renderTextControl->setSelectionEnd(qMax(a.start, (a.start + a.length))); } break; } @@ -1777,7 +1754,7 @@ QWebPage::QWebPage(QObject *parent) : QObject(parent) , d(new QWebPagePrivate(this)) { - setView(qobject_cast<QWidget *>(parent)); + setView(qobject_cast<QWidget*>(parent)); connect(this, SIGNAL(loadProgress(int)), this, SLOT(_q_onLoadProgressChanged(int))); #ifndef NDEBUG @@ -1861,21 +1838,28 @@ QWebHistory *QWebPage::history() const \sa view() */ -void QWebPage::setView(QWidget *view) -{ - if (this->view() != view) { - d->view = view; - if (!view) { - delete d->client; - d->client = 0; - } else { - if (!d->client) - d->client = new QWebPageWidgetClient(view); - else - static_cast<QWebPageWidgetClient*>(d->client)->view = view; - } - setViewportSize(view ? view->size() : QSize(0, 0)); +void QWebPage::setView(QWidget* view) +{ + if (this->view() == view) + return; + + d->view = view; + setViewportSize(view ? view->size() : QSize(0, 0)); + + // If we have no client, we install a special client delegating + // the responsibility to the QWidget. This is the code path + // handling a.o. the "legacy" QWebView. + // + // If such a special delegate already exist, we substitute the view. + + if (d->client) { + if (d->client->isQWidgetClient()) + static_cast<QWebPageWidgetClient*>(d->client)->view = view; + return; } + + if (view) + d->client = new QWebPageWidgetClient(view); } /*! @@ -1916,7 +1900,8 @@ void QWebPage::javaScriptAlert(QWebFrame *frame, const QString& msg) { Q_UNUSED(frame) #ifndef QT_NO_MESSAGEBOX - QMessageBox::information(view(), tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Ok); + QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; + QMessageBox::information(parent, tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Ok); #endif } @@ -1932,7 +1917,8 @@ bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg) #ifdef QT_NO_MESSAGEBOX return true; #else - return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Yes, QMessageBox::No); + QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; + return QMessageBox::Yes == QMessageBox::information(parent, tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Yes, QMessageBox::No); #endif } @@ -1951,7 +1937,8 @@ bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QStr Q_UNUSED(frame) bool ok = false; #ifndef QT_NO_INPUTDIALOG - QString x = QInputDialog::getText(view(), tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QLineEdit::Normal, defaultValue, &ok); + QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; + QString x = QInputDialog::getText(parent, tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QLineEdit::Normal, defaultValue, &ok); if (ok && result) *result = x; #endif @@ -1976,7 +1963,8 @@ bool QWebPage::shouldInterruptJavaScript() #ifdef QT_NO_MESSAGEBOX return false; #else - return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No); + QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; + return QMessageBox::Yes == QMessageBox::information(parent, tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No); #endif } @@ -1995,7 +1983,7 @@ bool QWebPage::shouldInterruptJavaScript() */ QWebPage *QWebPage::createWindow(WebWindowType type) { - QWebView *webView = qobject_cast<QWebView *>(view()); + QWebView *webView = qobject_cast<QWebView*>(view()); if (webView) { QWebView *newView = webView->createWindow(type); if (newView) @@ -2260,6 +2248,7 @@ QString QWebPage::selectedText() const return d->page->focusController()->focusedOrMainFrame()->selectedText(); } +#ifndef QT_NO_ACTION /*! Returns a QAction for the specified WebAction \a action. @@ -2279,7 +2268,7 @@ QAction *QWebPage::action(WebAction action) const QString text; QIcon icon; - QStyle *style = view() ? view()->style() : qApp->style(); + QStyle *style = d->client ? d->client->style() : qApp->style(); bool checkable = false; switch (action) { @@ -2532,6 +2521,7 @@ QAction *QWebPage::action(WebAction action) const d->updateAction(action); return a; } +#endif // QT_NO_ACTION /*! \property QWebPage::modified @@ -2801,6 +2791,7 @@ bool QWebPage::swallowContextMenuEvent(QContextMenuEvent *event) */ void QWebPage::updatePositionDependentActions(const QPoint &pos) { +#ifndef QT_NO_ACTION // First we disable all actions, but keep track of which ones were originally enabled. QBitArray originallyEnabledWebActions(QWebPage::WebActionCount); for (int i = ContextMenuItemTagNoAction; i < ContextMenuItemBaseApplicationTag; ++i) { @@ -2810,6 +2801,7 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) a->setEnabled(false); } } +#endif // QT_NO_ACTION d->createMainFrame(); WebCore::Frame* focusedFrame = d->page->focusController()->focusedOrMainFrame(); @@ -2836,6 +2828,7 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) d->currentContextMenu = d->createContextMenu(&menu, menu.platformDescription(), &visitedWebActions); #endif // QT_NO_CONTEXTMENU +#ifndef QT_NO_ACTION // Finally, we restore the original enablement for the actions that were not put into the menu. originallyEnabledWebActions &= ~visitedWebActions; // Mask out visited actions (they're part of the menu) for (int i = 0; i < QWebPage::WebActionCount; ++i) { @@ -2844,6 +2837,7 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) a->setEnabled(true); } } +#endif // QT_NO_ACTION // This whole process ensures that any actions put into to the context menu has the right // enablement, while also keeping the correct enablement for actions that were left out of @@ -2976,7 +2970,8 @@ bool QWebPage::extension(Extension extension, const ExtensionOption *option, Ext if (extension == ChooseMultipleFilesExtension) { // FIXME: do not ignore suggestedFiles QStringList suggestedFiles = static_cast<const ChooseMultipleFilesExtensionOption*>(option)->suggestedFileNames; - QStringList names = QFileDialog::getOpenFileNames(view(), QString::null); + QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; + QStringList names = QFileDialog::getOpenFileNames(parent, QString::null); static_cast<ChooseMultipleFilesExtensionReturn*>(output)->fileNames = names; return true; } @@ -3058,7 +3053,8 @@ QString QWebPage::chooseFile(QWebFrame *parentFrame, const QString& suggestedFil { Q_UNUSED(parentFrame) #ifndef QT_NO_FILEDIALOG - return QFileDialog::getOpenFileName(view(), QString::null, suggestedFile); + QWidget* parent = (d->client) ? d->client->ownerWidget() : 0; + return QFileDialog::getOpenFileName(parent, QString::null, suggestedFile); #else return QString::null; #endif @@ -3129,6 +3125,8 @@ QWebPluginFactory *QWebPage::pluginFactory() const "Mozilla/5.0 (%Platform%; %Security%; %Subplatform%; %Locale%) AppleWebKit/%WebKitVersion% (KHTML, like Gecko) %AppVersion Safari/%WebKitVersion%" + On mobile platforms such as Symbian S60 and Maemo, "Mobile Safari" is used instead of "Safari". + In this string the following values are replaced at run-time: \list \o %Platform% and %Subplatform% are expanded to the windowing system and the operation system. @@ -3336,8 +3334,8 @@ QString QWebPage::userAgentForUrl(const QUrl& url) const // Language QLocale locale; - if (view()) - locale = view()->locale(); + if (d->client && d->client->ownerWidget()) + locale = d->client->ownerWidget()->locale(); QString name = locale.name(); name[2] = QLatin1Char('-'); ua.append(name); @@ -3360,9 +3358,11 @@ QString QWebPage::userAgentForUrl(const QUrl& url) const ua.append(QLatin1String(qVersion())); } - ua.append(QString(QLatin1String(" Safari/%1")) - .arg(qWebKitVersion())); - +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) + ua.append(QString(QLatin1String(" Mobile Safari/%1")).arg(qWebKitVersion())); +#else + ua.append(QString(QLatin1String(" Safari/%1")).arg(qWebKitVersion())); +#endif return ua; } @@ -3515,7 +3515,11 @@ quint64 QWebPage::bytesReceived() const /*! \fn void QWebPage::unsupportedContent(QNetworkReply *reply) - This signal is emitted when WebKit cannot handle a link the user navigated to. + This signal is emitted when WebKit cannot handle a link the user navigated to or a + web server's response includes a "Content-Disposition" header with the 'attachment' + directive. If "Content-Disposition" is present in \a reply, the web server is indicating + that the client should prompt the user to save the content regardless of content-type. + See RFC 2616 sections 19.5.1 for details about Content-Disposition. At signal emission time the meta-data of the QNetworkReply \a reply is available. diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h index 4766cbd..c085fd7 100644 --- a/WebKit/qt/Api/qwebpage.h +++ b/WebKit/qt/Api/qwebpage.h @@ -54,6 +54,8 @@ namespace WebCore { class EditorClientQt; class FrameLoaderClientQt; class InspectorClientQt; + class InspectorFrontendClientQt; + class NotificationPresenterClientQt; class ResourceHandle; class HitTestResult; class QNetworkReplyHandler; @@ -219,7 +221,9 @@ public: QString selectedText() const; +#ifndef QT_NO_ACTION QAction *action(WebAction action) const; +#endif virtual void triggerAction(WebAction action, bool checked = false); QSize viewportSize() const; @@ -347,7 +351,9 @@ protected: private: Q_PRIVATE_SLOT(d, void _q_onLoadProgressChanged(int)) +#ifndef QT_NO_ACTION Q_PRIVATE_SLOT(d, void _q_webActionTriggered(bool checked)) +#endif Q_PRIVATE_SLOT(d, void _q_cleanupLeakMessages()) QWebPagePrivate *d; @@ -355,14 +361,19 @@ private: friend class QWebFrame; friend class QWebPagePrivate; friend class QWebView; + friend class QWebViewPrivate; friend class QGraphicsWebView; + friend class QGraphicsWebViewPrivate; friend class QWebInspector; friend class WebCore::ChromeClientQt; friend class WebCore::EditorClientQt; friend class WebCore::FrameLoaderClientQt; friend class WebCore::InspectorClientQt; + friend class WebCore::InspectorFrontendClientQt; + friend class WebCore::NotificationPresenterClientQt; friend class WebCore::ResourceHandle; friend class WebCore::QNetworkReplyHandler; + friend class DumpRenderTreeSupportQt; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QWebPage::FindFlags) diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h index 15ddfb2..f40053b 100644 --- a/WebKit/qt/Api/qwebpage_p.h +++ b/WebKit/qt/Api/qwebpage_p.h @@ -44,6 +44,7 @@ namespace WebCore { class EditorClientQt; class Element; class InspectorController; + class NotificationPresenterClientQt; class Node; class Page; class Frame; @@ -64,6 +65,7 @@ public: ~QWebPagePrivate(); static WebCore::Page* core(QWebPage*); + static QWebPagePrivate* priv(QWebPage*); void createMainFrame(); #ifndef QT_NO_CONTEXTMENU @@ -162,6 +164,8 @@ public: QNetworkAccessManager *networkManager; bool forwardUnsupportedContent; + bool smartInsertDeleteEnabled; + bool selectTrailingWhitespaceEnabled; QWebPage::LinkDelegationPolicy linkPolicy; QSize viewportSize; @@ -184,6 +188,10 @@ public: QWebInspector* inspector; bool inspectorIsInternalOnly; // True if created through the Inspect context menu action Qt::DropAction m_lastDropAction; + + WebCore::NotificationPresenterClientQt* notificationPresenterClient; + + QString viewMode; static bool drtRun; }; diff --git a/WebKit/qt/Api/qwebsecurityorigin.cpp b/WebKit/qt/Api/qwebsecurityorigin.cpp index 6c26bd7..b69f24d 100644 --- a/WebKit/qt/Api/qwebsecurityorigin.cpp +++ b/WebKit/qt/Api/qwebsecurityorigin.cpp @@ -30,21 +30,6 @@ using namespace WebCore; -void QWEBKIT_EXPORT qt_drt_whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains) -{ - SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains); -} - -void QWEBKIT_EXPORT qt_drt_resetOriginAccessWhiteLists() -{ - SecurityOrigin::resetOriginAccessWhiteLists(); -} - -void QWEBKIT_EXPORT qt_drt_setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme) -{ - SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme); -} - /*! \class QWebSecurityOrigin \since 4.5 diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp index d60f09c..1dff037 100644 --- a/WebKit/qt/Api/qwebsettings.cpp +++ b/WebKit/qt/Api/qwebsettings.cpp @@ -26,6 +26,7 @@ #include "Cache.h" #include "CrossOriginPreflightResultCache.h" +#include "Database.h" #include "FontCache.h" #include "Page.h" #include "PageCache.h" @@ -73,6 +74,7 @@ public: QString localStoragePath; QString offlineWebApplicationCachePath; qint64 offlineStorageDefaultQuota; + QUrl inspectorLocation; void apply(); WebCore::Settings* settings; @@ -158,6 +160,13 @@ void QWebSettingsPrivate::apply() settings->setAcceleratedCompositingEnabled(value); #endif +#if ENABLE(3D_CANVAS) + value = attributes.value(QWebSettings::WebGLEnabled, + global->attributes.value(QWebSettings::WebGLEnabled)); + + settings->setWebGLEnabled(value); +#endif + value = attributes.value(QWebSettings::JavascriptCanOpenWindows, global->attributes.value(QWebSettings::JavascriptCanOpenWindows)); settings->setJavaScriptCanOpenWindowsAutomatically(value); @@ -174,6 +183,10 @@ void QWebSettingsPrivate::apply() global->attributes.value(QWebSettings::PrivateBrowsingEnabled)); settings->setPrivateBrowsingEnabled(value); + value = attributes.value(QWebSettings::SpatialNavigationEnabled, + global->attributes.value(QWebSettings::SpatialNavigationEnabled)); + settings->setSpatialNavigationEnabled(value); + value = attributes.value(QWebSettings::JavascriptCanAccessClipboard, global->attributes.value(QWebSettings::JavascriptCanAccessClipboard)); settings->setDOMPasteAllowed(value); @@ -182,6 +195,10 @@ void QWebSettingsPrivate::apply() global->attributes.value(QWebSettings::DeveloperExtrasEnabled)); settings->setDeveloperExtrasEnabled(value); + value = attributes.value(QWebSettings::FrameFlatteningEnabled, + global->attributes.value(QWebSettings::FrameFlatteningEnabled)); + settings->setFrameFlatteningEnabled(value); + QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation; settings->setUserStyleSheetLocation(WebCore::KURL(location)); @@ -193,15 +210,17 @@ void QWebSettingsPrivate::apply() value = attributes.value(QWebSettings::ZoomTextOnly, global->attributes.value(QWebSettings::ZoomTextOnly)); - settings->setZoomsTextOnly(value); + settings->setZoomMode(value ? WebCore::ZoomTextOnly : WebCore::ZoomPage); value = attributes.value(QWebSettings::PrintElementBackgrounds, global->attributes.value(QWebSettings::PrintElementBackgrounds)); settings->setShouldPrintBackgrounds(value); +#if ENABLE(DATABASE) value = attributes.value(QWebSettings::OfflineStorageDatabaseEnabled, global->attributes.value(QWebSettings::OfflineStorageDatabaseEnabled)); - settings->setDatabasesEnabled(value); + WebCore::Database::setIsAvailable(value); +#endif value = attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled, global->attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled)); @@ -219,10 +238,16 @@ void QWebSettingsPrivate::apply() global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls)); settings->setAllowFileAccessFromFileURLs(value); - value = attributes.value(QWebSettings::XSSAuditorEnabled, - global->attributes.value(QWebSettings::XSSAuditorEnabled)); + value = attributes.value(QWebSettings::XSSAuditingEnabled, + global->attributes.value(QWebSettings::XSSAuditingEnabled)); settings->setXSSAuditorEnabled(value); +#if ENABLE(TILED_BACKING_STORE) + value = attributes.value(QWebSettings::TiledBackingStoreEnabled, + global->attributes.value(QWebSettings::TiledBackingStoreEnabled)); + settings->setTiledBackingStoreEnabled(value); +#endif + settings->setUsesPageCache(WebCore::pageCache()->capacity()); } else { QList<QWebSettingsPrivate*> settings = *::allSettings(); @@ -326,6 +351,7 @@ QWebSettings* QWebSettings::globalSettings() \value MissingPluginGraphic The replacement graphic shown when a plugin could not be loaded. \value DefaultFrameIconGraphic The default icon for QWebFrame::icon(). \value TextAreaSizeGripCornerGraphic The graphic shown for the size grip of text areas. + \value DeleteButtonGraphic The graphic shown for the WebKit-Editing-Delete-Button in Deletion UI. */ /*! @@ -352,6 +378,13 @@ QWebSettings* QWebSettings::globalSettings() Currently this enables the "Inspect" element in the context menu as well as the use of QWebInspector which controls the WebKit WebInspector for web site debugging. + \value SpatialNavigationEnabled Enables or disables the Spatial Navigation + feature, which consists in the ability to navigate between focusable + elements in a Web page, such as hyperlinks and form controls, by using + Left, Right, Up and Down arrow keys. For example, if an user presses the + Right key, heuristics determine whether there is an element he might be + trying to reach towards the right, and if there are multiple elements, + which element he probably wants. \value LinksIncludedInFocusChain Specifies whether hyperlinks should be included in the keyboard focus chain. \value ZoomTextOnly Specifies whether the zoom factor on a frame applies to @@ -367,8 +400,25 @@ QWebSettings* QWebSettings::globalSettings() \value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use QWebSettings::LocalStorageEnabled instead. \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls. - \value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are allowed to access other local urls. - \value XSSAuditorEnabled Specifies whether load requests should be monitored for cross-site scripting attempts. + \value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are allowed to access other local urls. + \value XSSAuditingEnabled Specifies whether load requests should be monitored for cross-site scripting attempts. + \value AcceleratedCompositingEnabled This feature, when used in conjunction with + QGraphicsWebView, accelerates animations of web content. CSS animations of the transform and + opacity properties will be rendered by composing the cached content of the animated elements. + This feature is enabled by default + \value TiledBackingStoreEnabled This setting enables the tiled backing store feature + for a QGraphicsWebView. With the tiled backing store enabled, the web page contents in and around + the current visible area is speculatively cached to bitmap tiles. The tiles are automatically kept + in sync with the web page as it changes. Enabling tiling can significantly speed up painting heavy + operations like scrolling. Enabling the feature increases memory consumption. It does not work well + with contents using CSS fixed positioning (see also \l{QGraphicsWebView::}{resizesToContents} property). + \l{QGraphicsWebView::}{tiledBackingStoreFrozen} property allows application to temporarily freeze the contents of the backing store. + \value FrameFlatteningEnabled With this setting each subframe is expanded to its contents. + On touch devices, it is desired to not have any scrollable sub parts of the page + as it results in a confusing user experience, with scrolling sometimes scrolling sub parts + and at other times scrolling the page itself. For this reason iframes and framesets are + barely usable on touch devices. This will flatten all the frames to become one scrollable page. + Disabled by default. */ /*! @@ -392,6 +442,7 @@ QWebSettings::QWebSettings() d->attributes.insert(QWebSettings::AutoLoadImages, true); d->attributes.insert(QWebSettings::DnsPrefetchEnabled, false); d->attributes.insert(QWebSettings::JavascriptEnabled, true); + d->attributes.insert(QWebSettings::SpatialNavigationEnabled, false); d->attributes.insert(QWebSettings::LinksIncludedInFocusChain, true); d->attributes.insert(QWebSettings::ZoomTextOnly, false); d->attributes.insert(QWebSettings::PrintElementBackgrounds, true); @@ -400,7 +451,10 @@ QWebSettings::QWebSettings() d->attributes.insert(QWebSettings::LocalStorageEnabled, false); d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false); d->attributes.insert(QWebSettings::LocalContentCanAccessFileUrls, true); - d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, false); + d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, true); + d->attributes.insert(QWebSettings::WebGLEnabled, false); + d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false); + d->attributes.insert(QWebSettings::FrameFlatteningEnabled, false); d->offlineStorageDefaultQuota = 5 * 1024 * 1024; d->defaultTextEncoding = QLatin1String("iso-8859-1"); } @@ -469,7 +523,8 @@ void QWebSettings::resetFontSize(FontSize type) The \a location must be either a path on the local filesystem, or a data URL with UTF-8 and Base64 encoded data, such as: - "data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==;" + "data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==" + NOTE: In case the base 64 data is not valid the style will not be applied. \sa userStyleSheetUrl() */ @@ -902,6 +957,8 @@ QString QWebSettings::offlineWebApplicationCachePath() void QWebSettings::setOfflineWebApplicationCacheQuota(qint64 maximumSize) { #if ENABLE(OFFLINE_WEB_APPLICATIONS) + WebCore::cacheStorage().empty(); + WebCore::cacheStorage().vacuumDatabaseFile(); WebCore::cacheStorage().setMaximumSize(maximumSize); #endif } @@ -941,6 +998,31 @@ void QWebSettings::setLocalStoragePath(const QString& path) } /*! + \since 4.7 + + Specifies the \a location of a frontend to load with each web page when using Web Inspector. + + \sa inspectorUrl() +*/ +void QWebSettings::setInspectorUrl(const QUrl& location) +{ + d->inspectorLocation = location; + d->apply(); +} + +/*! + \since 4.7 + + Returns the location of the Web Inspector frontend. + + \sa setInspectorUrl() +*/ +QUrl QWebSettings::inspectorUrl() const +{ + return d->inspectorLocation; +} + +/*! \since 4.6 \relates QWebSettings @@ -969,8 +1051,9 @@ void QWebSettings::enablePersistentStorage(const QString& path) QString storagePath; if (path.isEmpty()) { +#ifndef QT_NO_DESKTOPSERVICES storagePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation); - +#endif if (storagePath.isEmpty()) storagePath = WebCore::pathByAppendingComponent(QDir::homePath(), QCoreApplication::applicationName()); } else diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h index b1f5cf2..bd728d8 100644 --- a/WebKit/qt/Api/qwebsettings.h +++ b/WebKit/qt/Api/qwebsettings.h @@ -67,10 +67,14 @@ public: LocalStorageDatabaseEnabled = LocalStorageEnabled, #endif LocalContentCanAccessRemoteUrls, - LocalContentCanAccessFileUrls, DnsPrefetchEnabled, - XSSAuditorEnabled, - AcceleratedCompositingEnabled + XSSAuditingEnabled, + AcceleratedCompositingEnabled, + WebGLEnabled, + SpatialNavigationEnabled, + LocalContentCanAccessFileUrls, + TiledBackingStoreEnabled, + FrameFlatteningEnabled }; enum WebGraphic { MissingImageGraphic, @@ -133,6 +137,9 @@ public: void setLocalStoragePath(const QString& path); QString localStoragePath() const; + void setInspectorUrl(const QUrl &location); + QUrl inspectorUrl() const; + static void clearMemoryCaches(); static void enablePersistentStorage(const QString& path = QString()); diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp index 79c16c7..3ba1678 100644 --- a/WebKit/qt/Api/qwebview.cpp +++ b/WebKit/qt/Api/qwebview.cpp @@ -45,6 +45,7 @@ public: } void _q_pageDestroyed(); + void unsetPageIfExists(); QWebView *view; QWebPage *page; @@ -347,6 +348,29 @@ QWebPage *QWebView::page() const return d->page; } +void QWebViewPrivate::unsetPageIfExists() +{ + if (!page) + return; + + // if the page client is the special client constructed for + // delegating the responsibilities to a QWidget, we need + // to destroy it. + + if (page->d->client && page->d->client->isQWidgetClient()) + delete page->d->client; + + page->d->client = 0; + + // if the page was created by us, we own it and need to + // destroy it as well. + + if (page->parent() == view) + delete page; + else + page->disconnect(view); +} + /*! Makes \a page the new web page of the web view. @@ -360,14 +384,10 @@ void QWebView::setPage(QWebPage* page) { if (d->page == page) return; - if (d->page) { - d->page->d->client = 0; // unset the page client - if (d->page->parent() == this) - delete d->page; - else - d->page->disconnect(this); - } + + d->unsetPageIfExists(); d->page = page; + if (d->page) { d->page->setView(this); d->page->setPalette(palette()); @@ -397,9 +417,6 @@ void QWebView::setPage(QWebPage* page) this, SLOT(_q_pageDestroyed())); } setAttribute(Qt::WA_OpaquePaintEvent, d->page); -#if USE(ACCELERATED_COMPOSITING) - d->page->d->page->settings()->setAcceleratedCompositingEnabled(false); -#endif update(); } @@ -565,6 +582,7 @@ QString QWebView::selectedText() const return QString(); } +#ifndef QT_NO_ACTION /*! Returns a pointer to a QAction that encapsulates the specified web action \a action. */ @@ -572,6 +590,7 @@ QAction *QWebView::pageAction(QWebPage::WebAction action) const { return page()->action(action); } +#endif /*! Triggers the specified \a action. If it is a checkable action the specified diff --git a/WebKit/qt/Api/qwebview.h b/WebKit/qt/Api/qwebview.h index f681fbc..1d651d5 100644 --- a/WebKit/qt/Api/qwebview.h +++ b/WebKit/qt/Api/qwebview.h @@ -75,7 +75,9 @@ public: QString selectedText() const; +#ifndef QT_NO_ACTION QAction* pageAction(QWebPage::WebAction action) const; +#endif void triggerPageAction(QWebPage::WebAction action, bool checked = false); bool isModified() const; diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog index fb832b3..54f5f65 100644 --- a/WebKit/qt/ChangeLog +++ b/WebKit/qt/ChangeLog @@ -1,3 +1,1607 @@ +2010-04-21 Jakub Wieczorek <jwieczorek@webkit.org> + + Reviewed by Darin Adler. + + List item markers are not always updated after changes in the DOM. + https://bugs.webkit.org/show_bug.cgi?id=37060 + + * Api/qwebelement.h: Make DumpRenderTreeSupportQt a friend class. + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::markerTextForListItem): Add a private API to get the marker text for a list item. + +2010-04-21 Yi Shen <yi.4.shen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Check the request empty or not in ChromeClientQt::createWindow() + https://bugs.webkit.org/show_bug.cgi?id=37821 + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::createWindow): + +2010-04-21 Shu Chang <chang.shu@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix Symbian build where QT_NO_SYSTEMTRAYICON is defined. + https://bugs.webkit.org/show_bug.cgi?id=37442 + + * WebCoreSupport/NotificationPresenterClientQt.cpp: + (NotificationPresenterClientQt::show): + * WebCoreSupport/NotificationPresenterClientQt.h: + +2010-04-21 Eric Seidel <eric@webkit.org> + + Unreviewed, rolling out r57963. + http://trac.webkit.org/changeset/57963 + https://bugs.webkit.org/show_bug.cgi?id=37759 + + Three tests started crashing on the Qt bot. + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::isCommandEnabled): + * WebCoreSupport/DumpRenderTreeSupportQt.h: + +2010-04-21 Yi Shen <yi.4.shen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Add LayoutTestController interface: computedStyleIncludingVisitedInfo + https://bugs.webkit.org/show_bug.cgi?id=37759 + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo): + * WebCoreSupport/DumpRenderTreeSupportQt.h: + +2010-04-21 No'am Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Simon Fraser. + + [Qt] Fix or remove the runtime flag for accelerated compositing. + https://bugs.webkit.org/show_bug.cgi?id=37313 + + This lets the QWebPageClient "veto" the settings value for accelerated compositing. + In this case we allow accelerated compositing only on QGraphicsWebView. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::allowsAcceleratedCompositing): + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::allowsAcceleratedCompositing): + * WebCoreSupport/ChromeClientQt.h: + +2010-04-20 Adam Barth <abarth@webkit.org> + + Unreviewed build fix. + + * Api/qwebframe.cpp: + (QWebFrame::setUrl): + +2010-04-20 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::finishedLoading): + (WebCore::FrameLoaderClientQt::setMainDocumentError): + (WebCore::FrameLoaderClientQt::committedLoad): + (WebCore::FrameLoaderClientQt::dispatchDidFailLoading): + +2010-04-20 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Change a parameter type of chooseIconForFiles() + https://bugs.webkit.org/show_bug.cgi?id=37504 + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::chooseIconForFiles): + * WebCoreSupport/ChromeClientQt.h: + +2010-04-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix compilation against namespaced Qt. + + * WebCoreSupport/ChromeClientQt.h: + * WebCoreSupport/QtFallbackWebPopup.h: + +2010-04-18 Robert Hogan <robert@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Add support for LayoutTestController commands: + setSmartInsertDeleteEnabled + setSelectTrailingWhitespaceEnabled + execCommand + isCommandEnabled + + https://bugs.webkit.org/show_bug.cgi?id=35844 + + * Api/qwebpage.cpp: + (QWebPagePrivate::QWebPagePrivate): + * Api/qwebpage_p.h: + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::setSmartInsertDeleteEnabled): + (DumpRenderTreeSupportQt::setSelectTrailingWhitespaceEnabled): + (DumpRenderTreeSupportQt::executeCoreCommandByName): + (DumpRenderTreeSupportQt::isCommandEnabled): + * WebCoreSupport/DumpRenderTreeSupportQt.h: + * WebCoreSupport/EditorClientQt.cpp: + (WebCore::EditorClientQt::smartInsertDeleteEnabled): + (WebCore::EditorClientQt::toggleSmartInsertDelete): + (WebCore::EditorClientQt::isSelectTrailingWhitespaceEnabled): + * WebCoreSupport/EditorClientQt.h: + +2010-04-15 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Mark QWebFrame::overloadedSlots autotest as expected failure + + https://bugs.webkit.org/show_bug.cgi?id=37319 + + * tests/qwebframe/tst_qwebframe.cpp: + +2010-04-09 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Kenneth Christiansen and Tor Arne Vestbø. + + REGRESSION(r56552): Broken scrollbars size + https://bugs.webkit.org/show_bug.cgi?id=36853 + + The regression was caused by r56552, which introduced a fix to bug + webkit.org/b/21300. The bug solved an issue with the resize handle on mac, + but did it in a way that affected all Qt platforms and thus broke the behavior + on non-mac platforms. + + This patch makes the mac specific change ifdef'ed and only applied for the mac + platform. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::windowResizerRect): + +2010-04-15 Bruno Schmidt <bruno.schmidt@gmail.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Null QObjects properties cause Segmentation Fault + https://bugs.webkit.org/show_bug.cgi?id=34730 + + QObjects exported to the QWebkit javascript with properties that are + a null "QObject*" cause Segmentation Fault. + + If an QObject is added to the javascript context and it contains + properties of the type QObject* with NULL value, calling the property + causes Segmentation Fault. + + Follow the tests for the corrections done over WebCore. + + * tests/qwebframe/tst_qwebframe.cpp: + (MyQObject::MyQObject): init the field m_objectStar + (MyQObject::objectStarProperty): read the Object* prop + (MyQObject::setObjectStarProperty): write the Object* prop + (tst_QWebFrame::getSetStaticProperty): new tests for the new prop + +2010-04-14 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + Changing view mode names due to specification changes + https://bugs.webkit.org/show_bug.cgi?id=37615 + + test: fast/media/media-feature-wgt-view-mode.html + + specification: http://dev.w3.org/2006/waf/widgets-vmmf/ + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::isWindowed): + (WebCore::ChromeClientQt::isFullscreen): + (WebCore::ChromeClientQt::isMaximized): + (WebCore::ChromeClientQt::isMinimized): + * WebCoreSupport/ChromeClientQt.h: + +2010-04-14 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Simon Hausmann. + + [Qt] Moving setViewMode from DumpRenderTreeSupportQt to qwebpage.cpp + https://bugs.webkit.org/show_bug.cgi?id=37622 + + Method qt_wrt_setViewMode was removed from qwebpage.cpp by mistake in r57433 + (bug 35844). Moving it back. + + * Api/qwebpage.cpp: + (qt_wrt_setViewMode): + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::setMediaType): + * WebCoreSupport/DumpRenderTreeSupportQt.h: + +2010-04-14 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Rendering artifacts on Qt plugins when scrolling the page + https://bugs.webkit.org/show_bug.cgi?id=37152 + + Because we no longer repaint the entire viewport on scroll, + we must trigger a repaint of QtPluginWidgets when their geometry changes. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + +2010-04-14 Aaron Boodman <aa@chromium.org> + + Reviewed by David Levin. + + Support relative URLs for notifications on Chromium. They weren't working previously because WebCore was inserting + the relative URL into a KURL instance, but when KURL is backed by GURL as it is on Chromium, relative URLs are + unsupported. Fixed by resolving the relative URL first. + + https://bugs.webkit.org/show_bug.cgi?id=36623 + + Adding tests for this is difficult because we don't currently have DRT support for notifications on Mac, only Windows. + + * WebCoreSupport/NotificationPresenterClientQt.cpp: + (NotificationPresenterClientQt::show): Return type of NotificationContents::iconURL() changed. + +2010-04-13 Timothy Hatcher <timothy@apple.com> + + Rename SecurityOrigin::whiteListAccessFromOrigin to addOriginAccessWhitelistEntry. + And SecurityOrigin::resetOriginAccessWhiteLists to resetOriginAccessWhitelists. + + SecurityOrigin needs a way to remove individual OriginAccessEntries + https://bugs.webkit.org/show_bug.cgi?id=37449 + + Reviewed by Dave Hyatt. + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::whiteListAccessFromOrigin): + (DumpRenderTreeSupportQt::resetOriginAccessWhiteLists): + +2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57468. + http://trac.webkit.org/changeset/57468 + https://bugs.webkit.org/show_bug.cgi?id=37433 + + Broke the world... Must have applied the patch wrong + (Requested by abarth on #webkit). + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::finishedLoading): + (WebCore::FrameLoaderClientQt::setMainDocumentError): + (WebCore::FrameLoaderClientQt::committedLoad): + (WebCore::FrameLoaderClientQt::dispatchDidFailLoading): + +2010-04-11 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::finishedLoading): + (WebCore::FrameLoaderClientQt::setMainDocumentError): + (WebCore::FrameLoaderClientQt::committedLoad): + (WebCore::FrameLoaderClientQt::dispatchDidFailLoading): + +2010-04-11 Robert Hogan <robert@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Add setWillSendRequestReturnsNull and setWillSendRequestClearHeader + + https://bugs.webkit.org/show_bug.cgi?id=37410 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (qt_set_will_send_request_returns_null): + (qt_set_will_send_request_clear_headers): + (WebCore::FrameLoaderClientQt::dispatchWillSendRequest): + +2010-04-10 Robert Hogan <robert@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + Refactor Qt DRT support in QtWebKit + + Move all QT DRT support functions to a static class. + + https://bugs.webkit.org/show_bug.cgi?id=35844 + + * Api/qwebframe.cpp: Remove static functions. + * Api/qwebframe.h: Make DumpRenderTreeSupportQt a friend. + * Api/qwebpage.cpp: Remove static functions. + * Api/qwebpage.h: Make DumpRenderTreeSupportQt a friend. + * Api/qwebsecurityorigin.cpp: Remove static functions. + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: Added. + (DumpRenderTreeSupportQt::DumpRenderTreeSupportQt): + (DumpRenderTreeSupportQt::~DumpRenderTreeSupportQt): + (DumpRenderTreeSupportQt::overwritePluginDirectories): + (DumpRenderTreeSupportQt::workerThreadCount): + (DumpRenderTreeSupportQt::setDumpRenderTreeModeEnabled): + (DumpRenderTreeSupportQt::setFrameFlatteningEnabled): + (DumpRenderTreeSupportQt::webPageSetGroupName): + (DumpRenderTreeSupportQt::webPageGroupName): + (DumpRenderTreeSupportQt::webInspectorExecuteScript): + (DumpRenderTreeSupportQt::webInspectorClose): + (DumpRenderTreeSupportQt::webInspectorShow): + (DumpRenderTreeSupportQt::setTimelineProfilingEnabled): + (DumpRenderTreeSupportQt::hasDocumentElement): + (DumpRenderTreeSupportQt::setJavaScriptProfilingEnabled): + (DumpRenderTreeSupportQt::pauseAnimation): + (DumpRenderTreeSupportQt::pauseTransitionOfProperty): + (DumpRenderTreeSupportQt::pauseSVGAnimation): + (DumpRenderTreeSupportQt::numberOfActiveAnimations): + (DumpRenderTreeSupportQt::clearFrameName): + (DumpRenderTreeSupportQt::javaScriptObjectsCount): + (DumpRenderTreeSupportQt::garbageCollectorCollect): + (DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread): + (DumpRenderTreeSupportQt::counterValueForElementById): + (DumpRenderTreeSupportQt::pageNumberForElementById): + (DumpRenderTreeSupportQt::numberOfPages): + (DumpRenderTreeSupportQt::suspendActiveDOMObjects): + (DumpRenderTreeSupportQt::resumeActiveDOMObjects): + (DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld): + (DumpRenderTreeSupportQt::whiteListAccessFromOrigin): + (DumpRenderTreeSupportQt::resetOriginAccessWhiteLists): + (DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme): + (DumpRenderTreeSupportQt::setCaretBrowsingEnabled): + (DumpRenderTreeSupportQt::setMediaType): + (DumpRenderTreeSupportQt::setViewMode): + * WebCoreSupport/DumpRenderTreeSupportQt.h: Added. + * WebCoreSupport/EditorClientQt.h: + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::multiplePageGroupsAndLocalStorage): + (tst_QWebPage::inputMethodsTextFormat): + (tst_QWebPage::protectBindingsRuntimeObjectsFromCollector): + +2010-04-11 Robert Hogan <robert@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Update layoutTestController.DumpResourceLoadCallbacks to match other ports. + + Unskip http/tests/xmlhttprequest/abort-should-cancel-load.html + http/tests/misc/will-send-request-returns-null-on-redirect.html + fast/loader/user-style-sheet-resource-load-callbacks.html + http/tests/misc/window-dot-stop.html + http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html + http/tests/security/XFrameOptions/x-frame-options-deny.html + http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html + http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html + http/tests/xmlhttprequest/abort-should-cancel-load.html + + QNetworkReply::OperationCanceledError has a value of 5, so update expected results accordingly. + + https://bugs.webkit.org/show_bug.cgi?id=37237 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (qt_set_will_send_request_returns_null_on_redirect): + (drtDescriptionSuitableForTestResult): + (WebCore::FrameLoaderClientQt::dispatchWillSendRequest): + (WebCore::FrameLoaderClientQt::dispatchDidReceiveResponse): + (WebCore::FrameLoaderClientQt::dispatchDidFinishLoading): + (WebCore::FrameLoaderClientQt::dispatchDidFailLoading): + +2010-04-10 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Implement Desktop Notifications API for QtWebKit + https://bugs.webkit.org/show_bug.cgi?id=35503 + + Map WebKit notifications to Qt's SystemTray API and + implement DRT tracing. + + This patch does not implement the security part of + WebKit notifications. + + * Api/qwebpage.cpp: + (QWebPagePrivate::QWebPagePrivate): + * Api/qwebpage.h: + * Api/qwebpage_p.h: + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::notificationPresenter): + * WebCoreSupport/ChromeClientQt.h: + * WebCoreSupport/NotificationPresenterClientQt.cpp: Added. + (qt_dump_notification): + (NotificationPresenterClientQt::NotificationPresenterClientQt): + (NotificationPresenterClientQt::show): + (NotificationPresenterClientQt::cancel): + (NotificationPresenterClientQt::notificationObjectDestroyed): + (NotificationPresenterClientQt::requestPermission): + (NotificationPresenterClientQt::checkPermission): + * WebCoreSupport/NotificationPresenterClientQt.h: Added. + +2010-04-09 Tasuku Suzuki <tasuku.suzuki@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt]Fix compile error with QT_NO_IM + https://bugs.webkit.org/show_bug.cgi?id=36533 + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopupCombo::hidePopup): + +2010-04-09 Yi Shen <yi.4.shen@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] tst_QWebFrame::popupFocus() fails + https://bugs.webkit.org/show_bug.cgi?id=37320 + + The QWebPopup class has been moved & renamed, so tst_QWebFrame::popupFocus() should use + the class name "QComboBox", rather than "WebCore::QWebPopup" to find the popup menu. + + * tests/qwebframe/tst_qwebframe.cpp: + +2010-04-09 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Holger Freyther. + + Removing the use of topLevelWidget of QWidget class since it is deprecated/obsolete + since Qt 4.5. window() method is being used instead now. + + See http://doc.trolltech.com/4.5/qwidget-obsolete.html#topLevelWidget for more info. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::windowRect): + (WebCore::ChromeClientQt::show): + (WebCore::ChromeClientQt::windowResizerRect): + +2010-04-09 Tasuku Suzuki <tasuku.suzuki@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix compile error with QT_NO_ACTION + https://bugs.webkit.org/show_bug.cgi?id=36529 + + Make sure QT_NO_ACTION is not defined to use QAction + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::pageAction): + * Api/qwebpage.cpp: + (QWebPagePrivate::updateAction): + (QWebPage::updatePositionDependentActions): + * Api/qwebpage.h: + * Api/qwebview.cpp: + * Api/qwebview.h: + +2010-04-09 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Lars Knoll. + + [Qt] tests/qgraphicswebview fails + https://bugs.webkit.org/show_bug.cgi?id=37317 + + * Api/qwebpage.cpp: + (QWebPage::userAgentForUrl): Don't crash if the ownerWidget is null. + +2010-04-08 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Warnings when compiling InspectorClientQt.cpp + https://bugs.webkit.org/show_bug.cgi?id=37266 + + Add a default: for the switch()-case to avoid + warnings. + + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::variantToSetting): + +2010-04-01 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by David Hyatt. + + [Qt] REGRESSION:(r50665) QWebFrame::setScrollBarPolicy(Qt::Vertical,Qt::ScrollBarAlwaysOff) has no effect. + https://bugs.webkit.org/show_bug.cgi?id=29431 + + Make use of the new lock parameter of set{Vertical,Horizontal}ScrollbarMode. + + Always added a qt auto test for set scrollbar policy feature. + + * Api/qwebframe.cpp: + (QWebFrame::setScrollBarPolicy): + * tests/qwebframe/tst_qwebframe.cpp: + * WebCoreSupport/FrameLoaderClientQt.cpp: + (FrameLoaderClientQt::transitionToCommittedForNewPage): + +2010-04-08 Joe Ligman <joseph.ligman@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] WebKit crashes while input text through input method. + The formatted text underline painting crashes when painting with invalid indexes. + https://bugs.webkit.org/show_bug.cgi?id=36870 + + * Api/qwebpage.cpp: + (QWebPagePrivate::inputMethodEvent): + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethodsTextFormat_data): + (tst_QWebPage::inputMethodsTextFormat): + +2010-04-08 Joe Ligman <joseph.ligman@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] qtwebkit_webframe_scrollRecursively scrolls when body.style.overflow="hidden" + https://bugs.webkit.org/show_bug.cgi?id=36674 + + The scrolling check was based on the frameview's scrolloffset, and + maximumScrollPosition, which does not acknowledge the overflow properties. + + I am now basing the scrolling off the scrollbar position. The scrollbars are + affected by the overflow properties indicating when not to scroll. The scrollbar + positions also continue to work for CSS ::-webkit-scrollbar styles. + + * Api/qwebframe.cpp: + (qtwebkit_webframe_scrollRecursively): + +2010-04-07 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Yury Semikhatsky. + + Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest() + https://bugs.webkit.org/show_bug.cgi?id=36949 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + * WebCoreSupport/FrameLoaderClientQt.h: + +2010-04-07 Dawit Alemayehu <adawit@kde.org> + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=36827 + + Updated the WebCore::shouldTreatAsAttachement function call with the + new more generic replacement WebCore::contentDispositionType. + + See comments 39-42 in https://bugs.webkit.org/show_bug.cgi?id=36395 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType): + +2010-04-07 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] When providing a widget for the PDF mime type it will cause a crash + + m_pluginView may actually be a Widget (for embedded Qt widgets), + so always check isPluginView() before calling PluginView specific methods. + + https://bugs.webkit.org/show_bug.cgi?id=29450 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::finishedLoading): + (WebCore::FrameLoaderClientQt::setMainDocumentError): + (WebCore::FrameLoaderClientQt::committedLoad): + +2010-04-06 Diego Gonzalez <diego.gonzalez@openbossa.org> + + Reviewed by Simon Hausmann. + + [Qt] Add mechanism to detect QtWebKit 2.0 via the preprocessor + https://bugs.webkit.org/show_bug.cgi?id=36538 + + * Api/qwebkitglobal.h: + +2010-04-02 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] [Symbian] Rebaseline Symbian def file + https://bugs.webkit.org/show_bug.cgi?id=37038 + + Switch the ordinal numbers for qtwebkit_webframe_scrollRecursively + and QWebInspector::closeEvent to match QtWebkit 4.6 branch + + Fix the signature for qt_drt_setFrameFlatteningEnabled + after r56718. + + Add new QtWebKit API symbols introduced not listed in the file yet. + + * symbian/eabi/QtWebKitu.def: + +2010-03-30 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Adam Treat. + + Stored focused frame and document in a vars, instead of querying for them many times. + + * Api/qwebpage.cpp: + (QWebPagePrivate::mousePressEvent(QEvent* ev)): + (QWebPagePrivate::mousePressEvent(QGraphicsSceneMouseEvent* ev): + +2010-04-02 Tasuku Suzuki <tasuku.suzuki@nokia.com> + + Reviewed by Eric Seidel. + + [Qt]Fix compile error with QT_NO_SETTINGS + https://bugs.webkit.org/show_bug.cgi?id=36533 + + If QT_NO_SETTINGS is defined, QSettings is not available. + + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorClientQt::populateSetting): + (WebCore::InspectorClientQt::storeSetting): + +2010-04-02 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Maemo5 theme - customized popup for <select multiple> elements + https://bugs.webkit.org/show_bug.cgi?id=36368 + + Using QtMaemoWebPopup instead of QtFallbackWebPopup for Maemo. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::createSelectPopup): + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopup::show): + (WebCore::QtFallbackWebPopup::populate): + +2010-04-01 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + Add Single and Multiple Selection Popup for Maemo 5. + + [Qt] Maemo5 theme - popup dialogs + https://bugs.webkit.org/show_bug.cgi?id=36789 + + * WebCoreSupport/QtMaemoWebPopup.cpp: + (WebCore::Maemo5Popup::populateList): + (WebCore::Maemo5Popup::onItemSelected): + (WebCore::QtMaemoWebPopup::createSingleSelectionPopup): + (WebCore::QtMaemoWebPopup::createMultipleSelectionPopup): + (WebCore::Maemo5SingleSelectionPopup::Maemo5SingleSelectionPopup): + (WebCore::MultipleItemListDelegate::MultipleItemListDelegate): + (WebCore::MultipleItemListDelegate::paint): + (WebCore::Maemo5MultipleSelectionPopup::Maemo5MultipleSelectionPopup): + * WebCoreSupport/QtMaemoWebPopup.h: + +2010-03-31 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Adds Geolocation param for cancelGeolocationPermissionRequestForFrame. + https://bugs.webkit.org/show_bug.cgi?id=35031 + + * WebCoreSupport/ChromeClientQt.h: + (WebCore::ChromeClientQt::cancelGeolocationPermissionRequestForFrame): + +2010-03-31 Antti Koivisto <koivisto@iki.fi> + + Reviewed by Kenneth Rohde Christiansen. + + https://bugs.webkit.org/show_bug.cgi?id=36446 + [Qt] QWebSettings::TiledBackingStoreEnabled attribute lacks documentation and default value + + * Api/qgraphicswebview.cpp: + * Api/qwebsettings.cpp: + (QWebSettings::QWebSettings): + +2010-03-30 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=36866 + Move CString to WTF + + * Api/qwebelement.cpp: + +2010-03-30 Joe Ligman <joseph.ligman@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] QGraphicsScene mousePressEvent does not set the clickCausedFocus flag + https://bugs.webkit.org/show_bug.cgi?id=35259 + + The clickCausedFocus flag is not being set in method + mousePressEvent(QGraphicsSceneMouseEvent* ev). This flag is used + in conjunction with QStyle::RSIP_OnMouseClickAndAlreadyFocused when + deciding to launch the software input panel. + + * Api/qwebpage.cpp: + (QWebPagePrivate::mousePressEvent): + +2010-03-30 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Maemo5 theme - QtMaemoWebPopup class + https://bugs.webkit.org/show_bug.cgi?id=36790 + + A new QtAbstractWebPopup descendant class to be used for maemo menu lists. + This is the first step. The next step will be the dialogs implementation that + will come in bug 36789 and finally to use QtMaemoWebPopup instead of QtFallbackWebPopup + that will come in bug 36368. + + * WebCoreSupport/QtMaemoWebPopup.cpp: Added. + (WebCore::QtMaemoWebPopup::QtMaemoWebPopup): + (WebCore::QtMaemoWebPopup::~QtMaemoWebPopup): + (WebCore::QtMaemoWebPopup::createSingleSelectionPopup): + (WebCore::QtMaemoWebPopup::createMultipleSelectionPopup): + (WebCore::QtMaemoWebPopup::createPopup): + (WebCore::QtMaemoWebPopup::show): + (WebCore::QtMaemoWebPopup::hide): + (WebCore::QtMaemoWebPopup::popupClosed): + (WebCore::QtMaemoWebPopup::itemClicked): + * WebCoreSupport/QtMaemoWebPopup.h: Added. + (WebCore::Maemo5Popup::Maemo5Popup): + +2010-03-29 Dawit Alemayehu <adawit@kde.org> + + Reviewed by Simon Hausmann. + + [Qt] Added support for handling the HTTP "Content-Disposition" header. + + https://bugs.webkit.org/show_bug.cgi?id=36395 + + Whenever a server response contains a "Content-Disposition: attachment..." header, + treat the request as a download and emit the unsupportedContent signal. + + * Api/qwebpage.cpp: + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::download): + (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType): + +2010-03-22 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Simon Fraser. + + Add support for Widgets 1.0: View Mode Media Feature + https://bugs.webkit.org/show_bug.cgi?id=35446 + + Add an internal Qt API for changing the view mode media feature + (http://www.w3.org/TR/widgets-vmmf/). + + * Api/qwebpage.cpp: + (qt_wrt_setViewMode): + (QWebPagePrivate::priv): + * Api/qwebpage_p.h: + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::isDocked): + (WebCore::ChromeClientQt::isFloating): + (WebCore::ChromeClientQt::isApplication): + (WebCore::ChromeClientQt::isFullscreen): + * WebCoreSupport/ChromeClientQt.h: + +2010-03-29 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Antti Koivisto. + + Use 'Mobile Safari' instead of 'Safari' on mobile Qt platforms. + + * Api/qwebpage.cpp: + (QWebPage::userAgentForUrl): + +2010-03-29 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + [Qt] unit tests don't compile inside of Qt + + https://bugs.webkit.org/show_bug.cgi?id=36756 + + * tests/tests.pri: Don't do the target substitution inside Qt and find the sources + through VPATH instead of relying on the location of the .pro file exclusively. + +2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Antti Koivisto. + + Change due to renaming of frame flattening setting. + + * Api/qwebpage.cpp: + (qt_drt_setFrameFlatteningEnabled): + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + * symbian/eabi/QtWebKitu.def: + +2010-03-28 Alexey Proskuryakov <ap@apple.com> + + Build fix. Include WindowsKeyboardCodes.h instead of KeyboardCodes.h. + + * WebCoreSupport/EditorClientQt.cpp: + +2010-03-26 Olivier Goffart <ogoffart@trolltech.com> + + Reviewed by Simon Hausmann. + + [Qt] Compile with QT_USE_FAST_OPERATOR_PLUS + + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorClientQt::populateSetting): + (WebCore::InspectorClientQt::storeSetting): + +2010-03-26 David Boddie <dboddie@trolltech.com> + + Reviewed by Simon Hausmann. + + [Qt] Doc: Simplified Commercial Editions for Qt 4.7. + + * docs/qtwebkit.qdoc: + +2010-03-26 Simon Hausmann <simon.hausmann@nokia.com> + + Symbian build fix. + + [Qt] Updated the def file with new exports used by QtLauncher. + + * symbian/eabi/QtWebKitu.def: + +2010-03-25 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] QtLauncher crashes on Mac OS and Linux when exiting with QGraphicsView mode enabled + https://bugs.webkit.org/show_bug.cgi?id=35251 + + Followed the way QWebView registers for the signal QWebPage::destroyed(), to prevent + QGraphicsWebView from referencing QWebPage after it was deleted. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::_q_pageDestroyed): + (QGraphicsWebView::setPage): + * Api/qgraphicswebview.h: + +2010-03-25 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] QWebFrame::pageChanged() signal is not documented + https://bugs.webkit.org/show_bug.cgi?id=36609 + + * Api/qwebframe.cpp: + +2010-03-25 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Implement ChromeClient::windowResizerRect() + + https://bugs.webkit.org/show_bug.cgi?id=21300 + + We assume the resize corner to be in the lower right corner of + the window and having the width and height of the scrollbars. + + The helper function geometryRelativeToOwnerWidget() in the page + client is used to clip the resize rect to the actual size of the + viewport, not the size of the QGraphicsView. + + * Api/qgraphicswebview.cpp: + * Api/qwebpage.cpp: + * WebCoreSupport/ChromeClientQt.cpp: + +2010-03-25 Shu Chang <chang.shu@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Added documentation for delete button. + https://bugs.webkit.org/show_bug.cgi?id=31560 + + * Api/qwebsettings.cpp: + +2010-03-25 Tasuku Suzuki <tasuku.suzuki@nokia.com> + + Reviewed by Eric Seidel. + + [Qt]Fix compile error with QT_NO_DESKTOPSERVICES + https://bugs.webkit.org/show_bug.cgi?id=36533 + + * Api/qwebsettings.cpp: + (QWebSettings::enablePersistentStorage): + +2010-03-25 Tasuku Suzuki <tasuku.suzuki@nokia.com> + + Reviewed by Eric Seidel. + + [Qt]Fix compile error with QT_NO_DEBUG_STREAM + https://bugs.webkit.org/show_bug.cgi?id=36533 + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::graphicsItemVisibleRect): + +2010-03-25 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Eric Seidel. + + Make QWebPage not depend on view() but use the client->ownerWidget() + instead. Also, handle the case where there is not page client. + + * Api/qwebpage.cpp: + (QWebPagePrivate::createContextMenu): + (QWebPagePrivate::keyPressEvent): + (QWebPage::javaScriptAlert): + (QWebPage::javaScriptConfirm): + (QWebPage::javaScriptPrompt): + (QWebPage::shouldInterruptJavaScript): + (QWebPage::createWindow): + (QWebPage::action): + (QWebPage::extension): + (QWebPage::chooseFile): + (QWebPage::userAgentForUrl): + +2010-03-24 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + Add the FrameFlatteningEnabled WebAttribute to QWebSettings. + + [Qt] Missing QWebSettings for Frame Flattening + https://bugs.webkit.org/show_bug.cgi?id=36553 + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + (QWebSettings::QWebSettings): + * Api/qwebsettings.h: + +2010-03-24 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> + + Reviewed by Laszlo Gombos. + + Auto-uppercase and predictive text need to be disabled for S60 (as for maemo) + https://bugs.webkit.org/show_bug.cgi?id=33176 + + * WebCoreSupport/EditorClientQt.cpp: + +2010-03-24 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Rename QWebSettings::XSSAuditorEnabled to XSSAuditingEnabled + https://bugs.webkit.org/show_bug.cgi?id=36522 + + For consistency with other QWebSettings attributes. + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + * Api/qwebsettings.h: + +2010-03-23 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Simon Hausmann. + + Calling setView(0) on a QWebPage being shown by a QGraphicsWebView, + would uninstall the page client, deleting the QGraphicsWebViewPrivate + instance. If called with an argument, it would do a wrong static_cast + and crash. + + * Api/qwebpage.cpp: + (QWebPageWidgetClient::QWebPageWidgetClient): + (QWebPageWidgetClient::isQWidgetClient): + (QWebPageWidgetClient::screenNumber): + (QWebPage::QWebPage): + (QWebPage::setView): + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::unsetPageIfExists): + (QGraphicsWebView::setPage): + * Api/qwebpage.cpp: + (QWebPageWidgetClient::isQWidgetClient): + (QWebPageWidgetClient::screenNumber): + (QWebPage::QWebPage): + (QWebPage::setView): + * Api/qwebpage.h: + * Api/qwebview.cpp: + (QWebViewPrivate::unsetPageIfExists): + (QWebView::setPage): + +2010-03-24 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Make Icon::createIconForFiles() optional. + https://bugs.webkit.org/show_bug.cgi?id=35072 + + - Rename iconForFiles() to chooseIconForFiles(). + - Call Icon::createIconForFiles() from chooseIconForFiles(). + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::chooseIconForFiles): + * WebCoreSupport/ChromeClientQt.h: + +2010-03-23 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + QGraphicsWebView crash when calling setView on the QWebPage... + https://bugs.webkit.org/show_bug.cgi?id=36436 + + Checking for pageClient existance before showing popups. + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopup::show): + +2010-03-23 Anders Bakken <anders.bakken@nokia.com>, Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + Check if q->scene() is available before actually using it + on QGraphicsWebViewPrivate. + + QGraphicsWebView crash + https://bugs.webkit.org/show_bug.cgi?id=32670 + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::screenNumber): + (QGraphicsWebViewPrivate::ownerWidget): + +2010-03-23 David Leong <david.leong@nokia.com> + + Reviewed by Laszlo Gombos. + + Build fix for Symbian Def file. + + * symbian/eabi/QtWebKitu.def: + +2010-03-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Remove support for Qt v4.4 + https://bugs.webkit.org/show_bug.cgi?id=36389 + + * Api/qwebelement.cpp: + (QWebElement::classes): + * Api/qwebpage.cpp: + (QWebPagePrivate::editorActionForKeyEvent): + (QWebPage::userAgentForUrl): + * WebCoreSupport/EditorClientQt.cpp: + (WebCore::EditorClientQt::handleKeyboardEvent): + * tests/tests.pro: + +2010-03-22 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Fix qdoc warnings + https://bugs.webkit.org/show_bug.cgi?id=36447 + + * Api/qgraphicswebview.cpp: Add missing (). + * Api/qwebframe.cpp: Remove reference to non-existent parameter "url". + * Api/qwebsettings.cpp: Document parameter "location". + +2010-03-22 Jakub Wieczorek <jwieczorek@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Don't construct a QLineEdit every time when painting a text field + https://bugs.webkit.org/show_bug.cgi?id=36373 + + Add a simple benchmark covering this area. + + * tests/benchmarks/painting/tst_painting.cpp: + (tst_Painting::textAreas): + +2010-03-22 Yi Shen <shenyi2006@gmail.com> + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=35933 + [Qt] [Symbian] Can not backward select (highlight) text using virtual keyboard + Make sure the selection start index is smaller than the selection end index. + + * Api/qwebpage.cpp: + (QWebPagePrivate::inputMethodEvent): + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethods): + +2010-03-21 Kristian Amlie <kristian.amlie@nokia.com> + + Reviewed by Simon Hausmann. + + Fixed updating the VKB display when inputting into QGraphicsWebView. + https://bugs.webkit.org/show_bug.cgi?id=36292 + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::_q_updateMicroFocus): + (QGraphicsWebView::setPage): + * Api/qgraphicswebview.h: + +2010-03-19 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed. + + Buildfix for Qt v4.5. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewOverlay::q): + +2010-03-18 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Darin Adler. + + Make it possible for the Qt DRT to set the media type from + the LayoutTestController. + + * Api/qwebframe.cpp: + (qt_drt_setMediaType): + +2010-03-18 Joe Ligman <joseph.ligman@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] New API scrollRecursively has several problems. + https://bugs.webkit.org/show_bug.cgi?id=35873 + + Remove scrollRecursively from the Qt 4.7 API + Update the internal API to accept a hit test position + for nested scrolling + + * Api/qwebframe.cpp: + (webframe_scrollOverflow): + (qtwebkit_webframe_scrollRecursively): + * Api/qwebframe.h: + * Api/qwebframe_p.h: + * tests/qwebframe/tst_qwebframe.cpp: + +2010-03-18 Antti Koivisto <koivisto@iki.fi> + + Reviewed by Kenneth Rohde Christiansen. + + https://bugs.webkit.org/show_bug.cgi?id=36102 + [Qt] Scaling control API for tiled backing store + + The scale is set by passing the QGraphicsWebView scale to the backing store. The + only new API is the tiledBackingStoreFrozen property which allows disabling + all updates (for example during zoom animation). + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::_q_scaleChanged): + (QGraphicsWebViewPrivate::updateTiledBackingStoreScale): + (QGraphicsWebView::QGraphicsWebView): + (QGraphicsWebView::isTiledBackingStoreFrozen): + (QGraphicsWebView::setTiledBackingStoreFrozen): + * Api/qgraphicswebview.h: + * Api/qwebframe.cpp: + * Api/qwebframe_p.h: + +2010-03-17 Antti Koivisto <koivisto@iki.fi> + + Reviewed by Tor Arne Vestbø. + + Fix Qt build with tiled backing store disabled. + + * Api/qwebframe.cpp: + * Api/qwebframe_p.h: + +2010-03-17 Chang Shu <chang.shu@nokia.com> + + Reviewed by Laszlo Gombos. + + https://bugs.webkit.org/show_bug.cgi?id=36139 + [Qt] Clean up cache while setting cache quota. This behavior matches other platforms, + such as mac and gtk. + + * Api/qwebsettings.cpp: + (QWebSettings::setOfflineWebApplicationCacheQuota): + +2010-03-17 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Enable accelerated compositing by default + https://bugs.webkit.org/show_bug.cgi?id=35866 + + * Api/qwebsettings.cpp: + (QWebSettings::QWebSettings): + +2010-03-15 Antti Koivisto <koivisto@iki.fi> + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=36121 + [Qt] Make WebKit scrollbars work with tiling + + - Use the scrollbar overlay (implemented for accelerated compositing) when in tiled mode. + - Make overlay compile unconditionally, enable on demand. This removes bunch of unneeded ifdefs. + - Update the scroll position to the backing store as needed. + - Renamed some methods. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::): + (QGraphicsWebViewPrivate::createOrDeleteOverlay): + (QGraphicsWebViewPrivate::setRootGraphicsLayer): + (QGraphicsWebViewPrivate::updateCompositingScrollPosition): + (QGraphicsWebViewPrivate::scroll): + (QGraphicsWebViewPrivate::update): + (QGraphicsWebViewPrivate::graphicsItemVisibleRect): + (QGraphicsWebView::paint): + (QGraphicsWebView::setPage): + (QGraphicsWebView::updateGeometry): + (QGraphicsWebView::setGeometry): + * Api/qwebframe.cpp: + (QWebFramePrivate::renderFromTiledBackingStore): + * Api/qwebframe_p.h: + +2010-03-15 Robert Hogan <robert@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Fix crash in QWebView::setPage() + + tst_qwebpage was crashing on setPage(0) + + https://bugs.webkit.org/show_bug.cgi?id=36137 + + * Api/qwebview.cpp: + (QWebView::setPage): + +2010-03-16 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. + + Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder + https://bugs.webkit.org/show_bug.cgi?id=35036 + + * Api/qwebinspector.cpp: + (QWebInspector::hideEvent): + (QWebInspector::closeEvent): + * Api/qwebinspector.h: + * Api/qwebpage.h: + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorClientQt::openInspectorFrontend): + (WebCore::InspectorFrontendClientQt::InspectorFrontendClientQt): + (WebCore::InspectorFrontendClientQt::frontendLoaded): + (WebCore::InspectorFrontendClientQt::localizedStringsURL): + (WebCore::InspectorFrontendClientQt::hiddenPanels): + (WebCore::InspectorFrontendClientQt::bringToFront): + (WebCore::InspectorFrontendClientQt::closeWindow): + (WebCore::InspectorFrontendClientQt::attachWindow): + (WebCore::InspectorFrontendClientQt::detachWindow): + (WebCore::InspectorFrontendClientQt::setAttachedWindowHeight): + (WebCore::InspectorFrontendClientQt::inspectedURLChanged): + (WebCore::InspectorFrontendClientQt::updateWindowTitle): + * WebCoreSupport/InspectorClientQt.h: + +2010-03-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed. + + [Qt] Build fix if TILED_BACKING_STORE is disabled. + + * Api/qwebframe.cpp: + (QWebFramePrivate::renderContentsLayerAbsoluteCoords): + +2010-03-14 Chang Shu <chang.shu@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] [Symbian] Use Symbian native dialog providers for combo pupups. + https://bugs.webkit.org/show_bug.cgi?id=35919 + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopup::show): + (WebCore::ResetAndDestroy): + (WebCore::QtFallbackWebPopup::showS60BrowserDialog): + * WebCoreSupport/QtFallbackWebPopup.h: + +2010-03-14 Antti Koivisto <koivisto@iki.fi> + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=35146 + Support tiled backing store + + Implements a basic tiled backing store mechanism. Tiles are created and + deleted on demand. The page content is cached to the tiles. Tile content + is kept in sync with the document. Since the backing store covers area + larger than the currently visible viewport, the document can be scrolled + quickly without having to enter rendering tree painting. + + The tile management code is platform independent. This patch has simple QPixmap + based tile implementation for Qt. + + The feature is behind ENABLE_TILED_BACKING_STORE flag. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::visibleRect): + (QGraphicsWebView::paint): + * Api/qwebframe.cpp: + (QWebFramePrivate::renderContentsLayerAbsoluteCoords): + * Api/qwebframe.h: + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + * Api/qwebsettings.h: + +2010-03-13 Csaba Osztrogonác <ossy@webkit.org> + + [Qt] Enable accelerated compositing by default + https://bugs.webkit.org/show_bug.cgi?id=35866 + + Unreviewed. Roll-out r55955, because it broke 3 tests: + - animations/fill-mode-transform.html + - animations/play-state.html + - animations/simultaneous-start-left.html + + * Api/qwebsettings.cpp: + (QWebSettings::QWebSettings): + +2010-03-13 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Enable accelerated compositing by default + https://bugs.webkit.org/show_bug.cgi?id=35866 + + * Api/qwebsettings.cpp: + (QWebSettings::QWebSettings): + +2010-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. + + * WebCoreSupport/ChromeClientQt.cpp: + * WebCoreSupport/ChromeClientQt.h: + +2010-03-10 Robert Hogan <robert@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Add Support for WebKitEnableCaretBrowsing to Qt DRT + + Unskip test fast/events/multiline-link-arrow-navigation.html + Fix typo (superfluous space) in QWebSettings docs. + + https://bugs.webkit.org/show_bug.cgi?id=35593 + + * Api/qwebpage.cpp: + (qt_drt_enableCaretBrowsing): + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): fix typo in docs + +2010-03-02 Adam Treat <atreat@rim.com> + + Reviewed by Dave Hyatt. + + Adapt the qt port to the refactoring of repaint methods. + + https://bugs.webkit.org/show_bug.cgi?id=34214 + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::invalidateContents): + (WebCore::ChromeClientQt::invalidateWindow): + (WebCore::ChromeClientQt::invalidateContentsAndWindow): + (WebCore::ChromeClientQt::invalidateContentsForSlowScroll): + * WebCoreSupport/ChromeClientQt.h: + +2010-03-08 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + Remove the now-redundant Settings fields for the Database + https://bugs.webkit.org/show_bug.cgi?id=35763 + + No new tests; this code isn't called. + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): Remove the call into Settings. + +2010-03-08 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Binary incompatibility between Qt 4.6's WebKit and trunk in QWebSettings + https://bugs.webkit.org/show_bug.cgi?id=35858 + + Moved the enum value added in r54873 to the end of the enum, to preserve + binary compatibility. DnsPrefetchEnabled was in the last release and needs + to remain after LocalContentCanAccessRemoteUrls. + + * Api/qwebsettings.h: + +2010-03-06 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Sam Weinig. + + Remove unnecessary includes of wtf/Platform.h. This is already pulled in by the prefix header. + + * WebCoreSupport/EditCommandQt.cpp: + +2010-03-02 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Simon Hausmann. + Patch by Antonio Gomes <tonikitoo@webkit.org> + + [Qt] QWebSettings attribute for toggle Spatial Navigation on/off + https://bugs.webkit.org/show_bug.cgi?id=33714 (Qt API part) + + Added 'SpatialNavigationEnabled' attribute to QWebSettings. + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + * Api/qwebsettings.h: + +2010-03-04 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] qwebelement.h does not include QtCore headers correctly + https://bugs.webkit.org/show_bug.cgi?id=35748 + + The header files of QtCore must be included as QtCore/foo.h. + + See also http://bugreports.qt.nokia.com/browse/QTBUG-8661 + + * Api/qwebelement.h: + +2010-03-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Tor Arne Vestbø. + + [Qt] Make the OUTPUT_DIR variable in qmake projects independent of build-webkit's logic. + + This also allows shadow builds relying only on qmake to work properly. + + * tests/benchmarks/loading/loading.pro: + * tests/benchmarks/painting/painting.pro: + * tests/hybridPixmap/hybridPixmap.pro: + * tests/qgraphicswebview/qgraphicswebview.pro: + * tests/qwebelement/qwebelement.pro: + * tests/qwebframe/qwebframe.pro: + * tests/qwebhistory/qwebhistory.pro: + * tests/qwebhistoryinterface/qwebhistoryinterface.pro: + * tests/qwebinspector/qwebinspector.pro: + * tests/qwebpage/qwebpage.pro: + * tests/qwebplugindatabase/qwebplugindatabase.pro: + +2010-03-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Fix generation of forwarding headers + + The dependencies were a bit wrong, so we ended up not generating + forwarding headers for qwebkitversion.h and qwebkitglobal.h + + The forwarding headers are now the only targets depending on the + real headers. All other targets either depend on the generated + class headers, or the forwarding headers. + + * Api/DerivedSources.pro: + +2010-03-02 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + Move database enable bit fully out of settings + This is stage one of a three-stage commit [webkit, then chromium, then + webkit again]. In this change I'm adding calls to + Database::setIsAvailable inside Settings::setDatabaseEnabled and + anywhere else that called it, and switching webkit fully over to using + that flag [added in a previous checkin]. Phase two will remove + Chromium's use of Settings for the Database, and phase three will remove + the Setting for the Database enable entirely, leaving only + Database::isAvailable/setIsAvailable. + + No new tests; tested by existing storage tests. + + https://bugs.webkit.org/show_bug.cgi?id=35310 + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): Add a call to Database::setIsAvailable + +2010-03-02 Simon Hausmann <simon.hausmann@nokia.com> + + Symbian build fix. + + [Qt] Updated the def file with one new export, to fix + QtLauncher linkage. + + * symbian/eabi/QtWebKitu.def: + +2010-03-01 Jakob Petsovits <jpetsovits@rim.com> + + Reviewed by Adam Barth. + + Adapt to the new ZoomMode enum. + https://bugs.webkit.org/show_bug.cgi?id=35347 + + * Api/qwebframe.cpp: + (QWebFrame::setTextSizeMultiplier): + (QWebFrame::setZoomFactor): + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + +2010-02-26 Diego Gonzalez <diego.gonzalez@openbossa.org> + + Reviewed by Simon Hausmann. + + Fix documentation of QWebSettings::setUserStyleSheetUrl method + + The base 64 data in the exemple shows a not valid code. + + REGRESSION: QWebSettings::setUserStyleSheetUrl is not working with a data URL (Base64) + https://bugs.webkit.org/show_bug.cgi?id=34802 + + * Api/qwebsettings.cpp: + +2010-02-26 Jamey Hicks <jamey.hicks@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] added QWebSettings::setInspectorUrl() and QWebSettings::inspectorUrl() + + Enables the use of alternate Web Inspector frontends by changing + the location of the frontend. + + This is required so that the Web Inspector may be run from an + external process or an external tool such as Eclipse or Aptana may + be used instead of the in-process Web Inspector UI. + + https://bugs.webkit.org/show_bug.cgi?id=35340 + + * Api/qwebsettings.cpp: + (QWebSettings::QWebSettings): + (QWebSettings::setInspectorUrl): + (QWebSettings::inspectorUrl): + * Api/qwebsettings.h: + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorClientQt::createPage): + +2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com> + + Reviewed by Kenneth Rohde Christiansen. + + Qt WebGL support + + Adds enabling and disabling of WebGL support to QWebSettings. + https://bugs.webkit.org/show_bug.cgi?id=35153 + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + (QWebSettings::QWebSettings): + * Api/qwebsettings.h: + +2010-02-19 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Remove QGVLauncher + + https://bugs.webkit.org/show_bug.cgi?id=35292 + + * QGVLauncher/QGVLauncher.pro: Removed. + * QGVLauncher/main.cpp: Removed. + +2010-02-23 Steve Block <steveblock@google.com> + + Reviewed by Darin Adler. + + Adds ChromeClient::cancelGeolocationPermissionRequestForFrame + https://bugs.webkit.org/show_bug.cgi?id=34962 + + This method is required so that a Geolocation object can cancel an + asynchronous permission request. This allows the chrome client to cancel + any UI it is showing for the permission request. + + * WebCoreSupport/ChromeClientQt.h: + (WebCore::ChromeClientQt::cancelGeolocationPermissionRequestForFrame): + +2010-02-22 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed Symbian build fix. + + [Qt] Updated the def file with new exports to enable + building DumpRenderTree. + + * symbian/eabi/QtWebKitu.def: + 2010-02-18 Noam Rosenthal <noam.rosenthal@nokia.com> Reviewed by Kenneth Rohde Christiansen. diff --git a/WebKit/qt/QGVLauncher/QGVLauncher.pro b/WebKit/qt/QGVLauncher/QGVLauncher.pro deleted file mode 100644 index 059ec1a..0000000 --- a/WebKit/qt/QGVLauncher/QGVLauncher.pro +++ /dev/null @@ -1,16 +0,0 @@ -TEMPLATE = app -SOURCES += main.cpp -CONFIG -= app_bundle -CONFIG += uitools -DESTDIR = ../../../bin - -include(../../../WebKit.pri) - -QT += network -macx:QT+=xml -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR - -symbian { - TARGET.UID3 = 0xA000E544 - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} diff --git a/WebKit/qt/QGVLauncher/main.cpp b/WebKit/qt/QGVLauncher/main.cpp deleted file mode 100644 index 448b4b0..0000000 --- a/WebKit/qt/QGVLauncher/main.cpp +++ /dev/null @@ -1,536 +0,0 @@ -/* - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) - * Copyright (C) 2006 George Staikos <staikos@kde.org> - * Copyright (C) 2006 Dirk Mueller <mueller@kde.org> - * Copyright (C) 2006 Zack Rusin <zack@kde.org> - * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org> - * Copyright (C) 2009 Kenneth Christiansen <kenneth@webkit.org> - * Copyright (C) 2009 Antonio Gomes <antonio.gomes@openbossa.org> - * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in> - * - * 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 COMPUTER, INC. ``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 COMPUTER, INC. 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 <QDebug> -#include <QFile> -#include <QGraphicsScene> -#include <QGraphicsView> -#include <QGraphicsWidget> -#include <QNetworkRequest> -#include <QTextStream> -#include <QVector> -#include <QtGui> -#include <QtNetwork/QNetworkProxy> -#include <cstdio> -#include <qwebelement.h> -#include <qwebframe.h> -#include <qgraphicswebview.h> -#include <qwebpage.h> -#include <qwebsettings.h> -#include <qwebview.h> - -static QUrl urlFromUserInput(const QString& string) -{ - QString input(string); - QFileInfo fi(input); - if (fi.exists() && fi.isRelative()) - input = fi.absoluteFilePath(); - -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - return QUrl::fromUserInput(input); -#else - return QUrl(input); -#endif -} - -class WebView : public QGraphicsWebView { - Q_OBJECT - Q_PROPERTY(qreal yRotation READ yRotation WRITE setYRotation) - -public: - WebView(QGraphicsItem* parent = 0) - : QGraphicsWebView(parent) - { - if (QApplication::instance()->arguments().contains("--cacheWebView")) - setCacheMode(QGraphicsItem::DeviceCoordinateCache); - if (QApplication::instance()->arguments().contains("--resizesToContents")) - setResizesToContents(true); - } - void setYRotation(qreal angle) - { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - QRectF r = boundingRect(); - setTransform(QTransform() - .translate(r.width() / 2, r.height() / 2) - .rotate(angle, Qt::YAxis) - .translate(-r.width() / 2, -r.height() / 2)); -#endif - m_yRotation = angle; - } - qreal yRotation() const - { - return m_yRotation; - } - -private: - qreal m_yRotation; -}; - -class WebPage : public QWebPage { - Q_OBJECT - -public: - WebPage(QObject* parent = 0) - : QWebPage(parent) - { - applyProxy(); - } - virtual QWebPage* createWindow(QWebPage::WebWindowType); - -private: - void applyProxy() - { - QUrl proxyUrl = urlFromUserInput(qgetenv("http_proxy")); - - if (proxyUrl.isValid() && !proxyUrl.host().isEmpty()) { - int proxyPort = (proxyUrl.port() > 0) ? proxyUrl.port() : 8080; - networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, proxyUrl.host(), proxyPort)); - } - } -}; - -class MainView : public QGraphicsView { - Q_OBJECT - -public: - MainView(QWidget* parent) - : QGraphicsView(parent) - , m_mainWidget(0) - , m_measureFps(QApplication::instance()->arguments().contains("--show-fps")) - , m_numTotalPaints(0) - , m_numPaintsSinceLastMeasure(0) - { - // Use the graphics view scrollbars when the webview is set to size to the content. - if (!QApplication::instance()->arguments().contains("--resizesToContents")) { - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - } - - setFrameShape(QFrame::NoFrame); - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - if (m_measureFps) { - QTimer* fpsTimer = new QTimer(this); - fpsTimer->setInterval(5000); - m_totalStartTime = m_startTime = QTime::currentTime(); - connect(fpsTimer, SIGNAL(timeout()), this, SLOT(printFps())); - fpsTimer->start(); - } - } - - void setMainWidget(WebView* widget) - { - m_mainWidget = widget; - if (m_mainWidget->resizesToContents()) - return; - QRectF rect(QRect(QPoint(0, 0), size())); - m_mainWidget->setGeometry(rect); - } - - void resizeEvent(QResizeEvent* event) - { - QGraphicsView::resizeEvent(event); - if (!m_mainWidget || m_mainWidget->resizesToContents()) - return; - QRectF rect(QPoint(0, 0), event->size()); - m_mainWidget->setGeometry(rect); - } - - void paintEvent(QPaintEvent* event) - { - QGraphicsView::paintEvent(event); - if (m_measureFps) { - ++m_numPaintsSinceLastMeasure; - ++m_numTotalPaints; - } - } - - void setWaitCursor() - { - m_mainWidget->setCursor(Qt::WaitCursor); - } - - void resetCursor() - { - m_mainWidget->unsetCursor(); - } - -public slots: - void flip() - { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - QSizeF center = m_mainWidget->boundingRect().size() / 2; - QPointF centerPoint = QPointF(center.width(), center.height()); - m_mainWidget->setTransformOriginPoint(centerPoint); - - m_mainWidget->setRotation(m_mainWidget->rotation() ? 0 : 180); -#endif - } - - void animatedFlip() - { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - QSizeF center = m_mainWidget->boundingRect().size() / 2; - QPointF centerPoint = QPointF(center.width(), center.height()); - m_mainWidget->setTransformOriginPoint(centerPoint); - - QPropertyAnimation* animation = new QPropertyAnimation(m_mainWidget, "rotation", this); - animation->setDuration(1000); - - int rotation = int(m_mainWidget->rotation()); - - animation->setStartValue(rotation); - animation->setEndValue(rotation + 180 - (rotation % 180)); - - animation->start(QAbstractAnimation::DeleteWhenStopped); -#endif - } - - void animatedYFlip() - { - emit flipRequest(); - } - - void printFps() - { - // note that this might have a bug if you measure right around midnight, but we can live with that - QTime now = QTime::currentTime(); - int msecs = m_startTime.msecsTo(now); - int totalMsecs = m_totalStartTime.msecsTo(now); - int totalFps = totalMsecs ? m_numTotalPaints * 1000 / totalMsecs : 0; - int curFps = msecs ? m_numPaintsSinceLastMeasure * 1000 / msecs : 0; - qDebug("[FPS] From start: %d, from last paint: %d", totalFps, curFps); - m_startTime = now; - m_numPaintsSinceLastMeasure = 0; - } - -signals: - void flipRequest(); - -private: - WebView* m_mainWidget; - bool m_measureFps; - int m_numTotalPaints; - int m_numPaintsSinceLastMeasure; - QTime m_startTime; - QTime m_totalStartTime; -}; - -class SharedScene : public QSharedData { -public: - SharedScene() - { - m_scene = new QGraphicsScene; - m_item = new WebView; - m_item->setPage((m_page = new WebPage)); - - m_scene->addItem(m_item); - m_scene->setActiveWindow(m_item); - } - - ~SharedScene() - { - delete m_item; - delete m_scene; - delete m_page; - } - - QGraphicsScene* scene() const { return m_scene; } - WebView* webView() const { return m_item; } - -private: - QGraphicsScene* m_scene; - WebView* m_item; - WebPage* m_page; -}; - -class MainWindow : public QMainWindow { - Q_OBJECT - -public: - MainWindow(QExplicitlySharedDataPointer<SharedScene> other) - : QMainWindow() - , view(new MainView(this)) - , scene(other) - { - init(); - } - - MainWindow() - : QMainWindow() - , view(new MainView(this)) - , scene(new SharedScene()) - { - init(); - } - - void init() - { - setAttribute(Qt::WA_DeleteOnClose); - - view->setScene(scene->scene()); - const QStringList arguments = QApplication::instance()->arguments(); - const int indexOfViewportUpdateMode = arguments.indexOf("--updateMode"); - if (indexOfViewportUpdateMode > 1 && indexOfViewportUpdateMode < arguments.count() - 1) { - const QString updateMode = arguments[indexOfViewportUpdateMode+1] + "ViewportUpdate"; - view->setViewportUpdateMode(static_cast<QGraphicsView::ViewportUpdateMode>(QGraphicsView::staticMetaObject.enumerator(QGraphicsView::staticMetaObject.indexOfEnumerator("ViewportUpdateMode")).keysToValue(updateMode.toAscii()))); - } - - setCentralWidget(view); - - view->setMainWidget(scene->webView()); - - connect(scene->webView(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); - connect(scene->webView(), SIGNAL(titleChanged(const QString&)), this, SLOT(setWindowTitle(const QString&))); - connect(scene->webView()->page(), SIGNAL(windowCloseRequested()), this, SLOT(close())); - -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - QStateMachine *machine = new QStateMachine(this); - QState *s0 = new QState(machine); - s0->assignProperty(scene->webView(), "yRotation", 0); - - QState *s1 = new QState(machine); - s1->assignProperty(scene->webView(), "yRotation", 90); - - QAbstractTransition *t1 = s0->addTransition(view, SIGNAL(flipRequest()), s1); - QPropertyAnimation *yRotationAnim = new QPropertyAnimation(scene->webView(), "yRotation", this); - yRotationAnim->setDuration(1000); - t1->addAnimation(yRotationAnim); - - QState *s2 = new QState(machine); - s2->assignProperty(scene->webView(), "yRotation", -90); - s1->addTransition(s1, SIGNAL(propertiesAssigned()), s2); - - QAbstractTransition *t2 = s2->addTransition(s0); - t2->addAnimation(yRotationAnim); - - machine->setInitialState(s0); - machine->start(); -#endif - - resize(640, 480); - buildUI(); - } - - void load(const QString& url) - { - QUrl deducedUrl = urlFromUserInput(url); - if (!deducedUrl.isValid()) - deducedUrl = QUrl("http://" + url + "/"); - - loadURL(deducedUrl); - } - - QWebPage* page() const - { - return scene->webView()->page(); - } - -protected slots: - - void openFile() - { - static const QString filter("HTML Files (*.htm *.html);;Text Files (*.txt);;Image Files (*.gif *.jpg *.png);;All Files (*)"); - - QFileDialog fileDialog(this, tr("Open"), QString(), filter); - fileDialog.setAcceptMode(QFileDialog::AcceptOpen); - fileDialog.setFileMode(QFileDialog::ExistingFile); - fileDialog.setOptions(QFileDialog::ReadOnly); - - if (fileDialog.exec()) { - QString selectedFile = fileDialog.selectedFiles()[0]; - if (!selectedFile.isEmpty()) - loadURL(QUrl::fromLocalFile(selectedFile)); - } - } - - void changeLocation() - { - load(urlEdit->text()); - } - - void loadFinished(bool) - { - QUrl url = scene->webView()->url(); - urlEdit->setText(url.toString()); - - QUrl::FormattingOptions opts; - opts |= QUrl::RemoveScheme; - opts |= QUrl::RemoveUserInfo; - opts |= QUrl::StripTrailingSlash; - QString s = url.toString(opts); - s = s.mid(2); - if (s.isEmpty()) - return; - //FIXME: something missing here - } - -public slots: - void newWindow(const QString &url = QString()) - { - MainWindow* mw = new MainWindow(); - mw->load(url); - mw->show(); - } - - void clone() - { - MainWindow* mw = new MainWindow(scene); - mw->show(); - } - - void setWaitCursor() - { - view->setWaitCursor(); - } - - void resetCursor() - { - view->resetCursor(); - } - - void flip() - { - view->flip(); - } - - void animatedFlip() - { - view->animatedFlip(); - } - - void animatedYFlip() - { - view->animatedYFlip(); - } - -private: - - void loadURL(const QUrl& url) - { - if (!url.isValid()) - return; - - urlEdit->setText(url.toString()); - scene->webView()->load(url); - scene->webView()->setFocus(Qt::OtherFocusReason); - } - - void buildUI() - { - QWebPage* page = scene->webView()->page(); - urlEdit = new QLineEdit(this); - urlEdit->setSizePolicy(QSizePolicy::Expanding, urlEdit->sizePolicy().verticalPolicy()); - connect(urlEdit, SIGNAL(returnPressed()), SLOT(changeLocation())); - - QToolBar* bar = addToolBar("Navigation"); - bar->addAction(page->action(QWebPage::Back)); - bar->addAction(page->action(QWebPage::Forward)); - bar->addAction(page->action(QWebPage::Reload)); - bar->addAction(page->action(QWebPage::Stop)); - bar->addWidget(urlEdit); - - QMenu* fileMenu = menuBar()->addMenu("&File"); - fileMenu->addAction("New Window", this, SLOT(newWindow()), QKeySequence::New); - fileMenu->addAction("Open File...", this, SLOT(openFile()), QKeySequence::Open); - fileMenu->addAction("Clone Window", this, SLOT(clone())); - fileMenu->addAction("Close Window", this, SLOT(close()), QKeySequence::Close); - fileMenu->addSeparator(); - fileMenu->addAction("Quit", QApplication::instance(), SLOT(closeAllWindows()), QKeySequence(Qt::CTRL | Qt::Key_Q)); - - QMenu* viewMenu = menuBar()->addMenu("&View"); - viewMenu->addAction(page->action(QWebPage::Stop)); - viewMenu->addAction(page->action(QWebPage::Reload)); - - QMenu* testMenu = menuBar()->addMenu("&Tests"); - testMenu->addAction("Set Wait Cursor", this, SLOT(setWaitCursor()), QKeySequence("Ctrl+W")); - testMenu->addAction("Reset Cursor", this, SLOT(resetCursor()), QKeySequence("Ctrl+Shift+W")); - - QMenu* fxMenu = menuBar()->addMenu("&Effects"); - fxMenu->addAction("Flip", this, SLOT(flip())); - fxMenu->addAction("Animated Flip", this, SLOT(animatedFlip()), QKeySequence("Ctrl+R")); - fxMenu->addAction("Animated Y-Flip", this, SLOT(animatedYFlip()), QKeySequence("Ctrl+Y")); - } - -private: - MainView* view; - QExplicitlySharedDataPointer<SharedScene> scene; - - QLineEdit* urlEdit; -}; - -QWebPage* WebPage::createWindow(QWebPage::WebWindowType) -{ - MainWindow* mw = new MainWindow; - mw->show(); - return mw->page(); -} - -int main(int argc, char** argv) -{ - QApplication app(argc, argv); - if (app.arguments().contains("--help")) { - qDebug() << "Usage: QGVLauncher [--url url] [--compositing] [--updateMode Full|Minimal|Smart|No|BoundingRect] [--cacheWebView] [--resizesToContents]\n"; - return 0; - } - QString url = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html")); - - app.setApplicationName("GQVLauncher"); - - QWebSettings::setObjectCacheCapacities((16 * 1024 * 1024) / 8, (16 * 1024 * 1024) / 8, 16 * 1024 * 1024); - QWebSettings::setMaximumPagesInCache(4); - QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true); - QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); - QWebSettings::enablePersistentStorage(); - - const QStringList args = app.arguments(); - const int indexOfUrl = args.indexOf("--url"); - if (indexOfUrl > 0 && indexOfUrl < args.count() - 1) - url = args.at(indexOfUrl+1); - else if (args.count() > 1) - url = args.at(1); - if (args.contains("--compositing")) - QWebSettings::globalSettings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled, true); - - MainWindow* window = new MainWindow; - window->load(url); - - for (int i = 2; i < args.count(); ++i) - if (!args.at(i).startsWith("-") && !args.at(i - 1).startsWith("-")) - window->newWindow(args.at(i)); - - window->show(); - return app.exec(); -} - -#include "main.moc" diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index ecbabe4..5ea072d 100644 --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -36,10 +36,17 @@ #include "FrameLoaderClientQt.h" #include "FrameView.h" #include "HitTestResult.h" +#include "Icon.h" +#include "NotificationPresenterClientQt.h" #include "NotImplemented.h" +#include "ScrollbarTheme.h" #include "WindowFeatures.h" #include "DatabaseTracker.h" +#if defined(Q_WS_MAEMO_5) +#include "QtMaemoWebPopup.h" +#else #include "QtFallbackWebPopup.h" +#endif #include "QWebPageClient.h" #include "SecurityOrigin.h" @@ -91,7 +98,7 @@ FloatRect ChromeClientQt::windowRect() QWidget* view = m_webPage->view(); if (!view) return FloatRect(); - return IntRect(view->topLevelWidget()->geometry()); + return IntRect(view->window()->geometry()); } @@ -159,7 +166,9 @@ Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, cons QWebPage *newPage = m_webPage->createWindow(features.dialog ? QWebPage::WebModalDialog : QWebPage::WebBrowserWindow); if (!newPage) return 0; - newPage->mainFrame()->load(request.resourceRequest().url()); + + if (!request.isEmpty()) + newPage->mainFrame()->load(request.resourceRequest().url()); return newPage->d->page; } @@ -170,7 +179,7 @@ void ChromeClientQt::show() QWidget* view = m_webPage->view(); if (!view) return; - view->topLevelWidget()->show(); + view->window()->show(); } @@ -324,26 +333,66 @@ bool ChromeClientQt::tabsToLinks() const IntRect ChromeClientQt::windowResizerRect() const { +#if defined(Q_WS_MAC) + if (!m_webPage) + return IntRect(); + + QWebPageClient* pageClient = platformPageClient(); + if (!pageClient) + return IntRect(); + + QWidget* ownerWidget = pageClient->ownerWidget(); + if (!ownerWidget) + return IntRect(); + + QWidget* topLevelWidget = ownerWidget->window(); + QRect topLevelGeometry(topLevelWidget->geometry()); + + // There's no API in Qt to query for the size of the resizer, so we assume + // it has the same width and height as the scrollbar thickness. + int scollbarThickness = ScrollbarTheme::nativeTheme()->scrollbarThickness(); + + // There's no API in Qt to query for the position of the resizer. Sometimes + // it's drawn by the system, and sometimes it's a QSizeGrip. For RTL locales + // it might even be on the lower left side of the window, but in WebKit we + // always draw scrollbars on the right hand side, so we assume this to be the + // location when computing the resize rect to reserve for WebKit. + QPoint resizeCornerTopLeft = ownerWidget->mapFrom(topLevelWidget, + QPoint(topLevelGeometry.width(), topLevelGeometry.height()) + - QPoint(scollbarThickness, scollbarThickness)); + + QRect resizeCornerRect = QRect(resizeCornerTopLeft, QSize(scollbarThickness, scollbarThickness)); + return resizeCornerRect.intersected(pageClient->geometryRelativeToOwnerWidget()); +#else return IntRect(); +#endif } -void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, bool, bool) +void ChromeClientQt::invalidateWindow(const IntRect&, bool) +{ + notImplemented(); +} + +void ChromeClientQt::invalidateContentsAndWindow(const IntRect& windowRect, bool immediate) { // No double buffer, so only update the QWidget if content changed. - if (contentChanged) { - if (platformPageClient()) { - QRect rect(windowRect); - rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize())); - if (!rect.isEmpty()) - platformPageClient()->update(rect); - } - emit m_webPage->repaintRequested(windowRect); + if (platformPageClient()) { + QRect rect(windowRect); + rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize())); + if (!rect.isEmpty()) + platformPageClient()->update(rect); } + emit m_webPage->repaintRequested(windowRect); // FIXME: There is no "immediate" support for window painting. This should be done always whenever the flag // is set. } +void ChromeClientQt::invalidateContentsForSlowScroll(const IntRect& windowRect, bool immediate) +{ + invalidateContentsAndWindow(windowRect, immediate); +} + void ChromeClientQt::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect&) { if (platformPageClient()) @@ -431,6 +480,13 @@ void ChromeClientQt::reachedMaxAppCacheSize(int64_t) } #endif +#if ENABLE(NOTIFICATIONS) +NotificationPresenter* ChromeClientQt::notificationPresenter() const +{ + return m_webPage->d->notificationPresenterClient; +} +#endif + void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser) { RefPtr<FileChooser> fileChooser = prpFileChooser; @@ -463,10 +519,9 @@ void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileC } } -void ChromeClientQt::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) +void ChromeClientQt::chooseIconForFiles(const Vector<String>& filenames, FileChooser* chooser) { - // FIXME: Move the code of Icon::createIconForFiles() here. - notImplemented(); + chooser->iconLoaded(Icon::createIconForFiles(filenames)); } bool ChromeClientQt::setCursor(PlatformCursorHandle) @@ -501,11 +556,48 @@ void ChromeClientQt::scheduleCompositingLayerSync() if (platformPageClient()) platformPageClient()->markForSync(true); } + +bool ChromeClientQt::allowsAcceleratedCompositing() const +{ + return (platformPageClient() && platformPageClient()->allowsAcceleratedCompositing()); +} + #endif QtAbstractWebPopup* ChromeClientQt::createSelectPopup() { +#if defined(Q_WS_MAEMO_5) + return new QtMaemoWebPopup; +#else return new QtFallbackWebPopup; +#endif +} + +#if ENABLE(WIDGETS_10_SUPPORT) +bool ChromeClientQt::isWindowed() +{ + return m_webPage->d->viewMode == "windowed"; +} + +bool ChromeClientQt::isFloating() +{ + return m_webPage->d->viewMode == "floating"; } +bool ChromeClientQt::isFullscreen() +{ + return m_webPage->d->viewMode == "fullscreen"; +} + +bool ChromeClientQt::isMaximized() +{ + return m_webPage->d->viewMode == "maximized"; +} + +bool ChromeClientQt::isMinimized() +{ + return m_webPage->d->viewMode == "minimized"; +} +#endif + } diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h index 3d5cbe9..a4575e2 100644 --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h @@ -34,7 +34,10 @@ #include "KURL.h" #include "PlatformString.h" +QT_BEGIN_NAMESPACE class QEventLoop; +QT_END_NAMESPACE + class QWebPage; namespace WebCore { @@ -105,8 +108,11 @@ namespace WebCore { virtual bool tabsToLinks() const; virtual IntRect windowResizerRect() const; - virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); + virtual void invalidateWindow(const IntRect&, bool); + virtual void invalidateContentsAndWindow(const IntRect&, bool); + virtual void invalidateContentsForSlowScroll(const IntRect&, bool); virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect); + virtual IntPoint screenToWindow(const IntPoint&) const; virtual IntRect windowToScreen(const IntRect&) const; virtual PlatformPageClient platformPageClient() const; @@ -125,12 +131,17 @@ namespace WebCore { virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); #endif +#if ENABLE(NOTIFICATIONS) + virtual NotificationPresenter* notificationPresenter() const; +#endif + #if USE(ACCELERATED_COMPOSITING) // see ChromeClient.h // this is a hook for WebCore to tell us what we need to do with the GraphicsLayers virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*); virtual void setNeedsOneShotDrawingSynchronization(); virtual void scheduleCompositingLayerSync(); + virtual bool allowsAcceleratedCompositing() const; #endif #if ENABLE(TOUCH_EVENTS) @@ -138,7 +149,7 @@ namespace WebCore { #endif virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); - virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); + virtual void chooseIconForFiles(const Vector<String>&, FileChooser*); virtual void formStateDidChange(const Node*) { } @@ -149,6 +160,15 @@ namespace WebCore { virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {} virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*); + virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { } + +#if ENABLE(WIDGETS_10_SUPPORT) + virtual bool isWindowed(); + virtual bool isFloating(); + virtual bool isFullscreen(); + virtual bool isMaximized(); + virtual bool isMinimized(); +#endif QtAbstractWebPopup* createSelectPopup(); diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp new file mode 100644 index 0000000..3f2e221 --- /dev/null +++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp @@ -0,0 +1,372 @@ +/* + Copyright (C) 2010 Robert Hogan <robert@roberthogan.net> + Copyright (C) 2008,2009,2010 Nokia Corporation and/or its subsidiary(-ies) + Copyright (C) 2007 Staikos Computing Services Inc. + Copyright (C) 2007 Apple Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "DumpRenderTreeSupportQt.h" + +#include "ContextMenu.h" +#include "ContextMenuClientQt.h" +#include "ContextMenuController.h" +#include "Editor.h" +#include "Element.h" +#include "FocusController.h" +#include "Frame.h" +#include "FrameView.h" +#include "GCController.h" +#include "InspectorController.h" +#include "Page.h" +#include "PageGroup.h" +#include "PluginDatabase.h" +#include "PrintContext.h" +#include "RenderListItem.h" +#include "RenderTreeAsText.h" +#include "SecurityOrigin.h" +#include "Settings.h" +#if ENABLE(SVG) +#include "SVGSMILElement.h" +#endif +#include "WorkerThread.h" + +#include "qwebframe.h" +#include "qwebframe_p.h" +#include "qwebpage.h" +#include "qwebpage_p.h" + +using namespace WebCore; + +DumpRenderTreeSupportQt::DumpRenderTreeSupportQt() +{ +} + +DumpRenderTreeSupportQt::~DumpRenderTreeSupportQt() +{ +} + +void DumpRenderTreeSupportQt::overwritePluginDirectories() +{ + PluginDatabase* db = PluginDatabase::installedPlugins(/* populate */ false); + + Vector<String> paths; + String qtPath(qgetenv("QTWEBKIT_PLUGIN_PATH").data()); + qtPath.split(UChar(':'), /* allowEmptyEntries */ false, paths); + + db->setPluginDirectories(paths); + db->refresh(); +} + +int DumpRenderTreeSupportQt::workerThreadCount() +{ +#if ENABLE(WORKERS) + return WebCore::WorkerThread::workerThreadCount(); +#else + return 0; +#endif +} + +void DumpRenderTreeSupportQt::setDumpRenderTreeModeEnabled(bool b) +{ + QWebPagePrivate::drtRun = b; +} + +void DumpRenderTreeSupportQt::setFrameFlatteningEnabled(QWebPage* page, bool enabled) +{ + QWebPagePrivate::core(page)->settings()->setFrameFlatteningEnabled(enabled); +} + +void DumpRenderTreeSupportQt::webPageSetGroupName(QWebPage* page, const QString& groupName) +{ + page->handle()->page->setGroupName(groupName); +} + +QString DumpRenderTreeSupportQt::webPageGroupName(QWebPage* page) +{ + return page->handle()->page->groupName(); +} + +#if ENABLE(INSPECTOR) +void DumpRenderTreeSupportQt::webInspectorExecuteScript(QWebPage* page, long callId, const QString& script) +{ + if (!page->handle()->page->inspectorController()) + return; + page->handle()->page->inspectorController()->evaluateForTestInFrontend(callId, script); +} + +void DumpRenderTreeSupportQt::webInspectorClose(QWebPage* page) +{ + if (!page->handle()->page->inspectorController()) + return; + page->handle()->page->inspectorController()->close(); +} + +void DumpRenderTreeSupportQt::webInspectorShow(QWebPage* page) +{ + if (!page->handle()->page->inspectorController()) + return; + page->handle()->page->inspectorController()->show(); +} + +void DumpRenderTreeSupportQt::setTimelineProfilingEnabled(QWebPage* page, bool enabled) +{ + InspectorController* controller = page->handle()->page->inspectorController(); + if (!controller) + return; + if (enabled) + controller->startTimelineProfiler(); + else + controller->stopTimelineProfiler(); +} + +#endif + +bool DumpRenderTreeSupportQt::hasDocumentElement(QWebFrame* frame) +{ + return QWebFramePrivate::core(frame)->document()->documentElement(); +} + +void DumpRenderTreeSupportQt::setJavaScriptProfilingEnabled(QWebFrame* frame, bool enabled) +{ +#if ENABLE(JAVASCRIPT_DEBUGGER) + Frame* coreFrame = QWebFramePrivate::core(frame); + InspectorController* controller = coreFrame->page()->inspectorController(); + if (!controller) + return; + if (enabled) + controller->enableProfiler(); + else + controller->disableProfiler(); +#endif +} + +// Pause a given CSS animation or transition on the target node at a specific time. +// If the animation or transition is already paused, it will update its pause time. +// This method is only intended to be used for testing the CSS animation and transition system. +bool DumpRenderTreeSupportQt::pauseAnimation(QWebFrame *frame, const QString &animationName, double time, const QString &elementId) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + if (!coreFrame) + return false; + + AnimationController* controller = coreFrame->animation(); + if (!controller) + return false; + + Document* doc = coreFrame->document(); + Q_ASSERT(doc); + + Node* coreNode = doc->getElementById(elementId); + if (!coreNode || !coreNode->renderer()) + return false; + + return controller->pauseAnimationAtTime(coreNode->renderer(), animationName, time); +} + +bool DumpRenderTreeSupportQt::pauseTransitionOfProperty(QWebFrame *frame, const QString &propertyName, double time, const QString &elementId) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + if (!coreFrame) + return false; + + AnimationController* controller = coreFrame->animation(); + if (!controller) + return false; + + Document* doc = coreFrame->document(); + Q_ASSERT(doc); + + Node* coreNode = doc->getElementById(elementId); + if (!coreNode || !coreNode->renderer()) + return false; + + return controller->pauseTransitionAtTime(coreNode->renderer(), propertyName, time); +} + +// Pause a given SVG animation on the target node at a specific time. +// This method is only intended to be used for testing the SVG animation system. +bool DumpRenderTreeSupportQt::pauseSVGAnimation(QWebFrame *frame, const QString &animationId, double time, const QString &elementId) +{ +#if !ENABLE(SVG) + return false; +#else + Frame* coreFrame = QWebFramePrivate::core(frame); + if (!coreFrame) + return false; + + Document* doc = coreFrame->document(); + Q_ASSERT(doc); + + if (!doc->svgExtensions()) + return false; + + Node* coreNode = doc->getElementById(animationId); + if (!coreNode || !SVGSMILElement::isSMILElement(coreNode)) + return false; + + return doc->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreNode), time); +#endif +} + +// Returns the total number of currently running animations (includes both CSS transitions and CSS animations). +int DumpRenderTreeSupportQt::numberOfActiveAnimations(QWebFrame *frame) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + if (!coreFrame) + return false; + + AnimationController* controller = coreFrame->animation(); + if (!controller) + return false; + + return controller->numberOfActiveAnimations(); +} + +void DumpRenderTreeSupportQt::clearFrameName(QWebFrame* frame) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + coreFrame->tree()->clearName(); +} + +int DumpRenderTreeSupportQt::javaScriptObjectsCount() +{ + return JSDOMWindowBase::commonJSGlobalData()->heap.globalObjectCount(); +} + +void DumpRenderTreeSupportQt::garbageCollectorCollect() +{ + gcController().garbageCollectNow(); +} + +void DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread(bool waitUntilDone) +{ + gcController().garbageCollectOnAlternateThreadForDebugging(waitUntilDone); +} + +// Returns the value of counter in the element specified by \a id. +QString DumpRenderTreeSupportQt::counterValueForElementById(QWebFrame* frame, const QString& id) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + if (Document* document = coreFrame->document()) { + Element* element = document->getElementById(id); + return WebCore::counterValueForElement(element); + } + return QString(); +} + +int DumpRenderTreeSupportQt::pageNumberForElementById(QWebFrame* frame, const QString& id, float width, float height) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + if (!coreFrame) + return -1; + + Element* element = coreFrame->document()->getElementById(AtomicString(id)); + if (!element) + return -1; + + return PrintContext::pageNumberForElement(element, FloatSize(width, height)); +} + +int DumpRenderTreeSupportQt::numberOfPages(QWebFrame* frame, float width, float height) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + if (!coreFrame) + return -1; + + return PrintContext::numberOfPages(coreFrame, FloatSize(width, height)); +} + +// Suspend active DOM objects in this frame. +void DumpRenderTreeSupportQt::suspendActiveDOMObjects(QWebFrame* frame) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + if (coreFrame->document()) + coreFrame->document()->suspendActiveDOMObjects(); +} + +// Resume active DOM objects in this frame. +void DumpRenderTreeSupportQt::resumeActiveDOMObjects(QWebFrame* frame) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + if (coreFrame->document()) + coreFrame->document()->resumeActiveDOMObjects(); +} + +void DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(QWebFrame* frame, int worldId, const QString& script) +{ + Frame* coreFrame = QWebFramePrivate::core(frame); + if (coreFrame) + JSC::JSValue result = coreFrame->script()->executeScriptInWorld(mainThreadNormalWorld(), script, true).jsValue(); +} + +void DumpRenderTreeSupportQt::whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains) +{ + SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains); +} + +void DumpRenderTreeSupportQt::resetOriginAccessWhiteLists() +{ + SecurityOrigin::resetOriginAccessWhitelists(); +} + +void DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme) +{ + SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme); +} + +void DumpRenderTreeSupportQt::setCaretBrowsingEnabled(QWebPage* page, bool value) +{ + page->handle()->page->settings()->setCaretBrowsingEnabled(value); +} + +void DumpRenderTreeSupportQt::setMediaType(QWebFrame* frame, const QString& type) +{ + WebCore::Frame* coreFrame = QWebFramePrivate::core(frame); + WebCore::FrameView* view = coreFrame->view(); + view->setMediaType(type); + coreFrame->document()->updateStyleSelector(); + view->forceLayout(); +} + +void DumpRenderTreeSupportQt::setSmartInsertDeleteEnabled(QWebPage* page, bool enabled) +{ + page->d->smartInsertDeleteEnabled = enabled; +} + + +void DumpRenderTreeSupportQt::setSelectTrailingWhitespaceEnabled(QWebPage* page, bool enabled) +{ + page->d->selectTrailingWhitespaceEnabled = enabled; +} + + +void DumpRenderTreeSupportQt::executeCoreCommandByName(QWebPage* page, const QString& name, const QString& value) +{ + page->handle()->page->focusController()->focusedOrMainFrame()->editor()->command(name).execute(value); +} + +bool DumpRenderTreeSupportQt::isCommandEnabled(QWebPage* page, const QString& name) +{ + return page->handle()->page->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled(); +} + +QString DumpRenderTreeSupportQt::markerTextForListItem(const QWebElement& listItem) +{ + return WebCore::markerTextForListItem(listItem.m_element); +} diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h new file mode 100644 index 0000000..b92b86a --- /dev/null +++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h @@ -0,0 +1,87 @@ +/* + Copyright (C) 2010 Robert Hogan <robert@roberthogan.net> + Copyright (C) 2008,2009,2010 Nokia Corporation and/or its subsidiary(-ies) + Copyright (C) 2007 Staikos Computing Services Inc. + Copyright (C) 2007 Apple Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef DumpRenderTreeSupportQt_h +#define DumpRenderTreeSupportQt_h + +#include "qwebkitglobal.h" + +#include "qwebelement.h" + +class QWebPage; +class QWebFrame; + +class QWEBKIT_EXPORT DumpRenderTreeSupportQt { + +public: + + DumpRenderTreeSupportQt(); + ~DumpRenderTreeSupportQt(); + + + static void executeCoreCommandByName(QWebPage* page, const QString& name, const QString& value); + static bool isCommandEnabled(QWebPage* page, const QString& name); + static void setSmartInsertDeleteEnabled(QWebPage* page, bool enabled); + static void setSelectTrailingWhitespaceEnabled(QWebPage* page, bool enabled); + + static bool pauseAnimation(QWebFrame*, const QString& name, double time, const QString& elementId); + static bool pauseTransitionOfProperty(QWebFrame*, const QString& name, double time, const QString& elementId); + static bool pauseSVGAnimation(QWebFrame*, const QString& animationId, double time, const QString& elementId); + static void suspendActiveDOMObjects(QWebFrame* frame); + static void resumeActiveDOMObjects(QWebFrame* frame); + + static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme); + static void setFrameFlatteningEnabled(QWebPage*, bool); + static void setCaretBrowsingEnabled(QWebPage* page, bool value); + static void setMediaType(QWebFrame* qframe, const QString& type); + static void setDumpRenderTreeModeEnabled(bool b); + + static void evaluateScriptInIsolatedWorld(QWebFrame* frame, int worldId, const QString& script); + static void garbageCollectorCollect(); + static void garbageCollectorCollectOnAlternateThread(bool waitUntilDone); + static void setJavaScriptProfilingEnabled(QWebFrame*, bool enabled); + static int javaScriptObjectsCount(); + + static void setTimelineProfilingEnabled(QWebPage*, bool enabled); + static void webInspectorExecuteScript(QWebPage* page, long callId, const QString& script); + static void webInspectorShow(QWebPage* page); + static void webInspectorClose(QWebPage* page); + + static QString webPageGroupName(QWebPage *page); + static QString counterValueForElementById(QWebFrame* frame, const QString& id); + static void webPageSetGroupName(QWebPage* page, const QString& groupName); + static void clearFrameName(QWebFrame* frame); + static void overwritePluginDirectories(); + static int numberOfActiveAnimations(QWebFrame*); + static int numberOfPages(QWebFrame* frame, float width, float height); + static int pageNumberForElementById(QWebFrame* frame, const QString& id, float width, float height); + static bool hasDocumentElement(QWebFrame* frame); + + static void whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains); + static void resetOriginAccessWhiteLists(); + + static int workerThreadCount(); + + static QString markerTextForListItem(const QWebElement& listItem); +}; + +#endif diff --git a/WebKit/qt/WebCoreSupport/EditCommandQt.cpp b/WebKit/qt/WebCoreSupport/EditCommandQt.cpp index a166840..756ba4c 100644 --- a/WebKit/qt/WebCoreSupport/EditCommandQt.cpp +++ b/WebKit/qt/WebCoreSupport/EditCommandQt.cpp @@ -18,7 +18,6 @@ */ #include "config.h" -#include <wtf/Platform.h> #include "EditCommandQt.h" using namespace WebCore; diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp index 90ebb1d..8a0aa08 100644 --- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp @@ -43,7 +43,6 @@ #include "HTMLElement.h" #include "HTMLInputElement.h" #include "HTMLNames.h" -#include "KeyboardCodes.h" #include "KeyboardEvent.h" #include "NotImplemented.h" #include "Page.h" @@ -51,6 +50,7 @@ #include "PlatformKeyboardEvent.h" #include "QWebPageClient.h" #include "Range.h" +#include "WindowsKeyboardCodes.h" #include <stdio.h> @@ -333,14 +333,18 @@ void EditorClientQt::pageDestroyed() bool EditorClientQt::smartInsertDeleteEnabled() { - notImplemented(); - return false; + return m_page->d->smartInsertDeleteEnabled; +} + +void EditorClientQt::toggleSmartInsertDelete() +{ + bool current = m_page->d->smartInsertDeleteEnabled; + m_page->d->smartInsertDeleteEnabled = !current; } bool EditorClientQt::isSelectTrailingWhitespaceEnabled() { - notImplemented(); - return false; + return m_page->d->selectTrailingWhitespaceEnabled; } void EditorClientQt::toggleContinuousSpellChecking() @@ -384,18 +388,6 @@ void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event) } else #endif // QT_NO_SHORTCUT switch (kevent->windowsVirtualKeyCode()) { -#if QT_VERSION < 0x040500 - case VK_RETURN: -#ifdef QT_WS_MAC - if (kevent->shiftKey() || kevent->metaKey()) -#else - if (kevent->shiftKey()) -#endif - frame->editor()->command("InsertLineBreak").execute(); - else - frame->editor()->command("InsertNewline").execute(); - break; -#endif case VK_BACK: frame->editor()->deleteWithDirection(SelectionController::BACKWARD, CharacterGranularity, false, true); @@ -625,11 +617,11 @@ void EditorClientQt::setInputMethodState(bool active) } } webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField); -#ifdef Q_WS_MAEMO_5 - // Maemo 5 MicroB Browser disables auto-uppercase and predictive text, thus, so do we. +#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN) + // disables auto-uppercase and predictive text for mobile devices webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true); webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true); -#endif // Q_WS_MAEMO_5 +#endif // Q_WS_MAEMO_5 || Q_OS_SYMBIAN #endif // QT_VERSION check webPageClient->setInputMethodEnabled(active); } diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.h b/WebKit/qt/WebCoreSupport/EditorClientQt.h index 42a402f..6c20898 100644 --- a/WebKit/qt/WebCoreSupport/EditorClientQt.h +++ b/WebKit/qt/WebCoreSupport/EditorClientQt.h @@ -48,13 +48,13 @@ public: virtual bool shouldDeleteRange(Range*); virtual bool shouldShowDeleteInterface(HTMLElement*); virtual bool smartInsertDeleteEnabled(); + virtual void toggleSmartInsertDelete(); virtual bool isSelectTrailingWhitespaceEnabled(); virtual bool isContinuousSpellCheckingEnabled(); virtual void toggleContinuousSpellChecking(); virtual bool isGrammarCheckingEnabled(); virtual void toggleGrammarChecking(); virtual int spellCheckerDocumentTag(); - virtual bool selectWordBeforeMenuEvent(); virtual bool isEditable(); diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 2eb2761..f93b1cc 100644 --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -50,6 +50,7 @@ #include "HTMLAppletElement.h" #include "HTMLFormElement.h" #include "HTMLPlugInElement.h" +#include "HTTPParsers.h" #include "NotImplemented.h" #include "QNetworkReplyHandler.h" #include "ResourceHandleInternal.h" @@ -74,10 +75,14 @@ #include <QGraphicsWidget> #include <QNetworkRequest> #include <QNetworkReply> +#include <QStringList> #include "qwebhistory_p.h" static bool dumpFrameLoaderCallbacks = false; static bool dumpResourceLoadCallbacks = false; +static bool sendRequestReturnsNullOnRedirect = false; +static bool sendRequestReturnsNull = false; +static QStringList sendRequestClearHeaders; static QMap<unsigned long, QString> dumpAssignedUrls; @@ -91,6 +96,21 @@ void QWEBKIT_EXPORT qt_dump_resource_load_callbacks(bool b) dumpResourceLoadCallbacks = b; } +void QWEBKIT_EXPORT qt_set_will_send_request_returns_null_on_redirect(bool b) +{ + sendRequestReturnsNullOnRedirect = b; +} + +void QWEBKIT_EXPORT qt_set_will_send_request_returns_null(bool b) +{ + sendRequestReturnsNull = b; +} + +void QWEBKIT_EXPORT qt_set_will_send_request_clear_headers(const QStringList& headers) +{ + sendRequestClearHeaders = headers; +} + // Compare with WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm static QString drtDescriptionSuitableForTestResult(WebCore::Frame* _frame) { @@ -124,16 +144,16 @@ static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceError& static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceRequest& request) { QString url = request.url().string(); - return QString::fromLatin1("<NSURLRequest %1>").arg(url); + QString httpMethod = request.httpMethod(); + QString mainDocumentUrl = request.firstPartyForCookies().string(); + return QString::fromLatin1("<NSURLRequest URL %1, main document URL %2, http method %3>").arg(url).arg(mainDocumentUrl).arg(httpMethod); } static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceResponse& response) { - QString text = response.httpStatusText(); - if (text.isEmpty()) - return QLatin1String("(null)"); - - return text; + QString url = response.url().string(); + int httpStatusCode = response.httpStatusCode(); + return QString::fromLatin1("<NSURLResponse %1, http status code %2>").arg(url).arg(httpStatusCode); } @@ -214,12 +234,17 @@ void FrameLoaderClientQt::transitionToCommittedForNewPage() QWebPage* page = m_webFrame->page(); const QSize preferredLayoutSize = page->preferredContentsSize(); + ScrollbarMode hScrollbar = (ScrollbarMode) m_webFrame->scrollBarPolicy(Qt::Horizontal); + ScrollbarMode vScrollbar = (ScrollbarMode) m_webFrame->scrollBarPolicy(Qt::Vertical); + bool hLock = hScrollbar != ScrollbarAuto; + bool vLock = vScrollbar != ScrollbarAuto; + m_frame->createView(m_webFrame->page()->viewportSize(), backgroundColor, !backgroundColor.alpha(), preferredLayoutSize.isValid() ? IntSize(preferredLayoutSize) : IntSize(), preferredLayoutSize.isValid(), - (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Horizontal), - (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Vertical)); + hScrollbar, hLock, + vScrollbar, vLock); } @@ -511,12 +536,13 @@ void FrameLoaderClientQt::finishedLoading(DocumentLoader* loader) if (!m_pluginView) { if(m_firstData) { FrameLoader *fl = loader->frameLoader(); - fl->setEncoding(m_response.textEncodingName(), false); + fl->writer()->setEncoding(m_response.textEncodingName(), false); m_firstData = false; } } else { - m_pluginView->didFinishLoading(); + if (m_pluginView->isPluginView()) + m_pluginView->didFinishLoading(); m_pluginView = 0; m_hasSentResponseToPlugin = false; } @@ -701,11 +727,12 @@ void FrameLoaderClientQt::setMainDocumentError(WebCore::DocumentLoader* loader, { if (!m_pluginView) { if (m_firstData) { - loader->frameLoader()->setEncoding(m_response.textEncodingName(), false); + loader->frameLoader()->writer()->setEncoding(m_response.textEncodingName(), false); m_firstData = false; } } else { - m_pluginView->didFail(error); + if (m_pluginView->isPluginView()) + m_pluginView->didFail(error); m_pluginView = 0; m_hasSentResponseToPlugin = false; } @@ -718,14 +745,14 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c return; FrameLoader *fl = loader->frameLoader(); if (m_firstData) { - fl->setEncoding(m_response.textEncodingName(), false); + fl->writer()->setEncoding(m_response.textEncodingName(), false); m_firstData = false; } fl->addData(data, length); } // We re-check here as the plugin can have been created - if (m_pluginView) { + if (m_pluginView && m_pluginView->isPluginView()) { if (!m_hasSentResponseToPlugin) { m_pluginView->didReceiveResponse(loader->response()); // didReceiveResponse sets up a new stream to the plug-in. on a full-page plug-in, a failure in @@ -819,7 +846,7 @@ void FrameLoaderClientQt::download(WebCore::ResourceHandle* handle, const WebCor if (reply) { QWebPage *page = m_webFrame->page(); if (page->forwardUnsupportedContent()) - emit m_webFrame->page()->unsupportedContent(reply); + emit page->unsupportedContent(reply); else reply->abort(); } @@ -833,11 +860,23 @@ void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identif void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& newRequest, const WebCore::ResourceResponse& redirectResponse) { + if (dumpResourceLoadCallbacks) printf("%s - willSendRequest %s redirectResponse %s\n", qPrintable(dumpAssignedUrls[identifier]), qPrintable(drtDescriptionSuitableForTestResult(newRequest)), - qPrintable(drtDescriptionSuitableForTestResult(redirectResponse))); + (redirectResponse.isNull()) ? "(null)" : qPrintable(drtDescriptionSuitableForTestResult(redirectResponse))); + + if (sendRequestReturnsNull) + newRequest.setURL(QUrl()); + + if (sendRequestReturnsNullOnRedirect && !redirectResponse.isNull()) { + printf("Returning null for this redirect\n"); + newRequest.setURL(QUrl()); + } + + for (int i = 0; i < sendRequestClearHeaders.size(); ++i) + newRequest.setHTTPHeaderField(sendRequestClearHeaders.at(i).toLocal8Bit().constData(), QString()); // seems like the Mac code doesn't do anything here by default neither //qDebug() << "FrameLoaderClientQt::dispatchWillSendRequest" << request.isNull() << request.url().string`(); @@ -860,11 +899,15 @@ void FrameLoaderClientQt::dispatchDidCancelAuthenticationChallenge(DocumentLoade notImplemented(); } -void FrameLoaderClientQt::dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long, const WebCore::ResourceResponse& response) +void FrameLoaderClientQt::dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse& response) { m_response = response; m_firstData = true; + if (dumpResourceLoadCallbacks) + printf("%s - didReceiveResponse %s\n", + qPrintable(dumpAssignedUrls[identifier]), + qPrintable(drtDescriptionSuitableForTestResult(response))); //qDebug() << " got response from" << response.url().string(); } @@ -872,18 +915,23 @@ void FrameLoaderClientQt::dispatchDidReceiveContentLength(WebCore::DocumentLoade { } -void FrameLoaderClientQt::dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long) +void FrameLoaderClientQt::dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier) { + if (dumpResourceLoadCallbacks) + printf("%s - didFinishLoading\n", + (dumpAssignedUrls.contains(identifier) ? qPrintable(dumpAssignedUrls[identifier]) : "<unknown>")); } void FrameLoaderClientQt::dispatchDidFailLoading(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::ResourceError& error) { if (dumpResourceLoadCallbacks) - printf("%s - didFailLoadingWithError: %s\n", qPrintable(dumpAssignedUrls[identifier]), qPrintable(drtDescriptionSuitableForTestResult(error))); + printf("%s - didFailLoadingWithError: %s\n", + (dumpAssignedUrls.contains(identifier) ? qPrintable(dumpAssignedUrls[identifier]) : "<unknown>"), + qPrintable(drtDescriptionSuitableForTestResult(error))); if (m_firstData) { FrameLoader *fl = loader->frameLoader(); - fl->setEncoding(m_response.textEncodingName(), false); + fl->writer()->setEncoding(m_response.textEncodingName(), false); m_firstData = false; } } @@ -894,11 +942,6 @@ bool FrameLoaderClientQt::dispatchDidLoadResourceFromMemoryCache(WebCore::Docume return false; } -void FrameLoaderClientQt::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const WebCore::ScriptString&) -{ - notImplemented(); -} - void FrameLoaderClientQt::callErrorPageExtension(const WebCore::ResourceError& error) { QWebPage* page = m_webFrame->page(); @@ -966,7 +1009,10 @@ WebCore::Frame* FrameLoaderClientQt::dispatchCreatePage() void FrameLoaderClientQt::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const WebCore::String& MIMEType, const WebCore::ResourceRequest&) { // we need to call directly here - if (canShowMIMEType(MIMEType)) + const ResourceResponse& response = m_frame->loader()->activeDocumentLoader()->response(); + if (WebCore::contentDispositionType(response.httpHeaderField("Content-Disposition")) == WebCore::ContentDispositionAttachment) + callPolicyFunction(function, PolicyDownload); + else if (canShowMIMEType(MIMEType)) callPolicyFunction(function, PolicyUse); else callPolicyFunction(function, PolicyDownload); @@ -1165,6 +1211,8 @@ public: platformWidget()->setMask(clipRegion); handleVisibility(); + + platformWidget()->update(); } virtual void show() diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h index adeb31c..2756871 100644 --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h @@ -96,7 +96,6 @@ namespace WebCore { virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long); virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long, const WebCore::ResourceError&); virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int); - virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString& sourceString); virtual void dispatchDidHandleOnloadEvents(); virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp index 5f343ff..7fabbda 100644 --- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp @@ -81,64 +81,21 @@ void InspectorClientQt::inspectorDestroyed() delete this; } -Page* InspectorClientQt::createPage() -{ - QWebView* inspectorView = m_inspectorView.get(); - if (!inspectorView) { - inspectorView = new QWebView; - InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView); - inspectorView->setPage(inspectorPage); - m_inspectorView.set(inspectorView); - } + +void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*) +{ + QWebView* inspectorView = new QWebView; + InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView); + inspectorView->setPage(inspectorPage); - inspectorView->page()->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html")); + QUrl inspectorUrl = m_inspectedWebPage->settings()->inspectorUrl(); + if (!inspectorUrl.isValid()) + inspectorUrl = QUrl("qrc:/webkit/inspector/inspector.html"); + inspectorView->page()->mainFrame()->load(inspectorUrl); m_inspectedWebPage->d->inspectorFrontend = inspectorView; m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(inspectorView); - return inspectorView->page()->d->page; -} - -String InspectorClientQt::localizedStringsURL() -{ - notImplemented(); - return String(); -} - -String InspectorClientQt::hiddenPanels() -{ - notImplemented(); - return String(); -} - -void InspectorClientQt::showWindow() -{ - updateWindowTitle(); - -#if ENABLE(INSPECTOR) - m_inspectedWebPage->d->inspectorController()->setWindowVisible(true, true); -#endif -} - -void InspectorClientQt::closeWindow() -{ -#if ENABLE(INSPECTOR) - m_inspectedWebPage->d->inspectorController()->setWindowVisible(false); -#endif -} - -void InspectorClientQt::attachWindow() -{ - notImplemented(); -} - -void InspectorClientQt::detachWindow() -{ - notImplemented(); -} - -void InspectorClientQt::setAttachedWindowHeight(unsigned) -{ - notImplemented(); + inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView)); } void InspectorClientQt::highlight(Node*) @@ -151,27 +108,13 @@ void InspectorClientQt::hideHighlight() notImplemented(); } -void InspectorClientQt::inspectedURLChanged(const String& newURL) -{ - m_inspectedURL = newURL; - updateWindowTitle(); -} - -void InspectorClientQt::inspectorWindowObjectCleared() -{ - notImplemented(); -} - -void InspectorClientQt::updateWindowTitle() -{ - if (m_inspectedWebPage->d->inspector) { - QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL); - m_inspectedWebPage->d->inspector->setWindowTitle(caption); - } -} - void InspectorClientQt::populateSetting(const String& key, String* setting) { +#ifdef QT_NO_SETTINGS + Q_UNUSED(key) + Q_UNUSED(setting) + qWarning("QWebInspector: QSettings is not supported by Qt."); +#else QSettings qsettings; if (qsettings.status() == QSettings::AccessError) { // QCoreApplication::setOrganizationName and QCoreApplication::setApplicationName haven't been called @@ -180,15 +123,21 @@ void InspectorClientQt::populateSetting(const String& key, String* setting) return; } - QString settingKey(settingStoragePrefix + key); + QString settingKey(settingStoragePrefix + QString(key)); QString storedValueType = qsettings.value(settingKey + settingStorageTypeSuffix).toString(); QVariant storedValue = qsettings.value(settingKey); storedValue.convert(QVariant::nameToType(storedValueType.toAscii().data())); *setting = variantToSetting(storedValue); +#endif // QT_NO_SETTINGS } void InspectorClientQt::storeSetting(const String& key, const String& setting) { +#ifdef QT_NO_SETTINGS + Q_UNUSED(key) + Q_UNUSED(setting) + qWarning("QWebInspector: QSettings is not supported by Qt."); +#else QSettings qsettings; if (qsettings.status() == QSettings::AccessError) { qWarning("QWebInspector: QSettings couldn't persist configuration setting [%s].", @@ -197,9 +146,10 @@ void InspectorClientQt::storeSetting(const String& key, const String& setting) } QVariant valueToStore = settingToVariant(setting); - QString settingKey(settingStoragePrefix + key); + QString settingKey(settingStoragePrefix + QString(key)); qsettings.setValue(settingKey, valueToStore); qsettings.setValue(settingKey + settingStorageTypeSuffix, QVariant::typeToName(valueToStore.type())); +#endif // QT_NO_SETTINGS } static String variantToSetting(const QVariant& qvariant) @@ -211,6 +161,8 @@ static String variantToSetting(const QVariant& qvariant) retVal = qvariant.toBool() ? "true" : "false"; case QVariant::String: retVal = qvariant.toString(); + default: + break; } return retVal; @@ -223,6 +175,81 @@ static QVariant settingToVariant(const String& setting) return retVal; } +InspectorFrontendClientQt::InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView) + : InspectorFrontendClientLocal(inspectedWebPage->d->page->inspectorController(), inspectorView->page()->d->page) + , m_inspectedWebPage(inspectedWebPage) + , m_inspectorView(inspectorView) + , m_destroyingInspectorView(false) +{ +} + +void InspectorFrontendClientQt::frontendLoaded() +{ + InspectorFrontendClientLocal::frontendLoaded(); + setAttachedWindow(true); +} + +String InspectorFrontendClientQt::localizedStringsURL() +{ + notImplemented(); + return String(); +} + +String InspectorFrontendClientQt::hiddenPanels() +{ + notImplemented(); + return String(); +} + +void InspectorFrontendClientQt::bringToFront() +{ + updateWindowTitle(); +} + +void InspectorFrontendClientQt::closeWindow() +{ + if (m_destroyingInspectorView) + return; + m_destroyingInspectorView = true; + + // Clear reference from QWebInspector to the frontend view. + m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(0); +#if ENABLE(INSPECTOR) + m_inspectedWebPage->d->inspectorController()->disconnectFrontend(); +#endif + // Clear pointer before deleting WebView to avoid recursive calls to its destructor. + delete m_inspectorView.release(); +} + +void InspectorFrontendClientQt::attachWindow() +{ + notImplemented(); +} + +void InspectorFrontendClientQt::detachWindow() +{ + notImplemented(); +} + +void InspectorFrontendClientQt::setAttachedWindowHeight(unsigned) +{ + notImplemented(); +} + +void InspectorFrontendClientQt::inspectedURLChanged(const String& newURL) +{ + m_inspectedURL = newURL; + updateWindowTitle(); +} + +void InspectorFrontendClientQt::updateWindowTitle() +{ + if (m_inspectedWebPage->d->inspector) { + QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL); + m_inspectedWebPage->d->inspector->setWindowTitle(caption); + } +} + } #include "InspectorClientQt.moc" diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.h b/WebKit/qt/WebCoreSupport/InspectorClientQt.h index 923bab4..4beadab 100644 --- a/WebKit/qt/WebCoreSupport/InspectorClientQt.h +++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.h @@ -31,52 +31,64 @@ #define InspectorClientQt_h #include "InspectorClient.h" +#include "InspectorFrontendClientLocal.h" #include "OwnPtr.h" +#include "PassOwnPtr.h" #include <QtCore/QString> class QWebPage; class QWebView; namespace WebCore { - class Node; - class Page; - class String; +class Node; +class Page; +class String; - class InspectorClientQt : public InspectorClient { - public: - InspectorClientQt(QWebPage*); +class InspectorClientQt : public InspectorClient { +public: + InspectorClientQt(QWebPage*); - virtual void inspectorDestroyed(); + virtual void inspectorDestroyed(); - virtual Page* createPage(); + virtual void openInspectorFrontend(WebCore::InspectorController*); - virtual String localizedStringsURL(); + virtual void highlight(Node*); + virtual void hideHighlight(); - virtual String hiddenPanels(); + virtual void populateSetting(const String& key, String* value); + virtual void storeSetting(const String& key, const String& value); - virtual void showWindow(); - virtual void closeWindow(); +private: + QWebPage* m_inspectedWebPage; +}; - virtual void attachWindow(); - virtual void detachWindow(); +class InspectorFrontendClientQt : public InspectorFrontendClientLocal { +public: + InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView); - virtual void setAttachedWindowHeight(unsigned height); + virtual void frontendLoaded(); - virtual void highlight(Node*); - virtual void hideHighlight(); - virtual void inspectedURLChanged(const String& newURL); + virtual String localizedStringsURL(); - virtual void populateSetting(const String& key, String* value); - virtual void storeSetting(const String& key, const String& value); + virtual String hiddenPanels(); - virtual void inspectorWindowObjectCleared(); + virtual void bringToFront(); + virtual void closeWindow(); - private: - void updateWindowTitle(); - QWebPage* m_inspectedWebPage; - OwnPtr<QWebView> m_inspectorView; - QString m_inspectedURL; - }; + virtual void attachWindow(); + virtual void detachWindow(); + + virtual void setAttachedWindowHeight(unsigned height); + + virtual void inspectedURLChanged(const String& newURL); + +private: + void updateWindowTitle(); + QWebPage* m_inspectedWebPage; + OwnPtr<QWebView> m_inspectorView; + QString m_inspectedURL; + bool m_destroyingInspectorView; +}; } #endif diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp new file mode 100644 index 0000000..e440837 --- /dev/null +++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * 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 "NotificationPresenterClientQt.h" + +#include "Document.h" +#include "KURL.h" +#include "NotImplemented.h" +#include "SecurityOrigin.h" + +#include "qwebkitglobal.h" + +#include <QtGui> + +static bool dumpNotification = false; + +void QWEBKIT_EXPORT qt_dump_notification(bool b) +{ + dumpNotification = b; +} + +#if ENABLE(NOTIFICATIONS) + +using namespace WebCore; + +NotificationPresenterClientQt::NotificationPresenterClientQt() +{ +} + +bool NotificationPresenterClientQt::show(Notification* notification) +{ + if (dumpNotification) { + if (notification->isHTML()) + printf("DESKTOP NOTIFICATION: contents at %s\n", QString(notification->url().string()).toUtf8().constData()); + else { + printf("DESKTOP NOTIFICATION: icon %s, title %s, text %s\n", + QString(notification->contents().icon().string()).toUtf8().constData(), QString(notification->contents().title()).toUtf8().constData(), + QString(notification->contents().body()).toUtf8().constData()); + } + } + +#ifndef QT_NO_SYSTEMTRAYICON + m_tray.show(); + m_tray.showMessage(notification->contents().title(), notification->contents().body(), QSystemTrayIcon::Information); +#endif + return true; +} + +void NotificationPresenterClientQt::cancel(Notification* notification) +{ + if (dumpNotification) { + if (notification->isHTML()) + printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->url().string()).toUtf8().constData()); + else + printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->contents().title()).toUtf8().constData()); + } + + notImplemented(); +} + +void NotificationPresenterClientQt::notificationObjectDestroyed(Notification* notification) +{ + notImplemented(); +} + +void NotificationPresenterClientQt::requestPermission(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback) +{ + if (dumpNotification) + printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n", QString(origin->toString()).toUtf8().constData()); + + notImplemented(); +} + +NotificationPresenter::Permission NotificationPresenterClientQt::checkPermission(const KURL&) +{ + // FIXME Implement permission policy + return NotificationPresenter::PermissionAllowed; +} + +#endif // ENABLE(NOTIFICATIONS) diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h new file mode 100644 index 0000000..272c661 --- /dev/null +++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * 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 "Notification.h" +#include "NotificationPresenter.h" + +#include <QSystemTrayIcon> + +#if ENABLE(NOTIFICATIONS) + +namespace WebCore { +class Document; +class KURL; + +class NotificationPresenterClientQt : public NotificationPresenter { +public: + NotificationPresenterClientQt(); + + /* WebCore::NotificationPresenter interface */ + virtual bool show(Notification*); + virtual void cancel(Notification*); + virtual void notificationObjectDestroyed(Notification*); + virtual void requestPermission(SecurityOrigin*, PassRefPtr<VoidCallback>); + virtual NotificationPresenter::Permission checkPermission(const KURL&); + +private: +#ifndef QT_NO_SYSTEMTRAYICON + QSystemTrayIcon m_tray; +#endif +}; +} + +#endif diff --git a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp index c553c45..7514077 100644 --- a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp +++ b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp @@ -23,8 +23,8 @@ #include "HostWindow.h" #include "PopupMenuClient.h" -#include "qgraphicswebview.h" #include "QWebPageClient.h" +#include "qgraphicswebview.h" #include <QAbstractItemView> #include <QApplication> #include <QGraphicsProxyWidget> @@ -34,6 +34,12 @@ #include <QMouseEvent> #include <QStandardItemModel> +#if ENABLE(SYMBIAN_DIALOG_PROVIDERS) +#include <BrCtlDialogsProvider.h> +#include <BrowserDialogsProvider.h> // S60 platform private header file +#include <e32base.h> +#endif + namespace WebCore { QtFallbackWebPopupCombo::QtFallbackWebPopupCombo(QtFallbackWebPopup& ownerPopup) @@ -49,6 +55,7 @@ void QtFallbackWebPopupCombo::showPopup() void QtFallbackWebPopupCombo::hidePopup() { +#ifndef QT_NO_IM QWidget* activeFocus = QApplication::focusWidget(); if (activeFocus && activeFocus == QComboBox::view() && activeFocus->testAttribute(Qt::WA_InputMethodEnabled)) { @@ -58,6 +65,7 @@ void QtFallbackWebPopupCombo::hidePopup() qic->setFocusWidget(0); } } +#endif // QT_NO_IM QComboBox::hidePopup(); @@ -93,17 +101,15 @@ QtFallbackWebPopup::~QtFallbackWebPopup() void QtFallbackWebPopup::show() { + if (!pageClient()) + return; + +#if ENABLE(SYMBIAN_DIALOG_PROVIDERS) + TRAP_IGNORE(showS60BrowserDialog()); +#else populate(); m_combo->setCurrentIndex(currentIndex()); -#if defined(Q_WS_MAEMO_5) - // Comboboxes with Qt on Maemo 5 come up in their full width on the screen, so neither - // the proxy widget, nor the coordinates are needed. - m_combo->setParent(pageClient()->ownerWidget()); - m_combo->showPopup(); - return; -#endif - QRect rect = geometry(); if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(pageClient()->pluginParent())) { if (!m_proxy) { @@ -119,13 +125,65 @@ void QtFallbackWebPopup::show() } - // QCursor::pos() is not a great idea for a touch screen, but as Maemo 5 is handled - // separately above, this should be okay. QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); QCoreApplication::sendEvent(m_combo, &event); +#endif +} + +#if ENABLE(SYMBIAN_DIALOG_PROVIDERS) + +static void ResetAndDestroy(TAny* aPtr) +{ + RPointerArray<HBufC>* items = reinterpret_cast<RPointerArray<HBufC>* >(aPtr); + items->ResetAndDestroy(); } +void QtFallbackWebPopup::showS60BrowserDialog() +{ + static MBrCtlDialogsProvider* dialogs = CBrowserDialogsProvider::NewL(0); + if (!dialogs) + return; + + int size = itemCount(); + CArrayFix<TBrCtlSelectOptionData>* options = new CArrayFixFlat<TBrCtlSelectOptionData>(qMax(1, size)); + RPointerArray<HBufC> items(qMax(1, size)); + CleanupStack::PushL(TCleanupItem(&ResetAndDestroy, &items)); + + for (int i = 0; i < size; i++) { + if (itemType(i) == Separator) { + TBrCtlSelectOptionData data(_L("----------"), false, false, false); + options->AppendL(data); + } else { + HBufC16* itemStr = HBufC16::NewL(itemText(i).length()); + itemStr->Des().Copy((const TUint16*)itemText(i).utf16(), itemText(i).length()); + CleanupStack::PushL(itemStr); + TBrCtlSelectOptionData data(*itemStr, i == currentIndex(), false, itemIsEnabled(i)); + options->AppendL(data); + items.AppendL(itemStr); + CleanupStack::Pop(); + } + } + + dialogs->DialogSelectOptionL(KNullDesC(), (TBrCtlSelectOptionType)(ESelectTypeSingle | ESelectTypeWithFindPane), *options); + + CleanupStack::PopAndDestroy(&items); + + int newIndex; + for (newIndex = 0; newIndex < options->Count() && !options->At(newIndex).IsSelected(); newIndex++) {} + if (newIndex == options->Count()) + newIndex = currentIndex(); + + m_popupVisible = false; + popupDidHide(); + + if (currentIndex() != newIndex && newIndex >= 0) + valueChanged(newIndex); + + delete options; +} +#endif + void QtFallbackWebPopup::hide() { m_combo->hidePopup(); @@ -138,7 +196,7 @@ void QtFallbackWebPopup::populate() QStandardItemModel* model = qobject_cast<QStandardItemModel*>(m_combo->model()); Q_ASSERT(model); -#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5) +#if !defined(Q_WS_S60) m_combo->setFont(font()); #endif for (int i = 0; i < itemCount(); ++i) { diff --git a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h index 3924bf6..62b8aea 100644 --- a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h +++ b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h @@ -23,7 +23,9 @@ #include "QtAbstractWebPopup.h" #include <QComboBox> +QT_BEGIN_NAMESPACE class QGraphicsProxyWidget; +QT_END_NAMESPACE namespace WebCore { @@ -48,6 +50,9 @@ private: QGraphicsProxyWidget* m_proxy; void populate(); +#if ENABLE(SYMBIAN_DIALOG_PROVIDERS) + void showS60BrowserDialog(); +#endif }; class QtFallbackWebPopupCombo : public QComboBox { diff --git a/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp b/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp new file mode 100644 index 0000000..29a16cb --- /dev/null +++ b/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp @@ -0,0 +1,220 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ +#include "config.h" +#include "QtMaemoWebPopup.h" + +#include <QHBoxLayout> +#include <QListWidget> +#include <QListWidgetItem> +#include <QPainter> +#include <QPushButton> +#include <QStyledItemDelegate> +#include <QVBoxLayout> + +#include <libintl.h> + + +namespace WebCore { + +static const int gMaemoListItemSize = 70; +static const int gMaemoListPadding = 38; +static const int gMaemoMaxVisibleItems = 5; + +void Maemo5Popup::populateList() +{ + QListWidgetItem* listItem; + for (int i = 0; i < m_data.itemCount(); ++i) { + if (m_data.itemType(i) == QtAbstractWebPopup::Option) { + listItem = new QListWidgetItem(m_data.itemText(i)); + m_list->addItem(listItem); + listItem->setSelected(m_data.itemIsSelected(i)); + } else if (m_data.itemType(i) == QtAbstractWebPopup::Group) { + listItem = new QListWidgetItem(m_data.itemText(i)); + m_list->addItem(listItem); + listItem->setSelected(false); + listItem->setFlags(Qt::NoItemFlags); + } + } + connect(m_list, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(onItemSelected(QListWidgetItem*))); +} + +void Maemo5Popup::onItemSelected(QListWidgetItem* item) +{ + if (item->flags() != Qt::NoItemFlags) + emit itemClicked(m_list->row(item)); +} + +QtMaemoWebPopup::QtMaemoWebPopup() + : QtAbstractWebPopup() + , m_popup(0) +{ +} + +QtMaemoWebPopup::~QtMaemoWebPopup() +{ + if (m_popup) + m_popup->deleteLater(); +} + +Maemo5Popup* QtMaemoWebPopup::createSingleSelectionPopup() +{ + return new Maemo5SingleSelectionPopup(*this); +} + +Maemo5Popup* QtMaemoWebPopup::createMultipleSelectionPopup() +{ + return new Maemo5MultipleSelectionPopup(*this); +} + +Maemo5Popup* QtMaemoWebPopup::createPopup() +{ + Maemo5Popup* result = multiple() ? createMultipleSelectionPopup() : createSingleSelectionPopup(); + connect(result, SIGNAL(finished(int)), this, SLOT(popupClosed())); + connect(result, SIGNAL(itemClicked(int)), this, SLOT(itemClicked(int))); + return result; +} + +void QtMaemoWebPopup::show() +{ + if (!pageClient() || m_popup) + return; + + m_popup = createPopup(); + m_popup->show(); +} + +void QtMaemoWebPopup::hide() +{ + if (!m_popup) + return; + + m_popup->accept(); +} + +void QtMaemoWebPopup::popupClosed() +{ + if (!m_popup) + return; + + m_popup->deleteLater(); + m_popup = 0; + popupDidHide(); +} + +void QtMaemoWebPopup::itemClicked(int idx) +{ + selectItem(idx, true, false); +} + +Maemo5SingleSelectionPopup::Maemo5SingleSelectionPopup(QtAbstractWebPopup& data) + : Maemo5Popup(data) +{ + // we try to get the standard list title the web browser is using + const char* title = ::dgettext("osso-browser-ui", "weba_ti_texlist_single"); + if (qstrcmp(title, "weba_ti_texlist_single")) + setWindowTitle(QString::fromUtf8(title)); + else + setWindowTitle("Select item"); + + QHBoxLayout* hLayout = new QHBoxLayout(this); + hLayout->setContentsMargins(0, 0, 0, 0); + + m_list = new QListWidget(this); + populateList(); + + hLayout->addSpacing(gMaemoListPadding); + hLayout->addWidget(m_list); + hLayout->addSpacing(gMaemoListPadding); + + connect(m_list, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(accept())); + + const int visibleItemCount = (m_list->count() > gMaemoMaxVisibleItems) ? gMaemoMaxVisibleItems : m_list->count(); + resize(size().width(), visibleItemCount * gMaemoListItemSize); +} + + +class MultipleItemListDelegate : public QStyledItemDelegate { +public: + MultipleItemListDelegate(QObject* parent = 0) + : QStyledItemDelegate(parent) + { + tickMark = QIcon::fromTheme("widgets_tickmark_list").pixmap(48, 48); + } + + void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const + { + QStyledItemDelegate::paint(painter, option, index); + + if (option.state & QStyle::State_Selected) + painter->drawPixmap(option.rect.width() - tickMark.rect().width(), option.rect.y() + (option.rect.height() / 2 - tickMark.rect().height() / 2), tickMark); + } + +private: + QPixmap tickMark; +}; + +Maemo5MultipleSelectionPopup::Maemo5MultipleSelectionPopup(QtAbstractWebPopup& data) + : Maemo5Popup(data) +{ + // we try to get the standard list title the web browser is using + const char* title = ::dgettext("osso-browser-ui", "weba_ti_textlist_multi"); + if (qstrcmp(title, "weba_ti_textlist_multi")) + setWindowTitle(QString::fromUtf8(title)); + else + setWindowTitle("Select items"); + + QHBoxLayout* hLayout = new QHBoxLayout(this); + hLayout->setContentsMargins(0, 0, 0, 0); + + m_list = new QListWidget(this); + m_list->setSelectionMode(QAbstractItemView::MultiSelection); + populateList(); + + MultipleItemListDelegate* delegate = new MultipleItemListDelegate(this); + m_list->setItemDelegate(delegate); + + hLayout->addSpacing(gMaemoListPadding); + hLayout->addWidget(m_list); + + QVBoxLayout* vLayout = new QVBoxLayout(); + + const int visibleItemCount = (m_list->count() > gMaemoMaxVisibleItems) ? gMaemoMaxVisibleItems : m_list->count(); + vLayout->addSpacing((visibleItemCount - 1) * gMaemoListItemSize); + + // we try to get the standard Done button title + QPushButton* done = new QPushButton(this); + title = ::dgettext("hildon-libs", "wdgt_bd_done"); + if (qstrcmp(title, "wdgt_bd_done")) + done->setText(QString::fromUtf8(title)); + else + done->setText("Done"); + + done->setMinimumWidth(178); + vLayout->addWidget(done); + + hLayout->addSpacing(8); + hLayout->addLayout(vLayout); + hLayout->addSpacing(18); + + connect(done, SIGNAL(clicked()), this, SLOT(accept())); + resize(size().width(), visibleItemCount * gMaemoListItemSize); +} + +} diff --git a/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h b/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h new file mode 100644 index 0000000..a163a20 --- /dev/null +++ b/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ +#ifndef QtMaemoWebPopup_h +#define QtMaemoWebPopup_h + +#include "QtAbstractWebPopup.h" + +#include <QDialog> + +class QListWidgetItem; +class QListWidget; + + +namespace WebCore { + +class Maemo5Popup : public QDialog { + Q_OBJECT +public: + Maemo5Popup(QtAbstractWebPopup& data) : m_data(data) {} + +signals: + void itemClicked(int idx); + +protected slots: + void onItemSelected(QListWidgetItem* item); + +protected: + void populateList(); + + QtAbstractWebPopup& m_data; + QListWidget* m_list; +}; + + +class QtMaemoWebPopup : public QObject, public QtAbstractWebPopup { + Q_OBJECT +public: + QtMaemoWebPopup(); + ~QtMaemoWebPopup(); + + virtual void show(); + virtual void hide(); + +private slots: + void popupClosed(); + void itemClicked(int idx); + +private: + Maemo5Popup* m_popup; + + Maemo5Popup* createPopup(); + Maemo5Popup* createSingleSelectionPopup(); + Maemo5Popup* createMultipleSelectionPopup(); +}; + + +class Maemo5SingleSelectionPopup : public Maemo5Popup { + Q_OBJECT +public: + Maemo5SingleSelectionPopup(QtAbstractWebPopup& data); +}; + + +class Maemo5MultipleSelectionPopup : public Maemo5Popup { + Q_OBJECT +public: + Maemo5MultipleSelectionPopup(QtAbstractWebPopup& data); +}; + +} + +#endif // QtMaemoWebPopup_h diff --git a/WebKit/qt/docs/qtwebkit.qdoc b/WebKit/qt/docs/qtwebkit.qdoc index 411762a..9e653e4 100644 --- a/WebKit/qt/docs/qtwebkit.qdoc +++ b/WebKit/qt/docs/qtwebkit.qdoc @@ -83,9 +83,6 @@ QtWebKit is based on the Open Source WebKit engine. More information about WebKit itself can be found on the \l{WebKit Open Source Project} Web site. - The QtWebKit module is part of the \l{Qt Full Framework Edition}, and the - \l{Open Source Versions of Qt}. - \note Building the QtWebKit module with debugging symbols is problematic on many platforms due to the size of the WebKit engine. We recommend building the module only in release mode for embedded platforms. diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def index f53bb0d..145fe0b 100644 --- a/WebKit/qt/symbian/eabi/QtWebKitu.def +++ b/WebKit/qt/symbian/eabi/QtWebKitu.def @@ -693,9 +693,30 @@ EXPORTS _Z23qt_networkAccessAllowedb @ 692 NONAME _Z25qt_resumeActiveDOMObjectsP9QWebFrame @ 693 NONAME _Z26qt_suspendActiveDOMObjectsP9QWebFrame @ 694 NONAME - _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME - _ZN13QWebInspector10closeEventEP11QCloseEvent @ 696 NONAME - _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME + _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME ABSENT + _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameiiRK6QPoint @ 696 NONAME + _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME ABSENT _ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME _ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME - + _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME + _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME + _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME + _Z24qt_drt_workerThreadCountv @ 703 NONAME + _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME + _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME + _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME + _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME + _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME + _Z32qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME + _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME + _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME + _ZN9QWebFrame11pageChangedEv @ 712 NONAME + _ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME + _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME + _ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME + _ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME + _ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME + _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME + _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME + _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME + _ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME diff --git a/WebKit/qt/tests/benchmarks/loading/loading.pro b/WebKit/qt/tests/benchmarks/loading/loading.pro index 8b24274..024211f 100644 --- a/WebKit/qt/tests/benchmarks/loading/loading.pro +++ b/WebKit/qt/tests/benchmarks/loading/loading.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../../.. include(../../tests.pri) diff --git a/WebKit/qt/tests/benchmarks/painting/painting.pro b/WebKit/qt/tests/benchmarks/painting/painting.pro index 8acdd5c..b4fc56a 100644 --- a/WebKit/qt/tests/benchmarks/painting/painting.pro +++ b/WebKit/qt/tests/benchmarks/painting/painting.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../../.. include(../../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp b/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp index f4531fd..fc5b8e3 100644 --- a/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp +++ b/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp @@ -19,6 +19,7 @@ #include <QtTest/QtTest> +#include <qwebelement.h> #include <qwebframe.h> #include <qwebview.h> #include <qpainter.h> @@ -59,6 +60,7 @@ public Q_SLOTS: private Q_SLOTS: void paint_data(); void paint(); + void textAreas(); private: QWebView* m_view; @@ -105,5 +107,30 @@ void tst_Painting::paint() } } +void tst_Painting::textAreas() +{ + m_view->load(QUrl("data:text/html;<html><body></body></html>")); + ::waitForSignal(m_view, SIGNAL(loadFinished(bool))); + + QWebElement bodyElement = m_page->mainFrame()->findFirstElement("body"); + + int count = 100; + while (count--) { + QString markup("<textarea cols='1' rows='1'></textarea>"); + bodyElement.appendInside(markup); + } + + /* force a layout */ + QWebFrame* mainFrame = m_page->mainFrame(); + mainFrame->toPlainText(); + + QPixmap pixmap(mainFrame->contentsSize()); + QBENCHMARK { + QPainter painter(&pixmap); + mainFrame->render(&painter, QRect(QPoint(0, 0), mainFrame->contentsSize())); + painter.end(); + } +} + QTEST_MAIN(tst_Painting) #include "tst_painting.moc" diff --git a/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro b/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro index 0e49a70..9e80870 100644 --- a/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro +++ b/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro @@ -1,6 +1,7 @@ # ------------------------------------------------- # Project created by QtCreator 2009-12-10T11:25:02 # ------------------------------------------------- +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. include(../tests.pri) TARGET = hybridPixmap SOURCES += widget.cpp diff --git a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro index 4ca2bf6..d056014 100644 --- a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro +++ b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebelement/qwebelement.pro b/WebKit/qt/tests/qwebelement/qwebelement.pro index 4ca2bf6..d056014 100644 --- a/WebKit/qt/tests/qwebelement/qwebelement.pro +++ b/WebKit/qt/tests/qwebelement/qwebelement.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebframe/qwebframe.pro b/WebKit/qt/tests/qwebframe/qwebframe.pro index 4ca2bf6..d056014 100644 --- a/WebKit/qt/tests/qwebframe/qwebframe.pro +++ b/WebKit/qt/tests/qwebframe/qwebframe.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index 5ac3769..5f5a2f2 100644 --- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -67,6 +67,7 @@ class MyQObject : public QObject Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut) Q_PROPERTY(CustomType propWithCustomType READ propWithCustomType WRITE setPropWithCustomType) Q_PROPERTY(QWebElement webElementProperty READ webElementProperty WRITE setWebElementProperty) + Q_PROPERTY(QObject* objectStarProperty READ objectStarProperty WRITE setObjectStarProperty) Q_ENUMS(Policy Strategy) Q_FLAGS(Ability) @@ -104,6 +105,7 @@ public: m_hiddenValue(456.0), m_writeOnlyValue(789), m_readOnlyValue(987), + m_objectStar(0), m_qtFunctionInvoked(-1) { } ~MyQObject() { } @@ -197,6 +199,15 @@ public: m_customType = c; } + QObject* objectStarProperty() const { + return m_objectStar; + } + + void setObjectStarProperty(QObject* object) { + m_objectStar = object; + } + + int qtFunctionInvoked() const { return m_qtFunctionInvoked; } @@ -482,6 +493,7 @@ private: QKeySequence m_shortcut; QWebElement m_webElement; CustomType m_customType; + QObject* m_objectStar; int m_qtFunctionInvoked; QVariantList m_actuals; }; @@ -585,9 +597,9 @@ private slots: void render(); void scrollPosition(); void scrollToAnchor(); + void scrollbarsOff(); void evaluateWillCauseRepaint(); void qObjectWrapperWithSameIdentity(); - void scrollRecursively(); void introspectQtMethods_data(); void introspectQtMethods(); @@ -878,6 +890,21 @@ void tst_QWebFrame::getSetStaticProperty() QCOMPARE(evalJS("myObject.readOnlyProperty = 654;" "myObject.readOnlyProperty == 987"), sTrue); QCOMPARE(m_myObject->readOnlyProperty(), 987); + + // QObject* property + m_myObject->setObjectStarProperty(0); + QCOMPARE(m_myObject->objectStarProperty(), (QObject*)0); + QCOMPARE(evalJS("myObject.objectStarProperty == null"), sTrue); + QCOMPARE(evalJS("typeof myObject.objectStarProperty"), sObject); + QCOMPARE(evalJS("Boolean(myObject.objectStarProperty)"), sFalse); + QCOMPARE(evalJS("String(myObject.objectStarProperty) == 'null'"), sTrue); + QCOMPARE(evalJS("myObject.objectStarProperty.objectStarProperty"), + sUndefined); + m_myObject->setObjectStarProperty(this); + QCOMPARE(evalJS("myObject.objectStarProperty != null"), sTrue); + QCOMPARE(evalJS("typeof myObject.objectStarProperty"), sObject); + QCOMPARE(evalJS("Boolean(myObject.objectStarProperty)"), sTrue); + QCOMPARE(evalJS("String(myObject.objectStarProperty) != 'null'"), sTrue); } void tst_QWebFrame::getSetDynamicProperty() @@ -1908,6 +1935,7 @@ void tst_QWebFrame::overloadedSlots() // should pick myOverloadedSlot(QRegExp) m_myObject->resetQtFunctionInvoked(); evalJS("myObject.myOverloadedSlot(document.body)"); + QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=37319", Continue); QCOMPARE(m_myObject->qtFunctionInvoked(), 36); // should pick myOverloadedSlot(QObject*) @@ -2515,7 +2543,7 @@ void tst_QWebFrame::popupFocus() // open the popup by clicking. check if focus is on the popup QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25)); - QObject* webpopup = firstChildByClassName(&view, "WebCore::QWebPopup"); + QObject* webpopup = firstChildByClassName(&view, "QComboBox"); QComboBox* combo = qobject_cast<QComboBox*>(webpopup); QVERIFY(combo != 0); QTRY_VERIFY(!view.hasFocus() && combo->view()->hasFocus()); // Focus should be on the popup @@ -2797,6 +2825,38 @@ void tst_QWebFrame::scrollToAnchor() QVERIFY(frame->scrollPosition().y() != 0); } + +void tst_QWebFrame::scrollbarsOff() +{ + QWebView view; + QWebFrame* mainFrame = view.page()->mainFrame(); + + mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); + mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); + + QString html("<script>" \ + " function checkScrollbar() {" \ + " if (innerWidth === document.documentElement.offsetWidth)" \ + " document.getElementById('span1').innerText = 'SUCCESS';" \ + " else" \ + " document.getElementById('span1').innerText = 'FAIL';" \ + " }" \ + "</script>" \ + "<body>" \ + " <div style='margin-top:1000px ; margin-left:1000px'>" \ + " <a id='offscreen' href='a'>End</a>" \ + " </div>" \ + "<span id='span1'></span>" \ + "</body>"); + + + view.setHtml(html); + ::waitForSignal(&view, SIGNAL(loadFinished(bool))); + + mainFrame->evaluateJavaScript("checkScrollbar();"); + QCOMPARE(mainFrame->documentElement().findAll("span").at(0).toPlainText(), QString("SUCCESS")); +} + void tst_QWebFrame::evaluateWillCauseRepaint() { QWebView view; @@ -2808,7 +2868,7 @@ void tst_QWebFrame::evaluateWillCauseRepaint() #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QTest::qWaitForWindowShown(&view); #else - QTest::qWait(2000); + QTest::qWait(2000); #endif view.page()->mainFrame()->evaluateJavaScript( @@ -2855,70 +2915,6 @@ void tst_QWebFrame::qObjectWrapperWithSameIdentity() QCOMPARE(mainFrame->toPlainText(), QString("test2")); } -void tst_QWebFrame::scrollRecursively() -{ - // The test content is - // a nested frame set - // The main frame scrolls - // and has two children - // an iframe and a div overflow - // both scroll - QWebView webView; - QWebPage* webPage = webView.page(); - QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool))); - QUrl url = QUrl("qrc:///testiframe.html"); - webPage->mainFrame()->load(url); - QTRY_COMPARE(loadSpy.count(), 1); - - QList<QWebFrame*> children = webPage->mainFrame()->childFrames(); - QVERIFY(children.count() == 1); - - // 1st test - // call scrollRecursively over mainframe - // verify scrolled - // verify scroll postion changed - QPoint scrollPosition(webPage->mainFrame()->scrollPosition()); - QVERIFY(webPage->mainFrame()->scrollRecursively(10, 10)); - QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition()); - - // 2nd test - // call scrollRecursively over child iframe - // verify scrolled - // verify child scroll position changed - // verify parent's scroll position did not change - scrollPosition = webPage->mainFrame()->scrollPosition(); - QPoint childScrollPosition = children.at(0)->scrollPosition(); - QVERIFY(children.at(0)->scrollRecursively(10, 10)); - QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition()); - QVERIFY(childScrollPosition != children.at(0)->scrollPosition()); - - // 3rd test - // call scrollRecursively over div overflow - // verify scrolled == true - // verify parent and child frame's scroll postion did not change - QWebElement div = webPage->mainFrame()->documentElement().findFirst("#content1"); - QMouseEvent evpres(QEvent::MouseMove, div.geometry().center(), Qt::NoButton, Qt::NoButton, Qt::NoModifier); - webPage->event(&evpres); - scrollPosition = webPage->mainFrame()->scrollPosition(); - childScrollPosition = children.at(0)->scrollPosition(); - QVERIFY(webPage->mainFrame()->scrollRecursively(5, 5)); - QVERIFY(childScrollPosition == children.at(0)->scrollPosition()); - QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition()); - - // 4th test - // call scrollRecursively twice over childs iframe - // verify scrolled == true first time - // verify parent's scroll == true second time - // verify parent and childs scroll position changed - childScrollPosition = children.at(0)->scrollPosition(); - QVERIFY(children.at(0)->scrollRecursively(-10, -10)); - QVERIFY(childScrollPosition != children.at(0)->scrollPosition()); - scrollPosition = webPage->mainFrame()->scrollPosition(); - QVERIFY(children.at(0)->scrollRecursively(-10, -10)); - QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition()); - -} - void tst_QWebFrame::introspectQtMethods_data() { QTest::addColumn<QString>("objectExpression"); diff --git a/WebKit/qt/tests/qwebhistory/qwebhistory.pro b/WebKit/qt/tests/qwebhistory/qwebhistory.pro index 4ca2bf6..d056014 100644 --- a/WebKit/qt/tests/qwebhistory/qwebhistory.pro +++ b/WebKit/qt/tests/qwebhistory/qwebhistory.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro index 4ca2bf6..d056014 100644 --- a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro +++ b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebinspector/qwebinspector.pro b/WebKit/qt/tests/qwebinspector/qwebinspector.pro index e99c7f4..ac51929 100644 --- a/WebKit/qt/tests/qwebinspector/qwebinspector.pro +++ b/WebKit/qt/tests/qwebinspector/qwebinspector.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. include(../tests.pri) diff --git a/WebKit/qt/tests/qwebpage/qwebpage.pro b/WebKit/qt/tests/qwebpage/qwebpage.pro index 4ca2bf6..d056014 100644 --- a/WebKit/qt/tests/qwebpage/qwebpage.pro +++ b/WebKit/qt/tests/qwebpage/qwebpage.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index ba7a87e..c857b00 100644 --- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -20,12 +20,14 @@ */ #include "../util.h" +#include "../WebCoreSupport/DumpRenderTreeSupportQt.h" #include <QDir> #include <QGraphicsWidget> #include <QLineEdit> #include <QMenu> #include <QPushButton> #include <QtTest/QtTest> +#include <QTextCharFormat> #include <qgraphicsscene.h> #include <qgraphicsview.h> #include <qgraphicswebview.h> @@ -98,6 +100,8 @@ private slots: void consoleOutput(); void inputMethods_data(); void inputMethods(); + void inputMethodsTextFormat_data(); + void inputMethodsTextFormat(); void defaultTextEncoding(); void errorPageExtension(); void errorPageExtensionInIFrames(); @@ -722,10 +726,6 @@ void tst_QWebPage::createViewlessPlugin() } -// import private API -void QWEBKIT_EXPORT qt_webpage_setGroupName(QWebPage* page, const QString& groupName); -QString QWEBKIT_EXPORT qt_webpage_groupName(QWebPage* page); - void tst_QWebPage::multiplePageGroupsAndLocalStorage() { QDir dir(QDir::currentPath()); @@ -737,12 +737,12 @@ void tst_QWebPage::multiplePageGroupsAndLocalStorage() view1.page()->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true); view1.page()->settings()->setLocalStoragePath(QDir::toNativeSeparators(QDir::currentPath() + "/path1")); - qt_webpage_setGroupName(view1.page(), "group1"); + DumpRenderTreeSupportQt::webPageSetGroupName(view1.page(), "group1"); view2.page()->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true); view2.page()->settings()->setLocalStoragePath(QDir::toNativeSeparators(QDir::currentPath() + "/path2")); - qt_webpage_setGroupName(view2.page(), "group2"); - QCOMPARE(qt_webpage_groupName(view1.page()), QString("group1")); - QCOMPARE(qt_webpage_groupName(view2.page()), QString("group2")); + DumpRenderTreeSupportQt::webPageSetGroupName(view2.page(), "group2"); + QCOMPARE(DumpRenderTreeSupportQt::webPageGroupName(view1.page()), QString("group1")); + QCOMPARE(DumpRenderTreeSupportQt::webPageGroupName(view2.page()), QString("group2")); view1.setHtml(QString("<html><body> </body></html>"), QUrl("http://www.myexample.com")); @@ -1403,6 +1403,26 @@ void tst_QWebPage::inputMethods() variant = page->inputMethodQuery(Qt::ImCurrentSelection); QString selectionValue = variant.value<QString>(); QCOMPARE(selectionValue, QString("eb")); + + //Set selection with negative length + inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant()); + QInputMethodEvent eventSelection2("",inputAttributes); + page->event(&eventSelection2); + + //ImAnchorPosition + variant = page->inputMethodQuery(Qt::ImAnchorPosition); + anchorPosition = variant.toInt(); + QCOMPARE(anchorPosition, 1); + + //ImCursorPosition + variant = page->inputMethodQuery(Qt::ImCursorPosition); + cursorPosition = variant.toInt(); + QCOMPARE(cursorPosition, 6); + + //ImCurrentSelection + variant = page->inputMethodQuery(Qt::ImCurrentSelection); + selectionValue = variant.value<QString>(); + QCOMPARE(selectionValue, QString("tWebK")); #endif //ImSurroundingText @@ -1459,8 +1479,56 @@ void tst_QWebPage::inputMethods() delete container; } -// import a little DRT helper function to trigger the garbage collector -void QWEBKIT_EXPORT qt_drt_garbageCollector_collect(); +void tst_QWebPage::inputMethodsTextFormat_data() +{ + QTest::addColumn<QString>("string"); + QTest::addColumn<int>("start"); + QTest::addColumn<int>("length"); + + QTest::newRow("") << QString("") << 0 << 0; + QTest::newRow("Q") << QString("Q") << 0 << 1; + QTest::newRow("Qt") << QString("Qt") << 0 << 1; + QTest::newRow("Qt") << QString("Qt") << 0 << 2; + QTest::newRow("Qt") << QString("Qt") << 1 << 1; + QTest::newRow("Qt ") << QString("Qt ") << 0 << 1; + QTest::newRow("Qt ") << QString("Qt ") << 1 << 1; + QTest::newRow("Qt ") << QString("Qt ") << 2 << 1; + QTest::newRow("Qt ") << QString("Qt ") << 2 << -1; + QTest::newRow("Qt ") << QString("Qt ") << -2 << 3; + QTest::newRow("Qt ") << QString("Qt ") << 0 << 3; + QTest::newRow("Qt by") << QString("Qt by") << 0 << 1; + QTest::newRow("Qt by Nokia") << QString("Qt by Nokia") << 0 << 1; +} + + +void tst_QWebPage::inputMethodsTextFormat() +{ + QWebPage* page = new QWebPage; + QWebView* view = new QWebView; + view->setPage(page); + page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont"); + page->mainFrame()->setHtml("<html><body>" \ + "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/>"); + page->mainFrame()->evaluateJavaScript("document.getElementById('input1').focus()"); + page->mainFrame()->setFocus(); + view->show(); + + QFETCH(QString, string); + QFETCH(int, start); + QFETCH(int, length); + + QList<QInputMethodEvent::Attribute> attrs; + QTextCharFormat format; + format.setUnderlineStyle(QTextCharFormat::SingleUnderline); + format.setUnderlineColor(Qt::red); + attrs.append(QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, start, length, format)); + QInputMethodEvent im(string, attrs); + page->event(&im); + + QTest::qWait(1000); + + delete view; +} void tst_QWebPage::protectBindingsRuntimeObjectsFromCollector() { @@ -1478,7 +1546,7 @@ void tst_QWebPage::protectBindingsRuntimeObjectsFromCollector() newPage->mainFrame()->evaluateJavaScript("testme('foo')"); - qt_drt_garbageCollector_collect(); + DumpRenderTreeSupportQt::garbageCollectorCollect(); // don't crash! newPage->mainFrame()->evaluateJavaScript("testme('bar')"); diff --git a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro index e99c7f4..ac51929 100644 --- a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro +++ b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro @@ -1 +1,2 @@ +isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. include(../tests.pri) diff --git a/WebKit/qt/tests/tests.pri b/WebKit/qt/tests/tests.pri index 187950a..0bdf6f6 100644 --- a/WebKit/qt/tests/tests.pri +++ b/WebKit/qt/tests/tests.pri @@ -1,8 +1,9 @@ TEMPLATE = app CONFIG -= app_bundle -TARGET = tst_$$TARGET -SOURCES += $$_PRO_FILE_PWD_/$${TARGET}.cpp +VPATH += $$_PRO_FILE_PWD_ +!CONFIG(QTDIR_build):TARGET = tst_$$TARGET +SOURCES += $${TARGET}.cpp INCLUDEPATH += \ $$PWD \ $$PWD/../Api diff --git a/WebKit/qt/tests/tests.pro b/WebKit/qt/tests/tests.pro index 5e19202..22fece5 100644 --- a/WebKit/qt/tests/tests.pro +++ b/WebKit/qt/tests/tests.pro @@ -1,4 +1,4 @@ TEMPLATE = subdirs SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap -greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting benchmarks/loading +SUBDIRS += benchmarks/painting benchmarks/loading diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index 8dd19ad..287a9be 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,989 @@ +2010-04-20 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::receivedData): + +2010-04-20 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Change a parameter type of chooseIconForFiles() + https://bugs.webkit.org/show_bug.cgi?id=37504 + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::chooseIconForFiles): + * WebCoreSupport/WebChromeClient.h: + +2010-04-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Windows build fix). + + * WebFrame.cpp: + (WebFrame::stringByEvaluatingJavaScriptInScriptWorld): + * WebView.cpp: + (WebView::stringByEvaluatingJavaScriptFromString): + +2010-04-16 Adam Roben <aroben@apple.com> + + Make it possible for clients to instantiate a WebUserContentURLPattern + + Reviewed by Tim Hatcher. + + * ForEachCoClass.h: Added WebUserContentURLPattern to the FOR_EACH_COCLASS macro, which + lists all our instantiatable classes. + + * WebKitClassFactory.cpp: Added a now-required #include. + +2010-04-15 Adam Roben <aroben@apple.com> + + Expose UserContentURLPattern as WebKit SPI + + Fixes <http://webkit.org/b/37354>. + + Reviewed by Tim Hatcher. + + * Interfaces/IWebUserContentURLPattern.idl: Added. + + * Interfaces/WebKit.idl: Added WebUserContentURLPattern. + + * WebKit.vcproj/Interfaces.vcproj: Added IWebUserContentURLPattern. + + * WebKit.vcproj/WebKit.vcproj: Added WebUserContentURLPattern. + + * WebUserContentURLPattern.cpp: Added. + (WebUserContentURLPattern::WebUserContentURLPattern): + (WebUserContentURLPattern::~WebUserContentURLPattern): + (WebUserContentURLPattern::createInstance): + (WebUserContentURLPattern::AddRef): + (WebUserContentURLPattern::Release): + (WebUserContentURLPattern::QueryInterface): + Standard COM implementations. + + (WebUserContentURLPattern::parse): Parse the string into a + UserContentURLPattern and store it. + + (WebUserContentURLPattern::isValid): + (WebUserContentURLPattern::scheme): + (WebUserContentURLPattern::host): + (WebUserContentURLPattern::matchesSubdomains): + Call through to UserContentURLPattern. + + * WebUserContentURLPattern.h: Added. + +2010-04-14 Adam Roben <aroben@apple.com> + + Expose DOMWrapperWorld::unregisterWorld as WebKit SPI on Windows + + Fixes <http://webkit.org/b/37619>. + + Reviewed by Steve Falkenburg. + + * Interfaces/IWebScriptWorld.idl: Added unregisterWorld. + + * Interfaces/WebKit.idl: Touched to force a build. + + * WebScriptWorld.cpp: + (WebScriptWorld::unregisterWorld): + * WebScriptWorld.h: + Added. Just calls through to DOMWrapperWorld::unregisterWorld. + +2010-04-12 Timothy Hatcher <timothy@apple.com> + + SecurityOrigin needs a way to remove individual OriginAccessEntries + https://bugs.webkit.org/show_bug.cgi?id=37449 + + Reviewed by Dave Hyatt. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::removeOriginAccessWhitelistEntry): Call SecurityOrigin::removeOriginAccessWhitelistEntry. + * WebView.h: Added removeOriginAccessWhitelistEntry. + +2010-04-13 Timothy Hatcher <timothy@apple.com> + + Rename SecurityOrigin::whiteListAccessFromOrigin to addOriginAccessWhitelistEntry. + And SecurityOrigin::resetOriginAccessWhiteLists to resetOriginAccessWhitelists. + + SecurityOrigin needs a way to remove individual OriginAccessEntries + https://bugs.webkit.org/show_bug.cgi?id=37449 + + Reviewed by Dave Hyatt. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::addOriginAccessWhitelistEntry): + (WebView::resetOriginAccessWhitelists): + * WebView.h: + +2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57468. + http://trac.webkit.org/changeset/57468 + https://bugs.webkit.org/show_bug.cgi?id=37433 + + Broke the world... Must have applied the patch wrong + (Requested by abarth on #webkit). + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::receivedData): + +2010-04-11 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::receivedData): + +2010-04-09 Adam Roben <aroben@apple.com> + + Windows Debug/Release build fix after r57244 + + * WebKit.vcproj/WebKit.vcproj: Don't delay-load QuartzCore.dll or + QuartzCoreInterface.dll in any configurations. r57244 made this change + only for Debug_Internal. + +2010-04-08 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler. + + WebView::isLoading should null check m_mainFrame + https://bugs.webkit.org/show_bug.cgi?id=37294 + + * WebView.cpp: + (WebView::isLoading): + +2010-04-07 Chris Marrin <cmarrin@apple.com> + + Reviewed by Steve Falkenburg. + + Remove QuartzCoreInterface from the build + + No longer needed since QuartzCore.dll is now included in the latest Safari release (4.0.5). + + * WebKit.vcproj/WebKit.vcproj:Removed delay load for QuartzCore and QuartzCoreInterface + +2010-04-07 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Yury Semikhatsky. + + Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest() + https://bugs.webkit.org/show_bug.cgi?id=36949 + + * WebCoreSupport/WebFrameLoaderClient.cpp: + * WebCoreSupport/WebFrameLoaderClient.h: + +2010-04-05 Peter Nelson <charn.opcode@gmail.com> + + Reviewed by Eric Seidel. + + Fixed style errors in DOMCoreClasses.h to bring it up to scratch + for https://bugs.webkit.org/show_bug.cgi?id=34979. + + * DOMCoreClasses.h: + (DOMObject::throwException): + (DOMObject::callWebScriptMethod): + (DOMObject::evaluateWebScript): + (DOMObject::removeWebScriptKey): + (DOMObject::stringRepresentation): + (DOMObject::webScriptValueAtIndex): + (DOMObject::setWebScriptValueAtIndex): + (DOMObject::setException): + (DOMNodeList::throwException): + (DOMNodeList::callWebScriptMethod): + (DOMNodeList::evaluateWebScript): + (DOMNodeList::removeWebScriptKey): + (DOMNodeList::stringRepresentation): + (DOMNodeList::webScriptValueAtIndex): + (DOMNodeList::setWebScriptValueAtIndex): + (DOMNodeList::setException): + (DOMDocument::throwException): + (DOMDocument::callWebScriptMethod): + (DOMDocument::evaluateWebScript): + (DOMDocument::removeWebScriptKey): + (DOMDocument::stringRepresentation): + (DOMDocument::webScriptValueAtIndex): + (DOMDocument::setWebScriptValueAtIndex): + (DOMDocument::setException): + (DOMDocument::nodeName): + (DOMDocument::nodeValue): + (DOMDocument::setNodeValue): + (DOMDocument::nodeType): + (DOMDocument::parentNode): + (DOMDocument::childNodes): + (DOMDocument::firstChild): + (DOMDocument::lastChild): + (DOMDocument::previousSibling): + (DOMDocument::nextSibling): + (DOMDocument::attributes): + (DOMDocument::ownerDocument): + (DOMDocument::insertBefore): + (DOMDocument::replaceChild): + (DOMDocument::removeChild): + (DOMDocument::appendChild): + (DOMDocument::hasChildNodes): + (DOMDocument::cloneNode): + (DOMDocument::isSupported): + (DOMDocument::namespaceURI): + (DOMDocument::prefix): + (DOMDocument::setPrefix): + (DOMDocument::localName): + (DOMDocument::hasAttributes): + (DOMDocument::isSameNode): + (DOMDocument::isEqualNode): + (DOMDocument::textContent): + (DOMDocument::setTextContent): + (DOMElement::throwException): + (DOMElement::callWebScriptMethod): + (DOMElement::evaluateWebScript): + (DOMElement::removeWebScriptKey): + (DOMElement::stringRepresentation): + (DOMElement::webScriptValueAtIndex): + (DOMElement::setWebScriptValueAtIndex): + (DOMElement::setException): + (DOMElement::nodeName): + (DOMElement::nodeValue): + (DOMElement::setNodeValue): + (DOMElement::nodeType): + (DOMElement::parentNode): + (DOMElement::childNodes): + (DOMElement::firstChild): + (DOMElement::lastChild): + (DOMElement::previousSibling): + (DOMElement::nextSibling): + (DOMElement::attributes): + (DOMElement::ownerDocument): + (DOMElement::insertBefore): + (DOMElement::replaceChild): + (DOMElement::removeChild): + (DOMElement::appendChild): + (DOMElement::hasChildNodes): + (DOMElement::cloneNode): + (DOMElement::isSupported): + (DOMElement::namespaceURI): + (DOMElement::prefix): + (DOMElement::setPrefix): + (DOMElement::localName): + (DOMElement::hasAttributes): + (DOMElement::isSameNode): + (DOMElement::isEqualNode): + (DOMElement::textContent): + (DOMElement::setTextContent): + +2010-04-05 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=37111 + <rdar://problem/7790327> Draw replacement text when plug-in host crashes + + * WebCoreLocalizedStrings.cpp: (WebCore::crashedPluginText): Added a stub string for plug-in + failure. + +2010-04-02 Rafael Weinstein <rafaelw@chromium.org> + + Reviewed by Adam Barth. + + Clean up unused calls after changes to checkPermission and requestPermission argument lists. + + * WebCoreSupport/WebDesktopNotificationsDelegate.cpp: + (WebDesktopNotificationsDelegate::requestPermission): + * WebCoreSupport/WebDesktopNotificationsDelegate.h: + +2010-04-01 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + Added layerTreeAsText function to DRT (for Mac) + https://bugs.webkit.org/show_bug.cgi?id=36782 + + This is the WebKit side for Windows. It plumbs the + call from WebCore to DRT. + + * Interfaces/IWebFramePrivate.idl: + * WebFrame.cpp:WebKit (Windows) side of plumbing + (WebFrame::layerTreeAsText): + * WebFrame.h: + +2010-03-31 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Adds Geolocation param for cancelGeolocationPermissionRequestForFrame. + https://bugs.webkit.org/show_bug.cgi?id=35031 + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::cancelGeolocationPermissionRequestForFrame): + +2010-03-30 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=36866 + Move CString to WTF + + * WebDownload.cpp: + * WebDownloadCFNet.cpp: + * WebDownloadCurl.cpp: + * WebHistoryItem.cpp: + * WebLocalizableStrings.cpp: + * WebMutableURLRequest.cpp: + * WebPreferences.cpp: + (WebPreferences::migrateWebKitPreferencesToCFPreferences): + * WebView.cpp: + +2010-03-30 Adam Roben <aroben@apple.com> + + Windows build fix + + * Interfaces/WebKit.idl: Touched this to force a build. + +2010-03-29 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adele Peterson. + + Default value of accelerated compositing should be false for Windows + https://bugs.webkit.org/show_bug.cgi?id=36805 + + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): + +2010-03-29 Rafael Weinstein <rafaelw@chromium.org> + + Reviewed by Adam Barth. + + Change NotificationPresenter::checkPermission() to take the source frames full KURL, + rather than its SecurityOrigin. This will aid chromium in having more fine grained + permissions to control notification spam. + + * WebCoreSupport/WebDesktopNotificationsDelegate.cpp: + (WebDesktopNotificationsDelegate::checkPermission): + * WebCoreSupport/WebDesktopNotificationsDelegate.h: + +2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Antti Koivisto. + + Change method name due to it dealing with both flattening + of frame sets and inner frames. + + * Interfaces/IWebPreferencesPrivate.idl: + * WebPreferenceKeysPrivate.h: + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): + (WebPreferences::isFrameFlatteningEnabled): + (WebPreferences::setFrameFlatteningEnabled): + * WebPreferences.h: + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +2010-03-24 Jon Honeycutt <jhoneycutt@apple.com> + + <rdar://problem/7780798> Missing plug-ins should be represented by text + only, instead of lego block + + https://bugs.webkit.org/show_bug.cgi?id=36583 + + Reviewed by Dan Bernstein. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::createPlugin): + Return 0 if we failed to initialize the plug-in, which causes the new + "missing plug-in" text to draw. + +2010-03-24 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Make Icon::createIconForFiles() optional. + https://bugs.webkit.org/show_bug.cgi?id=35072 + + - Rename iconForFiles() to chooseIconForFiles(). + - Call Icon::createIconForFiles() from chooseIconForFiles(). + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::chooseIconForFiles): + * WebCoreSupport/WebChromeClient.h: + +2010-03-22 Darin Adler <darin@apple.com> + + * WebCoreLocalizedStrings.cpp: + (WebCore::missingPluginText): Fixed localization helper text to match the same + string from Mac WebKit. + +2010-03-22 Kevin Decker <kdecker@apple.com> + + Reviewed by John Sullivan. + + https://bugs.webkit.org/show_bug.cgi?id=36328 + + * WebCoreLocalizedStrings.cpp: + (WebCore::missingPluginText): Added. + +2010-03-17 Enrica Casucci <enrica@apple.com> + + Reviewed by Darin Adler. + + Missing support for showing compositing layers borders and repaint count on Windows. + <rdar://problem/7760736> + <https://bugs.webkit.org/show_bug.cgi?id=36197> + + * Interfaces/IWebPreferencesPrivate.idl: + * WebPreferenceKeysPrivate.h: + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): + (WebPreferences::showDebugBorders): + (WebPreferences::setShowDebugBorders): + (WebPreferences::showRepaintCounter): + (WebPreferences::setShowRepaintCounter): + * WebPreferences.h: + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +2010-03-16 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. + + Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder + https://bugs.webkit.org/show_bug.cgi?id=35036 + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::WebInspectorClient): + (WebInspectorClient::~WebInspectorClient): + (WebInspectorClient::openInspectorFrontend): + (WebInspectorClient::highlight): + (WebInspectorClient::hideHighlight): + (WebInspectorClient::updateHighlight): + (WebInspectorFrontendClient::WebInspectorFrontendClient): + (WebInspectorFrontendClient::~WebInspectorFrontendClient): + (WebInspectorFrontendClient::frontendLoaded): + (WebInspectorFrontendClient::localizedStringsURL): + (WebInspectorFrontendClient::hiddenPanels): + (WebInspectorFrontendClient::bringToFront): + (WebInspectorFrontendClient::closeWindow): + (WebInspectorFrontendClient::attachWindow): + (WebInspectorFrontendClient::detachWindow): + (WebInspectorFrontendClient::setAttachedWindowHeight): + (WebInspectorFrontendClient::inspectedURLChanged): + (WebInspectorFrontendClient::closeWindowWithoutNotifications): + (WebInspectorFrontendClient::showWindowWithoutNotifications): + (WebInspectorFrontendClient::destroyInspectorView): + (WebInspectorFrontendClient::updateWindowTitle): + (WebInspectorFrontendClient::onGetMinMaxInfo): + (WebInspectorFrontendClient::onSize): + (WebInspectorFrontendClient::onClose): + (WebInspectorFrontendClient::onSetFocus): + (WebInspectorFrontendClient::onWebViewWindowPosChanging): + (WebInspectorWndProc): + (WebInspectorFrontendClient::windowReceivedMessage): + * WebCoreSupport/WebInspectorClient.h: + (WebInspectorClient::frontendClosing): + * WebInspector.cpp: + (WebInspector::attach): + (WebInspector::detach): + +2010-03-14 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + WebKit part of removing support for legacy versions of Core Graphics + + * WebKitClassFactory.cpp: + (WebKitClassFactory::WebKitClassFactory): Removed call to populateFontDatabase(). + * WebKitGraphics.cpp: + (makeFont): Ditto. + * WebTextRenderer.cpp: + (WebTextRenderer::registerPrivateFont): Removed call to wkAddFontsAtPath(). + +2010-03-12 Enrica Casucci <enrica@apple.com> + + Fixed broken build on Windows. + Added contditional compilation for accelerated compositing. + + * WebView.cpp: + (WebView::deleteBackingStore): + (WebView::addToDirtyRegion): + (WebView::updateBackingStore): + +2010-03-12 Beth Dakin <bdakin@apple.com> + + Reviewed by Simon Fraser. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen + API naming is inconsistent + -and corresponding- + <rdar://problem/7729165> + + This patch changes all occurrences of "fullScreen" to the more + popular "fullscreen." + + * FullscreenVideoController.cpp: + (FullscreenVideoController::onMouseDown): + (FullscreenVideoController::onMouseMove): + (FullscreenVideoController::onMouseUp): + * FullscreenVideoController.h: + (FullscreenVideoController::fullscreenToHUDCoordinates): + +2010-03-12 Beth Dakin <bdakin@apple.com> + + Reviewed by Adam Roben. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=33739 Fullscreen + video HUD stays on top when switching to another window (e.g. via + Alt-Tab) + -and corresponding- + <rdar://problem/7547574> + + The HUD was always on top because it had the WS_EX_TOPMOST style. + So I removed the style and made m_videoWindow the owner of + m_hudWindow. This keeps m_hudWindow on top only when m_videoWindow + is the focused window. + + * FullscreenVideoController.cpp: + (FullscreenVideoController::exitFullscreen): ASSERT that movie()->exitFullscreen() also destroyed the hud. + (FullscreenVideoController::createHUDWindow): + +2010-03-12 Enrica Casucci <enrica@apple.com> + + Reviewed by Simon Fraser. + + Content of 3D tests appears at the bottom right corner sometimes. + <rdar://problem/7556244> + <https://bugs.webkit.org/show_bug.cgi?id=36027> + + See detailed comments in WebCore/ChangeLog. + + * WebView.cpp: + (WebView::deleteBackingStore): Reset the dirty flag when deleting the backing store. + (WebView::addToDirtyRegion): Set the dirty flag when adding dirty rectangles to the + backing store dirty region. + (WebView::updateBackingStore): Reset the dirty flag after painting into the backing store. + (WebView::setAcceleratedCompositing): Removed unnecessary call to updateRootLayerContents. + (WebView::updateRootLayerContents): Changed the way we pass parameters to setScrollFrame. + We are passing width and height of the view content together with the offset for the scrolling. + It was confusing to pass it all as a rectangle, when it is not a rectangle. + +2010-03-11 Aaron Boodman <aa@chromium.org> + + Kill WebDocument::applicationID() (part 1). + + Modify interface to WebCore::NotificationPresenter::checkPermission() + and remove implementation of WebDocument::applicationID(). Breaking + API changes will be in a subsequent change. + https://bugs.webkit.org/show_bug.cgi?id=35846 + + * WebCoreSupport/WebDesktopNotificationsDelegate.cpp: + (WebDesktopNotificationsDelegate::checkPermission): + * WebCoreSupport/WebDesktopNotificationsDelegate.h: + +2010-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. + + * WebCoreSupport/WebChromeClient.cpp: + * WebCoreSupport/WebChromeClient.h: + +2010-03-10 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + The build fix for my patch on bug #35763 wasn't quite right--it removed + the call entirely, instead of replacing it with the new API. This adds + the call to Database::setIsAvailable. + + https://bugs.webkit.org/show_bug.cgi?id=35763 + + * WebView.cpp: Added a call to Database::setIsAvailable where change 55667 removed the old Settings API call <http://trac.webkit.org/changeset/55667>. + (WebView::notifyPreferencesChanged): + +2010-03-10 John Sullivan <sullivan@apple.com> + + Reviewed by Tim Hatcher. + + <rdar://problem/7735387> input type other than text won't work with autofill + <https://bugs.webkit.org/show_bug.cgi?id=35963> + + * WebFrame.cpp: + (WebFrame::elementDoesAutoComplete): + Return true for any text field that's not a password, rather than only + for TEXT type. + +2010-03-09 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher. + + REGRESSION: WebInspector docking busted on Windows + <rdar://problem/7728433> and https://bugs.webkit.org/show_bug.cgi?id=35953 + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::attachWindow): Use the InspectorController:: copy of the should attach settings key. + (WebInspectorClient::detachWindow): Ditto. + (WebInspectorClient::showWindowWithoutNotifications): Ditto. + +2010-03-09 John Sullivan <sullivan@apple.com> + + Fixed localized string key collision. update-webkit-localized-strings now + runs without errors. + + Reviewed by Adam Roben. + + * WebCoreLocalizedStrings.cpp: + (WebCore::AXMenuListPopupActionVerb): + Used LPCTSTR_UI_STRING_KEY for the 2nd use of "press". + +2010-03-08 Adam Treat <atreat@rim.com> + + Unreviewed build fix for Windows. + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::invalidateContents): + +2010-03-02 Adam Treat <atreat@rim.com> + + Reviewed by Dave Hyatt. + + Adapt the win port to the refactoring of repaint methods. + + https://bugs.webkit.org/show_bug.cgi?id=34214 + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::invalidateContents): + (WebChromeClient::invalidateWindow): + (WebChromeClient::invalidateContentsAndWindow): + (WebChromeClient::invalidateContentsForSlowScroll): + * WebCoreSupport/WebChromeClient.h: + +2010-03-08 Daniel Bates <dbates@rim.com> + + Unreviewed, build fix. + + Attempt to fix the Windows builds by applying the corresponding change + made in bug #35763 <https://bugs.webkit.org/show_bug.cgi?id=35763>. + + * WebView.cpp: Removed call to settings->setDatabasesEnabled since this + setting no longer exists following changeset 55666 <http://trac.webkit.org/changeset/55666>. + (WebView::notifyPreferencesChanged): + +2010-03-07 Mark Rowe <mrowe@apple.com> + + Windows build fix. + + * WebKitPrefix.h: Include CoreFoundation/CoreFoundation.h from the Windows prefix header + since some WebCore headers rely on the types declared within being available via the prefix + header. + +2010-03-05 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + Got rid of platformLayer use in WebView. + https://bugs.webkit.org/show_bug.cgi?id=35798 + + WKCACFLayer no longer depends on GraphicsLayer, so I got rid of + that dependency on WebView. Now WebChromeClient casts platformLayer + to WKCACFLayer which will always be the case on Windows. + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::attachRootGraphicsLayer): + * WebView.cpp: + (WebView::setRootChildLayer): + * WebView.h: + +2010-03-04 Beth Dakin <bdakin@apple.com> + + Reviewed by Anders Carlsson. + + WebCore::Page::setInstanceHandle() is now just + WebCore::setInstanceHandle() + + * WebKitDLL.cpp: + (DllMain): + +2010-03-03 Alice Liu <alice.liu@apple.com> + + Reviewed by Jon Honeycutt. + + Add a way to get an iframe's content frame + + * DOMCoreClasses.cpp: + (DOMElement::createInstance): + Added case for DOMHTMLIFrameElement + * DOMHTMLClasses.cpp: + Adding the few DOMHTMLIFrameElement functions definitions that have + distinct implementations (all others just call parent implementation) + (DOMHTMLIFrameElement::QueryInterface): + (DOMHTMLIFrameElement::contentFrame): + * DOMHTMLClasses.h: + Most of these function declarations have definitions that just call the parent implementation + (DOMHTMLIFrameElement::DOMHTMLIFrameElement): + (DOMHTMLIFrameElement::AddRef): + (DOMHTMLIFrameElement::Release): + (DOMHTMLIFrameElement::throwException): + (DOMHTMLIFrameElement::callWebScriptMethod): + (DOMHTMLIFrameElement::evaluateWebScript): + (DOMHTMLIFrameElement::removeWebScriptKey): + (DOMHTMLIFrameElement::stringRepresentation): + (DOMHTMLIFrameElement::webScriptValueAtIndex): + (DOMHTMLIFrameElement::setWebScriptValueAtIndex): + (DOMHTMLIFrameElement::setException): + (DOMHTMLIFrameElement::nodeName): + (DOMHTMLIFrameElement::nodeValue): + (DOMHTMLIFrameElement::setNodeValue): + (DOMHTMLIFrameElement::nodeType): + (DOMHTMLIFrameElement::parentNode): + (DOMHTMLIFrameElement::childNodes): + (DOMHTMLIFrameElement::firstChild): + (DOMHTMLIFrameElement::lastChild): + (DOMHTMLIFrameElement::previousSibling): + (DOMHTMLIFrameElement::nextSibling): + (DOMHTMLIFrameElement::attributes): + (DOMHTMLIFrameElement::ownerDocument): + (DOMHTMLIFrameElement::insertBefore): + (DOMHTMLIFrameElement::replaceChild): + (DOMHTMLIFrameElement::removeChild): + (DOMHTMLIFrameElement::appendChild): + (DOMHTMLIFrameElement::hasChildNodes): + (DOMHTMLIFrameElement::cloneNode): + (DOMHTMLIFrameElement::normalize): + (DOMHTMLIFrameElement::isSupported): + (DOMHTMLIFrameElement::namespaceURI): + (DOMHTMLIFrameElement::prefix): + (DOMHTMLIFrameElement::setPrefix): + (DOMHTMLIFrameElement::localName): + (DOMHTMLIFrameElement::hasAttributes): + (DOMHTMLIFrameElement::isSameNode): + (DOMHTMLIFrameElement::isEqualNode): + (DOMHTMLIFrameElement::textContent): + (DOMHTMLIFrameElement::setTextContent): + (DOMHTMLIFrameElement::tagName): + (DOMHTMLIFrameElement::getAttribute): + (DOMHTMLIFrameElement::setAttribute): + (DOMHTMLIFrameElement::removeAttribute): + (DOMHTMLIFrameElement::getAttributeNode): + (DOMHTMLIFrameElement::setAttributeNode): + (DOMHTMLIFrameElement::removeAttributeNode): + (DOMHTMLIFrameElement::getElementsByTagName): + (DOMHTMLIFrameElement::getAttributeNS): + (DOMHTMLIFrameElement::setAttributeNS): + (DOMHTMLIFrameElement::removeAttributeNS): + (DOMHTMLIFrameElement::getAttributeNodeNS): + (DOMHTMLIFrameElement::setAttributeNodeNS): + (DOMHTMLIFrameElement::getElementsByTagNameNS): + (DOMHTMLIFrameElement::hasAttribute): + (DOMHTMLIFrameElement::hasAttributeNS): + (DOMHTMLIFrameElement::focus): + (DOMHTMLIFrameElement::blur): + (DOMHTMLIFrameElement::idName): + (DOMHTMLIFrameElement::setIdName): + (DOMHTMLIFrameElement::title): + (DOMHTMLIFrameElement::setTitle): + (DOMHTMLIFrameElement::lang): + (DOMHTMLIFrameElement::setLang): + (DOMHTMLIFrameElement::dir): + (DOMHTMLIFrameElement::setDir): + (DOMHTMLIFrameElement::className): + (DOMHTMLIFrameElement::setClassName): + (DOMHTMLIFrameElement::innerHTML): + (DOMHTMLIFrameElement::setInnerHTML): + (DOMHTMLIFrameElement::innerText): + (DOMHTMLIFrameElement::setInnerText): + * Interfaces/DOMHTML.idl: + Added IDOMHTMLIFrameElement interface + +2010-03-03 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + Export acceleratedCompositing flag in IWebPreferences. + https://bugs.webkit.org/show_bug.cgi?id=35610 + + * Interfaces/IWebPreferences.idl: + +2010-03-02 Beth Dakin <bdakin@apple.com> + + Reviewed by Darin Adler and Adam Roben. + + Tiny WebKit portion of fix for <rdar://problem/7485289> WebKit + crashes on systems that don't support CoreAnimation + + setHostWindow() no longer calls createRenderer(), so now that has + to be called manually. + + * WebView.cpp: + (WebView::setAcceleratedCompositing): + +2010-03-02 Adam Roben <aroben@apple.com> + + Add IWebViewPrivate::registerURLSchemeAsSecure + + Fixes <http://webkit.org/b/35580> <rdar://problem/7706407> Expose + SecurityOrigin::registerURLSchemeAsSecure as WebKit SPI + + Reviewed by Tim Hatcher. + + * Interfaces/WebKit.idl: Touched to force a build. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::registerURLSchemeAsSecure): + * WebView.h: + Added. Calls through to SecurityOrigin::registerURLSchemeAsSecure. + +2010-03-01 Jon Honeycutt <jhoneycutt@apple.com> + + Remove Windows line endings from some files. + + Rubber-stamped by Alice Liu. + + * Interfaces/IWebEmbeddedView.idl: + + * WebCoreSupport/EmbeddedWidget.cpp: + (EmbeddedWidget::create): + (EmbeddedWidget::~EmbeddedWidget): + (EmbeddedWidget::createWindow): + (EmbeddedWidget::invalidateRect): + (EmbeddedWidget::setFrameRect): + (EmbeddedWidget::frameRectsChanged): + (EmbeddedWidget::setFocus): + (EmbeddedWidget::show): + (EmbeddedWidget::hide): + (EmbeddedWidget::windowClipRect): + (EmbeddedWidget::setParent): + (EmbeddedWidget::attachToWindow): + (EmbeddedWidget::detachFromWindow): + (EmbeddedWidget::didReceiveResponse): + (EmbeddedWidget::didReceiveData): + (EmbeddedWidget::didFinishLoading): + (EmbeddedWidget::didFail): + + * WebCoreSupport/EmbeddedWidget.h: + (EmbeddedWidget::EmbeddedWidget): + +2010-03-01 Jon Honeycutt <jhoneycutt@apple.com> + + Some WebKit DOMNode API is unimplemented. + https://bugs.webkit.org/show_bug.cgi?id=35554 + + Reviewed by Alice Liu. + + * DOMCoreClasses.cpp: + (DOMNode::nextSibling): + Create a DOMNode to wrap m_node's next sibling, and assign it to the + out param 'result'. + (DOMNode::insertBefore): + Query for the DOMNode for newChild, and return early if we fail. Query + refChild for DOMNode. Call insertBefore(), passing the newChild's + WebCore node and refChild's WebCore node (if refChild is non-null). If + we successfully insert the child, fill the result out param with + newChild, ref it, and return S_OK. Otherwise, return E_FAIL. + (DOMNode::removeChild): + Query oldChild for DOMNode. If we fail, return E_FAIL. Call + removeChild(), passing the node's WebCore node. If this fails, return + E_FAIL. Otherwise, fill the result out param with oldChild, ref it, and + return S_OK. + +2010-03-01 Jakob Petsovits <jpetsovits@rim.com> + + Reviewed by Adam Barth. + + Adapt to the new ZoomMode enum. + https://bugs.webkit.org/show_bug.cgi?id=35347 + + * WebFrame.cpp: + (WebFrame::setTextSizeMultiplier): + * WebView.cpp: + (WebView::setZoomMultiplier): + (WebView::zoomMultiplier): + (WebView::canMakeTextLarger): + (WebView::makeTextLarger): + (WebView::canMakeTextSmaller): + (WebView::makeTextSmaller): + (WebView::notifyPreferencesChanged): + +2010-02-26 Jon Honeycutt <jhoneycutt@apple.com> + + <rdar://problem/7703368> IWebUIDelegatePrivate::embeddedViewWithArguments + is passed wrong arguments + + Reviewed by Adam Roben. + + * Interfaces/IWebUIDelegatePrivate.idl: + Update copyright strings. Added a new key for the plug-in source URL. + + * Interfaces/WebKit.idl: + Update copyright strings. + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::createPlugin): + Pass the URL of the plug-in as the source URL. Pass the document's + base URI for the base URL. + +2010-02-23 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher and Pavel Feldman. + + Regression (r55107) - WebInspector docking is busted. + https://bugs.webkit.org/show_bug.cgi?id=35274 + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::showWindowWithoutNotifications): Swap the order of the "should attach?" check + to get the expected behavior. + +2010-02-23 Steve Block <steveblock@google.com> + + Reviewed by Darin Adler. + + Adds ChromeClient::cancelGeolocationPermissionRequestForFrame + https://bugs.webkit.org/show_bug.cgi?id=34962 + + This method is required so that a Geolocation object can cancel an + asynchronous permission request. This allows the chrome client to cancel + any UI it is showing for the permission request. + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::cancelGeolocationPermissionRequestForFrame): + +2010-02-22 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler. + + WebKit on Windows should pick up system setting changes without requiring explicit API calls + https://bugs.webkit.org/show_bug.cgi?id=35269 + + * WebKit.vcproj/WebKit.def: Removed WebKitSystemParameterChanged. + * WebKit.vcproj/WebKit_debug.def: Removed WebKitSystemParameterChanged. + * WebKitGraphics.cpp: Removed WebKitSystemParameterChanged. + * WebKitGraphics.h: Removed WebKitSystemParameterChanged. + * WebView.cpp: + (systemParameterChanged): Call through to wkSystemFontSmoothingChanged for font changes. + (WebView::windowReceivedMessage): Pick up WM_SETTINGCHANGE from windowReceivedMessage. + +2010-02-22 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher. + + Disable WebView docking to views that are too small. + <rdar://problem/7248409> and https://bugs.webkit.org/show_bug.cgi?id=35254 + + * WebCoreSupport/WebInspectorClient.cpp: + (WebInspectorClient::showWindowWithoutNotifications): No matter the preference, don't open the inspector + window attached if WebCore says it shouldn't be attached. + 2010-02-17 Steve Falkenburg <sfalken@apple.com> Reviewed by Dan Bernstein. diff --git a/WebKit/win/DOMCoreClasses.cpp b/WebKit/win/DOMCoreClasses.cpp index 8ea7c84..4e8af61 100644 --- a/WebKit/win/DOMCoreClasses.cpp +++ b/WebKit/win/DOMCoreClasses.cpp @@ -184,10 +184,15 @@ HRESULT STDMETHODCALLTYPE DOMNode::previousSibling( } HRESULT STDMETHODCALLTYPE DOMNode::nextSibling( - /* [retval][out] */ IDOMNode** /*result*/) + /* [retval][out] */ IDOMNode** result) { - ASSERT_NOT_REACHED(); - return E_NOTIMPL; + if (!result) + return E_POINTER; + *result = 0; + if (!m_node) + return E_FAIL; + *result = DOMNode::createInstance(m_node->nextSibling()); + return *result ? S_OK : E_FAIL; } HRESULT STDMETHODCALLTYPE DOMNode::attributes( @@ -210,12 +215,31 @@ HRESULT STDMETHODCALLTYPE DOMNode::ownerDocument( } HRESULT STDMETHODCALLTYPE DOMNode::insertBefore( - /* [in] */ IDOMNode* /*newChild*/, - /* [in] */ IDOMNode* /*refChild*/, - /* [retval][out] */ IDOMNode** /*result*/) + /* [in] */ IDOMNode* newChild, + /* [in] */ IDOMNode* refChild, + /* [retval][out] */ IDOMNode** result) { - ASSERT_NOT_REACHED(); - return E_NOTIMPL; + if (!result) + return E_POINTER; + + *result = 0; + + if (!m_node) + return E_FAIL; + + COMPtr<DOMNode> newChildNode(Query, newChild); + if (!newChildNode) + return E_FAIL; + + COMPtr<DOMNode> refChildNode(Query, refChild); + + ExceptionCode ec; + if (!m_node->insertBefore(newChildNode->node(), refChildNode ? refChildNode->node() : 0, ec)) + return E_FAIL; + + *result = newChild; + (*result)->AddRef(); + return S_OK; } HRESULT STDMETHODCALLTYPE DOMNode::replaceChild( @@ -228,11 +252,28 @@ HRESULT STDMETHODCALLTYPE DOMNode::replaceChild( } HRESULT STDMETHODCALLTYPE DOMNode::removeChild( - /* [in] */ IDOMNode* /*oldChild*/, - /* [retval][out] */ IDOMNode** /*result*/) + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result) { - ASSERT_NOT_REACHED(); - return E_NOTIMPL; + if (!result) + return E_POINTER; + + *result = 0; + + if (!m_node) + return E_FAIL; + + COMPtr<DOMNode> oldChildNode(Query, oldChild); + if (!oldChildNode) + return E_FAIL; + + ExceptionCode ec; + if (!m_node->removeChild(oldChildNode->node(), ec)) + return E_FAIL; + + *result = oldChild; + (*result)->AddRef(); + return S_OK; } HRESULT STDMETHODCALLTYPE DOMNode::appendChild( @@ -1295,14 +1336,17 @@ IDOMElement* DOMElement::createInstance(WebCore::Element* e) if (e->hasTagName(formTag)) { DOMHTMLFormElement* newElement = new DOMHTMLFormElement(e); hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement); - } else if (e->hasTagName(selectTag)) { - DOMHTMLSelectElement* newElement = new DOMHTMLSelectElement(e); + } else if (e->hasTagName(iframeTag)) { + DOMHTMLIFrameElement* newElement = new DOMHTMLIFrameElement(e); + hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement); + } else if (e->hasTagName(inputTag)) { + DOMHTMLInputElement* newElement = new DOMHTMLInputElement(e); hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement); } else if (e->hasTagName(optionTag)) { DOMHTMLOptionElement* newElement = new DOMHTMLOptionElement(e); hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement); - } else if (e->hasTagName(inputTag)) { - DOMHTMLInputElement* newElement = new DOMHTMLInputElement(e); + } else if (e->hasTagName(selectTag)) { + DOMHTMLSelectElement* newElement = new DOMHTMLSelectElement(e); hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement); } else if (e->hasTagName(textareaTag)) { DOMHTMLTextAreaElement* newElement = new DOMHTMLTextAreaElement(e); diff --git a/WebKit/win/DOMCoreClasses.h b/WebKit/win/DOMCoreClasses.h index 3941d13..f8a3dbb 100644 --- a/WebKit/win/DOMCoreClasses.h +++ b/WebKit/win/DOMCoreClasses.h @@ -30,14 +30,14 @@ #include "WebScriptObject.h" namespace WebCore { - class Element; - class Document; - class Node; - class NodeList; +class Element; +class Document; +class Node; +class NodeList; } -class DOMObject : public WebScriptObject, public IDOMObject -{ + +class DOMObject : public WebScriptObject, public IDOMObject { public: // IUnknown virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); @@ -45,40 +45,39 @@ public: virtual ULONG STDMETHODCALLTYPE Release(void) { return WebScriptObject::Release(); } // IWebScriptObject - virtual HRESULT STDMETHODCALLTYPE throwException( + virtual HRESULT STDMETHODCALLTYPE throwException( /* [in] */ BSTR exceptionMessage, - /* [retval][out] */ BOOL *result) { return WebScriptObject::throwException(exceptionMessage, result); } + /* [retval][out] */ BOOL* result) { return WebScriptObject::throwException(exceptionMessage, result); } - virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( + virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( /* [in] */ BSTR name, /* [size_is][in] */ const VARIANT args[ ], /* [in] */ int cArgs, - /* [retval][out] */ VARIANT *result) { return WebScriptObject::callWebScriptMethod(name, args, cArgs, result); } + /* [retval][out] */ VARIANT* result) { return WebScriptObject::callWebScriptMethod(name, args, cArgs, result); } - virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( + virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( /* [in] */ BSTR script, - /* [retval][out] */ VARIANT *result) { return WebScriptObject::evaluateWebScript(script, result); } + /* [retval][out] */ VARIANT* result) { return WebScriptObject::evaluateWebScript(script, result); } - virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( + virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( /* [in] */ BSTR name) { return WebScriptObject::removeWebScriptKey(name); } - virtual HRESULT STDMETHODCALLTYPE stringRepresentation( + virtual HRESULT STDMETHODCALLTYPE stringRepresentation( /* [retval][out] */ BSTR* stringRepresentation) { return WebScriptObject::stringRepresentation(stringRepresentation); } - virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( /* [in] */ unsigned int index, - /* [retval][out] */ VARIANT *result) { return WebScriptObject::webScriptValueAtIndex(index, result); } + /* [retval][out] */ VARIANT* result) { return WebScriptObject::webScriptValueAtIndex(index, result); } - virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( /* [in] */ unsigned int index, /* [in] */ VARIANT val) { return WebScriptObject::setWebScriptValueAtIndex(index, val); } - virtual HRESULT STDMETHODCALLTYPE setException( + virtual HRESULT STDMETHODCALLTYPE setException( /* [in] */ BSTR description) { return WebScriptObject::setException(description); } }; -class DECLSPEC_UUID("062AEEE3-9E42-44DC-A8A9-236B216FE011") DOMNode : public DOMObject, public IDOMNode, public IDOMEventTarget -{ +class DECLSPEC_UUID("062AEEE3-9E42-44DC-A8A9-236B216FE011") DOMNode : public DOMObject, public IDOMNode, public IDOMEventTarget { protected: DOMNode(WebCore::Node* n); ~DOMNode(); @@ -93,149 +92,149 @@ public: virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMObject::Release(); } // IWebScriptObject - virtual HRESULT STDMETHODCALLTYPE throwException( + virtual HRESULT STDMETHODCALLTYPE throwException( /* [in] */ BSTR exceptionMessage, - /* [retval][out] */ BOOL *result) { return DOMObject::throwException(exceptionMessage, result); } + /* [retval][out] */ BOOL* result) { return DOMObject::throwException(exceptionMessage, result); } - virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( + virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( /* [in] */ BSTR name, /* [size_is][in] */ const VARIANT args[ ], /* [in] */ int cArgs, - /* [retval][out] */ VARIANT *result) { return DOMObject::callWebScriptMethod(name, args, cArgs, result); } + /* [retval][out] */ VARIANT* result) { return DOMObject::callWebScriptMethod(name, args, cArgs, result); } - virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( + virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( /* [in] */ BSTR script, - /* [retval][out] */ VARIANT *result) { return DOMObject::evaluateWebScript(script, result); } + /* [retval][out] */ VARIANT* result) { return DOMObject::evaluateWebScript(script, result); } - virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( + virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( /* [in] */ BSTR name) { return DOMObject::removeWebScriptKey(name); } - virtual HRESULT STDMETHODCALLTYPE stringRepresentation( + virtual HRESULT STDMETHODCALLTYPE stringRepresentation( /* [retval][out] */ BSTR* stringRepresentation) { return DOMObject::stringRepresentation(stringRepresentation); } - virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( /* [in] */ unsigned int index, - /* [retval][out] */ VARIANT *result) { return DOMObject::webScriptValueAtIndex(index, result); } + /* [retval][out] */ VARIANT* result) { return DOMObject::webScriptValueAtIndex(index, result); } - virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( /* [in] */ unsigned int index, /* [in] */ VARIANT val) { return DOMObject::setWebScriptValueAtIndex(index, val); } - virtual HRESULT STDMETHODCALLTYPE setException( + virtual HRESULT STDMETHODCALLTYPE setException( /* [in] */ BSTR description) { return DOMObject::setException(description); } // IDOMNode - virtual HRESULT STDMETHODCALLTYPE nodeName( - /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE nodeName( + /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE nodeValue( - /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE nodeValue( + /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE setNodeValue( + virtual HRESULT STDMETHODCALLTYPE setNodeValue( /* [in] */ BSTR value); - virtual HRESULT STDMETHODCALLTYPE nodeType( - /* [retval][out] */ unsigned short *result); + virtual HRESULT STDMETHODCALLTYPE nodeType( + /* [retval][out] */ unsigned short* result); - virtual HRESULT STDMETHODCALLTYPE parentNode( - /* [retval][out] */ IDOMNode **result); + virtual HRESULT STDMETHODCALLTYPE parentNode( + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE childNodes( - /* [retval][out] */ IDOMNodeList **result); + virtual HRESULT STDMETHODCALLTYPE childNodes( + /* [retval][out] */ IDOMNodeList** result); - virtual HRESULT STDMETHODCALLTYPE firstChild( - /* [retval][out] */ IDOMNode **result); + virtual HRESULT STDMETHODCALLTYPE firstChild( + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE lastChild( - /* [retval][out] */ IDOMNode **result); + virtual HRESULT STDMETHODCALLTYPE lastChild( + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE previousSibling( - /* [retval][out] */ IDOMNode **result); + virtual HRESULT STDMETHODCALLTYPE previousSibling( + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE nextSibling( - /* [retval][out] */ IDOMNode **result); + virtual HRESULT STDMETHODCALLTYPE nextSibling( + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE attributes( - /* [retval][out] */ IDOMNamedNodeMap **result); + virtual HRESULT STDMETHODCALLTYPE attributes( + /* [retval][out] */ IDOMNamedNodeMap** result); - virtual HRESULT STDMETHODCALLTYPE ownerDocument( - /* [retval][out] */ IDOMDocument **result); + virtual HRESULT STDMETHODCALLTYPE ownerDocument( + /* [retval][out] */ IDOMDocument** result); - virtual HRESULT STDMETHODCALLTYPE insertBefore( - /* [in] */ IDOMNode *newChild, - /* [in] */ IDOMNode *refChild, - /* [retval][out] */ IDOMNode **result); + virtual HRESULT STDMETHODCALLTYPE insertBefore( + /* [in] */ IDOMNode* newChild, + /* [in] */ IDOMNode* refChild, + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE replaceChild( - /* [in] */ IDOMNode *newChild, - /* [in] */ IDOMNode *oldChild, - /* [retval][out] */ IDOMNode **result); + virtual HRESULT STDMETHODCALLTYPE replaceChild( + /* [in] */ IDOMNode* newChild, + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE removeChild( - /* [in] */ IDOMNode *oldChild, - /* [retval][out] */ IDOMNode **result); + virtual HRESULT STDMETHODCALLTYPE removeChild( + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE appendChild( - /* [in] */ IDOMNode *oldChild, - /* [retval][out] */ IDOMNode **result); + virtual HRESULT STDMETHODCALLTYPE appendChild( + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE hasChildNodes( - /* [retval][out] */ BOOL *result); + virtual HRESULT STDMETHODCALLTYPE hasChildNodes( + /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE cloneNode( + virtual HRESULT STDMETHODCALLTYPE cloneNode( /* [in] */ BOOL deep, - /* [retval][out] */ IDOMNode **result); + /* [retval][out] */ IDOMNode** result); virtual HRESULT STDMETHODCALLTYPE normalize( void); - virtual HRESULT STDMETHODCALLTYPE isSupported( + virtual HRESULT STDMETHODCALLTYPE isSupported( /* [in] */ BSTR feature, /* [in] */ BSTR version, - /* [retval][out] */ BOOL *result); + /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE namespaceURI( - /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE namespaceURI( + /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE prefix( - /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE prefix( + /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE setPrefix( + virtual HRESULT STDMETHODCALLTYPE setPrefix( /* [in] */ BSTR prefix); - virtual HRESULT STDMETHODCALLTYPE localName( - /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE localName( + /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE hasAttributes( - /* [retval][out] */ BOOL *result); + virtual HRESULT STDMETHODCALLTYPE hasAttributes( + /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE isSameNode( + virtual HRESULT STDMETHODCALLTYPE isSameNode( /* [in] */ IDOMNode* other, /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE isEqualNode( + virtual HRESULT STDMETHODCALLTYPE isEqualNode( /* [in] */ IDOMNode* other, /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE textContent( + virtual HRESULT STDMETHODCALLTYPE textContent( /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE setTextContent( + virtual HRESULT STDMETHODCALLTYPE setTextContent( /* [in] */ BSTR text); // IDOMEventTarget - virtual HRESULT STDMETHODCALLTYPE addEventListener( + virtual HRESULT STDMETHODCALLTYPE addEventListener( /* [in] */ BSTR type, /* [in] */ IDOMEventListener *listener, /* [in] */ BOOL useCapture); - virtual HRESULT STDMETHODCALLTYPE removeEventListener( + virtual HRESULT STDMETHODCALLTYPE removeEventListener( /* [in] */ BSTR type, /* [in] */ IDOMEventListener *listener, /* [in] */ BOOL useCapture); - virtual HRESULT STDMETHODCALLTYPE dispatchEvent( + virtual HRESULT STDMETHODCALLTYPE dispatchEvent( /* [in] */ IDOMEvent *evt, - /* [retval][out] */ BOOL *result); + /* [retval][out] */ BOOL* result); // DOMNode WebCore::Node* node() const { return m_node; } @@ -244,8 +243,7 @@ protected: WebCore::Node* m_node; }; -class DOMNodeList : public DOMObject, public IDOMNodeList -{ +class DOMNodeList : public DOMObject, public IDOMNodeList { protected: DOMNodeList(WebCore::NodeList* l); ~DOMNodeList(); @@ -260,51 +258,50 @@ public: virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMObject::Release(); } // IWebScriptObject - virtual HRESULT STDMETHODCALLTYPE throwException( + virtual HRESULT STDMETHODCALLTYPE throwException( /* [in] */ BSTR exceptionMessage, - /* [retval][out] */ BOOL *result) { return DOMObject::throwException(exceptionMessage, result); } + /* [retval][out] */ BOOL* result) { return DOMObject::throwException(exceptionMessage, result); } - virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( + virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( /* [in] */ BSTR name, /* [size_is][in] */ const VARIANT args[ ], /* [in] */ int cArgs, - /* [retval][out] */ VARIANT *result) { return DOMObject::callWebScriptMethod(name, args, cArgs, result); } + /* [retval][out] */ VARIANT* result) { return DOMObject::callWebScriptMethod(name, args, cArgs, result); } - virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( + virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( /* [in] */ BSTR script, - /* [retval][out] */ VARIANT *result) { return DOMObject::evaluateWebScript(script, result); } + /* [retval][out] */ VARIANT* result) { return DOMObject::evaluateWebScript(script, result); } - virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( + virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( /* [in] */ BSTR name) { return DOMObject::removeWebScriptKey(name); } - virtual HRESULT STDMETHODCALLTYPE stringRepresentation( + virtual HRESULT STDMETHODCALLTYPE stringRepresentation( /* [retval][out] */ BSTR* stringRepresentation) { return DOMObject::stringRepresentation(stringRepresentation); } - virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( /* [in] */ unsigned int index, - /* [retval][out] */ VARIANT *result) { return DOMObject::webScriptValueAtIndex(index, result); } + /* [retval][out] */ VARIANT* result) { return DOMObject::webScriptValueAtIndex(index, result); } - virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( /* [in] */ unsigned int index, /* [in] */ VARIANT val) { return DOMObject::setWebScriptValueAtIndex(index, val); } - virtual HRESULT STDMETHODCALLTYPE setException( + virtual HRESULT STDMETHODCALLTYPE setException( /* [in] */ BSTR description) { return DOMObject::setException(description); } // IDOMNodeList - virtual HRESULT STDMETHODCALLTYPE item( + virtual HRESULT STDMETHODCALLTYPE item( /* [in] */ UINT index, - /* [retval][out] */ IDOMNode **result); + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE length( - /* [retval][out] */ UINT *result); + virtual HRESULT STDMETHODCALLTYPE length( + /* [retval][out] */ UINT* result); protected: WebCore::NodeList* m_nodeList; }; -class DOMDocument : public DOMNode, public IDOMDocument, public IDOMViewCSS, public IDOMDocumentEvent -{ +class DOMDocument : public DOMNode, public IDOMDocument, public IDOMViewCSS, public IDOMDocumentEvent { protected: DOMDocument(WebCore::Document* d); ~DOMDocument(); @@ -319,215 +316,215 @@ public: virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMNode::Release(); } // IWebScriptObject - virtual HRESULT STDMETHODCALLTYPE throwException( + virtual HRESULT STDMETHODCALLTYPE throwException( /* [in] */ BSTR exceptionMessage, - /* [retval][out] */ BOOL *result) { return DOMNode::throwException(exceptionMessage, result); } + /* [retval][out] */ BOOL* result) { return DOMNode::throwException(exceptionMessage, result); } - virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( + virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( /* [in] */ BSTR name, /* [size_is][in] */ const VARIANT args[ ], /* [in] */ int cArgs, - /* [retval][out] */ VARIANT *result) { return DOMNode::callWebScriptMethod(name, args, cArgs, result); } + /* [retval][out] */ VARIANT* result) { return DOMNode::callWebScriptMethod(name, args, cArgs, result); } - virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( + virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( /* [in] */ BSTR script, - /* [retval][out] */ VARIANT *result) { return DOMNode::evaluateWebScript(script, result); } + /* [retval][out] */ VARIANT* result) { return DOMNode::evaluateWebScript(script, result); } - virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( + virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( /* [in] */ BSTR name) { return DOMNode::removeWebScriptKey(name); } - virtual HRESULT STDMETHODCALLTYPE stringRepresentation( + virtual HRESULT STDMETHODCALLTYPE stringRepresentation( /* [retval][out] */ BSTR* stringRepresentation) { return DOMNode::stringRepresentation(stringRepresentation); } - virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( /* [in] */ unsigned int index, - /* [retval][out] */ VARIANT *result) { return DOMNode::webScriptValueAtIndex(index, result); } + /* [retval][out] */ VARIANT* result) { return DOMNode::webScriptValueAtIndex(index, result); } - virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( /* [in] */ unsigned int index, /* [in] */ VARIANT val) { return DOMNode::setWebScriptValueAtIndex(index, val); } - virtual HRESULT STDMETHODCALLTYPE setException( + virtual HRESULT STDMETHODCALLTYPE setException( /* [in] */ BSTR description) { return DOMNode::setException(description); } // IDOMNode - virtual HRESULT STDMETHODCALLTYPE nodeName( - /* [retval][out] */ BSTR *result) { return DOMNode::nodeName(result); } + virtual HRESULT STDMETHODCALLTYPE nodeName( + /* [retval][out] */ BSTR* result) { return DOMNode::nodeName(result); } - virtual HRESULT STDMETHODCALLTYPE nodeValue( - /* [retval][out] */ BSTR *result) { return DOMNode::nodeValue(result); } + virtual HRESULT STDMETHODCALLTYPE nodeValue( + /* [retval][out] */ BSTR* result) { return DOMNode::nodeValue(result); } - virtual HRESULT STDMETHODCALLTYPE setNodeValue( + virtual HRESULT STDMETHODCALLTYPE setNodeValue( /* [in] */ BSTR value) { return DOMNode::setNodeValue(value); } - virtual HRESULT STDMETHODCALLTYPE nodeType( - /* [retval][out] */ unsigned short *result) { return DOMNode::nodeType(result); } + virtual HRESULT STDMETHODCALLTYPE nodeType( + /* [retval][out] */ unsigned short* result) { return DOMNode::nodeType(result); } - virtual HRESULT STDMETHODCALLTYPE parentNode( - /* [retval][out] */ IDOMNode **result) { return DOMNode::parentNode(result); } + virtual HRESULT STDMETHODCALLTYPE parentNode( + /* [retval][out] */ IDOMNode** result) { return DOMNode::parentNode(result); } - virtual HRESULT STDMETHODCALLTYPE childNodes( - /* [retval][out] */ IDOMNodeList **result) { return DOMNode::childNodes(result); } + virtual HRESULT STDMETHODCALLTYPE childNodes( + /* [retval][out] */ IDOMNodeList** result) { return DOMNode::childNodes(result); } - virtual HRESULT STDMETHODCALLTYPE firstChild( - /* [retval][out] */ IDOMNode **result) { return DOMNode::firstChild(result); } + virtual HRESULT STDMETHODCALLTYPE firstChild( + /* [retval][out] */ IDOMNode** result) { return DOMNode::firstChild(result); } - virtual HRESULT STDMETHODCALLTYPE lastChild( - /* [retval][out] */ IDOMNode **result) { return DOMNode::lastChild(result); } + virtual HRESULT STDMETHODCALLTYPE lastChild( + /* [retval][out] */ IDOMNode** result) { return DOMNode::lastChild(result); } - virtual HRESULT STDMETHODCALLTYPE previousSibling( - /* [retval][out] */ IDOMNode **result) { return DOMNode::previousSibling(result); } + virtual HRESULT STDMETHODCALLTYPE previousSibling( + /* [retval][out] */ IDOMNode** result) { return DOMNode::previousSibling(result); } - virtual HRESULT STDMETHODCALLTYPE nextSibling( - /* [retval][out] */ IDOMNode **result) { return DOMNode::nextSibling(result); } + virtual HRESULT STDMETHODCALLTYPE nextSibling( + /* [retval][out] */ IDOMNode** result) { return DOMNode::nextSibling(result); } - virtual HRESULT STDMETHODCALLTYPE attributes( - /* [retval][out] */ IDOMNamedNodeMap **result) { return DOMNode::attributes(result); } + virtual HRESULT STDMETHODCALLTYPE attributes( + /* [retval][out] */ IDOMNamedNodeMap** result) { return DOMNode::attributes(result); } - virtual HRESULT STDMETHODCALLTYPE ownerDocument( - /* [retval][out] */ IDOMDocument **result) { return DOMNode::ownerDocument(result); } + virtual HRESULT STDMETHODCALLTYPE ownerDocument( + /* [retval][out] */ IDOMDocument** result) { return DOMNode::ownerDocument(result); } - virtual HRESULT STDMETHODCALLTYPE insertBefore( - /* [in] */ IDOMNode *newChild, - /* [in] */ IDOMNode *refChild, - /* [retval][out] */ IDOMNode **result) { return DOMNode::insertBefore(newChild, refChild, result); } + virtual HRESULT STDMETHODCALLTYPE insertBefore( + /* [in] */ IDOMNode* newChild, + /* [in] */ IDOMNode* refChild, + /* [retval][out] */ IDOMNode** result) { return DOMNode::insertBefore(newChild, refChild, result); } - virtual HRESULT STDMETHODCALLTYPE replaceChild( - /* [in] */ IDOMNode *newChild, - /* [in] */ IDOMNode *oldChild, - /* [retval][out] */ IDOMNode **result) { return DOMNode::replaceChild(newChild, oldChild, result); } + virtual HRESULT STDMETHODCALLTYPE replaceChild( + /* [in] */ IDOMNode* newChild, + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result) { return DOMNode::replaceChild(newChild, oldChild, result); } - virtual HRESULT STDMETHODCALLTYPE removeChild( - /* [in] */ IDOMNode *oldChild, - /* [retval][out] */ IDOMNode **result) { return DOMNode::removeChild(oldChild, result); } + virtual HRESULT STDMETHODCALLTYPE removeChild( + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result) { return DOMNode::removeChild(oldChild, result); } - virtual HRESULT STDMETHODCALLTYPE appendChild( - /* [in] */ IDOMNode *oldChild, - /* [retval][out] */ IDOMNode **result) { return DOMNode::appendChild(oldChild, result); } + virtual HRESULT STDMETHODCALLTYPE appendChild( + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result) { return DOMNode::appendChild(oldChild, result); } - virtual HRESULT STDMETHODCALLTYPE hasChildNodes( - /* [retval][out] */ BOOL *result) { return DOMNode::hasChildNodes(result); } + virtual HRESULT STDMETHODCALLTYPE hasChildNodes( + /* [retval][out] */ BOOL* result) { return DOMNode::hasChildNodes(result); } - virtual HRESULT STDMETHODCALLTYPE cloneNode( + virtual HRESULT STDMETHODCALLTYPE cloneNode( /* [in] */ BOOL deep, - /* [retval][out] */ IDOMNode **result) { return DOMNode::cloneNode(deep, result); } + /* [retval][out] */ IDOMNode** result) { return DOMNode::cloneNode(deep, result); } virtual HRESULT STDMETHODCALLTYPE normalize( void) { return DOMNode::normalize(); } - virtual HRESULT STDMETHODCALLTYPE isSupported( + virtual HRESULT STDMETHODCALLTYPE isSupported( /* [in] */ BSTR feature, /* [in] */ BSTR version, - /* [retval][out] */ BOOL *result) { return DOMNode::isSupported(feature, version, result); } + /* [retval][out] */ BOOL* result) { return DOMNode::isSupported(feature, version, result); } - virtual HRESULT STDMETHODCALLTYPE namespaceURI( - /* [retval][out] */ BSTR *result) { return DOMNode::namespaceURI(result); } + virtual HRESULT STDMETHODCALLTYPE namespaceURI( + /* [retval][out] */ BSTR* result) { return DOMNode::namespaceURI(result); } - virtual HRESULT STDMETHODCALLTYPE prefix( - /* [retval][out] */ BSTR *result) { return DOMNode::prefix(result); } + virtual HRESULT STDMETHODCALLTYPE prefix( + /* [retval][out] */ BSTR* result) { return DOMNode::prefix(result); } - virtual HRESULT STDMETHODCALLTYPE setPrefix( + virtual HRESULT STDMETHODCALLTYPE setPrefix( /* [in] */ BSTR prefix) { return DOMNode::setPrefix(prefix); } - virtual HRESULT STDMETHODCALLTYPE localName( - /* [retval][out] */ BSTR *result) { return DOMNode::localName(result); } + virtual HRESULT STDMETHODCALLTYPE localName( + /* [retval][out] */ BSTR* result) { return DOMNode::localName(result); } - virtual HRESULT STDMETHODCALLTYPE hasAttributes( - /* [retval][out] */ BOOL *result) { return DOMNode::hasAttributes(result); } + virtual HRESULT STDMETHODCALLTYPE hasAttributes( + /* [retval][out] */ BOOL* result) { return DOMNode::hasAttributes(result); } - virtual HRESULT STDMETHODCALLTYPE isSameNode( + virtual HRESULT STDMETHODCALLTYPE isSameNode( /* [in] */ IDOMNode* other, /* [retval][out] */ BOOL* result) { return DOMNode::isSameNode(other, result); } - virtual HRESULT STDMETHODCALLTYPE isEqualNode( + virtual HRESULT STDMETHODCALLTYPE isEqualNode( /* [in] */ IDOMNode* other, /* [retval][out] */ BOOL* result) { return DOMNode::isEqualNode(other, result); } - virtual HRESULT STDMETHODCALLTYPE textContent( + virtual HRESULT STDMETHODCALLTYPE textContent( /* [retval][out] */ BSTR* result) { return DOMNode::textContent(result); } - virtual HRESULT STDMETHODCALLTYPE setTextContent( + virtual HRESULT STDMETHODCALLTYPE setTextContent( /* [in] */ BSTR text) { return DOMNode::setTextContent(text); } // IDOMDocument - virtual HRESULT STDMETHODCALLTYPE doctype( - /* [retval][out] */ IDOMDocumentType **result); + virtual HRESULT STDMETHODCALLTYPE doctype( + /* [retval][out] */ IDOMDocumentType** result); - virtual HRESULT STDMETHODCALLTYPE implementation( - /* [retval][out] */ IDOMImplementation **result); + virtual HRESULT STDMETHODCALLTYPE implementation( + /* [retval][out] */ IDOMImplementation** result); - virtual HRESULT STDMETHODCALLTYPE documentElement( - /* [retval][out] */ IDOMElement **result); + virtual HRESULT STDMETHODCALLTYPE documentElement( + /* [retval][out] */ IDOMElement** result); - virtual HRESULT STDMETHODCALLTYPE createElement( + virtual HRESULT STDMETHODCALLTYPE createElement( /* [in] */ BSTR tagName, - /* [retval][out] */ IDOMElement **result); + /* [retval][out] */ IDOMElement** result); - virtual HRESULT STDMETHODCALLTYPE createDocumentFragment( - /* [retval][out] */ IDOMDocumentFragment **result); + virtual HRESULT STDMETHODCALLTYPE createDocumentFragment( + /* [retval][out] */ IDOMDocumentFragment** result); - virtual HRESULT STDMETHODCALLTYPE createTextNode( + virtual HRESULT STDMETHODCALLTYPE createTextNode( /* [in] */ BSTR data, - /* [retval][out] */ IDOMText **result); + /* [retval][out] */ IDOMText** result); - virtual HRESULT STDMETHODCALLTYPE createComment( + virtual HRESULT STDMETHODCALLTYPE createComment( /* [in] */ BSTR data, - /* [retval][out] */ IDOMComment **result); + /* [retval][out] */ IDOMComment** result); - virtual HRESULT STDMETHODCALLTYPE createCDATASection( + virtual HRESULT STDMETHODCALLTYPE createCDATASection( /* [in] */ BSTR data, - /* [retval][out] */ IDOMCDATASection **result); + /* [retval][out] */ IDOMCDATASection** result); - virtual HRESULT STDMETHODCALLTYPE createProcessingInstruction( + virtual HRESULT STDMETHODCALLTYPE createProcessingInstruction( /* [in] */ BSTR target, /* [in] */ BSTR data, - /* [retval][out] */ IDOMProcessingInstruction **result); + /* [retval][out] */ IDOMProcessingInstruction** result); - virtual HRESULT STDMETHODCALLTYPE createAttribute( + virtual HRESULT STDMETHODCALLTYPE createAttribute( /* [in] */ BSTR name, - /* [retval][out] */ IDOMAttr **result); + /* [retval][out] */ IDOMAttr** result); - virtual HRESULT STDMETHODCALLTYPE createEntityReference( + virtual HRESULT STDMETHODCALLTYPE createEntityReference( /* [in] */ BSTR name, - /* [retval][out] */ IDOMEntityReference **result); + /* [retval][out] */ IDOMEntityReference** result); - virtual HRESULT STDMETHODCALLTYPE getElementsByTagName( + virtual HRESULT STDMETHODCALLTYPE getElementsByTagName( /* [in] */ BSTR tagName, - /* [retval][out] */ IDOMNodeList **result); + /* [retval][out] */ IDOMNodeList** result); - virtual HRESULT STDMETHODCALLTYPE importNode( - /* [in] */ IDOMNode *importedNode, + virtual HRESULT STDMETHODCALLTYPE importNode( + /* [in] */ IDOMNode* importedNode, /* [in] */ BOOL deep, - /* [retval][out] */ IDOMNode **result); + /* [retval][out] */ IDOMNode** result); - virtual HRESULT STDMETHODCALLTYPE createElementNS( + virtual HRESULT STDMETHODCALLTYPE createElementNS( /* [in] */ BSTR namespaceURI, /* [in] */ BSTR qualifiedName, - /* [retval][out] */ IDOMElement **result); + /* [retval][out] */ IDOMElement** result); - virtual HRESULT STDMETHODCALLTYPE createAttributeNS( + virtual HRESULT STDMETHODCALLTYPE createAttributeNS( /* [in] */ BSTR namespaceURI, /* [in] */ BSTR qualifiedName, - /* [retval][out] */ IDOMAttr **result); + /* [retval][out] */ IDOMAttr** result); - virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS( + virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS( /* [in] */ BSTR namespaceURI, /* [in] */ BSTR localName, - /* [retval][out] */ IDOMNodeList **result); + /* [retval][out] */ IDOMNodeList** result); - virtual HRESULT STDMETHODCALLTYPE getElementById( + virtual HRESULT STDMETHODCALLTYPE getElementById( /* [in] */ BSTR elementId, - /* [retval][out] */ IDOMElement **result); + /* [retval][out] */ IDOMElement** result); // IDOMViewCSS - virtual HRESULT STDMETHODCALLTYPE getComputedStyle( - /* [in] */ IDOMElement *elt, + virtual HRESULT STDMETHODCALLTYPE getComputedStyle( + /* [in] */ IDOMElement* elt, /* [in] */ BSTR pseudoElt, - /* [retval][out] */ IDOMCSSStyleDeclaration **result); + /* [retval][out] */ IDOMCSSStyleDeclaration** result); // IDOMDocumentEvent - virtual HRESULT STDMETHODCALLTYPE createEvent( + virtual HRESULT STDMETHODCALLTYPE createEvent( /* [in] */ BSTR eventType, - /* [retval][out] */ IDOMEvent **result); + /* [retval][out] */ IDOMEvent** result); // DOMDocument WebCore::Document* document() { return m_document; } @@ -536,8 +533,7 @@ protected: WebCore::Document* m_document; }; -class DOMElement : public DOMNode, public IDOMElement, public IDOMElementPrivate, public IDOMNodeExtensions, public IDOMElementCSSInlineStyle, public IDOMElementExtensions -{ +class DOMElement : public DOMNode, public IDOMElement, public IDOMElementPrivate, public IDOMNodeExtensions, public IDOMElementCSSInlineStyle, public IDOMElementExtensions { protected: DOMElement(WebCore::Element* e); ~DOMElement(); @@ -551,225 +547,225 @@ public: virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMNode::Release(); } // IWebScriptObject - virtual HRESULT STDMETHODCALLTYPE throwException( + virtual HRESULT STDMETHODCALLTYPE throwException( /* [in] */ BSTR exceptionMessage, - /* [retval][out] */ BOOL *result) { return DOMNode::throwException(exceptionMessage, result); } + /* [retval][out] */ BOOL* result) { return DOMNode::throwException(exceptionMessage, result); } - virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( + virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( /* [in] */ BSTR name, /* [size_is][in] */ const VARIANT args[ ], /* [in] */ int cArgs, - /* [retval][out] */ VARIANT *result) { return DOMNode::callWebScriptMethod(name, args, cArgs, result); } + /* [retval][out] */ VARIANT* result) { return DOMNode::callWebScriptMethod(name, args, cArgs, result); } - virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( + virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( /* [in] */ BSTR script, - /* [retval][out] */ VARIANT *result) { return DOMNode::evaluateWebScript(script, result); } + /* [retval][out] */ VARIANT* result) { return DOMNode::evaluateWebScript(script, result); } - virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( + virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( /* [in] */ BSTR name) { return DOMNode::removeWebScriptKey(name); } - virtual HRESULT STDMETHODCALLTYPE stringRepresentation( + virtual HRESULT STDMETHODCALLTYPE stringRepresentation( /* [retval][out] */ BSTR* stringRepresentation) { return DOMNode::stringRepresentation(stringRepresentation); } - virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( /* [in] */ unsigned int index, - /* [retval][out] */ VARIANT *result) { return DOMNode::webScriptValueAtIndex(index, result); } + /* [retval][out] */ VARIANT* result) { return DOMNode::webScriptValueAtIndex(index, result); } - virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( + virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( /* [in] */ unsigned int index, /* [in] */ VARIANT val) { return DOMNode::setWebScriptValueAtIndex(index, val); } - virtual HRESULT STDMETHODCALLTYPE setException( + virtual HRESULT STDMETHODCALLTYPE setException( /* [in] */ BSTR description) { return DOMNode::setException(description); } // IDOMNode - virtual HRESULT STDMETHODCALLTYPE nodeName( - /* [retval][out] */ BSTR *result) { return DOMNode::nodeName(result); } + virtual HRESULT STDMETHODCALLTYPE nodeName( + /* [retval][out] */ BSTR* result) { return DOMNode::nodeName(result); } - virtual HRESULT STDMETHODCALLTYPE nodeValue( - /* [retval][out] */ BSTR *result) { return DOMNode::nodeValue(result); } + virtual HRESULT STDMETHODCALLTYPE nodeValue( + /* [retval][out] */ BSTR* result) { return DOMNode::nodeValue(result); } - virtual HRESULT STDMETHODCALLTYPE setNodeValue( + virtual HRESULT STDMETHODCALLTYPE setNodeValue( /* [in] */ BSTR value) { return DOMNode::setNodeValue(value); } - virtual HRESULT STDMETHODCALLTYPE nodeType( - /* [retval][out] */ unsigned short *result) { return DOMNode::nodeType(result); } + virtual HRESULT STDMETHODCALLTYPE nodeType( + /* [retval][out] */ unsigned short* result) { return DOMNode::nodeType(result); } - virtual HRESULT STDMETHODCALLTYPE parentNode( - /* [retval][out] */ IDOMNode **result) { return DOMNode::parentNode(result); } + virtual HRESULT STDMETHODCALLTYPE parentNode( + /* [retval][out] */ IDOMNode** result) { return DOMNode::parentNode(result); } - virtual HRESULT STDMETHODCALLTYPE childNodes( - /* [retval][out] */ IDOMNodeList **result) { return DOMNode::childNodes(result); } + virtual HRESULT STDMETHODCALLTYPE childNodes( + /* [retval][out] */ IDOMNodeList** result) { return DOMNode::childNodes(result); } - virtual HRESULT STDMETHODCALLTYPE firstChild( - /* [retval][out] */ IDOMNode **result) { return DOMNode::firstChild(result); } + virtual HRESULT STDMETHODCALLTYPE firstChild( + /* [retval][out] */ IDOMNode** result) { return DOMNode::firstChild(result); } - virtual HRESULT STDMETHODCALLTYPE lastChild( - /* [retval][out] */ IDOMNode **result) { return DOMNode::lastChild(result); } + virtual HRESULT STDMETHODCALLTYPE lastChild( + /* [retval][out] */ IDOMNode** result) { return DOMNode::lastChild(result); } - virtual HRESULT STDMETHODCALLTYPE previousSibling( - /* [retval][out] */ IDOMNode **result) { return DOMNode::previousSibling(result); } + virtual HRESULT STDMETHODCALLTYPE previousSibling( + /* [retval][out] */ IDOMNode** result) { return DOMNode::previousSibling(result); } - virtual HRESULT STDMETHODCALLTYPE nextSibling( - /* [retval][out] */ IDOMNode **result) { return DOMNode::nextSibling(result); } + virtual HRESULT STDMETHODCALLTYPE nextSibling( + /* [retval][out] */ IDOMNode** result) { return DOMNode::nextSibling(result); } - virtual HRESULT STDMETHODCALLTYPE attributes( - /* [retval][out] */ IDOMNamedNodeMap **result) { return DOMNode::attributes(result); } + virtual HRESULT STDMETHODCALLTYPE attributes( + /* [retval][out] */ IDOMNamedNodeMap** result) { return DOMNode::attributes(result); } - virtual HRESULT STDMETHODCALLTYPE ownerDocument( - /* [retval][out] */ IDOMDocument **result) { return DOMNode::ownerDocument(result); } + virtual HRESULT STDMETHODCALLTYPE ownerDocument( + /* [retval][out] */ IDOMDocument** result) { return DOMNode::ownerDocument(result); } - virtual HRESULT STDMETHODCALLTYPE insertBefore( - /* [in] */ IDOMNode *newChild, - /* [in] */ IDOMNode *refChild, - /* [retval][out] */ IDOMNode **result) { return DOMNode::insertBefore(newChild, refChild, result); } + virtual HRESULT STDMETHODCALLTYPE insertBefore( + /* [in] */ IDOMNode* newChild, + /* [in] */ IDOMNode* refChild, + /* [retval][out] */ IDOMNode** result) { return DOMNode::insertBefore(newChild, refChild, result); } - virtual HRESULT STDMETHODCALLTYPE replaceChild( - /* [in] */ IDOMNode *newChild, - /* [in] */ IDOMNode *oldChild, - /* [retval][out] */ IDOMNode **result) { return DOMNode::replaceChild(newChild, oldChild, result); } + virtual HRESULT STDMETHODCALLTYPE replaceChild( + /* [in] */ IDOMNode* newChild, + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result) { return DOMNode::replaceChild(newChild, oldChild, result); } - virtual HRESULT STDMETHODCALLTYPE removeChild( - /* [in] */ IDOMNode *oldChild, - /* [retval][out] */ IDOMNode **result) { return DOMNode::removeChild(oldChild, result); } + virtual HRESULT STDMETHODCALLTYPE removeChild( + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result) { return DOMNode::removeChild(oldChild, result); } - virtual HRESULT STDMETHODCALLTYPE appendChild( - /* [in] */ IDOMNode *oldChild, - /* [retval][out] */ IDOMNode **result) { return DOMNode::appendChild(oldChild, result); } + virtual HRESULT STDMETHODCALLTYPE appendChild( + /* [in] */ IDOMNode* oldChild, + /* [retval][out] */ IDOMNode** result) { return DOMNode::appendChild(oldChild, result); } - virtual HRESULT STDMETHODCALLTYPE hasChildNodes( - /* [retval][out] */ BOOL *result) { return DOMNode::hasChildNodes(result); } + virtual HRESULT STDMETHODCALLTYPE hasChildNodes( + /* [retval][out] */ BOOL* result) { return DOMNode::hasChildNodes(result); } - virtual HRESULT STDMETHODCALLTYPE cloneNode( + virtual HRESULT STDMETHODCALLTYPE cloneNode( /* [in] */ BOOL deep, - /* [retval][out] */ IDOMNode **result) { return DOMNode::cloneNode(deep, result); } + /* [retval][out] */ IDOMNode** result) { return DOMNode::cloneNode(deep, result); } virtual HRESULT STDMETHODCALLTYPE normalize( void) { return DOMNode::normalize(); } - virtual HRESULT STDMETHODCALLTYPE isSupported( + virtual HRESULT STDMETHODCALLTYPE isSupported( /* [in] */ BSTR feature, /* [in] */ BSTR version, - /* [retval][out] */ BOOL *result) { return DOMNode::isSupported(feature, version, result); } + /* [retval][out] */ BOOL* result) { return DOMNode::isSupported(feature, version, result); } - virtual HRESULT STDMETHODCALLTYPE namespaceURI( - /* [retval][out] */ BSTR *result) { return DOMNode::namespaceURI(result); } + virtual HRESULT STDMETHODCALLTYPE namespaceURI( + /* [retval][out] */ BSTR* result) { return DOMNode::namespaceURI(result); } - virtual HRESULT STDMETHODCALLTYPE prefix( - /* [retval][out] */ BSTR *result) { return DOMNode::prefix(result); } + virtual HRESULT STDMETHODCALLTYPE prefix( + /* [retval][out] */ BSTR* result) { return DOMNode::prefix(result); } - virtual HRESULT STDMETHODCALLTYPE setPrefix( + virtual HRESULT STDMETHODCALLTYPE setPrefix( /* [in] */ BSTR prefix) { return DOMNode::setPrefix(prefix); } - virtual HRESULT STDMETHODCALLTYPE localName( - /* [retval][out] */ BSTR *result) { return DOMNode::localName(result); } + virtual HRESULT STDMETHODCALLTYPE localName( + /* [retval][out] */ BSTR* result) { return DOMNode::localName(result); } - virtual HRESULT STDMETHODCALLTYPE hasAttributes( - /* [retval][out] */ BOOL *result) { return DOMNode::hasAttributes(result); } + virtual HRESULT STDMETHODCALLTYPE hasAttributes( + /* [retval][out] */ BOOL* result) { return DOMNode::hasAttributes(result); } - virtual HRESULT STDMETHODCALLTYPE isSameNode( + virtual HRESULT STDMETHODCALLTYPE isSameNode( /* [in] */ IDOMNode* other, /* [retval][out] */ BOOL* result) { return DOMNode::isSameNode(other, result); } - virtual HRESULT STDMETHODCALLTYPE isEqualNode( + virtual HRESULT STDMETHODCALLTYPE isEqualNode( /* [in] */ IDOMNode* other, /* [retval][out] */ BOOL* result) { return DOMNode::isEqualNode(other, result); } - virtual HRESULT STDMETHODCALLTYPE textContent( + virtual HRESULT STDMETHODCALLTYPE textContent( /* [retval][out] */ BSTR* result) { return DOMNode::textContent(result); } - virtual HRESULT STDMETHODCALLTYPE setTextContent( + virtual HRESULT STDMETHODCALLTYPE setTextContent( /* [in] */ BSTR text) { return DOMNode::setTextContent(text); } // IDOMElement - virtual HRESULT STDMETHODCALLTYPE tagName( - /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE tagName( + /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE getAttribute( + virtual HRESULT STDMETHODCALLTYPE getAttribute( /* [in] */ BSTR name, - /* [retval][out] */ BSTR *result); + /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE setAttribute( + virtual HRESULT STDMETHODCALLTYPE setAttribute( /* [in] */ BSTR name, /* [in] */ BSTR value); - virtual HRESULT STDMETHODCALLTYPE removeAttribute( + virtual HRESULT STDMETHODCALLTYPE removeAttribute( /* [in] */ BSTR name); - virtual HRESULT STDMETHODCALLTYPE getAttributeNode( + virtual HRESULT STDMETHODCALLTYPE getAttributeNode( /* [in] */ BSTR name, - /* [retval][out] */ IDOMAttr **result); + /* [retval][out] */ IDOMAttr** result); - virtual HRESULT STDMETHODCALLTYPE setAttributeNode( + virtual HRESULT STDMETHODCALLTYPE setAttributeNode( /* [in] */ IDOMAttr *newAttr, - /* [retval][out] */ IDOMAttr **result); + /* [retval][out] */ IDOMAttr** result); - virtual HRESULT STDMETHODCALLTYPE removeAttributeNode( + virtual HRESULT STDMETHODCALLTYPE removeAttributeNode( /* [in] */ IDOMAttr *oldAttr, - /* [retval][out] */ IDOMAttr **result); + /* [retval][out] */ IDOMAttr** result); - virtual HRESULT STDMETHODCALLTYPE getElementsByTagName( + virtual HRESULT STDMETHODCALLTYPE getElementsByTagName( /* [in] */ BSTR name, - /* [retval][out] */ IDOMNodeList **result); + /* [retval][out] */ IDOMNodeList** result); - virtual HRESULT STDMETHODCALLTYPE getAttributeNS( + virtual HRESULT STDMETHODCALLTYPE getAttributeNS( /* [in] */ BSTR namespaceURI, /* [in] */ BSTR localName, - /* [retval][out] */ BSTR *result); + /* [retval][out] */ BSTR* result); - virtual HRESULT STDMETHODCALLTYPE setAttributeNS( + virtual HRESULT STDMETHODCALLTYPE setAttributeNS( /* [in] */ BSTR namespaceURI, /* [in] */ BSTR qualifiedName, /* [in] */ BSTR value); - virtual HRESULT STDMETHODCALLTYPE removeAttributeNS( + virtual HRESULT STDMETHODCALLTYPE removeAttributeNS( /* [in] */ BSTR namespaceURI, /* [in] */ BSTR localName); - virtual HRESULT STDMETHODCALLTYPE getAttributeNodeNS( + virtual HRESULT STDMETHODCALLTYPE getAttributeNodeNS( /* [in] */ BSTR namespaceURI, /* [in] */ BSTR localName, - /* [retval][out] */ IDOMAttr **result); + /* [retval][out] */ IDOMAttr** result); - virtual HRESULT STDMETHODCALLTYPE setAttributeNodeNS( + virtual HRESULT STDMETHODCALLTYPE setAttributeNodeNS( /* [in] */ IDOMAttr *newAttr, - /* [retval][out] */ IDOMAttr **result); + /* [retval][out] */ IDOMAttr** result); - virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS( + virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS( /* [in] */ BSTR namespaceURI, /* [in] */ BSTR localName, - /* [retval][out] */ IDOMNodeList **result); + /* [retval][out] */ IDOMNodeList** result); - virtual HRESULT STDMETHODCALLTYPE hasAttribute( + virtual HRESULT STDMETHODCALLTYPE hasAttribute( /* [in] */ BSTR name, - /* [retval][out] */ BOOL *result); + /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE hasAttributeNS( + virtual HRESULT STDMETHODCALLTYPE hasAttributeNS( /* [in] */ BSTR namespaceURI, /* [in] */ BSTR localName, - /* [retval][out] */ BOOL *result); + /* [retval][out] */ BOOL* result); virtual HRESULT STDMETHODCALLTYPE focus( void); virtual HRESULT STDMETHODCALLTYPE blur( void); // IDOMNodeExtensions - virtual HRESULT STDMETHODCALLTYPE boundingBox( + virtual HRESULT STDMETHODCALLTYPE boundingBox( /* [retval][out] */ LPRECT rect); - virtual HRESULT STDMETHODCALLTYPE lineBoxRects( + virtual HRESULT STDMETHODCALLTYPE lineBoxRects( /* [size_is][in] */ RECT* rects, /* [in] */ int cRects); // IDOMElementPrivate - virtual HRESULT STDMETHODCALLTYPE coreElement( + virtual HRESULT STDMETHODCALLTYPE coreElement( void** element); - virtual HRESULT STDMETHODCALLTYPE isEqual( - /* [in] */ IDOMElement *other, - /* [retval][out] */ BOOL *result); + virtual HRESULT STDMETHODCALLTYPE isEqual( + /* [in] */ IDOMElement* other, + /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE isFocused( - /* [retval][out] */ BOOL *result); + virtual HRESULT STDMETHODCALLTYPE isFocused( + /* [retval][out] */ BOOL* result); virtual HRESULT STDMETHODCALLTYPE innerText( /* [retval][out] */ BSTR* result); @@ -781,53 +777,53 @@ public: /* [retval][out] */ HBITMAP* image); // IDOMElementCSSInlineStyle - virtual HRESULT STDMETHODCALLTYPE style( - /* [retval][out] */ IDOMCSSStyleDeclaration **result); + virtual HRESULT STDMETHODCALLTYPE style( + /* [retval][out] */ IDOMCSSStyleDeclaration** result); // IDOMElementExtensions - virtual HRESULT STDMETHODCALLTYPE offsetLeft( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE offsetLeft( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE offsetTop( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE offsetTop( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE offsetWidth( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE offsetWidth( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE offsetHeight( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE offsetHeight( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE offsetParent( - /* [retval][out] */ IDOMElement **result); + virtual HRESULT STDMETHODCALLTYPE offsetParent( + /* [retval][out] */ IDOMElement** result); - virtual HRESULT STDMETHODCALLTYPE clientWidth( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE clientWidth( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE clientHeight( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE clientHeight( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE scrollLeft( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE scrollLeft( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE setScrollLeft( + virtual HRESULT STDMETHODCALLTYPE setScrollLeft( /* [in] */ int newScrollLeft); - virtual HRESULT STDMETHODCALLTYPE scrollTop( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE scrollTop( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE setScrollTop( + virtual HRESULT STDMETHODCALLTYPE setScrollTop( /* [in] */ int newScrollTop); - virtual HRESULT STDMETHODCALLTYPE scrollWidth( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE scrollWidth( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE scrollHeight( - /* [retval][out] */ int *result); + virtual HRESULT STDMETHODCALLTYPE scrollHeight( + /* [retval][out] */ int* result); - virtual HRESULT STDMETHODCALLTYPE scrollIntoView( + virtual HRESULT STDMETHODCALLTYPE scrollIntoView( /* [in] */ BOOL alignWithTop); - virtual HRESULT STDMETHODCALLTYPE scrollIntoViewIfNeeded( + virtual HRESULT STDMETHODCALLTYPE scrollIntoViewIfNeeded( /* [in] */ BOOL centerIfNeeded); // DOMElement diff --git a/WebKit/win/DOMHTMLClasses.cpp b/WebKit/win/DOMHTMLClasses.cpp index 4889ba9..f9634ff 100644 --- a/WebKit/win/DOMHTMLClasses.cpp +++ b/WebKit/win/DOMHTMLClasses.cpp @@ -27,6 +27,7 @@ #include "WebKitDLL.h" #include "DOMHTMLClasses.h" #include "COMPtr.h" +#include "WebFrame.h" #pragma warning(push, 0) #include <WebCore/BString.h> @@ -36,6 +37,7 @@ #include <WebCore/HTMLCollection.h> #include <WebCore/HTMLDocument.h> #include <WebCore/HTMLFormElement.h> +#include <WebCore/HTMLIFrameElement.h> #include <WebCore/HTMLInputElement.h> #include <WebCore/HTMLNames.h> #include <WebCore/HTMLOptionElement.h> @@ -1587,3 +1589,33 @@ HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::isUserEdited( *result = TRUE; return S_OK; } + +// DOMHTMLIFrameElement - IUnknown -------------------------------------------------- + +HRESULT STDMETHODCALLTYPE DOMHTMLIFrameElement::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualGUID(riid, IID_IDOMHTMLIFrameElement)) + *ppvObject = static_cast<IDOMHTMLIFrameElement*>(this); + else + return DOMHTMLElement::QueryInterface(riid, ppvObject); + + AddRef(); + return S_OK; +} + +// DOMHTMLIFrameElement ------------------------------------------------------------- + +HRESULT STDMETHODCALLTYPE DOMHTMLIFrameElement::contentFrame( + /* [retval][out] */ IWebFrame **result) +{ + if (!result) + return E_POINTER; + *result = 0; + ASSERT(m_element && m_element->hasTagName(iframeTag)); + HTMLIFrameElement* iFrameElement = static_cast<HTMLIFrameElement*>(m_element); + COMPtr<IWebFrame> webFrame = kit(iFrameElement->contentFrame()); + if (!webFrame) + return E_FAIL; + return webFrame.copyRefTo(result); +} diff --git a/WebKit/win/DOMHTMLClasses.h b/WebKit/win/DOMHTMLClasses.h index f520c3c..baeecc9 100644 --- a/WebKit/win/DOMHTMLClasses.h +++ b/WebKit/win/DOMHTMLClasses.h @@ -2356,4 +2356,266 @@ public: /* [retval][out] */ BOOL *result); }; +class DOMHTMLIFrameElement : public DOMHTMLElement, public IDOMHTMLIFrameElement +{ +protected: + DOMHTMLIFrameElement(); +public: + DOMHTMLIFrameElement(WebCore::Element* e) : DOMHTMLElement(e) {} + + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(void) { return DOMHTMLElement::AddRef(); } + virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMHTMLElement::Release(); } + + // IWebScriptObject + virtual HRESULT STDMETHODCALLTYPE throwException( + /* [in] */ BSTR exceptionMessage, + /* [retval][out] */ BOOL *result) { return DOMHTMLElement::throwException(exceptionMessage, result); } + + virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod( + /* [in] */ BSTR name, + /* [size_is][in] */ const VARIANT args[ ], + /* [in] */ int cArgs, + /* [retval][out] */ VARIANT *result) { return DOMHTMLElement::callWebScriptMethod(name, args, cArgs, result); } + + virtual HRESULT STDMETHODCALLTYPE evaluateWebScript( + /* [in] */ BSTR script, + /* [retval][out] */ VARIANT *result) { return DOMHTMLElement::evaluateWebScript(script, result); } + + virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey( + /* [in] */ BSTR name) { return DOMHTMLElement::removeWebScriptKey(name); } + + virtual HRESULT STDMETHODCALLTYPE stringRepresentation( + /* [retval][out] */ BSTR* stringRepresentation) { return DOMHTMLElement::stringRepresentation(stringRepresentation); } + + virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex( + /* [in] */ unsigned int index, + /* [retval][out] */ VARIANT *result) { return DOMHTMLElement::webScriptValueAtIndex(index, result); } + + virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex( + /* [in] */ unsigned int index, + /* [in] */ VARIANT val) { return DOMHTMLElement::setWebScriptValueAtIndex(index, val); } + + virtual HRESULT STDMETHODCALLTYPE setException( + /* [in] */ BSTR description) { return DOMHTMLElement::setException(description); } + + // IDOMNode + virtual HRESULT STDMETHODCALLTYPE nodeName( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::nodeName(result); } + + virtual HRESULT STDMETHODCALLTYPE nodeValue( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::nodeValue(result); } + + virtual HRESULT STDMETHODCALLTYPE setNodeValue( + /* [in] */ BSTR value) { return DOMHTMLElement::setNodeValue(value); } + + virtual HRESULT STDMETHODCALLTYPE nodeType( + /* [retval][out] */ unsigned short *result) { return DOMHTMLElement::nodeType(result); } + + virtual HRESULT STDMETHODCALLTYPE parentNode( + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::parentNode(result); } + + virtual HRESULT STDMETHODCALLTYPE childNodes( + /* [retval][out] */ IDOMNodeList **result) { return DOMHTMLElement::childNodes(result); } + + virtual HRESULT STDMETHODCALLTYPE firstChild( + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::firstChild(result); } + + virtual HRESULT STDMETHODCALLTYPE lastChild( + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::lastChild(result); } + + virtual HRESULT STDMETHODCALLTYPE previousSibling( + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::previousSibling(result); } + + virtual HRESULT STDMETHODCALLTYPE nextSibling( + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::nextSibling(result); } + + virtual HRESULT STDMETHODCALLTYPE attributes( + /* [retval][out] */ IDOMNamedNodeMap **result) { return DOMHTMLElement::attributes(result); } + + virtual HRESULT STDMETHODCALLTYPE ownerDocument( + /* [retval][out] */ IDOMDocument **result) { return DOMHTMLElement::ownerDocument(result); } + + virtual HRESULT STDMETHODCALLTYPE insertBefore( + /* [in] */ IDOMNode *newChild, + /* [in] */ IDOMNode *refChild, + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::insertBefore(newChild, refChild, result); } + + virtual HRESULT STDMETHODCALLTYPE replaceChild( + /* [in] */ IDOMNode *newChild, + /* [in] */ IDOMNode *oldChild, + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::replaceChild(newChild, oldChild, result); } + + virtual HRESULT STDMETHODCALLTYPE removeChild( + /* [in] */ IDOMNode *oldChild, + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::removeChild(oldChild, result); } + + virtual HRESULT STDMETHODCALLTYPE appendChild( + /* [in] */ IDOMNode *oldChild, + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::appendChild(oldChild, result); } + + virtual HRESULT STDMETHODCALLTYPE hasChildNodes( + /* [retval][out] */ BOOL *result) { return DOMHTMLElement::hasChildNodes(result); } + + virtual HRESULT STDMETHODCALLTYPE cloneNode( + /* [in] */ BOOL deep, + /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::cloneNode(deep, result); } + + virtual HRESULT STDMETHODCALLTYPE normalize( void) { return DOMHTMLElement::normalize(); } + + virtual HRESULT STDMETHODCALLTYPE isSupported( + /* [in] */ BSTR feature, + /* [in] */ BSTR version, + /* [retval][out] */ BOOL *result) { return DOMHTMLElement::isSupported(feature, version, result); } + + virtual HRESULT STDMETHODCALLTYPE namespaceURI( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::namespaceURI(result); } + + virtual HRESULT STDMETHODCALLTYPE prefix( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::prefix(result); } + + virtual HRESULT STDMETHODCALLTYPE setPrefix( + /* [in] */ BSTR prefix) { return DOMHTMLElement::setPrefix(prefix); } + + virtual HRESULT STDMETHODCALLTYPE localName( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::localName(result); } + + virtual HRESULT STDMETHODCALLTYPE hasAttributes( + /* [retval][out] */ BOOL *result) { return DOMHTMLElement::hasAttributes(result); } + + virtual HRESULT STDMETHODCALLTYPE isSameNode( + /* [in] */ IDOMNode* other, + /* [retval][out] */ BOOL* result) { return DOMHTMLElement::isSameNode(other, result); } + + virtual HRESULT STDMETHODCALLTYPE isEqualNode( + /* [in] */ IDOMNode* other, + /* [retval][out] */ BOOL* result) { return DOMHTMLElement::isEqualNode(other, result); } + + virtual HRESULT STDMETHODCALLTYPE textContent( + /* [retval][out] */ BSTR* result) { return DOMHTMLElement::textContent(result); } + + virtual HRESULT STDMETHODCALLTYPE setTextContent( + /* [in] */ BSTR text) { return DOMHTMLElement::setTextContent(text); } + + // IDOMElement + virtual HRESULT STDMETHODCALLTYPE tagName( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::tagName(result); } + + virtual HRESULT STDMETHODCALLTYPE getAttribute( + /* [in] */ BSTR name, + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::getAttribute(name, result); } + + virtual HRESULT STDMETHODCALLTYPE setAttribute( + /* [in] */ BSTR name, + /* [in] */ BSTR value) { return DOMHTMLElement::setAttribute(name, value); } + + virtual HRESULT STDMETHODCALLTYPE removeAttribute( + /* [in] */ BSTR name) { return DOMHTMLElement::removeAttribute(name); } + + virtual HRESULT STDMETHODCALLTYPE getAttributeNode( + /* [in] */ BSTR name, + /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::getAttributeNode(name, result); } + + virtual HRESULT STDMETHODCALLTYPE setAttributeNode( + /* [in] */ IDOMAttr *newAttr, + /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::setAttributeNode(newAttr, result); } + + virtual HRESULT STDMETHODCALLTYPE removeAttributeNode( + /* [in] */ IDOMAttr *oldAttr, + /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::removeAttributeNode(oldAttr, result); } + + virtual HRESULT STDMETHODCALLTYPE getElementsByTagName( + /* [in] */ BSTR name, + /* [retval][out] */ IDOMNodeList **result) { return DOMHTMLElement::getElementsByTagName(name, result); } + + virtual HRESULT STDMETHODCALLTYPE getAttributeNS( + /* [in] */ BSTR namespaceURI, + /* [in] */ BSTR localName, + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::getAttributeNS(namespaceURI, localName, result); } + + virtual HRESULT STDMETHODCALLTYPE setAttributeNS( + /* [in] */ BSTR namespaceURI, + /* [in] */ BSTR qualifiedName, + /* [in] */ BSTR value) { return DOMHTMLElement::setAttributeNS(namespaceURI, qualifiedName, value); } + + virtual HRESULT STDMETHODCALLTYPE removeAttributeNS( + /* [in] */ BSTR namespaceURI, + /* [in] */ BSTR localName) { return DOMHTMLElement::removeAttributeNS(namespaceURI, localName); } + + virtual HRESULT STDMETHODCALLTYPE getAttributeNodeNS( + /* [in] */ BSTR namespaceURI, + /* [in] */ BSTR localName, + /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::getAttributeNodeNS(namespaceURI, localName, result); } + + virtual HRESULT STDMETHODCALLTYPE setAttributeNodeNS( + /* [in] */ IDOMAttr *newAttr, + /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::setAttributeNodeNS(newAttr, result); } + + virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS( + /* [in] */ BSTR namespaceURI, + /* [in] */ BSTR localName, + /* [retval][out] */ IDOMNodeList **result) { return DOMHTMLElement::getElementsByTagNameNS(namespaceURI, localName, result); } + + virtual HRESULT STDMETHODCALLTYPE hasAttribute( + /* [in] */ BSTR name, + /* [retval][out] */ BOOL *result) { return DOMHTMLElement::hasAttribute(name, result); } + + virtual HRESULT STDMETHODCALLTYPE hasAttributeNS( + /* [in] */ BSTR namespaceURI, + /* [in] */ BSTR localName, + /* [retval][out] */ BOOL *result) { return DOMHTMLElement::hasAttributeNS(namespaceURI, localName, result); } + + virtual HRESULT STDMETHODCALLTYPE focus( void) { return DOMHTMLElement::focus(); } + + virtual HRESULT STDMETHODCALLTYPE blur( void) { return DOMHTMLElement::blur(); } + + // IDOMHTMLElement + virtual HRESULT STDMETHODCALLTYPE idName( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::idName(result); } + + virtual HRESULT STDMETHODCALLTYPE setIdName( + /* [in] */ BSTR idName) { return DOMHTMLElement::setIdName(idName); } + + virtual HRESULT STDMETHODCALLTYPE title( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::title(result); } + + virtual HRESULT STDMETHODCALLTYPE setTitle( + /* [in] */ BSTR title) { return DOMHTMLElement::setTitle(title); } + + virtual HRESULT STDMETHODCALLTYPE lang( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::lang(result); } + + virtual HRESULT STDMETHODCALLTYPE setLang( + /* [in] */ BSTR lang) { return DOMHTMLElement::setLang(lang); } + + virtual HRESULT STDMETHODCALLTYPE dir( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::dir(result); } + + virtual HRESULT STDMETHODCALLTYPE setDir( + /* [in] */ BSTR dir) { return DOMHTMLElement::setDir(dir); } + + virtual HRESULT STDMETHODCALLTYPE className( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::className(result); } + + virtual HRESULT STDMETHODCALLTYPE setClassName( + /* [in] */ BSTR className) { return DOMHTMLElement::setClassName(className); } + + virtual HRESULT STDMETHODCALLTYPE innerHTML( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::innerHTML(result); } + + virtual HRESULT STDMETHODCALLTYPE setInnerHTML( + /* [in] */ BSTR html) { return DOMHTMLElement::setInnerHTML(html); } + + virtual HRESULT STDMETHODCALLTYPE innerText( + /* [retval][out] */ BSTR *result) { return DOMHTMLElement::innerText(result); } + + virtual HRESULT STDMETHODCALLTYPE setInnerText( + /* [in] */ BSTR text) { return DOMHTMLElement::setInnerText(text); } + + // IDOMHTMLIFrameElement + virtual HRESULT STDMETHODCALLTYPE contentFrame( + /* [retval][out] */ IWebFrame **result); +}; + #endif diff --git a/WebKit/win/ForEachCoClass.h b/WebKit/win/ForEachCoClass.h index ab7182d..02aa097 100644 --- a/WebKit/win/ForEachCoClass.h +++ b/WebKit/win/ForEachCoClass.h @@ -66,6 +66,7 @@ macro(WebScriptWorld) \ macro(WebGeolocationPosition) \ macro(WebSerializedJSValue) \ + macro(WebUserContentURLPattern) \ // end of macro // Everything below this point is deprecated. Please do not use. diff --git a/WebKit/win/FullscreenVideoController.cpp b/WebKit/win/FullscreenVideoController.cpp index dbfc794..884f46a 100644 --- a/WebKit/win/FullscreenVideoController.cpp +++ b/WebKit/win/FullscreenVideoController.cpp @@ -226,12 +226,12 @@ void FullscreenVideoController::enterFullscreen() void FullscreenVideoController::exitFullscreen() { + SetWindowLongPtr(m_hudWindow, 0, 0); if (movie()) movie()->exitFullscreen(); + ASSERT(!IsWindow(m_hudWindow)); m_videoWindow = 0; - SetWindowLongPtr(m_hudWindow, 0, 0); - DestroyWindow(m_hudWindow); m_hudWindow = 0; } @@ -368,9 +368,9 @@ void FullscreenVideoController::createHUDWindow() registerHUDWindowClass(); - m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_TOOLWINDOW, + m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW, fullscreenVideeoHUDWindowClassName, 0, WS_POPUP | WS_VISIBLE, - m_hudPosition.x(), m_hudPosition.y(), 0, 0, 0, 0, gInstance, 0); + m_hudPosition.x(), m_hudPosition.y(), 0, 0, m_videoWindow, 0, gInstance, 0); ASSERT(::IsWindow(m_hudWindow)); SetWindowLongPtr(m_hudWindow, 0, reinterpret_cast<LONG_PTR>(this)); @@ -513,7 +513,7 @@ void FullscreenVideoController::timerFired(Timer<FullscreenVideoController>*) void FullscreenVideoController::onMouseDown(const IntPoint& point) { - IntPoint convertedPoint(fullScreenToHUDCoordinates(point)); + IntPoint convertedPoint(fullscreenToHUDCoordinates(point)); // Don't bother hit testing if we're outside the bounds of the window if (convertedPoint.x() < 0 || convertedPoint.x() >= windowWidth || convertedPoint.y() < 0 || convertedPoint.y() >= windowHeight) @@ -552,7 +552,7 @@ void FullscreenVideoController::onMouseDown(const IntPoint& point) void FullscreenVideoController::onMouseMove(const IntPoint& point) { - IntPoint convertedPoint(fullScreenToHUDCoordinates(point)); + IntPoint convertedPoint(fullscreenToHUDCoordinates(point)); if (m_hitWidget) { m_hitWidget->drag(convertedPoint, false); @@ -567,7 +567,7 @@ void FullscreenVideoController::onMouseMove(const IntPoint& point) void FullscreenVideoController::onMouseUp(const IntPoint& point) { - IntPoint convertedPoint(fullScreenToHUDCoordinates(point)); + IntPoint convertedPoint(fullscreenToHUDCoordinates(point)); m_movingWindow = false; if (m_hitWidget) { diff --git a/WebKit/win/FullscreenVideoController.h b/WebKit/win/FullscreenVideoController.h index b39e30c..60145ad 100644 --- a/WebKit/win/FullscreenVideoController.h +++ b/WebKit/win/FullscreenVideoController.h @@ -128,7 +128,7 @@ private: void beginScrubbing(); void endScrubbing(); - WebCore::IntPoint fullScreenToHUDCoordinates(const WebCore::IntPoint& point) const + WebCore::IntPoint fullscreenToHUDCoordinates(const WebCore::IntPoint& point) const { return WebCore::IntPoint(point.x()- m_hudPosition.x(), point.y() - m_hudPosition.y()); } diff --git a/WebKit/win/Interfaces/DOMHTML.idl b/WebKit/win/Interfaces/DOMHTML.idl index 7ccb682..0ee651b 100644 --- a/WebKit/win/Interfaces/DOMHTML.idl +++ b/WebKit/win/Interfaces/DOMHTML.idl @@ -37,6 +37,7 @@ interface IDOMDocument; interface IDOMElement; interface IDOMNode; interface IDOMNodeList; +interface IWebFrame; /* @interface DOMHTMLCollection : DOMObject @@ -933,3 +934,17 @@ interface IDOMHTMLTextAreaElement : IDOMHTMLElement */ HRESULT select(); } + +/* + @interface DOMHTMLIFrameElement : DOMHTMLElement +*/ +[ + object, + oleautomation, + uuid(8CFFB1DA-7BA5-4cf7-B7E6-80583354855B), + pointer_default(unique) +] +interface IDOMHTMLIFrameElement : IDOMHTMLElement +{ + HRESULT contentFrame([out, retval] IWebFrame** result); +} diff --git a/WebKit/win/Interfaces/IWebEmbeddedView.idl b/WebKit/win/Interfaces/IWebEmbeddedView.idl index fb47f60..14b61fd 100644 --- a/WebKit/win/Interfaces/IWebEmbeddedView.idl +++ b/WebKit/win/Interfaces/IWebEmbeddedView.idl @@ -1,46 +1,46 @@ -/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * 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 DO_NO_IMPORTS
-import "oaidl.idl";
-import "ocidl.idl";
-#endif
-
-[
- object,
- oleautomation,
- uuid(F2771780-84C2-4684-8D52-D4F923E67F71),
- pointer_default(unique)
-]
-interface IWebEmbeddedView : IUnknown
-{
- HRESULT createViewWindow([in] OLE_HANDLE parentWindow, [in] LPSIZE pluginSize, [out, retval] OLE_HANDLE* window);
-
- HRESULT didReceiveResponse([in] IWebURLResponse* response);
- HRESULT didReceiveData([in] IStream* data);
- HRESULT didFinishLoading();
- HRESULT didFail([in] IWebError* error);
-}
+/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * 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 DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +[ + object, + oleautomation, + uuid(F2771780-84C2-4684-8D52-D4F923E67F71), + pointer_default(unique) +] +interface IWebEmbeddedView : IUnknown +{ + HRESULT createViewWindow([in] OLE_HANDLE parentWindow, [in] LPSIZE pluginSize, [out, retval] OLE_HANDLE* window); + + HRESULT didReceiveResponse([in] IWebURLResponse* response); + HRESULT didReceiveData([in] IStream* data); + HRESULT didFinishLoading(); + HRESULT didFail([in] IWebError* error); +} diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl index 4e26cfa..3172ce6 100755 --- a/WebKit/win/Interfaces/IWebFramePrivate.idl +++ b/WebKit/win/Interfaces/IWebFramePrivate.idl @@ -108,4 +108,6 @@ interface IWebFramePrivate : IUnknown HRESULT pageNumberForElementById([in] BSTR id, [in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber); HRESULT numberOfPages([in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber); + + HRESULT layerTreeAsText([out, retval] BSTR* result); } diff --git a/WebKit/win/Interfaces/IWebPreferences.idl b/WebKit/win/Interfaces/IWebPreferences.idl index 9a52d7c..1c43135 100644 --- a/WebKit/win/Interfaces/IWebPreferences.idl +++ b/WebKit/win/Interfaces/IWebPreferences.idl @@ -186,4 +186,7 @@ interface IWebPreferences : IUnknown HRESULT setZoomsTextOnly(BOOL zoomsTextOnly); HRESULT zoomsTextOnly(BOOL *zoomsTextOnly); + + HRESULT setAcceleratedCompositingEnabled(BOOL acceleratedCompositingEnabled); + HRESULT acceleratedCompositingEnabled(BOOL *acceleratedCompositingEnabled); } diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl index 54c1d42..76ee3fa 100644 --- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl +++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl @@ -79,8 +79,8 @@ interface IWebPreferencesPrivate : IUnknown HRESULT isXSSAuditorEnabled([out, retval] BOOL *enabled); HRESULT setXSSAuditorEnabled([in] BOOL enabled); - HRESULT isFrameSetFlatteningEnabled([out, retval] BOOL *enabled); - HRESULT setFrameSetFlatteningEnabled([in] BOOL enabled); + HRESULT isFrameFlatteningEnabled([out, retval] BOOL *enabled); + HRESULT setFrameFlatteningEnabled([in] BOOL enabled); HRESULT experimentalNotificationsEnabled([out, retval] BOOL *enabled); HRESULT setExperimentalNotificationsEnabled([in] BOOL enabled); @@ -103,4 +103,10 @@ interface IWebPreferencesPrivate : IUnknown HRESULT allowFileAccessFromFileURLs([out, retval] BOOL *allowAccess); HRESULT setAllowFileAccessFromFileURLs([in] BOOL allowAccess); + + HRESULT setShowDebugBorders([in] BOOL); + HRESULT showDebugBorders([out, retval] BOOL*); + + HRESULT setShowRepaintCounter([in] BOOL); + HRESULT showRepaintCounter([out, retval] BOOL*); } diff --git a/WebKit/win/Interfaces/IWebScriptWorld.idl b/WebKit/win/Interfaces/IWebScriptWorld.idl index bd8012d..b66c4ec 100644 --- a/WebKit/win/Interfaces/IWebScriptWorld.idl +++ b/WebKit/win/Interfaces/IWebScriptWorld.idl @@ -37,4 +37,5 @@ import "JavaScriptCoreAPITypes.idl"; interface IWebScriptWorld : IUnknown { HRESULT standardWorld([out, retval] IWebScriptWorld**); [local] HRESULT scriptWorldForGlobalContext([in] JSGlobalContextRef, [out, retval] IWebScriptWorld**); + HRESULT unregisterWorld(); } diff --git a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl index ce00430..d9702de 100755 --- a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl +++ b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,6 +33,7 @@ import "IWebView.idl"; cpp_quote("#define WebEmbeddedViewAttributesKey TEXT(\"WebEmbeddedViewAttributesKey\")") cpp_quote("#define WebEmbeddedViewBaseURLKey TEXT(\"WebEmbeddedViewBaseURLKey\")") +cpp_quote("#define WebEmbeddedViewSourceURLKey TEXT(\"WebEmbeddedViewSourceURLKey\")") cpp_quote("#define WebEmbeddedViewContainingElementKey TEXT(\"WebEmbeddedViewContainingElementKey\")") cpp_quote("#define WebEmbeddedViewMIMETypeKey TEXT(\"WebEmbeddedViewMIMETypeKey\")") diff --git a/WebKit/win/Interfaces/IWebUserContentURLPattern.idl b/WebKit/win/Interfaces/IWebUserContentURLPattern.idl new file mode 100644 index 0000000..b261084 --- /dev/null +++ b/WebKit/win/Interfaces/IWebUserContentURLPattern.idl @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +[ + object, + oleautomation, + uuid(DBF18E5A-701B-49ab-B490-BED40053B788), + pointer_default(unique) +] +interface IWebUserContentURLPattern : IUnknown +{ + HRESULT parse([in] BSTR patternString); + HRESULT isValid([out, retval] BOOL* isValid); + HRESULT scheme([out, retval] BSTR*); + HRESULT host([out, retval] BSTR*); + HRESULT matchesSubdomains([out, retval] BOOL* matches); +} diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl index 7ab2304..17378ce 100644 --- a/WebKit/win/Interfaces/IWebViewPrivate.idl +++ b/WebKit/win/Interfaces/IWebViewPrivate.idl @@ -207,10 +207,13 @@ interface IWebViewPrivate : IUnknown // - destinationProtocol: The protocol to grant access to. // - destinationHost: The host to grant access to. // - allowDestinationSubdomains: If host is a domain, setting this to YES will whitelist host and all its subdomains, recursively. - HRESULT whiteListAccessFromOrigin([in] BSTR sourceOrigin, [in] BSTR destinationProtocol, [in] BSTR destinationHost, [in] BOOL allowDestinationSubdomains); + HRESULT addOriginAccessWhitelistEntry([in] BSTR sourceOrigin, [in] BSTR destinationProtocol, [in] BSTR destinationHost, [in] BOOL allowDestinationSubdomains); - // Removes all white list entries created with whiteListAccessFromOrigin. - HRESULT resetOriginAccessWhiteLists(); + // Removes a white list entry created with addOriginAccessWhitelistEntry. See above. + HRESULT removeOriginAccessWhitelistEntry([in] BSTR sourceOrigin, [in] BSTR destinationProtocol, [in] BSTR destinationHost, [in] BOOL allowDestinationSubdomains); + + // Removes all white list entries created with addOriginAccessWhitelistEntry. + HRESULT resetOriginAccessWhitelists(); HRESULT setHistoryDelegate([in] IWebHistoryDelegate* historyDelegate); HRESULT historyDelegate([out,retval] IWebHistoryDelegate** historyDelegate); @@ -226,4 +229,6 @@ interface IWebViewPrivate : IUnknown HRESULT geolocationDidFailWithError([in] IWebError* error); HRESULT setDomainRelaxationForbiddenForURLScheme([in] BOOL forbidden, [in] BSTR scheme); + + HRESULT registerURLSchemeAsSecure([in] BSTR scheme); } diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl index 0de6b0b..d25cdfe 100644 --- a/WebKit/win/Interfaces/WebKit.idl +++ b/WebKit/win/Interfaces/WebKit.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,7 +24,7 @@ */ cpp_quote("/*") -cpp_quote(" * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.") +cpp_quote(" * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.") cpp_quote(" *") cpp_quote(" * Redistribution and use in source and binary forms, with or without") cpp_quote(" * modification, are permitted provided that the following conditions") @@ -134,6 +134,7 @@ import "ocidl.idl"; #include "IWebURLResponsePrivate.idl" #include "IWebUndoManager.idl" #include "IWebUndoTarget.idl" +#include "IWebUserContentURLPattern.idl" #include "IWebView.idl" #include "IWebViewPrivate.idl" #include "IWebWorkersPrivate.idl" @@ -293,4 +294,9 @@ library WebKit coclass WebGeolocationPosition { [default] interface IWebGeolocationPosition; } + + [uuid(2D62AE25-DEAA-4945-A76E-CCE05E899664)] + coclass WebUserContentURLPattern { + [default] interface IWebUserContentURLPattern; + } } diff --git a/WebKit/win/WebCoreLocalizedStrings.cpp b/WebKit/win/WebCoreLocalizedStrings.cpp index 5850605..2d2f17f 100644 --- a/WebKit/win/WebCoreLocalizedStrings.cpp +++ b/WebKit/win/WebCoreLocalizedStrings.cpp @@ -93,11 +93,12 @@ String WebCore::AXCheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING( String WebCore::AXUncheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility")); } String WebCore::AXLinkActionVerb() { return String(LPCTSTR_UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility")); } String WebCore::AXMenuListActionVerb() { return String(LPCTSTR_UI_STRING("open", "Verb stating the action that will occur when a select element is clicked, as used by accessibility")); } -String WebCore::AXMenuListPopupActionVerb() { return String(LPCTSTR_UI_STRING("press", "Verb stating the action that will occur when a select element's popup list is clicked, as used by accessibility")); } +String WebCore::AXMenuListPopupActionVerb() { return String(LPCTSTR_UI_STRING_KEY("press", "press (select element)", "Verb stating the action that will occur when a select element's popup list is clicked, as used by accessibility")); } String WebCore::unknownFileSizeText() { return String(LPCTSTR_UI_STRING("Unknown", "Unknown filesize FTP directory listing item")); } String WebCore::uploadFileText() { return String(LPCTSTR_UI_STRING("Upload file", "(Windows) Form submit file upload dialog title")); } String WebCore::allFilesText() { return String(LPCTSTR_UI_STRING("All Files", "(Windows) Form submit file upload all files pop-up")); } - +String WebCore::missingPluginText() { return String(LPCTSTR_UI_STRING("Missing Plug-in", "Label text to be used when a plugin is missing")); } +String WebCore::crashedPluginText() { return String(LPCTSTR_UI_STRING("Plug-in Failure", "Label text to be used if plugin host process has crashed")); } String WebCore::imageTitle(const String& filename, const IntSize& size) { static RetainPtr<CFStringRef> format(AdoptCF, UI_STRING("%@ %d\xC3\x97%d pixels", "window title for a standalone image (uses multiplication symbol, not x)")); diff --git a/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp b/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp index 6bd8f44..463a986 100644 --- a/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp +++ b/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp @@ -1,238 +1,238 @@ -/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * 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 "EmbeddedWidget.h"
-
-#include <WebCore/Document.h>
-#include <WebCore/Element.h>
-#include <WebCore/FrameView.h>
-#include <WebCore/RenderObject.h>
-
-#include "MemoryStream.h"
-#include "WebError.h"
-#include "WebURLResponse.h"
-
-using namespace WebCore;
-
-PassRefPtr<EmbeddedWidget> EmbeddedWidget::create(IWebEmbeddedView* view, Element* element, HWND parentWindow, const IntSize& size)
-{
- RefPtr<EmbeddedWidget> widget = adoptRef(new EmbeddedWidget(view, element));
-
- widget->createWindow(parentWindow, size);
- return widget.release();
-}
-
-EmbeddedWidget::~EmbeddedWidget()
-{
- if (m_window)
- DestroyWindow(m_window);
-}
-
-bool EmbeddedWidget::createWindow(HWND parentWindow, const IntSize& size)
-{
- ASSERT(!m_window);
-
- HWND window;
-
- SIZE pluginSize(size);
-
- HRESULT hr = m_view->createViewWindow((OLE_HANDLE)parentWindow, &pluginSize, (OLE_HANDLE*)&window);
-
- if (FAILED(hr) || !window)
- return false;
-
- m_window = window;
- return true;
-}
-
-void EmbeddedWidget::invalidateRect(const IntRect& rect)
-{
- if (!m_window)
- return;
-
- RECT r = rect;
- ::InvalidateRect(m_window, &r, false);
-}
-
-void EmbeddedWidget::setFrameRect(const IntRect& rect)
-{
- if (m_element->document()->printing())
- return;
-
- if (rect != frameRect())
- Widget::setFrameRect(rect);
-
- frameRectsChanged();
-}
-
-void EmbeddedWidget::frameRectsChanged()
-{
- if (!parent())
- return;
-
- ASSERT(parent()->isFrameView());
- FrameView* frameView = static_cast<FrameView*>(parent());
-
- IntRect oldWindowRect = m_windowRect;
- IntRect oldClipRect = m_clipRect;
-
- m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());
- m_clipRect = windowClipRect();
- m_clipRect.move(-m_windowRect.x(), -m_windowRect.y());
-
- if (!m_window)
- return;
-
- if (m_windowRect == oldWindowRect && m_clipRect == oldClipRect)
- return;
-
- HRGN rgn;
-
- // To prevent flashes while scrolling, we disable drawing during the window
- // update process by clipping the window to the zero rect.
-
- bool clipToZeroRect = true;
-
- if (clipToZeroRect) {
- rgn = ::CreateRectRgn(0, 0, 0, 0);
- ::SetWindowRgn(m_window, rgn, FALSE);
- } else {
- rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom());
- ::SetWindowRgn(m_window, rgn, TRUE);
- }
-
- if (m_windowRect != oldWindowRect)
- ::MoveWindow(m_window, m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height(), TRUE);
-
- if (clipToZeroRect) {
- rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom());
- ::SetWindowRgn(m_window, rgn, TRUE);
- }
-}
-
-void EmbeddedWidget::setFocus()
-{
- if (m_window)
- SetFocus(m_window);
-
- Widget::setFocus();
-}
-
-void EmbeddedWidget::show()
-{
- m_isVisible = true;
-
- if (m_attachedToWindow && m_window)
- ShowWindow(m_window, SW_SHOWNA);
-
- Widget::show();
-}
-
-void EmbeddedWidget::hide()
-{
- m_isVisible = false;
-
- if (m_attachedToWindow && m_window)
- ShowWindow(m_window, SW_HIDE);
-
- Widget::hide();
-}
-
-IntRect EmbeddedWidget::windowClipRect() const
-{
- // Start by clipping to our bounds.
- IntRect clipRect(m_windowRect);
-
- // Take our element and get the clip rect from the enclosing layer and frame view.
- RenderLayer* layer = m_element->renderer()->enclosingLayer();
- FrameView* parentView = m_element->document()->view();
- clipRect.intersect(parentView->windowClipRectForLayer(layer, true));
-
- return clipRect;
-}
-
-void EmbeddedWidget::setParent(ScrollView* parent)
-{
- Widget::setParent(parent);
-
- if (!m_window)
- return;
-
- if (parent)
- return;
-
- // If the embedded window or one of its children have the focus, we need to
- // clear it to prevent the web view window from being focused because that can
- // trigger a layout while the plugin element is being detached.
- HWND focusedWindow = ::GetFocus();
- if (m_window == focusedWindow || ::IsChild(m_window, focusedWindow))
- ::SetFocus(0);
-}
-
-void EmbeddedWidget::attachToWindow()
-{
- if (m_attachedToWindow)
- return;
-
- m_attachedToWindow = true;
- if (m_isVisible && m_window)
- ShowWindow(m_window, SW_SHOWNA);
-}
-
-void EmbeddedWidget::detachFromWindow()
-{
- if (!m_attachedToWindow)
- return;
-
- if (m_isVisible && m_window)
- ShowWindow(m_window, SW_HIDE);
- m_attachedToWindow = false;
-}
-
-void EmbeddedWidget::didReceiveResponse(const ResourceResponse& response)
-{
- ASSERT(m_view);
-
- COMPtr<IWebURLResponse> urlResponse(AdoptCOM, WebURLResponse::createInstance(response));
- m_view->didReceiveResponse(urlResponse.get());
-}
-
-void EmbeddedWidget::didReceiveData(const char* data, int length)
-{
- COMPtr<MemoryStream> stream = MemoryStream::createInstance(SharedBuffer::create(data, length));
- m_view->didReceiveData(stream.get());
-}
-
-void EmbeddedWidget::didFinishLoading()
-{
- m_view->didFinishLoading();
-}
-
-void EmbeddedWidget::didFail(const ResourceError& error)
-{
- COMPtr<IWebError> webError(AdoptCOM, WebError::createInstance(error));
- m_view->didFail(webError.get());
-}
+/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * 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 "EmbeddedWidget.h" + +#include <WebCore/Document.h> +#include <WebCore/Element.h> +#include <WebCore/FrameView.h> +#include <WebCore/RenderObject.h> + +#include "MemoryStream.h" +#include "WebError.h" +#include "WebURLResponse.h" + +using namespace WebCore; + +PassRefPtr<EmbeddedWidget> EmbeddedWidget::create(IWebEmbeddedView* view, Element* element, HWND parentWindow, const IntSize& size) +{ + RefPtr<EmbeddedWidget> widget = adoptRef(new EmbeddedWidget(view, element)); + + widget->createWindow(parentWindow, size); + return widget.release(); +} + +EmbeddedWidget::~EmbeddedWidget() +{ + if (m_window) + DestroyWindow(m_window); +} + +bool EmbeddedWidget::createWindow(HWND parentWindow, const IntSize& size) +{ + ASSERT(!m_window); + + HWND window; + + SIZE pluginSize(size); + + HRESULT hr = m_view->createViewWindow((OLE_HANDLE)parentWindow, &pluginSize, (OLE_HANDLE*)&window); + + if (FAILED(hr) || !window) + return false; + + m_window = window; + return true; +} + +void EmbeddedWidget::invalidateRect(const IntRect& rect) +{ + if (!m_window) + return; + + RECT r = rect; + ::InvalidateRect(m_window, &r, false); +} + +void EmbeddedWidget::setFrameRect(const IntRect& rect) +{ + if (m_element->document()->printing()) + return; + + if (rect != frameRect()) + Widget::setFrameRect(rect); + + frameRectsChanged(); +} + +void EmbeddedWidget::frameRectsChanged() +{ + if (!parent()) + return; + + ASSERT(parent()->isFrameView()); + FrameView* frameView = static_cast<FrameView*>(parent()); + + IntRect oldWindowRect = m_windowRect; + IntRect oldClipRect = m_clipRect; + + m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size()); + m_clipRect = windowClipRect(); + m_clipRect.move(-m_windowRect.x(), -m_windowRect.y()); + + if (!m_window) + return; + + if (m_windowRect == oldWindowRect && m_clipRect == oldClipRect) + return; + + HRGN rgn; + + // To prevent flashes while scrolling, we disable drawing during the window + // update process by clipping the window to the zero rect. + + bool clipToZeroRect = true; + + if (clipToZeroRect) { + rgn = ::CreateRectRgn(0, 0, 0, 0); + ::SetWindowRgn(m_window, rgn, FALSE); + } else { + rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom()); + ::SetWindowRgn(m_window, rgn, TRUE); + } + + if (m_windowRect != oldWindowRect) + ::MoveWindow(m_window, m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height(), TRUE); + + if (clipToZeroRect) { + rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom()); + ::SetWindowRgn(m_window, rgn, TRUE); + } +} + +void EmbeddedWidget::setFocus() +{ + if (m_window) + SetFocus(m_window); + + Widget::setFocus(); +} + +void EmbeddedWidget::show() +{ + m_isVisible = true; + + if (m_attachedToWindow && m_window) + ShowWindow(m_window, SW_SHOWNA); + + Widget::show(); +} + +void EmbeddedWidget::hide() +{ + m_isVisible = false; + + if (m_attachedToWindow && m_window) + ShowWindow(m_window, SW_HIDE); + + Widget::hide(); +} + +IntRect EmbeddedWidget::windowClipRect() const +{ + // Start by clipping to our bounds. + IntRect clipRect(m_windowRect); + + // Take our element and get the clip rect from the enclosing layer and frame view. + RenderLayer* layer = m_element->renderer()->enclosingLayer(); + FrameView* parentView = m_element->document()->view(); + clipRect.intersect(parentView->windowClipRectForLayer(layer, true)); + + return clipRect; +} + +void EmbeddedWidget::setParent(ScrollView* parent) +{ + Widget::setParent(parent); + + if (!m_window) + return; + + if (parent) + return; + + // If the embedded window or one of its children have the focus, we need to + // clear it to prevent the web view window from being focused because that can + // trigger a layout while the plugin element is being detached. + HWND focusedWindow = ::GetFocus(); + if (m_window == focusedWindow || ::IsChild(m_window, focusedWindow)) + ::SetFocus(0); +} + +void EmbeddedWidget::attachToWindow() +{ + if (m_attachedToWindow) + return; + + m_attachedToWindow = true; + if (m_isVisible && m_window) + ShowWindow(m_window, SW_SHOWNA); +} + +void EmbeddedWidget::detachFromWindow() +{ + if (!m_attachedToWindow) + return; + + if (m_isVisible && m_window) + ShowWindow(m_window, SW_HIDE); + m_attachedToWindow = false; +} + +void EmbeddedWidget::didReceiveResponse(const ResourceResponse& response) +{ + ASSERT(m_view); + + COMPtr<IWebURLResponse> urlResponse(AdoptCOM, WebURLResponse::createInstance(response)); + m_view->didReceiveResponse(urlResponse.get()); +} + +void EmbeddedWidget::didReceiveData(const char* data, int length) +{ + COMPtr<MemoryStream> stream = MemoryStream::createInstance(SharedBuffer::create(data, length)); + m_view->didReceiveData(stream.get()); +} + +void EmbeddedWidget::didFinishLoading() +{ + m_view->didFinishLoading(); +} + +void EmbeddedWidget::didFail(const ResourceError& error) +{ + COMPtr<IWebError> webError(AdoptCOM, WebError::createInstance(error)); + m_view->didFail(webError.get()); +} diff --git a/WebKit/win/WebCoreSupport/EmbeddedWidget.h b/WebKit/win/WebCoreSupport/EmbeddedWidget.h index 5eee892..7930e0f 100644 --- a/WebKit/win/WebCoreSupport/EmbeddedWidget.h +++ b/WebKit/win/WebCoreSupport/EmbeddedWidget.h @@ -1,85 +1,85 @@ -/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * 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 EmbeddedWidget_h
-#define EmbeddedWidget_h
-
-#include <WebCore/COMPtr.h>
-#include <WebCore/IntRect.h>
-#include <WebCore/PluginView.h>
-
-namespace WebCore {
- class Element;
- class IntSize;
-}
-
-interface IWebEmbeddedView;
-
-class EmbeddedWidget : public WebCore::Widget, public WebCore::PluginManualLoader {
-public:
- static PassRefPtr<EmbeddedWidget> create(IWebEmbeddedView*, WebCore::Element* element, HWND parentWindow, const WebCore::IntSize&);
- ~EmbeddedWidget();
-
-private:
- EmbeddedWidget(IWebEmbeddedView* view, WebCore::Element* element)
- : m_view(view)
- , m_element(element)
- , m_window(0)
- , m_isVisible(false)
- , m_attachedToWindow(false)
- {
- }
-
- bool createWindow(HWND parentWindow, const WebCore::IntSize& size);
-
- virtual void didReceiveResponse(const WebCore::ResourceResponse&);
- virtual void didReceiveData(const char*, int);
- virtual void didFinishLoading();
- virtual void didFail(const WebCore::ResourceError&);
-
- virtual void invalidateRect(const WebCore::IntRect&);
- virtual void setFrameRect(const WebCore::IntRect&);
- virtual void frameRectsChanged();
- virtual void setFocus();
- virtual void show();
- virtual void hide();
- virtual WebCore::IntRect windowClipRect() const;
- virtual void setParent(WebCore::ScrollView*);
-
- virtual void attachToWindow();
- virtual void detachFromWindow();
-
- COMPtr<IWebEmbeddedView> m_view;
- WebCore::Element* m_element;
- HWND m_window;
-
- bool m_isVisible;
- bool m_attachedToWindow;
-
- WebCore::IntRect m_clipRect; // The clip rect to apply to an embedded view.
- WebCore::IntRect m_windowRect; // Our window rect.
-};
-
-#endif // EmbeddedWidget_h
+/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * 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 EmbeddedWidget_h +#define EmbeddedWidget_h + +#include <WebCore/COMPtr.h> +#include <WebCore/IntRect.h> +#include <WebCore/PluginView.h> + +namespace WebCore { + class Element; + class IntSize; +} + +interface IWebEmbeddedView; + +class EmbeddedWidget : public WebCore::Widget, public WebCore::PluginManualLoader { +public: + static PassRefPtr<EmbeddedWidget> create(IWebEmbeddedView*, WebCore::Element* element, HWND parentWindow, const WebCore::IntSize&); + ~EmbeddedWidget(); + +private: + EmbeddedWidget(IWebEmbeddedView* view, WebCore::Element* element) + : m_view(view) + , m_element(element) + , m_window(0) + , m_isVisible(false) + , m_attachedToWindow(false) + { + } + + bool createWindow(HWND parentWindow, const WebCore::IntSize& size); + + virtual void didReceiveResponse(const WebCore::ResourceResponse&); + virtual void didReceiveData(const char*, int); + virtual void didFinishLoading(); + virtual void didFail(const WebCore::ResourceError&); + + virtual void invalidateRect(const WebCore::IntRect&); + virtual void setFrameRect(const WebCore::IntRect&); + virtual void frameRectsChanged(); + virtual void setFocus(); + virtual void show(); + virtual void hide(); + virtual WebCore::IntRect windowClipRect() const; + virtual void setParent(WebCore::ScrollView*); + + virtual void attachToWindow(); + virtual void detachFromWindow(); + + COMPtr<IWebEmbeddedView> m_view; + WebCore::Element* m_element; + HWND m_window; + + bool m_isVisible; + bool m_attachedToWindow; + + WebCore::IntRect m_clipRect; // The clip rect to apply to an embedded view. + WebCore::IntRect m_windowRect; // Our window rect. +}; + +#endif // EmbeddedWidget_h diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp index 45f7662..587637f 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp +++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp @@ -46,7 +46,11 @@ #include <WebCore/FrameLoadRequest.h> #include <WebCore/FrameView.h> #include <WebCore/Geolocation.h> +#if USE(ACCELERATED_COMPOSITING) +#include <WebCore/GraphicsLayer.h> +#endif #include <WebCore/HTMLNames.h> +#include <WebCore/Icon.h> #include <WebCore/LocalizedStrings.h> #include <WebCore/NotImplemented.h> #include <WebCore/Page.h> @@ -451,10 +455,22 @@ IntRect WebChromeClient::windowResizerRect() const return IntRect(); } -void WebChromeClient::repaint(const IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly) +void WebChromeClient::invalidateWindow(const IntRect& windowRect, bool immediate) +{ + ASSERT(core(m_webView->topLevelFrame())); + m_webView->repaint(windowRect, false /*contentChanged*/, immediate, false /*repaintContentOnly*/); +} + +void WebChromeClient::invalidateContentsAndWindow(const IntRect& windowRect, bool immediate) { ASSERT(core(m_webView->topLevelFrame())); - m_webView->repaint(windowRect, contentChanged, immediate, repaintContentOnly); + m_webView->repaint(windowRect, true /*contentChanged*/, immediate /*immediate*/, false /*repaintContentOnly*/); +} + +void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& windowRect, bool immediate) +{ + ASSERT(core(m_webView->topLevelFrame())); + m_webView->repaint(windowRect, true /*contentChanged*/, immediate, true /*repaintContentOnly*/); } void WebChromeClient::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect& clipRect) @@ -734,10 +750,9 @@ void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChoose // FIXME: Show some sort of error if too many files are selected and the buffer is too small. For now, this will fail silently. } -void WebChromeClient::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>) +void WebChromeClient::chooseIconForFiles(const Vector<WebCore::String>& filenames, WebCore::FileChooser* chooser) { - // FIXME: Move the code of Icon::createIconForFiles() here. - notImplemented(); + chooser->iconLoaded(Icon::createIconForFiles(filenames)); } bool WebChromeClient::setCursor(PlatformCursorHandle cursor) @@ -783,7 +798,7 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca #if USE(ACCELERATED_COMPOSITING) void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer) { - m_webView->setRootChildLayer(graphicsLayer ? graphicsLayer->platformLayer() : 0); + m_webView->setRootChildLayer(graphicsLayer ? static_cast<WKCACFLayer*>(graphicsLayer->platformLayer()) : 0); } void WebChromeClient::scheduleCompositingLayerSync() diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h index 0958cf7..6954fde 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.h +++ b/WebKit/win/WebCoreSupport/WebChromeClient.h @@ -93,8 +93,11 @@ public: virtual bool tabsToLinks() const; virtual WebCore::IntRect windowResizerRect() const; - virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); + virtual void invalidateWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool); + virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool); virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect); + virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint& p) const; virtual WebCore::IntRect windowToScreen(const WebCore::IntRect& r) const; virtual PlatformPageClient platformPageClient() const; @@ -123,7 +126,7 @@ public: virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&); virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); - virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>); + virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*); virtual bool setCursor(WebCore::PlatformCursorHandle cursor); @@ -147,6 +150,7 @@ public: virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const {} virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); + virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { } #if ENABLE(VIDEO) virtual bool supportsFullscreenForNode(const WebCore::Node*); diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp index 3f6eb07..8c66d0e 100644 --- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp +++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp @@ -172,7 +172,7 @@ void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin, notificationDelegate()->requestNotificationPermission(org); } -NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url, Document*) +NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url) { int out = 0; BString org(SecurityOrigin::create(url)->toString()); diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h index d30b1e7..344c95b 100644 --- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h +++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h @@ -50,7 +50,7 @@ public: virtual void cancel(WebCore::Notification* object); virtual void notificationObjectDestroyed(WebCore::Notification* object); virtual void requestPermission(WebCore::SecurityOrigin* origin, PassRefPtr<WebCore::VoidCallback> callback); - virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL& url, Document* document); + virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL& url); private: bool hasNotificationDelegate(); diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp index 6ae6c5e..fc75ea4 100644 --- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp @@ -243,10 +243,6 @@ void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader, unsign resourceLoadDelegate->didFailLoadingWithError(webView, identifier, webError.get(), getWebDataSource(loader)); } -void WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&) -{ -} - bool WebFrameLoaderClient::shouldCacheResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response, const unsigned char* data, const unsigned long long length) { WebView* webView = m_webFrame->webView(); @@ -513,7 +509,7 @@ void WebFrameLoaderClient::receivedData(const char* data, int length, const Stri bool userChosen = !encoding.isNull(); if (encoding.isNull()) encoding = textEncoding; - coreFrame->loader()->setEncoding(encoding, userChosen); + coreFrame->loader()->writer()->setEncoding(encoding, userChosen); coreFrame->loader()->addData(data, length); } @@ -841,7 +837,8 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, HashMap<String, COMVariant> arguments; arguments.set(WebEmbeddedViewAttributesKey, viewArgumentsBag); - arguments.set(WebEmbeddedViewBaseURLKey, url.string()); + arguments.set(WebEmbeddedViewSourceURLKey, url.string()); + arguments.set(WebEmbeddedViewBaseURLKey, element->document()->baseURI().string()); arguments.set(WebEmbeddedViewContainingElementKey, containingElement); arguments.set(WebEmbeddedViewMIMETypeKey, mimeType); @@ -867,7 +864,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, dispatchDidFailToStartPlugin(pluginView.get()); - return pluginView; + return 0; } void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h index a5f2b1b..0d89b2a 100644 --- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h @@ -57,7 +57,6 @@ public: virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived); virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier); virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&); - virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString&); virtual bool shouldCacheResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&, const unsigned char* data, unsigned long long length); virtual void dispatchDidHandleOnloadEvents(); diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp index 0dd6e58..16ad172 100644 --- a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp +++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -52,8 +52,6 @@ using namespace WebCore; -static const char* const inspectorStartsAttachedName = "inspectorStartsAttached"; - static LPCTSTR kWebInspectorWindowClassName = TEXT("WebInspectorWindowClass"); static ATOM registerWindowClass(); static LPCTSTR kWebInspectorPointerProp = TEXT("WebInspectorPointer"); @@ -71,25 +69,13 @@ static CFBundleRef getWebKitBundle() WebInspectorClient::WebInspectorClient(WebView* webView) : m_inspectedWebView(webView) - , m_hwnd(0) - , m_webViewHwnd(0) - , m_shouldAttachWhenShown(false) - , m_attached(false) { ASSERT(m_inspectedWebView); - m_inspectedWebView->viewWindow((OLE_HANDLE*)&m_inspectedWebViewHwnd); - - // FIXME: Implement window size/position save/restore -#if 0 - [self setWindowFrameAutosaveName:@"Web Inspector"]; -#endif } WebInspectorClient::~WebInspectorClient() { - if (m_hwnd) - ::DestroyWindow(m_hwnd); } void WebInspectorClient::inspectorDestroyed() @@ -97,35 +83,30 @@ void WebInspectorClient::inspectorDestroyed() delete this; } -Page* WebInspectorClient::createPage() +void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorController) { registerWindowClass(); - if (m_hwnd) - ::DestroyWindow(m_hwnd); - - m_hwnd = ::CreateWindowEx(0, kWebInspectorWindowClassName, 0, WS_OVERLAPPEDWINDOW, + HWND frontendHwnd = ::CreateWindowEx(0, kWebInspectorWindowClassName, 0, WS_OVERLAPPEDWINDOW, defaultWindowRect().x(), defaultWindowRect().y(), defaultWindowRect().width(), defaultWindowRect().height(), 0, 0, 0, 0); - if (!m_hwnd) - return 0; - - ::SetProp(m_hwnd, kWebInspectorPointerProp, reinterpret_cast<HANDLE>(this)); + if (!frontendHwnd) + return; - m_webView.adoptRef(WebView::createInstance()); + COMPtr<WebView> frontendWebView(AdoptCOM, WebView::createInstance()); - if (FAILED(m_webView->setHostWindow((OLE_HANDLE)(ULONG64)m_hwnd))) - return 0; + if (FAILED(frontendWebView->setHostWindow((OLE_HANDLE)(ULONG64)frontendHwnd))) + return; RECT rect; - GetClientRect(m_hwnd, &rect); - if (FAILED(m_webView->initWithFrame(rect, 0, 0))) - return 0; + GetClientRect(frontendHwnd, &rect); + if (FAILED(frontendWebView->initWithFrame(rect, 0, 0))) + return; COMPtr<WebInspectorDelegate> delegate(AdoptCOM, WebInspectorDelegate::createInstance()); - if (FAILED(m_webView->setUIDelegate(delegate.get()))) - return 0; + if (FAILED(frontendWebView->setUIDelegate(delegate.get()))) + return; // Keep preferences separate from the rest of the client, making sure we are using expected preference values. // One reason this is good is that it keeps the inspector out of history via "private browsing". @@ -136,66 +117,126 @@ Page* WebInspectorClient::createPage() COMPtr<WebPreferences> tempPreferences(AdoptCOM, WebPreferences::createInstance()); COMPtr<IWebPreferences> iPreferences; if (FAILED(tempPreferences->initWithIdentifier(BString(L"WebInspectorPreferences"), &iPreferences))) - return 0; + return; COMPtr<WebPreferences> preferences(Query, iPreferences); if (!preferences) - return 0; + return; if (FAILED(preferences->setAutosaves(FALSE))) - return 0; + return; if (FAILED(preferences->setPrivateBrowsingEnabled(TRUE))) - return 0; + return; if (FAILED(preferences->setLoadsImagesAutomatically(TRUE))) - return 0; + return; if (FAILED(preferences->setAuthorAndUserStylesEnabled(TRUE))) - return 0; + return; if (FAILED(preferences->setAllowsAnimatedImages(TRUE))) - return 0; + return; if (FAILED(preferences->setLoadsImagesAutomatically(TRUE))) - return 0; + return; if (FAILED(preferences->setPlugInsEnabled(FALSE))) - return 0; + return; if (FAILED(preferences->setJavaEnabled(FALSE))) - return 0; + return; if (FAILED(preferences->setUserStyleSheetEnabled(FALSE))) - return 0; + return; if (FAILED(preferences->setTabsToLinks(FALSE))) - return 0; + return; if (FAILED(preferences->setMinimumFontSize(0))) - return 0; + return; if (FAILED(preferences->setMinimumLogicalFontSize(9))) - return 0; + return; if (FAILED(preferences->setFixedFontFamily(BString(L"Courier New")))) - return 0; + return; if (FAILED(preferences->setDefaultFixedFontSize(13))) - return 0; + return; - if (FAILED(m_webView->setPreferences(preferences.get()))) - return 0; + if (FAILED(frontendWebView->setPreferences(preferences.get()))) + return; - m_webView->setProhibitsMainFrameScrolling(TRUE); + frontendWebView->setProhibitsMainFrameScrolling(TRUE); - if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_webViewHwnd)))) - return 0; + HWND frontendWebViewHwnd; + if (FAILED(frontendWebView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&frontendWebViewHwnd)))) + return; - COMPtr<WebMutableURLRequest> request; - request.adoptRef(WebMutableURLRequest::createInstance()); + COMPtr<WebMutableURLRequest> request(AdoptCOM, WebMutableURLRequest::createInstance()); RetainPtr<CFURLRef> htmlURLRef(AdoptCF, CFBundleCopyResourceURL(getWebKitBundle(), CFSTR("inspector"), CFSTR("html"), CFSTR("inspector"))); if (!htmlURLRef) - return 0; + return; CFStringRef urlStringRef = ::CFURLGetString(htmlURLRef.get()); if (FAILED(request->initWithURL(BString(urlStringRef), WebURLRequestUseProtocolCachePolicy, 60))) - return 0; + return; - if (FAILED(m_webView->topLevelFrame()->loadRequest(request.get()))) - return 0; + if (FAILED(frontendWebView->topLevelFrame()->loadRequest(request.get()))) + return; - return core(m_webView.get()); + Page* page = core(frontendWebView.get()); + page->inspectorController()->setInspectorFrontendClient(new WebInspectorFrontendClient(m_inspectedWebView, m_inspectedWebViewHwnd, frontendHwnd, frontendWebView, frontendWebViewHwnd, this)); + m_frontendHwnd = frontendHwnd; } +void WebInspectorClient::highlight(Node*) +{ + bool creatingHighlight = !m_highlight; + + if (creatingHighlight) + m_highlight.set(new WebNodeHighlight(m_inspectedWebView)); -String WebInspectorClient::localizedStringsURL() + if (m_highlight->isShowing()) + m_highlight->update(); + else + m_highlight->setShowsWhileWebViewIsVisible(true); + + if (creatingHighlight && IsWindowVisible(m_frontendHwnd)) + m_highlight->placeBehindWindow(m_frontendHwnd); +} + +void WebInspectorClient::hideHighlight() +{ + if (m_highlight) + m_highlight->setShowsWhileWebViewIsVisible(false); +} + +void WebInspectorClient::updateHighlight() +{ + if (m_highlight && m_highlight->isShowing()) + m_highlight->update(); +} + +WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, HWND inspectedWebViewHwnd, HWND frontendHwnd, const COMPtr<WebView>& frontendWebView, HWND frontendWebViewHwnd, WebInspectorClient* inspectorClient) + : InspectorFrontendClientLocal(inspectedWebView->page()->inspectorController(), core(frontendWebView.get())) + , m_inspectedWebView(inspectedWebView) + , m_inspectedWebViewHwnd(inspectedWebViewHwnd) + , m_inspectorClient(inspectorClient) + , m_frontendHwnd(frontendHwnd) + , m_frontendWebView(frontendWebView) + , m_frontendWebViewHwnd(frontendWebViewHwnd) + , m_shouldAttachWhenShown(false) + , m_attached(false) + , m_destroyingInspectorView(false) +{ + ::SetProp(frontendHwnd, kWebInspectorPointerProp, reinterpret_cast<HANDLE>(this)); + // FIXME: Implement window size/position save/restore +#if 0 + [self setWindowFrameAutosaveName:@"Web Inspector"]; +#endif +} + +WebInspectorFrontendClient::~WebInspectorFrontendClient() +{ + destroyInspectorView(); +} + +void WebInspectorFrontendClient::frontendLoaded() +{ + InspectorFrontendClientLocal::frontendLoaded(); + + setAttachedWindow(m_attached); +} + +String WebInspectorFrontendClient::localizedStringsURL() { RetainPtr<CFURLRef> url(AdoptCF, CFBundleCopyResourceURL(getWebKitBundle(), CFSTR("localizedStrings"), CFSTR("js"), 0)); if (!url) @@ -204,53 +245,45 @@ String WebInspectorClient::localizedStringsURL() return CFURLGetString(url.get()); } - -String WebInspectorClient::hiddenPanels() +String WebInspectorFrontendClient::hiddenPanels() { // FIXME: implement this return String(); } -void WebInspectorClient::showWindow() +void WebInspectorFrontendClient::bringToFront() { showWindowWithoutNotifications(); - m_inspectedWebView->page()->inspectorController()->setWindowVisible(true, m_shouldAttachWhenShown); -} - -void WebInspectorClient::closeWindow() -{ - closeWindowWithoutNotifications(); - m_inspectedWebView->page()->inspectorController()->setWindowVisible(false, m_shouldAttachWhenShown); } -bool WebInspectorClient::windowVisible() +void WebInspectorFrontendClient::closeWindow() { - return !!::IsWindowVisible(m_hwnd); + destroyInspectorView(); } -void WebInspectorClient::attachWindow() +void WebInspectorFrontendClient::attachWindow() { if (m_attached) return; - m_inspectedWebView->page()->inspectorController()->setSetting(inspectorStartsAttachedName, "true"); + m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "true"); closeWindowWithoutNotifications(); showWindowWithoutNotifications(); } -void WebInspectorClient::detachWindow() +void WebInspectorFrontendClient::detachWindow() { if (!m_attached) return; - m_inspectedWebView->page()->inspectorController()->setSetting(inspectorStartsAttachedName, "false"); + m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "false"); closeWindowWithoutNotifications(); showWindowWithoutNotifications(); } -void WebInspectorClient::setAttachedWindowHeight(unsigned height) +void WebInspectorFrontendClient::setAttachedWindowHeight(unsigned height) { if (!m_attached) return; @@ -268,98 +301,73 @@ void WebInspectorClient::setAttachedWindowHeight(unsigned height) int totalHeight = hostWindowRect.bottom - hostWindowRect.top; int webViewWidth = inspectedRect.right - inspectedRect.left; - SetWindowPos(m_webViewHwnd, 0, 0, totalHeight - height, webViewWidth, height, SWP_NOZORDER); + SetWindowPos(m_frontendWebViewHwnd, 0, 0, totalHeight - height, webViewWidth, height, SWP_NOZORDER); // We want to set the inspected web view height to the totalHeight, because the height adjustment // of the inspected web view happens in onWebViewWindowPosChanging, not here. SetWindowPos(m_inspectedWebViewHwnd, 0, 0, 0, webViewWidth, totalHeight, SWP_NOZORDER); - RedrawWindow(m_webViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW); + RedrawWindow(m_frontendWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW); RedrawWindow(m_inspectedWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW); } -void WebInspectorClient::highlight(Node*) -{ - bool creatingHighlight = !m_highlight; - - if (creatingHighlight) - m_highlight.set(new WebNodeHighlight(m_inspectedWebView)); - - if (m_highlight->isShowing()) - m_highlight->update(); - else - m_highlight->setShowsWhileWebViewIsVisible(true); - - if (creatingHighlight && IsWindowVisible(m_hwnd)) - m_highlight->placeBehindWindow(m_hwnd); -} - -void WebInspectorClient::hideHighlight() -{ - if (m_highlight) - m_highlight->setShowsWhileWebViewIsVisible(false); -} - -void WebInspectorClient::inspectedURLChanged(const String& newURL) +void WebInspectorFrontendClient::inspectedURLChanged(const String& newURL) { m_inspectedURL = newURL; updateWindowTitle(); } -void WebInspectorClient::inspectorWindowObjectCleared() +void WebInspectorFrontendClient::closeWindowWithoutNotifications() { - notImplemented(); -} - -void WebInspectorClient::closeWindowWithoutNotifications() -{ - if (!m_hwnd) + if (!m_frontendHwnd) return; if (!m_attached) { - ShowWindow(m_hwnd, SW_HIDE); + ShowWindow(m_frontendHwnd, SW_HIDE); return; } - ASSERT(m_webView); + ASSERT(m_frontendWebView); ASSERT(m_inspectedWebViewHwnd); - ASSERT(!IsWindowVisible(m_hwnd)); + ASSERT(!IsWindowVisible(m_frontendHwnd)); // Remove the Inspector's WebView from the inspected WebView's parent window. WindowMessageBroadcaster::removeListener(m_inspectedWebViewHwnd, this); m_attached = false; - m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_hwnd)); + m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_frontendHwnd)); // Make sure everything has the right size/position. HWND hostWindow; if (SUCCEEDED(m_inspectedWebView->hostWindow((OLE_HANDLE*)&hostWindow))) SendMessage(hostWindow, WM_SIZE, 0, 0); - if (m_highlight && m_highlight->isShowing()) - m_highlight->update(); + m_inspectorClient->updateHighlight(); } -void WebInspectorClient::showWindowWithoutNotifications() +void WebInspectorFrontendClient::showWindowWithoutNotifications() { - if (!m_hwnd) + if (!m_frontendHwnd) return; - ASSERT(m_webView); + ASSERT(m_frontendWebView); ASSERT(m_inspectedWebViewHwnd); // If no preference is set - default to an attached window. This is important for inspector LayoutTests. - String shouldAttach = m_inspectedWebView->page()->inspectorController()->setting(inspectorStartsAttachedName); + String shouldAttach = m_inspectedWebView->page()->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName()); m_shouldAttachWhenShown = shouldAttach != "false"; - + + if (m_shouldAttachWhenShown && !canAttachWindow()) + m_shouldAttachWhenShown = false; + if (!m_shouldAttachWhenShown) { // Put the Inspector's WebView inside our window and show it. - m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_hwnd)); - SendMessage(m_hwnd, WM_SIZE, 0, 0); + m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_frontendHwnd)); + SendMessage(m_frontendHwnd, WM_SIZE, 0, 0); updateWindowTitle(); - SetWindowPos(m_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE); + SetWindowPos(m_frontendHwnd, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE); return; } @@ -370,20 +378,32 @@ void WebInspectorClient::showWindowWithoutNotifications() if (FAILED(m_inspectedWebView->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow)))) return; - m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(hostWindow)); + m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(hostWindow)); // Then hide our own window. - ShowWindow(m_hwnd, SW_HIDE); + ShowWindow(m_frontendHwnd, SW_HIDE); m_attached = true; // Make sure everything has the right size/position. SendMessage(hostWindow, WM_SIZE, 0, 0); - if (m_highlight && m_highlight->isShowing()) - m_highlight->update(); + m_inspectorClient->updateHighlight(); +} + +void WebInspectorFrontendClient::destroyInspectorView() +{ + if (m_destroyingInspectorView) + return; + m_destroyingInspectorView = true; + + m_inspectedWebView->page()->inspectorController()->disconnectFrontend(); + + closeWindowWithoutNotifications(); + m_inspectorClient->frontendClosing(); + ::DestroyWindow(m_frontendHwnd); } -void WebInspectorClient::updateWindowTitle() +void WebInspectorFrontendClient::updateWindowTitle() { // FIXME: The series of appends should be replaced with a call to String::format() // when it can be figured out how to get the unicode em-dash to show up. @@ -391,10 +411,10 @@ void WebInspectorClient::updateWindowTitle() title.append((UChar)0x2014); // em-dash title.append(' '); title.append(m_inspectedURL); - ::SetWindowText(m_hwnd, title.charactersWithNullTermination()); + ::SetWindowText(m_frontendHwnd, title.charactersWithNullTermination()); } -LRESULT WebInspectorClient::onGetMinMaxInfo(WPARAM, LPARAM lParam) +LRESULT WebInspectorFrontendClient::onGetMinMaxInfo(WPARAM, LPARAM lParam) { MINMAXINFO* info = reinterpret_cast<MINMAXINFO*>(lParam); POINT size = {400, 400}; @@ -403,33 +423,31 @@ LRESULT WebInspectorClient::onGetMinMaxInfo(WPARAM, LPARAM lParam) return 0; } -LRESULT WebInspectorClient::onSize(WPARAM, LPARAM) +LRESULT WebInspectorFrontendClient::onSize(WPARAM, LPARAM) { RECT rect; - ::GetClientRect(m_hwnd, &rect); + ::GetClientRect(m_frontendHwnd, &rect); - ::SetWindowPos(m_webViewHwnd, 0, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER); + ::SetWindowPos(m_frontendWebViewHwnd, 0, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER); return 0; } -LRESULT WebInspectorClient::onClose(WPARAM, LPARAM) +LRESULT WebInspectorFrontendClient::onClose(WPARAM, LPARAM) { - ::ShowWindow(m_hwnd, SW_HIDE); - m_inspectedWebView->page()->inspectorController()->setWindowVisible(false, m_shouldAttachWhenShown); - - hideHighlight(); + ::ShowWindow(m_frontendHwnd, SW_HIDE); + m_inspectedWebView->page()->inspectorController()->close(); return 0; } -LRESULT WebInspectorClient::onSetFocus() +LRESULT WebInspectorFrontendClient::onSetFocus() { - SetFocus(m_webViewHwnd); + SetFocus(m_frontendWebViewHwnd); return 0; } -void WebInspectorClient::onWebViewWindowPosChanging(WPARAM, LPARAM lParam) +void WebInspectorFrontendClient::onWebViewWindowPosChanging(WPARAM, LPARAM lParam) { ASSERT(m_attached); @@ -440,17 +458,17 @@ void WebInspectorClient::onWebViewWindowPosChanging(WPARAM, LPARAM lParam) return; RECT inspectorRect; - GetClientRect(m_webViewHwnd, &inspectorRect); + GetClientRect(m_frontendWebViewHwnd, &inspectorRect); unsigned inspectorHeight = inspectorRect.bottom - inspectorRect.top; windowPos->cy -= inspectorHeight; - SetWindowPos(m_webViewHwnd, 0, windowPos->x, windowPos->y + windowPos->cy, windowPos->cx, inspectorHeight, SWP_NOZORDER); + SetWindowPos(m_frontendWebViewHwnd, 0, windowPos->x, windowPos->y + windowPos->cy, windowPos->cx, inspectorHeight, SWP_NOZORDER); } static LRESULT CALLBACK WebInspectorWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - WebInspectorClient* client = reinterpret_cast<WebInspectorClient*>(::GetProp(hwnd, kWebInspectorPointerProp)); + WebInspectorFrontendClient* client = reinterpret_cast<WebInspectorFrontendClient*>(::GetProp(hwnd, kWebInspectorPointerProp)); if (!client) return ::DefWindowProc(hwnd, msg, wParam, lParam); @@ -470,7 +488,7 @@ static LRESULT CALLBACK WebInspectorWndProc(HWND hwnd, UINT msg, WPARAM wParam, return ::DefWindowProc(hwnd, msg, wParam, lParam); } -void WebInspectorClient::windowReceivedMessage(HWND, UINT msg, WPARAM wParam, LPARAM lParam) +void WebInspectorFrontendClient::windowReceivedMessage(HWND, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_WINDOWPOSCHANGING: diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.h b/WebKit/win/WebCoreSupport/WebInspectorClient.h index 3f65b0a..455e3a1 100644 --- a/WebKit/win/WebCoreSupport/WebInspectorClient.h +++ b/WebKit/win/WebCoreSupport/WebInspectorClient.h @@ -31,6 +31,7 @@ #include <WebCore/COMPtr.h> #include <WebCore/InspectorClient.h> +#include <WebCore/InspectorFrontendClientLocal.h> #include <WebCore/PlatformString.h> #include <WebCore/WindowMessageListener.h> #include <wtf/OwnPtr.h> @@ -39,44 +40,60 @@ class WebNodeHighlight; class WebView; -class WebInspectorClient : public WebCore::InspectorClient, WebCore::WindowMessageListener { +class WebInspectorClient : public WebCore::InspectorClient { public: WebInspectorClient(WebView*); // InspectorClient virtual void inspectorDestroyed(); - virtual WebCore::Page* createPage(); - - virtual WebCore::String localizedStringsURL(); - - virtual WebCore::String hiddenPanels(); - - virtual void showWindow(); - virtual void closeWindow(); - virtual bool windowVisible(); - - virtual void attachWindow(); - virtual void detachWindow(); - - virtual void setAttachedWindowHeight(unsigned height); + virtual void openInspectorFrontend(WebCore::InspectorController*); virtual void highlight(WebCore::Node*); virtual void hideHighlight(); - virtual void inspectedURLChanged(const WebCore::String& newURL); - virtual void populateSetting(const WebCore::String& key, WebCore::String* value); virtual void storeSetting(const WebCore::String& key, const WebCore::String& value); - virtual void inspectorWindowObjectCleared(); + void updateHighlight(); + void frontendClosing() { m_frontendHwnd = 0; } private: ~WebInspectorClient(); + WebView* m_inspectedWebView; + HWND m_inspectedWebViewHwnd; + HWND m_frontendHwnd; + + OwnPtr<WebNodeHighlight> m_highlight; +}; + +class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal, WebCore::WindowMessageListener { +public: + WebInspectorFrontendClient(WebView* inspectedWebView, HWND inspectedWebViewHwnd, HWND frontendHwnd, const COMPtr<WebView>& frotnendWebView, HWND frontendWebViewHwnd, WebInspectorClient* inspectorClient); + + virtual void frontendLoaded(); + + virtual WebCore::String localizedStringsURL(); + virtual WebCore::String hiddenPanels(); + + virtual void bringToFront(); + virtual void closeWindow(); + + virtual void attachWindow(); + virtual void detachWindow(); + + virtual void setAttachedWindowHeight(unsigned height); + virtual void inspectedURLChanged(const WebCore::String& newURL); + +private: + ~WebInspectorFrontendClient(); + void closeWindowWithoutNotifications(); void showWindowWithoutNotifications(); + void destroyInspectorView(); + void updateWindowTitle(); LRESULT onGetMinMaxInfo(WPARAM, LPARAM); @@ -90,16 +107,16 @@ private: WebView* m_inspectedWebView; HWND m_inspectedWebViewHwnd; - HWND m_hwnd; - COMPtr<WebView> m_webView; - HWND m_webViewHwnd; + HWND m_frontendHwnd; + WebInspectorClient* m_inspectorClient; + COMPtr<WebView> m_frontendWebView; + HWND m_frontendWebViewHwnd; bool m_shouldAttachWhenShown; bool m_attached; - OwnPtr<WebNodeHighlight> m_highlight; - WebCore::String m_inspectedURL; + bool m_destroyingInspectorView; static friend LRESULT CALLBACK WebInspectorWndProc(HWND, UINT, WPARAM, LPARAM); }; diff --git a/WebKit/win/WebDownload.cpp b/WebKit/win/WebDownload.cpp index 0893a73..fc72232 100644 --- a/WebKit/win/WebDownload.cpp +++ b/WebKit/win/WebDownload.cpp @@ -27,7 +27,6 @@ #include "WebKitDLL.h" #include "WebDownload.h" -#include "CString.h" #include "DefaultDownloadDelegate.h" #include "MarshallingHelpers.h" #include "WebError.h" @@ -37,6 +36,7 @@ #include "WebURLAuthenticationChallenge.h" #include "WebURLCredential.h" #include "WebURLResponse.h" +#include <wtf/text/CString.h> #include <io.h> #include <sys/stat.h> diff --git a/WebKit/win/WebDownloadCFNet.cpp b/WebKit/win/WebDownloadCFNet.cpp index d1ff23d..a199315 100644 --- a/WebKit/win/WebDownloadCFNet.cpp +++ b/WebKit/win/WebDownloadCFNet.cpp @@ -27,7 +27,6 @@ #include "WebKitDLL.h" #include "WebDownload.h" -#include "CString.h" #include "DefaultDownloadDelegate.h" #include "MarshallingHelpers.h" #include "WebError.h" @@ -39,6 +38,7 @@ #include "WebURLResponse.h" #include <wtf/platform.h> +#include <wtf/text/CString.h> #include <io.h> #include <sys/stat.h> diff --git a/WebKit/win/WebDownloadCurl.cpp b/WebKit/win/WebDownloadCurl.cpp index 608830b..2025922 100644 --- a/WebKit/win/WebDownloadCurl.cpp +++ b/WebKit/win/WebDownloadCurl.cpp @@ -27,7 +27,6 @@ #include "WebKitDLL.h" #include "WebDownload.h" -#include "CString.h" #include "DefaultDownloadDelegate.h" #include "MarshallingHelpers.h" #include "WebError.h" @@ -39,6 +38,7 @@ #include "WebURLResponse.h" #include <wtf/platform.h> +#include <wtf/text/CString.h> #include <io.h> #include <sys/stat.h> diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp index 8e03794..01cc2b1 100644 --- a/WebKit/win/WebFrame.cpp +++ b/WebKit/win/WebFrame.cpp @@ -1074,7 +1074,7 @@ void WebFrame::setTextSizeMultiplier(float multiplier) { Frame* coreFrame = core(this); ASSERT(coreFrame); - coreFrame->setZoomFactor(multiplier, true); + coreFrame->setZoomFactor(multiplier, ZoomTextOnly); } HRESULT WebFrame::inViewSourceMode(BOOL* flag) @@ -1152,7 +1152,7 @@ HRESULT WebFrame::elementDoesAutoComplete(IDOMElement *element, BOOL *result) if (!inputElement) *result = false; else - *result = (inputElement->inputType() == HTMLInputElement::TEXT && inputElement->autoComplete()); + *result = inputElement->isTextField() && inputElement->inputType() != HTMLInputElement::PASSWORD && inputElement->autoComplete(); return S_OK; } @@ -1435,6 +1435,21 @@ HRESULT WebFrame::canProvideDocumentSource(bool* result) return hr; } +HRESULT STDMETHODCALLTYPE WebFrame::layerTreeAsText(BSTR* result) +{ + if (!result) + return E_POINTER; + *result = 0; + + Frame* frame = core(this); + if (!frame) + return E_FAIL; + + String text = frame->layerTreeAsText(); + *result = BString(text).release(); + return S_OK; +} + void WebFrame::frameLoaderDestroyed() { // The FrameLoader going away is equivalent to the Frame going away, @@ -2410,7 +2425,7 @@ HRESULT WebFrame::stringByEvaluatingJavaScriptInScriptWorld(IWebScriptWorld* iWo return S_OK; JSLock lock(SilenceAssertionsOnly); - String resultString = String(result.toString(anyWorldGlobalObject->globalExec())); + String resultString = ustringToString(result.toString(anyWorldGlobalObject->globalExec())); *evaluationResult = BString(resultString).release(); return S_OK; @@ -2473,3 +2488,4 @@ void WebFrame::updateBackground() coreFrame->view()->updateBackgroundRecursively(backgroundColor, webView()->transparent()); } + diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h index f4973ea..0f1e4d8 100644 --- a/WebKit/win/WebFrame.h +++ b/WebKit/win/WebFrame.h @@ -265,6 +265,8 @@ public: virtual HRESULT STDMETHODCALLTYPE visibleContentRect(RECT*); + virtual HRESULT STDMETHODCALLTYPE layerTreeAsText(BSTR*); + // IWebDocumentText virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding( /* [retval][out] */ BOOL* result); diff --git a/WebKit/win/WebHistoryItem.cpp b/WebKit/win/WebHistoryItem.cpp index aa839d6..098eb86 100644 --- a/WebKit/win/WebHistoryItem.cpp +++ b/WebKit/win/WebHistoryItem.cpp @@ -34,13 +34,13 @@ #pragma warning(push, 0) #include <WebCore/BString.h> -#include <WebCore/CString.h> #include <WebCore/HistoryItem.h> #include <WebCore/KURL.h> #pragma warning(pop) #include <wtf/PassOwnPtr.h> #include <wtf/RetainPtr.h> +#include <wtf/text/CString.h> using namespace WebCore; diff --git a/WebKit/win/WebInspector.cpp b/WebKit/win/WebInspector.cpp index e4ac32b..0337711 100644 --- a/WebKit/win/WebInspector.cpp +++ b/WebKit/win/WebInspector.cpp @@ -131,19 +131,11 @@ HRESULT STDMETHODCALLTYPE WebInspector::close() HRESULT STDMETHODCALLTYPE WebInspector::attach() { - if (m_webView) - if (Page* page = m_webView->page()) - page->inspectorController()->attachWindow(); - return S_OK; } HRESULT STDMETHODCALLTYPE WebInspector::detach() { - if (m_webView) - if (Page* page = m_webView->page()) - page->inspectorController()->detachWindow(); - return S_OK; } diff --git a/WebKit/win/WebKit.vcproj/Interfaces.vcproj b/WebKit/win/WebKit.vcproj/Interfaces.vcproj index c6a0add..0dab8a8 100644 --- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj +++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj @@ -1664,6 +1664,26 @@ </FileConfiguration>
</File>
<File
+ RelativePath="..\Interfaces\IWebUserContentURLPattern.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\IWebView.idl"
>
<FileConfiguration
diff --git a/WebKit/win/WebKit.vcproj/WebKit.def b/WebKit/win/WebKit.vcproj/WebKit.def index 9e6e55f..8d091ec 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.def +++ b/WebKit/win/WebKit.vcproj/WebKit.def @@ -20,7 +20,6 @@ EXPORTS WebKitSetShouldUseFontSmoothing WebKitShouldUseFontSmoothing WebKitCreateInstance - WebKitSystemParameterChanged ; These functions are deprecated WebLocalizedString diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj index 57d1da2..36345ed 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.vcproj +++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj @@ -63,7 +63,7 @@ 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;QuartzCore.dll;QuartzCoreInterface.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
/>
<Tool
Name="VCALinkTool"
@@ -140,7 +140,7 @@ 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;QuartzCore.dll;QuartzCoreInterface.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
/>
<Tool
Name="VCALinkTool"
@@ -217,7 +217,7 @@ 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;QuartzCore.dll;QuartzCoreInterface.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
/>
<Tool
Name="VCALinkTool"
@@ -846,6 +846,10 @@ >
</File>
<File
+ RelativePath="..\WebUserContentURLPattern.h"
+ >
+ </File>
+ <File
RelativePath="..\WebView.h"
>
</File>
@@ -1258,6 +1262,10 @@ >
</File>
<File
+ RelativePath="..\WebUserContentURLPattern.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebView.cpp"
>
</File>
diff --git a/WebKit/win/WebKit.vcproj/WebKit_debug.def b/WebKit/win/WebKit.vcproj/WebKit_debug.def index fac9d6f..c15957a 100644 --- a/WebKit/win/WebKit.vcproj/WebKit_debug.def +++ b/WebKit/win/WebKit.vcproj/WebKit_debug.def @@ -20,7 +20,6 @@ EXPORTS WebKitSetShouldUseFontSmoothing WebKitShouldUseFontSmoothing WebKitCreateInstance - WebKitSystemParameterChanged ; These functions are deprecated WebLocalizedString diff --git a/WebKit/win/WebKitClassFactory.cpp b/WebKit/win/WebKitClassFactory.cpp index d243588..8a956e3 100644 --- a/WebKit/win/WebKitClassFactory.cpp +++ b/WebKit/win/WebKitClassFactory.cpp @@ -54,11 +54,11 @@ #include "WebURLCredential.h" #include "WebURLProtectionSpace.h" #include "WebURLResponse.h" +#include "WebUserContentURLPattern.h" #include "WebView.h" #include "WebWorkersPrivate.h" #pragma warning(push, 0) #include <JavaScriptCore/InitializeThreading.h> -#include <WebCore/FontDatabase.h> #include <WebCore/SoftLinking.h> #pragma warning(pop) @@ -87,7 +87,6 @@ WebKitClassFactory::WebKitClassFactory(CLSID targetClass) #endif JSC::initializeThreading(); - WebCore::populateFontDatabase(); gClassCount++; gClassNameCount.add("WebKitClassFactory"); diff --git a/WebKit/win/WebKitDLL.cpp b/WebKit/win/WebKitDLL.cpp index 9f4eaeb..f8aa261 100644 --- a/WebKit/win/WebKitDLL.cpp +++ b/WebKit/win/WebKitDLL.cpp @@ -36,6 +36,7 @@ #include <WebCore/PageGroup.h> #include <WebCore/RenderThemeWin.h> #include <WebCore/SharedBuffer.h> +#include <WebCore/WebCoreInstanceHandle.h> #include <WebCore/Widget.h> #include <wtf/Vector.h> #include <tchar.h> @@ -60,7 +61,7 @@ STDAPI_(BOOL) DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID /*lpRe case DLL_PROCESS_ATTACH: gLockCount = gClassCount = 0; gInstance = hModule; - WebCore::Page::setInstanceHandle(hModule); + WebCore::setInstanceHandle(hModule); return TRUE; case DLL_PROCESS_DETACH: diff --git a/WebKit/win/WebKitGraphics.cpp b/WebKit/win/WebKitGraphics.cpp index 444c43c..d7123b4 100644 --- a/WebKit/win/WebKitGraphics.cpp +++ b/WebKit/win/WebKitGraphics.cpp @@ -34,7 +34,6 @@ #pragma warning(push, 0) #include <WebCore/CharacterNames.h> #include <WebCore/Font.h> -#include <WebCore/FontDatabase.h> #include <WebCore/FontDescription.h> #include <WebCore/FontSelector.h> #include <WebCore/GraphicsContext.h> @@ -52,7 +51,6 @@ using namespace WebCore; static Font makeFont(const WebFontDescription& description) { AtomicString::init(); - populateFontDatabase(); String fontFamilyString(description.family, description.familyLength); @@ -175,9 +173,3 @@ bool WebKitShouldUseFontSmoothing() { return WebCoreShouldUseFontSmoothing(); } - -void WebKitSystemParameterChanged(UINT parameter) -{ - if (parameter == SPI_SETFONTSMOOTHING || parameter == SPI_SETFONTSMOOTHINGTYPE || parameter == SPI_SETFONTSMOOTHINGCONTRAST || parameter == SPI_SETFONTSMOOTHINGORIENTATION) - wkSystemFontSmoothingChanged(); -} diff --git a/WebKit/win/WebKitGraphics.h b/WebKit/win/WebKitGraphics.h index 75ab36c..59c874b 100644 --- a/WebKit/win/WebKitGraphics.h +++ b/WebKit/win/WebKitGraphics.h @@ -74,8 +74,6 @@ unsigned RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescr void WebKitSetShouldUseFontSmoothing(bool); bool WebKitShouldUseFontSmoothing(); -void WebKitSystemParameterChanged(UINT parameter); - } #endif // !defined(WebKitGraphics_h) diff --git a/WebKit/win/WebKitPrefix.h b/WebKit/win/WebKitPrefix.h index 13cf8e0..9b2fc85 100644 --- a/WebKit/win/WebKitPrefix.h +++ b/WebKit/win/WebKitPrefix.h @@ -47,4 +47,5 @@ #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h #endif +#include <CoreFoundation/CoreFoundation.h> #include <WebKit/WebKit.h> diff --git a/WebKit/win/WebLocalizableStrings.cpp b/WebKit/win/WebLocalizableStrings.cpp index 69675e2..ab2db5d 100644 --- a/WebKit/win/WebLocalizableStrings.cpp +++ b/WebKit/win/WebLocalizableStrings.cpp @@ -29,9 +29,9 @@ #include "WebLocalizableStrings.h" #pragma warning(push, 0) -#include <WebCore/CString.h> #include <WebCore/PlatformString.h> #include <WebCore/StringHash.h> +#include <wtf/text/CString.h> #pragma warning(pop) #include <wtf/Assertions.h> diff --git a/WebKit/win/WebMutableURLRequest.cpp b/WebKit/win/WebMutableURLRequest.cpp index 69555c8..655b411 100644 --- a/WebKit/win/WebMutableURLRequest.cpp +++ b/WebKit/win/WebMutableURLRequest.cpp @@ -33,10 +33,10 @@ #pragma warning(push, 0) #include <WebCore/BString.h> #include <WebCore/COMPtr.h> -#include <WebCore/CString.h> #include <WebCore/FormData.h> #include <WebCore/NotImplemented.h> #include <WebCore/ResourceHandle.h> +#include <wtf/text/CString.h> #pragma warning(pop) #include <wtf/RetainPtr.h> diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h index d1e0f5e..c57934c 100644 --- a/WebKit/win/WebPreferenceKeysPrivate.h +++ b/WebKit/win/WebPreferenceKeysPrivate.h @@ -131,8 +131,12 @@ #define WebKitPluginAllowedRunTimePreferenceKey "WebKitPluginAllowedRunTime" -#define WebKitFrameSetFlatteningEnabledPreferenceKey "WebKitFrameSetFlatteningEnabled" +#define WebKitFrameFlatteningEnabledPreferenceKey "WebKitFrameFlatteningEnabled" #define WebKitAcceleratedCompositingEnabledPreferenceKey "WebKitAcceleratedCompositingEnabled" +#define WebKitShowDebugBordersPreferenceKey "WebKitShowDebugBorders" + +#define WebKitShowRepaintCounterPreferenceKey "WebKitShowRepaintCounter" + #define WebKitCustomDragCursorsEnabledPreferenceKey "WebKitCustomDragCursorsEnabled" diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp index 0e44d9f..b5937cb 100644 --- a/WebKit/win/WebPreferences.cpp +++ b/WebKit/win/WebPreferences.cpp @@ -32,7 +32,6 @@ #include "WebNotificationCenter.h" #include "WebPreferenceKeysPrivate.h" -#include <WebCore/CString.h> #include <WebCore/FileSystem.h> #include <WebCore/Font.h> #include <WebCore/PlatformString.h> @@ -46,6 +45,7 @@ #include <tchar.h> #include <wtf/HashMap.h> #include <wtf/OwnArrayPtr.h> +#include <wtf/text/CString.h> #if PLATFORM(CG) #include <CoreGraphics/CoreGraphics.h> @@ -207,7 +207,7 @@ void WebPreferences::initializeDefaultSettings() CFDictionaryAddValue(defaults, CFSTR(WebKitAllowUniversalAccessFromFileURLsPreferenceKey), kCFBooleanFalse); CFDictionaryAddValue(defaults, CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitXSSAuditorEnabledPreferenceKey), kCFBooleanTrue); - CFDictionaryAddValue(defaults, CFSTR(WebKitFrameSetFlatteningEnabledPreferenceKey), kCFBooleanFalse); + CFDictionaryAddValue(defaults, CFSTR(WebKitFrameFlatteningEnabledPreferenceKey), kCFBooleanFalse); CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitPluginsEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitDatabasesEnabledPreferenceKey), kCFBooleanTrue); @@ -256,7 +256,9 @@ void WebPreferences::initializeDefaultSettings() RetainPtr<CFStringRef> pluginAllowedRunTime(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%u"), numeric_limits<unsigned>::max())); CFDictionaryAddValue(defaults, CFSTR(WebKitPluginAllowedRunTimePreferenceKey), pluginAllowedRunTime.get()); - CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanTrue); + CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanFalse); + + CFDictionaryAddValue(defaults, CFSTR(WebKitShowDebugBordersPreferenceKey), kCFBooleanFalse); defaultSettings = defaults; } @@ -420,7 +422,7 @@ void WebPreferences::migrateWebKitPreferencesToCFPreferences() setBoolValue(didMigrateKey, TRUE); m_autoSaves = oldValue; - CString path = oldPreferencesPath().utf8(); + WTF::CString path = oldPreferencesPath().utf8(); RetainPtr<CFURLRef> urlRef(AdoptCF, CFURLCreateFromFileSystemRepresentation(0, reinterpret_cast<const UInt8*>(path.data()), path.length(), false)); if (!urlRef) @@ -821,17 +823,17 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setXSSAuditorEnabled( return S_OK; } -HRESULT STDMETHODCALLTYPE WebPreferences::isFrameSetFlatteningEnabled( +HRESULT STDMETHODCALLTYPE WebPreferences::isFrameFlatteningEnabled( /* [retval][out] */ BOOL* enabled) { - *enabled = boolValueForKey(CFSTR(WebKitFrameSetFlatteningEnabledPreferenceKey)); + *enabled = boolValueForKey(CFSTR(WebKitFrameFlatteningEnabledPreferenceKey)); return S_OK; } -HRESULT STDMETHODCALLTYPE WebPreferences::setFrameSetFlatteningEnabled( +HRESULT STDMETHODCALLTYPE WebPreferences::setFrameFlatteningEnabled( /* [in] */ BOOL enabled) { - setBoolValue(CFSTR(WebKitFrameSetFlatteningEnabledPreferenceKey), enabled); + setBoolValue(CFSTR(WebKitFrameFlatteningEnabledPreferenceKey), enabled); return S_OK; } @@ -1403,6 +1405,30 @@ HRESULT WebPreferences::acceleratedCompositingEnabled(BOOL* enabled) return S_OK; } +HRESULT WebPreferences::showDebugBorders(BOOL* enabled) +{ + *enabled = boolValueForKey(CFSTR(WebKitShowDebugBordersPreferenceKey)); + return S_OK; +} + +HRESULT WebPreferences::setShowDebugBorders(BOOL enabled) +{ + setBoolValue(CFSTR(WebKitShowDebugBordersPreferenceKey), enabled); + return S_OK; +} + +HRESULT WebPreferences::showRepaintCounter(BOOL* enabled) +{ + *enabled = boolValueForKey(CFSTR(WebKitShowRepaintCounterPreferenceKey)); + return S_OK; +} + +HRESULT WebPreferences::setShowRepaintCounter(BOOL enabled) +{ + setBoolValue(CFSTR(WebKitShowRepaintCounterPreferenceKey), enabled); + return S_OK; +} + HRESULT WebPreferences::setCustomDragCursorsEnabled(BOOL enabled) { setBoolValue(CFSTR(WebKitCustomDragCursorsEnabledPreferenceKey), enabled); diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h index e4af17a..241178d 100644 --- a/WebKit/win/WebPreferences.h +++ b/WebKit/win/WebPreferences.h @@ -386,10 +386,10 @@ public: virtual HRESULT STDMETHODCALLTYPE pluginAllowedRunTime( /* [retval][out] */ UINT* allowedRunTime); - virtual HRESULT STDMETHODCALLTYPE isFrameSetFlatteningEnabled( + virtual HRESULT STDMETHODCALLTYPE isFrameFlatteningEnabled( /* [retval][out] */ BOOL* enabled); - virtual HRESULT STDMETHODCALLTYPE setFrameSetFlatteningEnabled( + virtual HRESULT STDMETHODCALLTYPE setFrameFlatteningEnabled( /* [in] */ BOOL enabled); virtual HRESULT STDMETHODCALLTYPE setPreferenceForTest( @@ -402,7 +402,13 @@ public: virtual HRESULT STDMETHODCALLTYPE setCustomDragCursorsEnabled(BOOL); virtual HRESULT STDMETHODCALLTYPE customDragCursorsEnabled(BOOL*); - // WebPreferences + virtual HRESULT STDMETHODCALLTYPE setShowDebugBorders(BOOL); + virtual HRESULT STDMETHODCALLTYPE showDebugBorders(BOOL*); + + virtual HRESULT STDMETHODCALLTYPE setShowRepaintCounter(BOOL); + virtual HRESULT STDMETHODCALLTYPE showRepaintCounter(BOOL*); + + // WebPreferences // This method accesses a different preference key than developerExtrasEnabled. // See <rdar://5343767> for the justification. diff --git a/WebKit/win/WebScriptWorld.cpp b/WebKit/win/WebScriptWorld.cpp index 7bc04eb..9c661d9 100644 --- a/WebKit/win/WebScriptWorld.cpp +++ b/WebKit/win/WebScriptWorld.cpp @@ -136,3 +136,9 @@ HRESULT WebScriptWorld::scriptWorldForGlobalContext(JSGlobalContextRef context, return E_POINTER; return findOrCreateWorld(currentWorld(toJS(context))).copyRefTo(outWorld); } + +HRESULT WebScriptWorld::unregisterWorld() +{ + m_world->unregisterWorld(); + return S_OK; +} diff --git a/WebKit/win/WebScriptWorld.h b/WebKit/win/WebScriptWorld.h index dc7e9db..f088a72 100644 --- a/WebKit/win/WebScriptWorld.h +++ b/WebKit/win/WebScriptWorld.h @@ -52,6 +52,7 @@ private: virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void** ppvObject); virtual HRESULT STDMETHODCALLTYPE standardWorld(IWebScriptWorld**); virtual HRESULT STDMETHODCALLTYPE scriptWorldForGlobalContext(JSGlobalContextRef, IWebScriptWorld**); + virtual HRESULT STDMETHODCALLTYPE unregisterWorld(); ULONG m_refCount; RefPtr<WebCore::DOMWrapperWorld> m_world; diff --git a/WebKit/win/WebTextRenderer.cpp b/WebKit/win/WebTextRenderer.cpp index 7ff2ff3..6d6d9a3 100644 --- a/WebKit/win/WebTextRenderer.cpp +++ b/WebKit/win/WebTextRenderer.cpp @@ -31,12 +31,6 @@ #include "WebKitDLL.h" -#include <CoreFoundation/CFString.h> -#if PLATFORM(CG) -#include <WebKitSystemInterface/WebKitSystemInterface.h> -#endif -#include <wtf/RetainPtr.h> - WebTextRenderer* WebTextRenderer::createInstance() { WebTextRenderer* instance = new WebTextRenderer; @@ -91,9 +85,5 @@ HRESULT STDMETHODCALLTYPE WebTextRenderer::registerPrivateFont( if (!AddFontResourceEx(fontFilePath, FR_PRIVATE, 0)) return E_FAIL; - RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(fontFilePath), static_cast<CFIndex>(wcslen(fontFilePath)))); -#if PLATFORM(CG) - wkAddFontsAtPath(string.get()); -#endif return S_OK; } diff --git a/WebKit/win/WebUserContentURLPattern.cpp b/WebKit/win/WebUserContentURLPattern.cpp new file mode 100644 index 0000000..5312fca --- /dev/null +++ b/WebKit/win/WebUserContentURLPattern.cpp @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebKitDLL.h" +#include "WebUserContentURLPattern.h" + +#include <WebCore/BString.h> +#include <WebCore/KURL.h> + +using namespace WebCore; + +inline WebUserContentURLPattern::WebUserContentURLPattern() + : m_refCount(0) +{ + ++gClassCount; + gClassNameCount.add("WebUserContentURLPattern"); +} + +WebUserContentURLPattern::~WebUserContentURLPattern() +{ + --gClassCount; + gClassNameCount.remove("WebUserContentURLPattern"); +} + +COMPtr<WebUserContentURLPattern> WebUserContentURLPattern::createInstance() +{ + return new WebUserContentURLPattern; +} + +ULONG WebUserContentURLPattern::AddRef() +{ + return ++m_refCount; +} + +ULONG WebUserContentURLPattern::Release() +{ + ULONG newRefCount = --m_refCount; + if (!newRefCount) + delete this; + return newRefCount; +} + +HRESULT WebUserContentURLPattern::QueryInterface(REFIID riid, void** ppvObject) +{ + if (!ppvObject) + return E_POINTER; + *ppvObject = 0; + + if (IsEqualIID(riid, __uuidof(WebUserContentURLPattern))) + *ppvObject = this; + else if (IsEqualIID(riid, __uuidof(IWebUserContentURLPattern))) + *ppvObject = static_cast<IWebUserContentURLPattern*>(this); + else if (IsEqualIID(riid, IID_IUnknown)) + *ppvObject = static_cast<IUnknown*>(this); + else + return E_NOINTERFACE; + + AddRef(); + return S_OK; +} + +HRESULT WebUserContentURLPattern::parse(BSTR patternString) +{ + m_pattern = UserContentURLPattern(String(patternString, SysStringLen(patternString))); + return S_OK; +} + +HRESULT WebUserContentURLPattern::isValid(BOOL* isValid) +{ + if (!isValid) + return E_POINTER; + *isValid = m_pattern.isValid(); + return S_OK; +} + +HRESULT WebUserContentURLPattern::scheme(BSTR* scheme) +{ + if (!scheme) + return E_POINTER; + *scheme = BString(m_pattern.scheme()).release(); + return S_OK; +} + +HRESULT WebUserContentURLPattern::host(BSTR* host) +{ + if (!host) + return E_POINTER; + *host = BString(m_pattern.host()).release(); + return S_OK; +} + +HRESULT WebUserContentURLPattern::matchesSubdomains(BOOL* matches) +{ + if (!matches) + return E_POINTER; + *matches = m_pattern.matchSubdomains(); + return S_OK; +} diff --git a/WebKit/win/WebUserContentURLPattern.h b/WebKit/win/WebUserContentURLPattern.h new file mode 100644 index 0000000..143f644 --- /dev/null +++ b/WebKit/win/WebUserContentURLPattern.h @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebUserContentURLPattern_h +#define WebUserContentURLPattern_h + +#include <WebCore/COMPtr.h> +#include <WebCore/UserContentURLPattern.h> + +namespace WebCore { + class UserContentURLPattern; +} + +class WebUserContentURLPattern : public Noncopyable, public IWebUserContentURLPattern { +public: + static COMPtr<WebUserContentURLPattern> createInstance(); + + virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE Release(); + +private: + WebUserContentURLPattern(); + ~WebUserContentURLPattern(); + + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void** ppvObject); + virtual HRESULT STDMETHODCALLTYPE parse(BSTR patternString); + virtual HRESULT STDMETHODCALLTYPE isValid(BOOL*); + virtual HRESULT STDMETHODCALLTYPE scheme(BSTR*); + virtual HRESULT STDMETHODCALLTYPE host(BSTR*); + virtual HRESULT STDMETHODCALLTYPE matchesSubdomains(BOOL* matches); + + ULONG m_refCount; + WebCore::UserContentURLPattern m_pattern; +}; + +#endif // WebScriptWorld_h diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index 8636d15..da2c436 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -66,13 +66,13 @@ #include <WebCore/BString.h> #include <WebCore/BackForwardList.h> #include <WebCore/BitmapInfo.h> -#include <WebCore/CString.h> #include <WebCore/Cache.h> #include <WebCore/Chrome.h> #include <WebCore/ContextMenu.h> #include <WebCore/ContextMenuController.h> #include <WebCore/CookieStorageWin.h> #include <WebCore/Cursor.h> +#include <WebCore/Database.h> #include <WebCore/Document.h> #include <WebCore/DragController.h> #include <WebCore/DragData.h> @@ -150,6 +150,7 @@ #include <tchar.h> #include <windowsx.h> #include <wtf/HashSet.h> +#include <wtf/text/CString.h> // Soft link functions for gestures and panning feedback SOFT_LINK_LIBRARY(USER32); @@ -735,6 +736,10 @@ void WebView::deleteBackingStore() } m_backingStoreBitmap.clear(); m_backingStoreDirtyRegion.clear(); +#if USE(ACCELERATED_COMPOSITING) + if (m_layerRenderer) + m_layerRenderer->setBackingStoreDirty(false); +#endif m_backingStoreSize.cx = m_backingStoreSize.cy = 0; } @@ -783,6 +788,11 @@ void WebView::addToDirtyRegion(HRGN newRegion) } else m_backingStoreDirtyRegion.set(newRegion); +#if USE(ACCELERATED_COMPOSITING) + if (m_layerRenderer) + m_layerRenderer->setBackingStoreDirty(true); +#endif + if (m_uiDelegatePrivate) m_uiDelegatePrivate->webViewDidInvalidate(this); } @@ -909,6 +919,10 @@ void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStore m_uiDelegatePrivate->webViewPainted(this); m_backingStoreDirtyRegion.clear(); +#if USE(ACCELERATED_COMPOSITING) + if (m_layerRenderer) + m_layerRenderer->setBackingStoreDirty(false); +#endif } if (!dc) { @@ -2879,9 +2893,9 @@ HRESULT STDMETHODCALLTYPE WebView::setPageSizeMultiplier( void WebView::setZoomMultiplier(float multiplier, bool isTextOnly) { m_zoomMultiplier = multiplier; - m_page->settings()->setZoomsTextOnly(isTextOnly); + m_page->settings()->setZoomMode(isTextOnly ? ZoomTextOnly : ZoomPage); if (Frame* coreFrame = core(m_mainFrame)) - coreFrame->setZoomFactor(multiplier, isTextOnly); + coreFrame->setZoomFactor(multiplier, isTextOnly ? ZoomTextOnly : ZoomPage); } HRESULT STDMETHODCALLTYPE WebView::textSizeMultiplier( @@ -2900,7 +2914,8 @@ HRESULT STDMETHODCALLTYPE WebView::pageSizeMultiplier( float WebView::zoomMultiplier(bool isTextOnly) { - if (isTextOnly != m_page->settings()->zoomsTextOnly()) + ZoomMode zoomMode = isTextOnly ? ZoomTextOnly : ZoomPage; + if (zoomMode != m_page->settings()->zoomMode()) return 1.0f; return m_zoomMultiplier; } @@ -3049,7 +3064,7 @@ HRESULT STDMETHODCALLTYPE WebView::stringByEvaluatingJavaScriptFromString( else if (scriptExecutionResult.isString()) { JSLock lock(JSC::SilenceAssertionsOnly); JSC::ExecState* exec = coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec(); - *result = BString(String(scriptExecutionResult.getString(exec))); + *result = BString(ustringToString(scriptExecutionResult.getString(exec))); } return S_OK; @@ -3125,6 +3140,14 @@ HRESULT STDMETHODCALLTYPE WebView::preferencesIdentifier( return E_NOTIMPL; } +static void systemParameterChanged(WPARAM parameter) +{ +#if PLATFORM(CG) + if (parameter == SPI_SETFONTSMOOTHING || parameter == SPI_SETFONTSMOOTHINGTYPE || parameter == SPI_SETFONTSMOOTHINGCONTRAST || parameter == SPI_SETFONTSMOOTHINGORIENTATION) + wkSystemFontSmoothingChanged(); +#endif +} + void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM) { switch (message) { @@ -3133,6 +3156,9 @@ void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM) if (!wParam) deleteBackingStoreSoon(); break; + case WM_SETTINGCHANGE: + systemParameterChanged(wParam); + break; } } @@ -3402,6 +3428,9 @@ HRESULT STDMETHODCALLTYPE WebView::isLoading( *isLoading = FALSE; + if (!m_mainFrame) + return E_FAIL; + if (SUCCEEDED(m_mainFrame->dataSource(&dataSource))) dataSource->isLoading(isLoading); @@ -3669,7 +3698,7 @@ HRESULT STDMETHODCALLTYPE WebView::canMakeTextLarger( /* [in] */ IUnknown* /*sender*/, /* [retval][out] */ BOOL* result) { - bool canGrowMore = canZoomIn(m_page->settings()->zoomsTextOnly()); + bool canGrowMore = canZoomIn(m_page->settings()->zoomMode() == ZoomTextOnly); *result = canGrowMore ? TRUE : FALSE; return S_OK; } @@ -3691,7 +3720,7 @@ bool WebView::canZoomIn(bool isTextOnly) HRESULT STDMETHODCALLTYPE WebView::makeTextLarger( /* [in] */ IUnknown* /*sender*/) { - return zoomIn(m_page->settings()->zoomsTextOnly()); + return zoomIn(m_page->settings()->zoomMode() == ZoomTextOnly); } HRESULT STDMETHODCALLTYPE WebView::zoomPageIn( @@ -3712,7 +3741,7 @@ HRESULT STDMETHODCALLTYPE WebView::canMakeTextSmaller( /* [in] */ IUnknown* /*sender*/, /* [retval][out] */ BOOL* result) { - bool canShrinkMore = canZoomOut(m_page->settings()->zoomsTextOnly()); + bool canShrinkMore = canZoomOut(m_page->settings()->zoomMode() == ZoomTextOnly); *result = canShrinkMore ? TRUE : FALSE; return S_OK; } @@ -3734,7 +3763,7 @@ bool WebView::canZoomOut(bool isTextOnly) HRESULT STDMETHODCALLTYPE WebView::makeTextSmaller( /* [in] */ IUnknown* /*sender*/) { - return zoomOut(m_page->settings()->zoomsTextOnly()); + return zoomOut(m_page->settings()->zoomMode() == ZoomTextOnly); } HRESULT STDMETHODCALLTYPE WebView::zoomPageOut( @@ -4565,7 +4594,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) hr = preferences->zoomsTextOnly(&enabled); if (FAILED(hr)) return hr; - settings->setZoomsTextOnly(!!enabled); + settings->setZoomMode(enabled ? ZoomTextOnly : ZoomPage); settings->setShowsURLsInToolTips(false); settings->setForceFTPDirectoryListings(true); @@ -4596,10 +4625,12 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) return hr; settings->setOfflineWebApplicationCacheEnabled(enabled); +#if ENABLE(DATABASE) hr = prefsPrivate->databasesEnabled(&enabled); if (FAILED(hr)) return hr; - settings->setDatabasesEnabled(enabled); + Database::setIsAvailable(enabled); +#endif hr = prefsPrivate->localStorageEnabled(&enabled); if (FAILED(hr)) @@ -4649,10 +4680,10 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) return hr; settings->setPluginAllowedRunTime(runTime); - hr = prefsPrivate->isFrameSetFlatteningEnabled(&enabled); + hr = prefsPrivate->isFrameFlatteningEnabled(&enabled); if (FAILED(hr)) return hr; - settings->setFrameSetFlatteningEnabled(enabled); + settings->setFrameFlatteningEnabled(enabled); #if USE(ACCELERATED_COMPOSITING) hr = prefsPrivate->acceleratedCompositingEnabled(&enabled); @@ -4661,6 +4692,16 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) settings->setAcceleratedCompositingEnabled(enabled); #endif + hr = prefsPrivate->showDebugBorders(&enabled); + if (FAILED(hr)) + return hr; + settings->setShowDebugBorders(enabled); + + hr = prefsPrivate->showRepaintCounter(&enabled); + if (FAILED(hr)) + return hr; + settings->setShowRepaintCounter(enabled); + #if ENABLE(3D_CANVAS) settings->setWebGLEnabled(true); #endif // ENABLE(3D_CANVAS) @@ -5993,15 +6034,21 @@ HRESULT WebView::invalidateBackingStore(const RECT* rect) return S_OK; } -HRESULT WebView::whiteListAccessFromOrigin(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains) +HRESULT WebView::addOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains) { - SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(String(sourceOrigin, SysStringLen(sourceOrigin))), String(destinationProtocol, SysStringLen(destinationProtocol)), String(destinationHost, SysStringLen(destinationHost)), allowDestinationSubdomains); + SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(String(sourceOrigin, SysStringLen(sourceOrigin))), String(destinationProtocol, SysStringLen(destinationProtocol)), String(destinationHost, SysStringLen(destinationHost)), allowDestinationSubdomains); return S_OK; } -HRESULT WebView::resetOriginAccessWhiteLists() +HRESULT WebView::removeOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains) { - SecurityOrigin::resetOriginAccessWhiteLists(); + SecurityOrigin::removeOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(String(sourceOrigin, SysStringLen(sourceOrigin))), String(destinationProtocol, SysStringLen(destinationProtocol)), String(destinationHost, SysStringLen(destinationHost)), allowDestinationSubdomains); + return S_OK; +} + +HRESULT WebView::resetOriginAccessWhitelists() +{ + SecurityOrigin::resetOriginAccessWhitelists(); return S_OK; } @@ -6041,7 +6088,7 @@ void WebView::downloadURL(const KURL& url) } #if USE(ACCELERATED_COMPOSITING) -void WebView::setRootChildLayer(WebCore::PlatformLayer* layer) +void WebView::setRootChildLayer(WebCore::WKCACFLayer* layer) { setAcceleratedCompositing(layer ? true : false); if (m_layerRenderer) @@ -6061,7 +6108,7 @@ void WebView::setAcceleratedCompositing(bool accelerated) // Create the root layer ASSERT(m_viewWindow); m_layerRenderer->setHostWindow(m_viewWindow); - updateRootLayerContents(); + m_layerRenderer->createRenderer(); } } else { m_layerRenderer = 0; @@ -6100,7 +6147,7 @@ void WebView::updateRootLayerContents() return; FrameView* frameView = coreFrame->view(); - m_layerRenderer->setScrollFrame(IntRect(frameView->scrollX(), frameView->scrollY(), frameView->layoutWidth(), frameView->layoutHeight())); + m_layerRenderer->setScrollFrame(IntPoint(frameView->scrollX(), frameView->scrollY()), IntSize(frameView->layoutWidth(), frameView->layoutHeight())); } #endif @@ -6242,6 +6289,12 @@ HRESULT WebView::setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR s return S_OK; } +HRESULT WebView::registerURLSchemeAsSecure(BSTR scheme) +{ + SecurityOrigin::registerURLSchemeAsSecure(toString(scheme)); + return S_OK; +} + class EnumTextMatches : public IEnumTextMatches { long m_ref; diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h index 56fb40c..48f3ef8 100644 --- a/WebKit/win/WebView.h +++ b/WebKit/win/WebView.h @@ -761,9 +761,9 @@ public: virtual HRESULT STDMETHODCALLTYPE invalidateBackingStore(const RECT*); - virtual HRESULT STDMETHODCALLTYPE whiteListAccessFromOrigin(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains); - virtual HRESULT STDMETHODCALLTYPE resetOriginAccessWhiteLists(); - + virtual HRESULT STDMETHODCALLTYPE addOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains); + virtual HRESULT STDMETHODCALLTYPE removeOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains); + virtual HRESULT STDMETHODCALLTYPE resetOriginAccessWhitelists(); virtual HRESULT STDMETHODCALLTYPE setHistoryDelegate(IWebHistoryDelegate* historyDelegate); virtual HRESULT STDMETHODCALLTYPE historyDelegate(IWebHistoryDelegate** historyDelegate); @@ -779,6 +779,7 @@ public: virtual HRESULT STDMETHODCALLTYPE geolocationDidFailWithError(IWebError* error); virtual HRESULT STDMETHODCALLTYPE setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme); + virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsSecure(BSTR); // WebView bool shouldUseEmbeddedView(const WebCore::String& mimeType) const; @@ -875,7 +876,7 @@ public: #if USE(ACCELERATED_COMPOSITING) void setRootLayerNeedsDisplay() { if (m_layerRenderer) m_layerRenderer->setNeedsDisplay(); } - void setRootChildLayer(WebCore::PlatformLayer* layer); + void setRootChildLayer(WebCore::WKCACFLayer* layer); #endif void enterFullscreenForNode(WebCore::Node*); diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog index 7d6d9dd..6e04904 100644 --- a/WebKit/wx/ChangeLog +++ b/WebKit/wx/ChangeLog @@ -1,3 +1,193 @@ +2010-04-20 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebKitSupport/FrameLoaderClientWx.cpp: + (WebCore::FrameLoaderClientWx::committedLoad): + +2010-04-20 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Change a parameter type of chooseIconForFiles() + https://bugs.webkit.org/show_bug.cgi?id=37504 + + * WebKitSupport/ChromeClientWx.cpp: + (WebCore::ChromeClientWx::chooseIconForFiles): + * WebKitSupport/ChromeClientWx.h: + +2010-04-19 Kevin Ollivier <kevino@theolliviers.com> + + Build fix, add stub for new FrameLoaderClient method. + + * WebKitSupport/FrameLoaderClientWx.cpp: + (WebCore::FrameLoaderClientWx::dispatchDidChangeIcons): + * WebKitSupport/FrameLoaderClientWx.h: + +2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r57468. + http://trac.webkit.org/changeset/57468 + https://bugs.webkit.org/show_bug.cgi?id=37433 + + Broke the world... Must have applied the patch wrong + (Requested by abarth on #webkit). + + * WebKitSupport/FrameLoaderClientWx.cpp: + (WebCore::FrameLoaderClientWx::committedLoad): + +2010-04-11 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Factor DocumentWriter out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=37175 + + Update these callsites because the method moved to DocumentWriter. + + * WebKitSupport/FrameLoaderClientWx.cpp: + (WebCore::FrameLoaderClientWx::committedLoad): + +2010-04-07 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Yury Semikhatsky. + + Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest() + https://bugs.webkit.org/show_bug.cgi?id=36949 + + * WebKitSupport/FrameLoaderClientWx.cpp: + * WebKitSupport/FrameLoaderClientWx.h: + +2010-03-31 Marcus Bulach <bulach@chromium.org> + + Reviewed by Jeremy Orlow. + + Adds Geolocation param for cancelGeolocationPermissionRequestForFrame. + https://bugs.webkit.org/show_bug.cgi?id=35031 + + * WebKitSupport/ChromeClientWx.h: + (WebCore::ChromeClientWx::cancelGeolocationPermissionRequestForFrame): + +2010-03-30 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=36866 + Move CString to WTF + + * WebFrame.cpp: + * WebView.cpp: + +2010-03-30 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix after method name change. + + * WebFrame.cpp: + (wxWebFrame::RunScript): + +2010-03-28 Alexey Proskuryakov <ap@apple.com> + + Build fix. Include WindowsKeyboardCodes.h instead of KeyboardCodes.h. + + * WebKitSupport/EditorClientWx.cpp: + +2010-03-24 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Make Icon::createIconForFiles() optional. + https://bugs.webkit.org/show_bug.cgi?id=35072 + + - Rename iconForFiles() to chooseIconForFiles(). + - Call Icon::createIconForFiles() from chooseIconForFiles(). + + * WebKitSupport/ChromeClientWx.cpp: + (WebCore::ChromeClientWx::chooseIconForFiles): + * WebKitSupport/ChromeClientWx.h: + +2010-03-20 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fixes after recent changes, including move of setDatabasesEnabled from Settings. + + * WebFrame.cpp: + (wxWebFrame::RunScript): + * WebKitSupport/InspectorClientWx.cpp: + (WebCore::InspectorClientWx::openInspectorFrontend): + * WebSettings.cpp: + * WebSettings.h: + * WebView.cpp: + (wxWebView::Create): + (wxWebView::SetDatabasesEnabled): + (wxWebView::AreDatabasesEnabled): + * WebView.h: + +2010-03-16 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. + + Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder + https://bugs.webkit.org/show_bug.cgi?id=35036 + + * WebKitSupport/InspectorClientWx.cpp: + * WebKitSupport/InspectorClientWx.h: + +2010-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. + + * WebKitSupport/ChromeClientWx.cpp: + * WebKitSupport/ChromeClientWx.h: + +2010-03-02 Adam Treat <atreat@rim.com> + + Reviewed by Dave Hyatt. + + Adapt the wx port to the refactoring of repaint methods. + + https://bugs.webkit.org/show_bug.cgi?id=34214 + + * WebKitSupport/ChromeClientWx.cpp: + (WebCore::ChromeClientWx::invalidateContents): + (WebCore::ChromeClientWx::invalidateWindow): + (WebCore::ChromeClientWx::invalidateContentsForSlowScroll): + (WebCore::ChromeClientWx::invalidateContentsAndWindow): + * WebKitSupport/ChromeClientWx.h: + +2010-03-01 Jakob Petsovits <jpetsovits@rim.com> + + Reviewed by Adam Barth. + + Adapt to the new ZoomMode enum. + https://bugs.webkit.org/show_bug.cgi?id=35347 + + * WebFrame.cpp: + (wxWebFrame::IncreaseTextSize): + (wxWebFrame::DecreaseTextSize): + (wxWebFrame::ResetTextSize): + +2010-02-23 Steve Block <steveblock@google.com> + + Reviewed by Darin Adler. + + Adds ChromeClient::cancelGeolocationPermissionRequestForFrame + https://bugs.webkit.org/show_bug.cgi?id=34962 + + This method is required so that a Geolocation object can cancel an + asynchronous permission request. This allows the chrome client to cancel + any UI it is showing for the permission request. + + * WebKitSupport/ChromeClientWx.h: + (WebCore::ChromeClientWx::cancelGeolocationPermissionRequestForFrame): + 2010-02-17 Dmitry Titov <dimich@chromium.org> Reviewed by David Levin, Darin Fisher, Simon Hausmann. diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp index 6cda197..78427e4 100644 --- a/WebKit/wx/WebFrame.cpp +++ b/WebKit/wx/WebFrame.cpp @@ -25,7 +25,6 @@ #include "config.h" #include "BackForwardList.h" -#include "CString.h" #include "Document.h" #include "Editor.h" #include "Element.h" @@ -50,6 +49,7 @@ #include "JSDOMBinding.h" #include <runtime/JSValue.h> #include <runtime/UString.h> +#include <wtf/text/CString.h> #include "EditorClientWx.h" #include "FrameLoaderClientWx.h" @@ -201,12 +201,12 @@ wxString wxWebFrame::RunScript(const wxString& javascript) wxASSERT_MSG(hasLoaded, wxT("Document must be loaded before calling RunScript.")); if (hasLoaded) { WebCore::ScriptController* controller = m_impl->frame->script(); - bool jsEnabled = controller->canExecuteScripts(); + bool jsEnabled = controller->canExecuteScripts(WebCore::AboutToExecuteScript); wxASSERT_MSG(jsEnabled, wxT("RunScript requires JavaScript to be enabled.")); if (jsEnabled) { JSC::JSValue result = controller->executeScript(javascript, true).jsValue(); if (result) - returnValue = wxString(result.toString(m_impl->frame->script()->globalObject(WebCore::mainThreadNormalWorld())->globalExec()).UTF8String().c_str(), wxConvUTF8); + returnValue = wxString(result.toString(m_impl->frame->script()->globalObject(WebCore::mainThreadNormalWorld())->globalExec()).UTF8String().data(), wxConvUTF8); } } } @@ -316,7 +316,7 @@ void wxWebFrame::IncreaseTextSize() { if (CanIncreaseTextSize()) { m_textMagnifier = m_textMagnifier*TextSizeMultiplierRatio; - m_impl->frame->setZoomFactor(m_textMagnifier, true); + m_impl->frame->setZoomFactor(m_textMagnifier, WebCore::ZoomTextOnly); } } @@ -333,7 +333,7 @@ void wxWebFrame::DecreaseTextSize() { if (CanDecreaseTextSize()) { m_textMagnifier = m_textMagnifier/TextSizeMultiplierRatio; - m_impl->frame->setZoomFactor(m_textMagnifier, true); + m_impl->frame->setZoomFactor(m_textMagnifier, WebCore::ZoomTextOnly); } } @@ -341,7 +341,7 @@ void wxWebFrame::ResetTextSize() { m_textMagnifier = 1.0; if (m_impl->frame) - m_impl->frame->setZoomFactor(m_textMagnifier, true); + m_impl->frame->setZoomFactor(m_textMagnifier, WebCore::ZoomTextOnly); } void wxWebFrame::MakeEditable(bool enable) diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp index ac25daf..a19644d 100644 --- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp +++ b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp @@ -35,6 +35,7 @@ #include "FloatRect.h" #include "Frame.h" #include "FrameLoadRequest.h" +#include "Icon.h" #include "NotImplemented.h" #include "PlatformString.h" #include "WindowFeatures.h" @@ -336,14 +337,24 @@ IntRect ChromeClientWx::windowResizerRect() const return IntRect(); } -void ChromeClientWx::repaint(const IntRect& rect, bool contentChanged, bool immediate, bool repaintContentOnly) +void ChromeClientWx::invalidateWindow(const IntRect& rect, bool immediate) +{ + if (immediate) + m_webView->Update(); +} + +void ChromeClientWx::invalidateContentsForSlowScroll(const IntRect& rect, bool immediate) +{ + invalidateContentsAndWindow(rect, immediate); +} + +void ChromeClientWx::invalidateContentsAndWindow(const IntRect& rect, bool immediate) { if (!m_webView) return; - - if (contentChanged) - m_webView->RefreshRect(rect); - + + m_webView->RefreshRect(rect); + if (immediate) { m_webView->Update(); } @@ -431,9 +442,9 @@ void ChromeClientWx::runOpenPanel(Frame*, PassRefPtr<FileChooser>) notImplemented(); } -void ChromeClientWx::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) +void ChromeClientWx::chooseIconForFiles(const Vector<String>& filenames, FileChooser* chooser) { - notImplemented(); + chooser->iconLoaded(Icon::createIconForFiles(filenames)); } bool ChromeClientWx::setCursor(PlatformCursorHandle) diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.h b/WebKit/wx/WebKitSupport/ChromeClientWx.h index 71ae48d..b900f3e 100644 --- a/WebKit/wx/WebKitSupport/ChromeClientWx.h +++ b/WebKit/wx/WebKitSupport/ChromeClientWx.h @@ -102,8 +102,11 @@ public: virtual void scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect); virtual void updateBackingStore(); - virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false); + virtual void invalidateWindow(const IntRect&, bool); + virtual void invalidateContentsAndWindow(const IntRect&, bool); + virtual void invalidateContentsForSlowScroll(const IntRect&, bool); virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect); + virtual IntPoint screenToWindow(const IntPoint&) const; virtual IntRect windowToScreen(const IntRect&) const; virtual PlatformPageClient platformPageClient() const; @@ -125,7 +128,7 @@ public: #endif virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); - virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); + virtual void chooseIconForFiles(const Vector<String>&, FileChooser*); virtual void formStateDidChange(const Node*) { } @@ -136,6 +139,7 @@ public: virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {} virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*); + virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { } private: wxWebView* m_webView; diff --git a/WebKit/wx/WebKitSupport/EditorClientWx.cpp b/WebKit/wx/WebKitSupport/EditorClientWx.cpp index b130557..627ebf9 100644 --- a/WebKit/wx/WebKitSupport/EditorClientWx.cpp +++ b/WebKit/wx/WebKitSupport/EditorClientWx.cpp @@ -34,17 +34,16 @@ #include "FrameView.h" #include "HostWindow.h" #include "KeyboardEvent.h" -#include "KeyboardCodes.h" #include "NotImplemented.h" #include "Page.h" #include "PlatformKeyboardEvent.h" #include "PlatformString.h" #include "SelectionController.h" - #include "WebFrame.h" #include "WebFramePrivate.h" #include "WebView.h" #include "WebViewPrivate.h" +#include "WindowsKeyboardCodes.h" #include <stdio.h> diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp index 6afdd88..a163727 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp @@ -325,6 +325,11 @@ void FrameLoaderClientWx::dispatchDidFinishDocumentLoad() } } +void FrameLoaderClientWx::dispatchDidChangeIcons() +{ + notImplemented(); +} + void FrameLoaderClientWx::dispatchDidFinishLoad() { notImplemented(); @@ -604,7 +609,7 @@ void FrameLoaderClientWx::committedLoad(WebCore::DocumentLoader* loader, const c return; if (!m_pluginView) { FrameLoader* fl = loader->frameLoader(); - fl->setEncoding(m_response.textEncodingName(), false); + fl->writer()->setEncoding(m_response.textEncodingName(), false); fl->addData(data, length); } @@ -733,11 +738,6 @@ bool FrameLoaderClientWx::dispatchDidLoadResourceFromMemoryCache(DocumentLoader* return false; } -void FrameLoaderClientWx::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&) -{ - notImplemented(); -} - void FrameLoaderClientWx::dispatchDidFailProvisionalLoad(const ResourceError&) { notImplemented(); diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h index 62218ff..e9f566b 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h @@ -108,6 +108,7 @@ namespace WebCore { virtual void dispatchDidFinishLoad(); virtual void dispatchDidFirstLayout(); virtual void dispatchDidFirstVisuallyNonEmptyLayout(); + virtual void dispatchDidChangeIcons(); virtual void dispatchShow(); virtual void cancelPolicyCheck(); @@ -184,7 +185,6 @@ namespace WebCore { virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long); virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long, const ResourceError&); virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int); - virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&); virtual void dispatchDidFailProvisionalLoad(const ResourceError&); virtual void dispatchDidFailLoad(const ResourceError&); diff --git a/WebKit/wx/WebKitSupport/InspectorClientWx.cpp b/WebKit/wx/WebKitSupport/InspectorClientWx.cpp index ff21ae0..5dc9ac7 100644 --- a/WebKit/wx/WebKitSupport/InspectorClientWx.cpp +++ b/WebKit/wx/WebKitSupport/InspectorClientWx.cpp @@ -47,45 +47,7 @@ void InspectorClientWx::inspectorDestroyed() notImplemented(); } -Page* InspectorClientWx::createPage() -{ - notImplemented(); - return 0; -} - -String InspectorClientWx::localizedStringsURL() -{ - notImplemented(); - return String(); -} - -String InspectorClientWx::hiddenPanels() -{ - notImplemented(); - return String(); -} - -void InspectorClientWx::showWindow() -{ - notImplemented(); -} - -void InspectorClientWx::closeWindow() -{ - notImplemented(); -} - -void InspectorClientWx::attachWindow() -{ - notImplemented(); -} - -void InspectorClientWx::detachWindow() -{ - notImplemented(); -} - -void InspectorClientWx::setAttachedWindowHeight(unsigned height) +void InspectorClientWx::openInspectorFrontend(WebCore::InspectorController*) { notImplemented(); } @@ -100,11 +62,6 @@ void InspectorClientWx::hideHighlight() notImplemented(); } -void InspectorClientWx::inspectedURLChanged(const String& newURL) -{ - notImplemented(); -} - void InspectorClientWx::populateSetting(const String& key, String* setting) { notImplemented(); @@ -115,9 +72,4 @@ void InspectorClientWx::storeSetting(const String& key, const String& setting) notImplemented(); } -void InspectorClientWx::inspectorWindowObjectCleared() -{ - notImplemented(); -} - }; diff --git a/WebKit/wx/WebKitSupport/InspectorClientWx.h b/WebKit/wx/WebKitSupport/InspectorClientWx.h index f905817..7675dc1 100644 --- a/WebKit/wx/WebKitSupport/InspectorClientWx.h +++ b/WebKit/wx/WebKitSupport/InspectorClientWx.h @@ -41,29 +41,13 @@ public: virtual void inspectorDestroyed(); - virtual Page* createPage(); - - virtual String localizedStringsURL(); - - virtual String hiddenPanels(); - - virtual void showWindow(); - virtual void closeWindow(); - - virtual void attachWindow(); - virtual void detachWindow(); - - virtual void setAttachedWindowHeight(unsigned height); + virtual void openInspectorFrontend(WebCore::InspectorController*); virtual void highlight(Node*); virtual void hideHighlight(); - virtual void inspectedURLChanged(const String& newURL); - virtual void populateSetting(const String& key, String* value); virtual void storeSetting(const String& key, const String& value); - - virtual void inspectorWindowObjectCleared(); }; } // namespace WebCore diff --git a/WebKit/wx/WebSettings.cpp b/WebKit/wx/WebSettings.cpp index 2aa246c..9317546 100644 --- a/WebKit/wx/WebSettings.cpp +++ b/WebKit/wx/WebSettings.cpp @@ -102,20 +102,6 @@ bool wxWebSettings::IsJavaScriptEnabled() const return false; } -void wxWebSettings::SetDatabasesEnabled(bool enabled) -{ - if (m_settings) - m_settings->setDatabasesEnabled(enabled); -} - -bool wxWebSettings::AreDatabasesEnabled() const -{ - if (m_settings) - return m_settings->databasesEnabled(); - - return false; -} - void wxWebSettings::SetLocalStoragePath(const wxString& path) { if (m_settings) diff --git a/WebKit/wx/WebSettings.h b/WebKit/wx/WebSettings.h index e526b70..148755a 100644 --- a/WebKit/wx/WebSettings.h +++ b/WebKit/wx/WebSettings.h @@ -119,16 +119,6 @@ public: bool IsJavaScriptEnabled() const; /** - Sets whether or not web pages can create databases. - */ - void SetDatabasesEnabled(bool enabled); - - /** - Returns whether or not the WebView runs JavaScript code. - */ - bool AreDatabasesEnabled() const; - - /** Sets the path where local data will be stored. */ void SetLocalStoragePath(const wxString& path); diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp index c448bbf..95730b9 100644 --- a/WebKit/wx/WebView.cpp +++ b/WebKit/wx/WebView.cpp @@ -28,7 +28,6 @@ #include "ContextMenu.h" #include "ContextMenuItem.h" #include "ContextMenuController.h" -#include "CString.h" #include "Document.h" #include "Element.h" #include "Editor.h" @@ -69,8 +68,10 @@ #include "JSDOMBinding.h" #include <runtime/JSValue.h> #include <runtime/UString.h> +#include <wtf/text/CString.h> #if ENABLE(DATABASE) +#include "Database.h" #include "DatabaseTracker.h" #endif @@ -336,7 +337,7 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position, settings->setJavaScriptEnabled(true); #if ENABLE(DATABASE) - settings->setDatabasesEnabled(true); + SetDatabasesEnabled(true); #endif m_isInitialized = true; @@ -938,6 +939,23 @@ wxString wxWebView::GetDatabaseDirectory() #endif } +/* static */ +void wxWebView::SetDatabasesEnabled(bool enabled) +{ +#if ENABLE(DATABASE) + WebCore::Database::setIsAvailable(enabled); +#endif +} + +/* static */ +bool wxWebView::AreDatabasesEnabled() +{ +#if ENABLE(DATABASE) + return WebCore::Database::isAvailable(); +#endif + return false; +} + static WebCore::ResourceHandleManager::ProxyType curlProxyType(wxProxyType type) { switch (type) { diff --git a/WebKit/wx/WebView.h b/WebKit/wx/WebView.h index 9a6546c..f7b41dc 100644 --- a/WebKit/wx/WebView.h +++ b/WebKit/wx/WebView.h @@ -195,6 +195,16 @@ public: static void SetDatabaseDirectory(const wxString& databaseDirectory); static wxString GetDatabaseDirectory(); + + /** + Sets whether or not web pages can create databases. + */ + static void SetDatabasesEnabled(bool enabled); + + /** + Returns whether or not the WebView runs JavaScript code. + */ + static bool AreDatabasesEnabled(); static void SetProxyInfo(const wxString& host = wxEmptyString, unsigned long port = 0, |