Dev Tools fontsUpdated event does not describe the loaded web font
Reported by
br...@amazon.com,
Jan 17 2018
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/63.0.3239.84 Chrome/63.0.3239.84 Safari/537.36 Steps to reproduce the problem: Dev tools includes a fontsUpdated event: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/inspector/browser_protocol.json?l=2264&rcl=6ea06ef7f98d79c4fc87749fc3b860961f3345ad. Per the description in the protocol, this event "Fires whenever a web font gets loaded." Note this event is not fired with any parameters, meaning it's not possible to determine (a) which web font loaded or (b) what the properties of that web font are. Ideally this event would be fired with parameter(s) describing the web font that has been loaded, based on the properties of the @font-face. E.g. font-family, url, font-style, font-weight, etc. What is the expected behavior? Dev tools should return information about the loaded font as a part of the event. What went wrong? Dev tools does not return information about the loaded font as a part of the event. Did this work before? No Chrome version: 63.0.3239.84 Channel: canary OS Version: 16.04 Flash Version:
,
Jan 18 2018
Tested the issue on reported version 63.0.3239.84, on latest stable 63.0.3239.132 using Ubuntu 14.04 with steps mentioned below. 1. Navigated to https://bugs.chromium.org/p/chromium/issues/detail?id=803226 2. Opened devtools and typed "font" in styles section and observed font content. Attaching screenshot for reference. @Reporter: Could you please check the screenshot and let us know if this is not the expected behaviour. This would help in further triaging of the issue. Thanks!
,
Jan 18 2018
Those are not valid steps for the reported issue. What's illustrated in the screenshot above is that it's possible to get the current font styling on an element via dev tools. The reported issue is that the dev tools *protocol* has an *event* named fontsUpdated, which fires whenever a web font gets loaded. With the current implementation of this event, it is not possible to know *which* font updated, because the event does not include any parameters. This can be seen by looking at the protocol source directly: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/inspector/browser_protocol.json?l=2264&rcl=6ea06ef7f98d79c4fc87749fc3b860961f3345ad. Note how there is no "parameters" key in the specification for fontsUpdated.
,
Jan 18 2018
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 18 2018
,
Feb 7 2018
,
Mar 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bf7bdf59830d9d9e48d73278457cc1e9173f702d commit bf7bdf59830d9d9e48d73278457cc1e9173f702d Author: Bryce Thomas <bryct@amazon.com> Date: Thu Mar 01 13:24:03 2018 Add fontLoaded event to dev tools protocol CSS domain. This event notifies the dev tools client when a web font has successfully loaded. Event information includes the font-family, src, and other font properties, as well as the resolved platform font family name. R=dgozman@chromium.org Bug: 803226 Change-Id: I2bb399ce1c08b0a397f8eb94d95aa85556ebb2c1 Reviewed-on: https://chromium-review.googlesource.com/905829 Commit-Queue: Dominik Röttsches <drott@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#540145} [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/AUTHORS [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event-expected.txt [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/LayoutTests/inspector-protocol/css/css-fonts-updated-event.js [delete] https://crrev.com/ae6987e12b572be56b43368781235272817c0193/third_party/WebKit/LayoutTests/inspector-protocol/css/resources/ahem.css [add] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/LayoutTests/inspector-protocol/css/resources/noto-mono.css [add] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/LayoutTests/third_party/NotoMono-hintedLocalizedFamilyName/LICENSE_OFL.txt [add] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/LayoutTests/third_party/NotoMono-hintedLocalizedFamilyName/NotoMono-Regular.subset.ttf [add] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/LayoutTests/third_party/NotoMono-hintedLocalizedFamilyName/README [add] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/LayoutTests/third_party/NotoMono-hintedLocalizedFamilyName/README.chromium [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/Source/core/css/StyleEngine.cpp [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/Source/core/inspector/browser_protocol.json [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/Source/core/inspector/browser_protocol.pdl [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/Source/core/probe/CoreProbes.pidl [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp [modify] https://crrev.com/bf7bdf59830d9d9e48d73278457cc1e9173f702d/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.h
,
Dec 19
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by krajshree@chromium.org
, Jan 18 2018