Bug 159876 - Do not store gap and shift parameters on RenderMathMLFraction
Summary: Do not store gap and shift parameters on RenderMathMLFraction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Frédéric Wang (:fredw)
URL:
Keywords:
Depends on: 159624
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-18 04:43 PDT by Frédéric Wang (:fredw)
Modified: 2016-07-18 22:38 PDT (History)
6 users (show)

See Also:


Attachments
Patch (12.10 KB, patch)
2016-07-18 04:53 PDT, Frédéric Wang (:fredw)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2016-07-18 04:43:05 PDT
Follow-up of bug 159624. Gap and shift parameters are only used during layoutBlock so we do not need to store them on the renderer class. I'm going to split updateLayoutParameters into three helper functions: one to update thickness and two to retrieve fraction and stack parameters.
Comment 1 Frédéric Wang (:fredw) 2016-07-18 04:53:20 PDT
Created attachment 283899 [details]
Patch
Comment 2 Darin Adler 2016-07-18 10:04:46 PDT
Comment on attachment 283899 [details]
Patch

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

> Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp:125
> +        topShiftUp = bottomShiftDown = 0;

WebKit coding style normally frowns on this style of multiple assignments in a single expression.

> Source/WebCore/rendering/mathml/RenderMathMLFraction.h:63
> +    void getFractionParameters(LayoutUnit&, LayoutUnit&, LayoutUnit&, LayoutUnit&);
> +    void getStackParameters(LayoutUnit&, LayoutUnit&, LayoutUnit&);

Normally we’d include argument names in a case like this where the order of the arguments doesn’t make clear which is which. in fact, we could consider a version where these functions return structs instead, which eliminates the possibility of getting the order wrong.
Comment 3 Frédéric Wang (:fredw) 2016-07-18 22:38:48 PDT
https://trac.webkit.org/changeset/203395