Title: [131530] trunk
Revision
131530
Author
[email protected]
Date
2012-10-16 17:04:52 -0700 (Tue, 16 Oct 2012)

Log Message

[Page Visibility API] View-less documents should report as hidden
https://bugs.webkit.org/show_bug.cgi?id=99410

Reviewed by Tony Gentilcore.

Source/WebCore:

Test: fast/events/page-visibility-null-view.html

* dom/Document.cpp:
(WebCore::Document::visibilityState):

LayoutTests:

* fast/events/page-visibility-null-view-expected.txt: Added.
* fast/events/page-visibility-null-view.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (131529 => 131530)


--- trunk/LayoutTests/ChangeLog	2012-10-16 23:59:16 UTC (rev 131529)
+++ trunk/LayoutTests/ChangeLog	2012-10-17 00:04:52 UTC (rev 131530)
@@ -1,3 +1,13 @@
+2012-10-16  James Simonsen  <[email protected]>
+
+        [Page Visibility API] View-less documents should report as hidden
+        https://bugs.webkit.org/show_bug.cgi?id=99410
+
+        Reviewed by Tony Gentilcore.
+
+        * fast/events/page-visibility-null-view-expected.txt: Added.
+        * fast/events/page-visibility-null-view.html: Added.
+
 2012-10-16  Tony Chang  <[email protected]>
 
         Unreviewed, broaden Chromium TestExpectations to match waterfall.

Added: trunk/LayoutTests/fast/events/page-visibility-null-view-expected.txt (0 => 131530)


--- trunk/LayoutTests/fast/events/page-visibility-null-view-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/events/page-visibility-null-view-expected.txt	2012-10-17 00:04:52 UTC (rev 131530)
@@ -0,0 +1,12 @@
+This test checks that Page Visibility state values are correct when a document has no defaultView.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS subdocument.defaultView == null is true
+PASS subdocument.webkitVisibilityState is "hidden"
+PASS subdocument.webkitHidden is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/events/page-visibility-null-view.html (0 => 131530)


--- trunk/LayoutTests/fast/events/page-visibility-null-view.html	                        (rev 0)
+++ trunk/LayoutTests/fast/events/page-visibility-null-view.html	2012-10-17 00:04:52 UTC (rev 131530)
@@ -0,0 +1,20 @@
+<html>
+<head>
+<script src=""
+
+<script>
+
+description("This test checks that Page Visibility state values are correct when a document has no defaultView.");
+
+var subdocument = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', null);
+
+shouldBeTrue("subdocument.defaultView == null");
+shouldBeEqualToString("subdocument.webkitVisibilityState", "hidden");
+shouldBeTrue("subdocument.webkitHidden");
+
+</script>
+
+<script src=""
+
+</head>
+</html>

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (131529 => 131530)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2012-10-16 23:59:16 UTC (rev 131529)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2012-10-17 00:04:52 UTC (rev 131530)
@@ -268,6 +268,7 @@
 webkit.org/b/97324 fast/events/page-visibility-iframe-delete-test.html [ Skip ]
 webkit.org/b/97324 fast/events/page-visibility-iframe-move-test.html [ Skip ]
 webkit.org/b/97324 fast/events/page-visibility-iframe-propagation-test.html [ Skip ]
+webkit.org/b/97324 fast/events/page-visibility-null-view.html [ Skip ]
 webkit.org/b/97324 fast/events/page-visibility-transition-test.html [ Skip ]
 
 # GTK doesn't support smart replace.

Modified: trunk/LayoutTests/platform/mac/TestExpectations (131529 => 131530)


--- trunk/LayoutTests/platform/mac/TestExpectations	2012-10-16 23:59:16 UTC (rev 131529)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2012-10-17 00:04:52 UTC (rev 131530)
@@ -397,6 +397,7 @@
 fast/events/page-visibility-iframe-delete-test.html
 fast/events/page-visibility-iframe-move-test.html
 fast/events/page-visibility-iframe-propagation-test.html
+fast/events/page-visibility-null-view.html
 fast/events/page-visibility-transition-test.html
 
 # console long eval test is timeout 60616

Modified: trunk/LayoutTests/platform/qt/TestExpectations (131529 => 131530)


--- trunk/LayoutTests/platform/qt/TestExpectations	2012-10-16 23:59:16 UTC (rev 131529)
+++ trunk/LayoutTests/platform/qt/TestExpectations	2012-10-17 00:04:52 UTC (rev 131530)
@@ -569,6 +569,7 @@
 fast/events/page-visibility-iframe-delete-test.html
 fast/events/page-visibility-iframe-move-test.html
 fast/events/page-visibility-iframe-propagation-test.html
+fast/events/page-visibility-null-view.html
 fast/events/page-visibility-transition-test.html
 
 # No CORS support for media elements is implemented yet.

Modified: trunk/LayoutTests/platform/win/TestExpectations (131529 => 131530)


--- trunk/LayoutTests/platform/win/TestExpectations	2012-10-16 23:59:16 UTC (rev 131529)
+++ trunk/LayoutTests/platform/win/TestExpectations	2012-10-17 00:04:52 UTC (rev 131530)
@@ -1467,6 +1467,7 @@
 fast/events/page-visibility-iframe-delete-test.html
 fast/events/page-visibility-iframe-move-test.html
 fast/events/page-visibility-iframe-propagation-test.html
+fast/events/page-visibility-null-view.html
 fast/events/page-visibility-transition-test.html
 
 # Unskip after implementing LayoutTestController::setDefersLoading and ::goBack.

Modified: trunk/Source/WebCore/ChangeLog (131529 => 131530)


--- trunk/Source/WebCore/ChangeLog	2012-10-16 23:59:16 UTC (rev 131529)
+++ trunk/Source/WebCore/ChangeLog	2012-10-17 00:04:52 UTC (rev 131530)
@@ -1,3 +1,15 @@
+2012-10-16  James Simonsen  <[email protected]>
+
+        [Page Visibility API] View-less documents should report as hidden
+        https://bugs.webkit.org/show_bug.cgi?id=99410
+
+        Reviewed by Tony Gentilcore.
+
+        Test: fast/events/page-visibility-null-view.html
+
+        * dom/Document.cpp:
+        (WebCore::Document::visibilityState):
+
 2012-10-16  Michael Saboff  <[email protected]>
 
         Change WTF_USE_8BIT_TEXTRUN to ENABLE_8BIT_TEXTRUN

Modified: trunk/Source/WebCore/dom/Document.cpp (131529 => 131530)


--- trunk/Source/WebCore/dom/Document.cpp	2012-10-16 23:59:16 UTC (rev 131529)
+++ trunk/Source/WebCore/dom/Document.cpp	2012-10-17 00:04:52 UTC (rev 131530)
@@ -1624,10 +1624,10 @@
 {
     // The visibility of the document is inherited from the visibility of the
     // page. If there is no page associated with the document, we will assume
-    // that the page is visible i.e. invisibility has to be explicitly
-    // specified by the embedder.
+    // that the page is hidden, as specified by the spec:
+    // http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#dom-document-hidden
     if (!m_frame || !m_frame->page())
-        return PageVisibilityStateVisible;
+        return PageVisibilityStateHidden;
     return m_frame->page()->visibilityState();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to