* SUMMARY DOMTree Keyboard Shortcut 'H' to toggle element visibility is not working. This regressed with r179286 which removed CSSProperty.value setters and related protocol methods. * TEST <div style="width: 100px; height: 100px; background: blue"></div> <div style="width: 100px; height: 100px; background: green"></div> * STEPS TO REPRODUCE 1. Inspect the top div on the test page 2. Input 'H' keyboard shortcut => expected element to hide, it did not * NOTES - Uncaught exception. CSSProperty.value setter doesn't exist. - Chrome/Blink does this in a clever way. Instead of toggling CSS properties, it adds a <style> to the page with a CSS class, and then toggles the class on the element. We can do the same.
<rdar://problem/21085680>
Created attachment 253620 [details] [PATCH] Proposed Fix
Comment on attachment 253620 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=253620&action=review > Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js:571 > + styleElement.textContent = ".__WebInspectorHideElement__, .__WebInspectorHideElement__::before, .__WebInspectorHideElement__::after { visibility: hidden !important; }"; I have a feeling the before/after parts may not be necessary...
Comment on attachment 253620 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=253620&action=review >> Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js:571 >> + styleElement.textContent = ".__WebInspectorHideElement__, .__WebInspectorHideElement__::before, .__WebInspectorHideElement__::after { visibility: hidden !important; }"; > > I have a feeling the before/after parts may not be necessary... Oops it is not. Sorry, I was getting ahead of myself. New patch up soon.
Created attachment 253621 [details] [PATCH] Proposed Fix
Comment on attachment 253621 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=253621&action=review r=me > Source/WebInspectorUI/ChangeLog:11 > + 1. inject a <style> on the page like ".WebInspectorHide { visiblity:hidden }" 'visibility' > Source/WebInspectorUI/ChangeLog:17 > + * UserInterface/Views/DOMTreeOutline.js: Might want to note that the old approach uses different CSS properties to achieve the same thing.
Created attachment 253622 [details] [PATCH] For Landing
Comment on attachment 253622 [details] [PATCH] For Landing Clearing flags on attachment: 253622 Committed r184815: <http://trac.webkit.org/changeset/184815>