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 override { return m_frameRect.width(); } | 425 LayoutUnit offsetWidth() const final { return m_frameRect.width(); } |
426 LayoutUnit offsetHeight() const override { return m_frameRect.height(); } | 426 LayoutUnit offsetHeight() const final { 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 | 829 |
830 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } | 830 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } |
831 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } | 831 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } |
832 bool isFlexItem() const { return !isInline() && !isFloatingOrOutOfFlowPositi
oned() && parent() && parent()->isFlexibleBox(); } | 832 bool isFlexItem() const { return !isInline() && !isFloatingOrOutOfFlowPositi
oned() && parent() && parent()->isFlexibleBox(); } |
833 | 833 |
834 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); } | 834 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); } |
835 | 835 |
836 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode =
PositionOnContainingLine) const override; | 836 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode =
PositionOnContainingLine) const override; |
837 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; | 837 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; |
838 | 838 |
839 LayoutUnit offsetLeft(const Element*) const override; | 839 LayoutUnit offsetLeft(const Element*) const final; |
840 LayoutUnit offsetTop(const Element*) const override; | 840 LayoutUnit offsetTop(const Element*) const final; |
841 | 841 |
842 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, const LayoutP
oint&) const; | 842 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, const LayoutP
oint&) const; |
843 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN
{ | 843 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN
{ |
844 // The offset is in the block direction (y for horizontal writing modes,
x for vertical writing modes). | 844 // The offset is in the block direction (y for horizontal writing modes,
x for vertical writing modes). |
845 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 845 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
846 return position; | 846 return position; |
847 return logicalHeight() - position; | 847 return logicalHeight() - position; |
848 } | 848 } |
849 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE
D_RETURN { | 849 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE
D_RETURN { |
850 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 850 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 || breakValue == BreakLeft | 1232 || breakValue == BreakLeft |
1233 || breakValue == BreakPage | 1233 || breakValue == BreakPage |
1234 || breakValue == BreakRecto | 1234 || breakValue == BreakRecto |
1235 || breakValue == BreakRight | 1235 || breakValue == BreakRight |
1236 || breakValue == BreakVerso; | 1236 || breakValue == BreakVerso; |
1237 } | 1237 } |
1238 | 1238 |
1239 } // namespace blink | 1239 } // namespace blink |
1240 | 1240 |
1241 #endif // LayoutBox_h | 1241 #endif // LayoutBox_h |
OLD | NEW |