Use LayoutObjectFactory in LayoutBlock::CreateAnonymousWithParentAndDisplay().
Which object type to create depends on whether we are to use LayoutNG or not. This was already working correctly for block flow, but not for flexbox. Since we can no longer assume that a flexbox is of type LayoutFlexibleBox (LayoutNGFlexibleBox inherits directly from LayoutBlock), it would be impossible to call the protected method SetDocumentForAnonymous() on a LayoutBlock from LayoutFlexibleBox::CreateAnonymous(). So just move everything into LayoutBlock::CreateAnonymousWithParentAndDisplay(). No behavior changes intended for block flows. For flexbox, on the other hand, we're now able to create anonymous LayoutNGFlexibleBox objects, This doesn't seem to affect any enabled tests, though. Support for LayoutNGFlexibleBox is behind the LayoutNGFlexBox runtime flag, which normally isn't enabled. Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: If0d1b0607c65ac46253e9d91a77faafa1de6486d Reviewed-on: https://chromium-review.googlesource.com/1100817Reviewed-by:Emil A Eklund <eae@chromium.org> Reviewed-by:
Christian Biesinger <cbiesinger@chromium.org> Commit-Queue: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#567368}
Showing
Please register or sign in to comment