Title: [231716] trunk/Source/WebCore
- Revision
- 231716
- Author
- [email protected]
- Date
- 2018-05-11 13:18:27 -0700 (Fri, 11 May 2018)
Log Message
System preview badge doesn't show on <picture> elements
https://bugs.webkit.org/show_bug.cgi?id=185559
<rdar://problem/40150066>
Reviewed by Tim Horton.
We should also identify <img>s that are the child of a <picture>
contained inside the appropriate <a> element.
Tested internally, since the badge is platform specific.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::isSystemPreviewImage const): Add logic
to look for <picture> parents.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (231715 => 231716)
--- trunk/Source/WebCore/ChangeLog 2018-05-11 20:15:08 UTC (rev 231715)
+++ trunk/Source/WebCore/ChangeLog 2018-05-11 20:18:27 UTC (rev 231716)
@@ -1,3 +1,20 @@
+2018-05-11 Dean Jackson <[email protected]>
+
+ System preview badge doesn't show on <picture> elements
+ https://bugs.webkit.org/show_bug.cgi?id=185559
+ <rdar://problem/40150066>
+
+ Reviewed by Tim Horton.
+
+ We should also identify <img>s that are the child of a <picture>
+ contained inside the appropriate <a> element.
+
+ Tested internally, since the badge is platform specific.
+
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::isSystemPreviewImage const): Add logic
+ to look for <picture> parents.
+
2018-05-11 Chris Dumez <[email protected]>
REGRESSION (async policy delegate): Revoking an object URL immediately after triggering download breaks file download
Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (231715 => 231716)
--- trunk/Source/WebCore/html/HTMLImageElement.cpp 2018-05-11 20:15:08 UTC (rev 231715)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp 2018-05-11 20:18:27 UTC (rev 231716)
@@ -687,9 +687,11 @@
bool HTMLImageElement::isSystemPreviewImage() const
{
const auto* parent = parentElement();
- if (!is<HTMLAnchorElement>(parent))
- return false;
- return downcast<HTMLAnchorElement>(parent)->isSystemPreviewLink();
+ if (is<HTMLAnchorElement>(parent))
+ return downcast<HTMLAnchorElement>(parent)->isSystemPreviewLink();
+ if (is<HTMLPictureElement>(parent))
+ return downcast<HTMLPictureElement>(parent)->isSystemPreviewImage();
+ return false;
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes