Skip to content

Commit

Permalink
Bug 1846740 - [wdspec] get_physical_element_dimensions has to return …
Browse files Browse the repository at this point in the history
…integer numbers and not float. r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D185343
  • Loading branch information
whimboo committed Aug 4, 2023
1 parent 0afc1e9 commit 8037fb7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def get_physical_element_dimensions(bidi_session, context, element):
"""
element_dimensions = await get_element_dimensions(bidi_session, context, element)
dpr = await get_device_pixel_ratio(bidi_session, context)
return (element_dimensions["width"] * dpr, element_dimensions["height"] * dpr)
return (floor(element_dimensions["width"] * dpr), floor(element_dimensions["height"] * dpr))


async def get_physical_viewport_dimensions(bidi_session, context):
Expand Down

0 comments on commit 8037fb7

Please sign in to comment.