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

Side by Side Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 383603002: Update scrollbar layer opacity when scrollbar theme changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update test expectations Created 6 years, 5 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/TestExpectations ('k') | Source/platform/graphics/GraphicsLayer.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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 webScrollbarLayer = createSolidColorScrollbarLayer(orientation, scrollbar->theme()->thumbThickness(scrollbar), scrollbar->theme()->trackPosition (scrollbar), scrollableArea->shouldPlaceVerticalScrollbarOnLeft()); 339 webScrollbarLayer = createSolidColorScrollbarLayer(orientation, scrollbar->theme()->thumbThickness(scrollbar), scrollbar->theme()->trackPosition (scrollbar), scrollableArea->shouldPlaceVerticalScrollbarOnLeft());
340 } else { 340 } else {
341 webScrollbarLayer = createScrollbarLayer(scrollbar); 341 webScrollbarLayer = createScrollbarLayer(scrollbar);
342 } 342 }
343 scrollbarLayer = addWebScrollbarLayer(scrollableArea, orientation, w ebScrollbarLayer.release()); 343 scrollbarLayer = addWebScrollbarLayer(scrollableArea, orientation, w ebScrollbarLayer.release());
344 } 344 }
345 345
346 // Root layer non-overlay scrollbars should be marked opaque to disable 346 // Root layer non-overlay scrollbars should be marked opaque to disable
347 // blending. 347 // blending.
348 bool isOpaqueScrollbar = !scrollbar->isOverlayScrollbar(); 348 bool isOpaqueScrollbar = !scrollbar->isOverlayScrollbar();
349 if (!scrollbarGraphicsLayer->contentsOpaque()) 349 scrollbarGraphicsLayer->setContentsOpaque(isMainFrame && isOpaqueScrollb ar);
350 scrollbarGraphicsLayer->setContentsOpaque(isMainFrame && isOpaqueScr ollbar);
351 scrollbarLayer->layer()->setOpaque(scrollbarGraphicsLayer->contentsOpaqu e());
352 350
353 WebLayer* scrollLayer = toWebLayer(scrollableArea->layerForScrolling()); 351 WebLayer* scrollLayer = toWebLayer(scrollableArea->layerForScrolling());
354 WebLayer* containerLayer = toWebLayer(scrollableArea->layerForContainer( )); 352 WebLayer* containerLayer = toWebLayer(scrollableArea->layerForContainer( ));
355 setupScrollbarLayer(scrollbarGraphicsLayer, scrollbarLayer, scrollLayer, containerLayer); 353 setupScrollbarLayer(scrollbarGraphicsLayer, scrollbarLayer, scrollLayer, containerLayer);
356 } else 354 } else
357 removeWebScrollbarLayer(scrollableArea, orientation); 355 removeWebScrollbarLayer(scrollableArea, orientation);
358 } 356 }
359 357
360 bool ScrollingCoordinator::scrollableAreaScrollLayerDidChange(ScrollableArea* sc rollableArea) 358 bool ScrollingCoordinator::scrollableAreaScrollLayerDidChange(ScrollableArea* sc rollableArea)
361 { 359 {
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 bool frameIsScrollable = frameView && frameView->isScrollable(); 959 bool frameIsScrollable = frameView && frameView->isScrollable();
962 if (frameIsScrollable != m_wasFrameScrollable) 960 if (frameIsScrollable != m_wasFrameScrollable)
963 return true; 961 return true;
964 962
965 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0) 963 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0)
966 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( ); 964 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( );
967 return false; 965 return false;
968 } 966 }
969 967
970 } // namespace WebCore 968 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/platform/graphics/GraphicsLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698