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

RESOLVED FIXED in seamonkey2.17

Status

defect
RESOLVED FIXED
7 years ago
7 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

7 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

7 years ago
Posted patch Patch v1.0 Proposed fix. (obsolete) — Splinter Review
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 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

7 years ago
>>+          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 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

7 years ago
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

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