Commit f78e0392 authored by Aleks Totic's avatar Aleks Totic Committed by Commit Bot

[LayoutNG] Set ContainsInlineWIthOutlineContinuation flag

This patch makes CL:1251142 tests pass. LayoutNG was not setting
the  InlineOutlineWithContinuation flag.

Bug: 835484
Change-Id: If42b64316e71bb3c23ef05284b2c220b6baf4700
Reviewed-on: https://chromium-review.googlesource.com/c/1354319
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611954}
parent 7b4f81d7
...@@ -1800,6 +1800,11 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, ...@@ -1800,6 +1800,11 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
: NGOutlineType::kDontIncludeBlockVisualOverflow; : NGOutlineType::kDontIncludeBlockVisualOverflow;
} }
// Only public for LayoutNG.
void SetContainsInlineWithOutlineAndContinuation(bool b) {
bitfields_.SetContainsInlineWithOutlineAndContinuation(b);
}
// Collects rectangles enclosing visual overflows of the DOM subtree under // Collects rectangles enclosing visual overflows of the DOM subtree under
// this object. // this object.
// The rects also cover continuations which may be not in the layout subtree // The rects also cover continuations which may be not in the layout subtree
...@@ -2371,10 +2376,6 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, ...@@ -2371,10 +2376,6 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
// LayoutFlowThread. // LayoutFlowThread.
void RemoveFromLayoutFlowThread(); void RemoveFromLayoutFlowThread();
void SetContainsInlineWithOutlineAndContinuation(bool b) {
bitfields_.SetContainsInlineWithOutlineAndContinuation(b);
}
void SetPreviousOutlineMayBeAffectedByDescendants(bool b) { void SetPreviousOutlineMayBeAffectedByDescendants(bool b) {
bitfields_.SetPreviousOutlineMayBeAffectedByDescendants(b); bitfields_.SetPreviousOutlineMayBeAffectedByDescendants(b);
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "third_party/blink/renderer/core/html/html_marquee_element.h" #include "third_party/blink/renderer/core/html/html_marquee_element.h"
#include "third_party/blink/renderer/core/layout/layout_block_flow.h" #include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/layout_fieldset.h" #include "third_party/blink/renderer/core/layout/layout_fieldset.h"
#include "third_party/blink/renderer/core/layout/layout_inline.h"
#include "third_party/blink/renderer/core/layout/layout_multi_column_flow_thread.h" #include "third_party/blink/renderer/core/layout/layout_multi_column_flow_thread.h"
#include "third_party/blink/renderer/core/layout/layout_multi_column_set.h" #include "third_party/blink/renderer/core/layout/layout_multi_column_set.h"
#include "third_party/blink/renderer/core/layout/min_max_size.h" #include "third_party/blink/renderer/core/layout/min_max_size.h"
...@@ -753,6 +754,15 @@ void NGBlockNode::CopyFragmentDataToLayoutBoxForInlineChildren( ...@@ -753,6 +754,15 @@ void NGBlockNode::CopyFragmentDataToLayoutBoxForInlineChildren(
layout_box.SetLocation(maybe_flipped_offset.ToLayoutPoint()); layout_box.SetLocation(maybe_flipped_offset.ToLayoutPoint());
} }
// Legacy compatibility. This flag is used in paint layer for
// invalidation.
if (layout_object && layout_object->IsLayoutInline() &&
layout_object->StyleRef().HasOutline() &&
!layout_object->IsElementContinuation() &&
ToLayoutInline(layout_object)->Continuation()) {
box_->SetContainsInlineWithOutlineAndContinuation(true);
}
// The Location() of inline LayoutObject is relative to the // The Location() of inline LayoutObject is relative to the
// LayoutBlockFlow. If |child| establishes a new block formatting context, // LayoutBlockFlow. If |child| establishes a new block formatting context,
// it also creates another inline formatting context. Do not copy to its // it also creates another inline formatting context. Do not copy to its
......
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