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

Side by Side Diff: Source/core/layout/HitTestResult.h

Issue 1094133004: Image maps should work for images with alt content (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 8 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 | Annotate | Revision Log
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 21 matching lines...) Expand all
32 #include "platform/text/TextDirection.h" 32 #include "platform/text/TextDirection.h"
33 #include "wtf/Forward.h" 33 #include "wtf/Forward.h"
34 #include "wtf/ListHashSet.h" 34 #include "wtf/ListHashSet.h"
35 #include "wtf/OwnPtr.h" 35 #include "wtf/OwnPtr.h"
36 #include "wtf/RefPtr.h" 36 #include "wtf/RefPtr.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class Element; 40 class Element;
41 class LocalFrame; 41 class LocalFrame;
42 class HTMLAreaElement;
42 class HTMLMediaElement; 43 class HTMLMediaElement;
43 class Image; 44 class Image;
44 class KURL; 45 class KURL;
45 class Node; 46 class Node;
46 class LayoutObject; 47 class LayoutObject;
47 class PositionWithAffinity; 48 class PositionWithAffinity;
48 class Scrollbar; 49 class Scrollbar;
49 50
50 class CORE_EXPORT HitTestResult { 51 class CORE_EXPORT HitTestResult {
51 DISALLOW_ALLOCATION(); 52 DISALLOW_ALLOCATION();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const LayoutPoint& pointInMainFrame() const { return m_hitTestLocation.point (); } 85 const LayoutPoint& pointInMainFrame() const { return m_hitTestLocation.point (); }
85 IntPoint roundedPointInMainFrame() const { return roundedIntPoint(pointInMai nFrame()); } 86 IntPoint roundedPointInMainFrame() const { return roundedIntPoint(pointInMai nFrame()); }
86 87
87 // The hit-tested point in the coordinates of the innerNode frame, the frame containing innerNode. 88 // The hit-tested point in the coordinates of the innerNode frame, the frame containing innerNode.
88 const LayoutPoint& pointInInnerNodeFrame() const { return m_pointInInnerNode Frame; } 89 const LayoutPoint& pointInInnerNodeFrame() const { return m_pointInInnerNode Frame; }
89 IntPoint roundedPointInInnerNodeFrame() const { return roundedIntPoint(point InInnerNodeFrame()); } 90 IntPoint roundedPointInInnerNodeFrame() const { return roundedIntPoint(point InInnerNodeFrame()); }
90 LocalFrame* innerNodeFrame() const; 91 LocalFrame* innerNodeFrame() const;
91 92
92 // The hit-tested point in the coordinates of the inner node. 93 // The hit-tested point in the coordinates of the inner node.
93 const LayoutPoint& localPoint() const { return m_localPoint; } 94 const LayoutPoint& localPoint() const { return m_localPoint; }
94 void setLocalPoint(const LayoutPoint& p) { m_localPoint = p; } 95 void setNodeAndPosition(Node* node, const LayoutPoint& p) { m_localPoint = p ; setInnerNode(node); }
95 96
96 PositionWithAffinity position() const; 97 PositionWithAffinity position() const;
97 LayoutObject* layoutObject() const; 98 LayoutObject* layoutObject() const;
98 99
99 void setToShadowHostIfInUserAgentShadowRoot(); 100 void setToShadowHostIfInUserAgentShadowRoot();
100 101
101 const HitTestLocation& hitTestLocation() const { return m_hitTestLocation; } 102 const HitTestLocation& hitTestLocation() const { return m_hitTestLocation; }
102 const HitTestRequest& hitTestRequest() const { return m_hitTestRequest; } 103 const HitTestRequest& hitTestRequest() const { return m_hitTestRequest; }
103 104
104 void setInnerNode(Node*); 105 void setInnerNode(Node*);
106 HTMLAreaElement* imageAreaForImage() const;
105 void setURLElement(Element*); 107 void setURLElement(Element*);
106 void setScrollbar(Scrollbar*); 108 void setScrollbar(Scrollbar*);
107 void setIsOverWidget(bool b) { m_isOverWidget = b; } 109 void setIsOverWidget(bool b) { m_isOverWidget = b; }
108 110
109 bool isSelected() const; 111 bool isSelected() const;
110 String spellingToolTip(TextDirection&) const; 112 String spellingToolTip(TextDirection&) const;
111 String title(TextDirection&) const; 113 String title(TextDirection&) const;
112 const AtomicString& altDisplayString() const; 114 const AtomicString& altDisplayString() const;
113 Image* image() const; 115 Image* image() const;
114 IntRect imageRect() const; 116 IntRect imageRect() const;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 RefPtrWillBeMember<Element> m_innerURLElement; 153 RefPtrWillBeMember<Element> m_innerURLElement;
152 RefPtrWillBeMember<Scrollbar> m_scrollbar; 154 RefPtrWillBeMember<Scrollbar> m_scrollbar;
153 bool m_isOverWidget; // Returns true if we are over a widget (and not in the border/padding area of a LayoutPart for example). 155 bool m_isOverWidget; // Returns true if we are over a widget (and not in the border/padding area of a LayoutPart for example).
154 156
155 mutable OwnPtrWillBeMember<NodeSet> m_listBasedTestResult; 157 mutable OwnPtrWillBeMember<NodeSet> m_listBasedTestResult;
156 }; 158 };
157 159
158 } // namespace blink 160 } // namespace blink
159 161
160 #endif // HitTestResult_h 162 #endif // HitTestResult_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/replaced/image-map-alt-content-expected.txt ('k') | Source/core/layout/HitTestResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698