Floats and out-of-flow objects may not be adjacent to anonymous blocks.
Floats and out-of-flow objects need to be true layout siblings of the inlines, or rendering will be wrong. This means that such objects should never be siblings of anonymous blocks, but rather inside them. This already works correctly for initial layout tree building, and also for many DOM manipulations. However, code was missing to satisfy this requirement if we removed a regular block that was a sibling of an anonymous block and either a float or out-of-flow positioned object. This even caused a crash triggered by ruby code, which ended up mixing inline and block children within the same container. That is not allowed. This happened in the MoveAllChildrenIncludingFloatsTo() call inside LayoutRubyBase::MoveBlockChildren(). Added a DCHECK to MoveAllChildrenIncludingFloatsTo() (which could fail prior to this fix); When moving children from one container to another, either both or none of the containers must have inline children. Bug: 852640 Change-Id: I51d3de12c73ddd07d6b4c1aa55221b4f92359ca7 Reviewed-on: https://chromium-review.googlesource.com/1102690Reviewed-by:Emil A Eklund <eae@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#567882}
Showing
Please register or sign in to comment