Diff
Modified: trunk/Source/WebCore/ChangeLog (120004 => 120005)
--- trunk/Source/WebCore/ChangeLog 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/ChangeLog 2012-06-11 20:52:14 UTC (rev 120005)
@@ -1,3 +1,39 @@
+2012-06-11 Sam Weinig <[email protected]>
+
+ Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
+ https://bugs.webkit.org/show_bug.cgi?id=88723
+
+ Reviewed by Dan Bernstein.
+
+ * WebCore.exp.in:
+ Update export.
+ * editing/Editor.cpp:
+ (WebCore::Editor::rangeOfString):
+ (WebCore::Editor::countMatchesForText):
+ * editing/Editor.h:
+ (Editor):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::findFrameForNavigation):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::parent):
+ (WebCore::DOMWindow::top):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::hitTestResultAtPoint):
+ * page/Frame.cpp:
+ (WebCore::Frame::Frame):
+ * page/Frame.h:
+ (Frame):
+ * page/FrameTree.cpp:
+ (WebCore::FrameTree::parent):
+ (WebCore::FrameTree::top):
+ * page/FrameTree.h:
+ (FrameTree):
+ * page/Location.cpp:
+ (WebCore::Location::ancestorOrigins):
+ * xml/XMLTreeViewer.cpp:
+ (WebCore::XMLTreeViewer::hasNoStyleInformation):
+ Update for the removal of disconnected frames and text search exclusions concepts.
+
2012-06-11 Xianzhu Wang <[email protected]>
SVGImageCache leaks image data
Modified: trunk/Source/WebCore/WebCore.exp.in (120004 => 120005)
--- trunk/Source/WebCore/WebCore.exp.in 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/WebCore.exp.in 2012-06-11 20:52:14 UTC (rev 120005)
@@ -1534,7 +1534,7 @@
__ZNK7WebCore9FrameTree20traverseNextWithWrapEb
__ZNK7WebCore9FrameTree24traversePreviousWithWrapEb
__ZNK7WebCore9FrameTree4findERKN3WTF12AtomicStringE
-__ZNK7WebCore9FrameTree6parentEb
+__ZNK7WebCore9FrameTree6parentEv
__ZNK7WebCore9FrameView11needsLayoutEv
__ZNK7WebCore9FrameView13isTransparentEv
__ZNK7WebCore9FrameView13paintBehaviorEv
Modified: trunk/Source/WebCore/editing/Editor.cpp (120004 => 120005)
--- trunk/Source/WebCore/editing/Editor.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/editing/Editor.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -2414,144 +2414,6 @@
m_alternativeTextController->dismiss(ReasonForDismissingAlternativeTextIgnored);
}
-bool Editor::insideVisibleArea(const LayoutPoint& point) const
-{
- if (m_frame->excludeFromTextSearch())
- return false;
-
- // Right now, we only check the visibility of a point for disconnected frames. For all other
- // frames, we assume visibility.
- Frame* frame = m_frame->isDisconnected() ? m_frame : m_frame->tree()->top(true);
- if (!frame->isDisconnected())
- return true;
-
- RenderPart* renderer = frame->ownerRenderer();
- if (!renderer)
- return false;
-
- RenderBlock* container = renderer->containingBlock();
- if (!(container->style()->overflowX() == OHIDDEN || container->style()->overflowY() == OHIDDEN))
- return true;
-
- LayoutRect rectInPageCoords = container->overflowClipRect(IntPoint(), 0); // FIXME: Incorrect for CSS regions.
- LayoutRect rectInFrameCoords = LayoutRect(renderer->x() * -1, renderer->y() * -1,
- rectInPageCoords.width(), rectInPageCoords.height());
-
- return rectInFrameCoords.contains(point);
-}
-
-bool Editor::insideVisibleArea(Range* range) const
-{
- if (!range)
- return true;
-
- if (m_frame->excludeFromTextSearch())
- return false;
-
- // Right now, we only check the visibility of a range for disconnected frames. For all other
- // frames, we assume visibility.
- Frame* frame = m_frame->isDisconnected() ? m_frame : m_frame->tree()->top(true);
- if (!frame->isDisconnected())
- return true;
-
- RenderPart* renderer = frame->ownerRenderer();
- if (!renderer)
- return false;
-
- RenderBlock* container = renderer->containingBlock();
- if (!(container->style()->overflowX() == OHIDDEN || container->style()->overflowY() == OHIDDEN))
- return true;
-
- LayoutRect rectInPageCoords = container->overflowClipRect(LayoutPoint(), 0); // FIXME: Incorrect for CSS regions.
- LayoutRect rectInFrameCoords = LayoutRect(renderer->x() * -1, renderer->y() * -1,
- rectInPageCoords.width(), rectInPageCoords.height());
- LayoutRect resultRect = range->boundingBox();
-
- return rectInFrameCoords.contains(resultRect);
-}
-
-PassRefPtr<Range> Editor::firstVisibleRange(const String& target, FindOptions options)
-{
- RefPtr<Range> searchRange(rangeOfContents(m_frame->document()));
- RefPtr<Range> resultRange = findPlainText(searchRange.get(), target, options & ~Backwards);
- ExceptionCode ec = 0;
-
- while (!insideVisibleArea(resultRange.get())) {
- searchRange->setStartAfter(resultRange->endContainer(), ec);
- if (searchRange->startContainer() == searchRange->endContainer())
- return Range::create(m_frame->document());
- resultRange = findPlainText(searchRange.get(), target, options & ~Backwards);
- }
-
- return resultRange;
-}
-
-PassRefPtr<Range> Editor::lastVisibleRange(const String& target, FindOptions options)
-{
- RefPtr<Range> searchRange(rangeOfContents(m_frame->document()));
- RefPtr<Range> resultRange = findPlainText(searchRange.get(), target, options | Backwards);
- ExceptionCode ec = 0;
-
- while (!insideVisibleArea(resultRange.get())) {
- searchRange->setEndBefore(resultRange->startContainer(), ec);
- if (searchRange->startContainer() == searchRange->endContainer())
- return Range::create(m_frame->document());
- resultRange = findPlainText(searchRange.get(), target, options | Backwards);
- }
-
- return resultRange;
-}
-
-PassRefPtr<Range> Editor::nextVisibleRange(Range* currentRange, const String& target, FindOptions options)
-{
- if (m_frame->excludeFromTextSearch())
- return Range::create(m_frame->document());
-
- RefPtr<Range> resultRange = currentRange;
- RefPtr<Range> searchRange(rangeOfContents(m_frame->document()));
- ExceptionCode ec = 0;
- bool forward = !(options & Backwards);
- for ( ; !insideVisibleArea(resultRange.get()); resultRange = findPlainText(searchRange.get(), target, options)) {
- if (resultRange->collapsed(ec)) {
- if (!resultRange->startContainer()->isInShadowTree())
- break;
- searchRange = rangeOfContents(m_frame->document());
- if (forward)
- searchRange->setStartAfter(resultRange->startContainer()->shadowAncestorNode(), ec);
- else
- searchRange->setEndBefore(resultRange->startContainer()->shadowAncestorNode(), ec);
- continue;
- }
-
- if (forward)
- searchRange->setStartAfter(resultRange->endContainer(), ec);
- else
- searchRange->setEndBefore(resultRange->startContainer(), ec);
-
- ShadowRoot* shadowRoot = searchRange->shadowRoot();
- if (searchRange->collapsed(ec) && shadowRoot) {
- if (forward)
- searchRange->setEnd(shadowRoot, shadowRoot->childNodeCount(), ec);
- else
- searchRange->setStartBefore(shadowRoot, ec);
- }
-
- if (searchRange->startContainer()->isDocumentNode() && searchRange->endContainer()->isDocumentNode())
- break;
- }
-
- if (insideVisibleArea(resultRange.get()))
- return resultRange;
-
- if (!(options & WrapAround))
- return Range::create(m_frame->document());
-
- if (options & Backwards)
- return lastVisibleRange(target, options);
-
- return firstVisibleRange(target, options);
-}
-
void Editor::changeSelectionAfterCommand(const VisibleSelection& newSelection, bool closeTyping, bool clearTypingStyle)
{
// If the new selection is orphaned, then don't update the selection.
@@ -2750,9 +2612,6 @@
if (target.isEmpty())
return 0;
- if (m_frame->excludeFromTextSearch())
- return 0;
-
// Start from an edge of the reference range, if there's a reference range that's not in shadow content. Which edge
// is used depends on whether we're searching forward or backward, and whether startInSelection is set.
RefPtr<Range> searchRange(rangeOfContents(m_frame->document()));
@@ -2806,12 +2665,6 @@
resultRange = findPlainText(searchRange.get(), target, options);
}
- if (!insideVisibleArea(resultRange.get())) {
- resultRange = nextVisibleRange(resultRange.get(), target, options);
- if (!resultRange)
- return 0;
- }
-
// If we didn't find anything and we're wrapping, search again in the entire document (this will
// redundantly re-search the area already searched in some cases).
if (resultRange->collapsed() && options & WrapAround) {
@@ -2874,12 +2727,9 @@
continue;
}
- // Only treat the result as a match if it is visible
- if (insideVisibleArea(resultRange.get())) {
- ++matchCount;
- if (markMatches)
- m_frame->document()->markers()->addMarker(resultRange.get(), DocumentMarker::TextMatch);
- }
+ ++matchCount;
+ if (markMatches)
+ m_frame->document()->markers()->addMarker(resultRange.get(), DocumentMarker::TextMatch);
// Stop looking if we hit the specified limit. A limit of 0 means no limit.
if (limit > 0 && matchCount >= limit)
Modified: trunk/Source/WebCore/editing/Editor.h (120004 => 120005)
--- trunk/Source/WebCore/editing/Editor.h 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/editing/Editor.h 2012-06-11 20:52:14 UTC (rev 120005)
@@ -322,10 +322,6 @@
PassRefPtr<Range> selectedRange();
- // We should make these functions private when their callers in Frame are moved over here to Editor
- bool insideVisibleArea(const LayoutPoint&) const;
- bool insideVisibleArea(Range*) const;
-
void addToKillRing(Range*, bool prepend);
void startAlternativeTextUITimer();
@@ -433,10 +429,6 @@
enum SetCompositionMode { ConfirmComposition, CancelComposition };
void setComposition(const String&, SetCompositionMode);
- PassRefPtr<Range> firstVisibleRange(const String&, FindOptions);
- PassRefPtr<Range> lastVisibleRange(const String&, FindOptions);
- PassRefPtr<Range> nextVisibleRange(Range*, const String&, FindOptions);
-
void changeSelectionAfterCommand(const VisibleSelection& newSelection, bool closeTyping, bool clearTypingStyle);
Node* findEventTargetFromSelection() const;
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (120004 => 120005)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -2933,7 +2933,7 @@
// browsing context flag set, and continue these steps as if that
// browsing context was the one that was going to be navigated instead.
if (frame == m_frame && name != "_self" && m_frame->document()->shouldDisplaySeamlesslyWithParent()) {
- for (Frame* ancestor = m_frame; ancestor; ancestor = ancestor->tree()->parent(true)) {
+ for (Frame* ancestor = m_frame; ancestor; ancestor = ancestor->tree()->parent()) {
if (!ancestor->document()->shouldDisplaySeamlesslyWithParent()) {
frame = ancestor;
break;
Modified: trunk/Source/WebCore/page/DOMWindow.cpp (120004 => 120005)
--- trunk/Source/WebCore/page/DOMWindow.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/page/DOMWindow.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -1280,7 +1280,7 @@
if (!m_frame)
return 0;
- Frame* parent = m_frame->tree()->parent(true);
+ Frame* parent = m_frame->tree()->parent();
if (parent)
return parent->domWindow();
@@ -1296,7 +1296,7 @@
if (!page)
return 0;
- return m_frame->tree()->top(true)->domWindow();
+ return m_frame->tree()->top()->domWindow();
}
Document* DOMWindow::document() const
Modified: trunk/Source/WebCore/page/EventHandler.cpp (120004 => 120005)
--- trunk/Source/WebCore/page/EventHandler.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -1079,7 +1079,7 @@
Frame* resultFrame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document()->frame() : 0;
if (Page* page = m_frame->page()) {
Frame* mainFrame = page->mainFrame();
- if (m_frame != mainFrame && resultFrame && resultFrame != mainFrame && !resultFrame->editor()->insideVisibleArea(result.point())) {
+ if (m_frame != mainFrame && resultFrame && resultFrame != mainFrame) {
FrameView* resultView = resultFrame->view();
FrameView* mainView = mainFrame->view();
if (resultView && mainView) {
Modified: trunk/Source/WebCore/page/Frame.cpp (120004 => 120005)
--- trunk/Source/WebCore/page/Frame.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/page/Frame.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -164,8 +164,6 @@
, m_orientation(0)
#endif
, m_inViewSourceMode(false)
- , m_isDisconnected(false)
- , m_excludeFromTextSearch(false)
, m_activeDOMObjectsAndAnimationsSuspendedCount(0)
{
ASSERT(page);
Modified: trunk/Source/WebCore/page/Frame.h (120004 => 120005)
--- trunk/Source/WebCore/page/Frame.h 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/page/Frame.h 2012-06-11 20:52:14 UTC (rev 120005)
@@ -119,10 +119,6 @@
// ======== All public functions below this point are candidates to move out of Frame into another class. ========
- bool isDisconnected() const;
- void setIsDisconnected(bool);
- bool excludeFromTextSearch() const;
- void setExcludeFromTextSearch(bool);
bool inScope(TreeScope*) const;
void injectUserScripts(UserScriptInjectionTime);
@@ -237,8 +233,6 @@
#endif
bool m_inViewSourceMode;
- bool m_isDisconnected;
- bool m_excludeFromTextSearch;
#if USE(TILED_BACKING_STORE)
// FIXME: The tiled backing store belongs in FrameView, not Frame.
@@ -312,26 +306,6 @@
return m_ownerElement;
}
- inline bool Frame::isDisconnected() const
- {
- return m_isDisconnected;
- }
-
- inline void Frame::setIsDisconnected(bool isDisconnected)
- {
- m_isDisconnected = isDisconnected;
- }
-
- inline bool Frame::excludeFromTextSearch() const
- {
- return m_excludeFromTextSearch;
- }
-
- inline void Frame::setExcludeFromTextSearch(bool exclude)
- {
- m_excludeFromTextSearch = exclude;
- }
-
inline bool Frame::inViewSourceMode() const
{
return m_inViewSourceMode;
Modified: trunk/Source/WebCore/page/FrameTree.cpp (120004 => 120005)
--- trunk/Source/WebCore/page/FrameTree.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/page/FrameTree.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -58,10 +58,8 @@
m_uniqueName = AtomicString();
}
-Frame* FrameTree::parent(bool checkForDisconnectedFrame) const
+Frame* FrameTree::parent() const
{
- if (checkForDisconnectedFrame && m_thisFrame->isDisconnected())
- return 0;
return m_parent;
}
@@ -383,14 +381,11 @@
return result;
}
-Frame* FrameTree::top(bool checkForDisconnectedFrame) const
+Frame* FrameTree::top() const
{
Frame* frame = m_thisFrame;
- for (Frame* parent = m_thisFrame; parent; parent = parent->tree()->parent()) {
+ for (Frame* parent = m_thisFrame; parent; parent = parent->tree()->parent())
frame = parent;
- if (checkForDisconnectedFrame && frame->isDisconnected())
- return frame;
- }
return frame;
}
Modified: trunk/Source/WebCore/page/FrameTree.h (120004 => 120005)
--- trunk/Source/WebCore/page/FrameTree.h 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/page/FrameTree.h 2012-06-11 20:52:14 UTC (rev 120005)
@@ -48,7 +48,7 @@
const AtomicString& uniqueName() const { return m_uniqueName; }
void setName(const AtomicString&);
void clearName();
- Frame* parent(bool checkForDisconnectedFrame = false) const;
+ Frame* parent() const;
void setParent(Frame* parent) { m_parent = parent; }
Frame* nextSibling() const { return m_nextSibling.get(); }
@@ -73,7 +73,7 @@
AtomicString uniqueChildName(const AtomicString& requestedName) const;
- Frame* top(bool checkForDisconnectedFrame = false) const;
+ Frame* top() const;
Frame* scopedChild(unsigned index) const;
Frame* scopedChild(const AtomicString& name) const;
Modified: trunk/Source/WebCore/page/Location.cpp (120004 => 120005)
--- trunk/Source/WebCore/page/Location.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/page/Location.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -129,7 +129,7 @@
RefPtr<DOMStringList> origins = DOMStringList::create();
if (!m_frame)
return origins.release();
- for (Frame* frame = m_frame->tree()->parent(true); frame; frame = frame->tree()->parent(true))
+ for (Frame* frame = m_frame->tree()->parent(); frame; frame = frame->tree()->parent())
origins->append(frame->document()->securityOrigin()->toString());
return origins.release();
}
Modified: trunk/Source/WebCore/xml/XMLTreeViewer.cpp (120004 => 120005)
--- trunk/Source/WebCore/xml/XMLTreeViewer.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebCore/xml/XMLTreeViewer.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -62,7 +62,7 @@
if (!m_document->frame()->page()->settings()->developerExtrasEnabled())
return false;
- if (m_document->frame()->tree()->parent(true))
+ if (m_document->frame()->tree()->parent())
return false; // This document is not in a top frame
return true;
Modified: trunk/Source/WebKit/blackberry/ChangeLog (120004 => 120005)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-06-11 20:52:14 UTC (rev 120005)
@@ -1,3 +1,13 @@
+2012-06-11 Sam Weinig <[email protected]>
+
+ Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
+ https://bugs.webkit.org/show_bug.cgi?id=88723
+
+ Reviewed by Dan Bernstein.
+
+ * WebKitSupport/InPageSearchManager.cpp:
+ (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
+
2012-06-10 Antonio Gomes <[email protected]>
[BlackBerry] Make media (<video> and <audio>) slide draggable again
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp (120004 => 120005)
--- trunk/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -279,17 +279,16 @@
continue;
}
- if (scopingFrame->editor()->insideVisibleArea(resultRange.get())) {
- ++matchCount;
- bool foundActiveMatch = false;
- if (m_locatingActiveMatch && areRangesEqual(resultRange.get(), m_activeMatch.get())) {
- foundActiveMatch = true;
- m_locatingActiveMatch = false;
- m_activeMatchIndex = m_activeMatchCount + matchCount;
- // FIXME: We need to notify client with m_activeMatchIndex.
- }
- resultRange->ownerDocument()->markers()->addTextMatchMarker(resultRange.get(), foundActiveMatch);
+ ++matchCount;
+ bool foundActiveMatch = false;
+ if (m_locatingActiveMatch && areRangesEqual(resultRange.get(), m_activeMatch.get())) {
+ foundActiveMatch = true;
+ m_locatingActiveMatch = false;
+ m_activeMatchIndex = m_activeMatchCount + matchCount;
+ // FIXME: We need to notify client with m_activeMatchIndex.
}
+ resultRange->ownerDocument()->markers()->addTextMatchMarker(resultRange.get(), foundActiveMatch);
+
searchRange->setStart(resultRange->endContainer(ec), resultRange->endOffset(ec), ec);
Node* shadowTreeRoot = searchRange->shadowTreeRootNode();
if (searchRange->collapsed(ec) && shadowTreeRoot)
Modified: trunk/Source/WebKit/chromium/ChangeLog (120004 => 120005)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-11 20:52:14 UTC (rev 120005)
@@ -1,3 +1,13 @@
+2012-06-11 Sam Weinig <[email protected]>
+
+ Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
+ https://bugs.webkit.org/show_bug.cgi?id=88723
+
+ Reviewed by Dan Bernstein.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::scopeStringMatches):
+
2012-06-11 Varun Jain <[email protected]>
[chromium] WebInputEvent::isGestureEventType should return true for GestureTwoFingerTap
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (120004 => 120005)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -1733,44 +1733,41 @@
continue;
}
- // Only treat the result as a match if it is visible
- if (frame()->editor()->insideVisibleArea(resultRange.get())) {
- ++matchCount;
+ ++matchCount;
- // Catch a special case where Find found something but doesn't know what
- // the bounding box for it is. In this case we set the first match we find
- // as the active rect.
- IntRect resultBounds = resultRange->boundingBox();
- IntRect activeSelectionRect;
- if (m_locatingActiveRect) {
- activeSelectionRect = m_activeMatch.get() ?
- m_activeMatch->boundingBox() : resultBounds;
- }
+ // Catch a special case where Find found something but doesn't know what
+ // the bounding box for it is. In this case we set the first match we find
+ // as the active rect.
+ IntRect resultBounds = resultRange->boundingBox();
+ IntRect activeSelectionRect;
+ if (m_locatingActiveRect) {
+ activeSelectionRect = m_activeMatch.get() ?
+ m_activeMatch->boundingBox() : resultBounds;
+ }
- // If the Find function found a match it will have stored where the
- // match was found in m_activeSelectionRect on the current frame. If we
- // find this rect during scoping it means we have found the active
- // tickmark.
- bool foundActiveMatch = false;
- if (m_locatingActiveRect && (activeSelectionRect == resultBounds)) {
- // We have found the active tickmark frame.
- mainFrameImpl->m_currentActiveMatchFrame = this;
- foundActiveMatch = true;
- // We also know which tickmark is active now.
- m_activeMatchIndexInCurrentFrame = matchCount - 1;
- // To stop looking for the active tickmark, we set this flag.
- m_locatingActiveRect = false;
+ // If the Find function found a match it will have stored where the
+ // match was found in m_activeSelectionRect on the current frame. If we
+ // find this rect during scoping it means we have found the active
+ // tickmark.
+ bool foundActiveMatch = false;
+ if (m_locatingActiveRect && (activeSelectionRect == resultBounds)) {
+ // We have found the active tickmark frame.
+ mainFrameImpl->m_currentActiveMatchFrame = this;
+ foundActiveMatch = true;
+ // We also know which tickmark is active now.
+ m_activeMatchIndexInCurrentFrame = matchCount - 1;
+ // To stop looking for the active tickmark, we set this flag.
+ m_locatingActiveRect = false;
- // Notify browser of new location for the selected rectangle.
- reportFindInPageSelection(
- frameView()->contentsToWindow(resultBounds),
- m_activeMatchIndexInCurrentFrame + 1,
- identifier);
- }
-
- addMarker(resultRange.get(), foundActiveMatch);
+ // Notify browser of new location for the selected rectangle.
+ reportFindInPageSelection(
+ frameView()->contentsToWindow(resultBounds),
+ m_activeMatchIndexInCurrentFrame + 1,
+ identifier);
}
+ addMarker(resultRange.get(), foundActiveMatch);
+
// Set the new start for the search range to be the end of the previous
// result range. There is no need to use a VisiblePosition here,
// since findPlainText will use a TextIterator to go over the visible
Modified: trunk/Source/WebKit/mac/ChangeLog (120004 => 120005)
--- trunk/Source/WebKit/mac/ChangeLog 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-06-11 20:52:14 UTC (rev 120005)
@@ -1,3 +1,14 @@
+2012-06-11 Sam Weinig <[email protected]>
+
+ Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
+ https://bugs.webkit.org/show_bug.cgi?id=88723
+
+ Reviewed by Dan Bernstein.
+
+ * WebView/WebFrame.mm:
+ * WebView/WebFramePrivate.h:
+ Remove -[WebFrame _setIsDisconnected:] and -[WebFrame _setExcludeFromTextSearch:]
+
2012-06-10 Sheriff Bot <[email protected]>
Unreviewed, rolling out r119955.
Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (120004 => 120005)
--- trunk/Source/WebKit/mac/WebView/WebFrame.mm 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm 2012-06-11 20:52:14 UTC (rev 120005)
@@ -910,16 +910,6 @@
return _private->coreFrame->domWindow()->pendingUnloadEventListeners();
}
-- (void)_setIsDisconnected:(bool)isDisconnected
-{
- _private->coreFrame->setIsDisconnected(isDisconnected);
-}
-
-- (void)_setExcludeFromTextSearch:(bool)exclude
-{
- _private->coreFrame->setExcludeFromTextSearch(exclude);
-}
-
#if ENABLE(NETSCAPE_PLUGIN_API)
- (void)_recursive_resumeNullEventsForAllNetscapePlugins
{
Modified: trunk/Source/WebKit/mac/WebView/WebFramePrivate.h (120004 => 120005)
--- trunk/Source/WebKit/mac/WebView/WebFramePrivate.h 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebKit/mac/WebView/WebFramePrivate.h 2012-06-11 20:52:14 UTC (rev 120005)
@@ -87,9 +87,6 @@
- (unsigned)_pendingFrameUnloadEventCount;
-- (void)_setIsDisconnected:(bool)isDisconnected;
-- (void)_setExcludeFromTextSearch:(bool)exclude;
-
#if ENABLE_NETSCAPE_PLUGIN_API
- (void)_recursive_resumeNullEventsForAllNetscapePlugins;
- (void)_recursive_pauseNullEventsForAllNetscapePlugins;
Modified: trunk/Source/WebKit/win/ChangeLog (120004 => 120005)
--- trunk/Source/WebKit/win/ChangeLog 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebKit/win/ChangeLog 2012-06-11 20:52:14 UTC (rev 120005)
@@ -1,3 +1,15 @@
+2012-06-11 Sam Weinig <[email protected]>
+
+ Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
+ https://bugs.webkit.org/show_bug.cgi?id=88723
+
+ Reviewed by Dan Bernstein.
+
+ * WebFrame.cpp:
+ (WebFrame::setIsDisconnected):
+ (WebFrame::setExcludeFromTextSearch):
+ Stop doing anything in these functions.
+
2012-06-10 Sheriff Bot <[email protected]>
Unreviewed, rolling out r119955.
Modified: trunk/Source/WebKit/win/WebFrame.cpp (120004 => 120005)
--- trunk/Source/WebKit/win/WebFrame.cpp 2012-06-11 20:30:42 UTC (rev 120004)
+++ trunk/Source/WebKit/win/WebFrame.cpp 2012-06-11 20:52:14 UTC (rev 120005)
@@ -298,22 +298,12 @@
HRESULT STDMETHODCALLTYPE WebFrame::setIsDisconnected(
/* [in] */ BOOL flag)
{
- if (Frame* frame = core(this)) {
- frame->setIsDisconnected(flag);
- return S_OK;
- }
-
return E_FAIL;
}
HRESULT STDMETHODCALLTYPE WebFrame::setExcludeFromTextSearch(
/* [in] */ BOOL flag)
{
- if (Frame* frame = core(this)) {
- frame->setExcludeFromTextSearch(flag);
- return S_OK;
- }
-
return E_FAIL;
}