RESOLVED FIXED 103971
FontPlatformData has unnecessary m_textOrientation member
https://bugs.webkit.org/show_bug.cgi?id=103971
Summary FontPlatformData has unnecessary m_textOrientation member
mitz
Reported 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.
Attachments
Remove FontPlatformData::m_textOrientation (46.53 KB, patch)
2012-12-03 22:26 PST, mitz
darin: review+
mitz
Comment 1 2012-12-03 22:26:17 PST
Created attachment 177417 [details] Remove FontPlatformData::m_textOrientation
WebKit Review Bot
Comment 2 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.
Eric Seidel (no email)
Comment 3 2012-12-03 23:10:30 PST
Looks reasonable to me.
Darin Adler
Comment 4 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.
mitz
Comment 5 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!
mitz
Comment 6 2012-12-04 09:59:47 PST
Note You need to log in before you can comment on or make changes to this bug.