| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 IntRect pageRect = m_pageRects[pageNumber]; | 408 IntRect pageRect = m_pageRects[pageNumber]; |
| 409 float scale = m_printedPageWidth / pageRect.width(); | 409 float scale = m_printedPageWidth / pageRect.width(); |
| 410 | 410 |
| 411 context.save(); | 411 context.save(); |
| 412 #if OS(POSIX) && !OS(MACOSX) | 412 #if OS(POSIX) && !OS(MACOSX) |
| 413 context.scale(scale, scale); | 413 context.scale(scale, scale); |
| 414 #endif | 414 #endif |
| 415 context.translate(static_cast<float>(-pageRect.x()), static_cast<float>(
-pageRect.y())); | 415 context.translate(static_cast<float>(-pageRect.x()), static_cast<float>(
-pageRect.y())); |
| 416 context.clip(pageRect); | 416 context.clip(pageRect); |
| 417 frame()->view()->paintContents(&context, pageRect); | 417 frame()->view()->paintContents(&context, pageRect); |
| 418 outputLinkAndLinkedDestinations(context, frame()->document(), pageRect); | 418 outputLinkAndLinkedDestinations(context, pageRect); |
| 419 context.restore(); | 419 context.restore(); |
| 420 return scale; | 420 return scale; |
| 421 } | 421 } |
| 422 | 422 |
| 423 private: | 423 private: |
| 424 void dispatchEventsForPrintingOnAllFrames() | 424 void dispatchEventsForPrintingOnAllFrames() |
| 425 { | 425 { |
| 426 WillBeHeapVector<RefPtrWillBeMember<Document>> documents; | 426 WillBeHeapVector<RefPtrWillBeMember<Document>> documents; |
| 427 for (Frame* currentFrame = frame(); currentFrame; currentFrame = current
Frame->tree().traverseNext(frame())) { | 427 for (Frame* currentFrame = frame(); currentFrame; currentFrame = current
Frame->tree().traverseNext(frame())) { |
| 428 if (currentFrame->isLocalFrame()) | 428 if (currentFrame->isLocalFrame()) |
| (...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2003 { | 2003 { |
| 2004 m_frameWidget = frameWidget; | 2004 m_frameWidget = frameWidget; |
| 2005 } | 2005 } |
| 2006 | 2006 |
| 2007 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2007 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
| 2008 { | 2008 { |
| 2009 return m_frameWidget; | 2009 return m_frameWidget; |
| 2010 } | 2010 } |
| 2011 | 2011 |
| 2012 } // namespace blink | 2012 } // namespace blink |
| OLD | NEW |