Title: [246621] trunk
- Revision
- 246621
- Author
- [email protected]
- Date
- 2019-06-19 17:40:27 -0700 (Wed, 19 Jun 2019)
Log Message
REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues
https://bugs.webkit.org/show_bug.cgi?id=198505
<rdar://problem/51374780>
Reviewed by Matt Baker.
Source/WebInspectorUI:
Since r240946, setting WI.CSSStyleDeclaration.prototype.text updates the text immediately.
When WI.CSSStyleDeclaration.prototype.update gets called after setting text, it exits early
without firing WI.CSSStyleDeclaration.Event.PropertiesChanged.
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.set text):
LayoutTests:
* inspector/css/modify-css-property.html:
Listen for PropertiesChanged on the specific inline style declaration.
In Debug, PropertiesChanged may fire on a computed style declaration first,
causing the test to fail.
* inspector/css/pseudo-element-matches-for-pseudo-element-node.html:
Drive-by: fix trailing white space.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (246620 => 246621)
--- trunk/LayoutTests/ChangeLog 2019-06-20 00:38:20 UTC (rev 246620)
+++ trunk/LayoutTests/ChangeLog 2019-06-20 00:40:27 UTC (rev 246621)
@@ -1,3 +1,19 @@
+2019-06-19 Nikita Vasilyev <[email protected]>
+
+ REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues
+ https://bugs.webkit.org/show_bug.cgi?id=198505
+ <rdar://problem/51374780>
+
+ Reviewed by Matt Baker.
+
+ * inspector/css/modify-css-property.html:
+ Listen for PropertiesChanged on the specific inline style declaration.
+ In Debug, PropertiesChanged may fire on a computed style declaration first,
+ causing the test to fail.
+
+ * inspector/css/pseudo-element-matches-for-pseudo-element-node.html:
+ Drive-by: fix trailing white space.
+
2019-06-19 Ryan Haddad <[email protected]>
REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer-vertex.html are failing
Modified: trunk/LayoutTests/inspector/css/modify-css-property.html (246620 => 246621)
--- trunk/LayoutTests/inspector/css/modify-css-property.html 2019-06-20 00:38:20 UTC (rev 246620)
+++ trunk/LayoutTests/inspector/css/modify-css-property.html 2019-06-20 00:40:27 UTC (rev 246621)
@@ -117,7 +117,7 @@
let styleDeclaration = getInlineStyleDeclaration();
- WI.CSSStyleDeclaration.awaitEvent(WI.CSSStyleDeclaration.Event.PropertiesChanged).then((event) => {
+ styleDeclaration.awaitEvent(WI.CSSStyleDeclaration.Event.PropertiesChanged).then((event) => {
InspectorTest.expectThat(!styleDeclaration.locked, `Style declaration is unlocked.`);
InspectorTest.expectEqual(getProperty("width").rawValue, "200px", `"width" property value should update to "200px".`);
InspectorTest.expectEqual(styleDeclaration.text, `width: 200px;`, `Inline style declaration text should update when not locked.`);
Modified: trunk/LayoutTests/inspector/css/pseudo-element-matches-for-pseudo-element-node.html (246620 => 246621)
--- trunk/LayoutTests/inspector/css/pseudo-element-matches-for-pseudo-element-node.html 2019-06-20 00:38:20 UTC (rev 246620)
+++ trunk/LayoutTests/inspector/css/pseudo-element-matches-for-pseudo-element-node.html 2019-06-20 00:40:27 UTC (rev 246621)
@@ -34,7 +34,7 @@
}
}
- InspectorTest.completeTest();
+ InspectorTest.completeTest();
}
WI.domManager.requestDocument(function(documentNode) {
Modified: trunk/Source/WebInspectorUI/ChangeLog (246620 => 246621)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-06-20 00:38:20 UTC (rev 246620)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-06-20 00:40:27 UTC (rev 246621)
@@ -1,3 +1,19 @@
+2019-06-19 Nikita Vasilyev <[email protected]>
+
+ REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues
+ https://bugs.webkit.org/show_bug.cgi?id=198505
+ <rdar://problem/51374780>
+
+ Reviewed by Matt Baker.
+
+ Since r240946, setting WI.CSSStyleDeclaration.prototype.text updates the text immediately.
+ When WI.CSSStyleDeclaration.prototype.update gets called after setting text, it exits early
+ without firing WI.CSSStyleDeclaration.Event.PropertiesChanged.
+
+ * UserInterface/Models/CSSStyleDeclaration.js:
+ (WI.CSSStyleDeclaration):
+ (WI.CSSStyleDeclaration.prototype.set text):
+
2019-06-19 Matt Baker <[email protected]>
Web Inspector: Remove unused _pendingFilter from NetworkTableContentView
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js (246620 => 246621)
--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js 2019-06-20 00:38:20 UTC (rev 246620)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js 2019-06-20 00:40:27 UTC (rev 246621)
@@ -42,6 +42,7 @@
this._initialState = null;
this._updatesInProgressCount = 0;
+ this._pendingPropertiesChanged = false;
this._locked = false;
this._pendingProperties = [];
this._propertyNameMap = {};
@@ -183,9 +184,11 @@
// Don't fire the event if text hasn't changed. However, it should still fire for Computed style declarations
// because it never has text.
- if (oldText === this._text && this._type !== WI.CSSStyleDeclaration.Type.Computed)
+ if (oldText === this._text && !this._pendingPropertiesChanged && this._type !== WI.CSSStyleDeclaration.Type.Computed)
return;
+ this._pendingPropertiesChanged = false;
+
function delayed()
{
this.dispatchEventToListeners(WI.CSSStyleDeclaration.Event.PropertiesChanged);
@@ -237,6 +240,7 @@
clearTimeout(timeoutId);
timeoutId = null;
this._updatesInProgressCount = Math.max(0, this._updatesInProgressCount - 1);
+ this._pendingPropertiesChanged = true;
};
this._nodeStyles.changeStyleText(this, text, styleTextDidChange);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes