Changeset 239404 in webkit
- Timestamp:
- Dec 19, 2018, 4:31:27 PM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
Localizations/en.lproj/localizedStrings.js (modified) (1 diff)
-
UserInterface/Views/AuditTestGroupContentView.css (modified) (2 diffs)
-
UserInterface/Views/AuditTestGroupContentView.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r239399 r239404 1 2018-12-19 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Audit: provide localization support for % pass display 4 https://bugs.webkit.org/show_bug.cgi?id=192870 5 <rdar://problem/46779245> 6 7 Reviewed by Brian Burg. 8 9 * UserInterface/Views/AuditTestGroupContentView.js: 10 (WI.AuditTestGroupContentView.prototype.initialLayout): 11 (WI.AuditTestGroupContentView.prototype.layout): 12 * UserInterface/Views/AuditTestGroupContentView.css: 13 (.content-view.audit-test-group > header > .percentage-pass): 14 (.content-view.audit-test-group > header > .percentage-pass > span): Added. 15 (@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass): Added. 16 (@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass > span): Added. 17 (.content-view.audit-test-group > header > .percentage-pass:not(:empty)::after): Deleted. 18 19 * Localizations/en.lproj/localizedStrings.js: 20 1 21 2018-12-19 Nikita Vasilyev <nvasilyev@apple.com> 2 22 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r239397 r239404 57 57 localizedStrings["%s eval\n%s async"] = "%s eval\n%s async"; 58 58 localizedStrings["%s interval"] = "%s interval"; 59 localizedStrings["%s%%"] = "%s%%"; 59 60 localizedStrings["(Action %s)"] = "(Action %s)"; 60 61 localizedStrings["(Disk)"] = "(Disk)"; -
trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.css
r238333 r239404 123 123 width: var(--metadata-width); 124 124 -webkit-margin-start: var(--audit-test-horizontal-space); 125 font-size: 24px;125 font-size: 16px; 126 126 text-align: center; 127 127 font-weight: bold; 128 opacity: 0.65; 128 /* FIXME: Use CSS4 color blend functions once they're available. */ 129 color: hsla(0, 0%, 0%, 0.5); 129 130 } 130 131 131 .content-view.audit-test-group > header > .percentage-pass :not(:empty)::after{132 content: "%";133 font-size: 16px;134 opacity: 0.75;132 .content-view.audit-test-group > header > .percentage-pass > span { 133 font-size: 24px; 134 /* FIXME: Use CSS4 color blend functions once they're available. */ 135 color: hsla(0, 0%, 0%, 0.65); 135 136 } 136 137 … … 144 145 margin-bottom: var(--audit-test-vertical-space); 145 146 } 147 148 @media (prefers-dark-interface) { 149 .content-view.audit-test-group > header > .percentage-pass { 150 /* FIXME: Use CSS4 color blend functions once they're available. */ 151 color: hsla(0, 0%, 88%, 0.5); 152 } 153 154 .content-view.audit-test-group > header > .percentage-pass > span { 155 /* FIXME: Use CSS4 color blend functions once they're available. */ 156 color: hsla(0, 0%, 88%, 0.65); 157 } 158 } -
trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js
r239286 r239404 60 60 this.headerView.addSubview(this._levelNavigationBar); 61 61 62 this._percentageTextElement = this.headerView.element.appendChild(document.createElement("div")); 63 this._percentageTextElement.classList.add("percentage-pass"); 64 this.headerView.element.appendChild(this._percentageTextElement); 62 this._percentageContainer = this.headerView.element.appendChild(document.createElement("div")); 63 this._percentageContainer.classList.add("percentage-pass"); 64 this._percentageContainer.hidden = true; 65 66 this._percentageTextElement = document.createElement("span"); 67 68 String.format(WI.UIString("%s%%"), [this._percentageTextElement], String.standardFormatters, this._percentageContainer, (a, b) => { 69 a.append(b); 70 return a; 71 }); 65 72 } 66 73 … … 79 86 } 80 87 88 this._percentageContainer.hidden = true; 81 89 this._percentageTextElement.textContent = ""; 82 90 … … 94 102 let totalCount = Object.values(levelCounts).reduce((accumulator, current) => accumulator + current); 95 103 this._percentageTextElement.textContent = Math.floor(100 * levelCounts[WI.AuditTestCaseResult.Level.Pass] / totalCount); 104 this._percentageContainer.hidden = false; 96 105 97 106 if (!this._levelScopeBar) {
Note:
See TracChangeset
for help on using the changeset viewer.