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

Side by Side Diff: Source/core/frame/DOMWindow.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, 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
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/Navigator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } 356 }
357 357
358 void DOMWindow::clearEventQueue() 358 void DOMWindow::clearEventQueue()
359 { 359 {
360 if (!m_eventQueue) 360 if (!m_eventQueue)
361 return; 361 return;
362 m_eventQueue->close(); 362 m_eventQueue->close();
363 m_eventQueue.clear(); 363 m_eventQueue.clear();
364 } 364 }
365 365
366 void DOMWindow::acceptLanguagesChanged()
367 {
368 if (m_navigator)
369 m_navigator->setLanguagesChanged();
370
371 dispatchEvent(Event::create(EventTypeNames::languagechange));
372 }
373
366 PassRefPtrWillBeRawPtr<Document> DOMWindow::createDocument(const String& mimeTyp e, const DocumentInit& init, bool forceXHTML) 374 PassRefPtrWillBeRawPtr<Document> DOMWindow::createDocument(const String& mimeTyp e, const DocumentInit& init, bool forceXHTML)
367 { 375 {
368 RefPtrWillBeRawPtr<Document> document = nullptr; 376 RefPtrWillBeRawPtr<Document> document = nullptr;
369 if (forceXHTML) { 377 if (forceXHTML) {
370 // This is a hack for XSLTProcessor. See XSLTProcessor::createDocumentFr omSource(). 378 // This is a hack for XSLTProcessor. See XSLTProcessor::createDocumentFr omSource().
371 document = Document::create(init); 379 document = Document::create(init);
372 } else { 380 } else {
373 document = DOMImplementation::createDocument(mimeType, init, init.frame( ) ? init.frame()->inViewSourceMode() : false); 381 document = DOMImplementation::createDocument(mimeType, init, init.frame( ) ? init.frame()->inViewSourceMode() : false);
374 if (document->isPluginDocument() && document->isSandboxed(SandboxPlugins )) 382 if (document->isPluginDocument() && document->isSandboxed(SandboxPlugins ))
375 document = SinkDocument::create(init); 383 document = SinkDocument::create(init);
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 visitor->trace(m_sessionStorage); 1911 visitor->trace(m_sessionStorage);
1904 visitor->trace(m_localStorage); 1912 visitor->trace(m_localStorage);
1905 visitor->trace(m_applicationCache); 1913 visitor->trace(m_applicationCache);
1906 visitor->trace(m_performance); 1914 visitor->trace(m_performance);
1907 visitor->trace(m_css); 1915 visitor->trace(m_css);
1908 WillBeHeapSupplementable<DOMWindow>::trace(visitor); 1916 WillBeHeapSupplementable<DOMWindow>::trace(visitor);
1909 EventTargetWithInlineData::trace(visitor); 1917 EventTargetWithInlineData::trace(visitor);
1910 } 1918 }
1911 1919
1912 } // namespace WebCore 1920 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/Navigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698