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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 | 1204 |
1205 unsigned Internals::scrollEventHandlerCount(Document* document) | 1205 unsigned Internals::scrollEventHandlerCount(Document* document) |
1206 { | 1206 { |
1207 ASSERT(document); | 1207 ASSERT(document); |
1208 return eventHandlerCount(*document, EventHandlerRegistry::ScrollEvent); | 1208 return eventHandlerCount(*document, EventHandlerRegistry::ScrollEvent); |
1209 } | 1209 } |
1210 | 1210 |
1211 unsigned Internals::touchEventHandlerCount(Document* document) | 1211 unsigned Internals::touchEventHandlerCount(Document* document) |
1212 { | 1212 { |
1213 ASSERT(document); | 1213 ASSERT(document); |
1214 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); | 1214 return eventHandlerCount(*document, EventHandlerRegistry::TouchEvent); |
1215 if (!touchHandlers) | |
1216 return 0; | |
1217 | |
1218 unsigned count = 0; | |
1219 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) | |
1220 count += iter->value; | |
1221 return count; | |
1222 } | 1215 } |
1223 | 1216 |
1224 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType) | 1217 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType) |
1225 { | 1218 { |
1226 *layerOffset = IntSize(); | 1219 *layerOffset = IntSize(); |
1227 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot->
compositedLayerMapping()->mainGraphicsLayer()) { | 1220 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot->
compositedLayerMapping()->mainGraphicsLayer()) { |
1228 LayoutRect rect; | 1221 LayoutRect rect; |
1229 RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), re
ct); | 1222 RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), re
ct); |
1230 *layerOffset = IntSize(rect.x(), rect.y()); | 1223 *layerOffset = IntSize(rect.x(), rect.y()); |
1231 return searchRoot; | 1224 return searchRoot; |
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2277 | 2270 |
2278 StringBuilder markup; | 2271 StringBuilder markup; |
2279 Vector<Document::TransitionElementData>::iterator iter = elementData.begin()
; | 2272 Vector<Document::TransitionElementData>::iterator iter = elementData.begin()
; |
2280 for (; iter != elementData.end(); ++iter) | 2273 for (; iter != elementData.end(); ++iter) |
2281 markup.append(iter->markup); | 2274 markup.append(iter->markup); |
2282 | 2275 |
2283 return markup.toString(); | 2276 return markup.toString(); |
2284 } | 2277 } |
2285 | 2278 |
2286 } // namespace blink | 2279 } // namespace blink |
OLD | NEW |