commit | 7874491254982eea1ea5dfb254e24073412d4f96 | [log] [tgz] |
---|---|---|
author | danakj <danakj@chromium.org> | Fri Nov 30 23:46:42 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Nov 30 23:46:42 2018 |
tree | f7caefee57efacb6a82b9317c3a0300dcc1f1fb8 | |
parent | 92eb7422833e281d5e834c0cccee81c9f83af87b [diff] |
Remove kPrerender visibility from the renderer. Change all PageVisibilityState enums to be just booleans of hidden or not in the renderer side code. Prerender state is not needed any more there for correctness. The only places that check explictly for prerender are to generate strings, or in RenderFrameImpl in order to pass a bool along. We can remove the former and pass along the bool more explicitly in the latter case since RenderFrameImpl can query if prerendering is taking place for the frame. There are a few places that check for == kVisible or != kVisible. For the == kVisible, prerendering is only used while the frame is not visible per the comment being deleted in prerender_helper.h. So this should not change behaviour as prerender == hidden from this perspective. For places that check == kHidden or != kHidden it could be a new behaviour when it would have been kPrerender before: Document::DispatchUnloadEvents() would if !kHidden then dispatch a visibility change event. This would have occured if going to prerender during unload. Since prerender is for pre-loading this seems okay to not happen anymore. LocalFrameView::ShouldSetCursor() would return true during prerender. This is part of event handling which is after the page is transitioned out of prerender state, so it should be okay to return false during prerender now. This also removes "prerender" from layout tests. Layout tests set a prerender visibility state, which would just set to hidden internally, and verify it works like hidden. Since prerender no longer exists in the renderer, these tests would just be testing hidden twice, and we can remove the prerender bits. R=avi@chromium.org, dcheng@chromium.org, pasko@chromium.org TBR=avi Change-Id: I914f47f49b41cbf8080ff6271c2896c1a5dbf569 Bug: 908582 Reviewed-on: https://chromium-review.googlesource.com/c/1356120 Reviewed-by: danakj <danakj@chromium.org> Reviewed-by: Ken Buchanan <kenrb@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Egor Pasko <pasko@chromium.org> Commit-Queue: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/master@{#612849}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .