Changeset 246855 in webkit
- Timestamp:
- Jun 26, 2019 4:25:18 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r246821 r246855 1 2019-06-26 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: REGRESSION: Elements: the forced pseudo-class indicator isn't visible when hovering 4 https://bugs.webkit.org/show_bug.cgi?id=199166 5 6 Reviewed by Matt Baker. 7 8 Make the pseudo-class indicator into its own element instead of being a `::before`. 9 10 * UserInterface/Views/DOMTreeElement.js: 11 (WI.DOMTreeElement): 12 (WI.DOMTreeElement.prototype.updateSelectionArea): 13 (WI.DOMTreeElement.prototype.updateTitle): 14 (WI.DOMTreeElement.prototype._updatePseudoClassIndicator): Added. 15 (WI.DOMTreeElement.prototype.get pseudoClassesEnabled): Deleted. 16 (WI.DOMTreeElement.prototype._nodePseudoClassesDidChange): Deleted. 17 18 * UserInterface/Views/DOMTreeOutline.css: 19 (.tree-outline.dom): 20 (.tree-outline.dom li .pseudo-class-indicator): Added. 21 (body[dir=ltr] .tree-outline.dom li .pseudo-class-indicator): Added. 22 (body[dir=rtl] .tree-outline.dom li .pseudo-class-indicator): Added. 23 (.tree-outline.dom:focus li.selected .pseudo-class-indicator): Added. 24 (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted. 25 (body[dir=ltr] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted. 26 (body[dir=rtl] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted. 27 (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before): Deleted. 28 29 * UserInterface/Views/FormattedValue.css: 30 (.formatted-node > .tree-outline.dom): 31 Adjust the indent of any `DOMTreeOutline` so there's more room for the pseudo-class 32 indicator, such as in the Console. 33 1 34 2019-06-25 Matt Baker <mattbaker@apple.com> 2 35 -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.css
r243781 r246855 35 35 -webkit-padding-start: 20px; 36 36 37 --item-pseudo-class- enabled-selection-before-start: 17px;37 --item-pseudo-class-indicator-start: 17px; 38 38 } 39 39 -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js
r246658 r246855 53 53 this._closeTagTreeElement = null; 54 54 55 node.addEventListener(WI.DOMNode.Event.EnabledPseudoClassesChanged, this._ nodePseudoClassesDidChange, this);55 node.addEventListener(WI.DOMNode.Event.EnabledPseudoClassesChanged, this._updatePseudoClassIndicator, this); 56 56 57 57 this._ignoreSingleTextChild = false; … … 394 394 // If there's no reason to have a selection area, remove the DOM element. 395 395 let indicatesTreeOutlineState = this.treeOutline && (this.treeOutline.dragOverTreeElement === this || this.selected || this._animatingHighlight); 396 if (!this.hovered && ! this.pseudoClassesEnabled && !indicatesTreeOutlineState) {396 if (!this.hovered && !indicatesTreeOutlineState) { 397 397 if (this._selectionElement) { 398 398 this._selectionElement.remove(); … … 1293 1293 this.updateSelectionArea(); 1294 1294 this._highlightSearchResults(); 1295 this._updatePseudoClassIndicator(); 1295 1296 this._updateBreakpointStatus(); 1296 1297 } … … 1841 1842 } 1842 1843 1843 get pseudoClassesEnabled()1844 {1845 return !!this.representedObject.enabledPseudoClasses.length;1846 }1847 1848 1844 get isNodeHidden() 1849 1845 { … … 1852 1848 } 1853 1849 1854 _nodePseudoClassesDidChange(event) 1855 { 1856 if (this._elementCloseTag) 1857 return; 1858 1859 this.updateSelectionArea(); 1860 this.listItemElement.classList.toggle("pseudo-class-enabled", !!this.representedObject.enabledPseudoClasses.length); 1850 _updatePseudoClassIndicator() 1851 { 1852 if (!this.listItemElement || this._elementCloseTag) 1853 return; 1854 1855 if (this.representedObject.enabledPseudoClasses.length) { 1856 if (!this._pseudoClassIndicatorElement) { 1857 this._pseudoClassIndicatorElement = document.createElement("div"); 1858 this._pseudoClassIndicatorElement.classList.add("pseudo-class-indicator"); 1859 } 1860 this.listItemElement.insertBefore(this._pseudoClassIndicatorElement, this.listItemElement.firstChild); 1861 } else { 1862 if (this._pseudoClassIndicatorElement) { 1863 this._pseudoClassIndicatorElement.remove(); 1864 this._pseudoClassIndicatorElement = null; 1865 } 1866 } 1861 1867 } 1862 1868 -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css
r245497 r246855 39 39 color: var(--text-color); 40 40 41 --item-pseudo-class- enabled-selection-before-start: 2px;41 --item-pseudo-class-indicator-start: 2px; 42 42 43 43 --sublist-margin-start: 4px; … … 132 132 } 133 133 134 .tree-outline.dom li .pseudo-class-enabled > .selection-area::before{134 .tree-outline.dom li .pseudo-class-indicator { 135 135 display: inline-block; 136 136 position: absolute; 137 top: 4px;138 137 width: 5px; 139 138 height: 5px; 139 margin-top: 4px; 140 140 content: ""; 141 141 background-color: var(--glyph-color-active); … … 143 143 } 144 144 145 body[dir=ltr] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before { 146 left: var(--item-pseudo-class-enabled-selection-before-start); 147 } 148 149 body[dir=rtl] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before { 150 right: var(--item-pseudo-class-enabled-selection-before-start); 145 body[dir=ltr] .tree-outline.dom li .pseudo-class-indicator { 146 left: var(--item-pseudo-class-indicator-start); 147 } 148 149 body[dir=rtl] .tree-outline.dom li .pseudo-class-indicator { 150 right: var(--item-pseudo-class-indicator-start); 151 } 152 153 .tree-outline.dom:focus li.selected .pseudo-class-indicator { 154 background-color: var(--selected-foreground-color); 151 155 } 152 156 … … 157 161 .tree-outline.dom:focus li.selected { 158 162 color: white; 159 }160 161 .tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before {162 background-color: hsl(0, 100%, 100%);163 163 } 164 164 -
trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css
r244327 r246855 66 66 display: block !important; 67 67 padding: 0; 68 margin-left: -2px; 68 69 --item-pseudo-class-indicator-start: -2px; 69 70 } 70 71
Note: See TracChangeset
for help on using the changeset viewer.