Summary: | RenderMathOperator: Move calculation of preferred width into MathOperator | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Frédéric Wang (:fredw) <fred.wang> | ||||||||||||||
Component: | MathML | Assignee: | Frédéric Wang (:fredw) <fred.wang> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | alex, bfulgham, cfleizach, commit-queue, darin, dbarton, esprehn+autocc, glenn, kondapallykalyan, mrobinson, rego, svillar | ||||||||||||||
Priority: | P2 | ||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
Bug Depends on: | 156910, 156913, 156921, 156950 | ||||||||||||||||
Bug Blocks: | 152244 | ||||||||||||||||
Attachments: |
|
Description
Frédéric Wang (:fredw)
2016-04-27 07:18:18 PDT
Created attachment 277476 [details]
Patch
Created attachment 278392 [details] Patch Updating after https://trac.webkit.org/changeset/200569 Created attachment 278602 [details]
Patch
Minor change: s/maximumGlyphWidth/setMaxPreferredWidth/ in the ASSERT of MathOperator::calculateStretchyData.
Created attachment 278606 [details]
Patch for EWS testing
Comment on attachment 278602 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=278602&action=review LGTM just some minor nits. > Source/WebCore/ChangeLog:11 > + (WebCore::MathOperator::MathOperator): Initialize m_maxPreferredWidth Nit: Missing dot at the end. > Source/WebCore/ChangeLog:21 > + (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): This function performs bad Nit: s/bad/wrong/ > Source/WebCore/rendering/mathml/MathOperator.cpp:264 > +void MathOperator::calculateStretchyData(const RenderStyle& style, bool setMaxPreferredWidth, LayoutUnit targetSize) A small suggestion, maybe call the argument "calculateMaxPreferredWidth". > Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp:270 > + // FIXME: We should not using stretchSize during the preferred width calculation nor should we leave logical width dirty (http://webkit.org/b/152244). Nit: s/using/use/ Created attachment 278842 [details]
Patch
Addressing Manuel's comments...
Created attachment 280918 [details]
Patch
Comment on attachment 280918 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=280918&action=review Looks like a nice clean-up. r=me. > Source/WebCore/rendering/mathml/MathOperator.h:93 > + LayoutUnit m_maxPreferredWidth = 0; We prefer the C++11 initializer syntax, but I guess you are being consistent with the other things in this file. Committed r201881: <http://trac.webkit.org/changeset/201881> |