WebKit Bugzilla
Attachment 372355 Details for
Bug 198505
: REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.txt (text/plain), 5.15 KB, created by
Nikita Vasilyev
on 2019-06-18 11:39:06 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Nikita Vasilyev
Created:
2019-06-18 11:39:06 PDT
Size:
5.15 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 7676916c4af..5b623b48cac 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,19 @@ >+2019-06-18 Nikita Vasilyev <nvasilyev@apple.com> >+ >+ REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues >+ https://bugs.webkit.org/show_bug.cgi?id=198505 >+ <rdar://problem/51374780> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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-15 Rob Buis <rbuis@igalia.com> > > Add tests for prefetch redirects >diff --git a/LayoutTests/inspector/css/modify-css-property.html b/LayoutTests/inspector/css/modify-css-property.html >index 69fc80815bc..32ffd9a7aa3 100644 >--- a/LayoutTests/inspector/css/modify-css-property.html >+++ b/LayoutTests/inspector/css/modify-css-property.html >@@ -117,7 +117,7 @@ function test() { > > 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.`); >diff --git a/LayoutTests/inspector/css/pseudo-element-matches-for-pseudo-element-node.html b/LayoutTests/inspector/css/pseudo-element-matches-for-pseudo-element-node.html >index 3189f2af0a0..1ca26d06a20 100644 >--- a/LayoutTests/inspector/css/pseudo-element-matches-for-pseudo-element-node.html >+++ b/LayoutTests/inspector/css/pseudo-element-matches-for-pseudo-element-node.html >@@ -34,7 +34,7 @@ function test() { > } > } > >- InspectorTest.completeTest(); >+ InspectorTest.completeTest(); > } > > WI.domManager.requestDocument(function(documentNode) { >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 926b90cc677..2958a9e2624 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,19 @@ >+2019-06-18 Nikita Vasilyev <nvasilyev@apple.com> >+ >+ REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues >+ https://bugs.webkit.org/show_bug.cgi?id=198505 >+ <rdar://problem/51374780> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-13 Devin Rousso <drousso@apple.com> > > Web Inspector: REGRESSION(r246178): extra spaces added in at-rules when formatting CSS >diff --git a/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js b/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js >index e03160439f0..6be328f5bb8 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js >+++ b/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js >@@ -42,6 +42,7 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object > > this._initialState = null; > this._updatesInProgressCount = 0; >+ this._pendingPropertiesChanged = false; > this._locked = false; > this._pendingProperties = []; > this._propertyNameMap = {}; >@@ -183,9 +184,11 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object > > // 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 @@ WI.CSSStyleDeclaration = class CSSStyleDeclaration extends WI.Object > clearTimeout(timeoutId); > timeoutId = null; > this._updatesInProgressCount = Math.max(0, this._updatesInProgressCount - 1); >+ this._pendingPropertiesChanged = true; > }; > > this._nodeStyles.changeStyleText(this, text, styleTextDidChange);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198505
:
371683
|
371688
|
371690
|
371694
|
371783
|
371814
|
372003
|
372011
|
372203
|
372208
|
372308
|
372318
| 372355 |
372362
|
372394