Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: Source/web/WebLocalFrameImpl.cpp

Issue 960123006: Merge 190872 "Traverse subframes during PrintContext::outputLink..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2311/
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/page/PrintContextTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/page/PrintContextTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698