|
|
DescriptionReturn '' for overflow if overflow-x and overflow-y are different.
According to the CSSOM spec [1], when overflow-x and overflow-y
are different, the computed value of overflow should be the empty
string since it cannot be expressed in the grammar (step 1.2.).
However, we currently return the max of overflow-x and overflow-y
in terms of their enum values, which does not follow the spec.
Firefox handles this issue correctly.
This patch fixes this issue by return an empty string if the two
overflows are different.
[1] https://drafts.csswg.org/cssom/#serialize-a-css-value
[2] https://github.com/w3c/csswg-drafts/issues/1100
BUG=701235
Review-Url: https://codereview.chromium.org/2752623002
Cr-Commit-Position: refs/heads/master@{#461352}
Committed: https://chromium.googlesource.com/chromium/src/+/02c25323de5c3f16bb47d5dc6fc6c7b9a939b784
Patch Set 1 #
Total comments: 2
Patch Set 2 : Address comments #
Total comments: 2
Patch Set 3 : Rebase #
Messages
Total messages: 28 (19 generated)
shend@chromium.org changed reviewers: + nainar@chromium.org
Hi Naina, PTAL :)
The CQ bit was checked by shend@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm https://codereview.chromium.org/2752623002/diff/1/third_party/WebKit/LayoutTe... File third_party/WebKit/LayoutTests/fast/css/different-overflow-x-and-y.html (right): https://codereview.chromium.org/2752623002/diff/1/third_party/WebKit/LayoutTe... third_party/WebKit/LayoutTests/fast/css/different-overflow-x-and-y.html:9: }, 'Test different overflow x and y returns empty string') nit Change to: Test that if overflowX != overflowY you are returned an empty string.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Return '' for overflow if overflow-x and overflow-y are different. Currently, when an element has different overflow-x and overflow-y, the computed value for the overflow shorthand property is the max of overflow-x and overflow-y in terms of their enum values. This is very unintuitive and not what Firefox does. This patch fixes this issue by return an empty string if the two overflows are different, which follows Firefox's behaviour. BUG=701235 ========== to ========== Return '' for overflow if overflow-x and overflow-y are different. According to the CSSOM spec [1], when overflow-x and overflow-y are different, the computed value of overflow should be the empty string since it cannot be expressed in the grammar (step 1.2.). However, we currently return the max of overflow-x and overflow-y in terms of their enum values, which does not follow the spec. Firefox handles this issue correctly. This patch fixes this issue by return an empty string if the two overflows are different. BUG=701235 ==========
Description was changed from ========== Return '' for overflow if overflow-x and overflow-y are different. According to the CSSOM spec [1], when overflow-x and overflow-y are different, the computed value of overflow should be the empty string since it cannot be expressed in the grammar (step 1.2.). However, we currently return the max of overflow-x and overflow-y in terms of their enum values, which does not follow the spec. Firefox handles this issue correctly. This patch fixes this issue by return an empty string if the two overflows are different. BUG=701235 ========== to ========== Return '' for overflow if overflow-x and overflow-y are different. According to the CSSOM spec [1], when overflow-x and overflow-y are different, the computed value of overflow should be the empty string since it cannot be expressed in the grammar (step 1.2.). However, we currently return the max of overflow-x and overflow-y in terms of their enum values, which does not follow the spec. Firefox handles this issue correctly. This patch fixes this issue by return an empty string if the two overflows are different. [1] https://drafts.csswg.org/cssom/#serialize-a-css-value BUG=701235 ==========
shend@chromium.org changed reviewers: + meade@chromium.org
Hi Eddy, PTAL https://codereview.chromium.org/2752623002/diff/1/third_party/WebKit/LayoutTe... File third_party/WebKit/LayoutTests/fast/css/different-overflow-x-and-y.html (right): https://codereview.chromium.org/2752623002/diff/1/third_party/WebKit/LayoutTe... third_party/WebKit/LayoutTests/fast/css/different-overflow-x-and-y.html:9: }, 'Test different overflow x and y returns empty string') On 2017/03/14 at 04:49:16, nainar wrote: > nit Change to: Test that if overflowX != overflowY you are returned an empty string. I changed this to "Overflow is empty string if overflowX != overflowY" so it follows the same style as some other layout tests.
Description was changed from ========== Return '' for overflow if overflow-x and overflow-y are different. According to the CSSOM spec [1], when overflow-x and overflow-y are different, the computed value of overflow should be the empty string since it cannot be expressed in the grammar (step 1.2.). However, we currently return the max of overflow-x and overflow-y in terms of their enum values, which does not follow the spec. Firefox handles this issue correctly. This patch fixes this issue by return an empty string if the two overflows are different. [1] https://drafts.csswg.org/cssom/#serialize-a-css-value BUG=701235 ========== to ========== Return '' for overflow if overflow-x and overflow-y are different. According to the CSSOM spec [1], when overflow-x and overflow-y are different, the computed value of overflow should be the empty string since it cannot be expressed in the grammar (step 1.2.). However, we currently return the max of overflow-x and overflow-y in terms of their enum values, which does not follow the spec. Firefox handles this issue correctly. This patch fixes this issue by return an empty string if the two overflows are different. [1] https://drafts.csswg.org/cssom/#serialize-a-css-value [2] https://github.com/w3c/csswg-drafts/issues/1100 BUG=701235 ==========
meade@chromium.org changed reviewers: + shans@chromium.org
This seems maybe ok, but I'd like to double check that changing visible behaviour like this is ok. Added Shane to have a look. My read of the spec was it should return "visible foo" or "foo visible" instead of empty string.
On 2017/03/17 at 06:37:56, meade wrote: > This seems maybe ok, but I'd like to double check that changing visible behaviour like this is ok. Added Shane to have a look. > > My read of the spec was it should return "visible foo" or "foo visible" instead of empty string. The overflow specification makes it clear that the overflow shorthand can only contain one value, not two: https://drafts.csswg.org/css-overflow-3/#propdef-overflow. There's a "box model" specification which has a different definition but I don't trust it... particularly given that Firefox's behavior matches what Darren has implemented I think we're good. This leaves us with the problem of changing visible behavior - changing the serialization is relatively lower risk than changing input values. It would be hard to look for examples where this might break a page. While we could use-counter etc. to maybe figure out if there's a major impact I don't know if it's worth it. You could maybe ping Rick if you were concerned about it?
lgtm I'm not that concerned if you think it's low risk shane :) Thanks for double checking. https://codereview.chromium.org/2752623002/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/fast/css/different-overflow-x-and-y.html (right): https://codereview.chromium.org/2752623002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/css/different-overflow-x-and-y.html:2: <div id="target" style="overflow-x: hidden; overflow-y: scroll"></div> nit: Move this down below the testharness includes, but before the testing script.
shend@chromium.org changed reviewers: - shans@chromium.org
Thanks! https://codereview.chromium.org/2752623002/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/fast/css/different-overflow-x-and-y.html (right): https://codereview.chromium.org/2752623002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/css/different-overflow-x-and-y.html:2: <div id="target" style="overflow-x: hidden; overflow-y: scroll"></div> On 2017/03/29 at 22:49:00, Eddy wrote: > nit: Move this down below the testharness includes, but before the testing script. Done.
The CQ bit was checked by shend@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by shend@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from nainar@chromium.org, meade@chromium.org Link to the patchset: https://codereview.chromium.org/2752623002/#ps40001 (title: "Rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1491172125983050, "parent_rev": "86396aa4a030f140170a52d24972f90cfd75bce9", "commit_rev": "02c25323de5c3f16bb47d5dc6fc6c7b9a939b784"}
Message was sent while issue was closed.
Description was changed from ========== Return '' for overflow if overflow-x and overflow-y are different. According to the CSSOM spec [1], when overflow-x and overflow-y are different, the computed value of overflow should be the empty string since it cannot be expressed in the grammar (step 1.2.). However, we currently return the max of overflow-x and overflow-y in terms of their enum values, which does not follow the spec. Firefox handles this issue correctly. This patch fixes this issue by return an empty string if the two overflows are different. [1] https://drafts.csswg.org/cssom/#serialize-a-css-value [2] https://github.com/w3c/csswg-drafts/issues/1100 BUG=701235 ========== to ========== Return '' for overflow if overflow-x and overflow-y are different. According to the CSSOM spec [1], when overflow-x and overflow-y are different, the computed value of overflow should be the empty string since it cannot be expressed in the grammar (step 1.2.). However, we currently return the max of overflow-x and overflow-y in terms of their enum values, which does not follow the spec. Firefox handles this issue correctly. This patch fixes this issue by return an empty string if the two overflows are different. [1] https://drafts.csswg.org/cssom/#serialize-a-css-value [2] https://github.com/w3c/csswg-drafts/issues/1100 BUG=701235 Review-Url: https://codereview.chromium.org/2752623002 Cr-Commit-Position: refs/heads/master@{#461352} Committed: https://chromium.googlesource.com/chromium/src/+/02c25323de5c3f16bb47d5dc6fc6... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/02c25323de5c3f16bb47d5dc6fc6... |