Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Issue 2817663003: Rendering text on insecure-site warnings for WebVR (Closed)

Created:
3 years, 8 months ago by acondor_
Modified:
3 years, 8 months ago
Reviewers:
mthiesse, sadrul, cjgrant
CC:
chromium-reviews, feature-vr-reviews_chromium.org, derat+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

When presenting WebVR on insecure sites, a warning needs to be presented to the user. This change renders these messages on textures to be added to a GL scene. - Text is rendered with gfx::Canvas and gfx::RenderText, previously disabled for android. - Fallback fonts were handled with Skia's font manager. - The text is measured before rendering in order to layout properly, reducing empty space. - The icons are positioned on the right on RTL languages. BUG=713779 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2817663003 Cr-Commit-Position: refs/heads/master@{#466472} Committed: https://chromium.googlesource.com/chromium/src/+/423d7c1b4001927a1a6f6180aa0f3eebe72348e4

Patch Set 1 #

Total comments: 1

Patch Set 2 : Using enable_vr flag. #

Total comments: 9

Patch Set 3 : Using ENABLE_VR build flag and rendering text on textures. #

Patch Set 4 : Adding TODO for device scale factor #

Total comments: 6

Patch Set 5 : Setting constants for texture layout proportions #

Patch Set 6 : Measuring text to accomplish a more proper layout and positioning icons according to RTL languages #

Total comments: 3

Patch Set 7 : static functions usage #

Patch Set 8 : build workaround #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -31 lines) Patch
M chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc View 1 2 3 4 5 6 3 chunks +35 lines, -6 lines 0 comments Download
M chrome/browser/android/vr_shell/textures/insecure_content_transient_texture.cc View 1 2 3 4 5 6 4 chunks +39 lines, -9 lines 0 comments Download
M chrome/browser/android/vr_shell/textures/ui_texture.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/android/vr_shell/textures/ui_texture.cc View 1 2 3 4 5 2 chunks +40 lines, -0 lines 0 comments Download
M chrome/browser/android/vr_shell/vr_shell.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M device/vr/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +16 lines, -12 lines 0 comments Download
M ui/gfx/BUILD.gn View 1 2 3 chunks +4 lines, -3 lines 3 comments Download
M ui/gfx/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/font_render_params.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M ui/gfx/font_render_params_android.cc View 2 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 54 (29 generated)
acondor_
https://codereview.chromium.org/2817663003/diff/1/ui/gfx/font_render_params_android.cc File ui/gfx/font_render_params_android.cc (left): https://codereview.chromium.org/2817663003/diff/1/ui/gfx/font_render_params_android.cc#oldcode30 ui/gfx/font_render_params_android.cc:30: Implementation taken from ui/gfx/font_render_params_linux.cc
3 years, 8 months ago (2017-04-13 14:00:51 UTC) #4
mthiesse
We'll see what owners think, but I think we can safely remove the use_aura flags ...
3 years, 8 months ago (2017-04-13 14:16:51 UTC) #6
sadrul
https://codereview.chromium.org/2817663003/diff/20001/ui/gfx/BUILD.gn File ui/gfx/BUILD.gn (right): https://codereview.chromium.org/2817663003/diff/20001/ui/gfx/BUILD.gn#newcode263 ui/gfx/BUILD.gn:263: if (use_aura || is_mac || (is_android && enable_vr)) { ...
3 years, 8 months ago (2017-04-13 14:57:55 UTC) #8
acondor_
PTAL +mthiesse +cjgrant for vr_shell/ +sadrul for gfx/ https://codereview.chromium.org/2817663003/diff/20001/ui/gfx/BUILD.gn File ui/gfx/BUILD.gn (right): https://codereview.chromium.org/2817663003/diff/20001/ui/gfx/BUILD.gn#newcode263 ui/gfx/BUILD.gn:263: if ...
3 years, 8 months ago (2017-04-18 20:59:04 UTC) #11
mthiesse
https://codereview.chromium.org/2817663003/diff/60001/chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc File chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc (right): https://codereview.chromium.org/2817663003/diff/60001/chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc#newcode58 chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc:58: text, GetFontList(height_ * 0.3, text), kForegroundColor, Can you make ...
3 years, 8 months ago (2017-04-18 21:30:36 UTC) #12
acondor_
https://codereview.chromium.org/2817663003/diff/60001/chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc File chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc (right): https://codereview.chromium.org/2817663003/diff/60001/chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc#newcode58 chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc:58: text, GetFontList(height_ * 0.3, text), kForegroundColor, On 2017/04/18 21:30:35, ...
3 years, 8 months ago (2017-04-18 23:48:46 UTC) #13
mthiesse
lgtm
3 years, 8 months ago (2017-04-19 14:18:56 UTC) #14
mthiesse
Bit of a strange request, but since Chrome release folks care more about number of ...
3 years, 8 months ago (2017-04-20 16:30:45 UTC) #15
mthiesse
Also, could you please create a new bug for this CL to make tracking the ...
3 years, 8 months ago (2017-04-20 16:32:55 UTC) #16
acondor_
On 2017/04/20 16:32:55, mthiesse wrote: > Also, could you please create a new bug for ...
3 years, 8 months ago (2017-04-20 17:38:08 UTC) #18
mthiesse
lgtm https://codereview.chromium.org/2817663003/diff/100001/chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc File chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc (right): https://codereview.chromium.org/2817663003/diff/100001/chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc#newcode76 chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc:76: text, GetFontList(height_ * kFontSizeFactor, text), kForegroundColor, reuse |fonts|
3 years, 8 months ago (2017-04-21 00:03:12 UTC) #19
mthiesse
https://codereview.chromium.org/2817663003/diff/100001/chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc File chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc (right): https://codereview.chromium.org/2817663003/diff/100001/chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc#newcode53 chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.cc:53: canvas->SizeStringInt(text, fonts, &text_width, &text_height, 0, text_flags); Canvas::SizeStringInt is a ...
3 years, 8 months ago (2017-04-21 00:12:24 UTC) #20
sadrul
Can you sanitize the CL title/description a little bit? It's not making a lot of ...
3 years, 8 months ago (2017-04-21 03:36:42 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2817663003/100001
3 years, 8 months ago (2017-04-21 14:22:43 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2817663003/120001
3 years, 8 months ago (2017-04-21 14:23:54 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/196081) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 8 months ago (2017-04-21 14:31:05 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2817663003/290001
3 years, 8 months ago (2017-04-21 20:04:12 UTC) #42
commit-bot: I haz the power
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_ng/builds/428039)
3 years, 8 months ago (2017-04-21 20:40:42 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2817663003/290001
3 years, 8 months ago (2017-04-21 21:36:00 UTC) #46
sadrul
https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn File ui/gfx/BUILD.gn (right): https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn#newcode258 ui/gfx/BUILD.gn:258: "//device/vr:features", Actually, can you move this down, in (is_android ...
3 years, 8 months ago (2017-04-21 22:31:47 UTC) #47
commit-bot: I haz the power
Committed patchset #8 (id:290001) as https://chromium.googlesource.com/chromium/src/+/423d7c1b4001927a1a6f6180aa0f3eebe72348e4
3 years, 8 months ago (2017-04-21 22:38:06 UTC) #50
acondor_
https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn File ui/gfx/BUILD.gn (right): https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn#newcode258 ui/gfx/BUILD.gn:258: "//device/vr:features", On 2017/04/21 22:31:47, sadrul wrote: > Actually, can ...
3 years, 8 months ago (2017-04-24 14:28:21 UTC) #51
sadrul
https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn File ui/gfx/BUILD.gn (right): https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn#newcode258 ui/gfx/BUILD.gn:258: "//device/vr:features", On 2017/04/24 14:28:21, acondor wrote: > On 2017/04/21 ...
3 years, 8 months ago (2017-04-24 14:31:50 UTC) #52
mthiesse
On 2017/04/24 14:31:50, sadrul wrote: > https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn > File ui/gfx/BUILD.gn (right): > > https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn#newcode258 > ...
3 years, 8 months ago (2017-04-24 15:31:27 UTC) #53
mthiesse
3 years, 8 months ago (2017-04-24 15:31:29 UTC) #54
Message was sent while issue was closed.
On 2017/04/24 14:31:50, sadrul wrote:
> https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn
> File ui/gfx/BUILD.gn (right):
> 
>
https://codereview.chromium.org/2817663003/diff/290001/ui/gfx/BUILD.gn#newcod...
> ui/gfx/BUILD.gn:258: "//device/vr:features",
> On 2017/04/24 14:28:21, acondor wrote:
> > On 2017/04/21 22:31:47, sadrul wrote:
> > > Actually, can you move this down, in (is_android && enable_vr) block?
> > 
> > "features" is a header that defines ENABLE_VR, so it is in fact needed in
all
> > platforms.
> 
> I see. Maybe that header could move into an OS_ANDROID check?
> 
> Do you know whether/when we plan on supporting |enable_vr| on non-android
> platforms? If it is on the plans, then this is ok. If not, some of the
following
> could also be simplified (e.g. 'is_android && enable_vr' could just be
> 'enable_vr')

We do plan on supporting non-android platforms in the near future.

Powered by Google App Engine
This is Rietveld 408576698