WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
82540
Fix rounding in RenderInline::paintOutlineForLine
https://bugs.webkit.org/show_bug.cgi?id=82540
Summary
Fix rounding in RenderInline::paintOutlineForLine
Emil A Eklund
Reported
2012-03-28 15:17:51 PDT
Currently some of the values are computed by adding an offset to a rounded value. Instead we should always round (or pixel snap) as the very last step.
Attachments
Patch
(3.81 KB, patch)
2012-03-28 15:21 PDT
,
Emil A Eklund
eric
: review+
Details
Formatted Diff
Diff
Patch
(3.65 KB, patch)
2012-03-28 18:23 PDT
,
Emil A Eklund
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch for landing
(3.66 KB, patch)
2012-03-28 18:36 PDT
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Emil A Eklund
Comment 1
2012-03-28 15:21:49 PDT
Created
attachment 134420
[details]
Patch
Eric Seidel (no email)
Comment 2
2012-03-28 15:46:05 PDT
Comment on
attachment 134420
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=134420&action=review
LGTM.
> Source/WebCore/ChangeLog:8 > + No new tests.
Why is always more important than what. :)
Eric Seidel (no email)
Comment 3
2012-03-28 15:46:33 PDT
Comment on
attachment 134420
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=134420&action=review
> Source/WebCore/rendering/RenderInline.cpp:1473 > + int pixelSnappedLastLineLeft = roundToInt(paintOffset.x() + lastline.x()); > + int pixelSnappedLastLineRight = snapSizeToPixel(lastline.width(), paintOffset.x() + lastline.x()) + pixelSnappedLastLineLeft; > + > + int pixelSnappedNextLineLeft = roundToInt(paintOffset.x() + nextline.x()); > + int pixelSnappedNextLineRight = snapSizeToPixel(nextline.width(), paintOffset.x() + nextline.x()) + pixelSnappedNextLineLeft;
I'm a little surprised we don't get these from an object, like some rect for the line...
Emil A Eklund
Comment 4
2012-03-28 15:57:29 PDT
(In reply to
comment #3
)
> (From update of
attachment 134420
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=134420&action=review
> > > Source/WebCore/rendering/RenderInline.cpp:1473 > > + int pixelSnappedLastLineLeft = roundToInt(paintOffset.x() + lastline.x()); > > + int pixelSnappedLastLineRight = snapSizeToPixel(lastline.width(), paintOffset.x() + lastline.x()) + pixelSnappedLastLineLeft; > > + > > + int pixelSnappedNextLineLeft = roundToInt(paintOffset.x() + nextline.x()); > > + int pixelSnappedNextLineRight = snapSizeToPixel(nextline.width(), paintOffset.x() + nextline.x()) + pixelSnappedNextLineLeft; > > I'm a little surprised we don't get these from an object, like some rect for the line...
How do you mean? Compute a rect for each line and use that instead?
> Why is always more important than what. :)
Good point, I'll make sure to update the ChangeLog before I commit.
Eric Seidel (no email)
Comment 5
2012-03-28 16:14:32 PDT
Comment on
attachment 134420
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=134420&action=review
>>> Source/WebCore/rendering/RenderInline.cpp:1473 >>> + int pixelSnappedNextLineRight = snapSizeToPixel(nextline.width(), paintOffset.x() + nextline.x()) + pixelSnappedNextLineLeft; >> >> I'm a little surprised we don't get these from an object, like some rect for the line... > > How do you mean? Compute a rect for each line and use that instead?
Honestly, I dont' have a clear suggestion, as I haven't fully paged in this code. But it seems like these are minX(), maxX() on LayoutRect?
Emil A Eklund
Comment 6
2012-03-28 16:16:52 PDT
(In reply to
comment #5
)
> Honestly, I dont' have a clear suggestion, as I haven't fully paged in this code. But it seems like these are minX(), maxX() on LayoutRect?
Correct. I suppose we could use a rect for this and ignore the y axis.
Emil A Eklund
Comment 7
2012-03-28 18:23:06 PDT
Created
attachment 134463
[details]
Patch
WebKit Review Bot
Comment 8
2012-03-28 18:34:11 PDT
Comment on
attachment 134463
[details]
Patch Rejecting
attachment 134463
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output:
http://queues.webkit.org/results/12194031
Emil A Eklund
Comment 9
2012-03-28 18:36:14 PDT
Created
attachment 134465
[details]
Patch for landing
WebKit Review Bot
Comment 10
2012-03-28 19:11:59 PDT
Comment on
attachment 134465
[details]
Patch for landing Clearing flags on attachment: 134465 Committed
r112492
: <
http://trac.webkit.org/changeset/112492
>
WebKit Review Bot
Comment 11
2012-03-28 19:12:03 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug