|
|
Chromium Code Reviews|
Created:
4 years, 5 months ago by kojii Modified:
4 years, 1 month ago CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), jam, jbroman, Justin Novosad, kinuko+watch, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionSet the font family for the "system-ui" generic font family on Linux
This patch sets the font family for the "system-ui" generic font family
added in [1] on Linux.
With this change, all platforms use the correct font. On Windows, the
browser already pass menu_font_family_name to the renderer. On Mac and
Android, the render can find the system font without needing the
browser to set.
On Linux and Chrome OS, gfx::Font() calls LinuxFontDelegate to figure
out the current system font. On the default Ubuntu, this resolves to
"sans", which Skia resolves to "DejaVu Sans", or "Arial" in
run-layout-test.
[1] http://crrev.com/2137483004
BUG=654679
Committed: https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14
Cr-Commit-Position: refs/heads/master@{#427262}
Patch Set 1 #Patch Set 2 : WIP #Patch Set 3 : WIP #Patch Set 4 : WIP #Patch Set 5 : WIP #Patch Set 6 : WIP #Patch Set 7 : #Patch Set 8 : test failures for cros #Patch Set 9 : WIP #Patch Set 10 : WIP #Patch Set 11 : WIP #
Total comments: 1
Patch Set 12 : Cleanup, change Blink first #Patch Set 13 : Rebase after clang-format #Patch Set 14 : Rebase #Patch Set 15 : Skip setting if empty() #Patch Set 16 : Switch to gfx::Font().GetFontName() #Patch Set 17 : Rebase #Patch Set 18 : Move to render_view_host_impl.cc #Patch Set 19 : Windows fix #Patch Set 20 : Avoid #if in Source/web #
Total comments: 2
Patch Set 21 : Changed char* to WebString #
Total comments: 3
Patch Set 22 : jochen review nit (add braces) #Messages
Total messages: 92 (74 generated)
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by kojii@chromium.org
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
drott@chromium.org changed reviewers: + drott@chromium.org
https://codereview.chromium.org/2138613002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm (right): https://codereview.chromium.org/2138613002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm:62: DEFINE_STATIC_LOCAL(AtomicString, systemFontFamilyName, ("system-ui")); Does this work on all OS X versions?
On 2016/09/29 at 13:48:54, drott wrote: > https://codereview.chromium.org/2138613002/diff/200001/third_party/WebKit/Sou... > File third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm (right): > > https://codereview.chromium.org/2138613002/diff/200001/third_party/WebKit/Sou... > third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm:62: DEFINE_STATIC_LOCAL(AtomicString, systemFontFamilyName, ("system-ui")); > Does this work on all OS X versions? Not at this point ;-P Need to change FontMatcherMac.mm to support this constant.
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Exceeded global retry quota
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== WIP: system-font BUG= ========== to ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. All platforms are supported With this change. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font. [1] http://crrev.com/2137483004 BUG=654679 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. All platforms are supported With this change. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font. [1] http://crrev.com/2137483004 BUG=654679 ========== to ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. All platforms are supported With this change. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. [1] http://crrev.com/2137483004 BUG=654679 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Description was changed from ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. All platforms are supported With this change. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. [1] http://crrev.com/2137483004 BUG=654679 ========== to ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. All platforms use the correctc font with this change. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. [1] http://crrev.com/2137483004 BUG=654679 ==========
The CQ bit was unchecked by kojii@chromium.org
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
drott@: content_shell can see the correct font by moving the set-code from renderer_preferences_util.cc to render_view_host_impl.cc in PS18, so "-expected.txt" was updated.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. All platforms use the correctc font with this change. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. [1] http://crrev.com/2137483004 BUG=654679 ========== to ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. With this change, all platforms use the correct font. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. [1] http://crrev.com/2137483004 BUG=654679 ==========
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
kojii@chromium.org changed reviewers: + dcheng@chromium.org, esprehn@chromium.org
PTAL.
dcheng@: content/common/view_messages.h
content/public/common/renderer_preferences.h
esprehn@: all the rest (content/browser, content/renderer, third_party/WebKit)
drott@: all
ipc lgtm https://codereview.chromium.org/2138613002/diff/380001/third_party/WebKit/pub... File third_party/WebKit/public/web/linux/WebFontRendering.h (right): https://codereview.chromium.org/2138613002/diff/380001/third_party/WebKit/pub... third_party/WebKit/public/web/linux/WebFontRendering.h:52: BLINK_EXPORT static void setSystemFontFamily(const char*); Out of curiosity, why const char* instead of something like WebCString? const char* in the public API is pretty rare.
The CQ bit was checked by kojii@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2138613002/diff/380001/third_party/WebKit/pub... File third_party/WebKit/public/web/linux/WebFontRendering.h (right): https://codereview.chromium.org/2138613002/diff/380001/third_party/WebKit/pub... third_party/WebKit/public/web/linux/WebFontRendering.h:52: BLINK_EXPORT static void setSystemFontFamily(const char*); On 2016/10/20 at 09:16:03, dcheng wrote: > Out of curiosity, why const char* instead of something like WebCString? const char* in the public API is pretty rare. Followed too old example...fixed to WebString in PS21. Thank you for catching this.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2138613002/diff/400001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/platform/linux/inspector-protocol/layout-fonts/generic-system-ui-expected.txt (right): https://codereview.chromium.org/2138613002/diff/400001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/platform/linux/inspector-protocol/layout-fonts/generic-system-ui-expected.txt:3: "Arial" : 37 Could you explain why this ends up being Arial? Is this because setSystemFontFamily is not set for layout tests, and then we do the empty SkTypeface fallback (which I thought should give us a font that fontconfig mapped to "Sans", or if it doesn't find Sans, then Arial as secondary fallback, see FontCache::getLastResortFallbackFont). Or does this have a different reason, like does this come from gfx::Font()? Could you add such an explanation to the CL description?
So, LGTM with the above request of adding an explanation for the layout test result. Also, I assume gfx::Font() works on CrOS as well? Perhaps it's worth mentioning this platform explicitly in the CL description.
Description was changed from ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. With this change, all platforms use the correct font. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. [1] http://crrev.com/2137483004 BUG=654679 ========== to ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. With this change, all platforms use the correct font. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. On Linux and Chrome OS, gfx::Font() calls LinuxFontDelegate to figure out the current system font. On the default Ubuntu, this resolves to "sans", which Skia resolves to "DejaVu Sans", or "Arial" in run-layout-test. [1] http://crrev.com/2137483004 BUG=654679 ==========
setSystemFontFamily is set in content_shell and in layout tests by moving the code to render_view_host_impl.cpp, but Skia resolves "sans" differently when in run-layout-test. Updated the description, and added CrOS too.
On 2016/10/21 at 03:25:45, kojii wrote: > setSystemFontFamily is set in content_shell and in layout tests by moving the code to render_view_host_impl.cpp, but Skia resolves "sans" differently when in run-layout-test. Updated the description, and added CrOS too. Great, thanks. Nice CL.
kojii@chromium.org changed reviewers: + jochen@chromium.org - esprehn@chromium.org
jochen@, PTAL at following files:
content/browser/renderer_host/render_view_host_impl.cc
content/public/common/renderer_preferences.h
content/renderer/render_view_linux.cc
lgtm with nit https://codereview.chromium.org/2138613002/diff/400001/content/renderer/rende... File content/renderer/render_view_linux.cc (right): https://codereview.chromium.org/2138613002/diff/400001/content/renderer/rende... content/renderer/render_view_linux.cc:73: if (!prefs.system_font_family_name.empty()) please add { } around the if body
The CQ bit was checked by kojii@chromium.org
https://codereview.chromium.org/2138613002/diff/400001/content/renderer/rende... File content/renderer/render_view_linux.cc (right): https://codereview.chromium.org/2138613002/diff/400001/content/renderer/rende... content/renderer/render_view_linux.cc:73: if (!prefs.system_font_family_name.empty()) On 2016/10/24 at 07:24:26, jochen wrote: > please add { } around the if body Done, missed this, thank you.
The patchset sent to the CQ was uploaded after l-g-t-m from dcheng@chromium.org, drott@chromium.org, jochen@chromium.org Link to the patchset: https://codereview.chromium.org/2138613002/#ps420001 (title: "jochen review nit (add braces)")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by kojii@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #22 (id:420001)
Message was sent while issue was closed.
Description was changed from ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. With this change, all platforms use the correct font. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. On Linux and Chrome OS, gfx::Font() calls LinuxFontDelegate to figure out the current system font. On the default Ubuntu, this resolves to "sans", which Skia resolves to "DejaVu Sans", or "Arial" in run-layout-test. [1] http://crrev.com/2137483004 BUG=654679 ========== to ========== Set the font family for the "system-ui" generic font family on Linux This patch sets the font family for the "system-ui" generic font family added in [1] on Linux. With this change, all platforms use the correct font. On Windows, the browser already pass menu_font_family_name to the renderer. On Mac and Android, the render can find the system font without needing the browser to set. On Linux and Chrome OS, gfx::Font() calls LinuxFontDelegate to figure out the current system font. On the default Ubuntu, this resolves to "sans", which Skia resolves to "DejaVu Sans", or "Arial" in run-layout-test. [1] http://crrev.com/2137483004 BUG=654679 Committed: https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14 Cr-Commit-Position: refs/heads/master@{#427262} ==========
Message was sent while issue was closed.
Patchset 22 (id:??) landed as https://crrev.com/85fa241e3aa27a6c0c5ecb9c9ca4daa56ea4ac14 Cr-Commit-Position: refs/heads/master@{#427262} |
