[tbb-commits] [tor-browser] branch geckoview-99.0b3-11.5-2 updated: Bug 1760674. r=mak
gitolite role
git at cupani.torproject.org
Wed Apr 27 12:38:49 UTC 2022
This is an automated email from the git hooks/post-receive script.
aguestuser pushed a commit to branch geckoview-99.0b3-11.5-2
in repository tor-browser.
The following commit(s) were added to refs/heads/geckoview-99.0b3-11.5-2 by this push:
new 73baf6e0900b6 Bug 1760674. r=mak
73baf6e0900b6 is described below
commit 73baf6e0900b68f75a384d4ff4ff0524a2f5220c
Author: Emilio Cobos Álvarez <emilio at crisal.io>
AuthorDate: Tue Mar 29 12:15:52 2022 +0000
Bug 1760674. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D141958
---
docshell/base/BaseHistory.cpp | 13 -------------
dom/base/Link.cpp | 10 +---------
2 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/docshell/base/BaseHistory.cpp b/docshell/base/BaseHistory.cpp
index 184c608e41a10..226b9d6c7c4ba 100644
--- a/docshell/base/BaseHistory.cpp
+++ b/docshell/base/BaseHistory.cpp
@@ -108,10 +108,6 @@ void BaseHistory::RegisterVisitedCallback(nsIURI* aURI, Link* aLink) {
// This will not catch a case where it is registered for two different URIs.
MOZ_DIAGNOSTIC_ASSERT(!links->mLinks.Contains(aLink),
"Already tracking this Link object!");
- // FIXME(emilio): We should consider changing this (see the entry.Remove()
- // call in NotifyVisitedInThisProcess).
- MOZ_DIAGNOSTIC_ASSERT(links->mStatus != VisitedStatus::Visited,
- "We don't keep tracking known-visited links");
links->mLinks.AppendElement(aLink);
@@ -199,15 +195,6 @@ void BaseHistory::NotifyVisitedInThisProcess(nsIURI* aURI,
for (Link* link : links.mLinks.BackwardRange()) {
link->VisitedQueryFinished(visited);
}
-
- // We never go from visited -> unvisited.
- //
- // FIXME(emilio): It seems unfortunate to remove a link to a visited uri and
- // then re-add it to the document to trigger a new visited query. It shouldn't
- // if we keep track of mStatus.
- if (visited) {
- entry.Remove();
- }
}
void BaseHistory::SendPendingVisitedResultsToChildProcesses() {
diff --git a/dom/base/Link.cpp b/dom/base/Link.cpp
index b139b8260293e..72f00c030d5cd 100644
--- a/dom/base/Link.cpp
+++ b/dom/base/Link.cpp
@@ -60,25 +60,17 @@ bool Link::ElementHasHref() const {
void Link::VisitedQueryFinished(bool aVisited) {
MOZ_ASSERT(mRegistered, "Setting the link state of an unregistered Link!");
- MOZ_ASSERT(mState == State::Unvisited,
- "Why would we want to know our visited state otherwise?");
auto newState = aVisited ? State::Visited : State::Unvisited;
// Set our current state as appropriate.
mState = newState;
- // We will be no longer registered if we're visited, as it'd be pointless, we
- // never transition from visited -> unvisited.
- if (aVisited) {
- mRegistered = false;
- }
-
MOZ_ASSERT(LinkState() == NS_EVENT_STATE_VISITED ||
LinkState() == NS_EVENT_STATE_UNVISITED,
"Unexpected state obtained from LinkState()!");
- // Tell the element to update its visited state
+ // Tell the element to update its visited state.
mElement->UpdateState(true);
if (StaticPrefs::layout_css_always_repaint_on_unvisited()) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list