[webkit-reviews] review denied: [Bug 61978] --webkit-visual-word crash on mixed editability : [Attachment 98417] patch w/ layout test
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 11 16:59:49 PDT 2011
Ryosuke Niwa <rniwa at webkit.org> has denied Xiaomei Ji <xji at chromium.org>'s
request for review:
Bug 61978: --webkit-visual-word crash on mixed editability
https://bugs.webkit.org/show_bug.cgi?id=61978
Attachment 98417: patch w/ layout test
https://bugs.webkit.org/attachment.cgi?id=98417&action=review
------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=98417&action=review
r- due to various nits.
> Source/WebCore/ChangeLog:9
> + Fix 2 --webkit-visual-word crashes:
> + --webkit-visual-word crash on mixed editability and
> + https://bugs.webkit.org/show_bug.cgi?id=61978
> + --webkit-visual-word crashes (VisiblePosition.getInlineBoxAndOffset
could return null box)
> + https://bugs.webkit.org/show_bug.cgi?id=62814
Nit: We normally just list two bug title + bug url separated by a blank line.
> Source/WebCore/editing/visible_units.cpp:1305
> + bool positionInBox = positionIsInBox(wordBreak, box, offsetOfWordBreak);
> + if (positionInBox && (previousOffset == invalidOffset || previousOffset
< offsetOfWordBreak))
There's no need to declare a boolean here you can call positionIsInBox inside
the if statement. For that matter, this entire if statement is unnecessary.
You should just do:
return positionIsInBox(wordBreak, box, offsetOfWordBreak) && (previousOffset ==
invalidOffset || previousOffset < offsetOfWordBreak).
> Source/WebCore/editing/visible_units.cpp:1516
> + bool positionInBox = positionIsInBox(wordBreak, box, offsetOfWordBreak);
> + return positionInBox && offsetOfWordBreak != box->caretMaxOffset() &&
offsetOfWordBreak != box->caretMinOffset();
Ditto about the boolean.
More information about the webkit-reviews
mailing list