diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc b/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc index 178401503aa63..6303cd23a1052 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc @@ -963,14 +963,12 @@ void NGPhysicalFragment::AddOutlineRectsForDescendant( if (descendant_box->HasLayer()) { DCHECK(descendant_layout_object); Vector<PhysicalRect> layer_outline_rects; - descendant_box->AddOutlineRects(additional_offset, outline_type, + descendant_box->AddOutlineRects(PhysicalOffset(), outline_type, &layer_outline_rects); - // Don't pass additional_offset because LocalToAncestorRects will itself - // apply it. descendant_layout_object->LocalToAncestorRects( layer_outline_rects, containing_block, PhysicalOffset(), - PhysicalOffset()); + additional_offset); outline_rects->AppendVector(layer_outline_rects); return; } diff --git a/third_party/blink/web_tests/paint/invalidation/outline/outline-auto-descendant-transform-expected.html b/third_party/blink/web_tests/paint/invalidation/outline/outline-auto-descendant-transform-expected.html new file mode 100644 index 0000000000000..38e801fbf6878 --- /dev/null +++ b/third_party/blink/web_tests/paint/invalidation/outline/outline-auto-descendant-transform-expected.html @@ -0,0 +1,31 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http:/html4/strict.dtd"> +<html lang="en"> + <head> + <style type="text/css"> + .a { + background: green; + height: 30px; + width: 30px; + position: relative; + margin: 25px; + outline-color: red; + outline-style: auto; + } + .b { + background: blue; + height: 20px; + width: 20px; + top: 5px; + left: 5px; + position: relative; + } + .second { + margin-top: -5px; + } + </style> + </head> + <body> + <div class="a"><div class="b"></div></div> + <div class="a second"><div class="b"></div></div> + </body> +</html> \ No newline at end of file diff --git a/third_party/blink/web_tests/paint/invalidation/outline/outline-auto-descendant-transform.html b/third_party/blink/web_tests/paint/invalidation/outline/outline-auto-descendant-transform.html new file mode 100644 index 0000000000000..178fb32d84314 --- /dev/null +++ b/third_party/blink/web_tests/paint/invalidation/outline/outline-auto-descendant-transform.html @@ -0,0 +1,30 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http:/html4/strict.dtd"> +<html lang="en"> + <head> + <style type="text/css"> + .a { + background: blue; + height: 20px; + width: 20px; + position: relative; + margin: 30px; + outline-color: red; + outline-style: auto; + } + .b { + background: green; + height: 100%; + width: 100%; + left: 0; + top: 0; + position: absolute; + transform: scale(1.5); + z-index: -1; + } + </style> + </head> + <body> + <div class="a"><div class="b"></div></div> + <div class="a"><div class="b"></div></div> + </body> +</html> \ No newline at end of file