| 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 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 * | 20 * |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #ifndef RenderBox_h | 23 #ifndef RenderBox_h |
| 24 #define RenderBox_h | 24 #define RenderBox_h |
| 25 | 25 |
| 26 #include "core/layout/LayoutBoxModelObject.h" |
| 26 #include "core/layout/shapes/ShapeOutsideInfo.h" | 27 #include "core/layout/shapes/ShapeOutsideInfo.h" |
| 27 #include "core/rendering/RenderBoxModelObject.h" | |
| 28 #include "core/rendering/RenderOverflow.h" | 28 #include "core/rendering/RenderOverflow.h" |
| 29 #include "platform/scroll/ScrollTypes.h" | 29 #include "platform/scroll/ScrollTypes.h" |
| 30 #include "platform/scroll/ScrollableArea.h" | 30 #include "platform/scroll/ScrollableArea.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class LayoutMultiColumnSpannerPlaceholder; | 34 class LayoutMultiColumnSpannerPlaceholder; |
| 35 | 35 |
| 36 struct PaintInfo; | 36 struct PaintInfo; |
| 37 | 37 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 65 // For spanners, the spanner placeholder that lays us out within the multico
l container. | 65 // For spanners, the spanner placeholder that lays us out within the multico
l container. |
| 66 LayoutMultiColumnSpannerPlaceholder* m_spannerPlaceholder; | 66 LayoutMultiColumnSpannerPlaceholder* m_spannerPlaceholder; |
| 67 | 67 |
| 68 LayoutUnit m_overrideLogicalContentHeight; | 68 LayoutUnit m_overrideLogicalContentHeight; |
| 69 LayoutUnit m_overrideLogicalContentWidth; | 69 LayoutUnit m_overrideLogicalContentWidth; |
| 70 | 70 |
| 71 // Set by RenderBox::updatePreviousBorderBoxSizeIfNeeded(). | 71 // Set by RenderBox::updatePreviousBorderBoxSizeIfNeeded(). |
| 72 LayoutSize m_previousBorderBoxSize; | 72 LayoutSize m_previousBorderBoxSize; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 class RenderBox : public RenderBoxModelObject { | 75 class RenderBox : public LayoutBoxModelObject { |
| 76 public: | 76 public: |
| 77 explicit RenderBox(ContainerNode*); | 77 explicit RenderBox(ContainerNode*); |
| 78 | 78 |
| 79 virtual LayerType layerTypeRequired() const override; | 79 virtual LayerType layerTypeRequired() const override; |
| 80 | 80 |
| 81 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const override; | 81 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const override; |
| 82 | 82 |
| 83 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } | 83 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } |
| 84 | 84 |
| 85 // Use this with caution! No type checking is done! | 85 // Use this with caution! No type checking is done! |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 void updateGridPositionAfterStyleChange(const LayoutStyle*); | 699 void updateGridPositionAfterStyleChange(const LayoutStyle*); |
| 700 | 700 |
| 701 bool autoWidthShouldFitContent() const; | 701 bool autoWidthShouldFitContent() const; |
| 702 LayoutUnit shrinkToFitLogicalWidth(LayoutUnit availableLogicalWidth, LayoutU
nit bordersPlusPadding) const; | 702 LayoutUnit shrinkToFitLogicalWidth(LayoutUnit availableLogicalWidth, LayoutU
nit bordersPlusPadding) const; |
| 703 | 703 |
| 704 // Returns true if we queued up a paint invalidation. | 704 // Returns true if we queued up a paint invalidation. |
| 705 bool paintInvalidationLayerRectsForImage(WrappedImagePtr, const FillLayer&,
bool drawingBackground); | 705 bool paintInvalidationLayerRectsForImage(WrappedImagePtr, const FillLayer&,
bool drawingBackground); |
| 706 | 706 |
| 707 bool skipContainingBlockForPercentHeightCalculation(const RenderBox* contain
ingBlock) const; | 707 bool skipContainingBlockForPercentHeightCalculation(const RenderBox* contain
ingBlock) const; |
| 708 | 708 |
| 709 LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObje
ct* containingBlock, bool checkForPerpendicularWritingMode = true) const; | 709 LayoutUnit containingBlockLogicalWidthForPositioned(const LayoutBoxModelObje
ct* containingBlock, bool checkForPerpendicularWritingMode = true) const; |
| 710 LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObj
ect* containingBlock, bool checkForPerpendicularWritingMode = true) const; | 710 LayoutUnit containingBlockLogicalHeightForPositioned(const LayoutBoxModelObj
ect* containingBlock, bool checkForPerpendicularWritingMode = true) const; |
| 711 | 711 |
| 712 void computePositionedLogicalHeight(LogicalExtentComputedValues&) const; | 712 void computePositionedLogicalHeight(LogicalExtentComputedValues&) const; |
| 713 void computePositionedLogicalWidthUsing(Length logicalWidth, const RenderBox
ModelObject* containerBlock, TextDirection containerDirection, | 713 void computePositionedLogicalWidthUsing(Length logicalWidth, const LayoutBox
ModelObject* containerBlock, TextDirection containerDirection, |
| 714 LayoutUnit containerLogicalWidth, La
youtUnit bordersPlusPadding, | 714 LayoutUnit containerLogicalWidth, La
youtUnit bordersPlusPadding, |
| 715 const Length& logicalLeft, const Len
gth& logicalRight, const Length& marginLogicalLeft, | 715 const Length& logicalLeft, const Len
gth& logicalRight, const Length& marginLogicalLeft, |
| 716 const Length& marginLogicalRight, Lo
gicalExtentComputedValues&) const; | 716 const Length& marginLogicalRight, Lo
gicalExtentComputedValues&) const; |
| 717 void computePositionedLogicalHeightUsing(Length logicalHeightLength, const R
enderBoxModelObject* containerBlock, | 717 void computePositionedLogicalHeightUsing(Length logicalHeightLength, const L
ayoutBoxModelObject* containerBlock, |
| 718 LayoutUnit containerLogicalHeight,
LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight, | 718 LayoutUnit containerLogicalHeight,
LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight, |
| 719 const Length& logicalTop, const Len
gth& logicalBottom, const Length& marginLogicalTop, | 719 const Length& logicalTop, const Len
gth& logicalBottom, const Length& marginLogicalTop, |
| 720 const Length& marginLogicalBottom,
LogicalExtentComputedValues&) const; | 720 const Length& marginLogicalBottom,
LogicalExtentComputedValues&) const; |
| 721 | 721 |
| 722 void computePositionedLogicalHeightReplaced(LogicalExtentComputedValues&) co
nst; | 722 void computePositionedLogicalHeightReplaced(LogicalExtentComputedValues&) co
nst; |
| 723 void computePositionedLogicalWidthReplaced(LogicalExtentComputedValues&) con
st; | 723 void computePositionedLogicalWidthReplaced(LogicalExtentComputedValues&) con
st; |
| 724 | 724 |
| 725 LayoutUnit fillAvailableMeasure(LayoutUnit availableLogicalWidth) const; | 725 LayoutUnit fillAvailableMeasure(LayoutUnit availableLogicalWidth) const; |
| 726 LayoutUnit fillAvailableMeasure(LayoutUnit availableLogicalWidth, LayoutUnit
& marginStart, LayoutUnit& marginEnd) const; | 726 LayoutUnit fillAvailableMeasure(LayoutUnit availableLogicalWidth, LayoutUnit
& marginStart, LayoutUnit& marginEnd) const; |
| 727 | 727 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 if (UNLIKELY(inlineBoxWrapper() != 0)) | 843 if (UNLIKELY(inlineBoxWrapper() != 0)) |
| 844 deleteLineBoxWrapper(); | 844 deleteLineBoxWrapper(); |
| 845 } | 845 } |
| 846 | 846 |
| 847 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 847 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
| 848 } | 848 } |
| 849 | 849 |
| 850 } // namespace blink | 850 } // namespace blink |
| 851 | 851 |
| 852 #endif // RenderBox_h | 852 #endif // RenderBox_h |
| OLD | NEW |