OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 void updateLayerTransformAfterLayout(); | 381 void updateLayerTransformAfterLayout(); |
382 | 382 |
383 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } | 383 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } |
384 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } | 384 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } |
385 LayoutSize contentSize() const { return LayoutSize(contentWidth(), contentHe
ight()); } | 385 LayoutSize contentSize() const { return LayoutSize(contentWidth(), contentHe
ight()); } |
386 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting
Mode() ? contentWidth() : contentHeight(); } | 386 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting
Mode() ? contentWidth() : contentHeight(); } |
387 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin
gMode() ? contentHeight() : contentWidth(); } | 387 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin
gMode() ? contentHeight() : contentWidth(); } |
388 | 388 |
389 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (LayoutFlow) | 389 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (LayoutFlow) |
390 // to return the remaining width on a given line (and the height of a single
line). | 390 // to return the remaining width on a given line (and the height of a single
line). |
391 LayoutUnit offsetWidth() const override { return m_frameRect.width(); } | 391 LayoutUnit offsetWidth() const final { return m_frameRect.width(); } |
392 LayoutUnit offsetHeight() const override { return m_frameRect.height(); } | 392 LayoutUnit offsetHeight() const final { return m_frameRect.height(); } |
393 | 393 |
394 int pixelSnappedOffsetWidth() const final; | 394 int pixelSnappedOffsetWidth() const final; |
395 int pixelSnappedOffsetHeight() const final; | 395 int pixelSnappedOffsetHeight() const final; |
396 | 396 |
397 // More IE extensions. clientWidth and clientHeight represent the interior
of an object | 397 // More IE extensions. clientWidth and clientHeight represent the interior
of an object |
398 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi
dth and borderTopWidth. | 398 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi
dth and borderTopWidth. |
399 LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceB
lockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); } | 399 LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceB
lockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); } |
400 LayoutUnit clientTop() const { return borderTop(); } | 400 LayoutUnit clientTop() const { return borderTop(); } |
401 LayoutUnit clientWidth() const; | 401 LayoutUnit clientWidth() const; |
402 LayoutUnit clientHeight() const; | 402 LayoutUnit clientHeight() const; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ
ingMode() != style()->writingMode(); } | 721 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ
ingMode() != style()->writingMode(); } |
722 | 722 |
723 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } | 723 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } |
724 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } | 724 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } |
725 | 725 |
726 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); } | 726 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); } |
727 | 727 |
728 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode =
PositionOnContainingLine) const override; | 728 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode =
PositionOnContainingLine) const override; |
729 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; | 729 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; |
730 | 730 |
731 LayoutUnit offsetLeft() const override; | 731 LayoutUnit offsetLeft() const final; |
732 LayoutUnit offsetTop() const override; | 732 LayoutUnit offsetTop() const final; |
733 | 733 |
734 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, const LayoutP
oint&) const; | 734 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, const LayoutP
oint&) const; |
735 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN
{ | 735 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN
{ |
736 // The offset is in the block direction (y for horizontal writing modes,
x for vertical writing modes). | 736 // The offset is in the block direction (y for horizontal writing modes,
x for vertical writing modes). |
737 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 737 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
738 return position; | 738 return position; |
739 return logicalHeight() - position; | 739 return logicalHeight() - position; |
740 } | 740 } |
741 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE
D_RETURN { | 741 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE
D_RETURN { |
742 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 742 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 if (UNLIKELY(inlineBoxWrapper() != nullptr)) | 1053 if (UNLIKELY(inlineBoxWrapper() != nullptr)) |
1054 deleteLineBoxWrapper(); | 1054 deleteLineBoxWrapper(); |
1055 } | 1055 } |
1056 | 1056 |
1057 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 1057 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
1058 } | 1058 } |
1059 | 1059 |
1060 } // namespace blink | 1060 } // namespace blink |
1061 | 1061 |
1062 #endif // LayoutBox_h | 1062 #endif // LayoutBox_h |
OLD | NEW |