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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 void updateLayerTransformAfterLayout(); | 415 void updateLayerTransformAfterLayout(); |
416 | 416 |
417 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } | 417 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } |
418 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } | 418 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } |
419 LayoutSize contentSize() const { return LayoutSize(contentWidth(), contentHe
ight()); } | 419 LayoutSize contentSize() const { return LayoutSize(contentWidth(), contentHe
ight()); } |
420 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting
Mode() ? contentWidth() : contentHeight(); } | 420 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting
Mode() ? contentWidth() : contentHeight(); } |
421 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin
gMode() ? contentHeight() : contentWidth(); } | 421 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin
gMode() ? contentHeight() : contentWidth(); } |
422 | 422 |
423 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (LayoutFlow) | 423 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (LayoutFlow) |
424 // to return the remaining width on a given line (and the height of a single
line). | 424 // to return the remaining width on a given line (and the height of a single
line). |
425 LayoutUnit offsetWidth() const final { return m_frameRect.width(); } | 425 LayoutUnit offsetWidth() const override { return m_frameRect.width(); } |
426 LayoutUnit offsetHeight() const final { return m_frameRect.height(); } | 426 LayoutUnit offsetHeight() const override { return m_frameRect.height(); } |
427 | 427 |
428 int pixelSnappedOffsetWidth(const Element*) const final; | 428 int pixelSnappedOffsetWidth(const Element*) const final; |
429 int pixelSnappedOffsetHeight(const Element*) const final; | 429 int pixelSnappedOffsetHeight(const Element*) const final; |
430 | 430 |
431 // More IE extensions. clientWidth and clientHeight represent the interior
of an object | 431 // More IE extensions. clientWidth and clientHeight represent the interior
of an object |
432 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi
dth and borderTopWidth. | 432 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi
dth and borderTopWidth. |
433 LayoutUnit clientLeft() const { return LayoutUnit(borderLeft() + (shouldPlac
eBlockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0)); } | 433 LayoutUnit clientLeft() const { return LayoutUnit(borderLeft() + (shouldPlac
eBlockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0)); } |
434 LayoutUnit clientTop() const { return LayoutUnit(borderTop()); } | 434 LayoutUnit clientTop() const { return LayoutUnit(borderTop()); } |
435 LayoutUnit clientWidth() const; | 435 LayoutUnit clientWidth() const; |
436 LayoutUnit clientHeight() const; | 436 LayoutUnit clientHeight() const; |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 | 833 |
834 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } | 834 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } |
835 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } | 835 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } |
836 bool isFlexItem() const { return !isInline() && !isFloatingOrOutOfFlowPositi
oned() && parent() && parent()->isFlexibleBox(); } | 836 bool isFlexItem() const { return !isInline() && !isFloatingOrOutOfFlowPositi
oned() && parent() && parent()->isFlexibleBox(); } |
837 | 837 |
838 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); } | 838 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); } |
839 | 839 |
840 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode =
PositionOnContainingLine) const override; | 840 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode =
PositionOnContainingLine) const override; |
841 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; | 841 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; |
842 | 842 |
843 LayoutUnit offsetLeft(const Element*) const final; | 843 LayoutUnit offsetLeft(const Element*) const override; |
844 LayoutUnit offsetTop(const Element*) const final; | 844 LayoutUnit offsetTop(const Element*) const override; |
845 | 845 |
846 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, const LayoutP
oint&) const; | 846 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, const LayoutP
oint&) const; |
847 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN
{ | 847 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN
{ |
848 // The offset is in the block direction (y for horizontal writing modes,
x for vertical writing modes). | 848 // The offset is in the block direction (y for horizontal writing modes,
x for vertical writing modes). |
849 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 849 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
850 return position; | 850 return position; |
851 return logicalHeight() - position; | 851 return logicalHeight() - position; |
852 } | 852 } |
853 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE
D_RETURN { | 853 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE
D_RETURN { |
854 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 854 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 || breakValue == BreakLeft | 1236 || breakValue == BreakLeft |
1237 || breakValue == BreakPage | 1237 || breakValue == BreakPage |
1238 || breakValue == BreakRecto | 1238 || breakValue == BreakRecto |
1239 || breakValue == BreakRight | 1239 || breakValue == BreakRight |
1240 || breakValue == BreakVerso; | 1240 || breakValue == BreakVerso; |
1241 } | 1241 } |
1242 | 1242 |
1243 } // namespace blink | 1243 } // namespace blink |
1244 | 1244 |
1245 #endif // LayoutBox_h | 1245 #endif // LayoutBox_h |
OLD | NEW |