Bug 1171731 - Ignore elements with 0 font size in cluster detection. r=kats

This commit is contained in:
dominique vincent 2015-06-05 16:25:16 +02:00
parent 0f2a5d6e98
commit 767494436e

View File

@ -417,7 +417,8 @@ IsElementClickableAndReadable(nsIFrame* aFrame, WidgetGUIEvent* aEvent, const Ev
nsLayoutUtils::GetFontMetricsForFrame(aFrame, getter_AddRefs(fm),
nsLayoutUtils::FontSizeInflationFor(aFrame));
if (fm) {
if ((pc->AppUnitsToGfxUnits(fm->EmHeight()) * cumulativeResolution) < limitReadableSize) {
if ((fm->EmHeight() > 0) && // See bug 1171731
(pc->AppUnitsToGfxUnits(fm->EmHeight()) * cumulativeResolution) < limitReadableSize) {
return false;
}
}