Bug 23298

Summary: Need to be tolerant of null style values passed to CSSStyleSelector::convertToLength
Product: WebKit Reporter: Chris Marrin <cmarrin>
Component: CSSAssignee: Chris Marrin <cmarrin>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch darin: review+

Chris Marrin
Reported 2009-01-13 11:30:50 PST
For future functionality, we need to not crash when a null style is passed to this function. The only place it is used is in EMS and EXS computations. In this case, we will return !ok and not crash.
Attachments
Patch (1.93 KB, patch)
2009-01-13 11:40 PST, Chris Marrin
darin: review+
Chris Marrin
Comment 1 2009-01-13 11:40:39 PST
Darin Adler
Comment 2 2009-01-13 11:49:04 PST
Comment on attachment 26677 [details] Patch > + if (!style && (type == CSSPrimitiveValue::CSS_EMS || type == CSSPrimitiveValue::CSS_EXS)) { > + if (ok) > + *ok = false; > + } > + else if (type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG) Brace goes on same line as else in the WebKit coding style. r=me
Chris Marrin
Comment 3 2009-01-13 14:10:12 PST
I will make that change when I checkin
Chris Marrin
Comment 4 2009-01-13 14:47:29 PST
Sending WebCore/ChangeLog Sending WebCore/css/CSSStyleSelector.cpp Transmitting file data .. Committed revision 39878.
Note You need to log in before you can comment on or make changes to this bug.