mirror of
https://github.com/Feodor2/Mypal68.git
synced 2025-06-18 14:55:44 -04:00
Poke to fix some settings pictures
This commit is contained in:
parent
a86941a552
commit
9abf3a4cbc
@ -118,6 +118,7 @@ panelview[mainview] > .panel-header {
|
||||
}
|
||||
|
||||
.panel-viewcontainer.offscreen {
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@ -209,7 +210,7 @@ panelview[mainview] > .panel-header {
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
|
||||
position: fixed !important;
|
||||
display: block; /* position:fixed already does this (bug 579776), but let's be explicit */
|
||||
display: block;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[selected],
|
||||
@ -472,6 +473,7 @@ toolbarpaletteitem[place="palette"] > #personal-bookmarks > #bookmarks-toolbar-b
|
||||
}
|
||||
|
||||
#PlacesToolbarDropIndicatorHolder {
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@ -901,6 +903,7 @@ browser[tabmodalPromptShowing] {
|
||||
/* Status panel */
|
||||
|
||||
#statuspanel {
|
||||
display: block;
|
||||
position: fixed;
|
||||
margin-top: -3em;
|
||||
max-width: calc(100% - 5px);
|
||||
|
@ -6,7 +6,7 @@
|
||||
<box flex="1" id="customization-palette-container">
|
||||
<label id="customization-header" data-l10n-id="customize-mode-menu-and-toolbars-header"></label>
|
||||
<vbox id="customization-palette" class="customization-palette" hidden="true"/>
|
||||
<vbox id="customization-pong-arena" hidden="true"/>
|
||||
<html:div id="customization-pong-arena" hidden="true"/>
|
||||
<spacer id="customization-spacer"/>
|
||||
</box>
|
||||
<vbox id="customization-panel-container">
|
||||
|
@ -150,10 +150,10 @@
|
||||
buttonhighlight="true"
|
||||
hidden="true">
|
||||
<popupnotificationcontent class="addon-installed-notification-content" orient="vertical">
|
||||
<description id="addon-install-description" data-lazy-l10n-id="appmenu-addon-post-install-message">
|
||||
<image data-l10n-name="addon-install-icon" class="addon-addon-icon"></image>
|
||||
<image data-l10n-name="addon-menu-icon" class="addon-toolbar-icon"></image>
|
||||
</description>
|
||||
<hbox id="addon-install-description" data-lazy-l10n-id="appmenu-addon-post-install-message" style="display:flex">
|
||||
<image data-l10n-name="addon-install-icon" class="addon-addon-icon" style="margin-inline:5px"></image>
|
||||
<image data-l10n-name="addon-menu-icon" class="addon-toolbar-icon" style="margin-inline:5px"></image>
|
||||
</hbox>
|
||||
<checkbox id="addon-incognito-checkbox"
|
||||
data-lazy-l10n-id="appmenu-addon-post-install-incognito-checkbox"/>
|
||||
</popupnotificationcontent>
|
||||
|
@ -34,6 +34,7 @@ skip-if = os == "linux"
|
||||
skip-if = os == "linux"
|
||||
|
||||
[browser_918049_skipintoolbarset_dnd.js]
|
||||
skip-if = os == "mac" # Bug 1578485
|
||||
[browser_923857_customize_mode_event_wrapping_during_reset.js]
|
||||
[browser_927717_customize_drag_empty_toolbar.js]
|
||||
|
||||
|
@ -627,8 +627,8 @@ var gSearchResultsPane = {
|
||||
if (anchorNode.tooltipNode) {
|
||||
return;
|
||||
}
|
||||
let searchTooltip = anchorNode.ownerDocument.createXULElement("span");
|
||||
let searchTooltipText = anchorNode.ownerDocument.createXULElement("span");
|
||||
let searchTooltip = anchorNode.ownerDocument.createElement("span");
|
||||
let searchTooltipText = anchorNode.ownerDocument.createElement("span");
|
||||
searchTooltip.className = "search-tooltip";
|
||||
searchTooltipText.textContent = query;
|
||||
searchTooltip.appendChild(searchTooltipText);
|
||||
|
@ -607,11 +607,11 @@
|
||||
<!-- The hbox around the buttons is to compute the search tooltip position properly -->
|
||||
<vbox>
|
||||
<hbox id="locationSettingsRow" align="center" role="group" aria-labelledby="locationPermissionsLabel">
|
||||
<description flex="1">
|
||||
<hbox flex="1">
|
||||
<image class="geo-icon permission-icon" />
|
||||
<separator orient="vertical" class="thin"/>
|
||||
<label id="locationPermissionsLabel" data-l10n-id="permissions-location"/>
|
||||
</description>
|
||||
</hbox>
|
||||
<hbox pack="end">
|
||||
<button id="locationSettingsButton"
|
||||
is="highlightable-button"
|
||||
@ -631,11 +631,11 @@
|
||||
</hbox>
|
||||
|
||||
<hbox id="cameraSettingsRow" align="center" role="group" aria-labelledby="cameraPermissionsLabel">
|
||||
<description flex="1">
|
||||
<hbox flex="1">
|
||||
<image class="camera-icon permission-icon" />
|
||||
<separator orient="vertical" class="thin"/>
|
||||
<label id="cameraPermissionsLabel" data-l10n-id="permissions-camera"/>
|
||||
</description>
|
||||
</hbox>
|
||||
<hbox pack="end">
|
||||
<button id="cameraSettingsButton"
|
||||
is="highlightable-button"
|
||||
@ -655,11 +655,11 @@
|
||||
</hbox>
|
||||
|
||||
<hbox id="microphoneSettingsRow" align="center" role="group" aria-labelledby="microphonePermissionsLabel">
|
||||
<description flex="1">
|
||||
<hbox flex="1">
|
||||
<image class="microphone-icon permission-icon" />
|
||||
<separator orient="vertical" class="thin"/>
|
||||
<label id="microphonePermissionsLabel" data-l10n-id="permissions-microphone"/>
|
||||
</description>
|
||||
</hbox>
|
||||
<hbox pack="end">
|
||||
<button id="microphoneSettingsButton"
|
||||
is="highlightable-button"
|
||||
@ -679,7 +679,7 @@
|
||||
</hbox>
|
||||
|
||||
<hbox id="notificationSettingsRow" align="center" role="group" aria-labelledby="notificationPermissionsLabel">
|
||||
<description flex="1">
|
||||
<hbox flex="1">
|
||||
<image class="desktop-notification-icon permission-icon" />
|
||||
<separator orient="vertical" class="thin"/>
|
||||
<label id="notificationPermissionsLabel"
|
||||
@ -689,7 +689,7 @@
|
||||
class="learnMore"
|
||||
is="text-link"
|
||||
data-l10n-id="permissions-notification-link"/>
|
||||
</description>
|
||||
</hbox>
|
||||
<hbox pack="end">
|
||||
<button id="notificationSettingsButton"
|
||||
is="highlightable-button"
|
||||
@ -713,12 +713,12 @@
|
||||
</vbox>
|
||||
|
||||
<hbox id="autoplaySettingsRow" align="center" role="group" aria-labelledby="autoplayPermissionsLabel">
|
||||
<description flex="1">
|
||||
<hbox flex="1">
|
||||
<image class="autoplay-icon permission-icon" />
|
||||
<separator orient="vertical" class="thin"/>
|
||||
<label id="autoplayPermissionsLabel"
|
||||
data-l10n-id="permissions-autoplay"/>
|
||||
</description>
|
||||
</hbox>
|
||||
<hbox pack="end">
|
||||
<button id="autoplaySettingsButton"
|
||||
is="highlightable-button"
|
||||
|
@ -105,6 +105,7 @@ class UrlbarInput {
|
||||
this._textValueOnLastSearch = "";
|
||||
this._resultForCurrentValue = null;
|
||||
this._suppressStartQuery = false;
|
||||
this._suppressPrimaryAdjustment = false;
|
||||
this._untrimmedValue = "";
|
||||
this._openViewOnFocus = false;
|
||||
|
||||
@ -120,7 +121,6 @@ class UrlbarInput {
|
||||
"setAttribute",
|
||||
"removeAttribute",
|
||||
"toggleAttribute",
|
||||
"select",
|
||||
];
|
||||
const READ_ONLY_PROPERTIES = ["inputField", "editor"];
|
||||
const READ_WRITE_PROPERTIES = [
|
||||
@ -201,6 +201,8 @@ class UrlbarInput {
|
||||
// openViewOnFocus = true the default), this won't be needed anymore.
|
||||
this.addEventListener("mousedown", this);
|
||||
|
||||
this.window.addEventListener("resize", this);
|
||||
|
||||
this.view.panel.addEventListener("popupshowing", this);
|
||||
this.view.panel.addEventListener("popuphidden", this);
|
||||
|
||||
@ -225,6 +227,7 @@ class UrlbarInput {
|
||||
this.inputField.removeEventListener(name, this);
|
||||
}
|
||||
this.removeEventListener("mousedown", this);
|
||||
this.window.removeEventListener("resize", this);
|
||||
|
||||
this.view.panel.remove();
|
||||
|
||||
@ -302,6 +305,14 @@ class UrlbarInput {
|
||||
this.inputField.blur();
|
||||
}
|
||||
|
||||
select() {
|
||||
// See _on_select(). HTMLInputElement.select() dispatches a "select"
|
||||
// event but does not set the primary selection.
|
||||
this._suppressPrimaryAdjustment = true;
|
||||
this.inputField.select();
|
||||
this._suppressPrimaryAdjustment = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts an internal URI (e.g. a URI with a username or password) into one
|
||||
* which we can expose to the user.
|
||||
@ -1537,8 +1548,39 @@ class UrlbarInput {
|
||||
});
|
||||
}
|
||||
|
||||
async _on_resize(event) {
|
||||
if (!this.megabar || !this.hasAttribute("breakout")) {
|
||||
return;
|
||||
}
|
||||
|
||||
let px = number => number.toFixed(2) + "px";
|
||||
let width = await this.window.promiseDocumentFlushed(() => {
|
||||
// We use the container because it remains flexible unlike the broken-out
|
||||
// Urlbar.
|
||||
return this.textbox.parentNode.clientWidth;
|
||||
});
|
||||
this.window.requestAnimationFrame(() => {
|
||||
this.textbox.style.setProperty("--urlbar-width", px(width));
|
||||
});
|
||||
}
|
||||
|
||||
_on_select(event) {
|
||||
// On certain user input, AutoCopyListener::OnSelectionChange() updates
|
||||
// the primary selection with user-selected text (when supported).
|
||||
// Selection::NotifySelectionListeners() then dispatches a "select" event
|
||||
// under similar conditions via TextInputListener::OnSelectionChange().
|
||||
// This event is received here in order to replace the primary selection
|
||||
// from the editor with text having the adjustments of
|
||||
// _getSelectedValueForClipboard(), such as adding the scheme for the url.
|
||||
//
|
||||
// Other "select" events are also received, however, and must be excluded.
|
||||
if (
|
||||
// _suppressPrimaryAdjustment is set during select(). Don't update
|
||||
// the primary selection because that is not the intent of user input,
|
||||
// which may be new tab or urlbar focus.
|
||||
this._suppressPrimaryAdjustment ||
|
||||
// The check on isHandlingUserInput filters out async "select" events
|
||||
// from setSelectionRange(), which occur when autofill text is selected.
|
||||
!this.window.windowUtils.isHandlingUserInput ||
|
||||
!Services.clipboard.supportsSelectionClipboard()
|
||||
) {
|
||||
|
@ -944,6 +944,10 @@ class UrlbarView {
|
||||
}
|
||||
|
||||
_on_resize() {
|
||||
if (this.input.megabar) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._windowOuterWidth == this.window.outerWidth) {
|
||||
// Sometimes a resize event is fired when the window's size doesn't
|
||||
// actually change; at least, browser_tabMatchesInAwesomebar.js triggers
|
||||
|
@ -75,6 +75,7 @@ skip-if = (os == 'mac' && os_version == '10.14') # bug 1554807
|
||||
tags = clipboard
|
||||
[browser_percent_encoded.js]
|
||||
[browser_populateAfterPushState.js]
|
||||
[browser_primary_selection_safe_on_new_tab.js]
|
||||
[browser_privateBrowsingWindowChange.js]
|
||||
[browser_raceWithTabs.js]
|
||||
skip-if = os == "linux" # Bug 1533807
|
||||
|
@ -0,0 +1,74 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Verify that the primary selection is unaffected by opening a new tab.
|
||||
*
|
||||
* The steps here follow STR for regression
|
||||
* https://bugzilla.mozilla.org/show_bug.cgi?id=1457355.
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
let tabs = [];
|
||||
let supportsPrimary = Services.clipboard.supportsSelectionClipboard();
|
||||
let ClipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(
|
||||
Ci.nsIClipboardHelper
|
||||
);
|
||||
const NON_EMPTY_URL = "data:text/html,Hello";
|
||||
const TEXT_FOR_PRIMARY = "Text for PRIMARY selection";
|
||||
|
||||
add_task(async function() {
|
||||
tabs.push(
|
||||
await BrowserTestUtils.openNewForegroundTab(gBrowser, NON_EMPTY_URL)
|
||||
);
|
||||
|
||||
// Bug 1457355 reproduced only when the url had a non-empty selection.
|
||||
gURLBar.select();
|
||||
Assert.equal(gURLBar.inputField.selectionStart, 0);
|
||||
Assert.equal(
|
||||
gURLBar.inputField.selectionEnd,
|
||||
gURLBar.inputField.value.length
|
||||
);
|
||||
|
||||
if (supportsPrimary) {
|
||||
ClipboardHelper.copyStringToClipboard(
|
||||
TEXT_FOR_PRIMARY,
|
||||
Services.clipboard.kSelectionClipboard
|
||||
);
|
||||
}
|
||||
|
||||
tabs.push(
|
||||
await BrowserTestUtils.openNewForegroundTab({
|
||||
gBrowser,
|
||||
opening: () => {
|
||||
// Simulate tab open from user input such as keyboard shortcut or new
|
||||
// tab button.
|
||||
let userInput = window.windowUtils.setHandlingUserInput(true);
|
||||
try {
|
||||
BrowserOpenTab();
|
||||
} finally {
|
||||
userInput.destruct();
|
||||
}
|
||||
},
|
||||
waitForLoad: false,
|
||||
})
|
||||
);
|
||||
|
||||
if (!supportsPrimary) {
|
||||
info("Primary selection not supported. Skipping assertion.");
|
||||
return;
|
||||
}
|
||||
|
||||
let primaryAsText = SpecialPowers.getClipboardData(
|
||||
"text/unicode",
|
||||
SpecialPowers.Ci.nsIClipboard.kSelectionClipboard
|
||||
);
|
||||
Assert.equal(primaryAsText, TEXT_FOR_PRIMARY);
|
||||
});
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
for (let tab of tabs) {
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
});
|
@ -47,6 +47,7 @@
|
||||
}
|
||||
|
||||
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .ac-site-icon {
|
||||
display: block;
|
||||
margin-inline: auto 4px;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@
|
||||
}
|
||||
|
||||
#library-animatable-box[animate] {
|
||||
display: -moz-box;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Back / Forward context menu */
|
||||
|
@ -450,6 +450,7 @@ toolbarpaletteitem[place=toolbar] > toolbarspring {
|
||||
}
|
||||
|
||||
#customization-panelWrapper > .panel-arrowbox {
|
||||
display: block;
|
||||
position: relative;
|
||||
height: 10px;
|
||||
margin-bottom: -1px;
|
||||
@ -627,6 +628,7 @@ toolbarpaletteitem[place=toolbar] > toolbarspring {
|
||||
#wp-player2,
|
||||
#wp-ball,
|
||||
#wp-score {
|
||||
display: block;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
|
@ -263,6 +263,7 @@ panel[photon] > .panel-arrowcontainer > .panel-arrowcontent {
|
||||
}
|
||||
|
||||
#confirmation-hint-checkmark-animation-container[animate] > #confirmation-hint-checkmark-image {
|
||||
display: block;
|
||||
position: absolute;
|
||||
background-image: url(chrome://browser/skin/check-animation.svg);
|
||||
background-repeat: no-repeat;
|
||||
|
@ -183,6 +183,7 @@
|
||||
}
|
||||
|
||||
#tracking-protection-icon-box > #tracking-protection-icon-animatable-box {
|
||||
display: block;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
margin-inline-start: 4px;
|
||||
|
@ -33,16 +33,17 @@
|
||||
}
|
||||
|
||||
#qrSpinner {
|
||||
background-image: url("chrome://browser/skin/fxa/fxa-spinner.svg");
|
||||
animation: 0.9s spin infinite linear;
|
||||
background-size: 36px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-image: url("chrome://browser/skin/fxa/fxa-spinner.svg");
|
||||
animation: 0.9s spin infinite linear;
|
||||
background-size: 36px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
transition: opacity 250ms cubic-bezier(.07,.95,0,1);
|
||||
}
|
||||
|
||||
|
@ -11,15 +11,11 @@
|
||||
}
|
||||
|
||||
.radio-buttons {
|
||||
display: flex;
|
||||
-moz-box-orient: horizontal;
|
||||
margin-inline-start: 0.35rem;
|
||||
}
|
||||
|
||||
.radio-buttons > radio {
|
||||
flex: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
-moz-user-select: none;
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 4px;
|
||||
|
@ -576,14 +576,10 @@
|
||||
|
||||
/* Pinned tab separators need position: absolute when positioned (during overflow). */
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned]::after {
|
||||
display: block;
|
||||
position: absolute;
|
||||
inset-block: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned]:-moz-locale-dir(rtl)::after {
|
||||
right: unset;
|
||||
left: 0;
|
||||
inset-inline-end: 0;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] > .tab-stack {
|
||||
|
@ -20,6 +20,7 @@ toolbar[brighttext] {
|
||||
}
|
||||
|
||||
.toolbarbutton-animatable-box {
|
||||
display: block;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
z-index: 2;
|
||||
@ -59,7 +60,7 @@ toolbar[brighttext] {
|
||||
display: none;
|
||||
}
|
||||
#nav-bar-customization-target > #stop-reload-button > :-moz-any(#reload-button, #stop-button) > .toolbarbutton-animatable-box {
|
||||
display: -moz-box;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#stop-reload-button[animate] > #reload-button > .toolbarbutton-icon,
|
||||
|
@ -35,6 +35,10 @@
|
||||
border-right-style: none;
|
||||
}
|
||||
|
||||
.urlbarView:not(.megabar):not([hidden]) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.urlbarView-body-inner {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
@ -396,6 +396,7 @@
|
||||
}
|
||||
|
||||
#star-button-box[animationsenabled] > #star-button[starred][animate] + #star-button-animatable-box {
|
||||
display: block;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
top: calc(50% - 16.5px); /* 16.5px is half the height of the sprite */
|
||||
|
@ -235,7 +235,7 @@
|
||||
-moz-box-ordinal-group: 1001;
|
||||
box-shadow: 0 0 50px 8px ActiveCaption;
|
||||
content: "";
|
||||
display: -moz-box;
|
||||
display: block;
|
||||
height: 0;
|
||||
margin: 0 50px;
|
||||
position: absolute;
|
||||
|
@ -1641,8 +1641,8 @@ nsresult Navigator::GetUserAgent(nsPIDOMWindowInner* aWindow,
|
||||
if (prefBranch) {
|
||||
if (aCallerPrincipal) {
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
aCallerPrincipal->GetURI(getter_AddRefs(uri));
|
||||
if (uri) {
|
||||
aCallerPrincipal->GetURI(getter_AddRefs(uri));
|
||||
MOZ_ALWAYS_SUCCEEDS(uri->GetHost(host));
|
||||
rv = prefBranch->GetCharPref(host.get(), ua);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<x style="position:fixed;"/>
|
||||
</window>
|
||||
<x style="position:fixed; display: block;"/>
|
||||
</window>
|
||||
|
@ -5,7 +5,8 @@
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=726949
|
||||
-->
|
||||
<window title="Mozilla Bug 726949"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="display: block;">
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
|
||||
|
||||
<!-- test results are displayed in the html:body -->
|
||||
|
@ -11,9 +11,8 @@ function boom()
|
||||
window.addEventListener("load", function(){setTimeout(boom, 30)}, 0);
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<hbox id="xxx" style="position: absolute;">
|
||||
<hbox id="xxx" style="position: absolute; display: block;">
|
||||
<label value="X" />
|
||||
<menulist>
|
||||
<menupopup>
|
||||
@ -22,5 +21,4 @@ window.addEventListener("load", function(){setTimeout(boom, 30)}, 0);
|
||||
</menulist>
|
||||
</hbox>
|
||||
|
||||
|
||||
</window>
|
||||
|
@ -10,4 +10,4 @@ function removestyles(){
|
||||
setTimeout(removestyles,400);
|
||||
|
||||
</script>
|
||||
<div><xul:editor id="x" style="float: left;"></xul:editor></div></html>
|
||||
<div><xul:editor id="x" style="display: block; float: left;"></xul:editor></div></html>
|
||||
|
@ -6,6 +6,13 @@
|
||||
|
||||
<html:style>
|
||||
* { float: right; }
|
||||
*:not(style) {
|
||||
/* At the time this testcase was added, the above `float` styling would
|
||||
have automatically forced "display:block" for these elements, so we
|
||||
should preserve that styling to preserve the integrity of the crashtest
|
||||
since blockification behavior for -moz-box is changing. */
|
||||
display: block;
|
||||
}
|
||||
</html:style>
|
||||
|
||||
<menulist>
|
||||
|
@ -7,6 +7,14 @@
|
||||
<html:style>
|
||||
* { float: right; }
|
||||
#ping { float: none; }
|
||||
|
||||
*:not(#ping):not(style) {
|
||||
/* At the time this testcase was added, the above `float` styling would
|
||||
have automatically forced "display:block" for these elements, so we
|
||||
should preserve that styling to preserve the integrity of the crashtest
|
||||
since blockification behavior for -moz-box is changing. */
|
||||
display: block;
|
||||
}
|
||||
</html:style>
|
||||
|
||||
<hbox>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head></head>
|
||||
|
||||
<body onload="document.getElementById('a').style.position = 'relative';">
|
||||
<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" style="float: left;" id="a"><treecols id="b"/></hbox>
|
||||
<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" style="display: block; float: left;" id="a"><treecols id="b"/></hbox>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "mozilla/ServoStyleSetInlines.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "RetainedDisplayListBuilder.h"
|
||||
#include "nsAbsoluteContainingBlock.h"
|
||||
#include "nsCSSPseudoElements.h"
|
||||
@ -5702,6 +5703,15 @@ void nsCSSFrameConstructor::ConstructFramesFromItem(
|
||||
FrameConstructionItem& item = aIter.item();
|
||||
ComputedStyle* computedStyle = item.mComputedStyle;
|
||||
|
||||
const auto* disp = computedStyle->StyleDisplay();
|
||||
MOZ_ASSERT(!disp->IsAbsolutelyPositionedStyle() ||
|
||||
(disp->mDisplay != StyleDisplay::MozBox &&
|
||||
disp->mDisplay != StyleDisplay::MozInlineBox),
|
||||
"This may be a frame that was previously blockified "
|
||||
"but isn't any longer! It probably needs explicit "
|
||||
"'display:block' to preserve behavior");
|
||||
Unused << disp; // (unused in configs that define the assertion away)
|
||||
|
||||
if (item.mIsText) {
|
||||
// If this is collapsible whitespace next to a line boundary,
|
||||
// don't create a frame. item.IsWhitespace() also sets the
|
||||
|
@ -5,7 +5,7 @@
|
||||
<vbox>
|
||||
<text value="powered by example.com" style="padding: 16px;"/>
|
||||
</vbox>
|
||||
<hbox id="t" style="position: fixed; right: 16px; bottom: 16px;">
|
||||
<hbox id="t" style="display: block; position: fixed; right: 16px; bottom: 16px;">
|
||||
<button label="OK"/>
|
||||
</hbox>
|
||||
<script><![CDATA[
|
||||
|
@ -647,11 +647,6 @@ void ReflowInput::InitResizeFlags(nsPresContext* aPresContext,
|
||||
SetBResize(mCBReflowInput->IsBResizeForWM(wm));
|
||||
mFlags.mIsBResizeForPercentages =
|
||||
mCBReflowInput->IsBResizeForPercentagesForWM(wm);
|
||||
if (mCBReflowInput && mFrame->IsTableRowGroupFrame() &&
|
||||
mCBReflowInput->IsBResizeForWM(wm)) {
|
||||
SetBResize(true);
|
||||
mFlags.mIsBResizeForPercentages = true;
|
||||
}
|
||||
} else if (ComputedBSize() == NS_UNCONSTRAINEDSIZE) {
|
||||
// We have an 'auto' block-size.
|
||||
if (eCompatibility_NavQuirks == aPresContext->CompatibilityMode() &&
|
||||
@ -2110,6 +2105,11 @@ void ReflowInput::InitConstraints(
|
||||
nsPresContext* aPresContext, const Maybe<LogicalSize>& aContainingBlockSize,
|
||||
const Maybe<LogicalMargin>& aBorder, const Maybe<LogicalMargin>& aPadding,
|
||||
LayoutFrameType aFrameType) {
|
||||
MOZ_ASSERT(
|
||||
!IsFloating() || (mStyleDisplay->mDisplay != StyleDisplay::MozBox &&
|
||||
mStyleDisplay->mDisplay != StyleDisplay::MozInlineBox),
|
||||
"Please don't try to float a -moz-box or a -moz-inline-box");
|
||||
|
||||
WritingMode wm = GetWritingMode();
|
||||
LogicalSize cbSize = aContainingBlockSize.valueOr(
|
||||
LogicalSize(mWritingMode, NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE));
|
||||
@ -2308,7 +2308,7 @@ void ReflowInput::InitConstraints(
|
||||
} else {
|
||||
AutoMaybeDisableFontInflation an(mFrame);
|
||||
|
||||
bool isBlock =
|
||||
const bool isBlockLevel =
|
||||
((!mStyleDisplay->IsInlineOutsideStyle() &&
|
||||
// internal table values on replaced elements behaves as inline
|
||||
// https://drafts.csswg.org/css-tables-3/#table-structure
|
||||
@ -2326,7 +2326,7 @@ void ReflowInput::InitConstraints(
|
||||
(!mFrame->HasAnyStateBits(NS_FRAME_OUT_OF_FLOW) ||
|
||||
mStyleDisplay->IsAbsolutelyPositionedStyle());
|
||||
|
||||
if (!isBlock) {
|
||||
if (!isBlockLevel) {
|
||||
mComputeSizeFlags += ComputeSizeFlag::ShrinkWrap;
|
||||
}
|
||||
|
||||
@ -2353,7 +2353,7 @@ void ReflowInput::InitConstraints(
|
||||
}
|
||||
} else {
|
||||
// Shrink-wrap blocks that are orthogonal to their container.
|
||||
if (isBlock && mCBReflowInput &&
|
||||
if (isBlockLevel && mCBReflowInput &&
|
||||
mCBReflowInput->GetWritingMode().IsOrthogonalTo(mWritingMode)) {
|
||||
mComputeSizeFlags += ComputeSizeFlag::ShrinkWrap;
|
||||
}
|
||||
@ -2387,7 +2387,7 @@ void ReflowInput::InitConstraints(
|
||||
|
||||
// Exclude inline tables, side captions, outside ::markers, flex and grid
|
||||
// items from block margin calculations.
|
||||
if (isBlock && !IsSideCaption(mFrame, mStyleDisplay, cbwm) &&
|
||||
if (isBlockLevel && !IsSideCaption(mFrame, mStyleDisplay, cbwm) &&
|
||||
mStyleDisplay->mDisplay != StyleDisplay::InlineTable &&
|
||||
!mFrame->IsTableFrame() && !alignCB->IsFlexOrGridContainer() &&
|
||||
!(mFrame->Style()->GetPseudoType() == PseudoStyleType::marker &&
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<label>
|
||||
<foopy style="float:left;" />
|
||||
<foopy style="display: block; float:left;" />
|
||||
</label>
|
||||
</window>
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<body>
|
||||
<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<ttt style="float: right">
|
||||
<ttt style="display: block; float: right;">
|
||||
<img src="../../../testing/crashtest/images/animfish.gif" xmlns="http://www.w3.org/1999/xhtml" />
|
||||
</ttt>
|
||||
</hbox>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<tree/>
|
||||
<tree style="-moz-binding:url(382745-1-binding.xml#randomxbl); position: fixed;">
|
||||
<tree style="-moz-binding:url(382745-1-binding.xml#randomxbl); display: block; position: fixed;">
|
||||
<treecols>
|
||||
<treecol style="-moz-binding:url(382745-1-binding.xml#randomxbl);"/>
|
||||
</treecols>
|
||||
</tree>
|
||||
|
||||
</window>
|
||||
</window>
|
||||
|
@ -1 +1 @@
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><hbox style="display: block; column-count: 15;"><scrollbar height="656119391073809204" style="position: fixed; -moz-appearance: tooltip;"/></hbox></window>
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><hbox style="display: block; column-count: 15;"><scrollbar height="656119391073809204" style="display: block; position: fixed; -moz-appearance: tooltip;"/></hbox></window>
|
||||
|
@ -1967,8 +1967,6 @@ void nsFlexContainerFrame::MarkIntrinsicISizesDirty() {
|
||||
nscoord nsFlexContainerFrame::MeasureFlexItemContentBSize(
|
||||
FlexItem& aFlexItem, bool aForceBResizeForMeasuringReflow,
|
||||
bool aHasLineClampEllipsis, const ReflowInput& aParentReflowInput) {
|
||||
FLEX_LOG("Measuring flex item's content block-size");
|
||||
|
||||
// Set up a reflow input for measuring the flex item's content block-size:
|
||||
WritingMode wm = aFlexItem.Frame()->GetWritingMode();
|
||||
LogicalSize availSize = aParentReflowInput.ComputedSize(wm);
|
||||
@ -1982,7 +1980,6 @@ nscoord nsFlexContainerFrame::MeasureFlexItemContentBSize(
|
||||
// block-size, because that would prevent us from measuring the content
|
||||
// block-size.
|
||||
sizeOverrides.mAspectRatio.emplace(AspectRatio());
|
||||
FLEX_LOGV(" Cross size override: %d", aFlexItem.CrossSize());
|
||||
}
|
||||
sizeOverrides.mStyleBSize.emplace(StyleSize::Auto());
|
||||
|
||||
@ -2908,14 +2905,11 @@ void FlexLine::ResolveFlexibleLengths(nscoord aFlexContainerMainSize,
|
||||
if ((mNumFrozenItems == NumItems()) && !aLineInfo) {
|
||||
// All our items are frozen, so we have no flexible lengths to resolve,
|
||||
// and we aren't being asked to generate computed line info.
|
||||
FLEX_LOG("No flexible length to resolve");
|
||||
return;
|
||||
}
|
||||
MOZ_ASSERT(!IsEmpty() || aLineInfo,
|
||||
"empty lines should take the early-return above");
|
||||
|
||||
FLEX_LOG("Resolving flexible lengths for items");
|
||||
|
||||
// Subtract space occupied by our items' margins/borders/padding/gaps, so
|
||||
// we can just be dealing with the space available for our flex items' content
|
||||
// boxes.
|
||||
@ -4927,8 +4921,6 @@ void nsFlexContainerFrame::DoFlexLayout(
|
||||
} else {
|
||||
sizeOverrides.mStyleBSize.emplace(item.StyleMainSize());
|
||||
}
|
||||
FLEX_LOG("Sizing flex item %p in cross axis", item.Frame());
|
||||
FLEX_LOGV(" Main size override: %d", item.MainSize());
|
||||
|
||||
const WritingMode wm = item.GetWritingMode();
|
||||
LogicalSize availSize = aReflowInput.ComputedSize(wm);
|
||||
@ -5350,8 +5342,6 @@ nsReflowStatus nsFlexContainerFrame::ReflowFlexItem(
|
||||
const FlexItem& aItem, LogicalPoint& aFramePos,
|
||||
const LogicalSize& aAvailableSize, const nsSize& aContainerSize,
|
||||
bool aHasLineClampEllipsis) {
|
||||
FLEX_LOG("Doing final reflow for flex item %p", aItem.Frame());
|
||||
|
||||
WritingMode outerWM = aReflowInput.GetWritingMode();
|
||||
|
||||
StyleSizeOverrides sizeOverrides;
|
||||
@ -5361,8 +5351,6 @@ nsReflowStatus nsFlexContainerFrame::ReflowFlexItem(
|
||||
} else {
|
||||
sizeOverrides.mStyleBSize.emplace(aItem.StyleMainSize());
|
||||
}
|
||||
FLEX_LOGV(" Main size override: %d", aItem.MainSize());
|
||||
|
||||
// Override flex item's cross size if it was stretched in the cross axis (in
|
||||
// which case we're imposing a cross size).
|
||||
if (aItem.IsStretched()) {
|
||||
@ -5371,7 +5359,6 @@ nsReflowStatus nsFlexContainerFrame::ReflowFlexItem(
|
||||
} else {
|
||||
sizeOverrides.mStyleBSize.emplace(aItem.StyleCrossSize());
|
||||
}
|
||||
FLEX_LOGV(" Cross size override: %d", aItem.CrossSize());
|
||||
}
|
||||
if (sizeOverrides.mStyleBSize && aItem.HadMeasuringReflow()) {
|
||||
// Because we are overriding the block-size, *and* we had an earlier
|
||||
|
41
layout/reftests/box/box-as-grid-or-flex-item-1-ref.html
Normal file
41
layout/reftests/box/box-as-grid-or-flex-item-1-ref.html
Normal file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Reference for bug 1580302</title>
|
||||
<style>
|
||||
.grid, .flex {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.grid { display: grid; }
|
||||
.flex { display: flex; }
|
||||
.fCol { flex-direction: column; }
|
||||
|
||||
.item {
|
||||
background: lightblue;
|
||||
}
|
||||
.flexible {
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<!-- The item should fill the grid here (by virtue of the default-stretchy
|
||||
behavior of justify-items and align-items): -->
|
||||
<div class="grid">
|
||||
<div class="item">e</div>
|
||||
</div>
|
||||
|
||||
<!-- For the rest, the item should fill the flex container in the cross axis,
|
||||
and if it's flexible, also fill the container in the main axis. -->
|
||||
<div class="flex">
|
||||
<div class="item">e</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="item flexible">e</div>
|
||||
</div>
|
||||
<div class="flex fCol">
|
||||
<div class="item">e</div>
|
||||
</div>
|
||||
<div class="flex fCol">
|
||||
<div class="item flexible">e</div>
|
||||
</div>
|
||||
</body>
|
42
layout/reftests/box/box-as-grid-or-flex-item-1.html
Normal file
42
layout/reftests/box/box-as-grid-or-flex-item-1.html
Normal file
@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Test for bug 1580302</title>
|
||||
<style>
|
||||
.grid, .flex {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.grid { display: grid; }
|
||||
.flex { display: flex; }
|
||||
.fCol { flex-direction: column; }
|
||||
|
||||
.item {
|
||||
display: -moz-box;
|
||||
background: lightblue;
|
||||
}
|
||||
.flexible {
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<!-- The item should fill the grid here (by virtue of justify-items/align-items
|
||||
default behavior): -->
|
||||
<div class="grid">
|
||||
<div class="item">e</div>
|
||||
</div>
|
||||
|
||||
<!-- For the rest, the item should fill the flex container in the cross axis,
|
||||
and if it's flexible, also fill the container in the main axis. -->
|
||||
<div class="flex">
|
||||
<div class="item">e</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="item flexible">e</div>
|
||||
</div>
|
||||
<div class="flex fCol">
|
||||
<div class="item">e</div>
|
||||
</div>
|
||||
<div class="flex fCol">
|
||||
<div class="item flexible">e</div>
|
||||
</div>
|
||||
</body>
|
@ -1,3 +1,5 @@
|
||||
test-pref(layout.css.xul-box-display-values.content.enabled,true) test-pref(layout.css.xul-box-display-values.survive-blockification.enabled,true) == box-as-grid-or-flex-item-1.html box-as-grid-or-flex-item-1-ref.html
|
||||
|
||||
== flexbox-abspos-container-1a.html flexbox-abspos-container-1-ref.html
|
||||
== flexbox-abspos-container-1b.html flexbox-abspos-container-1-ref.html
|
||||
== flexbox-abspos-container-1c.html flexbox-abspos-container-1-ref.html
|
||||
|
@ -835,8 +835,8 @@ static bool IsNonReplacedInline(nsIFrame* aFrame) {
|
||||
// doesn't apply to ruby boxes.
|
||||
return aFrame->StyleDisplay()->IsInlineFlow() &&
|
||||
!aFrame->IsFrameOfType(nsIFrame::eReplaced) &&
|
||||
!aFrame->IsBlockFrame() && !aFrame->IsScrollFrame() &&
|
||||
!aFrame->IsColumnSetWrapperFrame();
|
||||
!aFrame->IsFieldSetFrame() && !aFrame->IsBlockFrame() &&
|
||||
!aFrame->IsScrollFrame() && !aFrame->IsColumnSetWrapperFrame();
|
||||
}
|
||||
|
||||
static Side SideForPaddingOrMarginOrInsetProperty(nsCSSPropertyID aPropID) {
|
||||
|
@ -349,6 +349,14 @@
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
xul|*:fullscreen:not(:root):not([hidden="true"]) {
|
||||
/* The position: fixed; property above used to force the computed display
|
||||
* value to block. It is no longer the case now, so we manually set it here to
|
||||
* maintain the old behaviour. We should probably not do this, but we don't
|
||||
* fullscreen XUL element that frequently either. */
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Selectors here should match the check in
|
||||
* nsViewportFrame.cpp:ShouldInTopLayerForFullscreen() */
|
||||
*|*:fullscreen:not(:root):not(:-moz-browser-frame) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="MainWindow"
|
||||
title="IWindow Test">
|
||||
<div style="position:absolute">abc</div>
|
||||
<div style="display: block; position:absolute">abc</div>
|
||||
|
||||
|
||||
</window>
|
||||
</window>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<iframe style="position:absolute;"/>
|
||||
</window>
|
||||
<iframe style="position:absolute; display: block;"/>
|
||||
</window>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<hbox style="visibility: collapse; position: relative">
|
||||
<textbox>
|
||||
<hbox style="position: absolute; width: 10px; height: 10px">
|
||||
<hbox style="position: absolute; display: block; width: 10px; height: 10px">
|
||||
</hbox>
|
||||
</textbox>
|
||||
</hbox>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<hbox style="position: relative;visibility: collapse;">
|
||||
<hbox style="padding:5px; border: 5px solid black">
|
||||
<hbox style="position: absolute; width: 10px; height: 10px">
|
||||
<hbox style="position: absolute; display: block; width: 10px; height: 10px">
|
||||
</hbox>
|
||||
</hbox>
|
||||
</hbox>
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
<script>
|
||||
|
||||
function init() {
|
||||
document.getElementById("foopy").style.position = "absolute";
|
||||
function init() {
|
||||
document.getElementById("foopy").style.display = "block";
|
||||
document.getElementById("foopy").style.position = "absolute";
|
||||
}
|
||||
|
||||
window.addEventListener("load", init, 0);
|
||||
@ -12,6 +13,6 @@ window.addEventListener("load", init, 0);
|
||||
|
||||
|
||||
<box id="foopy" />
|
||||
|
||||
|
||||
|
||||
</window>
|
||||
|
@ -5,12 +5,12 @@ document.getElementById('a').removeAttribute('style');
|
||||
}
|
||||
setTimeout(doe,100);
|
||||
</script>
|
||||
<box id="a" style="position: absolute;">
|
||||
<box id="a" style="position: absolute; display: block;">
|
||||
<menuitem sizetopopup="always">
|
||||
<menupopup style="position: absolute;"/>
|
||||
<menupopup style="position: absolute; display: block;"/>
|
||||
</menuitem>
|
||||
|
||||
<box style="position: fixed;">
|
||||
<box style="position: fixed; display: block;">
|
||||
<tree>
|
||||
<treecol>
|
||||
<treecol/>
|
||||
@ -18,4 +18,4 @@ setTimeout(doe,100);
|
||||
</tree>
|
||||
</box>
|
||||
</box>
|
||||
</window>
|
||||
</window>
|
||||
|
@ -1,6 +1,7 @@
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
file_bug386386.sjs
|
||||
[test_blockify_moz_box.html]
|
||||
[test_bug386386.html]
|
||||
[test_bug394800.xhtml]
|
||||
[test_bug511075.html]
|
||||
|
127
layout/xul/test/test_blockify_moz_box.html
Normal file
127
layout/xul/test/test_blockify_moz_box.html
Normal file
@ -0,0 +1,127 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1580012
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 1580012</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<style>
|
||||
/* Styling for parents that blockify their children: */
|
||||
.grid { display: grid; }
|
||||
.flex { display: flex; }
|
||||
|
||||
/* Styling that blockifies an element itself: */
|
||||
.float { float: left; }
|
||||
.abs { position: absolute; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1580012">Mozilla Bug 1580012</a>
|
||||
<p id="display"></p>
|
||||
<div id="content">
|
||||
<!-- Boxes that have no reason to be blockified: -->
|
||||
<div class="moz-box" id="regularMozBox"></div>
|
||||
<div class="moz-inline-box" id="regularMozInlineBox"></div>
|
||||
|
||||
<!-- A grid container with a -moz-box and a -moz-inline-box grid item (which
|
||||
should both end up with display:-moz-box), and a -moz-inline-box
|
||||
grandchild (which should preserve its -moz-inline-box display val): -->
|
||||
<div class="grid">
|
||||
<div class="moz-box" id="gridItemMozBox"></div>
|
||||
<div class="moz-inline-box" id="gridItemMozInlineBox"></div>
|
||||
<div><div class="moz-inline-box" id="gridGrandchildMozInlineBox"></div></div>
|
||||
</div>
|
||||
|
||||
<!-- A flex container with a -moz-box and a -moz-inline-box flex item (which
|
||||
should both end up with display:-moz-box), and a -moz-inline-box
|
||||
grandchild (which should preserve its -moz-inline-box display val): -->
|
||||
<div class="flex">
|
||||
<div class="moz-box" id="flexItemMozBox"></div>
|
||||
<div class="moz-inline-box" id="flexItemMozInlineBox"></div>
|
||||
<div><div class="moz-inline-box" id="flexGrandchildMozInlineBox"></div></div>
|
||||
</div>
|
||||
|
||||
<!-- Boxes that are directly blockified via other styling on them: -->
|
||||
<!-- XXXdholbert commenting these out -- see notes below about assertion
|
||||
failures for floated -moz-box.
|
||||
<div class="float moz-box" id="floatMozBox"></div>
|
||||
<div class="float moz-inline-box" id="floatMozInlineBox"></div>
|
||||
-->
|
||||
<!-- XXXdholbert commenting these out -- see notes below about assertion
|
||||
failures for positioned -moz-box.
|
||||
<div class="abs moz-box" id="absMozBox"></div>
|
||||
<div class="abs moz-inline-box" id="absMozInlineBox"></div>
|
||||
-->
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 1580012 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function checkDisp(elemId, expectedDisplay) {
|
||||
var elem = document.getElementById(elemId);
|
||||
ok(elem, "should have a valid ID for an element");
|
||||
|
||||
is(getComputedStyle(elem).display, expectedDisplay,
|
||||
"Element with ID " + elemId + " should have expected display value");
|
||||
}
|
||||
function runTest() {
|
||||
// Create CSS Style rules to add -moz-box / -moz-inline-box styling.
|
||||
// Note that these style won't parse correctly until after we've flipped
|
||||
// the prefs via pushPrefEnv(). That's why I'm creating these style rules
|
||||
// here rather than just putting them inline in the <style> element.
|
||||
var sheet = document.styleSheets[0];
|
||||
sheet.insertRule(".moz-box { display: -moz-box; }");
|
||||
sheet.insertRule(".moz-inline-box { display: -moz-inline-box; }");
|
||||
|
||||
// Check the computed 'display' of the various elements.
|
||||
checkDisp("regularMozBox", "-moz-box");
|
||||
checkDisp("regularMozInlineBox", "-moz-inline-box");
|
||||
|
||||
checkDisp("gridItemMozBox", "-moz-box");
|
||||
checkDisp("gridItemMozInlineBox", "-moz-box");
|
||||
checkDisp("gridGrandchildMozInlineBox", "-moz-inline-box");
|
||||
|
||||
checkDisp("flexItemMozBox", "-moz-box");
|
||||
checkDisp("flexItemMozInlineBox", "-moz-box");
|
||||
checkDisp("flexGrandchildMozInlineBox", "-moz-inline-box");
|
||||
|
||||
// XXXdholbert The floated boxes trigger assertion failures where
|
||||
// nsLineLayout thinks it somehow ended up with an inline-level (really, just
|
||||
// a non-'block') floated thing. In practice this isn't really a concern
|
||||
// since -moz-box display values are disabled in content and since XUL
|
||||
// doesn't use 'float' for layout. So: I've added a fatal assertion in
|
||||
// ReflowInput.cpp to validate that we never actually encounter a floated
|
||||
// -moz-box/-moz-inline-box, and I'm commenting out these lines (which
|
||||
// trigger that fatal assertion).
|
||||
//
|
||||
// checkDisp("floatMozBox", "-moz-box");
|
||||
// checkDisp("floatMozInlineBox", "-moz-box");
|
||||
|
||||
|
||||
// XXXdholbert These abspos boxes trigger a diagnostic assertion added in
|
||||
// bug 1582819 which is intended to flush out XUL content that is positioned
|
||||
// and hence was previously blockified to 'block' but will now be '-moz-box'.
|
||||
// The diagnostic assertion doesn't need to stay around forever, but while
|
||||
// it exists, we can't test this scenario without triggering it.
|
||||
//
|
||||
// checkDisp("absMozBox", "-moz-box");
|
||||
// checkDisp("absMozInlineBox", "-moz-box");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({
|
||||
"set": [
|
||||
["layout.css.xul-box-display-values.content.enabled", true],
|
||||
["layout.css.xul-box-display-values.survive-blockification.enabled", true]
|
||||
]
|
||||
}, runTest);
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -3,7 +3,7 @@
|
||||
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<menuitem xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
style="position: absolute; ">
|
||||
style="position: absolute; display: block;">
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=398982
|
||||
-->
|
||||
|
@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=398982
|
||||
-->
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<popupgroup style="position: absolute; ">
|
||||
<popupgroup style="position: absolute; display: block;">
|
||||
<tooltip type="zzz">
|
||||
<treecols/>
|
||||
</tooltip>
|
||||
|
@ -3,9 +3,16 @@
|
||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="document.documentElement.style.content = '\'a\'';">
|
||||
|
||||
|
||||
<html:style>
|
||||
* { position: fixed; }
|
||||
*:not(style) {
|
||||
/* At the time this testcase was added, the above `float` styling would
|
||||
have automatically forced "display:block" for these elements, so we
|
||||
should preserve that styling to preserve the integrity of the crashtest
|
||||
since blockification behavior for -moz-box is changing. */
|
||||
display: block;
|
||||
}
|
||||
</html:style>
|
||||
|
||||
<tree rows="6">
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" class="reftest-wait">
|
||||
|
||||
<tree id="a" style="position: fixed;">
|
||||
<box style=" display: -moz-box; position: fixed;">
|
||||
<tree id="a" style="display: block; position: fixed;">
|
||||
<box style=" display: block; position: fixed;">
|
||||
<treecol style=" display: -moz-box;"/>
|
||||
</box>
|
||||
<box style="position: fixed;">
|
||||
<treechildren style="display: -moz-box; position: absolute;"/>
|
||||
<box style="display: block; position: fixed;">
|
||||
<treechildren style="display: block; position: absolute;"/>
|
||||
</box>
|
||||
</tree>
|
||||
|
||||
|
@ -5367,6 +5367,14 @@
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Pref to control whether display: -moz-box and display: -moz-inline-box are
|
||||
# "blockified" to "-moz-box" (rather than to "block")
|
||||
- name: layout.css.xul-box-display-values.survive-blockification.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Whether to block large cursors intersecting UI.
|
||||
- name: layout.cursor.block.enabled
|
||||
type: bool
|
||||
|
@ -389,6 +389,20 @@ impl Display {
|
||||
};
|
||||
Display::from3(DisplayOutside::Block, inside, self.is_list_item())
|
||||
},
|
||||
// If this pref is true, then we'll blockify "-moz-inline-box" to
|
||||
// "-moz-box", and blockify "-moz-box" to itself. Otherwise, we
|
||||
// blockify both to "block".
|
||||
#[cfg(feature = "gecko")]
|
||||
DisplayOutside::XUL => {
|
||||
if static_prefs::pref!("layout.css.xul-box-display-values.survive-blockification.enabled") {
|
||||
match self.inside() {
|
||||
DisplayInside::MozInlineBox | DisplayInside::MozBox => Display::MozBox,
|
||||
_ => Display::Block,
|
||||
}
|
||||
} else {
|
||||
Display::Block
|
||||
}
|
||||
},
|
||||
DisplayOutside::Block | DisplayOutside::None => *self,
|
||||
#[cfg(any(feature = "servo-layout-2013", feature = "gecko"))]
|
||||
_ => Display::Block,
|
||||
|
@ -1,7 +1,4 @@
|
||||
[fieldset-display.html]
|
||||
[fieldset with display: inline]
|
||||
expected: FAIL
|
||||
|
||||
[fieldset with display: run-in]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -205,6 +205,7 @@
|
||||
}
|
||||
|
||||
if (!insertPos) {
|
||||
newitem.style.display = "block";
|
||||
newitem.style.position = "fixed";
|
||||
newitem.style.top = "100%";
|
||||
newitem.style.marginTop = "-15px";
|
||||
@ -294,6 +295,7 @@
|
||||
|
||||
if (aSlideIn) {
|
||||
this.currentNotification = aNotification;
|
||||
aNotification.style.removeProperty("display");
|
||||
aNotification.style.removeProperty("position");
|
||||
aNotification.style.removeProperty("top");
|
||||
aNotification.style.removeProperty("margin-top");
|
||||
|
@ -11,3 +11,10 @@
|
||||
/* Make multiple popupnotifications stack vertically. */
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.popup-notification-panel > popupnotification:not([hidden]) {
|
||||
/* Since the anonymous parent (::part(arrowcontent)) has display: flex, sizing
|
||||
* computations work better with display: block; than with the XUL default
|
||||
* display: -moz-box; */
|
||||
display: block;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<body>
|
||||
|
||||
<xul:hbox style="position: fixed; -moz-appearance: checkbox;" />
|
||||
<xul:hbox style="display: block; position: fixed; -moz-appearance: checkbox;" />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user