[Webkit-unassigned] [Bug 54937] Remove calls to deprecatedEditingOffset in SelectionController and VisibleSelection
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 22 17:15:42 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=54937
--- Comment #6 from Levi Weintraub <leviw at chromium.org> 2011-02-22 17:15:41 PST ---
(In reply to comment #5)
> (From update of attachment 83273 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=83273&action=review
>
> >>>> Source/WebCore/editing/SelectionController.cpp:1442
> >>>> + Node* startNode = start().containerNode();
> >>>
> >>> containerNode can be null here when there's still a valid anchorNode and shadow ancestor. I don't think this will ever be a problem for input tags, but this smacks of an assumption that could change.
> >>
> >> That should be fine because we're only trying to figure out whether we're inside a input[type=password] or not. If we ever had a position like before/after the shadow DOM's root element, we'll be in a trouble anyways.
> >
> > Sounds like good rationale for an assert then :)
>
> What kind of assertion are you talking about? I can't do ASSERT(startNode) here because start() could be null.
Something like this perhaps?
ASSERT(start().isNull() || start().anchorType() == Position::PositionIsOffsetInAnchor);
Using containerNode to get something like shadow ancestor or document can be error prone since not all valid positions have a containerNode, i.e. before/after positions anchored to a shadow DOM's root element.
--
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