[Webkit-unassigned] [Bug 62098] Update layout for msub, msup, msubsup to handle script changes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jun 5 09:37:21 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=62098
--- Comment #11 from Darin Adler <darin at apple.com> 2011-06-05 09:37:21 PST ---
(From update of attachment 96050)
View in context: https://bugs.webkit.org/attachment.cgi?id=96050&action=review
> Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp:66
> + unsigned int position = 0;
unsigned int is wrong for WebKit style. We use just unsigned.
> Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp:70
> + for (Node* current = child->node(); current; current = current->previousSibling()) {
> + if (current->isElementNode())
> + position++;
> + }
Looping through all the child elements is unnecessary. A cleaner way to do it would be to call previousElementSibling a small number of times.
> Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp:72
> + if (position == 1) {
For example, the check here could be if !previousElement.
> Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp:105
> + if (position == 2)
And the check here could just be if (previousElement && !previousElement->previousElementSibling()).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list