[Webkit-unassigned] [Bug 92163] New: flexitems can overflow the flexbox due to rounding
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 24 14:35:34 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=92163
Summary: flexitems can overflow the flexbox due to rounding
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
URL: http://plexode.com/eval3/#ht=%3Cdiv%20style%3D%22paddi
ng%3A%2010px%3B%20background-color%3A%20black%22%3E%0A
%0A%3Cdiv%20style%3D%22display%3A-webkit-flex%3B%20wid
th%3A%20101px%3B%20background-color%3A%20grey%22%3E%0A
%20%20%3Cdiv%20id%3Da%20style%3D%22-webkit-flex%3A%201
%3B%20background-color%3A%20blue%3B%20height%3A%2030px
%22%3Ehello%3C%2Fdiv%3E%0A%20%20%3Cdiv%20id%3Db%20styl
e%3D%22-webkit-flex%3A%201%3B%20background-color%3A%20
yellow%3B%20-webkit-align-self%3Aflex-start%22%3Eworld
%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%0A%3C%2Fdiv%3E%0A&jt=ge
tComputedStyle(document.getElementById('a')).width%20%
2B%20%22%2C%22%20%2B%20getComputedStyle(document.getEl
ementById('b')).width%0A
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: tony at chromium.org
CC: eae at chromium.org, leviw at chromium.org
Blocks: 62048
Flexbox items don't seem to be getting subpixel positions when rounding. See the URL for an example. It's a flexbox that is 101 pixels wide and has 2 children, each should be the same size (50.5px each). Instead, they are both 51px.
For reference, in RenderFlexibleBox.cpp, we use setOverrideLogicalContent{Width,Height}() to set the width/height of children after we have computed the desired value. We use setLocation() to position each child. This happens in RenderFlexibleBox::layoutAndPlaceChildren.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list