| 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 22 matching lines...) Expand all Loading... |
| 33 class RenderBoxRegionInfo; | 33 class RenderBoxRegionInfo; |
| 34 class RenderRegion; | 34 class RenderRegion; |
| 35 struct PaintInfo; | 35 struct PaintInfo; |
| 36 | 36 |
| 37 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; | 37 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; |
| 38 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde
rPadding }; | 38 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde
rPadding }; |
| 39 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS
crollbarSize }; | 39 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS
crollbarSize }; |
| 40 | 40 |
| 41 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; | 41 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; |
| 42 | 42 |
| 43 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; |
| 44 |
| 43 class RenderBox : public RenderBoxModelObject { | 45 class RenderBox : public RenderBoxModelObject { |
| 44 public: | 46 public: |
| 45 explicit RenderBox(ContainerNode*); | 47 explicit RenderBox(ContainerNode*); |
| 46 virtual ~RenderBox(); | 48 virtual ~RenderBox(); |
| 47 | 49 |
| 48 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since | 50 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since |
| 49 // position:static elements that are not flex-items get their z-index coerce
d to auto. | 51 // position:static elements that are not flex-items get their z-index coerce
d to auto. |
| 50 virtual bool requiresLayer() const OVERRIDE { return isRoot() || isPositione
d() || createsGroup() || hasClipPath() || hasOverflowClip() || hasTransform() ||
hasHiddenBackface() || hasReflection() || style()->specifiesColumns() || !style
()->hasAutoZIndex() || isFloatingWithShapeOutside(); } | 52 virtual bool requiresLayer() const OVERRIDE { return isRoot() || isPositione
d() || createsGroup() || hasClipPath() || hasOverflowClip() || hasTransform() ||
hasHiddenBackface() || hasReflection() || style()->specifiesColumns() || !style
()->hasAutoZIndex() || isFloatingWithShapeOutside(); } |
| 51 | 53 |
| 52 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const OVERRIDE; | 54 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const OVERRIDE; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 LayoutSize maxLayoutOverflow() const { return LayoutSize(layoutOverflowRect(
).maxX(), layoutOverflowRect().maxY()); } | 181 LayoutSize maxLayoutOverflow() const { return LayoutSize(layoutOverflowRect(
).maxX(), layoutOverflowRect().maxY()); } |
| 180 LayoutUnit logicalLeftLayoutOverflow() const { return style()->isHorizontalW
ritingMode() ? layoutOverflowRect().x() : layoutOverflowRect().y(); } | 182 LayoutUnit logicalLeftLayoutOverflow() const { return style()->isHorizontalW
ritingMode() ? layoutOverflowRect().x() : layoutOverflowRect().y(); } |
| 181 LayoutUnit logicalRightLayoutOverflow() const { return style()->isHorizontal
WritingMode() ? layoutOverflowRect().maxX() : layoutOverflowRect().maxY(); } | 183 LayoutUnit logicalRightLayoutOverflow() const { return style()->isHorizontal
WritingMode() ? layoutOverflowRect().maxX() : layoutOverflowRect().maxY(); } |
| 182 | 184 |
| 183 virtual LayoutRect visualOverflowRect() const { return m_overflow ? m_overfl
ow->visualOverflowRect() : borderBoxRect(); } | 185 virtual LayoutRect visualOverflowRect() const { return m_overflow ? m_overfl
ow->visualOverflowRect() : borderBoxRect(); } |
| 184 LayoutUnit logicalLeftVisualOverflow() const { return style()->isHorizontalW
ritingMode() ? visualOverflowRect().x() : visualOverflowRect().y(); } | 186 LayoutUnit logicalLeftVisualOverflow() const { return style()->isHorizontalW
ritingMode() ? visualOverflowRect().x() : visualOverflowRect().y(); } |
| 185 LayoutUnit logicalRightVisualOverflow() const { return style()->isHorizontal
WritingMode() ? visualOverflowRect().maxX() : visualOverflowRect().maxY(); } | 187 LayoutUnit logicalRightVisualOverflow() const { return style()->isHorizontal
WritingMode() ? visualOverflowRect().maxX() : visualOverflowRect().maxY(); } |
| 186 | 188 |
| 187 LayoutRect overflowRectForPaintRejection() const; | 189 LayoutRect overflowRectForPaintRejection() const; |
| 188 | 190 |
| 191 LayoutRect contentsVisualOverflowRect() const { return m_overflow ? m_overfl
ow->contentsVisualOverflowRect() : LayoutRect(); } |
| 192 |
| 189 void addLayoutOverflow(const LayoutRect&); | 193 void addLayoutOverflow(const LayoutRect&); |
| 190 void addVisualOverflow(const LayoutRect&); | 194 void addVisualOverflow(const LayoutRect&); |
| 191 | 195 |
| 196 // Clipped by the contents clip, if one exists. |
| 197 void addContentsVisualOverflow(const LayoutRect&); |
| 198 |
| 192 void addVisualEffectOverflow(); | 199 void addVisualEffectOverflow(); |
| 193 void addOverflowFromChild(RenderBox* child) { addOverflowFromChild(child, ch
ild->locationOffset()); } | 200 void addOverflowFromChild(RenderBox* child) { addOverflowFromChild(child, ch
ild->locationOffset()); } |
| 194 void addOverflowFromChild(RenderBox* child, const LayoutSize& delta); | 201 void addOverflowFromChild(RenderBox* child, const LayoutSize& delta); |
| 195 void clearLayoutOverflow(); | 202 void clearLayoutOverflow(); |
| 196 | 203 |
| 197 void updateLayerTransform(); | 204 void updateLayerTransform(); |
| 198 | 205 |
| 199 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } | 206 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } |
| 200 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } | 207 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } |
| 201 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting
Mode() ? contentWidth() : contentHeight(); } | 208 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting
Mode() ? contentWidth() : contentHeight(); } |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 | 470 |
| 464 bool hasUnsplittableScrollingOverflow() const; | 471 bool hasUnsplittableScrollingOverflow() const; |
| 465 bool isUnsplittableForPagination() const; | 472 bool isUnsplittableForPagination() const; |
| 466 | 473 |
| 467 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0); | 474 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0); |
| 468 | 475 |
| 469 virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderRegio
n*, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize); | 476 virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderRegio
n*, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize); |
| 470 LayoutRect clipRect(const LayoutPoint& location, RenderRegion*); | 477 LayoutRect clipRect(const LayoutPoint& location, RenderRegion*); |
| 471 virtual bool hasControlClip() const { return false; } | 478 virtual bool hasControlClip() const { return false; } |
| 472 virtual LayoutRect controlClipRect(const LayoutPoint&) const { return Layout
Rect(); } | 479 virtual LayoutRect controlClipRect(const LayoutPoint&) const { return Layout
Rect(); } |
| 473 bool pushContentsClip(PaintInfo&, const LayoutPoint& accumulatedOffset); | 480 bool pushContentsClip(PaintInfo&, const LayoutPoint& accumulatedOffset, Cont
entsClipBehavior); |
| 474 void popContentsClip(PaintInfo&, PaintPhase originalPhase, const LayoutPoint
& accumulatedOffset); | 481 void popContentsClip(PaintInfo&, PaintPhase originalPhase, const LayoutPoint
& accumulatedOffset); |
| 475 | 482 |
| 476 virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHE
D(); } | 483 virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHE
D(); } |
| 477 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&); | 484 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&); |
| 478 virtual void paintMask(PaintInfo&, const LayoutPoint&); | 485 virtual void paintMask(PaintInfo&, const LayoutPoint&); |
| 479 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); | 486 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); |
| 480 | 487 |
| 481 // Called when a positioned object moves but doesn't necessarily change size
. A simplified layout is attempted | 488 // Called when a positioned object moves but doesn't necessarily change size
. A simplified layout is attempted |
| 482 // that just updates the object's position. If the size does change, the obj
ect remains dirty. | 489 // that just updates the object's position. If the size does change, the obj
ect remains dirty. |
| 483 bool tryLayoutDoingPositionedMovementOnly() | 490 bool tryLayoutDoingPositionedMovementOnly() |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 if (UNLIKELY(m_inlineBoxWrapper != 0)) | 750 if (UNLIKELY(m_inlineBoxWrapper != 0)) |
| 744 deleteLineBoxWrapper(); | 751 deleteLineBoxWrapper(); |
| 745 } | 752 } |
| 746 | 753 |
| 747 m_inlineBoxWrapper = boxWrapper; | 754 m_inlineBoxWrapper = boxWrapper; |
| 748 } | 755 } |
| 749 | 756 |
| 750 } // namespace WebCore | 757 } // namespace WebCore |
| 751 | 758 |
| 752 #endif // RenderBox_h | 759 #endif // RenderBox_h |
| OLD | NEW |