diff --git a/engine/public/web/WebFrame.h b/engine/public/web/WebFrame.h index 4792577aa70..aa9dd9bfca5 100644 --- a/engine/public/web/WebFrame.h +++ b/engine/public/web/WebFrame.h @@ -279,10 +279,6 @@ public: // frame will be separated by an empty line. virtual WebString contentAsText(size_t maxChars) const = 0; - // Returns HTML text for the contents of this frame. This is generated - // from the DOM. - virtual WebString contentAsMarkup() const = 0; - // Returns a text representation of the render tree. This method is used // to support layout tests. virtual WebString renderTreeAsText(RenderAsTextControls toShow = RenderAsTextNormal) const = 0; diff --git a/engine/web/WebLocalFrameImpl.cpp b/engine/web/WebLocalFrameImpl.cpp index b0a31724e4f..78071fddd3e 100644 --- a/engine/web/WebLocalFrameImpl.cpp +++ b/engine/web/WebLocalFrameImpl.cpp @@ -648,13 +648,6 @@ WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const return text.toString(); } -WebString WebLocalFrameImpl::contentAsMarkup() const -{ - if (!frame()) - return WebString(); - return createMarkup(frame()->document()); -} - WebString WebLocalFrameImpl::renderTreeAsText(RenderAsTextControls toShow) const { RenderAsTextBehavior behavior = RenderAsTextBehaviorNormal; diff --git a/engine/web/WebLocalFrameImpl.h b/engine/web/WebLocalFrameImpl.h index 94e0acd2fe8..9dc74c7481f 100644 --- a/engine/web/WebLocalFrameImpl.h +++ b/engine/web/WebLocalFrameImpl.h @@ -121,7 +121,6 @@ public: virtual void setCaretVisible(bool) override; virtual WebString contentAsText(size_t maxChars) const override; - virtual WebString contentAsMarkup() const override; virtual WebString renderTreeAsText(RenderAsTextControls toShow = RenderAsTextNormal) const override; virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const override; diff --git a/framework/dom-serializer.sky b/framework/dom-serializer.sky new file mode 100644 index 00000000000..ac352fffde8 --- /dev/null +++ b/framework/dom-serializer.sky @@ -0,0 +1,74 @@ + diff --git a/tests/parser/html-expected.txt b/tests/parser/html-expected.txt index d050c426dc1..9a58594dfe7 100644 --- a/tests/parser/html-expected.txt +++ b/tests/parser/html-expected.txt @@ -17,6 +17,7 @@ M

N O

P +Q diff --git a/tests/parser/html.sky b/tests/parser/html.sky index 58d455ad358..417b5872312 100644 --- a/tests/parser/html.sky +++ b/tests/parser/html.sky @@ -19,5 +19,6 @@ M

N

O
P
+Q diff --git a/tests/resources/dump-as-markup.sky b/tests/resources/dump-as-markup.sky index 81e849faf85..cebf2d49fbd 100644 --- a/tests/resources/dump-as-markup.sky +++ b/tests/resources/dump-as-markup.sky @@ -1,5 +1,6 @@ + diff --git a/viewer/internals.cc b/viewer/internals.cc index 9e51c9beff5..a4831eeb032 100644 --- a/viewer/internals.cc +++ b/viewer/internals.cc @@ -45,7 +45,6 @@ gin::ObjectTemplateBuilder Internals::GetObjectTemplateBuilder( return Wrappable::GetObjectTemplateBuilder(isolate) .SetMethod("renderTreeAsText", &Internals::RenderTreeAsText) .SetMethod("contentAsText", &Internals::ContentAsText) - .SetMethod("contentAsMarkup", &Internals::ContentAsMarkup) .SetMethod("notifyTestComplete", &Internals::NotifyTestComplete) .SetMethod("connectToService", &Internals::ConnectToService); } @@ -63,12 +62,6 @@ std::string Internals::ContentAsText() { 1024*1024).utf8(); } -std::string Internals::ContentAsMarkup() { - if (!document_view_) - return std::string(); - return document_view_->web_view()->mainFrame()->contentAsMarkup().utf8(); -} - void Internals::NotifyTestComplete(const std::string& test_result) { test_harness_->OnTestComplete(test_result); } diff --git a/viewer/internals.h b/viewer/internals.h index 473892a8d77..19e4653471a 100644 --- a/viewer/internals.h +++ b/viewer/internals.h @@ -29,7 +29,6 @@ class Internals : public gin::Wrappable { std::string RenderTreeAsText(); std::string ContentAsText(); - std::string ContentAsMarkup(); void NotifyTestComplete(const std::string& test_result); mojo::Handle ConnectToService(