Title: [111419] trunk
Revision
111419
Author
[email protected]
Date
2012-03-20 11:37:58 -0700 (Tue, 20 Mar 2012)

Log Message

REGRESSION (r111229): css1/basic/inheritance.html is failing
https://bugs.webkit.org/show_bug.cgi?id=81684

Reverted r111229.

Rubber-stamped by Dave Hyatt.

Source/WebCore: 

* dom/Document.cpp:
(WebCore::Document::webkitGetFlowByName):
* dom/Document.h:
(Document):
* dom/Element.cpp:
(WebCore::Element::detach):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
* dom/WebKitNamedFlow.cpp:
(WebCore):
* dom/WebKitNamedFlow.h:
(WebCore):
(WebKitNamedFlow):
* dom/WebKitNamedFlow.idl:

LayoutTests: 

* fast/regions/webkit-named-flow-content-nodes-expected.txt: Removed.
* fast/regions/webkit-named-flow-content-nodes.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (111418 => 111419)


--- trunk/LayoutTests/ChangeLog	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/LayoutTests/ChangeLog	2012-03-20 18:37:58 UTC (rev 111419)
@@ -1,5 +1,17 @@
 2012-03-20  Dan Bernstein  <[email protected]>
 
+        REGRESSION (r111229): css1/basic/inheritance.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=81684
+
+        Reverted r111229.
+
+        Rubber-stamped by Dave Hyatt.
+
+        * fast/regions/webkit-named-flow-content-nodes-expected.txt: Removed.
+        * fast/regions/webkit-named-flow-content-nodes.html: Removed.
+
+2012-03-20  Dan Bernstein  <[email protected]>
+
         Updated expected results for a test, while <http://webkit.org/b/81679> is tracking this
         possible regression.
 

Deleted: trunk/LayoutTests/fast/regions/webkit-named-flow-content-nodes-expected.txt (111418 => 111419)


--- trunk/LayoutTests/fast/regions/webkit-named-flow-content-nodes-expected.txt	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/LayoutTests/fast/regions/webkit-named-flow-content-nodes-expected.txt	2012-03-20 18:37:58 UTC (rev 111419)
@@ -1,33 +0,0 @@
-Test for 80134: [CSSRegions]Implement NamedFlow::contentNodes
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS namedFlowContentNodes is non-null.
-PASS namedFlowContentNodes.length is 0
-WARN: shouldBe() expects string arguments
-PASS true is true
-PASS namedFlowContentNodes2.length is 0
-PASS namedFlowContentNodes3.length is 1
-PASS namedFlowContentNodes3.item(0).id is "article"
-PASS namedFlowContentNodes4.length is 1
-PASS namedFlowContentNodes4.item(0).id is "article"
-PASS namedFlowContentNodes5.length is 2
-PASS namedFlowContentNodes5.item(0).id is "article2"
-PASS namedFlowContentNodes5.item(1).id is "article"
-PASS namedFlowContentNodes6.length is 2
-PASS namedFlowContentNodes7.length is 2
-PASS namedFlowContentNodes8.length is 3
-PASS namedFlowContentNodes9.length is 3
-PASS namedFlowContentNodes9.item(0).id is "article2"
-PASS namedFlowContentNodes9.item(1).id is "span1"
-PASS namedFlowContentNodes9.item(2).id is "article"
-PASS namedFlowContentNodes10.length is 3
-PASS namedFlowContentNodes10.item(0).id is "article"
-PASS namedFlowContentNodes11.length is 5
-PASS namedFlowContentNodes12.length is 1
-PASS namedFlowContentNodes12.item(0).id is "article"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/regions/webkit-named-flow-content-nodes.html (111418 => 111419)


