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

Side by Side Diff: Source/WebCore/page/win/FrameCGWin.cpp

Issue 10756010: Merge 121388 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « Source/WebCore/page/mac/FrameMac.mm ('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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 FloatRect fr = frame->selection()->bounds(); 86 FloatRect fr = frame->selection()->bounds();
87 IntRect ir(static_cast<int>(fr.x()), static_cast<int>(fr.y()), 87 IntRect ir(static_cast<int>(fr.x()), static_cast<int>(fr.y()),
88 static_cast<int>(fr.width()), static_cast<int>(fr.height())); 88 static_cast<int>(fr.width()), static_cast<int>(fr.height()));
89 HBITMAP image = imageFromRect(frame, ir); 89 HBITMAP image = imageFromRect(frame, ir);
90 frame->view()->setPaintBehavior(PaintBehaviorNormal); 90 frame->view()->setPaintBehavior(PaintBehaviorNormal);
91 return image; 91 return image;
92 } 92 }
93 93
94 DragImageRef Frame::nodeImage(Node* node) 94 DragImageRef Frame::nodeImage(Node* node)
95 { 95 {
96 document()->updateLayout();
97
96 RenderObject* renderer = node->renderer(); 98 RenderObject* renderer = node->renderer();
97 if (!renderer) 99 if (!renderer)
98 return 0; 100 return 0;
99 101
100 LayoutRect topLevelRect; 102 LayoutRect topLevelRect;
101 IntRect paintingRect = pixelSnappedIntRect(renderer->paintingRootRect(topLev elRect)); 103 IntRect paintingRect = pixelSnappedIntRect(renderer->paintingRootRect(topLev elRect));
102 104
103 document()->updateLayout();
104
105 m_view->setNodeToDraw(node); // invoke special sub-tree drawing mode 105 m_view->setNodeToDraw(node); // invoke special sub-tree drawing mode
106 HBITMAP result = imageFromRect(this, paintingRect); 106 HBITMAP result = imageFromRect(this, paintingRect);
107 m_view->setNodeToDraw(0); 107 m_view->setNodeToDraw(0);
108 108
109 return result; 109 return result;
110 } 110 }
111 111
112 } // namespace WebCore 112 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/page/mac/FrameMac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698