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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1996363003: Avoid calling updateAllLifecyclePhasesExceptPaint in SVGImage if not needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 } 1453 }
1454 1454
1455 getHostWindow()->invalidateRect(updateRect); 1455 getHostWindow()->invalidateRect(updateRect);
1456 } 1456 }
1457 1457
1458 void FrameView::restoreScrollbar() 1458 void FrameView::restoreScrollbar()
1459 { 1459 {
1460 setScrollbarsSuppressed(false); 1460 setScrollbarsSuppressed(false);
1461 } 1461 }
1462 1462
1463 void FrameView::processUrlFragment(const KURL& url, UrlFragmentBehavior behavior ) 1463 bool FrameView::processUrlFragment(const KURL& url, UrlFragmentBehavior behavior )
1464 { 1464 {
1465 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
1466 return false;
1467 m_currentUrl = url;
1465 // If our URL has no ref, then we have no place we need to jump to. 1468 // If our URL has no ref, then we have no place we need to jump to.
1466 // OTOH If CSS target was set previously, we want to set it to 0, recalc 1469 // OTOH If CSS target was set previously, we want to set it to 0, recalc
1467 // and possibly paint invalidation because :target pseudo class may have bee n 1470 // and possibly paint invalidation because :target pseudo class may have bee n
1468 // set (see bug 11321). 1471 // set (see bug 11321).
1469 // Similarly for svg, if we had a previous svgView() then we need to reset 1472 // Similarly for svg, if we had a previous svgView() then we need to reset
1470 // the initial view if we don't have a fragment. 1473 // the initial view if we don't have a fragment.
1471 if (!url.hasFragmentIdentifier() && !m_frame->document()->cssTarget() && !m_ frame->document()->isSVGDocument()) 1474 if (!url.hasFragmentIdentifier() && !m_frame->document()->cssTarget() && !m_ frame->document()->isSVGDocument())
1472 return; 1475 return true;
1473
1474 String fragmentIdentifier = url.fragmentIdentifier(); 1476 String fragmentIdentifier = url.fragmentIdentifier();
1475 if (processUrlFragmentHelper(fragmentIdentifier, behavior)) 1477 if (processUrlFragmentHelper(fragmentIdentifier, behavior))
1476 return; 1478 return true;
1477 1479
1478 // Try again after decoding the ref, based on the document's encoding. 1480 // Try again after decoding the ref, based on the document's encoding.
1479 if (m_frame->document()->encoding().isValid()) 1481 if (m_frame->document()->encoding().isValid())
1480 processUrlFragmentHelper(decodeURLEscapeSequences(fragmentIdentifier, m_ frame->document()->encoding()), behavior); 1482 processUrlFragmentHelper(decodeURLEscapeSequences(fragmentIdentifier, m_ frame->document()->encoding()), behavior);
fs 2016/05/23 21:25:56 if (...) return processUrlFragmentHelp... retur
1481 1483 return true;
1482 } 1484 }
1483 1485
1484 bool FrameView::processUrlFragmentHelper(const String& name, UrlFragmentBehavior behavior) 1486 bool FrameView::processUrlFragmentHelper(const String& name, UrlFragmentBehavior behavior)
1485 { 1487 {
1486 ASSERT(m_frame->document()); 1488 ASSERT(m_frame->document());
1487 1489
1488 if (behavior == UrlFragmentScroll && !m_frame->document()->isRenderingReady( )) { 1490 if (behavior == UrlFragmentScroll && !m_frame->document()->isRenderingReady( )) {
1489 m_frame->document()->setGotoAnchorNeededAfterStylesheetsLoad(true); 1491 m_frame->document()->setGotoAnchorNeededAfterStylesheetsLoad(true);
1490 return false; 1492 return false;
1491 } 1493 }
(...skipping 2615 matching lines...) Expand 10 before | Expand all | Expand 10 after
4107 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4109 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4108 } 4110 }
4109 4111
4110 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4112 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4111 { 4113 {
4112 ASSERT(layoutView()); 4114 ASSERT(layoutView());
4113 return *layoutView(); 4115 return *layoutView();
4114 } 4116 }
4115 4117
4116 } // namespace blink 4118 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698