OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1432 | 1432 |
1433 static PassRefPtrWillBeRawPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction t ouchAction) | 1433 static PassRefPtrWillBeRawPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction t ouchAction) |
1434 { | 1434 { |
1435 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; | 1435 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; |
1436 if (touchAction == TouchActionAuto) | 1436 if (touchAction == TouchActionAuto) |
1437 list->append(cssValuePool().createIdentifierValue(CSSValueAuto)); | 1437 list->append(cssValuePool().createIdentifierValue(CSSValueAuto)); |
1438 if (touchAction & TouchActionNone) { | 1438 if (touchAction & TouchActionNone) { |
1439 ASSERT(touchAction == TouchActionNone); | 1439 ASSERT(touchAction == TouchActionNone); |
1440 list->append(cssValuePool().createIdentifierValue(CSSValueNone)); | 1440 list->append(cssValuePool().createIdentifierValue(CSSValueNone)); |
1441 } | 1441 } |
1442 if (touchAction & TouchActionPanX) | 1442 if (!(touchAction & TouchActionZoom) && (touchAction & TouchActionPanX)) |
1443 list->append(cssValuePool().createIdentifierValue(CSSValuePanX)); | 1443 list->append(cssValuePool().createIdentifierValue(CSSValuePanX)); |
1444 if (touchAction & TouchActionPanY) | 1444 if (!(touchAction & TouchActionZoom) && (touchAction & TouchActionPanY)) |
1445 list->append(cssValuePool().createIdentifierValue(CSSValuePanY)); | 1445 list->append(cssValuePool().createIdentifierValue(CSSValuePanY)); |
1446 | 1446 if (touchAction & TouchActionZoom) |
Rick Byers
2014/03/05 14:41:13
This code should ASSERT on invalid combinations li
gnana
2014/03/06 08:11:14
Done.
| |
1447 list->append(cssValuePool().createIdentifierValue(CSSValueManipulation)) ; | |
1447 ASSERT(list->length()); | 1448 ASSERT(list->length()); |
1448 return list.release(); | 1449 return list.release(); |
1449 } | 1450 } |
1450 | 1451 |
1451 static bool isLayoutDependent(CSSPropertyID propertyID, PassRefPtr<RenderStyle> style, RenderObject* renderer) | 1452 static bool isLayoutDependent(CSSPropertyID propertyID, PassRefPtr<RenderStyle> style, RenderObject* renderer) |
1452 { | 1453 { |
1453 // Some properties only depend on layout in certain conditions which | 1454 // Some properties only depend on layout in certain conditions which |
1454 // are specified in the main switch statement below. So we can avoid | 1455 // are specified in the main switch statement below. So we can avoid |
1455 // forcing layout in those conditions. The conditions in this switch | 1456 // forcing layout in those conditions. The conditions in this switch |
1456 // statement must remain in sync with the conditions in the main switch. | 1457 // statement must remain in sync with the conditions in the main switch. |
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3034 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, | 3035 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, |
3035 CSSPropertyB ackgroundClip }; | 3036 CSSPropertyB ackgroundClip }; |
3036 | 3037 |
3037 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated() ; | 3038 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated() ; |
3038 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); | 3039 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); |
3039 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); | 3040 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); |
3040 return list.release(); | 3041 return list.release(); |
3041 } | 3042 } |
3042 | 3043 |
3043 } // namespace WebCore | 3044 } // namespace WebCore |
OLD | NEW |