| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/style/StyleDifference.h" | |
| 6 | |
| 7 namespace blink { | |
| 8 | |
| 9 std::ostream& operator<<(std::ostream& out, const StyleDifference& diff) { | |
| 10 out << "StyleDifference{layoutType="; | |
| 11 | |
| 12 switch (diff.m_layoutType) { | |
| 13 case StyleDifference::NoLayout: | |
| 14 out << "NoLayout"; | |
| 15 break; | |
| 16 case StyleDifference::PositionedMovement: | |
| 17 out << "PositionedMovement"; | |
| 18 break; | |
| 19 case StyleDifference::FullLayout: | |
| 20 out << "FullLayout"; | |
| 21 break; | |
| 22 default: | |
| 23 NOTREACHED(); | |
| 24 break; | |
| 25 } | |
| 26 | |
| 27 out << ", paintInvalidationType="; | |
| 28 switch (diff.m_paintInvalidationType) { | |
| 29 case StyleDifference::NoPaintInvalidation: | |
| 30 out << "NoPaintInvalidation"; | |
| 31 break; | |
| 32 case StyleDifference::PaintInvalidationObject: | |
| 33 out << "PaintInvalidationObject"; | |
| 34 break; | |
| 35 case StyleDifference::PaintInvalidationSubtree: | |
| 36 out << "PaintInvalidationSubtree"; | |
| 37 break; | |
| 38 default: | |
| 39 NOTREACHED(); | |
| 40 break; | |
| 41 } | |
| 42 | |
| 43 out << ", recomputeOverflow=" << diff.m_recomputeOverflow; | |
| 44 out << ", visualRectUpdate=" << diff.m_visualRectUpdate; | |
| 45 | |
| 46 out << ", propertySpecificDifferences="; | |
| 47 int diffCount = 0; | |
| 48 for (int i = 0; i < StyleDifference::PropertyDifferenceMax; i++) { | |
| 49 unsigned bitTest = 1 << i; | |
| 50 if (diff.m_propertySpecificDifferences & bitTest) { | |
| 51 if (diffCount++ > 0) | |
| 52 out << "|"; | |
| 53 switch (bitTest) { | |
| 54 case StyleDifference::TransformChanged: | |
| 55 out << "TransformChanged"; | |
| 56 break; | |
| 57 case StyleDifference::OpacityChanged: | |
| 58 out << "OpacityChanged"; | |
| 59 break; | |
| 60 case StyleDifference::ZIndexChanged: | |
| 61 out << "ZIndexChanged"; | |
| 62 break; | |
| 63 case StyleDifference::FilterChanged: | |
| 64 out << "FilterChanged"; | |
| 65 break; | |
| 66 case StyleDifference::BackdropFilterChanged: | |
| 67 out << "BackdropFilterChanged"; | |
| 68 break; | |
| 69 case StyleDifference::CSSClipChanged: | |
| 70 out << "CSSClipChanged"; | |
| 71 break; | |
| 72 case StyleDifference::TextDecorationOrColorChanged: | |
| 73 out << "TextDecorationOrColorChanged"; | |
| 74 break; | |
| 75 case StyleDifference::ScrollAnchorDisablingPropertyChanged: | |
| 76 out << "ScrollAnchorDisablingPropertyChanged"; | |
| 77 break; | |
| 78 default: | |
| 79 NOTREACHED(); | |
| 80 break; | |
| 81 } | |
| 82 } | |
| 83 } | |
| 84 | |
| 85 return out << "}"; | |
| 86 } | |
| 87 | |
| 88 } // namespace blink | |
| OLD | NEW |