As discussed in blink-dev mailing list remove getPropertyShorthand and isImplicit from the Web exposed APIs.

They were added because of the Inspector back in 2005 when it was using JS.
It does not remove the actual C++ implementation as this one is still used by
the inspector.

I've updated few layout tests to remove the usage of these functions.

Review URL: https://chromiumcodereview.appspot.com/14619018

git-svn-id: svn://svn.chromium.org/blink/trunk@150051 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/LayoutTests/fast/backgrounds/repeat/background-repeat-shorthand-expected.txt b/LayoutTests/fast/backgrounds/repeat/background-repeat-shorthand-expected.txt
deleted file mode 100644
index 54eb998..0000000
--- a/LayoutTests/fast/backgrounds/repeat/background-repeat-shorthand-expected.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-This layout test used to test that correct shorthand name is returned for background-repeat-x, background-repeat-y, background-position-x, background-position-y, -webkit-mask-repeat-x,-webkit-mask-repeat-y, -webkit-mask-position-x, -webkit-mask-position-y when corresponding shorthand is used in the style declaration. It tests 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".
-
-
-PASS getShorthand("background-repeat-x", "icon1") is "null"
-PASS getShorthand("background-repeat-y", "icon1") is "null"
-PASS getShorthand("background-repeat", "icon1") is "null"
-PASS getShorthand("background-position-x", "icon1") is "null"
-PASS getShorthand("background-position-y", "icon1") is "null"
-PASS getShorthand("background-position", "icon1") is "null"
-PASS getShorthand("-webkit-mask-repeat-x", "icon1") is "null"
-PASS getShorthand("-webkit-mask-repeat-y", "icon1") is "null"
-PASS getShorthand("-webkit-mask-repeat", "icon1") is "null"
-PASS getShorthand("-webkit-mask-position-x", "icon1") is "null"
-PASS getShorthand("-webkit-mask-position-y", "icon1") is "null"
-PASS getShorthand("-webkit-mask-repeat", "icon1") is "null"
-PASS getShorthand("background-repeat-x", "icon2") is "null"
-PASS getShorthand("background-repeat-y", "icon2") is "null"
-PASS getShorthand("background-repeat", "icon2") is "null"
-PASS getShorthand("background-position-x", "icon2") is "null"
-PASS getShorthand("background-position-y", "icon2") is "null"
-PASS getShorthand("background-position", "icon2") is "null"
-PASS getShorthand("-webkit-mask-repeat-x", "icon2") is "null"
-PASS getShorthand("-webkit-mask-repeat-y", "icon2") is "null"
-PASS getShorthand("-webkit-mask-repeat", "icon2") is "null"
-PASS getShorthand("-webkit-mask-position-x", "icon2") is "null"
-PASS getShorthand("-webkit-mask-position-y", "icon2") is "null"
-PASS getShorthand("-webkit-mask-repeat", "icon2") is "null"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/backgrounds/repeat/background-repeat-shorthand.html b/LayoutTests/fast/backgrounds/repeat/background-repeat-shorthand.html
deleted file mode 100644
index eb22e56..0000000
--- a/LayoutTests/fast/backgrounds/repeat/background-repeat-shorthand.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="resources/background-repeat-shorthand.css">
-<script src="../../js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="icon1"></div>
-<div id="icon2"></div>
-<script src="resources/background-repeat-shorthand.js"></script>
-<script src="../../js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.css b/LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.css
deleted file mode 100644
index a5c34f1..0000000
--- a/LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.css
+++ /dev/null
@@ -1,15 +0,0 @@
-#icon1 {
-    background-image: url(gradient.gif);
-    background-repeat: no-repeat;
-    background-position: 10px 20px;
-    -webkit-mask-repeat: repeat;
-    -webkit-mask-position: 0% 0%;
-}
-
-#icon2 {
-    background-image: url(gradient.gif);
-    background-repeat-x: no-repeat;
-    background-position-x: 10px;
-    -webkit-mask-repeat-x: repeat;
-    -webkit-mask-position-x: 0% 0%;
-}
diff --git a/LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.js b/LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.js
deleted file mode 100644
index a40a6db..0000000
--- a/LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.js
+++ /dev/null
@@ -1,49 +0,0 @@
-description('This layout test used to test that correct shorthand name ' + 

-            'is returned for background-repeat-x, ' +

-            'background-repeat-y, background-position-x, background-position-y, ' +

-            '-webkit-mask-repeat-x,-webkit-mask-repeat-y, -webkit-mask-position-x, ' +

-            '-webkit-mask-position-y when corresponding shorthand is used in the style ' +

-            'declaration. It tests regression described in ' +

-            '<a href="https://bugs.webkit.org/show_bug.cgi?id=28972">this bug</a>.' +

-            ' Now that access to non author stylesheet is blocked, we should instead' +

-            ' get null when accessing the css rules on that object.');

-

-function getShorthand(longhand, iconId)

-{

-    var iconDiv = document.getElementById(iconId);

-    var rules = window.getMatchedCSSRules(iconDiv,'',false);

-    return rules[1] ? rules[1].style.getPropertyShorthand(longhand) : 'null';

-}

-

-shouldBe('getShorthand("background-repeat-x", "icon1")', '"null"');

-shouldBe('getShorthand("background-repeat-y", "icon1")', '"null"');

-shouldBe('getShorthand("background-repeat", "icon1")', '"null"');

-

-shouldBe('getShorthand("background-position-x", "icon1")', '"null"');

-shouldBe('getShorthand("background-position-y", "icon1")', '"null"');

-shouldBe('getShorthand("background-position", "icon1")', '"null"');

-

-shouldBe('getShorthand("-webkit-mask-repeat-x", "icon1")', '"null"');

-shouldBe('getShorthand("-webkit-mask-repeat-y", "icon1")', '"null"');

-shouldBe('getShorthand("-webkit-mask-repeat", "icon1")', '"null"');

-

-shouldBe('getShorthand("-webkit-mask-position-x", "icon1")', '"null"');

-shouldBe('getShorthand("-webkit-mask-position-y", "icon1")', '"null"');

-shouldBe('getShorthand("-webkit-mask-repeat", "icon1")', '"null"');

-

-

-shouldBe('getShorthand("background-repeat-x", "icon2")', '"null"');

-shouldBe('getShorthand("background-repeat-y", "icon2")', '"null"');

-shouldBe('getShorthand("background-repeat", "icon2")', '"null"');

-

-shouldBe('getShorthand("background-position-x", "icon2")', '"null"');

-shouldBe('getShorthand("background-position-y", "icon2")', '"null"');

-shouldBe('getShorthand("background-position", "icon2")', '"null"');

-

-shouldBe('getShorthand("-webkit-mask-repeat-x", "icon2")', '"null"');

-shouldBe('getShorthand("-webkit-mask-repeat-y", "icon2")', '"null"');

-shouldBe('getShorthand("-webkit-mask-repeat", "icon2")', '"null"');

-

-shouldBe('getShorthand("-webkit-mask-position-x", "icon2")', '"null"');

-shouldBe('getShorthand("-webkit-mask-position-y", "icon2")', '"null"');

-shouldBe('getShorthand("-webkit-mask-repeat", "icon2")', '"null"');

diff --git a/LayoutTests/fast/css/font-shorthand-expected.txt b/LayoutTests/fast/css/font-shorthand-expected.txt
index 7f68495..3c3391b 100644
--- a/LayoutTests/fast/css/font-shorthand-expected.txt
+++ b/LayoutTests/fast/css/font-shorthand-expected.txt
@@ -1,75 +1,75 @@
 Test
 Font for '12px monospace':
-font-style: normal (original property was font and property was implicitly set.)
-font-variant: normal (original property was font and property was implicitly set.)
-font-weight: normal (original property was font and property was implicitly set.)
-font-size: 12px (original property was font)
-line-height: normal (original property was font and property was implicitly set.)
-font-family: monospace (original property was font)
+font-style: normal
+font-variant: normal
+font-weight: normal
+font-size: 12px
+line-height: normal
+font-family: monospace
 
 Font for '12px/24px serif':
-font-style: normal (original property was font and property was implicitly set.)
-font-variant: normal (original property was font and property was implicitly set.)
-font-weight: normal (original property was font and property was implicitly set.)
-font-size: 12px (original property was font)
-line-height: 24px (original property was font)
-font-family: serif (original property was font)
+font-style: normal
+font-variant: normal
+font-weight: normal
+font-size: 12px
+line-height: 24px
+font-family: serif
 
 Font for 'normal 12px serif':
-font-style: normal (original property was font)
-font-variant: normal (original property was font and property was implicitly set.)
-font-weight: normal (original property was font and property was implicitly set.)
-font-size: 12px (original property was font)
-line-height: normal (original property was font and property was implicitly set.)
-font-family: serif (original property was font)
+font-style: normal
+font-variant: normal
+font-weight: normal
+font-size: 12px
+line-height: normal
+font-family: serif
 
 Font for 'normal normal 12px serif':
