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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderRubyRun.cpp ('k') | Source/core/rendering/RenderTable.cpp » ('j') | 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 needRenderer = (buttonsPlacement == ScrollbarButtonsSingle || bu ttonsPlacement == ScrollbarButtonsDoubleEnd || 245 needRenderer = (buttonsPlacement == ScrollbarButtonsSingle || bu ttonsPlacement == ScrollbarButtonsDoubleEnd ||
246 buttonsPlacement == ScrollbarButtonsDoubleBoth); 246 buttonsPlacement == ScrollbarButtonsDoubleBoth);
247 break; 247 break;
248 default: 248 default:
249 break; 249 break;
250 } 250 }
251 } 251 }
252 252
253 RenderScrollbarPart* partRenderer = m_parts.get(partType); 253 RenderScrollbarPart* partRenderer = m_parts.get(partType);
254 if (!partRenderer && needRenderer) { 254 if (!partRenderer && needRenderer) {
255 partRenderer = RenderScrollbarPart::createAnonymous(owningRenderer()->do cument(), this, partType); 255 partRenderer = RenderScrollbarPart::createAnonymous(&owningRenderer()->d ocument(), this, partType);
256 m_parts.set(partType, partRenderer); 256 m_parts.set(partType, partRenderer);
257 } else if (partRenderer && !needRenderer) { 257 } else if (partRenderer && !needRenderer) {
258 m_parts.remove(partType); 258 m_parts.remove(partType);
259 partRenderer->destroy(); 259 partRenderer->destroy();
260 partRenderer = 0; 260 partRenderer = 0;
261 } 261 }
262 262
263 if (partRenderer) 263 if (partRenderer)
264 partRenderer->setStyle(partStyle.release()); 264 partRenderer->setStyle(partStyle.release());
265 } 265 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 int RenderScrollbar::minimumThumbLength() 350 int RenderScrollbar::minimumThumbLength()
351 { 351 {
352 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); 352 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart);
353 if (!partRenderer) 353 if (!partRenderer)
354 return 0; 354 return 0;
355 partRenderer->layout(); 355 partRenderer->layout();
356 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe nderer->height(); 356 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe nderer->height();
357 } 357 }
358 358
359 } 359 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderRubyRun.cpp ('k') | Source/core/rendering/RenderTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698