Bug 137836

Summary: Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: PlatformAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Enhancement CC: commit-queue, d-r, fmalita, gyuyoung.kim, kling, mmaxfield, pdr, rniwa, schenney, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2014-10-17 14:10:15 PDT
Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms(). This function is never called for SVG fonts so replace the if check by an assertion.
Comment 1 Chris Dumez 2014-10-17 14:13:22 PDT
Created attachment 240038 [details]
Patch
Comment 2 Andreas Kling 2014-10-17 14:21:46 PDT
Comment on attachment 240038 [details]
Patch

r=me

You could also mark applyTransforms() as deleted in SVGFontData. That way you'll get a compile error if you try to call it on an SVGFontData object.
Comment 3 Chris Dumez 2014-10-17 14:23:20 PDT
(In reply to comment #2)
> Comment on attachment 240038 [details]
> Patch
> 
> r=me
> 
> You could also mark applyTransforms() as deleted in SVGFontData. That way
> you'll get a compile error if you try to call it on an SVGFontData object.

Yes, love it
Comment 4 Chris Dumez 2014-10-17 14:42:37 PDT
Created attachment 240040 [details]
Patch
Comment 5 WebKit Commit Bot 2014-10-17 16:59:11 PDT
Comment on attachment 240040 [details]
Patch

Clearing flags on attachment: 240040

Committed r174853: <http://trac.webkit.org/changeset/174853>
Comment 6 WebKit Commit Bot 2014-10-17 16:59:17 PDT
All reviewed patches have been landed.  Closing bug.