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

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

Issue 7782035: Merge 94690 - Null owningRenderer crash in RenderScrollbar::updateScrollbarParts. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 int oldThickness = isHorizontal ? height() : width(); 188 int oldThickness = isHorizontal ? height() : width();
189 int newThickness = 0; 189 int newThickness = 0;
190 RenderScrollbarPart* part = m_parts.get(ScrollbarBGPart); 190 RenderScrollbarPart* part = m_parts.get(ScrollbarBGPart);
191 if (part) { 191 if (part) {
192 part->layout(); 192 part->layout();
193 newThickness = isHorizontal ? part->height() : part->width(); 193 newThickness = isHorizontal ? part->height() : part->width();
194 } 194 }
195 195
196 if (newThickness != oldThickness) { 196 if (newThickness != oldThickness) {
197 setFrameRect(IntRect(x(), y(), isHorizontal ? width() : newThickness, is Horizontal ? newThickness : height())); 197 setFrameRect(IntRect(x(), y(), isHorizontal ? width() : newThickness, is Horizontal ? newThickness : height()));
198 owningRenderer()->setChildNeedsLayout(true); 198 if (RenderBox* box = owningRenderer())
199 box->setChildNeedsLayout(true);
199 } 200 }
200 } 201 }
201 202
202 static PseudoId pseudoForScrollbarPart(ScrollbarPart part) 203 static PseudoId pseudoForScrollbarPart(ScrollbarPart part)
203 { 204 {
204 switch (part) { 205 switch (part) {
205 case BackButtonStartPart: 206 case BackButtonStartPart:
206 case ForwardButtonStartPart: 207 case ForwardButtonStartPart:
207 case BackButtonEndPart: 208 case BackButtonEndPart:
208 case ForwardButtonEndPart: 209 case ForwardButtonEndPart:
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 int RenderScrollbar::minimumThumbLength() 358 int RenderScrollbar::minimumThumbLength()
358 { 359 {
359 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); 360 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart);
360 if (!partRenderer) 361 if (!partRenderer)
361 return 0; 362 return 0;
362 partRenderer->layout(); 363 partRenderer->layout();
363 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe nderer->height(); 364 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe nderer->height();
364 } 365 }
365 366
366 } 367 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698