Update to Chromium revision 40af916d (#303546).

- Standardize usage of virtual/override specifiers in CEF internals (see http://crbug.com/417463).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1903 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-11-12 19:25:15 +00:00
parent 470518a52e
commit eef89ccdd3
329 changed files with 3160 additions and 3731 deletions

View File

@@ -1,60 +0,0 @@
diff --git compositor/io_surface_layer_mac.mm compositor/io_surface_layer_mac.mm
index 357c65e..371e3c4 100644
--- compositor/io_surface_layer_mac.mm
+++ compositor/io_surface_layer_mac.mm
@@ -295,7 +295,7 @@ void IOSurfaceLayerHelper::EndPumpingFrames() {
TRACE_EVENT0("browser", "IOSurfaceLayer::drawInCGLContext");
if (!iosurface_->HasIOSurface() || context_->cgl_context() != glContext) {
- glClearColor(1, 1, 1, 1);
+ glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
return;
}
diff --git renderer_host/compositing_iosurface_mac.mm renderer_host/compositing_iosurface_mac.mm
index ba67fc9..2c6a410 100644
--- renderer_host/compositing_iosurface_mac.mm
+++ renderer_host/compositing_iosurface_mac.mm
@@ -168,7 +168,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);
+ glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
}
diff --git renderer_host/render_widget_host_view_aura.cc renderer_host/render_widget_host_view_aura.cc
index 6ad6e41..9f33679 100644
--- renderer_host/render_widget_host_view_aura.cc
+++ renderer_host/render_widget_host_view_aura.cc
@@ -1706,8 +1706,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.
- if (window_->layer()->fills_bounds_opaquely())
- canvas->DrawColor(SK_ColorWHITE);
+ if (window_->layer()->fills_bounds_opaquely()) {
+ if (host_->IsRenderView()) {
+ canvas->DrawColor(GetContentClient()->browser()->GetBaseBackgroundColor(
+ RenderViewHost::From(host_)));
+ } else {
+ canvas->DrawColor(SK_ColorWHITE);
+ }
+ }
}
void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged(
diff --git renderer_host/render_widget_host_view_mac.mm renderer_host/render_widget_host_view_mac.mm
index 0d4d03c..8615203 100644
--- renderer_host/render_widget_host_view_mac.mm
+++ renderer_host/render_widget_host_view_mac.mm
@@ -541,7 +541,7 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget)
// draw.
background_layer_.reset([[CALayer alloc] init]);
[background_layer_
- setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
+ setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
[cocoa_view_ setLayer:background_layer_];
[cocoa_view_ setWantsLayer:YES];

View File

@@ -1,8 +1,8 @@
diff --git web_contents_impl.cc web_contents_impl.cc
index b6ff810..e783922 100644
index 3119566..32c43dd 100644
--- web_contents_impl.cc
+++ web_contents_impl.cc
@@ -1195,22 +1195,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1153,22 +1153,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
params.browser_context, params.site_instance, params.routing_id,
params.main_frame_routing_id);
@@ -48,7 +48,7 @@ index b6ff810..e783922 100644
}
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -1529,6 +1536,9 @@ void WebContentsImpl::CreateNewWindow(
@@ -1501,6 +1508,9 @@ void WebContentsImpl::CreateNewWindow(
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
@@ -58,7 +58,7 @@ index b6ff810..e783922 100644
if (delegate_ &&
!delegate_->ShouldCreateWebContents(this,
route_id,
@@ -1536,7 +1546,9 @@ void WebContentsImpl::CreateNewWindow(
@@ -1508,7 +1518,9 @@ void WebContentsImpl::CreateNewWindow(
params.frame_name,
params.target_url,
partition_id,
@@ -69,7 +69,7 @@ index b6ff810..e783922 100644
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
@@ -1556,6 +1568,8 @@ void WebContentsImpl::CreateNewWindow(
@@ -1528,6 +1540,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;

View File

@@ -1,5 +1,5 @@
diff --git common.gypi common.gypi
index dc0f525..fb1889c 100644
index f97bf66..116c7bc 100644
--- common.gypi
+++ common.gypi
@@ -9,6 +9,9 @@
@@ -12,7 +12,7 @@ index dc0f525..fb1889c 100644
# 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
@@ -5391,6 +5394,9 @@
@@ -5486,6 +5489,9 @@
4510, # Default constructor could not be generated
4512, # Assignment operator could not be generated
4610, # Object can never be instantiated
@@ -23,10 +23,10 @@ index dc0f525..fb1889c 100644
'msvs_settings': {
'VCCLCompilerTool': {
diff --git gyp_chromium gyp_chromium
index 326919c0..67d0a00 100755
index ad2796b..1407d9c 100755
--- gyp_chromium
+++ gyp_chromium
@@ -263,12 +263,6 @@ if __name__ == '__main__':
@@ -269,12 +269,6 @@ if __name__ == '__main__':
if sys.platform not in ('darwin',):
args.append('--no-circular-check')

View File

@@ -1,8 +1,8 @@
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
index 2435d2c..50bb688 100644
index ca1b9fe..1868fc8 100644
--- public/renderer/content_renderer_client.cc
+++ public/renderer/content_renderer_client.cc
@@ -92,7 +92,6 @@ bool ContentRendererClient::AllowPopup() {
@@ -98,7 +98,6 @@ bool ContentRendererClient::AllowPopup() {
return false;
}
@@ -10,7 +10,7 @@ index 2435d2c..50bb688 100644
bool ContentRendererClient::HandleNavigation(
RenderFrame* render_frame,
DocumentState* document_state,
@@ -104,7 +103,6 @@ bool ContentRendererClient::HandleNavigation(
@@ -110,7 +109,6 @@ bool ContentRendererClient::HandleNavigation(
bool is_redirect) {
return false;
}
@@ -19,10 +19,10 @@ index 2435d2c..50bb688 100644
bool ContentRendererClient::ShouldFork(blink::WebFrame* frame,
const GURL& url,
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
index 55db98c..8f155d6 100644
index 7b79a5c..1a8784b 100644
--- public/renderer/content_renderer_client.h
+++ public/renderer/content_renderer_client.h
@@ -182,7 +182,6 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -193,7 +193,6 @@ class CONTENT_EXPORT ContentRendererClient {
// Returns true if a popup window should be allowed.
virtual bool AllowPopup();
@@ -30,7 +30,7 @@ index 55db98c..8f155d6 100644
// 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
@@ -197,7 +196,6 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -208,7 +207,6 @@ class CONTENT_EXPORT ContentRendererClient {
blink::WebNavigationType type,
blink::WebNavigationPolicy default_policy,
bool is_redirect);
@@ -39,10 +39,10 @@ index 55db98c..8f155d6 100644
// 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
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
index fcea3a1..f1f1df3 100644
index 9dfdf6b..da8622d 100644
--- renderer/render_frame_impl.cc
+++ renderer/render_frame_impl.cc
@@ -3468,7 +3468,6 @@ void RenderFrameImpl::FocusedNodeChanged(const WebNode& node) {
@@ -3714,7 +3714,6 @@ void RenderFrameImpl::OnCommitNavigation(
WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
RenderFrame* render_frame,
const NavigationPolicyInfo& info) {
@@ -50,7 +50,7 @@ index fcea3a1..f1f1df3 100644
// The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved.
if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
@@ -3483,7 +3482,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
@@ -3729,7 +3728,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
info.isRedirect)) {
return blink::WebNavigationPolicyIgnore;
}

View File

@@ -1,5 +1,5 @@
diff --git resource_ids resource_ids
index c4a6337..127433b 100644
index 4681b25..9b63284 100644
--- resource_ids
+++ resource_ids
@@ -14,6 +14,12 @@

View File

@@ -1,8 +1,8 @@
diff --git gyp/generator/ninja.py gyp/generator/ninja.py
index 4484f93..8a94869 100644
index cfb13fc..132bb8c 100644
--- gyp/generator/ninja.py
+++ gyp/generator/ninja.py
@@ -743,7 +743,16 @@ class NinjaWriter:
@@ -742,7 +742,16 @@ class NinjaWriter:
for path in copy['files']:
# Normalize the path so trailing slashes don't confuse us.
path = os.path.normpath(path)

View File

@@ -1,5 +1,5 @@
diff --git message_loop.cc message_loop.cc
index c01e542..232e7bf 100644
index 01402d0..dd910bd 100644
--- message_loop.cc
+++ message_loop.cc
@@ -158,7 +158,6 @@ MessageLoop::MessageLoop(scoped_ptr<MessagePump> pump)

View File

@@ -1,8 +1,8 @@
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
index 1d045b0..e336118 100644
index cb17472..9fac25e 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)
@@ -177,6 +177,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)
@@ -11,34 +11,34 @@ index 1d045b0..e336118 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
index 32f7987..7e166c4 100644
index dbe1629..c14ac82 100644
--- public/common/web_preferences.cc
+++ public/common/web_preferences.cc
@@ -135,6 +135,7 @@ WebPreferences::WebPreferences()
@@ -150,6 +150,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),
v8_script_streaming_enabled(false),
cookie_enabled(true),
v8_script_streaming_mode(V8_SCRIPT_STREAMING_MODE_ALL),
diff --git public/common/web_preferences.h public/common/web_preferences.h
index b0a95ca..8c0781e 100644
index 057174f..a76d7a7 100644
--- public/common/web_preferences.h
+++ public/common/web_preferences.h
@@ -141,6 +141,7 @@ struct CONTENT_EXPORT WebPreferences {
@@ -152,6 +152,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;
bool v8_script_streaming_enabled;
V8ScriptStreamingMode v8_script_streaming_mode;
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
index b931da5..73b30b4 100644
index 56a719e..d61c1cb 100644
--- renderer/render_view_impl.cc
+++ renderer/render_view_impl.cc
@@ -971,6 +971,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
@@ -963,6 +963,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
settings->setJavaEnabled(prefs.java_enabled);

View File

@@ -0,0 +1,38 @@
diff --git chrome/renderer/printing/print_web_view_helper_mac.mm chrome/renderer/printing/print_web_view_helper_mac.mm
index ffde22c..6c776ce 100644
--- chrome/renderer/printing/print_web_view_helper_mac.mm
+++ chrome/renderer/printing/print_web_view_helper_mac.mm
@@ -127,12 +127,14 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
skia::SetIsPreviewMetafile(*canvas, is_preview);
+#if defined(ENABLE_PRINT_PREVIEW)
if (params.display_header_footer) {
PrintHeaderAndFooter(static_cast<blink::WebCanvas*>(canvas),
page_number + 1,
print_preview_context_.total_page_count(), *frame,
scale_factor, page_layout_in_points, params);
}
+#endif // ENABLE_PRINT_PREVIEW
RenderPageContent(frame, page_number, canvas_area, content_area,
scale_factor, static_cast<blink::WebCanvas*>(canvas));
}
diff --git chrome/renderer/printing/print_web_view_helper_pdf_win.cc chrome/renderer/printing/print_web_view_helper_pdf_win.cc
index d9554d7..9ca18a7 100644
--- chrome/renderer/printing/print_web_view_helper_pdf_win.cc
+++ chrome/renderer/printing/print_web_view_helper_pdf_win.cc
@@ -187,12 +187,14 @@ void PrintWebViewHelper::PrintPageInternal(
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
+#if defined(ENABLE_PRINT_PREVIEW)
if (params.params.display_header_footer) {
// |page_number| is 0-based, so 1 is added.
PrintHeaderAndFooter(canvas, params.page_number + 1,
print_preview_context_.total_page_count(), *frame,
scale_factor, page_layout_in_points, params.params);
}
+#endif // ENABLE_PRINT_PREVIEW
float webkit_scale_factor =
RenderPageContent(frame, params.page_number, canvas_area, content_area,

View File

@@ -1,296 +0,0 @@
diff --git chrome/common/chrome_utility_printing_messages.h chrome/common/chrome_utility_printing_messages.h
index d5ddd6e..7d90287 100644
--- chrome/common/chrome_utility_printing_messages.h
+++ chrome/common/chrome_utility_printing_messages.h
@@ -16,8 +16,8 @@
#define IPC_MESSAGE_START ChromeUtilityPrintingMsgStart
+// Preview and Cloud Print messages.
#if defined(ENABLE_FULL_PRINTING)
-
IPC_STRUCT_TRAITS_BEGIN(printing::PrinterCapsAndDefaults)
IPC_STRUCT_TRAITS_MEMBER(printer_capabilities)
IPC_STRUCT_TRAITS_MEMBER(caps_mime_type)
@@ -61,23 +61,6 @@ IPC_STRUCT_TRAITS_END()
// Utility process messages:
// These are messages from the browser to the utility process.
-#if defined(OS_WIN)
-// Tell the utility process to start rendering the given PDF into a metafile.
-// Utility process would be alive until
-// ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop message.
-IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles,
- IPC::PlatformFileForTransit, /* input_file */
- printing::PdfRenderSettings /* settings */)
-
-// Requests conversion of the next page.
-IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles_GetPage,
- int /* page_number */,
- IPC::PlatformFileForTransit /* output_file */)
-
-// Requests utility process to stop conversion and exit.
-IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop)
-#endif // OS_WIN
-
// Tell the utility process to render the given PDF into a PWGRaster.
IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_RenderPDFPagesToPWGRaster,
IPC::PlatformFileForTransit, /* Input PDF file */
@@ -99,23 +82,32 @@ IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterCapsAndDefaults,
// sandbox. Returns result as printing::PrinterSemanticCapsAndDefaults.
IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterSemanticCapsAndDefaults,
std::string /* printer name */)
+#endif // ENABLE_FULL_PRINTING
+
+// Windows uses messages for printing even without preview. crbug.com/170859
+// Primary user of Windows without preview is CEF. crbug.com/417967
+#if defined(ENABLE_PRINTING) && defined(OS_WIN)
+// Tell the utility process to start rendering the given PDF into a metafile.
+// Utility process would be alive until
+// ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop message.
+IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles,
+ IPC::PlatformFileForTransit, /* input_file */
+ printing::PdfRenderSettings /* settings */)
+
+// Requests conversion of the next page.
+IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles_GetPage,
+ int /* page_number */,
+ IPC::PlatformFileForTransit /* output_file */)
+
+// Requests utility process to stop conversion and exit.
+IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop)
+#endif // ENABLE_PRINTING && OS_WIN
//------------------------------------------------------------------------------
// Utility process host messages:
// These are messages from the utility process to the browser.
-#if defined(OS_WIN)
-// Reply when the utility process loaded PDF. |page_count| is 0, if loading
-// failed.
-IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageCount,
- int /* page_count */)
-
-// Reply when the utility process rendered the PDF page.
-IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageDone,
- bool /* success */,
- double /* scale_factor */)
-#endif // OS_WIN
-
+#if defined(ENABLE_FULL_PRINTING)
// Reply when the utility process has succeeded in rendering the PDF to PWG.
IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Succeeded)
@@ -145,5 +137,16 @@ IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed,
IPC_MESSAGE_CONTROL1(
ChromeUtilityHostMsg_GetPrinterSemanticCapsAndDefaults_Failed,
std::string /* printer name */)
-
#endif // ENABLE_FULL_PRINTING
+
+#if defined(ENABLE_PRINTING) && defined(OS_WIN)
+// Reply when the utility process loaded PDF. |page_count| is 0, if loading
+// failed.
+IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageCount,
+ int /* page_count */)
+
+// Reply when the utility process rendered the PDF page.
+IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageDone,
+ bool /* success */,
+ double /* scale_factor */)
+#endif // ENABLE_PRINTING && OS_WIN
diff --git content/renderer/pepper/pepper_plugin_instance_impl.cc content/renderer/pepper/pepper_plugin_instance_impl.cc
index 1a57335..4414095 100644
--- content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -94,9 +94,7 @@
#include "ppapi/thunk/ppb_buffer_api.h"
#include "printing/metafile_skia_wrapper.h"
#include "printing/pdf_metafile_skia.h"
-#include "printing/units.h"
#include "skia/ext/platform_canvas.h"
-#include "skia/ext/platform_device.h"
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
#include "third_party/WebKit/public/platform/WebGamepads.h"
#include "third_party/WebKit/public/platform/WebRect.h"
@@ -120,13 +118,9 @@
#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "third_party/khronos/GLES2/gl2.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkRect.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_rep.h"
#include "ui/gfx/range/range.h"
-#include "ui/gfx/rect_conversions.h"
-#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
#include "v8/include/v8.h"
#if defined(OS_CHROMEOS)
@@ -137,8 +131,6 @@
#include "base/metrics/histogram.h"
#include "base/win/windows_version.h"
#include "skia/ext/platform_canvas.h"
-#include "ui/gfx/codec/jpeg_codec.h"
-#include "ui/gfx/gdi_util.h"
#endif
using base::StringPrintf;
@@ -186,35 +178,6 @@ using blink::WebView;
namespace content {
-#if defined(OS_WIN)
-// Exported by pdf.dll
-typedef bool (*RenderPDFPageToDCProc)(const unsigned char* pdf_buffer,
- int buffer_size,
- int page_number,
- HDC dc,
- int dpi_x,
- int dpi_y,
- int bounds_origin_x,
- int bounds_origin_y,
- int bounds_width,
- int bounds_height,
- bool fit_to_bounds,
- bool stretch_to_bounds,
- bool keep_aspect_ratio,
- bool center_in_bounds,
- bool autorotate);
-
-void DrawEmptyRectangle(HDC dc) {
- // TODO(sanjeevr): This is a temporary hack. If we output a JPEG
- // to the EMF, the EnumEnhMetaFile call fails in the browser
- // process. The failure also happens if we output nothing here.
- // We need to investigate the reason for this failure and fix it.
- // In the meantime this temporary hack of drawing an empty
- // rectangle in the DC gets us by.
- Rectangle(dc, 0, 0, 0, 0);
-}
-#endif // defined(OS_WIN)
-
namespace {
// Check PP_TextInput_Type and ui::TextInputType are kept in sync.
@@ -1782,7 +1745,7 @@ int PepperPluginInstanceImpl::PrintBegin(const WebPrintParams& print_params) {
bool PepperPluginInstanceImpl::PrintPage(int page_number,
blink::WebCanvas* canvas) {
-#if defined(ENABLE_FULL_PRINTING)
+#if defined(ENABLE_PRINTING)
DCHECK(plugin_print_interface_);
PP_PrintPageNumberRange_Dev page_range;
page_range.first_page_number = page_range.last_page_number = page_number;
@@ -1799,7 +1762,7 @@ bool PepperPluginInstanceImpl::PrintPage(int page_number,
} else {
return PrintPageHelper(&page_range, 1, canvas);
}
-#else // defined(ENABLED_PRINTING)
+#else // ENABLE_PRINTING
return false;
#endif
}
@@ -1966,7 +1929,7 @@ bool PepperPluginInstanceImpl::IsViewAccelerated() {
bool PepperPluginInstanceImpl::PrintPDFOutput(PP_Resource print_output,
blink::WebCanvas* canvas) {
-#if defined(ENABLE_FULL_PRINTING)
+#if defined(ENABLE_PRINTING)
ppapi::thunk::EnterResourceNoLock<PPB_Buffer_API> enter(print_output, true);
if (enter.failed())
return false;
@@ -1976,91 +1939,15 @@ bool PepperPluginInstanceImpl::PrintPDFOutput(PP_Resource print_output,
NOTREACHED();
return false;
}
-#if defined(OS_WIN)
- // For Windows, we need the PDF DLL to render the output PDF to a DC.
- HMODULE pdf_module = GetModuleHandle(L"pdf.dll");
- if (!pdf_module)
- return false;
- RenderPDFPageToDCProc render_proc = reinterpret_cast<RenderPDFPageToDCProc>(
- GetProcAddress(pdf_module, "RenderPDFPageToDC"));
- if (!render_proc)
- return false;
-#endif // defined(OS_WIN)
- bool ret = false;
-#if defined(OS_POSIX) && !defined(OS_ANDROID)
printing::PdfMetafileSkia* metafile =
printing::MetafileSkiaWrapper::GetMetafileFromCanvas(*canvas);
- DCHECK(metafile != NULL);
if (metafile)
- ret = metafile->InitFromData(mapper.data(), mapper.size());
-#elif defined(OS_WIN)
- printing::PdfMetafileSkia* metafile =
- printing::MetafileSkiaWrapper::GetMetafileFromCanvas(*canvas);
- if (metafile) {
- // We only have a metafile when doing print preview, so we just want to
- // pass the PDF off to preview.
- ret = metafile->InitFromData(mapper.data(), mapper.size());
- } else {
- // On Windows, we now need to render the PDF to the DC that backs the
- // supplied canvas.
- HDC dc = skia::BeginPlatformPaint(canvas);
- DrawEmptyRectangle(dc);
- gfx::Size size_in_pixels;
- size_in_pixels.set_width(
- printing::ConvertUnit(current_print_settings_.printable_area.size.width,
- static_cast<int>(printing::kPointsPerInch),
- current_print_settings_.dpi));
- size_in_pixels.set_height(printing::ConvertUnit(
- current_print_settings_.printable_area.size.height,
- static_cast<int>(printing::kPointsPerInch),
- current_print_settings_.dpi));
- // We need to scale down DC to fit an entire page into DC available area.
- // First, we'll try to use default scaling based on the 72dpi that is
- // used in webkit for printing.
- // If default scaling is not enough to fit the entire PDF without
- // Current metafile is based on screen DC and have current screen size.
- // Writing outside of those boundaries will result in the cut-off output.
- // On metafiles (this is the case here), scaling down will still record
- // original coordinates and we'll be able to print in full resolution.
- // Before playback we'll need to counter the scaling up that will happen
- // in the browser (printed_document_win.cc).
- double dynamic_scale = gfx::CalculatePageScale(
- dc, size_in_pixels.width(), size_in_pixels.height());
- double page_scale = static_cast<double>(printing::kPointsPerInch) /
- static_cast<double>(current_print_settings_.dpi);
-
- if (dynamic_scale < page_scale) {
- page_scale = dynamic_scale;
- printing::MetafileSkiaWrapper::SetCustomScaleOnCanvas(*canvas,
- page_scale);
- }
-
- gfx::ScaleDC(dc, page_scale);
-
- ret = render_proc(static_cast<unsigned char*>(mapper.data()),
- mapper.size(),
- 0,
- dc,
- current_print_settings_.dpi,
- current_print_settings_.dpi,
- 0,
- 0,
- size_in_pixels.width(),
- size_in_pixels.height(),
- true,
- false,
- true,
- true,
- true);
- skia::EndPlatformPaint(canvas);
- }
-#endif // defined(OS_WIN)
+ return metafile->InitFromData(mapper.data(), mapper.size());
- return ret;
-#else // defined(ENABLE_FULL_PRINTING)
+ NOTREACHED();
+#endif // ENABLE_PRINTING
return false;
-#endif
}
void PepperPluginInstanceImpl::UpdateLayer(bool device_changed) {

View File

@@ -1,8 +1,8 @@
diff --git content_browser_client.cc content_browser_client.cc
index a72bc67..ff64d68 100644
index 728d822..cbbd248 100644
--- content_browser_client.cc
+++ content_browser_client.cc
@@ -276,6 +276,10 @@ bool ContentBrowserClient::IsFastShutdownPossible() {
@@ -273,6 +273,10 @@ bool ContentBrowserClient::IsFastShutdownPossible() {
return true;
}
@@ -14,10 +14,10 @@ index a72bc67..ff64d68 100644
return base::FilePath();
}
diff --git content_browser_client.h content_browser_client.h
index 455bff9..a8c80fc 100644
index 5a27d98..74184f1 100644
--- content_browser_client.h
+++ content_browser_client.h
@@ -27,6 +27,7 @@
@@ -28,6 +28,7 @@
#include "net/url_request/url_request_interceptor.h"
#include "net/url_request/url_request_job_factory.h"
#include "storage/browser/fileapi/file_system_context.h"
@@ -25,7 +25,7 @@ index 455bff9..a8c80fc 100644
#include "third_party/WebKit/public/platform/WebNotificationPermission.h"
#include "ui/base/window_open_disposition.h"
@@ -527,6 +528,9 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -507,6 +508,9 @@ class CONTENT_EXPORT ContentBrowserClient {
// Clears browser cookies.
virtual void ClearCookies(RenderViewHost* rvh) {}
@@ -62,7 +62,7 @@ index 7afc338..c014439 100644
WebContents::CreateParams::~CreateParams() {
}
diff --git web_contents.h web_contents.h
index 4f0d625..01083ac 100644
index 5478a37..d34c1da 100644
--- web_contents.h
+++ web_contents.h
@@ -52,9 +52,11 @@ class PageState;
@@ -104,7 +104,7 @@ index f264df7..bded79a 100644
}
diff --git web_contents_delegate.h web_contents_delegate.h
index 2cfcdf7..7adde8e 100644
index bcd5caf..35b8934 100644
--- web_contents_delegate.h
+++ web_contents_delegate.h
@@ -36,9 +36,11 @@ class DownloadItem;

View File

@@ -26,7 +26,7 @@ index 8df78f4..909840e 100644
SpellcheckServiceFactory::SpellcheckServiceFactory()
diff --git spellcheck_factory.h spellcheck_factory.h
index d2f4679..c1a790c 100644
index 3e4ad0e..d52b881 100644
--- spellcheck_factory.h
+++ spellcheck_factory.h
@@ -7,7 +7,7 @@
@@ -46,4 +46,4 @@ index d2f4679..c1a790c 100644
+ friend struct base::DefaultLazyInstanceTraits<SpellcheckServiceFactory>;
SpellcheckServiceFactory();
virtual ~SpellcheckServiceFactory();
~SpellcheckServiceFactory() override;

View File

@@ -1,8 +1,8 @@
diff --git core/frame/FrameView.cpp core/frame/FrameView.cpp
index 3a1981b..95cb146 100644
index 8a77e1c..06e6c47 100644
--- core/frame/FrameView.cpp
+++ core/frame/FrameView.cpp
@@ -129,8 +129,10 @@ FrameView::FrameView(LocalFrame* frame)
@@ -145,8 +145,10 @@ FrameView::FrameView(LocalFrame* frame)
if (!m_frame->isMainFrame())
return;
@@ -12,7 +12,7 @@ index 3a1981b..95cb146 100644
+#endif
}
PassRefPtr<FrameView> FrameView::create(LocalFrame* frame)
PassRefPtrWillBeRawPtr<FrameView> FrameView::create(LocalFrame* frame)
diff --git platform/scroll/ScrollbarThemeMacCommon.mm platform/scroll/ScrollbarThemeMacCommon.mm
index 90abb7c..6bb16c6 100644
--- platform/scroll/ScrollbarThemeMacCommon.mm

View File

@@ -1,8 +1,8 @@
diff --git desktop_aura/desktop_screen_win.cc desktop_aura/desktop_screen_win.cc
index aede179..abad021 100644
index a8e088c..838b6a0 100644
--- desktop_aura/desktop_screen_win.cc
+++ desktop_aura/desktop_screen_win.cc
@@ -36,6 +36,8 @@ gfx::Display DesktopScreenWin::GetDisplayMatching(
@@ -32,6 +32,8 @@ gfx::Display DesktopScreenWin::GetDisplayMatching(
}
HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
@@ -11,22 +11,8 @@ index aede179..abad021 100644
aura::WindowTreeHost* host = window->GetHost();
return host ? host->GetAcceleratedWidget() : NULL;
}
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 {
+ if (!window)
+ return GetPrimaryDisplay();
+
// Getting screen bounds here safely is hard.
//
// You'd think we'd be able to just call window->GetBoundsInScreen(), but we
diff --git desktop_aura/desktop_window_tree_host_win.cc desktop_aura/desktop_window_tree_host_win.cc
index d184ae4..92ffd42 100644
index 8fac698..11dcd60 100644
--- desktop_aura/desktop_window_tree_host_win.cc
+++ desktop_aura/desktop_window_tree_host_win.cc
@@ -131,7 +131,9 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window,
@@ -40,7 +26,7 @@ index d184ae4..92ffd42 100644
parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget();
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
@@ -822,6 +824,7 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
@@ -818,6 +820,7 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
// TODO(beng): inform the native_widget_delegate_.
@@ -48,7 +34,7 @@ index d184ae4..92ffd42 100644
InputMethod* input_method = GetInputMethod();
if (input_method)
input_method->OnFocus();
@@ -829,6 +832,7 @@ void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@@ -825,6 +828,7 @@ void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) {
// TODO(beng): inform the native_widget_delegate_.
@@ -57,10 +43,10 @@ index d184ae4..92ffd42 100644
if (input_method)
input_method->OnBlur();
diff --git desktop_aura/desktop_window_tree_host_x11.cc desktop_aura/desktop_window_tree_host_x11.cc
index 9831992..23a00a9 100644
index 3c99281..e6c56b7 100644
--- desktop_aura/desktop_window_tree_host_x11.cc
+++ desktop_aura/desktop_window_tree_host_x11.cc
@@ -147,7 +147,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@@ -150,7 +150,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
window_shape_(NULL),
custom_window_shape_(false),
urgency_hint_set_(false),
@@ -70,7 +56,7 @@ index 9831992..23a00a9 100644
}
DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
@@ -350,7 +351,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
@@ -353,7 +354,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
// Actually free our native resources.
if (ui::PlatformEventSource::GetInstance())
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
@@ -80,7 +66,7 @@ index 9831992..23a00a9 100644
xwindow_ = None;
desktop_native_widget_aura_->OnHostClosed();
@@ -444,6 +446,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
@@ -447,6 +449,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
}
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
@@ -89,7 +75,7 @@ index 9831992..23a00a9 100644
return bounds_;
}
@@ -456,6 +460,8 @@ gfx::Rect DesktopWindowTreeHostX11::GetClientAreaBoundsInScreen() const {
@@ -459,6 +463,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 +84,7 @@ index 9831992..23a00a9 100644
return bounds_;
}
@@ -879,6 +885,8 @@ void DesktopWindowTreeHostX11::Hide() {
@@ -882,6 +888,8 @@ void DesktopWindowTreeHostX11::Hide() {
}
gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
@@ -107,7 +93,7 @@ index 9831992..23a00a9 100644
return bounds_;
}
@@ -933,6 +941,8 @@ void DesktopWindowTreeHostX11::SetBounds(const gfx::Rect& requested_bounds) {
@@ -937,6 +945,8 @@ void DesktopWindowTreeHostX11::SetBounds(const gfx::Rect& requested_bounds) {
}
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
@@ -116,7 +102,7 @@ index 9831992..23a00a9 100644
return bounds_.origin();
}
@@ -1085,10 +1095,14 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1056,10 +1066,14 @@ void DesktopWindowTreeHostX11::InitX11Window(
}
}
@@ -132,7 +118,7 @@ index 9831992..23a00a9 100644
bounds_.x(), bounds_.y(),
bounds_.width(), bounds_.height(),
0, // border width
@@ -1706,6 +1720,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
@@ -1695,6 +1709,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
}
break;
}
@@ -144,7 +130,7 @@ index 9831992..23a00a9 100644
if (xev->xfocus.mode != NotifyGrab) {
ReleaseCapture();
diff --git desktop_aura/desktop_window_tree_host_x11.h desktop_aura/desktop_window_tree_host_x11.h
index 8a5e51f..4d5a777 100644
index 1a4f725..c7ad0148 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
@@ -155,8 +141,8 @@ index 8a5e51f..4d5a777 100644
+
protected:
// Overridden from DesktopWindowTreeHost:
virtual void Init(aura::Window* content_window,
@@ -256,6 +258,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
void Init(aura::Window* content_window,
@@ -253,6 +255,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// The bounds of |xwindow_|.
gfx::Rect bounds_;
@@ -166,7 +152,7 @@ index 8a5e51f..4d5a777 100644
// 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
@@ -340,6 +345,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -337,6 +342,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
@@ -177,26 +163,26 @@ index 8a5e51f..4d5a777 100644
};
diff --git widget.cc widget.cc
index 8a9fa71..1e7536e 100644
index 7f649c0..5352f6a 100644
--- widget.cc
+++ widget.cc
@@ -116,6 +116,7 @@ Widget::InitParams::InitParams()
@@ -109,6 +109,7 @@ Widget::InitParams::InitParams()
use_system_default_icon(false),
show_state(ui::SHOW_STATE_DEFAULT),
double_buffer(false),
parent(NULL),
+ parent_widget(gfx::kNullAcceleratedWidget),
native_widget(NULL),
desktop_window_tree_host(NULL),
layer_type(aura::WINDOW_LAYER_TEXTURED),
@@ -140,6 +141,7 @@ Widget::InitParams::InitParams(Type type)
@@ -132,6 +133,7 @@ Widget::InitParams::InitParams(Type type)
use_system_default_icon(false),
show_state(ui::SHOW_STATE_DEFAULT),
double_buffer(false),
parent(NULL),
+ parent_widget(gfx::kNullAcceleratedWidget),
native_widget(NULL),
desktop_window_tree_host(NULL),
layer_type(aura::WINDOW_LAYER_TEXTURED),
@@ -314,7 +316,7 @@ void Widget::Init(const InitParams& in_params) {
@@ -306,7 +308,7 @@ void Widget::Init(const InitParams& in_params) {
InitParams params = in_params;
params.child |= (params.type == InitParams::TYPE_CONTROL);
@@ -205,7 +191,7 @@ index 8a9fa71..1e7536e 100644
if (params.opacity == views::Widget::InitParams::INFER_OPACITY &&
params.type != views::Widget::InitParams::TYPE_WINDOW &&
@@ -375,7 +377,12 @@ void Widget::Init(const InitParams& in_params) {
@@ -367,7 +369,12 @@ void Widget::Init(const InitParams& in_params) {
Minimize();
} else if (params.delegate) {
SetContentsView(params.delegate->GetContentsView());
@@ -220,12 +206,12 @@ index 8a9fa71..1e7536e 100644
// This must come after SetContentsView() or it might not be able to find
// the correct NativeTheme (on Linux). See http://crbug.com/384492
diff --git widget.h widget.h
index 96ab8b2..1cbd5d8 100644
index e208d5f..89c9cac 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;
@@ -235,6 +235,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// Whether the widget should be maximized or minimized.
ui::WindowShowState show_state;
gfx::NativeView parent;
+ gfx::AcceleratedWidget parent_widget;
// Specifies the initial bounds of the Widget. Default is empty, which means

View File

@@ -1,5 +1,5 @@
diff --git ThemeMac.mm ThemeMac.mm
index a405ba5..e20144d 100644
index 5f2596f..8ecf698 100644
--- ThemeMac.mm
+++ ThemeMac.mm
@@ -490,7 +490,7 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext*

View File

@@ -1,8 +1,8 @@
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
index ee5bdbe..919addf 100644
index e0dc3d4..4789bc7 100644
--- Source/web/ChromeClientImpl.cpp
+++ Source/web/ChromeClientImpl.cpp
@@ -728,7 +728,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
@@ -724,7 +724,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) const
{
@@ -12,10 +12,10 @@ index ee5bdbe..919addf 100644
return adoptRefWillBeNoop(new PopupMenuChromium(frame, client));
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
index c9ca40a..9cff683 100644
index 722513b..a36ca46 100644
--- Source/web/WebViewImpl.cpp
+++ Source/web/WebViewImpl.cpp
@@ -386,6 +386,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
@@ -385,6 +385,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false)
, m_contextMenuAllowed(false)
@@ -23,7 +23,7 @@ index c9ca40a..9cff683 100644
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_compositorDeviceScaleFactorOverride(0)
@@ -3919,9 +3920,14 @@ void WebViewImpl::deviceOrPageScaleFactorChanged()
@@ -3971,9 +3972,14 @@ void WebViewImpl::deviceOrPageScaleFactorChanged()
m_page->inspectorController().deviceOrPageScaleFactorChanged();
}
@@ -40,10 +40,10 @@ index c9ca40a..9cff683 100644
void WebViewImpl::startDragging(LocalFrame* frame,
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
index 9bd645b..5da0cae 100644
index e3b2985..13a6ee0 100644
--- Source/web/WebViewImpl.h
+++ Source/web/WebViewImpl.h
@@ -372,7 +372,8 @@ public:
@@ -373,7 +373,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).
@@ -53,7 +53,7 @@ index 9bd645b..5da0cae 100644
bool contextMenuAllowed() const
{
@@ -660,6 +661,8 @@ private:
@@ -662,6 +663,8 @@ private:
bool m_contextMenuAllowed;