| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "public/web/WebFrameContentDumper.h" | 5 #include "public/web/WebFrameContentDumper.h" |
| 6 | 6 |
| 7 #include "core/editing/EphemeralRange.h" | 7 #include "core/editing/EphemeralRange.h" |
| 8 #include "core/editing/iterators/TextIterator.h" | 8 #include "core/editing/iterators/TextIterator.h" |
| 9 #include "core/editing/serializers/Serialization.h" | 9 #include "core/editing/serializers/Serialization.h" |
| 10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
| 11 #include "core/frame/LocalFrame.h" | 11 #include "core/frame/LocalFrame.h" |
| 12 #include "core/layout/LayoutTreeAsText.h" | 12 #include "core/layout/LayoutTreeAsText.h" |
| 13 #include "core/layout/api/LayoutPartItem.h" | 13 #include "core/layout/api/LayoutPartItem.h" |
| 14 #include "core/layout/api/LayoutViewItem.h" | 14 #include "core/layout/api/LayoutViewItem.h" |
| 15 #include "platform/wtf/text/WTFString.h" |
| 15 #include "public/web/WebDocument.h" | 16 #include "public/web/WebDocument.h" |
| 16 #include "public/web/WebLocalFrame.h" | 17 #include "public/web/WebLocalFrame.h" |
| 17 #include "public/web/WebView.h" | 18 #include "public/web/WebView.h" |
| 18 #include "web/WebLocalFrameImpl.h" | 19 #include "web/WebLocalFrameImpl.h" |
| 19 #include "wtf/text/WTFString.h" | |
| 20 | 20 |
| 21 namespace blink { | 21 namespace blink { |
| 22 | 22 |
| 23 static void frameContentAsPlainText(size_t maxChars, | 23 static void frameContentAsPlainText(size_t maxChars, |
| 24 LocalFrame* frame, | 24 LocalFrame* frame, |
| 25 StringBuilder& output) { | 25 StringBuilder& output) { |
| 26 Document* document = frame->document(); | 26 Document* document = frame->document(); |
| 27 if (!document) | 27 if (!document) |
| 28 return; | 28 return; |
| 29 | 29 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 if (toShow & LayoutAsTextDebug) | 128 if (toShow & LayoutAsTextDebug) |
| 129 behavior |= LayoutAsTextShowCompositedLayers | LayoutAsTextShowAddresses | | 129 behavior |= LayoutAsTextShowCompositedLayers | LayoutAsTextShowAddresses | |
| 130 LayoutAsTextShowIDAndClass | LayoutAsTextShowLayerNesting; | 130 LayoutAsTextShowIDAndClass | LayoutAsTextShowLayerNesting; |
| 131 | 131 |
| 132 if (toShow & LayoutAsTextPrinting) | 132 if (toShow & LayoutAsTextPrinting) |
| 133 behavior |= LayoutAsTextPrintingMode; | 133 behavior |= LayoutAsTextPrintingMode; |
| 134 | 134 |
| 135 return externalRepresentation(toWebLocalFrameImpl(frame)->frame(), behavior); | 135 return externalRepresentation(toWebLocalFrameImpl(frame)->frame(), behavior); |
| 136 } | 136 } |
| 137 } | 137 } |
| OLD | NEW |