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

Side by Side Diff: Source/core/html/track/vtt/VTTCue.cpp

Issue 811863003: replace COMPILE_ASSERT with static_assert in core/html/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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/html/track/vtt/BufferedLineReaderTest.cpp ('k') | no next file » | 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) 2013, Opera Software ASA. All rights reserved. 2 * Copyright (c) 2013, Opera Software ASA. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "wtf/text/StringBuilder.h" 53 #include "wtf/text/StringBuilder.h"
54 54
55 namespace blink { 55 namespace blink {
56 56
57 static const int undefinedPosition = -1; 57 static const int undefinedPosition = -1;
58 static const int undefinedSize = -1; 58 static const int undefinedSize = -1;
59 59
60 static const CSSValueID displayWritingModeMap[] = { 60 static const CSSValueID displayWritingModeMap[] = {
61 CSSValueHorizontalTb, CSSValueVerticalRl, CSSValueVerticalLr 61 CSSValueHorizontalTb, CSSValueVerticalRl, CSSValueVerticalLr
62 }; 62 };
63 COMPILE_ASSERT(WTF_ARRAY_LENGTH(displayWritingModeMap) == VTTCue::NumberOfWritin gDirections, 63 static_assert(WTF_ARRAY_LENGTH(displayWritingModeMap) == VTTCue::NumberOfWriting Directions,
64 displayWritingModeMap_has_wrong_size); 64 "displayWritingModeMap should have the same number of elements as VTTCue::Nu mberOfWritingDirections");
65 65
66 static const CSSValueID displayAlignmentMap[] = { 66 static const CSSValueID displayAlignmentMap[] = {
67 CSSValueStart, CSSValueCenter, CSSValueEnd, CSSValueLeft, CSSValueRight 67 CSSValueStart, CSSValueCenter, CSSValueEnd, CSSValueLeft, CSSValueRight
68 }; 68 };
69 COMPILE_ASSERT(WTF_ARRAY_LENGTH(displayAlignmentMap) == VTTCue::NumberOfAlignmen ts, 69 static_assert(WTF_ARRAY_LENGTH(displayAlignmentMap) == VTTCue::NumberOfAlignment s,
70 displayAlignmentMap_has_wrong_size); 70 "displayAlignmentMap should have the same number of elements as VTTCue::Numb erOfAlignments");
71 71
72 static const String& startKeyword() 72 static const String& startKeyword()
73 { 73 {
74 DEFINE_STATIC_LOCAL(const String, start, ("start")); 74 DEFINE_STATIC_LOCAL(const String, start, ("start"));
75 return start; 75 return start;
76 } 76 }
77 77
78 static const String& middleKeyword() 78 static const String& middleKeyword()
79 { 79 {
80 DEFINE_STATIC_LOCAL(const String, middle, ("middle")); 80 DEFINE_STATIC_LOCAL(const String, middle, ("middle"));
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 1105
1106 void VTTCue::trace(Visitor* visitor) 1106 void VTTCue::trace(Visitor* visitor)
1107 { 1107 {
1108 visitor->trace(m_vttNodeTree); 1108 visitor->trace(m_vttNodeTree);
1109 visitor->trace(m_cueBackgroundBox); 1109 visitor->trace(m_cueBackgroundBox);
1110 visitor->trace(m_displayTree); 1110 visitor->trace(m_displayTree);
1111 TextTrackCue::trace(visitor); 1111 TextTrackCue::trace(visitor);
1112 } 1112 }
1113 1113
1114 } // namespace blink 1114 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/track/vtt/BufferedLineReaderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698