Closed Bug 1407843 Opened 2 years ago Closed 2 years ago

Remove nsICSSPseudoComparator and integrate the only instance into nsCSSRuleProcessor directly

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(3 files)

Using C++ comparator callback like nsICSSPseudoComparator makes it harder to implement related function in Servo side.

Given that nsTreeBodyFrame is the only implementation of nsICSSPseudoComparator, we should be able to remove this interface and simply pass a reference of the array down to XULTreeRuleProcessorData, and put the logic into nsCSSRuleProcessor directly.
Priority: -- → P3
Comment on attachment 8918093 [details]
Bug 1407843 part 2 - Move tree pseudo matching code from nsTreeBodyFrame into nsCSSRuleProcessor.

https://reviewboard.mozilla.org/r/188970/#review194306
Attachment #8918093 - Flags: review?(cam) → review+
Comment on attachment 8918094 [details]
Bug 1407843 part 3 - Remove nsICSSPseudoComparator.

https://reviewboard.mozilla.org/r/188972/#review194308
Attachment #8918094 - Flags: review?(cam) → review+
Comment on attachment 8918092 [details]
Bug 1407843 part 1 - Introduce a global-level AtomArray type alias.

https://reviewboard.mozilla.org/r/188968/#review194480

::: xpcom/ds/AtomArray.h:11
(Diff revision 1)
> +
> +#ifndef mozilla_AtomArray_h
> +#define mozilla_AtomArray_h
> +
> +#include "mozilla/RefPtr.h"
> +#include "nsTArray.h"

Optional: including nsTArrayForwardDeclare.h here would work just as well, and might drag in less stuff.
Attachment #8918092 - Flags: review?(nfroyd) → review+
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2e9d07abdc13
part 1 - Introduce a global-level AtomArray type alias. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/39713e51fe82
part 2 - Move tree pseudo matching code from nsTreeBodyFrame into nsCSSRuleProcessor. r=heycam
https://hg.mozilla.org/integration/autoland/rev/408f93434478
part 3 - Remove nsICSSPseudoComparator. r=heycam
You need to log in before you can comment on or make changes to this bug.