-font-style: normal (original property was font)
-font-variant: normal (original property was font)
-font-weight: normal (original property was font and property was implicitly set.)
-font-size: 12px (original property was font)
-line-height: normal (original property was font and property was implicitly set.)
-font-family: serif (original property was font)
+font-style: normal
+font-variant: normal
+font-weight: normal
+font-size: 12px
+line-height: normal
+font-family: serif
 
 Font for 'normal normal normal 12px serif':
-font-style: normal (original property was font)
-font-variant: normal (original property was font)
-font-weight: normal (original property was font)
-font-size: 12px (original property was font)
-line-height: normal (original property was font and property was implicitly set.)
-font-family: serif (original property was font)
+font-style: normal
+font-variant: normal
+font-weight: normal
+font-size: 12px
+line-height: normal
+font-family: serif
 
 Font for 'italic small-caps 12px/24px serif':
-font-style: italic (original property was font)
-font-variant: small-caps (original property was font)
-font-weight: normal (original property was font and property was implicitly set.)
-font-size: 12px (original property was font)
-line-height: 24px (original property was font)
-font-family: serif (original property was font)
+font-style: italic
+font-variant: small-caps
+font-weight: normal
+font-size: 12px
+line-height: 24px
+font-family: serif
 
 Font for 'italic bold 12px/24px serif':
-font-style: italic (original property was font)
-font-weight: bold (original property was font)
-font-variant: normal (original property was font and property was implicitly set.)
-font-size: 12px (original property was font)
-line-height: 24px (original property was font)
-font-family: serif (original property was font)
+font-style: italic
+font-weight: bold
+font-variant: normal
+font-size: 12px
+line-height: 24px
+font-family: serif
 
 Font for 'small-caps bold 14px/28px Arial, sans-serif':
-font-variant: small-caps (original property was font)
-font-weight: bold (original property was font)
-font-style: normal (original property was font and property was implicitly set.)
-font-size: 14px (original property was font)
-line-height: 28px (original property was font)
-font-family: Arial, sans-serif (original property was font)
+font-variant: small-caps
+font-weight: bold
+font-style: normal
+font-size: 14px
+line-height: 28px
+font-family: Arial, sans-serif
 
 Font for 'italic small-caps bold 14px/28px Arial, sans-serif':
-font-style: italic (original property was font)
-font-variant: small-caps (original property was font)
-font-weight: bold (original property was font)
-font-size: 14px (original property was font)
-line-height: 28px (original property was font)
-font-family: Arial, sans-serif (original property was font)
+font-style: italic
+font-variant: small-caps
+font-weight: bold
+font-size: 14px
+line-height: 28px
+font-family: Arial, sans-serif
 
 Font for 'italic small-caps bold 12px/24px':
 
diff --git a/LayoutTests/fast/css/font-shorthand.html b/LayoutTests/fast/css/font-shorthand.html
index 8a4cf04..ad7af5a 100644
--- a/LayoutTests/fast/css/font-shorthand.html
+++ b/LayoutTests/fast/css/font-shorthand.html
@@ -16,12 +16,7 @@
     decl.font = "";
     decl.font = value;
     for (var i = 0; i < decl.length; i++) {
-        var shorthand = decl.getPropertyShorthand(decl[i]);
         document.write(decl[i] + ": " + decl.getPropertyValue(decl[i]));
-        if (shorthand) {
-            document.write(" (original property was " + shorthand
-                + (decl.isPropertyImplicit(decl[i]) ? " and property was implicitly set.)" : ")"));
-        }
         document.write("<br>");
     }
     document.write("<br>");
diff --git a/LayoutTests/fast/css/overflow-property-expected.txt b/LayoutTests/fast/css/overflow-property-expected.txt
index 77099d8..83feaab 100644
--- a/LayoutTests/fast/css/overflow-property-expected.txt
+++ b/LayoutTests/fast/css/overflow-property-expected.txt
@@ -3,8 +3,6 @@
 PASS test0.style.overflow is "auto"
 PASS test0.style.overflowX is "auto"
 PASS test0.style.overflowY is "auto"
-PASS test0.style.getPropertyShorthand('overflow-x') is "overflow"
-PASS test0.style.getPropertyShorthand('overflow-y') is "overflow"
 PASS test1.style.overflow is ""
 PASS test1.style.overflowX is ""
 PASS test1.style.overflowY is ""
