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