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

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

UseCounter and remove non-standard getComputedStyle(e).cssX behaviour

Project Member Reported by timloh@chromium.org, Sep 11 2014

Issue description

I noticed recently that we support accessing (e.g.) getComputedStyle(e).cssBoxShadow. This is non-standard behaviour that only Blink and WebKit support. The code for this is entirely trivial (two lines in V8CSSStyleDeclarationCustom.cpp), but it'd be nice to remove this anyway. I suspect very few websites (or none at all) would use this.

<div id="d"></div>
<script>d.innerHTML = "[" + getComputedStyle(d).cssLeft + "]";</script>
 
Owner: sunil.ra...@samsung.com
Status: Started
Patch put for review: https://codereview.chromium.org/621283002/
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 4 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=183230

------------------------------------------------------------------
r183230 | sunil.ratnu@samsung.com | 2014-10-04T13:37:50.773461Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/frame/UseCounter.h?r1=183230&r2=183229&pathrev=183230
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp?r1=183230&r2=183229&pathrev=183230

Add UseCounter for non-standard getComputedStyle(e).cssX behaviour

Blink and WebKit supports non-standard behaviour e.g.
getComputedStyle(e).cssBoxShadow. We suspect that a very few websites
(or none at all) use this. This CL adds a UseCounter for this
non-standard behaviour.

BUG= 413205 

Review URL: https://codereview.chromium.org/621283002
-----------------------------------------------------------------
I just noticed that one of the cases, getComputedStyle(e).cssFloat is actually specced, so we should really only be counting when it isn't cssFloat.
Sorry for responding a bit late. I've made the changes and put the patch for review [https://codereview.chromium.org/1113013002/]
Labels: Hotlist-Interop

Comment 7 by timloh@chromium.org, Aug 24 2015

Cc: sunil.ra...@samsung.com nainar@chromium.org
Owner: ----
Status: Available
This will count correctly as of 46.0.2490.0. Early numbers suggest that the non-standard usage is very low (<0.003%), with the previous counts of 2-3% all being from cssFloat.

We should wait a couple of weeks for the counter to reach the beta channel, and then remove the feature if it is still used so rarely.

Comment 8 by timloh@chromium.org, Aug 24 2015

Counting was fixed in https://codereview.chromium.org/1288623005, forgot to link to it...

Comment 9 by nainar@chromium.org, Oct 14 2015

Status: Fixed
Closing as per #8.
Status: Available
Not fixed, still need to remove the legacy behaviour...
Owner: suzyh@chromium.org
Status: Started
Deprecation warning patch under review: https://codereview.chromium.org/1508713003

Intent to deprecate & remove sent to blink-dev.
Project Member

Comment 13 by bugdroid1@chromium.org, Dec 14 2015

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

commit 47e71df82119e855e8c94d2d05e3890a7df3e0e1
Author: suzyh <suzyh@chromium.org>
Date: Mon Dec 14 20:17:21 2015

Add deprecation message for CSSXGetComputedStyleQueries.

This patch adds a deprecation message for getComputedStyle(e).css* as per
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/SX901460nbI.

BUG= 413205 

Review URL: https://codereview.chromium.org/1508713003

Cr-Commit-Position: refs/heads/master@{#365081}

[add] http://crrev.com/47e71df82119e855e8c94d2d05e3890a7df3e0e1/third_party/WebKit/LayoutTests/cssom/cssXGetComputedStyle-deprecated-expected.txt
[add] http://crrev.com/47e71df82119e855e8c94d2d05e3890a7df3e0e1/third_party/WebKit/LayoutTests/cssom/cssXGetComputedStyle-deprecated.html
[modify] http://crrev.com/47e71df82119e855e8c94d2d05e3890a7df3e0e1/third_party/WebKit/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt
[modify] http://crrev.com/47e71df82119e855e8c94d2d05e3890a7df3e0e1/third_party/WebKit/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-getter-expected.txt
[modify] http://crrev.com/47e71df82119e855e8c94d2d05e3890a7df3e0e1/third_party/WebKit/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-properties-case-sensitive.js
[modify] http://crrev.com/47e71df82119e855e8c94d2d05e3890a7df3e0e1/third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
[modify] http://crrev.com/47e71df82119e855e8c94d2d05e3890a7df3e0e1/third_party/WebKit/Source/core/frame/UseCounter.cpp

Comment 14 by suzyh@chromium.org, Dec 14 2015

The deprecation warning is in. The intent to remove has been approved so I'll start on the removal.

Comment 15 by suzyh@chromium.org, Jan 19 2016

Removal patch under review: https://codereview.chromium.org/1607653002
Project Member

Comment 16 by bugdroid1@chromium.org, Jan 19 2016

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

commit b7e1bea8744c389a7e28fc798be3ce40ba189a3d
Author: suzyh <suzyh@chromium.org>
Date: Tue Jan 19 22:51:33 2016

Remove getComputedStyle(e).css* properties

Having deprecated the getComputedStyle(e).css* properties, this patch
removes the capability completely. Affected tests are updated (and the
deprecation-specific test is removed), and the UseCounter is removed
since it is no longer needed.

BUG= 413205 

Review URL: https://codereview.chromium.org/1607653002

Cr-Commit-Position: refs/heads/master@{#370215}

[delete] http://crrev.com/b45282c65925dba8daaeebb93f00932c1f856709/third_party/WebKit/LayoutTests/cssom/cssXGetComputedStyle-deprecated-expected.txt
[delete] http://crrev.com/b45282c65925dba8daaeebb93f00932c1f856709/third_party/WebKit/LayoutTests/cssom/cssXGetComputedStyle-deprecated.html
[modify] http://crrev.com/b7e1bea8744c389a7e28fc798be3ce40ba189a3d/third_party/WebKit/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt
[modify] http://crrev.com/b7e1bea8744c389a7e28fc798be3ce40ba189a3d/third_party/WebKit/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-getter-expected.txt
[modify] http://crrev.com/b7e1bea8744c389a7e28fc798be3ce40ba189a3d/third_party/WebKit/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-getter.html
[modify] http://crrev.com/b7e1bea8744c389a7e28fc798be3ce40ba189a3d/third_party/WebKit/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-properties-case-sensitive.js
[modify] http://crrev.com/b7e1bea8744c389a7e28fc798be3ce40ba189a3d/third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
[modify] http://crrev.com/b7e1bea8744c389a7e28fc798be3ce40ba189a3d/third_party/WebKit/Source/core/frame/UseCounter.cpp
[modify] http://crrev.com/b7e1bea8744c389a7e28fc798be3ce40ba189a3d/third_party/WebKit/Source/core/frame/UseCounter.h

Comment 17 by suzyh@chromium.org, Jan 19 2016

Status: Fixed

Sign in to add a comment