Changeset 177048 in webkit


Ignore:
Timestamp:
Dec 9, 2014 4:47:51 PM (9 years ago)
Author:
akling@apple.com
Message:

Roll out r165076.
<rdar://problem/18490587>

This change broke selection when editing Confluence wiki pages.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::nodeOrItsAncestorNeedsStyleRecalc):
(WebCore::ComputedStyleExtractor::propertyValue):

  • dom/Document.cpp:

(WebCore::nodeOrItsAncestorNeedsStyleRecalc): Deleted.
(WebCore::Document::updateStyleIfNeededForNode): Deleted.

  • dom/Document.h:
  • editing/htmlediting.cpp:

(WebCore::isEditablePosition):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::forwardEvent):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r177041 r177048  
     12014-12-09  Andreas Kling  <akling@apple.com>
     2
     3        Roll out r165076.
     4        <rdar://problem/18490587>
     5
     6        This change broke selection when editing Confluence wiki pages.
     7
     8        * css/CSSComputedStyleDeclaration.cpp:
     9        (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
     10        (WebCore::ComputedStyleExtractor::propertyValue):
     11        * dom/Document.cpp:
     12        (WebCore::nodeOrItsAncestorNeedsStyleRecalc): Deleted.
     13        (WebCore::Document::updateStyleIfNeededForNode): Deleted.
     14        * dom/Document.h:
     15        * editing/htmlediting.cpp:
     16        (WebCore::isEditablePosition):
     17        * html/TextFieldInputType.cpp:
     18        (WebCore::TextFieldInputType::forwardEvent):
     19
    1202014-12-09  Myles C. Maxfield  <mmaxfield@apple.com>
    221
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r176258 r177048  
    16721672}
    16731673
     1674static inline bool nodeOrItsAncestorNeedsStyleRecalc(Node* styledNode)
     1675{
     1676    if (styledNode->document().hasPendingForcedStyleRecalc())
     1677        return true;
     1678    for (Node* n = styledNode; n; n = n->parentNode()) {// FIXME: parentOrShadowHostNode() instead
     1679        if (n->needsStyleRecalc())
     1680            return true;
     1681    }
     1682    return false;
     1683}
     1684
    16741685static inline PassRefPtr<RenderStyle> computeRenderStyleForProperty(Node* styledNode, PseudoId pseudoElementSpecifier, CSSPropertyID propertyID)
    16751686{
     
    17261737        Document& document = styledNode->document();
    17271738
    1728         if (document.updateStyleIfNeededForNode(*styledNode)) {
     1739        if (nodeOrItsAncestorNeedsStyleRecalc(styledNode)) {
     1740            document.updateStyleIfNeeded();
    17291741            // The style recalc could have caused the styled node to be discarded or replaced
    17301742            // if it was a PseudoElement so we need to update it.
  • trunk/Source/WebCore/dom/Document.cpp

    r176504 r177048  
    62836283#endif // ENABLE(SUBTLE_CRYPTO)
    62846284
    6285 static inline bool nodeOrItsAncestorNeedsStyleRecalc(const Node& node)
    6286 {
    6287     if (node.needsStyleRecalc())
    6288         return true;
    6289 
    6290     const Node* currentNode = &node;
    6291     const Element* ancestor = currentNode->parentOrShadowHostElement();
    6292     while (ancestor) {
    6293         if (ancestor->needsStyleRecalc())
    6294             return true;
    6295 
    6296         if (ancestor->directChildNeedsStyleRecalc() && currentNode->styleIsAffectedByPreviousSibling())
    6297             return true;
    6298 
    6299         currentNode = ancestor;
    6300         ancestor = currentNode->parentOrShadowHostElement();
    6301     }
    6302     return false;
    6303 }
    6304 
    6305 bool Document::updateStyleIfNeededForNode(const Node& node)
    6306 {
    6307     if (!hasPendingForcedStyleRecalc() && !(childNeedsStyleRecalc() && nodeOrItsAncestorNeedsStyleRecalc(node)))
    6308         return false;
    6309     updateStyleIfNeeded();
    6310     return true;
    6311 }
    6312 
    63136285Element* Document::activeElement()
    63146286{
  • trunk/Source/WebCore/dom/Document.h

    r176504 r177048  
    594594    void recalcStyle(Style::Change = Style::NoChange);
    595595    WEBCORE_EXPORT void updateStyleIfNeeded();
    596     bool updateStyleIfNeededForNode(const Node&);
    597596
    598597    WEBCORE_EXPORT void updateLayout();
  • trunk/Source/WebCore/editing/htmlediting.cpp

    r176387 r177048  
    148148        return false;
    149149    if (updateStyle == UpdateStyle)
    150         node->document().updateStyleIfNeededForNode(*node);
     150        node->document().updateStyleIfNeeded();
    151151    else
    152152        ASSERT(updateStyle == DoNotUpdateStyle);
  • trunk/Source/WebCore/html/TextFieldInputType.cpp

    r176082 r177048  
    191191        || event->type() == eventNames().focusEvent)
    192192    {
    193         element().document().updateStyleIfNeededForNode(element());
     193        element().document().updateStyleIfNeeded();
    194194
    195195        if (element().renderer()) {
Note: See TracChangeset for help on using the changeset viewer.