Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Issue 321193003: Fix print preview dialog for <webview>. (Closed)

Created:
6 years, 6 months ago by lazyboy
Modified:
6 years, 6 months ago
Reviewers:
Fady Samuel, sky
CC:
chromium-reviews, tfarina, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fix print preview dialog for <webview>. Make constrained window use embedder's native window (through its WebContents) instead of using webview's. After print preview got enabled by default, the code trying to bring up print preview dialog (a constrained window) started crashing the browser. BUG=286487 Test=In chromeos device/LinuxAura/Mac: load the sample browser app https://github.com/GoogleChrome/chrome-app-samples/tree/master/webview-samples/browser Navigate to a page that calls window.print() http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_print Click "Print this page" to trigger window.print() inside webview. It should 1) not crash 2) correctly show the preview and print the contents of the webview, not the entire app. This means it shouldn't print the chrome (address bar/buttons etc.) of the browser sample. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276372

Patch Set 1 #

Patch Set 2 : revert some unused code #

Patch Set 3 : remove debug printfs and import mac changes #

Patch Set 4 : . #

Patch Set 5 : fix mac import #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -6 lines) Patch
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm View 1 2 3 4 2 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/constrained_window_views.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/constrained_window_views.cc View 1 2 3 2 chunks +11 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
lazyboy
Fady, can you do an initial review? Specially for the code pattern: WebViewGuest::FromWebContents(wc)->embedder_web_contents(); I'll ask ...
6 years, 6 months ago (2014-06-10 20:22:14 UTC) #1
Fady Samuel
lgtm from a webview perspective.
6 years, 6 months ago (2014-06-10 21:16:39 UTC) #2
lazyboy
+sky for review.
6 years, 6 months ago (2014-06-10 21:21:22 UTC) #3
sky
LGTM
6 years, 6 months ago (2014-06-10 22:19:56 UTC) #4
lazyboy
The CQ bit was checked by lazyboy@chromium.org
6 years, 6 months ago (2014-06-11 05:09:16 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lazyboy@chromium.org/321193003/80001
6 years, 6 months ago (2014-06-11 05:10:31 UTC) #6
commit-bot: I haz the power
6 years, 6 months ago (2014-06-11 12:56:47 UTC) #7
Message was sent while issue was closed.
Change committed as 276372

Powered by Google App Engine
This is Rietveld 408576698