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

Issue 2134723002: Reland #1: Fix re-usage of stale cached WebPreferences in RenderViewHost. (Closed)

Created:
4 years, 5 months ago by carlosk
Modified:
4 years, 5 months ago
Reviewers:
Dirk Pranke, Mike West
CC:
blink-reviews, chromium-reviews, clamy, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, nasko, Peter Beverloo
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland #1: Fix re-usage of stale cached WebPreferences in RenderViewHost. (original change: https://codereview.chromium.org/2042763002) In layout tests when preferences were being overridden by specific tests they were not being properly applied in the browser. The WebPreferences cached by the RenderViewHost was not updated and so they would not effect the existing window. This fixes that and changes the way spatial navigation is enabled in layout tests to adapt to this change. The problem the original change that caused it to be reverted was that it made preferences leak between tests when the Shell window was reused. This version fixes that by storing a clean copy of the test-ready WebPrecerences created with a brand new RenderView and using that to reset existing windows' preferences. This is an spin off change to support the moving of mixed content checks to the browser, which requires the browser to be immediately effected by preferences updates. BUG=576270, 620126 Committed: https://crrev.com/d4c23ca618abaeeeba8b7f707bb2b1cb4460d642 Cr-Commit-Position: refs/heads/master@{#404627}

Patch Set 1 : Original change code. #

Patch Set 2 : Cleanly reset WebPreferences with the initial untampered defaults. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -50 lines) Patch
M components/test_runner/test_preferences.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/test_runner/test_preferences.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/test_runner/test_runner.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/shell/browser/layout_test/blink_test_controller.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/shell/browser/layout_test/blink_test_controller.cc View 1 3 chunks +12 lines, -3 lines 2 comments Download
M content/shell/renderer/layout_test/blink_test_helpers.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/shell/renderer/layout_test/blink_test_helpers.cc View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-1st-stop.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-aligned-not-aligned.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-clipped-overflowed-content.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-container-only-white-space.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-container-white-space.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-date.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-div-in-anchor.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-div-overflow-scrol-hidden.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-fully-aligned-horizontally.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-fully-aligned-vertically.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-hidden-focusable-element.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-hidden-iframe.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-hidden-iframe-zero-size.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-nested.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-no-focusable-content.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-no-scrollable-content.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-recursive-offset-parent.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-imagemap-area-not-focusable.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-imagemap-area-without-image.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-imagemap-simple.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-input.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-media-elements.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-multiple-select.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-multiple-select-focusring.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-not-below.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-not-rightof.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-offscreen-content.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-only-clipped-overflow-content.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-overlapping-elements.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-radio.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-radio-group.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-simple-content-overflow.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-single-select.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-single-select-list.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-symmetrically-positioned.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-table-traversal.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-textarea.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-tiny-table-traversal.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-two-elements-one-line.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-z-index.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-zero-margin-content.html View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (5 generated)
carlosk
mkwst@, dpranke@ PTAL. More details on the investigation leading to this fix can be found ...
4 years, 5 months ago (2016-07-08 13:03:17 UTC) #3
Mike West
https://codereview.chromium.org/2134723002/diff/20001/content/shell/browser/layout_test/blink_test_controller.cc File content/shell/browser/layout_test/blink_test_controller.cc (left): https://codereview.chromium.org/2134723002/diff/20001/content/shell/browser/layout_test/blink_test_controller.cc#oldcode313 content/shell/browser/layout_test/blink_test_controller.cc:313: OverrideWebkitPrefs(&prefs); I think you still need to call this ...
4 years, 5 months ago (2016-07-08 13:16:37 UTC) #4
Dirk Pranke
I defer to mkwst@ here. lgtm if he's happy.
4 years, 5 months ago (2016-07-08 19:43:08 UTC) #5
carlosk
Thanks. https://codereview.chromium.org/2134723002/diff/20001/content/shell/browser/layout_test/blink_test_controller.cc File content/shell/browser/layout_test/blink_test_controller.cc (left): https://codereview.chromium.org/2134723002/diff/20001/content/shell/browser/layout_test/blink_test_controller.cc#oldcode313 content/shell/browser/layout_test/blink_test_controller.cc:313: OverrideWebkitPrefs(&prefs); On 2016/07/08 13:16:37, Mike West wrote: > ...
4 years, 5 months ago (2016-07-11 08:21:00 UTC) #6
Mike West
Thanks, the bots are happy too, so LGTM.
4 years, 5 months ago (2016-07-11 09:23:04 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2134723002/20001
4 years, 5 months ago (2016-07-11 09:24:39 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-07-11 10:34:19 UTC) #11
commit-bot: I haz the power
4 years, 5 months ago (2016-07-11 10:36:20 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d4c23ca618abaeeeba8b7f707bb2b1cb4460d642
Cr-Commit-Position: refs/heads/master@{#404627}

Powered by Google App Engine
This is Rietveld 408576698