2010-06-23 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jun 2010 08:44:01 +0000 (08:44 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jun 2010 08:44:01 +0000 (08:44 +0000)
        Reviewed by Eric Seidel.

        Rename the preload scanners
        https://bugs.webkit.org/show_bug.cgi?id=41052

        Renames PreloadScanner to LegacyPreloadScanner because this code is now
        off by default.  Also, rename HTML5PreloadScanner to
        HTMLPreloadScanner.  We're not calling it PreloadScanner because we've
        factored out the CSSPreloadScanner and the HTMLPreloadScanner from the
        original PreloadScanner.

        * Android.mk:
        * CMakeLists.txt:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTML5PreloadScanner.cpp: Removed.
        * html/HTML5PreloadScanner.h: Removed.
        * html/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::pumpTokenizer):
        * html/HTMLDocumentParser.h:
        * html/HTMLPreloadScanner.cpp: Copied from WebCore/html/HTML5PreloadScanner.cpp.
        (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
        (WebCore::HTMLPreloadScanner::appendToEnd):
        (WebCore::HTMLPreloadScanner::scan):
        (WebCore::HTMLPreloadScanner::processToken):
        (WebCore::HTMLPreloadScanner::scanningBody):
        * html/HTMLPreloadScanner.h: Copied from WebCore/html/HTML5PreloadScanner.h.
        * html/LegacyHTMLDocumentParser.cpp:
        (WebCore::LegacyHTMLDocumentParser::scriptHandler):
        (WebCore::LegacyHTMLDocumentParser::scriptExecution):
        * html/LegacyHTMLDocumentParser.h:
        * html/LegacyPreloadScanner.cpp: Copied from WebCore/html/PreloadScanner.cpp.
        (WebCore::LegacyPreloadScanner::LegacyPreloadScanner):
        (WebCore::LegacyPreloadScanner::~LegacyPreloadScanner):
        (WebCore::LegacyPreloadScanner::begin):
        (WebCore::LegacyPreloadScanner::end):
        (WebCore::LegacyPreloadScanner::reset):
        (WebCore::LegacyPreloadScanner::scanningBody):
        (WebCore::LegacyPreloadScanner::write):
        (WebCore::LegacyPreloadScanner::clearLastCharacters):
        (WebCore::LegacyPreloadScanner::rememberCharacter):
        (WebCore::LegacyPreloadScanner::lastCharactersMatch):
        (WebCore::LegacyPreloadScanner::consumeEntity):
        (WebCore::LegacyPreloadScanner::tokenize):
        (WebCore::LegacyPreloadScanner::processAttribute):
        (WebCore::LegacyPreloadScanner::emitCharacter):
        (WebCore::LegacyPreloadScanner::tokenizeCSS):
        (WebCore::LegacyPreloadScanner::emitTag):
        (WebCore::LegacyPreloadScanner::emitCSSRule):
        * html/LegacyPreloadScanner.h: Copied from WebCore/html/PreloadScanner.h.
        * html/PreloadScanner.cpp: Removed.
        * html/PreloadScanner.h: Removed.
        * page/XSSAuditor.cpp:
        (WebCore::XSSAuditor::decodeHTMLEntities):

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

17 files changed:
WebCore/Android.mk
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/html/HTMLDocumentParser.cpp
WebCore/html/HTMLDocumentParser.h
WebCore/html/HTMLPreloadScanner.cpp [moved from WebCore/html/HTML5PreloadScanner.cpp with 95% similarity]
WebCore/html/HTMLPreloadScanner.h [moved from WebCore/html/HTML5PreloadScanner.h with 95% similarity]
WebCore/html/LegacyHTMLDocumentParser.cpp
WebCore/html/LegacyHTMLDocumentParser.h
WebCore/html/LegacyPreloadScanner.cpp [moved from WebCore/html/PreloadScanner.cpp with 96% similarity]
WebCore/html/LegacyPreloadScanner.h [moved from WebCore/html/PreloadScanner.h with 97% similarity]
WebCore/page/XSSAuditor.cpp

index d7b7e81..9bd6dff 100644 (file)
@@ -252,7 +252,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
        html/HTMLEntityParser.cpp \
        html/HTMLTokenizer.cpp \
        html/HTMLDocumentParser.cpp \
-       html/HTML5PreloadScanner.cpp \
+       html/HTMLPreloadScanner.cpp \
        html/HTMLScriptRunner.cpp \
        html/HTMLTreeBuilder.cpp \
        html/HTMLAllCollection.cpp \
@@ -272,7 +272,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
        html/HTMLViewSourceDocument.cpp \
        html/ImageData.cpp \
        html/ImageResizerThread.cpp \
-       html/PreloadScanner.cpp \
+       html/LegacyPreloadScanner.cpp \
        html/TimeRanges.cpp \
        html/ValidityState.cpp \
        \
index 93ef709..dab723e 100644 (file)
@@ -909,7 +909,7 @@ SET(WebCore_SOURCES
     html/HTMLEntityParser.cpp
     html/HTMLTokenizer.cpp
     html/HTMLDocumentParser.cpp
-    html/HTML5PreloadScanner.cpp
+    html/HTMLPreloadScanner.cpp
     html/HTMLScriptRunner.cpp
     html/HTMLTreeBuilder.cpp
     html/HTMLAllCollection.cpp
@@ -999,7 +999,7 @@ SET(WebCore_SOURCES
     html/ImageData.cpp
     html/ImageResizerThread.cpp
     html/LabelsNodeList.cpp
-    html/PreloadScanner.cpp
+    html/LegacyPreloadScanner.cpp
     html/StepRange.cpp
     html/ValidityState.cpp
     html/canvas/CanvasGradient.cpp
@@ -1711,7 +1711,7 @@ ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSPrimitiveValueMappings.h C
 ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/HTMLDocument.cpp DocTypeStrings.cpp)
 ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/platform/graphics/Color.cpp ColorData.cpp)
 ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSParser.cpp tokenizer.cpp)
-ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/PreloadScanner.cpp HTMLEntityNames.cpp)
+ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/LegacyPreloadScanner.cpp HTMLEntityNames.cpp)
 ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/HTMLEntityParser.cpp HTMLEntityNames.cpp)
 ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSStyleSelector.cpp UserAgentStyleSheetsData.cpp UserAgentStyleSheets.h)
 
index 8fef3bc..6ab54cf 100644 (file)
@@ -2,6 +2,66 @@
 
         Reviewed by Eric Seidel.
 
+        Rename the preload scanners
+        https://bugs.webkit.org/show_bug.cgi?id=41052
+
+        Renames PreloadScanner to LegacyPreloadScanner because this code is now
+        off by default.  Also, rename HTML5PreloadScanner to
+        HTMLPreloadScanner.  We're not calling it PreloadScanner because we've
+        factored out the CSSPreloadScanner and the HTMLPreloadScanner from the
+        original PreloadScanner.
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTML5PreloadScanner.cpp: Removed.
+        * html/HTML5PreloadScanner.h: Removed.
+        * html/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::pumpTokenizer):
+        * html/HTMLDocumentParser.h:
+        * html/HTMLPreloadScanner.cpp: Copied from WebCore/html/HTML5PreloadScanner.cpp.
+        (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
+        (WebCore::HTMLPreloadScanner::appendToEnd):
+        (WebCore::HTMLPreloadScanner::scan):
+        (WebCore::HTMLPreloadScanner::processToken):
+        (WebCore::HTMLPreloadScanner::scanningBody):
+        * html/HTMLPreloadScanner.h: Copied from WebCore/html/HTML5PreloadScanner.h.
+        * html/LegacyHTMLDocumentParser.cpp:
+        (WebCore::LegacyHTMLDocumentParser::scriptHandler):
+        (WebCore::LegacyHTMLDocumentParser::scriptExecution):
+        * html/LegacyHTMLDocumentParser.h:
+        * html/LegacyPreloadScanner.cpp: Copied from WebCore/html/PreloadScanner.cpp.
+        (WebCore::LegacyPreloadScanner::LegacyPreloadScanner):
+        (WebCore::LegacyPreloadScanner::~LegacyPreloadScanner):
+        (WebCore::LegacyPreloadScanner::begin):
+        (WebCore::LegacyPreloadScanner::end):
+        (WebCore::LegacyPreloadScanner::reset):
+        (WebCore::LegacyPreloadScanner::scanningBody):
+        (WebCore::LegacyPreloadScanner::write):
+        (WebCore::LegacyPreloadScanner::clearLastCharacters):
+        (WebCore::LegacyPreloadScanner::rememberCharacter):
+        (WebCore::LegacyPreloadScanner::lastCharactersMatch):
+        (WebCore::LegacyPreloadScanner::consumeEntity):
+        (WebCore::LegacyPreloadScanner::tokenize):
+        (WebCore::LegacyPreloadScanner::processAttribute):
+        (WebCore::LegacyPreloadScanner::emitCharacter):
+        (WebCore::LegacyPreloadScanner::tokenizeCSS):
+        (WebCore::LegacyPreloadScanner::emitTag):
+        (WebCore::LegacyPreloadScanner::emitCSSRule):
+        * html/LegacyPreloadScanner.h: Copied from WebCore/html/PreloadScanner.h.
+        * html/PreloadScanner.cpp: Removed.
+        * html/PreloadScanner.h: Removed.
+        * page/XSSAuditor.cpp:
+        (WebCore::XSSAuditor::decodeHTMLEntities):
+
+2010-06-23  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
         Yet more HTML5 => HTML renames
         https://bugs.webkit.org/show_bug.cgi?id=41051
 
index cdd530b..3a5d1ae 100644 (file)
@@ -1093,8 +1093,8 @@ webcore_sources += \
        WebCore/html/HTMLToken.h \
        WebCore/html/HTMLDocumentParser.cpp \
        WebCore/html/HTMLDocumentParser.h \
-       WebCore/html/HTML5PreloadScanner.cpp \
-       WebCore/html/HTML5PreloadScanner.h \
+       WebCore/html/HTMLPreloadScanner.cpp \
+       WebCore/html/HTMLPreloadScanner.h \
        WebCore/html/HTMLScriptRunner.cpp \
        WebCore/html/HTMLScriptRunner.h \
        WebCore/html/HTMLScriptRunnerHost.h \
@@ -1277,8 +1277,8 @@ webcore_sources += \
        WebCore/html/LabelsNodeList.cpp \
        WebCore/html/LabelsNodeList.h \
        WebCore/html/MediaError.h \
-       WebCore/html/PreloadScanner.cpp \
-       WebCore/html/PreloadScanner.h \
+       WebCore/html/LegacyPreloadScanner.cpp \
+       WebCore/html/LegacyPreloadScanner.h \
        WebCore/html/StepRange.cpp \
        WebCore/html/StepRange.h \
        WebCore/html/TextMetrics.h \
index 883623f..e3c2989 100644 (file)
             'html/HTMLTokenizer.h',
             'html/HTMLDocumentParser.cpp',
             'html/HTMLDocumentParser.h',
-            'html/HTML5PreloadScanner.cpp',
-            'html/HTML5PreloadScanner.h',
+            'html/HTMLPreloadScanner.cpp',
+            'html/HTMLPreloadScanner.h',
             'html/HTMLScriptRunner.cpp',
             'html/HTMLScriptRunner.h',
             'html/HTMLTreeBuilder.cpp',
             'html/LabelsNodeList.cpp',
             'html/LabelsNodeList.h',
             'html/MediaError.h',
-            'html/PreloadScanner.cpp',
-            'html/PreloadScanner.h',
+            'html/LegacyPreloadScanner.cpp',
+            'html/LegacyPreloadScanner.h',
             'html/StepRange.cpp',
             'html/StepRange.h',
             'html/TextMetrics.h',
index e33d81f..9b84ad5 100644 (file)
@@ -614,7 +614,7 @@ SOURCES += \
     html/HTMLEntityParser.cpp \
     html/HTMLTokenizer.cpp \
     html/HTMLDocumentParser.cpp \
-    html/HTML5PreloadScanner.cpp \
+    html/HTMLPreloadScanner.cpp \
     html/HTMLScriptRunner.cpp \
     html/HTMLTreeBuilder.cpp \
     html/HTMLAllCollection.cpp \
@@ -704,7 +704,7 @@ SOURCES += \
     html/ImageData.cpp \
     html/ImageResizerThread.cpp \
     html/LabelsNodeList.cpp \
-    html/PreloadScanner.cpp \
+    html/LegacyPreloadScanner.cpp \
     html/StepRange.cpp \
     html/ValidityState.cpp \
     inspector/ConsoleMessage.cpp \
@@ -1444,7 +1444,7 @@ HEADERS += \
     html/ImageData.h \
     html/ImageResizerThread.h \
     html/LabelsNodeList.h \
-    html/PreloadScanner.h \
+    html/LegacyPreloadScanner.h \
     html/StepRange.h \
     html/TimeRanges.h \
     html/ValidityState.h \
index e17d351..3950aa3 100644 (file)
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\html\HTML5PreloadScanner.cpp"\r
+                               RelativePath="..\html\HTMLPreloadScanner.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\html\HTML5PreloadScanner.h"\r
+                               RelativePath="..\html\HTMLPreloadScanner.h"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\html\PreloadScanner.cpp"\r
+                               RelativePath="..\html\LegacyPreloadScanner.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\html\PreloadScanner.h"\r
+                               RelativePath="..\html\LegacyPreloadScanner.h"\r
                                >\r
                        </File>\r
                        <File\r
index f7cf90b..6ccade3 100644 (file)
                97DCE20210807C750057D394 /* HistoryController.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DCE20010807C750057D394 /* HistoryController.h */; settings = {ATTRIBUTES = (Private, ); }; };
                97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */; };
                97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */; };
