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

Side by Side Diff: third_party/WebKit/Source/core/style/StylePath.cpp

Issue 2751653003: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ (Closed)
Patch Set: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "core/style/StylePath.h" 5 #include "core/style/StylePath.h"
6 6
7 #include "core/css/CSSPathValue.h" 7 #include "core/css/CSSPathValue.h"
8 #include "core/svg/SVGPathByteStream.h" 8 #include "core/svg/SVGPathByteStream.h"
9 #include "core/svg/SVGPathUtilities.h" 9 #include "core/svg/SVGPathUtilities.h"
10 #include "platform/graphics/Path.h" 10 #include "platform/graphics/Path.h"
11 #include "wtf/PtrUtil.h" 11 #include "wtf/PtrUtil.h"
12 #include <memory> 12 #include <memory>
13 13
14 namespace blink { 14 namespace blink {
15 15
16 StylePath::StylePath(std::unique_ptr<SVGPathByteStream> pathByteStream) 16 StylePath::StylePath(std::unique_ptr<SVGPathByteStream> pathByteStream)
17 : m_byteStream(std::move(pathByteStream)), 17 : m_byteStream(std::move(pathByteStream)),
18 m_pathLength(std::numeric_limits<float>::quiet_NaN()) { 18 m_pathLength(std::numeric_limits<float>::quiet_NaN()) {
19 ASSERT(m_byteStream); 19 DCHECK(m_byteStream);
20 } 20 }
21 21
22 StylePath::~StylePath() {} 22 StylePath::~StylePath() {}
23 23
24 PassRefPtr<StylePath> StylePath::create( 24 PassRefPtr<StylePath> StylePath::create(
25 std::unique_ptr<SVGPathByteStream> pathByteStream) { 25 std::unique_ptr<SVGPathByteStream> pathByteStream) {
26 return adoptRef(new StylePath(std::move(pathByteStream))); 26 return adoptRef(new StylePath(std::move(pathByteStream)));
27 } 27 }
28 28
29 StylePath* StylePath::emptyPath() { 29 StylePath* StylePath::emptyPath() {
(...skipping 22 matching lines...) Expand all
52 52
53 CSSValue* StylePath::computedCSSValue() const { 53 CSSValue* StylePath::computedCSSValue() const {
54 return CSSPathValue::create(const_cast<StylePath*>(this)); 54 return CSSPathValue::create(const_cast<StylePath*>(this));
55 } 55 }
56 56
57 bool StylePath::operator==(const StylePath& other) const { 57 bool StylePath::operator==(const StylePath& other) const {
58 return *m_byteStream == *other.m_byteStream; 58 return *m_byteStream == *other.m_byteStream;
59 } 59 }
60 60
61 } // namespace blink 61 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleDifference.h ('k') | third_party/WebKit/Source/core/style/StylePendingImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698