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