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