New issue
Advanced search Search tips

Issue 798944 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 671916



Sign in to add a comment

MacViewsBrowser: switches::kEnableHarfBuzzRenderText should always be set

Project Member Reported by tapted@chromium.org, Jan 4 2018

Issue description

Chrome Version       : 65.0.3294.5
OS Version: OS X 10.12.6

There's no Cocoa UI except in menus and tooltips.

gfx::RenderText::CreateFor(Typesetter::PLATFORM) should return harfbuzz on MAC_VIEWS_BROWSER builds.
 
Labels: M-68
Applying M-68 milestone per email discussion with ellyjones@.
Labels: -M-68 Target-68
Owner: spqc...@chromium.org
Status: Assigned (was: Available)
MacViews triage: spqchan@, can you look into this? Let's fix this by M-68 :)
Just to clarify: this should ALWAYS return harfbuzz on MAC_VIEWS_BROWSER builds?

Comment 4 by tapted@chromium.org, Mar 27 2018

nope -- only when Typesetter::PLATFORM is passed. 

Typesetter::NATIVE is still needed for tooltips and NSMenu (or potentially other places we must still render text on Mac with an NSAttributedString rather than gfx::RenderText)
Thanks for the clarification!

Comment 6 by gov...@chromium.org, Mar 27 2018

Labels: M-68
Sorry, I'm still confused about this. There's no Typesetter::PLATFORM.

Also, what do you mean by "switches::kEnableHarfBuzzRenderText should always be set"?
Should I remove kEnableHarfBuzzRenderText and always return Harfbuzz in Mac if Typesetter:NATIVE is not passed? Thanks!

Comment 8 by tapted@chromium.org, Mar 28 2018

ah - my mistake. It was renamed to BROWSER. Other stuff has shifted about since this bug was filed too. I think we just need RenderText::CreateFor to consider kViewsBrowserWindows

something like

// static
std::unique_ptr<RenderText> RenderText::CreateFor(Typesetter typesetter) {
#if defined(OS_MACOSX)
  if (typesetter == Typesetter::NATIVE)
    return std::make_unique<RenderTextMac>();

  if (typesetter == Typesetter::HARFBUZZ)
    return CreateHarfBuzzInstance();

  static const bool use_native =
      !base::FeatureList::IsEnabled(features::kViewsBrowserWindows) &&
      !base::CommandLine::ForCurrentProcess()->HasSwitch(
          switches::kEnableHarfBuzzRenderText);
  if (use_native)
    return std::make_unique<RenderTextMac>();
#endif  // defined(OS_MACOSX)
  return CreateHarfBuzzInstance();
}
Thanks for the clarification! Sounds good. This will be a bit tricky since we can't put ui_base stuff into ui/gfx but I'll see if there's a workaround.
** Bulk Edit **

FYI: Starting 04/13 M68 will be in canary, M68 Dev promotion will be on 04/26.

Pls mark the bug as fixed if CL is landed in trunk and nothing else is pending. Thank you.
Owner: ----
Status: Untriaged (was: Assigned)
Labels: -M-68 -Target-68 Target-69 M-69
Owner: weili@chromium.org
Status: Assigned (was: Untriaged)
MacViews triage: over to weili@ for M69 :)
Labels: -M-69
Labels: M-69
Labels: Group-Cleanup
Labels: -M-69 -Target-69 M-70 Target-70
Cc: weili@chromium.org
Owner: tapted@chromium.org
Status: Started (was: Assigned)
https://chromium-review.googlesource.com/c/chromium/src/+/1248263
Project Member

Comment 19 by bugdroid1@chromium.org, Sep 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a5abaaad7eb9693282982a3aadd5bd63357d032

commit 5a5abaaad7eb9693282982a3aadd5bd63357d032
Author: Trent Apted <tapted@chromium.org>
Date: Thu Sep 27 15:34:46 2018

Remove [gfx] switches::kEnableHarfBuzzRenderText.

It's effectively the default. Only a few places using
gfx::Typesetter::NATIVE explicitly should be using RenderTextMac now.

Bug:  798944 , 889152
Change-Id: I3318676b14b938607de9413130627dc1581b2289
Reviewed-on: https://chromium-review.googlesource.com/1248263
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594732}
[modify] https://crrev.com/5a5abaaad7eb9693282982a3aadd5bd63357d032/chrome/browser/about_flags.cc
[modify] https://crrev.com/5a5abaaad7eb9693282982a3aadd5bd63357d032/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/5a5abaaad7eb9693282982a3aadd5bd63357d032/ui/gfx/render_text.cc
[modify] https://crrev.com/5a5abaaad7eb9693282982a3aadd5bd63357d032/ui/gfx/switches.cc
[modify] https://crrev.com/5a5abaaad7eb9693282982a3aadd5bd63357d032/ui/gfx/switches.h
[modify] https://crrev.com/5a5abaaad7eb9693282982a3aadd5bd63357d032/ui/views/controls/label_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment