<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204032] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204032">204032</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2016-08-02 11:47:14 -0700 (Tue, 02 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move parsing of boolean operator properties into MathMLOperatorElement
https://bugs.webkit.org/show_bug.cgi?id=160190
Patch by Frederic Wang <fwang@igalia.com> on 2016-08-02
Reviewed by Darin Adler.
No new tests, already covered by existing tests.
* mathml/MathMLOperatorDictionary.h: Add a bit mask with all the property flags set.
* mathml/MathMLOperatorElement.cpp:
(WebCore::attributeNameToPropertyFlag): helper function to map from attribute name to flag.
(WebCore::MathMLOperatorElement::computeOperatorFlag): Helper function to update one
bit of m_properties.flags from the corresponding boolean attribute. The default value is
taken from the operator dictionary data stored in m_dictionaryProperty.flags.
(WebCore::MathMLOperatorElement::hasProperty): Returns whether the operator has a property,
parsing it again if the corresponding attribute is dirty.
(WebCore::MathMLOperatorElement::childrenChanged): Make all properties dirty.
(WebCore::propertyFlagToAttributeName): helper function to map from flag to attribute name.
(WebCore::MathMLOperatorElement::parseAttribute): Make all properties dirty if the form
attribute changed. Make each property dirty when the corresponding attribute changed.
(WebCore::MathMLOperatorElement::flags): Deleted. Replaced with the finer hasProperty function.
* mathml/MathMLOperatorElement.h: Define new structure, member and functions to handle
operator properties.
* rendering/mathml/RenderMathMLFencedOperator.cpp:
(WebCore::RenderMathMLFencedOperator::RenderMathMLFencedOperator): Move m_operatorFlags from
the base class to the derived class.
* rendering/mathml/RenderMathMLFencedOperator.h: Ditto.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator): Ditto.
(WebCore::RenderMathMLOperator::hasOperatorFlag): Just call hasOperatorFlag from the
MathMLOperatorElement class.
(WebCore::RenderMathMLOperator::setOperatorProperties): We do not initialize m_operatorFlags
since it has been removed from the base class. We also do not parse attributes since this
has been moved to the MathMLOperatorElement class.
(WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute): Deleted.
(WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue): Deleted.
* rendering/mathml/RenderMathMLOperator.h: Move m_operatorFlags from the base class to the
derived class, remove some parsing helper functions and update hasOperatorFlag to make it
overridable.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLOperatorDictionaryh">trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLOperatorElementcpp">trunk/Source/WebCore/mathml/MathMLOperatorElement.cpp</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLOperatorElementh">trunk/Source/WebCore/mathml/MathMLOperatorElement.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLFencedOperatorcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLFencedOperator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLFencedOperatorh">trunk/Source/WebCore/rendering/mathml/RenderMathMLFencedOperator.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204031 => 204032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-02 17:42:27 UTC (rev 204031)
+++ trunk/Source/WebCore/ChangeLog        2016-08-02 18:47:14 UTC (rev 204032)
</span><span class="lines">@@ -1,3 +1,44 @@
</span><ins>+2016-08-02 Frederic Wang <fwang@igalia.com>
+
+ Move parsing of boolean operator properties into MathMLOperatorElement
+ https://bugs.webkit.org/show_bug.cgi?id=160190
+
+ Reviewed by Darin Adler.
+
+ No new tests, already covered by existing tests.
+
+ * mathml/MathMLOperatorDictionary.h: Add a bit mask with all the property flags set.
+ * mathml/MathMLOperatorElement.cpp:
+ (WebCore::attributeNameToPropertyFlag): helper function to map from attribute name to flag.
+ (WebCore::MathMLOperatorElement::computeOperatorFlag): Helper function to update one
+ bit of m_properties.flags from the corresponding boolean attribute. The default value is
+ taken from the operator dictionary data stored in m_dictionaryProperty.flags.
+ (WebCore::MathMLOperatorElement::hasProperty): Returns whether the operator has a property,
+ parsing it again if the corresponding attribute is dirty.
+ (WebCore::MathMLOperatorElement::childrenChanged): Make all properties dirty.
+ (WebCore::propertyFlagToAttributeName): helper function to map from flag to attribute name.
+ (WebCore::MathMLOperatorElement::parseAttribute): Make all properties dirty if the form
+ attribute changed. Make each property dirty when the corresponding attribute changed.
+ (WebCore::MathMLOperatorElement::flags): Deleted. Replaced with the finer hasProperty function.
+ * mathml/MathMLOperatorElement.h: Define new structure, member and functions to handle
+ operator properties.
+ * rendering/mathml/RenderMathMLFencedOperator.cpp:
+ (WebCore::RenderMathMLFencedOperator::RenderMathMLFencedOperator): Move m_operatorFlags from
+ the base class to the derived class.
+ * rendering/mathml/RenderMathMLFencedOperator.h: Ditto.
+ * rendering/mathml/RenderMathMLOperator.cpp:
+ (WebCore::RenderMathMLOperator::RenderMathMLOperator): Ditto.
+ (WebCore::RenderMathMLOperator::hasOperatorFlag): Just call hasOperatorFlag from the
+ MathMLOperatorElement class.
+ (WebCore::RenderMathMLOperator::setOperatorProperties): We do not initialize m_operatorFlags
+ since it has been removed from the base class. We also do not parse attributes since this
+ has been moved to the MathMLOperatorElement class.
+ (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute): Deleted.
+ (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue): Deleted.
+ * rendering/mathml/RenderMathMLOperator.h: Move m_operatorFlags from the base class to the
+ derived class, remove some parsing helper functions and update hasOperatorFlag to make it
+ overridable.
+
</ins><span class="cx"> 2016-08-01 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Freeze another bunch of Objective-C binding files
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLOperatorDictionaryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h (204031 => 204032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h        2016-08-02 17:42:27 UTC (rev 204031)
+++ trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h        2016-08-02 18:47:14 UTC (rev 204032)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> Stretchy = 0x20,
</span><span class="cx"> Symmetric = 0x40
</span><span class="cx"> };
</span><ins>+const unsigned allFlags = Accent | Fence | LargeOp | MovableLimits | Separator | Stretchy | Symmetric;
</ins><span class="cx"> struct Entry {
</span><span class="cx"> UChar character;
</span><span class="cx"> unsigned form : 2;
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLOperatorElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLOperatorElement.cpp (204031 => 204032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLOperatorElement.cpp        2016-08-02 17:42:27 UTC (rev 204031)
+++ trunk/Source/WebCore/mathml/MathMLOperatorElement.cpp        2016-08-02 18:47:14 UTC (rev 204032)
</span><span class="lines">@@ -108,12 +108,60 @@
</span><span class="cx"> return m_dictionaryProperty.value();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned short MathMLOperatorElement::flags()
</del><ins>+static const QualifiedName& propertyFlagToAttributeName(MathMLOperatorDictionary::Flag flag)
</ins><span class="cx"> {
</span><del>- // FIXME: We should also handle boolean attributes here (https://webkit.org/b/160190).
- return dictionaryProperty().flags;
</del><ins>+ switch (flag) {
+ case Accent:
+ return accentAttr;
+ case Fence:
+ return fenceAttr;
+ case LargeOp:
+ return largeopAttr;
+ case MovableLimits:
+ return movablelimitsAttr;
+ case Separator:
+ return separatorAttr;
+ case Stretchy:
+ return stretchyAttr;
+ case Symmetric:
+ return symmetricAttr;
+ }
+ ASSERT_NOT_REACHED();
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+void MathMLOperatorElement::computeOperatorFlag(MathMLOperatorDictionary::Flag flag)
+{
+ ASSERT(m_properties.dirtyFlags & flag);
+
+ Optional<BooleanValue> property;
+ const auto& name = propertyFlagToAttributeName(flag);
+ const BooleanValue& value = cachedBooleanAttribute(name, property);
+ switch (value) {
+ case BooleanValue::True:
+ m_properties.flags |= flag;
+ break;
+ case BooleanValue::False:
+ m_properties.flags &= ~flag;
+ break;
+ case BooleanValue::Default:
+ // By default, we use the value specified in the operator dictionary.
+ if (dictionaryProperty().flags & flag)
+ m_properties.flags |= flag;
+ else
+ m_properties.flags &= ~flag;
+ break;
+ }
+}
+
+bool MathMLOperatorElement::hasProperty(MathMLOperatorDictionary::Flag flag)
+{
+ if (m_properties.dirtyFlags & flag) {
+ computeOperatorFlag(flag);
+ m_properties.dirtyFlags &= ~flag;
+ }
+ return m_properties.flags & flag;
+}
+
</ins><span class="cx"> MathMLElement::Length MathMLOperatorElement::defaultLeadingSpace()
</span><span class="cx"> {
</span><span class="cx"> Length space;
</span><span class="lines">@@ -134,13 +182,36 @@
</span><span class="cx"> {
</span><span class="cx"> m_operatorText = Nullopt;
</span><span class="cx"> m_dictionaryProperty = Nullopt;
</span><ins>+ m_properties.dirtyFlags = MathMLOperatorDictionary::allFlags;
</ins><span class="cx"> MathMLTextElement::childrenChanged(change);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static Optional<MathMLOperatorDictionary::Flag> attributeNameToPropertyFlag(const QualifiedName& name)
+{
+ if (name == accentAttr)
+ return Accent;
+ if (name == fenceAttr)
+ return Fence;
+ if (name == largeopAttr)
+ return LargeOp;
+ if (name == movablelimitsAttr)
+ return MovableLimits;
+ if (name == separatorAttr)
+ return Separator;
+ if (name == stretchyAttr)
+ return Stretchy;
+ if (name == symmetricAttr)
+ return Symmetric;
+ return Nullopt;
+}
+
</ins><span class="cx"> void MathMLOperatorElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
</span><span class="cx"> {
</span><del>- if (name == formAttr)
</del><ins>+ if (name == formAttr) {
</ins><span class="cx"> m_dictionaryProperty = Nullopt;
</span><ins>+ m_properties.dirtyFlags = MathMLOperatorDictionary::allFlags;
+ } else if (auto flag = attributeNameToPropertyFlag(name))
+ m_properties.dirtyFlags |= flag.value();
</ins><span class="cx">
</span><span class="cx"> if ((name == stretchyAttr || name == lspaceAttr || name == rspaceAttr || name == movablelimitsAttr) && renderer()) {
</span><span class="cx"> downcast<RenderMathMLOperator>(*renderer()).updateFromElement();
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLOperatorElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLOperatorElement.h (204031 => 204032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLOperatorElement.h        2016-08-02 17:42:27 UTC (rev 204031)
+++ trunk/Source/WebCore/mathml/MathMLOperatorElement.h        2016-08-02 18:47:14 UTC (rev 204032)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> UChar operatorText();
</span><span class="cx"> void setOperatorFormDirty() { m_dictionaryProperty = Nullopt; }
</span><span class="cx"> MathMLOperatorDictionary::Form form() { return dictionaryProperty().form; }
</span><del>- unsigned short flags();
</del><ins>+ bool hasProperty(MathMLOperatorDictionary::Flag);
</ins><span class="cx"> Length defaultLeadingSpace();
</span><span class="cx"> Length defaultTrailingSpace();
</span><span class="cx">
</span><span class="lines">@@ -61,6 +61,13 @@
</span><span class="cx"> Optional<DictionaryProperty> m_dictionaryProperty;
</span><span class="cx"> DictionaryProperty computeDictionaryProperty();
</span><span class="cx"> const DictionaryProperty& dictionaryProperty();
</span><ins>+
+ struct OperatorProperties {
+ unsigned short flags;
+ unsigned short dirtyFlags { MathMLOperatorDictionary::allFlags };
+ };
+ OperatorProperties m_properties;
+ void computeOperatorFlag(MathMLOperatorDictionary::Flag);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLFencedOperatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFencedOperator.cpp (204031 => 204032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFencedOperator.cpp        2016-08-02 17:42:27 UTC (rev 204031)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFencedOperator.cpp        2016-08-02 18:47:14 UTC (rev 204032)
</span><span class="lines">@@ -37,8 +37,9 @@
</span><span class="cx"> using namespace MathMLOperatorDictionary;
</span><span class="cx">
</span><span class="cx"> RenderMathMLFencedOperator::RenderMathMLFencedOperator(Document& document, RenderStyle&& style, const String& operatorString, MathMLOperatorDictionary::Form form, unsigned short flags)
</span><del>- : RenderMathMLOperator(document, WTFMove(style), flags)
</del><ins>+ : RenderMathMLOperator(document, WTFMove(style))
</ins><span class="cx"> , m_operatorForm(form)
</span><ins>+ , m_operatorFlags(flags)
</ins><span class="cx"> {
</span><span class="cx"> updateOperatorContent(operatorString);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLFencedOperatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFencedOperator.h (204031 => 204032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFencedOperator.h        2016-08-02 17:42:27 UTC (rev 204031)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFencedOperator.h        2016-08-02 18:47:14 UTC (rev 204032)
</span><span class="lines">@@ -41,9 +41,11 @@
</span><span class="cx"> bool isRenderMathMLFencedOperator() const final { return true; }
</span><span class="cx"> void setOperatorProperties() final;
</span><span class="cx"> UChar textContent() const final { return m_textContent; }
</span><ins>+ bool hasOperatorFlag(MathMLOperatorDictionary::Flag flag) const final { return m_operatorFlags & flag; }
</ins><span class="cx">
</span><span class="cx"> UChar m_textContent { 0 };
</span><span class="cx"> MathMLOperatorDictionary::Form m_operatorForm;
</span><ins>+ unsigned short m_operatorFlags;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }; // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp (204031 => 204032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2016-08-02 17:42:27 UTC (rev 204031)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2016-08-02 18:47:14 UTC (rev 204032)
</span><span class="lines">@@ -53,9 +53,8 @@
</span><span class="cx"> updateTokenContent();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RenderMathMLOperator::RenderMathMLOperator(Document& document, RenderStyle&& style, unsigned short flags)
</del><ins>+RenderMathMLOperator::RenderMathMLOperator(Document& document, RenderStyle&& style)
</ins><span class="cx"> : RenderMathMLToken(document, WTFMove(style))
</span><del>- , m_operatorFlags(flags)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -70,22 +69,11 @@
</span><span class="cx"> return element().operatorText();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderMathMLOperator::setOperatorFlagFromAttribute(MathMLOperatorDictionary::Flag flag, const QualifiedName& name)
</del><ins>+bool RenderMathMLOperator::hasOperatorFlag(MathMLOperatorDictionary::Flag flag) const
</ins><span class="cx"> {
</span><del>- setOperatorFlagFromAttributeValue(flag, element().attributeWithoutSynchronization(name));
</del><ins>+ return element().hasProperty(flag);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderMathMLOperator::setOperatorFlagFromAttributeValue(MathMLOperatorDictionary::Flag flag, const AtomicString& attributeValue)
-{
- ASSERT(!isAnonymous());
-
- if (attributeValue == "true")
- m_operatorFlags |= flag;
- else if (attributeValue == "false")
- m_operatorFlags &= ~flag;
- // We ignore absent or invalid attributes.
-}
-
</del><span class="cx"> void RenderMathMLOperator::setOperatorProperties()
</span><span class="cx"> {
</span><span class="cx"> // We determine the stretch direction (default is vertical).
</span><span class="lines">@@ -92,7 +80,6 @@
</span><span class="cx"> m_isVertical = MathMLOperatorDictionary::isVertical(textContent());
</span><span class="cx">
</span><span class="cx"> // Initialize with the default values.
</span><del>- m_operatorFlags = element().flags();
</del><span class="cx"> m_leadingSpace = toUserUnits(element().defaultLeadingSpace(), style(), 0);
</span><span class="cx"> m_trailingSpace = toUserUnits(element().defaultTrailingSpace(), style(), 0);
</span><span class="cx"> m_minSize = style().fontCascade().size(); // This sets minsize to "1em".
</span><span class="lines">@@ -100,15 +87,6 @@
</span><span class="cx">
</span><span class="cx"> if (!isAnonymous()) {
</span><span class="cx"> // Finally, we make the attribute values override the default.
</span><del>-
- setOperatorFlagFromAttribute(MathMLOperatorDictionary::Fence, MathMLNames::fenceAttr);
- setOperatorFlagFromAttribute(MathMLOperatorDictionary::Separator, MathMLNames::separatorAttr);
- setOperatorFlagFromAttribute(MathMLOperatorDictionary::Stretchy, MathMLNames::stretchyAttr);
- setOperatorFlagFromAttribute(MathMLOperatorDictionary::Symmetric, MathMLNames::symmetricAttr);
- setOperatorFlagFromAttribute(MathMLOperatorDictionary::LargeOp, MathMLNames::largeopAttr);
- setOperatorFlagFromAttribute(MathMLOperatorDictionary::MovableLimits, MathMLNames::movablelimitsAttr);
- setOperatorFlagFromAttribute(MathMLOperatorDictionary::Accent, MathMLNames::accentAttr);
-
</del><span class="cx"> parseMathMLLength(element().attributeWithoutSynchronization(MathMLNames::lspaceAttr), m_leadingSpace, &style(), false); // FIXME: Negative leading space must be implemented (https://bugs.webkit.org/show_bug.cgi?id=124830).
</span><span class="cx"> parseMathMLLength(element().attributeWithoutSynchronization(MathMLNames::rspaceAttr), m_trailingSpace, &style(), false); // FIXME: Negative trailing space must be implemented (https://bugs.webkit.org/show_bug.cgi?id=124830).
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h (204031 => 204032)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2016-08-02 17:42:27 UTC (rev 204031)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2016-08-02 18:47:14 UTC (rev 204032)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> class RenderMathMLOperator : public RenderMathMLToken {
</span><span class="cx"> public:
</span><span class="cx"> RenderMathMLOperator(MathMLOperatorElement&, RenderStyle&&);
</span><del>- RenderMathMLOperator(Document&, RenderStyle&&, unsigned short flags = 0);
</del><ins>+ RenderMathMLOperator(Document&, RenderStyle&&);
</ins><span class="cx"> MathMLOperatorElement& element() const;
</span><span class="cx">
</span><span class="cx"> void stretchTo(LayoutUnit heightAboveBaseline, LayoutUnit depthBelowBaseline);
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> LayoutUnit stretchSize() const { return m_isVertical ? m_stretchHeightAboveBaseline + m_stretchDepthBelowBaseline : m_stretchWidth; }
</span><span class="cx"> void resetStretchSize();
</span><span class="cx">
</span><del>- bool hasOperatorFlag(MathMLOperatorDictionary::Flag flag) const { return m_operatorFlags & flag; }
</del><ins>+ virtual bool hasOperatorFlag(MathMLOperatorDictionary::Flag) const;
</ins><span class="cx"> bool isLargeOperatorInDisplayStyle() const { return !hasOperatorFlag(MathMLOperatorDictionary::Stretchy) && hasOperatorFlag(MathMLOperatorDictionary::LargeOp) && mathMLStyle()->displayStyle(); }
</span><span class="cx"> bool shouldMoveLimits() const { return hasOperatorFlag(MathMLOperatorDictionary::MovableLimits) && !mathMLStyle()->displayStyle(); }
</span><span class="cx"> bool isVertical() const { return m_isVertical; }
</span><span class="lines">@@ -67,7 +67,6 @@
</span><span class="cx"> LayoutUnit m_trailingSpace;
</span><span class="cx"> LayoutUnit m_minSize;
</span><span class="cx"> LayoutUnit m_maxSize;
</span><del>- unsigned short m_operatorFlags;
</del><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
</span><span class="lines">@@ -90,9 +89,6 @@
</span><span class="cx"> bool shouldAllowStretching() const;
</span><span class="cx"> bool useMathOperator() const;
</span><span class="cx">
</span><del>- void setOperatorFlagFromAttribute(MathMLOperatorDictionary::Flag, const QualifiedName&);
- void setOperatorFlagFromAttributeValue(MathMLOperatorDictionary::Flag, const AtomicString& attributeValue);
-
</del><span class="cx"> LayoutUnit verticalStretchedOperatorShift() const;
</span><span class="cx">
</span><span class="cx"> LayoutUnit m_stretchHeightAboveBaseline { 0 };
</span></span></pre>
</div>
</div>
</body>
</html>