Bug 172503 - Dynamic updates to display: contents reach unreachable code within RenderTreeUpdater::updateTextRenderer
Summary: Dynamic updates to display: contents reach unreachable code within RenderTree...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 172613 (view as bug list)
Depends on:
Blocks: 157477
  Show dependency treegraph
 
Reported: 2017-05-23 09:02 PDT by Emilio Cobos Álvarez
Modified: 2017-05-30 20:25 PDT (History)
9 users (show)

See Also:


Attachments
Stack (4.91 KB, text/plain)
2017-05-23 09:02 PDT, Emilio Cobos Álvarez
no flags Details
Patch (5.55 KB, patch)
2017-05-25 09:54 PDT, Emilio Cobos Álvarez
no flags Details | Formatted Diff | Diff
Patch (6.01 KB, patch)
2017-05-25 09:57 PDT, Emilio Cobos Álvarez
no flags Details | Formatted Diff | Diff
Patch (6.05 KB, patch)
2017-05-25 14:26 PDT, Emilio Cobos Álvarez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emilio Cobos Álvarez 2017-05-23 09:02:21 PDT
Created attachment 311016 [details]
Stack

When importing the css-display-3 tests, a few tests that check dynamic changes to display: contents are crashing within that function, reaching unreachable code in RenderElement::insertChildInternal.
Comment 1 Emilio Cobos Álvarez 2017-05-25 04:23:17 PDT
So I debugged this today, and it's likely the same bug as bug 172514.

In particular, we're finding as the next sibling a text renderer that hasn't been torn down when "display" changes, so it's still reparented to the old parent...
Comment 2 Emilio Cobos Álvarez 2017-05-25 09:37:25 PDT
I finally found it. I was going crazy, and it required a lot of logging to see what's going on... This is likely to fix bug 172514 too, so I'll try to re-enable the test.
Comment 3 Emilio Cobos Álvarez 2017-05-25 09:54:55 PDT
Created attachment 311234 [details]
Patch
Comment 4 Emilio Cobos Álvarez 2017-05-25 09:57:40 PDT
Created attachment 311235 [details]
Patch
Comment 5 Antti Koivisto 2017-05-25 11:35:19 PDT
Comment on attachment 311235 [details]
Patch

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

> Source/WebCore/ChangeLog:14
> +        In practice, we may want to remove that bit and use ElementRareData's
> +        RenderStyle instead (keeping it around as appropriate), to ensure they
> +        don't go out of sync, but that's out of scope of this patch for now.

Yeah, this is the way to go in long run. Not keeping the full style currently requires some awkward code in style resolution.
Comment 6 Emilio Cobos Álvarez 2017-05-25 11:41:23 PDT
Comment on attachment 311235 [details]
Patch

Whoops, forgot to add the commit-queue flag :)
Comment 7 WebKit Commit Bot 2017-05-25 14:04:46 PDT
Comment on attachment 311235 [details]
Patch

Rejecting attachment 311235 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 311235, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

/Volumes/Data/EWS/WebKit/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://webkit-queues.webkit.org/results/3816649
Comment 8 Emilio Cobos Álvarez 2017-05-25 14:26:45 PDT
Created attachment 311291 [details]
Patch
Comment 9 Emilio Cobos Álvarez 2017-05-25 14:27:28 PDT
Comment on attachment 311291 [details]
Patch

Gah, I'm really bad at this ChangeLog thing, apparently :P.

Added the missing "Reviewed by" line.
Comment 10 WebKit Commit Bot 2017-05-25 23:46:30 PDT
Comment on attachment 311291 [details]
Patch

Clearing flags on attachment: 311291

Committed r217477: <http://trac.webkit.org/changeset/217477>
Comment 11 WebKit Commit Bot 2017-05-25 23:46:32 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Alexey Proskuryakov 2017-05-27 12:32:27 PDT
*** Bug 172613 has been marked as a duplicate of this bug. ***
Comment 13 Radar WebKit Bug Importer 2017-05-30 20:25:17 PDT
<rdar://problem/32479799>