Bug 1161389 - Skip AccessibleCaret frame if nsDisplayListBuilder doesn't build caret. r=roc

When nsDisplayListBuilder doesn't build caret, we need to skip building
AccessibleCaret frames. We check that the content of the frame has
"moz-accessiblecaret" class.
This commit is contained in:
Ting-Yu Lin
2015-05-27 16:37:44 +08:00
parent 4e2c355457
commit a6eca62d0f
2 changed files with 16 additions and 5 deletions

View File

@@ -2647,7 +2647,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
SetInitialSingleChild(mDocElementContainingBlock, newFrame);
// Create touch caret frame if there is a canvas frame
// Create frames for anonymous contents if there is a canvas frame.
if (mDocElementContainingBlock->GetType() == nsGkAtoms::canvasFrame) {
ConstructAnonymousContentForCanvas(state, mDocElementContainingBlock,
aDocElement);
@@ -2915,7 +2915,6 @@ nsCSSFrameConstructor::ConstructAnonymousContentForCanvas(nsFrameConstructorStat
nsAutoTArray<nsIAnonymousContentCreator::ContentInfo, 4> anonymousItems;
GetAnonymousContent(aDocElement, aFrame, anonymousItems);
if (anonymousItems.IsEmpty()) {
// Touch caret is not enabled.
return;
}