OLD | NEW |
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 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 | 2243 |
2244 bool WebLocalFrameImpl::find(int identifier, | 2244 bool WebLocalFrameImpl::find(int identifier, |
2245 const WebString& searchText, | 2245 const WebString& searchText, |
2246 const WebFindOptions& options, | 2246 const WebFindOptions& options, |
2247 bool wrapWithinFrame, | 2247 bool wrapWithinFrame, |
2248 bool* activeNow) { | 2248 bool* activeNow) { |
2249 if (!frame()) | 2249 if (!frame()) |
2250 return false; | 2250 return false; |
2251 | 2251 |
2252 // Unlikely, but just in case we try to find-in-page on a detached frame. | 2252 // Unlikely, but just in case we try to find-in-page on a detached frame. |
2253 DCHECK(frame()->host()); | 2253 DCHECK(frame()->page()); |
2254 | 2254 |
2255 // Up-to-date, clean tree is required for finding text in page, since it | 2255 // Up-to-date, clean tree is required for finding text in page, since it |
2256 // relies on TextIterator to look over the text. | 2256 // relies on TextIterator to look over the text. |
2257 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 2257 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
2258 | 2258 |
2259 return ensureTextFinder().find(identifier, searchText, options, | 2259 return ensureTextFinder().find(identifier, searchText, options, |
2260 wrapWithinFrame, activeNow); | 2260 wrapWithinFrame, activeNow); |
2261 } | 2261 } |
2262 | 2262 |
2263 void WebLocalFrameImpl::stopFinding(StopFindAction action) { | 2263 void WebLocalFrameImpl::stopFinding(StopFindAction action) { |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2503 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2503 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
2504 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2504 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2505 } else { | 2505 } else { |
2506 clipHtml = | 2506 clipHtml = |
2507 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2507 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
2508 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2508 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2509 } | 2509 } |
2510 } | 2510 } |
2511 | 2511 |
2512 } // namespace blink | 2512 } // namespace blink |
OLD | NEW |