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

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

Issue 1036653002: Clamp shape-margin to zero (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add contentWidthExcludingScrollbar Created 5 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: Source/core/layout/LayoutBox.h
diff --git a/Source/core/layout/LayoutBox.h b/Source/core/layout/LayoutBox.h
index 2232b9d6ebfe741ebb4d7aa486c69a9355296fb0..000099e905e9a7761f641e376d38ec286e332bb9 100644
--- a/Source/core/layout/LayoutBox.h
+++ b/Source/core/layout/LayoutBox.h
@@ -285,6 +285,7 @@ public:
void updateLayerTransformAfterLayout();
+ LayoutUnit contentWidthExcludingScrollbar() const { return m_frameRect.width() - borderLeft() - borderRight() - paddingLeft() - paddingRight(); }
LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - paddingRight(); }
LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - paddingBottom(); }
LayoutSize contentSize() const { return LayoutSize(contentWidth(), contentHeight()); }

Powered by Google App Engine
This is Rietveld 408576698