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

Issue 1988013003: Move generic shorthand serialization checks out of specific routines (Closed)

Created:
4 years, 7 months ago by Timothy Loh
Modified:
4 years, 7 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, chromium-reviews, dcheng, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@shorthand1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move generic shorthand serialization checks out of specific routines This patch moves generic shorthand serialization checks out of the specific shorthand serialization routines into a single location. For a shorthand to successfully serialize, all longhands must be set and the important flag must be set consistently. If all longhands are the same css-wide keyword (initial or inherit, unset not yet supported properly), then the shorthand serializes to that keyword. If css-wide keywords are otherwise used, the serialization of a shorthand should fail, but currently we allow initial for certain properties. This patch also makes a couple of other changes. These changes would make some behavior incorrect if they are left out or done separately. - No longer skip serializing implicit initial values in cssText. This affects the case where a shorthand is set and other longhands are overridden so we can't serialize as a shorthand. - Remove separate background serialization codepath. Currently we call appendBackgroundPropertyAsText() when serializing cssText if any background properties are present, which serializes either the background shorthand or the longhands individually. This is removed in this patch so we just treat background like any other shorthand, so background properties are no longer moved to the end of cssText and now ordered as output by the parser. This patch will make it easier to fix serialization of unset, and also fix variables references in shorthands (bug 612634). BUG=612363, 471917 Committed: https://crrev.com/9f45f2b736d341572758154cc9c37614ac4a013c Cr-Commit-Position: refs/heads/master@{#395295}

Patch Set 1 #

Total comments: 13

Patch Set 2 : #

Total comments: 2

Patch Set 3 : use string return type #

Patch Set 4 : rebase #

Patch Set 5 : update one more test #

Patch Set 6 : actually fix test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -259 lines) Patch
M third_party/WebKit/LayoutTests/editing/deleting/merge-div-from-span-with-style-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/deleting/merge-paragraph-from-span-with-style-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/pasteboard/data-transfer-items-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/pasteboard/dragstart-contains-default-content-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/pasteboard/onpaste-text-html-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/push-down-inline-styles-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/script-tests/push-down-inline-styles.js View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/background-serialize.html View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/background-serialize-expected.txt View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/cssText-shorthand.html View 1 chunk +6 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/parse-border-image-repeat-null-crash-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/remove-shorthand-expected.txt View 2 chunks +9 lines, -9 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/webkit-mask-crash-implicit-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Range/range-clone-contents-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/ondrop-text-html-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySerializer.h View 1 2 1 chunk +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySerializer.cpp View 1 2 17 chunks +120 lines, -221 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 4 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 32 (17 generated)
Timothy Loh
Sort of a big patch. I tried splitting this up but as mentioned in the ...
4 years, 7 months ago (2016-05-18 07:28:15 UTC) #4
alancutter (OOO until 2018)
https://codereview.chromium.org/1988013003/diff/1/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp File third_party/WebKit/Source/core/css/StylePropertySerializer.cpp (right): https://codereview.chromium.org/1988013003/diff/1/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp#newcode313 third_party/WebKit/Source/core/css/StylePropertySerializer.cpp:313: // "intiial" instead of the initial values for certain ...
4 years, 7 months ago (2016-05-18 07:32:54 UTC) #5
alancutter (OOO until 2018)
https://codereview.chromium.org/1988013003/diff/1/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp File third_party/WebKit/Source/core/css/StylePropertySerializer.cpp (right): https://codereview.chromium.org/1988013003/diff/1/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp#newcode314 third_party/WebKit/Source/core/css/StylePropertySerializer.cpp:314: // these are special-cased here. This sounds like it ...
4 years, 7 months ago (2016-05-18 07:47:36 UTC) #6
Timothy Loh
https://codereview.chromium.org/1988013003/diff/1/third_party/WebKit/LayoutTests/fast/css/cssText-shorthand.html File third_party/WebKit/LayoutTests/fast/css/cssText-shorthand.html (right): https://codereview.chromium.org/1988013003/diff/1/third_party/WebKit/LayoutTests/fast/css/cssText-shorthand.html#newcode19 third_party/WebKit/LayoutTests/fast/css/cssText-shorthand.html:19: 'border-bottom-color: initial; border-image: initial; border-left-color: initial; border-right-color: initial; border-style: ...
4 years, 7 months ago (2016-05-18 08:09:44 UTC) #7
alancutter (OOO until 2018)
lgtm with nit. https://codereview.chromium.org/1988013003/diff/20001/third_party/WebKit/Source/core/css/StylePropertySerializer.h File third_party/WebKit/Source/core/css/StylePropertySerializer.h (right): https://codereview.chromium.org/1988013003/diff/20001/third_party/WebKit/Source/core/css/StylePropertySerializer.h#newcode63 third_party/WebKit/Source/core/css/StylePropertySerializer.h:63: CommonCheckResult commonShorthandChecks(const StylePropertyShorthand&, String& result) const; ...
4 years, 7 months ago (2016-05-20 01:57:12 UTC) #8
Timothy Loh
https://codereview.chromium.org/1988013003/diff/20001/third_party/WebKit/Source/core/css/StylePropertySerializer.h File third_party/WebKit/Source/core/css/StylePropertySerializer.h (right): https://codereview.chromium.org/1988013003/diff/20001/third_party/WebKit/Source/core/css/StylePropertySerializer.h#newcode63 third_party/WebKit/Source/core/css/StylePropertySerializer.h:63: CommonCheckResult commonShorthandChecks(const StylePropertyShorthand&, String& result) const; On 2016/05/20 01:57:12, ...
4 years, 7 months ago (2016-05-20 06:10:54 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1988013003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1988013003/40001
4 years, 7 months ago (2016-05-20 06:12:32 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/225565)
4 years, 7 months ago (2016-05-20 07:25:37 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1988013003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1988013003/60001
4 years, 7 months ago (2016-05-23 03:24:49 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/74765)
4 years, 7 months ago (2016-05-23 04:30:12 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1988013003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1988013003/80001
4 years, 7 months ago (2016-05-23 06:24:23 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/226319)
4 years, 7 months ago (2016-05-23 07:43:15 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1988013003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1988013003/100001
4 years, 7 months ago (2016-05-23 07:51:21 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 7 months ago (2016-05-23 08:54:25 UTC) #30
commit-bot: I haz the power
4 years, 7 months ago (2016-05-23 08:56:09 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/9f45f2b736d341572758154cc9c37614ac4a013c
Cr-Commit-Position: refs/heads/master@{#395295}

Powered by Google App Engine
This is Rietveld 408576698