-               97E7936511C6030900E649BC /* HTML5PreloadScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97E7936311C6030900E649BC /* HTML5PreloadScanner.cpp */; };
-               97E7936611C6030900E649BC /* HTML5PreloadScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 97E7936411C6030900E649BC /* HTML5PreloadScanner.h */; };
+               97E7936511C6030900E649BC /* HTMLPreloadScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97E7936311C6030900E649BC /* HTMLPreloadScanner.cpp */; };
+               97E7936611C6030900E649BC /* HTMLPreloadScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 97E7936411C6030900E649BC /* HTMLPreloadScanner.h */; };
                97E8B35611A23CE200169409 /* HTMLTokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97E8B35411A23CE200169409 /* HTMLTokenizer.cpp */; };
                97E8B35711A23CE200169409 /* HTMLTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 97E8B35511A23CE200169409 /* HTMLTokenizer.h */; };
                97E8B3C311A2890800169409 /* HTMLToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 97E8B3C211A2890800169409 /* HTMLToken.h */; };
                E4778B80115A581A00B5D372 /* JSCustomEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = E4778B7E115A581A00B5D372 /* JSCustomEvent.h */; };
                E47B4BE80E71241600038854 /* CachedResourceHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = E47B4BE60E71241600038854 /* CachedResourceHandle.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E47B4BE90E71241600038854 /* CachedResourceHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E47B4BE70E71241600038854 /* CachedResourceHandle.cpp */; };
