Commit 01804bf1 authored by nainar@chromium.org's avatar nainar@chromium.org

Make getComputedStyle(e).transform return correct values for non-transformable elements

getComputedStyle(e).transform currently doesn't return the correct 
values for non-transformable elements. Both FF and IE return the correct 
values. This patch makes getComputedStyle(e).transform return the 
correct value for non-transformable elements as well.

BUG=517620

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

git-svn-id: svn://svn.chromium.org/blink/trunk@201174 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 20974205
...@@ -74,10 +74,6 @@ ...@@ -74,10 +74,6 @@
result = curTest.transform + ' expected <code>' + curTest.result + '</code>, got <code>' + computedTransform + '</code> : FAIL'; result = curTest.transform + ' expected <code>' + curTest.result + '</code>, got <code>' + computedTransform + '</code> : FAIL';
resultsBox.innerHTML += result + '<br>'; resultsBox.innerHTML += result + '<br>';
if (computedSpanTransform !== 'none') {
result = curTest.transform + ' applied to a non-box element: ' + ' expected <code>none</code> got <code>' + computedSpanTransform + '</code> : FAIL';
resultsBox.innerHTML += result + '<br>';
}
}); });
if (window.testRunner) if (window.testRunner)
......
...@@ -931,7 +931,7 @@ static PassRefPtrWillBeRawPtr<CSSFunctionValue> valueForMatrixTransform(const Tr ...@@ -931,7 +931,7 @@ static PassRefPtrWillBeRawPtr<CSSFunctionValue> valueForMatrixTransform(const Tr
static PassRefPtrWillBeRawPtr<CSSValue> computedTransform(const LayoutObject* layoutObject, const ComputedStyle& style) static PassRefPtrWillBeRawPtr<CSSValue> computedTransform(const LayoutObject* layoutObject, const ComputedStyle& style)
{ {
if (!layoutObject || !layoutObject->hasTransformRelatedProperty() || !style.hasTransform()) if (!layoutObject || !style.hasTransform())
return cssValuePool().createIdentifierValue(CSSValueNone); return cssValuePool().createIdentifierValue(CSSValueNone);
IntRect box; IntRect box;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment