https://bugs.webkit.org/show_bug.cgi?id=83758
The order in which updateEntryHide is called for cached
highlightResults is changed in "last changed first corrected" order to preserve the semantic of node.
Patch by Sam D <dsam2912@gmail.com> on 2012-04-12
Reviewed by Pavel Feldman.
No new tests required.
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._updateSearchHighlight):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113970
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-12 Sam D <dsam2912@gmail.com>
+
+ Web Inspector: Node Value should not get corrupt while jump over different matches in search.
+ https://bugs.webkit.org/show_bug.cgi?id=83758
+
+ The order in which updateEntryHide is called for cached
+ highlightResults is changed in "last changed first corrected" order to preserve the semantic of node.
+
+ Reviewed by Pavel Feldman.
+
+ No new tests required.
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight):
+
2012-03-05 Pierre Rossi <pierre.rossi@gmail.com>
[Qt] Use QRawFont when building with Qt 5
}
}
- var updater = show ? updateEntryShow : updateEntryHide;
-
- for (var i = 0, size = this._highlightResult.length; i < size; ++i)
- updater(this._highlightResult[i]);
+ // Preserve the semantic of node by following the order of updates for hide and show.
+ if (show) {
+ for (var i = 0, size = this._highlightResult.length; i < size; ++i)
+ updateEntryShow(this._highlightResult[i]);
+ } else {
+ for (var i = (this._highlightResult.length - 1); i >= 0; --i)
+ updateEntryHide(this._highlightResult[i]);
+ }
},
get hovered()