--- trunk/LayoutTests/fast/regions/webkit-named-flow-content-nodes.html	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/LayoutTests/fast/regions/webkit-named-flow-content-nodes.html	2012-03-20 18:37:58 UTC (rev 111419)
@@ -1,119 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <script src=""
-        <style>
-            #region { -webkit-flow-from: flow; width: 250px; height: 150px; }
-        </style>
-    </head>
-    <body>
-        <!--
-        1. The content nodes collection for a named flow 'flow' contains only those elements that have
-        the style property -webkit-flow-into set to 'flow'.
-        2. If an element has an ancestor with -webkit-flow-into = 'flow' but does not have its '-webkit-flow-into'
-        set to 'flow' will not be listed among the content nodes for named flow 'flow'.
-        3. Elements with '-webkit-flow-into' set to 'flow' and 'display:none' should be listed among the content nodes
-        for named flow object 'flow'.
-        4. The collection of nodes is returned in document order.
-        -->
-        <script>
-            if (window.layoutTestController)
-                window.layoutTestController.dumpAsText();
-            description("Test for 80134: [CSSRegions]Implement NamedFlow::contentNodes");
-
-            // First time ask for a named flow object, the contentNodes should be empty.
-            var namedFlowContentNodes = document.webkitGetFlowByName("flow").contentNodes;
-            shouldBeNonNull("namedFlowContentNodes");
-            shouldEvaluateTo("namedFlowContentNodes.length", 0);
-            shouldBeTrue(namedFlowContentNodes instanceof NodeList);
-
-            // Add an element that would be collected by the named flow but do not add it to the DOM, the contentNodes should be empty.
-            var article = document.createElement("div");
-            article.id = "article";
-            article.style.webkitFlowInto = "flow";
-            var namedFlowContentNodes2 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes2.length", 0);
-
-            // Append the above element to the DOM. It will be collected by the flow, therefore the contentNodes should have 1 element.
-            document.body.appendChild(article);
-            var namedFlowContentNodes3 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes3.length", 1);
-            shouldBeEqualToString("namedFlowContentNodes3.item(0).id", "article");
-
-            // Append a child element to the article above but do not set its style to flow into 'flow'.
-            // The contentNodes should still have 1 element.
-            var pNode = document.createElement("p");
-            pNode.id = "p1";
-            document.getElementById("article").appendChild(pNode);
-            var namedFlowContentNodes4 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes4.length", 1);
-            shouldBeEqualToString("namedFlowContentNodes4.item(0).id", "article");
-
-            // Add another element directly to the flow and set its 'display' property to 'none', it should be part of the flow.
-            var article2 = document.createElement("div");
-            article2.id = "article2";
-            article2.style.webkitFlowInto = "flow";
-            article2.style.display = "none";
-            document.body.insertBefore(article2, article);
-
-            var namedFlowContentNodes5 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes5.length", 2);
-			shouldBeEqualToString("namedFlowContentNodes5.item(0).id", "article2");
-			shouldBeEqualToString("namedFlowContentNodes5.item(1).id", "article");
-
-            // Adding a region element to flow content into should not influence the content nodes collection.
-            var regionNode = document.createElement("div");
-            regionNode.id = "region";
-            document.body.appendChild(regionNode);
-            var namedFlowContentNodes6 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes6.length", 2);
-
-            // Change display:none for the 'article2' element, the list of contentNodes should stay the same
-            document.getElementById("article2").style.display = "block";
-            var namedFlowContentNodes7 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes7.length", 2);
-
-            // Add a p and a span under p. Make the span directly collected by the flow. The contentNodes collection should have 3 elements.
-            pNode = document.createElement("p");
-            pNode.id = "p2";
-            var spanNode = document.createElement("span");
-            spanNode.id = "span1";
-            spanNode.style.webkitFlowInto = "flow";
-            pNode.appendChild(spanNode);
-            document.getElementById("article2").appendChild(pNode);
-
-            var namedFlowContentNodes8 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes8.length", 3);
-
-            // Change display of article node to none, the collection should still have 3 elements.
-            document.getElementById("article").style.display = "none";
-            var namedFlowContentNodes9 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes9.length", 3);
-			shouldBeEqualToString("namedFlowContentNodes9.item(0).id", "article2");
-			shouldBeEqualToString("namedFlowContentNodes9.item(1).id", "span1");
-			shouldBeEqualToString("namedFlowContentNodes9.item(2).id", "article");
-
-            // Take 'article' node from last position and insert it before 'article2'
-            article = document.getElementById("article");
-            document.body.insertBefore(document.body.removeChild(article), article2);
-            var namedFlowContentNodes10 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes10.length", 3);
-			shouldBeEqualToString("namedFlowContentNodes10.item(0).id", "article");
-
-            // Clone 'article2' including its children.
-            var article2Clone = document.getElementById("article2").cloneNode(true);
-            document.body.appendChild(article2Clone);
-            var namedFlowContentNodes11 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes11.length", 5);
-            // Remove article2 nodes from document, they should be removed from flow.
-            document.body.removeChild(article2);
-            document.body.removeChild(article2Clone);
-            var namedFlowContentNodes12 = document.webkitGetFlowByName("flow").contentNodes;
-            shouldEvaluateTo("namedFlowContentNodes12.length", 1);
-			shouldBeEqualToString("namedFlowContentNodes12.item(0).id", "article");
-
-            document.getElementById("region").style.visibility = "hidden";
-        </script>
-        <script src=""
-    </body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (111418 => 111419)


