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

Issue 19675008: Move btoa() / atob() implementation out of DOMWindow (Closed)

Created:
7 years, 5 months ago by do-not-use
Modified:
7 years, 5 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, lgombos
Visibility:
Public.

Description

Move btoa() / atob() implementation out of DOMWindow Move btoa() / atob() implementation out of DOMWindow and move it to a new DOMWindowBase64 namespace. Those functions are now static and can easily be reused by WorkerGlobalScope later on when we want to expose them to workers (as per the specification). Implements statements now generate the same code as partial interfaces, meaning that the functions are expected to be static, in class / namespace of the same name as the supplemental interface. A [LegacyImplementedInBaseClass] extended attribute is introduced to maintain compatibility with existing supplemental interfaces and so that their code can be gradually updated. BUG=261226 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154492

Patch Set 1 #

Total comments: 1

Patch Set 2 : No longer have DOMWindow inherit DOMWindowBase64 #

Patch Set 3 : Renamed extended attribute #

Total comments: 1

Patch Set 4 : Take Kentaro's feedback into consideration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -82 lines) Patch
M Source/bindings/scripts/IDLAttributes.txt View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/scripts/deprecated_code_generator_v8.pm View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/deprecated_generate_bindings.pl View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/core.gypi View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/dom/ChildNode.idl View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M Source/core/dom/ParentNode.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/page/DOMWindow.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/page/DOMWindow.cpp View 2 chunks +0 lines, -33 lines 0 comments Download
A + Source/core/page/DOMWindowBase64.h View 1 2 chunks +11 lines, -14 lines 0 comments Download
A + Source/core/page/DOMWindowBase64.cpp View 1 2 chunks +34 lines, -18 lines 0 comments Download
M Source/core/page/WindowBase64.idl View 1 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/page/WindowTimers.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/svg/SVGExternalResourcesRequired.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/svg/SVGFilterPrimitiveStandardAttributes.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/svg/SVGFitToViewBox.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/svg/SVGTests.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/svg/SVGURIReference.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/svg/SVGZoomAndPan.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/workers/AbstractWorker.idl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
do-not-use
7 years, 5 months ago (2013-07-18 08:15:37 UTC) #1
abarth-chromium
https://codereview.chromium.org/19675008/diff/1/Source/core/page/DOMWindow.h File Source/core/page/DOMWindow.h (right): https://codereview.chromium.org/19675008/diff/1/Source/core/page/DOMWindow.h#newcode91 Source/core/page/DOMWindow.h:91: class DOMWindow : public RefCounted<DOMWindow>, public ScriptWrappable, public EventTarget, ...
7 years, 5 months ago (2013-07-18 08:17:14 UTC) #2
do-not-use
On 2013/07/18 08:17:14, abarth wrote: > https://codereview.chromium.org/19675008/diff/1/Source/core/page/DOMWindow.h > File Source/core/page/DOMWindow.h (right): > > https://codereview.chromium.org/19675008/diff/1/Source/core/page/DOMWindow.h#newcode91 > ...
7 years, 5 months ago (2013-07-18 08:24:54 UTC) #3
haraken
> The spec [1] does not use a partial interface. Instead, it uses IDL implements ...
7 years, 5 months ago (2013-07-18 08:28:02 UTC) #4
do-not-use
On 2013/07/18 08:28:02, haraken wrote: > > The spec [1] does not use a partial ...
7 years, 5 months ago (2013-07-18 08:29:59 UTC) #5
haraken
> > Would it be possible to implement the IDL 'implements' just like how we ...
7 years, 5 months ago (2013-07-18 08:32:14 UTC) #6
do-not-use
On 2013/07/18 08:32:14, haraken wrote: > > > Would it be possible to implement the ...
7 years, 5 months ago (2013-07-18 08:37:46 UTC) #7
do-not-use
I updated the CL as suggested. I introduced a new "Legacy*" extended attribute for supplemental ...
7 years, 5 months ago (2013-07-18 11:31:11 UTC) #8
haraken
LGTM. This looks better. https://codereview.chromium.org/19675008/diff/12001/Source/bindings/scripts/IDLAttributes.txt File Source/bindings/scripts/IDLAttributes.txt (right): https://codereview.chromium.org/19675008/diff/12001/Source/bindings/scripts/IDLAttributes.txt#newcode64 Source/bindings/scripts/IDLAttributes.txt:64: LegacyInDestinationClass Maybe [LegacyImplementedInBaseClass] sounds better. ...
7 years, 5 months ago (2013-07-18 12:55:29 UTC) #9
do-not-use
On 2013/07/18 12:55:29, haraken wrote: > LGTM. This looks better. > > https://codereview.chromium.org/19675008/diff/12001/Source/bindings/scripts/IDLAttributes.txt > File ...
7 years, 5 months ago (2013-07-18 13:01:01 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@sisa.samsung.com/19675008/18001
7 years, 5 months ago (2013-07-18 13:42:02 UTC) #11
commit-bot: I haz the power
Change committed as 154492
7 years, 5 months ago (2013-07-18 15:48:37 UTC) #12
arv (Not doing code reviews)
7 years, 5 months ago (2013-07-18 19:24:32 UTC) #13
Message was sent while issue was closed.
LGTM

Very nice

Powered by Google App Engine
This is Rietveld 408576698