WebInspector: Switch hide element shortcut in ElementsPanel to use a selector
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Mar 2013 01:58:44 +0000 (01:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Mar 2013 01:58:44 +0000 (01:58 +0000)
commit0d85fbb970075417a2324aa01d8dbfcf90663a14
tree6aaeda4ba5c943c632c17d16fdb30f79484babbe
parent7ec6616928425e266d38897e0d3031b2d4eae5b4
WebInspector: Switch hide element shortcut in ElementsPanel to use a selector
https://bugs.webkit.org/show_bug.cgi?id=110641

Patch by Eberhard Graether <egraether@google.com> on 2013-02-28
Reviewed by Pavel Feldman.

This change switches the shortcut for adding visibility:hidden to an element's style
to toggling a class name on the element and injecting a style rule into the element's
document instead. This way it is possible to change the visibility of all child
elements as well.

Test: inspector/elements/hide-shortcut.html

Source/WebCore:

* inspector/front-end/CSSStyleModel.js:
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeOutline.prototype._onkeydown):
(WebInspector.ElementsTreeOutline.prototype.resolvedNode.toggleClassAndInjectStyleRule):
(WebInspector.ElementsTreeOutline.prototype.):
(WebInspector.ElementsTreeOutline.prototype._toggleHideShortcut):

LayoutTests:

* inspector/elements/hide-shortcut-expected.txt: Added.
* inspector/elements/hide-shortcut.html: Added.
* inspector/elements/resources/hide-shortcut-iframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/elements/hide-shortcut-expected.txt [new file with mode: 0644]
LayoutTests/inspector/elements/hide-shortcut.html [new file with mode: 0644]
LayoutTests/inspector/elements/resources/hide-shortcut-iframe.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/CSSStyleModel.js
Source/WebCore/inspector/front-end/ElementsTreeOutline.js