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

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

Issue 776943003: Factor painting code from RenderLayerScrollableArea into ScrollableAreaPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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
« no previous file with comments | « Source/core/rendering/RenderLayerScrollableArea.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) 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 24 matching lines...) Expand all
35 #include "core/html/HTMLMediaElement.h" 35 #include "core/html/HTMLMediaElement.h"
36 #include "core/html/HTMLVideoElement.h" 36 #include "core/html/HTMLVideoElement.h"
37 #include "core/html/canvas/CanvasRenderingContext.h" 37 #include "core/html/canvas/CanvasRenderingContext.h"
38 #include "core/inspector/InspectorInstrumentation.h" 38 #include "core/inspector/InspectorInstrumentation.h"
39 #include "core/inspector/InspectorNodeIds.h" 39 #include "core/inspector/InspectorNodeIds.h"
40 #include "core/page/Chrome.h" 40 #include "core/page/Chrome.h"
41 #include "core/page/ChromeClient.h" 41 #include "core/page/ChromeClient.h"
42 #include "core/page/Page.h" 42 #include "core/page/Page.h"
43 #include "core/page/scrolling/ScrollingCoordinator.h" 43 #include "core/page/scrolling/ScrollingCoordinator.h"
44 #include "core/paint/LayerPainter.h" 44 #include "core/paint/LayerPainter.h"
45 #include "core/paint/ScrollableAreaPainter.h"
45 #include "core/plugins/PluginView.h" 46 #include "core/plugins/PluginView.h"
46 #include "core/rendering/FilterEffectRenderer.h" 47 #include "core/rendering/FilterEffectRenderer.h"
47 #include "core/rendering/RenderEmbeddedObject.h" 48 #include "core/rendering/RenderEmbeddedObject.h"
48 #include "core/rendering/RenderImage.h" 49 #include "core/rendering/RenderImage.h"
49 #include "core/rendering/RenderLayerStackingNodeIterator.h" 50 #include "core/rendering/RenderLayerStackingNodeIterator.h"
50 #include "core/rendering/RenderPart.h" 51 #include "core/rendering/RenderPart.h"
51 #include "core/rendering/RenderVideo.h" 52 #include "core/rendering/RenderVideo.h"
52 #include "core/rendering/RenderView.h" 53 #include "core/rendering/RenderView.h"
53 #include "core/rendering/compositing/RenderLayerCompositor.h" 54 #include "core/rendering/compositing/RenderLayerCompositor.h"
54 #include "core/rendering/style/KeyframeList.h" 55 #include "core/rendering/style/KeyframeList.h"
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 } else if (graphicsLayer == layerForHorizontalScrollbar()) { 2178 } else if (graphicsLayer == layerForHorizontalScrollbar()) {
2178 paintScrollbar(m_owningLayer.scrollableArea()->horizontalScrollbar(), co ntext, clip); 2179 paintScrollbar(m_owningLayer.scrollableArea()->horizontalScrollbar(), co ntext, clip);
2179 } else if (graphicsLayer == layerForVerticalScrollbar()) { 2180 } else if (graphicsLayer == layerForVerticalScrollbar()) {
2180 paintScrollbar(m_owningLayer.scrollableArea()->verticalScrollbar(), cont ext, clip); 2181 paintScrollbar(m_owningLayer.scrollableArea()->verticalScrollbar(), cont ext, clip);
2181 } else if (graphicsLayer == layerForScrollCorner()) { 2182 } else if (graphicsLayer == layerForScrollCorner()) {
2182 const IntRect& scrollCornerAndResizer = m_owningLayer.scrollableArea()-> scrollCornerAndResizerRect(); 2183 const IntRect& scrollCornerAndResizer = m_owningLayer.scrollableArea()-> scrollCornerAndResizerRect();
2183 context.save(); 2184 context.save();
2184 context.translate(-scrollCornerAndResizer.x(), -scrollCornerAndResizer.y ()); 2185 context.translate(-scrollCornerAndResizer.x(), -scrollCornerAndResizer.y ());
2185 IntRect transformedClip = clip; 2186 IntRect transformedClip = clip;
2186 transformedClip.moveBy(scrollCornerAndResizer.location()); 2187 transformedClip.moveBy(scrollCornerAndResizer.location());
2187 m_owningLayer.scrollableArea()->paintScrollCorner(&context, IntPoint(), transformedClip); 2188 ScrollableAreaPainter(*m_owningLayer.scrollableArea()).paintScrollCorner (&context, IntPoint(), transformedClip);
2188 m_owningLayer.scrollableArea()->paintResizer(&context, IntPoint(), trans formedClip); 2189 ScrollableAreaPainter(*m_owningLayer.scrollableArea()).paintResizer(&con text, IntPoint(), transformedClip);
2189 context.restore(); 2190 context.restore();
2190 } 2191 }
2191 InspectorInstrumentation::didPaint(m_owningLayer.renderer(), graphicsLayer, &context, clip); 2192 InspectorInstrumentation::didPaint(m_owningLayer.renderer(), graphicsLayer, &context, clip);
2192 #if ENABLE(ASSERT) 2193 #if ENABLE(ASSERT)
2193 if (Page* page = renderer()->frame()->page()) 2194 if (Page* page = renderer()->frame()->page())
2194 page->setIsPainting(false); 2195 page->setIsPainting(false);
2195 #endif 2196 #endif
2196 } 2197 }
2197 2198
2198 bool CompositedLayerMapping::isTrackingPaintInvalidations() const 2199 bool CompositedLayerMapping::isTrackingPaintInvalidations() const
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2314 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2314 name = "Scrolling Block Selection Layer"; 2315 name = "Scrolling Block Selection Layer";
2315 } else { 2316 } else {
2316 ASSERT_NOT_REACHED(); 2317 ASSERT_NOT_REACHED();
2317 } 2318 }
2318 2319
2319 return name; 2320 return name;
2320 } 2321 }
2321 2322
2322 } // namespace blink 2323 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerScrollableArea.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698