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

Unified Diff: Source/core/rendering/RenderScrollbarPart.h

Issue 138903031: Don't let RenderScrollbarPart have padding. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review Created 6 years, 10 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
« no previous file with comments | « LayoutTests/scrollbars/viewport-scrollbar-corner-with-percent-padding-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderScrollbarPart.h
diff --git a/Source/core/rendering/RenderScrollbarPart.h b/Source/core/rendering/RenderScrollbarPart.h
index fa6695ab9afc8b76846ce824653e0956989561d8..bcf3a7a32774827ae00b43b2233c72c18ac12122 100644
--- a/Source/core/rendering/RenderScrollbarPart.h
+++ b/Source/core/rendering/RenderScrollbarPart.h
@@ -68,6 +68,19 @@ private:
virtual bool supportsPartialLayout() const OVERRIDE { return false; }
+ // Have all padding getters return 0. The important point here is to avoid resolving percents
+ // against the containing block, since scroll bar corners don't always have one (so it would
+ // crash). Scroll bar corners are not actually laid out, and they don't have child content, so
+ // what we return here doesn't really matter.
+ virtual LayoutUnit paddingTop() const OVERRIDE { return LayoutUnit(); }
+ virtual LayoutUnit paddingBottom() const OVERRIDE { return LayoutUnit(); }
+ virtual LayoutUnit paddingLeft() const OVERRIDE { return LayoutUnit(); }
+ virtual LayoutUnit paddingRight() const OVERRIDE { return LayoutUnit(); }
+ virtual LayoutUnit paddingBefore() const OVERRIDE { return LayoutUnit(); }
+ virtual LayoutUnit paddingAfter() const OVERRIDE { return LayoutUnit(); }
+ virtual LayoutUnit paddingStart() const OVERRIDE { return LayoutUnit(); }
+ virtual LayoutUnit paddingEnd() const OVERRIDE { return LayoutUnit(); }
+
void layoutHorizontalPart();
void layoutVerticalPart();
« no previous file with comments | « LayoutTests/scrollbars/viewport-scrollbar-corner-with-percent-padding-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698