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

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

Issue 457973003: We should call FrameView::updateLayoutAndStyleForPainting before painting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Needs rebaseline Created 6 years, 4 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/svg/graphics/SVGImage.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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 outputLinkedDestinations(context, frame()->document(), pageRect); 334 outputLinkedDestinations(context, frame()->document(), pageRect);
335 context.restore(); 335 context.restore();
336 return scale; 336 return scale;
337 } 337 }
338 338
339 void spoolAllPagesWithBoundaries(GraphicsContext& graphicsContext, const Flo atSize& pageSizeInPixels) 339 void spoolAllPagesWithBoundaries(GraphicsContext& graphicsContext, const Flo atSize& pageSizeInPixels)
340 { 340 {
341 if (!frame()->document() || !frame()->view() || !frame()->document()->re nderView()) 341 if (!frame()->document() || !frame()->view() || !frame()->document()->re nderView())
342 return; 342 return;
343 343
344 frame()->document()->updateLayout(); 344 frame()->view()->updateLayoutAndStyleForPainting();
345 345
346 float pageHeight; 346 float pageHeight;
347 computePageRects(FloatRect(FloatPoint(0, 0), pageSizeInPixels), 0, 0, 1, pageHeight); 347 computePageRects(FloatRect(FloatPoint(0, 0), pageSizeInPixels), 0, 0, 1, pageHeight);
348 348
349 const float pageWidth = pageSizeInPixels.width(); 349 const float pageWidth = pageSizeInPixels.width();
350 size_t numPages = pageRects().size(); 350 size_t numPages = pageRects().size();
351 int totalHeight = numPages * (pageSizeInPixels.height() + 1) - 1; 351 int totalHeight = numPages * (pageSizeInPixels.height() + 1) - 1;
352 352
353 // Fill the whole background by white. 353 // Fill the whole background by white.
354 graphicsContext.setFillColor(Color::white); 354 graphicsContext.setFillColor(Color::white);
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 1875
1876 void WebLocalFrameImpl::invalidateAll() const 1876 void WebLocalFrameImpl::invalidateAll() const
1877 { 1877 {
1878 ASSERT(frame() && frame()->view()); 1878 ASSERT(frame() && frame()->view());
1879 FrameView* view = frame()->view(); 1879 FrameView* view = frame()->view();
1880 view->invalidateRect(view->frameRect()); 1880 view->invalidateRect(view->frameRect());
1881 invalidateScrollbar(); 1881 invalidateScrollbar();
1882 } 1882 }
1883 1883
1884 } // namespace blink 1884 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/graphics/SVGImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698