Title: [105261] trunk/Source/WebCore
Revision
105261
Author
[email protected]
Date
2012-01-18 04:46:55 -0800 (Wed, 18 Jan 2012)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (105260 => 105261)


--- trunk/Source/WebCore/ChangeLog	2012-01-18 11:33:06 UTC (rev 105260)
+++ trunk/Source/WebCore/ChangeLog	2012-01-18 12:46:55 UTC (rev 105261)
@@ -1,3 +1,17 @@
+2012-01-18  Andrey Kosyakov  <[email protected]>
+
+        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):
+
 2012-01-18  Shinya Kawanaka  <[email protected]>
 
         Unreviewed build fix.

Modified: trunk/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js (105260 => 105261)


--- trunk/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js	2012-01-18 11:33:06 UTC (rev 105260)
+++ trunk/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js	2012-01-18 12:46:55 UTC (rev 105261)
@@ -309,14 +309,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

Reply via email to