OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 return print_context_->getPageShrink(page); | 1059 return print_context_->getPageShrink(page); |
1060 } | 1060 } |
1061 | 1061 |
1062 float WebFrameImpl::printPage(int page, WebCanvas* canvas) { | 1062 float WebFrameImpl::printPage(int page, WebCanvas* canvas) { |
1063 // Ensure correct state. | 1063 // Ensure correct state. |
1064 if (!print_context_.get() || page < 0 || !frame() || !frame()->document()) { | 1064 if (!print_context_.get() || page < 0 || !frame() || !frame()->document()) { |
1065 NOTREACHED(); | 1065 NOTREACHED(); |
1066 return 0; | 1066 return 0; |
1067 } | 1067 } |
1068 | 1068 |
1069 #if defined(OS_WIN) || defined(OS_LINUX) | 1069 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FREEBSD) |
1070 PlatformContextSkia context(canvas); | 1070 PlatformContextSkia context(canvas); |
1071 GraphicsContext spool(&context); | 1071 GraphicsContext spool(&context); |
1072 #elif defined(OS_MACOSX) | 1072 #elif defined(OS_MACOSX) |
1073 GraphicsContext spool(canvas); | 1073 GraphicsContext spool(canvas); |
1074 WebCore::LocalCurrentGraphicsContext localContext(&spool); | 1074 WebCore::LocalCurrentGraphicsContext localContext(&spool); |
1075 #endif | 1075 #endif |
1076 | 1076 |
1077 return print_context_->spoolPage(spool, page); | 1077 return print_context_->spoolPage(spool, page); |
1078 } | 1078 } |
1079 | 1079 |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 | 1876 |
1877 SecurityOrigin* security_origin = frame_->document()->securityOrigin(); | 1877 SecurityOrigin* security_origin = frame_->document()->securityOrigin(); |
1878 | 1878 |
1879 if (!frame_->loader()->isScheduledLocationChangePending()) { | 1879 if (!frame_->loader()->isScheduledLocationChangePending()) { |
1880 frame_->loader()->stopAllLoaders(); | 1880 frame_->loader()->stopAllLoaders(); |
1881 frame_->loader()->begin(frame_->loader()->url(), true, security_origin); | 1881 frame_->loader()->begin(frame_->loader()->url(), true, security_origin); |
1882 frame_->loader()->write(script_result); | 1882 frame_->loader()->write(script_result); |
1883 frame_->loader()->end(); | 1883 frame_->loader()->end(); |
1884 } | 1884 } |
1885 } | 1885 } |
OLD | NEW |