Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Unified Diff: content/test/data/browser_plugin_dragging.html

Issue 11088043: browser-plugin: Allow accepting drag-n-drop events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/test/data/browser_plugin_dragging.html
diff --git a/content/test/data/browser_plugin_dragging.html b/content/test/data/browser_plugin_dragging.html
new file mode 100644
index 0000000000000000000000000000000000000000..211d685abd68b75c058b446bb325392a3e3a64f7
--- /dev/null
+++ b/content/test/data/browser_plugin_dragging.html
@@ -0,0 +1,30 @@
+<textarea id='id_message'>
+</textarea>
+
+<object id="plugin"
+ tabindex="0"
dcheng 2012/10/11 20:11:51 Nit: Do we need to explicitly set a tabindex?
sadrul 2012/10/11 20:41:21 I believe tabindex is necessary to be able to tab-
+ type="application/browser-plugin"
+ width="240"
+ height="120"
+ border="0px"
+ style='border: solid 1px red'
dcheng 2012/10/11 20:11:51 Nit: It seems like line 10 cancels out line 9?
sadrul 2012/10/11 20:41:21 Done.
+ contentEditable
+ >
+</object>
+
+<script>
+function dragLocation() {
+ return [id_message.offsetLeft + 10,
+ id_message.offsetTop + 5];
dcheng 2012/10/11 20:11:51 Nit: For uniformity, it'd be nice to use offsetWid
sadrul 2012/10/11 20:41:21 Done.
+}
+
+function dropLocation() {
+ return [plugin.offsetLeft + plugin.offsetWidth / 2,
+ plugin.offsetTop + plugin.offsetHeight / 2];
+}
+
+function SetSrc(src) {
dcheng 2012/10/11 20:11:51 Nit: This inconsistent naming is wonky. I guess th
sadrul 2012/10/11 20:41:21 Indeed. I have kept it as it is for now. But it is
+ plugin = document.getElementById('plugin');
+ plugin.src = src;
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698