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 27 matching lines...) Expand all Loading... |
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 | 47 |
| 48 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
| 49 |
48 protected: | 50 protected: |
49 virtual void willBeDestroyed() OVERRIDE; | 51 virtual void willBeDestroyed() OVERRIDE; |
50 | 52 |
51 virtual void layout() OVERRIDE; | 53 virtual void layout() OVERRIDE; |
52 | 54 |
53 virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return m_intrinsic
Size; } | 55 virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return m_intrinsic
Size; } |
54 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio) const OVERRIDE; | 56 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio) const OVERRIDE; |
55 | 57 |
56 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE FINAL; | 58 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE FINAL; |
57 | 59 |
58 virtual LayoutUnit intrinsicContentLogicalHeight() const { return intrinsicL
ogicalHeight(); } | 60 virtual LayoutUnit intrinsicContentLogicalHeight() const { return intrinsicL
ogicalHeight(); } |
59 | 61 |
60 virtual LayoutUnit minimumReplacedHeight() const { return LayoutUnit(); } | 62 virtual LayoutUnit minimumReplacedHeight() const { return LayoutUnit(); } |
61 | 63 |
62 virtual void setSelectionState(SelectionState) OVERRIDE FINAL; | 64 virtual void setSelectionState(SelectionState) OVERRIDE FINAL; |
63 | 65 |
64 bool isSelected() const; | 66 bool isSelected() const; |
65 | 67 |
66 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; | 68 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; |
67 | 69 |
68 void setIntrinsicSize(const LayoutSize& intrinsicSize) { m_intrinsicSize = i
ntrinsicSize; } | 70 void setIntrinsicSize(const LayoutSize& intrinsicSize) { m_intrinsicSize = i
ntrinsicSize; } |
69 virtual void intrinsicSizeChanged(); | 71 virtual void intrinsicSizeChanged(); |
70 | 72 |
71 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; | |
72 bool shouldPaint(PaintInfo&, const LayoutPoint&); | 73 bool shouldPaint(PaintInfo&, const LayoutPoint&); |
73 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). | 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). |
74 virtual RenderBox* embeddedContentBox() const { return 0; } | 75 virtual RenderBox* embeddedContentBox() const { return 0; } |
75 | 76 |
76 private: | 77 private: |
77 virtual const char* renderName() const OVERRIDE { return "RenderReplaced"; } | 78 virtual const char* renderName() const OVERRIDE { return "RenderReplaced"; } |
78 | 79 |
79 virtual bool canHaveChildren() const OVERRIDE { return false; } | 80 virtual bool canHaveChildren() const OVERRIDE { return false; } |
80 | 81 |
81 virtual void computePreferredLogicalWidths() OVERRIDE FINAL; | 82 virtual void computePreferredLogicalWidths() OVERRIDE FINAL; |
82 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { } | 83 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { } |
83 | 84 |
84 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t OVERRIDE; | 85 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t OVERRIDE; |
85 | 86 |
86 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F
INAL; | 87 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F
INAL; |
87 | 88 |
88 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; } | 89 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; } |
89 | 90 |
90 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer) const OVERRIDE FINAL; | 91 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer) const OVERRIDE FINAL; |
91 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr
ainedSize, double& intrinsicRatio) const; | 92 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr
ainedSize, double& intrinsicRatio) const; |
92 | 93 |
93 mutable LayoutSize m_intrinsicSize; | 94 mutable LayoutSize m_intrinsicSize; |
94 }; | 95 }; |
95 | 96 |
96 } | 97 } |
97 | 98 |
98 #endif | 99 #endif |
OLD | NEW |