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, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 * | 19 * |
20 */ | 20 */ |
21 | 21 |
22 #ifndef RenderReplaced_h | 22 #ifndef LayoutReplaced_h |
23 #define RenderReplaced_h | 23 #define LayoutReplaced_h |
24 | 24 |
25 #include "core/rendering/RenderBox.h" | 25 #include "core/rendering/RenderBox.h" |
26 | 26 |
27 namespace blink { | 27 namespace blink { |
28 | 28 |
29 class RenderReplaced : public RenderBox { | 29 class LayoutReplaced : public RenderBox { |
30 public: | 30 public: |
31 RenderReplaced(Element*); | 31 LayoutReplaced(Element*); |
32 RenderReplaced(Element*, const LayoutSize& intrinsicSize); | 32 LayoutReplaced(Element*, const LayoutSize& intrinsicSize); |
33 virtual ~RenderReplaced(); | 33 virtual ~LayoutReplaced(); |
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 override; | 36 virtual LayoutUnit computeReplacedLogicalHeight() const override; |
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. |
(...skipping 26 matching lines...) Expand all Loading... |
70 virtual void setSelectionState(SelectionState) override final; | 70 virtual void setSelectionState(SelectionState) override final; |
71 | 71 |
72 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov
erride; | 72 virtual void styleDidChange(StyleDifference, const LayoutStyle* 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"; } | |
81 | |
82 virtual void computePreferredLogicalWidths() override final; | 80 virtual void computePreferredLogicalWidths() override final; |
83 | 81 |
84 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t override; | 82 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t override; |
85 | 83 |
86 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override f
inal; | 84 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override f
inal; |
87 | 85 |
88 virtual bool canBeSelectionLeaf() const override { return true; } | 86 virtual bool canBeSelectionLeaf() const override { return true; } |
89 | 87 |
90 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutLayerModelO
bject* paintInvalidationContainer) const override final; | 88 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutLayerModelO
bject* paintInvalidationContainer) const override final; |
91 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr
ainedSize, double& intrinsicRatio) const; | 89 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr
ainedSize, double& intrinsicRatio) const; |
92 | 90 |
93 mutable LayoutSize m_intrinsicSize; | 91 mutable LayoutSize m_intrinsicSize; |
94 }; | 92 }; |
95 | 93 |
96 } | 94 } |
97 | 95 |
98 #endif | 96 #endif |
OLD | NEW |