summaryrefslogtreecommitdiffstats
path: root/printing
Commit message (Collapse)AuthorAgeFilesLines
* Officially close PDF files when done writing them. No difference now, but if ↵avi@chromium.org2010-04-011-0/+1
| | | | | | | | | | | we ever move to GC, this will prevent problems. BUG=http://crbug.com/33239 TEST=none (does not fix bug) Review URL: http://codereview.chromium.org/1508015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43355 0039d316-1c4b-4281-b951-d872f2087c98
* Minor C++ fixes found by Clang.evan@chromium.org2010-03-302-3/+8
| | | | | | | | | In cases where I've added an #include, it's generally due to Clang being more picky about templates being available during expansions. Review URL: http://codereview.chromium.org/1432003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43098 0039d316-1c4b-4281-b951-d872f2087c98
* Move app/gfx/canvas and app/gfx/font to gfx/.ben@chromium.org2010-03-232-2/+2
| | | | | | | | | | TBR=darin BUG=none TEST=none Review URL: http://codereview.chromium.org/1132006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42312 0039d316-1c4b-4281-b951-d872f2087c98
* Move text_elider from app/gfx to app/ben@chromium.org2010-03-192-2/+2
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42090 0039d316-1c4b-4281-b951-d872f2087c98
* Move more files to toplevel gfx.ben@chromium.org2010-03-192-2/+2
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42071 0039d316-1c4b-4281-b951-d872f2087c98
* Move image codec stuff to toplevel gfx.ben@chromium.org2010-03-182-3/+3
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41911 0039d316-1c4b-4281-b951-d872f2087c98
* Move some more files to toplevel gfx dir.ben@chromium.org2010-03-172-2/+2
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41812 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/gfx contents to gfx/ben@chromium.org2010-03-149-9/+10
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41559 0039d316-1c4b-4281-b951-d872f2087c98
* Changes made to the printing logic to allow plugins to participate in the ↵sanjeevr@chromium.org2010-03-125-6/+105
| | | | | | | | | | | | | browser's print workflow. These changes mainly involve allowing the plugin to specify whether it wants the browser to use overlays and also changes to the EMF code on Windows to decompress JPEGs/PNGs in the metafile. The related webkit change is https://bugs.webkit.org/show_bug.cgi?id=35550 BUG=None TEST=Test printing with new Pepper plugins that support custom printing. Review URL: http://codereview.chromium.org/745001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41400 0039d316-1c4b-4281-b951-d872f2087c98
* printing: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-062-2/+6
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/669242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40849 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate file_util::AppendToPath() on non-Windows.evan@chromium.org2010-02-261-3/+3
| | | | | | | | | | | | We still have ~150 callers to AppendToPath in our code, but most of them are in the installer and I'm reluctant to fiddle with that code without having an easy way to test it. BUG=24672 Review URL: http://codereview.chromium.org/654013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40120 0039d316-1c4b-4281-b951-d872f2087c98
* Make SharedMemory use uint32 instead of size_t. This removes the remaining ↵jam@chromium.org2010-02-1611-40/+39
| | | | | | | | size_t's from the IPC code. Review URL: http://codereview.chromium.org/581001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39164 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix shared build.craig.schlenter@chromium.org2010-02-151-0/+9
| | | | | | | | | | | | | | | | The demise of temp scaffolding has left the shared build in an unhappy state where the compiler complains about vtable issues with PrintJob because only half the class is implemented. Fix this by compiling some more printing files on linux and stubbing out AskUserForSettings. BUG=none TEST=linux shared build compiles. Other builds still ok too. Review URL: http://codereview.chromium.org/598066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39038 0039d316-1c4b-4281-b951-d872f2087c98
* linux: build with -Wextraevan@chromium.org2010-02-051-2/+2
| | | | | | | | | | | | 95% of this is removing "const" from return types, but turning this on found one bug! (A "for" loop that expected its iterator to go negative but which was using an unsigned type.) BUG=34160 Review URL: http://codereview.chromium.org/570012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38266 0039d316-1c4b-4281-b951-d872f2087c98
* OpenBSD/FreeBSD GYP changes (most of the remaining ones)pvalchev@google.com2010-02-047-18/+20
| | | | | | Review URL: http://codereview.chromium.org/565043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38079 0039d316-1c4b-4281-b951-d872f2087c98
* Link the following tests against tcmalloc:glider@chromium.org2009-12-101-0/+9
| | | | | | | | | | | | | | | | | | | | | app_unittests browser_tests startup_tests media_unittests printing_unittests net_unittests googleurl_unittests ipc_tests unit_tests ui_tests This patch was originally reviewed as http://codereview.chromium.org/466089 TBR=willchan Review URL: http://codereview.chromium.org/488004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34247 0039d316-1c4b-4281-b951-d872f2087c98
* printing: replace the deprecated macro (DISALLOW_EVIL_CONSTRUCTORS).maruel@chromium.org2009-12-086-11/+10
| | | | | | | | | | Use DISALLOW_COPY_AND_ASSIGN instead. Patch contributed by Thiago Farina Review URL: http://codereview.chromium.org/460087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34030 0039d316-1c4b-4281-b951-d872f2087c98
* First patch in making destructors of refcounted objects private.jam@chromium.org2009-11-052-2/+8
| | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/360042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31136 0039d316-1c4b-4281-b951-d872f2087c98
* Do some cleanup of file path name handling.brettw@chromium.org2009-10-222-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | This started trying to cleanup DownloadManager::GenerateFilename which asserts if your system locale isn't UTF-8 (I ran into this when mine got messed up). The solution is to have GetSuggestedFilename return a FilePath rather than calling FromWStringHack. The rest of the patch is a result of trying to write GetSuggestedFilename in a reasonable way. I changed ReplaceIllegalCharacters to work on a FilePath::StringType. Some places in the code calling these functions got cleaner, some got messier. I think overall the ones that got messier are the ones doing sketchy things with paths and the ones that got cleaner are the ones doing things more properly. The only code here that gets called a nontrivial number of times is the weburlloader, and I think the new code does about the same number of string conversions overall (though on certain platforms the number will be higher or lower). BUG=none TEST=none Review URL: http://codereview.chromium.org/271056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29832 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the base_gfx project since it no longer has an external dependencies.brettw@chromium.org2009-10-141-1/+1
| | | | | | | | | | Replace it with base_i18n which encapsulates all ICU dependencies. BUG=none TEST=none Review URL: http://codereview.chromium.org/267048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29036 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the RenderViewTest printing tests on the Mac.stuartmorgan@chromium.org2009-10-146-23/+150
| | | | | | | | | | | | | | | Migrates some test APIs from wstring path names to FilePath objects, and fixes some gcc compilation issues, to allow the tests to build on Mac. Moves rendering logic and some other pdf logic into PdfMetafile to avoid duplication with unit test code. Switches rendering from the deprecated CGContextDrawPDFDocument to the newer (but less convenient) CGContextDrawPDFPage. Added debugging helpers to PdfMetafile: SaveTo, matching the other platform metafiles, and context retain count checking to get early warning of issues that will cause printing failure. BUG=24750 TEST=N/A Review URL: http://codereview.chromium.org/274052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29003 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the basic OS-level printing mechanics on Macstuartmorgan@chromium.org2009-10-1312-290/+567
| | | | | | | | | | | | | Part two of printing implementation on the Mac. This adds a Mac implementation of PrintSettings to get page setup and printer information, basic PDF->context rendering in PrintedDocument, and most of PrintingContext to allow getting print settings (both default and interactive). Reworks the message flow a bit when asking for print settings on the Mac, since it can only be done from the UI thread. Uses a modal dialog for now, but will later be modified further to allow for a sheet. BUG=13158 TEST=None; no user-visible effect yet. Review URL: http://codereview.chromium.org/268036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28857 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a version of NativeMetafile for the Macstuartmorgan@chromium.org2009-10-125-8/+248
| | | | | | | | | | | | | This is the first of series of patches to implement printing on the Mac. This API is based heavily on the Linux version; although it doesn't end up abstracting very much on the Mac, having a NativeMetafile implementation makes it easy to pass data through the existing print architecture. BUG=13158 TEST=Printing unit tests; no effect in the application yet. Review URL: http://codereview.chromium.org/269041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28722 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Fix early font free during printing.estade@chromium.org2009-10-091-0/+2
| | | | | | | | | | The ownership model for this stuff (fonts, cairo canvas, etc.) is a bit brittle. Don't know how to improve it though. BUG=23372 Review URL: http://codereview.chromium.org/270048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28619 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the Windows printing build by updating an old include.brettw@chromium.org2009-10-091-1/+1
| | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28578 0039d316-1c4b-4281-b951-d872f2087c98
* Move more ICU-dependent stuff from base into base/i18n. Some test stuff alsobrettw@chromium.org2009-10-092-2/+2
| | | | | | | | | | | | depended on this, so to make the DEPS work out, I made a new base/test directory where I moved the testing-related files into a new directory base/test. TEST=none BUG=none Review URL: http://codereview.chromium.org/266038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28569 0039d316-1c4b-4281-b951-d872f2087c98
* Separate out some more ICU from base and into base/i18n.brettw@chromium.org2009-10-082-2/+4
| | | | | | | | | | | | | | | | | | | | This moves string_util_icu. I moved the number formatting function into base/i18n/number_formatting and just removed the other function in string_util_icu which was TrimWhitespaceUTF8. It is only used in a few places and isn't actually helpful (and the fact that it round-trips through UTF-16 is better for the caller to see). This takes out the sorting from the FileEnumerator. The comment says the sorting is not guaranteed. I moved it into file_util_icu as a standalone function for callers of FileEnumerator to call manually if they need sorted results. I modified the directory lister to use this sorting instead, and filed a bug on doing more optimal JS-based sorting. TEST=none BUG=none Review URL: http://codereview.chromium.org/267001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28405 0039d316-1c4b-4281-b951-d872f2087c98
* Move classes depending on Skia out of base/gfx and into app/gfx. Renamebrettw@chromium.org2009-10-071-1/+1
| | | | | | | | | | native_theme to native_theme_win since its Windows-specific. BUG=none TEST=none Review URL: http://codereview.chromium.org/259047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28300 0039d316-1c4b-4281-b951-d872f2087c98
* Add comments setting emacs and vim tab width and expansion variables.sgk@google.com2009-10-061-0/+6
| | | | | | | | BUG=none TEST=successful builds Review URL: http://codereview.chromium.org/256059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28089 0039d316-1c4b-4281-b951-d872f2087c98
* Move the JPEG and PNG codecs from base/gfx to app/gfx/codec. Move the classesbrettw@chromium.org2009-10-031-12/+11
| | | | | | | | | | | | | | | into the gfx namespace. Combine the PNGEncoder and PNGDecoder. There were separate when we had different executables for the browser and renderer, and linked the encoder only in one of them (which saved us some space used by libpng). This hasn't been the case for years, so combining them (again) makes sense. TEST=none BUG=none Review URL: http://codereview.chromium.org/243076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27930 0039d316-1c4b-4281-b951-d872f2087c98
* Move cairo font handling from printing to skia to avoid circular dependency.mmoss@chromium.org2009-09-282-142/+0
| | | | | | | | | http://crbug.com/22792 Review URL: http://codereview.chromium.org/245027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27395 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded main.maruel@chromium.org2009-09-271-1/+0
| | | | | | | | TEST=none BUG=22926 Review URL: http://codereview.chromium.org/235033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27335 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: print page to file rather than using shared memory to send it to the ↵estade@chromium.org2009-09-163-14/+35
| | | | | | | | | | | | browser. BUG=9847 adapted from patch by <minyu.huang [at] gmail> Review URL: http://codereview.chromium.org/203062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26308 0039d316-1c4b-4281-b951-d872f2087c98
* Force inclusion of build/common.gypi for all chromium gyp files.yaar@chromium.org2009-09-151-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Why: Simpler build code. If everybody includes it, it should be included automatically. Why now: The webkit chromium builds need it be specified, since can't default to build/common.gypi. What was done: 1. build/common.gypi's contents were moved to a new file build/gyp_chromium.gypi 2. tools/gyp/gyp_chromium was moved to build/gyp_chromium and made to automatically include build/gyp_chromium.gypi. 3. lots of gyp files were fixed to not refer to build/common.gypi any more. 4. o3d which also builds independently of chrome, was fixed to have a gyp_o3d that includes gyp_chromium.gypi too. 5. build/common.gypi was left empty, because there are some external projects that still refer to it. Things that are left to do after this patch is in: 1. The following external files (in other repositories) need to stop include common.gypi ./third_party/hunspell/hunspell.gyp ./third_party/icu/icu.gyp ./v8/tools/gyp/v8.gyp 2. Once nobody refers to common.gypi anymore, delete common.gypi -or- Delete gyp_chromium.gypi and move its content back to common.gypi Tested on mac, win and linux. On win, got a few unit tests errors on chrome bookmarks, which should not be related. I'm running again with clobber to verify. Review URL: http://codereview.chromium.org/206006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26302 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the Linux shared build.thestig@chromium.org2009-09-151-1/+6
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/203076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26291 0039d316-1c4b-4281-b951-d872f2087c98
* Fix printing project on linux.maruel@chromium.org2009-09-148-67/+72
| | | | | | | | | | | | Enable compilation of every files and fix tests. TEST=unit tests BUG=9847 Review URL: http://codereview.chromium.org/193086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26103 0039d316-1c4b-4281-b951-d872f2087c98
* Disabled PdfTest.* until I fix the AtExitManager thing. Should be no brainer.maruel@chromium.org2009-09-111-3/+2
| | | | | | | | | | | | [0911/072720:FATAL:/b/slave/chromium-dbg-linux-builder/build/src/base/at_exit.cc(40)] Check failed: false. Tried to RegisterCallback without an AtExitManager TBR=tony BUG=none TEST=crash Review URL: http://codereview.chromium.org/194085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25975 0039d316-1c4b-4281-b951-d872f2087c98
* Embed fonts information into resulting PDF file for printing.maruel@chromium.org2009-09-112-24/+165
| | | | | | | | | | BUG=9847 TEST=printing on linux should have right font in pdf Patch contributed by Min-Yu Huang <minyu.huang@gmail.com> Review URL: http://codereview.chromium.org/196071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25974 0039d316-1c4b-4281-b951-d872f2087c98
* Replace icu38/icu38.gyp with icu/icu.gyp in gyp files replace all the ↵jshin@chromium.org2009-09-091-2/+2
| | | | | | | | | | | | | | | | | | references to third_party/icu38 and icudt38.dll with third_party/icu and icudt42.dll in vsprops and cc files. Also, update the icu data module name and the icu data symbol in icu_util.cc In addition, add a dummy C++ source file (xmldummy_mac.cc) to libxml to work around an Xcode bug (xmllint and xmlcatalog are linked with gcc rather than g++ even though it's linked to a "C++ library", libicuuc.a). Also updated is the test results for net_util_unittests. This will not be landed until deps/third_party/icu42 is ready for all 3 platforms (Windows VS build files are not yet updated there). BUG=8198 TEST=On all platforms, all the targets are built fine. Review URL: http://codereview.chromium.org/172031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25708 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leak problem in PdfPsMetafile.tony@chromium.org2009-08-263-131/+189
| | | | | | | | | | | | | | The one committed in revision 24474 has a memory-leak problem. The cause is that we forgot to do CleanUpSurface(&page_surface_) near the end of PdfPsMetafile::FinishPage(). Original patch by Min-yu Huang <minyu.huang@gmail.com> via http://codereview.chromium.org/173516 Review URL: http://codereview.chromium.org/174559 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24533 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 24474.maruel@chromium.org2009-08-263-188/+130
| | | | | | | Caused a memory leak (detected by valgrind) Review URL: http://codereview.chromium.org/174547 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24489 0039d316-1c4b-4281-b951-d872f2087c98
* Revised PdfPsMetafile.maruel@chromium.org2009-08-263-130/+188
| | | | | | | | | | The interface is more reasonable, and the code is robuster. TEST=unit test BUG=none Review URL: http://codereview.chromium.org/174468 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24474 0039d316-1c4b-4281-b951-d872f2087c98
* Implement native metafile for printing on Linux.tony@chromium.org2009-08-255-4/+538
| | | | | | | | | | | | | | The metafile class stores the resulting PDF/PS stream in memory. BUG=9847 Original patch by Min-yu Huang <minyu.huang@gmail.com> at http://codereview.chromium.org/174042 Review URL: http://codereview.chromium.org/174405 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24243 0039d316-1c4b-4281-b951-d872f2087c98
* Remove *.vsprops files that are no longer referenced (or only havesgk@google.com2009-07-281-8/+0
| | | | | | | | | references to each other) anywhere in the Chromium code base. BUG=none TEST=rebuild Review URL: http://codereview.chromium.org/159523 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21873 0039d316-1c4b-4281-b951-d872f2087c98
* Print only the focused frame. This makes more sense than trying to print ↵sverrir@chromium.org2009-07-162-31/+127
| | | | | | | | | | | | | | all frames since most of the time you end up with ugly clipping and scroll bars on the printed page. This also fixes printing issue with print selection since we don't pick up the currently selected text if's not in the main frame. Also did some refactoring of the printing test in render_view_unittest. Mainly to reuse the new Image class. BUG=http://crbug.com/15250 TEST=Print pages with frames. Print selection when using multiple frames (one example in bug). Review URL: http://codereview.chromium.org/149644 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20876 0039d316-1c4b-4281-b951-d872f2087c98
* Extract Image class so it can be used in more tests.sverrir@chromium.org2009-07-133-0/+239
| | | | | | | | | BUG=none TEST=none (no functional change). Review URL: http://codereview.chromium.org/149410 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20491 0039d316-1c4b-4281-b951-d872f2087c98
* Fix print margins. This fixes multiple issues that caused incorrect offsets ↵sverrir@chromium.org2009-07-133-20/+74
| | | | | | | | | | | | | | | on printers that had a non-printable area (like most physical printers do). Two basic problems fixed. Firstly the margins where incorrectly calculated and secondly there was missing an offset int the rendering code (PHYSICALOFFSETX/Y is 0,0 when printing). To track this down I added code to print out all relevant margins for visual inspection (turned off by default). Chrome now prints using correctly calculated margins and is perfectly aligned on the page! BUG=http://crbug.com/947, http://crbug.com/1566 TEST=Printing on various printers. Review URL: http://codereview.chromium.org/155382 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20482 0039d316-1c4b-4281-b951-d872f2087c98
* Quick fix for linux shared build.craig.schlenter@chromium.org2009-07-101-0/+4
| | | | | | Review URL: http://codereview.chromium.org/155233 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20365 0039d316-1c4b-4281-b951-d872f2087c98
* Make the printint_unittest use the correct test harness. This removes the ↵sverrir@google.com2009-07-093-5/+3
| | | | | | | | | | | need for an AtExitManager in one of the tests (which is just plain wrong). BUG=none TEST=no functional change (printing_unittests should run successfully). Review URL: http://codereview.chromium.org/149407 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20319 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable test (disabled while moving printing functionality to printing ↵sverrir@google.com2009-07-093-15/+14
| | | | | | | | | | | library). TEST=Run printing_unittests (no functional change). BUG=none Review URL: http://codereview.chromium.org/149288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20260 0039d316-1c4b-4281-b951-d872f2087c98