Changeset 194116 in webkit


Ignore:
Timestamp:
Dec 15, 2015 2:33:55 PM (8 years ago)
Author:
Matt Baker
Message:

Web Inspector: Convert Sidebar classes to use View
https://bugs.webkit.org/show_bug.cgi?id=152274

Reviewed by Brian Burg.

Updated Sidebar and SidebarPanel to inherit from View. Mostly mechanical changes.
Once the DetailsSection class family inherits from View (https://webkit.org/b/152269),
directly modifying a sidebar's 'contentView' element will rarely be necessary.

  • UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:

(WebInspector.ApplicationCacheDetailsSidebarPanel):

  • UserInterface/Views/CSSStyleDetailsSidebarPanel.js:

(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
Add/remove panels as subviews of the sidebar.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._filterDidChange):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WebInspector.DOMNodeDetailsSidebarPanel):

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildLayerInfoSection):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):

  • UserInterface/Views/ProbeDetailsSidebarPanel.js:

(WebInspector.ProbeDetailsSidebarPanel.prototype.set inspectedProbeSets):

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):

  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:

(WebInspector.ScopeChainDetailsSidebarPanel):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):

  • UserInterface/Views/SidebarPanel.js:

Inherit from View.
(WebInspector.SidebarPanel):
Replace the content element (the portion of the view excluding navigation
bars, filter bars, etc.) with a View object. A sidebar's content can be a mixture
of unwrapped DOM elements and View objects. For now, the content view's element
will be mutated directly, but once the DetailsSection class family inherits from
the View class the handling of details sections will be simplified.
(WebInspector.SidebarPanel.prototype.get contentView):
(WebInspector.SidebarPanel.prototype.shown):
(WebInspector.SidebarPanel.prototype.hidden):
(WebInspector.SidebarPanel.prototype.get contentElement): Deleted.
Replaced by WebInspector.SidebarPanel.prototype.get contentView.

  • UserInterface/Views/StyleDetailsPanel.js:

Inherit from View.
(WebInspector.StyleDetailsPanel):
(WebInspector.StyleDetailsPanel.prototype.get element): Deleted.
Defer to View.element getter.

  • UserInterface/Views/TimelineSidebarPanel.js:

(WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):

  • UserInterface/Views/VisualStyleDetailsPanel.js:

(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):

Location:
trunk/Source/WebInspectorUI
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r194083 r194116  
     12015-12-15  Matt Baker  <mattbaker@apple.com>
     2
     3        Web Inspector: Convert Sidebar classes to use View
     4        https://bugs.webkit.org/show_bug.cgi?id=152274
     5
     6        Reviewed by Brian Burg.
     7
     8        Updated Sidebar and SidebarPanel to inherit from View. Mostly mechanical changes.
     9        Once the DetailsSection class family inherits from View (https://webkit.org/b/152269),
     10        directly modifying a sidebar's 'contentView' element will rarely be necessary.
     11
     12        * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
     13        (WebInspector.ApplicationCacheDetailsSidebarPanel):
     14
     15        * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
     16        (WebInspector.CSSStyleDetailsSidebarPanel):
     17        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
     18        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
     19        Add/remove panels as subviews of the sidebar.
     20        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._filterDidChange):
     21
     22        * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
     23        (WebInspector.DOMNodeDetailsSidebarPanel):
     24
     25        * UserInterface/Views/DebuggerSidebarPanel.js:
     26        (WebInspector.DebuggerSidebarPanel):
     27        (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
     28
     29        * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
     30        (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildLayerInfoSection):
     31        (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
     32
     33        * UserInterface/Views/NavigationSidebarPanel.js:
     34        (WebInspector.NavigationSidebarPanel):
     35        (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
     36        (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
     37
     38        * UserInterface/Views/ProbeDetailsSidebarPanel.js:
     39        (WebInspector.ProbeDetailsSidebarPanel.prototype.set inspectedProbeSets):
     40
     41        * UserInterface/Views/ResourceDetailsSidebarPanel.js:
     42        (WebInspector.ResourceDetailsSidebarPanel):
     43        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
     44        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
     45        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
     46
     47        * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
     48        (WebInspector.ScopeChainDetailsSidebarPanel):
     49        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.):
     50        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
     51
     52        * UserInterface/Views/SidebarPanel.js:
     53        Inherit from View.
     54        (WebInspector.SidebarPanel):
     55        Replace the content element (the portion of the view excluding navigation
     56        bars, filter bars, etc.) with a View object. A sidebar's content can be a mixture
     57        of unwrapped DOM elements and View objects. For now, the content view's element
     58        will be mutated directly, but once the DetailsSection class family inherits from
     59        the View class the handling of details sections will be simplified.
     60        (WebInspector.SidebarPanel.prototype.get contentView):
     61        (WebInspector.SidebarPanel.prototype.shown):
     62        (WebInspector.SidebarPanel.prototype.hidden):
     63        (WebInspector.SidebarPanel.prototype.get contentElement): Deleted.
     64        Replaced by WebInspector.SidebarPanel.prototype.get contentView.
     65
     66        * UserInterface/Views/StyleDetailsPanel.js:
     67        Inherit from View.
     68        (WebInspector.StyleDetailsPanel):
     69        (WebInspector.StyleDetailsPanel.prototype.get element): Deleted.
     70        Defer to View.element getter.
     71
     72        * UserInterface/Views/TimelineSidebarPanel.js:
     73        (WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
     74
     75        * UserInterface/Views/VisualStyleDetailsPanel.js:
     76        (WebInspector.VisualStyleDetailsPanel):
     77        (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
     78
    1792015-12-14  Joseph Pecoraro  <pecoraro@apple.com>
    280
  • trunk/Source/WebInspectorUI/UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js

    r183327 r194116  
    4848        this._statusSection = new WebInspector.DetailsSection("application-cache-status", WebInspector.UIString("Status"), [this._statusGroup]);
    4949
    50         this.contentElement.appendChild(this._locationSection.element);
    51         this.contentElement.appendChild(this._statusSection.element);
     50        this.contentView.element.appendChild(this._locationSection.element);
     51        this.contentView.element.appendChild(this._statusSection.element);
    5252
    5353        WebInspector.applicationCacheManager.addEventListener(WebInspector.ApplicationCacheManager.Event.NetworkStateUpdated, this._networkStateUpdated, this);
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js

    r189002 r194116  
    6464            }, this);
    6565
    66             this.contentElement.appendChild(this._forcedPseudoClassContainer);
     66            this.contentView.element.appendChild(this._forcedPseudoClassContainer);
    6767        }
    6868
     
    121121            return;
    122122
    123         this.contentElement.scrollTop = this._initialScrollOffset;
     123        this.contentView.element.scrollTop = this._initialScrollOffset;
    124124
    125125        for (var panel of this._panels) {
     
    228228        if (this._selectedPanel) {
    229229            this._selectedPanel.hidden();
    230             this._selectedPanel.element._savedScrollTop = this.contentElement.scrollTop;
    231             this._selectedPanel.element.remove();
     230            this._selectedPanel.element._savedScrollTop = this.contentView.element.scrollTop;
     231            this.contentView.removeSubview(this._selectedPanel);
    232232        }
    233233
    234234        this._selectedPanel = selectedPanel;
    235 
    236         if (this._selectedPanel) {
    237             this.contentElement.appendChild(this._selectedPanel.element);
    238 
    239             if (typeof this._selectedPanel.element._savedScrollTop === "number")
    240                 this.contentElement.scrollTop = this._selectedPanel.element._savedScrollTop;
    241             else
    242                 this.contentElement.scrollTop = this._initialScrollOffset;
    243 
    244             var hasFilter = typeof this._selectedPanel.filterDidChange === "function";
    245             this.contentElement.classList.toggle("has-filter-bar", hasFilter);
    246             if (this._filterBar)
    247                 this.contentElement.classList.toggle(WebInspector.CSSStyleDetailsSidebarPanel.FilterInProgressClassName, hasFilter && this._filterBar.hasActiveFilters());
    248 
    249             this.contentElement.classList.toggle("supports-new-rule", typeof this._selectedPanel.newRuleButtonClicked === "function");
    250             this._selectedPanel.shown();
    251 
    252             this._lastSelectedSectionSetting.value = selectedPanel.navigationInfo.identifier;
    253         }
     235        if (!this._selectedPanel)
     236            return;
     237
     238        this.contentView.addSubview(this._selectedPanel);
     239
     240        if (typeof this._selectedPanel.element._savedScrollTop === "number")
     241            this.contentView.element.scrollTop = this._selectedPanel.element._savedScrollTop;
     242        else
     243            this.contentView.element.scrollTop = this._initialScrollOffset;
     244
     245        let hasFilter = typeof this._selectedPanel.filterDidChange === "function";
     246        this.contentView.element.classList.toggle("has-filter-bar", hasFilter);
     247        if (this._filterBar)
     248            this.contentView.element.classList.toggle(WebInspector.CSSStyleDetailsSidebarPanel.FilterInProgressClassName, hasFilter && this._filterBar.hasActiveFilters());
     249
     250        this.contentView.element.classList.toggle("supports-new-rule", typeof this._selectedPanel.newRuleButtonClicked === "function");
     251        this._selectedPanel.shown();
     252
     253        this._lastSelectedSectionSetting.value = selectedPanel.navigationInfo.identifier;
    254254    }
    255255
     
    287287    _filterDidChange()
    288288    {
    289         this.contentElement.classList.toggle(WebInspector.CSSStyleDetailsSidebarPanel.FilterInProgressClassName, this._filterBar.hasActiveFilters());
     289        this.contentView.element.classList.toggle(WebInspector.CSSStyleDetailsSidebarPanel.FilterInProgressClassName, this._filterBar.hasActiveFilters());
    290290
    291291        this._selectedPanel.filterDidChange(this._filterBar);
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js

    r189642 r194116  
    5656        var eventListenersSection = new WebInspector.DetailsSection("dom-node-event-listeners", WebInspector.UIString("Event Listeners"), [this._eventListenersSectionGroup]);
    5757
    58         this.contentElement.appendChild(identitySection.element);
    59         this.contentElement.appendChild(attributesSection.element);
    60         this.contentElement.appendChild(propertiesSection.element);
    61         this.contentElement.appendChild(eventListenersSection.element);
     58        this.contentView.element.appendChild(identitySection.element);
     59        this.contentView.element.appendChild(attributesSection.element);
     60        this.contentView.element.appendChild(propertiesSection.element);
     61        this.contentView.element.appendChild(eventListenersSection.element);
    6262
    6363        if (this._accessibilitySupported()) {
     
    9090            var accessibilitySection = new WebInspector.DetailsSection("dom-node-accessibility", WebInspector.UIString("Accessibility"), [this._accessibilityGroup]);
    9191
    92             this.contentElement.appendChild(accessibilitySection.element);
    93         }
    94         }
     92            this.contentView.element.appendChild(accessibilitySection.element);
     93        }
     94    }
    9595
    9696    // Public
  • trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js

    r193771 r194116  
    130130        var breakpointsGroup = new WebInspector.DetailsSectionGroup([breakpointsRow]);
    131131        var breakpointsSection = new WebInspector.DetailsSection("scripts", WebInspector.UIString("Scripts"), [breakpointsGroup]);
    132         this.contentElement.appendChild(breakpointsSection.element);
     132        this.contentView.element.appendChild(breakpointsSection.element);
    133133
    134134        this._callStackContentTreeOutline = this.createContentTreeOutline(true, true);
     
    249249    _debuggerDidPause(event)
    250250    {
    251         this.contentElement.insertBefore(this._callStackSection.element, this.contentElement.firstChild);
     251        this.contentView.element.insertBefore(this._callStackSection.element, this.contentView.element.firstChild);
    252252        if (this._updatePauseReason())
    253             this.contentElement.insertBefore(this._pauseReasonSection.element, this.contentElement.firstChild);
     253            this.contentView.element.insertBefore(this._pauseReasonSection.element, this.contentView.element.firstChild);
    254254
    255255        this._debuggerPauseResumeButtonItem.enabled = true;
  • trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js

    r191612 r194116  
    118118        this._layerInfoSection = new WebInspector.DetailsSection("layer-info", WebInspector.UIString("Layer Info"), [this._noLayerInformationGroup]);
    119119
    120         this.contentElement.appendChild(this._layerInfoSection.element);
     120        this.contentView.element.appendChild(this._layerInfoSection.element);
    121121    }
    122122
     
    155155        var section = new WebInspector.DetailsSection("layer-children", WebInspector.UIString("Child Layers"), [group], null, true);
    156156
    157         var element = this.contentElement.appendChild(section.element);
    158         element.classList.add(section.identifier);
     157        this.contentView.element.appendChild(section.element);
    159158    }
    160159
  • trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js

    r193791 r194116  
    3434        this._visibleContentTreeOutlines = new Set;
    3535
    36         this.contentElement.addEventListener("scroll", this._updateContentOverflowShadowVisibility.bind(this));
     36        this.contentView.element.addEventListener("scroll", this._updateContentOverflowShadowVisibility.bind(this));
    3737
    3838        this._contentTreeOutline = this.createContentTreeOutline(true);
     
    163163        contentTreeOutline.element.classList.add(WebInspector.NavigationSidebarPanel.ContentTreeOutlineElementStyleClassName);
    164164
    165         this.contentElement.appendChild(contentTreeOutline.element);
     165        this.contentView.element.appendChild(contentTreeOutline.element);
    166166
    167167        if (!suppressFiltering) {
     
    480480        this._updateContentOverflowShadowVisibilityIdentifier = undefined;
    481481
    482         var scrollHeight = this.contentElement.scrollHeight;
    483         var offsetHeight = this.contentElement.offsetHeight;
     482        let scrollHeight = this.contentView.element.scrollHeight;
     483        let offsetHeight = this.contentView.element.offsetHeight;
    484484
    485485        if (scrollHeight < offsetHeight) {
     
    490490        }
    491491
    492         var edgeThreshold = 1;
    493         var scrollTop = this.contentElement.scrollTop;
    494 
    495         var topCoverage = Math.min(scrollTop, edgeThreshold);
    496         var bottomCoverage = Math.max(0, (offsetHeight + scrollTop) - (scrollHeight - edgeThreshold));
     492        let edgeThreshold = 1;
     493        let scrollTop = this.contentView.element.scrollTop;
     494
     495        let topCoverage = Math.min(scrollTop, edgeThreshold);
     496        let bottomCoverage = Math.max(0, (offsetHeight + scrollTop) - (scrollHeight - edgeThreshold));
    497497
    498498        if (this._topOverflowShadowElement)
  • trunk/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.js

    r183327 r194116  
    5151    set inspectedProbeSets(newProbeSets)
    5252    {
    53         for (var probeSet of this._inspectedProbeSets) {
    54             var removedSection = this._probeSetSections.get(probeSet);
    55             this.contentElement.removeChild(removedSection.element);
     53        for (let probeSet of this._inspectedProbeSets) {
     54            let removedSection = this._probeSetSections.get(probeSet);
     55            removedSection.element.remove();
    5656        }
    5757
    5858        this._inspectedProbeSets = newProbeSets;
    5959
    60         for (var probeSet of newProbeSets) {
    61             var shownSection = this._probeSetSections.get(probeSet);
    62             this.contentElement.appendChild(shownSection.element);
     60        for (let probeSet of newProbeSets) {
     61            let shownSection = this._probeSetSections.get(probeSet);
     62            this.contentView.element.appendChild(shownSection.element);
    6363        }
    6464    }
  • trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js

    r187402 r194116  
    103103        this._imageSizeSection.groups = [new WebInspector.DetailsSectionGroup([this._imageWidthRow, this._imageHeightRow])];
    104104
    105         this.contentElement.appendChild(this._typeSection.element);
    106         this.contentElement.appendChild(this._locationSection.element);
    107         this.contentElement.appendChild(this._requestAndResponseSection.element);
    108         this.contentElement.appendChild(this._requestHeadersSection.element);
    109         this.contentElement.appendChild(this._responseHeadersSection.element);
     105        this.contentView.element.appendChild(this._typeSection.element);
     106        this.contentView.element.appendChild(this._locationSection.element);
     107        this.contentView.element.appendChild(this._requestAndResponseSection.element);
     108        this.contentView.element.appendChild(this._requestHeadersSection.element);
     109        this.contentView.element.appendChild(this._responseHeadersSection.element);
    110110    }
    111111
     
    226226        if (urlComponents.queryString) {
    227227            // Ensure the "Query Parameters" section is displayed, right after the "Request & Response" section.
    228             this.contentElement.insertBefore(this._queryParametersSection.element, this._requestAndResponseSection.element.nextSibling);
     228            this.contentView.element.insertBefore(this._queryParametersSection.element, this._requestAndResponseSection.element.nextSibling);
    229229
    230230            this._queryParametersRow.dataGrid = this._createNameValueDataGrid(parseQueryString(urlComponents.queryString, true));
     
    383383            var imageSectionElement = this._imageSizeSection.element;
    384384            if (imageSectionElement.parentNode)
    385                 this.contentElement.removeChild(imageSectionElement);
     385                this.contentView.element.removeChild(imageSectionElement);
    386386            return;
    387387        }
    388388
    389389        // Ensure the section is displayed, right before the "Location" section.
    390         this.contentElement.insertBefore(this._imageSizeSection.element, this._locationSection.element);
     390        this.contentView.element.insertBefore(this._imageSizeSection.element, this._locationSection.element);
    391391
    392392        // Get the metrics for this resource and fill in the metrics rows with that information.
     
    417417
    418418        // Ensure the section is displayed, right before the "Request Headers" section.
    419         this.contentElement.insertBefore(this._requestDataSection.element, this._requestHeadersSection.element);
     419        this.contentView.element.insertBefore(this._requestDataSection.element, this._requestHeadersSection.element);
    420420
    421421        var requestDataContentType = resource.requestDataContentType || "";
  • trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js

    r193425 r194116  
    5555        this._watchExpressionsSectionGroup = new WebInspector.DetailsSectionGroup;
    5656        this._watchExpressionsSection = new WebInspector.DetailsSection("watch-expressions", WebInspector.UIString("Watch Expressions"), [this._watchExpressionsSectionGroup], this._watchExpressionOptionsElement);
    57         this.contentElement.appendChild(this._watchExpressionsSection.element);
     57        this.contentView.element.appendChild(this._watchExpressionsSection.element);
    5858
    5959        this._updateWatchExpressionsNavigationBar();
     
    126126                }
    127127
    128                 this.contentElement.removeChildren();
    129                 this.contentElement.appendChild(this._watchExpressionsSection.element);
     128                this.contentView.element.removeChildren();
     129                this.contentView.element.appendChild(this._watchExpressionsSection.element);
    130130
    131131                // Bail if the call frame changed while we were waiting for the async response.
     
    137137
    138138                for (let callFrameSection of callFrameSections)
    139                     this.contentElement.appendChild(callFrameSection.element);
     139                    this.contentView.element.appendChild(callFrameSection.element);
    140140            }
    141141
  • trunk/Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js

    r192327 r194116  
    4141        this.element.setAttribute("aria-label", label || displayName);
    4242
    43         this._contentElement = document.createElement("div");
    44         this._contentElement.className = "content";
    45         this.element.appendChild(this._contentElement);
     43        this._contentView = new WebInspector.View;
     44        this._contentView.element.classList.add("content");
     45        this.addSubview(this._contentView);
    4646    }
    4747
     
    5353    }
    5454
    55     get contentElement()
     55    get contentView()
    5656    {
    57         return this._contentElement;
     57        return this._contentView;
    5858    }
    5959
     
    129129    shown()
    130130    {
    131         this._contentElement.scrollTop = this._savedScrollPosition;
     131        this._contentView.element.scrollTop = this._savedScrollPosition;
    132132
    133133        // Implemented by subclasses.
     
    136136    hidden()
    137137    {
    138         this._savedScrollPosition = this._contentElement.scrollTop;
     138        this._savedScrollPosition = this._contentView.element.scrollTop;
    139139
    140140        // Implemented by subclasses.
  • trunk/Source/WebInspectorUI/UserInterface/Views/StyleDetailsPanel.js

    r187895 r194116  
    2424 */
    2525
    26 WebInspector.StyleDetailsPanel = class StyleDetailsPanel extends WebInspector.Object
     26WebInspector.StyleDetailsPanel = class StyleDetailsPanel extends WebInspector.View
    2727{
    2828    constructor(delegate, className, identifier, label)
     
    3232        this._delegate = delegate || null;
    3333
    34         this._element = document.createElement("div");
    35         this._element.className = className;
    36 
    3734        // Add this offset-sections class name so the sticky headers don't overlap the navigation bar.
    38         this.element.classList.add("offset-sections");
     35        this.element.classList.add(className, "offset-sections");
    3936
    4037        this._navigationInfo = {identifier, label};
     
    4542
    4643    // Public
    47 
    48     get element()
    49     {
    50         return this._element;
    51     }
    5244
    5345    get navigationInfo()
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js

    r194009 r194116  
    874874
    875875        this._timelineEventsTitleBarContainer.style.top = (overviewHeight + eventTitleBarOffset) + "px";
    876         this.contentElement.style.top = (overviewHeight + contentElementOffset) + "px";
     876        this.contentView.element.style.top = (overviewHeight + contentElementOffset) + "px";
    877877    }
    878878
  • trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js

    r192705 r194116  
    6161        this._selectorSection.addEventListener(WebInspector.VisualStyleSelectorSection.Event.SelectorChanged, this._updateSections, this);
    6262        this._selectorSection.addEventListener(WebInspector.VisualStyleSelectorSection.Event.StyleTextChanged, this._prepareForChange, this);
    63         this._element.appendChild(this._selectorSection.element);
     63        this.element.appendChild(this._selectorSection.element);
    6464
    6565        // Layout Section
     
    7474
    7575        this._sections.layout = new WebInspector.DetailsSection("layout", WebInspector.UIString("Layout"), [this._groups.display.section, this._groups.position.section, this._groups.float.section, this._groups.dimensions.section, this._groups.margin.section, this._groups.padding.section, this._groups.flexbox.section, this._groups.alignment.section]);
    76         this._element.appendChild(this._sections.layout.element);
     76        this.element.appendChild(this._sections.layout.element);
    7777
    7878        // Text Section
     
    8383
    8484        this._sections.text = new WebInspector.DetailsSection("text", WebInspector.UIString("Text"), [this._groups.textStyle.section, this._groups.font.section, this._groups.textSpacing.section, this._groups.textShadow.section]);
    85         this._element.appendChild(this._sections.text.element);
     85        this.element.appendChild(this._sections.text.element);
    8686
    8787        // Background Section
     
    9292
    9393        this._sections.background = new WebInspector.DetailsSection("background", WebInspector.UIString("Background"), [this._groups.backgroundStyle.section, this._groups.border.section, this._groups.outline.section, this._groups.boxShadow.section]);
    94         this._element.appendChild(this._sections.background.element);
     94        this.element.appendChild(this._sections.background.element);
    9595
    9696        // Animation Section
     
    9898
    9999        this._sections.animation = new WebInspector.DetailsSection("animation", WebInspector.UIString("Animation"), [this._groups.transition.section]);
    100         this._element.appendChild(this._sections.animation.element);
     100        this.element.appendChild(this._sections.animation.element);
    101101    }
    102102
     
    156156
    157157        let disabled = this._currentStyle[WebInspector.VisualStyleDetailsPanel.StyleDisabledSymbol];
    158         this._element.classList.toggle("disabled", !!disabled);
     158        this.element.classList.toggle("disabled", !!disabled);
    159159        if (disabled)
    160160            return;
Note: See TracChangeset for help on using the changeset viewer.