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