Fix CSSFlexibleBox use counter
Until now CSSFlexibleBox use counter was counting not only "display: flex|inline-flex" elements, but also buttons or any other classes that inherit from LayoutFlexbibleBox: That's an implementation detail and we shouldn't be interested in counting those cases as flexbox usage. The patch moves the counter to LayoutObject::CreateObject() so we actually check the display value. The patch also moves the grid layout counter, despite nobody is inheriting from LayoutGrid now, a similar issue could happen in the future if someone does it. New unit tests are added to verify that things are working as expected now. Change-Id: I716870a666a4167d19153667bc80f68a3ba0d7e3 Reviewed-on: https://chromium-review.googlesource.com/c/1273107 Commit-Queue: Christian Biesinger <cbiesinger@chromium.org> Reviewed-by:Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#598791}
Showing
Please register or sign in to comment