[webkit-dev] Use dashboard region to support dragging frameless window in chromium extensions

Jian Li jianli at chromium.org
Thu Jun 21 15:20:42 PDT 2012


Hi,

In Chromium port, we're working on supporting frameless windows for
extensions, that allow the web contents to have complete control of the
window. Frameless windows do not have the standard frame and the web
contents cover the whole window. Thus we need to provide a way to let the
web contents denote which part of the content area can be used to drag the
window. For example, the web contents draw the custom titlebar with the
icon, title, close button and etc. We want to let the user be able to drag
the titlebar in order to move the window around.

WebKit has already implemented the dashboard region support and exposed a
special CSS property -webkit-dashboard-region that lets you specify regions
for certain purpose, i.e. being excluded from dragging. The syntax of this
property is:
     -webkit-dashboard-region: dashboard-region(label geometry-type
offset-top offset-right offset-bottom offset-left)

Is it OK to reuse the dashboard region implementation to provide a way for
frameless windows to know about draggable regions? Can we introduce another
CSS property "-webkit-widget-region", that is essentially a synonym of
"-webkit-dashboard-region", since we do not want to get confused with
dashboard region support in Apple/WebKit. How do you think about this
approach?
     -webkit-widget-region: region(label geometry-type offset-top
offset-right offset-bottom offset-left)

Currently the existing dashboard region codes are wrapped inside the
feature guard ENABLE(DASHBOARD_SUPPORT). We're considering of putting this
new CSS property in a new feature guard, like ENABLE(WIDGET_REGION_SUPPORT)
such that "-webkit-dashboard-region" is only provided
under ENABLE(DASHBOARD_SUPPORT) as it is now and "-webkit-widget-region"
is only exposed under ENABLE(WIDGET_REGION_SUPPORT). How do you think?


Thanks,

Jian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120621/b706606f/attachment.html>


More information about the webkit-dev mailing list