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

Side by Side Diff: Source/WebKit/chromium/src/WebFrameImpl.cpp

Issue 11343020: Merge 132746 (partial) - [Chromium] Find-in-page reports matches in hidden iframes (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | 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 2558 matching lines...) Expand 10 before | Expand all | Expand 10 after
2569 if (it->m_lastMatchCount > 0) 2569 if (it->m_lastMatchCount > 0)
2570 ordinal += it->m_lastMatchCount; 2570 ordinal += it->m_lastMatchCount;
2571 } 2571 }
2572 return ordinal; 2572 return ordinal;
2573 } 2573 }
2574 2574
2575 bool WebFrameImpl::shouldScopeMatches(const String& searchText) 2575 bool WebFrameImpl::shouldScopeMatches(const String& searchText)
2576 { 2576 {
2577 // Don't scope if we can't find a frame or a view. 2577 // Don't scope if we can't find a frame or a view.
2578 // The user may have closed the tab/application, so abort. 2578 // The user may have closed the tab/application, so abort.
2579 if (!frame() || !frame()->view()) 2579 if (!frame() || !frame()->view() || !hasVisibleContent())
2580 return false; 2580 return false;
2581 2581
2582 ASSERT(frame()->document() && frame()->view()); 2582 ASSERT(frame()->document() && frame()->view());
2583 2583
2584 // If the frame completed the scoping operation and found 0 matches the last 2584 // If the frame completed the scoping operation and found 0 matches the last
2585 // time it was searched, then we don't have to search it again if the user i s 2585 // time it was searched, then we don't have to search it again if the user i s
2586 // just adding to the search string or sending the same search string again. 2586 // just adding to the search string or sending the same search string again.
2587 if (m_lastFindRequestCompletedWithNoMatches && !m_lastSearchString.isEmpty() ) { 2587 if (m_lastFindRequestCompletedWithNoMatches && !m_lastSearchString.isEmpty() ) {
2588 // Check to see if the search string prefixes match. 2588 // Check to see if the search string prefixes match.
2589 String previousSearchPrefix = 2589 String previousSearchPrefix =
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2658 2658
2659 String scriptResult; 2659 String scriptResult;
2660 if (!result.getString(scriptResult)) 2660 if (!result.getString(scriptResult))
2661 return; 2661 return;
2662 2662
2663 if (!m_frame->navigationScheduler()->locationChangePending()) 2663 if (!m_frame->navigationScheduler()->locationChangePending())
2664 m_frame->document()->loader()->writer()->replaceDocument(scriptResult, o wnerDocument.get()); 2664 m_frame->document()->loader()->writer()->replaceDocument(scriptResult, o wnerDocument.get());
2665 } 2665 }
2666 2666
2667 } // namespace WebKit 2667 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698