The default bug view has changed. See this FAQ.

Sanitizer: Clear Private Data should clear search bar and find bar data.

RESOLVED FIXED in seamonkey2.17

Status

SeaMonkey
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Philip Chee, Assigned: Philip Chee)

Tracking

Trunk
seamonkey2.17

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

4 years ago
Referenced Firefox bugs:
Bug 409624 - Sanitizer should clear findBar data.
Bug 446274 - Clear Private Data should clear search bar, but doesn't
Bug 463474 - Make sanitizer's searchbar clearing code a bit cleaner.
(Assignee)

Comment 1

4 years ago
Created attachment 685150 [details] [diff] [review]
Patch v1.0 Proposed fix.

TEST_PATH=suite/browser/test/browser_bug409624.js  pymake -C ../objdir-sm/ mochitest-browser-chrome

INFO TEST-START | Shutdown
Browser Chrome Test Summary
        Passed: 4
        Failed: 0
        Todo: 0

TEST_PATH=suite/modules/test/browser_sanitizer.js   pymake -C ../objdir-sm/ mochitest-browser-chrome

INFO TEST-START | Shutdown
Browser Chrome Test Summary
        Passed: 41
        Failed: 4
        Todo: 0

TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/suite/modules/test/browser_sanitizer.js | Cache test setup successfully
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/suite/modules/test/browser_sanitizer.js | Offline app cache test setup successfully
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/suite/modules/test/browser_sanitizer.js | Cache test setup successfully for full sanitize
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/suite/modules/test/browser_sanitizer.js | Offline app cache test setup successfully for full sanitize
Attachment #685150 - Flags: review?(neil)

Comment 2

4 years ago
Comment on attachment 685150 [details] [diff] [review]
Patch v1.0 Proposed fix.

>+          var searchBar = currentDocument.getElementById("searchbar");
>+          if (isElementVisible(searchBar)) {
View - Show/Hide - (customised toolbar) will make isElementVisible return false, although the textbox remembers its value and undo.

What about the search sidebar?
Attachment #685150 - Flags: review?(neil) → review-
(Assignee)

Comment 3

4 years ago
Created attachment 686035 [details] [diff] [review]
Patch v1.1 fix nits, and clear the search sidebar.

>>+          var searchBar = currentDocument.getElementById("searchbar");
>>+          if (isElementVisible(searchBar)) {
> View - Show/Hide - (customised toolbar) will make isElementVisible return false, although the textbox remembers its value and undo.
Fixed.

> What about the search sidebar?
Now clears the search sidebar as well.
Attachment #685150 - Attachment is obsolete: true
Attachment #686035 - Flags: review?(neil)

Comment 4

4 years ago
Comment on attachment 686035 [details] [diff] [review]
Patch v1.1 fix nits, and clear the search sidebar.

>+        // Clear undo history of all search and find bars.
Nit: can you do find bars first and keep the search bars together?

>+          var sidebar = currentDocument.querySelector("browser[src*='search-panel.xul']");
This isn't really the right way to do this, see BrowserSearch.searchSidebar

[Hmm, what about sidebars in non-browser windows?]
Attachment #686035 - Flags: review?(neil) → review+
(Assignee)

Comment 5

4 years ago
Created attachment 686589 [details] [diff] [review]
Patch v1.2 as checked in. r=Neil

Pushed comm-central changeset 582d55c0c395
http://hg.mozilla.org/comm-central/rev/582d55c0c395

>>+        // Clear undo history of all search and find bars.
> Nit: can you do find bars first and keep the search bars together?
Fixed.

>>+          var sidebar = currentDocument.querySelector("browser[src*='search-panel.xul']");
> This isn't really the right way to do this, see BrowserSearch.searchSidebar
Fixed.

> [Hmm, what about sidebars in non-browser windows?]
I'll leave this to another bug.
Attachment #686589 - Flags: review+
(Assignee)

Updated

4 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.17
You need to log in before you can comment on or make changes to this bug.