Changeset 282016 in webkit
- Timestamp:
- Sep 3, 2021 1:08:00 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/text/FontFaceSet-check-after-style-update-expected.txt (added)
-
LayoutTests/fast/text/FontFaceSet-check-after-style-update.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSFontFaceSet.cpp (modified) (1 diff)
-
Source/WebCore/css/FontFaceSet.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r282015 r282016 1 2021-09-03 Myles C. Maxfield <mmaxfield@apple.com> 2 3 FontFaceSet.check() needs to react to style changes 4 https://bugs.webkit.org/show_bug.cgi?id=229844 5 6 Reviewed by Sam Weinig. 7 8 This can't be a WPT test because it requires internals.invalidateFontCache(). 9 10 * fast/text/FontFaceSet-check-after-style-update-expected.txt: Added. 11 * fast/text/FontFaceSet-check-after-style-update.html: Added. 12 1 13 2021-09-03 Myles C. Maxfield <mmaxfield@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r282015 r282016 1 2021-09-03 Myles C. Maxfield <mmaxfield@apple.com> 2 3 FontFaceSet.check() needs to react to style changes 4 https://bugs.webkit.org/show_bug.cgi?id=229844 5 6 Reviewed by Sam Weinig. 7 8 When content says "document.fonts.check(...)", the ".check(...)" part needs to 9 update style instead of the "document.fonts" part. This is because it's 10 totally legal for content to say: 11 12 var f = document.fonts; 13 // Modify style here 14 ... f.check(...) ... <=== This needs to reflect the style changes. 15 16 Test: fast/text/FontFaceSet-check-after-style-update.html 17 18 * WebCore.xcodeproj/xcshareddata/xcschemes/WebCore.xcscheme: 19 * css/CSSFontFaceSet.cpp: 20 (WebCore::CSSFontFaceSet::check): 21 * css/FontFaceSet.cpp: 22 (WebCore::FontFaceSet::check): 23 1 24 2021-09-03 Myles C. Maxfield <mmaxfield@apple.com> 2 25 -
trunk/Source/WebCore/css/CSSFontFaceSet.cpp
r281845 r282016 443 443 444 444 for (auto& face : matchingFaces.releaseReturnValue()) { 445 if (face.get().status() == CSSFontFace::Status::Pending) 445 if (face.get().status() == CSSFontFace::Status::Pending 446 || face.get().status() == CSSFontFace::Status::Loading) 446 447 return false; 447 448 } -
trunk/Source/WebCore/css/FontFaceSet.cpp
r282015 r282016 189 189 ExceptionOr<bool> FontFaceSet::check(const String& family, const String& text) 190 190 { 191 return m_backing->check(family, text); 191 Ref protect = m_backing; 192 protect->updateStyleIfNeeded(); 193 return protect->check(family, text); 192 194 } 193 195
Note: See TracChangeset
for help on using the changeset viewer.