WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 153987
Refactor RenderMathMLRoot layout function to avoid using flexbox
https://bugs.webkit.org/show_bug.cgi?id=153987
Summary
Refactor RenderMathMLRoot layout function to avoid using flexbox
Alejandro G. Castro
Reported
2016-02-08 08:14:57 PST
Next patch in the series refactoring the MathML code to remove flexbox dependency.
Attachments
Patch
(13.64 KB, patch)
2016-02-08 08:54 PST
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Patch
(269.39 KB, patch)
2016-03-07 10:18 PST
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(273.06 KB, patch)
2016-03-08 01:53 PST
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(271.56 KB, patch)
2016-03-11 01:26 PST
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(270.89 KB, patch)
2016-03-31 08:19 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(270.92 KB, patch)
2016-04-01 06:11 PDT
,
Frédéric Wang (:fredw)
bfulgham
: review-
Details
Formatted Diff
Diff
Patch
(270.67 KB, patch)
2016-04-08 05:16 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(270.99 KB, patch)
2016-04-18 05:36 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(303.19 KB, patch)
2016-04-26 08:54 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(303.22 KB, patch)
2016-05-09 00:53 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch for EWS testing
(655.74 KB, patch)
2016-05-11 03:56 PDT
,
Frédéric Wang (:fredw)
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2
(826.87 KB, application/zip)
2016-05-11 04:55 PDT
,
Build Bot
no flags
Details
Patch
(388.97 KB, patch)
2016-05-11 05:02 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(388.97 KB, patch)
2016-06-17 02:46 PDT
,
Frédéric Wang (:fredw)
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews126 for ios-simulator-wk2
(705.12 KB, application/zip)
2016-06-17 03:48 PDT
,
Build Bot
no flags
Details
Patch
(423.05 KB, patch)
2016-06-17 07:42 PDT
,
Frédéric Wang (:fredw)
bfulgham
: review+
Details
Formatted Diff
Diff
Show Obsolete
(15)
View All
Add attachment
proposed patch, testcase, etc.
Alejandro G. Castro
Comment 1
2016-02-08 08:54:50 PST
Created
attachment 270857
[details]
Patch
Frédéric Wang (:fredw)
Comment 2
2016-03-07 10:18:28 PST
Created
attachment 273193
[details]
Patch
Frédéric Wang (:fredw)
Comment 3
2016-03-08 01:53:43 PST
Created
attachment 273283
[details]
Patch
Frédéric Wang (:fredw)
Comment 4
2016-03-11 01:26:24 PST
Created
attachment 273705
[details]
Patch I'm uploading updated version of the MathML refactoring patches to solve conflicts after
bug 154388
and
bug 155005
; and to do other minor changes.
Frédéric Wang (:fredw)
Comment 5
2016-03-31 08:19:27 PDT
Created
attachment 275288
[details]
Patch
Frédéric Wang (:fredw)
Comment 6
2016-04-01 06:11:16 PDT
Created
attachment 275400
[details]
Patch
Brent Fulgham
Comment 7
2016-04-01 11:56:49 PDT
Comment on
attachment 275400
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=275400&action=review
This looks like a very nice cleanup of a lot of complicated code. I can't approve it until I see passing tests, so please address the handful of minor comments I made, and upload a rebaselined patch. Thanks! r- due to the need to rebaseline.
> Source/WebCore/ChangeLog:12 > + msqrt (row of children under a square root) is now implemented directly in RenderMathMLRoot, so RenderMathMLSquareRoot is removed and RenderMathMLRoot now inherits from RenderMathMLRow.
Could you please wrap these on ~100 character boundaries?
> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:3784 > + return children[0].get();
Nice! Much simpler!
> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:3796 > + return children[1].get();
Ditto.
> Source/WebCore/mathml/MathMLInlineContainerElement.cpp:60 > + if (is<RenderMathMLRow>(*renderer()) && !hasTagName(mrootTag))
This might be better as: if (renderer() && is<RenderMathMLRow>(*renderer()) && !hasTagName(mrootTag))
> Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp:105 > + // FIXME: The layout of RenderMathMLMenclose should probably be rewritten from stratch to remove anonymous nodes and style change.
"rewritten from scratch"
> Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp:114 > + for (size_t i = 0; i < notationalValueSize; i++) {
This would be better as: for (auto& notionalValue : notionalValues) { if (notionalValue == "circle")
> Source/WebCore/rendering/mathml/RenderMathMLMenclose.h:46 > + virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
Don't write virtual with override.
> Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp:-82 > - ASSERT(!isEmpty());
Are you sure we want to lose this check? isValid() only checks isEmpty if it's not a square root. Is it perhaps impossible to call getBase on square roots? Maybe is should be ASSERT(m_kind != SquareRoot)?
> Source/WebCore/rendering/mathml/RenderMathMLRow.cpp:140 > + // See
http://wkb.ug/130326
and
http://wkb.ug/155019
We usually use "
http://webkit.org/b/130326
". I'm not sure "wkb.ug" is a WebKit domain.
Frédéric Wang (:fredw)
Comment 8
2016-04-04 02:11:03 PDT
Comment on
attachment 275400
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=275400&action=review
>> Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp:114 >> + for (size_t i = 0; i < notationalValueSize; i++) { > > This would be better as: > > for (auto& notionalValue : notionalValues) { > if (notionalValue == "circle")
Yes, this is part of the old code and will go away later. This syntax should be used for
bug 155019
, though.
>> Source/WebCore/rendering/mathml/RenderMathMLMenclose.h:46 >> + virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override; > > Don't write virtual with override.
Oops, I forgot to update this after the style change.
>> Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp:-82 >> - ASSERT(!isEmpty()); > > Are you sure we want to lose this check? isValid() only checks isEmpty if it's not a square root. Is it perhaps impossible to call getBase on square roots? > > Maybe is should be ASSERT(m_kind != SquareRoot)?
ASSERT(m_kind == RootWithIndex) is stronger than ASSERT(m_kind != SquareRoot) and so ensures that getBase is not called for m_kind == SquareRoot. The syntax of m_kind == SquareRoot is <msqrt> child1 child2 child3 ... childN </msqrt> so getBase does not make sense in that case (despite what the a11y code does). The layout functions just relies on RenderMathMLRow's implementation and adjusts the metrics and position to add the radical symbol and overbar.
Frédéric Wang (:fredw)
Comment 9
2016-04-08 05:16:17 PDT
Created
attachment 275997
[details]
Patch This patch addressed Brent's comments and do other minor fixes (like adding link to FIXME comment, using logical height/width etc). However, it still needs to be applied over the 4 other patches.
Frédéric Wang (:fredw)
Comment 10
2016-04-18 05:36:53 PDT
Created
attachment 276632
[details]
Patch
Frédéric Wang (:fredw)
Comment 11
2016-04-26 08:54:15 PDT
Created
attachment 277375
[details]
Patch
Frédéric Wang (:fredw)
Comment 12
2016-05-09 00:53:44 PDT
Created
attachment 278395
[details]
Patch Updating after
https://trac.webkit.org/changeset/200569
Frédéric Wang (:fredw)
Comment 13
2016-05-11 03:56:36 PDT
Created
attachment 278615
[details]
Patch for EWS testing
Build Bot
Comment 14
2016-05-11 04:55:01 PDT
Comment on
attachment 278615
[details]
Patch for EWS testing
Attachment 278615
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1303287
New failing tests: mathml/radical-fallback.html mathml/presentation/roots.xhtml
Build Bot
Comment 15
2016-05-11 04:55:05 PDT
Created
attachment 278616
[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Frédéric Wang (:fredw)
Comment 16
2016-05-11 05:02:18 PDT
Created
attachment 278617
[details]
Patch
Frédéric Wang (:fredw)
Comment 17
2016-06-17 02:46:40 PDT
Created
attachment 281553
[details]
Patch
Build Bot
Comment 18
2016-06-17 03:48:23 PDT
Comment on
attachment 281553
[details]
Patch
Attachment 281553
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1517389
New failing tests: mathml/radical-fallback.html
Build Bot
Comment 19
2016-06-17 03:48:28 PDT
Created
attachment 281555
[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Frédéric Wang (:fredw)
Comment 20
2016-06-17 07:42:03 PDT
Created
attachment 281563
[details]
Patch Adding the ios-simulator references for the radical fallback test.
Brent Fulgham
Comment 21
2016-06-17 09:07:14 PDT
Comment on
attachment 281563
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=281563&action=review
So much deleted code! :-) Looks good. r=me.
> LayoutTests/TestExpectations:-120 > -
Yay!
> Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp:243 > + for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
Probably could have been 'auto'
Frédéric Wang (:fredw)
Comment 22
2016-06-17 09:30:17 PDT
Committed
r202168
: <
http://trac.webkit.org/changeset/202168
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug