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

Side by Side Diff: third_party/WebKit/Source/web/PopupMenuImpl.cpp

Issue 1878493002: ASSERT_NOT_REACHED() -> NOTREACHED() in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "web/PopupMenuImpl.h" 5 #include "web/PopupMenuImpl.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/css/CSSFontSelector.h" 8 #include "core/css/CSSFontSelector.h"
9 #include "core/dom/ElementTraversal.h" 9 #include "core/dom/ElementTraversal.h"
10 #include "core/dom/ExecutionContextTask.h" 10 #include "core/dom/ExecutionContextTask.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return "500"; 45 return "500";
46 case FontWeight600: 46 case FontWeight600:
47 return "600"; 47 return "600";
48 case FontWeight700: 48 case FontWeight700:
49 return "700"; 49 return "700";
50 case FontWeight800: 50 case FontWeight800:
51 return "800"; 51 return "800";
52 case FontWeight900: 52 case FontWeight900:
53 return "900"; 53 return "900";
54 } 54 }
55 ASSERT_NOT_REACHED(); 55 NOTREACHED();
56 return nullptr; 56 return nullptr;
57 } 57 }
58 58
59 const char* fontVariantToString(FontVariant variant) 59 const char* fontVariantToString(FontVariant variant)
60 { 60 {
61 switch (variant) { 61 switch (variant) {
62 case FontVariantNormal: 62 case FontVariantNormal:
63 return "normal"; 63 return "normal";
64 case FontVariantSmallCaps: 64 case FontVariantSmallCaps:
65 return "small-caps"; 65 return "small-caps";
66 } 66 }
67 ASSERT_NOT_REACHED(); 67 NOTREACHED();
68 return nullptr; 68 return nullptr;
69 } 69 }
70 70
71 // TODO crbug.com/516675 Add stretch to serialization 71 // TODO crbug.com/516675 Add stretch to serialization
72 72
73 const char* fontStyleToString(FontStyle style) 73 const char* fontStyleToString(FontStyle style)
74 { 74 {
75 switch (style) { 75 switch (style) {
76 case FontStyleNormal: 76 case FontStyleNormal:
77 return "normal"; 77 return "normal";
78 case FontStyleOblique: 78 case FontStyleOblique:
79 return "oblique"; 79 return "oblique";
80 case FontStyleItalic: 80 case FontStyleItalic:
81 return "italic"; 81 return "italic";
82 } 82 }
83 ASSERT_NOT_REACHED(); 83 NOTREACHED();
84 return nullptr; 84 return nullptr;
85 } 85 }
86 86
87 const char* textTransformToString(ETextTransform transform) 87 const char* textTransformToString(ETextTransform transform)
88 { 88 {
89 switch (transform) { 89 switch (transform) {
90 case CAPITALIZE: 90 case CAPITALIZE:
91 return "capitalize"; 91 return "capitalize";
92 case UPPERCASE: 92 case UPPERCASE:
93 return "uppercase"; 93 return "uppercase";
94 case LOWERCASE: 94 case LOWERCASE:
95 return "lowercase"; 95 return "lowercase";
96 case TTNONE: 96 case TTNONE:
97 return "none"; 97 return "none";
98 } 98 }
99 ASSERT_NOT_REACHED(); 99 NOTREACHED();
100 return ""; 100 return "";
101 } 101 }
102 102
103 } // anonymous namespace 103 } // anonymous namespace
104 104
105 class PopupMenuCSSFontSelector : public CSSFontSelector, private CSSFontSelector Client { 105 class PopupMenuCSSFontSelector : public CSSFontSelector, private CSSFontSelector Client {
106 USING_GARBAGE_COLLECTED_MIXIN(PopupMenuCSSFontSelector); 106 USING_GARBAGE_COLLECTED_MIXIN(PopupMenuCSSFontSelector);
107 public: 107 public:
108 static PopupMenuCSSFontSelector* create(Document* document, CSSFontSelector* ownerFontSelector) 108 static PopupMenuCSSFontSelector* create(Document* document, CSSFontSelector* ownerFontSelector)
109 { 109 {
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 533
534 void PopupMenuImpl::disconnectClient() 534 void PopupMenuImpl::disconnectClient()
535 { 535 {
536 m_ownerElement = nullptr; 536 m_ownerElement = nullptr;
537 // Cannot be done during finalization, so instead done when the 537 // Cannot be done during finalization, so instead done when the
538 // layout object is destroyed and disconnected. 538 // layout object is destroyed and disconnected.
539 dispose(); 539 dispose();
540 } 540 }
541 541
542 } // namespace blink 542 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PageWidgetDelegate.cpp ('k') | third_party/WebKit/Source/web/WebDOMFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698