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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 18532004: Implement 'grid-template' parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined and updated after Ojan's and Elliott's comments Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSValue.cpp ('k') | Source/core/page/UseCounter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 29 matching lines...) Expand all
40 #include "core/css/resolver/StyleBuilder.h" 40 #include "core/css/resolver/StyleBuilder.h"
41 41
42 #include "CSSPropertyNames.h" 42 #include "CSSPropertyNames.h"
43 #include "CSSValueKeywords.h" 43 #include "CSSValueKeywords.h"
44 #include "StyleBuilderFunctions.h" 44 #include "StyleBuilderFunctions.h"
45 #include "StylePropertyShorthand.h" 45 #include "StylePropertyShorthand.h"
46 #include "core/css/BasicShapeFunctions.h" 46 #include "core/css/BasicShapeFunctions.h"
47 #include "core/css/CSSAspectRatioValue.h" 47 #include "core/css/CSSAspectRatioValue.h"
48 #include "core/css/CSSCursorImageValue.h" 48 #include "core/css/CSSCursorImageValue.h"
49 #include "core/css/CSSGradientValue.h" 49 #include "core/css/CSSGradientValue.h"
50 #include "core/css/CSSGridTemplateValue.h"
50 #include "core/css/CSSImageSetValue.h" 51 #include "core/css/CSSImageSetValue.h"
51 #include "core/css/CSSLineBoxContainValue.h" 52 #include "core/css/CSSLineBoxContainValue.h"
52 #include "core/css/CSSPrimitiveValueMappings.h" 53 #include "core/css/CSSPrimitiveValueMappings.h"
53 #include "core/css/CSSProperty.h" 54 #include "core/css/CSSProperty.h"
54 #include "core/css/CSSReflectValue.h" 55 #include "core/css/CSSReflectValue.h"
55 #include "core/css/CSSVariableValue.h" 56 #include "core/css/CSSVariableValue.h"
56 #include "core/css/Counter.h" 57 #include "core/css/Counter.h"
57 #include "core/css/FontValue.h" 58 #include "core/css/FontValue.h"
58 #include "core/css/Pair.h" 59 #include "core/css/Pair.h"
59 #include "core/css/Rect.h" 60 #include "core/css/Rect.h"
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 } 1582 }
1582 case CSSPropertyGridRowEnd: { 1583 case CSSPropertyGridRowEnd: {
1583 HANDLE_INHERIT_AND_INITIAL(gridRowEnd, GridRowEnd); 1584 HANDLE_INHERIT_AND_INITIAL(gridRowEnd, GridRowEnd);
1584 GridPosition afterPosition; 1585 GridPosition afterPosition;
1585 if (!createGridPosition(value, afterPosition)) 1586 if (!createGridPosition(value, afterPosition))
1586 return; 1587 return;
1587 state.style()->setGridRowEnd(afterPosition); 1588 state.style()->setGridRowEnd(afterPosition);
1588 return; 1589 return;
1589 } 1590 }
1590 1591
1592 case CSSPropertyGridTemplate: {
1593 if (isInherit) {
1594 state.style()->setNamedGridArea(state.parentStyle()->namedGridArea() );
1595 state.style()->setNamedGridAreaRowCount(state.parentStyle()->namedGr idAreaRowCount());
1596 state.style()->setNamedGridAreaColumnCount(state.parentStyle()->name dGridAreaColumnCount());
1597 return;
1598 }
1599 if (isInitial) {
1600 state.style()->setNamedGridArea(RenderStyle::initialNamedGridArea()) ;
1601 state.style()->setNamedGridAreaRowCount(RenderStyle::initialNamedGri dAreaCount());
1602 state.style()->setNamedGridAreaColumnCount(RenderStyle::initialNamed GridAreaCount());
1603 return;
1604 }
1605
1606 if (value->isPrimitiveValue()) {
1607 ASSERT(toCSSPrimitiveValue(value)->getValueID() == CSSValueNone);
1608 return;
1609 }
1610
1611 CSSGridTemplateValue* gridTemplateValue = toCSSGridTemplateValue(value);
1612 state.style()->setNamedGridArea(gridTemplateValue->gridAreaMap());
1613 state.style()->setNamedGridAreaRowCount(gridTemplateValue->rowCount());
1614 state.style()->setNamedGridAreaColumnCount(gridTemplateValue->columnCoun t());
1615 return;
1616 }
1617
1591 // These properties are aliased and we already applied the property on the p refixed version. 1618 // These properties are aliased and we already applied the property on the p refixed version.
1592 case CSSPropertyTransitionDelay: 1619 case CSSPropertyTransitionDelay:
1593 case CSSPropertyTransitionDuration: 1620 case CSSPropertyTransitionDuration:
1594 case CSSPropertyTransitionProperty: 1621 case CSSPropertyTransitionProperty:
1595 case CSSPropertyTransitionTimingFunction: 1622 case CSSPropertyTransitionTimingFunction:
1596 return; 1623 return;
1597 // These properties are implemented in StyleBuilder::applyProperty. 1624 // These properties are implemented in StyleBuilder::applyProperty.
1598 case CSSPropertyBackgroundAttachment: 1625 case CSSPropertyBackgroundAttachment:
1599 case CSSPropertyBackgroundBlendMode: 1626 case CSSPropertyBackgroundBlendMode:
1600 case CSSPropertyBackgroundClip: 1627 case CSSPropertyBackgroundClip:
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 break; 2127 break;
2101 } 2128 }
2102 case CSSPropertyEnableBackground: 2129 case CSSPropertyEnableBackground:
2103 // Silently ignoring this property for now 2130 // Silently ignoring this property for now
2104 // http://bugs.webkit.org/show_bug.cgi?id=6022 2131 // http://bugs.webkit.org/show_bug.cgi?id=6022
2105 break; 2132 break;
2106 } 2133 }
2107 } 2134 }
2108 2135
2109 } // namespace WebCore 2136 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSValue.cpp ('k') | Source/core/page/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698