Bug 78080 - REGRESSION (r106681): Null check missing in [WebFrame(WebInternal) _typingStyle]
Summary: REGRESSION (r106681): Null check missing in [WebFrame(WebInternal) _typingStyle]
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2012-02-07 22:05 PST by Antti Koivisto
Modified: 2012-02-08 09:36 PST (History)
2 users (show)

See Also:


Attachments
patch (1.42 KB, patch)
2012-02-07 22:11 PST, Antti Koivisto
kling: review+
Details | Formatted Diff | Diff
with API test (7.67 KB, patch)
2012-02-08 09:23 PST, Antti Koivisto
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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