[Webkit-unassigned] [Bug 88741] Width not properly recalculated with -webkit-box-sizing: border-box

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 9 19:21:36 PDT 2012


Julien Chaffraix <jchaffraix at webkit.org> changed:

           What    |Removed                     |Added
 Attachment #149616|review?                     |
               Flag|                            |

--- Comment #3 from Julien Chaffraix <jchaffraix at webkit.org>  2012-07-09 19:21:36 PST ---
(From update of attachment 149616)
View in context: https://bugs.webkit.org/attachment.cgi?id=149616&action=review

> LayoutTests/fast/box-sizing/box-sizing-dynamic-padding-with-relative-width-child.html:18
> +        setTimeout('test2();', 100);

I don't understand the need for your 100ms delays. They shouldn't be needed to get proper results after a layout.

Moreover, they make the test take at least 500ms which is a very long time for a test case.

> Source/WebCore/rendering/RenderBlock.cpp:1381
> +    return oldWidth != logicalWidth() || oldColumnWidth != desiredColumnWidth() || contentBoxDirty();

I feel like the real fix should be here: the logic should be able to handle box-sizing change properly. There will be several ways of handling that (in order of preference):
* introduce a wrapper around LayoutUnit that is aware of the length's type (border vs content) we are manipulating to avoid mistakes (it will require some work but is a good long term change as we could catch dumb mistakes)
* standardize on having logicalWidth / logicalHeight always be the border-box / content-box. In this case, rename logicalWidth to match this decision.
* invalidate our width in styleDidChange to make sure we return 'true' here.

> Source/WebCore/rendering/RenderObject.h:1003
> +        ADD_BOOLEAN_BITFIELD(contentBoxDirty, ContentBoxDirty);

As discussed, I really feel this is a pretty weak use of our last remaining bit. Changing box-sizing is fairly uncommon and I would rather keep this bit for something more useful.

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