Chromium Code Reviews| Index: printing/emf_win.h |
| diff --git a/printing/emf_win.h b/printing/emf_win.h |
| index c66e9f24b989745c59ec07296e6ee67bc0a86826..7d976eb89b02a85ae8f6a3953ee79fe9f9659fcf 100644 |
| --- a/printing/emf_win.h |
| +++ b/printing/emf_win.h |
| @@ -77,7 +77,17 @@ class PRINTING_EXPORT Emf : public Metafile { |
| unsigned int GetPageCount() const override; |
| HDC context() const override; |
| - bool Playback(HDC hdc, const RECT* rect) const override; |
| + |
| + // "Plays" the EMF buffer in a HDC. It is the same effect as calling the |
|
Lei Zhang
2017/04/12 19:33:33
nit: Can you move this down to keep all the overri
hal.canary
2017/04/13 20:55:38
Done.
|
| + // original GDI function that were called when recording the EMF. |rect| is in |
| + // "logical units" and is optional. If |rect| is NULL, the natural EMF bounds |
| + // are used. |
| + // Note: Windows has been known to have stack buffer overflow in its GDI |
| + // functions, whether used directly or indirectly through precompiled EMF |
| + // data. We have to accept the risk here. Since it is used only for printing, |
| + // it requires user intervention. |
| + bool Playback(HDC hdc, const RECT* rect) const; |
| + |
| bool SafePlayback(HDC hdc) const override; |
| HENHMETAFILE emf() const { return emf_; } |