+2014-05-29 Timothy Horton <timothy_horton@apple.com>
+
+ REGRESSION (iOS WebKit2): Find-in-Page doesn't work in subframes
+ https://bugs.webkit.org/show_bug.cgi?id=133372
+ <rdar://problem/17045070>
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/WebPage/ios/FindControllerIOS.mm:
+ (WebKit::FindController::willFindString):
+ (WebKit::FindController::didFailToFindString):
+ (WebKit::FindController::didHideFindIndicator):
+ Flip ignoreCompositionSelectionChange and updateAppearanceEnabled on all
+ frames, not just the main frame, because the found string can be in a subframe.
+ Ideally we would flip it on/off for each frame as we move the selection between them,
+ but would require a lot of work (and the overhead of touching each frame shouldn't be significant).
+
2014-05-29 Dan Bernstein <mitz@apple.com>
WKBundleActivateMacFontAscentHack is unused
didHideFindIndicator();
}
-// FIXME: These should likely affect the frame owning the selection, not the main frame.
void FindController::willFindString()
{
- m_webPage->mainFrame()->editor().setIgnoreCompositionSelectionChange(true);
- m_webPage->mainFrame()->selection().setUpdateAppearanceEnabled(true);
+ for (Frame* coreFrame = m_webPage->mainFrame(); coreFrame; coreFrame = coreFrame->tree().traverseNext()) {
+ coreFrame->editor().setIgnoreCompositionSelectionChange(true);
+ coreFrame->selection().setUpdateAppearanceEnabled(true);
+ }
}
void FindController::didFailToFindString()
{
- m_webPage->mainFrame()->selection().setUpdateAppearanceEnabled(false);
- m_webPage->mainFrame()->editor().setIgnoreCompositionSelectionChange(false);
+ for (Frame* coreFrame = m_webPage->mainFrame(); coreFrame; coreFrame = coreFrame->tree().traverseNext()) {
+ coreFrame->selection().setUpdateAppearanceEnabled(false);
+ coreFrame->editor().setIgnoreCompositionSelectionChange(false);
+ }
}
void FindController::didHideFindIndicator()
{
- m_webPage->mainFrame()->selection().setUpdateAppearanceEnabled(false);
- m_webPage->mainFrame()->editor().setIgnoreCompositionSelectionChange(false);
+ for (Frame* coreFrame = m_webPage->mainFrame(); coreFrame; coreFrame = coreFrame->tree().traverseNext()) {
+ coreFrame->selection().setUpdateAppearanceEnabled(false);
+ coreFrame->editor().setIgnoreCompositionSelectionChange(false);
+ }
}
} // namespace WebKit