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

Side by Side Diff: third_party/WebKit/Source/platform/testing/PaintPrinters.cpp

Issue 2299533002: WIP: Construct SPV2's scroll paint property tree (Closed)
Patch Set: Add more paint property builder tests, update comments/documentation" Created 4 years, 3 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 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 #include "platform/testing/PaintPrinters.h" 5 #include "platform/testing/PaintPrinters.h"
6 6
7 #include "platform/graphics/paint/PaintChunk.h" 7 #include "platform/graphics/paint/PaintChunk.h"
8 #include "platform/graphics/paint/PaintChunkProperties.h" 8 #include "platform/graphics/paint/PaintChunkProperties.h"
9 #include <iomanip> // NOLINT 9 #include <iomanip> // NOLINT
10 #include <ostream> // NOLINT 10 #include <ostream> // NOLINT
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 if (properties.effect) { 95 if (properties.effect) {
96 if (printedProperty) 96 if (printedProperty)
97 *os << ", "; 97 *os << ", ";
98 *os << "effect="; 98 *os << "effect=";
99 PrintTo(*properties.effect, os); 99 PrintTo(*properties.effect, os);
100 printedProperty = true; 100 printedProperty = true;
101 } 101 }
102 102
103 if (properties.scroll) {
104 if (printedProperty)
105 *os << ", ";
106 *os << "scroll=";
107 PrintTo(*properties.scroll, os);
108 printedProperty = true;
109 }
110
103 if (printedProperty) 111 if (printedProperty)
104 *os << ", "; 112 *os << ", ";
105 *os << "backfaceHidden=" << properties.backfaceHidden; 113 *os << "backfaceHidden=" << properties.backfaceHidden;
106 114
107 *os << ")"; 115 *os << ")";
108 } 116 }
109 117
110 void PrintTo(const TransformPaintPropertyNode& transformPaintProperty, std::ostr eam* os) 118 void PrintTo(const TransformPaintPropertyNode& transformPaintProperty, std::ostr eam* os)
111 { 119 {
112 *os << "TransformPaintPropertyNode(matrix="; 120 *os << "TransformPaintPropertyNode(matrix=";
113 PrintTo(transformPaintProperty.matrix(), os); 121 PrintTo(transformPaintProperty.matrix(), os);
114 *os << ", origin="; 122 *os << ", origin=";
115 PrintTo(transformPaintProperty.origin(), os); 123 PrintTo(transformPaintProperty.origin(), os);
116 *os << ")"; 124 *os << ")";
117 } 125 }
118 126
119 void PrintTo(const EffectPaintPropertyNode& effect, std::ostream* os) 127 void PrintTo(const EffectPaintPropertyNode& effect, std::ostream* os)
120 { 128 {
121 *os << "EffectPaintPropertyNode(opacity=" << effect.opacity() << ")"; 129 *os << "EffectPaintPropertyNode(opacity=" << effect.opacity() << ")";
122 } 130 }
123 131
132 void PrintTo(const ScrollPaintPropertyNode& node, std::ostream* os)
133 {
134 *os << "ScrollPaintPropertyNode(clip=";
135 PrintTo(node.clip(), os);
136 *os << ", bounds=";
137 PrintTo(node.bounds(), os);
138 *os << ", userScrollableHorizontal=" << node.userScrollableHorizontal();
139 *os << ", userScrollableVertical=" << node.userScrollableVertical();
140 *os << ", scrollOffsetTranslation=";
141 PrintPointer(node.scrollOffsetTranslation(), *os);
142 *os << ", parent=";
143 PrintPointer(node.parent(), *os);
144 *os << ")";
145 }
146
124 } // namespace blink 147 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698