summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2013-07-31 10:55:33 +0100
committerBen Murdoch <benm@google.com>2013-07-31 10:55:33 +0100
commitd3868032626d59662ff73b372b5d584c1d144c53 (patch)
treeb53968078879cdade155a2e869a58b2ec568a06d /ui
parente5b4422c968a7a35d5d4fbae38f8786f61e98bc8 (diff)
downloadchromium_org-d3868032626d59662ff73b372b5d584c1d144c53.tar.gz
Merge from Chromium at DEPS revision r214391
This commit was generated by merge_to_master.py. Change-Id: Iad15fada300ebc6cf9cbcebfc484b1a5f5f372e5
Diffstat (limited to 'ui')
-rw-r--r--ui/views/widget/widget_hwnd_utils.cc7
-rw-r--r--ui/views/win/hwnd_message_handler.cc3
-rw-r--r--ui/webui/resources/js/util.js12
3 files changed, 13 insertions, 9 deletions
diff --git a/ui/views/widget/widget_hwnd_utils.cc b/ui/views/widget/widget_hwnd_utils.cc
index 3e238cac63..53588c25e5 100644
--- a/ui/views/widget/widget_hwnd_utils.cc
+++ b/ui/views/widget/widget_hwnd_utils.cc
@@ -57,7 +57,8 @@ void CalculateWindowStylesFromInitParams(
// 1- Use D3D9Ex to create device/swapchain, etc. You need D3DFMT_A8R8G8B8.
// 2- The window must have WS_EX_COMPOSITED in the extended style.
// 3- The window must have WS_POPUP in its style.
- // 4- The windows must not have WM_SIZEBOX in its style.
+ // 4- The windows must not have WM_SIZEBOX, WS_THICKFRAME or WS_CAPTION in its
+ // style.
// 5- When the window is created but before it is presented, call
// DwmExtendFrameIntoClientArea passing -1 as the margins.
if (params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW) {
@@ -106,6 +107,10 @@ void CalculateWindowStylesFromInitParams(
}
*ex_style |=
native_widget_delegate->IsDialogBox() ? WS_EX_DLGMODALFRAME : 0;
+
+ // See layered window comment above.
+ if (*ex_style & WS_EX_COMPOSITED)
+ *style &= ~(WS_THICKFRAME | WS_CAPTION);
break;
}
case Widget::InitParams::TYPE_CONTROL:
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 5facaac69c..7ff3900c1c 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -2142,7 +2142,8 @@ void HWNDMessageHandler::OnWindowPosChanged(WINDOWPOS* window_pos) {
if (DidClientAreaSizeChange(window_pos))
ClientAreaSizeChanged();
if (remove_standard_frame_ && window_pos->flags & SWP_FRAMECHANGED &&
- ui::win::IsAeroGlassEnabled()) {
+ ui::win::IsAeroGlassEnabled() &&
+ (window_ex_style() & WS_EX_COMPOSITED) == 0) {
MARGINS m = {10, 10, 10, 10};
DwmExtendFrameIntoClientArea(hwnd(), &m);
}
diff --git a/ui/webui/resources/js/util.js b/ui/webui/resources/js/util.js
index 07c9834d3f..e7beb676f4 100644
--- a/ui/webui/resources/js/util.js
+++ b/ui/webui/resources/js/util.js
@@ -263,7 +263,7 @@ function appendParam(url, key, value) {
* @param {string} url The url for the favicon.
* @param {number=} opt_size Optional preferred size of the favicon.
* @param {string=} opt_type Optional type of favicon to request. Valid values
- * are 'favicon', 'session-favicon', and 'touch-icon'. Default is 'favicon'.
+ * are 'favicon' and 'touch-icon'. Default is 'favicon'.
* @return {string} -webkit-image-set for the favicon.
*/
function getFaviconImageSet(url, opt_size, opt_type) {
@@ -280,15 +280,13 @@ function getFaviconImageSet(url, opt_size, opt_type) {
* occur automatically.
* @param {string} url The url for the favicon.
* @param {number=} opt_size Optional preferred size of the favicon.
- * @param {boolean=} opt_sessionFavicon Optional flag to indicate if
- * requesting a session favicon.
+ * @param {string=} opt_type Optional type of favicon to request. Valid values
+ * are 'favicon' and 'touch-icon'. Default is 'favicon'.
* @return {string} Updated URL for the favicon.
*/
-function getFaviconUrlForCurrentDevicePixelRatio(url,
- opt_size,
- opt_sessionFavicon) {
+function getFaviconUrlForCurrentDevicePixelRatio(url, opt_size, opt_type) {
var size = opt_size || 16;
- var type = opt_sessionFavicon ? 'session-favicon' : 'favicon';
+ var type = opt_type || 'favicon';
return 'chrome://' + type + '/size/' + size + '@' +
window.devicePixelRatio + 'x/' + url;
}