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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 #include "public/web/WebFindOptions.h" | 181 #include "public/web/WebFindOptions.h" |
182 #include "public/web/WebFormElement.h" | 182 #include "public/web/WebFormElement.h" |
183 #include "public/web/WebFrameClient.h" | 183 #include "public/web/WebFrameClient.h" |
184 #include "public/web/WebHistoryItem.h" | 184 #include "public/web/WebHistoryItem.h" |
185 #include "public/web/WebIconURL.h" | 185 #include "public/web/WebIconURL.h" |
186 #include "public/web/WebInputElement.h" | 186 #include "public/web/WebInputElement.h" |
187 #include "public/web/WebNode.h" | 187 #include "public/web/WebNode.h" |
188 #include "public/web/WebPerformance.h" | 188 #include "public/web/WebPerformance.h" |
189 #include "public/web/WebPlugin.h" | 189 #include "public/web/WebPlugin.h" |
190 #include "public/web/WebPrintParams.h" | 190 #include "public/web/WebPrintParams.h" |
| 191 #include "public/web/WebPrintPresetOptions.h" |
191 #include "public/web/WebRange.h" | 192 #include "public/web/WebRange.h" |
192 #include "public/web/WebScriptSource.h" | 193 #include "public/web/WebScriptSource.h" |
193 #include "public/web/WebSecurityOrigin.h" | 194 #include "public/web/WebSecurityOrigin.h" |
194 #include "public/web/WebSerializedScriptValue.h" | 195 #include "public/web/WebSerializedScriptValue.h" |
195 #include "web/AssociatedURLLoader.h" | 196 #include "web/AssociatedURLLoader.h" |
196 #include "web/CompositionUnderlineVectorBuilder.h" | 197 #include "web/CompositionUnderlineVectorBuilder.h" |
197 #include "web/FindInPageCoordinates.h" | 198 #include "web/FindInPageCoordinates.h" |
198 #include "web/GeolocationClientProxy.h" | 199 #include "web/GeolocationClientProxy.h" |
199 #include "web/LocalFileSystemClient.h" | 200 #include "web/LocalFileSystemClient.h" |
200 #include "web/MIDIClientProxy.h" | 201 #include "web/MIDIClientProxy.h" |
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node) | 1334 bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node) |
1334 { | 1335 { |
1335 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFr
omFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer()); | 1336 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFr
omFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer()); |
1336 | 1337 |
1337 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint()) | 1338 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint()) |
1338 return false; | 1339 return false; |
1339 | 1340 |
1340 return pluginContainer->isPrintScalingDisabled(); | 1341 return pluginContainer->isPrintScalingDisabled(); |
1341 } | 1342 } |
1342 | 1343 |
1343 int WebLocalFrameImpl::getPrintCopiesForPlugin(const WebNode& node) | 1344 bool WebLocalFrameImpl::getPrintPresetOptionsForPlugin(const WebNode& node, WebP
rintPresetOptions* presetOptions) |
1344 { | 1345 { |
1345 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFro
mFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer()); | 1346 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFro
mFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer()); |
1346 | 1347 |
1347 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint()) | 1348 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint()) |
1348 return 1; | 1349 return false; |
1349 | 1350 |
1350 return pluginContainer->getCopiesToPrint(); | 1351 return pluginContainer->getPrintPresetOptionsFromDocument(presetOptions); |
1351 } | 1352 } |
1352 | 1353 |
1353 bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex) | 1354 bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex) |
1354 { | 1355 { |
1355 return frame()->document()->styleForPage(pageIndex)->pageSizeType() != PAGE_
SIZE_AUTO; | 1356 return frame()->document()->styleForPage(pageIndex)->pageSizeType() != PAGE_
SIZE_AUTO; |
1356 } | 1357 } |
1357 | 1358 |
1358 bool WebLocalFrameImpl::isPageBoxVisible(int pageIndex) | 1359 bool WebLocalFrameImpl::isPageBoxVisible(int pageIndex) |
1359 { | 1360 { |
1360 return frame()->document()->isPageBoxVisible(pageIndex); | 1361 return frame()->document()->isPageBoxVisible(pageIndex); |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 | 1914 |
1914 void WebLocalFrameImpl::invalidateAll() const | 1915 void WebLocalFrameImpl::invalidateAll() const |
1915 { | 1916 { |
1916 ASSERT(frame() && frame()->view()); | 1917 ASSERT(frame() && frame()->view()); |
1917 FrameView* view = frame()->view(); | 1918 FrameView* view = frame()->view(); |
1918 view->invalidateRect(view->frameRect()); | 1919 view->invalidateRect(view->frameRect()); |
1919 invalidateScrollbar(); | 1920 invalidateScrollbar(); |
1920 } | 1921 } |
1921 | 1922 |
1922 } // namespace blink | 1923 } // namespace blink |
OLD | NEW |