зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to inbound. a=merge CLOSED TREE
This commit is contained in:
Коммит
c706eee030
|
@ -931,42 +931,53 @@
|
|||
<method name="_notifyBackgroundTab">
|
||||
<parameter name="aTab"/>
|
||||
<body><![CDATA[
|
||||
if (aTab.pinned || aTab.hidden)
|
||||
if (aTab.pinned || aTab.hidden || this.getAttribute("overflow") != "true")
|
||||
return;
|
||||
|
||||
var scrollRect = this.arrowScrollbox.scrollClientRect;
|
||||
var tab = aTab.getBoundingClientRect();
|
||||
this._lastTabToScrollIntoView = aTab;
|
||||
if (!this._backgroundTabScrollPromise) {
|
||||
this._backgroundTabScrollPromise = window.promiseDocumentFlushed(() => {
|
||||
let lastTabRect = this._lastTabToScrollIntoView.getBoundingClientRect();
|
||||
let selectedTab = this.selectedItem;
|
||||
if (selectedTab.pinned) {
|
||||
selectedTab = null;
|
||||
} else {
|
||||
selectedTab = selectedTab.getBoundingClientRect();
|
||||
selectedTab = {left: selectedTab.left, right: selectedTab.right};
|
||||
}
|
||||
delete this._lastTabToScrollIntoView;
|
||||
delete this._backgroundTabScrollPromise;
|
||||
return [
|
||||
this.arrowScrollbox.scrollClientRect,
|
||||
{left: lastTabRect.left, right: lastTabRect.right},
|
||||
selectedTab,
|
||||
];
|
||||
}).then(([scrollRect, tab, selected]) => {
|
||||
// Is the new tab already completely visible?
|
||||
if (scrollRect.left <= tab.left && tab.right <= scrollRect.right)
|
||||
return;
|
||||
|
||||
// DOMRect left/right properties are immutable.
|
||||
tab = {left: tab.left, right: tab.right};
|
||||
if (this.arrowScrollbox.smoothScroll) {
|
||||
// Can we make both the new tab and the selected tab completely visible?
|
||||
if (!selected ||
|
||||
Math.max(tab.right - selected.left, selected.right - tab.left) <=
|
||||
scrollRect.width) {
|
||||
this.arrowScrollbox.ensureElementIsVisible(aTab);
|
||||
return;
|
||||
}
|
||||
|
||||
// Is the new tab already completely visible?
|
||||
if (scrollRect.left <= tab.left && tab.right <= scrollRect.right)
|
||||
return;
|
||||
this.arrowScrollbox.scrollByPixels(RTL_UI ?
|
||||
selected.right - scrollRect.right :
|
||||
selected.left - scrollRect.left);
|
||||
}
|
||||
|
||||
if (this.arrowScrollbox.smoothScroll) {
|
||||
let selectedTab = this.selectedItem;
|
||||
let selected = !selectedTab.pinned &&
|
||||
selectedTab.getBoundingClientRect();
|
||||
|
||||
// Can we make both the new tab and the selected tab completely visible?
|
||||
if (!selected ||
|
||||
Math.max(tab.right - selected.left, selected.right - tab.left) <=
|
||||
scrollRect.width) {
|
||||
this.arrowScrollbox.ensureElementIsVisible(aTab);
|
||||
return;
|
||||
}
|
||||
|
||||
this.arrowScrollbox.scrollByPixels(RTL_UI ?
|
||||
selected.right - scrollRect.right :
|
||||
selected.left - scrollRect.left);
|
||||
}
|
||||
|
||||
if (!this._animateElement.hasAttribute("highlight")) {
|
||||
this._animateElement.setAttribute("highlight", "true");
|
||||
setTimeout(function(ele) {
|
||||
ele.removeAttribute("highlight");
|
||||
}, 150, this._animateElement);
|
||||
if (!this._animateElement.hasAttribute("highlight")) {
|
||||
this._animateElement.setAttribute("highlight", "true");
|
||||
setTimeout(function(ele) {
|
||||
ele.removeAttribute("highlight");
|
||||
}, 150, this._animateElement);
|
||||
}
|
||||
});
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
|
|
@ -9,7 +9,6 @@ support-files =
|
|||
[browser_UrlbarInput_formatValue.js]
|
||||
[browser_UrlbarInput_overflow.js]
|
||||
[browser_UrlbarInput_tooltip.js]
|
||||
skip-if = os == "win" # Bug 1511655
|
||||
[browser_UrlbarInput_trimURLs.js]
|
||||
subsuite = clipboard
|
||||
[browser_UrlbarInput_unit.js]
|
||||
|
|
|
@ -156,6 +156,10 @@ class ContentBlockingLog final {
|
|||
}
|
||||
|
||||
bool HasBlockedAnyOfType(uint32_t aType) {
|
||||
// Note: nothing inside this loop should return false, the goal for the
|
||||
// loop is to scan the log to see if we find a matching entry, and if so
|
||||
// we would return true, otherwise in the end of the function outside of
|
||||
// the loop we take the common `return false;` statement.
|
||||
for (auto iter = mLog.Iter(); !iter.Done(); iter.Next()) {
|
||||
if (!iter.UserData()) {
|
||||
continue;
|
||||
|
@ -166,10 +170,10 @@ class ContentBlockingLog final {
|
|||
return true;
|
||||
}
|
||||
} else if (aType == nsIWebProgressListener::STATE_COOKIES_LOADED) {
|
||||
if (Get<1>(*iter.UserData()).isSome()) {
|
||||
return Get<1>(*iter.UserData()).value();
|
||||
if (Get<1>(*iter.UserData()).isSome() &&
|
||||
Get<1>(*iter.UserData()).value()) {
|
||||
return true;
|
||||
}
|
||||
return false; // false means not blocked, aka not loaded any cookies
|
||||
} else {
|
||||
for (auto& item : Get<2>(*iter.UserData())) {
|
||||
if ((item.mType & aType) != 0) {
|
||||
|
|
|
@ -523,20 +523,20 @@ ContentPermissionRequestBase::ContentPermissionRequestBase(
|
|||
NS_IMETHODIMP
|
||||
ContentPermissionRequestBase::GetPrincipal(
|
||||
nsIPrincipal** aRequestingPrincipal) {
|
||||
NS_ADDREF(*aRequestingPrincipal = mPrincipal);
|
||||
NS_IF_ADDREF(*aRequestingPrincipal = mPrincipal);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ContentPermissionRequestBase::GetTopLevelPrincipal(
|
||||
nsIPrincipal** aRequestingPrincipal) {
|
||||
NS_ADDREF(*aRequestingPrincipal = mTopLevelPrincipal);
|
||||
NS_IF_ADDREF(*aRequestingPrincipal = mTopLevelPrincipal);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ContentPermissionRequestBase::GetWindow(mozIDOMWindow** aRequestingWindow) {
|
||||
NS_ADDREF(*aRequestingWindow = mWindow);
|
||||
NS_IF_ADDREF(*aRequestingWindow = mWindow);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -5031,6 +5031,7 @@ void nsGlobalWindowOuter::NotifyContentBlockingState(unsigned aState,
|
|||
nsAutoString origin;
|
||||
nsContentUtils::GetUTFOrigin(aURIHint, origin);
|
||||
|
||||
bool blockedValue = aBlocked;
|
||||
bool unblocked = false;
|
||||
if (aState == nsIWebProgressListener::STATE_BLOCKED_TRACKING_CONTENT) {
|
||||
doc->SetHasTrackingContentBlocked(aBlocked, origin);
|
||||
|
@ -5069,14 +5070,16 @@ void nsGlobalWindowOuter::NotifyContentBlockingState(unsigned aState,
|
|||
// Note that the logic in this branch is the logical negation of the logic
|
||||
// in other branches, since the nsIDocument API we have is phrased in
|
||||
// "loaded" terms as opposed to "blocked" terms.
|
||||
doc->SetHasCookiesLoaded(!aBlocked, origin);
|
||||
aBlocked = true;
|
||||
unblocked = false;
|
||||
blockedValue = !aBlocked;
|
||||
doc->SetHasCookiesLoaded(blockedValue, origin);
|
||||
if (!aBlocked) {
|
||||
unblocked = !doc->GetHasCookiesLoaded();
|
||||
}
|
||||
} else {
|
||||
// Ignore nsIWebProgressListener::STATE_BLOCKED_UNSAFE_CONTENT;
|
||||
}
|
||||
const uint32_t oldState = state;
|
||||
if (aBlocked) {
|
||||
if (blockedValue) {
|
||||
state |= aState;
|
||||
} else if (unblocked) {
|
||||
state &= ~aState;
|
||||
|
|
|
@ -169,8 +169,9 @@ def taskgraph_decision(options, parameters=None):
|
|||
full_task_json = tgg.full_task_graph.to_json()
|
||||
write_artifact('full-task-graph.json', full_task_json)
|
||||
|
||||
# write out the public/runnable-jobs.json.gz file
|
||||
# write out the public/runnable-jobs.json file
|
||||
write_artifact('runnable-jobs.json.gz', full_task_graph_to_runnable_jobs(full_task_json))
|
||||
write_artifact('runnable-jobs.json', full_task_graph_to_runnable_jobs(full_task_json))
|
||||
|
||||
# this is just a test to check whether the from_json() function is working
|
||||
_, _ = TaskGraph.from_json(full_task_json)
|
||||
|
|
|
@ -1452,19 +1452,23 @@ nsresult AntiTrackingCommon::IsOnContentBlockingAllowList(
|
|||
}
|
||||
|
||||
// Can be called in EITHER the parent or child process.
|
||||
nsCOMPtr<nsIParentChannel> parentChannel;
|
||||
NS_QueryNotificationCallbacks(aChannel, parentChannel);
|
||||
if (parentChannel) {
|
||||
// This channel is a parent-process proxy for a child process request.
|
||||
// Tell the child process channel to do this instead.
|
||||
if (aDecision == BlockingDecision::eBlock) {
|
||||
parentChannel->NotifyTrackingCookieBlocked(aRejectedReason);
|
||||
} else {
|
||||
parentChannel->NotifyCookieAllowed();
|
||||
if (XRE_IsParentProcess()) {
|
||||
nsCOMPtr<nsIParentChannel> parentChannel;
|
||||
NS_QueryNotificationCallbacks(aChannel, parentChannel);
|
||||
if (parentChannel) {
|
||||
// This channel is a parent-process proxy for a child process request.
|
||||
// Tell the child process channel to do this instead.
|
||||
if (aDecision == BlockingDecision::eBlock) {
|
||||
parentChannel->NotifyTrackingCookieBlocked(aRejectedReason);
|
||||
} else {
|
||||
parentChannel->NotifyCookieAllowed();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(XRE_IsContentProcess());
|
||||
|
||||
nsCOMPtr<mozIThirdPartyUtil> thirdPartyUtil = services::GetThirdPartyUtil();
|
||||
if (!thirdPartyUtil) {
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче