[LayoutNG] Fix offset in inline context in NGBoxFragmentPainter
Following CL:780821, this patch fixes paint_offset for inline objects. In inline context, LayoutBox::Location() is relative to its block container, while LayoutNG fragment has offset relative to its parent. Painters for LayoutObject follow the same convention. Boxes in inline context, such as replaced elements or inline blocks, require different offset due to this difference. To simplify this, this patch separates code path for block children and inline children. There are still some cases we clip incorrectly, but offset accumulation looks correct. I will look into the clipping issue in following patches. Local tests for this change is CL:776334, until bots are enabled. Bug: 714962 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I75386dcf5271cc6b9884cf6449ff0f6549c79df9 Reviewed-on: https://chromium-review.googlesource.com/792834 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#520887}
Showing
Please register or sign in to comment