| OLD | NEW |
| 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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 return 0; | 1293 return 0; |
| 1294 | 1294 |
| 1295 unsigned count = 0; | 1295 unsigned count = 0; |
| 1296 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) | 1296 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) |
| 1297 count += iter->value; | 1297 count += iter->value; |
| 1298 return count; | 1298 return count; |
| 1299 } | 1299 } |
| 1300 | 1300 |
| 1301 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
phicsLayer* graphicsLayer, String* layerType) | 1301 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
phicsLayer* graphicsLayer, String* layerType) |
| 1302 { | 1302 { |
| 1303 if (searchRoot->compositedLayerMapping() && graphicsLayer == searchRoot->com
positedLayerMapping()->mainGraphicsLayer()) | 1303 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot->
compositedLayerMapping()->mainGraphicsLayer()) |
| 1304 return searchRoot; | 1304 return searchRoot; |
| 1305 | 1305 |
| 1306 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot
->scrollableArea()->layerForScrolling() : 0; | 1306 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot
->scrollableArea()->layerForScrolling() : 0; |
| 1307 if (graphicsLayer == layerForScrolling) { | 1307 if (graphicsLayer == layerForScrolling) { |
| 1308 *layerType = "scrolling"; | 1308 *layerType = "scrolling"; |
| 1309 return searchRoot; | 1309 return searchRoot; |
| 1310 } | 1310 } |
| 1311 | 1311 |
| 1312 GraphicsLayer* layerForHorizontalScrollbar = searchRoot->scrollableArea() ?
searchRoot->scrollableArea()->layerForHorizontalScrollbar() : 0; | 1312 GraphicsLayer* layerForHorizontalScrollbar = searchRoot->scrollableArea() ?
searchRoot->scrollableArea()->layerForHorizontalScrollbar() : 0; |
| 1313 if (graphicsLayer == layerForHorizontalScrollbar) { | 1313 if (graphicsLayer == layerForHorizontalScrollbar) { |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1776 element->document().updateLayout(); | 1776 element->document().updateLayout(); |
| 1777 | 1777 |
| 1778 RenderObject* renderer = element->renderer(); | 1778 RenderObject* renderer = element->renderer(); |
| 1779 if (!renderer || !renderer->isBox()) { | 1779 if (!renderer || !renderer->isBox()) { |
| 1780 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 1780 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
| 1781 return String(); | 1781 return String(); |
| 1782 } | 1782 } |
| 1783 | 1783 |
| 1784 RenderLayer* layer = toRenderBox(renderer)->layer(); | 1784 RenderLayer* layer = toRenderBox(renderer)->layer(); |
| 1785 if (!layer | 1785 if (!layer |
| 1786 || !layer->compositedLayerMapping() | 1786 || !layer->hasCompositedLayerMapping() |
| 1787 || !layer->compositedLayerMapping()->mainGraphicsLayer()) { | 1787 || !layer->compositedLayerMapping()->mainGraphicsLayer()) { |
| 1788 // Don't raise exception in these cases which may be normally used in te
sts. | 1788 // Don't raise exception in these cases which may be normally used in te
sts. |
| 1789 return String(); | 1789 return String(); |
| 1790 } | 1790 } |
| 1791 | 1791 |
| 1792 return layer->compositedLayerMapping()->mainGraphicsLayer()->layerTreeAsText
(flags); | 1792 return layer->compositedLayerMapping()->mainGraphicsLayer()->layerTreeAsText
(flags); |
| 1793 } | 1793 } |
| 1794 | 1794 |
| 1795 static RenderLayer* getRenderLayerForElement(Element* element, ExceptionState& e
s) | 1795 static RenderLayer* getRenderLayerForElement(Element* element, ExceptionState& e
s) |
| 1796 { | 1796 { |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 } | 2291 } |
| 2292 | 2292 |
| 2293 document->updateLayout(); | 2293 document->updateLayout(); |
| 2294 | 2294 |
| 2295 RenderView* view = document->renderView(); | 2295 RenderView* view = document->renderView(); |
| 2296 if (view->compositor()) | 2296 if (view->compositor()) |
| 2297 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); | 2297 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); |
| 2298 } | 2298 } |
| 2299 | 2299 |
| 2300 } | 2300 } |
| OLD | NEW |