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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 namespace WebCore { | 27 namespace WebCore { |
28 | 28 |
29 class RenderReplaced : public RenderBox { | 29 class RenderReplaced : public RenderBox { |
30 public: | 30 public: |
31 RenderReplaced(Element*); | 31 RenderReplaced(Element*); |
32 RenderReplaced(Element*, const LayoutSize& intrinsicSize); | 32 RenderReplaced(Element*, const LayoutSize& intrinsicSize); |
33 virtual ~RenderReplaced(); | 33 virtual ~RenderReplaced(); |
34 | 34 |
35 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const OVERRIDE; | 35 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const OVERRIDE; |
36 virtual LayoutUnit computeReplacedLogicalHeight() const; | 36 virtual LayoutUnit computeReplacedLogicalHeight() const OVERRIDE; |
37 | 37 |
38 bool hasReplacedLogicalWidth() const; | 38 bool hasReplacedLogicalWidth() const; |
39 bool hasReplacedLogicalHeight() const; | 39 bool hasReplacedLogicalHeight() const; |
40 | 40 |
41 virtual bool needsPreferredWidthsRecalculation() const OVERRIDE; | 41 virtual bool needsPreferredWidthsRecalculation() const OVERRIDE; |
42 | 42 |
43 protected: | 43 protected: |
44 virtual void willBeDestroyed(); | 44 virtual void willBeDestroyed() OVERRIDE; |
45 | 45 |
46 virtual void layout(); | 46 virtual void layout() OVERRIDE; |
47 | 47 |
48 virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return m_intrinsic
Size; } | 48 virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return m_intrinsic
Size; } |
49 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = 0
) const; | 49 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = 0
) const; |
50 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio, bool& isPercentageIntrinsicSize) const; | 50 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio, bool& isPercentageIntrinsicSize) const OVERRIDE; |
51 | 51 |
52 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE FINAL; | 52 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE FINAL; |
53 | 53 |
54 virtual LayoutUnit minimumReplacedHeight() const { return LayoutUnit(); } | 54 virtual LayoutUnit minimumReplacedHeight() const { return LayoutUnit(); } |
55 | 55 |
56 virtual void setSelectionState(SelectionState) OVERRIDE FINAL; | 56 virtual void setSelectionState(SelectionState) OVERRIDE FINAL; |
57 | 57 |
58 bool isSelected() const; | 58 bool isSelected() const; |
59 | 59 |
60 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); | 60 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; |
61 | 61 |
62 void setIntrinsicSize(const LayoutSize& intrinsicSize) { m_intrinsicSize = i
ntrinsicSize; } | 62 void setIntrinsicSize(const LayoutSize& intrinsicSize) { m_intrinsicSize = i
ntrinsicSize; } |
63 virtual void intrinsicSizeChanged(); | 63 virtual void intrinsicSizeChanged(); |
64 virtual bool hasRelativeIntrinsicLogicalWidth() const { return false; } | 64 virtual bool hasRelativeIntrinsicLogicalWidth() const { return false; } |
65 | 65 |
66 virtual void paint(PaintInfo&, const LayoutPoint&); | 66 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
67 bool shouldPaint(PaintInfo&, const LayoutPoint&); | 67 bool shouldPaint(PaintInfo&, const LayoutPoint&); |
68 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). | 68 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). |
69 | 69 |
70 private: | 70 private: |
71 virtual RenderBox* embeddedContentBox() const { return 0; } | 71 virtual RenderBox* embeddedContentBox() const { return 0; } |
72 virtual const char* renderName() const { return "RenderReplaced"; } | 72 virtual const char* renderName() const OVERRIDE { return "RenderReplaced"; } |
73 | 73 |
74 virtual bool canHaveChildren() const { return false; } | 74 virtual bool canHaveChildren() const OVERRIDE { return false; } |
75 | 75 |
76 virtual void computePreferredLogicalWidths() OVERRIDE FINAL; | 76 virtual void computePreferredLogicalWidths() OVERRIDE FINAL; |
77 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { } | 77 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { } |
78 | 78 |
79 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const OVERRIDE; | 79 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const OVERRIDE; |
80 | 80 |
81 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F
INAL; | 81 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F
INAL; |
82 | 82 |
83 virtual bool canBeSelectionLeaf() const { return true; } | 83 virtual bool canBeSelectionLeaf() const { return true; } |
84 | 84 |
85 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* rep
aintContainer, bool clipToVisibleContent = true) OVERRIDE FINAL; | 85 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* rep
aintContainer, bool clipToVisibleContent = true) OVERRIDE FINAL; |
86 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr
ainedSize, double& intrinsicRatio, bool& isPercentageIntrinsicSize) const; | 86 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr
ainedSize, double& intrinsicRatio, bool& isPercentageIntrinsicSize) const; |
87 | 87 |
88 mutable LayoutSize m_intrinsicSize; | 88 mutable LayoutSize m_intrinsicSize; |
89 }; | 89 }; |
90 | 90 |
91 } | 91 } |
92 | 92 |
93 #endif | 93 #endif |
OLD | NEW |