New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 621945 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Not working on Chrome any more
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Google photos is broken with CSSTypedOM feature enabled

Project Member Reported by rbyers@chromium.org, Jun 21 2016

Issue description

Version: 53.0.2767.4
OS: Linux

What steps will reproduce the problem?
(1) Run Chrome with --enable-blink-features=CSSTypedOM
(2) Load photos.google.com

What is the expected output?
Expect photos to work

What do you see instead?
Mostly white page that shows no photos and where none of the UI elements work

CSSTypedOM is currently included in --enable-experimental-web-platform-features so this issue may be a problem for those of us that try to run with this flag on.  If we can't get a fix (to photos or chrome) landed soon, we should consider lowering CSSTypedOM to status=test instead of status=experimental.  I had to bisect through all the status=experimental features in order to find the one that was causing photos to be broken.

 
Screenshot from 2016-06-21 11:11:21.png
25.5 KB View Download

Comment 1 by meade@chromium.org, Jun 21 2016

Cc: shans@chromium.org
I had a quick look at this - the issue is that something in Photos uses CSSMatrix, presumably intending to use this: https://developer.mozilla.org/en-US/docs/Web/API/CSSMatrix

The problematic lines are the following:
_.Pz = window.CSSMatrix || window.WebKitCSSMatrix || window.MSCSSMatrix || Oz;
_.Qz = new _.Pz;

This throws a TypeError "Failed to construct 'CSSMatrix': 6 arguments required but only 0 present", which is then caught in a try/catch block (which is we didn't see a JS error in the console).

It looks like this CSSMatrix is referenced in the javascript Closure library, so this problem will likely be shared with any website that uses Closure and its transform class.
https://google.github.io/closure-library/api/source/closure/goog/style/transform.js.src.html#l159

Shane/Rick: What's the best course of action here? Should we lower CSSTypedOM to status=test and/or is this a reason to rename the class? See if we can get the Closure library to change?

Comment 2 by meade@chromium.org, Jun 21 2016

Cc: ikilpatrick@chromium.org

Comment 3 by shans@chromium.org, Jun 22 2016

I don't think CSSMatrix ever existed, so one approach would be to modify closure and encourage sites like Photos to update.

We can change the name if necessary too, for example CSSMatrixComponent?

Given this is only experimental I think it's OK to leave the status as is for now - we won't be breaking anything in prod.

Comment 4 by shans@chromium.org, Jun 22 2016

https://github.com/google/closure-library/pull/719 would resolve the issue in closure.
I think this breakage is actually coming from:
https://goto.google.com/vasbj [google only link].


Comment 6 by meade@chromium.org, Jun 22 2016

I had a look on httparchive and ran this query (it was the simplest query I could think of):

SELECT page, url
FROM [httparchive:har.2016_05_15_chrome_requests_bodies], [httparchive:har.2016_01_01_android_requests_bodies]
WHERE REGEXP_MATCH(body, r"\bCSSMatrix")

This found 764 results.

207 of the results were from various versions of an adobe animation library (e.g. http://animate.adobe.com/runtime/3.0.0/edge.3.0.0.min.js). If you include things from other domains where the filename is edge.X.X.X.min.js, there are 341. I checked in a couple of them and found that they do have a fallback from CSSMatrix > WebkitCSSMatrix/MozCSSMatrix.

A further 209 results seem to be various (old) versions of iscroll.js. (but "CSSMatrix" is just part of a comment in all the ones I checked).

I clicked on a selection of random other ones that weren't obviously adobe or iscroll, and they were mostly forks/embedded includes of iscroll.js and a few adobe animations and a few matrix polyfills. 



I think we should probably rename CSSMatrix since it'd be hard to get everyone to stop using old versions of the adobe script (plus it's being served out of other domains and included within other scripts). Aside from that, developers will be confused that the CSSMatrix interface will be quite different to the WebkitCSSMatrix if we ship this.
Issue 625141 has been merged into this issue.
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 6 2016

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

commit cb9092d095295e44f0d636886ba9404ed218609c
Author: meade <meade@chromium.org>
Date: Wed Jul 06 04:52:57 2016

Revert CSSMatrix classname to CSSMatrixTransformComponent

See also:
https://developer.mozilla.org/en-US/docs/Web/API/CSSMatrix
https://bugs.chromium.org/p/chromium/issues/detail?id=621945

WebkitCSSMatrix and MSCSSMatrix exist with a different API, and
some libraries, including Adobe animations and the Closure
library write code like
window.CSSMatrix || window.WebKitCSSMatrix || window.MSCSSMatrix,
which causes some websites to break (notably Google photos, some
others I found were www.bahamas.com and www.australianexplorer.com).
Adobe's animation library is versioned and while mostly served
from adobe.com, is also served from other domains.

Aside from breaking pages, it will be confusing for developers to
have CSSMatrix and WebkitCSSMatrix/MSCSSMatrix have such different
interfaces.

We can choose a better name for this component after unbreaking
people who run with experimental-web-platform-features on.

BUG= 621945 

Review-Url: https://codereview.chromium.org/2126473002
Cr-Commit-Position: refs/heads/master@{#403852}

[modify] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/LayoutTests/http/tests/worklet/webexposed/global-interface-listing-paint-worklet-expected.txt
[rename] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/LayoutTests/typedcssom/cssMatrixTransformComponent.html
[modify] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/LayoutTests/typedcssom/cssRotation.html
[modify] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/LayoutTests/typedcssom/cssScale.html
[modify] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/LayoutTests/typedcssom/cssSkew.html
[modify] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/LayoutTests/typedcssom/cssTransformValue.html
[modify] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/Source/core/core.gypi
[rename] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/Source/core/css/cssom/CSSMatrixTransformComponent.idl
[modify] https://crrev.com/cb9092d095295e44f0d636886ba9404ed218609c/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.idl

Comment 9 by meade@chromium.org, Jul 6 2016

Status: Fixed (was: Assigned)

Comment 10 by rand...@gmail.com, Aug 2 2016

What change got reverted? Does the revert need to be merged?
photos.google.com is broken in Chrome beta 53.

Comment 11 by rand...@gmail.com, Aug 2 2016

Oops nevermind, it's only broken with experimental web platform features.
I had experimental web platform features turned on and ran into the same issue while developing for https://www.google.com/culturalinstitute

I'm seeing the error with Chrome 53 and I'm still seeing it with 54.0.2789.0 canary (64-bit) which worries me a bit.

Is this bug expected to be fixed in that version of Canary?



Comment 13 by meade@chromium.org, Sep 21 2016

If you're still seeing it in 54, it definitely wouldn't be the same issue, since I renamed the offending class. 
I'm not sure if I'd be able to see the part of website you're developing, but I also opened the linked page in 53 and 55 and didn't see the problem. I only observed some JSON parsing errors that were ultimately caught. Do you have more detail on the error you're seeing?
Hmm actually, I don't see the issue anymore. I seem to have done something wrong when testing with Canary, my apologies.

Thanks for the quick feedback too.

Sign in to add a comment