RESOLVED FIXED Bug 154336
[css-grid] Avoid duplicated calls to resolution code
https://bugs.webkit.org/show_bug.cgi?id=154336
Summary [css-grid] Avoid duplicated calls to resolution code
Manuel Rego Casasnovas
Reported 2016-02-17 05:39:53 PST
We're calling several times per item to the same methods in order to resolve the grid positions over an over. Now that GridSpan doesn't have pointers anymore, we could just call the resolution code once and store it in the GridCoordinates cache. This is a port from Blink of https://codereview.chromium.org/1465153004/
Attachments
Patch (10.00 KB, patch)
2016-02-17 05:46 PST, Manuel Rego Casasnovas
no flags
Manuel Rego Casasnovas
Comment 1 2016-02-17 05:46:51 PST
Sergio Villar Senin
Comment 2 2016-02-23 08:58:25 PST
Comment on attachment 271550 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=271550&action=review Nice change > Source/WebCore/rendering/RenderGrid.cpp:1184 > + for (RenderBox* child = m_orderIterator.first(); child; child = m_orderIterator.next()) { Perhaps not for this patch but we should make OrderIterator a stl iterator-like class so that instead of first() and next() we have begin() and end() and we could do things like for (auto child : m_orderIterator)
Manuel Rego Casasnovas
Comment 3 2016-02-23 09:30:03 PST
(In reply to comment #2) > Comment on attachment 271550 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=271550&action=review > > Nice change Thanks for the review! > > Source/WebCore/rendering/RenderGrid.cpp:1184 > > + for (RenderBox* child = m_orderIterator.first(); child; child = m_orderIterator.next()) { > > Perhaps not for this patch but we should make OrderIterator a stl > iterator-like class so that instead of first() and next() we have begin() > and end() and we could do things like > > for (auto child : m_orderIterator) Note down in bug #154590.
WebKit Commit Bot
Comment 4 2016-02-23 10:17:12 PST
Comment on attachment 271550 [details] Patch Clearing flags on attachment: 271550 Committed r196983: <http://trac.webkit.org/changeset/196983>
WebKit Commit Bot
Comment 5 2016-02-23 10:17:16 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.