Skip to content

Commit

Permalink
Bug 1572624 - arrowscrollbox doesn't work properly if hosted in shado…
Browse files Browse the repository at this point in the history
…w DOM, r=dao

Differential Revision: https://phabricator.services.mozilla.com/D41609

--HG--
extra : moz-landing-system : lando
  • Loading branch information
asurkov committed Aug 13, 2019
1 parent 4055578 commit 9f31d58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions browser/components/places/content/places-menupopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@

get markup() {
return `
<html:link rel="stylesheet" href="chrome://global/content/widgets.css" />
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:style>${this.commonStyles}${this.styles}</html:style>
<hbox flex="1" part="innerbox">
<vbox class="menupopup-drop-indicator-bar" hidden="true">
Expand Down Expand Up @@ -697,7 +697,7 @@

get markup() {
return `
<html:link rel="stylesheet" href="chrome://global/content/widgets.css" />
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:style>${this.commonStyles}</html:style>
<vbox class="panel-arrowcontainer" flex="1">
<box class="panel-arrowbox">
Expand Down
15 changes: 10 additions & 5 deletions toolkit/content/widgets/scrollbox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,16 @@

<method name="_getScrollableElements">
<body><![CDATA[
var nodes = this.children;
if (nodes.length == 1 &&
nodes[0].localName == "children" &&
nodes[0].namespaceURI == "http://www.mozilla.org/xbl") {
nodes = document.getBindingParent(this).children;
let nodes = this.children;
if (nodes.length == 1) {
let node = nodes[0];
if (node.localName == "children" &&
node.namespaceURI == "http://www.mozilla.org/xbl") {
nodes = document.getBindingParent(this).children;
} else if (node.localName == "slot" &&
node.namespaceURI == "http://www.w3.org/1999/xhtml") {
nodes = node.getRootNode().host.children;
}
}
return Array.prototype.filter.call(nodes, this._canScrollToElement, this);
Expand Down

0 comments on commit 9f31d58

Please sign in to comment.