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 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1933 } | 1933 } |
1934 | 1934 |
1935 void WebLocalFrameImpl::didCallIsSearchProviderInstalled() | 1935 void WebLocalFrameImpl::didCallIsSearchProviderInstalled() |
1936 { | 1936 { |
1937 UseCounter::count(frame(), UseCounter::ExternalIsSearchProviderInstalled); | 1937 UseCounter::count(frame(), UseCounter::ExternalIsSearchProviderInstalled); |
1938 } | 1938 } |
1939 | 1939 |
1940 void WebLocalFrameImpl::requestFind(int identifier, const WebString& searchText, const WebFindOptions& options) | 1940 void WebLocalFrameImpl::requestFind(int identifier, const WebString& searchText, const WebFindOptions& options) |
1941 { | 1941 { |
1942 // Send "no results" if this frame has no visible content. | 1942 // Send "no results" if this frame has no visible content. |
1943 if (!hasVisibleContent()) { | 1943 if (!hasVisibleContent() && !options.force) { |
dcheng
2016/09/21 07:15:44
Why do we want to force a research if the frame's
paulmeyer
2016/09/21 15:40:52
This is because hasVisibleContent() is not perfect
dcheng
2016/09/22 00:36:47
Hmm, what are the cases where it's wrong? Would it
paulmeyer
2016/09/22 15:11:42
Okay, I'll try to file a bug. It's been a while si
| |
1944 client()->reportFindInPageMatchCount(identifier, 0 /* count */, true /* finalUpdate */); | 1944 client()->reportFindInPageMatchCount(identifier, 0 /* count */, true /* finalUpdate */); |
1945 return; | 1945 return; |
1946 } | 1946 } |
1947 | 1947 |
1948 WebRange currentSelection = selectionRange(); | 1948 WebRange currentSelection = selectionRange(); |
1949 bool result = false; | 1949 bool result = false; |
1950 bool activeNow = false; | 1950 bool activeNow = false; |
1951 | 1951 |
1952 // Search for an active match only if this frame is focused or if this is a | 1952 // Search for an active match only if this frame is focused or if this is a |
1953 // find next request. | 1953 // find next request. |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2202 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2202 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
2203 } else if (metric == "wasAlternateProtocolAvailable") { | 2203 } else if (metric == "wasAlternateProtocolAvailable") { |
2204 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2204 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
2205 } else if (metric == "connectionInfo") { | 2205 } else if (metric == "connectionInfo") { |
2206 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2206 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
2207 } | 2207 } |
2208 UseCounter::count(frame(), feature); | 2208 UseCounter::count(frame(), feature); |
2209 } | 2209 } |
2210 | 2210 |
2211 } // namespace blink | 2211 } // namespace blink |
OLD | NEW |