Advertisement
Guest User

Untitled

a guest
Jun 4th, 2017
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.72 KB | None | 0 0
  1. commit 07fd4c8c82f2b11b1df145d58a343e6f25ca330a
  2. Author: Xan Lopez <xlopez@igalia.com>
  3. Date: Mon Jul 12 12:41:18 2010 +0200
  4.  
  5. WebCore:
  6.  
  7. 2010-07-12 Xan Lopez <xlopez@igalia.com>
  8.  
  9. Reviewed by NOBODY (OOPS!).
  10.  
  11. Fix compilation with sealed GTK+.
  12.  
  13. * platform/gtk/GtkVersioning.h:
  14. * platform/gtk/PasteboardHelper.cpp:
  15. (WebCore::PasteboardHelper::fillDataObjectFromDropData):
  16.  
  17. WebKit/gtk:
  18.  
  19. 2010-07-12 Xan Lopez <xlopez@igalia.com>
  20.  
  21. Reviewed by NOBODY (OOPS!).
  22.  
  23. Fix compilation with sealed GTK+.
  24.  
  25. * webkit/webkitwebview.cpp:
  26. (webkit_web_view_drag_motion):
  27. (webkit_web_view_drag_data_received):
  28. (webkit_web_view_drag_drop):
  29.  
  30. diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
  31. index c97d274..70abbe7 100644
  32. --- a/WebCore/ChangeLog
  33. +++ b/WebCore/ChangeLog
  34. @@ -1,3 +1,13 @@
  35. +2010-07-12 Xan Lopez <xlopez@igalia.com>
  36. +
  37. + Reviewed by NOBODY (OOPS!).
  38. +
  39. + Fix compilation with sealed GTK+.
  40. +
  41. + * platform/gtk/GtkVersioning.h:
  42. + * platform/gtk/PasteboardHelper.cpp:
  43. + (WebCore::PasteboardHelper::fillDataObjectFromDropData):
  44. +
  45. 2010-07-12 Pavel Feldman <pfeldman@chromium.org>
  46.  
  47. Not reviewed. Chromium tests fix.
  48. diff --git a/WebCore/platform/gtk/GtkVersioning.h b/WebCore/platform/gtk/GtkVersioning.h
  49. index 885d69f..ebb1645 100644
  50. --- a/WebCore/platform/gtk/GtkVersioning.h
  51. +++ b/WebCore/platform/gtk/GtkVersioning.h
  52. @@ -27,6 +27,7 @@
  53. #define gdk_visual_get_depth(visual) (visual)->depth
  54. #define gdk_visual_get_bits_per_rgb(visual) (visual)->bits_per_rgb
  55. #define gdk_drag_context_get_selected_action(context) (context)->action
  56. +#define gdk_drag_context_get_actions(context) (context)->actions
  57. #endif // GTK_CHECK_VERSION(2, 21, 2)
  58.  
  59. #if !GTK_CHECK_VERSION(2, 20, 0)
  60. @@ -55,6 +56,7 @@
  61. #define gtk_dialog_get_action_area(dialog) (dialog)->action_area
  62. #define gtk_selection_data_get_length(data) (data)->length
  63. #define gtk_selection_data_get_data(data) (data)->data
  64. +#define gtk_selection_data_get_target(data) (data)->target
  65. #define gtk_adjustment_set_page_size(adj, value) (adj)->page_size = value
  66. #endif // GTK_CHECK_VERSION(2, 14, 0)
  67.  
  68. diff --git a/WebCore/platform/gtk/PasteboardHelper.cpp b/WebCore/platform/gtk/PasteboardHelper.cpp
  69. index 61447f0..111fb4e 100644
  70. --- a/WebCore/platform/gtk/PasteboardHelper.cpp
  71. +++ b/WebCore/platform/gtk/PasteboardHelper.cpp
  72. @@ -200,14 +200,15 @@ GtkTargetList* PasteboardHelper::targetListForDataObject(DataObjectGtk* dataObje
  73.  
  74. void PasteboardHelper::fillDataObjectFromDropData(GtkSelectionData* data, guint info, DataObjectGtk* dataObject)
  75. {
  76. - if (!data->data)
  77. + if (!gtk_selection_data_get_data(data))
  78. return;
  79.  
  80. - if (data->target == textPlainAtom)
  81. + GdkAtom target = gtk_selection_data_get_target(data);
  82. + if (target == textPlainAtom)
  83. dataObject->setText(selectionDataToUTF8String(data));
  84. - else if (data->target == markupAtom)
  85. + else if (target == markupAtom)
  86. dataObject->setMarkup(selectionDataToUTF8String(data));
  87. - else if (data->target == uriListAtom) {
  88. + else if (target == uriListAtom) {
  89. gchar** uris = gtk_selection_data_get_uris(data);
  90. if (!uris)
  91. return;
  92. @@ -215,7 +216,7 @@ void PasteboardHelper::fillDataObjectFromDropData(GtkSelectionData* data, guint
  93. Vector<KURL> uriList(urisToKURLVector(uris));
  94. dataObject->setURIList(uriList);
  95. g_strfreev(uris);
  96. - } else if (data->target == netscapeURLAtom) {
  97. + } else if (target == netscapeURLAtom) {
  98. String urlWithLabel(selectionDataToUTF8String(data));
  99.  
  100. Vector<String> pieces;
  101. diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
  102. index 140ac3e..68fa460 100644
  103. --- a/WebKit/gtk/ChangeLog
  104. +++ b/WebKit/gtk/ChangeLog
  105. @@ -1,3 +1,14 @@
  106. +2010-07-12 Xan Lopez <xlopez@igalia.com>
  107. +
  108. + Reviewed by NOBODY (OOPS!).
  109. +
  110. + Fix compilation with sealed GTK+.
  111. +
  112. + * webkit/webkitwebview.cpp:
  113. + (webkit_web_view_drag_motion):
  114. + (webkit_web_view_drag_data_received):
  115. + (webkit_web_view_drag_drop):
  116. +
  117. 2010-07-11 Martin Robinson <mrobinson@igalia.com>
  118.  
  119. Reviewed by Xan Lopez.
  120. diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
  121. index 071532f..0010a77 100644
  122. --- a/WebKit/gtk/webkit/webkitwebview.cpp
  123. +++ b/WebKit/gtk/webkit/webkitwebview.cpp
  124. @@ -1447,7 +1447,7 @@ static gboolean webkit_web_view_drag_motion(GtkWidget* widget, GdkDragContext* c
  125. if (droppingContext->pendingDataRequests > 0)
  126. return TRUE;
  127.  
  128. - DragData dragData(droppingContext->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(widget), position), gdkDragActionToDragOperation(context->actions));
  129. + DragData dragData(droppingContext->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(widget), position), gdkDragActionToDragOperation(gdk_drag_context_get_actions(context)));
  130. DragOperation operation = core(webView)->dragController()->dragUpdated(&dragData);
  131. gdk_drag_status(context, dragOperationToSingleGdkDragAction(operation), time);
  132.  
  133. @@ -1474,7 +1474,7 @@ static void webkit_web_view_drag_data_received(GtkWidget* widget, GdkDragContext
  134. const IntPoint& position = droppingContext->lastMotionPosition;
  135.  
  136. // If there are no more pending requests, start sending dragging data to WebCore.
  137. - DragData dragData(droppingContext->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(widget), position), gdkDragActionToDragOperation(context->actions));
  138. + DragData dragData(droppingContext->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(widget), position), gdkDragActionToDragOperation(gdk_drag_context_get_actions(context)));
  139. DragOperation operation = core(webView)->dragController()->dragEntered(&dragData);
  140. gdk_drag_status(context, dragOperationToSingleGdkDragAction(operation), time);
  141. }
  142. @@ -1491,7 +1491,7 @@ static gboolean webkit_web_view_drag_drop(GtkWidget* widget, GdkDragContext* con
  143. droppingContext->dropHappened = true;
  144.  
  145. IntPoint position(x, y);
  146. - DragData dragData(droppingContext->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(widget), position), gdkDragActionToDragOperation(context->actions));
  147. + DragData dragData(droppingContext->dataObject.get(), position, globalPointForClientPoint(gtk_widget_get_window(widget), position), gdkDragActionToDragOperation(gdk_drag_context_get_actions(context)));
  148. core(webView)->dragController()->performDrag(&dragData);
  149.  
  150. gtk_drag_finish(context, TRUE, FALSE, time);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement