Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| index 1320b72676045aa6b71dc5cfc684c7875aa20a62..8888ad5729212b17f73f704eaaaa66b800f63db5 100644 |
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| @@ -1460,8 +1460,11 @@ void FrameView::restoreScrollbar() |
| setScrollbarsSuppressed(false); |
| } |
| -void FrameView::processUrlFragment(const KURL& url, UrlFragmentBehavior behavior) |
| +bool FrameView::processUrlFragment(const KURL& url, UrlFragmentBehavior behavior) |
| { |
| + if (m_currentUrl == url && m_currentUrlFragmentBehavior == behavior) |
|
fs
2016/05/23 21:25:56
Is the general gain great enough to store the url
chrishtr
2016/05/23 21:29:31
Indeed. The last point you made is probably a bug
|
| + return false; |
| + m_currentUrl = url; |
| // If our URL has no ref, then we have no place we need to jump to. |
| // OTOH If CSS target was set previously, we want to set it to 0, recalc |
| // and possibly paint invalidation because :target pseudo class may have been |
| @@ -1469,16 +1472,15 @@ void FrameView::processUrlFragment(const KURL& url, UrlFragmentBehavior behavior |
| // Similarly for svg, if we had a previous svgView() then we need to reset |
| // the initial view if we don't have a fragment. |
| if (!url.hasFragmentIdentifier() && !m_frame->document()->cssTarget() && !m_frame->document()->isSVGDocument()) |
| - return; |
| - |
| + return true; |
| String fragmentIdentifier = url.fragmentIdentifier(); |
| if (processUrlFragmentHelper(fragmentIdentifier, behavior)) |
| - return; |
| + return true; |
| // Try again after decoding the ref, based on the document's encoding. |
| if (m_frame->document()->encoding().isValid()) |
| processUrlFragmentHelper(decodeURLEscapeSequences(fragmentIdentifier, m_frame->document()->encoding()), behavior); |
|
fs
2016/05/23 21:25:56
if (...)
return processUrlFragmentHelp...
retur
|
| - |
| + return true; |
| } |
| bool FrameView::processUrlFragmentHelper(const String& name, UrlFragmentBehavior behavior) |