-               E49626C20D80D94800E3405C /* PreloadScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4D4ABE00D7542F000F96869 /* PreloadScanner.cpp */; };
-               E49626C30D80D94900E3405C /* PreloadScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D4ABE10D7542F100F96869 /* PreloadScanner.h */; };
+               E49626C20D80D94800E3405C /* LegacyPreloadScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4D4ABE00D7542F000F96869 /* LegacyPreloadScanner.cpp */; };
+               E49626C30D80D94900E3405C /* LegacyPreloadScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D4ABE10D7542F100F96869 /* LegacyPreloadScanner.h */; };
                E4AFCFA50DAF29A300F5F55C /* UnitBezier.h in Headers */ = {isa = PBXBuildFile; fileRef = E4AFCFA40DAF29A300F5F55C /* UnitBezier.h */; };
                E4AFD00B0DAF335400F5F55C /* SMILTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4AFD0050DAF335400F5F55C /* SMILTime.cpp */; };
                E4AFD00C0DAF335400F5F55C /* SMILTime.h in Headers */ = {isa = PBXBuildFile; fileRef = E4AFD0060DAF335400F5F55C /* SMILTime.h */; settings = {ATTRIBUTES = (Private, ); }; };
                97DCE20010807C750057D394 /* HistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryController.h; sourceTree = "<group>"; };
                97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSSAuditor.cpp; sourceTree = "<group>"; };
                97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSSAuditor.h; sourceTree = "<group>"; };
-               97E7936311C6030900E649BC /* HTML5PreloadScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTML5PreloadScanner.cpp; sourceTree = "<group>"; };
-               97E7936411C6030900E649BC /* HTML5PreloadScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTML5PreloadScanner.h; sourceTree = "<group>"; };
+               97E7936311C6030900E649BC /* HTMLPreloadScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPreloadScanner.cpp; sourceTree = "<group>"; };
+               97E7936411C6030900E649BC /* HTMLPreloadScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLPreloadScanner.h; sourceTree = "<group>"; };
                97E8B35411A23CE200169409 /* HTMLTokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLTokenizer.cpp; sourceTree = "<group>"; };
                97E8B35511A23CE200169409 /* HTMLTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTokenizer.h; sourceTree = "<group>"; };
                97E8B3C211A2890800169409 /* HTMLToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLToken.h; sourceTree = "<group>"; };
                E4C178960EE6903800824D69 /* CSSSelectorList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSSelectorList.h; sourceTree = "<group>"; };
                E4C279560CF9741900E97B98 /* RenderMedia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMedia.cpp; sourceTree = "<group>"; };
                E4C279570CF9741900E97B98 /* RenderMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMedia.h; sourceTree = "<group>"; };
-               E4D4ABE00D7542F000F96869 /* PreloadScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreloadScanner.cpp; sourceTree = "<group>"; };
-               E4D4ABE10D7542F100F96869 /* PreloadScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreloadScanner.h; sourceTree = "<group>"; };
+               E4D4ABE00D7542F000F96869 /* LegacyPreloadScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyPreloadScanner.cpp; sourceTree = "<group>"; };
+               E4D4ABE10D7542F100F96869 /* LegacyPreloadScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyPreloadScanner.h; sourceTree = "<group>"; };
                E4D687760ED7AE3D006EA978 /* PurgeableBufferMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PurgeableBufferMac.cpp; sourceTree = "<group>"; };
                E4D687780ED7AE4F006EA978 /* PurgeableBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurgeableBuffer.h; sourceTree = "<group>"; };
                E4EEFFC60D34550C00469A58 /* JSAudioConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioConstructor.cpp; sourceTree = "<group>"; };
                                976E895F11C0CA3A00EA9CA9 /* HTMLEntityParser.h */,
                                97E8B35411A23CE200169409 /* HTMLTokenizer.cpp */,
                                97E8B35511A23CE200169409 /* HTMLTokenizer.h */,
