Bug 110224

Summary: Web Inspector: View.markAsRoot should never be invoked on attached view.
Product: WebKit Reporter: Eugene Klyuchnikov <eustas>
Component: Web Inspector (Deprecated)Assignee: Eugene Klyuchnikov <eustas>
Severity: Normal CC: apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Patch none

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.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]
Comment 2 Pavel Feldman 2013-02-19 07:35:01 PST
Comment on attachment 189087 [details]

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]

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.