WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
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
<
rdar://problem/15855716
>
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
Created
attachment 425009
[details]
Patch
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