<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[235229] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/235229">235229</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2018-08-23 10:20:37 -0700 (Thu, 23 Aug 2018)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Attachment Support] Attachment elements don't appear in drag images on macOS
https://bugs.webkit.org/show_bug.cgi?id=188823
<rdar://problem/43616378>

Reviewed by Tim Horton.

Source/WebCore:

Currently, attachment elements don't show up in the drag image snapshot on macOS. This is because only the
"Selection" phase is painted when generating a drag image on macOS, and many replaced renderers (with some
exceptions, such as RenderImage) only paint visible content during the "Foreground" phase. To fix this, we
override RenderAttachment::paintReplaced to paint the attachment in the case where the Selection phase is being
painted.

Tests:  WKAttachmentTestsMac.DragAttachmentAsFilePromise
        WKAttachmentTests.MoveAttachmentElementAsIconByDragging

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::paintReplaced):
* rendering/RenderAttachment.h:
* rendering/RenderThemeMac.mm:
(WebCore::titleTextColorForAttachment):
(WebCore::AttachmentLayout::layOutTitle):

Plumb an AttachmentLayoutStyle (i.e. NonSelected or Selected) to AttachmentLayout, and use this bit when
determining the title text color, as well whether to paint backgrounds for the icon and title.

(WebCore::AttachmentLayout::AttachmentLayout):
(WebCore::RenderThemeMac::attachmentIntrinsicSize const):
(WebCore::RenderThemeMac::attachmentBaseline const):
(WebCore::paintAttachmentIconBackground):
(WebCore::paintAttachmentTitleBackground):

Bail from painting backgrounds if a selected style is used for the attachment.

(WebCore::RenderThemeMac::paintAttachment):

Rather than check the RenderAttachment's selection state when determining whether to paint with a non-selected
or selected style, only use selected style if the RenderAttachment has a selection _and_ the painting phase is
not "Selection". While this sounds extremely counter-intuitive, the "Selection" painting phase refers to
painting the selected foreground content _without_ including any part of the selection highlight.

Tools:

Adjusts a couple of existing tests to additionally verify that the drag image generated when dragging an
attachment element in macOS is not completely transparent.

* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(isCompletelyTransparent):
(TestWebKitAPI::TEST):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderAttachmentcpp">trunk/Source/WebCore/rendering/RenderAttachment.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderAttachmenth">trunk/Source/WebCore/rendering/RenderAttachment.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaWKAttachmentTestsmm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (235228 => 235229)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2018-08-23 17:09:21 UTC (rev 235228)
+++ trunk/Source/WebCore/ChangeLog      2018-08-23 17:20:37 UTC (rev 235229)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2018-08-23  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [Attachment Support] Attachment elements don't appear in drag images on macOS
+        https://bugs.webkit.org/show_bug.cgi?id=188823
+        <rdar://problem/43616378>
+
+        Reviewed by Tim Horton.
+
+        Currently, attachment elements don't show up in the drag image snapshot on macOS. This is because only the
+        "Selection" phase is painted when generating a drag image on macOS, and many replaced renderers (with some
+        exceptions, such as RenderImage) only paint visible content during the "Foreground" phase. To fix this, we
+        override RenderAttachment::paintReplaced to paint the attachment in the case where the Selection phase is being
+        painted.
+
+        Tests:  WKAttachmentTestsMac.DragAttachmentAsFilePromise
+                WKAttachmentTests.MoveAttachmentElementAsIconByDragging
+
+        * rendering/RenderAttachment.cpp:
+        (WebCore::RenderAttachment::paintReplaced):
+        * rendering/RenderAttachment.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::titleTextColorForAttachment):
+        (WebCore::AttachmentLayout::layOutTitle):
+
+        Plumb an AttachmentLayoutStyle (i.e. NonSelected or Selected) to AttachmentLayout, and use this bit when
+        determining the title text color, as well whether to paint backgrounds for the icon and title.
+
+        (WebCore::AttachmentLayout::AttachmentLayout):
+        (WebCore::RenderThemeMac::attachmentIntrinsicSize const):
+        (WebCore::RenderThemeMac::attachmentBaseline const):
+        (WebCore::paintAttachmentIconBackground):
+        (WebCore::paintAttachmentTitleBackground):
+
+        Bail from painting backgrounds if a selected style is used for the attachment.
+
+        (WebCore::RenderThemeMac::paintAttachment):
+
+        Rather than check the RenderAttachment's selection state when determining whether to paint with a non-selected
+        or selected style, only use selected style if the RenderAttachment has a selection _and_ the painting phase is
+        not "Selection". While this sounds extremely counter-intuitive, the "Selection" painting phase refers to
+        painting the selected foreground content _without_ including any part of the selection highlight.
+
</ins><span class="cx"> 2018-08-23  Zalan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [LFC][Floating] Decouple the incoming floats and floats already placed in the list
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderAttachmentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderAttachment.cpp (235228 => 235229)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderAttachment.cpp      2018-08-23 17:09:21 UTC (rev 235228)
+++ trunk/Source/WebCore/rendering/RenderAttachment.cpp 2018-08-23 17:20:37 UTC (rev 235229)
</span><span class="lines">@@ -80,6 +80,18 @@
</span><span class="cx">     return m_shouldDrawBorder;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderAttachment::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& offset)
+{
+    if (paintInfo.phase != PaintPhase::Selection || !hasVisibleBoxDecorations() || !style().hasAppearance())
+        return;
+
+    auto paintRect = borderBoxRect();
+    paintRect.moveBy(offset);
+
+    ControlStates controlStates;
+    theme().paint(*this, controlStates, paintInfo, paintRect);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderAttachmenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderAttachment.h (235228 => 235229)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderAttachment.h        2018-08-23 17:09:21 UTC (rev 235228)
+++ trunk/Source/WebCore/rendering/RenderAttachment.h   2018-08-23 17:20:37 UTC (rev 235229)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx">     const char* renderName() const override { return "RenderAttachment"; }
</span><span class="cx"> 
</span><span class="cx">     bool shouldDrawSelectionTint() const override { return false; }
</span><ins>+    void paintReplaced(PaintInfo&, const LayoutPoint& offset) final;
</ins><span class="cx"> 
</span><span class="cx">     void layout() override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (235228 => 235229)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2018-08-23 17:09:21 UTC (rev 235228)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm    2018-08-23 17:20:37 UTC (rev 235229)
</span><span class="lines">@@ -2544,8 +2544,10 @@
</span><span class="cx"> 
</span><span class="cx"> const CGFloat attachmentMargin = 3;
</span><span class="cx"> 
</span><ins>+enum class AttachmentLayoutStyle : uint8_t { NonSelected, Selected };
+
</ins><span class="cx"> struct AttachmentLayout {
</span><del>-    explicit AttachmentLayout(const RenderAttachment&);
</del><ins>+    explicit AttachmentLayout(const RenderAttachment&, AttachmentLayoutStyle);
</ins><span class="cx"> 
</span><span class="cx">     struct LabelLine {
</span><span class="cx">         FloatRect backgroundRect;
</span><span class="lines">@@ -2560,6 +2562,7 @@
</span><span class="cx">     FloatRect attachmentRect;
</span><span class="cx"> 
</span><span class="cx">     int baseline;
</span><ins>+    AttachmentLayoutStyle style;
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr<CTLineRef> subtitleLine;
</span><span class="cx">     FloatRect subtitleTextRect;
</span><span class="lines">@@ -2571,11 +2574,11 @@
</span><span class="cx">     void addTitleLine(CTLineRef, CGFloat& yOffset, Vector<CGPoint> origins, CFIndex lineIndex, const RenderAttachment&);
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-static Color titleTextColorForAttachment(const RenderAttachment& attachment)
</del><ins>+static Color titleTextColorForAttachment(const RenderAttachment& attachment, AttachmentLayoutStyle style)
</ins><span class="cx"> {
</span><span class="cx">     Color result = Color::black;
</span><span class="cx">     
</span><del>-    if (attachment.selectionState() != RenderObject::SelectionNone) {
</del><ins>+    if (style == AttachmentLayoutStyle::Selected) {
</ins><span class="cx">         if (attachment.frame().selection().isFocusedAndActive())
</span><span class="cx">             result = colorFromNSColor([NSColor alternateSelectedControlTextColor]);
</span><span class="cx">         else
</span><span class="lines">@@ -2631,7 +2634,7 @@
</span><span class="cx"> 
</span><span class="cx">     NSDictionary *textAttributes = @{
</span><span class="cx">         (__bridge id)kCTFontAttributeName: (__bridge id)font.get(),
</span><del>-        (__bridge id)kCTForegroundColorAttributeName: (__bridge NSColor *)cachedCGColor(titleTextColorForAttachment(attachment))
</del><ins>+        (__bridge id)kCTForegroundColorAttributeName: (__bridge NSColor *)cachedCGColor(titleTextColorForAttachment(attachment, style))
</ins><span class="cx">     };
</span><span class="cx">     RetainPtr<NSAttributedString> attributedTitle = adoptNS([[NSAttributedString alloc] initWithString:title attributes:textAttributes]);
</span><span class="cx">     RetainPtr<CTFramesetterRef> titleFramesetter = adoptCF(CTFramesetterCreateWithAttributedString((CFAttributedStringRef)attributedTitle.get()));
</span><span class="lines">@@ -2709,7 +2712,8 @@
</span><span class="cx">     subtitleTextRect = FloatRect(xOffset, yOffset, lineBounds.size.width, lineBounds.size.height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-AttachmentLayout::AttachmentLayout(const RenderAttachment& attachment)
</del><ins>+AttachmentLayout::AttachmentLayout(const RenderAttachment& attachment, AttachmentLayoutStyle layoutStyle)
+    : style(layoutStyle)
</ins><span class="cx"> {
</span><span class="cx">     layOutTitle(attachment);
</span><span class="cx">     layOutSubtitle(attachment);
</span><span class="lines">@@ -2734,18 +2738,21 @@
</span><span class="cx"> 
</span><span class="cx"> LayoutSize RenderThemeMac::attachmentIntrinsicSize(const RenderAttachment& attachment) const
</span><span class="cx"> {
</span><del>-    AttachmentLayout layout(attachment);
</del><ins>+    AttachmentLayout layout(attachment, AttachmentLayoutStyle::NonSelected);
</ins><span class="cx">     return LayoutSize(layout.attachmentRect.size());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int RenderThemeMac::attachmentBaseline(const RenderAttachment& attachment) const
</span><span class="cx"> {
</span><del>-    AttachmentLayout layout(attachment);
</del><ins>+    AttachmentLayout layout(attachment, AttachmentLayoutStyle::NonSelected);
</ins><span class="cx">     return layout.baseline;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void paintAttachmentIconBackground(const RenderAttachment& attachment, GraphicsContext& context, AttachmentLayout& layout)
</span><span class="cx"> {
</span><ins>+    if (layout.style == AttachmentLayoutStyle::NonSelected)
+        return;
+
</ins><span class="cx">     // FIXME: Finder has a discontinuous behavior here when you have a background color other than white,
</span><span class="cx">     // where it switches into 'bordered mode' and the border pops in on top of the background.
</span><span class="cx">     bool paintBorder = true;
</span><span class="lines">@@ -2834,6 +2841,9 @@
</span><span class="cx"> 
</span><span class="cx"> static void paintAttachmentTitleBackground(const RenderAttachment& attachment, GraphicsContext& context, AttachmentLayout& layout)
</span><span class="cx"> {
</span><ins>+    if (layout.style == AttachmentLayoutStyle::NonSelected)
+        return;
+
</ins><span class="cx">     if (layout.lines.isEmpty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -2932,8 +2942,12 @@
</span><span class="cx"> 
</span><span class="cx">     const RenderAttachment& attachment = downcast<RenderAttachment>(renderer);
</span><span class="cx"> 
</span><del>-    AttachmentLayout layout(attachment);
</del><ins>+    auto layoutStyle = AttachmentLayoutStyle::NonSelected;
+    if (attachment.selectionState() != RenderObject::SelectionNone && paintInfo.phase != PaintPhase::Selection)
+        layoutStyle = AttachmentLayoutStyle::Selected;
</ins><span class="cx"> 
</span><ins>+    AttachmentLayout layout(attachment, layoutStyle);
+
</ins><span class="cx">     auto& progressString = attachment.attachmentElement().attributeWithoutSynchronization(progressAttr);
</span><span class="cx">     bool validProgress = false;
</span><span class="cx">     float progress = 0;
</span><span class="lines">@@ -2947,18 +2961,15 @@
</span><span class="cx">     context.translate(toFloatSize(paintRect.location()));
</span><span class="cx">     context.translate(floorSizeToDevicePixels(LayoutSize((paintRect.width() - attachmentIconBackgroundSize) / 2, 0), renderer.document().deviceScaleFactor()));
</span><span class="cx"> 
</span><del>-    bool useSelectedStyle = attachment.selectionState() != RenderObject::SelectionNone;
</del><span class="cx">     bool usePlaceholder = validProgress && !progress;
</span><span class="cx"> 
</span><del>-    if (useSelectedStyle)
-        paintAttachmentIconBackground(attachment, context, layout);
</del><ins>+    paintAttachmentIconBackground(attachment, context, layout);
</ins><span class="cx">     if (usePlaceholder)
</span><span class="cx">         paintAttachmentIconPlaceholder(attachment, context, layout);
</span><span class="cx">     else
</span><span class="cx">         paintAttachmentIcon(attachment, context, layout);
</span><span class="cx"> 
</span><del>-    if (useSelectedStyle)
-        paintAttachmentTitleBackground(attachment, context, layout);
</del><ins>+    paintAttachmentTitleBackground(attachment, context, layout);
</ins><span class="cx">     paintAttachmentTitle(attachment, context, layout);
</span><span class="cx">     paintAttachmentSubtitle(attachment, context, layout);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (235228 => 235229)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2018-08-23 17:09:21 UTC (rev 235228)
+++ trunk/Tools/ChangeLog       2018-08-23 17:20:37 UTC (rev 235229)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2018-08-23  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [Attachment Support] Attachment elements don't appear in drag images on macOS
+        https://bugs.webkit.org/show_bug.cgi?id=188823
+        <rdar://problem/43616378>
+
+        Reviewed by Tim Horton.
+
+        Adjusts a couple of existing tests to additionally verify that the drag image generated when dragging an
+        attachment element in macOS is not completely transparent.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
+        (isCompletelyTransparent):
+        (TestWebKitAPI::TEST):
+
</ins><span class="cx"> 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Explain test name matching in run-api-tests help
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaWKAttachmentTestsmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm (235228 => 235229)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm 2018-08-23 17:09:21 UTC (rev 235228)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm    2018-08-23 17:20:37 UTC (rev 235229)
</span><span class="lines">@@ -394,6 +394,22 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma mark - Platform testing helper functions
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+
+BOOL isCompletelyTransparent(NSImage *image)
+{
+    auto representation = adoptNS([[NSBitmapImageRep alloc] initWithData:image.TIFFRepresentation]);
+    for (int row = 0; row < image.size.height; ++row) {
+        for (int column = 0; column < image.size.width; ++column) {
+            if ([representation colorAtX:column y:row].alphaComponent)
+                return false;
+        }
+    }
+    return true;
+}
+
+#endif
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> 
</span><span class="cx"> typedef void(^ItemProviderDataLoadHandler)(NSData *, NSError *);
</span><span class="lines">@@ -1112,6 +1128,9 @@
</span><span class="cx">     [attachment expectRequestedDataToBe:data.get()];
</span><span class="cx">     EXPECT_WK_STREQ("document.pdf", [webView valueOfAttribute:@"title" forQuerySelector:@"attachment"]);
</span><span class="cx">     EXPECT_WK_STREQ("application/pdf", [webView valueOfAttribute:@"type" forQuerySelector:@"attachment"]);
</span><ins>+#if PLATFORM(MAC)
+    EXPECT_FALSE(isCompletelyTransparent([simulator draggingInfo].draggedImage));
+#endif
</ins><span class="cx"> 
</span><span class="cx">     [webView expectElementTag:@"STRONG" toComeBefore:@"ATTACHMENT"];
</span><span class="cx">     [simulator endDataTransfer];
</span><span class="lines">@@ -1210,6 +1229,7 @@
</span><span class="cx">     NSArray<NSURL *> *urls = [simulator receivePromisedFiles];
</span><span class="cx">     EXPECT_EQ(1U, urls.count);
</span><span class="cx">     EXPECT_TRUE([[NSData dataWithContentsOfURL:urls.firstObject] isEqualToData:testPDFData()]);
</span><ins>+    EXPECT_FALSE(isCompletelyTransparent([simulator draggingInfo].draggedImage));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(MAC)
</span></span></pre>
</div>
</div>

</body>
</html>