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

Unified Diff: third_party/WebKit/Source/core/frame/FrameSerializer.cpp

Issue 2560693002: Disable form elements in MHTML (Closed)
Patch Set: Address feedback Created 4 years 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: third_party/WebKit/Source/core/frame/FrameSerializer.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
index 382e411bdae9c375b44ffd8ad7e21c86fd389f03..d1d4ed2a3f59a2f904531380d21eb45baa4f04af 100644
--- a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
@@ -98,6 +98,9 @@ class SerializerMarkupAccumulator : public MarkupAccumulator {
~SerializerMarkupAccumulator() override;
protected:
+ void appendCustomAttributes(StringBuilder&,
+ const Element&,
+ Namespaces*) override;
void appendText(StringBuilder& out, Text&) override;
bool shouldIgnoreAttribute(const Element&, const Attribute&) override;
void appendElement(StringBuilder& out, Element&, Namespaces*) override;
@@ -139,6 +142,15 @@ SerializerMarkupAccumulator::SerializerMarkupAccumulator(
SerializerMarkupAccumulator::~SerializerMarkupAccumulator() {}
+void SerializerMarkupAccumulator::appendCustomAttributes(
+ StringBuilder& result,
+ const Element& element,
+ Namespaces* namespaces) {
+ Vector<Attribute> attributes = m_delegate.getCustomAttributes(element);
+ for (const auto& attribute : attributes)
+ appendAttribute(result, element, attribute, namespaces);
+}
+
void SerializerMarkupAccumulator::appendText(StringBuilder& result,
Text& text) {
Element* parent = text.parentElement();
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameSerializer.h ('k') | third_party/WebKit/Source/web/WebFrameSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698