Bug 119055 - Document::setContentLanguage should not call styleResolverChanged
Summary: Document::setContentLanguage should not call styleResolverChanged
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
Depends on: 76701
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-24 12:24 PDT by Ryosuke Niwa
Modified: 2022-08-26 21:15 PDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-07-24 12:24:44 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/669007b54d9434eac10d50bc0981ad1dd6970e33

Document::setContentLanguage was calling styleResolverChanged just to update the root
style so we'll go through StyleResolver::styleForDocument which does not appear to be needed.
We only need to Force a recalc on the whole document so all the lang and locale related styles
are picked correctly.

This code came from https://bugs.webkit.org/show_bug.cgi?id=76701 where it was originally
recalcStyle(Force) in the patch and then through a series of review confusions it ended up as
a call to update the entire style resolver instead of just scheduling a forced style recalc.
Comment 1 Ahmad Saleem 2022-08-26 14:44:45 PDT
The Chromium / Blink patch is trying to modify following:

https://github.com/WebKit/WebKit/blob/d03ed349d77c73455b7ba94aa908b7dc0a5eddc8/Source/WebCore/dom/Document.cpp#L1544

This comment still exist:

// Recalculate style so language is used when selecting the initial font.

Plus this commit changed:

"scheduleForcedStyleRecalc" to "scheduleFullStyleRebuild"

______

Just wanted to share updated information. Thanks!
Comment 2 Ryosuke Niwa 2022-08-26 21:15:33 PDT
We do this already. No need to merge.