ASSIGNED 126898
Subpixel layout: -webkit-flex pushes content off of-by-one pixel.
https://bugs.webkit.org/show_bug.cgi?id=126898
Summary Subpixel layout: -webkit-flex pushes content off of-by-one pixel.
zalan
Reported 2014-01-13 07:36:01 PST
LayoutTests/css3/flexbox/image-percent-max-height.html
Attachments
Patch (1.80 KB, patch)
2021-04-02 05:18 PDT, Rob Buis
ews-feeder: commit-queue-
zalan
Comment 1 2014-01-15 20:05:23 PST
The flexbox layout ends up with different value for the available space (compared to the default layout flow) -> centering the content results in different x pos.
zalan
Comment 2 2014-01-15 20:21:46 PST
this double rounding is probably unnecessary. The reason why it works when subpixel is off is in that case both layout paths round, one is explicitly while the other is implicitly (due to using only integral px positions). diff --git a/Source/WebCore/rendering/RenderReplaced.cpp b/Source/WebCore/rendering/RenderReplaced.cpp index d81b6cb..c0dc7a4 100644 --- a/Source/WebCore/rendering/RenderReplaced.cpp +++ b/Source/WebCore/rendering/RenderReplaced.cpp @@ -388,7 +388,7 @@ LayoutUnit RenderReplaced::computeReplacedLogicalWidth(ShouldComputePreferred sh // of 'width' is: (used height) * (intrinsic ratio) if (intrinsicRatio && ((heightIsAuto && !hasIntrinsicWidth && hasIntrinsicHeight) || !heightIsAuto)) { LayoutUnit logicalHeight = computeReplacedLogicalHeight(); - return computeReplacedLogicalWidthRespectingMinMaxWidth(roundToInt(round(logicalHeight * intrinsicRatio)), shouldComputePreferred); + return computeReplacedLogicalWidthRespectingMinMaxWidth(logicalHeight * intrinsicRatio, shouldComputePreferred); }
zalan
Comment 3 2014-01-19 17:59:00 PST
Jonathan Bedard
Comment 4 2017-06-03 08:27:10 PDT
This is only an issue in simulators, this test passes on device. Moved the expectation in <https://trac.webkit.org/changeset/217757/webkit>.
Rob Buis
Comment 5 2021-04-02 05:18:03 PDT
Note You need to log in before you can comment on or make changes to this bug.