OLD | NEW |
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/paint/PaintPropertyTreePrinter.h" | 5 #include "core/paint/PaintPropertyTreePrinter.h" |
6 | 6 |
7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
9 #include "core/layout/LayoutPart.h" | 9 #include "core/layout/LayoutPart.h" |
10 #include "core/layout/LayoutView.h" | 10 #include "core/layout/LayoutView.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 stringBuilder.append(" scrollOffsetTranslation="); | 285 stringBuilder.append(" scrollOffsetTranslation="); |
286 stringBuilder.append(scrollOffset.toString()); | 286 stringBuilder.append(scrollOffset.toString()); |
287 stringBuilder.append(" clip="); | 287 stringBuilder.append(" clip="); |
288 stringBuilder.append(node->clip().toString()); | 288 stringBuilder.append(node->clip().toString()); |
289 stringBuilder.append(" bounds="); | 289 stringBuilder.append(" bounds="); |
290 stringBuilder.append(node->bounds().toString()); | 290 stringBuilder.append(node->bounds().toString()); |
291 stringBuilder.append(" userScrollableHorizontal="); | 291 stringBuilder.append(" userScrollableHorizontal="); |
292 stringBuilder.append(node->userScrollableHorizontal() ? "yes" : "no"); | 292 stringBuilder.append(node->userScrollableHorizontal() ? "yes" : "no"); |
293 stringBuilder.append(" userScrollableVertical="); | 293 stringBuilder.append(" userScrollableVertical="); |
294 stringBuilder.append(node->userScrollableVertical() ? "yes" : "no"); | 294 stringBuilder.append(node->userScrollableVertical() ? "yes" : "no"); |
| 295 stringBuilder.append(" threadedScrollingDisabled="); |
| 296 stringBuilder.append(node->threadedScrollingDisabled() ? "yes" : "no"); |
| 297 stringBuilder.append(" hasBackgroundAttachmentFixedDescendants="); |
295 stringBuilder.append( | 298 stringBuilder.append( |
296 " hasBackgroundAttachmentFixedMainThreadScrollingReason="); | 299 node->hasBackgroundAttachmentFixedDescendants() ? "yes" : "no"); |
297 stringBuilder.append( | |
298 node->hasMainThreadScrollingReasons( | |
299 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects) | |
300 ? "yes" | |
301 : "no"); | |
302 } | 300 } |
303 }; | 301 }; |
304 | 302 |
305 class PaintPropertyTreeGraphBuilder { | 303 class PaintPropertyTreeGraphBuilder { |
306 public: | 304 public: |
307 PaintPropertyTreeGraphBuilder() {} | 305 PaintPropertyTreeGraphBuilder() {} |
308 | 306 |
309 void generateTreeGraph(const FrameView& frameView, | 307 void generateTreeGraph(const FrameView& frameView, |
310 StringBuilder& stringBuilder) { | 308 StringBuilder& stringBuilder) { |
311 m_layout.str(""); | 309 m_layout.str(""); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 if (preTranslation) | 525 if (preTranslation) |
528 writePaintPropertyNode(*preTranslation, &frameView, "preTranslation"); | 526 writePaintPropertyNode(*preTranslation, &frameView, "preTranslation"); |
529 TransformPaintPropertyNode* scrollTranslation = | 527 TransformPaintPropertyNode* scrollTranslation = |
530 frameView.scrollTranslation(); | 528 frameView.scrollTranslation(); |
531 if (scrollTranslation) | 529 if (scrollTranslation) |
532 writePaintPropertyNode(*scrollTranslation, &frameView, | 530 writePaintPropertyNode(*scrollTranslation, &frameView, |
533 "scrollTranslation"); | 531 "scrollTranslation"); |
534 ClipPaintPropertyNode* contentClip = frameView.contentClip(); | 532 ClipPaintPropertyNode* contentClip = frameView.contentClip(); |
535 if (contentClip) | 533 if (contentClip) |
536 writePaintPropertyNode(*contentClip, &frameView, "contentClip"); | 534 writePaintPropertyNode(*contentClip, &frameView, "contentClip"); |
537 ScrollPaintPropertyNode* scroll = frameView.scroll(); | 535 const ScrollPaintPropertyNode* scroll = frameView.scroll(); |
538 if (scroll) | 536 if (scroll) |
539 writePaintPropertyNode(*scroll, &frameView, "scroll"); | 537 writePaintPropertyNode(*scroll, &frameView, "scroll"); |
540 } | 538 } |
541 | 539 |
542 void writeLayoutObjectNode(const LayoutObject& object) { | 540 void writeLayoutObjectNode(const LayoutObject& object) { |
543 std::ostream& os = m_layout; | 541 std::ostream& os = m_layout; |
544 os << "n" << &object << " [color=" << s_layoutNodeColor | 542 os << "n" << &object << " [color=" << s_layoutNodeColor |
545 << ", fontcolor=" << s_layoutNodeColor << ", label=\"" << object.name(); | 543 << ", fontcolor=" << s_layoutNodeColor << ", label=\"" << object.name(); |
546 Node* node = object.node(); | 544 Node* node = object.node(); |
547 if (node) { | 545 if (node) { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 } | 693 } |
696 | 694 |
697 String paintPropertyTreeGraph(const blink::FrameView& frameView) { | 695 String paintPropertyTreeGraph(const blink::FrameView& frameView) { |
698 blink::PaintPropertyTreeGraphBuilder builder; | 696 blink::PaintPropertyTreeGraphBuilder builder; |
699 StringBuilder stringBuilder; | 697 StringBuilder stringBuilder; |
700 builder.generateTreeGraph(frameView, stringBuilder); | 698 builder.generateTreeGraph(frameView, stringBuilder); |
701 return stringBuilder.toString(); | 699 return stringBuilder.toString(); |
702 } | 700 } |
703 | 701 |
704 #endif | 702 #endif |
OLD | NEW |