Bug 1376640. Fix dynamic updates when an inline that sits between a first-letter and its block changes style. r=heycam
MozReview-Commit-ID: 8osMUpYVRvR
This commit is contained in:
@@ -11811,6 +11811,8 @@ nsCSSFrameConstructor::CreateLetterFrame(nsContainerFrame* aBlockFrame,
|
||||
}
|
||||
MOZ_ASSERT(!aBlockFrame->GetPrevContinuation(),
|
||||
"Setting up a first-letter frame on a non-first block continuation?");
|
||||
auto parent = static_cast<nsContainerFrame*>(aParentFrame->FirstContinuation());
|
||||
parent->SetHasFirstLetterChild();
|
||||
aBlockFrame->SetProperty(nsContainerFrame::FirstLetterProperty(),
|
||||
letterFrame);
|
||||
aTextContent->SetPrimaryFrame(textFrame);
|
||||
@@ -11956,6 +11958,8 @@ nsCSSFrameConstructor::RemoveFloatingFirstLetterFrames(
|
||||
// Somethings really wrong
|
||||
return;
|
||||
}
|
||||
static_cast<nsContainerFrame*>(parentFrame->FirstContinuation())->
|
||||
ClearHasFirstLetterChild();
|
||||
|
||||
// Create a new text frame with the right style context that maps
|
||||
// all of the content that was previously part of the letter frame
|
||||
@@ -12021,6 +12025,8 @@ nsCSSFrameConstructor::RemoveFirstLetterFrames(nsIPresShell* aPresShell,
|
||||
while (kid) {
|
||||
if (kid->IsLetterFrame()) {
|
||||
// Bingo. Found it. First steal away the text frame.
|
||||
static_cast<nsContainerFrame*>(aFrame->FirstContinuation())->
|
||||
ClearHasFirstLetterChild();
|
||||
nsIFrame* textFrame = kid->PrincipalChildList().FirstChild();
|
||||
if (!textFrame) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user