author | Xidorn Quan <quanxunzhen@gmail.com> |
Fri, 20 Mar 2015 09:45:41 +1100 | |
changeset 234577 | 8f257f3baf0c72b9ece851770e877f8ee8c4ba22 |
parent 234576 | 6d94c4cf9813cd8feac6b3e668439054ae94559c |
child 234578 | 810a0dfe489fec63fbb518f64607bafa13dce3c8 |
push id | 28448 |
push user | kwierso@gmail.com |
push date | Fri, 20 Mar 2015 03:54:14 +0000 |
treeherder | mozilla-central@4d2d97b3ba34 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bz, kwierso |
bugs | 1143535 |
milestone | 39.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -9891,33 +9891,33 @@ nsCSSFrameConstructor::CreateNeededPseud nsIFrame* aParentFrame) { const ParentType ourParentType = GetParentType(aParentFrame); if (!IsRubyParentType(ourParentType) || aItems.AllWantParentType(ourParentType)) { return; } - nsStyleContext* parentStyle = aParentFrame->StyleContext(); - if (!parentStyle->GetPseudo()) { - // Normally, pseudo frames start from and end at some elements, + if (!IsRubyPseudo(aParentFrame)) { + // Normally, ruby pseudo frames start from and end at some elements, // which means they don't have leading and trailing whitespaces at // all. But there are two cases where they do actually have leading // or trailing whitespaces: // 1. It is an inter-segment whitespace which in an individual ruby // base container. // 2. The pseudo frame starts from or ends at consecutive inline // content, which is not pure whitespace, but includes some. // In either case, the whitespaces are not the leading or trailing // whitespaces defined in the spec, and thus should not be trimmed. TrimLeadingAndTrailingWhitespaces(aState, aItems); } FCItemIterator iter(aItems); nsIContent* parentContent = aParentFrame->GetContent(); + nsStyleContext* parentStyle = aParentFrame->StyleContext(); while (!iter.IsDone()) { if (!iter.SkipItemsWantingParentType(ourParentType)) { if (ourParentType == eTypeRuby) { WrapItemsInPseudoRubyLevelContainer(aState, iter, parentStyle, parentContent); } else { WrapItemsInPseudoRubyLeafBox(iter, parentStyle, parentContent); }