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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutReplaced.h

Issue 1868013002: Percent height in auto height containers no longer computes as auto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@303728-6
Patch Set: Updated Created 4 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // 45 //
46 // The intrinsic ratio is used to keep the same proportion as the intrinsic 46 // The intrinsic ratio is used to keep the same proportion as the intrinsic
47 // size (thus avoiding visual distortions if width / height doesn't match 47 // size (thus avoiding visual distortions if width / height doesn't match
48 // the intrinsic value). 48 // the intrinsic value).
49 class CORE_EXPORT LayoutReplaced : public LayoutBox { 49 class CORE_EXPORT LayoutReplaced : public LayoutBox {
50 public: 50 public:
51 LayoutReplaced(Element*); 51 LayoutReplaced(Element*);
52 LayoutReplaced(Element*, const LayoutSize& intrinsicSize); 52 LayoutReplaced(Element*, const LayoutSize& intrinsicSize);
53 ~LayoutReplaced() override; 53 ~LayoutReplaced() override;
54 54
55 LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = ComputeActu al) const override; 55 LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = ComputeActua l) const override;
56 LayoutUnit computeReplacedLogicalHeight() const override; 56 LayoutUnit computeReplacedLogicalHeight(LayoutUnit estimatedUsedWidth = Layo utUnit()) const override;
57 57
58 bool hasReplacedLogicalHeight() const; 58 bool hasReplacedLogicalHeight() const;
59 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = n ullptr) const; 59 LayoutRect replacedContentRect(const LayoutSize* overriddenIntrinsicSize = n ullptr) const;
60 60
61 bool needsPreferredWidthsRecalculation() const override; 61 bool needsPreferredWidthsRecalculation() const override;
62 62
63 // These values are specified to be 300 and 150 pixels in the CSS 2.1 spec. 63 // These values are specified to be 300 and 150 pixels in the CSS 2.1 spec.
64 // http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width 64 // http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width
65 static const int defaultWidth; 65 static const int defaultWidth;
66 static const int defaultHeight; 66 static const int defaultHeight;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 PositionWithAffinity positionForPoint(const LayoutPoint&) override; 119 PositionWithAffinity positionForPoint(const LayoutPoint&) override;
120 120
121 private: 121 private:
122 void computePreferredLogicalWidths() final; 122 void computePreferredLogicalWidths() final;
123 123
124 bool canBeSelectionLeaf() const override { return true; } 124 bool canBeSelectionLeaf() const override { return true; }
125 125
126 void computeIntrinsicSizingInfoForReplacedContent(LayoutReplaced*, Intrinsic SizingInfo&) const; 126 void computeIntrinsicSizingInfoForReplacedContent(LayoutReplaced*, Intrinsic SizingInfo&) const;
127 FloatSize constrainIntrinsicSizeToMinMax(const IntrinsicSizingInfo&) const; 127 FloatSize constrainIntrinsicSizeToMinMax(const IntrinsicSizingInfo&) const;
128 128
129 LayoutUnit computeConstrainedLogicalWidth(ShouldComputePreferred) const;
130
129 mutable LayoutSize m_intrinsicSize; 131 mutable LayoutSize m_intrinsicSize;
130 }; 132 };
131 133
132 } // namespace blink 134 } // namespace blink
133 135
134 #endif 136 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698