Changeset 259842 in webkit
- Timestamp:
- Apr 9, 2020, 5:40:02 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r259810 r259842 1 2020-04-09 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Storage: should be able to set a cookie with no value 4 https://bugs.webkit.org/show_bug.cgi?id=210237 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/Views/CookiePopover.js: 9 (WI.CookiePopover.prototype.get serializedData): 10 Require an explicitly set `name` instead of falling back to the `placeholder`. Allow the 11 `value` to be an empty string. 12 13 (WI.CookiePopover.prototype.show): 14 Don't have default placeholder values for `name` or `value` for the reasons above. 15 Drive-by: if an existing `WI.Cookie` is provided, use its `SameSite` value. 16 17 * UserInterface/Views/CookiePopover.css: Added. 18 (.popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"]):matches(:invalid, .invalid)): Added. 19 (.popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"]).invalid): Deleted. 20 Instead of changing the text color, change the border color. 21 1 22 2020-04-09 Devin Rousso <drousso@apple.com> 2 23 -
trunk/Source/WebInspectorUI/UserInterface/Views/CookiePopover.css
r259173 r259842 57 57 } 58 58 59 .popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"]) .invalid{60 color: var(--error-text-color);59 .popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"]):matches(:invalid, .invalid) { 60 border-color: var(--error-text-color); 61 61 } 62 62 -
trunk/Source/WebInspectorUI/UserInterface/Views/CookiePopover.js
r259173 r259842 52 52 return null; 53 53 54 let name = this._nameInputElement.value || this._nameInputElement.placeholder;54 let name = this._nameInputElement.value; 55 55 if (!name) 56 return null;57 58 let value = this._valueInputElement.value || this._valueInputElement.placeholder;59 if (!value)60 56 return null; 61 57 … … 84 80 let data = { 85 81 name, 86 value ,82 value: this._valueInputElement.value, 87 83 domain, 88 84 path, … … 125 121 } else { 126 122 let urlComponents = WI.networkManager.mainFrame.mainResource.urlComponents; 127 data.name = WI.unlocalizedString("name");128 data.value = WI.unlocalizedString("value");123 data.name = ""; 124 data.value = ""; 129 125 data.domain = urlComponents.host; 130 126 data.path = urlComponents.path; … … 181 177 182 178 this._nameInputElement = createInputRow("name", WI.UIString("Name"), "text", data.name).inputElement; 179 this._nameInputElement.required = true; 183 180 184 181 this._valueInputElement = createInputRow("value", WI.UIString("Value"), "text", data.value).inputElement; … … 203 200 for (let sameSiteType of Object.values(WI.Cookie.SameSiteType)) { 204 201 let optionElement = this._sameSiteSelectElement.appendChild(document.createElement("option")); 205 optionElement.textContent = sameSiteType; 206 } 202 optionElement.value = sameSiteType; 203 optionElement.textContent = WI.Cookie.displayNameForSameSiteType(sameSiteType); 204 } 205 this._sameSiteSelectElement.value = data.sameSite; 207 206 createRow("same-site", WI.unlocalizedString("SameSite"), this._sameSiteSelectElement); 208 207
Note:
See TracChangeset
for help on using the changeset viewer.