[Webkit-unassigned] [Bug 129586] Find results on simple lines are not marked correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 3 09:51:31 PST 2014


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


Andreas Kling <akling at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #225662|review?                     |review+
               Flag|                            |




--- Comment #4 from Andreas Kling <akling at apple.com>  2014-03-03 09:48:34 PST ---
(From update of attachment 225662)
View in context: https://bugs.webkit.org/attachment.cgi?id=225662&action=review

r=me

> Source/WebCore/editing/TextIterator.cpp:544
> -        while (runEnd < str.length() && (deprecatedIsCollapsibleWhitespace(str[runEnd]) || str[runEnd] == '\t'))
> +        while (runEnd < end && (deprecatedIsCollapsibleWhitespace(str[runEnd]) || str[runEnd] == '\t'))

It irks me that we are calling operator[] on WTF::String in a loop instead of at least just operating on the StringImpl, but this is hardly time||place for that kinda cleanup.

> Source/WebCore/editing/TextIterator.cpp:1304
> -    if (!renderer->firstTextBox() && text.length() > 0)
> +    if (!renderer->hasRenderedText() && text.length() > 0)

We should make the fat linebox getters assert that we are not in simple linebox mode.
(Or better yet, abstract away the ability to call them in the wrong context by encapsulating lines.)

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