mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1438911: Avoid doing changeset changes off a runnable for stylo. r=bz
MozReview-Commit-ID: Kgu9OxjtY5v --HG-- extra : rebase_source : ae14355731b10c026f526b564d7eee23a57d2da5
This commit is contained in:
parent
6dd24e93ac
commit
1300727b08
@ -126,6 +126,8 @@ public:
|
||||
nsPresContext* mPresContext;
|
||||
};
|
||||
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
|
||||
namespace {
|
||||
|
||||
class CharSetChangingRunnable : public Runnable
|
||||
@ -152,6 +154,8 @@ private:
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
|
||||
nscolor
|
||||
nsPresContext::MakeColorPref(const nsString& aColor)
|
||||
{
|
||||
@ -1162,9 +1166,16 @@ nsPresContext::UpdateCharSet(NotNull<const Encoding*> aCharSet)
|
||||
void
|
||||
nsPresContext::DispatchCharSetChange(NotNull<const Encoding*> aEncoding)
|
||||
{
|
||||
RefPtr<CharSetChangingRunnable> runnable =
|
||||
new CharSetChangingRunnable(this, aEncoding);
|
||||
Document()->Dispatch(TaskCategory::Other, runnable.forget());
|
||||
#ifdef MOZ_OLD_STYLE
|
||||
if (!Document()->IsStyledByServo()) {
|
||||
RefPtr<CharSetChangingRunnable> runnable =
|
||||
new CharSetChangingRunnable(this, aEncoding);
|
||||
Document()->Dispatch(TaskCategory::Other, runnable.forget());
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
// In Servo RebuildAllStyleData is async, so no need to do the runnable dance.
|
||||
DoChangeCharSet(aEncoding);
|
||||
}
|
||||
|
||||
nsPresContext*
|
||||
|
Loading…
Reference in New Issue
Block a user