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

Issue 2860583002: Properly check visibility of check_connection_header (Closed)

Created:
3 years, 7 months ago by Nate Fischer
Modified:
3 years, 7 months ago
Reviewers:
mmenke
CC:
cbentzel+watch_chromium.org, chromium-reviews, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Properly check visibility of check_connection_header No change in production logic. Because the mobile page layout hides elements using 'opacity = 0' instead of 'display: none', it's not sufficient to only check the innerText to see if text is visible on the page. Elements with opacity = 0 still show up in body.innerText. Unfortunately, we can't simply check opacity, because opacity changes via CSS transition. Elements may still have opacity = 0 immediately after they're un-hidden, since the CSS transition takes time. Instead, we check the classList of the details element to determine if it's visible, since a hidden details element implies that its child nodes are also hidden. This CL adds a function for determining the visibility of details and uses it when checking if IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_HEADER is displayed, since this check isn't compatible with mobile layout. BUG=717326 Review-Url: https://codereview.chromium.org/2860583002 Cr-Commit-Position: refs/heads/master@{#469758} Committed: https://chromium.googlesource.com/chromium/src/+/f1a3058bf88ee945ab8e5ead543a3b7450710925

Patch Set 1 #

Total comments: 3

Patch Set 2 : Recursively check visibility of parent elements #

Total comments: 8

Patch Set 3 : Address reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -9 lines) Patch
M chrome/browser/net/errorpage_browsertest.cc View 1 2 3 chunks +21 lines, -9 lines 0 comments Download

Messages

Total messages: 32 (18 generated)
Nate Fischer
PTAL
3 years, 7 months ago (2017-05-02 22:22:06 UTC) #8
Nate Fischer
On 2017/05/02 at 22:22:06, Nate Fischer wrote: > PTAL This is another blocker for http://crrev/2848733002 ...
3 years, 7 months ago (2017-05-02 22:24:22 UTC) #9
mmenke
https://codereview.chromium.org/2860583002/diff/1/chrome/browser/net/errorpage_browsertest.cc File chrome/browser/net/errorpage_browsertest.cc (right): https://codereview.chromium.org/2860583002/diff/1/chrome/browser/net/errorpage_browsertest.cc#newcode110 chrome/browser/net/errorpage_browsertest.cc:110: bool WARN_UNUSED_RESULT IsDisplayingDetails(Browser* browser) { Could we instead make ...
3 years, 7 months ago (2017-05-03 15:10:59 UTC) #10
Nate Fischer
https://codereview.chromium.org/2860583002/diff/1/chrome/browser/net/errorpage_browsertest.cc File chrome/browser/net/errorpage_browsertest.cc (right): https://codereview.chromium.org/2860583002/diff/1/chrome/browser/net/errorpage_browsertest.cc#newcode110 chrome/browser/net/errorpage_browsertest.cc:110: bool WARN_UNUSED_RESULT IsDisplayingDetails(Browser* browser) { On 2017/05/03 at 15:10:59, ...
3 years, 7 months ago (2017-05-03 17:54:43 UTC) #11
mmenke
On 2017/05/03 17:54:43, Nate Fischer wrote: > https://codereview.chromium.org/2860583002/diff/1/chrome/browser/net/errorpage_browsertest.cc > File chrome/browser/net/errorpage_browsertest.cc (right): > > https://codereview.chromium.org/2860583002/diff/1/chrome/browser/net/errorpage_browsertest.cc#newcode110 ...
3 years, 7 months ago (2017-05-03 17:57:38 UTC) #12
Nate Fischer
On 2017/05/03 at 17:57:38, mmenke wrote: > On 2017/05/03 17:54:43, Nate Fischer wrote: > > ...
3 years, 7 months ago (2017-05-03 17:59:34 UTC) #13
mmenke
Sorry for the delay, made this comment this morning, but forgot to publish it. https://codereview.chromium.org/2860583002/diff/1/chrome/browser/net/errorpage_browsertest.cc ...
3 years, 7 months ago (2017-05-04 19:03:33 UTC) #14
Nate Fischer
On 2017/05/04 19:03:33, mmenke wrote: > Sorry for the delay, made this comment this morning, ...
3 years, 7 months ago (2017-05-04 23:13:12 UTC) #17
mmenke
LGTM! I'll plan to take another look before you land, but I don't feel like ...
3 years, 7 months ago (2017-05-05 14:47:20 UTC) #20
mmenke
https://codereview.chromium.org/2860583002/diff/20001/chrome/browser/net/errorpage_browsertest.cc File chrome/browser/net/errorpage_browsertest.cc (right): https://codereview.chromium.org/2860583002/diff/20001/chrome/browser/net/errorpage_browsertest.cc#newcode111 chrome/browser/net/errorpage_browsertest.cc:111: var isVisible = Boolean(node && isNodeVisible(node)); If you follow ...
3 years, 7 months ago (2017-05-05 14:52:45 UTC) #21
Nate Fischer
Thanks, Matt! I tested this against mobile and desktop layouts and everything seems good. Let ...
3 years, 7 months ago (2017-05-05 17:05:56 UTC) #24
mmenke
Still LGTM, thanks for taking the extra time to do this!
3 years, 7 months ago (2017-05-05 17:08:16 UTC) #25
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/2860583002/40001
3 years, 7 months ago (2017-05-05 19:32:07 UTC) #29
commit-bot: I haz the power
3 years, 7 months ago (2017-05-05 19:38:31 UTC) #32
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/f1a3058bf88ee945ab8e5ead543a...

Powered by Google App Engine
This is Rietveld 408576698