stylo: nsXULPrototypeCache needs to be able to hold ServoStyleSheets

RESOLVED FIXED in Firefox 55

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: bradwerth, Assigned: bradwerth)

Tracking

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

(Assignee)

Description

11 months ago
To maintain performance, we'll need to be able to cache XUL style sheets, also.
(Assignee)

Updated

11 months ago
See Also: → bug 1290218
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
(Assignee)

Updated

11 months ago
Assignee: nobody → bwerth
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment on attachment 8841129 [details]
Bug 1339627 Part 1: Add a Servo-specific StyleSheet table to nsXULPrototypeCache.

https://reviewboard.mozilla.org/r/115464/#review119082

::: dom/xul/nsXULPrototypeCache.h:132
(Diff revision 2)
> -    nsRefPtrHashtable<nsURIHashKey,mozilla::StyleSheet>      mStyleSheetTable;
> +    StyleSheetTable                                          mStyleSheetTableGecko;
> +    StyleSheetTable                                          mStyleSheetTableServo;

Other similar pairs of variables are called mGeckoBlah/mServoBlah (for example those on nsStyleSheetService) so let's follow the same pattern here.

::: dom/xul/nsXULPrototypeCache.cpp:194
(Diff revision 2)
>      return NS_OK;
>  }
>  
> +mozilla::StyleSheet*
> +nsXULPrototypeCache::GetStyleSheet(nsIURI* aURI,
> +                                   mozilla::StyleBackendType aType)

No need for the "mozilla::" here since we've got a "using namespace mozilla" at the top of the file.

::: dom/xul/nsXULPrototypeCache.cpp:202
(Diff revision 2)
> +    return table.GetWeak(aURI);
> +}
> +
>  nsresult
> -nsXULPrototypeCache::PutStyleSheet(StyleSheet* aStyleSheet)
> +nsXULPrototypeCache::PutStyleSheet(StyleSheet* aStyleSheet,
> +                                   mozilla::StyleBackendType aType)

And here.

::: dom/xul/nsXULPrototypeCache.cpp:266
(Diff revision 2)
> -  for (auto iter = mStyleSheetTable.Iter(); !iter.Done(); iter.Next()) {
> +  mozilla::StyleBackendType tableTypes[] = { mozilla::StyleBackendType::Gecko,
> +                                             mozilla::StyleBackendType::Servo };

Here too.
Attachment #8841129 - Flags: review?(cam) → review+
Comment on attachment 8841130 [details]
Bug 1339627 Part 2: Change StyleSheet Loader to attempt to cache ServoStyleSheets.

https://reviewboard.mozilla.org/r/115466/#review119118
Attachment #8841130 - Flags: review?(cam) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 9

11 months ago
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7367db2913f
Part 1: Add a Servo-specific StyleSheet table to nsXULPrototypeCache. r=heycam
https://hg.mozilla.org/integration/autoland/rev/817642eb6e45
Part 2: Change StyleSheet Loader to attempt to cache ServoStyleSheets. r=heycam

Comment 10

11 months ago
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 8ae3b8ac2185 -d c1e2141e8efe: rebasing 379800:8ae3b8ac2185 "Bug 1339627 Part 1: Add a Servo-specific StyleSheet table to nsXULPrototypeCache. r=heycam"
merging layout/style/Loader.cpp
warning: conflicts while merging layout/style/Loader.cpp! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 13

11 months ago
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 02987e0dd6a9 -d 0632a4a7fb66: rebasing 379847:02987e0dd6a9 "Bug 1339627 Part 1: Add a Servo-specific StyleSheet table to nsXULPrototypeCache. r=heycam"
merging layout/style/Loader.cpp
warning: conflicts while merging layout/style/Loader.cpp! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)

Comment 14

11 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/f7367db2913f
https://hg.mozilla.org/mozilla-central/rev/817642eb6e45
Status: NEW → RESOLVED
Last Resolved: 11 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.