Bug 140390 - Devirtualize FontData
Summary: Devirtualize FontData
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-13 08:22 PST by Antti Koivisto
Modified: 2015-01-13 17:25 PST (History)
2 users (show)

See Also:


Attachments
patch (67.52 KB, patch)
2015-01-13 08:30 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (71.66 KB, patch)
2015-01-13 08:53 PST, Antti Koivisto
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2015-01-13 08:22:46 PST
We have font ranges and simple fonts. Those don't need a common base.
Comment 1 Antti Koivisto 2015-01-13 08:30:46 PST
Created attachment 244515 [details]
patch
Comment 2 Antti Koivisto 2015-01-13 08:53:24 PST
Created attachment 244519 [details]
patch
Comment 3 Andreas Kling 2015-01-13 11:51:13 PST
Comment on attachment 244519 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=244519&action=review

r=me

> Source/WebCore/css/CSSSegmentedFontFace.cpp:126
> +        unsigned size = m_fontFaces.size();
> +        for (unsigned i = 0; i < size; i++) {

Range for?

> Source/WebCore/platform/graphics/FontRanges.h:47
> +    PassRefPtr<SimpleFontData> fontData() const { return m_fontData; }

This should return RefPtr (or Ref.)

> Source/WebCore/platform/graphics/FontRanges.h:57
> +    static PassRefPtr<SegmentedFontData> create() { return adoptRef(new SegmentedFontData); }

This should return Ref.
Comment 4 Antti Koivisto 2015-01-13 11:54:31 PST
> > Source/WebCore/platform/graphics/FontRanges.h:47
> > +    PassRefPtr<SimpleFontData> fontData() const { return m_fontData; }
> 
> This should return RefPtr (or Ref.)
> 
> > Source/WebCore/platform/graphics/FontRanges.h:57
> > +    static PassRefPtr<SegmentedFontData> create() { return adoptRef(new SegmentedFontData); }
> 
> This should return Ref.

This is just the move of a move-edit. The edit part fixed these.
Comment 5 Antti Koivisto 2015-01-13 16:10:06 PST
http://trac.webkit.org/changeset/178388
Comment 6 Chris Dumez 2015-01-13 16:11:52 PST
May have broken the build:
/Volumes/Data/EWS/WebKit/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/FontComplexTextMac.o
/Volumes/Data/EWS/WebKit/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp:141:47: error: no member named 'isEmpty' in 'WebCore::FontRanges'
    for (unsigned i = 0; !fallbackRangesAt(i).isEmpty(); ++i) {
                          ~~~~~~~~~~~~~~~~~~~ ^
1 error generated.
Comment 7 Chris Dumez 2015-01-13 16:19:23 PST
(In reply to comment #6)
> May have broken the build:
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/graphics/mac/
> FontComplexTextMac.cpp -o
> /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/
> Objects-normal/x86_64/FontComplexTextMac.o
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/graphics/mac/
> FontComplexTextMac.cpp:141:47: error: no member named 'isEmpty' in
> 'WebCore::FontRanges'
>     for (unsigned i = 0; !fallbackRangesAt(i).isEmpty(); ++i) {
>                           ~~~~~~~~~~~~~~~~~~~ ^
> 1 error generated.

Build fix landed in <http://trac.webkit.org/changeset/178389>.
Comment 8 Chris Dumez 2015-01-13 16:53:13 PST
Seems to have broken IOS build with errors like these:
Source/WebKit/ios/Misc/EmojiFallbackFontSelector.h:36:24: error: no member named 'FontData' in namespace 'WebCore'; did you mean 'WebCore::GlyphData::fontData'
Comment 9 Chris Dumez 2015-01-13 17:25:15 PST
Another iOS build fix was landed in <https://trac.webkit.org/r178389>.