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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 250193002: Offset rects by origin when projecting from composited to graphics layer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test expectations Created 6 years, 8 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
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 1303
1304 unsigned count = 0; 1304 unsigned count = 0;
1305 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter != touchHandlers->end(); ++iter) 1305 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter != touchHandlers->end(); ++iter)
1306 count += iter->value; 1306 count += iter->value;
1307 return count; 1307 return count;
1308 } 1308 }
1309 1309
1310 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType) 1310 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType)
1311 { 1311 {
1312 *layerOffset = IntSize(); 1312 *layerOffset = IntSize();
1313 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot-> compositedLayerMapping()->mainGraphicsLayer()) 1313 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot-> compositedLayerMapping()->mainGraphicsLayer()) {
1314 CompositedLayerMappingPtr compositedLayerMapping = searchRoot->composite dLayerMapping();
1315 LayoutSize offset = compositedLayerMapping->contentOffsetInCompositingLa yer();
1316 *layerOffset = IntSize(offset.width(), offset.height());
1314 return searchRoot; 1317 return searchRoot;
1318 }
1315 1319
1316 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot ->scrollableArea()->layerForScrolling() : 0; 1320 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot ->scrollableArea()->layerForScrolling() : 0;
1317 if (graphicsLayer == layerForScrolling) { 1321 if (graphicsLayer == layerForScrolling) {
1318 *layerType = "scrolling"; 1322 *layerType = "scrolling";
1319 return searchRoot; 1323 return searchRoot;
1320 } 1324 }
1321 1325
1322 if (searchRoot->compositingState() == PaintsIntoGroupedBacking) { 1326 if (searchRoot->compositingState() == PaintsIntoGroupedBacking) {
1323 GraphicsLayer* squashingLayer = searchRoot->groupedMapping()->squashingL ayer(); 1327 GraphicsLayer* squashingLayer = searchRoot->groupedMapping()->squashingL ayer();
1324 if (graphicsLayer == squashingLayer) { 1328 if (graphicsLayer == squashingLayer) {
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
2371 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength) 2375 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength)
2372 { 2376 {
2373 if (!node) 2377 if (!node)
2374 return String(); 2378 return String();
2375 blink::WebPoint point(x, y); 2379 blink::WebPoint point(x, y);
2376 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength); 2380 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength);
2377 return surroundingText.content(); 2381 return surroundingText.content();
2378 } 2382 }
2379 2383
2380 } 2384 }
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698