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

Side by Side Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 1115353002: Update renderer to layoutObject in core/html. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/html/HTMLAreaElement.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | 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) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 toCanvasRenderingContext2D(m_context.get())->clearRect(0, 0, width() , height()); 383 toCanvasRenderingContext2D(m_context.get())->clearRect(0, 0, width() , height());
384 } 384 }
385 return; 385 return;
386 } 386 }
387 387
388 setSurfaceSize(newSize); 388 setSurfaceSize(newSize);
389 389
390 if (m_context && m_context->is3d() && oldSize != size()) 390 if (m_context && m_context->is3d() && oldSize != size())
391 toWebGLRenderingContextBase(m_context.get())->reshape(width(), height()) ; 391 toWebGLRenderingContextBase(m_context.get())->reshape(width(), height()) ;
392 392
393 if (LayoutObject* renderer = this->layoutObject()) { 393 if (LayoutObject* layoutObject = this->layoutObject()) {
394 if (renderer->isCanvas()) { 394 if (layoutObject->isCanvas()) {
395 if (oldSize != size()) { 395 if (oldSize != size()) {
396 toLayoutHTMLCanvas(renderer)->canvasSizeChanged(); 396 toLayoutHTMLCanvas(layoutObject)->canvasSizeChanged();
397 if (layoutBox() && layoutBox()->hasAcceleratedCompositing()) 397 if (layoutBox() && layoutBox()->hasAcceleratedCompositing())
398 layoutBox()->contentChanged(CanvasChanged); 398 layoutBox()->contentChanged(CanvasChanged);
399 } 399 }
400 if (hadImageBuffer) 400 if (hadImageBuffer)
401 renderer->setShouldDoFullPaintInvalidation(); 401 layoutObject->setShouldDoFullPaintInvalidation();
402 } 402 }
403 } 403 }
404 404
405 for (CanvasObserver* canvasObserver : m_observers) 405 for (CanvasObserver* canvasObserver : m_observers)
406 canvasObserver->canvasResized(this); 406 canvasObserver->canvasResized(this);
407 } 407 }
408 408
409 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const 409 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const
410 { 410 {
411 ASSERT(m_context); 411 ASSERT(m_context);
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 { 877 {
878 return FloatSize(width(), height()); 878 return FloatSize(width(), height());
879 } 879 }
880 880
881 bool HTMLCanvasElement::isOpaque() const 881 bool HTMLCanvasElement::isOpaque() const
882 { 882 {
883 return m_context && !m_context->hasAlpha(); 883 return m_context && !m_context->hasAlpha();
884 } 884 }
885 885
886 } // blink 886 } // blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAreaElement.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698