summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/layout/layout_block.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/layout_block.h')
-rw-r--r--chromium/third_party/blink/renderer/core/layout/layout_block.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/layout_block.h b/chromium/third_party/blink/renderer/core/layout/layout_block.h
index 68f16211d48..c729be28a63 100644
--- a/chromium/third_party/blink/renderer/core/layout/layout_block.h
+++ b/chromium/third_party/blink/renderer/core/layout/layout_block.h
@@ -401,6 +401,12 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
void UpdateAfterLayout() override;
MinMaxSizes PreferredLogicalWidths() const override;
+ virtual bool HasLineIfEmpty() const;
+ // Returns baseline offset if we can get |SimpleFontData| from primary font.
+ // Or returns no value if we can't get font data.
+ base::Optional<LayoutUnit> BaselineForEmptyLine(
+ LineDirectionMode line_direction) const;
+
protected:
virtual void AdjustInlineDirectionLineBounds(
unsigned /* expansionOpportunityCount */,
@@ -435,8 +441,6 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
// this object even if overflow is non-visible.
virtual bool AllowsOverflowClip() const;
- virtual bool HasLineIfEmpty() const;
-
bool SimplifiedLayout();
virtual void SimplifiedNormalFlowLayout();
@@ -477,6 +481,9 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
hit_test_action == kHitTestChildBlockBackground;
}
+ // Returns baseline offset of this block if is empty editable or having
+ // CSS property "--internal-empty-line-height"fabricated", otherwise
+ // returns |LayoutUnit(-1)|.
LayoutUnit EmptyLineBaseline(LineDirectionMode line_direction) const;
private: