Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stylo: Support :active and :hover quirk #17266

Merged
merged 2 commits into from Jun 10, 2017

Conversation

canova
Copy link
Contributor

@canova canova commented Jun 10, 2017

Reviewed by bholley and emilo on the bugzilla bug.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix Bug 1355724

This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @bholley: components/style/restyle_hints.rs, components/style/gecko/generated/bindings.rs, components/style/gecko/selector_parser.rs, components/style/servo/selector_parser.rs, components/style/gecko/wrapper.rs and 3 more
  • @KiChjang: components/script/dom/document.rs, components/script/dom/node.rs, components/script/layout_wrapper.rs, components/script/dom/element.rs
  • @fitzgen: components/script/dom/document.rs, components/script/dom/node.rs, components/script/layout_wrapper.rs, components/script/dom/element.rs
  • @emilio: components/style/restyle_hints.rs, ports/geckolib/glue.rs, components/style/gecko/generated/bindings.rs, components/style/gecko/selector_parser.rs, components/style/servo/selector_parser.rs and 4 more

@highfive
Copy link

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify style and script code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 10, 2017
@canova
Copy link
Contributor Author

canova commented Jun 10, 2017

@bors-servo r=bholley,emilio

@bors-servo
Copy link
Contributor

📌 Commit 124290f has been approved by bholley,emilio

@highfive highfive assigned bholley and unassigned pcwalton Jun 10, 2017
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jun 10, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 124290f with merge 7552604...

bors-servo pushed a commit that referenced this pull request Jun 10, 2017
stylo: Support :active and :hover quirk

Reviewed by bholley and emilo on the bugzilla bug.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1355724](https://bugzilla.mozilla.org/show_bug.cgi?id=1355724)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17266)
<!-- Reviewable:end -->
@canova
Copy link
Contributor Author

canova commented Jun 10, 2017

@bors-servo r-

@bors-servo
Copy link
Contributor

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 10, 2017
!negated.iter().all(|ss| matches_simple_selector(ss, element, context, relevant_link, flags_setter))
let old_value = context.within_functional_pseudo_class_argument;
context.within_functional_pseudo_class_argument = true;
let result = !negated.iter().all(|ss| matches_simple_selector(ss, element, context,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Please add braces and move the function call to its own line, or indent the arguments (though preferably the first).

@@ -103,6 +103,11 @@ macro_rules! with_all_bounds {

/// pseudo-elements
type PseudoElement: $($CommonBounds)* + PseudoElement<Impl = Self>;

/// Returns whether the selector matches conditions for the :active and
/// :hover quirk.
Copy link
Member

@emilio emilio Jun 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this comment is false, this only returns whether the pseudo-class is :hover or :active, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this method changed so many times and I forgot to change the comment at some point :)

// NB: It's important to use `intersect` instead of `contains`
// here, to handle `:any-link` correctly.
/// FIXME: This can/should probably be contains() now that any-link
// (which depends in multiple bits) is handled in its own case below.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intersect is fine, you can remove or revert the comment.

It was getting inial value from gecko side before and that was always
eCompatibility_NavQuirks. Created an FFI to fetch quirks mode.
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 10, 2017
@canova
Copy link
Contributor Author

canova commented Jun 10, 2017

@bors-servo r=bholley,emilio

@bors-servo
Copy link
Contributor

📌 Commit 309531e has been approved by bholley,emilio

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jun 10, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 309531e with merge ddfe8b0...

bors-servo pushed a commit that referenced this pull request Jun 10, 2017
stylo: Support :active and :hover quirk

Reviewed by bholley and emilo on the bugzilla bug.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1355724](https://bugzilla.mozilla.org/show_bug.cgi?id=1355724)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17266)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: bholley,emilio
Pushing ddfe8b0 to master...

@bors-servo bors-servo merged commit 309531e into servo:master Jun 10, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 10, 2017
@canova canova deleted the active_hover_quirk branch June 10, 2017 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants