| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 4 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 { | 362 { |
| 363 static const CSSPropertyID columnRuleProperties[] = { | 363 static const CSSPropertyID columnRuleProperties[] = { |
| 364 CSSPropertyWebkitColumnRuleWidth, | 364 CSSPropertyWebkitColumnRuleWidth, |
| 365 CSSPropertyWebkitColumnRuleStyle, | 365 CSSPropertyWebkitColumnRuleStyle, |
| 366 CSSPropertyWebkitColumnRuleColor, | 366 CSSPropertyWebkitColumnRuleColor, |
| 367 }; | 367 }; |
| 368 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitColumnRuleLonghands, (CSSP
ropertyWebkitColumnRule, columnRuleProperties, WTF_ARRAY_LENGTH(columnRuleProper
ties))); | 368 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitColumnRuleLonghands, (CSSP
ropertyWebkitColumnRule, columnRuleProperties, WTF_ARRAY_LENGTH(columnRuleProper
ties))); |
| 369 return webkitColumnRuleLonghands; | 369 return webkitColumnRuleLonghands; |
| 370 } | 370 } |
| 371 | 371 |
| 372 const StylePropertyShorthand& webkitFlexFlowShorthand() | 372 const StylePropertyShorthand& flexFlowShorthand() |
| 373 { | 373 { |
| 374 static const CSSPropertyID flexFlowProperties[] = { CSSPropertyWebkitFlexDir
ection, CSSPropertyWebkitFlexWrap }; | 374 static const CSSPropertyID flexFlowProperties[] = { CSSPropertyFlexDirection
, CSSPropertyFlexWrap }; |
| 375 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexFlowLonghands, (CSSPro
pertyWebkitFlexFlow, flexFlowProperties, WTF_ARRAY_LENGTH(flexFlowProperties))); | 375 DEFINE_STATIC_LOCAL(StylePropertyShorthand, flexFlowLonghands, (CSSPropertyF
lexFlow, flexFlowProperties, WTF_ARRAY_LENGTH(flexFlowProperties))); |
| 376 return webkitFlexFlowLonghands; | 376 return flexFlowLonghands; |
| 377 } | 377 } |
| 378 | 378 |
| 379 const StylePropertyShorthand& webkitFlexShorthand() | 379 const StylePropertyShorthand& flexShorthand() |
| 380 { | 380 { |
| 381 static const CSSPropertyID flexProperties[] = { CSSPropertyWebkitFlexGrow, C
SSPropertyWebkitFlexShrink, CSSPropertyWebkitFlexBasis }; | 381 static const CSSPropertyID flexProperties[] = { CSSPropertyFlexGrow, CSSProp
ertyFlexShrink, CSSPropertyFlexBasis }; |
| 382 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexLonghands, (CSSPropert
yWebkitFlex, flexProperties, WTF_ARRAY_LENGTH(flexProperties))); | 382 DEFINE_STATIC_LOCAL(StylePropertyShorthand, flexLonghands, (CSSPropertyFlex,
flexProperties, WTF_ARRAY_LENGTH(flexProperties))); |
| 383 return webkitFlexLonghands; | 383 return flexLonghands; |
| 384 } | 384 } |
| 385 | 385 |
| 386 const StylePropertyShorthand& webkitMarginCollapseShorthand() | 386 const StylePropertyShorthand& webkitMarginCollapseShorthand() |
| 387 { | 387 { |
| 388 static const CSSPropertyID marginCollapseProperties[] = { CSSPropertyWebkitM
arginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse }; | 388 static const CSSPropertyID marginCollapseProperties[] = { CSSPropertyWebkitM
arginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse }; |
| 389 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarginCollapseLonghands, (
CSSPropertyWebkitMarginCollapse, marginCollapseProperties, WTF_ARRAY_LENGTH(marg
inCollapseProperties))); | 389 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarginCollapseLonghands, (
CSSPropertyWebkitMarginCollapse, marginCollapseProperties, WTF_ARRAY_LENGTH(marg
inCollapseProperties))); |
| 390 return webkitMarginCollapseLonghands; | 390 return webkitMarginCollapseLonghands; |
| 391 } | 391 } |
| 392 | 392 |
| 393 const StylePropertyShorthand& gridColumnShorthand() | 393 const StylePropertyShorthand& gridColumnShorthand() |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 case CSSPropertyWebkitBorderEnd: | 580 case CSSPropertyWebkitBorderEnd: |
| 581 return webkitBorderEndShorthand(); | 581 return webkitBorderEndShorthand(); |
| 582 case CSSPropertyWebkitBorderStart: | 582 case CSSPropertyWebkitBorderStart: |
| 583 return webkitBorderStartShorthand(); | 583 return webkitBorderStartShorthand(); |
| 584 case CSSPropertyWebkitBorderRadius: | 584 case CSSPropertyWebkitBorderRadius: |
| 585 return borderRadiusShorthand(); | 585 return borderRadiusShorthand(); |
| 586 case CSSPropertyWebkitColumns: | 586 case CSSPropertyWebkitColumns: |
| 587 return webkitColumnsShorthand(); | 587 return webkitColumnsShorthand(); |
| 588 case CSSPropertyWebkitColumnRule: | 588 case CSSPropertyWebkitColumnRule: |
| 589 return webkitColumnRuleShorthand(); | 589 return webkitColumnRuleShorthand(); |
| 590 case CSSPropertyWebkitFlex: | 590 case CSSPropertyFlex: |
| 591 return webkitFlexShorthand(); | 591 return flexShorthand(); |
| 592 case CSSPropertyWebkitFlexFlow: | 592 case CSSPropertyFlexFlow: |
| 593 return webkitFlexFlowShorthand(); | 593 return flexFlowShorthand(); |
| 594 case CSSPropertyGridColumn: | 594 case CSSPropertyGridColumn: |
| 595 return gridColumnShorthand(); | 595 return gridColumnShorthand(); |
| 596 case CSSPropertyGridRow: | 596 case CSSPropertyGridRow: |
| 597 return gridRowShorthand(); | 597 return gridRowShorthand(); |
| 598 case CSSPropertyGridArea: | 598 case CSSPropertyGridArea: |
| 599 return gridAreaShorthand(); | 599 return gridAreaShorthand(); |
| 600 case CSSPropertyWebkitMarginCollapse: | 600 case CSSPropertyWebkitMarginCollapse: |
| 601 return webkitMarginCollapseShorthand(); | 601 return webkitMarginCollapseShorthand(); |
| 602 case CSSPropertyWebkitMarquee: | 602 case CSSPropertyWebkitMarquee: |
| 603 return webkitMarqueeShorthand(); | 603 return webkitMarqueeShorthand(); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 map.set(CSSPropertyWebkitColumnWidth, columns); | 846 map.set(CSSPropertyWebkitColumnWidth, columns); |
| 847 map.set(CSSPropertyWebkitColumnCount, columns); | 847 map.set(CSSPropertyWebkitColumnCount, columns); |
| 848 | 848 |
| 849 Vector<StylePropertyShorthand, 1> columnRule; | 849 Vector<StylePropertyShorthand, 1> columnRule; |
| 850 columnRule.uncheckedAppend(webkitColumnRuleShorthand()); | 850 columnRule.uncheckedAppend(webkitColumnRuleShorthand()); |
| 851 map.set(CSSPropertyWebkitColumnRuleWidth, columnRule); | 851 map.set(CSSPropertyWebkitColumnRuleWidth, columnRule); |
| 852 map.set(CSSPropertyWebkitColumnRuleStyle, columnRule); | 852 map.set(CSSPropertyWebkitColumnRuleStyle, columnRule); |
| 853 map.set(CSSPropertyWebkitColumnRuleColor, columnRule); | 853 map.set(CSSPropertyWebkitColumnRuleColor, columnRule); |
| 854 | 854 |
| 855 Vector<StylePropertyShorthand, 1> flex; | 855 Vector<StylePropertyShorthand, 1> flex; |
| 856 flex.uncheckedAppend(webkitFlexShorthand()); | 856 flex.uncheckedAppend(flexShorthand()); |
| 857 map.set(CSSPropertyWebkitFlexGrow, flex); | 857 map.set(CSSPropertyFlexGrow, flex); |
| 858 map.set(CSSPropertyWebkitFlexShrink, flex); | 858 map.set(CSSPropertyFlexShrink, flex); |
| 859 map.set(CSSPropertyWebkitFlexBasis, flex); | 859 map.set(CSSPropertyFlexBasis, flex); |
| 860 | 860 |
| 861 Vector<StylePropertyShorthand, 1> flexFlow; | 861 Vector<StylePropertyShorthand, 1> flexFlow; |
| 862 flexFlow.uncheckedAppend(webkitFlexFlowShorthand()); | 862 flexFlow.uncheckedAppend(flexFlowShorthand()); |
| 863 map.set(CSSPropertyWebkitFlexDirection, flexFlow); | 863 map.set(CSSPropertyFlexDirection, flexFlow); |
| 864 map.set(CSSPropertyWebkitFlexWrap, flexFlow); | 864 map.set(CSSPropertyFlexWrap, flexFlow); |
| 865 | 865 |
| 866 Vector<StylePropertyShorthand, 2> grid; | 866 Vector<StylePropertyShorthand, 2> grid; |
| 867 grid.uncheckedAppend(gridAreaShorthand()); | 867 grid.uncheckedAppend(gridAreaShorthand()); |
| 868 grid.uncheckedAppend(gridColumnShorthand()); | 868 grid.uncheckedAppend(gridColumnShorthand()); |
| 869 map.set(CSSPropertyGridStart, grid); | 869 map.set(CSSPropertyGridStart, grid); |
| 870 map.set(CSSPropertyGridEnd, grid); | 870 map.set(CSSPropertyGridEnd, grid); |
| 871 | 871 |
| 872 Vector<StylePropertyShorthand, 2> gridAfter; | 872 Vector<StylePropertyShorthand, 2> gridAfter; |
| 873 gridAfter.uncheckedAppend(gridAreaShorthand()); | 873 gridAfter.uncheckedAppend(gridAreaShorthand()); |
| 874 gridAfter.uncheckedAppend(gridRowShorthand()); | 874 gridAfter.uncheckedAppend(gridRowShorthand()); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 { | 945 { |
| 946 for (unsigned i = 0; i < shorthands.size(); ++i) { | 946 for (unsigned i = 0; i < shorthands.size(); ++i) { |
| 947 if (shorthands.at(i).id() == shorthandID) | 947 if (shorthands.at(i).id() == shorthandID) |
| 948 return i; | 948 return i; |
| 949 } | 949 } |
| 950 ASSERT_NOT_REACHED(); | 950 ASSERT_NOT_REACHED(); |
| 951 return 0; | 951 return 0; |
| 952 } | 952 } |
| 953 | 953 |
| 954 } // namespace WebCore | 954 } // namespace WebCore |
| OLD | NEW |