OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package org.chromium.distiller.webdocument; | 5 package org.chromium.distiller.webdocument; |
6 | 6 |
7 import org.chromium.distiller.document.TextDocument; | 7 import org.chromium.distiller.document.TextDocument; |
8 import org.chromium.distiller.document.TextBlock; | 8 import org.chromium.distiller.document.TextBlock; |
9 | 9 |
10 import java.util.ArrayList; | 10 import java.util.ArrayList; |
(...skipping 11 matching lines...) Expand all Loading... |
22 } | 22 } |
23 | 23 |
24 public void addText(WebText text) { | 24 public void addText(WebText text) { |
25 elements.add(text); | 25 elements.add(text); |
26 } | 26 } |
27 | 27 |
28 public void addTable(WebTable table) { | 28 public void addTable(WebTable table) { |
29 elements.add(table); | 29 elements.add(table); |
30 } | 30 } |
31 | 31 |
| 32 public void addList(WebTag list) { |
| 33 elements.add(list); |
| 34 } |
| 35 |
32 public void addEmbed(WebElement embed) { | 36 public void addEmbed(WebElement embed) { |
33 elements.add(embed); | 37 elements.add(embed); |
34 } | 38 } |
35 | 39 |
36 public List<WebElement> getElements() { | 40 public List<WebElement> getElements() { |
37 return elements; | 41 return elements; |
38 } | 42 } |
39 | 43 |
40 public List<WebImage> getContentImages() { | 44 public List<WebImage> getContentImages() { |
41 List<WebImage> images = new ArrayList<>(); | 45 List<WebImage> images = new ArrayList<>(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 if (!e.getIsContent()) continue; | 101 if (!e.getIsContent()) continue; |
98 output.append(e.generateOutput(textOnly)); | 102 output.append(e.generateOutput(textOnly)); |
99 if (textOnly) { | 103 if (textOnly) { |
100 // Put some space between paragraphs in text-only mode. | 104 // Put some space between paragraphs in text-only mode. |
101 output.append("\n"); | 105 output.append("\n"); |
102 } | 106 } |
103 } | 107 } |
104 return output.toString(); | 108 return output.toString(); |
105 } | 109 } |
106 } | 110 } |
OLD | NEW |