WebKit Bugzilla
Attachment 340609 Details for
Bug 177684
: Cannot unset transition with important
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-177684-20180517202630.patch (text/plain), 10.54 KB, created by
Rob Buis
on 2018-05-17 11:26:31 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2018-05-17 11:26:31 PDT
Size:
10.54 KB
patch
obsolete
>Subversion Revision: 231899 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d472ea59af1b99361eb78a2c8f87ec98abcd2a21..29a3c0b51fdb56a54ece3c35ae4eb70c1522edd8 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-05-17 Rob Buis <rbuis@igalia.com> >+ >+ Cannot unset transition with important >+ https://bugs.webkit.org/show_bug.cgi?id=177684 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make removeProperty remove the property regardless >+ if it was set using !important [1]. >+ >+ The new behavior is consistent with Firefox, Chrome and Edge. >+ >+ [1] https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-removeproperty >+ >+ Test: web-platform-tests/cssom/cssom-setProperty-shorthand.html >+ >+ * css/StyleProperties.cpp: >+ (WebCore::MutableStyleProperties::removePropertiesInSet): >+ > 2018-05-17 Antoine Quint <graouts@apple.com> > > [modern-media-controls] AirPlaySupport should be disabled by default >diff --git a/Source/WebCore/css/StyleProperties.cpp b/Source/WebCore/css/StyleProperties.cpp >index 3c8ce43b357d2c4ed787f79c5b0684df7864d260..30dbeb42b6b5a67a06fa9c65e0fdfc6deccf9086 100644 >--- a/Source/WebCore/css/StyleProperties.cpp >+++ b/Source/WebCore/css/StyleProperties.cpp >@@ -1227,8 +1227,7 @@ bool MutableStyleProperties::removePropertiesInSet(const CSSPropertyID* set, uns > toRemove.add(set[i]); > > return m_propertyVector.removeAllMatching([&toRemove] (const CSSProperty& property) { >- // Not quite sure if the isImportant test is needed but it matches the existing behavior. >- return !property.isImportant() && toRemove.contains(property.id()); >+ return toRemove.contains(property.id()); > }) > 0; > } > >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index a23217ef98c7eb98ad79f951989a00e7c577d08a..4c43b40d68b56bae8b4d275aed4cc1937097810c 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-17 Rob Buis <rbuis@igalia.com> >+ >+ Cannot unset transition with important >+ https://bugs.webkit.org/show_bug.cgi?id=177684 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Import manually the updated test and result. >+ >+ * web-platform-tests/cssom/cssom-setProperty-shorthand-expected.txt: >+ * web-platform-tests/cssom/cssom-setProperty-shorthand.html: >+ > 2018-05-16 Chris Nardi <cnardi@chromium.org> > > Remove Document#selectedStylesheetSet/preferredStylesheetSet >diff --git a/LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand-expected.txt >index 038d22e78d9b4e38fad2ddbaa43795813d6e30a0..97663b57a7e2742c329a59e09d84d91f05e7765c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand-expected.txt >@@ -1,40 +1,78 @@ > > PASS shorthand font can be set with setProperty > PASS shorthand font can be removed with removeProperty >+PASS shorthand font can be set with setProperty and priority !important >+PASS shorthand font can be removed with removeProperty even when set with !important > PASS shorthand border-top can be set with setProperty > PASS shorthand border-top can be removed with removeProperty >+PASS shorthand border-top can be set with setProperty and priority !important >+PASS shorthand border-top can be removed with removeProperty even when set with !important > PASS shorthand border-right can be set with setProperty > PASS shorthand border-right can be removed with removeProperty >+PASS shorthand border-right can be set with setProperty and priority !important >+PASS shorthand border-right can be removed with removeProperty even when set with !important > PASS shorthand border-bottom can be set with setProperty > PASS shorthand border-bottom can be removed with removeProperty >+PASS shorthand border-bottom can be set with setProperty and priority !important >+PASS shorthand border-bottom can be removed with removeProperty even when set with !important > PASS shorthand border-left can be set with setProperty > PASS shorthand border-left can be removed with removeProperty >+PASS shorthand border-left can be set with setProperty and priority !important >+PASS shorthand border-left can be removed with removeProperty even when set with !important > PASS shorthand border can be set with setProperty > PASS shorthand border can be removed with removeProperty >+PASS shorthand border can be set with setProperty and priority !important >+PASS shorthand border can be removed with removeProperty even when set with !important > PASS shorthand border-color can be set with setProperty > PASS shorthand border-color can be removed with removeProperty >+PASS shorthand border-color can be set with setProperty and priority !important >+PASS shorthand border-color can be removed with removeProperty even when set with !important > PASS shorthand border-style can be set with setProperty > PASS shorthand border-style can be removed with removeProperty >+PASS shorthand border-style can be set with setProperty and priority !important >+PASS shorthand border-style can be removed with removeProperty even when set with !important > PASS shorthand border-width can be set with setProperty > PASS shorthand border-width can be removed with removeProperty >+PASS shorthand border-width can be set with setProperty and priority !important >+PASS shorthand border-width can be removed with removeProperty even when set with !important > PASS shorthand background-position can be set with setProperty > PASS shorthand background-position can be removed with removeProperty >+PASS shorthand background-position can be set with setProperty and priority !important >+PASS shorthand background-position can be removed with removeProperty even when set with !important > PASS shorthand background-repeat can be set with setProperty > PASS shorthand background-repeat can be removed with removeProperty >+PASS shorthand background-repeat can be set with setProperty and priority !important >+PASS shorthand background-repeat can be removed with removeProperty even when set with !important > PASS shorthand border-spacing can be set with setProperty > PASS shorthand border-spacing can be removed with removeProperty >+PASS shorthand border-spacing can be set with setProperty and priority !important >+PASS shorthand border-spacing can be removed with removeProperty even when set with !important > PASS shorthand list-style can be set with setProperty > PASS shorthand list-style can be removed with removeProperty >+PASS shorthand list-style can be set with setProperty and priority !important >+PASS shorthand list-style can be removed with removeProperty even when set with !important > PASS shorthand margin can be set with setProperty > PASS shorthand margin can be removed with removeProperty >+PASS shorthand margin can be set with setProperty and priority !important >+PASS shorthand margin can be removed with removeProperty even when set with !important > PASS shorthand outline can be set with setProperty > PASS shorthand outline can be removed with removeProperty >+PASS shorthand outline can be set with setProperty and priority !important >+PASS shorthand outline can be removed with removeProperty even when set with !important > PASS shorthand padding can be set with setProperty > PASS shorthand padding can be removed with removeProperty >+PASS shorthand padding can be set with setProperty and priority !important >+PASS shorthand padding can be removed with removeProperty even when set with !important > PASS shorthand background can be set with setProperty > PASS shorthand background can be removed with removeProperty >+PASS shorthand background can be set with setProperty and priority !important >+PASS shorthand background can be removed with removeProperty even when set with !important > PASS shorthand overflow can be set with setProperty > PASS shorthand overflow can be removed with removeProperty >+PASS shorthand overflow can be set with setProperty and priority !important >+PASS shorthand overflow can be removed with removeProperty even when set with !important > PASS shorthand border-radius can be set with setProperty > PASS shorthand border-radius can be removed with removeProperty >+PASS shorthand border-radius can be set with setProperty and priority !important >+PASS shorthand border-radius can be removed with removeProperty even when set with !important > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand.html b/LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand.html >index fe2ad4731a1e76b806e020bb12e3eb04eb9c9211..4c0f9a2f9392bd8e85c2d092db382fcc0cc06c2e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand.html >@@ -42,8 +42,8 @@ > > element = document.createElement('span'); > >- function canSetProperty(propertyName) { >- element.style.setProperty(propertyName, 'initial'); >+ function canSetProperty(propertyName, priority) { >+ element.style.setProperty(propertyName, 'initial', priority); > return element.style.getPropertyValue(propertyName) == 'initial'; > } > >@@ -56,13 +56,21 @@ > var propertyName = shorthandProperties[i]; > > test(function(){ >- assert_true(canSetProperty(propertyName), 'can setPropertyValue with shorthand'); >+ assert_true(canSetProperty(propertyName, ''), 'can setPropertyValue with shorthand'); > }, 'shorthand ' + propertyName + ' can be set with setProperty'); > > test(function(){ > assert_true(canRemoveProperty(propertyName), 'can setPropertyValue with shorthand'); > }, 'shorthand ' + propertyName + ' can be removed with removeProperty'); > >+ test(function(){ >+ assert_true(canSetProperty(propertyName, 'important'), 'can setPropertyValue with shorthand'); >+ }, 'shorthand ' + propertyName + ' can be set with setProperty and priority !important'); >+ >+ test(function(){ >+ assert_true(canRemoveProperty(propertyName), 'can setPropertyValue with shorthand'); >+ }, 'shorthand ' + propertyName + ' can be removed with removeProperty even when set with !important'); >+ > } > </script> > </body>
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 177684
:
322231
|
340565
|
340575
|
340609
|
340641
|
340681