[Webkit-unassigned] [Bug 54986] deprecatedEditingOffset should actually return the expected deprecated value for "after" positions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 23 13:48:15 PST 2011


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





--- Comment #22 from Levi Weintraub <leviw at chromium.org>  2011-02-23 13:48:14 PST ---
(In reply to comment #20)
> > Source/WebCore/dom/Position.cpp:151
> > +    ASSERT(m_anchorType == PositionIsAfterAnchor && !m_isLegacyEditingPosition);
> 
> Aren't these two redundant?  Also generally we try to have one ASSERT per line as that makes it easier to see from the debug traces which one failed.

These aren't redundant because legacy positions call anchorTypeForLegacyEditingPosition(). We literally want to assert that we're only looking at After type positions for New positions, as only these have an offset that doesn't mesh with the legacy behavior.

(In reply to comment #21)
> Did you investigate making the ASSERT(m_isLegacy) a reality and seeing what callsites were assuming otherwise?

The move that finally necessitated this was my fix for 52642, which ends up creating many more "New" positions. What I found in testing the change is that there are numerous call sites that are currently only working because they are still being fed legacy positions from first/lastDeepEditingPositionForNode. Removing calls to this function is definitely one of the next steps.

-- 
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