Bug 135419 - Black canvas when using RTL/webGL on Google Maps
Summary: Black canvas when using RTL/webGL on Google Maps
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://google.com/maps?force=webgl&hl=ar
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-30 10:37 PDT by Michael Davidson
Modified: 2014-07-30 14:25 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Davidson 2014-07-30 10:37:55 PDT
When launching in RTL languages, the WebGL canvas is always black. This doesn't happen for our 2D canvas rendering, and doesn't happen in LTR languages.

Compare:

http://google.com/maps?force=webgl&hl=ar   (RTL, WebGL, bad)
http://google.com/maps?force=webgl&hl=en  (LTR, WebGL, looks good!)
http://google.com/maps?force=canvas&hl=at (RTL, Canvas2D, good)
Comment 1 Brent Fulgham 2014-07-30 10:53:21 PDT
What operating system version are you running when you encounter this? Is it a shipping Mavericks version, or the developer seed for the upcoming OS?
Comment 2 Alex Christensen 2014-07-30 10:58:35 PDT
I think this is a problem in your content.  Switching the user agent to Google Chrome -- Mac makes it no longer happen.
I see the map for a moment, then it smoothly fades to black.  I'm not familiar with the inner workings of Google Maps.  Do you have any idea what would cause this?
Comment 3 Michael Davidson 2014-07-30 11:19:09 PDT
My OS: 10.9.4
Retina MBP
GPU:  NVIDIA GeForce GT 650M 1024 MB

Alex, the initial map you see is image tags showing raster content. The WebGL context never shows content, it's always black.
Comment 4 Michael Davidson 2014-07-30 11:19:28 PDT
Nightly version: Version 7.0.5 (9537.77.4, r171650)
Comment 5 Brent Fulgham 2014-07-30 11:51:49 PDT
Seems to be limited to Retina hardware.
Comment 6 Michael Davidson 2014-07-30 12:24:28 PDT
A clue:

In non-Safari high DPI browsers, we scale the canvas using style.width/style.height. If you emulate the Chrome UA, you'll see that it does render, but not with correct crisp text.

In Safari, we scale using a webkit-transform of scale(.5, .5), which yields sharp text in LTR languages but a black canvas in RTL languages.
Comment 7 Michael Davidson 2014-07-30 13:54:02 PDT
This is a bug in the maps code. We're not setting the origin of the transform in RTL languages.