Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: Source/core/rendering/RenderReplaced.h

Issue 26390004: Rework SVG sizing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Minor touch-ups to the tests; only fail now should be crbug.com/363126 Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 29 matching lines...) Expand all
40 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = 0 ) const; 40 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = 0 ) const;
41 41
42 virtual bool needsPreferredWidthsRecalculation() const OVERRIDE; 42 virtual bool needsPreferredWidthsRecalculation() const OVERRIDE;
43 43
44 protected: 44 protected:
45 virtual void willBeDestroyed() OVERRIDE; 45 virtual void willBeDestroyed() OVERRIDE;
46 46
47 virtual void layout() OVERRIDE; 47 virtual void layout() OVERRIDE;
48 48
49 virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return m_intrinsic Size; } 49 virtual LayoutSize intrinsicSize() const OVERRIDE FINAL { return m_intrinsic Size; }
50 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub le& intrinsicRatio, bool& isPercentageIntrinsicSize) const OVERRIDE; 50 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub le& intrinsicRatio) 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) OV ERRIDE; 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; }
65 64
66 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; 65 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
67 bool shouldPaint(PaintInfo&, const LayoutPoint&); 66 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). 67 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 68
70 private: 69 private:
71 virtual RenderBox* embeddedContentBox() const { return 0; } 70 virtual RenderBox* embeddedContentBox() const { return 0; }
72 virtual const char* renderName() const OVERRIDE { return "RenderReplaced"; } 71 virtual const char* renderName() const OVERRIDE { return "RenderReplaced"; }
73 72
74 virtual bool canHaveChildren() const OVERRIDE { return false; } 73 virtual bool canHaveChildren() const OVERRIDE { return false; }
75 74
76 virtual void computePreferredLogicalWidths() OVERRIDE FINAL; 75 virtual void computePreferredLogicalWidths() OVERRIDE FINAL;
77 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { } 76 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { }
78 77
79 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec t* repaintContainer) const OVERRIDE; 78 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec t* repaintContainer) const OVERRIDE;
80 79
81 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F INAL; 80 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE F INAL;
82 81
83 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; } 82 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; }
84 83
85 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* rep aintContainer, bool clipToVisibleContent = true) OVERRIDE FINAL; 84 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* rep aintContainer, bool clipToVisibleContent = true) OVERRIDE FINAL;
86 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr ainedSize, double& intrinsicRatio, bool& isPercentageIntrinsicSize) const; 85 void computeAspectRatioInformationForRenderBox(RenderBox*, FloatSize& constr ainedSize, double& intrinsicRatio) const;
87 86
88 mutable LayoutSize m_intrinsicSize; 87 mutable LayoutSize m_intrinsicSize;
89 }; 88 };
90 89
91 } 90 }
92 91
93 #endif 92 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698