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

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

Issue 1365853003: LayoutBox::scrollRectToVisible doesn't respect overflow:hidden property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typos Created 5 years, 2 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) 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 // Make sure no node is focused. See http://crbug.com/38700. 629 // Make sure no node is focused. See http://crbug.com/38700.
630 ownerFrame().frame()->document()->setFocusedElement(nullptr); 630 ownerFrame().frame()->document()->setFocusedElement(nullptr);
631 } 631 }
632 632
633 IntRect activeMatchRect; 633 IntRect activeMatchRect;
634 IntRect activeMatchBoundingBox = enclosingIntRect(LayoutObject::absoluteBoun dingBoxRectForRange(m_activeMatch.get())); 634 IntRect activeMatchBoundingBox = enclosingIntRect(LayoutObject::absoluteBoun dingBoxRectForRange(m_activeMatch.get()));
635 635
636 if (!activeMatchBoundingBox.isEmpty()) { 636 if (!activeMatchBoundingBox.isEmpty()) {
637 if (m_activeMatch->firstNode() && m_activeMatch->firstNode()->layoutObje ct()) { 637 if (m_activeMatch->firstNode() && m_activeMatch->firstNode()->layoutObje ct()) {
638 m_activeMatch->firstNode()->layoutObject()->scrollRectToVisible( 638 m_activeMatch->firstNode()->layoutObject()->scrollRectToVisible(
639 LayoutRect(activeMatchBoundingBox), ScrollAlignment::alignCenter IfNeeded, ScrollAlignment::alignCenterIfNeeded); 639 LayoutRect(activeMatchBoundingBox), ScrollAlignment::alignCenter IfNeeded, ScrollAlignment::alignCenterIfNeeded, UserScroll);
640 } 640 }
641 641
642 // Zoom to the active match. 642 // Zoom to the active match.
643 activeMatchRect = ownerFrame().frameView()->contentsToRootFrame(activeMa tchBoundingBox); 643 activeMatchRect = ownerFrame().frameView()->contentsToRootFrame(activeMa tchBoundingBox);
644 ownerFrame().viewImpl()->zoomToFindInPageRect(activeMatchRect); 644 ownerFrame().viewImpl()->zoomToFindInPageRect(activeMatchRect);
645 } 645 }
646 646
647 if (selectionRect) 647 if (selectionRect)
648 *selectionRect = activeMatchRect; 648 *selectionRect = activeMatchRect;
649 649
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 visitor->trace(m_ownerFrame); 802 visitor->trace(m_ownerFrame);
803 visitor->trace(m_currentActiveMatchFrame); 803 visitor->trace(m_currentActiveMatchFrame);
804 visitor->trace(m_activeMatch); 804 visitor->trace(m_activeMatch);
805 visitor->trace(m_resumeScopingFromRange); 805 visitor->trace(m_resumeScopingFromRange);
806 visitor->trace(m_deferredScopingWork); 806 visitor->trace(m_deferredScopingWork);
807 visitor->trace(m_findMatchesCache); 807 visitor->trace(m_findMatchesCache);
808 #endif 808 #endif
809 } 809 }
810 810
811 } // namespace blink 811 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698