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

Unified Diff: Source/core/testing/Internals.cpp

Issue 898783003: Move rendering/RenderLayer* to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGFilterElement.cpp ('k') | Source/devtools/Inspector-1.1.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index ee8dd6bc0606838698ee53d8df29afeb99a22a2b..8cf251169ef0a334bf7a3dd68fe0c85e63d21c14 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -102,9 +102,10 @@
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InspectorOverlay.h"
#include "core/inspector/InstrumentingAgents.h"
+#include "core/layout/Layer.h"
#include "core/layout/LayoutTreeAsText.h"
#include "core/layout/compositing/CompositedLayerMapping.h"
-#include "core/layout/compositing/RenderLayerCompositor.h"
+#include "core/layout/compositing/LayerCompositor.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/HistoryItem.h"
#include "core/page/Chrome.h"
@@ -116,7 +117,6 @@
#include "core/page/PrintContext.h"
#include "core/plugins/testing/DictionaryPluginPlaceholder.h"
#include "core/plugins/testing/DocumentFragmentPluginPlaceholder.h"
-#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderMenuList.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/RenderView.h"
@@ -1165,12 +1165,12 @@ unsigned Internals::touchEventHandlerCount(Document* document)
return eventHandlerCount(*document, EventHandlerRegistry::TouchEvent);
}
-static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, GraphicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType)
+static Layer* findLayerForGraphicsLayer(Layer* searchRoot, GraphicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType)
{
*layerOffset = IntSize();
if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot->compositedLayerMapping()->mainGraphicsLayer()) {
LayoutRect rect;
- RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), rect);
+ Layer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), rect);
*layerOffset = IntSize(rect.x(), rect.y());
return searchRoot;
}
@@ -1186,7 +1186,7 @@ static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
if (graphicsLayer == squashingLayer) {
*layerType ="squashing";
LayoutRect rect;
- RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), rect);
+ Layer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), rect);
*layerOffset = IntSize(rect.x(), rect.y());
return searchRoot;
}
@@ -1212,8 +1212,8 @@ static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
// Search right to left to increase the chances that we'll choose the top-most layers in a
// grouped mapping for squashing.
- for (RenderLayer* child = searchRoot->lastChild(); child; child = child->previousSibling()) {
- RenderLayer* foundLayer = findRenderLayerForGraphicsLayer(child, graphicsLayer, layerOffset, layerType);
+ for (Layer* child = searchRoot->lastChild(); child; child = child->previousSibling()) {
+ Layer* foundLayer = findLayerForGraphicsLayer(child, graphicsLayer, layerOffset, layerType);
if (foundLayer)
return foundLayer;
}
@@ -1266,14 +1266,14 @@ static void mergeRects(blink::WebVector<blink::WebRect>& rects)
}
}
-static void accumulateLayerRectList(RenderLayerCompositor* compositor, GraphicsLayer* graphicsLayer, LayerRectList* rects)
+static void accumulateLayerRectList(LayerCompositor* compositor, GraphicsLayer* graphicsLayer, LayerRectList* rects)
{
blink::WebVector<blink::WebRect> layerRects = graphicsLayer->platformLayer()->touchEventHandlerRegion();
if (!layerRects.isEmpty()) {
mergeRects(layerRects);
String layerType;
IntSize layerOffset;
- RenderLayer* renderLayer = findRenderLayerForGraphicsLayer(compositor->rootRenderLayer(), graphicsLayer, &layerOffset, &layerType);
+ Layer* renderLayer = findLayerForGraphicsLayer(compositor->rootLayer(), graphicsLayer, &layerOffset, &layerType);
Node* node = renderLayer ? renderLayer->renderer()->node() : 0;
for (size_t i = 0; i < layerRects.size(); ++i) {
if (!layerRects[i].isEmpty()) {
@@ -1302,7 +1302,7 @@ LayerRectList* Internals::touchEventTargetLayerRects(Document* document, Excepti
return nullptr;
if (RenderView* view = document->renderView()) {
- if (RenderLayerCompositor* compositor = view->compositor()) {
+ if (LayerCompositor* compositor = view->compositor()) {
if (GraphicsLayer* rootLayer = compositor->rootGraphicsLayer()) {
LayerRectList* rects = LayerRectList::create();
accumulateLayerRectList(compositor, rootLayer, rects);
@@ -1554,8 +1554,8 @@ bool Internals::scrollsWithRespectTo(Element* element1, Element* element2, Excep
return 0;
}
- RenderLayer* layer1 = toRenderBox(renderer1)->layer();
- RenderLayer* layer2 = toRenderBox(renderer2)->layer();
+ Layer* layer1 = toRenderBox(renderer1)->layer();
+ Layer* layer2 = toRenderBox(renderer2)->layer();
if (!layer1 || !layer2) {
exceptionState.throwDOMException(InvalidAccessError, String::format("No render layer can be obtained from the %s provided element.", layer1 ? "second" : "first"));
return 0;
@@ -1588,7 +1588,7 @@ String Internals::elementLayerTreeAsText(Element* element, unsigned flags, Excep
return String();
}
- RenderLayer* layer = toRenderBox(renderer)->layer();
+ Layer* layer = toRenderBox(renderer)->layer();
if (!layer
|| !layer->hasCompositedLayerMapping()
|| !layer->compositedLayerMapping()->mainGraphicsLayer()) {
« no previous file with comments | « Source/core/svg/SVGFilterElement.cpp ('k') | Source/devtools/Inspector-1.1.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698