New issue
Advanced search Search tips

Issue 860402 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 242216
issue 738794



Sign in to add a comment

Shrink blink::Document

Project Member Reported by tkent@chromium.org, Jul 5

Issue description

blink::Document is unnecessarily large.
It has a lot of things unrelated to "Document" DOM interface.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01a873f30bd40f691f633a3bd9ecbf679b858caa

commit 01a873f30bd40f691f633a3bd9ecbf679b858caa
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Jul 05 10:12:39 2018

Client Hints: Move Document::client_hints_preferences_ to LocalFrame.

Move it in order to reduce the size of document.h.  The size of
document.h is decreased by 8KB, the size of local_frame.h is increased
by 8KB, however document.h is more popular than local_frame.h.
document.h: 2,600+ compilation units
local_frame.h: 1,900+ compilation units

This CL doesn't change any behavior. client_hints_preferences_ is
updated only if the Document is associated to a LocalFrame.

Bug: 860402
Change-Id: I3cfc51f06caa577bd84f4b3d1da0453011e87797
Reviewed-on: https://chromium-review.googlesource.com/1126743
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Cr-Commit-Position: refs/heads/master@{#572748}
[modify] https://crrev.com/01a873f30bd40f691f633a3bd9ecbf679b858caa/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/01a873f30bd40f691f633a3bd9ecbf679b858caa/third_party/blink/renderer/core/frame/local_frame.h
[modify] https://crrev.com/01a873f30bd40f691f633a3bd9ecbf679b858caa/third_party/blink/renderer/core/loader/document_loader.cc
[modify] https://crrev.com/01a873f30bd40f691f633a3bd9ecbf679b858caa/third_party/blink/renderer/core/loader/frame_fetch_context.cc
[modify] https://crrev.com/01a873f30bd40f691f633a3bd9ecbf679b858caa/third_party/blink/renderer/core/loader/frame_fetch_context.h
[modify] https://crrev.com/01a873f30bd40f691f633a3bd9ecbf679b858caa/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc
[modify] https://crrev.com/01a873f30bd40f691f633a3bd9ecbf679b858caa/third_party/blink/renderer/core/loader/http_equiv.cc
[modify] https://crrev.com/01a873f30bd40f691f633a3bd9ecbf679b858caa/third_party/blink/renderer/core/loader/image_loader.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9485eecb69591e5f4cdeda769d52f3d5ec003758

commit 9485eecb69591e5f4cdeda769d52f3d5ec003758
Author: Kent Tamura <tkent@chromium.org>
Date: Mon Jul 09 04:13:07 2018

Introduce blink::ViewportData to store viewport-related stuff in blink::Document.

This reduces the pre-processed size of document.h by 856KB.

Bug: 242216, 860402
Change-Id: Ib5302d881190394db8a22e4dc40b508deb0957fe
Reviewed-on: https://chromium-review.googlesource.com/1126746
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573213}
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/css/resolver/viewport_style_resolver.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/css/style_engine_test.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/dom/document_test.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/exported/web_frame_test.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/frame/BUILD.gn
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/frame/local_dom_window.cc
[add] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/frame/viewport_data.cc
[add] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/frame/viewport_data.h
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/html/html_meta_element.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/html/html_meta_element_test.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/layout/text_autosizer.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/core/page/page.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/modules/media_controls/media_controls_display_cutout_delegate.cc
[modify] https://crrev.com/9485eecb69591e5f4cdeda769d52f3d5ec003758/third_party/blink/renderer/modules/media_controls/media_controls_display_cutout_delegate_test.cc

Sign in to add a comment