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

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

Issue 17471008: Rework compositor touch hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CR feedback - accumulate LayoutRects instead of IntRects, disable when page isn't composited. Also… Created 7 years, 5 months 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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 13 matching lines...) Expand all
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef Internals_h 27 #ifndef Internals_h
28 #define Internals_h 28 #define Internals_h
29 29
30 #include "core/css/CSSComputedStyleDeclaration.h" 30 #include "core/css/CSSComputedStyleDeclaration.h"
31 #include "core/dom/ContextLifecycleObserver.h" 31 #include "core/dom/ContextLifecycleObserver.h"
32 #include "core/dom/ExceptionCodePlaceholder.h" 32 #include "core/dom/ExceptionCodePlaceholder.h"
33 #include "core/dom/NodeList.h" 33 #include "core/dom/NodeList.h"
34 #include "core/page/scrolling/ScrollingCoordinator.h"
34 #include <wtf/ArrayBuffer.h> 35 #include <wtf/ArrayBuffer.h>
35 #include <wtf/PassRefPtr.h> 36 #include <wtf/PassRefPtr.h>
36 #include <wtf/RefCounted.h> 37 #include <wtf/RefCounted.h>
37 #include <wtf/text/WTFString.h> 38 #include <wtf/text/WTFString.h>
38 39
39 namespace WebCore { 40 namespace WebCore {
40 41
41 class ClientRect; 42 class ClientRect;
42 class ClientRectList; 43 class ClientRectList;
43 class DOMPoint; 44 class DOMPoint;
44 class DOMStringList; 45 class DOMStringList;
45 class DOMWindow; 46 class DOMWindow;
46 class Document; 47 class Document;
47 class DocumentMarker; 48 class DocumentMarker;
48 class Element; 49 class Element;
49 class Frame; 50 class Frame;
50 class InspectorFrontendChannelDummy; 51 class InspectorFrontendChannelDummy;
51 class InternalRuntimeFlags; 52 class InternalRuntimeFlags;
52 class InternalProfilers; 53 class InternalProfilers;
53 class InternalSettings; 54 class InternalSettings;
55 class LayerRectList;
54 class Node; 56 class Node;
55 class Page; 57 class Page;
56 class PagePopupController; 58 class PagePopupController;
57 class Range; 59 class Range;
58 class ScriptExecutionContext; 60 class ScriptExecutionContext;
59 class ShadowRoot; 61 class ShadowRoot;
60 class MallocStatistics; 62 class MallocStatistics;
61 class SerializedScriptValue; 63 class SerializedScriptValue;
62 class TypeConversions; 64 class TypeConversions;
63 65
64 typedef int ExceptionCode; 66 typedef int ExceptionCode;
65 67
66 class Internals : public RefCounted<Internals>, public ContextLifecycleObserver { 68 class Internals : public RefCounted<Internals>
69 , public ContextLifecycleObserver
70 , public ScrollingCoordinator::TouchEventTargetRectsObserver {
67 public: 71 public:
68 static PassRefPtr<Internals> create(Document*); 72 static PassRefPtr<Internals> create(Document*);
69 virtual ~Internals(); 73 virtual ~Internals();
70 74
71 static void resetToConsistentState(Page*); 75 static void resetToConsistentState(Page*);
72 76
73 String elementRenderTreeAsText(Element*, ExceptionCode&); 77 String elementRenderTreeAsText(Element*, ExceptionCode&);
74 78
75 String address(Node*); 79 String address(Node*);
76 80
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 PassRefPtr<ClientRect> bestZoomableAreaForTouchPoint(long x, long y, long wi dth, long height, Document*, ExceptionCode&); 172 PassRefPtr<ClientRect> bestZoomableAreaForTouchPoint(long x, long y, long wi dth, long height, Document*, ExceptionCode&);
169 173
170 int lastSpellCheckRequestSequence(Document*, ExceptionCode&); 174 int lastSpellCheckRequestSequence(Document*, ExceptionCode&);
171 int lastSpellCheckProcessedSequence(Document*, ExceptionCode&); 175 int lastSpellCheckProcessedSequence(Document*, ExceptionCode&);
172 176
173 Vector<String> userPreferredLanguages() const; 177 Vector<String> userPreferredLanguages() const;
174 void setUserPreferredLanguages(const Vector<String>&); 178 void setUserPreferredLanguages(const Vector<String>&);
175 179
176 unsigned wheelEventHandlerCount(Document*, ExceptionCode&); 180 unsigned wheelEventHandlerCount(Document*, ExceptionCode&);
177 unsigned touchEventHandlerCount(Document*, ExceptionCode&); 181 unsigned touchEventHandlerCount(Document*, ExceptionCode&);
178 PassRefPtr<ClientRectList> touchEventTargetClientRects(Document*, ExceptionC ode&); 182 LayerRectList* touchEventTargetLayerRects(Document*, ExceptionCode&);
183 unsigned touchEventTargetLayerRectsUpdateCount(Document*, ExceptionCode&);
184 virtual void touchEventTargetRectsChanged(const LayerHitTestRects&);
179 185
180 // This is used to test rect based hit testing like what's done on touch scr eens. 186 // This is used to test rect based hit testing like what's done on touch scr eens.
181 PassRefPtr<NodeList> nodesFromRect(Document*, int x, int y, unsigned topPadd ing, unsigned rightPadding, 187 PassRefPtr<NodeList> nodesFromRect(Document*, int x, int y, unsigned topPadd ing, unsigned rightPadding,
182 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode&) const; 188 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode&) const;
183 189
184 void emitInspectorDidBeginFrame(); 190 void emitInspectorDidBeginFrame();
185 void emitInspectorDidCancelFrame(); 191 void emitInspectorDidCancelFrame();
186 192
187 bool hasSpellingMarker(Document*, int from, int length, ExceptionCode&); 193 bool hasSpellingMarker(Document*, int from, int length, ExceptionCode&);
188 bool hasGrammarMarker(Document*, int from, int length, ExceptionCode&); 194 bool hasGrammarMarker(Document*, int from, int length, ExceptionCode&);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 private: 295 private:
290 explicit Internals(Document*); 296 explicit Internals(Document*);
291 Document* contextDocument() const; 297 Document* contextDocument() const;
292 Frame* frame() const; 298 Frame* frame() const;
293 Vector<String> iconURLs(Document*, int iconTypesMask) const; 299 Vector<String> iconURLs(Document*, int iconTypesMask) const;
294 300
295 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, Ex ceptionCode&); 301 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, Ex ceptionCode&);
296 RefPtr<DOMWindow> m_frontendWindow; 302 RefPtr<DOMWindow> m_frontendWindow;
297 OwnPtr<InspectorFrontendChannelDummy> m_frontendChannel; 303 OwnPtr<InspectorFrontendChannelDummy> m_frontendChannel;
298 RefPtr<InternalRuntimeFlags> m_runtimeFlags; 304 RefPtr<InternalRuntimeFlags> m_runtimeFlags;
305 RefPtr<ScrollingCoordinator> m_scrollingCoordinator;
306 int m_touchEventTargetRectUpdateCount;
307 RefPtr<LayerRectList> m_currentTouchEventRects;
299 RefPtr<InternalProfilers> m_profilers; 308 RefPtr<InternalProfilers> m_profilers;
300 }; 309 };
301 310
302 } // namespace WebCore 311 } // namespace WebCore
303 312
304 #endif 313 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698