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

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

Issue 2557533005: Collect active stylesheets and and apply asynchronously. (Closed)
Patch Set: Rebased. Created 4 years 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 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 697
698 document->mediaQueryAffectingValueChanged(); 698 document->mediaQueryAffectingValueChanged();
699 document->setNeedsStyleRecalc( 699 document->setNeedsStyleRecalc(
700 SubtreeStyleChange, 700 SubtreeStyleChange,
701 StyleChangeReasonForTracing::create(StyleChangeReason::Zoom)); 701 StyleChangeReasonForTracing::create(StyleChangeReason::Zoom));
702 document->updateStyleAndLayoutIgnorePendingStylesheets(); 702 document->updateStyleAndLayoutIgnorePendingStylesheets();
703 } 703 }
704 704
705 void LocalFrame::deviceScaleFactorChanged() { 705 void LocalFrame::deviceScaleFactorChanged() {
706 document()->mediaQueryAffectingValueChanged(); 706 document()->mediaQueryAffectingValueChanged();
707 document()->setNeedsStyleRecalc(
708 SubtreeStyleChange,
709 StyleChangeReasonForTracing::create(StyleChangeReason::Zoom));
707 for (Frame* child = tree().firstChild(); child; 710 for (Frame* child = tree().firstChild(); child;
708 child = child->tree().nextSibling()) { 711 child = child->tree().nextSibling()) {
709 if (child->isLocalFrame()) 712 if (child->isLocalFrame())
710 toLocalFrame(child)->deviceScaleFactorChanged(); 713 toLocalFrame(child)->deviceScaleFactorChanged();
711 } 714 }
712 } 715 }
713 716
714 double LocalFrame::devicePixelRatio() const { 717 double LocalFrame::devicePixelRatio() const {
715 if (!m_host) 718 if (!m_host)
716 return 0; 719 return 0;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 942 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
940 m_frame->client()->frameBlameContext()->Enter(); 943 m_frame->client()->frameBlameContext()->Enter();
941 } 944 }
942 945
943 ScopedFrameBlamer::~ScopedFrameBlamer() { 946 ScopedFrameBlamer::~ScopedFrameBlamer() {
944 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 947 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
945 m_frame->client()->frameBlameContext()->Leave(); 948 m_frame->client()->frameBlameContext()->Leave();
946 } 949 }
947 950
948 } // namespace blink 951 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698