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

Unified Diff: Source/core/accessibility/AccessibilityRenderObject.cpp

Issue 23467007: Have Range constructor take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/accessibility/AccessibilityRenderObject.cpp
diff --git a/Source/core/accessibility/AccessibilityRenderObject.cpp b/Source/core/accessibility/AccessibilityRenderObject.cpp
index 9ddd2eacfe040f6d191613abc25cf8d5b3c8b8b1..aae67d2f0361824bf53f513a01eac73f6e7ae43b 100644
--- a/Source/core/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/core/accessibility/AccessibilityRenderObject.cpp
@@ -1766,7 +1766,7 @@ VisiblePosition AccessibilityRenderObject::visiblePositionForIndex(int index) co
if (index <= 0)
return VisiblePosition(firstPositionInOrBeforeNode(node), DOWNSTREAM);
- RefPtr<Range> range = Range::create(&m_renderer->document());
+ RefPtr<Range> range = Range::create(m_renderer->document());
range->selectNodeContents(node, IGNORE_EXCEPTION);
CharacterIterator it(range.get());
it.advance(index - 1);
@@ -1792,7 +1792,7 @@ int AccessibilityRenderObject::indexForVisiblePosition(const VisiblePosition& po
if (indexPosition.isNull() || highestEditableRoot(indexPosition, HasEditableAXRole) != node)
return 0;
- RefPtr<Range> range = Range::create(&m_renderer->document());
+ RefPtr<Range> range = Range::create(m_renderer->document());
range->setStart(node, 0, IGNORE_EXCEPTION);
range->setEnd(indexPosition, IGNORE_EXCEPTION);

Powered by Google App Engine
This is Rietveld 408576698