WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
152772
[SVG -> OTF Converter] Parsing failures cause use of incomplete fonts
https://bugs.webkit.org/show_bug.cgi?id=152772
Summary
[SVG -> OTF Converter] Parsing failures cause use of incomplete fonts
Myles C. Maxfield
Reported
2016-01-05 21:22:22 PST
[SVG -> OTF Converter] Parsing failures cause use of incomplete fonts
Attachments
Patch
(9.41 KB, patch)
2016-01-05 21:24 PST
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(9.48 KB, patch)
2016-01-05 21:25 PST
,
Myles C. Maxfield
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2016-01-05 21:24:55 PST
Created
attachment 268353
[details]
Patch
Myles C. Maxfield
Comment 2
2016-01-05 21:25:38 PST
Created
attachment 268354
[details]
Patch
Myles C. Maxfield
Comment 3
2016-01-05 21:26:27 PST
<
rdar://problem/24043104
>
Said Abou-Hallawa
Comment 4
2016-01-06 12:14:39 PST
Comment on
attachment 268354
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268354&action=review
> Source/WebCore/svg/SVGToOTFFontConversion.cpp:61 > + bool error() const
Why is this function needed? Can't we check m_error in functions like SVGToOTFFontConverter::convertSVGToOTFFont() and return immediately if its value is true?
> Source/WebCore/svg/SVGToOTFFontConversion.cpp:1583 > SVGToOTFFontConverter converter(element);
Since SVGToOTFFontConverter::processGlyphElement() sets m_error to true and since it's called from the constructor of SVGToOTFFontConverter, should not we check converter.m_error before calling SVGToOTFFontConverter::convertSVGToOTFFont()? If m_error is true we are going to return Nullopt anyway.
> Source/WebCore/svg/SVGToOTFFontConversion.cpp:1586 > + return Nullopt;
Can't this if-statment be written like this? if (!converter.convertSVGToOTFFont()) return Nullopt;
Myles C. Maxfield
Comment 5
2016-01-10 18:56:34 PST
Comment on
attachment 268354
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268354&action=review
>> Source/WebCore/svg/SVGToOTFFontConversion.cpp:61 >> + bool error() const > > Why is this function needed? Can't we check m_error in functions like SVGToOTFFontConverter::convertSVGToOTFFont() and return immediately if its value is true?
I anticipate there may be new sources of errors in the future which should result in conversion failure.
>> Source/WebCore/svg/SVGToOTFFontConversion.cpp:1583 >> SVGToOTFFontConverter converter(element); > > Since SVGToOTFFontConverter::processGlyphElement() sets m_error to true and since it's called from the constructor of SVGToOTFFontConverter, should not we check converter.m_error before calling SVGToOTFFontConverter::convertSVGToOTFFont()? If m_error is true we are going to return Nullopt anyway.
Yeah, this is a good idea.
>> Source/WebCore/svg/SVGToOTFFontConversion.cpp:1586 >> + return Nullopt; > > Can't this if-statment be written like this? > > if (!converter.convertSVGToOTFFont()) > return Nullopt;
👍
Myles C. Maxfield
Comment 6
2016-01-10 21:55:30 PST
Committed
r194839
: <
http://trac.webkit.org/changeset/194839
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug