diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/paint/paint_info.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/paint/paint_info.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/paint/paint_info.h b/chromium/third_party/blink/renderer/core/paint/paint_info.h index 6927f0aed5a..7716d6e8cc0 100644 --- a/chromium/third_party/blink/renderer/core/paint/paint_info.h +++ b/chromium/third_party/blink/renderer/core/paint/paint_info.h @@ -29,6 +29,7 @@ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/layout/layout_object.h" +#include "third_party/blink/renderer/core/layout/ng/ng_physical_fragment.h" // TODO(jchaffraix): Once we unify PaintBehavior and PaintLayerFlags, we should // move PaintLayerFlags to PaintPhase and rename it. Thus removing the need for // this #include @@ -168,6 +169,17 @@ struct CORE_EXPORT PaintInfo { return nullptr; } + // Returns the FragmentData of the specified physical fragment. If fragment + // traversal is supported, it will map directly to the right FragmentData. + // Otherwise we'll fall back to matching against the current + // PaintLayerFragment. + const FragmentData* FragmentToPaint( + const NGPhysicalFragment& fragment) const { + if (fragment.CanTraverse()) + return fragment.GetFragmentData(); + return FragmentToPaint(*fragment.GetLayoutObject()); + } + void SetFragmentLogicalTopInFlowThread(LayoutUnit fragment_logical_top) { fragment_logical_top_in_flow_thread_ = fragment_logical_top; } |