WebKit Bugzilla
Attachment 342045 Details for
Bug 186348
: Use the default label for snapshotted plug-ins if no mime-type is available
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186348-20180606153418.patch (text/plain), 2.25 KB, created by
Antoine Quint
on 2018-06-06 06:34:20 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2018-06-06 06:34:20 PDT
Size:
2.25 KB
patch
obsolete
>Subversion Revision: 232537 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5fdeb5e05a8e6c21c7ec451e2e7f1711e8b9f811..7e5d0eeca9b0009df739275d33f3f4a57b25a388 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-06 Antoine Quint <graouts@apple.com> >+ >+ Use the default label for snapshotted plug-ins if no mime-type is available >+ https://bugs.webkit.org/show_bug.cgi?id=186348 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In case the mime-type is not available, use the default labels otherwise we'd crash trying to look up the empty string in the HashMap. >+ >+ * html/HTMLPlugInImageElement.cpp: >+ (WebCore::titleText): >+ (WebCore::subtitleText): >+ > 2018-06-05 Antoine Quint <graouts@apple.com> > > [Web Animations] Only expose CSSAnimation and CSSTransition if the WebAnimationsCSSIntegration runtime flag is enabled >diff --git a/Source/WebCore/html/HTMLPlugInImageElement.cpp b/Source/WebCore/html/HTMLPlugInImageElement.cpp >index 5675eb97b68b7d108613e5cc555d552d29bc895a..136259a5b99746e7704558725de72b385034c7fe 100644 >--- a/Source/WebCore/html/HTMLPlugInImageElement.cpp >+++ b/Source/WebCore/html/HTMLPlugInImageElement.cpp >@@ -72,6 +72,9 @@ static const Seconds removeSnapshotTimerDelay { 1500_ms }; > > static const String titleText(Page& page, const String& mimeType) > { >+ if (mimeType.isEmpty()) >+ return snapshottedPlugInLabelTitle(); >+ > // FIXME: It's not consistent to get a string from the page's chrome client, but then cache it globally. > // If it's global, it should come from elsewhere. If it's per-page then it should be cached per page. > static NeverDestroyed<HashMap<String, String>> mimeTypeToLabelTitleMap; >@@ -85,6 +88,9 @@ static const String titleText(Page& page, const String& mimeType) > > static const String subtitleText(Page& page, const String& mimeType) > { >+ if (mimeType.isEmpty()) >+ return snapshottedPlugInLabelSubtitle(); >+ > // FIXME: It's not consistent to get a string from the page's chrome client, but then cache it globally. > // If it's global, it should come from elsewhere. If it's per-page then it should be cached per page. > static NeverDestroyed<HashMap<String, String>> mimeTypeToLabelSubtitleMap;
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186348
: 342045