Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: LayoutTests/fast/alignment/resources/alignment-parsing-utils.js

Issue 363133003: [CSS Grid Layout] Adapting align-self, align-items and justify-self to the last CSS 3 spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Resolve grid and flex cases during cascade, the rest will wait for layout. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/alignment/resources/alignment-parsing-utils.js
diff --git a/LayoutTests/fast/alignment/resources/alignment-parsing-utils.js b/LayoutTests/fast/alignment/resources/alignment-parsing-utils.js
index 4670fc8fd6795d728370861b7459f9820bdcd057..b97022a88c65762a347e2686428d51a24d38ed82 100644
--- a/LayoutTests/fast/alignment/resources/alignment-parsing-utils.js
+++ b/LayoutTests/fast/alignment/resources/alignment-parsing-utils.js
@@ -8,44 +8,39 @@ function checkValues(element, property, propertyID, value, computedValue)
function checkBadValues(element, property, propertyID, value)
{
- element.style.justifyItems = value;
+ element.style[property] = value;
checkValues(element, property, propertyID, "", "start");
}
-function checkInitialValues(element, property, propertyID, display, value)
+function checkInitialValues(element, property, propertyID, value, initial)
{
- var initial = "start";
- if (display == "grid" || display == "flex") {
- element.style.display = display;
- initial = "stretch";
- }
-
- element.style.justifyItems = value;
+ element.style[property] = value;
checkValues(element, property, propertyID, value, value);
- element.style.justifyItems = "initial";
+ element.style[property] = "initial";
checkValues(element, property, propertyID, "initial", initial);
}
-function checkInheritValues(element, property, propertyID, value)
+function checkInheritValues(property, propertyID, value)
{
- parentElement = document.createElement("div");
+ var parentElement = document.createElement("div");
document.body.appendChild(parentElement);
- parentElement.style.justifyItems = value;
+ parentElement.style[property] = value;
checkValues(parentElement, property, propertyID, value, value);
- element = document.createElement("div");
+ var element = document.createElement("div");
parentElement.appendChild(element);
- element.style.justifyItems = "inherit";
+ element.style[property] = "inherit";
checkValues(element, property, propertyID, "inherit", value);
}
-function checkLegacyValues(element, property, propertyID, value)
+function checkLegacyValues(property, propertyID, value)
{
+ var parentElement = document.createElement("div");
document.body.appendChild(parentElement);
- parentElement.style.justifyItems = value;
+ parentElement.style[property] = value;
checkValues(parentElement, property, propertyID, value, value);
- element = document.createElement("div");
+ var element = document.createElement("div");
parentElement.appendChild(element);
checkValues(element, property, propertyID, "", value);
}

Powered by Google App Engine
This is Rietveld 408576698