Bug 160604

Summary: REGRESSION (r201245): switching between Computed and Visual Styles panels causes internal error
Product: WebKit Reporter: Matt Baker <mattbaker>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[Patch] Proposed Fix none

Description Matt Baker 2016-08-05 11:54:36 PDT
Summary:
Switching between Computed and Visual Styles panels causes internal error.

Steps to Reproduce:
1. Open Inspector > Elements
2. Show Styles sidebar if necessary
3. Switch from Computed panel to Visual panel
  => [Error] TypeError: undefined is not an object (evaluating 'this._selectorSection.update')
	refresh — VisualStyleDetailsPanel.js:64
	_refreshPreservingScrollPosition — StyleDetailsPanel.js:143
	nodeStylesRefreshed — StyleDetailsPanel.js:114
	dispatch — Object.js:162
	dispatchEventToListeners — Object.js:169
	fetchedComputedStyle — DOMNodeStyles.js:228
	...

4. When switching from Visual to Computed
  => [Error] TypeError: undefined is not an object (evaluating 'this._propertiesTextEditor.style = this.nodeStyles.computedStyle')
	refresh — ComputedStyleDetailsPanel.js:130
	_refreshPreservingScrollPosition — StyleDetailsPanel.js:143
	nodeStylesRefreshed — StyleDetailsPanel.js:114
	dispatch — Object.js:162
	dispatchEventToListeners — Object.js:169
	fetchedComputedStyle — DOMNodeStyles.js:228
	...

Note:
I expected this to be a regression caused by https://trac.webkit.org/changeset/203253, but it looks like it was broken earlier.
Comment 1 Radar WebKit Bug Importer 2016-08-05 11:54:57 PDT
<rdar://problem/27723416>
Comment 2 Matt Baker 2016-08-05 12:46:26 PDT
Regressed in https://trac.webkit.org/changeset/201245.
Comment 3 Radar WebKit Bug Importer 2016-08-05 12:46:53 PDT
<rdar://problem/27724305>
Comment 4 Matt Baker 2016-08-07 12:11:20 PDT
Created attachment 285530 [details]
[Patch] Proposed Fix
Comment 5 WebKit Commit Bot 2016-08-07 12:42:24 PDT
Comment on attachment 285530 [details]
[Patch] Proposed Fix

Clearing flags on attachment: 285530

Committed r204244: <http://trac.webkit.org/changeset/204244>
Comment 6 WebKit Commit Bot 2016-08-07 12:42:28 PDT
All reviewed patches have been landed.  Closing bug.