Changeset 204030 in webkit


Ignore:
Timestamp:
Aug 2, 2016 10:27:37 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

[MathML] Use more auto for local variables
https://bugs.webkit.org/show_bug.cgi?id=160453

Patch by Frederic Wang <fwang@igalia.com> on 2016-08-02
Reviewed by Darin Adler.

No new tests, behavior is unchanged.

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::colSpan):
(WebCore::MathMLElement::rowSpan):
(WebCore::MathMLElement::childShouldCreateRenderer):
(WebCore::MathMLElement::defaultEventHandler):

  • mathml/MathMLSelectElement.cpp:

(WebCore::MathMLSelectElement::getSelectedActionChild):
(WebCore::MathMLSelectElement::getSelectedSemanticsChild):

  • rendering/mathml/RenderMathMLFenced.cpp:

(WebCore::RenderMathMLFenced::updateFromElement):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r204029 r204030  
     12016-08-02  Frederic Wang  <fwang@igalia.com>
     2
     3        [MathML] Use more auto for local variables
     4        https://bugs.webkit.org/show_bug.cgi?id=160453
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests, behavior is unchanged.
     9
     10        * mathml/MathMLElement.cpp:
     11        (WebCore::MathMLElement::colSpan):
     12        (WebCore::MathMLElement::rowSpan):
     13        (WebCore::MathMLElement::childShouldCreateRenderer):
     14        (WebCore::MathMLElement::defaultEventHandler):
     15        * mathml/MathMLSelectElement.cpp:
     16        (WebCore::MathMLSelectElement::getSelectedActionChild):
     17        (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
     18        * rendering/mathml/RenderMathMLFenced.cpp:
     19        (WebCore::RenderMathMLFenced::updateFromElement):
     20
    1212016-08-02  Ryan Haddad  <ryanhaddad@apple.com>
    222
  • trunk/Source/WebCore/mathml/MathMLElement.cpp

    r204021 r204030  
    208208    if (!hasTagName(mtdTag))
    209209        return 1u;
    210     const AtomicString& colSpanValue = attributeWithoutSynchronization(columnspanAttr);
     210    auto& colSpanValue = attributeWithoutSynchronization(columnspanAttr);
    211211    return std::max(1u, limitToOnlyHTMLNonNegative(colSpanValue, 1u));
    212212}
     
    216216    if (!hasTagName(mtdTag))
    217217        return 1u;
    218     const AtomicString& rowSpanValue = attributeWithoutSynchronization(rowspanAttr);
     218    auto& rowSpanValue = attributeWithoutSynchronization(rowspanAttr);
    219219    static const unsigned maxRowspan = 8190; // This constant comes from HTMLTableCellElement.
    220220    return std::max(1u, std::min(limitToOnlyHTMLNonNegative(rowSpanValue, 1u), maxRowspan));
     
    281281{
    282282    if (hasTagName(annotation_xmlTag)) {
    283         const AtomicString& value = attributeWithoutSynchronization(MathMLNames::encodingAttr);
     283        auto& value = attributeWithoutSynchronization(MathMLNames::encodingAttr);
    284284
    285285        // See annotation-xml.model.mathml, annotation-xml.model.svg and annotation-xml.model.xhtml in the HTML5 RelaxNG schema.
     
    331331        }
    332332        if (MouseEvent::canTriggerActivationBehavior(*event)) {
    333             const AtomicString& href = attributeWithoutSynchronization(hrefAttr);
    334             String url = stripLeadingAndTrailingHTMLSpaces(href);
     333            auto& href = attributeWithoutSynchronization(hrefAttr);
     334            const auto& url = stripLeadingAndTrailingHTMLSpaces(href);
    335335            event->setDefaultHandled();
    336             if (Frame* frame = document().frame())
     336            if (auto* frame = document().frame())
    337337                frame->loader().urlSelected(document().completeURL(url), "_self", event, LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, document().shouldOpenExternalURLsPolicyToPropagate());
    338338            return;
  • trunk/Source/WebCore/mathml/MathMLSelectElement.cpp

    r203337 r204030  
    137137
    138138    // The value of the actiontype attribute is case-sensitive.
    139     const AtomicString& actiontype = attributeWithoutSynchronization(MathMLNames::actiontypeAttr);
     139    auto& actiontype = attributeWithoutSynchronization(MathMLNames::actiontypeAttr);
    140140    if (actiontype == "statusline")
    141141        // FIXME: implement user interaction for the "statusline" action type (http://wkbug/124922).
     
    186186                continue;
    187187            // If the <annotation-xml> element has an encoding attribute describing presentation MathML, SVG or HTML we assume the content can be displayed and we stop here.
    188             const AtomicString& value = child->attributeWithoutSynchronization(MathMLNames::encodingAttr);
     188            auto& value = child->attributeWithoutSynchronization(MathMLNames::encodingAttr);
    189189            if (isMathMLEncoding(value) || isSVGEncoding(value) || isHTMLEncoding(value))
    190190                return child;
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp

    r203973 r204030  
    5555
    5656    // The open operator defaults to a left parenthesis.
    57     AtomicString open = fenced.attributeWithoutSynchronization(MathMLNames::openAttr);
     57    auto& open = fenced.attributeWithoutSynchronization(MathMLNames::openAttr);
    5858    m_open = open.isNull() ? gOpeningBraceChar : open;
    5959
    6060    // The close operator defaults to a right parenthesis.
    61     AtomicString close = fenced.attributeWithoutSynchronization(MathMLNames::closeAttr);
     61    auto& close = fenced.attributeWithoutSynchronization(MathMLNames::closeAttr);
    6262    m_close = close.isNull() ? gClosingBraceChar : close;
    6363
    64     AtomicString separators = fenced.attributeWithoutSynchronization(MathMLNames::separatorsAttr);
     64    auto& separators = fenced.attributeWithoutSynchronization(MathMLNames::separatorsAttr);
    6565    if (!separators.isNull()) {
    6666        StringBuilder characters;
Note: See TracChangeset for help on using the changeset viewer.