summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h')
-rw-r--r--chromium/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h b/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h
index 6ee0a0a81fb..044007e1cde 100644
--- a/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h
+++ b/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h
@@ -13,6 +13,7 @@
namespace blink {
+class NGFragmentItem;
class NGLineBoxFragmentBuilder;
class CORE_EXPORT NGPhysicalLineBoxFragment final
@@ -31,6 +32,9 @@ class CORE_EXPORT NGPhysicalLineBoxFragment final
static scoped_refptr<const NGPhysicalLineBoxFragment> Create(
NGLineBoxFragmentBuilder* builder);
+ using PassKey = util::PassKey<NGPhysicalLineBoxFragment>;
+ NGPhysicalLineBoxFragment(PassKey, NGLineBoxFragmentBuilder* builder);
+
~NGPhysicalLineBoxFragment() {
for (const NGLink& child : Children())
child.fragment->Release();
@@ -50,19 +54,22 @@ class CORE_EXPORT NGPhysicalLineBoxFragment final
// This may be different from the direction of the container box when
// first-line style is used, or when 'unicode-bidi: plaintext' is used.
TextDirection BaseDirection() const {
- return static_cast<TextDirection>(base_direction_);
+ return static_cast<TextDirection>(base_or_resolved_direction_);
}
- // Compute baseline for the specified baseline type.
- NGLineHeightMetrics BaselineMetrics(FontBaseline) const;
+ // Compute the baseline metrics for this linebox.
+ NGLineHeightMetrics BaselineMetrics() const;
// Scrollable overflow. including contents, in the local coordinate.
// |ScrollableOverflow| is not precomputed/cached because it cannot be
// computed when LineBox is generated because it needs container dimensions
// to resolve relative position of its children.
- PhysicalRect ScrollableOverflow(const LayoutObject* container,
- const ComputedStyle* container_style,
- PhysicalSize container_physical_size) const;
+ PhysicalRect ScrollableOverflow(const NGPhysicalBoxFragment& container,
+ const ComputedStyle& container_style) const;
+ PhysicalRect ScrollableOverflowForLine(const NGPhysicalBoxFragment& container,
+ const ComputedStyle& container_style,
+ const NGFragmentItem& line,
+ const NGInlineCursor& cursor) const;
// Whether the content soft-wraps to the next line.
bool HasSoftWrapToNextLine() const;
@@ -72,8 +79,6 @@ class CORE_EXPORT NGPhysicalLineBoxFragment final
const LayoutObject* ContainerLayoutObject() const { return layout_object_; }
private:
- NGPhysicalLineBoxFragment(NGLineBoxFragmentBuilder* builder);
-
NGLineHeightMetrics metrics_;
NGLink children_[];
};