Bug 110224 - Web Inspector: View.markAsRoot should never be invoked on attached view.
Summary: Web Inspector: View.markAsRoot should never be invoked on attached view.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eugene Klyuchnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 07:25 PST by Eugene Klyuchnikov
Modified: 2013-02-20 01:22 PST (History)
9 users (show)

See Also:


Attachments
Patch (2.15 KB, patch)
2013-02-19 07:28 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Klyuchnikov 2013-02-19 07:25:57 PST
TL;DR View.markAsRoot should never be invoked on attached view.

This will cause CSS loading problems after "show".

Let view A be inner view of C. A and B share the same CSS.
C.show -> A loads CSS, counter = 1
B.show -> counter = 2
C.detach -> causes A.processWasHidden; counter = 1
A.markAsRoot
A.show causes A.detach; A was marked as root, so it thinks that it is visible and calls A.processWasHidden -> counter = 0; after that we get A.processWillShow -> counter = 1
A.detach -> counter = 0 -> unload CSS

But B is still shown. Epic fail.
Comment 1 Eugene Klyuchnikov 2013-02-19 07:28:03 PST
Created attachment 189087 [details]
Patch
Comment 2 Pavel Feldman 2013-02-19 07:35:01 PST
Comment on attachment 189087 [details]
Patch

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

> Source/WebCore/inspector/front-end/Drawer.js:89
> +        this._view.detach();

Please add a test.
Comment 3 WebKit Review Bot 2013-02-20 01:22:52 PST
Comment on attachment 189087 [details]
Patch

Clearing flags on attachment: 189087

Committed r143437: <http://trac.webkit.org/changeset/143437>
Comment 4 WebKit Review Bot 2013-02-20 01:22:56 PST
All reviewed patches have been landed.  Closing bug.