Commit 5caa62b5 authored by Hiroki Nakagawa's avatar Hiroki Nakagawa Committed by Commit Bot

Loader: Move text_resource_decoder_builder.{cc,h} from core/loader/ to core/html/parser/

For code cleanup, this CL moves text_resource_decoder_builder.{cc,h}
from core/loader/ to core/html/parser/.

The files define BuildTextResourceDecoderFor() to generate
TextResourceDecoder, but the decoder is implemented in
core/html/parser/. Also, the files don't depend on files
core/loader/. Based on them, core/html/parser/ would be a better place
to put those files.

Bug: n/a
Change-Id: Ib31c23fc8750b6a57d94fa281342e371c146071d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2228010Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774496}
parent ce7a0fc4
...@@ -1301,7 +1301,6 @@ jumbo_source_set("unit_tests") { ...@@ -1301,7 +1301,6 @@ jumbo_source_set("unit_tests") {
"loader/resource/mock_image_resource_observer.h", "loader/resource/mock_image_resource_observer.h",
"loader/resource/multipart_image_resource_parser_test.cc", "loader/resource/multipart_image_resource_parser_test.cc",
"loader/resource_load_observer_for_frame_test.cc", "loader/resource_load_observer_for_frame_test.cc",
"loader/text_resource_decoder_builder_test.cc",
"loader/threadable_loader_test.cc", "loader/threadable_loader_test.cc",
"loader/threaded_icon_loader_test.cc", "loader/threaded_icon_loader_test.cc",
"loader/web_associated_url_loader_impl_test.cc", "loader/web_associated_url_loader_impl_test.cc",
......
...@@ -216,6 +216,7 @@ ...@@ -216,6 +216,7 @@
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h" #include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/core/html/parser/nesting_level_incrementer.h" #include "third_party/blink/renderer/core/html/parser/nesting_level_incrementer.h"
#include "third_party/blink/renderer/core/html/parser/text_resource_decoder.h" #include "third_party/blink/renderer/core/html/parser/text_resource_decoder.h"
#include "third_party/blink/renderer/core/html/parser/text_resource_decoder_builder.h"
#include "third_party/blink/renderer/core/html/plugin_document.h" #include "third_party/blink/renderer/core/html/plugin_document.h"
#include "third_party/blink/renderer/core/html/portal/document_portals.h" #include "third_party/blink/renderer/core/html/portal/document_portals.h"
#include "third_party/blink/renderer/core/html/portal/portal_contents.h" #include "third_party/blink/renderer/core/html/portal/portal_contents.h"
...@@ -246,7 +247,6 @@ ...@@ -246,7 +247,6 @@
#include "third_party/blink/renderer/core/loader/interactive_detector.h" #include "third_party/blink/renderer/core/loader/interactive_detector.h"
#include "third_party/blink/renderer/core/loader/prerenderer_client.h" #include "third_party/blink/renderer/core/loader/prerenderer_client.h"
#include "third_party/blink/renderer/core/loader/progress_tracker.h" #include "third_party/blink/renderer/core/loader/progress_tracker.h"
#include "third_party/blink/renderer/core/loader/text_resource_decoder_builder.h"
#include "third_party/blink/renderer/core/mathml/mathml_element.h" #include "third_party/blink/renderer/core/mathml/mathml_element.h"
#include "third_party/blink/renderer/core/mathml/mathml_row_element.h" #include "third_party/blink/renderer/core/mathml/mathml_row_element.h"
#include "third_party/blink/renderer/core/mathml_element_factory.h" #include "third_party/blink/renderer/core/mathml_element_factory.h"
......
...@@ -695,6 +695,7 @@ blink_core_tests("unit_tests") { ...@@ -695,6 +695,7 @@ blink_core_tests("unit_tests") {
"parser/html_tokenizer_test.cc", "parser/html_tokenizer_test.cc",
"parser/html_tree_builder_simulator_test.cc", "parser/html_tree_builder_simulator_test.cc",
"parser/html_view_source_parser_test.cc", "parser/html_view_source_parser_test.cc",
"parser/text_resource_decoder_builder_test.cc",
"parser/text_resource_decoder_test.cc", "parser/text_resource_decoder_test.cc",
"portal/html_portal_element_test.cc", "portal/html_portal_element_test.cc",
"shadow/progress_shadow_element_test.cc", "shadow/progress_shadow_element_test.cc",
......
...@@ -74,6 +74,8 @@ blink_core_sources("parser") { ...@@ -74,6 +74,8 @@ blink_core_sources("parser") {
"text_document_parser.h", "text_document_parser.h",
"text_resource_decoder.cc", "text_resource_decoder.cc",
"text_resource_decoder.h", "text_resource_decoder.h",
"text_resource_decoder_builder.cc",
"text_resource_decoder_builder.h",
] ]
# Optimizing the HTML parser for speed yields significant gains in performance # Optimizing the HTML parser for speed yields significant gains in performance
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/html/html_document.h" #include "third_party/blink/renderer/core/html/html_document.h"
#include "third_party/blink/renderer/core/html/parser/text_resource_decoder.h" #include "third_party/blink/renderer/core/html/parser/text_resource_decoder.h"
#include "third_party/blink/renderer/core/html/parser/text_resource_decoder_builder.h"
#include "third_party/blink/renderer/core/loader/prerenderer_client.h" #include "third_party/blink/renderer/core/loader/prerenderer_client.h"
#include "third_party/blink/renderer/core/loader/text_resource_decoder_builder.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h" #include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/platform/heap/heap.h" #include "third_party/blink/renderer/platform/heap/heap.h"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "third_party/blink/renderer/core/loader/text_resource_decoder_builder.h" #include "third_party/blink/renderer/core/html/parser/text_resource_decoder_builder.h"
#include <memory> #include <memory>
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_TEXT_RESOURCE_DECODER_BUILDER_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_PARSER_TEXT_RESOURCE_DECODER_BUILDER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_TEXT_RESOURCE_DECODER_BUILDER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_PARSER_TEXT_RESOURCE_DECODER_BUILDER_H_
#include <memory> #include <memory>
#include "third_party/blink/renderer/core/html/parser/text_resource_decoder.h" #include "third_party/blink/renderer/core/html/parser/text_resource_decoder.h"
...@@ -46,4 +46,4 @@ CORE_EXPORT std::unique_ptr<TextResourceDecoder> BuildTextResourceDecoderFor( ...@@ -46,4 +46,4 @@ CORE_EXPORT std::unique_ptr<TextResourceDecoder> BuildTextResourceDecoderFor(
} // namespace blink } // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_TEXT_RESOURCE_DECODER_BUILDER_H_ #endif // THIRD_PARTY_BLINK_RENDERER_CORE_HTML_PARSER_TEXT_RESOURCE_DECODER_BUILDER_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "third_party/blink/renderer/core/loader/text_resource_decoder_builder.h" #include "third_party/blink/renderer/core/html/parser/text_resource_decoder_builder.h"
#include <memory> #include <memory>
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
......
...@@ -140,8 +140,6 @@ blink_core_sources("loader") { ...@@ -140,8 +140,6 @@ blink_core_sources("loader") {
"subresource_filter.h", "subresource_filter.h",
"subresource_integrity_helper.cc", "subresource_integrity_helper.cc",
"subresource_integrity_helper.h", "subresource_integrity_helper.h",
"text_resource_decoder_builder.cc",
"text_resource_decoder_builder.h",
"text_track_loader.cc", "text_track_loader.cc",
"text_track_loader.h", "text_track_loader.h",
"threadable_loader.cc", "threadable_loader.cc",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment