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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } | 530 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf
FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } |
531 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } | 531 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati
ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca
ted(); } |
532 | 532 |
533 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const override; | 533 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const override; |
534 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const override; | 534 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const override; |
535 | 535 |
536 virtual LayoutUnit offsetLeft() const override; | 536 virtual LayoutUnit offsetLeft() const override; |
537 virtual LayoutUnit offsetTop() const override; | 537 virtual LayoutUnit offsetTop() const override; |
538 | 538 |
539 LayoutPoint flipForWritingModeForChild(const RenderBox* child, const LayoutP
oint&) const; | 539 LayoutPoint flipForWritingModeForChild(const RenderBox* child, const LayoutP
oint&) const; |
540 LayoutUnit flipForWritingMode(LayoutUnit position) const | 540 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN |
541 { | 541 { |
542 // The offset is in the block direction (y for horizontal writing modes,
x for vertical writing modes). | 542 // The offset is in the block direction (y for horizontal writing modes,
x for vertical writing modes). |
543 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 543 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
544 return position; | 544 return position; |
545 return logicalHeight() - position; | 545 return logicalHeight() - position; |
546 } | 546 } |
547 LayoutPoint flipForWritingMode(const LayoutPoint& position) const | 547 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE
D_RETURN |
548 { | 548 { |
549 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 549 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
550 return position; | 550 return position; |
551 return isHorizontalWritingMode() ? LayoutPoint(position.x(), height() -
position.y()) : LayoutPoint(width() - position.x(), position.y()); | 551 return isHorizontalWritingMode() ? LayoutPoint(position.x(), height() -
position.y()) : LayoutPoint(width() - position.x(), position.y()); |
552 } | 552 } |
553 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; | 553 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; |
554 LayoutSize flipForWritingMode(const LayoutSize& offset) const | 554 LayoutSize flipForWritingMode(const LayoutSize& offset) const WARN_UNUSED_RE
TURN |
555 { | 555 { |
556 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 556 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
557 return offset; | 557 return offset; |
558 return isHorizontalWritingMode() ? LayoutSize(offset.width(), height() -
offset.height()) : LayoutSize(width() - offset.width(), offset.height()); | 558 return isHorizontalWritingMode() ? LayoutSize(offset.width(), height() -
offset.height()) : LayoutSize(width() - offset.width(), offset.height()); |
559 } | 559 } |
560 void flipForWritingMode(LayoutRect& rect) const | 560 void flipForWritingMode(LayoutRect& rect) const |
561 { | 561 { |
562 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 562 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
563 return; | 563 return; |
564 if (isHorizontalWritingMode()) | 564 if (isHorizontalWritingMode()) |
565 rect.setY(height() - rect.maxY()); | 565 rect.setY(height() - rect.maxY()); |
566 else | 566 else |
567 rect.setX(width() - rect.maxX()); | 567 rect.setX(width() - rect.maxX()); |
568 } | 568 } |
569 FloatPoint flipForWritingMode(const FloatPoint& position) const | 569 FloatPoint flipForWritingMode(const FloatPoint& position) const WARN_UNUSED_
RETURN |
570 { | 570 { |
571 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 571 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
572 return position; | 572 return position; |
573 return isHorizontalWritingMode() ? FloatPoint(position.x(), height() - p
osition.y()) : FloatPoint(width() - position.x(), position.y()); | 573 return isHorizontalWritingMode() ? FloatPoint(position.x(), height() - p
osition.y()) : FloatPoint(width() - position.x(), position.y()); |
574 } | 574 } |
575 void flipForWritingMode(FloatRect& rect) const | 575 void flipForWritingMode(FloatRect& rect) const |
576 { | 576 { |
577 if (!UNLIKELY(hasFlippedBlocksWritingMode())) | 577 if (!UNLIKELY(hasFlippedBlocksWritingMode())) |
578 return; | 578 return; |
579 if (isHorizontalWritingMode()) | 579 if (isHorizontalWritingMode()) |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 if (UNLIKELY(inlineBoxWrapper() != 0)) | 804 if (UNLIKELY(inlineBoxWrapper() != 0)) |
805 deleteLineBoxWrapper(); | 805 deleteLineBoxWrapper(); |
806 } | 806 } |
807 | 807 |
808 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 808 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
809 } | 809 } |
810 | 810 |
811 } // namespace blink | 811 } // namespace blink |
812 | 812 |
813 #endif // RenderBox_h | 813 #endif // RenderBox_h |
OLD | NEW |