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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutReplaced.h

Issue 1785323002: Move computeIntrinsicSizingInfo to LayoutReplaced (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-computeIntrinsicSizingInfo
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutReplaced.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutReplaced.h b/third_party/WebKit/Source/core/layout/LayoutReplaced.h
index eb31e109a84e394a52cf3c1126e70117ad67fd84..a3bfce444e6c1c6aca1ee30a8eeba09f98e8bfe5 100644
--- a/third_party/WebKit/Source/core/layout/LayoutReplaced.h
+++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.h
@@ -72,13 +72,25 @@ public:
void paint(const PaintInfo&, const LayoutPoint&) const override;
+ struct IntrinsicSizingInfo {
+ STACK_ALLOCATED();
+ IntrinsicSizingInfo() : hasWidth(true), hasHeight(true) {}
+
+ FloatSize size;
+ FloatSize aspectRatio;
+ bool hasWidth;
+ bool hasHeight;
+
+ void transpose();
+ };
+
protected:
void willBeDestroyed() override;
void layout() override;
LayoutSize intrinsicSize() const final { return m_intrinsicSize; }
- void computeIntrinsicSizingInfo(IntrinsicSizingInfo&) const override;
+ virtual void computeIntrinsicSizingInfo(IntrinsicSizingInfo&) const;
void computePositionedLogicalWidth(LogicalExtentComputedValues&) const override;
void computePositionedLogicalHeight(LogicalExtentComputedValues&) const override;
@@ -112,7 +124,7 @@ private:
bool canBeSelectionLeaf() const override { return true; }
LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer) const final;
- void computeIntrinsicSizingInfoForLayoutBox(LayoutBox*, IntrinsicSizingInfo&) const;
+ void computeIntrinsicSizingInfoForReplacedContent(LayoutReplaced*, IntrinsicSizingInfo&) const;
FloatSize constrainIntrinsicSizeToMinMax(const IntrinsicSizingInfo&) const;
mutable LayoutSize m_intrinsicSize;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698