Bug 103971 - FontPlatformData has unnecessary m_textOrientation member
Summary: FontPlatformData has unnecessary m_textOrientation member
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-03 21:23 PST by mitz
Modified: 2012-12-04 09:59 PST (History)
15 users (show)

See Also:


Attachments
Remove FontPlatformData::m_textOrientation (46.53 KB, patch)
2012-12-03 22:26 PST, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2012-12-03 21:23:16 PST
Nothing in SimpleFontData depends on the FontPlatformData’s textOrientation, so we don’t need separate data for vertical-right and upright. We simply use the verticalRightOrientationFontData() and uprightOrientationFontData() based on the textOrientation in the FontDescription.
Comment 1 mitz 2012-12-03 22:26:17 PST
Created attachment 177417 [details]
Remove FontPlatformData::m_textOrientation
Comment 2 WebKit Review Bot 2012-12-03 22:28:31 PST
Attachment 177417 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/platform/graphics/FontCache.cpp:65:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/FontCache.cpp:84:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/FontCache.cpp:202:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/chromium/FontCacheAndroid.cpp:181:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/chromium/FontCacheAndroid.cpp:205:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp:183:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/css/CSSFontFaceSource.cpp:115:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/FontPlatformData.h:112:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp:69:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 9 in 30 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Eric Seidel (no email) 2012-12-03 23:10:30 PST
Looks reasonable to me.
Comment 4 Darin Adler 2012-12-04 09:38:39 PST
Comment on attachment 177417 [details]
Remove FontPlatformData::m_textOrientation

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

> Source/WebCore/ChangeLog:8
> +        Nothing in SimpleFontData depends on the FontPlatformDataâs textOrientation, so we donât

Is the strange character here you doing something wrong, or bugs.webkit.org doing something wrong?

>> Source/WebCore/css/CSSFontFaceSource.cpp:115
>> +                       | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
> 
> Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]

For what it’s worth I prefer the 4-space indent that the style script calls for. But I don’t think adding formatting changes to this patch is a good idea.
Comment 5 mitz 2012-12-04 09:56:07 PST
(In reply to comment #4)
> (From update of attachment 177417 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=177417&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        Nothing in SimpleFontData depends on the FontPlatformDataâs textOrientation, so we donât
> 
> Is the strange character here you doing something wrong, or bugs.webkit.org doing something wrong?

This is our friend bug 75394.

> 
> >> Source/WebCore/css/CSSFontFaceSource.cpp:115
> >> +                       | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
> > 
> > Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
> 
> For what it’s worth I prefer the 4-space indent that the style script calls for. But I don’t think adding formatting changes to this patch is a good idea.

I agree. Thanks for the review!
Comment 6 mitz 2012-12-04 09:59:47 PST
Fixed in <http://trac.webkit.org/r136520>.