You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2019/06/17 14:39:37 UTC
[GitHub] [incubator-pagespeed-mod] Lofesa commented on a change in pull
request #1899: data-srcset in img and amp-img
Lofesa commented on a change in pull request #1899: data-srcset in img and amp-img
URL: https://github.com/apache/incubator-pagespeed-mod/pull/1899#discussion_r294331680
##########
File path: net/instaweb/rewriter/image_rewrite_filter.cc
##########
@@ -2136,13 +2136,18 @@ void ImageRewriteFilter::StartElementImpl(HtmlElement* element) {
}
BeginRewriteImageUrl(element, attributes[i].url);
- }
-
- if (element->keyword() == HtmlName::kImg) {
+
+
HtmlElement::Attribute* srcset = element->FindAttribute(HtmlName::kSrcset);
+ HtmlElement::Attribute* datasrcset = element->FindAttribute(HtmlName::kDataSrcset);
if (srcset != nullptr) {
BeginRewriteSrcSet(element, srcset);
}
+ if (datasrcset != nullptr) {
Review comment:
Changed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services