[wpt-sync] Sync PR 17610 - Reland "Fix first line style caching issues"
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox70 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 17610 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/17610
Details from upstream follow.
Xianzhu Wang <wangxianzhu@chromium.org> wrote:
Reland "Fix first line style caching issues"
This is a reland of 228ee33446fc20cef8fcc94503a91c16bbcfc6fb
Compared to the original CL, this relanded (again) CL has the
following changes:
- Remove the lazy update of first line image observers which was not
needed and didn't work (causing reentrancy of
UpdateFirstLineImageObservers),- In LayoutObject::UpdateFirstLineImageObservers(), hold the first
line style's reference locally because UpdateImageObservers may
call LayoutBlockFlow::ImageChanged() which invalidates the cached
first line style.Original change's description:
Fix first line style caching issues
- Cache conflict issue:
Previously calls to Element:: Element::CachedStyleForPseudoElement()
with different second parameters caused cache conflict. The second
call to it might get unwanted result that was cached with a different
second parameter.Now remove the second parameter, and the function gets and caches the
pseudo style only based on its own computed style. If a caller wants
a pseudo style based on another style, the caller should call
Element::UncachedStyleForPseudoElement() and manage cache by itself.
- Under-invalidation on change
Cached first line style needs invalidation in two cases:
a) when the ::first-line style changes, we should invalidate all
cached first line styles affected.
b) when style of an inline element (which inherits ::first-line
style) changes, as the inline element's style has higher priority
than the inherited ::first-line style, even if the style doesn't
change, we need to invalidate the cached
kPseudoIdFirstLineInherited style if the new style is different
from the inherited ::first-line style.Bug: 979054
Change-Id: Icffe68d5136349d12cce6e92d1d3bf153c28903a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678878
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Xianzhu Wang \<wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#673574}Bug: 979054
Change-Id: If7211c585df77964789140277839a8f1c3822a15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1685672
Commit-Queue: Xianzhu Wang \<wangxianzhu@chromium.org>
Reviewed-by: Fredrik Söderquist \<fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#674509}
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
| Assignee | ||
Comment 3•7 years ago
|
||
Comment 5•7 years ago
|
||
| bugherder | ||
Description
•