Changeset 194367 in webkit
- Timestamp:
- Dec 22, 2015, 11:37:50 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/page/Page.cpp (modified) (1 diff)
-
WebCore/page/SecurityOrigin.h (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r194362 r194367 1 2015-12-22 Brent Fulgham <bfulgham@apple.com> 2 3 Allow JavaScript to iterate over plugins for local SecurityOrigins 4 https://bugs.webkit.org/show_bug.cgi?id=152489 5 6 Reviewed by Alexey Proskuryakov. 7 8 Instead of calling 'isLocalFile' on the URL, we check the Document's SecurityOrigin. If 9 no origin exists, we construct a SecurityOrigin from the URL, and check whether it 10 satisfies 'isLocal'. 11 12 * page/Page.cpp: 13 (WebCore::Page::showAllPlugins): Revised to use SecurityOrigin. 14 1 15 2015-12-22 Michael Catanzaro <mcatanzaro@igalia.com> 2 16 -
trunk/Source/WebCore/page/Page.cpp
r194006 r194367 525 525 bool Page::showAllPlugins() const 526 526 { 527 return m_showAllPlugins || mainFrame().loader().documentLoader()->url().isLocalFile(); 527 if (m_showAllPlugins) 528 return true; 529 530 if (Document* document = mainFrame().document()) { 531 if (SecurityOrigin* securityOrigin = document->securityOrigin()) 532 return securityOrigin->isLocal(); 533 } 534 535 return false; 528 536 } 529 537 -
trunk/Source/WebCore/page/SecurityOrigin.h
r185231 r194367 162 162 // The local SecurityOrigin can script any document, navigate to local 163 163 // resources, and can set arbitrary headers on XMLHttpRequests. 164 bool isLocal() const;164 WEBCORE_EXPORT bool isLocal() const; 165 165 166 166 // The origin is a globally unique identifier assigned when the Document is -
trunk/Source/WebKit2/ChangeLog
r194359 r194367 1 2015-12-22 Brent Fulgham <bfulgham@apple.com> 2 3 Allow JavaScript to iterate over plugins for local SecurityOrigins 4 https://bugs.webkit.org/show_bug.cgi?id=152489 5 6 Reviewed by Alexey Proskuryakov. 7 8 The 'getWebVisiblePluginInfo' is filtering plugins, even when we want to list 9 all plugins. To avoid this, we check the Document's SecurityOrigin. If no such 10 origin exists, we construct a SecurityOrigin from the URL. 11 12 If the relevant SecurityOrigin satsifies 'isLocal', we show all plugins. 13 14 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 15 (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo): 16 1 17 2015-12-21 Hunseop Jeong <hs85.jeong@samsung.com> 2 18 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r193468 r194367 49 49 #include "WebProcessProxyMessages.h" 50 50 #include <WebCore/Color.h> 51 #include <WebCore/Document.h> 51 52 #include <WebCore/DocumentLoader.h> 52 53 #include <WebCore/IDBFactoryBackendInterface.h> … … 190 191 191 192 #if PLATFORM(MAC) 193 if (Document* document = page->mainFrame().document()) { 194 if (SecurityOrigin* securityOrigin = document->securityOrigin()) { 195 if (securityOrigin->isLocal()) 196 return; 197 } 198 } 199 192 200 for (int32_t i = plugins.size() - 1; i >= 0; --i) { 193 201 PluginInfo& info = plugins.at(i);
Note:
See TracChangeset
for help on using the changeset viewer.