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

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

Issue 59063003: Don't coerce pointers to compositor layer mappings to booleans. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaaaase Created 7 years, 1 month 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) 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 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 return 0; 1250 return 0;
1251 1251
1252 unsigned count = 0; 1252 unsigned count = 0;
1253 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter != touchHandlers->end(); ++iter) 1253 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter != touchHandlers->end(); ++iter)
1254 count += iter->value; 1254 count += iter->value;
1255 return count; 1255 return count;
1256 } 1256 }
1257 1257
1258 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra phicsLayer* graphicsLayer, String* layerType) 1258 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra phicsLayer* graphicsLayer, String* layerType)
1259 { 1259 {
1260 if (searchRoot->compositedLayerMapping() && graphicsLayer == searchRoot->com positedLayerMapping()->mainGraphicsLayer()) 1260 if (searchRoot->compositingState() == PaintsIntoOwnBacking && graphicsLayer == searchRoot->compositedLayerMapping()->mainGraphicsLayer())
1261 return searchRoot; 1261 return searchRoot;
1262 1262
1263 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot ->scrollableArea()->layerForScrolling() : 0; 1263 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot ->scrollableArea()->layerForScrolling() : 0;
1264 if (graphicsLayer == layerForScrolling) { 1264 if (graphicsLayer == layerForScrolling) {
1265 *layerType = "scrolling"; 1265 *layerType = "scrolling";
1266 return searchRoot; 1266 return searchRoot;
1267 } 1267 }
1268 1268
1269 GraphicsLayer* layerForHorizontalScrollbar = searchRoot->scrollableArea() ? searchRoot->scrollableArea()->layerForHorizontalScrollbar() : 0; 1269 GraphicsLayer* layerForHorizontalScrollbar = searchRoot->scrollableArea() ? searchRoot->scrollableArea()->layerForHorizontalScrollbar() : 0;
1270 if (graphicsLayer == layerForHorizontalScrollbar) { 1270 if (graphicsLayer == layerForHorizontalScrollbar) {
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 element->document().updateLayout(); 1733 element->document().updateLayout();
1734 1734
1735 RenderObject* renderer = element->renderer(); 1735 RenderObject* renderer = element->renderer();
1736 if (!renderer || !renderer->isBox()) { 1736 if (!renderer || !renderer->isBox()) {
1737 es.throwUninformativeAndGenericDOMException(InvalidAccessError); 1737 es.throwUninformativeAndGenericDOMException(InvalidAccessError);
1738 return String(); 1738 return String();
1739 } 1739 }
1740 1740
1741 RenderLayer* layer = toRenderBox(renderer)->layer(); 1741 RenderLayer* layer = toRenderBox(renderer)->layer();
1742 if (!layer 1742 if (!layer
1743 || !layer->compositedLayerMapping() 1743 || layer->compositingState() == NotComposited
1744 || !layer->compositedLayerMapping()->mainGraphicsLayer()) { 1744 || !layer->compositedLayerMapping()->mainGraphicsLayer()) {
1745 // Don't raise exception in these cases which may be normally used in te sts. 1745 // Don't raise exception in these cases which may be normally used in te sts.
1746 return String(); 1746 return String();
1747 } 1747 }
1748 1748
1749 return layer->compositedLayerMapping()->mainGraphicsLayer()->layerTreeAsText (flags); 1749 return layer->compositedLayerMapping()->mainGraphicsLayer()->layerTreeAsText (flags);
1750 } 1750 }
1751 1751
1752 static RenderLayer* getRenderLayerForElement(Element* element, ExceptionState& e s) 1752 static RenderLayer* getRenderLayerForElement(Element* element, ExceptionState& e s)
1753 { 1753 {
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 } 2270 }
2271 2271
2272 document->updateLayout(); 2272 document->updateLayout();
2273 2273
2274 RenderView* view = document->renderView(); 2274 RenderView* view = document->renderView();
2275 if (view->compositor()) 2275 if (view->compositor())
2276 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe ferredWork); 2276 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe ferredWork);
2277 } 2277 }
2278 2278
2279 } 2279 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698