Bug 149782

Summary: ShadowRoot with leading or trailing white space cause a crash
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Severity: Normal CC: cdumez, kling, koivisto, thorton
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 148695    
Description Flags
Fixes the crash cdumez: review+, cdumez: commit-queue-

Description Ryosuke Niwa 2015-10-02 18:46:26 PDT
We're missing a null pointer check.
Comment 1 Ryosuke Niwa 2015-10-02 18:48:39 PDT
Created attachment 262375 [details]
Fixes the crash
Comment 2 Ryosuke Niwa 2015-10-05 14:29:49 PDT
Comment 3 Chris Dumez 2015-10-05 14:33:50 PDT
Comment on attachment 262375 [details]
Fixes the crash

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

r=me with comments.

> Source/WebCore/style/RenderTreePosition.cpp:66
> +        if (PseudoElement* before = parent->beforePseudoElement())


> LayoutTests/fast/shadow-dom/shadow-root-with-child-whitespace-text-crash.html:14
> +host.attachShadow({mode: 'closed'}).innerHTML = ` <slot></slot> `;

Why are the quotes around the value so weird?
Comment 4 Ryosuke Niwa 2015-10-05 15:50:02 PDT
Committed r190585: <http://trac.webkit.org/changeset/190585>