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

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

Issue 503583002: Fixed Inconsistent behaviour of custom-scrollbar (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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 { 116 {
117 Scrollbar::setParent(parent); 117 Scrollbar::setParent(parent);
118 if (!parent) { 118 if (!parent) {
119 // Destroy all of the scrollbar's RenderBoxes. 119 // Destroy all of the scrollbar's RenderBoxes.
120 updateScrollbarParts(true); 120 updateScrollbarParts(true);
121 } 121 }
122 } 122 }
123 123
124 void RenderScrollbar::setEnabled(bool e) 124 void RenderScrollbar::setEnabled(bool e)
125 { 125 {
126 bool wasEnabled = enabled();
127 Scrollbar::setEnabled(e); 126 Scrollbar::setEnabled(e);
128 if (wasEnabled != e) 127 updateScrollbarParts();
129 updateScrollbarParts();
130 } 128 }
131 129
132 void RenderScrollbar::styleChanged() 130 void RenderScrollbar::styleChanged()
133 { 131 {
134 updateScrollbarParts(); 132 updateScrollbarParts();
135 } 133 }
136 134
137 void RenderScrollbar::setHoveredPart(ScrollbarPart part) 135 void RenderScrollbar::setHoveredPart(ScrollbarPart part)
138 { 136 {
139 if (part == m_hoveredPart) 137 if (part == m_hoveredPart)
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 int RenderScrollbar::minimumThumbLength() 356 int RenderScrollbar::minimumThumbLength()
359 { 357 {
360 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); 358 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart);
361 if (!partRenderer) 359 if (!partRenderer)
362 return 0; 360 return 0;
363 partRenderer->layout(); 361 partRenderer->layout();
364 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe nderer->height(); 362 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe nderer->height();
365 } 363 }
366 364
367 } 365 }
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698