|
|
Chromium Code Reviews|
Created:
4 years, 2 months ago by xing.xu Modified:
4 years, 1 month ago CC:
chromium-reviews, kenneth.christiansen, Yoav Weiss, blink-reviews-style_chromium.org, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionCSSMediaRule and CSSSupportsRule inherit from CSSConditionRule
From the spec, the conditionText attribute of CSSMediaRule (inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. So conditionText of CSSConditionRule should be mutable instead of readonly, this is a TODO.
Spec:
https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface
https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface
https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface
BUG=651792
Committed: https://crrev.com/4aaf16a74e94cae754d8e65ddcf0bd1dafefc0ae
Cr-Commit-Position: refs/heads/master@{#425950}
Patch Set 1 #Patch Set 2 : Refine var's name #Patch Set 3 : Fix linux layout tests #Patch Set 4 : Fix layout virtual tests #
Total comments: 2
Patch Set 5 : Remove extra space and add TODO for conditionText #Patch Set 6 : Fix CSSSupportsRule.idl and test case #
Total comments: 2
Patch Set 7 : Rebase, refine idl and test case #Patch Set 8 : Fix supports test case #
Total comments: 5
Patch Set 9 : Refine variable's name and trace #
Total comments: 1
Patch Set 10 : Add protype test #
Total comments: 1
Patch Set 11 : Fix windows build #
Total comments: 6
Patch Set 12 : Fix tracing #Messages
Total messages: 106 (73 generated)
The CQ bit was checked by xing.xu@intel.com 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...
Description was changed from ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface BUG=651792 ========== to ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface BUG=651792 ==========
xing.xu@intel.com changed reviewers: + keishi@chromium.org, mikelawther@chromium.org
xing.xu@intel.com changed reviewers: + foolip@chromium.org
PTAL
The CQ bit was checked by foolip@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...
Started a dry run, happy to leave the actual review to the others, but can rubberstamp when needed for the webexposed test changes.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
mikelawther@chromium.org changed reviewers: + meade@chromium.org - mikelawther@chromium.org
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by xing.xu@intel.com 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.
Thanks foolip@. Now the tests are fixed, PTAL. BTW, after click trybot results's "More>>>", I found there were two linux_chromium_rel_ng fail. One pass, one failed like this: content_unittests (with patch) on Ubuntu-12.04 content_unittests (with patch) on Ubuntu-12.04 4 disabled 1 flaky failed 1 failures: InputRouterImplTest.AckedTouchEventState Does it matter?
On 2016/10/14 04:50:26, xing.xu wrote: > Thanks foolip@. Now the tests are fixed, PTAL. > > BTW, after click trybot results's "More>>>", I found there were two > linux_chromium_rel_ng fail. One pass, one failed like this: > content_unittests (with patch) on Ubuntu-12.04 content_unittests (with patch) on > Ubuntu-12.04 > > 4 disabled > 1 flaky > failed 1 > > failures: > InputRouterImplTest.AckedTouchEventState > > Does it matter? Those are probably just flaky, it should be safe to ignore them. By the way, it's helpful if you can describe in the change description what the web-observable difference are (in this case it looks like we're adding a conditionText attribute).
> By the way, it's helpful if you can describe in the change description what the > web-observable difference are (in this case it looks like we're adding a > conditionText attribute). Will update this soon. BTW, this spec said: "The conditionText attribute of CSSMediaRule(defined on the CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule." The previous patch doesn't implement the related set feature of conditionText. Will refine this too.
Description was changed from ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface BUG=651792 ========== to ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule From the spec, the conditionText attribute of CSSMediaRule(inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface BUG=651792 ==========
I see no change in CSSSupportsRule.idl, did you omit that intentionally?
https://codereview.chromium.org/2416893002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/css/CSSConditionRule.idl (right): https://codereview.chromium.org/2416893002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/css/CSSConditionRule.idl:5: //https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface An extra space here :) https://codereview.chromium.org/2416893002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/css/CSSConditionRule.idl:8: readonly attribute DOMString conditionText; This is actually not readonly in the spec. You're just preserving behavior, but can you add a TODO saying that it shouldn't be readonly? It could well be that the spec is wrong, if you could investigate if it's really mutable in any engine (whether or not they have this new interface) that'd be good. If it's not, then a spec bug would be in order.
On 2016/10/14 08:36:44, foolip wrote: > https://codereview.chromium.org/2416893002/diff/60001/third_party/WebKit/Sour... > File third_party/WebKit/Source/core/css/CSSConditionRule.idl (right): > > https://codereview.chromium.org/2416893002/diff/60001/third_party/WebKit/Sour... > third_party/WebKit/Source/core/css/CSSConditionRule.idl:5: > //https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface > An extra space here :) > > https://codereview.chromium.org/2416893002/diff/60001/third_party/WebKit/Sour... > third_party/WebKit/Source/core/css/CSSConditionRule.idl:8: readonly attribute > DOMString conditionText; > This is actually not readonly in the spec. You're just preserving behavior, but > can you add a TODO saying that it shouldn't be readonly? It could well be that > the spec is wrong, if you could investigate if it's really mutable in any engine > (whether or not they have this new interface) that'd be good. If it's not, then > a spec bug would be in order. You are correct. In spec, this is not readonly. Will submit a followup CL to implement setConditionText related api.
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
On 2016/10/14 11:58:02, xing.xu wrote: > On 2016/10/14 08:36:44, foolip wrote: > > > https://codereview.chromium.org/2416893002/diff/60001/third_party/WebKit/Sour... > > File third_party/WebKit/Source/core/css/CSSConditionRule.idl (right): > > > > > https://codereview.chromium.org/2416893002/diff/60001/third_party/WebKit/Sour... > > third_party/WebKit/Source/core/css/CSSConditionRule.idl:5: > > //https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface > > An extra space here :) > > > > > https://codereview.chromium.org/2416893002/diff/60001/third_party/WebKit/Sour... > > third_party/WebKit/Source/core/css/CSSConditionRule.idl:8: readonly attribute > > DOMString conditionText; > > This is actually not readonly in the spec. You're just preserving behavior, > but > > can you add a TODO saying that it shouldn't be readonly? It could well be that > > the spec is wrong, if you could investigate if it's really mutable in any > engine > > (whether or not they have this new interface) that'd be good. If it's not, > then > > a spec bug would be in order. > > > You are correct. In spec, this is not readonly. Will submit a followup CL to > implement setConditionText related api. New patch submitted, PTAL. It is wierd all try bots failed.
On 2016/10/15 07:44:55, xing.xu wrote: > It is wierd all try bots failed. "Patch failure" means that the patch didn't apply cleanly, you'll need rebase on master and upload a new patch set.
Mostly wanted to look at the IDL files, will leave the real review to the other reviewers. https://codereview.chromium.org/2416893002/diff/100001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/CSSMediaRule.cpp (right): https://codereview.chromium.org/2416893002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/CSSMediaRule.cpp:53: StringBuilder result; https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface says "The conditionText attribute (defined on the CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule", can it be implemented as just media()->mediaTest(), or is MediaList not to be used internally? Tests for this will be needed, if there aren't any already. https://codereview.chromium.org/2416893002/diff/100001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/CSSSupportsRule.idl (right): https://codereview.chromium.org/2416893002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/CSSSupportsRule.idl:32: // http://dev.w3.org/csswg/cssom/#the-cssgroupingrule-interface These are now inherited from CSSGroupingRule and should also be removed. (So says the removed TODO, checked that it's still true.)
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
On 2016/10/15 21:02:19, foolip wrote: > Mostly wanted to look at the IDL files, will leave the real review to the other > reviewers. > > https://codereview.chromium.org/2416893002/diff/100001/third_party/WebKit/Sou... > File third_party/WebKit/Source/core/css/CSSMediaRule.cpp (right): > > https://codereview.chromium.org/2416893002/diff/100001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/css/CSSMediaRule.cpp:53: StringBuilder result; > https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface says "The > conditionText attribute (defined on the CSSConditionRule parent rule), on > getting, must return the value of media.mediaText on the rule", can it be > implemented as just media()->mediaTest(), or is MediaList not to be used > internally? > > Tests for this will be needed, if there aren't any already. > > https://codereview.chromium.org/2416893002/diff/100001/third_party/WebKit/Sou... > File third_party/WebKit/Source/core/css/CSSSupportsRule.idl (right): > > https://codereview.chromium.org/2416893002/diff/100001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/css/CSSSupportsRule.idl:32: // > http://dev.w3.org/csswg/cssom/#the-cssgroupingrule-interface > These are now inherited from CSSGroupingRule and should also be removed. (So > says the removed TODO, checked that it's still true.) Done, PTAL
lgtm Seems fine to me, but my lgtm doesn't mean much. The reviewers currently on this CL get most approvals, but you'll need an lgtm from one of the people in https://cs.chromium.org/chromium/src/third_party/WebKit/API_OWNERS https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/css3/media-cssom.html (right): https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/css3/media-cssom.html:3: <head> You can omit the <html>, <head> and <body> tags. https://www.chromium.org/blink/coding-style/layout-test-style-guidelines#TOC-... https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/css3/media-cssom.html:34: }, "@media inherited from CSSConditionRule."); Nit: It'd be nice to have newlines around the individual tests so you can visually see they are code blocks. https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/CSSConditionRule.cpp (right): https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/CSSConditionRule.cpp:21: DEFINE_TRACE(CSSConditionRule) { So long as CSSGroupingRule has a TRACE method, you can probably omit this. https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/CSSSupportsRule.h (right): https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/CSSSupportsRule.h:51: DEFINE_INLINE_VIRTUAL_TRACE() { CSSConditionRule::trace(visitor); } If this just calls the superclass, it can be omitted. https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/StyleRule.cpp (right): https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/StyleRule.cpp:312: StyleRuleCondition::StyleRuleCondition(const StyleRuleCondition& o) o -> condition This also exists below; don't abbreviate variable names in blink (https://www.chromium.org/blink/coding-style#TOC-Names)
The CQ bit was checked by xing.xu@intel.com 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: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
On 2016/10/17 02:58:44, Eddy wrote: > lgtm > > Seems fine to me, but my lgtm doesn't mean much. The reviewers currently on this > CL get most approvals, but you'll need an lgtm from one of the people in > https://cs.chromium.org/chromium/src/third_party/WebKit/API_OWNERS > > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Lay... > File third_party/WebKit/LayoutTests/css3/media-cssom.html (right): > > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Lay... > third_party/WebKit/LayoutTests/css3/media-cssom.html:3: <head> > You can omit the <html>, <head> and <body> tags. > > https://www.chromium.org/blink/coding-style/layout-test-style-guidelines#TOC-... > > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Lay... > third_party/WebKit/LayoutTests/css3/media-cssom.html:34: }, "@media inherited > from CSSConditionRule."); > Nit: It'd be nice to have newlines around the individual tests so you can > visually see they are code blocks. > > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... > File third_party/WebKit/Source/core/css/CSSConditionRule.cpp (right): > > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/css/CSSConditionRule.cpp:21: > DEFINE_TRACE(CSSConditionRule) { > So long as CSSGroupingRule has a TRACE method, you can probably omit this. > > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... > File third_party/WebKit/Source/core/css/CSSSupportsRule.h (right): > > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/css/CSSSupportsRule.h:51: > DEFINE_INLINE_VIRTUAL_TRACE() { CSSConditionRule::trace(visitor); } > If this just calls the superclass, it can be omitted. > > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... > File third_party/WebKit/Source/core/css/StyleRule.cpp (right): > > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/css/StyleRule.cpp:312: > StyleRuleCondition::StyleRuleCondition(const StyleRuleCondition& o) > o -> condition > This also exists below; don't abbreviate variable names in blink > (https://www.chromium.org/blink/coding-style#TOC-Names) Done, PTAL.
Description was changed from ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule From the spec, the conditionText attribute of CSSMediaRule(inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface BUG=651792 ========== to ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule From the spec, the conditionText attribute of CSSMediaRule (inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface BUG=651792 ==========
Thanks for working on this. Can you send an Intent to Implement and Ship for this to blink-dev? It's a small change which will certainly get 3xLGTM, but it does affect 3 interfaces.
https://codereview.chromium.org/2416893002/diff/160001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/css3/media-cssom.html (right): https://codereview.chromium.org/2416893002/diff/160001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/css3/media-cssom.html:29: }, "@media inherited from CSSConditionRule."); Can you add explicit tests for the prototype chain, e.g. assert_equal(Object.getPrototypeOf(CSSMediaRule.prototype), CSSConditionRule.prototype)?
The CQ bit was checked by xing.xu@intel.com 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...
On 2016/10/17 09:25:40, foolip wrote: > https://codereview.chromium.org/2416893002/diff/160001/third_party/WebKit/Lay... > File third_party/WebKit/LayoutTests/css3/media-cssom.html (right): > > https://codereview.chromium.org/2416893002/diff/160001/third_party/WebKit/Lay... > third_party/WebKit/LayoutTests/css3/media-cssom.html:29: }, "@media inherited > from CSSConditionRule."); > Can you add explicit tests for the prototype chain, e.g. > assert_equal(Object.getPrototypeOf(CSSMediaRule.prototype), > CSSConditionRule.prototype)? Done, PTAL.
LGTM once the intent has 3xLGTM https://codereview.chromium.org/2416893002/diff/180001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/css3/condition-cssom.html (right): https://codereview.chromium.org/2416893002/diff/180001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/css3/condition-cssom.html:34: "@media screen and (min-width: 480px) { \n" + Oh look, a trailing whitespace. Is that part of the spec, would this test pass on Edge and Firefox? That need not be answered in order to make this change, but it would be good to contribute this to web-platform-tests so that WebKit can just import it instead of writing a new test.
On 2016/10/17 14:23:01, foolip wrote: > LGTM once the intent has 3xLGTM > > https://codereview.chromium.org/2416893002/diff/180001/third_party/WebKit/Lay... > File third_party/WebKit/LayoutTests/css3/condition-cssom.html (right): > > https://codereview.chromium.org/2416893002/diff/180001/third_party/WebKit/Lay... > third_party/WebKit/LayoutTests/css3/condition-cssom.html:34: "@media screen and > (min-width: 480px) { \n" + > Oh look, a trailing whitespace. Is that part of the spec, would this test pass > on Edge and Firefox? That need not be answered in order to make this change, but > it would be good to contribute this to web-platform-tests so that WebKit can > just import it instead of writing a new test. Yes, I also noticed this. We need to remove this trailing whitespace when running on firefox. It seems this is a in CSSMediaRule::cssText. How about file a bug and submit a new patch for this? --- a/third_party/WebKit/Source/core/css/CSSMediaRule.cpp +++ b/third_party/WebKit/Source/core/css/CSSMediaRule.cpp @@ -43,7 +43,7 @@ String CSSMediaRule::cssText() const { result.append(mediaQueries()->mediaText()); result.append(' '); } - result.append("{ \n"); + result.append("{\n"); appendCSSTextForItems(result); result.append('}'); return result.toString();
Description was changed from ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule From the spec, the conditionText attribute of CSSMediaRule (inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface BUG=651792 ========== to ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule From the spec, the conditionText attribute of CSSMediaRule (inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. So conditionText of CSSConditionRule should be mutable instead of readonly, this is a TODO. Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface BUG=651792 ==========
On 2016/10/17 14:47:52, xing.xu wrote: > On 2016/10/17 14:23:01, foolip wrote: > > LGTM once the intent has 3xLGTM > > > > > https://codereview.chromium.org/2416893002/diff/180001/third_party/WebKit/Lay... > > File third_party/WebKit/LayoutTests/css3/condition-cssom.html (right): > > > > > https://codereview.chromium.org/2416893002/diff/180001/third_party/WebKit/Lay... > > third_party/WebKit/LayoutTests/css3/condition-cssom.html:34: "@media screen > and > > (min-width: 480px) { \n" + > > Oh look, a trailing whitespace. Is that part of the spec, would this test pass > > on Edge and Firefox? That need not be answered in order to make this change, > but > > it would be good to contribute this to web-platform-tests so that WebKit can > > just import it instead of writing a new test. > > Yes, I also noticed this. We need to remove this trailing whitespace when > running on firefox. > > It seems this is a in CSSMediaRule::cssText. How about file a bug and submit a > new patch for this? > --- a/third_party/WebKit/Source/core/css/CSSMediaRule.cpp > +++ b/third_party/WebKit/Source/core/css/CSSMediaRule.cpp > @@ -43,7 +43,7 @@ String CSSMediaRule::cssText() const { > result.append(mediaQueries()->mediaText()); > result.append(' '); > } > - result.append("{ \n"); > + result.append("{\n"); > appendCSSTextForItems(result); > result.append('}'); > return result.toString(); That would be great, can you file an issue? Since WebKit presumably has the same bug, a test in web-platform-tests for that would be great also.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
On 2016/10/17 14:56:27, foolip wrote: > On 2016/10/17 14:47:52, xing.xu wrote: > > On 2016/10/17 14:23:01, foolip wrote: > > > LGTM once the intent has 3xLGTM > > > > > > > > > https://codereview.chromium.org/2416893002/diff/180001/third_party/WebKit/Lay... > > > File third_party/WebKit/LayoutTests/css3/condition-cssom.html (right): > > > > > > > > > https://codereview.chromium.org/2416893002/diff/180001/third_party/WebKit/Lay... > > > third_party/WebKit/LayoutTests/css3/condition-cssom.html:34: "@media screen > > and > > > (min-width: 480px) { \n" + > > > Oh look, a trailing whitespace. Is that part of the spec, would this test > pass > > > on Edge and Firefox? That need not be answered in order to make this change, > > but > > > it would be good to contribute this to web-platform-tests so that WebKit can > > > just import it instead of writing a new test. > > > > Yes, I also noticed this. We need to remove this trailing whitespace when > > running on firefox. > > > > It seems this is a in CSSMediaRule::cssText. How about file a bug and submit a > > new patch for this? > > --- a/third_party/WebKit/Source/core/css/CSSMediaRule.cpp > > +++ b/third_party/WebKit/Source/core/css/CSSMediaRule.cpp > > @@ -43,7 +43,7 @@ String CSSMediaRule::cssText() const { > > result.append(mediaQueries()->mediaText()); > > result.append(' '); > > } > > - result.append("{ \n"); > > + result.append("{\n"); > > appendCSSTextForItems(result); > > result.append('}'); > > return result.toString(); > > That would be great, can you file an issue? Since WebKit presumably has the same > bug, a test in web-platform-tests for that would be great also. Report here: https://bugs.chromium.org/p/chromium/issues/detail?id=656835
The CQ bit was checked by xing.xu@intel.com 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 Intent got 3xLGTM. PTAL.
foolip@chromium.org changed reviewers: + oilpan-reviews@chromium.org
Adding oilpan-reviews@ for sanity check of the tracing. https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/CSSMediaRule.cpp (right): https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/CSSMediaRule.cpp:55: return mediaQueries()->mediaText(); Ah, MediaList uses this interally, makes sense. https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/CSSMediaRule.cpp:75: CSSGroupingRule::trace(visitor); This should become CSSConditionRule::trace(visitor) I think. https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/CSSSupportsRule.h (left): https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/CSSSupportsRule.h:53: DEFINE_INLINE_VIRTUAL_TRACE() { CSSGroupingRule::trace(visitor); } I think this should move into CSSConditionRule instead. https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/StyleRule.cpp (right): https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/StyleRule.cpp:319: StyleRuleMedia::StyleRuleMedia(const StyleRuleMedia& media) It looks like the surrounding code uses |o| in these contexts, suggest sticking with that and maybe changing them all in a CL if the owners agree.
On 2016/10/18 10:38:33, foolip wrote: > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/css/CSSMediaRule.cpp:75: > CSSGroupingRule::trace(visitor); > This should become CSSConditionRule::trace(visitor) I think. > > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > File third_party/WebKit/Source/core/css/CSSSupportsRule.h (left): > > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/css/CSSSupportsRule.h:53: > DEFINE_INLINE_VIRTUAL_TRACE() { CSSGroupingRule::trace(visitor); } > I think this should move into CSSConditionRule instead. ==>About tracing: https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > File third_party/WebKit/Source/core/css/StyleRule.cpp (right): > > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/css/StyleRule.cpp:319: > StyleRuleMedia::StyleRuleMedia(const StyleRuleMedia& media) > It looks like the surrounding code uses |o| in these contexts, suggest sticking > with that and maybe changing them all in a CL if the owners agree. ==> About coding style: https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... Any idea?
https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/CSSMediaRule.cpp (right): https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/CSSMediaRule.cpp:75: CSSGroupingRule::trace(visitor); On 2016/10/18 10:38:33, foolip wrote: > This should become CSSConditionRule::trace(visitor) I think. This still stands.
On 2016/10/18 11:00:30, xing.xu wrote: > On 2016/10/18 10:38:33, foolip wrote: > > > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > > third_party/WebKit/Source/core/css/CSSMediaRule.cpp:75: > > CSSGroupingRule::trace(visitor); > > This should become CSSConditionRule::trace(visitor) I think. > > > > > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > > File third_party/WebKit/Source/core/css/CSSSupportsRule.h (left): > > > > > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > > third_party/WebKit/Source/core/css/CSSSupportsRule.h:53: > > DEFINE_INLINE_VIRTUAL_TRACE() { CSSGroupingRule::trace(visitor); } > > I think this should move into CSSConditionRule instead. > ==>About tracing: > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... OK, so CSSGroupingRule.h has a DECLARE_VIRTUAL_TRACE(), then it all makes sense, except the case just commented on. > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > > File third_party/WebKit/Source/core/css/StyleRule.cpp (right): > > > > > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > > third_party/WebKit/Source/core/css/StyleRule.cpp:319: > > StyleRuleMedia::StyleRuleMedia(const StyleRuleMedia& media) > > It looks like the surrounding code uses |o| in these contexts, suggest > sticking > > with that and maybe changing them all in a CL if the owners agree. > ==> About coding style: > https://codereview.chromium.org/2416893002/diff/140001/third_party/WebKit/Sou... > > Any idea? Sorry, didn't read Eddy's comments, please disregard.
https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/css/CSSMediaRule.cpp (right): https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/css/CSSMediaRule.cpp:75: CSSGroupingRule::trace(visitor); On 2016/10/18 11:20:29, foolip wrote: > On 2016/10/18 10:38:33, foolip wrote: > > This should become CSSConditionRule::trace(visitor) I think. > > This still stands. LGTM % this.
On 2016/10/18 11:21:57, foolip wrote: > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > File third_party/WebKit/Source/core/css/CSSMediaRule.cpp (right): > > https://codereview.chromium.org/2416893002/diff/200001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/css/CSSMediaRule.cpp:75: > CSSGroupingRule::trace(visitor); > On 2016/10/18 11:20:29, foolip wrote: > > On 2016/10/18 10:38:33, foolip wrote: > > > This should become CSSConditionRule::trace(visitor) I think. > > > > This still stands. > > LGTM % this. Yes, thanks, done, PTAL
The CQ bit was checked by xing.xu@intel.com 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 foolip@chromium.org
The CQ bit was checked by foolip@chromium.org
lgtm Sending to CQ, this has been up for a while so I hope everyone has had a chance to comment.
The patchset sent to the CQ was uploaded after l-g-t-m from meade@chromium.org Link to the patchset: https://codereview.chromium.org/2416893002/#ps220001 (title: "Fix tracing")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule From the spec, the conditionText attribute of CSSMediaRule (inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. So conditionText of CSSConditionRule should be mutable instead of readonly, this is a TODO. Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface BUG=651792 ========== to ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule From the spec, the conditionText attribute of CSSMediaRule (inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. So conditionText of CSSConditionRule should be mutable instead of readonly, this is a TODO. Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface BUG=651792 ==========
Message was sent while issue was closed.
Committed patchset #12 (id:220001)
Message was sent while issue was closed.
Description was changed from ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule From the spec, the conditionText attribute of CSSMediaRule (inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. So conditionText of CSSConditionRule should be mutable instead of readonly, this is a TODO. Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface BUG=651792 ========== to ========== CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule From the spec, the conditionText attribute of CSSMediaRule (inherited from CSSConditionRule parent rule), on getting, must return the value of media.mediaText on the rule. Setting the conditionText attribute must set the media.mediaText attribute on the rule. So conditionText of CSSConditionRule should be mutable instead of readonly, this is a TODO. Spec: https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface BUG=651792 Committed: https://crrev.com/4aaf16a74e94cae754d8e65ddcf0bd1dafefc0ae Cr-Commit-Position: refs/heads/master@{#425950} ==========
Message was sent while issue was closed.
Patchset 12 (id:??) landed as https://crrev.com/4aaf16a74e94cae754d8e65ddcf0bd1dafefc0ae Cr-Commit-Position: refs/heads/master@{#425950}
Message was sent while issue was closed.
Oilpan part LGTM |
