Bug 487587 - In mathml formulas, the content of many <mo> elements is not highlighted when selected. r=roc

This commit is contained in:
Frédéric Wang 2012-11-10 17:09:26 -05:00
parent 36357994ba
commit a76815bc91

View File

@ -100,7 +100,9 @@ nsMathMLmoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsRect selectedRect;
nsIFrame* firstChild = mFrames.FirstChild();
if (IsFrameInSelection(firstChild)) {
selectedRect = firstChild->GetRect();
mMathMLChar.GetRect(selectedRect);
// add a one pixel border (it renders better for operators like minus)
selectedRect.Inflate(nsPresContext::CSSPixelsToAppUnits(1));
isSelected = true;
}
rv = mMathMLChar.Display(aBuilder, this, aLists, 0, isSelected ? &selectedRect : nullptr);