Minor follow-up tweaks suggested by Darin on bug 139587.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Dec 2014 09:34:28 +0000 (09:34 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Dec 2014 09:34:28 +0000 (09:34 +0000)
Source/WebCore:

* css/CSSFunctionValue.h:
(WebCore::CSSFunctionValue::create):
* platform/graphics/Font.cpp:
(WebCore::retrieveOrAddCachedFontGlyphs):
(WebCore::FontGlyphsCacheEntry::FontGlyphsCacheEntry): Deleted.
* rendering/RenderScrollbarPart.h:

Source/WTF:

* wtf/text/WTFString.h:
(WTF::String::String):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177260 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/text/WTFString.h
Source/WebCore/ChangeLog
Source/WebCore/css/CSSFunctionValue.h
Source/WebCore/platform/graphics/Font.cpp
Source/WebCore/rendering/RenderScrollbarPart.h

index c89f78c..18d2a5c 100644 (file)
@@ -1,5 +1,12 @@
 2014-12-14  Andreas Kling  <akling@apple.com>
 
+        Minor follow-up tweaks suggested by Darin on bug 139587.
+
+        * wtf/text/WTFString.h:
+        (WTF::String::String):
+
+2014-12-14  Andreas Kling  <akling@apple.com>
+
         Replace PassRef with Ref/Ref&& across the board.
         <https://webkit.org/b/139587>
 
index 508c869..b04843f 100644 (file)
@@ -115,7 +115,7 @@ public:
     String(StringImpl& impl) : m_impl(&impl) { }
     String(StringImpl* impl) : m_impl(impl) { }
     String(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
-    String(Ref<StringImpl>&& impl) : m_impl(std::forward<Ref<StringImpl>>(impl)) { }
+    String(Ref<StringImpl>&& impl) : m_impl(WTF::move(impl)) { }
     String(RefPtr<StringImpl>&& impl) : m_impl(impl) { }
 
     // Construct a string from a constant string literal.
index 6c21105..0844b3b 100644 (file)
@@ -1,5 +1,16 @@
 2014-12-14  Andreas Kling  <akling@apple.com>
 
+        Minor follow-up tweaks suggested by Darin on bug 139587.
+
+        * css/CSSFunctionValue.h:
+        (WebCore::CSSFunctionValue::create):
+        * platform/graphics/Font.cpp:
+        (WebCore::retrieveOrAddCachedFontGlyphs):
+        (WebCore::FontGlyphsCacheEntry::FontGlyphsCacheEntry): Deleted.
+        * rendering/RenderScrollbarPart.h:
+
+2014-12-14  Andreas Kling  <akling@apple.com>
+
         Replace PassRef with Ref/Ref&& across the board.
         <https://webkit.org/b/139587>
 
index d55cf93..530ab37 100644 (file)
@@ -40,7 +40,7 @@ public:
         return adoptRef(*new CSSFunctionValue(function));
     }
 
-    static Ref<CSSFunctionValue> create(String name, PassRefPtr<CSSValueList> args)
+    static Ref<CSSFunctionValue> create(const String& name, PassRefPtr<CSSValueList> args)
     {
         return adoptRef(*new CSSFunctionValue(name, args));
     }
@@ -53,7 +53,7 @@ public:
 
 private:
     explicit CSSFunctionValue(CSSParserFunction*);
-    CSSFunctionValue(String, PassRefPtr<CSSValueList>);
+    CSSFunctionValue(const String& , PassRefPtr<CSSValueList>);
 
     String m_name;
     RefPtr<CSSValueList> m_args;
index 890b68e..d57fbc2 100644 (file)
@@ -215,10 +215,6 @@ struct FontGlyphsCacheKey {
 struct FontGlyphsCacheEntry {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    FontGlyphsCacheEntry(FontGlyphsCacheKey&& k, Ref<FontGlyphs>&& g)
-        : key(WTF::move(k))
-        , glyphs(WTF::move(g))
-    { }
     FontGlyphsCacheKey key;
     Ref<FontGlyphs> glyphs;
 };
@@ -310,7 +306,7 @@ static Ref<FontGlyphs> retrieveOrAddCachedFontGlyphs(const FontDescription& font
         return addResult.iterator->value->glyphs.get();
 
     std::unique_ptr<FontGlyphsCacheEntry>& newEntry = addResult.iterator->value;
-    newEntry = std::make_unique<FontGlyphsCacheEntry>(WTF::move(key), FontGlyphs::create(fontSelector));
+    newEntry = std::make_unique<FontGlyphsCacheEntry>({WTF::move(key), FontGlyphs::create(fontSelector)});
     Ref<FontGlyphs> glyphs = newEntry->glyphs.get();
 
     static const unsigned unreferencedPruneInterval = 50;
index e4b8f2e..7a71fa7 100644 (file)
@@ -35,7 +35,7 @@ class RenderScrollbar;
 
 class RenderScrollbarPart final : public RenderBlock {
 public:
-    RenderScrollbarPart(Document&, Ref<RenderStyle>&&, RenderScrollbar* = 0, ScrollbarPart = NoPart);
+    RenderScrollbarPart(Document&, Ref<RenderStyle>&&, RenderScrollbar* = nullptr, ScrollbarPart = NoPart);
     
     virtual ~RenderScrollbarPart();