Lofesa commented on issue #1929: Data srcset
URL: 
https://github.com/apache/incubator-pagespeed-mod/pull/1929#issuecomment-527352280
 
 
   In the file `net/instaweb/rewriter/cache_extender.cc` I have duplicated the 
structure that start at line 233
   ```
   if (element->keyword() == HtmlName::kImg &&
         driver()->MayCacheExtendImages()) {
       HtmlElement::Attribute* srcset = 
element->FindAttribute(HtmlName::kSrcset);
       if (srcset != nullptr) {
   ```
   to catch the case attribute is data-srcset.
   
   This maybe simplyfied by:
   
   ```
   if (attribute(i).category == semantic_type::kSrcSetImage &&
          driver()->MayCacheExtendImages()) {
        HtmlElement::Attribute* data_srcset = attribute(i).url;
        SrcSetSlotCollectionPtr slot_collection(
             driver()->GetSrcSetSlotCollection(this, element, data_srcset));
   ```
   and don´t have these duplicated for srcset and data-srcset, but I´m unsure.
   Can some one take a look?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to