Changeset 156093 in webkit


Ignore:
Timestamp:
Sep 19, 2013, 6:36:02 AM (11 years ago)
Author:
Antti Koivisto
Message:

[CTTE] Hide nonPseudoNode and generatingNode, replace with Element versions
https://bugs.webkit.org/show_bug.cgi?id=121606

Reviewed by Andreas Kling.

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r156092 r156093  
     12013-09-19  Antti Koivisto  <antti@apple.com>
     2
     3        [CTTE] Hide nonPseudoNode and generatingNode, replace with Element versions
     4        https://bugs.webkit.org/show_bug.cgi?id=121606
     5
     6        Reviewed by Andreas Kling.
     7
    182013-09-19  Andreas Kling  <akling@apple.com>
    29
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r156090 r156093  
    43164316
    43174317    if (!box->renderer().nonPseudoNode())
    4318         return createLegacyEditingPosition(nonPseudoNode(), start ? caretMinOffset() : caretMaxOffset());
     4318        return createLegacyEditingPosition(nonPseudoElement(), start ? caretMinOffset() : caretMaxOffset());
    43194319
    43204320    if (!box->isInlineTextBox())
     
    43464346
    43474347    // If this is an anonymous renderer, we just recur normally
    4348     Node* childNode = child->nonPseudoNode();
    4349     if (!childNode)
     4348    Element* childElement= child->nonPseudoElement();
     4349    if (!childElement)
    43504350        return child->positionForPoint(pointInChildCoordinates);
    43514351
     
    43644364    LayoutUnit logicalLeft = parent->isHorizontalWritingMode() ? pointInChildCoordinates.x() : pointInChildCoordinates.y();
    43654365    if (logicalLeft < childMiddle)
    4366         return ancestor->createVisiblePosition(childNode->nodeIndex(), DOWNSTREAM);
    4367     return ancestor->createVisiblePosition(childNode->nodeIndex() + 1, UPSTREAM);
     4366        return ancestor->createVisiblePosition(childElement->nodeIndex(), DOWNSTREAM);
     4367    return ancestor->createVisiblePosition(childElement->nodeIndex() + 1, UPSTREAM);
    43684368}
    43694369
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r155802 r156093  
    40724072    // no children...return this render object's element, if there is one, and offset 0
    40734073    if (!firstChild())
    4074         return createVisiblePosition(nonPseudoNode() ? firstPositionInOrBeforeNode(nonPseudoNode()) : Position());
    4075 
    4076     if (isTable() && nonPseudoNode()) {
     4074        return createVisiblePosition(nonPseudoElement() ? firstPositionInOrBeforeNode(nonPseudoElement()) : Position());
     4075
     4076    if (isTable() && nonPseudoElement()) {
    40774077        LayoutUnit right = contentWidth() + borderAndPaddingWidth();
    40784078        LayoutUnit bottom = contentHeight() + borderAndPaddingHeight();
     
    40804080        if (point.x() < 0 || point.x() > right || point.y() < 0 || point.y() > bottom) {
    40814081            if (point.x() <= right / 2)
    4082                 return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoNode()));
    4083             return createVisiblePosition(lastPositionInOrAfterNode(nonPseudoNode()));
     4082                return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoElement()));
     4083            return createVisiblePosition(lastPositionInOrAfterNode(nonPseudoElement()));
    40844084        }
    40854085    }
     
    41494149        return closestRenderer->positionForPoint(adjustedPoint - closestRenderer->locationOffset());
    41504150   
    4151     return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoNode()));
     4151    return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoElement()));
    41524152}
    41534153
  • trunk/Source/WebCore/rendering/RenderLayerModelObject.h

    r155374 r156093  
    5353    // This is null for anonymous renderers.
    5454    Element* element() const { return toElement(RenderObject::node()); }
     55    Element* nonPseudoElement() const { return toElement(RenderObject::nonPseudoNode()); }
     56    Element* generatingElement() const { return toElement(RenderObject::generatingNode()); }
    5557
    5658protected:
     
    6466
    6567    void node() const WTF_DELETED_FUNCTION;
     68    void nonPseudoNode() const WTF_DELETED_FUNCTION;
     69    void generatingNode() const WTF_DELETED_FUNCTION;
    6670
    6771    RenderLayer* m_layer;
  • trunk/Source/WebCore/rendering/RenderRegion.h

    r155963 r156093  
    154154    LayoutRect rectFlowPortionForBox(const RenderBox*, const LayoutRect&) const;
    155155
    156     Element* generatingElement() const { return toElement(RenderObject::generatingNode()); }
    157 
    158156protected:
    159157    RenderOverflow* ensureOverflowForBox(const RenderBox*);
Note: See TracChangeset for help on using the changeset viewer.