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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp

Issue 1765933003: style: Rename the PseudoId enum values to CamelCase and prefix them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enum-clash-PseudoId: none Created 4 years, 9 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
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 205 }
206 } 206 }
207 207
208 static PseudoId pseudoForScrollbarPart(ScrollbarPart part) 208 static PseudoId pseudoForScrollbarPart(ScrollbarPart part)
209 { 209 {
210 switch (part) { 210 switch (part) {
211 case BackButtonStartPart: 211 case BackButtonStartPart:
212 case ForwardButtonStartPart: 212 case ForwardButtonStartPart:
213 case BackButtonEndPart: 213 case BackButtonEndPart:
214 case ForwardButtonEndPart: 214 case ForwardButtonEndPart:
215 return SCROLLBAR_BUTTON; 215 return PseudoIdScrollbarButton;
216 case BackTrackPart: 216 case BackTrackPart:
217 case ForwardTrackPart: 217 case ForwardTrackPart:
218 return SCROLLBAR_TRACK_PIECE; 218 return PseudoIdScrollbarTrackPiece;
219 case ThumbPart: 219 case ThumbPart:
220 return SCROLLBAR_THUMB; 220 return PseudoIdScrollbarThumb;
221 case TrackBGPart: 221 case TrackBGPart:
222 return SCROLLBAR_TRACK; 222 return PseudoIdScrollbarTrack;
223 case ScrollbarBGPart: 223 case ScrollbarBGPart:
224 return SCROLLBAR; 224 return PseudoIdScrollbar;
225 case NoPart: 225 case NoPart:
226 case AllParts: 226 case AllParts:
227 break; 227 break;
228 } 228 }
229 ASSERT_NOT_REACHED(); 229 ASSERT_NOT_REACHED();
230 return SCROLLBAR; 230 return PseudoIdScrollbar;
231 } 231 }
232 232
233 void LayoutScrollbar::updateScrollbarPart(ScrollbarPart partType, bool destroy) 233 void LayoutScrollbar::updateScrollbarPart(ScrollbarPart partType, bool destroy)
234 { 234 {
235 if (partType == NoPart) 235 if (partType == NoPart)
236 return; 236 return;
237 237
238 RefPtr<ComputedStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partTyp e, pseudoForScrollbarPart(partType)) : PassRefPtr<ComputedStyle>(nullptr); 238 RefPtr<ComputedStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partTyp e, pseudoForScrollbarPart(partType)) : PassRefPtr<ComputedStyle>(nullptr);
239 239
240 bool needLayoutObject = !destroy && partStyle && partStyle->display() != NON E; 240 bool needLayoutObject = !destroy && partStyle && partStyle->display() != NON E;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 return orientation() == HorizontalScrollbar ? partLayoutObject->size().width () : partLayoutObject->size().height(); 361 return orientation() == HorizontalScrollbar ? partLayoutObject->size().width () : partLayoutObject->size().height();
362 } 362 }
363 363
364 void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts(const LayoutB oxModelObject& paintInvalidationContainer) 364 void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts(const LayoutB oxModelObject& paintInvalidationContainer)
365 { 365 {
366 for (auto& part : m_parts) 366 for (auto& part : m_parts)
367 part.value->invalidateDisplayItemClientsIncludingNonCompositingDescendan ts(&paintInvalidationContainer, PaintInvalidationScroll); 367 part.value->invalidateDisplayItemClientsIncludingNonCompositingDescendan ts(&paintInvalidationContainer, PaintInvalidationScroll);
368 } 368 }
369 369
370 } // namespace blink 370 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698