2011-04-07 Chang Shu <cshu@webkit.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2011 19:17:41 +0000 (19:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2011 19:17:41 +0000 (19:17 +0000)
        Reviewed by Darin Adler.

        WebKitTestRunner needs layoutTestController.isPageBoxVisible
        https://bugs.webkit.org/show_bug.cgi?id=42695

        Unskip passed tests.

        * platform/mac-wk2/Skipped:
        * platform/qt-wk2/Skipped:
2011-04-07  Chang Shu  <cshu@webkit.org>

        Reviewed by Darin Adler.

        WebKitTestRunner needs layoutTestController.isPageBoxVisible
        https://bugs.webkit.org/show_bug.cgi?id=42695

        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
        (WKBundleIsPageBoxVisible):
        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::isPageBoxVisible):
        * WebProcess/InjectedBundle/InjectedBundle.h:
2011-04-07  Chang Shu  <cshu@webkit.org>

        Reviewed by Darin Adler.

        WebKitTestRunner needs layoutTestController.isPageBoxVisible
        https://bugs.webkit.org/show_bug.cgi?id=42695

        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
        (WTR::LayoutTestController::isPageBoxVisible):
        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83195 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/Skipped
LayoutTests/platform/qt-wk2/Skipped
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

index ed857f2..a04a03f 100644 (file)
@@ -1,3 +1,15 @@
+2011-04-07  Chang Shu  <cshu@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        WebKitTestRunner needs layoutTestController.isPageBoxVisible
+        https://bugs.webkit.org/show_bug.cgi?id=42695
+
+        Unskip passed tests.
+
+        * platform/mac-wk2/Skipped:
+        * platform/qt-wk2/Skipped:
+
 2011-04-07  Enrica Casucci  <enrica@apple.com>
 
         Reviewed by Oliver Hunt.
index 54b327f..a7b0efd 100644 (file)
@@ -1390,10 +1390,6 @@ printing/page-rule-in-media-query.html
 printing/setPrinting.html
 printing/simultaneous-position-float-change.html
 
-# WebKitTestRunner needs layoutTestController.isPageBoxVisible
-# <https://bugs.webkit.org/show_bug.cgi?id=42695>
-printing/page-format-data.html
-
 # WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
 # <https://bugs.webkit.org/show_bug.cgi?id=42696>
 security/set-form-autocomplete-attribute.html
index beebfc5..4cc403c 100644 (file)
@@ -1808,10 +1808,6 @@ printing/media-queries-print.html
 printing/page-rule-in-media-query.html
 printing/setPrinting.html
 
-# WebKitTestRunner needs layoutTestController.isPageBoxVisible
-# <https://bugs.webkit.org/show_bug.cgi?id=42695>
-printing/page-format-data.html
-
 # WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
 # <https://bugs.webkit.org/show_bug.cgi?id=42696>
 security/set-form-autocomplete-attribute.html
index ad9885d..ca1bd33 100644 (file)
@@ -1,3 +1,17 @@
+2011-04-07  Chang Shu  <cshu@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        WebKitTestRunner needs layoutTestController.isPageBoxVisible
+        https://bugs.webkit.org/show_bug.cgi?id=42695
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleIsPageBoxVisible):
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::isPageBoxVisible):
+        * WebProcess/InjectedBundle/InjectedBundle.h:
+
 2011-04-07  Enrica Casucci  <enrica@apple.com>
 
         Reviewed by Oliver Hunt.
index 4568825..d73070d 100644 (file)
@@ -167,3 +167,8 @@ WKStringRef WKBundlePageSizeAndMarginsInPixels(WKBundleRef bundleRef, WKBundleFr
 {
     return toCopiedAPI(toImpl(bundleRef)->pageSizeAndMarginsInPixels(toImpl(frameRef), pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft));
 }
+
+WK_EXPORT bool WKBundleIsPageBoxVisible(WKBundleRef bundleRef, WKBundleFrameRef frameRef, int pageIndex)
+{
+    return toImpl(bundleRef)->isPageBoxVisible(toImpl(frameRef), pageIndex);
+}
index fa3ec75..03e17a2 100644 (file)
@@ -72,6 +72,7 @@ WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t);
 WK_EXPORT int WKBundleNumberOfPages(WKBundleRef bundle, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels);
 WK_EXPORT int WKBundlePageNumberForElementById(WKBundleRef bundle, WKBundleFrameRef frameRef, WKStringRef idRef, double pageWidthInPixels, double pageHeightInPixels);
 WK_EXPORT WKStringRef WKBundlePageSizeAndMarginsInPixels(WKBundleRef bundle, WKBundleFrameRef frameRef, int, int, int, int, int, int, int);
