mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Bug 527289 - crash [@ nsHyperTextAccessible::ScrollSubstringToPoint(int, int, unsigned int, int, int)]. r=surkov,MarcoZ
This commit is contained in:
parent
04543b2011
commit
a6f061ff5e
@ -2032,6 +2032,11 @@ nsHyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex,
|
|||||||
presContext->DevPixelsToAppUnits(devOffsetY));
|
presContext->DevPixelsToAppUnits(devOffsetY));
|
||||||
|
|
||||||
nsSize size(parentFrame->GetSize());
|
nsSize size(parentFrame->GetSize());
|
||||||
|
|
||||||
|
// avoid divide by zero
|
||||||
|
size.width = size.width ? size.width : 1;
|
||||||
|
size.height = size.height ? size.height : 1;
|
||||||
|
|
||||||
PRInt16 hPercent = offsetPoint.x * 100 / size.width;
|
PRInt16 hPercent = offsetPoint.x * 100 / size.width;
|
||||||
PRInt16 vPercent = offsetPoint.y * 100 / size.height;
|
PRInt16 vPercent = offsetPoint.y * 100 / size.height;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user