Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: Source/WebCore/inspector/front-end/JavaScriptSourceFrame.js

Issue 9279002: Merge 105261 - Web Inspector: Popover does not disappear, causes debugger failure. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/front-end/JavaScriptSourceFrame.js
===================================================================
--- Source/WebCore/inspector/front-end/JavaScriptSourceFrame.js (revision 105593)
+++ Source/WebCore/inspector/front-end/JavaScriptSourceFrame.js (working copy)
@@ -300,14 +300,18 @@
var highlightElement = this._highlightElement;
if (!highlightElement)
return;
+ // FIXME: the text editor should maintain highlight on its own. The check below is a workaround for
+ // the case when highlight element is detached from DOM by the TextViewer when re-building the DOM.
var parentElement = highlightElement.parentElement;
- var child = highlightElement.firstChild;
- while (child) {
- var nextSibling = child.nextSibling;
- parentElement.insertBefore(child, highlightElement);
- child = nextSibling;
+ if (parentElement) {
+ var child = highlightElement.firstChild;
+ while (child) {
+ var nextSibling = child.nextSibling;
+ parentElement.insertBefore(child, highlightElement);
+ child = nextSibling;
+ }
+ parentElement.removeChild(highlightElement);
}
- parentElement.removeChild(highlightElement);
delete this._highlightElement;
RuntimeAgent.releaseObjectGroup(this._popoverObjectGroup);
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698