| 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 19 matching lines...) Expand all Loading... |
| 30 class CORE_EXPORT LayoutReplaced : public LayoutBox { | 30 class CORE_EXPORT LayoutReplaced : public LayoutBox { |
| 31 public: | 31 public: |
| 32 LayoutReplaced(Element*); | 32 LayoutReplaced(Element*); |
| 33 LayoutReplaced(Element*, const LayoutSize& intrinsicSize); | 33 LayoutReplaced(Element*, const LayoutSize& intrinsicSize); |
| 34 virtual ~LayoutReplaced(); | 34 virtual ~LayoutReplaced(); |
| 35 | 35 |
| 36 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const override; | 36 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const override; |
| 37 virtual LayoutUnit computeReplacedLogicalHeight() const override; | 37 virtual LayoutUnit computeReplacedLogicalHeight() const override; |
| 38 | 38 |
| 39 bool hasReplacedLogicalHeight() const; | 39 bool hasReplacedLogicalHeight() const; |
| 40 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = 0
) const; | 40 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = n
ullptr) const; |
| 41 | 41 |
| 42 virtual bool needsPreferredWidthsRecalculation() const override; | 42 virtual bool needsPreferredWidthsRecalculation() const override; |
| 43 | 43 |
| 44 // These values are specified to be 300 and 150 pixels in the CSS 2.1 spec. | 44 // These values are specified to be 300 and 150 pixels in the CSS 2.1 spec. |
| 45 // http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width | 45 // http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width |
| 46 static const int defaultWidth; | 46 static const int defaultWidth; |
| 47 static const int defaultHeight; | 47 static const int defaultHeight; |
| 48 virtual bool canHaveChildren() const override { return false; } | 48 virtual bool canHaveChildren() const override { return false; } |
| 49 bool shouldPaint(const PaintInfo&, const LayoutPoint&) const; | 49 bool shouldPaint(const PaintInfo&, const LayoutPoint&) const; |
| 50 virtual void paintReplaced(const PaintInfo&, const LayoutPoint&) { } | 50 virtual void paintReplaced(const PaintInfo&, const LayoutPoint&) { } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 68 | 68 |
| 69 virtual LayoutUnit minimumReplacedHeight() const { return LayoutUnit(); } | 69 virtual LayoutUnit minimumReplacedHeight() const { return LayoutUnit(); } |
| 70 | 70 |
| 71 virtual void setSelectionState(SelectionState) override final; | 71 virtual void setSelectionState(SelectionState) override final; |
| 72 | 72 |
| 73 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle)
override; | 73 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle)
override; |
| 74 | 74 |
| 75 void setIntrinsicSize(const LayoutSize& intrinsicSize) { m_intrinsicSize = i
ntrinsicSize; } | 75 void setIntrinsicSize(const LayoutSize& intrinsicSize) { m_intrinsicSize = i
ntrinsicSize; } |
| 76 virtual void intrinsicSizeChanged(); | 76 virtual void intrinsicSizeChanged(); |
| 77 | 77 |
| 78 virtual LayoutBox* embeddedContentBox() const { return 0; } | 78 virtual LayoutBox* embeddedContentBox() const { return nullptr; } |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 virtual void computePreferredLogicalWidths() override final; | 81 virtual void computePreferredLogicalWidths() override final; |
| 82 | 82 |
| 83 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const
override; | 83 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr)
const override; |
| 84 | 84 |
| 85 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override f
inal; | 85 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override f
inal; |
| 86 | 86 |
| 87 virtual bool canBeSelectionLeaf() const override { return true; } | 87 virtual bool canBeSelectionLeaf() const override { return true; } |
| 88 | 88 |
| 89 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObj
ect* paintInvalidationContainer) const override final; | 89 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObj
ect* paintInvalidationContainer) const override final; |
| 90 void computeAspectRatioInformationForLayoutBox(LayoutBox*, FloatSize& constr
ainedSize, double& intrinsicRatio) const; | 90 void computeAspectRatioInformationForLayoutBox(LayoutBox*, FloatSize& constr
ainedSize, double& intrinsicRatio) const; |
| 91 | 91 |
| 92 mutable LayoutSize m_intrinsicSize; | 92 mutable LayoutSize m_intrinsicSize; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } | 95 } |
| 96 | 96 |
| 97 #endif | 97 #endif |
| OLD | NEW |