Title: [152839] trunk/Source/WebCore
- Revision
- 152839
- Author
- [email protected]
- Date
- 2013-07-18 01:45:19 -0700 (Thu, 18 Jul 2013)
Log Message
willWriteSelectionToPasteboard and willPerformDragSourceAction editing callbacks are not called for drag and drop
https://bugs.webkit.org/show_bug.cgi?id=118828
Reviewed by Gavin Barraclough.
Call these two callbacks when we start a drag and drop.
No new tests for now but we should start logging these callbacks in DRT and WTR's EditorClients.
* page/DragController.cpp:
(WebCore::DragController::startDrag):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (152838 => 152839)
--- trunk/Source/WebCore/ChangeLog 2013-07-18 08:28:55 UTC (rev 152838)
+++ trunk/Source/WebCore/ChangeLog 2013-07-18 08:45:19 UTC (rev 152839)
@@ -1,3 +1,17 @@
+2013-07-18 Ryosuke Niwa <[email protected]>
+
+ willWriteSelectionToPasteboard and willPerformDragSourceAction editing callbacks are not called for drag and drop
+ https://bugs.webkit.org/show_bug.cgi?id=118828
+
+ Reviewed by Gavin Barraclough.
+
+ Call these two callbacks when we start a drag and drop.
+
+ No new tests for now but we should start logging these callbacks in DRT and WTR's EditorClients.
+
+ * page/DragController.cpp:
+ (WebCore::DragController::startDrag):
+
2013-07-18 Santosh Mahto <[email protected]>
ASSERTION FAILED: !listItems().size() || m_activeSelectionAnchorIndex >= 0 in WebCore::HTMLSelectElement::updateListBoxSelection
Modified: trunk/Source/WebCore/page/DragController.cpp (152838 => 152839)
--- trunk/Source/WebCore/page/DragController.cpp 2013-07-18 08:28:55 UTC (rev 152838)
+++ trunk/Source/WebCore/page/DragController.cpp 2013-07-18 08:45:19 UTC (rev 152839)
@@ -790,14 +790,17 @@
Image* image = getImage(element);
if (state.type == DragSourceActionSelection) {
if (!clipboard->hasData()) {
+ RefPtr<Range> selectionRange = src->selection()->toNormalizedRange();
+ ASSERT(selectionRange);
+
+ src->editor().willWriteSelectionToPasteboard(selectionRange.get());
+
if (enclosingTextFormControl(src->selection()->start()))
clipboard->writePlainText(src->editor().selectedTextForClipboard());
- else {
- RefPtr<Range> selectionRange = src->selection()->toNormalizedRange();
- ASSERT(selectionRange);
+ else
+ clipboard->writeRange(selectionRange.get(), src);
- clipboard->writeRange(selectionRange.get(), src);
- }
+ src->editor().didWriteSelectionToPasteboard();
}
m_client->willPerformDragSourceAction(DragSourceActionSelection, dragOrigin, clipboard);
if (!dragImage) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes