Changeset 194080 in webkit
- Timestamp:
- Dec 14, 2015, 4:35:44 PM (11 years ago)
- Location:
- branches/safari-601-branch/Source
- Files:
-
- 4 edited
-
WebCore/platform/URL.cpp (modified) (1 diff)
-
WebCore/platform/URL.h (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/UIProcess/API/C/WKPage.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-601-branch/Source/WebCore/platform/URL.cpp
r190142 r194080 1598 1598 } 1599 1599 1600 bool hostsAreEqual(const URL& a, const URL& b) 1601 { 1602 int hostStartA = a.hostStart(); 1603 int hostLengthA = a.hostEnd() - hostStartA; 1604 int hostStartB = b.hostStart(); 1605 int hostLengthB = b.hostEnd() - hostStartB; 1606 if (hostLengthA != hostLengthB) 1607 return false; 1608 1609 for (int i = 0; i < hostLengthA; ++i) { 1610 if (a.string()[hostStartA + i] != b.string()[hostStartB + i]) 1611 return false; 1612 } 1613 1614 return true; 1615 } 1616 1600 1617 String encodeWithURLEscapeSequences(const String& notEncodedString, PercentEncodeCharacterClass whatToEncode) 1601 1618 { -
branches/safari-601-branch/Source/WebCore/platform/URL.h
r183901 r194080 233 233 WEBCORE_EXPORT bool equalIgnoringFragmentIdentifier(const URL&, const URL&); 234 234 WEBCORE_EXPORT bool protocolHostAndPortAreEqual(const URL&, const URL&); 235 WEBCORE_EXPORT bool hostsAreEqual(const URL&, const URL&); 235 236 236 237 WEBCORE_EXPORT const URL& blankURL(); -
branches/safari-601-branch/Source/WebKit2/ChangeLog
r194079 r194080 1 2015-12-08 Harris Papadopoulos <cpapadopoulos@apple.com> 2 3 Merge r193380. rdar://problem/23816165 4 5 2015-12-03 Sam Weinig <sam@webkit.org> 6 7 It should be possible to use version 6 of the WKPageUIClient without adopting the new createNewPage 8 https://bugs.webkit.org/show_bug.cgi?id=151826 9 10 Reviewed by Anders Carlsson. 11 12 * UIProcess/API/C/WKPage.cpp: 13 (WKPageSetPageUIClient): 14 Pick which variant of createNewPage to use based on which function pointer is available, 15 not the version number. 16 1 17 2015-12-08 Harris Papadopoulos <cpapadopoulos@apple.com> 2 18 -
branches/safari-601-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp
r194079 r194080 1592 1592 virtual PassRefPtr<WebPageProxy> createNewPage(WebPageProxy* page, WebFrameProxy* initiatingFrame, const SecurityOriginData& securityOriginData, const ResourceRequest& resourceRequest, const WindowFeatures& windowFeatures, const NavigationActionData& navigationActionData) override 1593 1593 { 1594 if (m_client.base.version < 6) { 1595 if (!m_client.base.version && !m_client.createNewPage_deprecatedForUseWithV0) 1596 return nullptr; 1597 1598 if (!m_client.createNewPage_deprecatedForUseWithV1) 1599 return nullptr; 1600 1594 if (m_client.createNewPage) { 1595 auto configuration = page->configuration().copy(); 1596 configuration->setRelatedPage(page); 1597 1598 auto sourceFrameInfo = API::FrameInfo::create(*initiatingFrame, securityOriginData.securityOrigin()); 1599 1600 bool shouldOpenAppLinks = !hostsAreEqual(WebCore::URL(WebCore::ParsedURLString, initiatingFrame->url()), resourceRequest.url()); 1601 auto apiNavigationAction = API::NavigationAction::create(navigationActionData, sourceFrameInfo.ptr(), nullptr, resourceRequest, WebCore::URL(), shouldOpenAppLinks); 1602 1603 auto apiWindowFeatures = API::WindowFeatures::create(windowFeatures); 1604 1605 return adoptRef(toImpl(m_client.createNewPage(toAPI(page), toAPI(configuration.ptr()), toAPI(apiNavigationAction.ptr()), toAPI(apiWindowFeatures.ptr()), m_client.base.clientInfo))); 1606 } 1607 1608 if (m_client.createNewPage_deprecatedForUseWithV1 || m_client.createNewPage_deprecatedForUseWithV0) { 1601 1609 API::Dictionary::MapType map; 1602 1610 if (windowFeatures.x) … … 1618 1626 Ref<API::Dictionary> featuresMap = API::Dictionary::create(WTF::move(map)); 1619 1627 1620 if (!m_client.base.version) 1621 return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV0(toAPI(page), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo))); 1622 1623 Ref<API::URLRequest> request = API::URLRequest::create(resourceRequest); 1624 return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV1(toAPI(page), toAPI(request.ptr()), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo))); 1628 if (m_client.createNewPage_deprecatedForUseWithV1) { 1629 Ref<API::URLRequest> request = API::URLRequest::create(resourceRequest); 1630 return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV1(toAPI(page), toAPI(request.ptr()), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo))); 1631 } 1632 1633 ASSERT(m_client.createNewPage_deprecatedForUseWithV0); 1634 return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV0(toAPI(page), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo))); 1625 1635 } 1626 1636
Note:
See TracChangeset
for help on using the changeset viewer.