Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Issue 18808004: Refactoring: Extract DocumentInit for capture Document construction parameter. (Closed)

Created:
7 years, 5 months ago by Hajime Morrita
Modified:
7 years, 5 months ago
CC:
blink-reviews, eustas+blink_chromium.org, caseq+blink_chromium.org, Nate Chapin, loislo+blink_chromium.org, pfeldman+blink_chromium.org, alph+blink_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, feature-media-reviews_chromium.org, dglazkov+blink, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, adamk+blink_chromium.org, pdr, f(malita), Stephen Chennney, aandrey+blink_chromium.org, gavinp+loader_chromium.org
Visibility:
Public.

Description

Refactoring: Extract DocumentInit for capture Document construction parameter. This change replaces a set of parameters for the Document constructor with DocumentInit class. The motivation here is to pass a HTMLImport to the constructor. In a coming change, passed import object will affect how the security context of the document is decided. For that purpose, DocumentInit encapsulates which Frame is being used to initialize the context. The coming change will extend it so taht HTML Imports can load external scripts. Since DocumentInit has a default constructor, call sites where create empty documents become cleaner. BUG=240592 TEST=none R=abarth@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154278

Patch Set 1 #

Patch Set 2 : Updated to ToT #

Total comments: 2

Patch Set 3 : Renamed DcumentInit #

Patch Set 4 : Fixed webkit_unit_tests build failure. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -133 lines) Patch
M Source/core/animation/DocumentTimelineTest.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/animation/PlayerTest.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/core.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/DOMImplementation.cpp View 1 2 4 chunks +15 lines, -15 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 6 chunks +8 lines, -6 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 9 chunks +18 lines, -16 lines 0 comments Download
A + Source/core/dom/DocumentInit.h View 1 2 1 chunk +26 lines, -19 lines 0 comments Download
A + Source/core/dom/DocumentInit.cpp View 1 2 1 chunk +28 lines, -23 lines 0 comments Download
M Source/core/editing/markup.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLDocument.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/html/HTMLDocument.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLImportsController.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/html/HTMLViewSourceDocument.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/html/HTMLViewSourceDocument.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/ImageDocument.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/html/ImageDocument.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/MediaDocument.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/html/MediaDocument.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/PluginDocument.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/html/PluginDocument.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/TextDocument.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/html/TextDocument.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/inspector/DOMPatchSupport.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/loader/DocumentLoader.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/SinkDocument.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/loader/SinkDocument.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/loader/cache/CachedDocument.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/cache/CachedFont.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGDocument.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/svg/SVGDocument.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/xml/XMLHttpRequest.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/xml/XSLTProcessor.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Hajime Morrita
Could you take a look?
7 years, 5 months ago (2013-07-12 09:06:48 UTC) #1
dglazkov
DocumentInitializer name doesn't fit. The class doesn't initialize the Document, it just holds the state ...
7 years, 5 months ago (2013-07-12 17:41:35 UTC) #2
dglazkov
This patch does things that are strikingly similar to https://codereview.chromium.org/19002005/, but for different reasons. Maybe ...
7 years, 5 months ago (2013-07-12 17:49:38 UTC) #3
dominicc (has gone to gerrit)
On 2013/07/12 17:49:38, Dimitri Glazkov wrote: > This patch does things that are strikingly similar ...
7 years, 5 months ago (2013-07-12 20:47:48 UTC) #4
abarth-chromium
lgtm https://codereview.chromium.org/18808004/diff/3001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/18808004/diff/3001/Source/core/dom/Document.cpp#newcode370 Source/core/dom/Document.cpp:370: Document::Document(const DocumentInitializer& initializer, DocumentClassFlags documentClasses) DocumentInitializer -> DocumentInit ...
7 years, 5 months ago (2013-07-12 23:32:53 UTC) #5
Hajime Morrita
Thanks for the review! On 2013/07/12 23:32:53, abarth wrote: > lgtm > > https://codereview.chromium.org/18808004/diff/3001/Source/core/dom/Document.cpp > ...
7 years, 5 months ago (2013-07-16 02:32:35 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/18808004/14001
7 years, 5 months ago (2013-07-16 02:32:58 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/18808004/21001
7 years, 5 months ago (2013-07-16 05:04:10 UTC) #8
Hajime Morrita
7 years, 5 months ago (2013-07-16 07:45:04 UTC) #9
Message was sent while issue was closed.
Committed patchset #4 manually as r154278 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698