Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 2430663002: [css-grid] Use firstInFlowChildBox API for iterate over the grid items (Closed)

Created:
4 years, 2 months ago by jfernandez
Modified:
4 years, 2 months ago
CC:
chromium-reviews, jfernandez, szager+layoutwatch_chromium.org, zoltan1, Manuel Rego, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, svillar, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Use firstInFlowChildBox API for iterate over the grid items We are using the nextInFlowSiblingBox API for iterating over the grid items in an inefficient way, because we are checking for every box whether it's out-of-flow or not. This operation is redundant, since it's already done internally in nextInFlowSiblingBox. The only reason why we implemented it that way is that we needed to check out the nature of the first child. This patch adds a new API for getting the first in-flow child box, so we can implement the loops without the redundant operations. Committed: https://crrev.com/d0d28056752b04b36f5acce5452d1cd64ce4d5c3 Cr-Commit-Position: refs/heads/master@{#425962}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -6 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutBox.h View 2 chunks +8 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 2 chunks +3 lines, -6 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
jfernandez
4 years, 2 months ago (2016-10-18 13:30:30 UTC) #3
cbiesinger
lgtm
4 years, 2 months ago (2016-10-18 13:32:33 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2430663002/1
4 years, 2 months ago (2016-10-18 13:39:45 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-18 14:53:26 UTC) #8
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/d0d28056752b04b36f5acce5452d1cd64ce4d5c3 Cr-Commit-Position: refs/heads/master@{#425962}
4 years, 2 months ago (2016-10-18 14:56:37 UTC) #10
Manuel Rego
LGTM too, just a small comment. https://codereview.chromium.org/2430663002/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.h File third_party/WebKit/Source/core/layout/LayoutBox.h (right): https://codereview.chromium.org/2430663002/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.h#newcode1582 third_party/WebKit/Source/core/layout/LayoutBox.h:1582: first = first->nextInFlowSiblingBox(); ...
4 years, 2 months ago (2016-10-18 20:59:28 UTC) #11
jfernandez
4 years, 2 months ago (2016-10-18 22:25:05 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/2430663002/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/layout/LayoutBox.h (right):

https://codereview.chromium.org/2430663002/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/layout/LayoutBox.h:1582: first =
first->nextInFlowSiblingBox();
On 2016/10/18 20:59:28, Manuel Rego wrote:
> I know I'm late but I think you don't need a loop here.
> You could simply change the "while" for an "if",
> as you're using nextInFlowSiblingBox().
>     

You are right, indeed. I can do that ASAP in a different
patch.

Powered by Google App Engine
This is Rietveld 408576698