Summary: | DOM tree selection disappears upon page refresh | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Piotr Petrus <itunesgripes> | ||||||
Component: | Web Inspector (Deprecated) | Assignee: | Pavel Feldman <pfeldman> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, bweinstein, joepeck, keishi, pfeldman, pmuellr, riddlu, rik, timothy, webkit.review.bot | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Piotr Petrus
2009-11-04 14:25:04 PST
Created attachment 44041 [details]
[PATCH] Proposed fix
style-queue ran check-webkit-style on attachment 44041 [details] without any errors.
Created attachment 44145 [details]
[PATCH] Now with no 'animation'.
Couple of drive-by improvements here.
style-queue ran check-webkit-style on attachment 44145 [details] without any errors.
Comment on attachment 44145 [details] [PATCH] Now with no 'animation'. > + for (size_t i = 0; i < pathTokens.size() - 1; i += 2) { Extra space before "- 1". > + int childNumber = pathTokens[i].toInt(&success); > + int nodesCount = innerChildNodeCount(node); Can these be unsigned/size_t? > + String childName = pathTokens[i + 1]; Move this down to where you need it. > + for (int j = 0; child && j < childNumber; ++j) j should be size_t. > ~InspectorDOMAgent(); > + void reset(); Put a newline before reset so it isn't grouped with the destructor. > + this.reset(); > + if (!inspectedRootDocument) > return; Put a newline after the reset call. > + InjectedScriptAccess.pushNodeByPathToFrontend(this._selectedPathOnReset, selectLastSelectedNode.bind(this)); It seems odd to call a function called "pushNodeByPathToFrontend" from the frontend! Should it just be "nodeByPath" and take a callback? Landed with comments addressed. Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog A LayoutTests/inspector/elements-panel-selection-on-refresh-expected.txt A LayoutTests/inspector/elements-panel-selection-on-refresh.html M WebCore/ChangeLog M WebCore/inspector/InjectedScriptHost.cpp M WebCore/inspector/InjectedScriptHost.h M WebCore/inspector/InjectedScriptHost.idl M WebCore/inspector/InspectorController.cpp M WebCore/inspector/InspectorDOMAgent.cpp M WebCore/inspector/InspectorDOMAgent.h M WebCore/inspector/front-end/DOMAgent.js M WebCore/inspector/front-end/ElementsPanel.js M WebCore/inspector/front-end/InjectedScript.js M WebCore/inspector/front-end/InjectedScriptAccess.js Committed r51601 |