Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Issue 2800723002: Ensure we never remove the style attribute when syncing it from CSSOM. (Closed)

Created:
3 years, 8 months ago by emilio
Modified:
3 years, 8 months ago
Reviewers:
meade_UTC10, nainar, esprehn
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, Manuel Rego, do_not_use, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure we never remove the style attribute when syncing it from CSSOM. This makes us align with other browsers when, editing the style attribute, and also with the spec, per[1]: > Mutating the declarations must set the style content attribute on the context > object to the serialization of the declarations See also [2]. Note that this behavior also affects editing. I've just updated the editing tests. [1]: https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-interface [2]: https://github.com/whatwg/html/issues/2306 BUG=686686 Review-Url: https://codereview.chromium.org/2800723002 Cr-Commit-Position: refs/heads/master@{#465181} Committed: https://chromium.googlesource.com/chromium/src/+/4e41fe9e3515a33dc5482e2d628456beb4bd65ef

Patch Set 1 #

Patch Set 2 : Some test expectation updates. #

Patch Set 3 : Some test expectation updates. #

Patch Set 4 : Extra test. #

Patch Set 5 : WPT test expectations. #

Patch Set 6 : WPT test expectations. #

Patch Set 7 : Rebaseline #

Total comments: 1

Patch Set 8 : Nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+410 lines, -3411 lines) Patch
M third_party/WebKit/LayoutTests/custom-elements/spec/callback.html View 1 7 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/5770834-1-expected.txt View 1 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/empty-span-removal-expected.txt View 1 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/remove-format-multiple-elements-mac-expected.txt View 1 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/remove-format-multiple-elements-win-expected.txt View 1 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/script-tests/empty-span-removal.js View 1 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/script-tests/remove-format-multiple-elements-mac.js View 1 7 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/script-tests/remove-format-multiple-elements-win.js View 1 2 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/script-tests/toggle-compound-styles.js View 1 7 2 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/script-tests/toggle-style-2.js View 1 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/toggle-compound-styles-expected.txt View 1 7 4 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/toggle-style-2-expected.txt View 1 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/mouse/click-left-of-rtl-wrapping-text.html View 1 7 9 chunks +11 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/inline-style-container-expected.txt View 1 2 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/push-down-font-styles-mac-expected.txt View 1 2 7 1 chunk +15 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/push-down-font-styles-win-expected.txt View 1 2 7 1 chunk +15 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/push-down-implicit-styles-around-list-mac-expected.txt View 1 2 3 4 7 1 chunk +16 lines, -16 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/push-down-implicit-styles-around-list-win-expected.txt View 1 2 3 4 7 1 chunk +16 lines, -16 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/push-down-implicit-styles-mac-expected.txt View 1 2 3 4 7 1 chunk +19 lines, -19 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/push-down-inline-styles-expected.txt View 1 2 3 4 7 1 chunk +19 lines, -19 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/script-tests/inline-style-container.js View 1 2 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-font-styles-mac.js View 1 2 7 3 chunks +14 lines, -14 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-font-styles-win.js View 1 2 7 3 chunks +14 lines, -14 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-implicit-styles-around-list-mac.js View 1 2 3 4 7 1 chunk +19 lines, -19 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-implicit-styles-around-list-win.js View 1 2 3 4 7 1 chunk +19 lines, -19 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-implicit-styles-mac.js View 1 2 3 4 7 1 chunk +19 lines, -19 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-inline-styles.js View 1 2 3 4 7 1 chunk +18 lines, -18 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic.html View 1 2 3 4 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/toggle-style-bold-italic-mixed-editability.html View 1 2 3 4 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/typing_style.html View 1 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/undo/remove-css-property-and-remove-style.html View 1 2 7 4 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/undo/remove-css-property-and-remove-style-expected.txt View 1 2 7 5 chunks +9 lines, -7 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/cssom/css-style-attribute-modifications-expected.txt View 1 2 3 4 5 7 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/editing/run/backcolor-expected.txt View 1 2 3 4 7 8 chunks +8 lines, -8 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/editing/run/bold-expected.txt View 1 2 3 4 5 6 7 1 chunk +0 lines, -3016 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/editing/run/fontsize-expected.txt View 1 2 3 4 7 15 chunks +15 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/editing/run/forecolor-expected.txt View 1 2 3 4 7 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/editing/run/hilitecolor-expected.txt View 1 2 3 4 7 8 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/editing/run/removeformat-expected.txt View 1 2 3 4 7 8 chunks +8 lines, -8 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/css-style-attribute-modifications.html View 1 2 3 7 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-execcommand.html View 1 7 1 chunk +2 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/platform/mac/external/wpt/editing/run/bold-expected.txt View 1 2 3 4 5 6 7 7 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/external/wpt/editing/run/italic-expected.txt View 1 2 3 4 5 6 7 4 chunks +4 lines, -4 lines 0 comments Download
A + third_party/WebKit/LayoutTests/platform/mac/external/wpt/editing/run/justifycenter-expected.txt View 1 2 3 4 5 6 7 4 chunks +4 lines, -4 lines 0 comments Download
A + third_party/WebKit/LayoutTests/platform/mac/external/wpt/editing/run/justifyfull-expected.txt View 1 2 3 4 5 6 7 4 chunks +4 lines, -4 lines 0 comments Download
A + third_party/WebKit/LayoutTests/platform/mac/external/wpt/editing/run/justifyright-expected.txt View 1 2 3 4 5 6 7 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/external/wpt/editing/run/strikethrough-expected.txt View 1 2 3 4 5 6 7 10 chunks +10 lines, -10 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/external/wpt/editing/run/underline-expected.txt View 1 2 3 4 5 6 7 9 chunks +9 lines, -9 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/bold-expected.txt View 1 2 3 4 7 7 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/italic-expected.txt View 1 2 3 4 7 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/justifycenter-expected.txt View 1 2 3 4 7 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/justifyfull-expected.txt View 1 2 3 4 7 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/justifyright-expected.txt View 1 2 3 4 7 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/strikethrough-expected.txt View 1 2 3 4 7 10 chunks +10 lines, -10 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/underline-expected.txt View 1 2 3 4 7 9 chunks +9 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 48 (33 generated)
emilio
Hi esprehn@, I've put this up to attempt to fix issue 686686. I wonder if ...
3 years, 8 months ago (2017-04-06 00:19:51 UTC) #13
esprehn
What do other browsers do? What does the spec say? As an author I guess ...
3 years, 8 months ago (2017-04-06 00:25:38 UTC) #14
emilio
On 2017/04/06 00:25:38, esprehn wrote: > What do other browsers do? What does the spec ...
3 years, 8 months ago (2017-04-06 01:04:46 UTC) #15
esprehn
Your bots are red btw, meade@ or nainar@ should look at the patch too to ...
3 years, 8 months ago (2017-04-07 00:04:58 UTC) #17
nainar
On 2017/04/07 at 00:04:58, esprehn wrote: > Your bots are red btw, meade@ or nainar@ ...
3 years, 8 months ago (2017-04-07 00:47:21 UTC) #18
meade_UTC10
Also, could you please update your CL title and description with why this needs doing? ...
3 years, 8 months ago (2017-04-11 05:05:01 UTC) #27
emilio
On 2017/04/11 05:05:01, Eddy_UTC10 wrote: > Also, could you please update your CL title and ...
3 years, 8 months ago (2017-04-17 11:40:52 UTC) #32
nainar
lgtm
3 years, 8 months ago (2017-04-18 00:34:04 UTC) #35
emilio
On 2017/04/18 00:34:04, nainar wrote: > lgtm Thanks for the review! :)
3 years, 8 months ago (2017-04-18 00:44:11 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2800723002/120001
3 years, 8 months ago (2017-04-18 00:44:11 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/413271)
3 years, 8 months ago (2017-04-18 00:53:39 UTC) #40
nainar
On 2017/04/18 at 00:53:39, commit-bot wrote: > Try jobs failed on following builders: > chromium_presubmit ...
3 years, 8 months ago (2017-04-18 01:03:02 UTC) #41
esprehn
lgtm w/ nit. https://codereview.chromium.org/2800723002/diff/120001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2800723002/diff/120001/third_party/WebKit/Source/core/dom/Element.cpp#newcode4018 third_party/WebKit/Source/core/dom/Element.cpp:4018: styleAttr, AtomicString(inline_style ? inline_style->AsText() : "")); ...
3 years, 8 months ago (2017-04-18 01:57:01 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2800723002/130001
3 years, 8 months ago (2017-04-18 07:22:37 UTC) #45
commit-bot: I haz the power
3 years, 8 months ago (2017-04-18 08:57:45 UTC) #48
Message was sent while issue was closed.
Committed patchset #8 (id:130001) as
https://chromium.googlesource.com/chromium/src/+/4e41fe9e3515a33dc5482e2d6284...

Powered by Google App Engine
This is Rietveld 408576698