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

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

Issue 163383002: Scrollbar width is not applied when element hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to latest Created 6 years, 6 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 | « LayoutTests/fast/dom/Element/scroll-width-visible-expected.txt ('k') | 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return SCROLLBAR; 218 return SCROLLBAR;
219 } 219 }
220 220
221 void RenderScrollbar::updateScrollbarPart(ScrollbarPart partType, bool destroy) 221 void RenderScrollbar::updateScrollbarPart(ScrollbarPart partType, bool destroy)
222 { 222 {
223 if (partType == NoPart) 223 if (partType == NoPart)
224 return; 224 return;
225 225
226 RefPtr<RenderStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partType, pseudoForScrollbarPart(partType)) : PassRefPtr<RenderStyle>(nullptr); 226 RefPtr<RenderStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partType, pseudoForScrollbarPart(partType)) : PassRefPtr<RenderStyle>(nullptr);
227 227
228 bool needRenderer = !destroy && partStyle && partStyle->display() != NONE && partStyle->visibility() == VISIBLE; 228 bool needRenderer = !destroy && partStyle && partStyle->display() != NONE;
229 229
230 if (needRenderer && partStyle->display() != BLOCK) { 230 if (needRenderer && partStyle->display() != BLOCK) {
231 // See if we are a button that should not be visible according to OS set tings. 231 // See if we are a button that should not be visible according to OS set tings.
232 ScrollbarButtonsPlacement buttonsPlacement = theme()->buttonsPlacement() ; 232 ScrollbarButtonsPlacement buttonsPlacement = theme()->buttonsPlacement() ;
233 switch (partType) { 233 switch (partType) {
234 case BackButtonStartPart: 234 case BackButtonStartPart:
235 needRenderer = (buttonsPlacement == ScrollbarButtonsSingle || bu ttonsPlacement == ScrollbarButtonsDoubleStart || 235 needRenderer = (buttonsPlacement == ScrollbarButtonsSingle || bu ttonsPlacement == ScrollbarButtonsDoubleStart ||
236 buttonsPlacement == ScrollbarButtonsDoubleBoth); 236 buttonsPlacement == ScrollbarButtonsDoubleBoth);
237 break; 237 break;
238 case ForwardButtonStartPart: 238 case ForwardButtonStartPart:
(...skipping 111 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 | « LayoutTests/fast/dom/Element/scroll-width-visible-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698