https://bugs.webkit.org/show_bug.cgi?id=175469
Reviewed by Sam Weinig.
Source/WebCore:
No new tests. No change in behavior.
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.h:
(WTF::ValueToString<WebCore::TextTrackCue::string):
(WebCore::ValueToString<TextTrackCue::string): Deleted.
(WebCore::ValueToString<MediaTime>::string): Deleted.
* platform/LayoutUnit.h:
(WTF::ValueToString<WebCore::LayoutUnit>::string):
(WebCore::ValueToString<LayoutUnit>::string): Deleted.
* platform/PODInterval.h:
* platform/PODIntervalTree.h:
* platform/PODRedBlackTree.h:
* platform/graphics/FloatPolygon.h:
(WTF::ValueToString<WebCore::FloatPolygonEdge::string):
(WebCore::ValueToString<FloatPolygonEdge::string): Deleted.
* rendering/FloatingObjects.h:
(WTF::ValueToString<WebCore::FloatingObject::string):
(WebCore::ValueToString<FloatingObject::string): Deleted.
* rendering/RenderFlowThread.h:
(WTF::ValueToString<WebCore::RenderRegion::string):
(WebCore::ValueToString<RenderRegion::string): Deleted.
Source/WTF:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/text/ValueToString.h: Renamed from Source/WebCore/platform/ValueToString.h.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220621
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2017-08-11 Don Olmstead <don.olmstead@sony.com>
+
+ [WTF] Move ValueToString into WTF
+ https://bugs.webkit.org/show_bug.cgi?id=175469
+
+ Reviewed by Sam Weinig.
+
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/CMakeLists.txt:
+ * wtf/text/ValueToString.h: Renamed from Source/WebCore/platform/ValueToString.h.
+
2017-08-11 Tim Horton <timothy_horton@apple.com>
Fix the build with modern Clang's -Wexpansion-to-defined
9C67C542589348E285B49699 /* IndexedContainerIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexedContainerIterator.h; sourceTree = "<group>"; };
A30D412C1F0DE0BA00B71954 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; };
A30D412D1F0DE13F00B71954 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; };
+ A3AB6E6A1F3E1AD6009C14B1 /* ValueToString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValueToString.h; sourceTree = "<group>"; };
A3E4DD911F3A803400DED0B4 /* TextStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextStream.cpp; sourceTree = "<group>"; };
A3E4DD921F3A803400DED0B4 /* TextStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextStream.h; sourceTree = "<group>"; };
A5098AFF1C169E0700087797 /* SandboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SandboxSPI.h; sourceTree = "<group>"; };
A3E4DD911F3A803400DED0B4 /* TextStream.cpp */,
A3E4DD921F3A803400DED0B4 /* TextStream.h */,
70ECA60C1B02426800449739 /* UniquedStringImpl.h */,
+ A3AB6E6A1F3E1AD6009C14B1 /* ValueToString.h */,
A8A4732D151A825B004123FF /* WTFString.cpp */,
A8A4732E151A825B004123FF /* WTFString.h */,
);
text/TextBreakIteratorInternalICU.h
text/TextStream.h
text/UniquedStringImpl.h
+ text/ValueToString.h
text/WTFString.h
text/icu/UTextProvider.h
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* SUCH DAMAGE.
*/
-#ifndef ValueToString_h
-#define ValueToString_h
+#pragma once
#ifndef NDEBUG
#include <wtf/text/WTFString.h>
-namespace WebCore {
+namespace WTF {
template<class T>
struct ValueToString;
static String string(const double value) { return String::number(value); }
};
-};
+} // namespace WTF
-#endif
+using WTF::ValueToString;
#endif
-
+2017-08-11 Don Olmstead <don.olmstead@sony.com>
+
+ [WTF] Move ValueToString into WTF
+ https://bugs.webkit.org/show_bug.cgi?id=175469
+
+ Reviewed by Sam Weinig.
+
+ No new tests. No change in behavior.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/HTMLMediaElement.h:
+ (WTF::ValueToString<WebCore::TextTrackCue::string):
+ (WebCore::ValueToString<TextTrackCue::string): Deleted.
+ (WebCore::ValueToString<MediaTime>::string): Deleted.
+ * platform/LayoutUnit.h:
+ (WTF::ValueToString<WebCore::LayoutUnit>::string):
+ (WebCore::ValueToString<LayoutUnit>::string): Deleted.
+ * platform/PODInterval.h:
+ * platform/PODIntervalTree.h:
+ * platform/PODRedBlackTree.h:
+ * platform/graphics/FloatPolygon.h:
+ (WTF::ValueToString<WebCore::FloatPolygonEdge::string):
+ (WebCore::ValueToString<FloatPolygonEdge::string): Deleted.
+ * rendering/FloatingObjects.h:
+ (WTF::ValueToString<WebCore::FloatingObject::string):
+ (WebCore::ValueToString<FloatingObject::string): Deleted.
+ * rendering/RenderFlowThread.h:
+ (WTF::ValueToString<WebCore::RenderRegion::string):
+ (WebCore::ValueToString<RenderRegion::string): Deleted.
+
2017-08-11 Sam Weinig <sam@webkit.org>
[Bindings] Simplify DOMPromiseProxy now that WTF::Function can return references
9920398318B95BC600B39AF9 /* UserInputBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 9920398118B95BC600B39AF9 /* UserInputBridge.h */; settings = {ATTRIBUTES = (Private, ); }; };
996E59DE1DF01285006612B9 /* NavigatorWebDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 996E59DB1DF00D90006612B9 /* NavigatorWebDriver.cpp */; };
996E59DF1DF0128D006612B9 /* NavigatorWebDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 996E59DC1DF00D90006612B9 /* NavigatorWebDriver.h */; };
- 9A1142041832D135000BB8AD /* ValueToString.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A1142031832D134000BB8AD /* ValueToString.h */; settings = {ATTRIBUTES = (Private, ); }; };
9A528E8317D7F52F00AA9518 /* FloatingObjects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A528E8117D7F52F00AA9518 /* FloatingObjects.cpp */; };
9A528E8417D7F52F00AA9518 /* FloatingObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A528E8217D7F52F00AA9518 /* FloatingObjects.h */; settings = {ATTRIBUTES = (Private, ); }; };
9AB1F38018E2489A00534743 /* CSSToLengthConversionData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AB1F37E18E2489A00534743 /* CSSToLengthConversionData.h */; };
996E59DB1DF00D90006612B9 /* NavigatorWebDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigatorWebDriver.cpp; sourceTree = "<group>"; };
996E59DC1DF00D90006612B9 /* NavigatorWebDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorWebDriver.h; sourceTree = "<group>"; };
996E59DD1DF00D90006612B9 /* NavigatorWebDriver.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorWebDriver.idl; sourceTree = "<group>"; };
- 9A1142031832D134000BB8AD /* ValueToString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValueToString.h; sourceTree = "<group>"; };
9A528E8117D7F52F00AA9518 /* FloatingObjects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FloatingObjects.cpp; sourceTree = "<group>"; };
9A528E8217D7F52F00AA9518 /* FloatingObjects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatingObjects.h; sourceTree = "<group>"; };
9AB1F37E18E2489A00534743 /* CSSToLengthConversionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSToLengthConversionData.h; sourceTree = "<group>"; };
868160D2187669C40021E79D /* UserActivity.h */,
71C916071D1483A300ACA47D /* UserInterfaceLayoutDirection.h */,
83C45B8D1DC2B67C008871BA /* ValidationBubble.h */,
- 9A1142031832D134000BB8AD /* ValueToString.h */,
515F79511CFCA3C700CCED93 /* WebCoreCrossThreadCopier.cpp */,
515F79521CFCA3C700CCED93 /* WebCoreCrossThreadCopier.h */,
839A2F2B1E204A6D0039057E /* WebGLStateTracker.cpp */,
F5A154281279534D00D0B0C0 /* ValidationMessage.h in Headers */,
F513A3EA15FF4841001526DB /* ValidationMessageClient.h in Headers */,
15C7708D100D3C6B005BA267 /* ValidityState.h in Headers */,
- 9A1142041832D135000BB8AD /* ValueToString.h in Headers */,
FD3160AF12B026F700C1A359 /* VectorMath.h in Headers */,
BCA257151293C010007A263D /* VerticalPositionCache.h in Headers */,
52B0D4C01C57FD660077CE53 /* VideoFullscreenChangeObserver.h in Headers */,
#endif
};
+} // namespace WebCore
+
#if ENABLE(VIDEO_TRACK) && !defined(NDEBUG)
+namespace WTF {
// Template specialization required by PodIntervalTree in debug mode.
-template <> struct ValueToString<TextTrackCue*> {
- static String string(TextTrackCue* const& cue)
+template <> struct ValueToString<WebCore::TextTrackCue*> {
+ static String string(WebCore::TextTrackCue* const& cue)
{
String text;
if (cue->isRenderable())
- text = toVTTCue(cue)->text();
+ text = WebCore::toVTTCue(cue)->text();
return String::format("%p id=%s interval=%s-->%s cue=%s)", cue, cue->id().utf8().data(), toString(cue->startTime()).utf8().data(), toString(cue->endTime()).utf8().data(), text.utf8().data());
}
};
+} // namespace WTF
#endif
#ifndef NDEBUG
+namespace WTF {
template<> struct ValueToString<MediaTime> {
static String string(const MediaTime& time)
}
};
+} // namespace WTF
#endif
-} // namespace WebCore
-
SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::HTMLMediaElement)
static bool isType(const WebCore::Element& element) { return element.isMediaElement(); }
static bool isType(const WebCore::Node& node) { return is<WebCore::Element>(node) && isType(downcast<WebCore::Element>(node)); }
#pragma once
-#include "ValueToString.h"
#include <limits.h>
#include <limits>
#include <math.h>
#include <stdlib.h>
#include <wtf/MathExtras.h>
#include <wtf/SaturatedArithmetic.h>
+#include <wtf/text/ValueToString.h>
namespace WTF {
class TextStream;
return value.toInt() == value;
}
+} // namespace WebCore
+
#ifndef NDEBUG
+namespace WTF {
// This structure is used by PODIntervalTree for debugging.
template <>
-struct ValueToString<LayoutUnit> {
- static String string(const LayoutUnit value) { return String::number(value.toFloat()); }
+struct ValueToString<WebCore::LayoutUnit> {
+ static String string(const WebCore::LayoutUnit value) { return String::number(value.toFloat()); }
};
-#endif
-} // namespace WebCore
+} // namespace WTF
+#endif
#define PODInterval_h
#ifndef NDEBUG
-#include "ValueToString.h"
#include <wtf/text/StringBuilder.h>
+#include <wtf/text/ValueToString.h>
#endif
namespace WebCore {
#include "PODInterval.h"
#include "PODRedBlackTree.h"
-#include "ValueToString.h"
#include <wtf/Assertions.h>
#include <wtf/Noncopyable.h>
#include <wtf/Vector.h>
+#include <wtf/text/ValueToString.h>
namespace WebCore {
}
};
+} // namespace WebCore
+
#ifndef NDEBUG
+namespace WTF {
+
// Support for printing PODIntervals at the PODRedBlackTree level.
template<class T, class UserData>
-struct ValueToString<PODInterval<T, UserData>> {
- static String string(const PODInterval<T, UserData>& interval)
+struct ValueToString<WebCore::PODInterval<T, UserData>> {
+ static String string(const WebCore::PODInterval<T, UserData>& interval)
{
return interval.toString();
}
};
-#endif
-} // namespace WebCore
+} // namespace WTF
+#endif
#endif // PODIntervalTree_h
#ifndef PODRedBlackTree_h
#define PODRedBlackTree_h
-#include "ValueToString.h"
#include <wtf/Assertions.h>
#include <wtf/Noncopyable.h>
+#include <wtf/text/ValueToString.h>
#ifndef NDEBUG
#include <wtf/text/StringBuilder.h>
#include <wtf/text/WTFString.h>
const FloatPolygon* m_polygon;
};
+} // namespace WebCore
+
// This structure is used by PODIntervalTree for debugging.
#ifndef NDEBUG
-template<> struct ValueToString<FloatPolygonEdge*> {
- static String string(const FloatPolygonEdge* edge) { return String::format("%p (%f,%f %f,%f)", edge, edge->vertex1().x(), edge->vertex1().y(), edge->vertex2().x(), edge->vertex2().y()); }
+namespace WTF {
+
+template<> struct ValueToString<WebCore::FloatPolygonEdge*> {
+ static String string(const WebCore::FloatPolygonEdge* edge) { return String::format("%p (%f,%f %f,%f)", edge, edge->vertex1().x(), edge->vertex1().y(), edge->vertex2().x(), edge->vertex2().y()); }
};
-#endif
-} // namespace WebCore
+}
+#endif
#endif // FloatPolygon_h
const RenderBlockFlow& m_renderer;
};
+} // namespace WebCore
+
#ifndef NDEBUG
+namespace WTF {
+
// This helper is used by PODIntervalTree for debugging purposes.
-template<> struct ValueToString<FloatingObject*> {
- static String string(const FloatingObject* floatingObject)
+template<> struct ValueToString<WebCore::FloatingObject*> {
+ static String string(const WebCore::FloatingObject* floatingObject)
{
return String::format("%p (%ix%i %ix%i)", floatingObject, floatingObject->frameRect().x().toInt(), floatingObject->frameRect().y().toInt(), floatingObject->frameRect().maxX().toInt(), floatingObject->frameRect().maxY().toInt());
}
};
-#endif
-} // namespace WebCore
+} // namespace WTF
+#endif
bool m_layersToRegionMappingsDirty : 1;
};
+} // namespace WebCore
+
// This structure is used by PODIntervalTree for debugging.
#ifndef NDEBUG
-template <> struct ValueToString<RenderRegion*> {
- static String string(const RenderRegion* value) { return String::format("%p", value); }
+namespace WTF {
+
+template <> struct ValueToString<WebCore::RenderRegion*> {
+ static String string(const WebCore::RenderRegion* value) { return String::format("%p", value); }
};
-#endif
-} // namespace WebCore
+} // namespace WTF
+#endif
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderFlowThread, isRenderFlowThread())