Commit 3816ddd3 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Blink loader: Reduce the size of history_item.h

history_item.h is used in 1900+ compilation units, and this CL reduces
estimated pre-processed size of history_item.h from 5.78MB to 2.03MB.

Bug: 242216
Change-Id: I1db28440031fd826349278febd2ffa79af58f1ca
Reviewed-on: https://chromium-review.googlesource.com/1111774Reviewed-by: default avatarKunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569948}
parent 614b2b9b
......@@ -83,6 +83,12 @@ PopStateEvent* PopStateEvent::Create(ScriptState* script_state,
return new PopStateEvent(script_state, type, initializer);
}
void PopStateEvent::SetSerializedState(
scoped_refptr<SerializedScriptValue> state) {
DCHECK(!serialized_state_);
serialized_state_ = std::move(state);
}
const AtomicString& PopStateEvent::InterfaceName() const {
return EventNames::PopStateEvent;
}
......
......@@ -53,10 +53,7 @@ class PopStateEvent final : public Event {
SerializedScriptValue* SerializedState() const {
return serialized_state_.get();
}
void SetSerializedState(scoped_refptr<SerializedScriptValue> state) {
DCHECK(!serialized_state_);
serialized_state_ = std::move(state);
}
void SetSerializedState(scoped_refptr<SerializedScriptValue> state);
History* GetHistory() const { return history_.Get(); }
const AtomicString& InterfaceName() const override;
......
......@@ -11,6 +11,8 @@
namespace blink {
class HTMLVideoElement;
// PictureInPictureController allows to know if Picture-in-Picture is allowed
// for a video element in Blink outside of modules/ module. It
// is an interface that the module will implement and add a provider for.
......
......@@ -16,6 +16,11 @@ namespace blink {
CanvasRenderingContextHost::CanvasRenderingContextHost() = default;
void CanvasRenderingContextHost::PushFrame(scoped_refptr<StaticBitmapImage>,
const SkIRect&) {
NOTIMPLEMENTED();
}
scoped_refptr<StaticBitmapImage>
CanvasRenderingContextHost::CreateTransparentImage(const IntSize& size) const {
if (!IsValidImageSize(size))
......@@ -33,6 +38,11 @@ CanvasRenderingContextHost::CreateTransparentImage(const IntSize& size) const {
return StaticBitmapImage::Create(surface->makeImageSnapshot());
}
void CanvasRenderingContextHost::Commit(scoped_refptr<StaticBitmapImage>,
const SkIRect&) {
NOTIMPLEMENTED();
}
bool CanvasRenderingContextHost::IsPaintable() const {
return (RenderingContext() && RenderingContext()->IsPaintable()) ||
IsValidImageSize(Size());
......
......@@ -37,9 +37,7 @@ class CORE_EXPORT CanvasRenderingContextHost : public CanvasResourceHost,
virtual void FinalizeFrame() = 0;
virtual void PushFrame(scoped_refptr<StaticBitmapImage> image,
const SkIRect& damage_rect) {
NOTIMPLEMENTED();
}
const SkIRect& damage_rect);
virtual bool OriginClean() const = 0;
virtual void SetOriginTainted() = 0;
virtual const IntSize& Size() const = 0;
......@@ -65,9 +63,7 @@ class CORE_EXPORT CanvasRenderingContextHost : public CanvasResourceHost,
virtual bool IsNeutered() const { return false; }
virtual void Commit(scoped_refptr<StaticBitmapImage> bitmap_image,
const SkIRect& damage_rect) {
NOTIMPLEMENTED();
}
const SkIRect& damage_rect);
bool IsPaintable() const;
......
......@@ -4,6 +4,7 @@
#include "third_party/blink/renderer/core/layout/custom/layout_custom.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/layout/custom/custom_layout_fragment.h"
......
......@@ -62,6 +62,7 @@ namespace blink {
class Document;
class DocumentLoader;
class ExecutionContext;
class HTMLFormElement;
class LocalFrame;
class Frame;
......
......@@ -28,6 +28,7 @@
#include <memory>
#include <utility>
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
#include "third_party/blink/renderer/core/html/forms/form_controller.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"
#include "third_party/blink/renderer/platform/network/encoded_form_data.h"
......
......@@ -27,14 +27,9 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_HISTORY_ITEM_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_HISTORY_ITEM_H_
#include "third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom-shared.h"
#include "third_party/blink/public/platform/web_scroll_anchor_data.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/loader/frame_loader_types.h"
#include "third_party/blink/renderer/platform/geometry/float_point.h"
#include "third_party/blink/renderer/platform/geometry/int_point.h"
#include "third_party/blink/renderer/platform/geometry/layout_point.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/scroll/scroll_types.h"
#include "third_party/blink/renderer/platform/weborigin/referrer.h"
......@@ -46,6 +41,11 @@ class DocumentState;
class EncodedFormData;
class KURL;
class ResourceRequest;
class SerializedScriptValue;
namespace mojom {
enum class FetchCacheMode : int32_t;
} // namespace mojom
class CORE_EXPORT HistoryItem final
: public GarbageCollectedFinalized<HistoryItem> {
......
......@@ -5,6 +5,7 @@
#include "third_party/blink/renderer/modules/animationworklet/worklet_animation.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
#include "third_party/blink/renderer/bindings/modules/v8/animation_effect_or_animation_effect_sequence.h"
#include "third_party/blink/renderer/core/animation/element_animations.h"
#include "third_party/blink/renderer/core/animation/keyframe_effect.h"
......
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