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

Unified Diff: Source/core/page/Page.cpp

Issue 288393002: Implement navigator.languages. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@language_change_tests
Patch Set: error 500 Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/NavigatorLanguage.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index dbb040d6e9c2972a1604a6b69c0c46dd5e3e0aaa..3394b800cabadaf721b84fe4d1864b1922eb0fe7 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -535,11 +535,13 @@ void Page::acceptLanguagesChanged()
{
Vector< RefPtr<LocalFrame> > frames;
+ // Even though we don't fire an event from here, the DOMWindow's will fire
+ // an event so we keep the frames alive until we are done.
for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().traverseNext())
frames.append(frame);
for (unsigned i = 0; i < frames.size(); ++i)
- frames[i]->domWindow()->dispatchEvent(Event::create(EventTypeNames::languagechange));
+ frames[i]->domWindow()->acceptLanguagesChanged();
}
PageLifecycleNotifier& Page::lifecycleNotifier()
« no previous file with comments | « Source/core/frame/NavigatorLanguage.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698