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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/ScrollPaintPropertyNode.cpp

Issue 2664253003: Fix redundant code warning reported by VC++ /analyze (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | 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 // 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 "platform/graphics/paint/ScrollPaintPropertyNode.h" 5 #include "platform/graphics/paint/ScrollPaintPropertyNode.h"
6 6
7 #include "platform/graphics/paint/PropertyTreeState.h" 7 #include "platform/graphics/paint/PropertyTreeState.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 ScrollPaintPropertyNode* ScrollPaintPropertyNode::root() { 11 ScrollPaintPropertyNode* ScrollPaintPropertyNode::root() {
12 DEFINE_STATIC_REF(ScrollPaintPropertyNode, root, 12 DEFINE_STATIC_REF(ScrollPaintPropertyNode, root,
13 (ScrollPaintPropertyNode::create( 13 (ScrollPaintPropertyNode::create(
14 nullptr, IntSize(), IntSize(), false, false, 0))); 14 nullptr, IntSize(), IntSize(), false, false, 0)));
15 return root; 15 return root;
16 } 16 }
17 17
18 String ScrollPaintPropertyNode::toString() const { 18 String ScrollPaintPropertyNode::toString() const {
19 StringBuilder text; 19 StringBuilder text;
20 text.append("parent="); 20 text.append("parent=");
21 text.append(String::format("%p", m_parent.get())); 21 text.append(String::format("%p", m_parent.get()));
22 text.append(" clip="); 22 text.append(" clip=");
23 text.append(m_clip.toString()); 23 text.append(m_clip.toString());
24 text.append(" bounds="); 24 text.append(" bounds=");
25 text.append(m_bounds.toString()); 25 text.append(m_bounds.toString());
26 26
27 text.append(" userScrollable="); 27 text.append(" userScrollable=");
28 if (m_userScrollableHorizontal && m_userScrollableVertical) 28 if (m_userScrollableHorizontal && m_userScrollableVertical)
29 text.append("both"); 29 text.append("both");
30 else if (!m_userScrollableHorizontal && !m_userScrollableHorizontal) 30 else if (!m_userScrollableHorizontal && !m_userScrollableVertical)
31 text.append("none"); 31 text.append("none");
32 else 32 else
33 text.append(m_userScrollableHorizontal ? "horizontal" : "vertical"); 33 text.append(m_userScrollableHorizontal ? "horizontal" : "vertical");
34 34
35 text.append(" mainThreadReasons="); 35 text.append(" mainThreadReasons=");
36 if (m_mainThreadScrollingReasons) { 36 if (m_mainThreadScrollingReasons) {
37 text.append(MainThreadScrollingReason::mainThreadScrollingReasonsAsText( 37 text.append(MainThreadScrollingReason::mainThreadScrollingReasonsAsText(
38 m_mainThreadScrollingReasons) 38 m_mainThreadScrollingReasons)
39 .c_str()); 39 .c_str());
40 } else { 40 } else {
41 text.append("none"); 41 text.append("none");
42 } 42 }
43 return text.toString(); 43 return text.toString();
44 } 44 }
45 45
46 #if DCHECK_IS_ON() 46 #if DCHECK_IS_ON()
47 47
48 String ScrollPaintPropertyNode::toTreeString() const { 48 String ScrollPaintPropertyNode::toTreeString() const {
49 return blink::PropertyTreeStatePrinter<blink::ScrollPaintPropertyNode>() 49 return blink::PropertyTreeStatePrinter<blink::ScrollPaintPropertyNode>()
50 .pathAsString(this); 50 .pathAsString(this);
51 } 51 }
52 52
53 #endif 53 #endif
54 54
55 } // namespace blink 55 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698