[webkit-reviews] review denied: [Bug 61978] --webkit-visual-word crash on mixed editability : [Attachment 100400] patch w/ layout test
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 14 14:31:27 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 100400: patch w/ layout test
https://bugs.webkit.org/attachment.cgi?id=100400&action=review
------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=100400&action=review
Due to various nits and missing null check.
> Source/WebCore/ChangeLog:10
> + Fix 2 --webkit-visual-word crashes:
> + --webkit-visual-word crash on mixed editability and
> + --webkit-visual-word crashes (VisiblePosition.getInlineBoxAndOffset
could return null box)
> +
> + https://bugs.webkit.org/show_bug.cgi?id=61978
> + https://bugs.webkit.org/show_bug.cgi?id=62814
Nit: should be:
--webkit-visual-word crash on mixed editability
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
> Source/WebCore/editing/visible_units.cpp:1230
> + if (positionIsInBox(wordBreak, box, offsetOfWordBreak))
> + return wordBreak;
> + return VisiblePosition();
Seems like we should have a version of positionIsInBox that doesn't take
offsetOfWordBreak. Also I'd use tertiary here.
> Source/WebCore/editing/visible_units.cpp:1305
> + if (positionIsInBox(wordBreak, box, offsetOfWordBreak))
> return wordBreak;
> return VisiblePosition();
Ditto about using tertiary.
> Source/WebCore/editing/visible_units.cpp:1312
> + && (previousOffset == invalidOffset || previousOffset <
offsetOfWordBreak);
Nit: && should be intended by 4 spaces, and should NOT be aligned with
positionIsInBox.
> Source/WebCore/editing/visible_units.cpp:1521
> + && offsetOfWordBreak != box->caretMaxOffset() &&
offsetOfWordBreak != box->caretMinOffset();
Ditto about indentation.
> Source/WebCore/editing/visible_units.cpp:1604
> + // FIXME: do I need to check visiblePosition.isNotNull() ?
Yes, you should.
More information about the webkit-reviews
mailing list