[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 18:23:33 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1778ddbf0e6cac3015dfb979e90cfd53fea06d34
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 10 11:04:34 2010 +0000

    2010-12-10  Joone Hur  <joone at kldp.org>
    
            Reviewed by Eric Seidel.
    
            [GTK] Add DRT support for pageProperty, isPageBoxVisible, pageSizeAndMarginsInPixels, and addUserStyleSheet
            https://bugs.webkit.org/show_bug.cgi?id=50783
    
            Unskip the following test cases:
            printing/page-rule-selection.html
            printing/page-format-data.html
            * platform/gtk/Skipped:
    2010-12-10  Joone Hur  <joone at kldp.org>
    
            Reviewed by Eric Seidel.
    
            [GTK] Add DRT support for pageProperty, isPageBoxVisible, pageSizeAndMarginsInPixels, and addUserStyleSheet
            https://bugs.webkit.org/show_bug.cgi?id=50783
    
            This patch allows to unskip the following test cases:
            printing/page-rule-selection.html
            printing/page-format-data.html
    
            * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
            (DumpRenderTreeSupportGtk::pageProperty): Added.
            (DumpRenderTreeSupportGtk::isPageBoxVisible): Ditto.
            (DumpRenderTreeSupportGtk::pageSizeAndMarginsInPixels): Ditto.
            (DumpRenderTreeSupportGtk::addUserStyleSheet): Ditto.
            * WebCoreSupport/DumpRenderTreeSupportGtk.h:
    2010-12-10  Joone Hur  <joone at kldp.org>
    
            Reviewed by Eric Seidel.
    
            [GTK] Add DRT support for pageProperty, isPageBoxVisible, pageSizeAndMarginsInPixels, and addUserStyleSheet
            https://bugs.webkit.org/show_bug.cgi?id=50783
    
            This patch allows to unskip the following test cases:
            printing/page-rule-selection.html
            printing/page-format-data.html
    
            * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
            (LayoutTestController::pageProperty): Added.
            (LayoutTestController::isPageBoxVisible): Ditto.
            (LayoutTestController::pageSizeAndMarginsInPixels): Ditto.
            (LayoutTestController::addUserStyleSheet): Ditto.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73714 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 786763c..f0f288c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-10  Joone Hur  <joone at kldp.org>
+
+        Reviewed by Eric Seidel.
+
+        [GTK] Add DRT support for pageProperty, isPageBoxVisible, pageSizeAndMarginsInPixels, and addUserStyleSheet
+        https://bugs.webkit.org/show_bug.cgi?id=50783
+
+        Unskip the following test cases:
+        printing/page-rule-selection.html
+        printing/page-format-data.html
+        * platform/gtk/Skipped:
+
 2010-12-10  Pavel Feldman  <pfeldman at chromium.org>
 
         Not reviewed. Updated chromium test expectations.
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 2278c1d..375ec74 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5120,12 +5120,6 @@ fast/dom/HTMLLinkElement/link-and-subresource-test.html
 fast/dom/HTMLLinkElement/prefetch.html
 fast/dom/HTMLLinkElement/prefetch-onload.html
 
-# LayoutTestController::pageProperty is not implemented for GTK yet.
-printing/page-rule-selection.html
-
-# LayoutTestController::isPageBoxVisible, pageAreaRectInPixels, and preferredPageSizeInPixels are not implemented yet for GTK.
-printing/page-format-data.html
-
 # Gtk seems to be pumping the lexer an extra time revealed by turning on the
 # HTML5 Lexer in r61234.
 # https://bugs.webkit.org/show_bug.cgi?id=40664
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 74c9325..0d8aaf1 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,21 @@
+2010-12-10  Joone Hur  <joone at kldp.org>
+
+        Reviewed by Eric Seidel.
+
+        [GTK] Add DRT support for pageProperty, isPageBoxVisible, pageSizeAndMarginsInPixels, and addUserStyleSheet
+        https://bugs.webkit.org/show_bug.cgi?id=50783
+        
+        This patch allows to unskip the following test cases:
+        printing/page-rule-selection.html
+        printing/page-format-data.html
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        (DumpRenderTreeSupportGtk::pageProperty): Added.
+        (DumpRenderTreeSupportGtk::isPageBoxVisible): Ditto.
+        (DumpRenderTreeSupportGtk::pageSizeAndMarginsInPixels): Ditto.
+        (DumpRenderTreeSupportGtk::addUserStyleSheet): Ditto.
+        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+
 2010-12-09  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
 
         Reviewed by Martin Robinson.
diff --git a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
index e25c056..53bef5f 100644
--- a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
@@ -39,6 +39,7 @@
 #include "JSNodeList.h"
 #include "JSValue.h"
 #include "NodeList.h"
+#include "PageGroup.h"
 #include "PlatformString.h"
 #include "PrintContext.h"
 #include "RenderListItem.h"
@@ -54,6 +55,7 @@
 #include "webkitwebviewprivate.h"
 #include "webkitwebview.h"
 #include "webkitwebframe.h"
+#include "DOMWrapperWorld.h"
 #include <JavaScriptCore/APICast.h>
 
 using namespace JSC;
@@ -241,6 +243,86 @@ int DumpRenderTreeSupportGtk::numberOfPagesForFrame(WebKitWebFrame* frame, float
 }
 
 /**
+ * pageProperty
+ * @frame: a #WebKitWebFrame
+ * @propertyName: name of a property
+ * @pageNumber: number of a page 
+ *
+ * Return value: The value of the given property name.
+ */
+CString DumpRenderTreeSupportGtk::pageProperty(WebKitWebFrame* frame, const char* propertyName, int pageNumber)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), CString());
+
+    Frame* coreFrame = core(frame);
+    if (!coreFrame)
+        return CString();
+
+    return PrintContext::pageProperty(coreFrame, propertyName, pageNumber).utf8();
+}
+
+/**
+ * isPageBoxVisible
+ * @frame: a #WebKitWebFrame
+ * @pageNumber: number of a page 
+ *
+ * Return value: TRUE if a page box is visible. 
+ */
+bool DumpRenderTreeSupportGtk::isPageBoxVisible(WebKitWebFrame* frame, int pageNumber)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), false);
+
+    Frame* coreFrame = core(frame);
+    if (!coreFrame)
+        return false;
+
+    return coreFrame->document()->isPageBoxVisible(pageNumber); 
+}
+
+/**
+ * pageSizeAndMarginsInPixels
+ * @frame: a #WebKitWebFrame
+ * @pageNumber: number of a page 
+ * @width: width of a page
+ * @height: height of a page
+ * @marginTop: top margin of a page
+ * @marginRight: right margin of a page
+ * @marginBottom: bottom margin of a page
+ * @marginLeft: left margin of a page
+ *
+ * Return value: The value of page size and margin.
+ */
+CString DumpRenderTreeSupportGtk::pageSizeAndMarginsInPixels(WebKitWebFrame* frame, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), CString());
+
+    Frame* coreFrame = core(frame);
+    if (!coreFrame)
+        return CString();
+
+    return PrintContext::pageSizeAndMarginsInPixels(coreFrame, pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft).utf8();
+}
+
+/**
+ * addUserStyleSheet
+ * @frame: a #WebKitWebFrame
+ * @sourceCode: code of a user stylesheet
+ *
+ */
+void DumpRenderTreeSupportGtk::addUserStyleSheet(WebKitWebFrame* frame, const char* sourceCode)
+{
+    g_return_if_fail(WEBKIT_IS_WEB_FRAME(frame));
+
+    Frame* coreFrame = core(frame);
+    if (!coreFrame)
+        return;
+
+    WebKitWebView* webView = getViewFromFrame(frame);
+    Page* page = core(webView);
+    page->group().addUserStyleSheetToWorld(mainThreadNormalWorld(), sourceCode, KURL(), 0, 0, WebCore::InjectInAllFrames); 
+}
+
+/**
  * getPendingUnloadEventCount:
  * @frame: a #WebKitWebFrame
  *
diff --git a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
index 6203f53..136e2fd 100644
--- a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
+++ b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
@@ -50,6 +50,10 @@ public:
     static WTF::CString counterValueForElementById(WebKitWebFrame* frame, const char* id);
     static int pageNumberForElementById(WebKitWebFrame* frame, const char* id, float pageWidth, float pageHeight);
     static int numberOfPagesForFrame(WebKitWebFrame* frame, float pageWidth, float pageHeight);
+    static WTF::CString pageProperty(WebKitWebFrame* frame, const char* propertyName, int pageNumber);
+    static bool isPageBoxVisible(WebKitWebFrame* frame, int pageNumber);
+    static WTF::CString pageSizeAndMarginsInPixels(WebKitWebFrame* mainFrame, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
+    static void addUserStyleSheet(WebKitWebFrame* mainFrame, const char* sourceCode);
     static guint getPendingUnloadEventCount(WebKitWebFrame* frame);
     static bool pauseAnimation(WebKitWebFrame* frame, const char* name, double time, const char* element);
     static bool pauseTransition(WebKitWebFrame* frame, const char* name, double time, const char* element);
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c0287b4..976a769 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2010-12-10  Joone Hur  <joone at kldp.org>
+
+        Reviewed by Eric Seidel.
+
+        [GTK] Add DRT support for pageProperty, isPageBoxVisible, pageSizeAndMarginsInPixels, and addUserStyleSheet
+        https://bugs.webkit.org/show_bug.cgi?id=50783
+
+        This patch allows to unskip the following test cases:
+        printing/page-rule-selection.html
+        printing/page-format-data.html
+
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::pageProperty): Added.
+        (LayoutTestController::isPageBoxVisible): Ditto.
+        (LayoutTestController::pageSizeAndMarginsInPixels): Ditto.
+        (LayoutTestController::addUserStyleSheet): Ditto.
+
 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 5bd80db..3ecc844 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -152,20 +152,19 @@ int LayoutTestController::numberOfPages(float pageWidth, float pageHeight)
 
 JSRetainPtr<JSStringRef> LayoutTestController::pageProperty(const char* propertyName, int pageNumber) const
 {
-    // FIXME: implement
-    return JSRetainPtr<JSStringRef>();
+    JSRetainPtr<JSStringRef> propertyValue(Adopt, JSStringCreateWithUTF8CString(DumpRenderTreeSupportGtk::pageProperty(mainFrame, propertyName, pageNumber).data()));
+    return propertyValue;
 }
 
 bool LayoutTestController::isPageBoxVisible(int pageNumber) const
 {
-    // FIXME: implement
-    return false;
+    return DumpRenderTreeSupportGtk::isPageBoxVisible(mainFrame, pageNumber);
 }
 
 JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft) const
 {
-    // FIXME: implement
-    return JSRetainPtr<JSStringRef>();
+    JSRetainPtr<JSStringRef> propertyValue(Adopt, JSStringCreateWithUTF8CString(DumpRenderTreeSupportGtk::pageSizeAndMarginsInPixels(mainFrame, pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft).data()));
+    return propertyValue;
 }
 
 size_t LayoutTestController::webHistoryItemCount()
@@ -716,7 +715,8 @@ void LayoutTestController::addUserScript(JSStringRef source, bool runAtStart, bo
 
 void LayoutTestController::addUserStyleSheet(JSStringRef source, bool allFrames)
 {
-    printf("LayoutTestController::addUserStyleSheet not implemented.\n");
+    GOwnPtr<gchar> sourceCode(JSStringCopyUTF8CString(source));
+    DumpRenderTreeSupportGtk::addUserStyleSheet(mainFrame, sourceCode.get());
 }
 
 void LayoutTestController::setDeveloperExtrasEnabled(bool enabled)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list