Bug 1360508: Use the parent's frame style context when handling text-combine. r=xidorn

Instead of the parent style context itself. This also fixes bug 1360530.

It's not clear what should we use in this case, it depends on the resolution in
[1] and [2].

While those get resolved, this is probably ok, and gets rid of the only
styleContext->GetParent() outside nsRuleNode.

[1]: https://github.com/w3c/csswg-drafts/issues/1249
[2]: https://github.com/w3c/csswg-drafts/issues/1281

MozReview-Commit-ID: LSOgFCwQi1W
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-04-28 14:48:22 +02:00
Родитель 2e7660653c
Коммит 68de453c9b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -5526,7 +5526,7 @@ nsTextFrame::UpdateTextEmphasis(WritingMode aWM, PropertyProvider& aProvider)
nsStyleContext* styleContext = StyleContext(); nsStyleContext* styleContext = StyleContext();
bool isTextCombined = styleContext->IsTextCombined(); bool isTextCombined = styleContext->IsTextCombined();
if (isTextCombined) { if (isTextCombined) {
styleContext = styleContext->GetParent(); styleContext = GetParent()->StyleContext();
} }
RefPtr<nsFontMetrics> fm = nsLayoutUtils:: RefPtr<nsFontMetrics> fm = nsLayoutUtils::
GetFontMetricsOfEmphasisMarks(styleContext, GetFontSizeInflation()); GetFontMetricsOfEmphasisMarks(styleContext, GetFontSizeInflation());