Closed Bug 1372062 Opened 3 years ago Closed 3 years ago

stylo: Stylo does not render button with a custom background correctly (styloVsGecko reftest)

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: jessica, Assigned: TYLin)

References

Details

Attachments

(2 files, 1 obsolete file)

Follow-up to Bug 1311857.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=82d9a5185e829856549f93472d391ae33ab4b686&selectedJob=105720707

This test fails in styloVsGecko, it seems that the reset button is rendered as a normal button rather than with a custom background.
Seems to be related to XBL bindings. cc TYLin as he's working on this part.
Assignee: nobody → tlin
Priority: -- → P2
Summary: Stylo does not render button with a custom background correctly (styloVsGecko reftest) → stylo: Stylo does not render button with a custom background correctly (styloVsGecko reftest)
Some observations:

The reset button is generated in XBL as an <html:button> [1]. If I changed it to <html:div>, I can see the "background-image" [2] in XBL stylesheet is correctly applied.

The frame subtree of the button is:

  HTMLButtonControl(button)(5)@13f510f90 {7200,0,1800,960} vis-overflow=-420,-420,2640,1800 scr-overflow=0,0,1800,960 [state=008000c800000200] [content=13cd233e0] [sc=13f511f48]<
   Block(button)(5)@13f511030 {900,420,0,0} [state=0000108000d00000] [content=13cd233e0] [sc=13f511870:-moz-button-content]<
   >
  >

[1] http://searchfox.org/mozilla-central/rev/c49a70b53f67dd5550eec8a08793805f2aca8d42/toolkit/content/widgets/datetimebox.xml#1100-1101
[2] http://searchfox.org/mozilla-central/rev/20d16dadd336e0c6b97e3e19dc4ff907744b5734/toolkit/content/widgets/datetimebox.css#51
Bug 1290276 added `CascadeLevel::XBL` in has_author_specified_rules() to the wrong place. It should be added along with `CascadeLevel::AuthorNormal`.

[1] http://searchfox.org/mozilla-central/rev/7cc377ce3f0a569c5c9b362d589705cd4fecc0ac/servo/components/style/rule_tree/mod.rs#1104
Depends on: 1290276
Comment on attachment 8879148 [details]
stylo: Fix has_author_specified_rules() for rules in XBL stylesheets (bug 1372062)

https://reviewboard.mozilla.org/r/150478/#review155514
Attachment #8879148 - Flags: review?(cam) → review+
Comment on attachment 8879149 [details]
Bug 1372062 - stylo: update reftest expectations.

https://reviewboard.mozilla.org/r/150480/#review155516
Attachment #8879149 - Flags: review?(cam) → review+
Attachment #8879148 - Attachment is obsolete: true
Pushed by tlin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2eee61414396
stylo: update reftest expectations. r=heycam
https://hg.mozilla.org/mozilla-central/rev/2eee61414396
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Yay, thanks Ting-Yu! :)
You need to log in before you can comment on or make changes to this bug.