Bug 101200 - Web Inspector: make Spectrum and Popover WebInspector.Views in order to enable reuse
Summary: Web Inspector: make Spectrum and Popover WebInspector.Views in order to enabl...
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: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-05 02:38 PST by Pavel Feldman
Modified: 2012-11-06 04:01 PST (History)
8 users (show)

See Also:


Attachments
Patch (33.69 KB, patch)
2012-11-05 02:40 PST, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2012-11-05 02:38:16 PST
- Split Spectrum and SpectrumPopoverHelper (first is a component, second it controller)
- Made Popover a root view in order to enable lazy style loading for potential subviews (such as Spectrum)
- Extracted spectrum's css into a separate file
Comment 1 Pavel Feldman 2012-11-05 02:40:45 PST
Created attachment 172301 [details]
Patch
Comment 2 Yury Semikhatsky 2012-11-05 23:42:13 PST
Comment on attachment 172301 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        - Split Spectrum and SpectrumPopoverHelper (first is a component, second it controller)

typo: second it controller -> second is its controller

> Source/WebCore/inspector/front-end/DOMExtension.js:208
> +function Size(width, height)

Why not WebInspector.Size to make it clear that it is not from Web API?

> Source/WebCore/inspector/front-end/View.js:372
> +        this.element.positionAt(undefined, undefined);

Why not reuse Element.measurePreferredSize and simply call this.element.measurePreferredSize() here instead?
Comment 3 Pavel Feldman 2012-11-06 03:56:46 PST
> typo: second it controller -> second is its controller


Done

> 
> > Source/WebCore/inspector/front-end/DOMExtension.js:208
> > +function Size(width, height)
> 
> Why not WebInspector.Size to make it clear that it is not from Web API?
> 

I'm adding it into DOMExtension which is compiled outside of inspector. I did not want to invent a namespace for it.

> > Source/WebCore/inspector/front-end/View.js:372
> > +        this.element.positionAt(undefined, undefined);
> 
> Why not reuse Element.measurePreferredSize and simply call this.element.measurePreferredSize() here instead?

Because we can't operate on View's elements using regular DOM operations.
Comment 4 Pavel Feldman 2012-11-06 04:01:28 PST
Committed r133582: <http://trac.webkit.org/changeset/133582>