diff options
Diffstat (limited to 'README.xwidget')
| -rw-r--r-- | README.xwidget | 426 |
1 files changed, 243 insertions, 183 deletions
diff --git a/README.xwidget b/README.xwidget index 296be30bb6d..cee891931d2 100644 --- a/README.xwidget +++ b/README.xwidget | |||
| @@ -41,7 +41,36 @@ If that didnt work out try the minimal demonstration instead: | |||
| 41 | (load-library "xwidget-test") | 41 | (load-library "xwidget-test") |
| 42 | (xwidget-demo-a-button) | 42 | (xwidget-demo-a-button) |
| 43 | 43 | ||
| 44 | It looks unimpressive, but it's a gtk button inside an Emars buffer! | 44 | It looks unimpressive, but it's a gtk button inside an Emacs buffer! |
| 45 | *** webkit hints | ||
| 46 | If you got webkit working, great! Please note, though, that the | ||
| 47 | current support is far from a full fledged browser. My focus is on | ||
| 48 | delivering a component that can be used to build a full emacs based | ||
| 49 | browser on. Since I implement a browse-url function you can get quite | ||
| 50 | far just by: | ||
| 51 | |||
| 52 | (setq browse-url-browser-function 'xwidget-webkit-browse-url) | ||
| 53 | |||
| 54 | then all Emacs browser interface systems work to a degree. | ||
| 55 | heres stuff I use currenly | ||
| 56 | |||
| 57 | - m-x anything-surfraw interfaces to search engines | ||
| 58 | - C-o in org mode opens links inside org | ||
| 59 | - m-x ffap opens links anywhere in a buffer | ||
| 60 | - m-x gtk-lookup-symbol searches gtk docs | ||
| 61 | - m-x bookmark-jump | ||
| 62 | etc.. | ||
| 63 | |||
| 64 | I'll add more examples as I go along. | ||
| 65 | |||
| 66 | However theres lots of support missing, see TODO list for | ||
| 67 | information. Briefly: | ||
| 68 | - download handling | ||
| 69 | - keyboard field navigation | ||
| 70 | - isearch | ||
| 71 | - history | ||
| 72 | - sites that use flash. I dont really care about this issue so its | ||
| 73 | unlikely to be fixed. Just a heads up. | ||
| 45 | 74 | ||
| 46 | ** Stability | 75 | ** Stability |
| 47 | Beginning with Summer 2011 I am now able to use Xwidget Emacs as my | 76 | Beginning with Summer 2011 I am now able to use Xwidget Emacs as my |
| @@ -173,20 +202,6 @@ socket window is copied efficientlp by means of composition to a | |||
| 173 | number of other windows, that then are plugged into the different | 202 | number of other windows, that then are plugged into the different |
| 174 | Emacs sockets. | 203 | Emacs sockets. |
| 175 | * ToDo:s | 204 | * ToDo:s |
| 176 | ** DONE webkit flashkiller by default | ||
| 177 | CLOSED: [2011-07-19 Tue 14:27] | ||
| 178 | while its possible to support plugins in the webkit xwidget, flash has | ||
| 179 | issues on 64 bit, and slows down emacs to a halt with off screen | ||
| 180 | rendering, and of course is not free software. its in the way for real | ||
| 181 | world usage even if its interesting to watch flash animations inside | ||
| 182 | emacs. which should be achieved with Gnash or other free software | ||
| 183 | instead. | ||
| 184 | |||
| 185 | http://stackoverflow.com/questions/4885513/prevent-flash-in-cocoa-webview | ||
| 186 | |||
| 187 | simply use this api: | ||
| 188 | http://webkitgtk.org/reference/WebKitWebPluginDatabase.html | ||
| 189 | |||
| 190 | ** DONE allow xwidgets to report thoir size | 205 | ** DONE allow xwidgets to report thoir size |
| 191 | CLOSED: [2011-07-19 Tue 14:26] | 206 | CLOSED: [2011-07-19 Tue 14:26] |
| 192 | now we just hard code sizes. but webkit widgets for instance can | 207 | now we just hard code sizes. but webkit widgets for instance can |
| @@ -522,171 +537,6 @@ buffer. how do we catch these errors? | |||
| 522 | so turned out this got solved by using proper lisp objects for | 537 | so turned out this got solved by using proper lisp objects for |
| 523 | xwidgets. yay! | 538 | xwidgets. yay! |
| 524 | 539 | ||
| 525 | |||
| 526 | ** DONE browser xwidget | ||
| 527 | CLOSED: [2011-07-20 Wed 20:05] | ||
| 528 | although embedding a browser is not my primary concern many are | ||
| 529 | interested in this. some suitable browser component needs to be found | ||
| 530 | supporting gtk. | ||
| 531 | |||
| 532 | *** DONE webkit | ||
| 533 | CLOSED: [2011-07-03 Sun 22:13] | ||
| 534 | there is a webkit gtk port. there is no obvious mvc support. | ||
| 535 | http://live.gnome.org/WebKitGtk | ||
| 536 | http://webkitgtk.org/ | ||
| 537 | |||
| 538 | it might be possible to keep a set of webxits in artificial | ||
| 539 | synchronisation by recursive deep copy of the DOM from one webkit to | ||
| 540 | another. This will be error prone at best though. Another way might be | ||
| 541 | to just use bitmap copy of the "live"instance to the "phantom" | ||
| 542 | instances. the problem of transfering the live view remains though. | ||
| 543 | |||
| 544 | export CFLAGS="`pkg-config --cflags webkit-1.0` -DHAVE_WEBKIT -g" | ||
| 545 | export LDFLAGS=`pkg-config --libs webkit-1.0` | ||
| 546 | ./configure | ||
| 547 | make | ||
| 548 | |||
| 549 | **** off screen rendering | ||
| 550 | export CFLAGS="`pkg-config --cflags webkit-1.0` -DHAVE_WEBKIT_OSR -g" | ||
| 551 | export LDFLAGS=`pkg-config --libs webkit-1.0` | ||
| 552 | ./configure | ||
| 553 | make | ||
| 554 | |||
| 555 | works a little bit but i get errors like: | ||
| 556 | |||
| 557 | (emacs:8362): GLib-GObject-WARNING **: invalid cast from `GdkOffscreenWindow' to `GdkDrawableImplX11' | ||
| 558 | |||
| 559 | set a breakpoint in g_log, backtrace seems to indicate | ||
| 560 | webkitViewportAttributesRecompute is the offender. | ||
| 561 | |||
| 562 | maybe try gtk3 variants? | ||
| 563 | |||
| 564 | export CFLAGS="`pkg-config --cflags webkitgtk-3.0 ` -DHAVE_WEBKIT_OSR " | ||
| 565 | export LDFLAGS=`pkg-config --libs webkitgtk-3.0 ` | ||
| 566 | ./configure --with-x-toolkit=gtk3 | ||
| 567 | make | ||
| 568 | |||
| 569 | crash in gtk_window_get_size instead. great. | ||
| 570 | |||
| 571 | http://gtkplus-p3.0.sourcearchive.com/documentation/2.91.5-0ubuntu1/testoffscreenwindow_8c-source.html | ||
| 572 | |||
| 573 | after many atempts, the basic issue remains. for some reason the | ||
| 574 | offscreen widget isnt ok when I want to snapshot it, so i simply get | ||
| 575 | emptiness. the surface is only ok someimes. | ||
| 576 | |||
| 577 | here is a useful debugging snippets: | ||
| 578 | // debugging redraw: | ||
| 579 | // - the bg colors always change, so theres no error in signal handling | ||
| 580 | // - i get this error now and then: | ||
| 581 | //(emacs:7109): GLib-GObject-WARNING **: invalid cast from `GdkOffscreenWindow' to `GdkDrawableImplX11' | ||
| 582 | // seems to happen in webkit actually. see README | ||
| 583 | |||
| 584 | if(0){ //redraw debug hack. helped a lot in fact. use the with alpha painter below also | ||
| 585 | cairo_set_source_rgb(cr, osr_dbg_color, 1.0, 0.2); | ||
| 586 | cairo_rectangle(cr, 0,0, xw->width, xw->height); | ||
| 587 | cairo_fill(cr); | ||
| 588 | osr_dbg_color+=0.1; | ||
| 589 | if(osr_dbg_color>1.0) | ||
| 590 | osr_dbg_color=0.0; | ||
| 591 | |||
| 592 | } | ||
| 593 | |||
| 594 | you need to terminate drawing like this: | ||
| 595 | |||
| 596 | //cairo_set_source_surface (cr, src_pixmap, 0,0); | ||
| 597 | //cairo_set_operator (cr, CAIRO_OPERATOR_OVER); | ||
| 598 | |||
| 599 | //cairo_paint_with_alpha (cr, 1.0); | ||
| 600 | //cairo_paint(cr); | ||
| 601 | |||
| 602 | the snippets change background color on oach redraw. | ||
| 603 | |||
| 604 | **** on-screen rendering to separate window | ||
| 605 | an alternative might be to open a separate window and snapshot it. the | ||
| 606 | idea is that whatever oddness webkit does so that offscreen rendering | ||
| 607 | doesnt work, doesnt happen on-screen. the window could be opened | ||
| 608 | somewhere not in the way. | ||
| 609 | |||
| 610 | *** CANCELLED firefox | ||
| 611 | CLOSED: [2011-07-03 Sun 22:13] | ||
| 612 | http://www-archive.mozilla.org/unix/gtk-embedding.html | ||
| 613 | seems to be severly bitrotted | ||
| 614 | |||
| 615 | heres a newer aproach | ||
| 616 | http://hg.mozilla.org/incubator/embedding/file/29ac0fe51754/gtk/tests/test.cpp | ||
| 617 | |||
| 618 | while webkit clearly has the best traction as an embeddee, the | ||
| 619 | offscreen rendering issues makes it interesting to see what ff brings | ||
| 620 | to the table. turns out webkit has as good offscreen support as anyone. | ||
| 621 | |||
| 622 | |||
| 623 | *** DONE text field support | ||
| 624 | CLOSED: [2011-07-20 Wed 20:05] | ||
| 625 | Emacs captures all keyboard events so text field support isn't super | ||
| 626 | straightforward. | ||
| 627 | |||
| 628 | **** propagate keyboard events | ||
| 629 | I have some old hacks for this and they are not good. | ||
| 630 | **** use the DOM model | ||
| 631 | expose document.activeElement to lisp. This is potentially more | ||
| 632 | interesting than just forwarding keyboard events. | ||
| 633 | |||
| 634 | webkit_web_view_get_dom_document () | ||
| 635 | |||
| 636 | this is hard it seems. an idea might be to hack elisp support for swig | ||
| 637 | to machine generate the bindings. | ||
| 638 | **** DONE inject javascript | ||
| 639 | CLOSED: [2011-07-03 Sun 22:50] | ||
| 640 | webkit_web_view_execute_script () | ||
| 641 | |||
| 642 | this works now: | ||
| 643 | (xwidget-webkit-execute-script 5 "document.activeElement.value='test'") | ||
| 644 | |||
| 645 | so it should be possible to do some interesting stuff. | ||
| 646 | execute-script does however not return anything at the interface level | ||
| 647 | so satisfaction is not total: | ||
| 648 | |||
| 649 | http://markmail.org/message/4yowmdgras73z3x5 | ||
| 650 | |||
| 651 | maybe | ||
| 652 | https://launchpad.net/gnome-seed | ||
| 653 | |||
| 654 | or this funny hack: | ||
| 655 | <jave> im trying to understanh how to interact via javascript to an embedded | ||
| 656 | webkit gtk instance [23:38] | ||
| 657 | <jave> i use webkit_web_view_execute_script() which is nice but doesnt return | ||
| 658 | a value, by design aparently [23:39] | ||
| 659 | <jave> any hints? | ||
| 660 | <lucian> jave: afaik, webkit still doesn't have full gobject bindings [23:48] | ||
| 661 | <lucian> jave: you can hack it up by making the JS modify the title, and read | ||
| 662 | the title from gtk-side | ||
| 663 | <jave> lucian: that was a pretty cool idea! | ||
| 664 | |||
| 665 | |||
| 666 | *** webkit_web_view_load_string () | ||
| 667 | I would like preview of html in a buffer rather than from uri. | ||
| 668 | |||
| 669 | |||
| 670 | |||
| 671 | *** TODO simple xwidget-webkit wrapper | ||
| 672 | so that it could be used for actual browsing :) | ||
| 673 | I dont want to reinvent too many wheels so i'd like to use existing | ||
| 674 | emacs facilities here possible. use bindings similar to w3m(or info) | ||
| 675 | |||
| 676 | - m-x xwidget-webkit starts a session | ||
| 677 | - 'g' goes to a url | ||
| 678 | - use bookmark-jump i suppose. I mostly use org for bookmarks myself | ||
| 679 | - browse-url support so webkit can be the default browser | ||
| 680 | - some way of getting around the quirky keyboard interaction since | ||
| 681 | xwidgets dont receive keyboard events because I hawe no idea how to | ||
| 682 | do that in a sane way | ||
| 683 | |||
| 684 | ... and one can of course go on bikeshedding forever. lets keep it | ||
| 685 | simple and extensible, and compatible with other Emacs packages. | ||
| 686 | |||
| 687 | the really cool ideas would need Emacs DOM integration, which is not | ||
| 688 | easy. | ||
| 689 | |||
| 690 | ** DONE clipping of controllers | 540 | ** DONE clipping of controllers |
| 691 | CLOSED: [2011-07-05 Tue 11:33] | 541 | CLOSED: [2011-07-05 Tue 11:33] |
| 692 | 542 | ||
| @@ -840,7 +690,6 @@ support a chain of redirects, which seems unlikely. the benefit would | |||
| 840 | be that I dont have to spend time optimizing redrawing. | 690 | be that I dont have to spend time optimizing redrawing. |
| 841 | 691 | ||
| 842 | 692 | ||
| 843 | |||
| 844 | ** DONE remove xwidget_views when emacs window is deleted | 693 | ** DONE remove xwidget_views when emacs window is deleted |
| 845 | CLOSED: [2011-07-05 Tue 11:29] | 694 | CLOSED: [2011-07-05 Tue 11:29] |
| 846 | removing xwidget views when an Emacs window closes is not reliable. | 695 | removing xwidget views when an Emacs window closes is not reliable. |
| @@ -852,6 +701,171 @@ removing xwidget views when an Emacs window closes is not reliable. | |||
| 852 | this seems to work | 701 | this seems to work |
| 853 | 702 | ||
| 854 | 703 | ||
| 704 | ** browser xwidget | ||
| 705 | although embedding a browser is not my primary concern many are | ||
| 706 | interested in this. some suitable browser component needs to be found | ||
| 707 | supporting gtk. | ||
| 708 | |||
| 709 | *** DONE webkit | ||
| 710 | CLOSED: [2011-07-03 Sun 22:13] | ||
| 711 | there is a webkit gtk port. there is no obvious mvc support. | ||
| 712 | http://live.gnome.org/WebKitGtk | ||
| 713 | http://webkitgtk.org/ | ||
| 714 | |||
| 715 | it might be possible to keep a set of webxits in artificial | ||
| 716 | synchronisation by recursive deep copy of the DOM from one webkit to | ||
| 717 | another. This will be error prone at best though. Another way might be | ||
| 718 | to just use bitmap copy of the "live"instance to the "phantom" | ||
| 719 | instances. the problem of transfering the live view remains though. | ||
| 720 | |||
| 721 | export CFLAGS="`pkg-config --cflags webkit-1.0` -DHAVE_WEBKIT -g" | ||
| 722 | export LDFLAGS=`pkg-config --libs webkit-1.0` | ||
| 723 | ./configure | ||
| 724 | make | ||
| 725 | |||
| 726 | **** off screen rendering | ||
| 727 | export CFLAGS="`pkg-config --cflags webkit-1.0` -DHAVE_WEBKIT_OSR -g" | ||
| 728 | export LDFLAGS=`pkg-config --libs webkit-1.0` | ||
| 729 | ./configure | ||
| 730 | make | ||
| 731 | |||
| 732 | works a little bit but i get errors like: | ||
| 733 | |||
| 734 | (emacs:8362): GLib-GObject-WARNING **: invalid cast from `GdkOffscreenWindow' to `GdkDrawableImplX11' | ||
| 735 | |||
| 736 | set a breakpoint in g_log, backtrace seems to indicate | ||
| 737 | webkitViewportAttributesRecompute is the offender. | ||
| 738 | |||
| 739 | maybe try gtk3 variants? | ||
| 740 | |||
| 741 | export CFLAGS="`pkg-config --cflags webkitgtk-3.0 ` -DHAVE_WEBKIT_OSR " | ||
| 742 | export LDFLAGS=`pkg-config --libs webkitgtk-3.0 ` | ||
| 743 | ./configure --with-x-toolkit=gtk3 | ||
| 744 | make | ||
| 745 | |||
| 746 | crash in gtk_window_get_size instead. great. | ||
| 747 | |||
| 748 | http://gtkplus-p3.0.sourcearchive.com/documentation/2.91.5-0ubuntu1/testoffscreenwindow_8c-source.html | ||
| 749 | |||
| 750 | after many atempts, the basic issue remains. for some reason the | ||
| 751 | offscreen widget isnt ok when I want to snapshot it, so i simply get | ||
| 752 | emptiness. the surface is only ok someimes. | ||
| 753 | |||
| 754 | here is a useful debugging snippets: | ||
| 755 | // debugging redraw: | ||
| 756 | // - the bg colors always change, so theres no error in signal handling | ||
| 757 | // - i get this error now and then: | ||
| 758 | //(emacs:7109): GLib-GObject-WARNING **: invalid cast from `GdkOffscreenWindow' to `GdkDrawableImplX11' | ||
| 759 | // seems to happen in webkit actually. see README | ||
| 760 | |||
| 761 | if(0){ //redraw debug hack. helped a lot in fact. use the with alpha painter below also | ||
| 762 | cairo_set_source_rgb(cr, osr_dbg_color, 1.0, 0.2); | ||
| 763 | cairo_rectangle(cr, 0,0, xw->width, xw->height); | ||
| 764 | cairo_fill(cr); | ||
| 765 | osr_dbg_color+=0.1; | ||
| 766 | if(osr_dbg_color>1.0) | ||
| 767 | osr_dbg_color=0.0; | ||
| 768 | |||
| 769 | } | ||
| 770 | |||
| 771 | you need to terminate drawing like this: | ||
| 772 | |||
| 773 | //cairo_set_source_surface (cr, src_pixmap, 0,0); | ||
| 774 | //cairo_set_operator (cr, CAIRO_OPERATOR_OVER); | ||
| 775 | |||
| 776 | //cairo_paint_with_alpha (cr, 1.0); | ||
| 777 | //cairo_paint(cr); | ||
| 778 | |||
| 779 | the snippets change background color on oach redraw. | ||
| 780 | |||
| 781 | **** on-screen rendering to separate window | ||
| 782 | an alternative might be to open a separate window and snapshot it. the | ||
| 783 | idea is that whatever oddness webkit does so that offscreen rendering | ||
| 784 | doesnt work, doesnt happen on-screen. the window could be opened | ||
| 785 | somewhere not in the way. | ||
| 786 | |||
| 787 | *** CANCELLED firefox | ||
| 788 | CLOSED: [2011-07-03 Sun 22:13] | ||
| 789 | http://www-archive.mozilla.org/unix/gtk-embedding.html | ||
| 790 | seems to be severly bitrotted | ||
| 791 | |||
| 792 | heres a newer aproach | ||
| 793 | http://hg.mozilla.org/incubator/embedding/file/29ac0fe51754/gtk/tests/test.cpp | ||
| 794 | |||
| 795 | while webkit clearly has the best traction as an embeddee, the | ||
| 796 | offscreen rendering issues makes it interesting to see what ff brings | ||
| 797 | to the table. turns out webkit has as good offscreen support as anyone. | ||
| 798 | |||
| 799 | |||
| 800 | *** DONE text field support | ||
| 801 | CLOSED: [2011-07-20 Wed 20:05] | ||
| 802 | Emacs captures all keyboard events so text field support isn't super | ||
| 803 | straightforward. | ||
| 804 | |||
| 805 | **** propagate keyboard events | ||
| 806 | I have some old hacks for this and they are not good. | ||
| 807 | **** use the DOM model | ||
| 808 | expose document.activeElement to lisp. This is potentially more | ||
| 809 | interesting than just forwarding keyboard events. | ||
| 810 | |||
| 811 | webkit_web_view_get_dom_document () | ||
| 812 | |||
| 813 | this is hard it seems. an idea might be to hack elisp support for swig | ||
| 814 | to machine generate the bindings. | ||
| 815 | **** DONE inject javascript | ||
| 816 | CLOSED: [2011-07-03 Sun 22:50] | ||
| 817 | webkit_web_view_execute_script () | ||
| 818 | |||
| 819 | this works now: | ||
| 820 | (xwidget-webkit-execute-script 5 "document.activeElement.value='test'") | ||
| 821 | |||
| 822 | so it should be possible to do some interesting stuff. | ||
| 823 | execute-script does however not return anything at the interface level | ||
| 824 | so satisfaction is not total: | ||
| 825 | |||
| 826 | http://markmail.org/message/4yowmdgras73z3x5 | ||
| 827 | |||
| 828 | maybe | ||
| 829 | https://launchpad.net/gnome-seed | ||
| 830 | |||
| 831 | or this funny hack: | ||
| 832 | <jave> im trying to understanh how to interact via javascript to an embedded | ||
| 833 | webkit gtk instance [23:38] | ||
| 834 | <jave> i use webkit_web_view_execute_script() which is nice but doesnt return | ||
| 835 | a value, by design aparently [23:39] | ||
| 836 | <jave> any hints? | ||
| 837 | <lucian> jave: afaik, webkit still doesn't have full gobject bindings [23:48] | ||
| 838 | <lucian> jave: you can hack it up by making the JS modify the title, and read | ||
| 839 | the title from gtk-side | ||
| 840 | <jave> lucian: that was a pretty cool idea! | ||
| 841 | |||
| 842 | |||
| 843 | *** webkit_web_view_load_string () | ||
| 844 | I would like preview of html in a buffer rather than from uri. | ||
| 845 | |||
| 846 | |||
| 847 | |||
| 848 | *** DONE simple xwidget-webkit wrapper | ||
| 849 | CLOSED: [2011-07-22 Fri 11:01] | ||
| 850 | so that it could be used for actual browsing :) | ||
| 851 | I dont want to reinvent too many wheels so i'd like to use existing | ||
| 852 | emacs facilities here possible. use bindings similar to w3m(or info) | ||
| 853 | |||
| 854 | - m-x xwidget-webkit starts a session | ||
| 855 | - 'g' goes to a url | ||
| 856 | - use bookmark-jump i suppose. I mostly use org for bookmarks myself | ||
| 857 | - browse-url support so webkit can be the default browser | ||
| 858 | - some way of getting around the quirky keyboard interaction since | ||
| 859 | xwidgets dont receive keyboard events because I hawe no idea how to | ||
| 860 | do that in a sane way | ||
| 861 | |||
| 862 | ... and one can of course go on bikeshedding forever. lets keep it | ||
| 863 | simple and extensible, and compatible with other Emacs packages. | ||
| 864 | |||
| 865 | the really cool ideas would need Emacs DOM integration, which is not | ||
| 866 | easy. | ||
| 867 | |||
| 868 | |||
| 855 | ** TODO support webkit signals | 869 | ** TODO support webkit signals |
| 856 | *** TODO particularily document-load-finished | 870 | *** TODO particularily document-load-finished |
| 857 | http://webkitgtk.org/reference/webkitgtk-webkitwebview.html#WebKitWebView-document-load-finished | 871 | http://webkitgtk.org/reference/webkitgtk-webkitwebview.html#WebKitWebView-document-load-finished |
| @@ -865,11 +879,26 @@ prints hello to stdout but theres no way to catch stdout from webkit I | |||
| 865 | think other than receiving the signal. | 879 | think other than receiving the signal. |
| 866 | 880 | ||
| 867 | 881 | ||
| 882 | ** DONE webkit flashkiller by default | ||
| 883 | CLOSED: [2011-07-19 Tue 14:27] | ||
| 884 | while its possible to support plugins in the webkit xwidget, flash has | ||
| 885 | issues on 64 bit, and slows down emacs to a halt with off screen | ||
| 886 | rendering, and of course is not free software. its in the way for real | ||
| 887 | world usage even if its interesting to watch flash animations inside | ||
| 888 | emacs. which should be achieved with Gnash or other free software | ||
| 889 | instead. | ||
| 890 | |||
| 891 | http://stackoverflow.com/questions/4885513/prevent-flash-in-cocoa-webview | ||
| 892 | |||
| 893 | simply use this api: | ||
| 894 | http://webkitgtk.org/reference/WebKitWebPluginDatabase.html | ||
| 895 | |||
| 868 | 896 | ||
| 869 | ** TODO webkit downloads | 897 | ** TODO webkit downloads |
| 870 | when clicking a download link in Webkit Emacs should take over and handle it | 898 | when clicking a download link in Webkit Emacs should take over and handle it |
| 871 | from there. Probably need signals. | 899 | from there. Probably need signals. There are Emacs libraries to |
| 872 | 900 | download things, with wget etc. | |
| 901 | "download-requested" | ||
| 873 | ** TODO webkit alt-text not handled | 902 | ** TODO webkit alt-text not handled |
| 874 | XKCD use image-title to display a cartoon comment. These mysteriously | 903 | XKCD use image-title to display a cartoon comment. These mysteriously |
| 875 | don't work ATM. Other mouseovers work though. Maybe webkit tries to | 904 | don't work ATM. Other mouseovers work though. Maybe webkit tries to |
| @@ -880,6 +909,36 @@ have a look at how docview solves it | |||
| 880 | webkit_web_view_search_text () | 909 | webkit_web_view_search_text () |
| 881 | ** TODO webkit relative references doesn't work | 910 | ** TODO webkit relative references doesn't work |
| 882 | probably because we handle scrolling in a non-standard way | 911 | probably because we handle scrolling in a non-standard way |
| 912 | ** TODO webkit width adjustment handling issue | ||
| 913 | since there are so many levels of clipping and whatnot in xwidgets | ||
| 914 | sizing issues are difficult. | ||
| 915 | |||
| 916 | - an xwidget is told how large it can be by emacs. thats the end of | ||
| 917 | it. if the xwidget thinks otherwise it will be clipped. | ||
| 918 | - but emacs can ask the xwudget how large it wants to be. it can then | ||
| 919 | resize the reserved area and inform the xwidget thusly. | ||
| 920 | |||
| 921 | That should have been enough. but webkit never reports less than what | ||
| 922 | it already has. So currently a webkit view will only growth and not | ||
| 923 | adjust to smaller sizes. | ||
| 924 | |||
| 925 | This is not a big problem in practice but is still annoying. | ||
| 926 | |||
| 927 | to see the problem surface to http://www.slashdot.org | ||
| 928 | - xwidget-webkit-adjust-size | ||
| 929 | - xwidget-webkit-adjust-size-to-content | ||
| 930 | |||
| 931 | and then try resizing Epiphany. | ||
| 932 | |||
| 933 | |||
| 934 | ** TODO synchronise emacs background with xwidget color | ||
| 935 | fine-tuning to reduce flicker. | ||
| 936 | |||
| 937 | ** TODO xwidget allow loading from string from emacs | ||
| 938 | |||
| 939 | |||
| 940 | ** TODO xwidgets doesn't work during bootstrap all of a sudden | ||
| 941 | |||
| 883 | * old notes from x_draw_xwidget_glyph_string | 942 | * old notes from x_draw_xwidget_glyph_string |
| 884 | 943 | ||
| 885 | BUG it seems this method for some reason is called with bad s->x and s->y sometimes. | 944 | BUG it seems this method for some reason is called with bad s->x and s->y sometimes. |
| @@ -922,3 +981,4 @@ probably because we handle scrolling in a non-standard way | |||
| 922 | this means valid cases like xwidgets being displayed only once in | 981 | this means valid cases like xwidgets being displayed only once in |
| 923 | non-selected windows, does not work well. they should also be visible | 982 | non-selected windows, does not work well. they should also be visible |
| 924 | in that case not phantomed. | 983 | in that case not phantomed. |
| 984 | |||