Changeset 237146 in webkit
- Timestamp:
- Oct 15, 2018, 2:33:52 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebKit/ChangeLog ¶
r237144 r237146 1 2018-10-15 Alex Christensen <achristensen@webkit.org> 2 3 Remove unused parameters of WebPageGroupData 4 https://bugs.webkit.org/show_bug.cgi?id=190600 5 6 Reviewed by Chris Dumez. 7 8 visibleToInjectedBundle and visibleToHistoryClient are both always true. 9 This removes a mysterious check in the history code. 10 11 * Shared/WebPageGroupData.cpp: 12 (WebKit::WebPageGroupData::encode const): 13 (WebKit::WebPageGroupData::decode): 14 * Shared/WebPageGroupData.h: 15 * UIProcess/WebPageGroup.cpp: 16 (WebKit::WebPageGroup::create): 17 (WebKit::pageGroupData): 18 (WebKit::WebPageGroup::WebPageGroup): 19 * UIProcess/WebPageGroup.h: 20 (WebKit::WebPageGroup::WebPageGroup): 21 (WebKit::WebPageGroup::create): 22 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 23 (WebKit::WebFrameLoaderClient::updateGlobalHistory): 24 (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): 25 (WebKit::WebFrameLoaderClient::setTitle): 26 * WebProcess/WebPage/WebPage.cpp: 27 (WebKit::WebPage::create): 28 (WebKit::WebPage::close): 29 * WebProcess/WebPage/WebPageGroupProxy.cpp: 30 (WebKit::WebPageGroupProxy::create): 31 * WebProcess/WebPage/WebPageGroupProxy.h: 32 (WebKit::WebPageGroupProxy::pageGroupID const): 33 (WebKit::WebPageGroupProxy::isVisibleToInjectedBundle const): Deleted. 34 (WebKit::WebPageGroupProxy::isVisibleToHistoryClient const): Deleted. 35 1 36 2018-10-15 Chris Dumez <cdumez@apple.com> 2 37 -
TabularUnified trunk/Source/WebKit/Shared/WebPageGroupData.cpp ¶
r230232 r237146 35 35 encoder << identifier; 36 36 encoder << pageGroupID; 37 encoder << visibleToInjectedBundle;38 encoder << visibleToHistoryClient;39 37 encoder << userContentControllerIdentifier.toUInt64(); 40 38 } … … 42 40 std::optional<WebPageGroupData> WebPageGroupData::decode(IPC::Decoder& decoder) 43 41 { 44 String id; 45 if (!decoder.decode(id)) 42 std::optional<String> identifier; 43 decoder >> identifier; 44 if (!identifier) 46 45 return std::nullopt; 47 uint64_t pageGroupID; 48 if (!decoder.decode(pageGroupID)) 46 47 std::optional<uint64_t> pageGroupID; 48 decoder >> pageGroupID; 49 if (!pageGroupID) 49 50 return std::nullopt; 50 bool visibleToInjectedBundle; 51 if (!decoder.decode(visibleToInjectedBundle)) 52 return std::nullopt; 53 bool visibleToHistoryClient; 54 if (!decoder.decode(visibleToHistoryClient)) 55 return std::nullopt; 56 std::optional<uint64_t> userContentControllerIdentifier; 51 52 std::optional<UserContentControllerIdentifier> userContentControllerIdentifier; 57 53 decoder >> userContentControllerIdentifier; 58 54 if (!userContentControllerIdentifier) 59 55 return std::nullopt; 60 return { { id, pageGroupID, visibleToInjectedBundle, visibleToHistoryClient, makeObjectIdentifier<UserContentControllerIdentifierType>(*userContentControllerIdentifier) } }; 56 57 return {{ WTFMove(*identifier), WTFMove(*pageGroupID), WTFMove(*userContentControllerIdentifier) }}; 61 58 } 62 59 -
TabularUnified trunk/Source/WebKit/Shared/WebPageGroupData.h ¶
r230223 r237146 42 42 String identifier; 43 43 uint64_t pageGroupID; 44 bool visibleToInjectedBundle;45 bool visibleToHistoryClient;46 44 47 45 UserContentControllerIdentifier userContentControllerIdentifier; -
TabularUnified trunk/Source/WebKit/UIProcess/WebPageGroup.cpp ¶
r225700 r237146 55 55 } 56 56 57 Ref<WebPageGroup> WebPageGroup::create(const String& identifier , bool visibleToInjectedBundle, bool visibleToHistoryClient)57 Ref<WebPageGroup> WebPageGroup::create(const String& identifier) 58 58 { 59 return adoptRef(*new WebPageGroup(identifier , visibleToInjectedBundle, visibleToHistoryClient));59 return adoptRef(*new WebPageGroup(identifier)); 60 60 } 61 61 … … 65 65 } 66 66 67 static WebPageGroupData pageGroupData(const String& identifier , bool visibleToInjectedBundle, bool visibleToHistoryClient)67 static WebPageGroupData pageGroupData(const String& identifier) 68 68 { 69 69 WebPageGroupData data; … … 76 76 data.identifier = makeString("__uniquePageGroupID-", String::number(data.pageGroupID)); 77 77 78 data.visibleToInjectedBundle = visibleToInjectedBundle;79 data.visibleToHistoryClient = visibleToHistoryClient;80 81 78 return data; 82 79 } … … 84 81 // FIXME: Why does the WebPreferences object here use ".WebKit2" instead of "WebKit2." which all the other constructors use. 85 82 // If it turns out that it's wrong, we can change it to to "WebKit2." and get rid of the globalDebugKeyPrefix from WebPreferences. 86 WebPageGroup::WebPageGroup(const String& identifier , bool visibleToInjectedBundle, bool visibleToHistoryClient)87 : m_data(pageGroupData(identifier , visibleToInjectedBundle, visibleToHistoryClient))83 WebPageGroup::WebPageGroup(const String& identifier) 84 : m_data(pageGroupData(identifier)) 88 85 , m_preferences(WebPreferences::createWithLegacyDefaults(m_data.identifier, ".WebKit2", "WebKit2.")) 89 86 , m_userContentController(WebUserContentControllerProxy::create()) -
TabularUnified trunk/Source/WebKit/UIProcess/WebPageGroup.h ¶
r225700 r237146 42 42 class WebPageGroup : public API::ObjectImpl<API::Object::Type::PageGroup> { 43 43 public: 44 WebPageGroup(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);45 static Ref<WebPageGroup> create(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);44 explicit WebPageGroup(const String& identifier = { }); 45 static Ref<WebPageGroup> create(const String& identifier = { }); 46 46 47 47 static WebPageGroup* get(uint64_t pageGroupID); -
TabularUnified trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp ¶
r237138 r237146 1080 1080 { 1081 1081 WebPage* webPage = m_frame->page(); 1082 if (!webPage || !webPage->pageGroup()->isVisibleToHistoryClient())1082 if (!webPage) 1083 1083 return; 1084 1084 … … 1098 1098 { 1099 1099 WebPage* webPage = m_frame->page(); 1100 if (!webPage || !webPage->pageGroup()->isVisibleToHistoryClient())1100 if (!webPage) 1101 1101 return; 1102 1102 … … 1341 1341 { 1342 1342 WebPage* webPage = m_frame->page(); 1343 if (!webPage || !webPage->pageGroup()->isVisibleToHistoryClient())1343 if (!webPage) 1344 1344 return; 1345 1345 -
TabularUnified trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp ¶
r237087 r237146 342 342 Ref<WebPage> page = adoptRef(*new WebPage(pageID, WTFMove(parameters))); 343 343 344 if ( page->pageGroup()->isVisibleToInjectedBundle() &&WebProcess::singleton().injectedBundle())344 if (WebProcess::singleton().injectedBundle()) 345 345 WebProcess::singleton().injectedBundle()->didCreatePage(page.ptr()); 346 346 … … 1177 1177 reportUsedFeatures(); 1178 1178 1179 if ( pageGroup()->isVisibleToInjectedBundle() &&WebProcess::singleton().injectedBundle())1179 if (WebProcess::singleton().injectedBundle()) 1180 1180 WebProcess::singleton().injectedBundle()->willDestroyPage(this); 1181 1181 -
TabularUnified trunk/Source/WebKit/WebProcess/WebPage/WebPageGroupProxy.cpp ¶
r216448 r237146 40 40 auto pageGroup = adoptRef(*new WebPageGroupProxy(data)); 41 41 42 if ( pageGroup->isVisibleToInjectedBundle() &&WebProcess::singleton().injectedBundle())42 if (WebProcess::singleton().injectedBundle()) 43 43 WebProcess::singleton().injectedBundle()->didInitializePageGroup(pageGroup.ptr()); 44 44 -
TabularUnified trunk/Source/WebKit/WebProcess/WebPage/WebPageGroupProxy.h ¶
r216448 r237146 45 45 const String& identifier() const { return m_data.identifier; } 46 46 uint64_t pageGroupID() const { return m_data.pageGroupID; } 47 bool isVisibleToInjectedBundle() const { return m_data.visibleToInjectedBundle; }48 bool isVisibleToHistoryClient() const { return m_data.visibleToHistoryClient; }49 47 WebCore::PageGroup* corePageGroup() const { return m_pageGroup; } 50 48
Note:
See TracChangeset
for help on using the changeset viewer.