DescriptionInternals: throw an exception when page height or width is 0.
The two methods pageNumber() and numberOfPages() on the window.internals object
allowed 0 as page height, which results in a division by zero in multicol (and
general failure to paginate in other parts of the code). Have the methods raise
an exception when such values are provided. Also specify the default width and
height values in Internals.idl rather than in Internals.h, so that they
actually do something. Our default page width and height were effectively 0 for
these methods.
Assert that width and height have valid values (i.e. greater than 0) in
PrintContext::begin().
BUG=571348
R=rune@opera.com
Committed: https://crrev.com/d4e093476e0c2843c11494e87dda1da9b77f03ca
Cr-Commit-Position: refs/heads/master@{#367304}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Use js-test.js , which provides shouldThrow() #
Depends on Patchset: Messages
Total messages: 9 (2 generated)
|