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  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: svn://svn.chromium.org/blink/trunk@83195 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent eabff8ad
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> 2011-04-07 Enrica Casucci <enrica@apple.com>
Reviewed by Oliver Hunt. Reviewed by Oliver Hunt.
...@@ -1390,10 +1390,6 @@ printing/page-rule-in-media-query.html ...@@ -1390,10 +1390,6 @@ printing/page-rule-in-media-query.html
printing/setPrinting.html printing/setPrinting.html
printing/simultaneous-position-float-change.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 # WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
# <https://bugs.webkit.org/show_bug.cgi?id=42696> # <https://bugs.webkit.org/show_bug.cgi?id=42696>
security/set-form-autocomplete-attribute.html security/set-form-autocomplete-attribute.html
......
...@@ -1808,10 +1808,6 @@ printing/media-queries-print.html ...@@ -1808,10 +1808,6 @@ printing/media-queries-print.html
printing/page-rule-in-media-query.html printing/page-rule-in-media-query.html
printing/setPrinting.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 # WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
# <https://bugs.webkit.org/show_bug.cgi?id=42696> # <https://bugs.webkit.org/show_bug.cgi?id=42696>
security/set-form-autocomplete-attribute.html security/set-form-autocomplete-attribute.html
......
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> 2011-04-07 Enrica Casucci <enrica@apple.com>
Reviewed by Oliver Hunt. Reviewed by Oliver Hunt.
......
...@@ -167,3 +167,8 @@ WKStringRef WKBundlePageSizeAndMarginsInPixels(WKBundleRef bundleRef, WKBundleFr ...@@ -167,3 +167,8 @@ WKStringRef WKBundlePageSizeAndMarginsInPixels(WKBundleRef bundleRef, WKBundleFr
{ {
return toCopiedAPI(toImpl(bundleRef)->pageSizeAndMarginsInPixels(toImpl(frameRef), pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft)); 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);
}
...@@ -72,6 +72,7 @@ WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t); ...@@ -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 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 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 WKStringRef WKBundlePageSizeAndMarginsInPixels(WKBundleRef bundle, WKBundleFrameRef frameRef, int, int, int, int, int, int, int);
WK_EXPORT bool WKBundleIsPageBoxVisible(WKBundleRef bundle, WKBundleFrameRef frameRef, int);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -185,6 +185,15 @@ String InjectedBundle::pageSizeAndMarginsInPixels(WebFrame* frame, int pageIndex ...@@ -185,6 +185,15 @@ String InjectedBundle::pageSizeAndMarginsInPixels(WebFrame* frame, int pageIndex
return PrintContext::pageSizeAndMarginsInPixels(coreFrame, pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft); 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) static PassOwnPtr<Vector<String> > toStringVector(ImmutableArray* patterns)
{ {
if (!patterns) if (!patterns)
......
...@@ -96,6 +96,7 @@ public: ...@@ -96,6 +96,7 @@ public:
int numberOfPages(WebFrame*, double, double); int numberOfPages(WebFrame*, double, double);
int pageNumberForElementById(WebFrame*, const String&, double, double); int pageNumberForElementById(WebFrame*, const String&, double, double);
String pageSizeAndMarginsInPixels(WebFrame*, int, int, int, int, int, int, int); String pageSizeAndMarginsInPixels(WebFrame*, int, int, int, int, int, int, int);
bool isPageBoxVisible(WebFrame*, int);
// UserContent API // UserContent API
void addUserScript(WebPageGroupProxy*, InjectedBundleScriptWorld*, const String& source, const String& url, ImmutableArray* whitelist, ImmutableArray* blacklist, WebCore::UserScriptInjectionTime, WebCore::UserContentInjectedFrames); void addUserScript(WebPageGroupProxy*, InjectedBundleScriptWorld*, const String& source, const String& url, ImmutableArray* whitelist, ImmutableArray* blacklist, WebCore::UserScriptInjectionTime, WebCore::UserContentInjectedFrames);
......
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> 2011-04-07 Adam Roben <aroben@apple.com>
Build fix Build fix
......
...@@ -68,6 +68,7 @@ module WTR { ...@@ -68,6 +68,7 @@ module WTR {
int numberOfPages(in double pageWidthInPixels, in double pageHeightInPixels); int numberOfPages(in double pageWidthInPixels, in double pageHeightInPixels);
int pageNumberForElementById(in DOMString id, 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); 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. // Animation testing.
int numberOfActiveAnimations(); int numberOfActiveAnimations();
......
...@@ -343,6 +343,12 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pa ...@@ -343,6 +343,12 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pa
return toJS(WKBundlePageSizeAndMarginsInPixels(InjectedBundle::shared().bundle(), mainFrame, pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft)); 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() unsigned LayoutTestController::windowCount()
{ {
return InjectedBundle::shared().pageCount(); return InjectedBundle::shared().pageCount();
......
...@@ -116,6 +116,7 @@ public: ...@@ -116,6 +116,7 @@ public:
int numberOfPages(double pageWidthInPixels, double pageHeightInPixels); int numberOfPages(double pageWidthInPixels, double pageHeightInPixels);
int pageNumberForElementById(JSStringRef, 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); 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 }; enum WhatToDump { RenderTree, MainFrameText, AllFramesText };
WhatToDump whatToDump() const { return m_whatToDump; } WhatToDump whatToDump() const { return m_whatToDump; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment