eseidel | 13a6422 | 2006-05-16 05:33:34 +0000 | [diff] [blame] | 1 | /** |
eseidel | 13a6422 | 2006-05-16 05:33:34 +0000 | [diff] [blame] | 2 | * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 | * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Library General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Library General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Library General Public License |
| 16 | * along with this library; see the file COPYING.LIB. If not, write to |
ddkilzer | c8eccec | 2007-09-26 02:29:57 +0000 | [diff] [blame] | 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 | * Boston, MA 02110-1301, USA. |
eseidel | 13a6422 | 2006-05-16 05:33:34 +0000 | [diff] [blame] | 19 | */ |
weinig | b35e93c | 2007-01-15 01:08:44 +0000 | [diff] [blame] | 20 | |
eseidel | 13a6422 | 2006-05-16 05:33:34 +0000 | [diff] [blame] | 21 | #include "config.h" |
| 22 | #include "CSSProperty.h" |
weinig | b35e93c | 2007-01-15 01:08:44 +0000 | [diff] [blame] | 23 | |
rniwa@webkit.org | 3b55f50 | 2012-03-30 18:27:16 +0000 | [diff] [blame] | 24 | #include "CSSValueList.h" |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 25 | #include "RenderStyleConstants.h" |
alexis.menard@openbossa.org | 866e8da | 2012-04-02 18:47:00 +0000 | [diff] [blame] | 26 | #include "StylePropertyShorthand.h" |
eseidel | 13a6422 | 2006-05-16 05:33:34 +0000 | [diff] [blame] | 27 | |
macpherson@chromium.org | d432d9e | 2012-07-05 00:15:54 +0000 | [diff] [blame] | 28 | #if ENABLE(CSS_VARIABLES) |
| 29 | #include "CSSVariableValue.h" |
| 30 | #endif |
| 31 | |
commit-queue@webkit.org | 1ac47ab | 2012-08-24 23:58:43 +0000 | [diff] [blame] | 32 | #include <wtf/text/StringBuilder.h> |
| 33 | |
eseidel | 13a6422 | 2006-05-16 05:33:34 +0000 | [diff] [blame] | 34 | namespace WebCore { |
| 35 | |
rniwa@webkit.org | 3b55f50 | 2012-03-30 18:27:16 +0000 | [diff] [blame] | 36 | struct SameSizeAsCSSProperty { |
| 37 | uint32_t bitfields; |
| 38 | void* value; |
| 39 | }; |
| 40 | |
| 41 | COMPILE_ASSERT(sizeof(CSSProperty) == sizeof(SameSizeAsCSSProperty), CSSProperty_should_stay_small); |
| 42 | |
rniwa@webkit.org | 3b55f50 | 2012-03-30 18:27:16 +0000 | [diff] [blame] | 43 | void CSSProperty::wrapValueInCommaSeparatedList() |
| 44 | { |
| 45 | RefPtr<CSSValue> value = m_value.release(); |
| 46 | m_value = CSSValueList::createCommaSeparated(); |
| 47 | static_cast<CSSValueList*>(m_value.get())->append(value.release()); |
| 48 | } |
| 49 | |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 50 | enum LogicalBoxSide { BeforeSide, EndSide, AfterSide, StartSide }; |
| 51 | enum PhysicalBoxSide { TopSide, RightSide, BottomSide, LeftSide }; |
| 52 | |
alexis.menard@openbossa.org | 51f64bf | 2012-04-03 14:18:19 +0000 | [diff] [blame] | 53 | static CSSPropertyID resolveToPhysicalProperty(TextDirection direction, WritingMode writingMode, LogicalBoxSide logicalSide, const StylePropertyShorthand& shorthand) |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 54 | { |
| 55 | if (direction == LTR) { |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 56 | if (writingMode == TopToBottomWritingMode) { |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 57 | // The common case. The logical and physical box sides match. |
| 58 | // Left = Start, Right = End, Before = Top, After = Bottom |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 59 | return shorthand.properties()[logicalSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 60 | } |
apavlov@chromium.org | f684aec | 2011-10-19 13:31:03 +0000 | [diff] [blame] | 61 | |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 62 | if (writingMode == BottomToTopWritingMode) { |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 63 | // Start = Left, End = Right, Before = Bottom, After = Top. |
| 64 | switch (logicalSide) { |
| 65 | case StartSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 66 | return shorthand.properties()[LeftSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 67 | case EndSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 68 | return shorthand.properties()[RightSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 69 | case BeforeSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 70 | return shorthand.properties()[BottomSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 71 | default: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 72 | return shorthand.properties()[TopSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 73 | } |
| 74 | } |
apavlov@chromium.org | f684aec | 2011-10-19 13:31:03 +0000 | [diff] [blame] | 75 | |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 76 | if (writingMode == LeftToRightWritingMode) { |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 77 | // Start = Top, End = Bottom, Before = Left, After = Right. |
| 78 | switch (logicalSide) { |
| 79 | case StartSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 80 | return shorthand.properties()[TopSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 81 | case EndSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 82 | return shorthand.properties()[BottomSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 83 | case BeforeSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 84 | return shorthand.properties()[LeftSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 85 | default: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 86 | return shorthand.properties()[RightSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 87 | } |
| 88 | } |
apavlov@chromium.org | f684aec | 2011-10-19 13:31:03 +0000 | [diff] [blame] | 89 | |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 90 | // Start = Top, End = Bottom, Before = Right, After = Left |
| 91 | switch (logicalSide) { |
| 92 | case StartSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 93 | return shorthand.properties()[TopSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 94 | case EndSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 95 | return shorthand.properties()[BottomSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 96 | case BeforeSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 97 | return shorthand.properties()[RightSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 98 | default: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 99 | return shorthand.properties()[LeftSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 100 | } |
| 101 | } |
| 102 | |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 103 | if (writingMode == TopToBottomWritingMode) { |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 104 | // Start = Right, End = Left, Before = Top, After = Bottom |
| 105 | switch (logicalSide) { |
| 106 | case StartSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 107 | return shorthand.properties()[RightSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 108 | case EndSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 109 | return shorthand.properties()[LeftSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 110 | case BeforeSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 111 | return shorthand.properties()[TopSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 112 | default: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 113 | return shorthand.properties()[BottomSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 114 | } |
| 115 | } |
apavlov@chromium.org | f684aec | 2011-10-19 13:31:03 +0000 | [diff] [blame] | 116 | |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 117 | if (writingMode == BottomToTopWritingMode) { |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 118 | // Start = Right, End = Left, Before = Bottom, After = Top |
| 119 | switch (logicalSide) { |
| 120 | case StartSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 121 | return shorthand.properties()[RightSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 122 | case EndSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 123 | return shorthand.properties()[LeftSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 124 | case BeforeSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 125 | return shorthand.properties()[BottomSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 126 | default: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 127 | return shorthand.properties()[TopSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 128 | } |
| 129 | } |
apavlov@chromium.org | f684aec | 2011-10-19 13:31:03 +0000 | [diff] [blame] | 130 | |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 131 | if (writingMode == LeftToRightWritingMode) { |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 132 | // Start = Bottom, End = Top, Before = Left, After = Right |
| 133 | switch (logicalSide) { |
| 134 | case StartSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 135 | return shorthand.properties()[BottomSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 136 | case EndSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 137 | return shorthand.properties()[TopSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 138 | case BeforeSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 139 | return shorthand.properties()[LeftSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 140 | default: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 141 | return shorthand.properties()[RightSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 142 | } |
| 143 | } |
apavlov@chromium.org | f684aec | 2011-10-19 13:31:03 +0000 | [diff] [blame] | 144 | |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 145 | // Start = Bottom, End = Top, Before = Right, After = Left |
| 146 | switch (logicalSide) { |
| 147 | case StartSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 148 | return shorthand.properties()[BottomSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 149 | case EndSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 150 | return shorthand.properties()[TopSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 151 | case BeforeSide: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 152 | return shorthand.properties()[RightSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 153 | default: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 154 | return shorthand.properties()[LeftSide]; |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 155 | } |
| 156 | } |
| 157 | |
| 158 | enum LogicalExtent { LogicalWidth, LogicalHeight }; |
| 159 | |
alexis.menard@openbossa.org | 51f64bf | 2012-04-03 14:18:19 +0000 | [diff] [blame] | 160 | static CSSPropertyID resolveToPhysicalProperty(WritingMode writingMode, LogicalExtent logicalSide, const CSSPropertyID* properties) |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 161 | { |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 162 | if (writingMode == TopToBottomWritingMode || writingMode == BottomToTopWritingMode) |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 163 | return properties[logicalSide]; |
| 164 | return logicalSide == LogicalWidth ? properties[1] : properties[0]; |
| 165 | } |
apavlov@chromium.org | f684aec | 2011-10-19 13:31:03 +0000 | [diff] [blame] | 166 | |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 167 | static const StylePropertyShorthand& borderDirections() |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 168 | { |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 169 | static const CSSPropertyID properties[4] = { CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft }; |
| 170 | DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderDirections, (properties, WTF_ARRAY_LENGTH(properties))); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 171 | return borderDirections; |
| 172 | } |
| 173 | |
alexis.menard@openbossa.org | 51f64bf | 2012-04-03 14:18:19 +0000 | [diff] [blame] | 174 | CSSPropertyID CSSProperty::resolveDirectionAwareProperty(CSSPropertyID propertyID, TextDirection direction, WritingMode writingMode) |
arv@chromium.org | 26b6d1b | 2010-07-10 04:08:32 +0000 | [diff] [blame] | 175 | { |
alexis.menard@openbossa.org | 51f64bf | 2012-04-03 14:18:19 +0000 | [diff] [blame] | 176 | switch (propertyID) { |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 177 | case CSSPropertyWebkitMarginEnd: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 178 | return resolveToPhysicalProperty(direction, writingMode, EndSide, marginShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 179 | case CSSPropertyWebkitMarginStart: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 180 | return resolveToPhysicalProperty(direction, writingMode, StartSide, marginShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 181 | case CSSPropertyWebkitMarginBefore: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 182 | return resolveToPhysicalProperty(direction, writingMode, BeforeSide, marginShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 183 | case CSSPropertyWebkitMarginAfter: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 184 | return resolveToPhysicalProperty(direction, writingMode, AfterSide, marginShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 185 | case CSSPropertyWebkitPaddingEnd: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 186 | return resolveToPhysicalProperty(direction, writingMode, EndSide, paddingShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 187 | case CSSPropertyWebkitPaddingStart: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 188 | return resolveToPhysicalProperty(direction, writingMode, StartSide, paddingShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 189 | case CSSPropertyWebkitPaddingBefore: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 190 | return resolveToPhysicalProperty(direction, writingMode, BeforeSide, paddingShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 191 | case CSSPropertyWebkitPaddingAfter: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 192 | return resolveToPhysicalProperty(direction, writingMode, AfterSide, paddingShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 193 | case CSSPropertyWebkitBorderEnd: |
| 194 | return resolveToPhysicalProperty(direction, writingMode, EndSide, borderDirections()); |
| 195 | case CSSPropertyWebkitBorderStart: |
| 196 | return resolveToPhysicalProperty(direction, writingMode, StartSide, borderDirections()); |
| 197 | case CSSPropertyWebkitBorderBefore: |
| 198 | return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderDirections()); |
| 199 | case CSSPropertyWebkitBorderAfter: |
| 200 | return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderDirections()); |
| 201 | case CSSPropertyWebkitBorderEndColor: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 202 | return resolveToPhysicalProperty(direction, writingMode, EndSide, borderColorShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 203 | case CSSPropertyWebkitBorderStartColor: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 204 | return resolveToPhysicalProperty(direction, writingMode, StartSide, borderColorShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 205 | case CSSPropertyWebkitBorderBeforeColor: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 206 | return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderColorShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 207 | case CSSPropertyWebkitBorderAfterColor: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 208 | return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderColorShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 209 | case CSSPropertyWebkitBorderEndStyle: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 210 | return resolveToPhysicalProperty(direction, writingMode, EndSide, borderStyleShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 211 | case CSSPropertyWebkitBorderStartStyle: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 212 | return resolveToPhysicalProperty(direction, writingMode, StartSide, borderStyleShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 213 | case CSSPropertyWebkitBorderBeforeStyle: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 214 | return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderStyleShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 215 | case CSSPropertyWebkitBorderAfterStyle: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 216 | return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderStyleShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 217 | case CSSPropertyWebkitBorderEndWidth: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 218 | return resolveToPhysicalProperty(direction, writingMode, EndSide, borderWidthShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 219 | case CSSPropertyWebkitBorderStartWidth: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 220 | return resolveToPhysicalProperty(direction, writingMode, StartSide, borderWidthShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 221 | case CSSPropertyWebkitBorderBeforeWidth: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 222 | return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderWidthShorthand()); |
alexis.menard@openbossa.org | 0983b461 | 2012-03-28 18:29:54 +0000 | [diff] [blame] | 223 | case CSSPropertyWebkitBorderAfterWidth: |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 224 | return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderWidthShorthand()); |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 225 | case CSSPropertyWebkitLogicalWidth: { |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 226 | const CSSPropertyID properties[2] = { CSSPropertyWidth, CSSPropertyHeight }; |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 227 | return resolveToPhysicalProperty(writingMode, LogicalWidth, properties); |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 228 | } |
| 229 | case CSSPropertyWebkitLogicalHeight: { |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 230 | const CSSPropertyID properties[2] = { CSSPropertyWidth, CSSPropertyHeight }; |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 231 | return resolveToPhysicalProperty(writingMode, LogicalHeight, properties); |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 232 | } |
| 233 | case CSSPropertyWebkitMinLogicalWidth: { |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 234 | const CSSPropertyID properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight }; |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 235 | return resolveToPhysicalProperty(writingMode, LogicalWidth, properties); |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 236 | } |
| 237 | case CSSPropertyWebkitMinLogicalHeight: { |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 238 | const CSSPropertyID properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight }; |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 239 | return resolveToPhysicalProperty(writingMode, LogicalHeight, properties); |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 240 | } |
| 241 | case CSSPropertyWebkitMaxLogicalWidth: { |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 242 | const CSSPropertyID properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight }; |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 243 | return resolveToPhysicalProperty(writingMode, LogicalWidth, properties); |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 244 | } |
| 245 | case CSSPropertyWebkitMaxLogicalHeight: { |
alexis.menard@openbossa.org | b5660a6 | 2012-04-02 14:19:46 +0000 | [diff] [blame] | 246 | const CSSPropertyID properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight }; |
hyatt@apple.com | e0461b5 | 2010-10-06 19:02:34 +0000 | [diff] [blame] | 247 | return resolveToPhysicalProperty(writingMode, LogicalHeight, properties); |
hyatt@apple.com | cdb931e | 2010-09-20 21:03:16 +0000 | [diff] [blame] | 248 | } |
arv@chromium.org | 26b6d1b | 2010-07-10 04:08:32 +0000 | [diff] [blame] | 249 | default: |
| 250 | return propertyID; |
| 251 | } |
| 252 | } |
| 253 | |
alexis.menard@openbossa.org | 51f64bf | 2012-04-03 14:18:19 +0000 | [diff] [blame] | 254 | bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID) |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 255 | { |
alexis.menard@openbossa.org | 51f64bf | 2012-04-03 14:18:19 +0000 | [diff] [blame] | 256 | switch (propertyID) { |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 257 | case CSSPropertyBorderCollapse: |
| 258 | case CSSPropertyBorderSpacing: |
| 259 | case CSSPropertyCaptionSide: |
| 260 | case CSSPropertyColor: |
| 261 | case CSSPropertyCursor: |
| 262 | case CSSPropertyDirection: |
| 263 | case CSSPropertyEmptyCells: |
| 264 | case CSSPropertyFont: |
| 265 | case CSSPropertyFontFamily: |
| 266 | case CSSPropertyFontSize: |
| 267 | case CSSPropertyFontStyle: |
| 268 | case CSSPropertyFontVariant: |
| 269 | case CSSPropertyFontWeight: |
commit-queue@webkit.org | ed8c94a | 2012-07-17 23:23:36 +0000 | [diff] [blame] | 270 | #if ENABLE(CSS_IMAGE_ORIENTATION) |
| 271 | case CSSPropertyImageOrientation: |
| 272 | #endif |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 273 | case CSSPropertyImageRendering: |
commit-queue@webkit.org | 2299fe0 | 2012-06-11 17:19:26 +0000 | [diff] [blame] | 274 | #if ENABLE(CSS_IMAGE_RESOLUTION) |
| 275 | case CSSPropertyImageResolution: |
| 276 | #endif |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 277 | case CSSPropertyLetterSpacing: |
| 278 | case CSSPropertyLineHeight: |
| 279 | case CSSPropertyListStyle: |
| 280 | case CSSPropertyListStyleImage: |
| 281 | case CSSPropertyListStyleType: |
| 282 | case CSSPropertyListStylePosition: |
| 283 | case CSSPropertyOrphans: |
| 284 | case CSSPropertyPointerEvents: |
| 285 | case CSSPropertyQuotes: |
| 286 | case CSSPropertyResize: |
| 287 | case CSSPropertySpeak: |
morrita@google.com | 6e818ec | 2012-05-11 03:28:46 +0000 | [diff] [blame] | 288 | case CSSPropertyTabSize: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 289 | case CSSPropertyTextAlign: |
| 290 | case CSSPropertyTextDecoration: |
| 291 | case CSSPropertyTextIndent: |
| 292 | case CSSPropertyTextRendering: |
| 293 | case CSSPropertyTextShadow: |
| 294 | case CSSPropertyTextTransform: |
macpherson@chromium.org | 913b61e | 2012-06-13 03:31:39 +0000 | [diff] [blame] | 295 | #if ENABLE(CSS_VARIABLES) |
| 296 | case CSSPropertyVariable: |
| 297 | #endif |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 298 | case CSSPropertyVisibility: |
fsamuel@chromium.org | 8a32304 | 2011-11-04 23:07:20 +0000 | [diff] [blame] | 299 | case CSSPropertyWebkitAspectRatio: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 300 | case CSSPropertyWebkitBorderHorizontalSpacing: |
| 301 | case CSSPropertyWebkitBorderVerticalSpacing: |
| 302 | case CSSPropertyWebkitBoxDirection: |
| 303 | case CSSPropertyWebkitColorCorrection: |
jer.noble@apple.com | e017375 | 2013-03-07 00:27:59 +0000 | [diff] [blame] | 304 | #if ENABLE(CURSOR_VISIBILITY) |
| 305 | case CSSPropertyWebkitCursorVisibility: |
| 306 | #endif |
antti@apple.com | 375f24a | 2011-10-28 11:47:47 +0000 | [diff] [blame] | 307 | case CSSPropertyWebkitFontFeatureSettings: |
mitz@apple.com | a45318d | 2012-01-11 08:38:29 +0000 | [diff] [blame] | 308 | case CSSPropertyWebkitFontKerning: |
antti@apple.com | 375f24a | 2011-10-28 11:47:47 +0000 | [diff] [blame] | 309 | case CSSPropertyWebkitFontSmoothing: |
mitz@apple.com | d4422ea | 2012-01-12 04:10:01 +0000 | [diff] [blame] | 310 | case CSSPropertyWebkitFontVariantLigatures: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 311 | case CSSPropertyWebkitLocale: |
| 312 | case CSSPropertyWebkitHighlight: |
| 313 | case CSSPropertyWebkitHyphenateCharacter: |
| 314 | case CSSPropertyWebkitHyphenateLimitAfter: |
| 315 | case CSSPropertyWebkitHyphenateLimitBefore: |
| 316 | case CSSPropertyWebkitHyphenateLimitLines: |
| 317 | case CSSPropertyWebkitHyphens: |
hyatt@apple.com | 368c7da | 2012-02-17 23:13:29 +0000 | [diff] [blame] | 318 | case CSSPropertyWebkitLineAlign: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 319 | case CSSPropertyWebkitLineBoxContain: |
| 320 | case CSSPropertyWebkitLineBreak: |
hyatt@apple.com | 4a5b5e4 | 2011-10-27 21:21:32 +0000 | [diff] [blame] | 321 | case CSSPropertyWebkitLineGrid: |
hyatt@apple.com | 2108c44 | 2012-02-09 21:59:07 +0000 | [diff] [blame] | 322 | case CSSPropertyWebkitLineSnap: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 323 | case CSSPropertyWebkitNbspMode: |
commit-queue@webkit.org | 4e9d4a0 | 2012-09-12 19:21:41 +0000 | [diff] [blame] | 324 | #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) |
commit-queue@webkit.org | 2ec3eb5 | 2012-02-16 05:09:09 +0000 | [diff] [blame] | 325 | case CSSPropertyWebkitOverflowScrolling: |
| 326 | #endif |
macpherson@chromium.org | e999d39 | 2011-11-02 01:23:09 +0000 | [diff] [blame] | 327 | case CSSPropertyWebkitPrintColorAdjust: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 328 | case CSSPropertyWebkitRtlOrdering: |
rniwa@webkit.org | 133846e | 2012-12-11 22:16:11 +0000 | [diff] [blame] | 329 | case CSSPropertyWebkitRubyPosition: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 330 | case CSSPropertyWebkitTextCombine: |
commit-queue@webkit.org | 85886a9 | 2012-10-19 18:53:11 +0000 | [diff] [blame] | 331 | #if ENABLE(CSS3_TEXT) |
commit-queue@webkit.org | 68a556b | 2012-08-09 21:49:36 +0000 | [diff] [blame] | 332 | case CSSPropertyWebkitTextDecorationLine: |
commit-queue@webkit.org | 52c264d | 2012-11-12 06:37:55 +0000 | [diff] [blame] | 333 | case CSSPropertyWebkitTextAlignLast: |
dw.im@samsung.com | 94cc1a4 | 2013-04-10 00:32:39 +0000 | [diff] [blame] | 334 | case CSSPropertyWebkitTextJustify: |
dino@apple.com | 43bfa76 | 2013-05-30 01:21:37 +0000 | [diff] [blame] | 335 | case CSSPropertyWebkitTextUnderlinePosition: |
commit-queue@webkit.org | 85886a9 | 2012-10-19 18:53:11 +0000 | [diff] [blame] | 336 | #endif // CSS3_TEXT |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 337 | case CSSPropertyWebkitTextDecorationsInEffect: |
| 338 | case CSSPropertyWebkitTextEmphasis: |
| 339 | case CSSPropertyWebkitTextEmphasisColor: |
| 340 | case CSSPropertyWebkitTextEmphasisPosition: |
| 341 | case CSSPropertyWebkitTextEmphasisStyle: |
| 342 | case CSSPropertyWebkitTextFillColor: |
antti@apple.com | 375f24a | 2011-10-28 11:47:47 +0000 | [diff] [blame] | 343 | case CSSPropertyWebkitTextOrientation: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 344 | case CSSPropertyWebkitTextSecurity: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 345 | case CSSPropertyWebkitTextStroke: |
| 346 | case CSSPropertyWebkitTextStrokeColor: |
| 347 | case CSSPropertyWebkitTextStrokeWidth: |
| 348 | case CSSPropertyWebkitUserModify: |
| 349 | case CSSPropertyWebkitUserSelect: |
| 350 | case CSSPropertyWebkitWritingMode: |
| 351 | case CSSPropertyWhiteSpace: |
| 352 | case CSSPropertyWidows: |
| 353 | case CSSPropertyWordBreak: |
| 354 | case CSSPropertyWordSpacing: |
| 355 | case CSSPropertyWordWrap: |
| 356 | #if ENABLE(SVG) |
| 357 | case CSSPropertyClipRule: |
| 358 | case CSSPropertyColorInterpolation: |
| 359 | case CSSPropertyColorInterpolationFilters: |
| 360 | case CSSPropertyColorRendering: |
| 361 | case CSSPropertyFill: |
| 362 | case CSSPropertyFillOpacity: |
| 363 | case CSSPropertyFillRule: |
| 364 | case CSSPropertyGlyphOrientationHorizontal: |
| 365 | case CSSPropertyGlyphOrientationVertical: |
| 366 | case CSSPropertyKerning: |
| 367 | case CSSPropertyMarker: |
| 368 | case CSSPropertyMarkerEnd: |
| 369 | case CSSPropertyMarkerMid: |
| 370 | case CSSPropertyMarkerStart: |
| 371 | case CSSPropertyStroke: |
| 372 | case CSSPropertyStrokeDasharray: |
| 373 | case CSSPropertyStrokeDashoffset: |
| 374 | case CSSPropertyStrokeLinecap: |
| 375 | case CSSPropertyStrokeLinejoin: |
| 376 | case CSSPropertyStrokeMiterlimit: |
| 377 | case CSSPropertyStrokeOpacity: |
| 378 | case CSSPropertyStrokeWidth: |
| 379 | case CSSPropertyShapeRendering: |
| 380 | case CSSPropertyTextAnchor: |
| 381 | case CSSPropertyWritingMode: |
| 382 | #endif |
| 383 | #if ENABLE(TOUCH_EVENTS) |
| 384 | case CSSPropertyWebkitTapHighlightColor: |
| 385 | #endif |
| 386 | return true; |
| 387 | case CSSPropertyDisplay: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 388 | case CSSPropertyZoom: |
| 389 | case CSSPropertyBackground: |
| 390 | case CSSPropertyBackgroundAttachment: |
| 391 | case CSSPropertyBackgroundClip: |
| 392 | case CSSPropertyBackgroundColor: |
| 393 | case CSSPropertyBackgroundImage: |
| 394 | case CSSPropertyBackgroundOrigin: |
| 395 | case CSSPropertyBackgroundPosition: |
| 396 | case CSSPropertyBackgroundPositionX: |
| 397 | case CSSPropertyBackgroundPositionY: |
| 398 | case CSSPropertyBackgroundRepeat: |
| 399 | case CSSPropertyBackgroundRepeatX: |
| 400 | case CSSPropertyBackgroundRepeatY: |
| 401 | case CSSPropertyBackgroundSize: |
| 402 | case CSSPropertyBorder: |
| 403 | case CSSPropertyBorderBottom: |
| 404 | case CSSPropertyBorderBottomColor: |
| 405 | case CSSPropertyBorderBottomLeftRadius: |
| 406 | case CSSPropertyBorderBottomRightRadius: |
| 407 | case CSSPropertyBorderBottomStyle: |
| 408 | case CSSPropertyBorderBottomWidth: |
| 409 | case CSSPropertyBorderColor: |
| 410 | case CSSPropertyBorderImage: |
| 411 | case CSSPropertyBorderImageOutset: |
| 412 | case CSSPropertyBorderImageRepeat: |
| 413 | case CSSPropertyBorderImageSlice: |
| 414 | case CSSPropertyBorderImageSource: |
| 415 | case CSSPropertyBorderImageWidth: |
| 416 | case CSSPropertyBorderLeft: |
| 417 | case CSSPropertyBorderLeftColor: |
| 418 | case CSSPropertyBorderLeftStyle: |
| 419 | case CSSPropertyBorderLeftWidth: |
| 420 | case CSSPropertyBorderRadius: |
| 421 | case CSSPropertyBorderRight: |
| 422 | case CSSPropertyBorderRightColor: |
| 423 | case CSSPropertyBorderRightStyle: |
| 424 | case CSSPropertyBorderRightWidth: |
| 425 | case CSSPropertyBorderStyle: |
| 426 | case CSSPropertyBorderTop: |
| 427 | case CSSPropertyBorderTopColor: |
| 428 | case CSSPropertyBorderTopLeftRadius: |
| 429 | case CSSPropertyBorderTopRightRadius: |
| 430 | case CSSPropertyBorderTopStyle: |
| 431 | case CSSPropertyBorderTopWidth: |
| 432 | case CSSPropertyBorderWidth: |
| 433 | case CSSPropertyBottom: |
| 434 | case CSSPropertyBoxShadow: |
| 435 | case CSSPropertyBoxSizing: |
| 436 | case CSSPropertyClear: |
| 437 | case CSSPropertyClip: |
| 438 | case CSSPropertyContent: |
| 439 | case CSSPropertyCounterIncrement: |
| 440 | case CSSPropertyCounterReset: |
| 441 | case CSSPropertyFloat: |
| 442 | case CSSPropertyFontStretch: |
michelangelo@webkit.org | 5540334 | 2013-04-11 18:54:09 +0000 | [diff] [blame] | 443 | #if ENABLE(CSS_SHADERS) |
| 444 | case CSSPropertyGeometry: |
| 445 | #endif |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 446 | case CSSPropertyHeight: |
| 447 | case CSSPropertyLeft: |
| 448 | case CSSPropertyMargin: |
| 449 | case CSSPropertyMarginBottom: |
| 450 | case CSSPropertyMarginLeft: |
| 451 | case CSSPropertyMarginRight: |
| 452 | case CSSPropertyMarginTop: |
| 453 | case CSSPropertyMaxHeight: |
| 454 | case CSSPropertyMaxWidth: |
| 455 | case CSSPropertyMinHeight: |
| 456 | case CSSPropertyMinWidth: |
| 457 | case CSSPropertyOpacity: |
| 458 | case CSSPropertyOutline: |
| 459 | case CSSPropertyOutlineColor: |
| 460 | case CSSPropertyOutlineOffset: |
| 461 | case CSSPropertyOutlineStyle: |
| 462 | case CSSPropertyOutlineWidth: |
| 463 | case CSSPropertyOverflow: |
commit-queue@webkit.org | a1db848 | 2012-09-06 14:00:33 +0000 | [diff] [blame] | 464 | case CSSPropertyOverflowWrap: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 465 | case CSSPropertyOverflowX: |
| 466 | case CSSPropertyOverflowY: |
| 467 | case CSSPropertyPadding: |
| 468 | case CSSPropertyPaddingBottom: |
| 469 | case CSSPropertyPaddingLeft: |
| 470 | case CSSPropertyPaddingRight: |
| 471 | case CSSPropertyPaddingTop: |
| 472 | case CSSPropertyPage: |
| 473 | case CSSPropertyPageBreakAfter: |
| 474 | case CSSPropertyPageBreakBefore: |
| 475 | case CSSPropertyPageBreakInside: |
| 476 | case CSSPropertyPosition: |
| 477 | case CSSPropertyRight: |
| 478 | case CSSPropertySize: |
| 479 | case CSSPropertySrc: |
| 480 | case CSSPropertyTableLayout: |
| 481 | case CSSPropertyTextLineThrough: |
| 482 | case CSSPropertyTextLineThroughColor: |
| 483 | case CSSPropertyTextLineThroughMode: |
| 484 | case CSSPropertyTextLineThroughStyle: |
| 485 | case CSSPropertyTextLineThroughWidth: |
| 486 | case CSSPropertyTextOverflow: |
| 487 | case CSSPropertyTextOverline: |
| 488 | case CSSPropertyTextOverlineColor: |
| 489 | case CSSPropertyTextOverlineMode: |
| 490 | case CSSPropertyTextOverlineStyle: |
| 491 | case CSSPropertyTextOverlineWidth: |
| 492 | case CSSPropertyTextUnderline: |
| 493 | case CSSPropertyTextUnderlineColor: |
| 494 | case CSSPropertyTextUnderlineMode: |
| 495 | case CSSPropertyTextUnderlineStyle: |
| 496 | case CSSPropertyTextUnderlineWidth: |
| 497 | case CSSPropertyTop: |
alexis@webkit.org | 139623d | 2013-03-04 15:09:04 +0000 | [diff] [blame] | 498 | case CSSPropertyTransition: |
| 499 | case CSSPropertyTransitionDelay: |
| 500 | case CSSPropertyTransitionDuration: |
| 501 | case CSSPropertyTransitionProperty: |
| 502 | case CSSPropertyTransitionTimingFunction: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 503 | case CSSPropertyUnicodeBidi: |
| 504 | case CSSPropertyUnicodeRange: |
| 505 | case CSSPropertyVerticalAlign: |
| 506 | case CSSPropertyWidth: |
| 507 | case CSSPropertyZIndex: |
| 508 | case CSSPropertyWebkitAnimation: |
| 509 | case CSSPropertyWebkitAnimationDelay: |
| 510 | case CSSPropertyWebkitAnimationDirection: |
| 511 | case CSSPropertyWebkitAnimationDuration: |
| 512 | case CSSPropertyWebkitAnimationFillMode: |
| 513 | case CSSPropertyWebkitAnimationIterationCount: |
| 514 | case CSSPropertyWebkitAnimationName: |
| 515 | case CSSPropertyWebkitAnimationPlayState: |
| 516 | case CSSPropertyWebkitAnimationTimingFunction: |
| 517 | case CSSPropertyWebkitAppearance: |
| 518 | case CSSPropertyWebkitBackfaceVisibility: |
| 519 | case CSSPropertyWebkitBackgroundClip: |
| 520 | case CSSPropertyWebkitBackgroundComposite: |
| 521 | case CSSPropertyWebkitBackgroundOrigin: |
| 522 | case CSSPropertyWebkitBackgroundSize: |
| 523 | case CSSPropertyWebkitBorderAfter: |
| 524 | case CSSPropertyWebkitBorderAfterColor: |
| 525 | case CSSPropertyWebkitBorderAfterStyle: |
| 526 | case CSSPropertyWebkitBorderAfterWidth: |
| 527 | case CSSPropertyWebkitBorderBefore: |
| 528 | case CSSPropertyWebkitBorderBeforeColor: |
| 529 | case CSSPropertyWebkitBorderBeforeStyle: |
| 530 | case CSSPropertyWebkitBorderBeforeWidth: |
| 531 | case CSSPropertyWebkitBorderEnd: |
| 532 | case CSSPropertyWebkitBorderEndColor: |
| 533 | case CSSPropertyWebkitBorderEndStyle: |
| 534 | case CSSPropertyWebkitBorderEndWidth: |
| 535 | case CSSPropertyWebkitBorderFit: |
| 536 | case CSSPropertyWebkitBorderImage: |
| 537 | case CSSPropertyWebkitBorderRadius: |
| 538 | case CSSPropertyWebkitBorderStart: |
| 539 | case CSSPropertyWebkitBorderStartColor: |
| 540 | case CSSPropertyWebkitBorderStartStyle: |
| 541 | case CSSPropertyWebkitBorderStartWidth: |
| 542 | case CSSPropertyWebkitBoxAlign: |
alexis.menard@openbossa.org | 91279ad | 2012-06-12 02:21:42 +0000 | [diff] [blame] | 543 | #if ENABLE(CSS_BOX_DECORATION_BREAK) |
alexis.menard@openbossa.org | 454e4e1 | 2012-05-29 23:24:58 +0000 | [diff] [blame] | 544 | case CSSPropertyWebkitBoxDecorationBreak: |
alexis.menard@openbossa.org | 91279ad | 2012-06-12 02:21:42 +0000 | [diff] [blame] | 545 | #endif |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 546 | case CSSPropertyWebkitBoxFlex: |
| 547 | case CSSPropertyWebkitBoxFlexGroup: |
| 548 | case CSSPropertyWebkitBoxLines: |
| 549 | case CSSPropertyWebkitBoxOrdinalGroup: |
| 550 | case CSSPropertyWebkitBoxOrient: |
| 551 | case CSSPropertyWebkitBoxPack: |
| 552 | case CSSPropertyWebkitBoxReflect: |
| 553 | case CSSPropertyWebkitBoxShadow: |
krit@webkit.org | 60c867a | 2012-08-31 22:29:48 +0000 | [diff] [blame] | 554 | case CSSPropertyWebkitClipPath: |
mitz@apple.com | ed6bd9e | 2011-10-27 17:59:32 +0000 | [diff] [blame] | 555 | case CSSPropertyWebkitColumnAxis: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 556 | case CSSPropertyWebkitColumnBreakAfter: |
| 557 | case CSSPropertyWebkitColumnBreakBefore: |
| 558 | case CSSPropertyWebkitColumnBreakInside: |
| 559 | case CSSPropertyWebkitColumnCount: |
| 560 | case CSSPropertyWebkitColumnGap: |
mitz@apple.com | 85befe2 | 2012-06-18 18:05:40 +0000 | [diff] [blame] | 561 | case CSSPropertyWebkitColumnProgression: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 562 | case CSSPropertyWebkitColumnRule: |
| 563 | case CSSPropertyWebkitColumnRuleColor: |
| 564 | case CSSPropertyWebkitColumnRuleStyle: |
| 565 | case CSSPropertyWebkitColumnRuleWidth: |
| 566 | case CSSPropertyWebkitColumnSpan: |
| 567 | case CSSPropertyWebkitColumnWidth: |
| 568 | case CSSPropertyWebkitColumns: |
| 569 | #if ENABLE(CSS_FILTERS) |
| 570 | case CSSPropertyWebkitFilter: |
| 571 | #endif |
krit@webkit.org | 70a7a22 | 2012-08-21 00:35:27 +0000 | [diff] [blame] | 572 | #if ENABLE(CSS_COMPOSITING) |
| 573 | case CSSPropertyWebkitBlendMode: |
commit-queue@webkit.org | 62ba45f | 2013-02-07 21:13:31 +0000 | [diff] [blame] | 574 | case CSSPropertyWebkitBackgroundBlendMode: |
krit@webkit.org | 70a7a22 | 2012-08-21 00:35:27 +0000 | [diff] [blame] | 575 | #endif |
tony@chromium.org | 730973c | 2012-06-01 23:18:21 +0000 | [diff] [blame] | 576 | case CSSPropertyWebkitAlignContent: |
tony@chromium.org | 0e2fbd5 | 2012-05-31 19:08:19 +0000 | [diff] [blame] | 577 | case CSSPropertyWebkitAlignItems: |
| 578 | case CSSPropertyWebkitAlignSelf: |
tony@chromium.org | fd2f8cc | 2012-04-03 00:24:28 +0000 | [diff] [blame] | 579 | case CSSPropertyWebkitFlex: |
tony@chromium.org | 092bb3c7 | 2012-06-28 18:06:09 +0000 | [diff] [blame] | 580 | case CSSPropertyWebkitFlexBasis: |
ojan@chromium.org | 8abeecb | 2011-12-14 23:39:24 +0000 | [diff] [blame] | 581 | case CSSPropertyWebkitFlexDirection: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 582 | case CSSPropertyWebkitFlexFlow: |
tony@chromium.org | 092bb3c7 | 2012-06-28 18:06:09 +0000 | [diff] [blame] | 583 | case CSSPropertyWebkitFlexGrow: |
| 584 | case CSSPropertyWebkitFlexShrink: |
ojan@chromium.org | 8abeecb | 2011-12-14 23:39:24 +0000 | [diff] [blame] | 585 | case CSSPropertyWebkitFlexWrap: |
tony@chromium.org | 730973c | 2012-06-01 23:18:21 +0000 | [diff] [blame] | 586 | case CSSPropertyWebkitJustifyContent: |
tony@chromium.org | c25b521 | 2012-06-05 04:38:19 +0000 | [diff] [blame] | 587 | case CSSPropertyWebkitOrder: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 588 | case CSSPropertyWebkitFontSizeDelta: |
jchaffraix@webkit.org | 176479c | 2013-03-19 23:12:28 +0000 | [diff] [blame] | 589 | case CSSPropertyWebkitGridAutoColumns: |
jchaffraix@webkit.org | 80733a1 | 2013-02-04 19:14:19 +0000 | [diff] [blame] | 590 | case CSSPropertyWebkitGridAutoFlow: |
jchaffraix@webkit.org | 176479c | 2013-03-19 23:12:28 +0000 | [diff] [blame] | 591 | case CSSPropertyWebkitGridAutoRows: |
jchaffraix@webkit.org | 8254fa1 | 2011-11-28 22:59:22 +0000 | [diff] [blame] | 592 | case CSSPropertyWebkitGridColumns: |
| 593 | case CSSPropertyWebkitGridRows: |
jchaffraix@webkit.org | 651b278 | 2013-03-04 23:07:45 +0000 | [diff] [blame] | 594 | case CSSPropertyWebkitGridStart: |
jchaffraix@webkit.org | f9b4441 | 2013-03-05 16:27:54 +0000 | [diff] [blame] | 595 | case CSSPropertyWebkitGridEnd: |
jchaffraix@webkit.org | 651b278 | 2013-03-04 23:07:45 +0000 | [diff] [blame] | 596 | case CSSPropertyWebkitGridBefore: |
jchaffraix@webkit.org | f9b4441 | 2013-03-05 16:27:54 +0000 | [diff] [blame] | 597 | case CSSPropertyWebkitGridAfter: |
jchaffraix@webkit.org | f186d77 | 2012-02-24 23:24:46 +0000 | [diff] [blame] | 598 | case CSSPropertyWebkitGridColumn: |
| 599 | case CSSPropertyWebkitGridRow: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 600 | case CSSPropertyWebkitLineClamp: |
| 601 | case CSSPropertyWebkitLogicalWidth: |
| 602 | case CSSPropertyWebkitLogicalHeight: |
| 603 | case CSSPropertyWebkitMarginAfterCollapse: |
| 604 | case CSSPropertyWebkitMarginBeforeCollapse: |
| 605 | case CSSPropertyWebkitMarginBottomCollapse: |
| 606 | case CSSPropertyWebkitMarginTopCollapse: |
| 607 | case CSSPropertyWebkitMarginCollapse: |
| 608 | case CSSPropertyWebkitMarginAfter: |
| 609 | case CSSPropertyWebkitMarginBefore: |
| 610 | case CSSPropertyWebkitMarginEnd: |
| 611 | case CSSPropertyWebkitMarginStart: |
| 612 | case CSSPropertyWebkitMarquee: |
| 613 | case CSSPropertyWebkitMarqueeDirection: |
| 614 | case CSSPropertyWebkitMarqueeIncrement: |
| 615 | case CSSPropertyWebkitMarqueeRepetition: |
| 616 | case CSSPropertyWebkitMarqueeSpeed: |
| 617 | case CSSPropertyWebkitMarqueeStyle: |
| 618 | case CSSPropertyWebkitMask: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 619 | case CSSPropertyWebkitMaskBoxImage: |
| 620 | case CSSPropertyWebkitMaskBoxImageOutset: |
| 621 | case CSSPropertyWebkitMaskBoxImageRepeat: |
| 622 | case CSSPropertyWebkitMaskBoxImageSlice: |
| 623 | case CSSPropertyWebkitMaskBoxImageSource: |
| 624 | case CSSPropertyWebkitMaskBoxImageWidth: |
| 625 | case CSSPropertyWebkitMaskClip: |
| 626 | case CSSPropertyWebkitMaskComposite: |
| 627 | case CSSPropertyWebkitMaskImage: |
| 628 | case CSSPropertyWebkitMaskOrigin: |
| 629 | case CSSPropertyWebkitMaskPosition: |
| 630 | case CSSPropertyWebkitMaskPositionX: |
| 631 | case CSSPropertyWebkitMaskPositionY: |
| 632 | case CSSPropertyWebkitMaskRepeat: |
| 633 | case CSSPropertyWebkitMaskRepeatX: |
| 634 | case CSSPropertyWebkitMaskRepeatY: |
| 635 | case CSSPropertyWebkitMaskSize: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 636 | case CSSPropertyWebkitMaxLogicalWidth: |
| 637 | case CSSPropertyWebkitMaxLogicalHeight: |
| 638 | case CSSPropertyWebkitMinLogicalWidth: |
| 639 | case CSSPropertyWebkitMinLogicalHeight: |
| 640 | case CSSPropertyWebkitPaddingAfter: |
| 641 | case CSSPropertyWebkitPaddingBefore: |
| 642 | case CSSPropertyWebkitPaddingEnd: |
| 643 | case CSSPropertyWebkitPaddingStart: |
| 644 | case CSSPropertyWebkitPerspective: |
| 645 | case CSSPropertyWebkitPerspectiveOrigin: |
| 646 | case CSSPropertyWebkitPerspectiveOriginX: |
| 647 | case CSSPropertyWebkitPerspectiveOriginY: |
commit-queue@webkit.org | 85886a9 | 2012-10-19 18:53:11 +0000 | [diff] [blame] | 648 | #if ENABLE(CSS3_TEXT) |
commit-queue@webkit.org | c76b5e1 | 2012-08-20 19:36:03 +0000 | [diff] [blame] | 649 | case CSSPropertyWebkitTextDecorationStyle: |
bruno.abinader@basyskom.com | 3f3a0f2 | 2013-03-14 04:06:20 +0000 | [diff] [blame] | 650 | case CSSPropertyWebkitTextDecorationColor: |
commit-queue@webkit.org | 85886a9 | 2012-10-19 18:53:11 +0000 | [diff] [blame] | 651 | #endif // CSS3_TEXT |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 652 | case CSSPropertyWebkitTransform: |
| 653 | case CSSPropertyWebkitTransformOrigin: |
| 654 | case CSSPropertyWebkitTransformOriginX: |
| 655 | case CSSPropertyWebkitTransformOriginY: |
| 656 | case CSSPropertyWebkitTransformOriginZ: |
| 657 | case CSSPropertyWebkitTransformStyle: |
| 658 | case CSSPropertyWebkitTransition: |
| 659 | case CSSPropertyWebkitTransitionDelay: |
| 660 | case CSSPropertyWebkitTransitionDuration: |
| 661 | case CSSPropertyWebkitTransitionProperty: |
| 662 | case CSSPropertyWebkitTransitionTimingFunction: |
| 663 | case CSSPropertyWebkitUserDrag: |
timothy_horton@apple.com | 3f03ac1 | 2012-05-25 06:53:27 +0000 | [diff] [blame] | 664 | #if ENABLE(CSS_REGIONS) |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 665 | case CSSPropertyWebkitFlowInto: |
| 666 | case CSSPropertyWebkitFlowFrom: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 667 | case CSSPropertyWebkitRegionBreakAfter: |
| 668 | case CSSPropertyWebkitRegionBreakBefore: |
| 669 | case CSSPropertyWebkitRegionBreakInside: |
commit-queue@webkit.org | afd6719 | 2013-06-10 14:19:13 +0000 | [diff] [blame] | 670 | case CSSPropertyWebkitRegionFragment: |
timothy_horton@apple.com | 3f03ac1 | 2012-05-25 06:53:27 +0000 | [diff] [blame] | 671 | #endif |
| 672 | #if ENABLE(CSS_EXCLUSIONS) |
mihnea@adobe.com | f4ea5986 | 2011-11-17 08:08:31 +0000 | [diff] [blame] | 673 | case CSSPropertyWebkitWrapFlow: |
betravis@adobe.com | ed90c98 | 2013-06-05 23:05:57 +0000 | [diff] [blame] | 674 | case CSSPropertyWebkitWrapThrough: |
| 675 | #endif |
| 676 | #if ENABLE(CSS_SHAPES) |
commit-queue@webkit.org | f230ac1 | 2012-11-13 17:53:31 +0000 | [diff] [blame] | 677 | case CSSPropertyWebkitShapeMargin: |
| 678 | case CSSPropertyWebkitShapePadding: |
commit-queue@webkit.org | 64dbdd4 | 2012-03-30 01:17:38 +0000 | [diff] [blame] | 679 | case CSSPropertyWebkitShapeInside: |
| 680 | case CSSPropertyWebkitShapeOutside: |
timothy_horton@apple.com | 3f03ac1 | 2012-05-25 06:53:27 +0000 | [diff] [blame] | 681 | #endif |
krit@webkit.org | a8f51b5 | 2013-04-11 15:55:25 +0000 | [diff] [blame] | 682 | #if ENABLE(CSS_SHADERS) |
| 683 | case CSSPropertyMix: |
krit@webkit.org | 7afcd74 | 2013-04-11 20:05:17 +0000 | [diff] [blame] | 684 | case CSSPropertyParameters: |
krit@webkit.org | a8f51b5 | 2013-04-11 15:55:25 +0000 | [diff] [blame] | 685 | #endif |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 686 | #if ENABLE(SVG) |
| 687 | case CSSPropertyClipPath: |
| 688 | case CSSPropertyMask: |
krit@webkit.org | f0db4b4 | 2012-09-19 17:50:26 +0000 | [diff] [blame] | 689 | case CSSPropertyMaskType: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 690 | case CSSPropertyEnableBackground: |
| 691 | case CSSPropertyFilter: |
| 692 | case CSSPropertyFloodColor: |
| 693 | case CSSPropertyFloodOpacity: |
| 694 | case CSSPropertyLightingColor: |
| 695 | case CSSPropertyStopColor: |
| 696 | case CSSPropertyStopOpacity: |
| 697 | case CSSPropertyColorProfile: |
| 698 | case CSSPropertyAlignmentBaseline: |
| 699 | case CSSPropertyBaselineShift: |
| 700 | case CSSPropertyDominantBaseline: |
| 701 | case CSSPropertyVectorEffect: |
pdr@google.com | 5de2dfb | 2013-04-01 18:55:24 +0000 | [diff] [blame] | 702 | case CSSPropertyBufferedRendering: |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 703 | case CSSPropertyWebkitSvgShadow: |
| 704 | #endif |
| 705 | #if ENABLE(DASHBOARD_SUPPORT) |
| 706 | case CSSPropertyWebkitDashboardRegion: |
| 707 | #endif |
jianli@chromium.org | 9acde01 | 2012-10-17 00:14:47 +0000 | [diff] [blame] | 708 | #if ENABLE(DRAGGABLE_REGION) |
jianli@chromium.org | bd81dfe | 2012-10-10 00:06:59 +0000 | [diff] [blame] | 709 | case CSSPropertyWebkitAppRegion: |
jianli@chromium.org | f66b581 | 2012-08-02 00:14:28 +0000 | [diff] [blame] | 710 | #endif |
commit-queue@webkit.org | 42da616 | 2012-11-05 12:47:46 +0000 | [diff] [blame] | 711 | #if ENABLE(CSS_DEVICE_ADAPTATION) |
| 712 | case CSSPropertyMaxZoom: |
| 713 | case CSSPropertyMinZoom: |
| 714 | case CSSPropertyOrientation: |
| 715 | case CSSPropertyUserZoom: |
| 716 | #endif |
antti@apple.com | 0de00d2 | 2011-10-27 09:39:48 +0000 | [diff] [blame] | 717 | return false; |
| 718 | case CSSPropertyInvalid: |
| 719 | ASSERT_NOT_REACHED(); |
| 720 | return false; |
| 721 | } |
| 722 | ASSERT_NOT_REACHED(); |
| 723 | return false; |
| 724 | } |
| 725 | |
weinig | b35e93c | 2007-01-15 01:08:44 +0000 | [diff] [blame] | 726 | } // namespace WebCore |