diff --git a/LayoutTests/fast/css/overflow-property.html b/LayoutTests/fast/css/overflow-property.html
index 13da955..ac28516 100644
--- a/LayoutTests/fast/css/overflow-property.html
+++ b/LayoutTests/fast/css/overflow-property.html
@@ -39,8 +39,6 @@
     shouldBeEqualToString("test0.style.overflow", "auto");
     shouldBeEqualToString("test0.style.overflowX", "auto");
     shouldBeEqualToString("test0.style.overflowY", "auto");
-    shouldBeEqualToString("test0.style.getPropertyShorthand('overflow-x')", "overflow");
-    shouldBeEqualToString("test0.style.getPropertyShorthand('overflow-y')", "overflow");
     shouldBeEqualToString("test1.style.overflow", "");
     shouldBeEqualToString("test1.style.overflowX", "");
     shouldBeEqualToString("test1.style.overflowY", "");
diff --git a/LayoutTests/fast/inspector-support/style-expected.txt b/LayoutTests/fast/inspector-support/style-expected.txt
index 4963cae..12217d4 100644
--- a/LayoutTests/fast/inspector-support/style-expected.txt
+++ b/LayoutTests/fast/inspector-support/style-expected.txt
@@ -1,24 +1,24 @@
 Note that background is buggy right now!
 Test
-background-image: initial (original property was background)
-background-repeat-x: initial (original property was background)
-background-repeat-y: initial (original property was background)
-background-attachment: initial (original property was background)
-background-position-x: initial (original property was background)
-background-position-y: initial (original property was background)
-background-origin: initial (original property was background)
-background-clip: initial (original property was background)
-background-color: purple (original property was background)
-background-size: initial (original property was background)
-margin-top: 1em (original property was margin)
-margin-right: 1em (original property was margin and property was implicitly set.)
-margin-bottom: 1em (original property was margin and property was implicitly set.)
-margin-left: 1em (original property was margin and property was implicitly set.)
+background-image: initial
+background-repeat-x: initial
+background-repeat-y: initial
+background-attachment: initial
+background-position-x: initial
+background-position-y: initial
+background-origin: initial
+background-clip: initial
+background-color: purple
+background-size: initial
+margin-top: 1em
+margin-right: 1em
+margin-bottom: 1em
+margin-left: 1em
 color: white
-font-style: normal (original property was font and property was implicitly set.)
-font-variant: normal (original property was font and property was implicitly set.)
-font-weight: normal (original property was font and property was implicitly set.)
-font-size: 24px (original property was font)
-line-height: normal (original property was font and property was implicitly set.)
-font-family: 'Lucida Grande' (original property was font)
+font-style: normal
+font-variant: normal
+font-weight: normal
+font-size: 24px
+line-height: normal
+font-family: 'Lucida Grande'
 
diff --git a/LayoutTests/fast/inspector-support/style.html b/LayoutTests/fast/inspector-support/style.html
index d29ef06..37256a91 100644
--- a/LayoutTests/fast/inspector-support/style.html
+++ b/LayoutTests/fast/inspector-support/style.html
@@ -15,13 +15,8 @@
 var ruleList = document.defaultView.getMatchedCSSRules(document.getElementById('foo'), '');
 var decl = ruleList[0].style;
 for (var i = 0; i < decl.length; i++) {
-  var shorthand = decl.getPropertyShorthand(decl[i]);
-  document.write(decl[i] + ": " + decl.getPropertyValue(decl[i]));
-  if (shorthand) {
-     document.write(" (original property was " + shorthand
-           + (decl.isPropertyImplicit(decl[i]) ? " and property was implicitly set.)" : ")"));
-  }
-  document.write( "<br>");
+    document.write(decl[i] + ": " + decl.getPropertyValue(decl[i]));
+    document.write( "<br>");
 }
 </script>
 </body>
diff --git a/Source/core/css/CSSStyleDeclaration.idl b/Source/core/css/CSSStyleDeclaration.idl
index be7b708..9efa6b6 100644
--- a/Source/core/css/CSSStyleDeclaration.idl
+++ b/Source/core/css/CSSStyleDeclaration.idl
@@ -39,9 +39,5 @@
     readonly attribute unsigned long    length;
     getter DOMString          item([Default=Undefined] optional unsigned long index);
     readonly attribute CSSRule          parentRule;
-
-    // Extensions
-    [TreatReturnedNullStringAs=Null] DOMString          getPropertyShorthand([Default=Undefined] optional DOMString propertyName);
-    boolean            isPropertyImplicit([Default=Undefined] optional DOMString propertyName);
 };