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

Unified Diff: Source/core/css/StyleResolver.cpp

Issue 14493016: Fix handling of 'inherit' and 'initial' for grid lines (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take 2: Forgot the code Created 7 years, 8 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
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/rendering/RenderGrid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StyleResolver.cpp
diff --git a/Source/core/css/StyleResolver.cpp b/Source/core/css/StyleResolver.cpp
index 7164b6f73afa211d00c9bbf669f00e4307ec28bf..45414963a33c397a709fd621d3c7cd05d9eadf64 100644
--- a/Source/core/css/StyleResolver.cpp
+++ b/Source/core/css/StyleResolver.cpp
@@ -1768,14 +1768,14 @@ void StyleResolver::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
void StyleResolver::adjustGridItemPosition(RenderStyle* style) const
{
// If opposing grid-placement properties both specify a grid span, they both compute to ‘auto’.
- if (style->gridItemStart().isSpan() && style->gridItemEnd().isSpan()) {
- style->setGridItemStart(GridPosition());
- style->setGridItemEnd(GridPosition());
+ if (style->gridStart().isSpan() && style->gridEnd().isSpan()) {
+ style->setGridStart(GridPosition());
+ style->setGridEnd(GridPosition());
}
- if (style->gridItemBefore().isSpan() && style->gridItemAfter().isSpan()) {
- style->setGridItemBefore(GridPosition());
- style->setGridItemAfter(GridPosition());
+ if (style->gridBefore().isSpan() && style->gridAfter().isSpan()) {
+ style->setGridBefore(GridPosition());
+ style->setGridAfter(GridPosition());
}
}
@@ -2997,32 +2997,36 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
}
case CSSPropertyWebkitGridStart: {
+ HANDLE_INHERIT_AND_INITIAL(gridStart, GridStart);
GridPosition startPosition;
if (!createGridPosition(value, startPosition))
return;
- state.style()->setGridItemStart(startPosition);
+ state.style()->setGridStart(startPosition);
return;
}
case CSSPropertyWebkitGridEnd: {
+ HANDLE_INHERIT_AND_INITIAL(gridEnd, GridEnd);
GridPosition endPosition;
if (!createGridPosition(value, endPosition))
return;
- state.style()->setGridItemEnd(endPosition);
+ state.style()->setGridEnd(endPosition);
return;
}
case CSSPropertyWebkitGridBefore: {
+ HANDLE_INHERIT_AND_INITIAL(gridBefore, GridBefore);
GridPosition beforePosition;
if (!createGridPosition(value, beforePosition))
return;
- state.style()->setGridItemBefore(beforePosition);
+ state.style()->setGridBefore(beforePosition);
return;
}
case CSSPropertyWebkitGridAfter: {
+ HANDLE_INHERIT_AND_INITIAL(gridAfter, GridAfter);
GridPosition afterPosition;
if (!createGridPosition(value, afterPosition))
return;
- state.style()->setGridItemAfter(afterPosition);
+ state.style()->setGridAfter(afterPosition);
return;
}
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/rendering/RenderGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698