Skip to content
Snippets Groups Projects
  1. Sep 22, 2022
  2. Sep 20, 2022
  3. Sep 15, 2022
  4. Sep 14, 2022
  5. Sep 13, 2022
  6. Sep 10, 2022
  7. Sep 09, 2022
  8. Sep 08, 2022
  9. Sep 07, 2022
  10. Sep 06, 2022
  11. Sep 03, 2022
  12. Aug 31, 2022
  13. Aug 30, 2022
  14. Aug 26, 2022
  15. Aug 25, 2022
  16. Aug 24, 2022
  17. Aug 22, 2022
    • Boris Chiou's avatar
      Bug 1694741 - Part 6: Map width/height attributes to the style of img elements. r=emilio · 3897893b
      Boris Chiou authored
      This patch will use the width/height attributes from <source> to override
      width/height/aspect-ratio CSS property values of <img> elements.
      
      So basically, we need to introduce an extra nsMappedAttribtue member in
      HTMLSourceElement (and it only stores width and height attributes).
      And then we use it as an extra declarations (which are generated by
      Gecko_GetExtraContentStyleDeclarations()) so we can override the
      declarations created from presentation attributes of <img>.
      
      Besides, we need to make sure <img> elements get restyled in the
      following cases:
      1. width/height attributes is changed in <source> elements
      2. <source> is inserted as a <picture>'s child
      3. <source> is removed from the child list of <picture>
      4. <img> is inserted as a <picture>'s child
      5. <img> is removed from the child list of <picture>
      
      We make the responsive source synchronously get updated in the previous patch,
      so now we can just restyle the image when updating its responsive source.
      
      Note: We fix the reflection of percentages for width/height attributes in
      the next patch.
      
      Differential Revision: https://phabricator.services.mozilla.com/D152586
      3897893b
  18. Aug 21, 2022
  19. Aug 18, 2022
Loading