mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1138527 part 1 - Make ruby annotations have the same font inflation as its containing ruby frame. r=roc
This commit is contained in:
parent
47af3965e1
commit
aad16695da
@ -7227,14 +7227,25 @@ nsLayoutUtils::FontSizeInflationInner(const nsIFrame *aFrame,
|
||||
f = f->GetParent()) {
|
||||
nsIContent* content = f->GetContent();
|
||||
nsIAtom* fType = f->GetType();
|
||||
nsIFrame* parent = f->GetParent();
|
||||
// Also, if there is more than one frame corresponding to a single
|
||||
// content node, we want the outermost one.
|
||||
if (!(f->GetParent() && f->GetParent()->GetContent() == content) &&
|
||||
if (!(parent && parent->GetContent() == content) &&
|
||||
// ignore width/height on inlines since they don't apply
|
||||
fType != nsGkAtoms::inlineFrame &&
|
||||
// ignore width on radios and checkboxes since we enlarge them and
|
||||
// they have width/height in ua.css
|
||||
fType != nsGkAtoms::formControlFrame) {
|
||||
// ruby annotations should have the same inflation as its
|
||||
// grandparent, which is the ruby frame contains the annotation.
|
||||
if (fType == nsGkAtoms::rubyTextFrame) {
|
||||
MOZ_ASSERT(parent &&
|
||||
parent->GetType() == nsGkAtoms::rubyTextContainerFrame);
|
||||
nsIFrame* grandparent = parent->GetParent();
|
||||
MOZ_ASSERT(grandparent &&
|
||||
grandparent->GetType() == nsGkAtoms::rubyFrame);
|
||||
return FontSizeInflationFor(grandparent);
|
||||
}
|
||||
nsStyleCoord stylePosWidth = f->StylePosition()->mWidth;
|
||||
nsStyleCoord stylePosHeight = f->StylePosition()->mHeight;
|
||||
if (stylePosWidth.GetUnit() != eStyleUnit_Auto ||
|
||||
|
Loading…
Reference in New Issue
Block a user