Bug 12612 - Contextmenu's in Carbon hosted WebKit fail to work properly for INPUT, TEXTAREA and blank space
Summary: Contextmenu's in Carbon hosted WebKit fail to work properly for INPUT, TEXTAR...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 419.x
Hardware: Mac OS X 10.4
: P2 Major
Assignee: Nobody
Depends on:
Reported: 2007-02-05 09:53 PST by Aron Rosenberg
Modified: 2007-02-06 13:52 PST (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Aron Rosenberg 2007-02-05 09:53:55 PST
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.
Comment 1 David Kilzer (:ddkilzer) 2007-02-05 11:05:02 PST
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?

Comment 2 Aron Rosenberg 2007-02-05 11:21:32 PST
I am using the default Tiger WebKit. The system is 10.4.8 and Safari reports 2.0.4 (419.3)
Comment 3 David Kilzer (:ddkilzer) 2007-02-05 12:14:47 PST
If you have time, please test this against WebKit ToT (tip-of-tree) to find out if the bug still exists.  Thanks!

Comment 4 David Kilzer (:ddkilzer) 2007-02-05 15:09:02 PST
Commit r19409 is interesting with respect to this bug:


Comment 5 Aron Rosenberg 2007-02-05 16:30:43 PST
If I implement the UI delegate using the CarbonWeb example, the default menu just contains a single entry called "reload".
Comment 6 Aron Rosenberg 2007-02-05 17:53:42 PST
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),
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
Comment 7 Mark Rowe (bdash) 2007-02-05 19:47:53 PST
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.
Comment 8 Mark Rowe (bdash) 2007-02-05 19:54:28 PST
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.
Comment 9 Aron Rosenberg 2007-02-06 08:55:08 PST

  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?
Comment 10 David Kilzer (:ddkilzer) 2007-02-06 10:09:32 PST
(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?
Comment 11 Aron Rosenberg 2007-02-06 13:52:32 PST
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.