| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 state.style()->setOutlineStyle(state.parentStyle()->outlineStyle()); | 234 state.style()->setOutlineStyle(state.parentStyle()->outlineStyle()); |
| 235 } | 235 } |
| 236 | 236 |
| 237 void StyleBuilderFunctions::applyValueCSSPropertyOutlineStyle(StyleResolverState
& state, CSSValue* value) | 237 void StyleBuilderFunctions::applyValueCSSPropertyOutlineStyle(StyleResolverState
& state, CSSValue* value) |
| 238 { | 238 { |
| 239 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 239 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 240 state.style()->setOutlineStyleIsAuto(*primitiveValue); | 240 state.style()->setOutlineStyleIsAuto(*primitiveValue); |
| 241 state.style()->setOutlineStyle(*primitiveValue); | 241 state.style()->setOutlineStyle(*primitiveValue); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void StyleBuilderFunctions::applyValueCSSPropertyResize(StyleResolverState& stat
e, CSSValue* value) | |
| 245 { | |
| 246 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | |
| 247 | |
| 248 EResize r = RESIZE_NONE; | |
| 249 if (primitiveValue->getValueID() == CSSValueAuto) { | |
| 250 if (Settings* settings = state.document().settings()) | |
| 251 r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE; | |
| 252 } else { | |
| 253 r = *primitiveValue; | |
| 254 } | |
| 255 state.style()->setResize(r); | |
| 256 } | |
| 257 | |
| 258 static Length mmLength(double mm) { return Length(mm * cssPixelsPerMillimeter, F
ixed); } | 244 static Length mmLength(double mm) { return Length(mm * cssPixelsPerMillimeter, F
ixed); } |
| 259 static Length inchLength(double inch) { return Length(inch * cssPixelsPerInch, F
ixed); } | 245 static Length inchLength(double inch) { return Length(inch * cssPixelsPerInch, F
ixed); } |
| 260 static bool getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveVal
ue* pageOrientation, Length& width, Length& height) | 246 static bool getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveVal
ue* pageOrientation, Length& width, Length& height) |
| 261 { | 247 { |
| 262 DEFINE_STATIC_LOCAL(Length, a5Width, (mmLength(148))); | 248 DEFINE_STATIC_LOCAL(Length, a5Width, (mmLength(148))); |
| 263 DEFINE_STATIC_LOCAL(Length, a5Height, (mmLength(210))); | 249 DEFINE_STATIC_LOCAL(Length, a5Height, (mmLength(210))); |
| 264 DEFINE_STATIC_LOCAL(Length, a4Width, (mmLength(210))); | 250 DEFINE_STATIC_LOCAL(Length, a4Width, (mmLength(210))); |
| 265 DEFINE_STATIC_LOCAL(Length, a4Height, (mmLength(297))); | 251 DEFINE_STATIC_LOCAL(Length, a4Height, (mmLength(297))); |
| 266 DEFINE_STATIC_LOCAL(Length, a3Width, (mmLength(297))); | 252 DEFINE_STATIC_LOCAL(Length, a3Width, (mmLength(297))); |
| 267 DEFINE_STATIC_LOCAL(Length, a3Height, (mmLength(420))); | 253 DEFINE_STATIC_LOCAL(Length, a3Height, (mmLength(420))); |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 state.style()->setPerspective(perspectiveValue); | 952 state.style()->setPerspective(perspectiveValue); |
| 967 } | 953 } |
| 968 | 954 |
| 969 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso
lverState& state, CSSValue* value) | 955 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextOrientation(StyleReso
lverState& state, CSSValue* value) |
| 970 { | 956 { |
| 971 if (value->isPrimitiveValue()) | 957 if (value->isPrimitiveValue()) |
| 972 state.setTextOrientation(*toCSSPrimitiveValue(value)); | 958 state.setTextOrientation(*toCSSPrimitiveValue(value)); |
| 973 } | 959 } |
| 974 | 960 |
| 975 } // namespace blink | 961 } // namespace blink |
| OLD | NEW |