OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 bool hasReplacedLogicalHeight() const; | 38 bool hasReplacedLogicalHeight() const; |
39 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = 0
) const; | 39 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = 0
) const; |
40 | 40 |
41 virtual bool needsPreferredWidthsRecalculation() const OVERRIDE; | 41 virtual bool needsPreferredWidthsRecalculation() const OVERRIDE; |
42 | 42 |
43 // These values are specified to be 300 and 150 pixels in the CSS 2.1 spec. | 43 // These values are specified to be 300 and 150 pixels in the CSS 2.1 spec. |
44 // http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width | 44 // http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width |
45 static const int defaultWidth; | 45 static const int defaultWidth; |
46 static const int defaultHeight; | 46 static const int defaultHeight; |
| 47 virtual bool canHaveChildren() const OVERRIDE { return false; } |
| 48 bool shouldPaint(PaintInfo&, const LayoutPoint&); |
| 49 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { } |
| 50 LayoutRect localSelectionRect(bool checkWhetherSelected = true) const; // Th
is is in local coordinates, but it's a physical rect (so the top left corner is
physical top left). |
47 | 51 |
48 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; | 52 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
49 | 53 |
50 protected: | 54 protected: |
51 virtual void willBeDestroyed() OVERRIDE; | 55 virtual void willBeDestroyed() OVERRIDE; |
52 | 56 |
53 virtual void layout() OVERRIDE; | 57 virtual void layout() OVERRIDE; |
54 | 58 |
55 virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return m_intrinsic
Size; } | 59 virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return m_intrinsic
Size; } |
56 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio) const OVERRIDE; | 60 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio) const OVERRIDE; |
57 | 61 |
58 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE FINAL; | 62 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE FINAL; |
59 | 63 |
60 virtual LayoutUnit intrinsicContentLogicalHeight() const { return intrinsicL
ogicalHeight(); } | 64 virtual LayoutUnit intrinsicContentLogicalHeight() const { return intrinsicL
ogicalHeight(); } |
61 | 65 |
62 virtual LayoutUnit minimumReplacedHeight() const { return LayoutUnit(); } | 66 virtual LayoutUnit minimumReplacedHeight() const { return LayoutUnit(); } |
63 | 67 |
64 virtual void setSelectionState(SelectionState) OVERRIDE FINAL; | 68 virtual void setSelectionState(SelectionState) OVERRIDE FINAL; |
65 | 69 |
66 bool isSelected() const; | 70 bool isSelected() const; |
67 | 71 |
68 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; | 72 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; |
69 | 73 |
70 void setIntrinsicSize(const LayoutSize& intrinsicSize) { m_intrinsicSize = i
ntrinsicSize; } | 74 void setIntrinsicSize(const LayoutSize& intrinsicSize) { m_intrinsicSize = i
ntrinsicSize; } |
71 virtual void intrinsicSizeChanged(); | 75 virtual void intrinsicSizeChanged(); |
72 | 76 |
73 bool shouldPaint(PaintInfo&, const LayoutPoint&); | |
74 LayoutRect localSelectionRect(bool checkWhetherSelected = true) const; // Th
is is in local coordinates, but it's a physical rect (so the top left corner is
physical top left). | |
75 virtual RenderBox* embeddedContentBox() const { return 0; } | 77 virtual RenderBox* embeddedContentBox() const { return 0; } |
76 | 78 |
77 private: | 79 private: |
78 virtual const char* renderName() const OVERRIDE { return "RenderReplaced"; } | 80 virtual const char* renderName() const OVERRIDE { return "RenderReplaced"; } |
79 | 81 |
80 virtual bool canHaveChildren() const OVERRIDE { return false; } | |
81 | |
82 virtual void computePreferredLogicalWidths() OVERRIDE FINAL; | 82 virtual void computePreferredLogicalWidths() OVERRIDE FINAL; |
83 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { } | |
84 | 83 |
85 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t OVERRIDE; | 84 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t OVERRIDE; |
86 | 85 |
87 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F
INAL; | 86 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F
INAL; |
88 | 87 |
89 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; } | 88 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; } |
90 | 89 |
91 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer) const OVERRIDE FINAL; | 90 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer) const OVERRIDE FINAL; |
92 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr
ainedSize, double& intrinsicRatio) const; | 91 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr
ainedSize, double& intrinsicRatio) const; |
93 | 92 |
94 mutable LayoutSize m_intrinsicSize; | 93 mutable LayoutSize m_intrinsicSize; |
95 }; | 94 }; |
96 | 95 |
97 } | 96 } |
98 | 97 |
99 #endif | 98 #endif |
OLD | NEW |