Skip to content

Commit

Permalink
Change deprecation message for getMatchedCSSRules.
Browse files Browse the repository at this point in the history
This patch changes the deprecation message for getMatchedCSSRules() to
clarify that the API will be removed in M63. It also rebaselines the
layout tests to account for the new message.

Note: This patch should only be landed before M62 branches. Otherwise
we to change the removal milestone to M64.

Bug: 437569
Change-Id: I24973de54174ba44a7e228fdb9c84ee9cbd635ac
Reviewed-on: https://chromium-review.googlesource.com/646127
Commit-Queue: Darren Shen <[email protected]>
Reviewed-by: dstockwell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#499135}
  • Loading branch information
darrnshn authored and Commit Bot committed Sep 1, 2017
1 parent f2b30e4 commit 4e4380d
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 12: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 12: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
This layouttest was initially there to test that shorthand property value is correct even if background-repeat property is declared before it in the style declaration. It used to test regression described in this bug. Now that access to non author stylesheet is blocked, we should instead get null when accessing the css rules on that object.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 18: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 18: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
Test for Bug: 80736 - CSSStyleDeclaration.getPropertyValue() for 'border-radius' returns null when value is set

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CONSOLE WARNING: line 11: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 11: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
PASS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 7: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 7: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
This page tests that invalid values for the word-break and -webkit-user-modify properties are rejected by the CSS parser.

PASS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 1: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 1: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
Test that detached CSSOM subtrees keeps a reference to CSS stylesheets lacking wrappers.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 15: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 15: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
Test that detached CSSOM subtrees keeps a reference to CSS stylesheets lacking wrappers.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CONSOLE WARNING: line 16: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 16: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
PASS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CONSOLE WARNING: line 16: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 16: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
PASS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 1: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 1: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
getMatchedCSSRules with nested CSS rules

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CONSOLE WARNING: line 4: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 4: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
SUCCESS (getMatchedCSSRule(null, ...) did not crash).
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 16: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 16: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
getMatchedCSSRules returns CSSStyleRules with correct parent stylesheet.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 1: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 1: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
getMatchedCSSRules with invalid Pseudo Elements

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 83: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 83: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
Test for WebKit bug 78595: CollectingRules and QueryingRules modes of SelectorChecker miss some complex selectors with pseudo elements


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 20: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 20: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
Test for getMatchedCSSRules for Pseudo Elements

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CONSOLE WARNING: line 8: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 8: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
Tests that getMatchedCSSRules with dirty distribution doesn't crash.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 15: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 15: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
Note that background is buggy right now!
Test
background-image: initial
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 32: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 32: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
This test whether a script can read the rules from a cross-origin style sheet using getMatchedCSSRules.

Test begins.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 13: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 13: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
ALERT: PASS
DIV

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 16: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 16: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 16: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 16: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE WARNING: line 16: 'getMatchedCSSRules()' is deprecated. For more help, check https://code.google.com/p/chromium/issues/detail?id=437569#c2
CONSOLE WARNING: line 16: document.getMatchedCSSRules() is deprecated and will be removed in M63, around December 2017. See https://www.chromestatus.com/features/4606972603138048 for more details.
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
Expand Down
4 changes: 2 additions & 2 deletions third_party/WebKit/Source/core/frame/Deprecation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ String Deprecation::DeprecationMessage(WebFeature feature) {
"For more help, check https://xhr.spec.whatwg.org/.";

case WebFeature::kGetMatchedCSSRules:
return "'getMatchedCSSRules()' is deprecated. For more help, check "
"https://code.google.com/p/chromium/issues/detail?id=437569#c2";
return willBeRemoved("document.getMatchedCSSRules()", M63,
"4606972603138048");

case WebFeature::kPrefixedWindowURL:
return replacedBy("'webkitURL'", "'URL'");
Expand Down

0 comments on commit 4e4380d

Please sign in to comment.