Bug 78080

Summary: REGRESSION (r106681): Null check missing in [WebFrame(WebInternal) _typingStyle]
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz, mrowe
Priority: P2 Keywords: InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
kling: review+
with API test darin: review+

Description Antti Koivisto 2012-02-07 22:05:02 PST
It looks like FrameSelection::copyTypingStyle can return nil, but after r106681 -[WebFrame _typingStyle] assumes it does not.
Comment 1 Antti Koivisto 2012-02-07 22:05:42 PST
<rdar://problem/10825155>
Comment 2 Antti Koivisto 2012-02-07 22:11:55 PST
Created attachment 126001 [details]
patch
Comment 3 mitz 2012-02-08 00:00:58 PST
Can you add a TestWebKitAPI test for this?
Comment 4 Antti Koivisto 2012-02-08 09:23:20 PST
Created attachment 126100 [details]
with API test
Comment 5 Darin Adler 2012-02-08 09:25:01 PST
Comment on attachment 126100 [details]
with API test

View in context: https://bugs.webkit.org/attachment.cgi?id=126100&action=review

> Tools/TestWebKitAPI/Tests/mac/TypingStyleCrash.mm:32
> +    WebView *webView = [[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""];

I think another way to do the same thing is: [[WebView alloc] init]. I believe those arguments are the defaults.
Comment 6 mitz 2012-02-08 09:28:05 PST
Comment on attachment 126100 [details]
with API test

View in context: https://bugs.webkit.org/attachment.cgi?id=126100&action=review

> Tools/ChangeLog:12
> +        (TestWebKitAPI):

prepare-ChangeLog keeps adding these…

> Tools/TestWebKitAPI/Tests/mac/TypingStyleCrash.mm:33
> +    [webView.mainFrame loadHTMLString:@"<html><body>foo</body></html>" baseURL:nil];

I doubt that this accomplishes anything, since you don’t spin the run loop and wait for this to load before continuing. Presumably, you can just remove this.
Comment 7 Antti Koivisto 2012-02-08 09:36:05 PST
http://trac.webkit.org/changeset/107100