зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1099557 followup - Put the default setting for control-character visibility behind a runtime pref, and keep it off-by-default on release builds for now. r=dbaron
This commit is contained in:
Родитель
be39b36374
Коммит
fa18513a7e
|
@ -316,10 +316,10 @@ pref(layout.css.text-align-true-value.enabled,true) == text-align-true.html text
|
||||||
!= control-chars-02.html control-chars-02-notref.html
|
!= control-chars-02.html control-chars-02-notref.html
|
||||||
== control-chars-03a.html control-chars-03-ref.html
|
== control-chars-03a.html control-chars-03-ref.html
|
||||||
== control-chars-03b.html control-chars-03-ref.html
|
== control-chars-03b.html control-chars-03-ref.html
|
||||||
!= control-chars-04a.html control-chars-04-notref.html
|
pref(layout.css.control-characters.visible,true) != control-chars-04a.html control-chars-04-notref.html
|
||||||
!= control-chars-04b.html control-chars-04-notref.html
|
pref(layout.css.control-characters.visible,true) != control-chars-04b.html control-chars-04-notref.html
|
||||||
!= control-chars-04c.html control-chars-04-notref.html
|
pref(layout.css.control-characters.visible,true) != control-chars-04c.html control-chars-04-notref.html
|
||||||
!= control-chars-04d.html control-chars-04-notref.html
|
pref(layout.css.control-characters.visible,true) != control-chars-04d.html control-chars-04-notref.html
|
||||||
|
|
||||||
# font fallback for <space> when not supported in the primary font family - bug 970891
|
# font fallback for <space> when not supported in the primary font family - bug 970891
|
||||||
HTTP(..) == space-font-1.html space-font-1-ref.html
|
HTTP(..) == space-font-1.html space-font-1-ref.html
|
||||||
|
|
|
@ -62,6 +62,7 @@ static bool sUnprefixingServiceEnabled;
|
||||||
static bool sUnprefixingServiceGloballyWhitelisted;
|
static bool sUnprefixingServiceGloballyWhitelisted;
|
||||||
#endif
|
#endif
|
||||||
static bool sMozGradientsEnabled;
|
static bool sMozGradientsEnabled;
|
||||||
|
static bool sControlCharVisibility;
|
||||||
|
|
||||||
const uint32_t
|
const uint32_t
|
||||||
nsCSSProps::kParserVariantTable[eCSSProperty_COUNT_no_shorthands] = {
|
nsCSSProps::kParserVariantTable[eCSSProperty_COUNT_no_shorthands] = {
|
||||||
|
@ -15717,6 +15718,8 @@ nsCSSParser::Startup()
|
||||||
#endif
|
#endif
|
||||||
Preferences::AddBoolVarCache(&sMozGradientsEnabled,
|
Preferences::AddBoolVarCache(&sMozGradientsEnabled,
|
||||||
"layout.css.prefixes.gradients");
|
"layout.css.prefixes.gradients");
|
||||||
|
Preferences::AddBoolVarCache(&sControlCharVisibility,
|
||||||
|
"layout.css.control-characters.visible");
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCSSParser::nsCSSParser(mozilla::css::Loader* aLoader,
|
nsCSSParser::nsCSSParser(mozilla::css::Loader* aLoader,
|
||||||
|
@ -16049,3 +16052,12 @@ nsCSSParser::IsValueValidForProperty(const nsCSSProperty aPropID,
|
||||||
return static_cast<CSSParserImpl*>(mImpl)->
|
return static_cast<CSSParserImpl*>(mImpl)->
|
||||||
IsValueValidForProperty(aPropID, aPropValue);
|
IsValueValidForProperty(aPropID, aPropValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* static */
|
||||||
|
uint8_t
|
||||||
|
nsCSSParser::ControlCharVisibilityDefault()
|
||||||
|
{
|
||||||
|
return sControlCharVisibility
|
||||||
|
? NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE
|
||||||
|
: NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN;
|
||||||
|
}
|
||||||
|
|
|
@ -314,6 +314,11 @@ public:
|
||||||
bool IsValueValidForProperty(const nsCSSProperty aPropID,
|
bool IsValueValidForProperty(const nsCSSProperty aPropID,
|
||||||
const nsAString& aPropValue);
|
const nsAString& aPropValue);
|
||||||
|
|
||||||
|
// Return the default value to be used for -moz-control-character-visibility,
|
||||||
|
// from preferences (cached by our Startup(), so that both nsStyleText and
|
||||||
|
// nsRuleNode can have fast access to it).
|
||||||
|
static uint8_t ControlCharVisibilityDefault();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// This is a CSSParserImpl*, but if we expose that type name in this
|
// This is a CSSParserImpl*, but if we expose that type name in this
|
||||||
// header, we can't put the type definition (in nsCSSParser.cpp) in
|
// header, we can't put the type definition (in nsCSSParser.cpp) in
|
||||||
|
|
|
@ -4379,7 +4379,7 @@ nsRuleNode::ComputeTextData(void* aStartStruct,
|
||||||
conditions,
|
conditions,
|
||||||
SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT,
|
SETDSC_ENUMERATED | SETDSC_UNSET_INHERIT,
|
||||||
parentText->mControlCharacterVisibility,
|
parentText->mControlCharacterVisibility,
|
||||||
NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE, 0, 0, 0, 0);
|
nsCSSParser::ControlCharVisibilityDefault(), 0, 0, 0, 0);
|
||||||
|
|
||||||
COMPUTE_END_INHERITED(Text, text)
|
COMPUTE_END_INHERITED(Text, text)
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
#include "nsIWidget.h"
|
#include "nsIWidget.h"
|
||||||
#include "nsCRTGlue.h"
|
#include "nsCRTGlue.h"
|
||||||
|
#include "nsCSSParser.h"
|
||||||
#include "nsCSSProps.h"
|
#include "nsCSSProps.h"
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
|
@ -3421,7 +3422,7 @@ nsStyleText::nsStyleText(void)
|
||||||
mRubyPosition = NS_STYLE_RUBY_POSITION_OVER;
|
mRubyPosition = NS_STYLE_RUBY_POSITION_OVER;
|
||||||
mTextSizeAdjust = NS_STYLE_TEXT_SIZE_ADJUST_AUTO;
|
mTextSizeAdjust = NS_STYLE_TEXT_SIZE_ADJUST_AUTO;
|
||||||
mTextCombineUpright = NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE;
|
mTextCombineUpright = NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE;
|
||||||
mControlCharacterVisibility = NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE;
|
mControlCharacterVisibility = nsCSSParser::ControlCharVisibilityDefault();
|
||||||
|
|
||||||
mLetterSpacing.SetNormalValue();
|
mLetterSpacing.SetNormalValue();
|
||||||
mLineHeight.SetNormalValue();
|
mLineHeight.SetNormalValue();
|
||||||
|
|
|
@ -2394,6 +2394,13 @@ pref("layout.css.scroll-snap.enabled", true);
|
||||||
// Is support for document.fonts enabled?
|
// Is support for document.fonts enabled?
|
||||||
pref("layout.css.font-loading-api.enabled", true);
|
pref("layout.css.font-loading-api.enabled", true);
|
||||||
|
|
||||||
|
// Should stray control characters be rendered visibly?
|
||||||
|
#ifdef RELEASE_BUILD
|
||||||
|
pref("layout.css.control-characters.visible", false);
|
||||||
|
#else
|
||||||
|
pref("layout.css.control-characters.visible", true);
|
||||||
|
#endif
|
||||||
|
|
||||||
// pref for which side vertical scrollbars should be on
|
// pref for which side vertical scrollbars should be on
|
||||||
// 0 = end-side in UI direction
|
// 0 = end-side in UI direction
|
||||||
// 1 = end-side in document/content direction
|
// 1 = end-side in document/content direction
|
||||||
|
|
Загрузка…
Ссылка в новой задаче