|
|
Created:
4 years, 4 months ago by paulmeyer Modified:
4 years, 3 months ago Reviewers:
esprehn CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, jam, kinuko+watch, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, site-isolation-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix find-in-page re-scope across frame boundaries.
There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate.
This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed.
BUG=618937, 627799
Committed: https://crrev.com/b6f12c557fb9b1468ba6f6da5f55cc7cefc045b0
Cr-Commit-Position: refs/heads/master@{#412025}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Rebase after refactor. #
Total comments: 1
Patch Set 3 : Added test. Using |activeNow| a bit differently now. #Patch Set 4 : Rebased #Patch Set 5 : Fix in test. #
Messages
Total messages: 49 (34 generated)
Description was changed from ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in the frame, which might need to wrap back around to the firs match. If there are not many matches in that frame, this is not really noticeable excpet for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can seriously slow down the find request and you can see all of the ticks in the tickbar regenerate. This patch removes the check for |is_active| in RenderFrameImpl::OnFind(), since that check is meaningless now that FindRequestManager handles this case in the browser. This fixes the bug described here, but introduces a new (but rarely occuring) bug that can cause find-in-page to fail if a huge number of requests are sent at once, and the requests cross a frame boundary from a frame that has been searched completely to a frame that is still scoping. The fix for this is to check whether the frame is still scoping during OnFind(). BUG=618937,627799 ========== to ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch removes the check for |is_active| in RenderFrameImpl::OnFind(), since that check is meaningless now that FindRequestManager handles this case in the browser. This fixes the bug described here, but introduces a new (but rarely occurring) bug that can cause find-in-page to fail if a huge number of requests are sent at once, and the requests cross a frame boundary from a frame that has been searched completely to a frame that is still scoping. The fix for this is to check whether the frame is still scoping during OnFind(). BUG=618937,627799 ==========
paulmeyer@chromium.org changed reviewers: + dcheng@chromium.org
https://codereview.chromium.org/2186113002/diff/1/content/renderer/render_fra... File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2186113002/diff/1/content/renderer/render_fra... content/renderer/render_frame_impl.cc:5245: !frame_->scopingInProgress()) { Is this an urgent fix? I think we should explore moving these bits back into Blink rather than exposing more functions in the public API. WDYT?
On 2016/07/28 02:11:45, dcheng (OOO Aug 1 - Aug 11) wrote: > https://codereview.chromium.org/2186113002/diff/1/content/renderer/render_fra... > File content/renderer/render_frame_impl.cc (right): > > https://codereview.chromium.org/2186113002/diff/1/content/renderer/render_fra... > content/renderer/render_frame_impl.cc:5245: !frame_->scopingInProgress()) { > Is this an urgent fix? I think we should explore moving these bits back into > Blink rather than exposing more functions in the public API. WDYT? That sounds reasonable. I have another patch almost ready that will both remove the need for exposing this new API, as well as remove three existing find-related Blink APIs.
The CQ bit was checked by paulmeyer@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch removes the check for |is_active| in RenderFrameImpl::OnFind(), since that check is meaningless now that FindRequestManager handles this case in the browser. This fixes the bug described here, but introduces a new (but rarely occurring) bug that can cause find-in-page to fail if a huge number of requests are sent at once, and the requests cross a frame boundary from a frame that has been searched completely to a frame that is still scoping. The fix for this is to check whether the frame is still scoping during OnFind(). BUG=618937,627799 ========== to ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch removes the check for |isActive| in WebLocalFrameImpl::requestFind(), since that check is not needed now that FindRequestManager handles this case in the browser. This removal fixes the bug described here, but introduces a new (but rarely occurring) bug that can cause find-in-page to fail if a huge number of requests are sent at once, and the requests cross a frame boundary from a frame that has been searched completely to a frame that is still scoping. The fix for this is to check whether the frame is still scoping requestFind(). BUG=618937,627799 ==========
paulmeyer@chromium.org changed reviewers: - dcheng@chromium.org
paulmeyer@chromium.org changed reviewers: + esprehn@chromium.org
-dcheng@ (vacation) +esprehn@
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch removes the check for |isActive| in WebLocalFrameImpl::requestFind(), since that check is not needed now that FindRequestManager handles this case in the browser. This removal fixes the bug described here, but introduces a new (but rarely occurring) bug that can cause find-in-page to fail if a huge number of requests are sent at once, and the requests cross a frame boundary from a frame that has been searched completely to a frame that is still scoping. The fix for this is to check whether the frame is still scoping requestFind(). BUG=618937,627799 ========== to ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch removes the check for |isActive| in WebLocalFrameImpl::requestFind(), since that check is not needed now that FindRequestManager handles this case in the browser. This removal fixes the bug described here, but introduces a new (but rarely occurring) bug that can cause find-in-page to fail if a huge number of requests are sent at once, and the requests cross a frame boundary from a frame that has been searched completely to a frame that is still scoping. The fix for this is to check whether the frame is still scoping requestFind(). BUG=618937,627799 ==========
What is "scoping" ? I worry a lot we're doubling down on a lot of complexity around isActive and friends and that something much simpler for find in page in general is the real solution.
On 2016/08/10 04:16:45, esprehn wrote: > What is "scoping" ? I worry a lot we're doubling down on a lot of complexity > around isActive and friends and that something much simpler for find in page in > general is the real solution. "scoping" just means searching the frame for matches. I'm personally not sure why it's called that, but the term was around before I started working on this. As for reducing complexity, I'm always for that! There are a few non-FIP things on my plate that I need to get to shortly, but I'd love to come back and improve FIP some more in the future. For now though, were there any specific concerns you have about this fix? Bug 627799 is fairly pressing at the moment and I'd like to get this fix in as soon as possible.
What about tests? I guess lgtm, but without some tests we're just going to keep breaking find in page.
https://codereview.chromium.org/2186113002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/web/WebLocalFrameImpl.cpp (right): https://codereview.chromium.org/2186113002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/web/WebLocalFrameImpl.cpp:1996: if (options.findNext && currentSelection.isNull() && !textFinder()->scopingInProgress()) { Actually this means the activeNow bool in this function is just ignored, why is that correct? What's the purpose of activeNow if we don't use it?
Description was changed from ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch removes the check for |isActive| in WebLocalFrameImpl::requestFind(), since that check is not needed now that FindRequestManager handles this case in the browser. This removal fixes the bug described here, but introduces a new (but rarely occurring) bug that can cause find-in-page to fail if a huge number of requests are sent at once, and the requests cross a frame boundary from a frame that has been searched completely to a frame that is still scoping. The fix for this is to check whether the frame is still scoping requestFind(). BUG=618937,627799 ========== to ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed. BUG=618937,627799 ==========
Patchset #3 (id:40001) has been deleted
Description was changed from ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed. BUG=618937,627799 ========== to ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed. BUG=618937,627799 ==========
Description was changed from ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed. BUG=618937,627799 ========== to ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed. BUG=618937,627799 ==========
Patchset #4 (id:80001) has been deleted
On 2016/08/11 09:40:01, esprehn wrote: > https://codereview.chromium.org/2186113002/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/web/WebLocalFrameImpl.cpp (right): > > https://codereview.chromium.org/2186113002/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/web/WebLocalFrameImpl.cpp:1996: if (options.findNext > && currentSelection.isNull() && !textFinder()->scopingInProgress()) { > Actually this means the activeNow bool in this function is just ignored, why is > that correct? What's the purpose of activeNow if we don't use it? I've added a test. Also, I noticed that |ActiveNow| wasn't used anymore in my original patch, but forgot to remove it again after the refactor. That being said, I see that without being used here, it's ONLY ever used in tests, in which case it doesn't make sense to have the parameter at all. Because of this, I looked into the original patch that added |activeNow| to better understand it, and it turns out that there is some functionality that would be missing if I take it out completely. I didn't realize that before since there are NO TESTS that test this functionality (there really should be, so I think I'll just write one myself in a subsequent CL). In any case, I've reworked the conditions under which scoping occurs a bit more so that I can keep |activeNow| but still not re-scope at unnecessary times. PTAL.
The CQ bit was checked by paulmeyer@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...)
The CQ bit was checked by paulmeyer@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #4 (id:100001) has been deleted
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...) win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by paulmeyer@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by paulmeyer@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from esprehn@chromium.org Link to the patchset: https://codereview.chromium.org/2186113002/#ps120001 (title: "Rebased")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed. BUG=618937,627799 ========== to ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed. BUG=618937,627799 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:120001)
Message was sent while issue was closed.
Description was changed from ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed. BUG=618937,627799 ========== to ========== Fix find-in-page re-scope across frame boundaries. There is a bug that can cause a frame to be re-scoped (all matches searched again) when issuing a find next request across a frame boundary, such as from the last match in a frame, which might need to wrap back around to the first match in the same frame. If there are not many matches in that frame, this is not really noticeable except for the ticks in the tickbar sometimes disappearing for a single frame. However, on a page with a huge number of results, this can dramatically slow down the find request and you can clearly see all of the ticks in the tickbar regenerate. This patch adjusts the conditions under which a frame is determined to need scoping in WebLocalFrameImpl::requestFind(), in order to not re-scope across frame boundaries but continue to scope in all the cases where it IS needed. BUG=618937,627799 Committed: https://crrev.com/b6f12c557fb9b1468ba6f6da5f55cc7cefc045b0 Cr-Commit-Position: refs/heads/master@{#412025} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/b6f12c557fb9b1468ba6f6da5f55cc7cefc045b0 Cr-Commit-Position: refs/heads/master@{#412025}
Message was sent while issue was closed.
On 2016/08/12 18:30:30, paulmeyer wrote: > On 2016/08/11 09:40:01, esprehn wrote: > > > https://codereview.chromium.org/2186113002/diff/20001/third_party/WebKit/Sour... > > File third_party/WebKit/Source/web/WebLocalFrameImpl.cpp (right): > > > > > https://codereview.chromium.org/2186113002/diff/20001/third_party/WebKit/Sour... > > third_party/WebKit/Source/web/WebLocalFrameImpl.cpp:1996: if (options.findNext > > && currentSelection.isNull() && !textFinder()->scopingInProgress()) { > > Actually this means the activeNow bool in this function is just ignored, why > is > > that correct? What's the purpose of activeNow if we don't use it? > > I've added a test. > > Also, I noticed that |ActiveNow| wasn't used anymore in my original patch, but > forgot to remove it again after the refactor. That being said, I see that > without being used here, it's ONLY ever used in tests, in which case it doesn't > make sense to have the parameter at all. Because of this, I looked into the > original patch that added |activeNow| to better understand it, and it turns out > that there is some functionality that would be missing if I take it out > completely. I didn't realize that before since there are NO TESTS that test this > functionality (there really should be, so I think I'll just write one myself in > a subsequent CL). In any case, I've reworked the conditions under which scoping > occurs a bit more so that I can keep |activeNow| but still not re-scope at > unnecessary times. > > PTAL. I see that you're away for awhile and I haven't changed much other than adding a test and addressing your comment about |ActiveNow| since you LGTM'd, so I committed the patch. Free free to look it over again though and let me know if you have any concerns with the test or anything else.
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:120001) has been created in https://codereview.chromium.org/2241183003/ by bsep@chromium.org. The reason for reverting is: Multiple bots are timing out on FindRequestManagerTest.RemoveFrame/1 since this patch landed. No one else has touched FindRequestManagerTests recently..
Message was sent while issue was closed.
On 2016/08/15 22:13:45, Bret Sepulveda wrote: > A revert of this CL (patchset #4 id:120001) has been created in > https://codereview.chromium.org/2241183003/ by mailto:bsep@chromium.org. > > The reason for reverting is: Multiple bots are timing out on > FindRequestManagerTest.RemoveFrame/1 since this patch landed. No one else has > touched FindRequestManagerTests recently.. Example failure: https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%2... content_browsertests is failing, reporting FindRequestManagerTests/FindRequestManagerTest.RemoveFrame/1 as timed out
Message was sent while issue was closed.
Patchset #6 (id:160001) has been deleted |