Bug 113275 - [shadow] styleForText should consider the case where parent node has no style
Summary: [shadow] styleForText should consider the case where parent node has no style
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Takashi Sakamoto
URL:
Keywords:
Depends on:
Blocks: 59827
  Show dependency treegraph
 
Reported: 2013-03-25 22:23 PDT by Takashi Sakamoto
Modified: 2013-03-26 23:42 PDT (History)
7 users (show)

See Also:


Attachments
repro.html (713 bytes, text/html)
2013-03-25 22:23 PDT, Takashi Sakamoto
no flags Details
Patch (5.00 KB, patch)
2013-03-25 22:51 PDT, Takashi Sakamoto
no flags Details | Formatted Diff | Diff
Patch (4.07 KB, patch)
2013-03-26 21:52 PDT, Takashi Sakamoto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Takashi Sakamoto 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
Comment 1 Takashi Sakamoto 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.
Comment 2 Takashi Sakamoto 2013-03-25 22:51:44 PDT
Created attachment 195007 [details]
Patch
Comment 3 Build Bot 2013-03-26 04:16:59 PDT
Comment on attachment 195007 [details]
Patch

Attachment 195007 [details] did not pass win-ews (win):
Output: http://webkit-commit-queue.appspot.com/results/17184780
Comment 4 Hajime Morrita 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.
Comment 5 Takashi Sakamoto 2013-03-26 21:52:54 PDT
Created attachment 195220 [details]
Patch
Comment 6 Takashi Sakamoto 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.
Comment 7 Hajime Morrita 2013-03-26 22:08:54 PDT
Comment on attachment 195220 [details]
Patch

Let's land after seeing a green win.
Comment 8 WebKit Review Bot 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>
Comment 9 WebKit Review Bot 2013-03-26 23:42:11 PDT
All reviewed patches have been landed.  Closing bug.