Summary: | [FreeType] Add support for text-underline-offset and text-decoration-thickness | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | Platform | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | aperez, bugs-noreply, ews-watchlist, mmaxfield, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | Gtk, InRadar, LayoutTestFailure | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=214470 | ||||||
Attachments: |
|
Description
Carlos Garcia Campos
2020-07-20 05:53:45 PDT
Created attachment 404711 [details]
Patch
Comment on attachment 404711 [details] Patch I'm almost tempted to r+ this, but I think the comment below is important enough to double check it before, so please take a look. View in context: https://bugs.webkit.org/attachment.cgi?id=404711&action=review > Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp:79 > + if (!determinant) Is the intention here to check for zero exactly, or for some floating point value that is small enough that is logically zero? In the latter case, this looks like a footgun hiding in plain sight and it would be better to compare “std::fabs(determinant) < K” for a reasonable value of “K”, otherwise the value of “determinant” can be almost-but-not zero and defeat the check. (In reply to Adrian Perez from comment #2) > Comment on attachment 404711 [details] > Patch > > I'm almost tempted to r+ this, but I think the comment below is important > enough to double check it before, so please take a look. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=404711&action=review > > > Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp:79 > > + if (!determinant) > > Is the intention here to check for zero exactly, or for some floating point > value that is small enough that is logically zero? In the latter case, this > looks like a footgun hiding in plain sight and it would be better to compare > “std::fabs(determinant) < K” for a reasonable value of “K”, otherwise the > value of “determinant” can be almost-but-not zero and defeat the check. Zero exactly. See the cairo code from which I took this: https://cgit.freedesktop.org/cairo/tree/src/cairo-matrix.c#n685 (In reply to Carlos Garcia Campos from comment #3) > (In reply to Adrian Perez from comment #2) > > Comment on attachment 404711 [details] > > Patch > > > > I'm almost tempted to r+ this, but I think the comment below is important > > enough to double check it before, so please take a look. > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=404711&action=review > > > > > Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp:79 > > > + if (!determinant) > > > > Is the intention here to check for zero exactly, or for some floating point > > value that is small enough that is logically zero? In the latter case, this > > looks like a footgun hiding in plain sight and it would be better to compare > > “std::fabs(determinant) < K” for a reasonable value of “K”, otherwise the > > value of “determinant” can be almost-but-not zero and defeat the check. > > Zero exactly. See the cairo code from which I took this: > > https://cgit.freedesktop.org/cairo/tree/src/cairo-matrix.c#n685 Great, thanks for confirming that the intention is indeed to check for zero exactly :] Committed r264646: <https://trac.webkit.org/changeset/264646> |