Changeset 111419 in webkit


Ignore:
Timestamp:
Mar 20, 2012 11:37:58 AM (12 years ago)
Author:
mitz@apple.com
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.
Location:
trunk
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r111412 r111419  
     12012-03-20  Dan Bernstein  <mitz@apple.com>
     2
     3        REGRESSION (r111229): css1/basic/inheritance.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=81684
     5
     6        Reverted r111229.
     7
     8        Rubber-stamped by Dave Hyatt.
     9
     10        * fast/regions/webkit-named-flow-content-nodes-expected.txt: Removed.
     11        * fast/regions/webkit-named-flow-content-nodes.html: Removed.
     12
    1132012-03-20  Dan Bernstein  <mitz@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r111416 r111419  
     12012-03-20  Dan Bernstein  <mitz@apple.com>
     2
     3        REGRESSION (r111229): css1/basic/inheritance.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=81684
     5
     6        Reverted r111229.
     7
     8        Rubber-stamped by Dave Hyatt.
     9
     10        * dom/Document.cpp:
     11        (WebCore::Document::webkitGetFlowByName):
     12        * dom/Document.h:
     13        (Document):
     14        * dom/Element.cpp:
     15        (WebCore::Element::detach):
     16        * dom/NodeRenderingContext.cpp:
     17        (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
     18        * dom/WebKitNamedFlow.cpp:
     19        (WebCore):
     20        * dom/WebKitNamedFlow.h:
     21        (WebCore):
     22        (WebKitNamedFlow):
     23        * dom/WebKitNamedFlow.idl:
     24
    1252012-03-20  Vineet Chaudhary  <rgf748@motorola.com>
    226
  • trunk/Source/WebCore/dom/Document.cpp

    r111361 r111419  
    10391039PassRefPtr<WebKitNamedFlow> Document::webkitGetFlowByName(const String& flowName)
    10401040{
    1041     return webkitGetFlowByName(flowName, CheckFlowNameForInvalidValues);
    1042 }
    1043 
    1044 PassRefPtr<WebKitNamedFlow> Document::webkitGetFlowByName(const String& flowName, FlowNameCheck flowNameCheck)
    1045 {
    1046     if (!cssRegionsEnabled() || !renderer())
     1041    if (!cssRegionsEnabled() || flowName.isEmpty() || !validFlowName(flowName) || !renderer())
    10471042        return 0;
    10481043
    1049     if (flowNameCheck == CheckFlowNameForInvalidValues) {
    1050         if (flowName.isEmpty() || !validFlowName(flowName))
    1051             return 0;
    1052 
    1053         // Make a slower check for invalid flow name
    1054         CSSParser parser(true);
    1055         if (!parser.parseFlowThread(flowName, this))
    1056             return 0;
    1057     }
     1044    // Make a slower check for invalid flow name
     1045    CSSParser p(true);
     1046    if (!p.parseFlowThread(flowName, this))
     1047        return 0;
    10581048
    10591049    if (RenderView* view = renderer()->view())
  • trunk/Source/WebCore/dom/Document.h

    r111229 r111419  
    353353
    354354    bool cssRegionsEnabled() const;
    355     enum FlowNameCheck {
    356         CheckFlowNameForInvalidValues,
    357         DoNotCheckFlowNameForInvalidValues
    358     };
    359355    PassRefPtr<WebKitNamedFlow> webkitGetFlowByName(const String&);
    360     PassRefPtr<WebKitNamedFlow> webkitGetFlowByName(const String&, FlowNameCheck);
    361356
    362357    bool regionBasedColumnsEnabled() const;
  • trunk/Source/WebCore/dom/Element.cpp

    r111229 r111419  
    6767#include "Text.h"
    6868#include "TextIterator.h"
     69#include "WebKitMutationObserver.h"
    6970#include "WebKitAnimationList.h"
    70 #include "WebKitMutationObserver.h"
    71 #include "WebKitNamedFlow.h"
    7271#include "XMLNSNames.h"
    7372#include "XMLNames.h"
     
    981980    RenderWidget::suspendWidgetHierarchyUpdates();
    982981
    983     if (document()->cssRegionsEnabled()) {
    984         RenderStyle* style = renderer() ? renderer()->style() : computedStyle();
    985         if (style && !style->flowThread().isEmpty()) {
    986             RefPtr<WebKitNamedFlow> namedFlow = document()->webkitGetFlowByName(style->flowThread(), Document::DoNotCheckFlowNameForInvalidValues);
    987             if (namedFlow)
    988                 namedFlow->unregisterContentNode(this);
    989         }
    990     }
    991 
    992982    cancelFocusAppearanceUpdate();
    993983    if (hasRareData())
  • trunk/Source/WebCore/dom/NodeRenderingContext.cpp

    r111229 r111419  
    3939#include "ShadowRoot.h"
    4040#include "ShadowTree.h"
    41 #include "WebKitNamedFlow.h"
    4241
    4342#if ENABLE(SVG)
     
    329328    ASSERT(m_node->document()->renderView());
    330329    m_parentFlowRenderer = m_node->document()->renderView()->ensureRenderFlowThreadWithName(m_flowThread);
    331     m_parentFlowRenderer->ensureNamedFlow()->registerContentNode(m_node);
    332330}
    333331
  • trunk/Source/WebCore/dom/WebKitNamedFlow.cpp

    r111376 r111419  
    3131#include "WebKitNamedFlow.h"
    3232
    33 #include "Node.h"
    34 #include "NodeList.h"
    3533#include "RenderFlowThread.h"
    36 #include "RenderRegion.h"
    37 #include "StaticNodeList.h"
    3834
    3935namespace WebCore {
     
    5248    m_parentFlowThread->document()->updateLayoutIgnorePendingStylesheets();
    5349    return m_parentFlowThread->overflow();
    54 }
    55 
    56 PassRefPtr<NodeList> WebKitNamedFlow::contentNodes() const
    57 {
    58     m_parentFlowThread->document()->updateLayoutIgnorePendingStylesheets();
    59 
    60     Vector<RefPtr<Node> > contentNodes;
    61     for (NamedFlowContentNodes::const_iterator it = m_contentNodes.begin(); it != m_contentNodes.end(); ++it) {
    62         Node* node = const_cast<Node*>(*it);
    63         ASSERT(node->computedStyle()->flowThread() == m_parentFlowThread->flowThread());
    64         contentNodes.append(node);
    65     }
    66 
    67     return StaticNodeList::adopt(contentNodes);
    68 }
    69 
    70 // The content nodes list contains those nodes with -webkit-flow-into: flow.
    71 // An element with display:none should also be listed among those nodes.
    72 // The list of nodes is orderer.
    73 void WebKitNamedFlow::registerContentNode(Node* contentNode)
    74 {
    75     ASSERT(contentNode && contentNode->isElementNode());
    76 
    77     // Find the first content node following the new content node.
    78     for (NamedFlowContentNodes::iterator it = m_contentNodes.begin(); it != m_contentNodes.end(); ++it) {
    79         Node* node = *it;
    80         unsigned short position = contentNode->compareDocumentPosition(node);
    81         if (position & Node::DOCUMENT_POSITION_FOLLOWING) {
    82             m_contentNodes.insertBefore(node, contentNode);
    83             return;
    84         }
    85     }
    86     m_contentNodes.add(contentNode);
    8750}
    8851
  • trunk/Source/WebCore/dom/WebKitNamedFlow.h

    r111376 r111419  
    3131#define WebKitNamedFlow_h
    3232
    33 #include <Node.h>
    34 #include <wtf/ListHashSet.h>
    3533#include <wtf/RefCounted.h>
    3634#include <wtf/RefPtr.h>
     
    3836namespace WebCore {
    3937
    40 class NodeList;
    4138class RenderFlowThread;
    4239
     
    5148
    5249    bool overflow() const;
    53     PassRefPtr<NodeList> contentNodes() const;
    5450    PassRefPtr<NodeList> getRegionsByContentNode(Node*);
    55 
    56     void registerContentNode(Node* contentNode);
    57     void unregisterContentNode(Node* contentNode) { m_contentNodes.remove(contentNode); }
    5851
    5952private:
     
    6154
    6255    RenderFlowThread* m_parentFlowThread;
    63 
    64     typedef ListHashSet<Node*> NamedFlowContentNodes;
    65     NamedFlowContentNodes m_contentNodes;
    6656};
    6757
  • trunk/Source/WebCore/dom/WebKitNamedFlow.idl

    r111376 r111419  
    3333    ] WebKitNamedFlow {
    3434        readonly attribute boolean overflow;
    35         readonly attribute NodeList contentNodes;
    3635        NodeList getRegionsByContentNode(in Node contentNode);
    3736    };
Note: See TracChangeset for help on using the changeset viewer.