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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 #include "core/css/resolver/StyleResolver.h" | 49 #include "core/css/resolver/StyleResolver.h" |
50 #include "core/css/resolver/StyleResolverStats.h" | 50 #include "core/css/resolver/StyleResolverStats.h" |
51 #include "core/css/resolver/ViewportStyleResolver.h" | 51 #include "core/css/resolver/ViewportStyleResolver.h" |
52 #include "core/dom/ClientRect.h" | 52 #include "core/dom/ClientRect.h" |
53 #include "core/dom/ClientRectList.h" | 53 #include "core/dom/ClientRectList.h" |
54 #include "core/dom/DOMStringList.h" | 54 #include "core/dom/DOMStringList.h" |
55 #include "core/dom/Document.h" | 55 #include "core/dom/Document.h" |
56 #include "core/dom/DocumentMarker.h" | 56 #include "core/dom/DocumentMarker.h" |
57 #include "core/dom/DocumentMarkerController.h" | 57 #include "core/dom/DocumentMarkerController.h" |
58 #include "core/dom/Element.h" | 58 #include "core/dom/Element.h" |
59 #include "core/dom/EventHandlerRegistry.h" | |
60 #include "core/dom/ExceptionCode.h" | 59 #include "core/dom/ExceptionCode.h" |
61 #include "core/dom/FullscreenElementStack.h" | 60 #include "core/dom/FullscreenElementStack.h" |
62 #include "core/dom/NodeRenderStyle.h" | 61 #include "core/dom/NodeRenderStyle.h" |
63 #include "core/dom/PseudoElement.h" | 62 #include "core/dom/PseudoElement.h" |
64 #include "core/dom/Range.h" | 63 #include "core/dom/Range.h" |
65 #include "core/dom/StaticNodeList.h" | 64 #include "core/dom/StaticNodeList.h" |
66 #include "core/dom/TreeScope.h" | 65 #include "core/dom/TreeScope.h" |
67 #include "core/dom/ViewportDescription.h" | 66 #include "core/dom/ViewportDescription.h" |
68 #include "core/dom/WheelController.h" | 67 #include "core/dom/WheelController.h" |
69 #include "core/dom/shadow/ComposedTreeWalker.h" | 68 #include "core/dom/shadow/ComposedTreeWalker.h" |
(...skipping 28 matching lines...) Expand all Loading... | |
98 #include "core/inspector/InspectorCounters.h" | 97 #include "core/inspector/InspectorCounters.h" |
99 #include "core/inspector/InspectorFrontendChannel.h" | 98 #include "core/inspector/InspectorFrontendChannel.h" |
100 #include "core/inspector/InspectorInstrumentation.h" | 99 #include "core/inspector/InspectorInstrumentation.h" |
101 #include "core/inspector/InspectorOverlay.h" | 100 #include "core/inspector/InspectorOverlay.h" |
102 #include "core/inspector/InstrumentingAgents.h" | 101 #include "core/inspector/InstrumentingAgents.h" |
103 #include "core/loader/FrameLoader.h" | 102 #include "core/loader/FrameLoader.h" |
104 #include "core/loader/HistoryItem.h" | 103 #include "core/loader/HistoryItem.h" |
105 #include "core/page/Chrome.h" | 104 #include "core/page/Chrome.h" |
106 #include "core/page/ChromeClient.h" | 105 #include "core/page/ChromeClient.h" |
107 #include "core/page/EventHandler.h" | 106 #include "core/page/EventHandler.h" |
107 #include "core/page/EventHandlerRegistry.h" | |
108 #include "core/page/Page.h" | 108 #include "core/page/Page.h" |
109 #include "core/page/PagePopupController.h" | 109 #include "core/page/PagePopupController.h" |
110 #include "core/page/PrintContext.h" | 110 #include "core/page/PrintContext.h" |
111 #include "core/rendering/RenderLayer.h" | 111 #include "core/rendering/RenderLayer.h" |
112 #include "core/rendering/RenderMenuList.h" | 112 #include "core/rendering/RenderMenuList.h" |
113 #include "core/rendering/RenderObject.h" | 113 #include "core/rendering/RenderObject.h" |
114 #include "core/rendering/RenderTreeAsText.h" | 114 #include "core/rendering/RenderTreeAsText.h" |
115 #include "core/rendering/RenderView.h" | 115 #include "core/rendering/RenderView.h" |
116 #include "core/rendering/compositing/CompositedLayerMapping.h" | 116 #include "core/rendering/compositing/CompositedLayerMapping.h" |
117 #include "core/rendering/compositing/RenderLayerCompositor.h" | 117 #include "core/rendering/compositing/RenderLayerCompositor.h" |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1241 if (!document) { | 1241 if (!document) { |
1242 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available."); | 1242 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available."); |
1243 return 0; | 1243 return 0; |
1244 } | 1244 } |
1245 | 1245 |
1246 return document->activeDOMObjectCount(); | 1246 return document->activeDOMObjectCount(); |
1247 } | 1247 } |
1248 | 1248 |
1249 static unsigned eventHandlerCount(Document& document, EventHandlerRegistry::Even tHandlerClass handlerClass) | 1249 static unsigned eventHandlerCount(Document& document, EventHandlerRegistry::Even tHandlerClass handlerClass) |
1250 { | 1250 { |
1251 EventHandlerRegistry* registry = EventHandlerRegistry::from(document); | 1251 if (!document.page()) |
Rick Byers
2014/05/01 13:42:36
Good. This is also important to prevent noise fro
| |
1252 return 0; | |
1253 EventHandlerRegistry* registry = EventHandlerRegistry::from(*document.page() ); | |
1252 unsigned count = 0; | 1254 unsigned count = 0; |
1253 const EventTargetSet* targets = registry->eventHandlerTargets(handlerClass); | 1255 const EventTargetSet* targets = registry->eventHandlerTargets(handlerClass); |
1254 if (targets) { | 1256 if (targets) { |
1255 for (EventTargetSet::const_iterator iter = targets->begin(); iter != tar gets->end(); ++iter) | 1257 for (EventTargetSet::const_iterator iter = targets->begin(); iter != tar gets->end(); ++iter) |
1256 count += iter->value; | 1258 count += iter->value; |
1257 } | 1259 } |
1258 return count; | 1260 return count; |
1259 } | 1261 } |
1260 | 1262 |
1261 unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionState& e xceptionState) | 1263 unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionState& e xceptionState) |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2363 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength) | 2365 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength) |
2364 { | 2366 { |
2365 if (!node) | 2367 if (!node) |
2366 return String(); | 2368 return String(); |
2367 blink::WebPoint point(x, y); | 2369 blink::WebPoint point(x, y); |
2368 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength); | 2370 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength); |
2369 return surroundingText.content(); | 2371 return surroundingText.content(); |
2370 } | 2372 } |
2371 | 2373 |
2372 } | 2374 } |
OLD | NEW |