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

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

Issue 17601010: [CSS Grid Layout] Rename grid placement properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 // RenderSVGRoot handles zooming for the whole SVG subtree, so foreignOb ject content should 1706 // RenderSVGRoot handles zooming for the whole SVG subtree, so foreignOb ject content should
1707 // not be scaled again. 1707 // not be scaled again.
1708 if (e->hasTagName(SVGNames::foreignObjectTag)) 1708 if (e->hasTagName(SVGNames::foreignObjectTag))
1709 style->setEffectiveZoom(RenderStyle::initialZoom()); 1709 style->setEffectiveZoom(RenderStyle::initialZoom());
1710 } 1710 }
1711 } 1711 }
1712 1712
1713 void StyleResolver::adjustGridItemPosition(RenderStyle* style) const 1713 void StyleResolver::adjustGridItemPosition(RenderStyle* style) const
1714 { 1714 {
1715 // If opposing grid-placement properties both specify a grid span, they both compute to ‘auto’. 1715 // If opposing grid-placement properties both specify a grid span, they both compute to ‘auto’.
1716 if (style->gridStart().isSpan() && style->gridEnd().isSpan()) { 1716 if (style->gridColumnStart().isSpan() && style->gridColumnEnd().isSpan()) {
1717 style->setGridStart(GridPosition()); 1717 style->setGridColumnStart(GridPosition());
1718 style->setGridEnd(GridPosition()); 1718 style->setGridColumnEnd(GridPosition());
1719 } 1719 }
1720 1720
1721 if (style->gridBefore().isSpan() && style->gridAfter().isSpan()) { 1721 if (style->gridRowStart().isSpan() && style->gridRowEnd().isSpan()) {
1722 style->setGridBefore(GridPosition()); 1722 style->setGridRowStart(GridPosition());
1723 style->setGridAfter(GridPosition()); 1723 style->setGridRowEnd(GridPosition());
1724 } 1724 }
1725 } 1725 }
1726 1726
1727 bool StyleResolver::checkRegionStyle(Element* regionElement) 1727 bool StyleResolver::checkRegionStyle(Element* regionElement)
1728 { 1728 {
1729 // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped style she ets for the moment, 1729 // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped style she ets for the moment,
1730 // so all region rules are global by default. Verify whether that can stand or needs changing. 1730 // so all region rules are global by default. Verify whether that can stand or needs changing.
1731 1731
1732 if (ScopedStyleResolver* scopedResolver = m_styleTree.scopedStyleResolverFor Document()) 1732 if (ScopedStyleResolver* scopedResolver = m_styleTree.scopedStyleResolverFor Document())
1733 if (scopedResolver->checkRegionStyle(regionElement)) 1733 if (scopedResolver->checkRegionStyle(regionElement))
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 3018
3019 Vector<GridTrackSize> trackSizes; 3019 Vector<GridTrackSize> trackSizes;
3020 NamedGridLinesMap namedGridLines; 3020 NamedGridLinesMap namedGridLines;
3021 if (!createGridTrackList(value, trackSizes, namedGridLines, state)) 3021 if (!createGridTrackList(value, trackSizes, namedGridLines, state))
3022 return; 3022 return;
3023 state.style()->setGridRows(trackSizes); 3023 state.style()->setGridRows(trackSizes);
3024 state.style()->setNamedGridRowLines(namedGridLines); 3024 state.style()->setNamedGridRowLines(namedGridLines);
3025 return; 3025 return;
3026 } 3026 }
3027 3027
3028 case CSSPropertyGridStart: { 3028 case CSSPropertyGridColumnStart: {
3029 HANDLE_INHERIT_AND_INITIAL(gridStart, GridStart); 3029 HANDLE_INHERIT_AND_INITIAL(gridColumnStart, GridColumnStart);
3030 GridPosition startPosition; 3030 GridPosition startPosition;
Julien - ping for review 2013/06/25 17:14:37 Would be nice to rename the position too as it sho
3031 if (!createGridPosition(value, startPosition)) 3031 if (!createGridPosition(value, startPosition))
3032 return; 3032 return;
3033 state.style()->setGridStart(startPosition); 3033 state.style()->setGridColumnStart(startPosition);
3034 return; 3034 return;
3035 } 3035 }
3036 case CSSPropertyGridEnd: { 3036 case CSSPropertyGridColumnEnd: {
3037 HANDLE_INHERIT_AND_INITIAL(gridEnd, GridEnd); 3037 HANDLE_INHERIT_AND_INITIAL(gridColumnEnd, GridColumnEnd);
3038 GridPosition endPosition; 3038 GridPosition endPosition;
Julien - ping for review 2013/06/25 17:14:37 Ditto.
3039 if (!createGridPosition(value, endPosition)) 3039 if (!createGridPosition(value, endPosition))
3040 return; 3040 return;
3041 state.style()->setGridEnd(endPosition); 3041 state.style()->setGridColumnEnd(endPosition);
3042 return; 3042 return;
3043 } 3043 }
3044 3044
3045 case CSSPropertyGridBefore: { 3045 case CSSPropertyGridRowStart: {
3046 HANDLE_INHERIT_AND_INITIAL(gridBefore, GridBefore); 3046 HANDLE_INHERIT_AND_INITIAL(gridRowStart, GridRowStart);
3047 GridPosition beforePosition; 3047 GridPosition beforePosition;
Julien - ping for review 2013/06/25 17:14:37 Ditto.
3048 if (!createGridPosition(value, beforePosition)) 3048 if (!createGridPosition(value, beforePosition))
3049 return; 3049 return;
3050 state.style()->setGridBefore(beforePosition); 3050 state.style()->setGridRowStart(beforePosition);
3051 return; 3051 return;
3052 } 3052 }
3053 case CSSPropertyGridAfter: { 3053 case CSSPropertyGridRowEnd: {
3054 HANDLE_INHERIT_AND_INITIAL(gridAfter, GridAfter); 3054 HANDLE_INHERIT_AND_INITIAL(gridRowEnd, GridRowEnd);
3055 GridPosition afterPosition; 3055 GridPosition afterPosition;
Julien - ping for review 2013/06/25 17:14:37 Ditto.
3056 if (!createGridPosition(value, afterPosition)) 3056 if (!createGridPosition(value, afterPosition))
3057 return; 3057 return;
3058 state.style()->setGridAfter(afterPosition); 3058 state.style()->setGridRowEnd(afterPosition);
3059 return; 3059 return;
3060 } 3060 }
3061 3061
3062 // These properties are aliased and DeprecatedStyleBuilder already applied t he property on the prefixed version. 3062 // These properties are aliased and DeprecatedStyleBuilder already applied t he property on the prefixed version.
3063 case CSSPropertyTransitionDelay: 3063 case CSSPropertyTransitionDelay:
3064 case CSSPropertyTransitionDuration: 3064 case CSSPropertyTransitionDuration:
3065 case CSSPropertyTransitionProperty: 3065 case CSSPropertyTransitionProperty:
3066 case CSSPropertyTransitionTimingFunction: 3066 case CSSPropertyTransitionTimingFunction:
3067 return; 3067 return;
3068 // These properties are implemented in the DeprecatedStyleBuilder lookup tab le or in the new StyleBuilder. 3068 // These properties are implemented in the DeprecatedStyleBuilder lookup tab le or in the new StyleBuilder.
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
3720 info.addMember(m_state, "state"); 3720 info.addMember(m_state, "state");
3721 3721
3722 // FIXME: move this to a place where it would be called only once? 3722 // FIXME: move this to a place where it would be called only once?
3723 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); 3723 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle");
3724 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl e"); 3724 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl e");
3725 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle" ); 3725 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle" );
3726 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo urceStyle"); 3726 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo urceStyle");
3727 } 3727 }
3728 3728
3729 } // namespace WebCore 3729 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698