OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. | 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. |
3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "platform/fonts/FontSmoothingMode.h" | 44 #include "platform/fonts/FontSmoothingMode.h" |
45 #include "platform/fonts/TextRenderingMode.h" | 45 #include "platform/fonts/TextRenderingMode.h" |
46 #include "platform/graphics/GraphicsTypes.h" | 46 #include "platform/graphics/GraphicsTypes.h" |
47 #include "platform/graphics/Path.h" | 47 #include "platform/graphics/Path.h" |
48 #include "platform/scroll/ScrollableArea.h" | 48 #include "platform/scroll/ScrollableArea.h" |
49 #include "platform/text/TextDirection.h" | 49 #include "platform/text/TextDirection.h" |
50 #include "platform/text/TextRun.h" | 50 #include "platform/text/TextRun.h" |
51 #include "platform/text/UnicodeBidi.h" | 51 #include "platform/text/UnicodeBidi.h" |
52 #include "platform/text/WritingMode.h" | 52 #include "platform/text/WritingMode.h" |
53 #include "public/platform/WebBlendMode.h" | 53 #include "public/platform/WebBlendMode.h" |
54 #include "public/platform/WebScrollBlocksOn.h" | |
55 #include "wtf/MathExtras.h" | 54 #include "wtf/MathExtras.h" |
56 | 55 |
57 namespace blink { | 56 namespace blink { |
58 | 57 |
59 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i) | 58 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i) |
60 : CSSValue(PrimitiveClass) | 59 : CSSValue(PrimitiveClass) |
61 { | 60 { |
62 init(UnitType::Number); | 61 init(UnitType::Number); |
63 m_value.num = static_cast<double>(i); | 62 m_value.num = static_cast<double>(i); |
64 } | 63 } |
(...skipping 4262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4327 case CSSValueIsolate: | 4326 case CSSValueIsolate: |
4328 return IsolationIsolate; | 4327 return IsolationIsolate; |
4329 default: | 4328 default: |
4330 break; | 4329 break; |
4331 } | 4330 } |
4332 | 4331 |
4333 ASSERT_NOT_REACHED(); | 4332 ASSERT_NOT_REACHED(); |
4334 return IsolationAuto; | 4333 return IsolationAuto; |
4335 } | 4334 } |
4336 | 4335 |
4337 template<> inline CSSPrimitiveValue::operator WebScrollBlocksOn() const | |
4338 { | |
4339 switch (m_value.valueID) { | |
4340 case CSSValueNone: | |
4341 return WebScrollBlocksOnNone; | |
4342 case CSSValueStartTouch: | |
4343 return WebScrollBlocksOnStartTouch; | |
4344 case CSSValueWheelEvent: | |
4345 return WebScrollBlocksOnWheelEvent; | |
4346 case CSSValueScrollEvent: | |
4347 return WebScrollBlocksOnScrollEvent; | |
4348 default: | |
4349 break; | |
4350 } | |
4351 | |
4352 ASSERT_NOT_REACHED(); | |
4353 return WebScrollBlocksOnNone; | |
4354 } | |
4355 | |
4356 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CSSBoxType cssBox) | 4336 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CSSBoxType cssBox) |
4357 : CSSValue(PrimitiveClass) | 4337 : CSSValue(PrimitiveClass) |
4358 { | 4338 { |
4359 init(UnitType::ValueID); | 4339 init(UnitType::ValueID); |
4360 switch (cssBox) { | 4340 switch (cssBox) { |
4361 case MarginBox: | 4341 case MarginBox: |
4362 m_value.valueID = CSSValueMarginBox; | 4342 m_value.valueID = CSSValueMarginBox; |
4363 break; | 4343 break; |
4364 case BorderBox: | 4344 case BorderBox: |
4365 m_value.valueID = CSSValueBorderBox; | 4345 m_value.valueID = CSSValueBorderBox; |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4678 default: | 4658 default: |
4679 break; | 4659 break; |
4680 } | 4660 } |
4681 ASSERT_NOT_REACHED(); | 4661 ASSERT_NOT_REACHED(); |
4682 return ScrollSnapTypeNone; | 4662 return ScrollSnapTypeNone; |
4683 } | 4663 } |
4684 | 4664 |
4685 } // namespace blink | 4665 } // namespace blink |
4686 | 4666 |
4687 #endif | 4667 #endif |
OLD | NEW |