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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2218533002: Backporting JSONValues from protocol::Values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch back to partition allocator Created 4 years, 4 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 /* 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words) 776 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words)
777 { 777 {
778 spellChecker().removeSpellingMarkersUnderWords(words); 778 spellChecker().removeSpellingMarkersUnderWords(words);
779 } 779 }
780 780
781 String LocalFrame::layerTreeAsText(unsigned flags) const 781 String LocalFrame::layerTreeAsText(unsigned flags) const
782 { 782 {
783 if (contentLayoutItem().isNull()) 783 if (contentLayoutItem().isNull())
784 return String(); 784 return String();
785 785
786 RefPtr<JSONObject> layerTree = contentLayoutItem().compositor()->layerTreeAs JSON(static_cast<LayerTreeFlags>(flags)); 786 std::unique_ptr<JSONObject> layerTree = contentLayoutItem().compositor()->la yerTreeAsJSON(static_cast<LayerTreeFlags>(flags));
787 787
788 if (flags & LayerTreeIncludesPaintInvalidations) { 788 if (flags & LayerTreeIncludesPaintInvalidations) {
789 RefPtr<JSONArray> objectPaintInvalidations = m_view->trackedObjectPaintI nvalidationsAsJSON(); 789 std::unique_ptr<JSONArray> objectPaintInvalidations = m_view->trackedObj ectPaintInvalidationsAsJSON();
790 if (objectPaintInvalidations && objectPaintInvalidations->length()) { 790 if (objectPaintInvalidations && objectPaintInvalidations->size()) {
791 if (!layerTree) 791 if (!layerTree)
792 layerTree = JSONObject::create(); 792 layerTree = JSONObject::create();
793 layerTree->setArray("objectPaintInvalidations", objectPaintInvalidat ions); 793 layerTree->setArray("objectPaintInvalidations", std::move(objectPain tInvalidations));
794 } 794 }
795 } 795 }
796 796
797 return layerTree ? layerTree->toPrettyJSONString() : String(); 797 return layerTree ? layerTree->toPrettyJSONString() : String();
798 } 798 }
799 799
800 bool LocalFrame::shouldThrottleRendering() const 800 bool LocalFrame::shouldThrottleRendering() const
801 { 801 {
802 return view() && view()->shouldThrottleRendering(); 802 return view() && view()->shouldThrottleRendering();
803 } 803 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 m_frame->client()->frameBlameContext()->Enter(); 870 m_frame->client()->frameBlameContext()->Enter();
871 } 871 }
872 872
873 ScopedFrameBlamer::~ScopedFrameBlamer() 873 ScopedFrameBlamer::~ScopedFrameBlamer()
874 { 874 {
875 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 875 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
876 m_frame->client()->frameBlameContext()->Leave(); 876 m_frame->client()->frameBlameContext()->Leave();
877 } 877 }
878 878
879 } // namespace blink 879 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698