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

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

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Comment Created 4 years, 2 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 return PseudoIdScrollbar; 231 return PseudoIdScrollbar;
232 } 232 }
233 233
234 void LayoutScrollbar::updateScrollbarPart(ScrollbarPart partType, bool destroy) 234 void LayoutScrollbar::updateScrollbarPart(ScrollbarPart partType, bool destroy)
235 { 235 {
236 if (partType == NoPart) 236 if (partType == NoPart)
237 return; 237 return;
238 238
239 RefPtr<ComputedStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partTyp e, pseudoForScrollbarPart(partType)) : PassRefPtr<ComputedStyle>(nullptr); 239 RefPtr<ComputedStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partTyp e, pseudoForScrollbarPart(partType)) : PassRefPtr<ComputedStyle>(nullptr);
240 240
241 bool needLayoutObject = !destroy && partStyle && partStyle->display() != NON E; 241 bool needLayoutObject = !destroy && partStyle && partStyle->display() != EDi splay::None;
242 242
243 if (needLayoutObject && partStyle->display() != BLOCK) { 243 if (needLayoutObject && partStyle->display() != EDisplay::Block) {
244 // See if we are a button that should not be visible according to OS set tings. 244 // See if we are a button that should not be visible according to OS set tings.
245 WebScrollbarButtonsPlacement buttonsPlacement = theme().buttonsPlacement (); 245 WebScrollbarButtonsPlacement buttonsPlacement = theme().buttonsPlacement ();
246 switch (partType) { 246 switch (partType) {
247 case BackButtonStartPart: 247 case BackButtonStartPart:
248 needLayoutObject = (buttonsPlacement == WebScrollbarButtonsPlacement Single || buttonsPlacement == WebScrollbarButtonsPlacementDoubleStart 248 needLayoutObject = (buttonsPlacement == WebScrollbarButtonsPlacement Single || buttonsPlacement == WebScrollbarButtonsPlacementDoubleStart
249 || buttonsPlacement == WebScrollbarButtonsPlacementDoubleBoth); 249 || buttonsPlacement == WebScrollbarButtonsPlacementDoubleBoth);
250 break; 250 break;
251 case ForwardButtonStartPart: 251 case ForwardButtonStartPart:
252 needLayoutObject = (buttonsPlacement == WebScrollbarButtonsPlacement DoubleStart || buttonsPlacement == WebScrollbarButtonsPlacementDoubleBoth); 252 needLayoutObject = (buttonsPlacement == WebScrollbarButtonsPlacement DoubleStart || buttonsPlacement == WebScrollbarButtonsPlacementDoubleBoth);
253 break; 253 break;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 return (orientation() == HorizontalScrollbar ? partLayoutObject->size().widt h() : partLayoutObject->size().height()).toInt(); 362 return (orientation() == HorizontalScrollbar ? partLayoutObject->size().widt h() : partLayoutObject->size().height()).toInt();
363 } 363 }
364 364
365 void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts() 365 void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts()
366 { 366 {
367 for (auto& part : m_parts) 367 for (auto& part : m_parts)
368 ObjectPaintInvalidator(*part.value).invalidateDisplayItemClientsIncludin gNonCompositingDescendants(PaintInvalidationScroll); 368 ObjectPaintInvalidator(*part.value).invalidateDisplayItemClientsIncludin gNonCompositingDescendants(PaintInvalidationScroll);
369 } 369 }
370 370
371 } // namespace blink 371 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutRubyRun.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698