[Webkit-unassigned] [Bug 25057] remove rangeCompliantEquivalent and replace it with Position methods

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 7 22:26:41 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=25057





--- Comment #5 from Ryosuke Niwa <rniwa at webkit.org>  2010-12-07 22:26:40 PST ---
(From update of attachment 75855)
View in context: https://bugs.webkit.org/attachment.cgi?id=75855&action=review

Thank you for taking this bug.  The patch looks good to me assuming that we still pass all the layout tests with your patch and the ordering in exp.in file is fixed.

> WebCore/WebCore.exp.in:519
> -__ZN7WebCore24rangeCompliantEquivalentERKNS_8PositionE
> +__ZNK7WebCore8Position24parentAnchoredEquivalentEv

I don't think this is the right place to put this.  Please lexicologically sort it.

> WebCore/dom/Position.cpp:167
> +    if (!m_anchorNode)
> +        return Position();
> +    
> +    // Handle quirks with tables and legacy positions offsets
> +    if (m_offset <= 0) {
> +        if (m_anchorNode->parentNode() && (editingIgnoresContent(m_anchorNode.get()) || isTableElement(m_anchorNode.get())))
> +            return positionInParentBeforeNode(m_anchorNode.get());
> +        return Position(m_anchorNode, 0);
> +    }
> +    if (!m_anchorNode->offsetInCharacters() && static_cast<unsigned>(m_offset) == m_anchorNode->childNodeCount()
> +        && (editingIgnoresContent(m_anchorNode.get()) || isTableElement(m_anchorNode.get()))) {
> +        return positionInParentAfterNode(m_anchorNode.get());
> +    }
> +
> +    return Position(containerNode(), computeOffsetInContainerNode());

This looks much simpler than rangeCompliantEquivalent.  Do we still pass all the layout tests with this new implementation?

> WebCore/dom/Position.h:83
> +    Position parentAnchoredEquivalent() const; // Convenience method for

Nit: Convenience method for what?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list