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

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

Issue 830273006: Delete document marker related invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/rendering/HitTestResult.h ('k') | sky/engine/core/rendering/InlineTextBox.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) 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved.
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 bool HitTestResult::isSelected() const 150 bool HitTestResult::isSelected() const
151 { 151 {
152 if (!m_innerNonSharedNode) 152 if (!m_innerNonSharedNode)
153 return false; 153 return false;
154 154
155 if (LocalFrame* frame = m_innerNonSharedNode->document().frame()) 155 if (LocalFrame* frame = m_innerNonSharedNode->document().frame())
156 return frame->selection().contains(m_hitTestLocation.point()); 156 return frame->selection().contains(m_hitTestLocation.point());
157 return false; 157 return false;
158 } 158 }
159 159
160 String HitTestResult::spellingToolTip(TextDirection& dir) const
161 {
162 dir = LTR;
163 // Return the tool tip string associated with this point, if any. Only marke rs associated with bad grammar
164 // currently supply strings, but maybe someday markers associated with missp elled words will also.
165 if (!m_innerNonSharedNode)
166 return String();
167
168 DocumentMarker* marker = m_innerNonSharedNode->document().markers().markerCo ntainingPoint(m_hitTestLocation.point(), DocumentMarker::Grammar);
169 if (!marker)
170 return String();
171
172 if (RenderObject* renderer = m_innerNonSharedNode->renderer())
173 dir = renderer->style()->direction();
174 return marker->description();
175 }
176
177 String HitTestResult::title(TextDirection& dir) const 160 String HitTestResult::title(TextDirection& dir) const
178 { 161 {
179 dir = LTR; 162 dir = LTR;
180 // Find the title in the nearest enclosing DOM node. 163 // Find the title in the nearest enclosing DOM node.
181 // For <area> tags in image maps, walk the tree for the <area>, not the <img > using it. 164 // For <area> tags in image maps, walk the tree for the <area>, not the <img > using it.
182 for (Node* titleNode = m_innerNode.get(); titleNode; titleNode = titleNode-> parentNode()) { 165 for (Node* titleNode = m_innerNode.get(); titleNode; titleNode = titleNode-> parentNode()) {
183 if (titleNode->isElementNode()) { 166 if (titleNode->isElementNode()) {
184 String title = toElement(titleNode)->title(); 167 String title = toElement(titleNode)->title();
185 if (!title.isNull()) { 168 if (!title.isNull()) {
186 if (RenderObject* renderer = titleNode->renderer()) 169 if (RenderObject* renderer = titleNode->renderer())
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 { 377 {
395 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(node)) { 378 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(node)) {
396 if (node->isElementNode()) 379 if (node->isElementNode())
397 return toElement(node); 380 return toElement(node);
398 } 381 }
399 382
400 return 0; 383 return 0;
401 } 384 }
402 385
403 } // namespace blink 386 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/HitTestResult.h ('k') | sky/engine/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698