-                               97E7936311C6030900E649BC /* HTML5PreloadScanner.cpp */,
-                               97E7936411C6030900E649BC /* HTML5PreloadScanner.h */,
+                               97E7936311C6030900E649BC /* HTMLPreloadScanner.cpp */,
+                               97E7936411C6030900E649BC /* HTMLPreloadScanner.h */,
                                A83B3AEE11ADEFF500458809 /* HTMLScriptRunner.cpp */,
                                A83B3AEF11ADEFF500458809 /* HTMLScriptRunner.h */,
                                A87F163411AE841300CBB2E5 /* HTMLScriptRunnerHost.h */,
                                F523D25102DE4396018635CA /* LegacyHTMLTreeConstructor.h */,
                                E446139B0CD6331000FADA75 /* MediaError.h */,
                                E446139C0CD6331000FADA75 /* MediaError.idl */,
-                               E4D4ABE00D7542F000F96869 /* PreloadScanner.cpp */,
-                               E4D4ABE10D7542F100F96869 /* PreloadScanner.h */,
+                               E4D4ABE00D7542F000F96869 /* LegacyPreloadScanner.cpp */,
+                               E4D4ABE10D7542F100F96869 /* LegacyPreloadScanner.h */,
                                A5AFB34D115151A700B045CB /* StepRange.cpp */,
                                A5AFB34E115151A700B045CB /* StepRange.h */,
                                BCEF45E80E687767001C1287 /* TextMetrics.h */,
                                A871038B11A2947000DBD50E /* HTMLDocumentParser.h in Headers */,
                                976E896111C0CA3A00EA9CA9 /* HTMLEntityParser.h in Headers */,
                                97E8B35711A23CE200169409 /* HTMLTokenizer.h in Headers */,
-                               97E7936611C6030900E649BC /* HTML5PreloadScanner.h in Headers */,
+                               97E7936611C6030900E649BC /* HTMLPreloadScanner.h in Headers */,
                                A83B3AF111ADEFF500458809 /* HTMLScriptRunner.h in Headers */,
                                A87F163511AE841300CBB2E5 /* HTMLScriptRunnerHost.h in Headers */,
                                97E8B3C311A2890800169409 /* HTMLToken.h in Headers */,
                                FE80D7CF0E9C1F25000D6F75 /* PositionErrorCallback.h in Headers */,
                                37919C240B7D188600A56998 /* PositionIterator.h in Headers */,
                                FE80D7D10E9C1F25000D6F75 /* PositionOptions.h in Headers */,
-                               E49626C30D80D94900E3405C /* PreloadScanner.h in Headers */,
+                               E49626C30D80D94900E3405C /* LegacyPreloadScanner.h in Headers */,
                                B71FE6DF11091CB300DAEF77 /* PrintContext.h in Headers */,
                                A8EA7EBC0A1945D000A8EF5F /* ProcessingInstruction.h in Headers */,
                                E44613EC0CD681B500FADA75 /* ProgressEvent.h in Headers */,
                                A871038A11A2947000DBD50E /* HTMLDocumentParser.cpp in Sources */,
                                976E896011C0CA3A00EA9CA9 /* HTMLEntityParser.cpp in Sources */,
                                97E8B35611A23CE200169409 /* HTMLTokenizer.cpp in Sources */,
-                               97E7936511C6030900E649BC /* HTML5PreloadScanner.cpp in Sources */,
+                               97E7936511C6030900E649BC /* HTMLPreloadScanner.cpp in Sources */,
                                A83B3AF011ADEFF500458809 /* HTMLScriptRunner.cpp in Sources */,
                                A879C62511A9D1F70059237A /* HTMLTreeBuilder.cpp in Sources */,
                                BC97E23B109144950010D361 /* HTMLAllCollection.cpp in Sources */,
                                0668E1900ADD9640004128E0 /* PopupMenuMac.mm in Sources */,
                                93F19AF808245E59001E9ABC /* Position.cpp in Sources */,
                                37919C230B7D188600A56998 /* PositionIterator.cpp in Sources */,
-                               E49626C20D80D94800E3405C /* PreloadScanner.cpp in Sources */,
+                               E49626C20D80D94800E3405C /* LegacyPreloadScanner.cpp in Sources */,
                                B776D43D1104527500BEB0EC /* PrintContext.cpp in Sources */,
                                A8EA7EBD0A1945D000A8EF5F /* ProcessingInstruction.cpp in Sources */,
                                E44613EB0CD681B400FADA75 /* ProgressEvent.cpp in Sources */,
index 69a235b..63688f1 100644 (file)
@@ -31,7 +31,7 @@
 #include "Frame.h"
 #include "HTMLParserScheduler.h"
 #include "HTMLTokenizer.h"
-#include "HTML5PreloadScanner.h"
+#include "HTMLPreloadScanner.h"
 #include "HTMLScriptRunner.h"
 #include "HTMLTreeBuilder.h"
 #include "HTMLDocument.h"
@@ -185,7 +185,7 @@ void HTMLDocumentParser::pumpTokenizer(SynchronousMode mode)
     if (isWaitingForScripts()) {
         ASSERT(m_tokenizer->state() == HTMLTokenizer::DataState);
         if (!m_preloadScanner) {
-            m_preloadScanner.set(new HTML5PreloadScanner(m_document));
+            m_preloadScanner.set(new HTMLPreloadScanner(m_document));
             m_preloadScanner->appendToEnd(m_input.current());
         }
         m_preloadScanner->scan();
index 1d0aa98..c1caf9f 100644 (file)
@@ -45,7 +45,7 @@ class HTMLParserScheduler;
 class HTMLTokenizer;
 class HTMLScriptRunner;
 class HTMLTreeBuilder;
-class HTML5PreloadScanner;
+class HTMLPreloadScanner;
 class LegacyHTMLTreeConstructor;
 class ScriptController;
 class ScriptSourceCode;
@@ -121,7 +121,7 @@ private:
     OwnPtr<HTMLTokenizer> m_tokenizer;
     OwnPtr<HTMLScriptRunner> m_scriptRunner;
     OwnPtr<HTMLTreeBuilder> m_treeConstructor;
-    OwnPtr<HTML5PreloadScanner> m_preloadScanner;
+    OwnPtr<HTMLPreloadScanner> m_preloadScanner;
     OwnPtr<HTMLParserScheduler> m_parserScheduler;
 
     bool m_endWasDelayed;
similarity index 95%
rename from WebCore/html/HTML5PreloadScanner.cpp
rename to WebCore/html/HTMLPreloadScanner.cpp
index d9c8740..57ac408 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #include "config.h"
-#include "HTML5PreloadScanner.h"
+#include "HTMLPreloadScanner.h"
 
 #include "CSSHelper.h"
 #include "DocLoader.h"
@@ -117,7 +117,7 @@ private:
 
 } // namespace
 
-HTML5PreloadScanner::HTML5PreloadScanner(Document* document)
+HTMLPreloadScanner::HTMLPreloadScanner(Document* document)
     : m_document(document)
     , m_cssScanner(document)
     , m_bodySeen(false)
@@ -125,12 +125,12 @@ HTML5PreloadScanner::HTML5PreloadScanner(Document* document)
 {
 }
 
-void HTML5PreloadScanner::appendToEnd(const SegmentedString& source)
+void HTMLPreloadScanner::appendToEnd(const SegmentedString& source)
 {
     m_source.append(source);
 }
 
-void HTML5PreloadScanner::scan()
+void HTMLPreloadScanner::scan()
 {
     // FIXME: We should save and re-use these tokens in HTMLDocumentParser if
     // the pending script doesn't end up calling document.write.
@@ -140,7 +140,7 @@ void HTML5PreloadScanner::scan()
     }
 }
 
-void HTML5PreloadScanner::processToken()
+void HTMLPreloadScanner::processToken()
 {
     if (m_inStyle) {
         if (m_token.type() == HTMLToken::Character)
@@ -172,7 +172,7 @@ void HTML5PreloadScanner::processToken()
     task.preload(m_document, scanningBody());
 }
 
-bool HTML5PreloadScanner::scanningBody() const
+bool HTMLPreloadScanner::scanningBody() const
 {
     return m_document->body() || m_bodySeen;
 }
similarity index 95%
rename from WebCore/html/HTML5PreloadScanner.h
rename to WebCore/html/HTMLPreloadScanner.h
index 002a3ce..1fc6d37 100644 (file)
@@ -39,9 +39,9 @@ class Document;
 class HTMLToken;
 class SegmentedString;
 
-class HTML5PreloadScanner : public Noncopyable {
+class HTMLPreloadScanner : public Noncopyable {
 public:
-    HTML5PreloadScanner(Document*);
+    HTMLPreloadScanner(Document*);
 
     void appendToEnd(const SegmentedString&);
     void scan();
index 82abecc..f0cb1b7 100644 (file)
@@ -47,7 +47,7 @@
 #include "ImageLoader.h"
 #include "InspectorTimelineAgent.h"
 #include "Page.h"
-#include "PreloadScanner.h"
+#include "LegacyPreloadScanner.h"
 #include "ScriptSourceCode.h"
 #include "ScriptValue.h"
 #include "XSSAuditor.h"
@@ -533,7 +533,7 @@ LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::scriptHandler(State st
 #if PRELOAD_SCANNER_ENABLED
     if (!m_pendingScripts.isEmpty() && !m_executingScript) {
         if (!m_preloadScanner)
-            m_preloadScanner.set(new PreloadScanner(m_doc));
+            m_preloadScanner.set(new LegacyPreloadScanner(m_doc));
         if (!m_preloadScanner->inProgress()) {
             m_preloadScanner->begin();
             m_preloadScanner->write(m_pendingSrc);
@@ -584,7 +584,7 @@ LegacyHTMLDocumentParser::State LegacyHTMLDocumentParser::scriptExecution(const
 #if PRELOAD_SCANNER_ENABLED
             // We are stuck waiting for another script. Lets check the source that
             // was just document.write()n for anything to load.
-            PreloadScanner documentWritePreloadScanner(m_doc);
+            LegacyPreloadScanner documentWritePreloadScanner(m_doc);
             documentWritePreloadScanner.begin();
             documentWritePreloadScanner.write(prependingSrc);
             documentWritePreloadScanner.end();
index da82333..d7e97fd 100644 (file)
@@ -46,7 +46,7 @@ class HTMLViewSourceDocument;
 class FrameView;
 class LegacyHTMLTreeConstructor;
 class Node;
-class PreloadScanner;
+class LegacyPreloadScanner;
 class ScriptSourceCode;
 
 /**
@@ -437,7 +437,7 @@ private:
     bool m_fragment;
     FragmentScriptingPermission m_scriptingPermission;
 
-    OwnPtr<PreloadScanner> m_preloadScanner;
+    OwnPtr<LegacyPreloadScanner> m_preloadScanner;
 };
 
 void parseLegacyHTMLDocumentFragment(const String&, DocumentFragment*, FragmentScriptingPermission = FragmentScriptingAllowed);
similarity index 96%
rename from WebCore/html/PreloadScanner.cpp
rename to WebCore/html/LegacyPreloadScanner.cpp
index d39092a..c9fda4f 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "config.h"
-#include "PreloadScanner.h"
+#include "LegacyPreloadScanner.h"
 
 #include "AtomicString.h"
 #include "CachedCSSStyleSheet.h"
@@ -65,7 +65,7 @@ namespace WebCore {
     
 using namespace HTMLNames;
     
-PreloadScanner::PreloadScanner(Document* doc)
+LegacyPreloadScanner::LegacyPreloadScanner(Document* doc)
     : m_inProgress(false)
     , m_timeUsed(0)
     , m_bodySeen(false)
@@ -76,7 +76,7 @@ PreloadScanner::PreloadScanner(Document* doc)
 #endif
 }
     
-PreloadScanner::~PreloadScanner()
+LegacyPreloadScanner::~LegacyPreloadScanner()
 {
 #if PRELOAD_DEBUG
     printf("DELETING PRELOAD SCANNER FOR %s\n", m_document->url().string().latin1().data());
@@ -84,20 +84,20 @@ PreloadScanner::~PreloadScanner()
 #endif
 }
     
-void PreloadScanner::begin() 
+void LegacyPreloadScanner::begin() 
 { 
     ASSERT(!m_inProgress); 
     reset(); 
     m_inProgress = true; 
 }
     
-void PreloadScanner::end() 
+void LegacyPreloadScanner::end() 
 { 
     ASSERT(m_inProgress); 
     m_inProgress = false; 
 }
 
-void PreloadScanner::reset()
+void LegacyPreloadScanner::reset()
 {
     m_source.clear();
     
@@ -123,12 +123,12 @@ void PreloadScanner::reset()
     m_cssRuleValue.clear();
 }
     
-bool PreloadScanner::scanningBody() const
+bool LegacyPreloadScanner::scanningBody() const
 {
     return m_document->body() || m_bodySeen;
 }
     
-void PreloadScanner::write(const SegmentedString& source)
+void LegacyPreloadScanner::write(const SegmentedString& source)
 {
 #if PRELOAD_DEBUG
     double startTime = currentTime();
@@ -144,18 +144,18 @@ static inline bool isWhitespace(UChar c)
     return c == ' ' || c == '\n' || c == '\r' || c == '\t';
 }
     
-inline void PreloadScanner::clearLastCharacters()
+inline void LegacyPreloadScanner::clearLastCharacters()
 {
     memset(m_lastCharacters, 0, lastCharactersBufferSize * sizeof(UChar));
 }
     
-inline void PreloadScanner::rememberCharacter(UChar c)
+inline void LegacyPreloadScanner::rememberCharacter(UChar c)
 {
     m_lastCharacterIndex = (m_lastCharacterIndex + 1) % lastCharactersBufferSize;
     m_lastCharacters[m_lastCharacterIndex] = c;
 }
     
-inline bool PreloadScanner::lastCharactersMatch(const char* chars, unsigned count) const
+inline bool LegacyPreloadScanner::lastCharactersMatch(const char* chars, unsigned count) const
 {
     unsigned pos = m_lastCharacterIndex;
     while (count) {
@@ -177,7 +177,7 @@ static inline unsigned legalEntityFor(unsigned value)
     return value;
 }
     
-unsigned PreloadScanner::consumeEntity(SegmentedString& source, bool& notEnoughCharacters)
+unsigned LegacyPreloadScanner::consumeEntity(SegmentedString& source, bool& notEnoughCharacters)
 {
     enum EntityState {
         Initial,
@@ -295,7 +295,7 @@ outOfCharacters:
     return 0;
 }
 
-void PreloadScanner::tokenize(const SegmentedString& source)
+void LegacyPreloadScanner::tokenize(const SegmentedString& source)
 {
     ASSERT(m_inProgress);
     
@@ -688,7 +688,7 @@ void PreloadScanner::tokenize(const SegmentedString& source)
     }
 }
     
-void PreloadScanner::processAttribute()
+void LegacyPreloadScanner::processAttribute()
 {
     AtomicString tag = AtomicString(m_tagName.data(), m_tagName.size());
     AtomicString attribute = AtomicString(m_attributeName.data(), m_attributeName.size());
@@ -711,13 +711,13 @@ void PreloadScanner::processAttribute()
     }
 }
     
-inline void PreloadScanner::emitCharacter(UChar c)
+inline void LegacyPreloadScanner::emitCharacter(UChar c)
 {
     if (m_contentModel == CDATA && m_lastStartTag == styleTag) 
         tokenizeCSS(c);
 }
     
-inline void PreloadScanner::tokenizeCSS(UChar c)
+inline void LegacyPreloadScanner::tokenizeCSS(UChar c)
 {    
     // We are just interested in @import rules, no need for real tokenization here
     // Searching for other types of resources is probably low payoff
@@ -796,7 +796,7 @@ inline void PreloadScanner::tokenizeCSS(UChar c)
     }
 }
     
-void PreloadScanner::emitTag()
+void LegacyPreloadScanner::emitTag()
 {
     if (m_closeTag) {
         m_contentModel = PCDATA;
@@ -840,7 +840,7 @@ void PreloadScanner::emitTag()
     m_linkIsStyleSheet = false;
 }
     
-void PreloadScanner::emitCSSRule()
+void LegacyPreloadScanner::emitCSSRule()
 {
     String rule(m_cssRule.data(), m_cssRule.size());
     if (equalIgnoringCase(rule, "import") && !m_cssRuleValue.isEmpty()) {
similarity index 97%
rename from WebCore/html/PreloadScanner.h
rename to WebCore/html/LegacyPreloadScanner.h
index 6022ee7..54fd801 100644 (file)
@@ -37,10 +37,10 @@ namespace WebCore {
     class CachedResourceClient;
     class Document;
     
-    class PreloadScanner : public Noncopyable {
+    class LegacyPreloadScanner : public Noncopyable {
     public:
-        PreloadScanner(Document*);
-        ~PreloadScanner();
+        LegacyPreloadScanner(Document*);
+        ~LegacyPreloadScanner();
         void begin();
         void write(const SegmentedString&);
         void end();
index b5aba79..33a0951 100644 (file)
@@ -35,7 +35,7 @@
 #include "DOMWindow.h"
 #include "Frame.h"
 #include "KURL.h"
-#include "PreloadScanner.h"
+#include "LegacyPreloadScanner.h"
 #include "ResourceResponseBase.h"
 #include "ScriptSourceCode.h"
 #include "Settings.h"
@@ -277,7 +277,7 @@ String XSSAuditor::decodeHTMLEntities(const String& string, bool leaveUndecodabl
         if (leaveUndecodableEntitiesUntouched)
             sourceShadow = source;
         bool notEnoughCharacters = false;
-        unsigned entity = PreloadScanner::consumeEntity(source, notEnoughCharacters);
+        unsigned entity = LegacyPreloadScanner::consumeEntity(source, notEnoughCharacters);
         // We ignore notEnoughCharacters because we might as well use this loop
         // to copy the remaining characters into |result|.