OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #include "MallocStatistics.h" | 66 #include "MallocStatistics.h" |
67 #include "MockPagePopupDriver.h" | 67 #include "MockPagePopupDriver.h" |
68 #include "NodeRenderingContext.h" | 68 #include "NodeRenderingContext.h" |
69 #include "Page.h" | 69 #include "Page.h" |
70 #include "PrintContext.h" | 70 #include "PrintContext.h" |
71 #include "Range.h" | 71 #include "Range.h" |
72 #include "RenderObject.h" | 72 #include "RenderObject.h" |
73 #include "RenderTreeAsText.h" | 73 #include "RenderTreeAsText.h" |
74 #include "RuntimeEnabledFeatures.h" | 74 #include "RuntimeEnabledFeatures.h" |
75 #include "SchemeRegistry.h" | 75 #include "SchemeRegistry.h" |
76 #include "ScrollingCoordinator.h" | |
77 #include "SelectRuleFeatureSet.h" | 76 #include "SelectRuleFeatureSet.h" |
78 #include "SerializedScriptValue.h" | 77 #include "SerializedScriptValue.h" |
79 #include "Settings.h" | 78 #include "Settings.h" |
80 #include "ShadowRoot.h" | 79 #include "ShadowRoot.h" |
81 #include "SpellChecker.h" | 80 #include "SpellChecker.h" |
82 #include "StyleSheetContents.h" | 81 #include "StyleSheetContents.h" |
83 #include "TextIterator.h" | 82 #include "TextIterator.h" |
84 #include "TreeScope.h" | 83 #include "TreeScope.h" |
85 #include "ViewportArguments.h" | 84 #include "ViewportArguments.h" |
86 #include <wtf/text/StringBuffer.h> | 85 #include <wtf/text/StringBuffer.h> |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 return document->wheelEventHandlerCount(); | 1193 return document->wheelEventHandlerCount(); |
1195 } | 1194 } |
1196 | 1195 |
1197 unsigned Internals::touchEventHandlerCount(Document* document, ExceptionCode& ec
) | 1196 unsigned Internals::touchEventHandlerCount(Document* document, ExceptionCode& ec
) |
1198 { | 1197 { |
1199 if (!document) { | 1198 if (!document) { |
1200 ec = INVALID_ACCESS_ERR; | 1199 ec = INVALID_ACCESS_ERR; |
1201 return 0; | 1200 return 0; |
1202 } | 1201 } |
1203 | 1202 |
1204 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); | 1203 return document->touchEventHandlerCount(); |
1205 if (!touchHandlers) | |
1206 return 0; | |
1207 | |
1208 unsigned count = 0; | |
1209 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) | |
1210 count += iter->value; | |
1211 return count; | |
1212 } | 1204 } |
1213 | 1205 |
1214 #if ENABLE(TOUCH_EVENT_TRACKING) | |
1215 PassRefPtr<ClientRectList> Internals::touchEventTargetClientRects(Document* docu
ment, ExceptionCode& ec) | |
1216 { | |
1217 if (!document || !document->view() || !document->page()) { | |
1218 ec = INVALID_ACCESS_ERR; | |
1219 return 0; | |
1220 } | |
1221 if (!document->page()->scrollingCoordinator()) | |
1222 return ClientRectList::create(); | |
1223 | |
1224 document->updateLayoutIgnorePendingStylesheets(); | |
1225 | |
1226 Vector<IntRect> absoluteRects; | |
1227 document->page()->scrollingCoordinator()->computeAbsoluteTouchEventTargetRec
ts(document, absoluteRects); | |
1228 Vector<FloatQuad> absoluteQuads(absoluteRects.size()); | |
1229 | |
1230 for (size_t i = 0; i < absoluteRects.size(); ++i) | |
1231 absoluteQuads[i] = FloatQuad(absoluteRects[i]); | |
1232 | |
1233 return ClientRectList::create(absoluteQuads); | |
1234 } | |
1235 #endif | |
1236 | |
1237 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y,
unsigned topPadding, unsigned rightPadding, | 1206 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y,
unsigned topPadding, unsigned rightPadding, |
1238 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo
wShadowContent, ExceptionCode& ec) const | 1207 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo
wShadowContent, ExceptionCode& ec) const |
1239 { | 1208 { |
1240 if (!document || !document->frame() || !document->frame()->view()) { | 1209 if (!document || !document->frame() || !document->frame()->view()) { |
1241 ec = INVALID_ACCESS_ERR; | 1210 ec = INVALID_ACCESS_ERR; |
1242 return 0; | 1211 return 0; |
1243 } | 1212 } |
1244 | 1213 |
1245 return document->nodesFromRect(x, y, topPadding, rightPadding, bottomPadding
, leftPadding, ignoreClipping, allowShadowContent); | 1214 return document->nodesFromRect(x, y, topPadding, rightPadding, bottomPadding
, leftPadding, ignoreClipping, allowShadowContent); |
1246 } | 1215 } |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 return SerializedScriptValue::adopt(bytes); | 1775 return SerializedScriptValue::adopt(bytes); |
1807 #endif | 1776 #endif |
1808 } | 1777 } |
1809 | 1778 |
1810 void Internals::setUsesOverlayScrollbars(bool enabled) | 1779 void Internals::setUsesOverlayScrollbars(bool enabled) |
1811 { | 1780 { |
1812 WebCore::Settings::setUsesOverlayScrollbars(enabled); | 1781 WebCore::Settings::setUsesOverlayScrollbars(enabled); |
1813 } | 1782 } |
1814 | 1783 |
1815 } | 1784 } |
OLD | NEW |