Skip to content
Permalink
Browse files
Make deleting all text while editing a DOM attribute in
        the Inspector delete the attribute. This also fixes
        an exception that would happen before.

        https://bugs.webkit.org/show_bug.cgi?id=20472

        Reviewed by Kevin McCullough.

        * page/inspector/ElementsPanel.js:
        (WebInspector.DOMNodeTreeElement.prototype._attributeEditingCommitted):
        Don't check for hasAttributes on the parseElement, continuing
        through the function will correctly remove the attribute.
        If the parseElement is null, call _editingCancelled not
        editingCancelled, this fixes an exception.

Canonical link: https://commits.webkit.org/28284@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
xeenon committed Aug 21, 2008
1 parent aa7b208 commit a7671312b112c5ce8be2a3f3b2228acf7234614e
Showing 2 changed files with 19 additions and 2 deletions.
@@ -1,3 +1,20 @@
2008-08-21 Timothy Hatcher <timothy@apple.com>

Make deleting all text while editing a DOM attribute in
the Inspector delete the attribute. This also fixes
an exception that would happen before.

https://bugs.webkit.org/show_bug.cgi?id=20472

Reviewed by Kevin McCullough.

* page/inspector/ElementsPanel.js:
(WebInspector.DOMNodeTreeElement.prototype._attributeEditingCommitted):
Don't check for hasAttributes on the parseElement, continuing
through the function will correctly remove the attribute.
If the parseElement is null, call _editingCancelled not
editingCancelled, this fixes an exception.

2008-08-21 Timothy Hatcher <timothy@apple.com>

Update the Inspector's Metrics pane when editing in
@@ -1384,8 +1384,8 @@ WebInspector.DOMNodeTreeElement.prototype = {
var parseContainerElement = document.createElement("span");
parseContainerElement.innerHTML = "<span " + newText + "></span>";
var parseElement = parseContainerElement.firstChild;
if (!parseElement || !parseElement.hasAttributes()) {
editingCancelled(element, context);
if (!parseElement) {
this._editingCancelled(element, attributeName);
return;
}

0 comments on commit a767131

Please sign in to comment.