|
|
Created:
4 years, 3 months ago by svillar Modified:
4 years, 3 months ago CC:
chromium-reviews, jfernandez, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, Manuel Rego, leviw+renderwatch, jchaffraix+rendering, blink-reviews, eae+blinkwatch Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[css-grid] Use grid area position to determine overflowing items
Grid code keeps a list of items overflowing their grid areas so that it
could apply some painting optimizations to reduce the amount of grid items
to be painted. Even if the border box is completely contained by the
item's grid area, margins in the item could make it overflow its grid area
by altering the border box position.
The problem is not that the optimization won't work, it's worse because it will
make that item not visible as it won't be painted.
BUG=628155
Committed: https://crrev.com/a67debf9a9b78f60e7b10b5574ae4ceab49af31b
Cr-Commit-Position: refs/heads/master@{#420094}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Patch #
Messages
Total messages: 25 (11 generated)
Description was changed from ========== [css-grid] Use margin box to determine items overflowing their grid area Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Margin box should be used to determine whether or not an item overflows its grid area otherwise setting a large enough margin could easily move an item out of its grid area. The problem is that the optimization will make that item not visible as it won't be painted. BUG=628155 ========== to ========== [css-grid] Use margin box to determine items overflowing their grid area Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Margin box should be used to determine whether or not an item overflows its grid area otherwise setting a large enough margin could easily move an item out of its grid area. The problem is that the optimization will make that item not visible as it won't be painted. A nice side effect of this patch is that it brings a 2% improvement in auto-grid-lots-of-data.html and a 9% improvement in fixed-grid-lots-of-stretched-data.html BUG=628155 ==========
svillar@igalia.com changed reviewers: + cbiesinger@chromium.org, eae@chromium.org, jfernandez@igalia.com, rego@igalia.com
The change seems fine but I don't see where this uses the margin box? frame rect is the border box
https://codereview.chromium.org/2353513003/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/2353513003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1934: // TODO (lajava): Child's margins should account when evaluating whether it overflows its grid area (http://crbug.com/628155). Remove the TODO, please. https://codereview.chromium.org/2353513003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1938: if (!gridAreaRect.contains(child->frameRect())) Using FrameRect should be the same than doing operations with height()(width(), like in the old code. I don't understand why this is solving the issue. Additionally, wouldn't we take into account the box-sizing property ?
frameRect is always the border box rect -- box sizing is already taken into account for it. -- You received this message because you are subscribed to the Google Groups "Blink Reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
frameRect is always the border box rect -- box sizing is already taken into account for it. -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
On 2016/09/19 17:25:12, cbiesinger wrote: > The change seems fine but I don't see where this uses the margin box? frame rect > is the border box Hmm yeah so I think the problem is that I did a bad job in the description of the bug. The actual issue is that we were only considering the child size when checking whether or not it overflowed the grid area. We should obviously also consider child's location because that might alter the result. I'll try to correct the description.
https://codereview.chromium.org/2353513003/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/2353513003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1934: // TODO (lajava): Child's margins should account when evaluating whether it overflows its grid area (http://crbug.com/628155). On 2016/09/19 18:01:24, jfernandez wrote: > Remove the TODO, please. Acknowledged. https://codereview.chromium.org/2353513003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1938: if (!gridAreaRect.contains(child->frameRect())) On 2016/09/19 18:01:24, jfernandez wrote: > Using FrameRect should be the same than doing operations with height()(width(), > like in the old code. I don't understand why this is solving the issue. > Additionally, wouldn't we take into account the box-sizing property ? The main difference are not the sizes indeed, but the location of the grid area vs the location of the child.
I understand now, thanks for the explanations. LGTM.
Description was changed from ========== [css-grid] Use margin box to determine items overflowing their grid area Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Margin box should be used to determine whether or not an item overflows its grid area otherwise setting a large enough margin could easily move an item out of its grid area. The problem is that the optimization will make that item not visible as it won't be painted. A nice side effect of this patch is that it brings a 2% improvement in auto-grid-lots-of-data.html and a 9% improvement in fixed-grid-lots-of-stretched-data.html BUG=628155 ========== to ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, is worsdt because it will make that item not visible as it won't be painted. BUG=628155 ==========
Description was changed from ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, is worsdt because it will make that item not visible as it won't be painted. BUG=628155 ========== to ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, is worsdt because it will make that item not visible as it won't be painted. BUG=628155 ==========
Description was changed from ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, is worsdt because it will make that item not visible as it won't be painted. BUG=628155 ========== to ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, is worsdt because it will make that item not visible as it won't be painted. BUG=628155 ==========
Description was changed from ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, is worsdt because it will make that item not visible as it won't be painted. BUG=628155 ========== to ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, it's worse because it will make that item not visible as it won't be painted. BUG=628155 ==========
thanks, lgtm
The CQ bit was checked by svillar@igalia.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by svillar@igalia.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, it's worse because it will make that item not visible as it won't be painted. BUG=628155 ========== to ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, it's worse because it will make that item not visible as it won't be painted. BUG=628155 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, it's worse because it will make that item not visible as it won't be painted. BUG=628155 ========== to ========== [css-grid] Use grid area position to determine overflowing items Grid code keeps a list of items overflowing their grid areas so that it could apply some painting optimizations to reduce the amount of grid items to be painted. Even if the border box is completely contained by the item's grid area, margins in the item could make it overflow its grid area by altering the border box position. The problem is not that the optimization won't work, it's worse because it will make that item not visible as it won't be painted. BUG=628155 Committed: https://crrev.com/a67debf9a9b78f60e7b10b5574ae4ceab49af31b Cr-Commit-Position: refs/heads/master@{#420094} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/a67debf9a9b78f60e7b10b5574ae4ceab49af31b Cr-Commit-Position: refs/heads/master@{#420094} |