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

Side by Side Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 303253004: Allow proper highlighting on universal overflow scroll. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 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 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 void CompositedLayerMapping::updateDrawsContent() 1054 void CompositedLayerMapping::updateDrawsContent()
1055 { 1055 {
1056 if (m_scrollingLayer) { 1056 if (m_scrollingLayer) {
1057 // We don't have to consider overflow controls, because we know that the scrollbars are drawn elsewhere. 1057 // We don't have to consider overflow controls, because we know that the scrollbars are drawn elsewhere.
1058 // m_graphicsLayer only needs backing store if the non-scrolling parts ( background, outlines, borders, shadows etc) need to paint. 1058 // m_graphicsLayer only needs backing store if the non-scrolling parts ( background, outlines, borders, shadows etc) need to paint.
1059 // m_scrollingLayer never has backing store. 1059 // m_scrollingLayer never has backing store.
1060 // m_scrollingContentsLayer only needs backing store if the scrolled con tents need to paint. 1060 // m_scrollingContentsLayer only needs backing store if the scrolled con tents need to paint.
1061 bool hasNonScrollingPaintedContent = m_owningLayer.hasVisibleContent() & & m_owningLayer.hasBoxDecorationsOrBackground(); 1061 bool hasNonScrollingPaintedContent = m_owningLayer.hasVisibleContent() & & m_owningLayer.hasBoxDecorationsOrBackground();
1062 m_graphicsLayer->setDrawsContent(hasNonScrollingPaintedContent); 1062 m_graphicsLayer->setDrawsContent(hasNonScrollingPaintedContent);
1063 1063
1064 bool hasScrollingPaintedContent = m_owningLayer.hasVisibleContent() && ( renderer()->hasBackground() || paintsChildren()); 1064 m_scrollingContentsLayer->setDrawsContent(true);
Ian Vollick 2014/05/31 01:17:36 This might be the only reasonable way to do this,
hartmanng 2014/06/02 20:23:58 Done. However, in my patch I do setContentsRect(In
1065 m_scrollingContentsLayer->setDrawsContent(hasScrollingPaintedContent);
1066 return; 1065 return;
1067 } 1066 }
1068 1067
1069 bool hasPaintedContent = containsPaintedContent(); 1068 bool hasPaintedContent = containsPaintedContent();
1070 if (hasPaintedContent && isAcceleratedCanvas(renderer())) { 1069 if (hasPaintedContent && isAcceleratedCanvas(renderer())) {
1071 CanvasRenderingContext* context = toHTMLCanvasElement(renderer()->node() )->renderingContext(); 1070 CanvasRenderingContext* context = toHTMLCanvasElement(renderer()->node() )->renderingContext();
1072 // Content layer may be null if context is lost. 1071 // Content layer may be null if context is lost.
1073 if (blink::WebLayer* contentLayer = context->platformLayer()) { 1072 if (blink::WebLayer* contentLayer = context->platformLayer()) {
1074 Color bgColor(Color::transparent); 1073 Color bgColor(Color::transparent);
1075 if (contentLayerSupportsDirectBackgroundComposition(renderer())) { 1074 if (contentLayerSupportsDirectBackgroundComposition(renderer())) {
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2246 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2245 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2247 name = "Scrolling Contents Layer"; 2246 name = "Scrolling Contents Layer";
2248 } else { 2247 } else {
2249 ASSERT_NOT_REACHED(); 2248 ASSERT_NOT_REACHED();
2250 } 2249 }
2251 2250
2252 return name; 2251 return name;
2253 } 2252 }
2254 2253
2255 } // namespace WebCore 2254 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698