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

Unified Diff: Source/web/WebAXObject.cpp

Issue 216343002: Add a test that confirms there's no crash on accessing properties of AccesibilityObject at the init… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/web/WebAXObject.cpp
diff --git a/Source/web/WebAXObject.cpp b/Source/web/WebAXObject.cpp
index 317a5b0fbaaab01c2b04b91eba8aedd34c4a5b76..f03814b1c3cec73b38c416f8a35af6a43f7a417c 100644
--- a/Source/web/WebAXObject.cpp
+++ b/Source/web/WebAXObject.cpp
@@ -703,6 +703,9 @@ WebAXRole WebAXObject::role() const
unsigned WebAXObject::selectionEnd() const
{
+ if (m_private->isTextControl())
dmazzoni 2014/03/28 06:30:32 I'm assuming this fixes the crash, but it doesn't
hajimehoshi 2014/03/28 06:45:08 I agree with you. The cause is that there is an a
+ return 0;
+
if (isDetached())
return 0;
@@ -711,6 +714,9 @@ unsigned WebAXObject::selectionEnd() const
unsigned WebAXObject::selectionStart() const
{
+ if (m_private->isTextControl())
+ return 0;
+
if (isDetached())
return 0;
@@ -749,6 +755,9 @@ void WebAXObject::setFocused(bool on) const
void WebAXObject::setSelectedTextRange(int selectionStart, int selectionEnd) const
{
+ if (m_private->isTextControl())
+ return;
+
if (isDetached())
return;

Powered by Google App Engine
This is Rietveld 408576698