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

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

Issue 24921002: Make compositingState explicit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: path for re-landing try #2 with removed unnecessary comment Created 7 years, 2 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/rendering/RenderTreeAsText.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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 431
432 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); 432 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
433 433
434 // This avoids painting garbage between columns if there is a column gap. 434 // This avoids painting garbage between columns if there is a column gap.
435 if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated ) 435 if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated )
436 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC olor()); 436 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC olor());
437 437
438 paintObject(paintInfo, paintOffset); 438 paintObject(paintInfo, paintOffset);
439 } 439 }
440 440
441 static inline bool isComposited(RenderObject* object)
442 {
443 return object->hasLayer() && toRenderLayerModelObject(object)->layer()->isCo mposited();
444 }
445
446 static inline bool rendererObscuresBackground(RenderObject* rootObject) 441 static inline bool rendererObscuresBackground(RenderObject* rootObject)
447 { 442 {
448 if (!rootObject) 443 if (!rootObject)
449 return false; 444 return false;
450 445
451 RenderStyle* style = rootObject->style(); 446 RenderStyle* style = rootObject->style();
452 if (style->visibility() != VISIBLE 447 if (style->visibility() != VISIBLE
453 || style->opacity() != 1 448 || style->opacity() != 1
454 || style->hasTransform()) 449 || style->hasTransform())
455 return false; 450 return false;
456 451
457 if (isComposited(rootObject)) 452 if (rootObject->compositingState() == PaintsIntoOwnBacking)
458 return false; 453 return false;
459 454
460 const RenderObject* rootRenderer = rootObject->rendererForRootBackground(); 455 const RenderObject* rootRenderer = rootObject->rendererForRootBackground();
461 if (rootRenderer->style()->backgroundClip() == TextFillBox) 456 if (rootRenderer->style()->backgroundClip() == TextFillBox)
462 return false; 457 return false;
463 458
464 return true; 459 return true;
465 } 460 }
466 461
467 void RenderView::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint&) 462 void RenderView::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint&)
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 #endif 1227 #endif
1233 1228
1234 if (layoutState) 1229 if (layoutState)
1235 layoutState->m_isPaginated = m_fragmenting; 1230 layoutState->m_isPaginated = m_fragmenting;
1236 1231
1237 if (m_flowThreadState != RenderObject::NotInsideFlowThread) 1232 if (m_flowThreadState != RenderObject::NotInsideFlowThread)
1238 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); 1233 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState);
1239 } 1234 }
1240 1235
1241 } // namespace WebCore 1236 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTreeAsText.cpp ('k') | Source/core/rendering/RenderWidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698