Cleanup: WebCore::Pair class should use RefPtr&& instead of PassRefPtr
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jul 2015 20:34:30 +0000 (20:34 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jul 2015 20:34:30 +0000 (20:34 +0000)
commit3eb6820311ac4292cc5ded674e0c5e632b2fb88d
tree455448e90c9606e6d9a67854a4e0a21be1789d6a
parentee3f517bef24f91ac0d238633afb10f563ea1e1a
Cleanup: WebCore::Pair class should use RefPtr&& instead of PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=146852

Reviewed by Anders Carlsson.

* css/CSSParser.cpp:
(WebCore::createPrimitiveValuePair): Write using a variadic template that forwards its
arguments to the appropriate Pair::create constructor.
(WebCore::CSSParser::parse4ValuesFillPosition): Use RefPtr&& instead of PassRefPtr.
(WebCore::CSSParser::parse3ValuesFillPosition): Ditto.
(WebCore::CSSParser::parseFillPosition): Use WTF::move() instead of RefPtr::release()
so that we pass a rvalue reference to RefPtr.
(WebCore::CSSParser::parseFillSize): Ditto.
(WebCore::CSSParser::parseBorderImageRepeat): Ditto.
* css/CSSParser.h:
* css/Pair.h:
(WebCore::Pair::create): Use RefPtr&& instead of PassRefPtr.
(WebCore::Pair::setFirst): Ditto.
(WebCore::Pair::setSecond): Ditto.
(WebCore::Pair::Pair): Ditto. Also substitute nullptr for 0 in the member initialization
list of the default constructor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/Pair.h