Changeset 69661 in webkit
- Timestamp:
- Oct 13, 2010 7:42:35 AM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r69653 r69661 1 2010-10-12 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Jon Honeycutt. 4 5 Add ability for WK2 to set domain relaxation forbidden for a URL scheme. 6 https://bugs.webkit.org/show_bug.cgi?id=47562 7 8 Add the schemes for which domain relaxation is forbidden to the 9 WebProcessCreationParameters. 10 * Shared/WebProcessCreationParameters.cpp: 11 (WebKit::WebProcessCreationParameters::encode): 12 (WebKit::WebProcessCreationParameters::decode): 13 * Shared/WebProcessCreationParameters.h: 14 15 * UIProcess/API/C/WKContext.cpp: 16 (WKContextSetDomainRelaxationForbiddenForURLScheme): 17 * UIProcess/API/C/WKContextPrivate.h: 18 19 * UIProcess/WebContext.cpp: 20 (WebKit::WebContext::ensureWebProcess): 21 Copy over the schemes for which domain relaxation is forbidden to 22 WebProcessCreationParameters. 23 (WebKit::WebContext::setDomainRelaxationForbiddenForURLScheme): 24 Only send a message to the WebProcess if it is valid. 25 * UIProcess/WebContext.h: 26 27 * WebProcess/WebProcess.cpp: 28 (WebKit::WebProcess::initializeWebProcess): 29 Set domain relaxation forbidden for the schemes in 30 WebProcesCreationParameters.urlSchemesForWhichDomainRelaxationIsForbidden. 31 (WebKit::WebProcess::setDomainRelaxationForbiddenForURLScheme): 32 * WebProcess/WebProcess.h: 33 34 * WebProcess/WebProcess.messages.in: 35 Add the SetDomainRelaxationFobiddenForURLScheme message. 36 1 37 2010-10-13 Csaba Osztrogonác <ossy@webkit.org> 2 38 -
trunk/WebKit2/Shared/WebProcessCreationParameters.cpp
r69614 r69661 48 48 encoder->encode(urlSchemesRegistererdAsEmptyDocument); 49 49 encoder->encode(urlSchemesRegisteredAsSecure); 50 encoder->encode(urlSchemesForWhichDomainRelaxationIsForbidden); 50 51 encoder->encode(static_cast<uint32_t>(cacheModel)); 51 52 encoder->encode(shouldTrackVisitedLinks); … … 73 74 if (!decoder->decode(parameters.urlSchemesRegisteredAsSecure)) 74 75 return false; 76 if (!decoder->decode(parameters.urlSchemesForWhichDomainRelaxationIsForbidden)) 77 return false; 75 78 76 79 uint32_t cacheModel; -
trunk/WebKit2/Shared/WebProcessCreationParameters.h
r69614 r69661 56 56 Vector<String> urlSchemesRegistererdAsEmptyDocument; 57 57 Vector<String> urlSchemesRegisteredAsSecure; 58 Vector<String> urlSchemesForWhichDomainRelaxationIsForbidden; 58 59 59 60 CacheModel cacheModel; -
trunk/WebKit2/UIProcess/API/C/WKContext.cpp
r69614 r69661 126 126 toImpl(contextRef)->registerURLSchemeAsSecure(toImpl(urlScheme)->string()); 127 127 } 128 129 void WKContextSetDomainRelaxationForbiddenForURLScheme(WKContextRef contextRef, WKStringRef urlScheme) 130 { 131 toImpl(contextRef)->setDomainRelaxationForbiddenForURLScheme(toImpl(urlScheme)->string()); 132 } -
trunk/WebKit2/UIProcess/API/C/WKContextPrivate.h
r69614 r69661 51 51 WK_EXPORT void WKContextRegisterURLSchemeAsSecure(WKContextRef context, WKStringRef urlScheme); 52 52 53 WK_EXPORT void WKContextSetDomainRelaxationForbiddenForURLScheme(WKContextRef context, WKStringRef urlScheme); 54 53 55 #ifdef __cplusplus 54 56 } -
trunk/WebKit2/UIProcess/WebContext.cpp
r69614 r69661 154 154 copyToVector(m_schemesToRegisterAsEmptyDocument, parameters.urlSchemesRegistererdAsEmptyDocument); 155 155 copyToVector(m_schemesToRegisterAsSecure, parameters.urlSchemesRegisteredAsSecure); 156 copyToVector(m_schemesToSetDomainRelaxationForbiddenFor, parameters.urlSchemesForWhichDomainRelaxationIsForbidden); 156 157 157 158 // Add any platform specific parameters … … 320 321 321 322 m_process->send(Messages::WebProcess::RegisterURLSchemeAsSecure(urlScheme), 0); 323 } 324 325 void WebContext::setDomainRelaxationForbiddenForURLScheme(const String& urlScheme) 326 { 327 m_schemesToSetDomainRelaxationForbiddenFor.add(urlScheme); 328 329 if (!hasValidProcess()) 330 return; 331 332 m_process->send(Messages::WebProcess::SetDomainRelaxationForbiddenForURLScheme(urlScheme), 0); 322 333 } 323 334 -
trunk/WebKit2/UIProcess/WebContext.h
r69614 r69661 104 104 void registerURLSchemeAsEmptyDocument(const String&); 105 105 void registerURLSchemeAsSecure(const String&); 106 106 void setDomainRelaxationForbiddenForURLScheme(const String&); 107 107 108 void addVisitedLink(const String&); 108 109 void addVisitedLink(WebCore::LinkHash); … … 145 146 HashSet<String> m_schemesToRegisterAsEmptyDocument; 146 147 HashSet<String> m_schemesToRegisterAsSecure; 148 HashSet<String> m_schemesToSetDomainRelaxationForbiddenFor; 149 147 150 Vector<pair<String, RefPtr<APIObject> > > m_pendingMessagesToPostToInjectedBundle; 148 151 -
trunk/WebKit2/WebProcess/WebProcess.cpp
r69614 r69661 42 42 #include <WebCore/PageGroup.h> 43 43 #include <WebCore/SchemeRegistry.h> 44 #include <WebCore/SecurityOrigin.h> 44 45 #include <WebCore/Settings.h> 45 46 #include <wtf/PassRefPtr.h> … … 140 141 registerURLSchemeAsSecure(parameters.urlSchemesRegisteredAsSecure[i]); 141 142 143 for (size_t i = 0; i < parameters.urlSchemesForWhichDomainRelaxationIsForbidden.size(); ++i) 144 setDomainRelaxationForbiddenForURLScheme(parameters.urlSchemesForWhichDomainRelaxationIsForbidden[i]); 145 142 146 #if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC) 143 147 m_compositingRenderServerPort = parameters.acceleratedCompositingPort.port(); … … 161 165 { 162 166 SchemeRegistry::registerURLSchemeAsSecure(urlScheme); 167 } 168 169 void WebProcess::setDomainRelaxationForbiddenForURLScheme(const String& urlScheme) const 170 { 171 SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(true, urlScheme); 163 172 } 164 173 -
trunk/WebKit2/WebProcess/WebProcess.h
r69614 r69661 92 92 void registerURLSchemeAsEmptyDocument(const String&); 93 93 void registerURLSchemeAsSecure(const String&) const; 94 void setDomainRelaxationForbiddenForURLScheme(const String&) const; 94 95 #if PLATFORM(WIN) 95 96 void setShouldPaintNativeControls(bool); -
trunk/WebKit2/WebProcess/WebProcess.messages.in
r69614 r69661 38 38 RegisterURLSchemeAsEmptyDocument(WTF::String scheme) 39 39 RegisterURLSchemeAsSecure(WTF::String scheme) 40 SetDomainRelaxationForbiddenForURLScheme(WTF::String scheme) 40 41 #if PLATFORM(WIN) 41 42 SetShouldPaintNativeControls(bool shouldPaintNativeControls)
Note: See TracChangeset
for help on using the changeset viewer.