| Index: Source/web/TextFinder.cpp
|
| diff --git a/Source/web/TextFinder.cpp b/Source/web/TextFinder.cpp
|
| index b280418d0399d52adcaf9a8c97f6917700c3fce5..e91df596fece53cd8090ec98dc7c17eb2768a8c3 100644
|
| --- a/Source/web/TextFinder.cpp
|
| +++ b/Source/web/TextFinder.cpp
|
| @@ -41,6 +41,7 @@
|
| #include "core/editing/iterators/CharacterIterator.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/layout/LayoutObject.h"
|
| +#include "core/layout/TextAutosizer.h"
|
| #include "core/page/Page.h"
|
| #include "modules/accessibility/AXObject.h"
|
| #include "modules/accessibility/AXObjectCacheImpl.h"
|
| @@ -155,9 +156,12 @@ bool TextFinder::find(int identifier, const WebString& searchText, const WebFind
|
| return false;
|
| }
|
|
|
| -#if OS(ANDROID)
|
| - ownerFrame().viewImpl()->zoomToFindInPageRect(ownerFrame().frameView()->contentsToRootFrame(enclosingIntRect(LayoutObject::absoluteBoundingBoxRectForRange(m_activeMatch.get()))));
|
| -#endif
|
| + // If the user is browsing a page with autosizing, adjust the zoom to the
|
| + // column where the next hit has been found. Doing this when autosizing is
|
| + // not set will result in a zoom reset on small devices.
|
| + if (ownerFrame().frame()->document()->textAutosizer()->pageNeedsAutosizing()) {
|
| + ownerFrame().viewImpl()->zoomToFindInPageRect(ownerFrame().frameView()->contentsToRootFrame(enclosingIntRect(LayoutObject::absoluteBoundingBoxRectForRange(m_activeMatch.get()))));
|
| + }
|
|
|
| setMarkerActive(m_activeMatch.get(), true);
|
| WebLocalFrameImpl* oldActiveFrame = mainFrameImpl->ensureTextFinder().m_currentActiveMatchFrame;
|
|
|