зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1133697 part 2 - Scan ruby texts instead of their container for building text run. r=roc
--HG-- extra : source : 2c39dfb432eea53185ed28c5790cf472bf09abf8
This commit is contained in:
Родитель
860930550d
Коммит
46ca97ae38
|
@ -1268,7 +1268,6 @@ BuildTextRuns(gfxContext* aContext, nsTextFrame* aForFrame,
|
|||
aLineContainer = FindLineContainer(lineContainerChild);
|
||||
} else {
|
||||
NS_ASSERTION((aLineContainer == FindLineContainer(aForFrame) ||
|
||||
aLineContainer->GetType() == nsGkAtoms::rubyTextContainerFrame ||
|
||||
(aLineContainer->GetType() == nsGkAtoms::letterFrame &&
|
||||
aLineContainer->IsFloating())),
|
||||
"Wrong line container hint");
|
||||
|
@ -1291,13 +1290,26 @@ BuildTextRuns(gfxContext* aContext, nsTextFrame* aForFrame,
|
|||
nsBlockFrame* block = nsLayoutUtils::GetAsBlock(aLineContainer);
|
||||
|
||||
if (!block) {
|
||||
NS_ASSERTION(!aLineContainer->GetPrevInFlow() && !aLineContainer->GetNextInFlow(),
|
||||
"Breakable non-block line containers not supported");
|
||||
nsIFrame* textRunContainer = aLineContainer;
|
||||
if (aLineContainer->GetType() == nsGkAtoms::rubyTextContainerFrame) {
|
||||
textRunContainer = aForFrame;
|
||||
while (textRunContainer &&
|
||||
textRunContainer->GetType() != nsGkAtoms::rubyTextFrame) {
|
||||
textRunContainer = textRunContainer->GetParent();
|
||||
}
|
||||
MOZ_ASSERT(textRunContainer &&
|
||||
textRunContainer->GetParent() == aLineContainer);
|
||||
} else {
|
||||
NS_ASSERTION(
|
||||
!aLineContainer->GetPrevInFlow() && !aLineContainer->GetNextInFlow(),
|
||||
"Breakable non-block line containers other than "
|
||||
"ruby text container is not supported");
|
||||
}
|
||||
// Just loop through all the children of the linecontainer ... it's really
|
||||
// just one line
|
||||
scanner.SetAtStartOfLine();
|
||||
scanner.SetCommonAncestorWithLastFrame(nullptr);
|
||||
nsIFrame* child = aLineContainer->GetFirstPrincipalChild();
|
||||
nsIFrame* child = textRunContainer->GetFirstPrincipalChild();
|
||||
while (child) {
|
||||
scanner.ScanFrame(child);
|
||||
child = child->GetNextSibling();
|
||||
|
|
Загрузка…
Ссылка в новой задаче