diff options
author | Ben Murdoch <benm@google.com> | 2011-05-24 11:24:40 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-02 09:53:15 +0100 |
commit | 81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch) | |
tree | 7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp | |
parent | 94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff) | |
download | external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2 |
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp')
-rw-r--r-- | Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp index 83f7c21..6db2c81 100644 --- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp +++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp @@ -48,6 +48,7 @@ #include "RenderTreeAsText.h" #include "RenderView.h" #include "SecurityOrigin.h" +#include "Settings.h" #include "TextIterator.h" #include "WorkerThread.h" #include "webkitglobalsprivate.h" @@ -68,6 +69,7 @@ using namespace WebKit; bool DumpRenderTreeSupportGtk::s_drtRun = false; bool DumpRenderTreeSupportGtk::s_linksIncludedInTabChain = true; +bool DumpRenderTreeSupportGtk::s_selectTrailingWhitespaceEnabled = false; DumpRenderTreeSupportGtk::DumpRenderTreeSupportGtk() { @@ -101,6 +103,16 @@ void DumpRenderTreeSupportGtk::setIconDatabaseEnabled(bool enabled) WebKit::setIconDatabaseEnabled(enabled); } +void DumpRenderTreeSupportGtk::setSelectTrailingWhitespaceEnabled(bool enabled) +{ + s_selectTrailingWhitespaceEnabled = enabled; +} + +bool DumpRenderTreeSupportGtk::selectTrailingWhitespaceEnabled() +{ + return s_selectTrailingWhitespaceEnabled; +} + JSValueRef DumpRenderTreeSupportGtk::nodesFromRect(JSContextRef context, JSValueRef value, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping) { JSLock lock(SilenceAssertionsOnly); @@ -610,17 +622,23 @@ void DumpRenderTreeSupportGtk::layoutFrame(WebKitWebFrame* frame) } // For testing fast/viewport. -void DumpRenderTreeSupportGtk::dumpConfigurationForViewport(WebKitWebView* webView, gint availableWidth, gint availableHeight) +void DumpRenderTreeSupportGtk::dumpConfigurationForViewport(WebKitWebView* webView, gint deviceDPI, gint deviceWidth, gint deviceHeight, gint availableWidth, gint availableHeight) { g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView)); ViewportArguments arguments = webView->priv->corePage->mainFrame()->document()->viewportArguments(); - // desktopWidth = 980, deviceWidth = 320, deviceHeight = 480, deviceDPI = 160 - ViewportAttributes attrs = computeViewportAttributes(arguments, 980, 320, 480, 160, IntSize(availableWidth, availableHeight)); + ViewportAttributes attrs = computeViewportAttributes(arguments, /* default layout width for non-mobile pages */ 980, deviceWidth, deviceHeight, deviceDPI, IntSize(availableWidth, availableHeight)); fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f]\n", attrs.layoutSize.width(), attrs.layoutSize.height(), attrs.initialScale, attrs.minimumScale, attrs.maximumScale); } +void DumpRenderTreeSupportGtk::clearOpener(WebKitWebFrame* frame) +{ + Frame* coreFrame = core(frame); + if (coreFrame) + coreFrame->loader()->setOpener(0); +} + unsigned int DumpRenderTreeSupportGtk::workerThreadCount() { #if ENABLE(WORKERS) @@ -642,3 +660,12 @@ bool DumpRenderTreeSupportGtk::findString(WebKitWebView* webView, const gchar* t return core(webView)->findString(String::fromUTF8(targetString), findOptions); } +double DumpRenderTreeSupportGtk::defaultMinimumTimerInterval() +{ + return Settings::defaultMinDOMTimerInterval(); +} + +void DumpRenderTreeSupportGtk::setMinimumTimerInterval(WebKitWebView* webView, double interval) +{ + core(webView)->settings()->setMinDOMTimerInterval(interval); +} |