Bug 13413

Summary: Failed assertion in RenderTextControl::setSelectionRange in Google Spreadsheets
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: adele, aroben, justin.garcia
Priority: P2 Keywords: GoogleBug
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
URL: http://docs.google.com/
Attachments:
Description Flags
Reduction
none
Possible fix
none
Do not set the selection in zero-height text controls adele: review+

Adam Roben (:aroben)
Reported 2007-04-19 15:58:48 PDT
I'm seeing an assertion failure whenever I try to view a spreadsheet in Google Spreadsheets: 0x011859c0 in WebCore::RenderTextControl::setSelectionRange (this=0x17e426ec, start=0, end=0) at /Volumes/Data/Users/adamroben/dev/WebKit/OpenSource/WebCore/rendering/RenderTextControl.cpp:433 433 ASSERT(startPosition.isNotNull() && endPosition.isNotNull()); Repro steps: 1. Go to http://docs.google.com/ and log in 2. Click the "New spreadsheet" link 3. Click "OK" in the alert that tells you Safari is not supported Here's a bit of the backtrace: #0 0x011859c0 in WebCore::RenderTextControl::setSelectionRange (this=0x17e426ec, start=0, end=0) at /Volumes/Data/Users/adamroben/dev/WebKit/OpenSource/WebCore/rendering/RenderTextControl.cpp:433 #1 0x010ad23b in WebCore::HTMLTextAreaElement::setSelectionRange (this=0x17e4c5f0, start=0, end=0) at /Volumes/Data/Users/adamroben/dev/WebKit/OpenSource/WebCore/html/HTMLTextAreaElement.cpp:123 #2 0x010ad864 in WebCore::HTMLTextAreaElement::updateFocusAppearance (this=0x17e4c5f0, restorePreviousSelection=true) at /Volumes/Data/Users/adamroben/dev/WebKit/OpenSource/WebCore/html/HTMLTextAreaElement.cpp:229 #3 0x010ad7d0 in WebCore::HTMLTextAreaElement::focus (this=0x17e4c5f0) at /Volumes/Data/Users/adamroben/dev/WebKit/OpenSource/WebCore/html/HTMLTextAreaElement.cpp:218 #4 0x012a70bd in WebCore::JSHTMLTextAreaElementPrototypeFunction::callAsFunction (this=0x17c2d3e0, exec=0xbfffc43c, thisObj=0x17a33e50, args=@0xbfffc168) at /Volumes/Data/development/BuildProducts/Debug/DerivedSources/WebCore/JSHTMLTextAreaElement.cpp:271 #5 0x006918fa in KJS::JSObject::call (this=0x17c2d3e0, exec=0xbfffc43c, thisObj=0x17a33e50, args=@0xbfffc168) at /Volumes/Data/Users/adamroben/dev/WebKit/OpenSource/JavaScriptCore/kjs/object.cpp:97
Attachments
Reduction (73 bytes, text/html)
2007-04-19 16:53 PDT, mitz
no flags
Possible fix (627 bytes, patch)
2007-05-01 13:03 PDT, mitz
no flags
Do not set the selection in zero-height text controls (3.16 KB, patch)
2007-06-13 13:50 PDT, mitz
adele: review+
mitz
Comment 1 2007-04-19 16:53:46 PDT
Created attachment 14099 [details] Reduction
mitz
Comment 2 2007-05-01 13:03:27 PDT
Created attachment 14298 [details] Possible fix This fixes the reduction, but given bug 13467 I'm not sure what's the effect on Google Spreadsheets. There is also a subtle difference from Firefox, which allows you to enter text into a 0-height textarea. I don't know if it makes a difference in practice.
mitz
Comment 3 2007-05-01 13:28:42 PDT
Comment on attachment 14298 [details] Possible fix With this patch, after rolling out r20972 (which caused bug 13467), I don't hit the assert in Google Spreadsheets and it seems to function okay, in that i can type into the first cell without having to click or do anything to focus it.
mitz
Comment 4 2007-06-13 13:50:58 PDT
Created attachment 15006 [details] Do not set the selection in zero-height text controls Same as before, now with change log and a layout test.
Adele Peterson
Comment 5 2007-06-13 13:54:01 PDT
Comment on attachment 15006 [details] Do not set the selection in zero-height text controls This seems reasonable to me
Mark Rowe (bdash)
Comment 6 2007-06-18 10:07:02 PDT
Landed in r23565.
Note You need to log in before you can comment on or make changes to this bug.