зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1752649
- Use GetInFlowParent when retrieving language to be used for quote marks from the element's context. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D137384
This commit is contained in:
Родитель
f73fac8381
Коммит
f22da7a73f
|
@ -0,0 +1,4 @@
|
|||
<style>
|
||||
:first-of-type::before { position: fixed }
|
||||
</style>
|
||||
<q>
|
|
@ -563,3 +563,4 @@ load 1723200.html
|
|||
load 1729578.html
|
||||
load 1729581.html
|
||||
load 1734007.html
|
||||
load 1752649.html
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "nsReadableUtils.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/dom/Text.h"
|
||||
|
@ -52,12 +53,14 @@ nsString nsQuoteNode::Text() {
|
|||
|
||||
if (quotesProp.IsAuto()) {
|
||||
// Look up CLDR-derived quotation marks for the language of the context.
|
||||
const nsIFrame* frame = mPseudoFrame->GetParent();
|
||||
const nsIFrame* frame = mPseudoFrame->GetInFlowParent();
|
||||
// Parent of the pseudo is the element around which the quotes are applied;
|
||||
// we want lang from *its* parent, unless it is the root.
|
||||
// XXX Are there other cases where we shouldn't look up to the parent?
|
||||
if (!frame->Style()->IsRootElementStyle()) {
|
||||
frame = frame->GetParent();
|
||||
if (const nsIFrame* parent = frame->GetInFlowParent()) {
|
||||
frame = parent;
|
||||
}
|
||||
}
|
||||
const intl::Quotes* quotes =
|
||||
intl::QuotesForLang(frame->StyleFont()->mLanguage);
|
||||
|
|
Загрузка…
Ссылка в новой задаче