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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 : contentHeight(); | 506 : contentHeight(); |
507 } | 507 } |
508 LayoutUnit contentLogicalHeight() const { | 508 LayoutUnit contentLogicalHeight() const { |
509 return style()->isHorizontalWritingMode() ? contentHeight() | 509 return style()->isHorizontalWritingMode() ? contentHeight() |
510 : contentWidth(); | 510 : contentWidth(); |
511 } | 511 } |
512 | 512 |
513 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlines | 513 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlines |
514 // (LayoutFlow) to return the remaining width on a given line (and the height | 514 // (LayoutFlow) to return the remaining width on a given line (and the height |
515 // of a single line). | 515 // of a single line). |
516 LayoutUnit offsetWidth() const override { return m_frameRect.width(); } | 516 LayoutUnit offsetWidth() const final { return m_frameRect.width(); } |
517 LayoutUnit offsetHeight() const override { return m_frameRect.height(); } | 517 LayoutUnit offsetHeight() const final { return m_frameRect.height(); } |
518 | 518 |
519 int pixelSnappedOffsetWidth(const Element*) const final; | 519 int pixelSnappedOffsetWidth(const Element*) const final; |
520 int pixelSnappedOffsetHeight(const Element*) const final; | 520 int pixelSnappedOffsetHeight(const Element*) const final; |
521 | 521 |
522 // More IE extensions. clientWidth and clientHeight represent the interior of | 522 // More IE extensions. clientWidth and clientHeight represent the interior of |
523 // an object excluding border and scrollbar. clientLeft/Top are just the | 523 // an object excluding border and scrollbar. clientLeft/Top are just the |
524 // borderLeftWidth and borderTopWidth. | 524 // borderLeftWidth and borderTopWidth. |
525 DISABLE_CFI_PERF LayoutUnit clientLeft() const { | 525 DISABLE_CFI_PERF LayoutUnit clientLeft() const { |
526 return LayoutUnit(borderLeft() + | 526 return LayoutUnit(borderLeft() + |
527 (shouldPlaceBlockDirectionScrollbarOnLogicalLeft() | 527 (shouldPlaceBlockDirectionScrollbarOnLogicalLeft() |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 LayoutUnit lineHeight( | 1131 LayoutUnit lineHeight( |
1132 bool firstLine, | 1132 bool firstLine, |
1133 LineDirectionMode, | 1133 LineDirectionMode, |
1134 LinePositionMode = PositionOnContainingLine) const override; | 1134 LinePositionMode = PositionOnContainingLine) const override; |
1135 int baselinePosition( | 1135 int baselinePosition( |
1136 FontBaseline, | 1136 FontBaseline, |
1137 bool firstLine, | 1137 bool firstLine, |
1138 LineDirectionMode, | 1138 LineDirectionMode, |
1139 LinePositionMode = PositionOnContainingLine) const override; | 1139 LinePositionMode = PositionOnContainingLine) const override; |
1140 | 1140 |
1141 LayoutUnit offsetLeft(const Element*) const override; | 1141 LayoutUnit offsetLeft(const Element*) const final; |
1142 LayoutUnit offsetTop(const Element*) const override; | 1142 LayoutUnit offsetTop(const Element*) const final; |
1143 | 1143 |
1144 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, | 1144 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, |
1145 const LayoutPoint&) const; | 1145 const LayoutPoint&) const; |
1146 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN { | 1146 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN { |
1147 // The offset is in the block direction (y for horizontal writing modes, x | 1147 // The offset is in the block direction (y for horizontal writing modes, x |
1148 // for vertical writing modes). | 1148 // for vertical writing modes). |
1149 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 1149 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
1150 return position; | 1150 return position; |
1151 return logicalHeight() - position; | 1151 return logicalHeight() - position; |
1152 } | 1152 } |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 | 1622 |
1623 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { | 1623 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { |
1624 return breakValue == BreakColumn || breakValue == BreakLeft || | 1624 return breakValue == BreakColumn || breakValue == BreakLeft || |
1625 breakValue == BreakPage || breakValue == BreakRecto || | 1625 breakValue == BreakPage || breakValue == BreakRecto || |
1626 breakValue == BreakRight || breakValue == BreakVerso; | 1626 breakValue == BreakRight || breakValue == BreakVerso; |
1627 } | 1627 } |
1628 | 1628 |
1629 } // namespace blink | 1629 } // namespace blink |
1630 | 1630 |
1631 #endif // LayoutBox_h | 1631 #endif // LayoutBox_h |
OLD | NEW |