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

Side by Side Diff: Source/core/rendering/RenderScrollbar.cpp

Issue 708283002: RLSA needsLayout on customscrollbar thickness change. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments Created 6 years, 1 month 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) 2008, 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 int oldThickness = isHorizontal ? height() : width(); 197 int oldThickness = isHorizontal ? height() : width();
198 int newThickness = 0; 198 int newThickness = 0;
199 RenderScrollbarPart* part = m_parts.get(ScrollbarBGPart); 199 RenderScrollbarPart* part = m_parts.get(ScrollbarBGPart);
200 if (part) { 200 if (part) {
201 part->layout(); 201 part->layout();
202 newThickness = isHorizontal ? part->height() : part->width(); 202 newThickness = isHorizontal ? part->height() : part->width();
203 } 203 }
204 204
205 if (newThickness != oldThickness) { 205 if (newThickness != oldThickness) {
206 setFrameRect(IntRect(location(), IntSize(isHorizontal ? width() : newThi ckness, isHorizontal ? newThickness : height()))); 206 setFrameRect(IntRect(location(), IntSize(isHorizontal ? width() : newThi ckness, isHorizontal ? newThickness : height())));
207 if (RenderBox* box = owningRenderer()) 207 if (RenderBox* box = owningRenderer()) {
208 box->setCustomScrollbarThicknessChanged(true);
208 box->setChildNeedsLayout(); 209 box->setChildNeedsLayout();
210 }
209 } 211 }
210 } 212 }
211 213
212 static PseudoId pseudoForScrollbarPart(ScrollbarPart part) 214 static PseudoId pseudoForScrollbarPart(ScrollbarPart part)
213 { 215 {
214 switch (part) { 216 switch (part) {
215 case BackButtonStartPart: 217 case BackButtonStartPart:
216 case ForwardButtonStartPart: 218 case ForwardButtonStartPart:
217 case BackButtonEndPart: 219 case BackButtonEndPart:
218 case ForwardButtonEndPart: 220 case ForwardButtonEndPart:
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 int RenderScrollbar::minimumThumbLength() 360 int RenderScrollbar::minimumThumbLength()
359 { 361 {
360 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); 362 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart);
361 if (!partRenderer) 363 if (!partRenderer)
362 return 0; 364 return 0;
363 partRenderer->layout(); 365 partRenderer->layout();
364 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe nderer->height(); 366 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe nderer->height();
365 } 367 }
366 368
367 } 369 }
OLDNEW
« Source/core/rendering/RenderBox.h ('K') | « Source/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698