commit | 4d12111d13eab4eaf1ea56c594aa3223e9092b19 | [log] [tgz] |
---|---|---|
author | Javier Fernandez <jfernandez@igalia.com> | Wed Oct 25 14:38:19 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Oct 25 14:38:19 2017 |
tree | bf97a86873046ed50f7a44e5268bdfd75d2f5c9e | |
parent | 78e8587301d2ac0a10184eb91d4caeae95a3c396 [diff] |
[css-grid] Avoid clearing the overrideContainingBlockWidth if possible Since the intrinsic width computation uses the same logic than the track sizing algorithm we are clearing the overrideContainingBlockWidth of some grid items that are required to laid out them properly. It's very uncommon that any intrinsic size computation isn't performed as part of a layout process. However, in the Mac platform we enable the PreferredSizeMode so that the WebContent process launches messages to the render process asking for the current preferred size. Additionally, in some cases like the one described in the bug this patch tries to solve, a style change causes a preferred width invalidation. This implies that any request for the preferred width will trigger the preferred size computation logic. The problem is that, as mentioned before, this happens out of any layout process. Finally, even though preferred size invalidation implies that the affected box is marked as needing layout with the kMarkContainerChain enabled, this is not happening for the case described in the bug. The Grid container is not marked for layout because the Grid Item is an 'input' element, rendered by a LayoutTextControl which happens to be an ObjectRelayoutBoundary. One possible alternative approach for this issue would be to exclude grid items as possible ObjectRelayoutBoundary, like it happens with Flexible Box items or TableParts. However, I think it's better to avoid as much as possible to clear the overrideContainingBlockWidth to reduce the friction between the intrinsic size computation and the layout logics. Bug: 727076,773988 Change-Id: Ibe4c927f5101b7ceced433084ea81aa2cafdc4a2 Reviewed-on: https://chromium-review.googlesource.com/702437 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Manuel Rego Casasnovas <rego@igalia.com> Reviewed-by: Sergio Villar <svillar@igalia.com> Cr-Commit-Position: refs/heads/master@{#511451}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .