mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision ad468e8b (#292352).
- Building Chromium using SVN is no longer supported. - Remove CefDOMEvent and CefDOMEventListener (issue #933). - Remove CefRenderHandler::OnScrollOffsetChanged (http://crbug.com/404656). - Remove UR_FLAG_REPORT_LOAD_TIMING (https://codereview.chromium.org/451623002/). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1816 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -35,12 +35,6 @@ patches = [
|
||||
'name': 'message_loop_443',
|
||||
'path': '../base/message_loop/',
|
||||
},
|
||||
{
|
||||
# Disable event type assertion in WebNode::addEventListener.
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=933
|
||||
'name': 'webkit_933',
|
||||
'path': '../third_party/WebKit/Source/web/',
|
||||
},
|
||||
{
|
||||
# Fix ninja output for localization directories on OS X.
|
||||
# http://code.google.com/p/gyp/issues/detail?id=331
|
||||
@ -98,13 +92,6 @@ patches = [
|
||||
'name': 'prefs_content_1161',
|
||||
'path': '../content/',
|
||||
},
|
||||
{
|
||||
# Allow customization of the WebView background color.
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=1161
|
||||
# https://codereview.chromium.org/228603007/
|
||||
'name': 'prefs_webkit_1161',
|
||||
'path': '../webkit/',
|
||||
},
|
||||
{
|
||||
# Revert Blink revision 177068 changes due to _web_drawFocusRingWithFrame
|
||||
# unrecognized selector error during offscreen rendering of popups.
|
||||
@ -118,6 +105,13 @@ patches = [
|
||||
'name': 'ui_dragdrop_355390',
|
||||
'path': '../ui/base/dragdrop/',
|
||||
},
|
||||
{
|
||||
# Fix printing on Windows. Reverts portions of the below changes.
|
||||
# https://codereview.chromium.org/480303002
|
||||
# https://codereview.chromium.org/488853002
|
||||
'name': 'printing_win',
|
||||
'path': '../',
|
||||
},
|
||||
{
|
||||
# Disable scollbar bounce and overlay on OS X.
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
|
||||
|
@ -1,25 +1,18 @@
|
||||
Index: web_contents_impl.cc
|
||||
===================================================================
|
||||
--- web_contents_impl.cc (revision 280796)
|
||||
+++ web_contents_impl.cc (working copy)
|
||||
@@ -1073,22 +1073,29 @@
|
||||
diff --git web_contents_impl.cc web_contents_impl.cc
|
||||
index f1a9d02..243bbc8 100644
|
||||
--- web_contents_impl.cc
|
||||
+++ web_contents_impl.cc
|
||||
@@ -1147,22 +1147,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
params.browser_context, params.site_instance, params.routing_id,
|
||||
params.main_frame_routing_id);
|
||||
|
||||
- WebContentsViewDelegate* delegate =
|
||||
- GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
+ if (params.view && params.delegate_view) {
|
||||
+ view_.reset(params.view);
|
||||
+ render_view_host_delegate_view_ = params.delegate_view;
|
||||
+ }
|
||||
|
||||
-
|
||||
- if (browser_plugin_guest_) {
|
||||
- scoped_ptr<WebContentsView> platform_view(CreateWebContentsView(
|
||||
- this, delegate, &render_view_host_delegate_view_));
|
||||
+ if (!view_) {
|
||||
+ WebContentsViewDelegate* delegate =
|
||||
+ GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
-
|
||||
- WebContentsViewGuest* rv = new WebContentsViewGuest(
|
||||
- this, browser_plugin_guest_.get(), platform_view.Pass(),
|
||||
- render_view_host_delegate_view_);
|
||||
@ -29,6 +22,15 @@ Index: web_contents_impl.cc
|
||||
- // Regular WebContentsView.
|
||||
- view_.reset(CreateWebContentsView(
|
||||
- this, delegate, &render_view_host_delegate_view_));
|
||||
+ if (params.view && params.delegate_view) {
|
||||
+ view_.reset(params.view);
|
||||
+ render_view_host_delegate_view_ = params.delegate_view;
|
||||
+ }
|
||||
+
|
||||
+ if (!view_) {
|
||||
+ WebContentsViewDelegate* delegate =
|
||||
+ GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
+
|
||||
+ if (browser_plugin_guest_) {
|
||||
+ scoped_ptr<WebContentsView> platform_view(CreateWebContentsView(
|
||||
+ this, delegate, &render_view_host_delegate_view_));
|
||||
@ -46,7 +48,7 @@ Index: web_contents_impl.cc
|
||||
}
|
||||
CHECK(render_view_host_delegate_view_);
|
||||
CHECK(view_.get());
|
||||
@@ -1407,6 +1414,9 @@
|
||||
@@ -1479,6 +1486,9 @@ void WebContentsImpl::CreateNewWindow(
|
||||
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
|
||||
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
|
||||
|
||||
@ -56,7 +58,7 @@ Index: web_contents_impl.cc
|
||||
if (delegate_ &&
|
||||
!delegate_->ShouldCreateWebContents(this,
|
||||
route_id,
|
||||
@@ -1414,7 +1424,9 @@
|
||||
@@ -1486,7 +1496,9 @@ void WebContentsImpl::CreateNewWindow(
|
||||
params.frame_name,
|
||||
params.target_url,
|
||||
partition_id,
|
||||
@ -67,7 +69,7 @@ Index: web_contents_impl.cc
|
||||
if (route_id != MSG_ROUTING_NONE &&
|
||||
!RenderViewHost::FromID(render_process_id, route_id)) {
|
||||
// If the embedder didn't create a WebContents for this route, we need to
|
||||
@@ -1434,6 +1446,8 @@
|
||||
@@ -1506,6 +1518,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||
create_params.main_frame_routing_id = main_frame_route_id;
|
||||
create_params.opener = this;
|
||||
create_params.opener_suppressed = params.opener_suppressed;
|
||||
|
@ -1,37 +1,7 @@
|
||||
Index: mac/strip_save_dsym
|
||||
===================================================================
|
||||
--- mac/strip_save_dsym (revision 280796)
|
||||
+++ mac/strip_save_dsym (working copy)
|
||||
@@ -48,7 +48,7 @@
|
||||
"bundle"]
|
||||
macho_types_re = "Mach-O (?:64-bit )?(?:" + "|".join(macho_types) + ")"
|
||||
|
||||
- file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "--", macho],
|
||||
+ file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "-L", "--", macho],
|
||||
stdout=subprocess.PIPE)
|
||||
|
||||
archs = []
|
||||
Index: gyp_chromium
|
||||
===================================================================
|
||||
--- gyp_chromium (revision 280796)
|
||||
+++ gyp_chromium (working copy)
|
||||
@@ -257,12 +257,6 @@
|
||||
if sys.platform not in ('darwin',):
|
||||
args.append('--no-circular-check')
|
||||
|
||||
- # We explicitly don't support the make gyp generator (crbug.com/348686). Be
|
||||
- # nice and fail here, rather than choking in gyp.
|
||||
- if re.search(r'(^|,|\s)make($|,|\s)', os.environ.get('GYP_GENERATORS', '')):
|
||||
- print 'Error: make gyp generator not supported (check GYP_GENERATORS).'
|
||||
- sys.exit(1)
|
||||
-
|
||||
# Default to ninja on linux and windows, but only if no generator has
|
||||
# explicitly been set.
|
||||
# Also default to ninja on mac, but only when not building chrome/ios.
|
||||
Index: common.gypi
|
||||
===================================================================
|
||||
--- common.gypi (revision 280796)
|
||||
+++ common.gypi (working copy)
|
||||
diff --git common.gypi common.gypi
|
||||
index ea388ac..d0864e3 100644
|
||||
--- common.gypi
|
||||
+++ common.gypi
|
||||
@@ -9,6 +9,9 @@
|
||||
# Variables expected to be overriden on the GYP command line (-D) or by
|
||||
# ~/.gyp/include.gypi.
|
||||
@ -42,13 +12,43 @@ Index: common.gypi
|
||||
# Putting a variables dict inside another variables dict looks kind of
|
||||
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as
|
||||
# variables within the outer variables dict here. This is necessary
|
||||
@@ -5175,6 +5178,9 @@
|
||||
# removed as code is fixed.
|
||||
4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
|
||||
4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4706,
|
||||
@@ -5377,6 +5380,9 @@
|
||||
4510, # Default constructor could not be generated
|
||||
4512, # Assignment operator could not be generated
|
||||
4610, # Object can never be instantiated
|
||||
+ # Disable Warning 4702 ("Unreachable code")
|
||||
+ # https://code.google.com/p/chromium/issues/detail?id=346399#c55
|
||||
+ 4702,
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': {
|
||||
diff --git gyp_chromium gyp_chromium
|
||||
index b8fe82d..cbc8790 100755
|
||||
--- gyp_chromium
|
||||
+++ gyp_chromium
|
||||
@@ -262,12 +262,6 @@ if __name__ == '__main__':
|
||||
if sys.platform not in ('darwin',):
|
||||
args.append('--no-circular-check')
|
||||
|
||||
- # We explicitly don't support the make gyp generator (crbug.com/348686). Be
|
||||
- # nice and fail here, rather than choking in gyp.
|
||||
- if re.search(r'(^|,|\s)make($|,|\s)', os.environ.get('GYP_GENERATORS', '')):
|
||||
- print 'Error: make gyp generator not supported (check GYP_GENERATORS).'
|
||||
- sys.exit(1)
|
||||
-
|
||||
# If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check
|
||||
# to enfore syntax checking.
|
||||
syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')
|
||||
diff --git mac/strip_save_dsym mac/strip_save_dsym
|
||||
index c9cf226..0dedbe3 100755
|
||||
--- mac/strip_save_dsym
|
||||
+++ mac/strip_save_dsym
|
||||
@@ -48,7 +48,7 @@ def macho_archs(macho):
|
||||
"bundle"]
|
||||
macho_types_re = "Mach-O (?:64-bit )?(?:" + "|".join(macho_types) + ")"
|
||||
|
||||
- file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "--", macho],
|
||||
+ file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "-L", "--", macho],
|
||||
stdout=subprocess.PIPE)
|
||||
|
||||
archs = []
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: public/renderer/content_renderer_client.cc
|
||||
===================================================================
|
||||
--- public/renderer/content_renderer_client.cc (revision 280796)
|
||||
+++ public/renderer/content_renderer_client.cc (working copy)
|
||||
@@ -92,7 +92,6 @@
|
||||
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
|
||||
index 6ca2fcc..ed7726d 100644
|
||||
--- public/renderer/content_renderer_client.cc
|
||||
+++ public/renderer/content_renderer_client.cc
|
||||
@@ -92,7 +92,6 @@ bool ContentRendererClient::AllowPopup() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ Index: public/renderer/content_renderer_client.cc
|
||||
bool ContentRendererClient::HandleNavigation(
|
||||
RenderFrame* render_frame,
|
||||
DocumentState* document_state,
|
||||
@@ -104,7 +103,6 @@
|
||||
@@ -104,7 +103,6 @@ bool ContentRendererClient::HandleNavigation(
|
||||
bool is_redirect) {
|
||||
return false;
|
||||
}
|
||||
@ -18,11 +18,11 @@ Index: public/renderer/content_renderer_client.cc
|
||||
|
||||
bool ContentRendererClient::ShouldFork(blink::WebFrame* frame,
|
||||
const GURL& url,
|
||||
Index: public/renderer/content_renderer_client.h
|
||||
===================================================================
|
||||
--- public/renderer/content_renderer_client.h (revision 280796)
|
||||
+++ public/renderer/content_renderer_client.h (working copy)
|
||||
@@ -176,7 +176,6 @@
|
||||
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
|
||||
index ada672f..e29e9e0 100644
|
||||
--- public/renderer/content_renderer_client.h
|
||||
+++ public/renderer/content_renderer_client.h
|
||||
@@ -176,7 +176,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// Returns true if a popup window should be allowed.
|
||||
virtual bool AllowPopup();
|
||||
|
||||
@ -30,7 +30,7 @@ Index: public/renderer/content_renderer_client.h
|
||||
// TODO(sgurun) This callback is deprecated and will be removed as soon
|
||||
// as android webview completes implementation of a resource throttle based
|
||||
// shouldoverrideurl implementation. See crbug.com/325351
|
||||
@@ -191,7 +190,6 @@
|
||||
@@ -191,7 +190,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
blink::WebNavigationType type,
|
||||
blink::WebNavigationPolicy default_policy,
|
||||
bool is_redirect);
|
||||
@ -38,23 +38,23 @@ Index: public/renderer/content_renderer_client.h
|
||||
|
||||
// Returns true if we should fork a new process for the given navigation.
|
||||
// If |send_referrer| is set to false (which is the default), no referrer
|
||||
Index: renderer/render_frame_impl.cc
|
||||
===================================================================
|
||||
--- renderer/render_frame_impl.cc (revision 280796)
|
||||
+++ renderer/render_frame_impl.cc (working copy)
|
||||
@@ -3122,7 +3122,6 @@
|
||||
WebNavigationType type,
|
||||
WebNavigationPolicy default_policy,
|
||||
bool is_redirect) {
|
||||
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
|
||||
index 10fd5b5..4c88b4d 100644
|
||||
--- renderer/render_frame_impl.cc
|
||||
+++ renderer/render_frame_impl.cc
|
||||
@@ -3380,7 +3380,6 @@ void RenderFrameImpl::FocusedNodeChanged(const WebNode& node) {
|
||||
WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
|
||||
RenderFrame* render_frame,
|
||||
const NavigationPolicyInfo& info) {
|
||||
-#ifdef OS_ANDROID
|
||||
// The handlenavigation API is deprecated and will be removed once
|
||||
// crbug.com/325351 is resolved.
|
||||
if (request.url() != GURL(kSwappedOutURL) &&
|
||||
@@ -3137,7 +3136,6 @@
|
||||
is_redirect)) {
|
||||
if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
|
||||
@@ -3395,7 +3394,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
|
||||
info.isRedirect)) {
|
||||
return blink::WebNavigationPolicyIgnore;
|
||||
}
|
||||
-#endif
|
||||
|
||||
Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame, request));
|
||||
|
||||
Referrer referrer(RenderViewImpl::GetReferrerFromRequest(info.frame,
|
||||
info.urlRequest));
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: resource_ids
|
||||
===================================================================
|
||||
--- resource_ids (revision 280796)
|
||||
+++ resource_ids (working copy)
|
||||
diff --git resource_ids resource_ids
|
||||
index 3b8768e..cde0ceb 100644
|
||||
--- resource_ids
|
||||
+++ resource_ids
|
||||
@@ -16,6 +16,12 @@
|
||||
{
|
||||
"SRCDIR": "../..",
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gyp/generator/ninja.py
|
||||
===================================================================
|
||||
--- gyp/generator/ninja.py (revision 1944)
|
||||
+++ gyp/generator/ninja.py (working copy)
|
||||
@@ -740,7 +740,16 @@
|
||||
diff --git gyp/generator/ninja.py gyp/generator/ninja.py
|
||||
index 4eafb71..83e629c 100644
|
||||
--- gyp/generator/ninja.py
|
||||
+++ gyp/generator/ninja.py
|
||||
@@ -743,7 +743,16 @@ class NinjaWriter:
|
||||
for path in copy['files']:
|
||||
# Normalize the path so trailing slashes don't confuse us.
|
||||
path = os.path.normpath(path)
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: message_loop.cc
|
||||
===================================================================
|
||||
--- message_loop.cc (revision 280796)
|
||||
+++ message_loop.cc (working copy)
|
||||
@@ -154,7 +154,7 @@
|
||||
diff --git message_loop.cc message_loop.cc
|
||||
index ae165ea..cbe5c05 100644
|
||||
--- message_loop.cc
|
||||
+++ message_loop.cc
|
||||
@@ -154,7 +154,7 @@ MessageLoop::MessageLoop(scoped_ptr<MessagePump> pump)
|
||||
MessageLoop::~MessageLoop() {
|
||||
DCHECK_EQ(this, current());
|
||||
|
||||
|
@ -1,20 +1,44 @@
|
||||
Index: public/common/common_param_traits_macros.h
|
||||
===================================================================
|
||||
--- public/common/common_param_traits_macros.h (revision 280796)
|
||||
+++ public/common/common_param_traits_macros.h (working copy)
|
||||
@@ -175,6 +175,7 @@
|
||||
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
|
||||
index 56b23e4..04de1dc 100644
|
||||
--- public/common/common_param_traits_macros.h
|
||||
+++ public/common/common_param_traits_macros.h
|
||||
@@ -172,6 +172,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
|
||||
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
|
||||
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
|
||||
IPC_STRUCT_TRAITS_MEMBER(compositor_touch_hit_testing)
|
||||
+ IPC_STRUCT_TRAITS_MEMBER(base_background_color)
|
||||
IPC_STRUCT_TRAITS_MEMBER(cookie_enabled)
|
||||
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
||||
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
||||
Index: renderer/web_preferences.cc
|
||||
===================================================================
|
||||
--- renderer/web_preferences.cc (revision 280796)
|
||||
+++ renderer/web_preferences.cc (working copy)
|
||||
@@ -167,6 +167,8 @@
|
||||
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
|
||||
index d1e656d..b2ad9e8 100644
|
||||
--- public/common/web_preferences.cc
|
||||
+++ public/common/web_preferences.cc
|
||||
@@ -135,6 +135,7 @@ WebPreferences::WebPreferences()
|
||||
pinch_overlay_scrollbar_thickness(0),
|
||||
use_solid_color_scrollbars(false),
|
||||
navigate_on_drag_drop(true),
|
||||
+ base_background_color(0xFFFFFFFF), // Color::white
|
||||
v8_cache_options(V8_CACHE_OPTIONS_OFF),
|
||||
cookie_enabled(true),
|
||||
pepper_accelerated_video_decode_enabled(false)
|
||||
diff --git public/common/web_preferences.h public/common/web_preferences.h
|
||||
index 496a347..3916026 100644
|
||||
--- public/common/web_preferences.h
|
||||
+++ public/common/web_preferences.h
|
||||
@@ -141,6 +141,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
int pinch_overlay_scrollbar_thickness;
|
||||
bool use_solid_color_scrollbars;
|
||||
bool navigate_on_drag_drop;
|
||||
+ uint32_t base_background_color;
|
||||
V8CacheOptions v8_cache_options;
|
||||
|
||||
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
|
||||
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
|
||||
index 743d8db..617ddf4 100644
|
||||
--- renderer/render_view_impl.cc
|
||||
+++ renderer/render_view_impl.cc
|
||||
@@ -969,6 +969,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
|
||||
settings->setJavaEnabled(prefs.java_enabled);
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
Index: common/webpreferences.cc
|
||||
===================================================================
|
||||
--- common/webpreferences.cc (revision 280796)
|
||||
+++ common/webpreferences.cc (working copy)
|
||||
@@ -112,6 +112,7 @@
|
||||
use_solid_color_scrollbars(false),
|
||||
compositor_touch_hit_testing(true),
|
||||
navigate_on_drag_drop(true),
|
||||
+ base_background_color(0xFFFFFFFF), // Color::white
|
||||
cookie_enabled(true),
|
||||
pepper_accelerated_video_decode_enabled(false)
|
||||
#if defined(OS_ANDROID)
|
||||
Index: common/webpreferences.h
|
||||
===================================================================
|
||||
--- common/webpreferences.h (revision 280796)
|
||||
+++ common/webpreferences.h (working copy)
|
||||
@@ -148,6 +148,7 @@
|
||||
bool use_solid_color_scrollbars;
|
||||
bool compositor_touch_hit_testing;
|
||||
bool navigate_on_drag_drop;
|
||||
+ uint32_t base_background_color;
|
||||
|
||||
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
|
||||
// only controls whether or not the "document.cookie" field is properly
|
709
patch/patches/printing_win.patch
Normal file
709
patch/patches/printing_win.patch
Normal file
@ -0,0 +1,709 @@
|
||||
diff --git chrome/renderer/printing/print_web_view_helper.cc chrome/renderer/printing/print_web_view_helper.cc
|
||||
index f1d4cfd..bb4eac4 100644
|
||||
--- chrome/renderer/printing/print_web_view_helper.cc
|
||||
+++ chrome/renderer/printing/print_web_view_helper.cc
|
||||
@@ -767,12 +767,17 @@ void PrepareFrameAndViewForPrint::FinishPrinting() {
|
||||
on_ready_.Reset();
|
||||
}
|
||||
|
||||
-PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view)
|
||||
+PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
|
||||
+ bool preview_enabled,
|
||||
+ bool scripted_print_throttling_disabled)
|
||||
: content::RenderViewObserver(render_view),
|
||||
content::RenderViewObserverTracker<PrintWebViewHelper>(render_view),
|
||||
reset_prep_frame_view_(false),
|
||||
+ is_preview_enabled_(preview_enabled),
|
||||
+ is_scripted_print_throttling_disabled_(scripted_print_throttling_disabled),
|
||||
is_print_ready_metafile_sent_(false),
|
||||
ignore_css_margins_(false),
|
||||
+ user_cancelled_scripted_print_count_(0),
|
||||
is_scripted_printing_blocked_(false),
|
||||
notify_browser_of_print_failure_(true),
|
||||
print_for_preview_(false),
|
||||
@@ -791,6 +796,14 @@ bool PrintWebViewHelper::IsScriptInitiatedPrintAllowed(
|
||||
#endif // defined(OS_ANDROID)
|
||||
if (is_scripted_printing_blocked_)
|
||||
return false;
|
||||
+ // If preview is enabled, then the print dialog is tab modal, and the user
|
||||
+ // can always close the tab on a mis-behaving page (the system print dialog
|
||||
+ // is app modal). If the print was initiated through user action, don't
|
||||
+ // throttle. Or, if the command line flag to skip throttling has been set.
|
||||
+ if (!is_scripted_print_throttling_disabled_ &&
|
||||
+ !is_preview_enabled_ &&
|
||||
+ !user_initiated)
|
||||
+ return !IsScriptInitiatedPrintTooFrequent(frame);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -820,8 +833,14 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
|
||||
|
||||
if (!IsScriptInitiatedPrintAllowed(frame, user_initiated))
|
||||
return;
|
||||
- print_preview_context_.InitWithFrame(frame);
|
||||
- RequestPrintPreview(PRINT_PREVIEW_SCRIPTED);
|
||||
+ IncrementScriptedPrintCount();
|
||||
+
|
||||
+ if (is_preview_enabled_) {
|
||||
+ print_preview_context_.InitWithFrame(frame);
|
||||
+ RequestPrintPreview(PRINT_PREVIEW_SCRIPTED);
|
||||
+ } else {
|
||||
+ Print(frame, blink::WebNode());
|
||||
+ }
|
||||
}
|
||||
|
||||
bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
|
||||
@@ -842,6 +861,7 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
|
||||
|
||||
void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
const base::DictionaryValue& job_settings) {
|
||||
+ DCHECK(is_preview_enabled_);
|
||||
// If still not finished with earlier print request simply ignore.
|
||||
if (prep_frame_view_)
|
||||
return;
|
||||
@@ -975,6 +995,7 @@ bool PrintWebViewHelper::IsPrintToPdfRequested(
|
||||
}
|
||||
|
||||
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
|
||||
+ DCHECK(is_preview_enabled_);
|
||||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent",
|
||||
@@ -1177,6 +1198,7 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
|
||||
}
|
||||
|
||||
void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||
+ DCHECK(is_preview_enabled_);
|
||||
blink::WebLocalFrame* frame = NULL;
|
||||
GetPrintFrame(&frame);
|
||||
DCHECK(frame);
|
||||
@@ -1210,8 +1232,13 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
|
||||
// its |context_menu_node_|.
|
||||
- print_preview_context_.InitWithNode(node);
|
||||
- RequestPrintPreview(PRINT_PREVIEW_USER_INITIATED_CONTEXT_NODE);
|
||||
+ if (is_preview_enabled_) {
|
||||
+ print_preview_context_.InitWithNode(node);
|
||||
+ RequestPrintPreview(PRINT_PREVIEW_USER_INITIATED_CONTEXT_NODE);
|
||||
+ } else {
|
||||
+ blink::WebNode duplicate_node(node);
|
||||
+ Print(duplicate_node.document().frame(), duplicate_node);
|
||||
+ }
|
||||
|
||||
print_node_in_progress_ = false;
|
||||
}
|
||||
@@ -1248,6 +1275,7 @@ void PrintWebViewHelper::Print(blink::WebLocalFrame* frame,
|
||||
LOG(ERROR) << "RenderPagesForPrint failed";
|
||||
DidFinishPrinting(FAIL_PRINT);
|
||||
}
|
||||
+ ResetScriptedPrintCount();
|
||||
}
|
||||
|
||||
void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
@@ -1267,6 +1295,7 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
break;
|
||||
|
||||
case FAIL_PREVIEW:
|
||||
+ DCHECK(is_preview_enabled_);
|
||||
int cookie = print_pages_params_ ?
|
||||
print_pages_params_->params.document_cookie : 0;
|
||||
if (notify_browser_of_print_failure_) {
|
||||
@@ -1435,6 +1464,7 @@ bool PrintWebViewHelper::UpdatePrintSettings(
|
||||
blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
const base::DictionaryValue& passed_job_settings) {
|
||||
+ DCHECK(is_preview_enabled_);
|
||||
const base::DictionaryValue* job_settings = &passed_job_settings;
|
||||
base::DictionaryValue modified_job_settings;
|
||||
if (job_settings->empty()) {
|
||||
@@ -1588,6 +1618,54 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
}
|
||||
#endif // defined(OS_POSIX)
|
||||
|
||||
+bool PrintWebViewHelper::IsScriptInitiatedPrintTooFrequent(
|
||||
+ blink::WebFrame* frame) {
|
||||
+ const int kMinSecondsToIgnoreJavascriptInitiatedPrint = 2;
|
||||
+ const int kMaxSecondsToIgnoreJavascriptInitiatedPrint = 32;
|
||||
+ bool too_frequent = false;
|
||||
+
|
||||
+ // Check if there is script repeatedly trying to print and ignore it if too
|
||||
+ // frequent. The first 3 times, we use a constant wait time, but if this
|
||||
+ // gets excessive, we switch to exponential wait time. So for a page that
|
||||
+ // calls print() in a loop the user will need to cancel the print dialog
|
||||
+ // after: [2, 2, 2, 4, 8, 16, 32, 32, ...] seconds.
|
||||
+ // This gives the user time to navigate from the page.
|
||||
+ if (user_cancelled_scripted_print_count_ > 0) {
|
||||
+ base::TimeDelta diff = base::Time::Now() - last_cancelled_script_print_;
|
||||
+ int min_wait_seconds = kMinSecondsToIgnoreJavascriptInitiatedPrint;
|
||||
+ if (user_cancelled_scripted_print_count_ > 3) {
|
||||
+ min_wait_seconds = std::min(
|
||||
+ kMinSecondsToIgnoreJavascriptInitiatedPrint <<
|
||||
+ (user_cancelled_scripted_print_count_ - 3),
|
||||
+ kMaxSecondsToIgnoreJavascriptInitiatedPrint);
|
||||
+ }
|
||||
+ if (diff.InSeconds() < min_wait_seconds) {
|
||||
+ too_frequent = true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!too_frequent)
|
||||
+ return false;
|
||||
+
|
||||
+ blink::WebString message(
|
||||
+ blink::WebString::fromUTF8("Ignoring too frequent calls to print()."));
|
||||
+ frame->addMessageToConsole(
|
||||
+ blink::WebConsoleMessage(
|
||||
+ blink::WebConsoleMessage::LevelWarning, message));
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+void PrintWebViewHelper::ResetScriptedPrintCount() {
|
||||
+ // Reset cancel counter on successful print.
|
||||
+ user_cancelled_scripted_print_count_ = 0;
|
||||
+}
|
||||
+
|
||||
+void PrintWebViewHelper::IncrementScriptedPrintCount() {
|
||||
+ ++user_cancelled_scripted_print_count_;
|
||||
+ last_cancelled_script_print_ = base::Time::Now();
|
||||
+}
|
||||
+
|
||||
+
|
||||
void PrintWebViewHelper::ShowScriptedPrintPreview() {
|
||||
if (is_scripted_preview_delayed_) {
|
||||
is_scripted_preview_delayed_ = false;
|
||||
diff --git chrome/renderer/printing/print_web_view_helper.h chrome/renderer/printing/print_web_view_helper.h
|
||||
index 67bcc73..b8a5126 100644
|
||||
--- chrome/renderer/printing/print_web_view_helper.h
|
||||
+++ chrome/renderer/printing/print_web_view_helper.h
|
||||
@@ -66,7 +66,9 @@ class PrintWebViewHelper
|
||||
: public content::RenderViewObserver,
|
||||
public content::RenderViewObserverTracker<PrintWebViewHelper> {
|
||||
public:
|
||||
- explicit PrintWebViewHelper(content::RenderView* render_view);
|
||||
+ PrintWebViewHelper(content::RenderView* render_view,
|
||||
+ bool preview_enabled,
|
||||
+ bool scripted_print_throttling_disabled);
|
||||
virtual ~PrintWebViewHelper();
|
||||
|
||||
bool IsPrintingEnabled();
|
||||
@@ -292,13 +294,24 @@ class PrintWebViewHelper
|
||||
bool IsScriptInitiatedPrintAllowed(blink::WebFrame* frame,
|
||||
bool user_initiated);
|
||||
|
||||
- // Shows scripted print preview when options from plugin are available.
|
||||
+ // Returns true if script initiated printing occurs too often.
|
||||
+ bool IsScriptInitiatedPrintTooFrequent(blink::WebFrame* frame);
|
||||
+
|
||||
+ // Reset the counter for script initiated printing.
|
||||
+ // Scripted printing will be allowed to continue.
|
||||
+ void ResetScriptedPrintCount();
|
||||
+
|
||||
+ // Increment the counter for script initiated printing.
|
||||
+ // Scripted printing will be blocked for a limited amount of time.
|
||||
+ void IncrementScriptedPrintCount();
|
||||
+
|
||||
+ // Shows scripted print preview when options from plugin are availible.
|
||||
void ShowScriptedPrintPreview();
|
||||
|
||||
void RequestPrintPreview(PrintPreviewRequestType type);
|
||||
|
||||
// Checks whether print preview should continue or not.
|
||||
- // Returns true if canceling, false if continuing.
|
||||
+ // Returns true if cancelling, false if continuing.
|
||||
bool CheckForCancel();
|
||||
|
||||
// Notifies the browser a print preview page has been rendered.
|
||||
@@ -315,9 +328,14 @@ class PrintWebViewHelper
|
||||
bool reset_prep_frame_view_;
|
||||
|
||||
scoped_ptr<PrintMsg_PrintPages_Params> print_pages_params_;
|
||||
+ bool is_preview_enabled_;
|
||||
+ bool is_scripted_print_throttling_disabled_;
|
||||
bool is_print_ready_metafile_sent_;
|
||||
bool ignore_css_margins_;
|
||||
+
|
||||
// Used for scripted initiated printing blocking.
|
||||
+ base::Time last_cancelled_script_print_;
|
||||
+ int user_cancelled_scripted_print_count_;
|
||||
bool is_scripted_printing_blocked_;
|
||||
|
||||
// Let the browser process know of a printing failure. Only set to false when
|
||||
diff --git printing/printing_context_win.cc printing/printing_context_win.cc
|
||||
index 4d7ea92..5e53ed2 100644
|
||||
--- printing/printing_context_win.cc
|
||||
+++ printing/printing_context_win.cc
|
||||
@@ -50,7 +50,7 @@ scoped_ptr<PrintingContext> PrintingContext::Create(Delegate* delegate) {
|
||||
}
|
||||
|
||||
PrintingContextWin::PrintingContextWin(Delegate* delegate)
|
||||
- : PrintingContext(delegate), context_(NULL) {
|
||||
+ : PrintingContext(delegate), context_(NULL), dialog_box_(NULL) {
|
||||
}
|
||||
|
||||
PrintingContextWin::~PrintingContextWin() {
|
||||
@@ -61,26 +61,63 @@ void PrintingContextWin::AskUserForSettings(
|
||||
int max_pages,
|
||||
bool has_selection,
|
||||
const PrintSettingsCallback& callback) {
|
||||
- NOTIMPLEMENTED();
|
||||
+ DCHECK(!in_print_job_);
|
||||
+ dialog_box_dismissed_ = false;
|
||||
+
|
||||
+ HWND window = GetRootWindow(delegate_->GetParentView());
|
||||
+ DCHECK(window);
|
||||
+
|
||||
+ // Show the OS-dependent dialog box.
|
||||
+ // If the user press
|
||||
+ // - OK, the settings are reset and reinitialized with the new settings. OK is
|
||||
+ // returned.
|
||||
+ // - Apply then Cancel, the settings are reset and reinitialized with the new
|
||||
+ // settings. CANCEL is returned.
|
||||
+ // - Cancel, the settings are not changed, the previous setting, if it was
|
||||
+ // initialized before, are kept. CANCEL is returned.
|
||||
+ // On failure, the settings are reset and FAILED is returned.
|
||||
+ PRINTDLGEX dialog_options = { sizeof(PRINTDLGEX) };
|
||||
+ dialog_options.hwndOwner = window;
|
||||
+ // Disable options we don't support currently.
|
||||
+ // TODO(maruel): Reuse the previously loaded settings!
|
||||
+ dialog_options.Flags = PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE |
|
||||
+ PD_NOCURRENTPAGE | PD_HIDEPRINTTOFILE;
|
||||
+ if (!has_selection)
|
||||
+ dialog_options.Flags |= PD_NOSELECTION;
|
||||
+
|
||||
+ PRINTPAGERANGE ranges[32];
|
||||
+ dialog_options.nStartPage = START_PAGE_GENERAL;
|
||||
+ if (max_pages) {
|
||||
+ // Default initialize to print all the pages.
|
||||
+ memset(ranges, 0, sizeof(ranges));
|
||||
+ ranges[0].nFromPage = 1;
|
||||
+ ranges[0].nToPage = max_pages;
|
||||
+ dialog_options.nPageRanges = 1;
|
||||
+ dialog_options.nMaxPageRanges = arraysize(ranges);
|
||||
+ dialog_options.nMinPage = 1;
|
||||
+ dialog_options.nMaxPage = max_pages;
|
||||
+ dialog_options.lpPageRanges = ranges;
|
||||
+ } else {
|
||||
+ // No need to bother, we don't know how many pages are available.
|
||||
+ dialog_options.Flags |= PD_NOPAGENUMS;
|
||||
+ }
|
||||
+
|
||||
+ if (ShowPrintDialog(&dialog_options) != S_OK) {
|
||||
+ ResetSettings();
|
||||
+ callback.Run(FAILED);
|
||||
+ }
|
||||
+
|
||||
+ // TODO(maruel): Support PD_PRINTTOFILE.
|
||||
+ callback.Run(ParseDialogResultEx(dialog_options));
|
||||
}
|
||||
|
||||
PrintingContext::Result PrintingContextWin::UseDefaultSettings() {
|
||||
DCHECK(!in_print_job_);
|
||||
|
||||
- scoped_refptr<PrintBackend> backend = PrintBackend::CreateInstance(NULL);
|
||||
- base::string16 default_printer =
|
||||
- base::UTF8ToWide(backend->GetDefaultPrinterName());
|
||||
- if (!default_printer.empty()) {
|
||||
- ScopedPrinterHandle printer;
|
||||
- if (printer.OpenPrinter(default_printer.c_str())) {
|
||||
- scoped_ptr<DEVMODE, base::FreeDeleter> dev_mode =
|
||||
- CreateDevMode(printer, NULL);
|
||||
- if (InitializeSettings(default_printer, dev_mode.get()) == OK)
|
||||
- return OK;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- ReleaseContext();
|
||||
+ PRINTDLG dialog_options = { sizeof(PRINTDLG) };
|
||||
+ dialog_options.Flags = PD_RETURNDC | PD_RETURNDEFAULT;
|
||||
+ if (PrintDlg(&dialog_options))
|
||||
+ return ParseDialogResult(dialog_options);
|
||||
|
||||
// No default printer configured, do we have any printers at all?
|
||||
DWORD bytes_needed = 0;
|
||||
@@ -105,15 +142,23 @@ PrintingContext::Result PrintingContextWin::UseDefaultSettings() {
|
||||
continue;
|
||||
scoped_ptr<DEVMODE, base::FreeDeleter> dev_mode =
|
||||
CreateDevMode(printer, NULL);
|
||||
- if (InitializeSettings(info_2->pPrinterName, dev_mode.get()) == OK)
|
||||
+ if (!dev_mode || !AllocateContext(info_2->pPrinterName, dev_mode.get(),
|
||||
+ &context_)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (InitializeSettings(*dev_mode.get(), info_2->pPrinterName, NULL, 0,
|
||||
+ false)) {
|
||||
return OK;
|
||||
+ }
|
||||
+ ReleaseContext();
|
||||
}
|
||||
if (context_)
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
||||
- return OnError();
|
||||
+ ResetSettings();
|
||||
+ return FAILED;
|
||||
}
|
||||
|
||||
gfx::Size PrintingContextWin::GetPdfPaperSizeDeviceUnits() {
|
||||
@@ -212,14 +257,19 @@ PrintingContext::Result PrintingContextWin::UpdatePrinterSettings(
|
||||
}
|
||||
|
||||
// Update data using DocumentProperties.
|
||||
- if (show_system_dialog) {
|
||||
- scoped_dev_mode = ShowPrintDialog(
|
||||
- printer, delegate_->GetParentView(), scoped_dev_mode.get());
|
||||
- } else {
|
||||
- scoped_dev_mode = CreateDevMode(printer, scoped_dev_mode.get());
|
||||
- }
|
||||
+ scoped_dev_mode = CreateDevMode(printer, scoped_dev_mode.get());
|
||||
+ if (!scoped_dev_mode)
|
||||
+ return OnError();
|
||||
+
|
||||
// Set printer then refresh printer settings.
|
||||
- return InitializeSettings(settings_.device_name(), scoped_dev_mode.get());
|
||||
+ if (!AllocateContext(settings_.device_name(), scoped_dev_mode.get(),
|
||||
+ &context_)) {
|
||||
+ return OnError();
|
||||
+ }
|
||||
+ PrintSettingsInitializerWin::InitPrintSettings(context_,
|
||||
+ *scoped_dev_mode.get(),
|
||||
+ &settings_);
|
||||
+ return OK;
|
||||
}
|
||||
|
||||
PrintingContext::Result PrintingContextWin::InitWithSettings(
|
||||
@@ -230,13 +280,18 @@ PrintingContext::Result PrintingContextWin::InitWithSettings(
|
||||
|
||||
// TODO(maruel): settings_.ToDEVMODE()
|
||||
ScopedPrinterHandle printer;
|
||||
- if (!printer.OpenPrinter(settings_.device_name().c_str()))
|
||||
+ if (!printer.OpenPrinter(settings_.device_name().c_str())) {
|
||||
return FAILED;
|
||||
+ }
|
||||
|
||||
- scoped_ptr<DEVMODE, base::FreeDeleter> dev_mode =
|
||||
- CreateDevMode(printer, NULL);
|
||||
+ Result status = OK;
|
||||
+
|
||||
+ if (!GetPrinterSettings(printer, settings_.device_name()))
|
||||
+ status = FAILED;
|
||||
|
||||
- return InitializeSettings(settings_.device_name(), dev_mode.get());
|
||||
+ if (status != OK)
|
||||
+ ResetSettings();
|
||||
+ return status;
|
||||
}
|
||||
|
||||
PrintingContext::Result PrintingContextWin::NewDocument(
|
||||
@@ -320,6 +375,10 @@ void PrintingContextWin::Cancel() {
|
||||
in_print_job_ = false;
|
||||
if (context_)
|
||||
CancelDC(context_);
|
||||
+ if (dialog_box_) {
|
||||
+ DestroyWindow(dialog_box_);
|
||||
+ dialog_box_dismissed_ = true;
|
||||
+ }
|
||||
}
|
||||
|
||||
void PrintingContextWin::ReleaseContext() {
|
||||
@@ -343,31 +402,154 @@ BOOL PrintingContextWin::AbortProc(HDC hdc, int nCode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
-PrintingContext::Result PrintingContextWin::InitializeSettings(
|
||||
- const std::wstring& device_name,
|
||||
- DEVMODE* dev_mode) {
|
||||
- if (!dev_mode)
|
||||
- return OnError();
|
||||
+bool PrintingContextWin::InitializeSettings(const DEVMODE& dev_mode,
|
||||
+ const std::wstring& new_device_name,
|
||||
+ const PRINTPAGERANGE* ranges,
|
||||
+ int number_ranges,
|
||||
+ bool selection_only) {
|
||||
+ skia::InitializeDC(context_);
|
||||
+ DCHECK(GetDeviceCaps(context_, CLIPCAPS));
|
||||
+ DCHECK(GetDeviceCaps(context_, RASTERCAPS) & RC_STRETCHDIB);
|
||||
+ DCHECK(GetDeviceCaps(context_, RASTERCAPS) & RC_BITMAP64);
|
||||
+ // Some printers don't advertise these.
|
||||
+ // DCHECK(GetDeviceCaps(context_, RASTERCAPS) & RC_SCALING);
|
||||
+ // DCHECK(GetDeviceCaps(context_, SHADEBLENDCAPS) & SB_CONST_ALPHA);
|
||||
+ // DCHECK(GetDeviceCaps(context_, SHADEBLENDCAPS) & SB_PIXEL_ALPHA);
|
||||
+
|
||||
+ // StretchDIBits() support is needed for printing.
|
||||
+ if (!(GetDeviceCaps(context_, RASTERCAPS) & RC_STRETCHDIB) ||
|
||||
+ !(GetDeviceCaps(context_, RASTERCAPS) & RC_BITMAP64)) {
|
||||
+ NOTREACHED();
|
||||
+ ResetSettings();
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
- ReleaseContext();
|
||||
- context_ = CreateDC(L"WINSPOOL", device_name.c_str(), NULL, dev_mode);
|
||||
- if (!context_)
|
||||
- return OnError();
|
||||
+ DCHECK(!in_print_job_);
|
||||
+ DCHECK(context_);
|
||||
+ PageRanges ranges_vector;
|
||||
+ if (!selection_only) {
|
||||
+ // Convert the PRINTPAGERANGE array to a PrintSettings::PageRanges vector.
|
||||
+ ranges_vector.reserve(number_ranges);
|
||||
+ for (int i = 0; i < number_ranges; ++i) {
|
||||
+ PageRange range;
|
||||
+ // Transfer from 1-based to 0-based.
|
||||
+ range.from = ranges[i].nFromPage - 1;
|
||||
+ range.to = ranges[i].nToPage - 1;
|
||||
+ ranges_vector.push_back(range);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- skia::InitializeDC(context_);
|
||||
+ settings_.set_ranges(ranges_vector);
|
||||
+ settings_.set_device_name(new_device_name);
|
||||
+ settings_.set_selection_only(selection_only);
|
||||
+ PrintSettingsInitializerWin::InitPrintSettings(context_, dev_mode,
|
||||
+ &settings_);
|
||||
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+bool PrintingContextWin::GetPrinterSettings(HANDLE printer,
|
||||
+ const std::wstring& device_name) {
|
||||
DCHECK(!in_print_job_);
|
||||
- settings_.set_device_name(device_name);
|
||||
- PrintSettingsInitializerWin::InitPrintSettings(
|
||||
- context_, *dev_mode, &settings_);
|
||||
|
||||
- return OK;
|
||||
+ scoped_ptr<DEVMODE, base::FreeDeleter> dev_mode =
|
||||
+ CreateDevMode(printer, NULL);
|
||||
+
|
||||
+ if (!dev_mode || !AllocateContext(device_name, dev_mode.get(), &context_)) {
|
||||
+ ResetSettings();
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return InitializeSettings(*dev_mode.get(), device_name, NULL, 0, false);
|
||||
+}
|
||||
+
|
||||
+// static
|
||||
+bool PrintingContextWin::AllocateContext(const std::wstring& device_name,
|
||||
+ const DEVMODE* dev_mode,
|
||||
+ gfx::NativeDrawingContext* context) {
|
||||
+ *context = CreateDC(L"WINSPOOL", device_name.c_str(), NULL, dev_mode);
|
||||
+ DCHECK(*context);
|
||||
+ return *context != NULL;
|
||||
+}
|
||||
+
|
||||
+PrintingContext::Result PrintingContextWin::ParseDialogResultEx(
|
||||
+ const PRINTDLGEX& dialog_options) {
|
||||
+ // If the user clicked OK or Apply then Cancel, but not only Cancel.
|
||||
+ if (dialog_options.dwResultAction != PD_RESULT_CANCEL) {
|
||||
+ // Start fresh.
|
||||
+ ResetSettings();
|
||||
+
|
||||
+ DEVMODE* dev_mode = NULL;
|
||||
+ if (dialog_options.hDevMode) {
|
||||
+ dev_mode =
|
||||
+ reinterpret_cast<DEVMODE*>(GlobalLock(dialog_options.hDevMode));
|
||||
+ DCHECK(dev_mode);
|
||||
+ }
|
||||
+
|
||||
+ std::wstring device_name;
|
||||
+ if (dialog_options.hDevNames) {
|
||||
+ DEVNAMES* dev_names =
|
||||
+ reinterpret_cast<DEVNAMES*>(GlobalLock(dialog_options.hDevNames));
|
||||
+ DCHECK(dev_names);
|
||||
+ if (dev_names) {
|
||||
+ device_name = reinterpret_cast<const wchar_t*>(dev_names) +
|
||||
+ dev_names->wDeviceOffset;
|
||||
+ GlobalUnlock(dialog_options.hDevNames);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ bool success = false;
|
||||
+ if (dev_mode && !device_name.empty()) {
|
||||
+ context_ = dialog_options.hDC;
|
||||
+ PRINTPAGERANGE* page_ranges = NULL;
|
||||
+ DWORD num_page_ranges = 0;
|
||||
+ bool print_selection_only = false;
|
||||
+ if (dialog_options.Flags & PD_PAGENUMS) {
|
||||
+ page_ranges = dialog_options.lpPageRanges;
|
||||
+ num_page_ranges = dialog_options.nPageRanges;
|
||||
+ }
|
||||
+ if (dialog_options.Flags & PD_SELECTION) {
|
||||
+ print_selection_only = true;
|
||||
+ }
|
||||
+ success = InitializeSettings(*dev_mode,
|
||||
+ device_name,
|
||||
+ page_ranges,
|
||||
+ num_page_ranges,
|
||||
+ print_selection_only);
|
||||
+ }
|
||||
+
|
||||
+ if (!success && dialog_options.hDC) {
|
||||
+ DeleteDC(dialog_options.hDC);
|
||||
+ context_ = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (dev_mode) {
|
||||
+ GlobalUnlock(dialog_options.hDevMode);
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (dialog_options.hDC) {
|
||||
+ DeleteDC(dialog_options.hDC);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (dialog_options.hDevMode != NULL)
|
||||
+ GlobalFree(dialog_options.hDevMode);
|
||||
+ if (dialog_options.hDevNames != NULL)
|
||||
+ GlobalFree(dialog_options.hDevNames);
|
||||
+
|
||||
+ switch (dialog_options.dwResultAction) {
|
||||
+ case PD_RESULT_PRINT:
|
||||
+ return context_ ? OK : FAILED;
|
||||
+ case PD_RESULT_APPLY:
|
||||
+ return context_ ? CANCEL : FAILED;
|
||||
+ case PD_RESULT_CANCEL:
|
||||
+ return CANCEL;
|
||||
+ default:
|
||||
+ return FAILED;
|
||||
+ }
|
||||
}
|
||||
|
||||
-scoped_ptr<DEVMODE, base::FreeDeleter> PrintingContextWin::ShowPrintDialog(
|
||||
- HANDLE printer,
|
||||
- gfx::NativeView parent_view,
|
||||
- DEVMODE* dev_mode) {
|
||||
+HRESULT PrintingContextWin::ShowPrintDialog(PRINTDLGEX* options) {
|
||||
// Note that this cannot use ui::BaseShellDialog as the print dialog is
|
||||
// system modal: opening it from a background thread can cause Windows to
|
||||
// get the wrong Z-order which will make the print dialog appear behind the
|
||||
@@ -377,20 +559,57 @@ scoped_ptr<DEVMODE, base::FreeDeleter> PrintingContextWin::ShowPrintDialog(
|
||||
base::MessageLoop::ScopedNestableTaskAllower allow(
|
||||
base::MessageLoop::current());
|
||||
|
||||
- bool canceled = false;
|
||||
- scoped_ptr<DEVMODE, base::FreeDeleter> result =
|
||||
- PromptDevMode(printer,
|
||||
- settings_.device_name(),
|
||||
- dev_mode,
|
||||
- GetRootWindow(parent_view),
|
||||
- &canceled);
|
||||
-
|
||||
- if (canceled) {
|
||||
- result.reset();
|
||||
- abort_printing_ = true;
|
||||
+ return PrintDlgEx(options);
|
||||
+}
|
||||
+
|
||||
+PrintingContext::Result PrintingContextWin::ParseDialogResult(
|
||||
+ const PRINTDLG& dialog_options) {
|
||||
+ // If the user clicked OK or Apply then Cancel, but not only Cancel.
|
||||
+ // Start fresh.
|
||||
+ ResetSettings();
|
||||
+
|
||||
+ DEVMODE* dev_mode = NULL;
|
||||
+ if (dialog_options.hDevMode) {
|
||||
+ dev_mode =
|
||||
+ reinterpret_cast<DEVMODE*>(GlobalLock(dialog_options.hDevMode));
|
||||
+ DCHECK(dev_mode);
|
||||
}
|
||||
|
||||
- return result.Pass();
|
||||
+ std::wstring device_name;
|
||||
+ if (dialog_options.hDevNames) {
|
||||
+ DEVNAMES* dev_names =
|
||||
+ reinterpret_cast<DEVNAMES*>(GlobalLock(dialog_options.hDevNames));
|
||||
+ DCHECK(dev_names);
|
||||
+ if (dev_names) {
|
||||
+ device_name =
|
||||
+ reinterpret_cast<const wchar_t*>(
|
||||
+ reinterpret_cast<const wchar_t*>(dev_names) +
|
||||
+ dev_names->wDeviceOffset);
|
||||
+ GlobalUnlock(dialog_options.hDevNames);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ bool success = false;
|
||||
+ if (dev_mode && !device_name.empty()) {
|
||||
+ context_ = dialog_options.hDC;
|
||||
+ success = InitializeSettings(*dev_mode, device_name, NULL, 0, false);
|
||||
+ }
|
||||
+
|
||||
+ if (!success && dialog_options.hDC) {
|
||||
+ DeleteDC(dialog_options.hDC);
|
||||
+ context_ = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (dev_mode) {
|
||||
+ GlobalUnlock(dialog_options.hDevMode);
|
||||
+ }
|
||||
+
|
||||
+ if (dialog_options.hDevMode != NULL)
|
||||
+ GlobalFree(dialog_options.hDevMode);
|
||||
+ if (dialog_options.hDevNames != NULL)
|
||||
+ GlobalFree(dialog_options.hDevNames);
|
||||
+
|
||||
+ return context_ ? OK : FAILED;
|
||||
}
|
||||
|
||||
} // namespace printing
|
||||
diff --git printing/printing_context_win.h printing/printing_context_win.h
|
||||
index 99a7e3e..f6222ad 100644
|
||||
--- printing/printing_context_win.h
|
||||
+++ printing/printing_context_win.h
|
||||
@@ -40,24 +40,45 @@ class PRINTING_EXPORT PrintingContextWin : public PrintingContext {
|
||||
virtual void ReleaseContext() OVERRIDE;
|
||||
virtual gfx::NativeDrawingContext context() const OVERRIDE;
|
||||
|
||||
+ // Allocates the HDC for a specific DEVMODE.
|
||||
+ static bool AllocateContext(const std::wstring& printer_name,
|
||||
+ const DEVMODE* dev_mode,
|
||||
+ gfx::NativeDrawingContext* context);
|
||||
+
|
||||
protected:
|
||||
- virtual scoped_ptr<DEVMODE, base::FreeDeleter> ShowPrintDialog(
|
||||
- HANDLE printer,
|
||||
- gfx::NativeView parent_view,
|
||||
- DEVMODE* dev_mode);
|
||||
+ virtual HRESULT ShowPrintDialog(PRINTDLGEX* options);
|
||||
|
||||
private:
|
||||
+ // Class that manages the PrintDlgEx() callbacks. This is meant to be a
|
||||
+ // temporary object used during the Print... dialog display.
|
||||
+ class CallbackHandler;
|
||||
+
|
||||
// Used in response to the user canceling the printing.
|
||||
static BOOL CALLBACK AbortProc(HDC hdc, int nCode);
|
||||
|
||||
// Reads the settings from the selected device context. Updates settings_ and
|
||||
// its margins.
|
||||
- virtual Result InitializeSettings(const base::string16& device_name,
|
||||
- DEVMODE* dev_mode);
|
||||
+ bool InitializeSettings(const DEVMODE& dev_mode,
|
||||
+ const std::wstring& new_device_name,
|
||||
+ const PRINTPAGERANGE* ranges,
|
||||
+ int number_ranges,
|
||||
+ bool selection_only);
|
||||
+
|
||||
+ // Retrieves the printer's default low-level settings. On Windows, context_ is
|
||||
+ // allocated with this call.
|
||||
+ bool GetPrinterSettings(HANDLE printer,
|
||||
+ const std::wstring& device_name);
|
||||
+
|
||||
+ // Parses the result of a PRINTDLGEX result.
|
||||
+ Result ParseDialogResultEx(const PRINTDLGEX& dialog_options);
|
||||
+ Result ParseDialogResult(const PRINTDLG& dialog_options);
|
||||
|
||||
// The selected printer context.
|
||||
HDC context_;
|
||||
|
||||
+ // The dialog box for the time it is shown.
|
||||
+ volatile HWND dialog_box_;
|
||||
+
|
||||
DISALLOW_COPY_AND_ASSIGN(PrintingContextWin);
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: content_browser_client.cc
|
||||
===================================================================
|
||||
--- content_browser_client.cc (revision 280796)
|
||||
+++ content_browser_client.cc (working copy)
|
||||
@@ -280,6 +280,10 @@
|
||||
diff --git content_browser_client.cc content_browser_client.cc
|
||||
index d982b69..9272897 100644
|
||||
--- content_browser_client.cc
|
||||
+++ content_browser_client.cc
|
||||
@@ -276,6 +276,10 @@ bool ContentBrowserClient::IsFastShutdownPossible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -13,19 +13,19 @@ Index: content_browser_client.cc
|
||||
base::FilePath ContentBrowserClient::GetDefaultDownloadDirectory() {
|
||||
return base::FilePath();
|
||||
}
|
||||
Index: content_browser_client.h
|
||||
===================================================================
|
||||
--- content_browser_client.h (revision 280796)
|
||||
+++ content_browser_client.h (working copy)
|
||||
@@ -23,6 +23,7 @@
|
||||
diff --git content_browser_client.h content_browser_client.h
|
||||
index f8253a6..d82c177 100644
|
||||
--- content_browser_client.h
|
||||
+++ content_browser_client.h
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "net/cookies/canonical_cookie.h"
|
||||
#include "net/url_request/url_request_interceptor.h"
|
||||
#include "net/url_request/url_request_job_factory.h"
|
||||
+#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "third_party/WebKit/public/web/WebNotificationPresenter.h"
|
||||
#include "third_party/WebKit/public/platform/WebNotificationPermission.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "webkit/browser/fileapi/file_system_context.h"
|
||||
@@ -538,6 +539,9 @@
|
||||
@@ -526,6 +527,9 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Clears browser cookies.
|
||||
virtual void ClearCookies(RenderViewHost* rvh) {}
|
||||
|
||||
@ -35,11 +35,11 @@ Index: content_browser_client.h
|
||||
// Returns the default download directory.
|
||||
// This can be called on any thread.
|
||||
virtual base::FilePath GetDefaultDownloadDirectory();
|
||||
Index: web_contents.cc
|
||||
===================================================================
|
||||
--- web_contents.cc (revision 280796)
|
||||
+++ web_contents.cc (working copy)
|
||||
@@ -17,7 +17,9 @@
|
||||
diff --git web_contents.cc web_contents.cc
|
||||
index 7afc338..c014439 100644
|
||||
--- web_contents.cc
|
||||
+++ web_contents.cc
|
||||
@@ -17,7 +17,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context)
|
||||
main_frame_routing_id(MSG_ROUTING_NONE),
|
||||
initially_hidden(false),
|
||||
guest_delegate(NULL),
|
||||
@ -50,7 +50,7 @@ Index: web_contents.cc
|
||||
|
||||
WebContents::CreateParams::CreateParams(
|
||||
BrowserContext* context, SiteInstance* site)
|
||||
@@ -29,7 +31,9 @@
|
||||
@@ -29,7 +31,9 @@ WebContents::CreateParams::CreateParams(
|
||||
main_frame_routing_id(MSG_ROUTING_NONE),
|
||||
initially_hidden(false),
|
||||
guest_delegate(NULL),
|
||||
@ -61,11 +61,11 @@ Index: web_contents.cc
|
||||
|
||||
WebContents::CreateParams::~CreateParams() {
|
||||
}
|
||||
Index: web_contents.h
|
||||
===================================================================
|
||||
--- web_contents.h (revision 280796)
|
||||
+++ web_contents.h (working copy)
|
||||
@@ -51,9 +51,11 @@
|
||||
diff --git web_contents.h web_contents.h
|
||||
index 80766dc..025c8c7 100644
|
||||
--- web_contents.h
|
||||
+++ web_contents.h
|
||||
@@ -52,9 +52,11 @@ class PageState;
|
||||
class RenderFrameHost;
|
||||
class RenderProcessHost;
|
||||
class RenderViewHost;
|
||||
@ -77,7 +77,7 @@ Index: web_contents.h
|
||||
struct CustomContextMenuContext;
|
||||
struct DropData;
|
||||
struct RendererPreferences;
|
||||
@@ -116,6 +118,10 @@
|
||||
@@ -117,6 +119,10 @@ class WebContents : public PageNavigator,
|
||||
// Used to specify the location context which display the new view should
|
||||
// belong. This can be NULL if not needed.
|
||||
gfx::NativeView context;
|
||||
@ -88,11 +88,11 @@ Index: web_contents.h
|
||||
};
|
||||
|
||||
// Creates a new WebContents.
|
||||
Index: web_contents_delegate.cc
|
||||
===================================================================
|
||||
--- web_contents_delegate.cc (revision 280796)
|
||||
+++ web_contents_delegate.cc (working copy)
|
||||
@@ -136,7 +136,9 @@
|
||||
diff --git web_contents_delegate.cc web_contents_delegate.cc
|
||||
index 0028339..477040e 100644
|
||||
--- web_contents_delegate.cc
|
||||
+++ web_contents_delegate.cc
|
||||
@@ -136,7 +136,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
||||
const base::string16& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@ -103,11 +103,11 @@ Index: web_contents_delegate.cc
|
||||
return true;
|
||||
}
|
||||
|
||||
Index: web_contents_delegate.h
|
||||
===================================================================
|
||||
--- web_contents_delegate.h (revision 280796)
|
||||
+++ web_contents_delegate.h (working copy)
|
||||
@@ -36,9 +36,11 @@
|
||||
diff --git web_contents_delegate.h web_contents_delegate.h
|
||||
index b9aa02d..d840775 100644
|
||||
--- web_contents_delegate.h
|
||||
+++ web_contents_delegate.h
|
||||
@@ -37,9 +37,11 @@ class DownloadItem;
|
||||
class JavaScriptDialogManager;
|
||||
class PageState;
|
||||
class RenderViewHost;
|
||||
@ -119,7 +119,7 @@ Index: web_contents_delegate.h
|
||||
struct ColorSuggestion;
|
||||
struct ContextMenuParams;
|
||||
struct DropData;
|
||||
@@ -312,7 +314,9 @@
|
||||
@@ -312,7 +314,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
const base::string16& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: compositing_iosurface_layer_mac.mm
|
||||
===================================================================
|
||||
--- compositing_iosurface_layer_mac.mm (revision 280796)
|
||||
+++ compositing_iosurface_layer_mac.mm (working copy)
|
||||
@@ -191,7 +191,7 @@
|
||||
diff --git compositing_iosurface_layer_mac.mm compositing_iosurface_layer_mac.mm
|
||||
index 81a3529..dfcc48d 100644
|
||||
--- compositing_iosurface_layer_mac.mm
|
||||
+++ compositing_iosurface_layer_mac.mm
|
||||
@@ -268,7 +268,7 @@ void CompositingIOSurfaceLayerHelper::EndPumpingFrames() {
|
||||
TRACE_EVENT0("browser", "CompositingIOSurfaceLayer::drawInCGLContext");
|
||||
|
||||
if (!iosurface_->HasIOSurface() || context_->cgl_context() != glContext) {
|
||||
@ -11,12 +11,12 @@ Index: compositing_iosurface_layer_mac.mm
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
return;
|
||||
}
|
||||
Index: compositing_iosurface_mac.mm
|
||||
===================================================================
|
||||
--- compositing_iosurface_mac.mm (revision 280796)
|
||||
+++ compositing_iosurface_mac.mm (working copy)
|
||||
@@ -350,7 +350,7 @@
|
||||
glUseProgram(0); CHECK_AND_SAVE_GL_ERROR();
|
||||
diff --git compositing_iosurface_mac.mm compositing_iosurface_mac.mm
|
||||
index 7012399..47cb9d1 100644
|
||||
--- compositing_iosurface_mac.mm
|
||||
+++ compositing_iosurface_mac.mm
|
||||
@@ -167,7 +167,7 @@ bool CompositingIOSurfaceMac::DrawIOSurface(
|
||||
CHECK_AND_SAVE_GL_ERROR();
|
||||
} else {
|
||||
// Should match the clear color of RenderWidgetHostViewMac.
|
||||
- glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
@ -24,79 +24,11 @@ Index: compositing_iosurface_mac.mm
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
Index: compositing_iosurface_shader_programs_mac.cc
|
||||
===================================================================
|
||||
--- compositing_iosurface_shader_programs_mac.cc (revision 280796)
|
||||
+++ compositing_iosurface_shader_programs_mac.cc (working copy)
|
||||
@@ -11,6 +11,8 @@
|
||||
#include "base/debug/trace_event.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
+#include "base/strings/stringprintf.h"
|
||||
+#include "base/strings/string_number_conversions.h"
|
||||
#include "base/values.h"
|
||||
#include "content/browser/gpu/gpu_data_manager_impl.h"
|
||||
#include "gpu/config/gpu_driver_bug_workaround_type.h"
|
||||
@@ -51,6 +53,7 @@
|
||||
}
|
||||
);
|
||||
|
||||
+float bgcolor[] = {1.0f, 1.0f, 1.0f};
|
||||
|
||||
// Only calculates position.
|
||||
const char kvsSolidWhite[] = GLSL_PROGRAM_AS_STRING(
|
||||
@@ -238,6 +241,18 @@
|
||||
const GLuint shader = glCreateShader(shader_type);
|
||||
DCHECK_NE(shader, 0u);
|
||||
|
||||
+ // Support customization of the background color.
|
||||
+ std::string bg_shader;
|
||||
+ if (shader_program == SHADER_PROGRAM_SOLID_WHITE &&
|
||||
+ shader_type == GL_FRAGMENT_SHADER) {
|
||||
+ bg_shader = base::StringPrintf(
|
||||
+ "void main() { gl_FragColor = vec4(%s, %s, %s, 1.0); }",
|
||||
+ base::DoubleToString(bgcolor[0]).c_str(),
|
||||
+ base::DoubleToString(bgcolor[1]).c_str(),
|
||||
+ base::DoubleToString(bgcolor[2]).c_str());
|
||||
+ kFragmentShaderSourceCodeMap[shader_program] = bg_shader.c_str();
|
||||
+ }
|
||||
+
|
||||
// Select and compile the shader program source code.
|
||||
if (shader_type == GL_VERTEX_SHADER) {
|
||||
const GLchar* source_snippets[] = {
|
||||
@@ -412,6 +427,14 @@
|
||||
Reset();
|
||||
}
|
||||
|
||||
+// static
|
||||
+void CompositingIOSurfaceShaderPrograms::SetBackgroundColor(
|
||||
+ float r, float g, float b) {
|
||||
+ bgcolor[0] = r;
|
||||
+ bgcolor[1] = g;
|
||||
+ bgcolor[2] = b;
|
||||
+}
|
||||
+
|
||||
GLuint CompositingIOSurfaceShaderPrograms::GetShaderProgram(int which) {
|
||||
if (shader_programs_[which] == 0u) {
|
||||
shader_programs_[which] =
|
||||
Index: compositing_iosurface_shader_programs_mac.h
|
||||
===================================================================
|
||||
--- compositing_iosurface_shader_programs_mac.h (revision 280796)
|
||||
+++ compositing_iosurface_shader_programs_mac.h (working copy)
|
||||
@@ -48,6 +48,8 @@
|
||||
return rgb_to_yv12_output_format_;
|
||||
}
|
||||
|
||||
+ static void SetBackgroundColor(float r, float g, float b);
|
||||
+
|
||||
protected:
|
||||
FRIEND_TEST_ALL_PREFIXES(CompositingIOSurfaceTransformerTest,
|
||||
TransformsRGBToYV12);
|
||||
Index: render_widget_host_view_aura.cc
|
||||
===================================================================
|
||||
--- render_widget_host_view_aura.cc (revision 280796)
|
||||
+++ render_widget_host_view_aura.cc (working copy)
|
||||
@@ -1672,8 +1672,14 @@
|
||||
diff --git render_widget_host_view_aura.cc render_widget_host_view_aura.cc
|
||||
index 49ee8e4..c49ef82 100644
|
||||
--- render_widget_host_view_aura.cc
|
||||
+++ render_widget_host_view_aura.cc
|
||||
@@ -1615,8 +1615,14 @@ void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) {
|
||||
// For non-opaque windows, we don't draw anything, since we depend on the
|
||||
// canvas coming from the compositor to already be initialized as
|
||||
// transparent.
|
||||
@ -113,16 +45,16 @@ Index: render_widget_host_view_aura.cc
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged(
|
||||
Index: render_widget_host_view_mac.mm
|
||||
===================================================================
|
||||
--- render_widget_host_view_mac.mm (revision 280796)
|
||||
+++ render_widget_host_view_mac.mm (working copy)
|
||||
@@ -504,7 +504,7 @@
|
||||
|
||||
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
|
||||
index 4ebbd62..7b3983a 100644
|
||||
--- render_widget_host_view_mac.mm
|
||||
+++ render_widget_host_view_mac.mm
|
||||
@@ -507,7 +507,7 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget)
|
||||
// draw.
|
||||
background_layer_.reset([[CALayer alloc] init]);
|
||||
[background_layer_
|
||||
- setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
|
||||
+ setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
|
||||
[background_layer_ setGeometryFlipped:YES];
|
||||
[background_layer_ setContentsGravity:kCAGravityTopLeft];
|
||||
[cocoa_view_ setLayer:background_layer_];
|
||||
[cocoa_view_ setWantsLayer:YES];
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: core/frame/FrameView.cpp
|
||||
===================================================================
|
||||
--- core/frame/FrameView.cpp (revision 177271)
|
||||
+++ core/frame/FrameView.cpp (working copy)
|
||||
@@ -139,8 +139,10 @@
|
||||
diff --git core/frame/FrameView.cpp core/frame/FrameView.cpp
|
||||
index 5d42bda..70e70a6 100644
|
||||
--- core/frame/FrameView.cpp
|
||||
+++ core/frame/FrameView.cpp
|
||||
@@ -126,8 +126,10 @@ FrameView::FrameView(LocalFrame* frame)
|
||||
if (!m_frame->isMainFrame())
|
||||
return;
|
||||
|
||||
@ -13,11 +13,11 @@ Index: core/frame/FrameView.cpp
|
||||
}
|
||||
|
||||
PassRefPtr<FrameView> FrameView::create(LocalFrame* frame)
|
||||
Index: platform/scroll/ScrollbarThemeMacCommon.mm
|
||||
===================================================================
|
||||
--- platform/scroll/ScrollbarThemeMacCommon.mm (revision 177271)
|
||||
+++ platform/scroll/ScrollbarThemeMacCommon.mm (working copy)
|
||||
@@ -355,10 +355,14 @@
|
||||
diff --git platform/scroll/ScrollbarThemeMacCommon.mm platform/scroll/ScrollbarThemeMacCommon.mm
|
||||
index 309e1e3..b40a19a 100644
|
||||
--- platform/scroll/ScrollbarThemeMacCommon.mm
|
||||
+++ platform/scroll/ScrollbarThemeMacCommon.mm
|
||||
@@ -355,10 +355,14 @@ NSScrollerStyle ScrollbarThemeMacCommon::recommendedScrollerStyle()
|
||||
// static
|
||||
bool ScrollbarThemeMacCommon::isOverlayAPIAvailable()
|
||||
{
|
||||
@ -31,4 +31,4 @@ Index: platform/scroll/ScrollbarThemeMacCommon.mm
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace WebCore
|
||||
} // namespace blink
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: os_exchange_data_provider_aurax11.cc
|
||||
===================================================================
|
||||
--- os_exchange_data_provider_aurax11.cc (revision 280796)
|
||||
+++ os_exchange_data_provider_aurax11.cc (working copy)
|
||||
@@ -155,7 +155,8 @@
|
||||
diff --git os_exchange_data_provider_aurax11.cc os_exchange_data_provider_aurax11.cc
|
||||
index 714069f..56c7fa5 100644
|
||||
--- os_exchange_data_provider_aurax11.cc
|
||||
+++ os_exchange_data_provider_aurax11.cc
|
||||
@@ -158,7 +158,8 @@ void OSExchangeDataProviderAuraX11::SetURL(const GURL& url,
|
||||
format_map_.Insert(atom_cache_.GetAtom(kMimeTypeMozillaURL), mem);
|
||||
|
||||
// Set a string fallback as well.
|
||||
|
@ -1,11 +1,11 @@
|
||||
Index: underlay_opengl_hosting_window.h
|
||||
===================================================================
|
||||
--- underlay_opengl_hosting_window.h (revision 280796)
|
||||
+++ underlay_opengl_hosting_window.h (working copy)
|
||||
diff --git underlay_opengl_hosting_window.h underlay_opengl_hosting_window.h
|
||||
index d673c31..806d134 100644
|
||||
--- underlay_opengl_hosting_window.h
|
||||
+++ underlay_opengl_hosting_window.h
|
||||
@@ -12,7 +12,7 @@
|
||||
// Common base class for windows that host a OpenGL surface that renders under
|
||||
// the window. Contains methods relating to hole punching so that the OpenGL
|
||||
// surface is visible through the window.
|
||||
// the window. Previously contained methods related to hole punching, now just
|
||||
// contains common asserts.
|
||||
-UI_BASE_EXPORT
|
||||
+__attribute__((visibility("default")))
|
||||
@interface UnderlayOpenGLHostingWindow : NSWindow
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: desktop_aura/desktop_screen_win.cc
|
||||
===================================================================
|
||||
--- desktop_aura/desktop_screen_win.cc (revision 280796)
|
||||
+++ desktop_aura/desktop_screen_win.cc (working copy)
|
||||
@@ -54,6 +54,8 @@
|
||||
diff --git desktop_aura/desktop_screen_win.cc desktop_aura/desktop_screen_win.cc
|
||||
index aede179..abad021 100644
|
||||
--- desktop_aura/desktop_screen_win.cc
|
||||
+++ desktop_aura/desktop_screen_win.cc
|
||||
@@ -36,6 +36,8 @@ gfx::Display DesktopScreenWin::GetDisplayMatching(
|
||||
}
|
||||
|
||||
HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
|
||||
@ -11,11 +11,11 @@ Index: desktop_aura/desktop_screen_win.cc
|
||||
aura::WindowTreeHost* host = window->GetHost();
|
||||
return host ? host->GetAcceleratedWidget() : NULL;
|
||||
}
|
||||
Index: desktop_aura/desktop_screen_x11.cc
|
||||
===================================================================
|
||||
--- desktop_aura/desktop_screen_x11.cc (revision 280796)
|
||||
+++ desktop_aura/desktop_screen_x11.cc (working copy)
|
||||
@@ -220,6 +220,9 @@
|
||||
diff --git desktop_aura/desktop_screen_x11.cc desktop_aura/desktop_screen_x11.cc
|
||||
index f4c03da..bb253cf 100644
|
||||
--- desktop_aura/desktop_screen_x11.cc
|
||||
+++ desktop_aura/desktop_screen_x11.cc
|
||||
@@ -157,6 +157,9 @@ std::vector<gfx::Display> DesktopScreenX11::GetAllDisplays() const {
|
||||
|
||||
gfx::Display DesktopScreenX11::GetDisplayNearestWindow(
|
||||
gfx::NativeView window) const {
|
||||
@ -25,11 +25,11 @@ Index: desktop_aura/desktop_screen_x11.cc
|
||||
// Getting screen bounds here safely is hard.
|
||||
//
|
||||
// You'd think we'd be able to just call window->GetBoundsInScreen(), but we
|
||||
Index: desktop_aura/desktop_window_tree_host_win.cc
|
||||
===================================================================
|
||||
--- desktop_aura/desktop_window_tree_host_win.cc (revision 280796)
|
||||
+++ desktop_aura/desktop_window_tree_host_win.cc (working copy)
|
||||
@@ -129,7 +129,9 @@
|
||||
diff --git desktop_aura/desktop_window_tree_host_win.cc desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 877e8d1..d3a03c6 100644
|
||||
--- desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -129,7 +129,9 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window,
|
||||
native_widget_delegate_);
|
||||
|
||||
HWND parent_hwnd = NULL;
|
||||
@ -40,7 +40,7 @@ Index: desktop_aura/desktop_window_tree_host_win.cc
|
||||
parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget();
|
||||
|
||||
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
|
||||
@@ -770,6 +772,7 @@
|
||||
@@ -769,6 +771,7 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
|
||||
|
||||
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
|
||||
// TODO(beng): inform the native_widget_delegate_.
|
||||
@ -48,7 +48,7 @@ Index: desktop_aura/desktop_window_tree_host_win.cc
|
||||
InputMethod* input_method = GetInputMethod();
|
||||
if (input_method)
|
||||
input_method->OnFocus();
|
||||
@@ -777,6 +780,7 @@
|
||||
@@ -776,6 +779,7 @@ void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
|
||||
|
||||
void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) {
|
||||
// TODO(beng): inform the native_widget_delegate_.
|
||||
@ -56,11 +56,11 @@ Index: desktop_aura/desktop_window_tree_host_win.cc
|
||||
InputMethod* input_method = GetInputMethod();
|
||||
if (input_method)
|
||||
input_method->OnBlur();
|
||||
Index: desktop_aura/desktop_window_tree_host_x11.cc
|
||||
===================================================================
|
||||
--- desktop_aura/desktop_window_tree_host_x11.cc (revision 280796)
|
||||
+++ desktop_aura/desktop_window_tree_host_x11.cc (working copy)
|
||||
@@ -148,7 +148,8 @@
|
||||
diff --git desktop_aura/desktop_window_tree_host_x11.cc desktop_aura/desktop_window_tree_host_x11.cc
|
||||
index 03b2cfb..c15798a 100644
|
||||
--- desktop_aura/desktop_window_tree_host_x11.cc
|
||||
+++ desktop_aura/desktop_window_tree_host_x11.cc
|
||||
@@ -146,7 +146,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
window_parent_(NULL),
|
||||
window_shape_(NULL),
|
||||
custom_window_shape_(false),
|
||||
@ -70,7 +70,7 @@ Index: desktop_aura/desktop_window_tree_host_x11.cc
|
||||
}
|
||||
|
||||
DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
|
||||
@@ -347,7 +348,8 @@
|
||||
@@ -349,7 +350,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
|
||||
// Actually free our native resources.
|
||||
if (ui::PlatformEventSource::GetInstance())
|
||||
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
|
||||
@ -80,7 +80,7 @@ Index: desktop_aura/desktop_window_tree_host_x11.cc
|
||||
xwindow_ = None;
|
||||
|
||||
desktop_native_widget_aura_->OnHostClosed();
|
||||
@@ -443,6 +445,8 @@
|
||||
@@ -446,6 +448,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
|
||||
}
|
||||
|
||||
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
|
||||
@ -89,7 +89,7 @@ Index: desktop_aura/desktop_window_tree_host_x11.cc
|
||||
return bounds_;
|
||||
}
|
||||
|
||||
@@ -455,6 +459,8 @@
|
||||
@@ -458,6 +462,8 @@ gfx::Rect DesktopWindowTreeHostX11::GetClientAreaBoundsInScreen() const {
|
||||
// Attempts to calculate the rect by asking the NonClientFrameView what it
|
||||
// thought its GetBoundsForClientView() were broke combobox drop down
|
||||
// placement.
|
||||
@ -98,7 +98,7 @@ Index: desktop_aura/desktop_window_tree_host_x11.cc
|
||||
return bounds_;
|
||||
}
|
||||
|
||||
@@ -899,6 +905,8 @@
|
||||
@@ -924,6 +930,8 @@ void DesktopWindowTreeHostX11::SetBounds(const gfx::Rect& requested_bounds) {
|
||||
}
|
||||
|
||||
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
|
||||
@ -107,7 +107,7 @@ Index: desktop_aura/desktop_window_tree_host_x11.cc
|
||||
return bounds_.origin();
|
||||
}
|
||||
|
||||
@@ -1042,9 +1050,13 @@
|
||||
@@ -1072,10 +1080,14 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,14 +115,15 @@ Index: desktop_aura/desktop_window_tree_host_x11.cc
|
||||
+ if (parent_widget == gfx::kNullAcceleratedWidget)
|
||||
+ parent_widget = x_root_window_;
|
||||
+
|
||||
bounds_ = params.bounds;
|
||||
bounds_ = gfx::Rect(params.bounds.origin(),
|
||||
AdjustSize(params.bounds.size()));
|
||||
xwindow_ = XCreateWindow(
|
||||
- xdisplay_, x_root_window_,
|
||||
+ xdisplay_, parent_widget,
|
||||
bounds_.x(), bounds_.y(),
|
||||
bounds_.width(), bounds_.height(),
|
||||
0, // border width
|
||||
@@ -1600,6 +1612,10 @@
|
||||
@@ -1678,6 +1690,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -133,11 +134,11 @@ Index: desktop_aura/desktop_window_tree_host_x11.cc
|
||||
case FocusOut:
|
||||
if (xev->xfocus.mode != NotifyGrab) {
|
||||
ReleaseCapture();
|
||||
Index: desktop_aura/desktop_window_tree_host_x11.h
|
||||
===================================================================
|
||||
--- desktop_aura/desktop_window_tree_host_x11.h (revision 280796)
|
||||
+++ desktop_aura/desktop_window_tree_host_x11.h (working copy)
|
||||
@@ -84,6 +84,8 @@
|
||||
diff --git desktop_aura/desktop_window_tree_host_x11.h desktop_aura/desktop_window_tree_host_x11.h
|
||||
index 1c08221..f0ae19f 100644
|
||||
--- desktop_aura/desktop_window_tree_host_x11.h
|
||||
+++ desktop_aura/desktop_window_tree_host_x11.h
|
||||
@@ -85,6 +85,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// Deallocates the internal list of open windows.
|
||||
static void CleanUpWindowList();
|
||||
|
||||
@ -146,7 +147,7 @@ Index: desktop_aura/desktop_window_tree_host_x11.h
|
||||
protected:
|
||||
// Overridden from DesktopWindowTreeHost:
|
||||
virtual void Init(aura::Window* content_window,
|
||||
@@ -250,6 +252,9 @@
|
||||
@@ -257,6 +259,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// The bounds of |xwindow_|.
|
||||
gfx::Rect bounds_;
|
||||
|
||||
@ -156,9 +157,9 @@ Index: desktop_aura/desktop_window_tree_host_x11.h
|
||||
// Whenever the bounds are set, we keep the previous set of bounds around so
|
||||
// we can have a better chance of getting the real |restored_bounds_|. Window
|
||||
// managers tend to send a Configure message with the maximized bounds, and
|
||||
@@ -331,6 +336,9 @@
|
||||
// the frame when |xwindow_| gains focus or handles a mouse button event.
|
||||
bool urgency_hint_set_;
|
||||
@@ -336,6 +341,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
|
||||
base::CancelableCallback<void()> delayed_resize_task_;
|
||||
|
||||
+ // True if the xwindow has already been destroyed.
|
||||
+ bool xwindow_destroyed_;
|
||||
@ -166,11 +167,11 @@ Index: desktop_aura/desktop_window_tree_host_x11.h
|
||||
DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
|
||||
};
|
||||
|
||||
Index: widget.cc
|
||||
===================================================================
|
||||
--- widget.cc (revision 280796)
|
||||
+++ widget.cc (working copy)
|
||||
@@ -116,6 +116,7 @@
|
||||
diff --git widget.cc widget.cc
|
||||
index d4b16bb..5af6aa1 100644
|
||||
--- widget.cc
|
||||
+++ widget.cc
|
||||
@@ -116,6 +116,7 @@ Widget::InitParams::InitParams()
|
||||
show_state(ui::SHOW_STATE_DEFAULT),
|
||||
double_buffer(false),
|
||||
parent(NULL),
|
||||
@ -178,7 +179,7 @@ Index: widget.cc
|
||||
native_widget(NULL),
|
||||
desktop_window_tree_host(NULL),
|
||||
layer_type(aura::WINDOW_LAYER_TEXTURED),
|
||||
@@ -140,6 +141,7 @@
|
||||
@@ -140,6 +141,7 @@ Widget::InitParams::InitParams(Type type)
|
||||
show_state(ui::SHOW_STATE_DEFAULT),
|
||||
double_buffer(false),
|
||||
parent(NULL),
|
||||
@ -186,7 +187,7 @@ Index: widget.cc
|
||||
native_widget(NULL),
|
||||
desktop_window_tree_host(NULL),
|
||||
layer_type(aura::WINDOW_LAYER_TEXTURED),
|
||||
@@ -314,7 +316,7 @@
|
||||
@@ -314,7 +316,7 @@ void Widget::Init(const InitParams& in_params) {
|
||||
InitParams params = in_params;
|
||||
|
||||
params.child |= (params.type == InitParams::TYPE_CONTROL);
|
||||
@ -195,7 +196,7 @@ Index: widget.cc
|
||||
|
||||
if (params.opacity == views::Widget::InitParams::INFER_OPACITY &&
|
||||
params.type != views::Widget::InitParams::TYPE_WINDOW &&
|
||||
@@ -375,7 +377,12 @@
|
||||
@@ -375,7 +377,12 @@ void Widget::Init(const InitParams& in_params) {
|
||||
Minimize();
|
||||
} else if (params.delegate) {
|
||||
SetContentsView(params.delegate->GetContentsView());
|
||||
@ -209,11 +210,11 @@ Index: widget.cc
|
||||
}
|
||||
// This must come after SetContentsView() or it might not be able to find
|
||||
// the correct NativeTheme (on Linux). See http://crbug.com/384492
|
||||
Index: widget.h
|
||||
===================================================================
|
||||
--- widget.h (revision 280796)
|
||||
+++ widget.h (working copy)
|
||||
@@ -222,6 +222,7 @@
|
||||
diff --git widget.h widget.h
|
||||
index fad5506..7828ced 100644
|
||||
--- widget.h
|
||||
+++ widget.h
|
||||
@@ -225,6 +225,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
// Should the widget be double buffered? Default is false.
|
||||
bool double_buffer;
|
||||
gfx::NativeView parent;
|
||||
|
@ -1,13 +0,0 @@
|
||||
Index: WebNode.cpp
|
||||
===================================================================
|
||||
--- WebNode.cpp (revision 177271)
|
||||
+++ WebNode.cpp (working copy)
|
||||
@@ -173,7 +173,7 @@
|
||||
void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
|
||||
{
|
||||
// Please do not add more eventTypes to this list without an API review.
|
||||
- RELEASE_ASSERT(eventType == "mousedown");
|
||||
+ // RELEASE_ASSERT(eventType == "mousedown");
|
||||
|
||||
EventListenerWrapper* listenerWrapper = listener->createEventListenerWrapper(eventType, useCapture, m_private.get());
|
||||
// The listenerWrapper is only referenced by the actual Node. Once it goes
|
@ -1,8 +1,8 @@
|
||||
diff --git ThemeMac.mm ThemeMac.mm
|
||||
index 4e702e1..927b2e8 100644
|
||||
index 8da614b..14c865d 100644
|
||||
--- ThemeMac.mm
|
||||
+++ ThemeMac.mm
|
||||
@@ -472,7 +472,7 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext*
|
||||
@@ -490,7 +490,7 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext*
|
||||
|
||||
[buttonCell drawWithFrame:NSRect(inflatedRect) inView:view];
|
||||
#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
|
||||
|
@ -1,20 +1,8 @@
|
||||
Index: public/web/WebView.h
|
||||
===================================================================
|
||||
--- public/web/WebView.h (revision 177271)
|
||||
+++ public/web/WebView.h (working copy)
|
||||
@@ -416,6 +416,7 @@
|
||||
|
||||
// Sets whether select popup menus should be rendered by the browser.
|
||||
BLINK_EXPORT static void setUseExternalPopupMenus(bool);
|
||||
+ virtual void setUseExternalPopupMenusThisInstance(bool) = 0;
|
||||
|
||||
// Hides any popup (suggestions, selects...) that might be showing.
|
||||
virtual void hidePopups() = 0;
|
||||
Index: Source/web/ChromeClientImpl.cpp
|
||||
===================================================================
|
||||
--- Source/web/ChromeClientImpl.cpp (revision 177271)
|
||||
+++ Source/web/ChromeClientImpl.cpp (working copy)
|
||||
@@ -717,7 +717,7 @@
|
||||
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
||||
index 3a2b428..961197c 100644
|
||||
--- Source/web/ChromeClientImpl.cpp
|
||||
+++ Source/web/ChromeClientImpl.cpp
|
||||
@@ -709,7 +709,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
||||
|
||||
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) const
|
||||
{
|
||||
@ -23,11 +11,11 @@ Index: Source/web/ChromeClientImpl.cpp
|
||||
return adoptRef(new ExternalPopupMenu(frame, client, *m_webView));
|
||||
|
||||
return adoptRef(new PopupMenuChromium(frame, client));
|
||||
Index: Source/web/WebViewImpl.cpp
|
||||
===================================================================
|
||||
--- Source/web/WebViewImpl.cpp (revision 177271)
|
||||
+++ Source/web/WebViewImpl.cpp (working copy)
|
||||
@@ -369,6 +369,7 @@
|
||||
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
||||
index a953461..2376cfb 100644
|
||||
--- Source/web/WebViewImpl.cpp
|
||||
+++ Source/web/WebViewImpl.cpp
|
||||
@@ -378,6 +378,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
|
||||
, m_fakePageScaleAnimationPageScaleFactor(0)
|
||||
, m_fakePageScaleAnimationUseAnchor(false)
|
||||
, m_contextMenuAllowed(false)
|
||||
@ -35,7 +23,7 @@ Index: Source/web/WebViewImpl.cpp
|
||||
, m_doingDragAndDrop(false)
|
||||
, m_ignoreInputEvents(false)
|
||||
, m_compositorDeviceScaleFactorOverride(0)
|
||||
@@ -3679,9 +3680,14 @@
|
||||
@@ -3790,9 +3791,14 @@ void WebViewImpl::deviceOrPageScaleFactorChanged()
|
||||
m_page->inspectorController().deviceOrPageScaleFactorChanged();
|
||||
}
|
||||
|
||||
@ -51,11 +39,11 @@ Index: Source/web/WebViewImpl.cpp
|
||||
}
|
||||
|
||||
void WebViewImpl::startDragging(LocalFrame* frame,
|
||||
Index: Source/web/WebViewImpl.h
|
||||
===================================================================
|
||||
--- Source/web/WebViewImpl.h (revision 177271)
|
||||
+++ Source/web/WebViewImpl.h (working copy)
|
||||
@@ -353,7 +353,8 @@
|
||||
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
||||
index 0db68d6..1aa5c26 100644
|
||||
--- Source/web/WebViewImpl.h
|
||||
+++ Source/web/WebViewImpl.h
|
||||
@@ -358,7 +358,8 @@ public:
|
||||
|
||||
// Returns true if popup menus should be rendered by the browser, false if
|
||||
// they should be rendered by WebKit (which is the default).
|
||||
@ -65,7 +53,7 @@ Index: Source/web/WebViewImpl.h
|
||||
|
||||
bool contextMenuAllowed() const
|
||||
{
|
||||
@@ -625,6 +626,8 @@
|
||||
@@ -637,6 +638,8 @@ private:
|
||||
|
||||
bool m_contextMenuAllowed;
|
||||
|
||||
@ -74,3 +62,15 @@ Index: Source/web/WebViewImpl.h
|
||||
bool m_doingDragAndDrop;
|
||||
|
||||
bool m_ignoreInputEvents;
|
||||
diff --git public/web/WebView.h public/web/WebView.h
|
||||
index 40ff9b3..82c77fe 100644
|
||||
--- public/web/WebView.h
|
||||
+++ public/web/WebView.h
|
||||
@@ -409,6 +409,7 @@ public:
|
||||
|
||||
// Sets whether select popup menus should be rendered by the browser.
|
||||
BLINK_EXPORT static void setUseExternalPopupMenus(bool);
|
||||
+ virtual void setUseExternalPopupMenusThisInstance(bool) = 0;
|
||||
|
||||
// Hides any popup (suggestions, selects...) that might be showing.
|
||||
virtual void hidePopups() = 0;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: contrib/minizip/unzip.c
|
||||
===================================================================
|
||||
--- contrib/minizip/unzip.c (revision 280796)
|
||||
+++ contrib/minizip/unzip.c (working copy)
|
||||
diff --git contrib/minizip/unzip.c contrib/minizip/unzip.c
|
||||
index af59b80..ee3c0fd 100644
|
||||
--- contrib/minizip/unzip.c
|
||||
+++ contrib/minizip/unzip.c
|
||||
@@ -69,7 +69,7 @@
|
||||
#include <string.h>
|
||||
|
||||
|
Reference in New Issue
Block a user