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

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

Issue 1231673007: Don't zoom in TextFinder if autosizing is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
« Source/web/TextFinder.h ('K') | « Source/web/TextFinder.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if (!m_activeMatch) { 148 if (!m_activeMatch) {
149 // If we're finding next the next active match might not be in the curre nt frame. 149 // If we're finding next the next active match might not be in the curre nt frame.
150 // In this case we don't want to clear the matches cache. 150 // In this case we don't want to clear the matches cache.
151 if (!options.findNext) 151 if (!options.findNext)
152 clearFindMatchesCache(); 152 clearFindMatchesCache();
153 153
154 ownerFrame().frameView()->invalidatePaintForTickmarks(); 154 ownerFrame().frameView()->invalidatePaintForTickmarks();
155 return false; 155 return false;
156 } 156 }
157 157
158 #if OS(ANDROID) 158 if (ownerFrame().frame()->document()->textAutosizer()->pageNeedsAutosizing() ) {
skobes 2015/07/14 17:11:27 Can you add a comment explaining why the check is
159 ownerFrame().viewImpl()->zoomToFindInPageRect(ownerFrame().frameView()->cont entsToRootFrame(enclosingIntRect(LayoutObject::absoluteBoundingBoxRectForRange(m _activeMatch.get())))); 159 ownerFrame().viewImpl()->zoomToFindInPageRect(ownerFrame().frameView()-> contentsToRootFrame(enclosingIntRect(LayoutObject::absoluteBoundingBoxRectForRan ge(m_activeMatch.get()))));
160 #endif 160 }
161 161
162 setMarkerActive(m_activeMatch.get(), true); 162 setMarkerActive(m_activeMatch.get(), true);
163 WebLocalFrameImpl* oldActiveFrame = mainFrameImpl->ensureTextFinder().m_curr entActiveMatchFrame; 163 WebLocalFrameImpl* oldActiveFrame = mainFrameImpl->ensureTextFinder().m_curr entActiveMatchFrame;
164 mainFrameImpl->ensureTextFinder().m_currentActiveMatchFrame = &ownerFrame(); 164 mainFrameImpl->ensureTextFinder().m_currentActiveMatchFrame = &ownerFrame();
165 165
166 // Make sure no node is focused. See http://crbug.com/38700. 166 // Make sure no node is focused. See http://crbug.com/38700.
167 ownerFrame().frame()->document()->setFocusedElement(nullptr); 167 ownerFrame().frame()->document()->setFocusedElement(nullptr);
168 168
169 if (!options.findNext || activeSelection) { 169 if (!options.findNext || activeSelection) {
170 // This is either a Find operation or a Find-next from a new start point 170 // This is either a Find operation or a Find-next from a new start point
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 visitor->trace(m_ownerFrame); 790 visitor->trace(m_ownerFrame);
791 visitor->trace(m_currentActiveMatchFrame); 791 visitor->trace(m_currentActiveMatchFrame);
792 visitor->trace(m_activeMatch); 792 visitor->trace(m_activeMatch);
793 visitor->trace(m_resumeScopingFromRange); 793 visitor->trace(m_resumeScopingFromRange);
794 visitor->trace(m_deferredScopingWork); 794 visitor->trace(m_deferredScopingWork);
795 visitor->trace(m_findMatchesCache); 795 visitor->trace(m_findMatchesCache);
796 #endif 796 #endif
797 } 797 }
798 798
799 } // namespace blink 799 } // namespace blink
OLDNEW
« Source/web/TextFinder.h ('K') | « Source/web/TextFinder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698