[webkit-reviews] review granted: [Bug 123310] Underline bounds cannot be queried before underline itself is drawn : [Attachment 215189] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 25 10:52:12 PDT 2013
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 123310: Underline bounds cannot be queried before underline itself is drawn
https://bugs.webkit.org/show_bug.cgi?id=123310
Attachment 215189: Patch
https://bugs.webkit.org/attachment.cgi?id=215189&action=review
------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=215189&action=review
> Source/WebCore/rendering/InlineTextBox.cpp:69
> +static FloatRect computeBoundsForUnderline(GraphicsContext& context, const
FloatPoint& point, float width, bool printing, bool& shouldAntialias)
I think "point" should be called "start" or "origin". "width" should be
"length". Is it up or down from the origin?
> Source/WebCore/rendering/InlineTextBox.cpp:73
> + float thickness = std::max(context.strokeThickness(), 0.5f);
But that bug added a 0.5 thickness only when printing. I think the comment has
bitrotted.
> Source/WebCore/rendering/InlineTextBox.cpp:79
> + if (!printing && !context.paintingDisabled() &&
context.getCTM(GraphicsContext::DefinitelyIncludeDeviceScale).preservesAxisAlig
nment()) {
It would be better to early return here.
More information about the webkit-reviews
mailing list