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

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

Issue 1115553002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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
« no previous file with comments | « Source/core/clipboard/Pasteboard.cpp ('k') | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/WebBlendMode.h"
53 #include "public/platform/WebScrollBlocksOn.h" 54 #include "public/platform/WebScrollBlocksOn.h"
54 #include "wtf/MathExtras.h" 55 #include "wtf/MathExtras.h"
55 56
56 namespace blink { 57 namespace blink {
57 58
58 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i) 59 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i)
59 : CSSValue(PrimitiveClass) 60 : CSSValue(PrimitiveClass)
60 { 61 {
61 m_primitiveUnitType = CSS_NUMBER; 62 m_primitiveUnitType = CSS_NUMBER;
62 m_value.num = static_cast<double>(i); 63 m_value.num = static_cast<double>(i);
(...skipping 3478 matching lines...) Expand 10 before | Expand all | Expand 10 after
3541 case CSSValueNoPunctuation: 3542 case CSSValueNoPunctuation:
3542 return SpeakNoPunctuation; 3543 return SpeakNoPunctuation;
3543 default: 3544 default:
3544 break; 3545 break;
3545 } 3546 }
3546 3547
3547 ASSERT_NOT_REACHED(); 3548 ASSERT_NOT_REACHED();
3548 return SpeakNormal; 3549 return SpeakNormal;
3549 } 3550 }
3550 3551
3551 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(blink::WebBlendMode blend Mode) 3552 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WebBlendMode blendMode)
3552 : CSSValue(PrimitiveClass) 3553 : CSSValue(PrimitiveClass)
3553 { 3554 {
3554 m_primitiveUnitType = CSS_VALUE_ID; 3555 m_primitiveUnitType = CSS_VALUE_ID;
3555 switch (blendMode) { 3556 switch (blendMode) {
3556 case blink::WebBlendModeNormal: 3557 case WebBlendModeNormal:
3557 m_value.valueID = CSSValueNormal; 3558 m_value.valueID = CSSValueNormal;
3558 break; 3559 break;
3559 case blink::WebBlendModeMultiply: 3560 case WebBlendModeMultiply:
3560 m_value.valueID = CSSValueMultiply; 3561 m_value.valueID = CSSValueMultiply;
3561 break; 3562 break;
3562 case blink::WebBlendModeScreen: 3563 case WebBlendModeScreen:
3563 m_value.valueID = CSSValueScreen; 3564 m_value.valueID = CSSValueScreen;
3564 break; 3565 break;
3565 case blink::WebBlendModeOverlay: 3566 case WebBlendModeOverlay:
3566 m_value.valueID = CSSValueOverlay; 3567 m_value.valueID = CSSValueOverlay;
3567 break; 3568 break;
3568 case blink::WebBlendModeDarken: 3569 case WebBlendModeDarken:
3569 m_value.valueID = CSSValueDarken; 3570 m_value.valueID = CSSValueDarken;
3570 break; 3571 break;
3571 case blink::WebBlendModeLighten: 3572 case WebBlendModeLighten:
3572 m_value.valueID = CSSValueLighten; 3573 m_value.valueID = CSSValueLighten;
3573 break; 3574 break;
3574 case blink::WebBlendModeColorDodge: 3575 case WebBlendModeColorDodge:
3575 m_value.valueID = CSSValueColorDodge; 3576 m_value.valueID = CSSValueColorDodge;
3576 break; 3577 break;
3577 case blink::WebBlendModeColorBurn: 3578 case WebBlendModeColorBurn:
3578 m_value.valueID = CSSValueColorBurn; 3579 m_value.valueID = CSSValueColorBurn;
3579 break; 3580 break;
3580 case blink::WebBlendModeHardLight: 3581 case WebBlendModeHardLight:
3581 m_value.valueID = CSSValueHardLight; 3582 m_value.valueID = CSSValueHardLight;
3582 break; 3583 break;
3583 case blink::WebBlendModeSoftLight: 3584 case WebBlendModeSoftLight:
3584 m_value.valueID = CSSValueSoftLight; 3585 m_value.valueID = CSSValueSoftLight;
3585 break; 3586 break;
3586 case blink::WebBlendModeDifference: 3587 case WebBlendModeDifference:
3587 m_value.valueID = CSSValueDifference; 3588 m_value.valueID = CSSValueDifference;
3588 break; 3589 break;
3589 case blink::WebBlendModeExclusion: 3590 case WebBlendModeExclusion:
3590 m_value.valueID = CSSValueExclusion; 3591 m_value.valueID = CSSValueExclusion;
3591 break; 3592 break;
3592 case blink::WebBlendModeHue: 3593 case WebBlendModeHue:
3593 m_value.valueID = CSSValueHue; 3594 m_value.valueID = CSSValueHue;
3594 break; 3595 break;
3595 case blink::WebBlendModeSaturation: 3596 case WebBlendModeSaturation:
3596 m_value.valueID = CSSValueSaturation; 3597 m_value.valueID = CSSValueSaturation;
3597 break; 3598 break;
3598 case blink::WebBlendModeColor: 3599 case WebBlendModeColor:
3599 m_value.valueID = CSSValueColor; 3600 m_value.valueID = CSSValueColor;
3600 break; 3601 break;
3601 case blink::WebBlendModeLuminosity: 3602 case WebBlendModeLuminosity:
3602 m_value.valueID = CSSValueLuminosity; 3603 m_value.valueID = CSSValueLuminosity;
3603 break; 3604 break;
3604 } 3605 }
3605 } 3606 }
3606 3607
3607 template<> inline CSSPrimitiveValue::operator blink::WebBlendMode() const 3608 template<> inline CSSPrimitiveValue::operator WebBlendMode() const
3608 { 3609 {
3609 ASSERT(isValueID()); 3610 ASSERT(isValueID());
3610 switch (m_value.valueID) { 3611 switch (m_value.valueID) {
3611 case CSSValueNormal: 3612 case CSSValueNormal:
3612 return blink::WebBlendModeNormal; 3613 return WebBlendModeNormal;
3613 case CSSValueMultiply: 3614 case CSSValueMultiply:
3614 return blink::WebBlendModeMultiply; 3615 return WebBlendModeMultiply;
3615 case CSSValueScreen: 3616 case CSSValueScreen:
3616 return blink::WebBlendModeScreen; 3617 return WebBlendModeScreen;
3617 case CSSValueOverlay: 3618 case CSSValueOverlay:
3618 return blink::WebBlendModeOverlay; 3619 return WebBlendModeOverlay;
3619 case CSSValueDarken: 3620 case CSSValueDarken:
3620 return blink::WebBlendModeDarken; 3621 return WebBlendModeDarken;
3621 case CSSValueLighten: 3622 case CSSValueLighten:
3622 return blink::WebBlendModeLighten; 3623 return WebBlendModeLighten;
3623 case CSSValueColorDodge: 3624 case CSSValueColorDodge:
3624 return blink::WebBlendModeColorDodge; 3625 return WebBlendModeColorDodge;
3625 case CSSValueColorBurn: 3626 case CSSValueColorBurn:
3626 return blink::WebBlendModeColorBurn; 3627 return WebBlendModeColorBurn;
3627 case CSSValueHardLight: 3628 case CSSValueHardLight:
3628 return blink::WebBlendModeHardLight; 3629 return WebBlendModeHardLight;
3629 case CSSValueSoftLight: 3630 case CSSValueSoftLight:
3630 return blink::WebBlendModeSoftLight; 3631 return WebBlendModeSoftLight;
3631 case CSSValueDifference: 3632 case CSSValueDifference:
3632 return blink::WebBlendModeDifference; 3633 return WebBlendModeDifference;
3633 case CSSValueExclusion: 3634 case CSSValueExclusion:
3634 return blink::WebBlendModeExclusion; 3635 return WebBlendModeExclusion;
3635 case CSSValueHue: 3636 case CSSValueHue:
3636 return blink::WebBlendModeHue; 3637 return WebBlendModeHue;
3637 case CSSValueSaturation: 3638 case CSSValueSaturation:
3638 return blink::WebBlendModeSaturation; 3639 return WebBlendModeSaturation;
3639 case CSSValueColor: 3640 case CSSValueColor:
3640 return blink::WebBlendModeColor; 3641 return WebBlendModeColor;
3641 case CSSValueLuminosity: 3642 case CSSValueLuminosity:
3642 return blink::WebBlendModeLuminosity; 3643 return WebBlendModeLuminosity;
3643 default: 3644 default:
3644 break; 3645 break;
3645 } 3646 }
3646 3647
3647 ASSERT_NOT_REACHED(); 3648 ASSERT_NOT_REACHED();
3648 return blink::WebBlendModeNormal; 3649 return WebBlendModeNormal;
3649 } 3650 }
3650 3651
3651 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineCap e) 3652 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineCap e)
3652 : CSSValue(PrimitiveClass) 3653 : CSSValue(PrimitiveClass)
3653 { 3654 {
3654 m_primitiveUnitType = CSS_VALUE_ID; 3655 m_primitiveUnitType = CSS_VALUE_ID;
3655 switch (e) { 3656 switch (e) {
3656 case ButtCap: 3657 case ButtCap:
3657 m_value.valueID = CSSValueButt; 3658 m_value.valueID = CSSValueButt;
3658 break; 3659 break;
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
4703 return ScrollBehaviorAuto; 4704 return ScrollBehaviorAuto;
4704 case CSSValueSmooth: 4705 case CSSValueSmooth:
4705 return ScrollBehaviorSmooth; 4706 return ScrollBehaviorSmooth;
4706 default: 4707 default:
4707 break; 4708 break;
4708 } 4709 }
4709 ASSERT_NOT_REACHED(); 4710 ASSERT_NOT_REACHED();
4710 return ScrollBehaviorAuto; 4711 return ScrollBehaviorAuto;
4711 } 4712 }
4712 4713
4713 } 4714 } // namespace blink
4714 4715
4715 #endif 4716 #endif
OLDNEW
« no previous file with comments | « Source/core/clipboard/Pasteboard.cpp ('k') | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698