Bug 83138 - DOM measurement APIs should operate on pixel snapped values.
Summary: DOM measurement APIs should operate on pixel snapped values.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Levi Weintraub
URL:
Keywords:
Depends on:
Blocks: 60318
  Show dependency treegraph
 
Reported: 2012-04-04 03:44 PDT by Levi Weintraub
Modified: 2012-04-05 05:49 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.00 KB, patch)
2012-04-04 04:03 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff
Patch for landing (6.02 KB, patch)
2012-04-05 04:43 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Levi Weintraub 2012-04-04 03:44:59 PDT
These APIs are defined to be integers, so we should use the actual rendered integers when returning values to JS.
Comment 1 Levi Weintraub 2012-04-04 04:03:41 PDT
Created attachment 135550 [details]
Patch
Comment 2 Julien Chaffraix 2012-04-04 14:51:02 PDT
Comment on attachment 135550 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=135550&action=review

> Source/WebCore/dom/Element.cpp:351
>      if (RenderBoxModelObject* rend = renderBoxModelObject())

Let's remove those abreviations (not repeated on all the other changes) while at it: renderBoxModelObject would be my favorite but at least renderer would be OK.

(note that also most of this logic could use const RenderObject's but that's another - definitely bug-worthy - story)
Comment 3 Levi Weintraub 2012-04-05 04:19:52 PDT
Comment on attachment 135550 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=135550&action=review

>> Source/WebCore/dom/Element.cpp:351
>>      if (RenderBoxModelObject* rend = renderBoxModelObject())
> 
> Let's remove those abreviations (not repeated on all the other changes) while at it: renderBoxModelObject would be my favorite but at least renderer would be OK.
> 
> (note that also most of this logic could use const RenderObject's but that's another - definitely bug-worthy - story)

Done and done! Good point and thanks for the review :)
Comment 4 Levi Weintraub 2012-04-05 04:43:17 PDT
Created attachment 135804 [details]
Patch for landing
Comment 5 WebKit Review Bot 2012-04-05 05:49:39 PDT
Comment on attachment 135804 [details]
Patch for landing

Clearing flags on attachment: 135804

Committed r113317: <http://trac.webkit.org/changeset/113317>
Comment 6 WebKit Review Bot 2012-04-05 05:49:44 PDT
All reviewed patches have been landed.  Closing bug.