| OLD | NEW |
| 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 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1761 // not be scaled again. | 1761 // not be scaled again. |
| 1762 if (e->hasTagName(SVGNames::foreignObjectTag)) | 1762 if (e->hasTagName(SVGNames::foreignObjectTag)) |
| 1763 style->setEffectiveZoom(RenderStyle::initialZoom()); | 1763 style->setEffectiveZoom(RenderStyle::initialZoom()); |
| 1764 } | 1764 } |
| 1765 #endif | 1765 #endif |
| 1766 } | 1766 } |
| 1767 | 1767 |
| 1768 void StyleResolver::adjustGridItemPosition(RenderStyle* style) const | 1768 void StyleResolver::adjustGridItemPosition(RenderStyle* style) const |
| 1769 { | 1769 { |
| 1770 // If opposing grid-placement properties both specify a grid span, they both
compute to ‘auto’. | 1770 // If opposing grid-placement properties both specify a grid span, they both
compute to ‘auto’. |
| 1771 if (style->gridItemStart().isSpan() && style->gridItemEnd().isSpan()) { | 1771 if (style->gridStart().isSpan() && style->gridEnd().isSpan()) { |
| 1772 style->setGridItemStart(GridPosition()); | 1772 style->setGridStart(GridPosition()); |
| 1773 style->setGridItemEnd(GridPosition()); | 1773 style->setGridEnd(GridPosition()); |
| 1774 } | 1774 } |
| 1775 | 1775 |
| 1776 if (style->gridItemBefore().isSpan() && style->gridItemAfter().isSpan()) { | 1776 if (style->gridBefore().isSpan() && style->gridAfter().isSpan()) { |
| 1777 style->setGridItemBefore(GridPosition()); | 1777 style->setGridBefore(GridPosition()); |
| 1778 style->setGridItemAfter(GridPosition()); | 1778 style->setGridAfter(GridPosition()); |
| 1779 } | 1779 } |
| 1780 } | 1780 } |
| 1781 | 1781 |
| 1782 bool StyleResolver::checkRegionStyle(Element* regionElement) | 1782 bool StyleResolver::checkRegionStyle(Element* regionElement) |
| 1783 { | 1783 { |
| 1784 // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped style she
ets for the moment, | 1784 // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped style she
ets for the moment, |
| 1785 // so all region rules are global by default. Verify whether that can stand
or needs changing. | 1785 // so all region rules are global by default. Verify whether that can stand
or needs changing. |
| 1786 | 1786 |
| 1787 unsigned rulesSize = m_ruleSets.authorStyle()->m_regionSelectorsAndRuleSets.
size(); | 1787 unsigned rulesSize = m_ruleSets.authorStyle()->m_regionSelectorsAndRuleSets.
size(); |
| 1788 for (unsigned i = 0; i < rulesSize; ++i) { | 1788 for (unsigned i = 0; i < rulesSize; ++i) { |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2990 } | 2990 } |
| 2991 case CSSPropertyWebkitGridRows: { | 2991 case CSSPropertyWebkitGridRows: { |
| 2992 Vector<GridTrackSize> trackSizes; | 2992 Vector<GridTrackSize> trackSizes; |
| 2993 if (!createGridTrackList(value, trackSizes, state)) | 2993 if (!createGridTrackList(value, trackSizes, state)) |
| 2994 return; | 2994 return; |
| 2995 state.style()->setGridRows(trackSizes); | 2995 state.style()->setGridRows(trackSizes); |
| 2996 return; | 2996 return; |
| 2997 } | 2997 } |
| 2998 | 2998 |
| 2999 case CSSPropertyWebkitGridStart: { | 2999 case CSSPropertyWebkitGridStart: { |
| 3000 HANDLE_INHERIT_AND_INITIAL(gridStart, GridStart); |
| 3000 GridPosition startPosition; | 3001 GridPosition startPosition; |
| 3001 if (!createGridPosition(value, startPosition)) | 3002 if (!createGridPosition(value, startPosition)) |
| 3002 return; | 3003 return; |
| 3003 state.style()->setGridItemStart(startPosition); | 3004 state.style()->setGridStart(startPosition); |
| 3004 return; | 3005 return; |
| 3005 } | 3006 } |
| 3006 case CSSPropertyWebkitGridEnd: { | 3007 case CSSPropertyWebkitGridEnd: { |
| 3008 HANDLE_INHERIT_AND_INITIAL(gridEnd, GridEnd); |
| 3007 GridPosition endPosition; | 3009 GridPosition endPosition; |
| 3008 if (!createGridPosition(value, endPosition)) | 3010 if (!createGridPosition(value, endPosition)) |
| 3009 return; | 3011 return; |
| 3010 state.style()->setGridItemEnd(endPosition); | 3012 state.style()->setGridEnd(endPosition); |
| 3011 return; | 3013 return; |
| 3012 } | 3014 } |
| 3013 | 3015 |
| 3014 case CSSPropertyWebkitGridBefore: { | 3016 case CSSPropertyWebkitGridBefore: { |
| 3017 HANDLE_INHERIT_AND_INITIAL(gridBefore, GridBefore); |
| 3015 GridPosition beforePosition; | 3018 GridPosition beforePosition; |
| 3016 if (!createGridPosition(value, beforePosition)) | 3019 if (!createGridPosition(value, beforePosition)) |
| 3017 return; | 3020 return; |
| 3018 state.style()->setGridItemBefore(beforePosition); | 3021 state.style()->setGridBefore(beforePosition); |
| 3019 return; | 3022 return; |
| 3020 } | 3023 } |
| 3021 case CSSPropertyWebkitGridAfter: { | 3024 case CSSPropertyWebkitGridAfter: { |
| 3025 HANDLE_INHERIT_AND_INITIAL(gridAfter, GridAfter); |
| 3022 GridPosition afterPosition; | 3026 GridPosition afterPosition; |
| 3023 if (!createGridPosition(value, afterPosition)) | 3027 if (!createGridPosition(value, afterPosition)) |
| 3024 return; | 3028 return; |
| 3025 state.style()->setGridItemAfter(afterPosition); | 3029 state.style()->setGridAfter(afterPosition); |
| 3026 return; | 3030 return; |
| 3027 } | 3031 } |
| 3028 | 3032 |
| 3029 // These properties are aliased and StyleBuilder already applied the propert
y on the prefixed version. | 3033 // These properties are aliased and StyleBuilder already applied the propert
y on the prefixed version. |
| 3030 case CSSPropertyTransitionDelay: | 3034 case CSSPropertyTransitionDelay: |
| 3031 case CSSPropertyTransitionDuration: | 3035 case CSSPropertyTransitionDuration: |
| 3032 case CSSPropertyTransitionProperty: | 3036 case CSSPropertyTransitionProperty: |
| 3033 case CSSPropertyTransitionTimingFunction: | 3037 case CSSPropertyTransitionTimingFunction: |
| 3034 return; | 3038 return; |
| 3035 // These properties are implemented in the StyleBuilder lookup table. | 3039 // These properties are implemented in the StyleBuilder lookup table. |
| (...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4643 info.addMember(m_state, "state"); | 4647 info.addMember(m_state, "state"); |
| 4644 | 4648 |
| 4645 // FIXME: move this to a place where it would be called only once? | 4649 // FIXME: move this to a place where it would be called only once? |
| 4646 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); | 4650 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); |
| 4647 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); | 4651 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); |
| 4648 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle,"defaultPrintStyle")
; | 4652 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle,"defaultPrintStyle")
; |
| 4649 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); | 4653 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); |
| 4650 } | 4654 } |
| 4651 | 4655 |
| 4652 } // namespace WebCore | 4656 } // namespace WebCore |
| OLD | NEW |