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

Side by Side Diff: Source/core/css/StylePropertyShorthand.cpp

Issue 15758002: Unprefix Flexbox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tests 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 | Annotate | Revision Log
OLDNEW
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 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 { 337 {
338 static const CSSPropertyID columnRuleProperties[] = { 338 static const CSSPropertyID columnRuleProperties[] = {
339 CSSPropertyWebkitColumnRuleWidth, 339 CSSPropertyWebkitColumnRuleWidth,
340 CSSPropertyWebkitColumnRuleStyle, 340 CSSPropertyWebkitColumnRuleStyle,
341 CSSPropertyWebkitColumnRuleColor, 341 CSSPropertyWebkitColumnRuleColor,
342 }; 342 };
343 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitColumnRuleLonghands, (colu mnRuleProperties, WTF_ARRAY_LENGTH(columnRuleProperties))); 343 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitColumnRuleLonghands, (colu mnRuleProperties, WTF_ARRAY_LENGTH(columnRuleProperties)));
344 return webkitColumnRuleLonghands; 344 return webkitColumnRuleLonghands;
345 } 345 }
346 346
347 const StylePropertyShorthand& webkitFlexFlowShorthand() 347 const StylePropertyShorthand& flexFlowShorthand()
348 { 348 {
349 static const CSSPropertyID flexFlowProperties[] = { CSSPropertyWebkitFlexDir ection, CSSPropertyWebkitFlexWrap }; 349 static const CSSPropertyID flexFlowProperties[] = { CSSPropertyFlexDirection , CSSPropertyFlexWrap };
350 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexFlowLonghands, (flexFl owProperties, WTF_ARRAY_LENGTH(flexFlowProperties))); 350 DEFINE_STATIC_LOCAL(StylePropertyShorthand, flexFlowLonghands, (flexFlowProp erties, WTF_ARRAY_LENGTH(flexFlowProperties)));
351 return webkitFlexFlowLonghands; 351 return flexFlowLonghands;
352 } 352 }
353 353
354 const StylePropertyShorthand& webkitFlexShorthand() 354 const StylePropertyShorthand& flexShorthand()
355 { 355 {
356 static const CSSPropertyID flexProperties[] = { CSSPropertyWebkitFlexGrow, C SSPropertyWebkitFlexShrink, CSSPropertyWebkitFlexBasis }; 356 static const CSSPropertyID flexProperties[] = { CSSPropertyFlexGrow, CSSProp ertyFlexShrink, CSSPropertyFlexBasis };
357 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexLonghands, (flexProper ties, WTF_ARRAY_LENGTH(flexProperties))); 357 DEFINE_STATIC_LOCAL(StylePropertyShorthand, flexLonghands, (flexProperties, WTF_ARRAY_LENGTH(flexProperties)));
358 return webkitFlexLonghands; 358 return flexLonghands;
359 } 359 }
360 360
361 const StylePropertyShorthand& webkitMarginCollapseShorthand() 361 const StylePropertyShorthand& webkitMarginCollapseShorthand()
362 { 362 {
363 static const CSSPropertyID marginCollapseProperties[] = { CSSPropertyWebkitM arginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse }; 363 static const CSSPropertyID marginCollapseProperties[] = { CSSPropertyWebkitM arginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse };
364 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarginCollapseLonghands, ( marginCollapseProperties, WTF_ARRAY_LENGTH(marginCollapseProperties))); 364 DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarginCollapseLonghands, ( marginCollapseProperties, WTF_ARRAY_LENGTH(marginCollapseProperties)));
365 return webkitMarginCollapseLonghands; 365 return webkitMarginCollapseLonghands;
366 } 366 }
367 367
368 const StylePropertyShorthand& gridColumnShorthand() 368 const StylePropertyShorthand& gridColumnShorthand()
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 case CSSPropertyWebkitBorderEnd: 535 case CSSPropertyWebkitBorderEnd:
536 return webkitBorderEndShorthand(); 536 return webkitBorderEndShorthand();
537 case CSSPropertyWebkitBorderStart: 537 case CSSPropertyWebkitBorderStart:
538 return webkitBorderStartShorthand(); 538 return webkitBorderStartShorthand();
539 case CSSPropertyWebkitBorderRadius: 539 case CSSPropertyWebkitBorderRadius:
540 return borderRadiusShorthand(); 540 return borderRadiusShorthand();
541 case CSSPropertyWebkitColumns: 541 case CSSPropertyWebkitColumns:
542 return webkitColumnsShorthand(); 542 return webkitColumnsShorthand();
543 case CSSPropertyWebkitColumnRule: 543 case CSSPropertyWebkitColumnRule:
544 return webkitColumnRuleShorthand(); 544 return webkitColumnRuleShorthand();
545 case CSSPropertyWebkitFlex: 545 case CSSPropertyFlex:
546 return webkitFlexShorthand(); 546 return flexShorthand();
547 case CSSPropertyWebkitFlexFlow: 547 case CSSPropertyFlexFlow:
548 return webkitFlexFlowShorthand(); 548 return flexFlowShorthand();
549 case CSSPropertyGridColumn: 549 case CSSPropertyGridColumn:
550 return gridColumnShorthand(); 550 return gridColumnShorthand();
551 case CSSPropertyGridRow: 551 case CSSPropertyGridRow:
552 return gridRowShorthand(); 552 return gridRowShorthand();
553 case CSSPropertyGridArea: 553 case CSSPropertyGridArea:
554 return gridAreaShorthand(); 554 return gridAreaShorthand();
555 case CSSPropertyWebkitMarginCollapse: 555 case CSSPropertyWebkitMarginCollapse:
556 return webkitMarginCollapseShorthand(); 556 return webkitMarginCollapseShorthand();
557 case CSSPropertyWebkitMarquee: 557 case CSSPropertyWebkitMarquee:
558 return webkitMarqueeShorthand(); 558 return webkitMarqueeShorthand();
(...skipping 24 matching lines...) Expand all
583 // thus we need to special case it here. FIXME: This is a violation of CSS 3 Fonts 583 // thus we need to special case it here. FIXME: This is a violation of CSS 3 Fonts
584 // as we should still be able to change the longhands. 584 // as we should still be able to change the longhands.
585 // DON'T ADD ANY SHORTHAND HERE UNLESS IT ISN'T ALWAYS EXPANDED AT PARSE TIM E (which is wrong). 585 // DON'T ADD ANY SHORTHAND HERE UNLESS IT ISN'T ALWAYS EXPANDED AT PARSE TIM E (which is wrong).
586 if (id == CSSPropertyFont) 586 if (id == CSSPropertyFont)
587 return false; 587 return false;
588 588
589 return shorthandForProperty(id).length(); 589 return shorthandForProperty(id).length();
590 } 590 }
591 591
592 } // namespace WebCore 592 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698