| 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 5eab834745b2b2889cd32e42e3d89dadf551d2e1..e474669c70fe3935b7921d00b1bede6bf3404eaa 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
|
| @@ -79,15 +79,6 @@ const int32_t maxSerializationTimeUmaMicroseconds = 10 * secondsToMicroseconds;
|
|
|
| namespace blink {
|
|
|
| -static bool shouldIgnoreElement(const Element& element) {
|
| - if (isHTMLScriptElement(element))
|
| - return true;
|
| - if (isHTMLNoScriptElement(element))
|
| - return true;
|
| - return isHTMLMetaElement(element) &&
|
| - toHTMLMetaElement(element).computeEncoding().isValid();
|
| -}
|
| -
|
| class SerializerMarkupAccumulator : public MarkupAccumulator {
|
| STACK_ALLOCATED();
|
|
|
| @@ -112,6 +103,7 @@ class SerializerMarkupAccumulator : public MarkupAccumulator {
|
| void appendEndTag(const Element&) override;
|
|
|
| private:
|
| + bool shouldIgnoreElement(const Element&) const;
|
| void appendAttributeValue(StringBuilder& out, const String& attributeValue);
|
| void appendRewrittenAttribute(StringBuilder& out,
|
| const Element&,
|
| @@ -231,6 +223,19 @@ void SerializerMarkupAccumulator::appendEndTag(const Element& element) {
|
| MarkupAccumulator::appendEndTag(element);
|
| }
|
|
|
| +bool SerializerMarkupAccumulator::shouldIgnoreElement(
|
| + const Element& element) const {
|
| + if (isHTMLScriptElement(element))
|
| + return true;
|
| + if (isHTMLNoScriptElement(element))
|
| + return true;
|
| + if (isHTMLMetaElement(element) &&
|
| + toHTMLMetaElement(element).computeEncoding().isValid()) {
|
| + return true;
|
| + }
|
| + return m_delegate.shouldIgnoreElement(element);
|
| +}
|
| +
|
| void SerializerMarkupAccumulator::appendAttributeValue(
|
| StringBuilder& out,
|
| const String& attributeValue) {
|
|
|