зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1365163 - Remove pref layout.css.display-flow-root.enabled. r=mats
MozReview-Commit-ID: AA3tKHCQ5E0 --HG-- extra : rebase_source : 9a7b16043e4aff09a4997138a9016e2f7f791f58
This commit is contained in:
Родитель
c57d39227d
Коммит
78af557ec8
|
@ -153,7 +153,6 @@ using namespace mozilla::gfx;
|
|||
#define GRID_ENABLED_PREF_NAME "layout.css.grid.enabled"
|
||||
#define GRID_TEMPLATE_SUBGRID_ENABLED_PREF_NAME "layout.css.grid-template-subgrid-value.enabled"
|
||||
#define WEBKIT_PREFIXES_ENABLED_PREF_NAME "layout.css.prefixes.webkit"
|
||||
#define DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME "layout.css.display-flow-root.enabled"
|
||||
#define TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME "layout.css.text-align-unsafe-value.enabled"
|
||||
#define FLOAT_LOGICAL_VALUES_ENABLED_PREF_NAME "layout.css.float-logical-values.enabled"
|
||||
|
||||
|
@ -320,36 +319,6 @@ WebkitPrefixEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
|||
}
|
||||
}
|
||||
|
||||
// When the pref "layout.css.display-flow-root.enabled" changes, this function is
|
||||
// invoked to let us update kDisplayKTable, to selectively disable or restore
|
||||
// the entries for "flow-root" in that table.
|
||||
static void
|
||||
DisplayFlowRootEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
||||
{
|
||||
NS_ASSERTION(strcmp(aPrefName, DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME) == 0,
|
||||
"Did you misspell " DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME " ?");
|
||||
|
||||
static bool sIsDisplayFlowRootKeywordIndexInitialized;
|
||||
static int32_t sIndexOfFlowRootInDisplayTable;
|
||||
bool isDisplayFlowRootEnabled =
|
||||
Preferences::GetBool(DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME, false);
|
||||
|
||||
if (!sIsDisplayFlowRootKeywordIndexInitialized) {
|
||||
// First run: find the position of "flow-root" in kDisplayKTable.
|
||||
sIndexOfFlowRootInDisplayTable =
|
||||
nsCSSProps::FindIndexOfKeyword(eCSSKeyword_flow_root,
|
||||
nsCSSProps::kDisplayKTable);
|
||||
sIsDisplayFlowRootKeywordIndexInitialized = true;
|
||||
}
|
||||
|
||||
// OK -- now, stomp on or restore the "flow-root" entry in kDisplayKTable,
|
||||
// depending on whether the pref is enabled vs. disabled.
|
||||
if (sIndexOfFlowRootInDisplayTable >= 0) {
|
||||
nsCSSProps::kDisplayKTable[sIndexOfFlowRootInDisplayTable].mKeyword =
|
||||
isDisplayFlowRootEnabled ? eCSSKeyword_flow_root : eCSSKeyword_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
// When the pref "layout.css.text-align-unsafe-value.enabled" changes, this
|
||||
// function is called to let us update kTextAlignKTable & kTextAlignLastKTable,
|
||||
// to selectively disable or restore the entries for "unsafe" in those tables.
|
||||
|
@ -7780,8 +7749,6 @@ static const PrefCallbacks kPrefCallbacks[] = {
|
|||
WebkitPrefixEnabledPrefChangeCallback },
|
||||
{ TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME,
|
||||
TextAlignUnsafeEnabledPrefChangeCallback },
|
||||
{ DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME,
|
||||
DisplayFlowRootEnabledPrefChangeCallback },
|
||||
{ FLOAT_LOGICAL_VALUES_ENABLED_PREF_NAME,
|
||||
FloatLogicalValuesEnabledPrefChangeCallback },
|
||||
};
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Reference: display:flow-root (disabled)</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1322191">
|
||||
<style type="text/css">
|
||||
html,body {
|
||||
color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
|
||||
}
|
||||
|
||||
.float {
|
||||
float: left;
|
||||
width: 20px;
|
||||
height: 40px;
|
||||
background: pink;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="border:1px solid">
|
||||
<span>
|
||||
<div style="margin: 20px 0">x</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div style="border:1px solid">
|
||||
<span><div class="float"></div></span>
|
||||
</div>
|
||||
|
||||
<div style="border:1px solid">
|
||||
<div class="float"></div>
|
||||
<span style="border:1px solid">x</span>
|
||||
</div>
|
||||
|
||||
<span>
|
||||
<span style="display:inline-block; margin-top:20px"><div>x</div></span>
|
||||
</span>
|
||||
|
||||
<div style="margin-top:20px"></div>
|
||||
<span style="border:3px solid; height:10px">
|
||||
<!-- this tests that a flow-root fills the available width, and that 'height' applies -->
|
||||
</span>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -28,5 +28,4 @@ asserts(1) asserts-if(styloVsGecko,2) == display-contents-xbl-5.xul display-cont
|
|||
== display-contents-writing-mode-1.html display-contents-writing-mode-1-ref.html
|
||||
== display-contents-writing-mode-2.html display-contents-writing-mode-2-ref.html
|
||||
needs-focus == display-contents-state-change.html display-contents-state-change-ref.html
|
||||
pref(layout.css.display-flow-root.enabled,true) == display-flow-root-001.html display-flow-root-001-ref.html
|
||||
pref(layout.css.display-flow-root.enabled,false) fails-if(styloVsGecko||stylo) == display-flow-root-001.html display-flow-root-disabled-001-ref.html
|
||||
== display-flow-root-001.html display-flow-root-001-ref.html
|
|
@ -1294,7 +1294,6 @@ KTableEntry nsCSSProps::kDisplayKTable[] = {
|
|||
{ eCSSKeyword__webkit_flex, StyleDisplay::Flex },
|
||||
{ eCSSKeyword__webkit_inline_flex, StyleDisplay::InlineFlex },
|
||||
{ eCSSKeyword_contents, StyleDisplay::Contents },
|
||||
// The next entry is controlled by the layout.css.display-flow-root.enabled pref.
|
||||
{ eCSSKeyword_flow_root, StyleDisplay::FlowRoot },
|
||||
{ eCSSKeyword_UNKNOWN, -1 }
|
||||
};
|
||||
|
|
|
@ -7852,9 +7852,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.float-logical-values.enabled")) {
|
|||
gCSSProperties["clear"].invalid_values.push("inline-end");
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.display-flow-root.enabled")) {
|
||||
gCSSProperties["display"].other_values.push("flow-root");
|
||||
}
|
||||
gCSSProperties["display"].other_values.push("flow-root");
|
||||
|
||||
// Copy aliased properties' fields from their alias targets.
|
||||
for (var prop in gCSSProperties) {
|
||||
|
|
|
@ -2886,9 +2886,6 @@ pref("layout.css.grid-template-subgrid-value.enabled", false);
|
|||
// Is support for CSS contain enabled?
|
||||
pref("layout.css.contain.enabled", false);
|
||||
|
||||
// Is support for CSS display:flow-root enabled?
|
||||
pref("layout.css.display-flow-root.enabled", true);
|
||||
|
||||
// Is support for CSS box-decoration-break enabled?
|
||||
pref("layout.css.box-decoration-break.enabled", true);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче