mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 527289 - crash [@ nsHyperTextAccessible::ScrollSubstringToPoint(int, int, unsigned int, int, int)]. r=surkov,MarcoZ
This commit is contained in:
parent
a71f9dd073
commit
486a4b94e9
@ -2032,6 +2032,11 @@ nsHyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex,
|
||||
presContext->DevPixelsToAppUnits(devOffsetY));
|
||||
|
||||
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 vPercent = offsetPoint.y * 100 / size.height;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user