Bug 123577

Summary: Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
Product: WebKit Reporter: Alexandru Chiculita <achicu>
Component: Web InspectorAssignee: Alexandru Chiculita <achicu>
Severity: Normal CC: commit-queue, graouts, joepeck, timothy, webkit-bug-importer, WebkitBugTracker
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 57312    
Description Flags
Patch V1
timothy: review+
Patch for landing none

Description Alexandru Chiculita 2013-10-31 10:50:01 PDT
This happens because the inspector protocol will send the remove event before the element is actually going to be removed and the CSS Regions API will not be able to find the nodeId for the removed node.
Comment 1 Radar WebKit Bug Importer 2013-10-31 10:50:09 PDT
Comment 2 Alexandru Chiculita 2013-11-06 17:17:17 PST
Created attachment 216248 [details]
Patch V1
Comment 3 Timothy Hatcher 2013-11-06 19:29:17 PST
Comment on attachment 216248 [details]
Patch V1

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

> Source/WebInspectorUI/UserInterface/ContentFlowTreeContentView.js:186
> -        this._nodesMap.remove(event.data.node.id);
> +        this._nodesMap.delete(event.data.node.id);

Opps, good catch.

> Source/WebInspectorUI/UserInterface/DOMTreeManager.js:43
> +    this._contentNodesToFlowsMap = new Map();

No () is our style.
Comment 4 Alexandru Chiculita 2013-11-07 09:17:19 PST
Created attachment 216308 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2013-11-07 09:18:16 PST
Comment on attachment 216308 [details]
Patch for landing

Rejecting attachment 216308 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 216308, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.

Full output: http://webkit-queues.appspot.com/results/22638240
Comment 6 WebKit Commit Bot 2013-11-07 10:03:56 PST
Comment on attachment 216308 [details]
Patch for landing

Clearing flags on attachment: 216308

Committed r158854: <http://trac.webkit.org/changeset/158854>
Comment 7 WebKit Commit Bot 2013-11-07 10:04:01 PST
All reviewed patches have been landed.  Closing bug.