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

Side by Side Diff: Source/core/css/CSSPrimitiveValueMappings.h

Issue 784453003: Initial scroll-blocks-on compositor integration (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Eliminate scrollbars from iframe test for cross-platform output consistency Created 5 years, 11 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 * 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "platform/fonts/FontDescription.h" 43 #include "platform/fonts/FontDescription.h"
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/WebScrollBlocksOn.h"
53 #include "wtf/MathExtras.h" 54 #include "wtf/MathExtras.h"
54 55
55 namespace blink { 56 namespace blink {
56 57
57 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i) 58 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i)
58 : CSSValue(PrimitiveClass) 59 : CSSValue(PrimitiveClass)
59 { 60 {
60 m_primitiveUnitType = CSS_NUMBER; 61 m_primitiveUnitType = CSS_NUMBER;
61 m_value.num = static_cast<double>(i); 62 m_value.num = static_cast<double>(i);
62 } 63 }
(...skipping 4396 matching lines...) Expand 10 before | Expand all | Expand 10 after
4459 case CSSValueIsolate: 4460 case CSSValueIsolate:
4460 return IsolationIsolate; 4461 return IsolationIsolate;
4461 default: 4462 default:
4462 break; 4463 break;
4463 } 4464 }
4464 4465
4465 ASSERT_NOT_REACHED(); 4466 ASSERT_NOT_REACHED();
4466 return IsolationAuto; 4467 return IsolationAuto;
4467 } 4468 }
4468 4469
4469 template<> inline CSSPrimitiveValue::operator ScrollBlocksOn() const 4470 template<> inline CSSPrimitiveValue::operator WebScrollBlocksOn() const
4470 { 4471 {
4471 switch (m_value.valueID) { 4472 switch (m_value.valueID) {
4472 case CSSValueNone: 4473 case CSSValueNone:
4473 return ScrollBlocksOnNone; 4474 return WebScrollBlocksOnNone;
4474 case CSSValueStartTouch: 4475 case CSSValueStartTouch:
4475 return ScrollBlocksOnStartTouch; 4476 return WebScrollBlocksOnStartTouch;
4476 case CSSValueWheelEvent: 4477 case CSSValueWheelEvent:
4477 return ScrollBlocksOnWheelEvent; 4478 return WebScrollBlocksOnWheelEvent;
4478 case CSSValueScrollEvent: 4479 case CSSValueScrollEvent:
4479 return ScrollBlocksOnScrollEvent; 4480 return WebScrollBlocksOnScrollEvent;
4480 default: 4481 default:
4481 break; 4482 break;
4482 } 4483 }
4483 4484
4484 ASSERT_NOT_REACHED(); 4485 ASSERT_NOT_REACHED();
4485 return ScrollBlocksOnNone; 4486 return WebScrollBlocksOnNone;
4486 } 4487 }
4487 4488
4488 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CSSBoxType cssBox) 4489 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CSSBoxType cssBox)
4489 : CSSValue(PrimitiveClass) 4490 : CSSValue(PrimitiveClass)
4490 { 4491 {
4491 m_primitiveUnitType = CSS_VALUE_ID; 4492 m_primitiveUnitType = CSS_VALUE_ID;
4492 switch (cssBox) { 4493 switch (cssBox) {
4493 case MarginBox: 4494 case MarginBox:
4494 m_value.valueID = CSSValueMarginBox; 4495 m_value.valueID = CSSValueMarginBox;
4495 break; 4496 break;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
4777 default: 4778 default:
4778 break; 4779 break;
4779 } 4780 }
4780 ASSERT_NOT_REACHED(); 4781 ASSERT_NOT_REACHED();
4781 return ScrollBehaviorAuto; 4782 return ScrollBehaviorAuto;
4782 } 4783 }
4783 4784
4784 } 4785 }
4785 4786
4786 #endif 4787 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698