--- trunk/Source/WebCore/ChangeLog	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/Source/WebCore/ChangeLog	2012-03-20 18:37:58 UTC (rev 111419)
@@ -1,3 +1,27 @@
+2012-03-20  Dan Bernstein  <[email protected]>
+
+        REGRESSION (r111229): css1/basic/inheritance.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=81684
+
+        Reverted r111229.
+
+        Rubber-stamped by Dave Hyatt.
+
+        * dom/Document.cpp:
+        (WebCore::Document::webkitGetFlowByName):
+        * dom/Document.h:
+        (Document):
+        * dom/Element.cpp:
+        (WebCore::Element::detach):
+        * dom/NodeRenderingContext.cpp:
+        (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
+        * dom/WebKitNamedFlow.cpp:
+        (WebCore):
+        * dom/WebKitNamedFlow.h:
+        (WebCore):
+        (WebKitNamedFlow):
+        * dom/WebKitNamedFlow.idl:
+
 2012-03-20  Vineet Chaudhary  <[email protected]>
 
         https://bugs.webkit.org/show_bug.cgi?id=80696

Modified: trunk/Source/WebCore/dom/Document.cpp (111418 => 111419)


--- trunk/Source/WebCore/dom/Document.cpp	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/Source/WebCore/dom/Document.cpp	2012-03-20 18:37:58 UTC (rev 111419)
@@ -1038,24 +1038,14 @@
 
 PassRefPtr<WebKitNamedFlow> Document::webkitGetFlowByName(const String& flowName)
 {
-    return webkitGetFlowByName(flowName, CheckFlowNameForInvalidValues);
-}
+    if (!cssRegionsEnabled() || flowName.isEmpty() || !validFlowName(flowName) || !renderer())
+        return 0;
 
-PassRefPtr<WebKitNamedFlow> Document::webkitGetFlowByName(const String& flowName, FlowNameCheck flowNameCheck)
-{
-    if (!cssRegionsEnabled() || !renderer())
+    // Make a slower check for invalid flow name
+    CSSParser p(true);
+    if (!p.parseFlowThread(flowName, this))
         return 0;
 
-    if (flowNameCheck == CheckFlowNameForInvalidValues) {
-        if (flowName.isEmpty() || !validFlowName(flowName))
-            return 0;
-
-        // Make a slower check for invalid flow name
-        CSSParser parser(true);
-        if (!parser.parseFlowThread(flowName, this))
-            return 0;
-    }
-
     if (RenderView* view = renderer()->view())
         return view->ensureRenderFlowThreadWithName(flowName)->ensureNamedFlow();
     return 0;

Modified: trunk/Source/WebCore/dom/Document.h (111418 => 111419)


--- trunk/Source/WebCore/dom/Document.h	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/Source/WebCore/dom/Document.h	2012-03-20 18:37:58 UTC (rev 111419)
@@ -352,12 +352,7 @@
     PassRefPtr<Element> createElement(const QualifiedName&, bool createdByParser);
 
     bool cssRegionsEnabled() const;
-    enum FlowNameCheck {
-        CheckFlowNameForInvalidValues,
-        DoNotCheckFlowNameForInvalidValues
-    };
     PassRefPtr<WebKitNamedFlow> webkitGetFlowByName(const String&);
-    PassRefPtr<WebKitNamedFlow> webkitGetFlowByName(const String&, FlowNameCheck);
 
     bool regionBasedColumnsEnabled() const;
 

Modified: trunk/Source/WebCore/dom/Element.cpp (111418 => 111419)


--- trunk/Source/WebCore/dom/Element.cpp	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/Source/WebCore/dom/Element.cpp	2012-03-20 18:37:58 UTC (rev 111419)
@@ -66,9 +66,8 @@
 #include "ShadowRoot.h"
 #include "Text.h"
 #include "TextIterator.h"
-#include "WebKitAnimationList.h"
 #include "WebKitMutationObserver.h"
-#include "WebKitNamedFlow.h"
+#include "WebKitAnimationList.h"
 #include "XMLNSNames.h"
 #include "XMLNames.h"
 #include "htmlediting.h"
@@ -980,15 +979,6 @@
 {
     RenderWidget::suspendWidgetHierarchyUpdates();
 
-    if (document()->cssRegionsEnabled()) {
-        RenderStyle* style = renderer() ? renderer()->style() : computedStyle();
-        if (style && !style->flowThread().isEmpty()) {
-            RefPtr<WebKitNamedFlow> namedFlow = document()->webkitGetFlowByName(style->flowThread(), Document::DoNotCheckFlowNameForInvalidValues);
-            if (namedFlow)
-                namedFlow->unregisterContentNode(this);
-        }
-    }
-
     cancelFocusAppearanceUpdate();
     if (hasRareData())
         rareData()->resetComputedStyle();

Modified: trunk/Source/WebCore/dom/NodeRenderingContext.cpp (111418 => 111419)


--- trunk/Source/WebCore/dom/NodeRenderingContext.cpp	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/Source/WebCore/dom/NodeRenderingContext.cpp	2012-03-20 18:37:58 UTC (rev 111419)
@@ -38,7 +38,6 @@
 #include "RenderView.h"
 #include "ShadowRoot.h"
 #include "ShadowTree.h"
-#include "WebKitNamedFlow.h"
 
 #if ENABLE(SVG)
 #include "SVGNames.h"
@@ -328,7 +327,6 @@
     m_flowThread = m_style->flowThread();
     ASSERT(m_node->document()->renderView());
     m_parentFlowRenderer = m_node->document()->renderView()->ensureRenderFlowThreadWithName(m_flowThread);
-    m_parentFlowRenderer->ensureNamedFlow()->registerContentNode(m_node);
 }
 
 NodeRendererFactory::NodeRendererFactory(Node* node)

Modified: trunk/Source/WebCore/dom/WebKitNamedFlow.cpp (111418 => 111419)


--- trunk/Source/WebCore/dom/WebKitNamedFlow.cpp	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/Source/WebCore/dom/WebKitNamedFlow.cpp	2012-03-20 18:37:58 UTC (rev 111419)
@@ -30,11 +30,7 @@
 #include "config.h"
 #include "WebKitNamedFlow.h"
 
-#include "Node.h"
-#include "NodeList.h"
 #include "RenderFlowThread.h"
-#include "RenderRegion.h"
-#include "StaticNodeList.h"
 
 namespace WebCore {
 
@@ -53,39 +49,6 @@
     return m_parentFlowThread->overflow();
 }
 
-PassRefPtr<NodeList> WebKitNamedFlow::contentNodes() const
-{
-    m_parentFlowThread->document()->updateLayoutIgnorePendingStylesheets();
-
-    Vector<RefPtr<Node> > contentNodes;
-    for (NamedFlowContentNodes::const_iterator it = m_contentNodes.begin(); it != m_contentNodes.end(); ++it) {
-        Node* node = const_cast<Node*>(*it);
-        ASSERT(node->computedStyle()->flowThread() == m_parentFlowThread->flowThread());
-        contentNodes.append(node);
-    }
-
-    return StaticNodeList::adopt(contentNodes);
-}
-
-// The content nodes list contains those nodes with -webkit-flow-into: flow.
-// An element with display:none should also be listed among those nodes.
-// The list of nodes is orderer.
-void WebKitNamedFlow::registerContentNode(Node* contentNode)
-{
-    ASSERT(contentNode && contentNode->isElementNode());
-
-    // Find the first content node following the new content node.
-    for (NamedFlowContentNodes::iterator it = m_contentNodes.begin(); it != m_contentNodes.end(); ++it) {
-        Node* node = *it;
-        unsigned short position = contentNode->compareDocumentPosition(node);
-        if (position & Node::DOCUMENT_POSITION_FOLLOWING) {
-            m_contentNodes.insertBefore(node, contentNode);
-            return;
-        }
-    }
-    m_contentNodes.add(contentNode);
-}
-
 PassRefPtr<NodeList> WebKitNamedFlow::getRegionsByContentNode(Node* contentNode)
 {
     if (!contentNode)

Modified: trunk/Source/WebCore/dom/WebKitNamedFlow.h (111418 => 111419)


--- trunk/Source/WebCore/dom/WebKitNamedFlow.h	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/Source/WebCore/dom/WebKitNamedFlow.h	2012-03-20 18:37:58 UTC (rev 111419)
@@ -30,14 +30,11 @@
 #ifndef WebKitNamedFlow_h
 #define WebKitNamedFlow_h
 
-#include <Node.h>
-#include <wtf/ListHashSet.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 namespace WebCore {
 
-class NodeList;
 class RenderFlowThread;
 
 class WebKitNamedFlow : public RefCounted<WebKitNamedFlow> {
@@ -50,19 +47,12 @@
     ~WebKitNamedFlow();
 
     bool overflow() const;
-    PassRefPtr<NodeList> contentNodes() const;
     PassRefPtr<NodeList> getRegionsByContentNode(Node*);
 
-    void registerContentNode(Node* contentNode);
-    void unregisterContentNode(Node* contentNode) { m_contentNodes.remove(contentNode); }
-
 private:
     WebKitNamedFlow(RenderFlowThread*);
 
     RenderFlowThread* m_parentFlowThread;
-
-    typedef ListHashSet<Node*> NamedFlowContentNodes;
-    NamedFlowContentNodes m_contentNodes;
 };
 
 }

Modified: trunk/Source/WebCore/dom/WebKitNamedFlow.idl (111418 => 111419)


--- trunk/Source/WebCore/dom/WebKitNamedFlow.idl	2012-03-20 18:33:03 UTC (rev 111418)
+++ trunk/Source/WebCore/dom/WebKitNamedFlow.idl	2012-03-20 18:37:58 UTC (rev 111419)
@@ -32,7 +32,6 @@
         JSGenerateToJSObject
     ] WebKitNamedFlow {
         readonly attribute boolean overflow;
-        readonly attribute NodeList contentNodes;
         NodeList getRegionsByContentNode(in Node contentNode);
     };
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to