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 08:03:58 UTC

[GitHub] [incubator-pagespeed-mod] oschaaf commented on a change in pull request #1899: data-srcset in img and amp-img

oschaaf 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_r294176409
 
 

 ##########
 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:
   @Lofesa tiny nit on formatting here. I'd love to help you with an easier flow to edit these files; for example vscode makes it easier to use git, and also is able to automatically fix formatting issues for you. Please ping me on Slack if you want me to help you get set with that.

----------------------------------------------------------------
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