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

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

Issue 1737453002: WIP: snap-width Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBox.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h
index a8e98dfe7b5b82f3bf635a83bfac83fc9bcc4272..390811e252e94237ae83d6d688d2ae81efdadab4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -712,7 +712,7 @@ public:
LayoutUnit computePercentageLogicalHeight(const Length& height) const;
// Block flows subclass availableWidth/Height to handle multi column layout (shrinking the width/height available to children when laying out.)
- LayoutUnit availableLogicalWidth() const { return contentLogicalWidth(); }
+ LayoutUnit availableLogicalWidth() const { return LIKELY(!styleRef().snapWidth()) ? contentLogicalWidth() : snapContentLogicalWidth(); }
LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const;
LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeightType) const;
@@ -976,6 +976,7 @@ private:
void updateShapeOutsideInfoAfterStyleChange(const ComputedStyle&, const ComputedStyle* oldStyle);
void updateGridPositionAfterStyleChange(const ComputedStyle*);
+ LayoutUnit snapContentLogicalWidth() const;
bool autoWidthShouldFitContent() const;
LayoutUnit shrinkToFitLogicalWidth(LayoutUnit availableLogicalWidth, LayoutUnit bordersPlusPadding) const;
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698