In a Carbon application hosting the webkit the normal default Context menus do not appear for text manipulations inside INPUT, TEXTAREA elements or empty page space You can see this behaivor in the SimpleCarbonWeb developer example. Navigate to google's home page, then enter some text in the search box. If you right click in the search box, all you see is a "reload" option. If you select the text you enter and right click, all you see is a "reload" option. However, if you select text elsewhere on the page you will see the proper "Copy" menu entry. If you just right click on an empty portion of the page, you see only the "reload" option. The same missing context menus happen in the CarbonWeb developer example which does a full Cocoa UI delegate implementation. In this example, the contextMenuItemsForElement delegate fires when you right click, but the default menu passed does not contain proper default actions for the elements above. If you manually add actions for "Cut, Copy, Paste", they will appear in the menu but are always grayed out even if you have selected text. I believe this a bug only with the WebKit inside a Carbon application since the MiniBrowser developer example has full working context menus and it doesn't implement contextMenuItemsForElement. Broken Contextmenu behaivor seen in INPUT, TEXTAREA and empty space.
Hi Aron, which version of WebKit are you using? Is it WebKit from Tiger (10.4.x), or are you using WebKit from "tip-of-tree" (ToT) in Subversion?
I am using the default Tiger WebKit. The system is 10.4.8 and Safari reports 2.0.4 (419.3)
If you have time, please test this against WebKit ToT (tip-of-tree) to find out if the bug still exists. Thanks! http://webkit.org/building/checkout.html
Commit r19409 is interesting with respect to this bug: http://trac.webkit.org/projects/webkit/changeset/19409
If I implement the UI delegate using the CarbonWeb example, the default menu just contains a single entry called "reload".
I am probably doing something wrong, but if I build the WebKit sources and use the following script to run the example I get the following crash when I try to open a page in SimpleCarbonWeb CommandLine: run-webkit-app build/Release/SimpleCarbonWeb.app Date/Time: 2007-02-05 17:39:40.954 -0800 OS Version: 10.4.8 (Build 8L2127) Report Version: 4 Command: SimpleCarbonWeb Path: /Developer/Examples/WebKit/SimpleCarbonWeb/build/Release/SimpleCarbonWeb.app/Contents/MacOS/SimpleCarbonWeb Parent: WindowServer [62] Version: 1.0 (1) PID: 2271 Thread: Unknown Link (dyld) error: Symbol not found: _objc_msgSend Referenced from: /Developer/Examples/WebKit/SimpleCarbonWeb/build/Release/SimpleCarbonWeb.app/Contents/MacOS/SimpleCarbonWeb Expected in: /Users/arosenberg/source/WebKit/WebKitBuild/Release/WebKit.framework/Versions/A/WebKit Model: iMac4,1, BootROM IM41.0055.B08, 2 processors, Intel Core Duo, 1.83 GHz, 1 GB Graphics: ATI Radeon X1600, ATY,RadeonX1600, PCIe, 128 MB Memory Module: BANK 1/DIMM1, 1 GB, DDR2 SDRAM, 667 MHz AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x89), 4.80.46.0 Bluetooth: Version 1.7.9f12, 2 service, 1 devices, 1 incoming serial ports Network Service: Built-in Ethernet, Ethernet, en0 Serial ATA Device: ST3160023AS, 149.05 GB Parallel ATA Device: MATSHITADVD-R UJ-846 USB Device: Built-in iSight, Micron, Up to 480 Mb/sec, 500 mA USB Device: Bluetooth HCI, Up to 12 Mb/sec, 500 mA USB Device: IR Receiver, Apple Computer, Inc., Up to 12 Mb/sec, 500 mA USB Device: Hub in Apple Pro Keyboard, Mitsumi Electric, Up to 12 Mb/sec, 500 mA USB Device: Apple Optical USB Mouse, Mitsumi Electric, Up to 1.5 Mb/sec, 100 mA USB Device: Apple Pro Keyboard, Mitsumi Electric, Up to 12 Mb/sec, 250 mA FireWire Device: unknown_device, unknown_value, Up to 400 Mb/sec
I /think/ the objc_msgSend issue may be an artifact of local builds of WebKit not using the umbrella framework layout that the system WebKit frameworks use. It's definitely worth filing another bug report against this though so that we can verify that my suspicion is the case. You should be able to work around that issue to test the context menu problem by adding libobjc.dylib from /usr/lib to the SimpleCarbonWeb project. If you can do that and re-test the issue you originally reported it would be great.
I've just tested this with latest WebKit and, after "fixing" the SimpleCarbonWeb project as mentioned in comment 7, this works correctly. Closing as WORKSFORME as this works correctly in ToT.
Mark, If I fix the SimpleCarbonWeb project by adding libobjc, when I run I don't get any context menus at all with ToT. Is this expected on Carbon WebKit projects?
(In reply to comment #9) > If I fix the SimpleCarbonWeb project by adding libobjc, when I run I don't > get any context menus at all with ToT. Is this expected on Carbon WebKit > projects? I see Aron is on an Intel system per the OS X build number in Comment #6. Mark, did you test with a PowerPC system?
So the missing context menus is fixed when I updated to r19409 as mentioned in comment 4. With that rev, everything seems to be working properly in the SimpleCarbonWen and the CarbonWeb example programs.