Title: [221946] trunk/Source/WebCore
Revision
221946
Author
[email protected]
Date
2017-09-12 17:07:10 -0700 (Tue, 12 Sep 2017)

Log Message

Inline ParserUtilities.h
https://bugs.webkit.org/show_bug.cgi?id=176572

Reviewed by Darin Adler.

Its contents are only ever used from SVG files which also include SVGParserUtilities.h.

No new tests because there is no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* platform/text/ParserUtilities.h: Removed.
* svg/SVGParserUtilities.h:
(WebCore::skipString):

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (221945 => 221946)


--- trunk/Source/WebCore/ChangeLog	2017-09-12 23:52:44 UTC (rev 221945)
+++ trunk/Source/WebCore/ChangeLog	2017-09-13 00:07:10 UTC (rev 221946)
@@ -1,3 +1,19 @@
+2017-09-12  Myles C. Maxfield  <[email protected]>
+
+        Inline ParserUtilities.h
+        https://bugs.webkit.org/show_bug.cgi?id=176572
+
+        Reviewed by Darin Adler.
+
+        Its contents are only ever used from SVG files which also include SVGParserUtilities.h.
+
+        No new tests because there is no behavior change.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/text/ParserUtilities.h: Removed.
+        * svg/SVGParserUtilities.h:
+        (WebCore::skipString):
+
 2017-09-12  Ryosuke Niwa  <[email protected]>
 
         Dragging & dropping a file creates an attachment element even when it's disabled

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (221945 => 221946)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-09-12 23:52:44 UTC (rev 221945)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-09-13 00:07:10 UTC (rev 221946)
@@ -5867,7 +5867,6 @@
 		BC6D6E2609AF943500F59759 /* ScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6D6E2509AF943500F59759 /* ScrollView.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BC74DA371013F3F7007987AD /* RGBColor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC74DA351013F3F7007987AD /* RGBColor.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BC74DA381013F3F7007987AD /* RGBColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC74DA361013F3F7007987AD /* RGBColor.cpp */; };
-		BC76AC130DD7AD5C00415F34 /* ParserUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = BC76AC110DD7AD5C00415F34 /* ParserUtilities.h */; };
 		BC772B3C0C4EA91E0083285F /* CSSHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772B360C4EA91E0083285F /* CSSHelper.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BC772C460C4EB2C60083285F /* XMLHttpRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC772C440C4EB2C60083285F /* XMLHttpRequest.cpp */; };
 		BC772C470C4EB2C60083285F /* XMLHttpRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = BC772C450C4EB2C60083285F /* XMLHttpRequest.h */; };
@@ -14501,7 +14500,6 @@
 		BC6D6E2509AF943500F59759 /* ScrollView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScrollView.h; sourceTree = "<group>"; };
 		BC74DA351013F3F7007987AD /* RGBColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RGBColor.h; sourceTree = "<group>"; };
 		BC74DA361013F3F7007987AD /* RGBColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RGBColor.cpp; sourceTree = "<group>"; };
-		BC76AC110DD7AD5C00415F34 /* ParserUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserUtilities.h; sourceTree = "<group>"; };
 		BC772B360C4EA91E0083285F /* CSSHelper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSHelper.h; sourceTree = "<group>"; };
 		BC772C440C4EB2C60083285F /* XMLHttpRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XMLHttpRequest.cpp; sourceTree = "<group>"; };
 		BC772C450C4EB2C60083285F /* XMLHttpRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLHttpRequest.h; sourceTree = "<group>"; };
@@ -23783,7 +23781,6 @@
 				89B5EAA011E8003D00F2367E /* LineEnding.h */,
 				7633A72413D8B33A008501B6 /* LocaleToScriptMapping.h */,
 				7633A72513D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp */,
-				BC76AC110DD7AD5C00415F34 /* ParserUtilities.h */,
 				F544F78615CFB2A800AF33A8 /* PlatformLocale.cpp */,
 				F544F78715CFB2A800AF33A8 /* PlatformLocale.h */,
 				379E371413736A6600B9E919 /* QuotedPrintable.cpp */,
@@ -29332,7 +29329,6 @@
 				A18890AF1AA13F250026C301 /* ParentalControlsContentFilter.h in Headers */,
 				CDCD41E81C3DDB0A00965D99 /* ParsedContentRange.h in Headers */,
 				447958041643B49A001E0A7F /* ParsedContentType.h in Headers */,
-				BC76AC130DD7AD5C00415F34 /* ParserUtilities.h in Headers */,
 				536D5A23193E8E0C00CE4CAB /* ParsingUtilities.h in Headers */,
 				57B5F7ED1E57F1E300F34F90 /* PasswordCredential.h in Headers */,
 				77D5100C1ED5E29000DA4C87 /* PasswordCredentialData.h in Headers */,

Deleted: trunk/Source/WebCore/platform/text/ParserUtilities.h (221945 => 221946)


--- trunk/Source/WebCore/platform/text/ParserUtilities.h	2017-09-12 23:52:44 UTC (rev 221945)
+++ trunk/Source/WebCore/platform/text/ParserUtilities.h	2017-09-13 00:07:10 UTC (rev 221946)
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- * Copyright (C) 2002, 2003 The Karbon Developers
- * Copyright (C) 2006, 2007 Rob Buis <[email protected]>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef ParserUtilities_h
-#define ParserUtilities_h
-
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-    inline bool skipString(const UChar*& ptr, const UChar* end, const UChar* name, int length)
-    {
-        if (end - ptr < length)
-            return false;
-        if (memcmp(name, ptr, sizeof(UChar) * length))
-            return false;
-        ptr += length;
-        return true;
-    }
-
-    inline bool skipString(const UChar*& ptr, const UChar* end, const char* str)
-    {
-        int length = strlen(str);
-        if (end - ptr < length)
-            return false;
-        for (int i = 0; i < length; ++i) {
-            if (ptr[i] != str[i])
-                return false;
-        }
-        ptr += length;
-        return true;
-    }
-
-} // namspace WebCore
-
-#endif // ParserUtilities_h

Modified: trunk/Source/WebCore/svg/SVGParserUtilities.h (221945 => 221946)


--- trunk/Source/WebCore/svg/SVGParserUtilities.h	2017-09-12 23:52:44 UTC (rev 221945)
+++ trunk/Source/WebCore/svg/SVGParserUtilities.h	2017-09-13 00:07:10 UTC (rev 221946)
@@ -21,9 +21,9 @@
 
 #pragma once
 
-#include "ParserUtilities.h"
 #include <wtf/HashSet.h>
 #include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
 
 typedef std::pair<unsigned, unsigned> UnicodeRange;
 typedef Vector<UnicodeRange> UnicodeRanges;
@@ -86,4 +86,27 @@
 bool parseKerningUnicodeString(const String& input, UnicodeRanges&, HashSet<String>& stringList);
 bool parseGlyphName(const String& input, HashSet<String>& values);
 
+inline bool skipString(const UChar*& ptr, const UChar* end, const UChar* name, int length)
+{
+    if (end - ptr < length)
+        return false;
+    if (memcmp(name, ptr, sizeof(UChar) * length))
+        return false;
+    ptr += length;
+    return true;
+}
+
+inline bool skipString(const UChar*& ptr, const UChar* end, const char* str)
+{
+    int length = strlen(str);
+    if (end - ptr < length)
+        return false;
+    for (int i = 0; i < length; ++i) {
+        if (ptr[i] != str[i])
+            return false;
+    }
+    ptr += length;
+    return true;
+}
+
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to