| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 } | 796 } |
| 797 | 797 |
| 798 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words) { | 798 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words) { |
| 799 spellChecker().removeSpellingMarkersUnderWords(words); | 799 spellChecker().removeSpellingMarkersUnderWords(words); |
| 800 } | 800 } |
| 801 | 801 |
| 802 String LocalFrame::layerTreeAsText(unsigned flags) const { | 802 String LocalFrame::layerTreeAsText(unsigned flags) const { |
| 803 if (contentLayoutItem().isNull()) | 803 if (contentLayoutItem().isNull()) |
| 804 return String(); | 804 return String(); |
| 805 | 805 |
| 806 std::unique_ptr<JSONObject> layerTree = | 806 std::unique_ptr<JSONObject> layers; |
| 807 contentLayoutItem().compositor()->layerTreeAsJSON( | 807 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 808 static_cast<LayerTreeFlags>(flags)); | 808 layers = view()->compositedLayersAsJSON(static_cast<LayerTreeFlags>(flags)); |
| 809 } else { |
| 810 layers = contentLayoutItem().compositor()->layerTreeAsJSON( |
| 811 static_cast<LayerTreeFlags>(flags)); |
| 812 } |
| 809 | 813 |
| 810 if (flags & LayerTreeIncludesPaintInvalidations) { | 814 if (flags & LayerTreeIncludesPaintInvalidations) { |
| 811 std::unique_ptr<JSONArray> objectPaintInvalidations = | 815 std::unique_ptr<JSONArray> objectPaintInvalidations = |
| 812 m_view->trackedObjectPaintInvalidationsAsJSON(); | 816 m_view->trackedObjectPaintInvalidationsAsJSON(); |
| 813 if (objectPaintInvalidations && objectPaintInvalidations->size()) { | 817 if (objectPaintInvalidations && objectPaintInvalidations->size()) { |
| 814 if (!layerTree) | 818 if (!layers) |
| 815 layerTree = JSONObject::create(); | 819 layers = JSONObject::create(); |
| 816 layerTree->setArray("objectPaintInvalidations", | 820 layers->setArray("objectPaintInvalidations", |
| 817 std::move(objectPaintInvalidations)); | 821 std::move(objectPaintInvalidations)); |
| 818 } | 822 } |
| 819 } | 823 } |
| 820 | 824 |
| 821 return layerTree ? layerTree->toPrettyJSONString() : String(); | 825 return layers ? layers->toPrettyJSONString() : String(); |
| 822 } | 826 } |
| 823 | 827 |
| 824 bool LocalFrame::shouldThrottleRendering() const { | 828 bool LocalFrame::shouldThrottleRendering() const { |
| 825 return view() && view()->shouldThrottleRendering(); | 829 return view() && view()->shouldThrottleRendering(); |
| 826 } | 830 } |
| 827 | 831 |
| 828 inline LocalFrame::LocalFrame(FrameLoaderClient* client, | 832 inline LocalFrame::LocalFrame(FrameLoaderClient* client, |
| 829 FrameHost* host, | 833 FrameHost* host, |
| 830 FrameOwner* owner, | 834 FrameOwner* owner, |
| 831 InterfaceProvider* interfaceProvider) | 835 InterfaceProvider* interfaceProvider) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 892 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 889 m_frame->client()->frameBlameContext()->Enter(); | 893 m_frame->client()->frameBlameContext()->Enter(); |
| 890 } | 894 } |
| 891 | 895 |
| 892 ScopedFrameBlamer::~ScopedFrameBlamer() { | 896 ScopedFrameBlamer::~ScopedFrameBlamer() { |
| 893 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 897 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 894 m_frame->client()->frameBlameContext()->Leave(); | 898 m_frame->client()->frameBlameContext()->Leave(); |
| 895 } | 899 } |
| 896 | 900 |
| 897 } // namespace blink | 901 } // namespace blink |
| OLD | NEW |