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 com.google.gwt.dom.client.Document; | 7 import com.google.gwt.dom.client.Document; |
8 import com.google.gwt.dom.client.Element; | 8 import com.google.gwt.dom.client.Element; |
9 import com.google.gwt.dom.client.ImageElement; | 9 import com.google.gwt.dom.client.ImageElement; |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 */ | 103 */ |
104 public List<String> getUrlList() { | 104 public List<String> getUrlList() { |
105 if (clonedImg == null) { | 105 if (clonedImg == null) { |
106 cloneAndProcessNode(); | 106 cloneAndProcessNode(); |
107 } | 107 } |
108 List<String> list = new ArrayList<>(); | 108 List<String> list = new ArrayList<>(); |
109 list.add(srcUrl); | 109 list.add(srcUrl); |
110 list.addAll(DomUtil.getSrcSetUrls(clonedImg)); | 110 list.addAll(DomUtil.getSrcSetUrls(clonedImg)); |
111 return list; | 111 return list; |
112 } | 112 } |
| 113 |
| 114 protected ImageElement getProcessedNode() { |
| 115 if (clonedImg == null) { |
| 116 cloneAndProcessNode(); |
| 117 } |
| 118 return clonedImg; |
| 119 } |
113 } | 120 } |
OLD | NEW |