[webkit-reviews] review denied: [Bug 104997] Re-layout child blocks when border/padding of the box-sizing:border-box parent is updated : [Attachment 183142] Patch 5

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 17 10:38:35 PST 2013


Tony Chang <tony at chromium.org> has denied Kent Tamura <tkent at chromium.org>'s
request for review:
Bug 104997: Re-layout child blocks when border/padding of the
box-sizing:border-box parent is updated
https://bugs.webkit.org/show_bug.cgi?id=104997

Attachment 183142: Patch 5
https://bugs.webkit.org/attachment.cgi?id=183142&action=review

------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=183142&action=review


> Source/WebCore/rendering/RenderBox.cpp:295
> +    if (newStyle->boxSizing() == BORDER_BOX && oldStyle &&
oldStyle->boxSizing() == BORDER_BOX
> +	   && (newStyle->paddingBox() != oldStyle->paddingBox() ||
newStyle->border() != oldStyle->border())) {

I think it's possible that we need to relayout children when changing
boxSizing.  Here's an example:
http://plexode.com/u/#AVcolor2Udiv2SentERwidth66P%3D*QOdocumS.2Nbox2M%3E2K%3CEJ
border2H%0A2G%3Bj9px!solid!blackj8G!N-sizing66%3A!A4style2*%222!%20~http://plex
ode.com/eval3/#ht=K4MH%23x!%7BH!!!!background-V6cyanG!H%7DHK%2F4MHKU!idPx*!4PR1
00px8%3AJ-NG*MKU!4PJ619*MThis!N!should!not!overflow!the!cyan!Ved!N.K%2FUM&jt=Ob
ody.offsetLeftGHOgetElemSById(*x*).setAttribute(*4*%2C!!*R50pxG!J-left650986con
tS-NG*)

I think the right condition is: (newStyle->boxSizing() == BORDER_BOX ||
(oldStyle && oldStyle->boxSizing() == BORDER_BOX)) && (newStyle->paddingBox()
!= oldStyle->paddingBox() || newStyle->border() != oldStyle->border())

You could make the padding and border change more specific to test only
left/right in horizontal writing mode and top/bottom in vertical writing mode,
but maybe that's not worth the code complexity.


More information about the webkit-reviews mailing list