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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LineLayoutSVGTextPath.h

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef LineLayoutSVGTextPath_h 5 #ifndef LineLayoutSVGTextPath_h
6 #define LineLayoutSVGTextPath_h 6 #define LineLayoutSVGTextPath_h
7 7
8 #include "core/layout/api/LineLayoutSVGInline.h" 8 #include "core/layout/api/LineLayoutSVGInline.h"
9 #include "core/layout/svg/LayoutSVGTextPath.h" 9 #include "core/layout/svg/LayoutSVGTextPath.h"
10 #include <memory> 10 #include <memory>
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class LineLayoutSVGTextPath : public LineLayoutSVGInline { 14 class LineLayoutSVGTextPath : public LineLayoutSVGInline {
15 public: 15 public:
16 explicit LineLayoutSVGTextPath(LayoutSVGTextPath* layoutSVGTextPath) 16 explicit LineLayoutSVGTextPath(LayoutSVGTextPath* layoutSVGTextPath)
17 : LineLayoutSVGInline(layoutSVGTextPath) {} 17 : LineLayoutSVGInline(layoutSVGTextPath) {}
18 18
19 explicit LineLayoutSVGTextPath(const LineLayoutItem& item) 19 explicit LineLayoutSVGTextPath(const LineLayoutItem& item)
20 : LineLayoutSVGInline(item) { 20 : LineLayoutSVGInline(item) {
21 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isSVGTextPath()); 21 SECURITY_DCHECK(!item || item.isSVGTextPath());
22 } 22 }
23 23
24 explicit LineLayoutSVGTextPath(std::nullptr_t) 24 explicit LineLayoutSVGTextPath(std::nullptr_t)
25 : LineLayoutSVGInline(nullptr) {} 25 : LineLayoutSVGInline(nullptr) {}
26 26
27 LineLayoutSVGTextPath() {} 27 LineLayoutSVGTextPath() {}
28 28
29 std::unique_ptr<PathPositionMapper> layoutPath() const { 29 std::unique_ptr<PathPositionMapper> layoutPath() const {
30 return toSVGTextPath()->layoutPath(); 30 return toSVGTextPath()->layoutPath();
31 } 31 }
32 32
33 float calculateStartOffset(float pathLength) const { 33 float calculateStartOffset(float pathLength) const {
34 return toSVGTextPath()->calculateStartOffset(pathLength); 34 return toSVGTextPath()->calculateStartOffset(pathLength);
35 } 35 }
36 36
37 private: 37 private:
38 LayoutSVGTextPath* toSVGTextPath() { 38 LayoutSVGTextPath* toSVGTextPath() {
39 return toLayoutSVGTextPath(layoutObject()); 39 return toLayoutSVGTextPath(layoutObject());
40 } 40 }
41 41
42 const LayoutSVGTextPath* toSVGTextPath() const { 42 const LayoutSVGTextPath* toSVGTextPath() const {
43 return toLayoutSVGTextPath(layoutObject()); 43 return toLayoutSVGTextPath(layoutObject());
44 } 44 }
45 }; 45 };
46 46
47 } // namespace blink 47 } // namespace blink
48 48
49 #endif // LineLayoutSVGTextPath_h 49 #endif // LineLayoutSVGTextPath_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698