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

Side by Side Diff: Source/core/rendering/RenderView.cpp

Issue 23494007: Implement getter/setter in PaintInfo::rect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No signed off. Created 7 years, 3 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/core/rendering/RenderTableSection.cpp ('k') | Source/core/rendering/RenderWidget.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 { 406 {
407 // If we ever require layout but receive a paint anyway, something has gone horribly wrong. 407 // If we ever require layout but receive a paint anyway, something has gone horribly wrong.
408 ASSERT(!needsLayout()); 408 ASSERT(!needsLayout());
409 // RenderViews should never be called to paint with an offset not on device pixels. 409 // RenderViews should never be called to paint with an offset not on device pixels.
410 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse t); 410 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse t);
411 411
412 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); 412 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
413 413
414 // This avoids painting garbage between columns if there is a column gap. 414 // This avoids painting garbage between columns if there is a column gap.
415 if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated ) 415 if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated )
416 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC olor()); 416 paintInfo.context->fillRect(paintInfo.rect(), m_frameView->baseBackgroun dColor());
417 417
418 paintObject(paintInfo, paintOffset); 418 paintObject(paintInfo, paintOffset);
419 } 419 }
420 420
421 static inline bool isComposited(RenderObject* object) 421 static inline bool isComposited(RenderObject* object)
422 { 422 {
423 return object->hasLayer() && toRenderLayerModelObject(object)->layer()->isCo mposited(); 423 return object->hasLayer() && toRenderLayerModelObject(object)->layer()->isCo mposited();
424 } 424 }
425 425
426 static inline bool rendererObscuresBackground(RenderObject* rootObject) 426 static inline bool rendererObscuresBackground(RenderObject* rootObject)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 // if there is a transform on the <html>, or if there is a page scale factor less than 1. 492 // if there is a transform on the <html>, or if there is a page scale factor less than 1.
493 // Only fill with the base background color (typically white) if we're the r oot document, 493 // Only fill with the base background color (typically white) if we're the r oot document,
494 // since iframes/frames with no background in the child document should show the parent's background. 494 // since iframes/frames with no background in the child document should show the parent's background.
495 if (frameView()->isTransparent()) // FIXME: This needs to be dynamic. We sh ould be able to go back to blitting if we ever stop being transparent. 495 if (frameView()->isTransparent()) // FIXME: This needs to be dynamic. We sh ould be able to go back to blitting if we ever stop being transparent.
496 frameView()->setCannotBlitToWindow(); // The parent must show behind the child. 496 frameView()->setCannotBlitToWindow(); // The parent must show behind the child.
497 else { 497 else {
498 Color baseColor = frameView()->baseBackgroundColor(); 498 Color baseColor = frameView()->baseBackgroundColor();
499 if (baseColor.alpha()) { 499 if (baseColor.alpha()) {
500 CompositeOperator previousOperator = paintInfo.context->compositeOpe ration(); 500 CompositeOperator previousOperator = paintInfo.context->compositeOpe ration();
501 paintInfo.context->setCompositeOperation(CompositeCopy); 501 paintInfo.context->setCompositeOperation(CompositeCopy);
502 paintInfo.context->fillRect(paintInfo.rect, baseColor); 502 paintInfo.context->fillRect(paintInfo.rect(), baseColor);
503 paintInfo.context->setCompositeOperation(previousOperator); 503 paintInfo.context->setCompositeOperation(previousOperator);
504 } else 504 } else {
505 paintInfo.context->clearRect(paintInfo.rect); 505 paintInfo.context->clearRect(paintInfo.rect());
506 }
506 } 507 }
507 } 508 }
508 509
509 bool RenderView::shouldRepaint(const LayoutRect& r) const 510 bool RenderView::shouldRepaint(const LayoutRect& r) const
510 { 511 {
511 if (printing() || r.width() == 0 || r.height() == 0) 512 if (printing() || r.width() == 0 || r.height() == 0)
512 return false; 513 return false;
513 514
514 if (!m_frameView) 515 if (!m_frameView)
515 return false; 516 return false;
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 #endif 1154 #endif
1154 1155
1155 if (layoutState) 1156 if (layoutState)
1156 layoutState->m_isPaginated = m_fragmenting; 1157 layoutState->m_isPaginated = m_fragmenting;
1157 1158
1158 if (m_flowThreadState != RenderObject::NotInsideFlowThread) 1159 if (m_flowThreadState != RenderObject::NotInsideFlowThread)
1159 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); 1160 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState);
1160 } 1161 }
1161 1162
1162 } // namespace WebCore 1163 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableSection.cpp ('k') | Source/core/rendering/RenderWidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698