Re: [webkit-dev] About USE(CROSS_PLATFORM_CONTEXT_MENUS)

2013-03-08 Thread Jesus Sanchez-Palencia
Hi,


2013/2/25 Adam Roben aro...@webkit.org:
 I was having a look at our Context Menu design when this USE flag got
 my attention. Can someone help me clarify the motivation for it?

 The motivation is explained pretty well in the ChangeLog for r73802,
 which introduced this flag. I'll try to give a little explanation here
 too.

Yes, thanks for the explanation. I got mislead by another revision...
Indeed it provides a good clean up for the ContextMenu code in WebCore
so I have filled https://bugs.webkit.org/show_bug.cgi?id=111874.


 Also, is there any other port using it?

 I don't believe so. But if you look at ContextMenu[Item].h, it looks
 like CHROMIUM and EFL could very easily switch over to it; they've
 already implemented something very similar by abusing the
 PlatformMenuItemDescription typedef.

Yes, I've already uploaded a patch for EFL. I will give it a try for
Chromium as well.


Cheers,
jesus



 -Adam
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] About USE(CROSS_PLATFORM_CONTEXT_MENUS)

2013-02-25 Thread Adam Roben
 I was having a look at our Context Menu design when this USE flag got
 my attention. Can someone help me clarify the motivation for it?

The motivation is explained pretty well in the ChangeLog for r73802,
which introduced this flag. I'll try to give a little explanation here
too.

CROSS_PLATFORM_CONTEXT_MENUS changes WebCore::ContextMenu and
WebCore::ContextMenuItem from being thin wrappers around a
platform-specific context menu and context menu item, to being full
cross-platform representations of a menu and menu item. In this new
model, most code will only ever deal with the cross-platform types;
platform-specific menus and menu items should only be created as
needed (e.g., when actually showing the menu on screen, or when
passing a native menu up to the embedding application, as happens in
the Apple WebKit[2] APIs). Providing a true cross-platform
representation of menus and menu items makes many things simpler,
including being able to serialize menus and send them across process
boundaries.

This last point was the immediate motivation for
CROSS_PLATFORM_CONTEXT_MENUS: we needed to send context menus from the
web process to the UI process to support context menus in WebKit2 on
Windows. But the hope was that all ports would switch over to this
model eventually.

 It seems that only PLATFORM(WIN) is using it, but I'm not sure if for
 both WK1 and WK2...

WIN uses it for both WK1 and WK2.

 Also, is there any other port using it?

I don't believe so. But if you look at ContextMenu[Item].h, it looks
like CHROMIUM and EFL could very easily switch over to it; they've
already implemented something very similar by abusing the
PlatformMenuItemDescription typedef.

-Adam
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] About USE(CROSS_PLATFORM_CONTEXT_MENUS)

2013-02-22 Thread Jesus Sanchez-Palencia
Hi again,

It's been 2 days since the first email on this thread. Should I assume
that no one is then relying on this USE flag? It adds quite a fair
amount of code to all ContextMenu related files and I could clean that
up if necessary.

Cheers,
jesus

2013/2/20 Jesus Sanchez-Palencia je...@webkit.org:
 Hello,

 I was having a look at our Context Menu design when this USE flag got
 my attention. Can someone help me clarify the motivation for it? It
 seems that only PLATFORM(WIN) is using it, but I'm not sure if for
 both WK1 and WK2...

 Also, is there any other port using it?

 Cheers,
 jesus
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] About USE(CROSS_PLATFORM_CONTEXT_MENUS)

2013-02-20 Thread Jesus Sanchez-Palencia
Hello,

I was having a look at our Context Menu design when this USE flag got
my attention. Can someone help me clarify the motivation for it? It
seems that only PLATFORM(WIN) is using it, but I'm not sure if for
both WK1 and WK2...

Also, is there any other port using it?

Cheers,
jesus
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev