mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Rollup merge of #17010 - CJKu:bug-1348490, r=emilio
Stylo: match both ::placehoder & ::moz-placeholder for placeholder ps… <!-- Please describe your changes on the following line: --> The first patch of "Bug 1348490 - stylo: need support for ::-moz-placeholder pseudo element" Part 2 need to be landed immediately after Part 1 be merged into servo repo: https://reviewboard.mozilla.org/r/141264/diff/9#index_header Bugzilla link: https://bugzilla.mozilla.org/show_bug.cgi?id=1348490 --- <!-- 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 - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/17010) <!-- Reviewable:end -->
This commit is contained in:
commit
c5b47f769e
5 changed files with 22 additions and 4 deletions
|
@ -473,7 +473,7 @@ impl Stylist {
|
|||
{
|
||||
let map = if let Some(pseudo) = selector.pseudo_element() {
|
||||
self.pseudos_map
|
||||
.entry(pseudo.clone())
|
||||
.entry(pseudo.canonical())
|
||||
.or_insert_with(PerPseudoElementSelectorMap::new)
|
||||
.borrow_for_origin(&stylesheet.origin)
|
||||
} else {
|
||||
|
@ -665,8 +665,9 @@ impl Stylist {
|
|||
-> Option<StrongRuleNode>
|
||||
where E: TElement
|
||||
{
|
||||
let pseudo = pseudo.canonical();
|
||||
debug_assert!(pseudo.is_lazy());
|
||||
if self.pseudos_map.get(pseudo).is_none() {
|
||||
if self.pseudos_map.get(&pseudo).is_none() {
|
||||
return None
|
||||
}
|
||||
|
||||
|
@ -698,7 +699,7 @@ impl Stylist {
|
|||
let mut matching_context =
|
||||
MatchingContext::new(MatchingMode::ForStatelessPseudoElement, None);
|
||||
self.push_applicable_declarations(element,
|
||||
Some(pseudo),
|
||||
Some(&pseudo),
|
||||
None,
|
||||
None,
|
||||
AnimationRules(None, None),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue