+2007-02-19 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin
+
+ - fixed <rdar://problem/4613701> REGRESSION: A line break in the source HTML of a link becomes visible after drag & drop
+
+ * page/DragController.cpp:
+ (WebCore::DragController::startDrag):
+ Call simplifyWhiteSpace() on the proposed link title to match what's displayed on the web page, instead of using the
+ raw source HTML text.
+
2007-02-19 David Hyatt <hyatt@apple.com>
Fix for Radar 4981605, regression where button grows randomly when a select is
doSystemDrag(dragImage, dragLoc, dragOrigin, clipboard, src, false);
} else if (!linkURL.isEmpty() && (m_dragSourceAction & DragSourceActionLink)) {
- if (!clipboard->hasData())
- clipboard->writeURL(linkURL, dragSource.textContent(), src);
+ if (!clipboard->hasData())
+ // Simplify whitespace so the title put on the clipboard resembles what the user sees
+ // on the web page. This includes replacing newlines with spaces.
+ clipboard->writeURL(linkURL, dragSource.textContent().simplifyWhiteSpace(), src);
m_client->willPerformDragSourceAction(DragSourceActionLink, dragOrigin, clipboard);
if (!dragImage) {