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

Unified Diff: Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp

Issue 59693007: Get rid of custom code for HTMLDocument.write() / writeln() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Extend layout test Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp
diff --git a/Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp b/Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp
index 124a4f55d6856e34d45eaf61a98cb2521da4d982..5674fcb35e5856d7d2830e25bd4100be974e753e 100644
--- a/Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp
+++ b/Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp
@@ -46,38 +46,11 @@
#include "wtf/OwnPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/StdLibExtras.h"
-#include "wtf/text/StringBuilder.h"
namespace WebCore {
// HTMLDocument ----------------------------------------------------------------
-// Concatenates "info" to a string. If info is empty, returns empty string.
-// Firefox/Safari/IE support non-standard arguments to document.write, ex:
-// document.write("a", "b", "c") --> document.write("abc")
-// document.write() --> document.write("")
-static String writeHelperGetString(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- StringBuilder builder;
- for (int i = 0; i < info.Length(); ++i) {
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringArgument, info[i], String());
- builder.append(stringArgument);
- }
- return builder.toString();
-}
-
-void V8HTMLDocument::writeMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
- htmlDocument->write(writeHelperGetString(info), activeDOMWindow()->document());
-}
-
-void V8HTMLDocument::writelnMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
- htmlDocument->writeln(writeHelperGetString(info), activeDOMWindow()->document());
-}
-
void V8HTMLDocument::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
« no previous file with comments | « LayoutTests/fast/dom/HTMLDocument/document-write-variadic-expected.txt ('k') | Source/core/html/HTMLDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698