| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 String effectPropertyTreeAsString(const blink::FrameView& rootFrame) { | 566 String effectPropertyTreeAsString(const blink::FrameView& rootFrame) { |
| 567 return blink::PropertyTreePrinter<blink::EffectPaintPropertyNode>() | 567 return blink::PropertyTreePrinter<blink::EffectPaintPropertyNode>() |
| 568 .treeAsString(rootFrame); | 568 .treeAsString(rootFrame); |
| 569 } | 569 } |
| 570 | 570 |
| 571 String scrollPropertyTreeAsString(const blink::FrameView& rootFrame) { | 571 String scrollPropertyTreeAsString(const blink::FrameView& rootFrame) { |
| 572 return blink::PropertyTreePrinter<blink::ScrollPaintPropertyNode>() | 572 return blink::PropertyTreePrinter<blink::ScrollPaintPropertyNode>() |
| 573 .treeAsString(rootFrame); | 573 .treeAsString(rootFrame); |
| 574 } | 574 } |
| 575 | 575 |
| 576 String transformPaintPropertyPathAsString( |
| 577 const blink::TransformPaintPropertyNode* node) { |
| 578 return blink::PropertyTreePrinter<blink::TransformPaintPropertyNode>() |
| 579 .pathAsString(node); |
| 580 } |
| 581 |
| 582 String clipPaintPropertyPathAsString(const blink::ClipPaintPropertyNode* node) { |
| 583 return blink::PropertyTreePrinter<blink::ClipPaintPropertyNode>() |
| 584 .pathAsString(node); |
| 585 } |
| 586 |
| 587 String effectPaintPropertyPathAsString( |
| 588 const blink::EffectPaintPropertyNode* node) { |
| 589 return blink::PropertyTreePrinter<blink::EffectPaintPropertyNode>() |
| 590 .pathAsString(node); |
| 591 } |
| 592 |
| 593 String scrollPaintPropertyPathAsString( |
| 594 const blink::ScrollPaintPropertyNode* node) { |
| 595 return blink::PropertyTreePrinter<blink::ScrollPaintPropertyNode>() |
| 596 .pathAsString(node); |
| 597 } |
| 598 |
| 599 void showPaintPropertyPath(const blink::TransformPaintPropertyNode* node) { |
| 600 fprintf(stderr, "%s\n", |
| 601 transformPaintPropertyPathAsString(node).utf8().data()); |
| 602 } |
| 603 |
| 604 void showPaintPropertyPath(const blink::ClipPaintPropertyNode* node) { |
| 605 fprintf(stderr, "%s\n", clipPaintPropertyPathAsString(node).utf8().data()); |
| 606 } |
| 607 |
| 608 void showPaintPropertyPath(const blink::EffectPaintPropertyNode* node) { |
| 609 fprintf(stderr, "%s\n", effectPaintPropertyPathAsString(node).utf8().data()); |
| 610 } |
| 611 |
| 612 void showPaintPropertyPath(const blink::ScrollPaintPropertyNode* node) { |
| 613 fprintf(stderr, "%s\n", scrollPaintPropertyPathAsString(node).utf8().data()); |
| 614 } |
| 615 |
| 616 void showPropertyTreeState(const blink::PropertyTreeState& state) { |
| 617 fprintf(stderr, "%s\n", propertyTreeStateAsString(state).utf8().data()); |
| 618 } |
| 619 |
| 620 String propertyTreeStateAsString(const blink::PropertyTreeState& state) { |
| 621 return transformPaintPropertyPathAsString(state.transform()) + "\n" + |
| 622 clipPaintPropertyPathAsString(state.clip()) + "\n" + |
| 623 effectPaintPropertyPathAsString(state.effect()) + "\n" + |
| 624 scrollPaintPropertyPathAsString(state.scroll()); |
| 625 } |
| 626 |
| 576 String paintPropertyTreeGraph(const blink::FrameView& frameView) { | 627 String paintPropertyTreeGraph(const blink::FrameView& frameView) { |
| 577 blink::PaintPropertyTreeGraphBuilder builder; | 628 blink::PaintPropertyTreeGraphBuilder builder; |
| 578 StringBuilder stringBuilder; | 629 StringBuilder stringBuilder; |
| 579 builder.generateTreeGraph(frameView, stringBuilder); | 630 builder.generateTreeGraph(frameView, stringBuilder); |
| 580 return stringBuilder.toString(); | 631 return stringBuilder.toString(); |
| 581 } | 632 } |
| 582 | 633 |
| 583 #endif | 634 #endif |
| OLD | NEW |