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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 148293008: [CSS Grid Layout] Add support to place items using named grid lines (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improved readability of adjustNamedGridItemPosition Created 6 years, 10 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: Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 0135ce998a063489d836b0ed852b032a89873fae..767f119ec67ca4f864ffc3b0ed130206470958bd 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -1004,6 +1004,9 @@ static bool createGridPosition(CSSValue* value, GridPosition& position)
// We translate <ident> to <string> during parsing as it
// makes handling it more simple.
if (primitiveValue->isString()) {
+ // Note that a <ident> could be either a grid area or a grid line name. We create them as grid areas but the
+ // StyleAdjuster will have to check if this is the name of a grid area, the name of a grid line or the
+ // prefix of a grid line named <ident>-start or <ident>-end.
position.setNamedGridArea(primitiveValue->getStringValue());
return true;
}
« Source/core/css/resolver/StyleAdjuster.cpp ('K') | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698