Commit 22fb320e authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[PE] Fix paint offset of floating object under display:-webkit-box

The IsLayoutBlock() condition is now consistent with the floating object
locationing logic (which is based on its containing block), and the
condition covers display:-webkit-box.

No new test for the deprecated feature -webkit-box.

Bug: 888534
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iafb4fe1f61b007209f7be8963686996b5a50dbf7
Reviewed-on: https://chromium-review.googlesource.com/1240742
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593718}
parent e174f633
<!DOCTYPE html>
<div style="height: 200px">Passes if this text is fully visible, and only a green square below.</div>
</div>
<div style="left; background: green; width: 100px; height: 100px"></div>
<!DOCTYPE html>
<div style="height: 200px">Passes if this text is fully visible, and only a green square below.</div>
</div>
<div style="display: -webkit-box">
<div style="position: absolute; background: red; width: 100px; height: 100px"></div>
<div id="target" style="position: relative; float: left; background: green; width: 100px; height: 100px"></div>
</div>
...@@ -1610,7 +1610,7 @@ void FragmentPaintPropertyTreeBuilder::UpdateOutOfFlowContext() { ...@@ -1610,7 +1610,7 @@ void FragmentPaintPropertyTreeBuilder::UpdateOutOfFlowContext() {
if (!object_.IsBoxModelObject() && !properties_) if (!object_.IsBoxModelObject() && !properties_)
return; return;
if (object_.IsLayoutBlockFlow()) if (object_.IsLayoutBlock())
context_.paint_offset_for_float = context_.current.paint_offset; context_.paint_offset_for_float = context_.current.paint_offset;
if (object_.CanContainAbsolutePositionObjects()) if (object_.CanContainAbsolutePositionObjects())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment