Refactor the srcset parser into its own file
authoryoav@yoav.ws <yoav@yoav.ws@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jun 2014 22:44:26 +0000 (22:44 +0000)
committeryoav@yoav.ws <yoav@yoav.ws@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jun 2014 22:44:26 +0000 (22:44 +0000)
commit66e0583f92d73912fa6c189df76fd97a85d26d1f
tree4e747d2c880b9130cf85b0a7c5602b2fd0ea2e3f
parent0f5efa2eae432c92be16bceccdaaf2b073c0f7df
Refactor the srcset parser into its own file
https://bugs.webkit.org/show_bug.cgi?id=133480

Reviewed by Andreas Kling.

No new tests, since this patch doesn't change the parser's behavior.

This patch moves the srcset parser into its own file,
in order to prepare the code for alignment with recent spec changes.

* CMakeLists.txt:
* html/HTMLImageElement.cpp:
* html/parser/HTMLParserIdioms.cpp:
(WebCore::compareByScaleFactor): Deleted.
(WebCore::parseDescriptors): Deleted.
(WebCore::parseImagesWithScaleFromSrcsetAttribute): Deleted.
(WebCore::bestFitSourceForImageAttributes): Deleted.
* html/parser/HTMLParserIdioms.h:
(WebCore::ImageWithScale::ImageWithScale): Deleted.
(WebCore::ImageWithScale::imageURL): Deleted.
(WebCore::ImageWithScale::scaleFactor): Deleted.
* html/parser/HTMLPreloadScanner.cpp:
* html/parser/HTMLSrcsetParser.cpp: Added.
(WebCore::compareByScaleFactor):
(WebCore::parseDescriptors):
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
(WebCore::bestFitSourceForImageAttributes):
* html/parser/HTMLSrcsetParser.h: Added.
(WebCore::ImageWithScale::ImageWithScale):
(WebCore::ImageWithScale::imageURL):
(WebCore::ImageWithScale::scaleFactor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/parser/HTMLParserIdioms.cpp
Source/WebCore/html/parser/HTMLParserIdioms.h
Source/WebCore/html/parser/HTMLPreloadScanner.cpp
Source/WebCore/html/parser/HTMLSrcsetParser.cpp [new file with mode: 0644]
Source/WebCore/html/parser/HTMLSrcsetParser.h [new file with mode: 0644]