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

Side by Side Diff: sky/engine/core/rendering/HitTestResult.h

Issue 689373003: Remove most of the media stack. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 20 matching lines...) Expand all
31 #include "platform/text/TextDirection.h" 31 #include "platform/text/TextDirection.h"
32 #include "wtf/Forward.h" 32 #include "wtf/Forward.h"
33 #include "wtf/ListHashSet.h" 33 #include "wtf/ListHashSet.h"
34 #include "wtf/OwnPtr.h" 34 #include "wtf/OwnPtr.h"
35 #include "wtf/RefPtr.h" 35 #include "wtf/RefPtr.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class Element; 39 class Element;
40 class LocalFrame; 40 class LocalFrame;
41 class HTMLMediaElement;
42 class Image; 41 class Image;
43 class KURL; 42 class KURL;
44 class Node; 43 class Node;
45 class RenderObject; 44 class RenderObject;
46 class PositionWithAffinity; 45 class PositionWithAffinity;
47 class Scrollbar; 46 class Scrollbar;
48 47
49 class HitTestResult { 48 class HitTestResult {
50 DISALLOW_ALLOCATION(); 49 DISALLOW_ALLOCATION();
51 public: 50 public:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool isSelected() const; 102 bool isSelected() const;
104 String spellingToolTip(TextDirection&) const; 103 String spellingToolTip(TextDirection&) const;
105 String title(TextDirection&) const; 104 String title(TextDirection&) const;
106 const AtomicString& altDisplayString() const; 105 const AtomicString& altDisplayString() const;
107 Image* image() const; 106 Image* image() const;
108 IntRect imageRect() const; 107 IntRect imageRect() const;
109 KURL absoluteImageURL() const; 108 KURL absoluteImageURL() const;
110 // This variant of absoluteImageURL will also convert <canvas> elements 109 // This variant of absoluteImageURL will also convert <canvas> elements
111 // to huge image data URLs (very expensive). 110 // to huge image data URLs (very expensive).
112 KURL absoluteImageURLIncludingCanvasDataURL() const; 111 KURL absoluteImageURLIncludingCanvasDataURL() const;
113 KURL absoluteMediaURL() const;
114 KURL absoluteLinkURL() const; 112 KURL absoluteLinkURL() const;
115 String textContent() const; 113 String textContent() const;
116 bool isLiveLink() const; 114 bool isLiveLink() const;
117 bool isMisspelled() const; 115 bool isMisspelled() const;
118 bool isContentEditable() const; 116 bool isContentEditable() const;
119 117
120 bool isOverLink() const; 118 bool isOverLink() const;
121 // Returns true if it is rect-based hit test and needs to continue until the rect is fully 119 // Returns true if it is rect-based hit test and needs to continue until the rect is fully
122 // enclosed by the boundaries of a node. 120 // enclosed by the boundaries of a node.
123 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes tLocation& pointInContainer, const LayoutRect& = LayoutRect()); 121 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes tLocation& pointInContainer, const LayoutRect& = LayoutRect());
124 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes tLocation& pointInContainer, const FloatRect&); 122 bool addNodeToRectBasedTestResult(Node*, const HitTestRequest&, const HitTes tLocation& pointInContainer, const FloatRect&);
125 void append(const HitTestResult&); 123 void append(const HitTestResult&);
126 124
127 // If m_rectBasedTestResult is 0 then set it to a new NodeSet. Return *m_rec tBasedTestResult. Lazy allocation makes 125 // If m_rectBasedTestResult is 0 then set it to a new NodeSet. Return *m_rec tBasedTestResult. Lazy allocation makes
128 // sense because the NodeSet is seldom necessary, and it's somewhat expensiv e to allocate and initialize. This method does 126 // sense because the NodeSet is seldom necessary, and it's somewhat expensiv e to allocate and initialize. This method does
129 // the same thing as mutableRectBasedTestResult(), but here the return value is const. 127 // the same thing as mutableRectBasedTestResult(), but here the return value is const.
130 const NodeSet& rectBasedTestResult() const; 128 const NodeSet& rectBasedTestResult() const;
131 129
132 // Collapse the rect-based test result into a single target at the specified location. 130 // Collapse the rect-based test result into a single target at the specified location.
133 void resolveRectBasedTest(Node* resolvedInnerNode, const LayoutPoint& resolv edPointInMainFrame); 131 void resolveRectBasedTest(Node* resolvedInnerNode, const LayoutPoint& resolv edPointInMainFrame);
134 132
135 // FIXME: Remove this. 133 // FIXME: Remove this.
136 Node* targetNode() const { return innerNode(); } 134 Node* targetNode() const { return innerNode(); }
137 135
138 private: 136 private:
139 KURL absoluteImageURLInternal(bool allowCanvas) const; 137 KURL absoluteImageURLInternal(bool allowCanvas) const;
140 NodeSet& mutableRectBasedTestResult(); // See above. 138 NodeSet& mutableRectBasedTestResult(); // See above.
141 HTMLMediaElement* mediaElement() const;
142 139
143 HitTestLocation m_hitTestLocation; 140 HitTestLocation m_hitTestLocation;
144 141
145 RefPtr<Node> m_innerNode; 142 RefPtr<Node> m_innerNode;
146 RefPtr<Node> m_innerPossiblyPseudoNode; 143 RefPtr<Node> m_innerPossiblyPseudoNode;
147 RefPtr<Node> m_innerNonSharedNode; 144 RefPtr<Node> m_innerNonSharedNode;
148 // FIXME: Nothing changes this to a value different from m_hitTestLocation! 145 // FIXME: Nothing changes this to a value different from m_hitTestLocation!
149 LayoutPoint m_pointInInnerNodeFrame; // The hit-tested point in innerNode fr ame coordinates. 146 LayoutPoint m_pointInInnerNodeFrame; // The hit-tested point in innerNode fr ame coordinates.
150 LayoutPoint m_localPoint; // A point in the local coordinate space of m_inne rNonSharedNode's renderer. Allows us to efficiently 147 LayoutPoint m_localPoint; // A point in the local coordinate space of m_inne rNonSharedNode's renderer. Allows us to efficiently
151 // determine where inside the renderer we hit on s ubsequent operations. 148 // determine where inside the renderer we hit on s ubsequent operations.
152 RefPtr<Element> m_innerURLElement; 149 RefPtr<Element> m_innerURLElement;
153 RefPtr<Scrollbar> m_scrollbar; 150 RefPtr<Scrollbar> m_scrollbar;
154 bool m_isOverWidget; // Returns true if we are over a widget. 151 bool m_isOverWidget; // Returns true if we are over a widget.
155 152
156 mutable OwnPtr<NodeSet> m_rectBasedTestResult; 153 mutable OwnPtr<NodeSet> m_rectBasedTestResult;
157 }; 154 };
158 155
159 } // namespace blink 156 } // namespace blink
160 157
161 #endif // HitTestResult_h 158 #endif // HitTestResult_h
OLDNEW
« no previous file with comments | « sky/engine/core/html/canvas/CanvasRenderingContext2D.cpp ('k') | sky/engine/core/rendering/HitTestResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698