diff options
Diffstat (limited to 'Source/WebKit/gtk')
-rw-r--r-- | Source/WebKit/gtk/ChangeLog | 259 | ||||
-rw-r--r-- | Source/WebKit/gtk/GNUmakefile.am | 2 | ||||
-rw-r--r-- | Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp | 66 | ||||
-rw-r--r-- | Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h | 12 | ||||
-rw-r--r-- | Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp | 14 | ||||
-rw-r--r-- | Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h | 6 | ||||
-rw-r--r-- | Source/WebKit/gtk/WebCoreSupport/TextCheckerClientEnchant.h | 2 | ||||
-rw-r--r-- | Source/WebKit/gtk/tests/testatk.c | 89 | ||||
-rw-r--r-- | Source/WebKit/gtk/webkit/webkitdownload.cpp | 2 | ||||
-rw-r--r-- | Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp | 1 | ||||
-rw-r--r-- | Source/WebKit/gtk/webkit/webkitwebplugin.cpp | 40 | ||||
-rw-r--r-- | Source/WebKit/gtk/webkit/webkitwebplugin.h | 3 | ||||
-rw-r--r-- | Source/WebKit/gtk/webkit/webkitwebpluginprivate.h | 1 | ||||
-rw-r--r-- | Source/WebKit/gtk/webkit/webkitwebsettings.cpp | 26 | ||||
-rw-r--r-- | Source/WebKit/gtk/webkit/webkitwebview.cpp | 124 |
15 files changed, 553 insertions, 94 deletions
diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog index 88452c2..65dfcc8 100644 --- a/Source/WebKit/gtk/ChangeLog +++ b/Source/WebKit/gtk/ChangeLog @@ -1,6 +1,143 @@ -2011-03-30 Martin Robinson <mrobinson@igalia.com> +2011-04-19 Vsevolod Vlasov <vsevik@chromium.org> - Reviewed by Dirk Schulze. + Reviewed by Pavel Feldman. + + Web Inspector: Rename lengthReceived to encodedDataLength/dataLength + https://bugs.webkit.org/show_bug.cgi?id=58883 + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::dispatchDidReceiveContentLength): + * WebCoreSupport/FrameLoaderClientGtk.h: + * webkit/webkitdownload.cpp: + (DownloadClient::didReceiveData): + +2011-04-18 Zan Dobersek <zandobersek@gmail.com> + + Reviewed by Martin Robinson. + + [GTK] Need support for dumping focus rectangles in pixel results + https://bugs.webkit.org/show_bug.cgi?id=53647 + + Add a support function that returns the rectangle of the current + selection in frame. + + * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: + (DumpRenderTreeSupportGtk::rectangleForSelection): + * WebCoreSupport/DumpRenderTreeSupportGtk.h: + +2011-04-12 Xan Lopez <xlopez@igalia.com> + + Unreviewed build fix. + + * webkit/webkitwebhistoryitem.cpp: + +2011-04-12 Stephanie Lewis <slewis@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=58280 + <rdar://problem/9252824> javascript in an inconsistent state due to serialization returning an un-handled exception. + + Add a header include. Fallout from untangling some header files in WebCore. + + * webkit/webkitwebhistoryitem.cpp: + +2011-02-03 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Eric Seidel. + + [GTK] The GTK+ DRT needs an implementation of the PlainTextController + https://bugs.webkit.org/show_bug.cgi?id=53605 + + Added jsValueToDOMRange to DumpRenderTreeSupportGtk. This static method can convert + a JSValueRef to a WebKitDOMRange. When it's possible to do this with the public + API, we can remove this method. + + * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: + (DumpRenderTreeSupportGtk::jsValueToDOMRange): Added. + * WebCoreSupport/DumpRenderTreeSupportGtk.h: Added declaration. + +2011-04-11 Mario Sanchez Prada <msanchez@igalia.com> + + Reviewed by Chris Fleizach. + + [Gtk] Implement support for Embedded Objects + https://bugs.webkit.org/show_bug.cgi?id=52148 + + New accessibility unit test for embedded objects. + + * tests/testatk.c: + (testWebkitAtkEmbeddedObjects): New unit test. + (main): Added the new unit test. + +2011-04-08 Dominic Cooney <dominicc@google.com> + + Reviewed by Adam Roben. + + Make layoutTestController.shadowRoot return null, not undefined, + when its argument is invalid. + https://bugs.webkit.org/show_bug.cgi?id=58121 + + * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: + (DumpRenderTreeSupportGtk::shadowRoot): + +2011-04-08 Dominic Cooney <dominicc@google.com> + + Reviewed by Kent Tamura. + + layoutTestController.shadowRoot should return undefined if its + argument is not an element. + https://bugs.webkit.org/show_bug.cgi?id=58119 + + * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: + (DumpRenderTreeSupportGtk::shadowRoot): + +2011-04-08 Mario Sanchez Prada <msanchez@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Implement increment() and decrement() functions in DRT's AccessibilityUIElement + https://bugs.webkit.org/show_bug.cgi?id=58039 + + Implemented missing functions in GTK's DRT. + + * WebCoreSupport/DumpRenderTreeSupportGtk.h: + * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: + (modifyAccessibilityValue): Helper function to increment or decrement + the current value for an object through the AccessibilityObject's API. + (DumpRenderTreeSupportGtk::incrementAccessibilityValue): New function, + to be used from GTK's DRT. + (DumpRenderTreeSupportGtk::decrementAccessibilityValue): Ditto. + +2011-04-06 Gustavo Noronha Silva <gns@gnome.org> + + Reviewed by Martin Robinson. + + [GTK] Need a way to get the path to a WebKitWebPlugin + https://bugs.webkit.org/show_bug.cgi?id=57968 + + Expose the path of the plugin through the WebKitWebPlugin object. + + * webkit/webkitwebplugin.cpp: + (webkit_web_plugin_get_path): + * webkit/webkitwebplugin.h: + * webkit/webkitwebpluginprivate.h: + +2011-04-07 Alice Boxhall <aboxhall@chromium.org> + + Reviewed by Ryosuke Niwa. + + Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler. + https://bugs.webkit.org/show_bug.cgi?id=57921 + + * webkit/webkitwebview.cpp: + (webkit_web_view_forward_context_menu_event): + Call subframeForHitTestResult rather than subframeForTargetNode as the targetNode() + method has moved on to EventHandler. + +2011-04-05 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Eric Seidel. [Cairo] Better separate the concerns of GraphicsContextCairo https://bugs.webkit.org/show_bug.cgi?id=55150 @@ -15,6 +152,124 @@ (webkit_web_view_expose_event): (webkit_web_view_draw): +2011-04-04 MORITA Hajime <morrita@google.com> + + Reviewed by Ryosuke Niwa. + + [Refactoring] SpellCheckingResult should be replaced with TextCheckingResult + https://bugs.webkit.org/show_bug.cgi?id=56085 + + * WebCoreSupport/TextCheckerClientEnchant.h: + (WebKit::TextCheckerClientEnchant::requestCheckingOfString): + +2011-04-04 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] WebGL support + https://bugs.webkit.org/show_bug.cgi?id=31517 + + Add support for toggling WebGL at runtime when it's enabled. + + * webkit/webkitwebsettings.cpp: Add the enable-webgl property. When ENABLE_WEBGL + is not enabled, it's a no-op. + (webkit_web_settings_class_init): Update to support enable-webgl. + (webkit_web_settings_set_property): Ditto. + (webkit_web_settings_get_property): Ditto. + * webkit/webkitwebview.cpp: + (webkit_web_view_update_settings): Ditto. + +2011-04-04 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + REGRESSION (WebKit2): Caps-Lock indicator sometimes doesn't appear in WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=51230 + <rdar://problem/8780989> + + * webkit/webkitwebview.cpp: (webkit_web_view_key_release_event): Moved Caps Lock handling from + WebKits to WebCore, because WebKit shouldn't be smart. + +2011-04-04 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [Gtk] webkit_web_view_popup_menu_handler should call SelectionController::localCaretRect + https://bugs.webkit.org/show_bug.cgi?id=54633 + + Remove use of legacy editing positions when positioning keyboard-driven context + menus. Simplify the code greatly. + + * webkit/webkitwebview.cpp: + (getLocationForKeyboardGeneratedContextMenu): Added this helper which calculates + the context menu position. + (webkit_web_view_popup_menu_handler): Simplify code preventing the menu from bumping + into the edges of the view. Remove (0,-1) hack as it no longer seems to be important. + +2011-04-02 Dominic Cooney <dominicc@google.com> + + Reviewed by Martin Robinson. + + Add layoutTestController.shadowRoot to GTK DumpRenderTree. + https://bugs.webkit.org/show_bug.cgi?id=57551 + + * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: + (DumpRenderTreeSupportGtk::shadowRoot): + * WebCoreSupport/DumpRenderTreeSupportGtk.h: + +2011-04-01 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r82721. + http://trac.webkit.org/changeset/82721 + https://bugs.webkit.org/show_bug.cgi?id=57687 + + This patch introduced assertion failures on the GTK+ bots. + (Requested by mrobinson on #webkit). + + * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: + * WebCoreSupport/DumpRenderTreeSupportGtk.h: + +2011-04-01 Dominic Cooney <dominicc@google.com> + + Reviewed by Martin Robinson. + + Add layoutTestController.shadowRoot to GTK DumpRenderTree. + https://bugs.webkit.org/show_bug.cgi?id=57551 + + * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: + (DumpRenderTreeSupportGtk::shadowRoot): + * WebCoreSupport/DumpRenderTreeSupportGtk.h: + +2011-03-31 Xan Lopez <xlopez@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Link explicitly with XRender on Linux/Unix + https://bugs.webkit.org/show_bug.cgi?id=57558 + + * GNUmakefile.am: add XRender LIBS. + +2011-03-31 Evan Martin <evan@chromium.org> + + Build fix from previous change. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::dispatchDidReceiveTitle): + +2011-03-31 Evan Martin <evan@chromium.org> + + Reviewed by Eric Seidel. + + <title> should support dir attribute + https://bugs.webkit.org/show_bug.cgi?id=50961 + + Update to new FrameLoaderClient interface. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::dispatchDidReceiveTitle): + (WebKit::FrameLoaderClient::setTitle): + * WebCoreSupport/FrameLoaderClientGtk.h: + 2011-03-29 Philippe Normand <pnormand@igalia.com> Unreviewed, disable an assert in testwebview due to diff --git a/Source/WebKit/gtk/GNUmakefile.am b/Source/WebKit/gtk/GNUmakefile.am index 7030ea8..20567cc 100644 --- a/Source/WebKit/gtk/GNUmakefile.am +++ b/Source/WebKit/gtk/GNUmakefile.am @@ -98,10 +98,12 @@ libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBA $(LIBSOUP_LIBS) \ $(LIBXML_LIBS) \ $(LIBXSLT_LIBS) \ + $(OPENGL_LIBS) \ $(PANGO_LIBS) \ $(PNG_LIBS) \ $(SQLITE3_LIBS) \ $(UNICODE_LIBS) \ + $(XRENDER_LIBS) \ $(XT_LIBS) \ $(WINMM_LIBS) \ $(SHLWAPI_LIBS) \ diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp index 1336f11..1ce0ada 100644 --- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp +++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp @@ -28,6 +28,7 @@ #include "AnimationController.h" #include "DOMWrapperWorld.h" #include "Document.h" +#include "Element.h" #include "FocusController.h" #include "FrameLoaderClientGtk.h" #include "FrameTree.h" @@ -41,6 +42,7 @@ #include "JSElement.h" #include "JSLock.h" #include "JSNodeList.h" +#include "JSRange.h" #include "JSValue.h" #include "NodeList.h" #include "PageGroup.h" @@ -52,6 +54,7 @@ #include "SecurityOrigin.h" #include "Settings.h" #include "TextIterator.h" +#include "WebKitDOMRangePrivate.h" #include "WorkerThread.h" #include "webkitglobalsprivate.h" #include "webkitwebframe.h" @@ -126,6 +129,20 @@ JSValueRef DumpRenderTreeSupportGtk::nodesFromRect(JSContextRef context, JSValue return toRef(exec, toJS(exec, jsDocument->globalObject(), nodes.get())); } +WebKitDOMRange* DumpRenderTreeSupportGtk::jsValueToDOMRange(JSContextRef context, JSValueRef value) +{ + if (!value) + return 0; + + JSLock lock(SilenceAssertionsOnly); + ExecState* exec = toJS(context); + + Range* range = toRange(toJS(exec, value)); + if (!range) + return 0; + return kit(range); +} + /** * getFrameChildren: * @frame: a #WebKitWebFrame @@ -636,6 +653,17 @@ void DumpRenderTreeSupportGtk::clearOpener(WebKitWebFrame* frame) coreFrame->loader()->setOpener(0); } +JSValueRef DumpRenderTreeSupportGtk::shadowRoot(JSContextRef context, JSValueRef value) +{ + JSLock lock(SilenceAssertionsOnly); + JSC::ExecState* exec = toJS(context); + Element* element = toElement(toJS(exec, value)); + if (!element) + return JSValueMakeNull(context); + + return toRef(exec, toJS(exec, element->shadowRoot())); +} + unsigned int DumpRenderTreeSupportGtk::workerThreadCount() { #if ENABLE(WORKERS) @@ -667,6 +695,31 @@ void DumpRenderTreeSupportGtk::setMinimumTimerInterval(WebKitWebView* webView, d core(webView)->settings()->setMinDOMTimerInterval(interval); } +static void modifyAccessibilityValue(AtkObject* axObject, bool increment) +{ + if (!axObject || !WEBKIT_IS_ACCESSIBLE(axObject)) + return; + + AccessibilityObject* coreObject = webkit_accessible_get_accessibility_object(WEBKIT_ACCESSIBLE(axObject)); + if (!coreObject) + return; + + if (increment) + coreObject->increment(); + else + coreObject->decrement(); +} + +void DumpRenderTreeSupportGtk::incrementAccessibilityValue(AtkObject* axObject) +{ + modifyAccessibilityValue(axObject, true); +} + +void DumpRenderTreeSupportGtk::decrementAccessibilityValue(AtkObject* axObject) +{ + modifyAccessibilityValue(axObject, false); +} + void DumpRenderTreeSupportGtk::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled) { JSC::ExecState* exec = toJS(context); @@ -695,3 +748,16 @@ void DumpRenderTreeSupportGtk::setValueForUser(JSContextRef context, JSValueRef JSStringGetUTF8CString(value, valueBuffer.get(), bufferSize); inputElement->setValueForUser(String::fromUTF8(valueBuffer.get())); } + +void DumpRenderTreeSupportGtk::rectangleForSelection(WebKitWebFrame* frame, GdkRectangle* rectangle) +{ + Frame* coreFrame = core(frame); + if (!coreFrame) + return; + + IntRect bounds = enclosingIntRect(coreFrame->selection()->bounds()); + rectangle->x = bounds.x(); + rectangle->y = bounds.y(); + rectangle->width = bounds.width(); + rectangle->height = bounds.height(); +} diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h index 7ad5af6..7731798 100644 --- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h +++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h @@ -20,12 +20,10 @@ #define DumpRenderTreeSupportGtk_h #include "JSStringRef.h" -#include <webkit/webkitdefines.h> - #include <atk/atk.h> #include <glib.h> #include <webkit/webkitdefines.h> -#include <webkit/webkitwebframe.h> +#include <webkit/webkitdomdefines.h> #include <wtf/text/CString.h> namespace WebKit { @@ -61,6 +59,9 @@ public: static void clearOpener(WebKitWebFrame*); + static JSValueRef shadowRoot(JSContextRef, JSValueRef); + static WebKitDOMRange* jsValueToDOMRange(JSContextRef, JSValueRef); + // FIXME: Move these to webkitwebframe.h once their API has been discussed. static GSList* getFrameChildren(WebKitWebFrame*); static WTF::CString getInnerText(WebKitWebFrame*); @@ -97,6 +98,11 @@ public: static bool selectedRange(WebKitWebView*, int* start, int* end); static double defaultMinimumTimerInterval(); // Not really tied to WebView static void setMinimumTimerInterval(WebKitWebView*, double); + static void rectangleForSelection(WebKitWebFrame*, GdkRectangle*); + + // Accessibility + static void incrementAccessibilityValue(AtkObject*); + static void decrementAccessibilityValue(AtkObject*); // GC static void gcCollectJavascriptObjects(); diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index ca8bf9a..539675a 100644 --- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -949,21 +949,22 @@ void FrameLoaderClient::dispatchDidStartProvisionalLoad() notifyStatus(m_frame, WEBKIT_LOAD_PROVISIONAL); } -void FrameLoaderClient::dispatchDidReceiveTitle(const String& title) +void FrameLoaderClient::dispatchDidReceiveTitle(const StringWithDirection& title) { if (m_loadingErrorPage) return; WebKitWebFramePrivate* priv = m_frame->priv; g_free(priv->title); - priv->title = g_strdup(title.utf8().data()); + // FIXME: use direction of title. + priv->title = g_strdup(title.string().utf8().data()); g_signal_emit_by_name(m_frame, "title-changed", priv->title); g_object_notify(G_OBJECT(m_frame), "title"); WebKitWebView* webView = getViewFromFrame(m_frame); if (m_frame == webkit_web_view_get_main_frame(webView)) { - g_signal_emit_by_name(webView, "title-changed", m_frame, title.utf8().data()); + g_signal_emit_by_name(webView, "title-changed", m_frame, title.string().utf8().data()); g_object_notify(G_OBJECT(webView), "title"); } } @@ -1119,14 +1120,15 @@ void FrameLoaderClient::prepareForDataSourceReplacement() notImplemented(); } -void FrameLoaderClient::setTitle(const String& title, const KURL& url) +void FrameLoaderClient::setTitle(const StringWithDirection& title, const KURL& url) { WebKitWebFramePrivate* frameData = m_frame->priv; g_free(frameData->title); - frameData->title = g_strdup(title.utf8().data()); + // FIXME: use direction of title. + frameData->title = g_strdup(title.string().utf8().data()); } -void FrameLoaderClient::dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived) +void FrameLoaderClient::dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int dataLength) { notImplemented(); } diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h index b7ead7a..ed9ac37 100644 --- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h +++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h @@ -65,7 +65,7 @@ namespace WebKit { virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&); - virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived); + virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int dataLength); 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); @@ -81,7 +81,7 @@ namespace WebKit { virtual void dispatchWillClose(); virtual void dispatchDidReceiveIcon(); virtual void dispatchDidStartProvisionalLoad(); - virtual void dispatchDidReceiveTitle(const WTF::String&); + virtual void dispatchDidReceiveTitle(const WebCore::StringWithDirection&); virtual void dispatchDidChangeIcons(); virtual void dispatchDidCommitLoad(); virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&); @@ -174,7 +174,7 @@ namespace WebKit { virtual void prepareForDataSourceReplacement(); virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&); - virtual void setTitle(const WTF::String& title, const WebCore::KURL&); + virtual void setTitle(const WebCore::StringWithDirection& title, const WebCore::KURL&); virtual WTF::String userAgent(const WebCore::KURL&); diff --git a/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientEnchant.h b/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientEnchant.h index c294a3d..5d93c07 100644 --- a/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientEnchant.h +++ b/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientEnchant.h @@ -49,7 +49,7 @@ class TextCheckerClientEnchant : public WebCore::TextCheckerClient { virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&); virtual void checkGrammarOfString(const UChar*, int length, WTF::Vector<WebCore::GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength); virtual void getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector<WTF::String>& guesses); - virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {} + virtual void requestCheckingOfString(WebCore::SpellChecker*, int, WebCore::TextCheckingTypeMask, const WTF::String&) {} void updateSpellCheckingLanguage(const char*); static void freeSpellCheckingLanguage(gpointer, gpointer); diff --git a/Source/WebKit/gtk/tests/testatk.c b/Source/WebKit/gtk/tests/testatk.c index 161b4b8..603c6c8 100644 --- a/Source/WebKit/gtk/tests/testatk.c +++ b/Source/WebKit/gtk/tests/testatk.c @@ -50,6 +50,8 @@ static const char* contentsWithExtraneousWhiteSpaces = "<html><head><body><p>Thi static const char* comboBoxSelector = "<html><body><select><option selected value='foo'>foo</option><option value='bar'>bar</option></select></body></html>"; +static const char* embeddedObjects = "<html><body><p>Choose: <input value='foo' type='checkbox'/>foo <input value='bar' type='checkbox'/>bar (pick one)</p><p>Choose: <select name='foo'><option>bar</option><option>baz</option></select> (pick one)</p><p><input name='foobarbutton' value='foobar' type='button'/></p></body></html>"; + static const char* formWithTextInputs = "<html><body><form><input type='text' name='entry' /></form></body></html>"; static const char* hypertextAndHyperlinks = "<html><body><p>A paragraph with no links at all</p><p><a href='http://foo.bar.baz/'>A line</a> with <a href='http://bar.baz.foo/'>a link in the middle</a> as well as at the beginning and <a href='http://baz.foo.bar/'>at the end</a></p><ol><li>List item with a <span><a href='http://foo.bar.baz/'>link inside a span node</a></span></li></ol></body></html>"; @@ -480,6 +482,92 @@ static void testWebkitAtkComboBox() g_object_unref(webView); } +static void testWebkitAtkEmbeddedObjects() +{ + WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(webView); + GtkAllocation allocation = { 0, 0, 800, 600 }; + gtk_widget_size_allocate(GTK_WIDGET(webView), &allocation); + webkit_web_view_load_string(webView, embeddedObjects, 0, 0, 0); + + /* Wait for the accessible objects to be created. */ + waitForAccessibleObjects(); + + AtkObject* object = gtk_widget_get_accessible(GTK_WIDGET(webView)); + g_assert(object); + + AtkText* paragraph1 = ATK_TEXT(atk_object_ref_accessible_child(object, 0)); + g_assert(ATK_IS_TEXT(paragraph1)); + g_assert(ATK_IS_HYPERTEXT(paragraph1)); + + const gchar* expectedText = "Choose: \357\277\274foo \357\277\274bar (pick one)"; + char* text = atk_text_get_text(paragraph1, 0, -1); + g_assert_cmpstr(text, ==, expectedText); + g_free(text); + + gint nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph1)); + g_assert_cmpint(nLinks, ==, 2); + + AtkHyperlink* hLink = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph1), 0); + g_assert(ATK_HYPERLINK(hLink)); + AtkObject* hLinkObject = atk_hyperlink_get_object(hLink, 0); + g_assert(ATK_OBJECT(hLinkObject)); + g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_CHECK_BOX); + g_assert_cmpint(atk_hyperlink_get_start_index(hLink), ==, 8); + g_assert_cmpint(atk_hyperlink_get_end_index(hLink), ==, 9); + g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink), ==, 1); + g_assert_cmpstr(atk_hyperlink_get_uri(hLink, 0), ==, 0); + + AtkText* paragraph2 = ATK_TEXT(atk_object_ref_accessible_child(object, 1)); + g_assert(ATK_IS_TEXT(paragraph2)); + g_assert(ATK_IS_HYPERTEXT(paragraph2)); + + expectedText = "Choose: \357\277\274 (pick one)"; + text = atk_text_get_text(paragraph2, 0, -1); + g_assert_cmpstr(text, ==, expectedText); + g_free(text); + + nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph2)); + g_assert_cmpint(nLinks, ==, 1); + + hLink = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph2), 0); + g_assert(ATK_HYPERLINK(hLink)); + hLinkObject = atk_hyperlink_get_object(hLink, 0); + g_assert(ATK_OBJECT(hLinkObject)); + g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_COMBO_BOX); + g_assert_cmpint(atk_hyperlink_get_start_index(hLink), ==, 8); + g_assert_cmpint(atk_hyperlink_get_end_index(hLink), ==, 9); + g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink), ==, 1); + g_assert_cmpstr(atk_hyperlink_get_uri(hLink, 0), ==, 0); + + AtkText* paragraph3 = ATK_TEXT(atk_object_ref_accessible_child(object, 2)); + g_assert(ATK_IS_TEXT(paragraph3)); + g_assert(ATK_IS_HYPERTEXT(paragraph3)); + + expectedText = "\357\277\274"; + text = atk_text_get_text(paragraph3, 0, -1); + g_assert_cmpstr(text, ==, expectedText); + g_free(text); + + nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph3)); + g_assert_cmpint(nLinks, ==, 1); + + hLink = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph3), 0); + g_assert(ATK_HYPERLINK(hLink)); + hLinkObject = atk_hyperlink_get_object(hLink, 0); + g_assert(ATK_OBJECT(hLinkObject)); + g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_PUSH_BUTTON); + g_assert_cmpint(atk_hyperlink_get_start_index(hLink), ==, 0); + g_assert_cmpint(atk_hyperlink_get_end_index(hLink), ==, 1); + g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink), ==, 1); + g_assert_cmpstr(atk_hyperlink_get_uri(hLink, 0), ==, 0); + + g_object_unref(paragraph1); + g_object_unref(paragraph2); + g_object_unref(paragraph3); + g_object_unref(webView); +} + static void testWebkitAtkGetTextAtOffsetForms() { WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); @@ -1579,6 +1667,7 @@ int main(int argc, char** argv) g_test_add_func("/webkit/atk/caretOffsets", testWebkitAtkCaretOffsets); g_test_add_func("/webkit/atk/caretOffsetsAndExtranousWhiteSpaces", testWebkitAtkCaretOffsetsAndExtranousWhiteSpaces); g_test_add_func("/webkit/atk/comboBox", testWebkitAtkComboBox); + g_test_add_func("/webkit/atk/embeddedObjects", testWebkitAtkEmbeddedObjects); g_test_add_func("/webkit/atk/getTextAtOffset", testWebkitAtkGetTextAtOffset); g_test_add_func("/webkit/atk/getTextAtOffsetForms", testWebkitAtkGetTextAtOffsetForms); g_test_add_func("/webkit/atk/getTextAtOffsetNewlines", testWebkitAtkGetTextAtOffsetNewlines); diff --git a/Source/WebKit/gtk/webkit/webkitdownload.cpp b/Source/WebKit/gtk/webkit/webkitdownload.cpp index a7890c1..f2d706f 100644 --- a/Source/WebKit/gtk/webkit/webkitdownload.cpp +++ b/Source/WebKit/gtk/webkit/webkitdownload.cpp @@ -927,7 +927,7 @@ void DownloadClient::didReceiveResponse(ResourceHandle*, const ResourceResponse& webkit_download_set_response(m_download, response); } -void DownloadClient::didReceiveData(ResourceHandle*, const char* data, int length, int lengthReceived) +void DownloadClient::didReceiveData(ResourceHandle*, const char* data, int length, int encodedDataLength) { webkit_download_received_data(m_download, data, length); } diff --git a/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp index eabdc49..015d770 100644 --- a/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp +++ b/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp @@ -22,6 +22,7 @@ #include "webkitwebhistoryitem.h" #include "HistoryItem.h" +#include "KURL.h" #include "PlatformString.h" #include "webkitglobalsprivate.h" #include "webkitwebhistoryitemprivate.h" diff --git a/Source/WebKit/gtk/webkit/webkitwebplugin.cpp b/Source/WebKit/gtk/webkit/webkitwebplugin.cpp index 52d5965..95ac614 100644 --- a/Source/WebKit/gtk/webkit/webkitwebplugin.cpp +++ b/Source/WebKit/gtk/webkit/webkitwebplugin.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2010 Igalia S.L. + * Copyright (C) 2011 Gustavo Noronha Silva <gns@gnome.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -62,6 +63,8 @@ static void webkit_web_plugin_finalize(GObject* object) WebKitWebPlugin* plugin = WEBKIT_WEB_PLUGIN(object); WebKitWebPluginPrivate* priv = plugin->priv; + g_free(priv->path); + g_slist_foreach(priv->mimeTypes, (GFunc)freeMIMEType, 0); g_slist_free(priv->mimeTypes); @@ -173,6 +176,43 @@ const char* webkit_web_plugin_get_description(WebKitWebPlugin* plugin) } /** + * webkit_web_plugin_get_path: + * @plugin: a #WebKitWebPlugin + * + * Returns: the absolute path to @plugin in system filename encoding + * or %NULL on failure to convert the filename from UTF-8. + * + * Since: 1.4.0 + */ +const char* webkit_web_plugin_get_path(WebKitWebPlugin* plugin) +{ + g_return_val_if_fail(WEBKIT_IS_WEB_PLUGIN(plugin), 0); + + WebKitWebPluginPrivate* priv = plugin->priv; + + if (priv->path) + return priv->path; + + GError* error = 0; + priv->path = g_filename_from_utf8(priv->corePlugin->path().utf8().data(), -1, 0, 0, &error); + + if (!error) + return priv->path; + + // In the unlikely case the convertion fails, report the error and make sure we free + // any partial convertion that ended up in the variable. + g_free(priv->path); + priv->path = 0; + + g_warning("Failed to convert '%s' to system filename encoding: %s", priv->corePlugin->path().utf8().data(), error->message); + + g_clear_error(&error); + + return 0; +} + + +/** * webkit_web_plugin_get_mimetypes: * @plugin: a #WebKitWebPlugin * diff --git a/Source/WebKit/gtk/webkit/webkitwebplugin.h b/Source/WebKit/gtk/webkit/webkitwebplugin.h index 3514d1e..9205674 100644 --- a/Source/WebKit/gtk/webkit/webkitwebplugin.h +++ b/Source/WebKit/gtk/webkit/webkitwebplugin.h @@ -73,6 +73,9 @@ webkit_web_plugin_get_name (WebKitWebPlugin*); WEBKIT_API const char* webkit_web_plugin_get_description (WebKitWebPlugin*); +WEBKIT_API const char* +webkit_web_plugin_get_path (WebKitWebPlugin*); + WEBKIT_API GSList* webkit_web_plugin_get_mimetypes (WebKitWebPlugin*); diff --git a/Source/WebKit/gtk/webkit/webkitwebpluginprivate.h b/Source/WebKit/gtk/webkit/webkitwebpluginprivate.h index 4ae204b..8a1ba1b 100644 --- a/Source/WebKit/gtk/webkit/webkitwebpluginprivate.h +++ b/Source/WebKit/gtk/webkit/webkitwebpluginprivate.h @@ -38,6 +38,7 @@ struct _WebKitWebPluginPrivate { RefPtr<WebCore::PluginPackage> corePlugin; CString name; CString description; + char* path; GSList* mimeTypes; }; diff --git a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp b/Source/WebKit/gtk/webkit/webkitwebsettings.cpp index 3b4cf57..e833de9 100644 --- a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp +++ b/Source/WebKit/gtk/webkit/webkitwebsettings.cpp @@ -113,6 +113,7 @@ struct _WebKitWebSettingsPrivate { gboolean enable_hyperlink_auditing; gboolean enable_fullscreen; gboolean enable_dns_prefetching; + gboolean enable_webgl; }; #define WEBKIT_WEB_SETTINGS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_SETTINGS, WebKitWebSettingsPrivate)) @@ -166,7 +167,8 @@ enum { PROP_ENABLE_JAVA_APPLET, PROP_ENABLE_HYPERLINK_AUDITING, PROP_ENABLE_FULLSCREEN, - PROP_ENABLE_DNS_PREFETCHING + PROP_ENABLE_DNS_PREFETCHING, + PROP_ENABLE_WEBGL }; // Create a default user agent string @@ -912,6 +914,22 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass) _("Whether the Mozilla style API should be enabled."), FALSE, flags)); + /** + * WebKitWebSettings:enable-webgl: + * + * Enable or disable support for WebGL on pages. WebGL is an experimental + * proposal for allowing web pages to use OpenGL ES-like calls directly. The + * standard is currently a work-in-progress by the Khronos Group. + * + * Since: 1.3.14 + */ + g_object_class_install_property(gobject_class, + PROP_ENABLE_WEBGL, + g_param_spec_boolean("enable-webgl", + _("Enable WebGL"), + _("Whether WebGL content should be rendered"), + FALSE, + flags)); /** * WebKitWebSettings:enable-dns-prefetching @@ -1117,6 +1135,9 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con case PROP_ENABLE_DNS_PREFETCHING: priv->enable_dns_prefetching = g_value_get_boolean(value); break; + case PROP_ENABLE_WEBGL: + priv->enable_webgl = g_value_get_boolean(value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; @@ -1270,6 +1291,9 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa case PROP_ENABLE_DNS_PREFETCHING: g_value_set_boolean(value, priv->enable_dns_prefetching); break; + case PROP_ENABLE_WEBGL: + g_value_set_boolean(value, priv->enable_webgl); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; diff --git a/Source/WebKit/gtk/webkit/webkitwebview.cpp b/Source/WebKit/gtk/webkit/webkitwebview.cpp index bf74d7b..85ad904 100644 --- a/Source/WebKit/gtk/webkit/webkitwebview.cpp +++ b/Source/WebKit/gtk/webkit/webkitwebview.cpp @@ -319,7 +319,7 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie IntPoint point = mainFrame->view()->windowToContents(event.pos()); MouseEventWithHitTestResults mev = mainFrame->document()->prepareMouseEvent(request, point, event); - Frame* targetFrame = EventHandler::subframeForTargetNode(mev.targetNode()); + Frame* targetFrame = EventHandler::subframeForHitTestResult(mev); if (!targetFrame) targetFrame = mainFrame; @@ -381,84 +381,43 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie return TRUE; } +static const int gContextMenuMargin = 1; +static IntPoint getLocationForKeyboardGeneratedContextMenu(Frame* frame) +{ + SelectionController* selection = frame->selection(); + if (!selection->selection().isNonOrphanedCaretOrRange() + || (selection->selection().isCaret() && !selection->selection().isContentEditable())) { + if (Node* focusedNode = getFocusedNode(frame)) + return focusedNode->getRect().location(); + + // There was no selection and no focused node, so just put the context + // menu into the corner of the view, offset slightly. + return IntPoint(gContextMenuMargin, gContextMenuMargin); + } + + // selection->selection().firstRange can return 0 here, but if that was the case + // selection->selection().isNonOrphanedCaretOrRange() would have returned false + // above, so we do not have to check it. + IntRect firstRect = frame->editor()->firstRectForRange(selection->selection().firstRange().get()); + return IntPoint(firstRect.x(), firstRect.maxY()); +} + static gboolean webkit_web_view_popup_menu_handler(GtkWidget* widget) { - static const int contextMenuMargin = 1; + Frame* frame = core(WEBKIT_WEB_VIEW(widget))->focusController()->focusedOrMainFrame(); + IntPoint location = getLocationForKeyboardGeneratedContextMenu(frame); - // 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)); - Frame* frame = page->focusController()->focusedOrMainFrame(); FrameView* view = frame->view(); if (!view) - return FALSE; - - Position start = frame->selection()->selection().start(); - Position end = frame->selection()->selection().end(); - - int rightAligned = FALSE; - IntPoint location; - - if (!start.deprecatedNode() || !end.deprecatedNode() - || (frame->selection()->selection().isCaret() && !frame->selection()->selection().isContentEditable())) { - // If there's a focused elment, use its location. - if (Node* focusedNode = getFocusedNode(frame)) { - IntRect focusedNodeRect = focusedNode->getRect(); - location = IntPoint(rightAligned ? focusedNodeRect.maxX() : focusedNodeRect.x(), focusedNodeRect.maxY()); - } else - location = IntPoint(rightAligned ? view->contentsWidth() - contextMenuMargin : contextMenuMargin, contextMenuMargin); - } else { - RenderObject* renderer = start.deprecatedNode()->renderer(); - if (!renderer) - return FALSE; - - // Calculate the rect of the first line of the selection (cribbed from -[WebCoreFrameBridge firstRectForDOMRange:], - // now Frame::firstRectForRange(), which perhaps this should call). - int extraWidthToEndOfLine = 0; - - InlineBox* startInlineBox; - int startCaretOffset; - start.getInlineBoxAndOffset(DOWNSTREAM, startInlineBox, startCaretOffset); - IntRect startCaretRect = renderer->localCaretRect(startInlineBox, startCaretOffset, &extraWidthToEndOfLine); - if (startCaretRect != IntRect()) - startCaretRect = renderer->localToAbsoluteQuad(FloatRect(startCaretRect)).enclosingBoundingBox(); - - InlineBox* endInlineBox; - int endCaretOffset; - end.getInlineBoxAndOffset(UPSTREAM, endInlineBox, endCaretOffset); - IntRect endCaretRect = renderer->localCaretRect(endInlineBox, endCaretOffset); - if (endCaretRect != IntRect()) - endCaretRect = renderer->localToAbsoluteQuad(FloatRect(endCaretRect)).enclosingBoundingBox(); - - IntRect firstRect; - if (startCaretRect.y() == endCaretRect.y()) - firstRect = IntRect(MIN(startCaretRect.x(), endCaretRect.x()), - startCaretRect.y(), - abs(endCaretRect.x() - startCaretRect.x()), - MAX(startCaretRect.height(), endCaretRect.height())); - else - firstRect = IntRect(startCaretRect.x(), - startCaretRect.y(), - startCaretRect.width() + extraWidthToEndOfLine, - startCaretRect.height()); - - location = IntPoint(rightAligned ? firstRect.maxX() : firstRect.x(), firstRect.maxY()); - } + return FALSE; - // 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(globalPointForClientPoint(gtk_widget_get_window(widget), location)); - - PlatformMouseEvent event(location, global, RightButton, MouseEventPressed, 0, false, false, false, false, gtk_get_current_event_time()); + // Never let the context menu touch the very edge of the view. + location = view->contentsToWindow(location); + location.expandedTo(IntPoint(gContextMenuMargin, gContextMenuMargin)); + location.shrunkTo(IntPoint(view->width() - gContextMenuMargin, view->height() - gContextMenuMargin)); + IntPoint globalPoint(globalPointForClientPoint(gtk_widget_get_window(widget), location)); + PlatformMouseEvent event(location, globalPoint, 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); } @@ -790,9 +749,6 @@ static gboolean webkit_web_view_key_release_event(GtkWidget* widget, GdkEventKey if (!frame->view()) return FALSE; - if (event->keyval == GDK_Caps_Lock) - frame->eventHandler()->capsLockStateMayHaveChanged(); - PlatformKeyboardEvent keyboardEvent(event); if (frame->eventHandler()->keyEvent(keyboardEvent)) return TRUE; @@ -3292,7 +3248,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) enableXSSAuditor, enableSpatialNavigation, enableFrameFlattening, javascriptCanOpenWindows, javaScriptCanAccessClipboard, enableOfflineWebAppCache, enableUniversalAccessFromFileURI, enableFileAccessFromFileURI, - enableDOMPaste, tabKeyCyclesThroughElements, + enableDOMPaste, tabKeyCyclesThroughElements, enableWebGL, enableSiteSpecificQuirks, usePageCache, enableJavaApplet, enableHyperlinkAuditing, enableFullscreen, enableDNSPrefetching; @@ -3336,6 +3292,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) "spell-checking-languages", &defaultSpellCheckingLanguages, "enable-fullscreen", &enableFullscreen, "enable-dns-prefetching", &enableDNSPrefetching, + "enable-webgl", &enableWebGL, NULL); settings->setDefaultTextEncodingName(defaultEncoding); @@ -3373,14 +3330,20 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) settings->setUsesPageCache(usePageCache); settings->setJavaEnabled(enableJavaApplet); settings->setHyperlinkAuditingEnabled(enableHyperlinkAuditing); + settings->setDNSPrefetchingEnabled(enableDNSPrefetching); + #if ENABLE(FULLSCREEN_API) settings->setFullScreenEnabled(enableFullscreen); #endif + #if ENABLE(SPELLCHECK) WebKit::EditorClient* client = static_cast<WebKit::EditorClient*>(core(webView)->editorClient()); static_cast<WebKit::TextCheckerClientEnchant*>(client->textChecker())->updateSpellCheckingLanguage(defaultSpellCheckingLanguages); #endif - settings->setDNSPrefetchingEnabled(enableDNSPrefetching); + +#if ENABLE(WEBGL) + settings->setWebGLEnabled(enableWebGL); +#endif Page* page = core(webView); if (page) @@ -3498,12 +3461,19 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar settings->setJavaEnabled(g_value_get_boolean(&value)); else if (name == g_intern_string("enable-hyperlink-auditing")) settings->setHyperlinkAuditingEnabled(g_value_get_boolean(&value)); + #if ENABLE(SPELLCHECK) else if (name == g_intern_string("spell-checking-languages")) { WebKit::EditorClient* client = static_cast<WebKit::EditorClient*>(core(webView)->editorClient()); static_cast<WebKit::TextCheckerClientEnchant*>(client->textChecker())->updateSpellCheckingLanguage(g_value_get_string(&value)); } #endif + +#if ENABLE(WEBGL) + else if (name == g_intern_string("enable-webgl")) + settings->setWebGLEnabled(g_value_get_boolean(&value)); +#endif + else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name)) g_warning("Unexpected setting '%s'", name); g_value_unset(&value); |