OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 #include "core/page/SecurityPolicy.h" | 155 #include "core/page/SecurityPolicy.h" |
156 #include "core/page/Settings.h" | 156 #include "core/page/Settings.h" |
157 #include "core/platform/AsyncFileSystem.h" | 157 #include "core/platform/AsyncFileSystem.h" |
158 #include "core/platform/KURL.h" | 158 #include "core/platform/KURL.h" |
159 #include "core/platform/SchemeRegistry.h" | 159 #include "core/platform/SchemeRegistry.h" |
160 #include "core/platform/ScrollTypes.h" | 160 #include "core/platform/ScrollTypes.h" |
161 #include "core/platform/ScrollbarTheme.h" | 161 #include "core/platform/ScrollbarTheme.h" |
162 #include "core/platform/chromium/ClipboardUtilitiesChromium.h" | 162 #include "core/platform/chromium/ClipboardUtilitiesChromium.h" |
163 #include "core/platform/chromium/TraceEvent.h" | 163 #include "core/platform/chromium/TraceEvent.h" |
164 #include "core/platform/graphics/FontCache.h" | 164 #include "core/platform/graphics/FontCache.h" |
| 165 #include "core/platform/graphics/GraphicsContext.h" |
165 #include "core/platform/graphics/skia/SkiaUtils.h" | 166 #include "core/platform/graphics/skia/SkiaUtils.h" |
166 #include "core/platform/network/ResourceHandle.h" | 167 #include "core/platform/network/ResourceHandle.h" |
167 #include "core/platform/network/ResourceRequest.h" | 168 #include "core/platform/network/ResourceRequest.h" |
168 #include "core/rendering/HitTestResult.h" | 169 #include "core/rendering/HitTestResult.h" |
169 #include "core/rendering/RenderBox.h" | 170 #include "core/rendering/RenderBox.h" |
170 #include "core/rendering/RenderFrame.h" | 171 #include "core/rendering/RenderFrame.h" |
171 #include "core/rendering/RenderLayer.h" | 172 #include "core/rendering/RenderLayer.h" |
172 #include "core/rendering/RenderObject.h" | 173 #include "core/rendering/RenderObject.h" |
173 #include "core/rendering/RenderTreeAsText.h" | 174 #include "core/rendering/RenderTreeAsText.h" |
174 #include "core/rendering/RenderView.h" | 175 #include "core/rendering/RenderView.h" |
175 #include "core/rendering/style/StyleInheritedData.h" | 176 #include "core/rendering/style/StyleInheritedData.h" |
176 #include "core/xml/XPathResult.h" | 177 #include "core/xml/XPathResult.h" |
177 #include "modules/filesystem/DOMFileSystem.h" | 178 #include "modules/filesystem/DOMFileSystem.h" |
178 #include "modules/filesystem/DirectoryEntry.h" | 179 #include "modules/filesystem/DirectoryEntry.h" |
179 #include "modules/filesystem/FileEntry.h" | 180 #include "modules/filesystem/FileEntry.h" |
180 #include "modules/filesystem/FileSystemType.h" | 181 #include "modules/filesystem/FileSystemType.h" |
181 #include "painting/GraphicsContextBuilder.h" | |
182 #include <public/Platform.h> | 182 #include <public/Platform.h> |
183 #include <public/WebFileSystem.h> | 183 #include <public/WebFileSystem.h> |
184 #include <public/WebFileSystemType.h> | 184 #include <public/WebFileSystemType.h> |
185 #include <public/WebFloatPoint.h> | 185 #include <public/WebFloatPoint.h> |
186 #include <public/WebFloatRect.h> | 186 #include <public/WebFloatRect.h> |
187 #include <public/WebPoint.h> | 187 #include <public/WebPoint.h> |
188 #include <public/WebRect.h> | 188 #include <public/WebRect.h> |
189 #include <public/WebSize.h> | 189 #include <public/WebSize.h> |
190 #include <public/WebURLError.h> | 190 #include <public/WebURLError.h> |
191 #include <public/WebVector.h> | 191 #include <public/WebVector.h> |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 { | 1443 { |
1444 ASSERT(m_printContext && page >= 0); | 1444 ASSERT(m_printContext && page >= 0); |
1445 return m_printContext->getPageShrink(page); | 1445 return m_printContext->getPageShrink(page); |
1446 } | 1446 } |
1447 | 1447 |
1448 float WebFrameImpl::printPage(int page, WebCanvas* canvas) | 1448 float WebFrameImpl::printPage(int page, WebCanvas* canvas) |
1449 { | 1449 { |
1450 #if ENABLE(PRINTING) | 1450 #if ENABLE(PRINTING) |
1451 ASSERT(m_printContext && page >= 0 && frame() && frame()->document()); | 1451 ASSERT(m_printContext && page >= 0 && frame() && frame()->document()); |
1452 | 1452 |
1453 GraphicsContextBuilder builder(canvas); | 1453 GraphicsContext graphicsContext(canvas); |
1454 GraphicsContext& graphicsContext = builder.context(); | |
1455 graphicsContext.setPrinting(true); | 1454 graphicsContext.setPrinting(true); |
1456 return m_printContext->spoolPage(graphicsContext, page); | 1455 return m_printContext->spoolPage(graphicsContext, page); |
1457 #else | 1456 #else |
1458 return 0; | 1457 return 0; |
1459 #endif | 1458 #endif |
1460 } | 1459 } |
1461 | 1460 |
1462 void WebFrameImpl::printEnd() | 1461 void WebFrameImpl::printEnd() |
1463 { | 1462 { |
1464 ASSERT(m_printContext); | 1463 ASSERT(m_printContext); |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2071 | 2070 |
2072 WebString WebFrameImpl::markerTextForListItem(const WebElement& webElement) cons
t | 2071 WebString WebFrameImpl::markerTextForListItem(const WebElement& webElement) cons
t |
2073 { | 2072 { |
2074 return WebCore::markerTextForListItem(const_cast<Element*>(webElement.constU
nwrap<Element>())); | 2073 return WebCore::markerTextForListItem(const_cast<Element*>(webElement.constU
nwrap<Element>())); |
2075 } | 2074 } |
2076 | 2075 |
2077 void WebFrameImpl::printPagesWithBoundaries(WebCanvas* canvas, const WebSize& pa
geSizeInPixels) | 2076 void WebFrameImpl::printPagesWithBoundaries(WebCanvas* canvas, const WebSize& pa
geSizeInPixels) |
2078 { | 2077 { |
2079 ASSERT(m_printContext); | 2078 ASSERT(m_printContext); |
2080 | 2079 |
2081 GraphicsContextBuilder builder(canvas); | 2080 GraphicsContext graphicsContext(canvas); |
2082 GraphicsContext& graphicsContext = builder.context(); | |
2083 graphicsContext.setPrinting(true); | 2081 graphicsContext.setPrinting(true); |
2084 | 2082 |
2085 m_printContext->spoolAllPagesWithBoundaries(graphicsContext, FloatSize(pageS
izeInPixels.width, pageSizeInPixels.height)); | 2083 m_printContext->spoolAllPagesWithBoundaries(graphicsContext, FloatSize(pageS
izeInPixels.width, pageSizeInPixels.height)); |
2086 } | 2084 } |
2087 | 2085 |
2088 WebRect WebFrameImpl::selectionBoundsRect() const | 2086 WebRect WebFrameImpl::selectionBoundsRect() const |
2089 { | 2087 { |
2090 return hasSelection() ? WebRect(IntRect(frame()->selection()->bounds(false))
) : WebRect(); | 2088 return hasSelection() ? WebRect(IntRect(frame()->selection()->bounds(false))
) : WebRect(); |
2091 } | 2089 } |
2092 | 2090 |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2499 | 2497 |
2500 // There is a possibility that the frame being detached was the only | 2498 // There is a possibility that the frame being detached was the only |
2501 // pending one. We need to make sure final replies can be sent. | 2499 // pending one. We need to make sure final replies can be sent. |
2502 flushCurrentScopingEffort(m_findRequestIdentifier); | 2500 flushCurrentScopingEffort(m_findRequestIdentifier); |
2503 | 2501 |
2504 cancelPendingScopingEffort(); | 2502 cancelPendingScopingEffort(); |
2505 } | 2503 } |
2506 } | 2504 } |
2507 | 2505 |
2508 } // namespace WebKit | 2506 } // namespace WebKit |
OLD | NEW |