зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1587624 - Add a console log when we propagate principal writing-mode from <body>. r=emilio
I use `warningFlag` instead of `infoFlag` because even if the principal writing-mode propagation is written in the spec, its effect might surprise the developers. Differential Revision: https://phabricator.services.mozilla.com/D48774 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f95dd888e1
Коммит
022a920854
|
@ -42,3 +42,7 @@ CompositorAnimationWarningHasRenderingObserver=Animation cannot be run on the co
|
|||
|
||||
## LOCALIZATION NOTE: Do not translate zoom, calc(), "transform", "transform-origin: 0 0"
|
||||
ZoomPropertyWarning=This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”.
|
||||
|
||||
## LOCALIZATION NOTE(PrincipalWritingModePropagationWarning):
|
||||
## Do not translate <html>, <body>, CSS, "writing-mode", "direction", "text-orientation", :root, and "The Principal Writing Mode" because they are technical terms.
|
||||
PrincipalWritingModePropagationWarning=When rendering the <html> element, the used values of CSS properties “writing-mode”, “direction”, and “text-orientation” on the <html> element are taken from the computed values of the <body> element, not from the <html> element’s own values. Consider setting these properties on the :root CSS pseudo-class. For more information see “The Principal Writing Mode” in https://www.w3.org/TR/css-writing-modes-3/#principal-flow
|
||||
|
|
|
@ -2333,8 +2333,17 @@ nsIFrame* nsCSSFrameConstructor::ConstructDocElementFrame(
|
|||
Element* body = mDocument->GetBodyElement();
|
||||
if (body) {
|
||||
RefPtr<ComputedStyle> bodyStyle = ResolveComputedStyle(body);
|
||||
WritingMode bodyWM(bodyStyle);
|
||||
|
||||
if (bodyWM != mDocElementContainingBlock->GetWritingMode()) {
|
||||
nsContentUtils::ReportToConsole(
|
||||
nsIScriptError::warningFlag, NS_LITERAL_CSTRING("Layout"),
|
||||
mDocument, nsContentUtils::eLAYOUT_PROPERTIES,
|
||||
"PrincipalWritingModePropagationWarning");
|
||||
}
|
||||
|
||||
mDocElementContainingBlock->PropagateWritingModeToSelfAndAncestors(
|
||||
WritingMode(bodyStyle));
|
||||
bodyWM);
|
||||
} else {
|
||||
mDocElementContainingBlock->PropagateWritingModeToSelfAndAncestors(
|
||||
mDocElementContainingBlock->GetWritingMode());
|
||||
|
|
Загрузка…
Ссылка в новой задаче