Bug 83017 - Switch baseline values to LayoutUnits in RenderTableSection.
Summary: Switch baseline values to LayoutUnits in RenderTableSection.
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-03 04:45 PDT by Levi Weintraub
Modified: 2012-04-04 03:39 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.24 KB, patch)
2012-04-03 05:01 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-03 04:45:29 PDT
While we eventually layout table parts using integers, we should still keep track of baseline positions (which are combined with sub-pixel padding values) in sub-pixel units.
Comment 1 Levi Weintraub 2012-04-03 04:54:21 PDT
Updating the bug title since there's only one class this actually needs to happen in.
Comment 2 Levi Weintraub 2012-04-03 05:01:12 PDT
Created attachment 135312 [details]
Patch
Comment 3 Julien Chaffraix 2012-04-03 14:08:17 PDT
Comment on attachment 135312 [details]
Patch

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

> Source/WebCore/rendering/RenderTableSection.cpp:391
> +            m_rowPos[r + 1] = max<int>(m_rowPos[r + 1], m_grid[r].baseline + baselineDescent);

It looks unfortunate that m_rowPos is actually using an integer here.
Comment 4 Emil A Eklund 2012-04-03 15:16:43 PDT
(In reply to comment #3)
> (From update of attachment 135312 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=135312&action=review
> 
> > Source/WebCore/rendering/RenderTableSection.cpp:391
> > +            m_rowPos[r + 1] = max<int>(m_rowPos[r + 1], m_grid[r].baseline + baselineDescent);
> 
> It looks unfortunate that m_rowPos is actually using an integer here.

If it makes the code simpler and it reduces the number of conversions we could change m_rowPos to a LayoutUnit. It'll always hold an integer value but we could use an ASSERT (or even the test results I suppose, this code has good coverage) to ensure that.
Comment 5 Julien Chaffraix 2012-04-03 15:24:56 PDT
Comment on attachment 135312 [details]
Patch

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

>>> Source/WebCore/rendering/RenderTableSection.cpp:391
>>> +            m_rowPos[r + 1] = max<int>(m_rowPos[r + 1], m_grid[r].baseline + baselineDescent);
>> 
>> It looks unfortunate that m_rowPos is actually using an integer here.
> 
> If it makes the code simpler and it reduces the number of conversions we could change m_rowPos to a LayoutUnit. It'll always hold an integer value but we could use an ASSERT (or even the test results I suppose, this code has good coverage) to ensure that.

I don't think that's worth it for now, considering that the rest of the table code is using int. However it sounds like we should be considering switching table layout to LayoutUnit at some point in the future.
Comment 6 Levi Weintraub 2012-04-04 03:38:27 PDT
Comment on attachment 135312 [details]
Patch

Landed in http://trac.webkit.org/changeset/113162