+WK_EXPORT bool WKBundleIsPageBoxVisible(WKBundleRef bundle, WKBundleFrameRef frameRef, int);
 
 #ifdef __cplusplus
 }
index 0966c0e..baee7c9 100644 (file)
@@ -185,6 +185,15 @@ String InjectedBundle::pageSizeAndMarginsInPixels(WebFrame* frame, int pageIndex
     return PrintContext::pageSizeAndMarginsInPixels(coreFrame, pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft);
 }
 
+bool InjectedBundle::isPageBoxVisible(WebFrame* frame, int pageIndex)
+{
+    Frame* coreFrame = frame ? frame->coreFrame() : 0;
+    if (!coreFrame)
+        return false;
+
+    return PrintContext::isPageBoxVisible(coreFrame, pageIndex);
+}
+
 static PassOwnPtr<Vector<String> > toStringVector(ImmutableArray* patterns)
 {
     if (!patterns)
index ae0be42..6755a39 100644 (file)
@@ -96,6 +96,7 @@ public:
     int numberOfPages(WebFrame*, double, double);
     int pageNumberForElementById(WebFrame*, const String&, double, double);
     String pageSizeAndMarginsInPixels(WebFrame*, int, int, int, int, int, int, int);
+    bool isPageBoxVisible(WebFrame*, int);
 
     // UserContent API
     void addUserScript(WebPageGroupProxy*, InjectedBundleScriptWorld*, const String& source, const String& url, ImmutableArray* whitelist, ImmutableArray* blacklist, WebCore::UserScriptInjectionTime, WebCore::UserContentInjectedFrames);
index 277f0ff..6759320 100644 (file)
@@ -1,3 +1,15 @@
+2011-04-07  Chang Shu  <cshu@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        WebKitTestRunner needs layoutTestController.isPageBoxVisible
+        https://bugs.webkit.org/show_bug.cgi?id=42695
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR::LayoutTestController::isPageBoxVisible):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
 2011-04-07  Adam Roben  <aroben@apple.com>
 
         Build fix
index 644aec3..485ca97 100644 (file)
@@ -68,6 +68,7 @@ module WTR {
         int numberOfPages(in double pageWidthInPixels, in double pageHeightInPixels);
         int pageNumberForElementById(in DOMString id, in double pageWidthInPixels, in double pageHeightInPixels);
         DOMString pageSizeAndMarginsInPixels(in int pageIndex, in int width, in int height, in int marginTop, in int marginRight, in int marginBottom, in int marginLeft);
+        boolean isPageBoxVisible(in int pageIndex);
 
         // Animation testing.
         int numberOfActiveAnimations();
index 2064f69..b575077 100644 (file)
@@ -343,6 +343,12 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pa
     return toJS(WKBundlePageSizeAndMarginsInPixels(InjectedBundle::shared().bundle(), mainFrame, pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft));
 }
 
+bool LayoutTestController::isPageBoxVisible(int pageIndex)
+{
+    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
+    return WKBundleIsPageBoxVisible(InjectedBundle::shared().bundle(), mainFrame, pageIndex);
+}
+
 unsigned LayoutTestController::windowCount()
 {
     return InjectedBundle::shared().pageCount();
index 54d9c57..cc1b85e 100644 (file)
@@ -116,6 +116,7 @@ public:
     int numberOfPages(double pageWidthInPixels, double pageHeightInPixels);
     int pageNumberForElementById(JSStringRef, double pageWidthInPixels, double pageHeightInPixels);
     JSRetainPtr<JSStringRef> pageSizeAndMarginsInPixels(int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
+    bool isPageBoxVisible(int pageIndex);
 
     enum WhatToDump { RenderTree, MainFrameText, AllFramesText };
     WhatToDump whatToDump() const { return m_whatToDump; }