Bug 113275

Summary: [shadow] styleForText should consider the case where parent node has no style
Product: WebKit Reporter: Takashi Sakamoto <tasak>
Component: CSSAssignee: Takashi Sakamoto <tasak>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, esprehn+autocc, macpherson, menard, ojan.autocc, webcomponents-bugzilla, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 59827    
Attachments:
Description Flags
repro.html
none
Patch
none
Patch none

Takashi Sakamoto
Reported 2013-03-25 22:23:05 PDT
Created attachment 195004 [details] repro.html If some text node is distributed to an insertion point but the parent of the insertion point is out of composition, the text node's parent for rendering and styling might has no style. For example, firstly create the following DOM tree: div1 --- shadow1 ---- shadow2 | | +---text +---div2 ---- shadow3 | | | | | +---shadow Now insert [div3 -- shadow] under div2: div1 --- shadow1 ---- shadow2 | | +---text +---div2 ---- shadow3 | | | +-----div3 | | | +----shadow | +---shadow c.f. https://cluster-fuzz.appspot.com/testcase?key=163551153
Attachments
repro.html (713 bytes, text/html)
2013-03-25 22:23 PDT, Takashi Sakamoto
no flags
Patch (5.00 KB, patch)
2013-03-25 22:51 PDT, Takashi Sakamoto
no flags
Patch (4.07 KB, patch)
2013-03-26 21:52 PDT, Takashi Sakamoto
no flags
Takashi Sakamoto
Comment 1 2013-03-25 22:24:18 PDT
div3 is a parent for rendering and styling of text and is out of composition. So div3->renderStyle() would return 0.
Takashi Sakamoto
Comment 2 2013-03-25 22:51:44 PDT
Build Bot
Comment 3 2013-03-26 04:16:59 PDT
Hajime Morrita
Comment 4 2013-03-26 17:29:15 PDT
Comment on attachment 195007 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195007&action=review > LayoutTests/fast/dom/shadow/text-node-distributed-crash.html:31 > +function runTest() { You could use Hayato-san's createDOM() helper to make it readable without comments.
Takashi Sakamoto
Comment 5 2013-03-26 21:52:54 PDT
Takashi Sakamoto
Comment 6 2013-03-26 21:53:23 PDT
Comment on attachment 195007 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195007&action=review Thank you for reviewing. >> LayoutTests/fast/dom/shadow/text-node-distributed-crash.html:31 >> +function runTest() { > > You could use Hayato-san's createDOM() helper to make it readable without comments. Sure. Done.
Hajime Morrita
Comment 7 2013-03-26 22:08:54 PDT
Comment on attachment 195220 [details] Patch Let's land after seeing a green win.
WebKit Review Bot
Comment 8 2013-03-26 23:42:07 PDT
Comment on attachment 195220 [details] Patch Clearing flags on attachment: 195220 Committed r146967: <http://trac.webkit.org/changeset/146967>
WebKit Review Bot
Comment 9 2013-03-26 23:42:11 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.