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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2531013002: WebView loadDataWithBaseURL() was determined as a same page navigation (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 // If we are loading substitute data to replace an existing load, then 2018 // If we are loading substitute data to replace an existing load, then
2019 // inherit all of the properties of that original request. This way, 2019 // inherit all of the properties of that original request. This way,
2020 // reload will re-attempt the original request. It is essential that 2020 // reload will re-attempt the original request. It is essential that
2021 // we only do this when there is an unreachableURL since a non-empty 2021 // we only do this when there is an unreachableURL since a non-empty
2022 // unreachableURL informs FrameLoader::reload to load unreachableURL 2022 // unreachableURL informs FrameLoader::reload to load unreachableURL
2023 // instead of the currently loaded URL. 2023 // instead of the currently loaded URL.
2024 ResourceRequest request; 2024 ResourceRequest request;
2025 if (replace && !unreachableURL.isEmpty() && 2025 if (replace && !unreachableURL.isEmpty() &&
2026 frame()->loader().provisionalDocumentLoader()) 2026 frame()->loader().provisionalDocumentLoader())
2027 request = frame()->loader().provisionalDocumentLoader()->originalRequest(); 2027 request = frame()->loader().provisionalDocumentLoader()->originalRequest();
2028 // TODO(crbug.com/662823): Calling setURL with baseURL is wrong, but Blink
2029 // does not provide a right solution to set base URL at loading time now.
2030 // This may cause some troubles, e.g. FrameLoader can not detect the same page
2031 // navigation correctly as far as we know.
2028 request.setURL(baseURL); 2032 request.setURL(baseURL);
2029 request.setCheckForBrowserSideNavigation(false); 2033 request.setCheckForBrowserSideNavigation(false);
2030 2034
2031 FrameLoadRequest frameRequest( 2035 FrameLoadRequest frameRequest(
2032 0, request, SubstituteData(data, mimeType, textEncoding, unreachableURL)); 2036 0, request, SubstituteData(data, mimeType, textEncoding, unreachableURL));
2033 DCHECK(frameRequest.substituteData().isValid()); 2037 DCHECK(frameRequest.substituteData().isValid());
2034 frameRequest.setReplacesCurrentItem(replace); 2038 frameRequest.setReplacesCurrentItem(replace);
2035 if (isClientRedirect) 2039 if (isClientRedirect)
2036 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect); 2040 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect);
2037 2041
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2383 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2380 } 2384 }
2381 UseCounter::count(frame(), feature); 2385 UseCounter::count(frame(), feature);
2382 } 2386 }
2383 2387
2384 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { 2388 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const {
2385 return m_inputMethodController.get(); 2389 return m_inputMethodController.get();
2386 } 2390 }
2387 2391
2388 } // namespace blink 2392 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698