Fix broken data-hidden-from-search=true search result

VERIFIED FIXED in Firefox 55

Status

()

Firefox
Preferences
P1
normal
VERIFIED FIXED
6 months ago
5 months ago

People

(Reporter: rickychien, Assigned: rickychien)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 55
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify +

Firefox Tracking Flags

(firefox55 verified)

Details

(Whiteboard: [photon-preference])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

6 months ago
It was a mistake after applying the wrong search query selector in bug 1357352.

let rootPreferencesChildren = rootPreferences.querySelectorAll(":not([data-hidden-from-search])");

right now, the search result is weird and broken and the no result page always show empty. I'll submit a quick patch for that.
Comment hidden (mozreview-request)

Updated

6 months ago
Flags: qe-verify+
QA Contact: hani.yacoub
Comment hidden (mozreview-request)
Comment on attachment 8865487 [details]
Bug 1363062 - Fix broken data-hidden-from-search=true search result

https://reviewboard.mozilla.org/r/137132/#review140628

::: browser/components/preferences/in-content/findInPage.js:205
(Diff revision 2)
> -      let rootPreferences = document.getElementById("mainPrefPane")
> -      let rootPreferencesChildren = rootPreferences
> +      let rootPreferencesChildren = document
> +        .querySelectorAll("#mainPrefPane > *:not([data-hidden-from-search])");
> -        .querySelectorAll(":not([data-hidden-from-search])");

Can you explain why the original query is broken?
(Assignee)

Comment 4

6 months ago
mozreview-review-reply
Comment on attachment 8865487 [details]
Bug 1363062 - Fix broken data-hidden-from-search=true search result

https://reviewboard.mozilla.org/r/137132/#review140628

> Can you explain why the original query is broken?

The original query is `let rootPreferencesChildren = rootPreferences.children;` (see https://reviewboard.mozilla.org/r/135706/diff/4#index_header)

which merely gets first level children from rootPreferences node. The `rootPreferences.querySelectorAll` will try to look through all descendant elements of rootPreferences.
(Assignee)

Updated

6 months ago
Flags: needinfo?(mconley)
Comment on attachment 8865487 [details]
Bug 1363062 - Fix broken data-hidden-from-search=true search result

https://reviewboard.mozilla.org/r/137132/#review140628

> The original query is `let rootPreferencesChildren = rootPreferences.children;` (see https://reviewboard.mozilla.org/r/135706/diff/4#index_header)
> 
> which merely gets first level children from rootPreferences node. The `rootPreferences.querySelectorAll` will try to look through all descendant elements of rootPreferences.

Ah, yes! Thanks for the explanation!
Comment on attachment 8865487 [details]
Bug 1363062 - Fix broken data-hidden-from-search=true search result

https://reviewboard.mozilla.org/r/137132/#review140654

Thanks!
Attachment #8865487 - Flags: review?(mconley) → review+
Flags: needinfo?(mconley)

Comment 7

6 months ago
Pushed by rchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ff2f063be21
Fix broken data-hidden-from-search=true search result r=mconley

Comment 8

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4ff2f063be21
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55

Updated

6 months ago
Duplicate of this bug: 1363762

Comment 10

5 months ago
Build ID: 20170515030205
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0


Verified as fixed on Firefox Nightly 55.0a1 on Windows 10 x 64, Mac OS X 10.12 and Ubuntu 16.04 x64.
Status: RESOLVED → VERIFIED
status-firefox55: fixed → verified
You need to log in before you can comment on or make changes to this bug.