[webkit-changes] [WebKit/WebKit] 72d690: Add lockdown mode logging
Karl Dubost
noreply at github.com
Wed Oct 11 21:20:00 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 72d690ca074069922d8088c78ba5b2ab8fc9872e
https://github.com/WebKit/WebKit/commit/72d690ca074069922d8088c78ba5b2ab8fc9872e
Author: Karl Dubost <karlcow at apple.com>
Date: 2023-10-11 (Wed, 11 Oct 2023)
Changed paths:
M Source/WebCore/css/CSSFontFaceSrcValue.cpp
M Source/WebCore/dom/Document.cpp
M Source/WebCore/loader/cache/AllowedFonts.cpp
M Source/WebCore/loader/cache/CachedFont.cpp
M Source/WebCore/loader/cache/CachedFont.h
M Source/WebCore/loader/cache/CachedFontLoadRequest.h
Log Message:
-----------
Add lockdown mode logging
https://bugs.webkit.org/show_bug.cgi?id=262518
rdar://114657783
Reviewed by Chris Dumez.
When activated Lockdown mode is reducing some of the features
accessible to a Webpage. This creates breakages which can be
sometimes a bit hard to identify. The goal of this change is
to improve the findability of the type of issues by adding logging
for engineers to understand what type of breakage is going on.
Currently we only target fonts which have not been loaded. It seems,
for now, these are the main source of breakage. We initially wanted
to log the URL of the fonts being logged in syslog, but this create
significant issues in terms of privacy, as it would share URLs which
will be private to the user context, such as intranet systems. Logging
the name of the fonts might also create issues with inline nameless
fonts and we would only know the name given to the font at the CSS
parsing time, as the blocked fonts are not being downloaded.
This also adds logging in the Web Inspector console for fonts URLs
being blocked by Lockdown mode. Being private to the user context,
this is helpful for the Web developer to determine what fonts are
missing and gives the opportunity for them to share at their will
the issue in a bug report.
We might, in the future, add more engineering logging for other
features.
If you need to learn more about lockdown mode, see
https://support.apple.com/en-us/HT212650
* Source/WebCore/loader/cache/AllowedFonts.cpp:
(WebCore::isFontBinaryAllowed):
* Source/WebCore/css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcResourceValue::fontLoadRequest):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::fontLoadRequest):
* Source/WebCore/loader/cache/CachedFont.cpp:
(WebCore::CachedFont::finishLoading):
* Source/WebCore/loader/cache/CachedFont.h:
(WebCore::CachedFont::didRefuseToLoadCustomFont const):
* Source/WebCore/loader/cache/CachedFontLoadRequest.h:
Co-authored-by: Chris Dumez <cdumez at apple.com>
Co-authored-by: Brent Fulgham <bfulgham at webkit.org>
Canonical link: https://commits.webkit.org/269238@main
More information about the webkit-changes
mailing list