Bug 13413 - Failed assertion in RenderTextControl::setSelectionRange in Google Spreadsheets
Summary: Failed assertion in RenderTextControl::setSelectionRange in Google Spreadsheets
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://docs.google.com/
Keywords: GoogleBug
Depends on:
Blocks:
 
Reported: 2007-04-19 15:58 PDT by Adam Roben (:aroben)
Modified: 2007-06-18 10:07 PDT (History)
3 users (show)

See Also:


Attachments
Reduction (73 bytes, text/html)
2007-04-19 16:53 PDT, mitz
no flags Details
Possible fix (627 bytes, patch)
2007-05-01 13:03 PDT, mitz
no flags Details | Formatted Diff | Diff
Do not set the selection in zero-height text controls (3.16 KB, patch)
2007-06-13 13:50 PDT, mitz
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 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
Comment 1 mitz 2007-04-19 16:53:46 PDT
Created attachment 14099 [details]
Reduction
Comment 2 mitz 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.
Comment 3 mitz 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.
Comment 4 mitz 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.
Comment 5 Adele Peterson 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
Comment 6 Mark Rowe (bdash) 2007-06-18 10:07:02 PDT
Landed in r23565.