зеркало из https://github.com/mozilla/gecko-dev.git
Bug 732153 part 1 - Computed transform should be 'none' if there's no transform, even if backface-visibility or transform-style is set; r=dbaron
This commit is contained in:
Родитель
b1946a2297
Коммит
612bd2f8d9
|
@ -993,10 +993,10 @@ nsComputedDOMStyle::DoGetTransform()
|
|||
/* First, get the display data. We'll need it. */
|
||||
const nsStyleDisplay* display = GetStyleDisplay();
|
||||
|
||||
/* If the "no transforms" flag is set, then we should construct a
|
||||
* single-element entry and hand it back.
|
||||
/* If there are no transforms, then we should construct a single-element
|
||||
* entry and hand it back.
|
||||
*/
|
||||
if (!display->HasTransform()) {
|
||||
if (!display->mSpecifiedTransform) {
|
||||
nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
|
||||
|
||||
/* Set it to "none." */
|
||||
|
|
|
@ -185,6 +185,7 @@ MOCHITEST_FILES = test_acid3_test46.html \
|
|||
visited_image_loading_frame_empty.html \
|
||||
test_load_events_on_stylesheets.html \
|
||||
test_bug721136.html \
|
||||
test_bug732153.html \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_FLEXBOX
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=732153
|
||||
-->
|
||||
<title>Test for Bug 732153</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=732153">Mozilla Bug 732153</a>
|
||||
<div></div>
|
||||
<script>
|
||||
var div = document.querySelector("div");
|
||||
[
|
||||
"",
|
||||
"backface-visibility: hidden",
|
||||
"transform-style: preserve-3d",
|
||||
"backface-visibility: hidden; transform-style: preserve-3d",
|
||||
].forEach(function(style) {
|
||||
div.setAttribute("style", style);
|
||||
is(getComputedStyle(div).transform, "none",
|
||||
"Computed 'transform' with style=\"" + style + '"');
|
||||
});
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче