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

Side by Side Diff: Source/core/page/InjectedStyleSheets.cpp

Issue 302213002: Convert page-level classes to handle RemoteFrames from FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright 2014 The Chromium Authors. All rights reserved. 3 * Copyright 2014 The Chromium Authors. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 invalidateInjectedStyleSheetCacheInAllFrames(); 48 invalidateInjectedStyleSheetCacheInAllFrames();
49 } 49 }
50 50
51 void InjectedStyleSheets::invalidateInjectedStyleSheetCacheInAllFrames() 51 void InjectedStyleSheets::invalidateInjectedStyleSheetCacheInAllFrames()
52 { 52 {
53 // Clear our cached sheets and have them just reparse. 53 // Clear our cached sheets and have them just reparse.
54 const HashSet<Page*>& pages = Page::ordinaryPages(); 54 const HashSet<Page*>& pages = Page::ordinaryPages();
55 55
56 HashSet<Page*>::const_iterator end = pages.end(); 56 HashSet<Page*>::const_iterator end = pages.end();
57 for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) { 57 for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {
58 for (LocalFrame* frame = (*it)->mainFrame(); frame; frame = frame->tree( ).traverseNext()) 58 for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree().tra verseNext()) {
59 frame->document()->styleEngine()->invalidateInjectedStyleSheetCache( ); 59 if (frame->isLocalFrame())
60 toLocalFrame(frame)->document()->styleEngine()->invalidateInject edStyleSheetCache();
61 }
60 } 62 }
61 } 63 }
62 64
63 } // namespace WebCore 65 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698