RESOLVED FIXED 126892
Subpixel layout: setSimpleLineLayoutEnabled() produces different layout when line position has CSS px fractions.
https://bugs.webkit.org/show_bug.cgi?id=126892
Summary Subpixel layout: setSimpleLineLayoutEnabled() produces different layout when ...
zalan
Reported 2014-01-13 07:26:39 PST
fast/forms/textAreaLineHeight-simple-lines.html
Attachments
test case (327 bytes, text/html)
2014-01-14 14:52 PST, zalan
no flags
Patch (369.49 KB, patch)
2014-01-17 21:17 PST, zalan
no flags
Patch (369.56 KB, patch)
2014-01-17 21:21 PST, zalan
no flags
zalan
Comment 1 2014-01-14 14:36:59 PST
SimpleLineLayout's paintFlow() needs to call roundedIntPoint() on paint offset to match InlineTextBox's paint positioning. something along these lines: --- a/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp +++ b/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp @@ -80,9 +80,10 @@ void paintFlow(const RenderBlockFlow& flow, const Layout& layout, PaintInfo& pai GraphicsContextStateSaver stateSaver(context, textPaintStyle.strokeWidth > 0); updateGraphicsContext(context, textPaintStyle); + LayoutPoint adjustedPaintOffset = roundedIntPoint(paintOffset); LayoutRect paintRect = paintInfo.rect; - paintRect.moveBy(-paintOffset); + paintRect.moveBy(-adjustedPaintOffset); auto resolver = runResolver(flow, layout); auto range = resolver.rangeForRect(paintRect); @@ -92,9 +93,9 @@ void paintFlow(const RenderBlockFlow& flow, const Layout& layout, PaintInfo& pai continue; TextRun textRun(run.text()); textRun.setTabSize(!style.collapseWhiteSpace(), style.tabSize()); - context.drawText(font, textRun, run.baseline() + paintOffset); + context.drawText(font, textRun, run.baseline() + adjustedPaintOffset); if (debugBordersEnabled) - paintDebugBorders(context, run.rect(), paintOffset); + paintDebugBorders(context, run.rect(), adjustedPaintOffset); } }
zalan
Comment 2 2014-01-14 14:52:41 PST
Created attachment 221206 [details] test case
zalan
Comment 3 2014-01-14 16:49:23 PST
*** Bug 126893 has been marked as a duplicate of this bug. ***
zalan
Comment 4 2014-01-14 20:47:38 PST
*** Bug 126894 has been marked as a duplicate of this bug. ***
zalan
Comment 5 2014-01-14 20:49:22 PST
additional failed cases (from dupes) LayoutTests/fast/shapes/shape-inside/shape-inside-circle-padding.html LayoutTests/fast/shapes/shape-inside/shape-inside-circle.html LayoutTests/fast/shapes/shape-inside/shape-inside-ellipse-padding.html LayoutTests/fast/shapes/shape-inside/shape-inside-ellipse.html LayoutTests/fast/shapes/shape-inside/shape-inside-rounded-rectangle-fit-002.html LayoutTests/fast/shapes/shape-inside/shape-inside-subpixel-rectangle-top.html LayoutTests/fast/regions/floats-basic-in-variable-width-regions.html LayoutTests/fast/regions/overflow-moving-below-floats-in-variable-width-regions.html LayoutTests/fast/regions/overflow-not-moving-below-floats-in-variable-width-regions.html LayoutTests/fast/regions/overflow-size-change-in-variable-width-regions.html LayoutTests/fast/regions/overflow-size-change-with-stacking-context.html LayoutTests/fast/regions/selection/selecting-text-through-different-region-flows.html
zalan
Comment 6 2014-01-15 09:11:54 PST
actually fast/shapes/shape-inside/shape-inside-subpixel-rectangle-top.html doesnt get fixed by this. For that, webkit.org/b/124784 needs revisiting.
zalan
Comment 7 2014-01-16 08:57:24 PST
*** Bug 126891 has been marked as a duplicate of this bug. ***
zalan
Comment 8 2014-01-16 08:58:03 PST
fast/css/word-spacing-between-blocks.html fast/css/word-spacing-between-inlines.html
zalan
Comment 9 2014-01-17 21:17:01 PST
zalan
Comment 10 2014-01-17 21:21:26 PST
zalan
Comment 11 2014-01-19 17:56:42 PST
Antti Koivisto
Comment 12 2014-01-20 07:03:31 PST
Comment on attachment 221531 [details] Patch r=me
WebKit Commit Bot
Comment 13 2014-01-20 07:37:55 PST
Comment on attachment 221531 [details] Patch Clearing flags on attachment: 221531 Committed r162340: <http://trac.webkit.org/changeset/162340>
WebKit Commit Bot
Comment 14 2014-01-20 07:37:58 PST
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.