WebKit Bugzilla
Attachment 340215 Details for
Bug 185559
: System preview badge doesn't show on <picture> elements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185559-20180512061436.patch (text/plain), 1.80 KB, created by
Dean Jackson
on 2018-05-11 13:14:38 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dean Jackson
Created:
2018-05-11 13:14:38 PDT
Size:
1.80 KB
patch
obsolete
>Subversion Revision: 231578 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 848bf0e781425f934464871be8202fecc5df7d75..84e59f6753be38ff7fbdf8030019d5d25d36fc0c 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-05-11 Dean Jackson <dino@apple.com> >+ >+ System preview badge doesn't show on <picture> elements >+ https://bugs.webkit.org/show_bug.cgi?id=185559 >+ <rdar://problem/40150066> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-09 Tim Horton <timothy_horton@apple.com> > > Fix the build by ignoring some deprecation warnings >diff --git a/Source/WebCore/html/HTMLImageElement.cpp b/Source/WebCore/html/HTMLImageElement.cpp >index 92e892e613b58c8d324872adbdc1debc068c9094..4aa579e1091c2486dd50dccce931f0a65fd56af5 100644 >--- a/Source/WebCore/html/HTMLImageElement.cpp >+++ b/Source/WebCore/html/HTMLImageElement.cpp >@@ -687,9 +687,11 @@ bool HTMLImageElement::willRespondToMouseClickEvents() > 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 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
thorton
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185559
: 340215