Title: [105594] branches/chromium/963/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js
- Revision
- 105594
- Author
- [email protected]
- Date
- 2012-01-22 23:08:00 -0800 (Sun, 22 Jan 2012)
Log Message
Merge 105261 - Web Inspector: Popover does not disappear, causes debugger failure.
https://bugs.webkit.org/show_bug.cgi?id=71363
Reviewed by Pavel Feldman.
This is a work-around simple enough for a merge. The real fix would
be to get TextViewer to manage the highlight on its own, so it's not
accidently removed while re-building DOM for the text chunk.
* inspector/front-end/_javascript_SourceFrame.js:
(WebInspector._javascript_SourceFrame.prototype._onHidePopover):
[email protected]
Review URL: https://chromiumcodereview.appspot.com/9279002
Modified Paths
Diff
Modified: branches/chromium/963/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js (105593 => 105594)
--- branches/chromium/963/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js 2012-01-23 05:36:23 UTC (rev 105593)
+++ branches/chromium/963/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js 2012-01-23 07:08:00 UTC (rev 105594)
@@ -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);
},
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes