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

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

Issue 656643004: Let setShouldDoFullPaintInvalidation accept reason (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/RenderObject.h ('k') | Source/core/rendering/RenderObjectChildList.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 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 3025 matching lines...) Expand 10 before | Expand all | Expand 10 after
3036 { 3036 {
3037 ASSERT_NOT_REACHED(); 3037 ASSERT_NOT_REACHED();
3038 return false; 3038 return false;
3039 } 3039 }
3040 3040
3041 bool RenderObject::isRelayoutBoundaryForInspector() const 3041 bool RenderObject::isRelayoutBoundaryForInspector() const
3042 { 3042 {
3043 return objectIsRelayoutBoundary(this); 3043 return objectIsRelayoutBoundary(this);
3044 } 3044 }
3045 3045
3046 void RenderObject::setShouldDoFullPaintInvalidationWithReason(PaintInvalidationR eason reason) 3046 void RenderObject::setShouldDoFullPaintInvalidation(PaintInvalidationReason reas on)
3047 { 3047 {
3048 // Only full invalidation reasons are allowed. 3048 // Only full invalidation reasons are allowed.
3049 ASSERT(isFullPaintInvalidationReason(reason)); 3049 ASSERT(isFullPaintInvalidationReason(reason));
3050 3050
3051 // RenderText objects don't know how to invalidate paint for themselves, sin ce they don't know how to compute their bounds. 3051 // RenderText objects don't know how to invalidate paint for themselves, sin ce they don't know how to compute their bounds.
3052 // Instead the parent fully invalidate when any text needs full paint invali dation. 3052 // Instead the parent fully invalidate when any text needs full paint invali dation.
3053 if (isText()) { 3053 if (isText()) {
3054 parent()->setShouldDoFullPaintInvalidationWithReason(reason); 3054 parent()->setShouldDoFullPaintInvalidation(reason);
3055 return; 3055 return;
3056 } 3056 }
3057 3057
3058 if (m_bitfields.fullPaintInvalidationReason() == PaintInvalidationNone) 3058 if (m_bitfields.fullPaintInvalidationReason() == PaintInvalidationNone)
3059 m_bitfields.setFullPaintInvalidationReason(reason); 3059 m_bitfields.setFullPaintInvalidationReason(reason);
3060 3060
3061 ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInvalidat ion); 3061 ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInvalidat ion);
3062 frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called not during FrameView::updateLayoutAndStyleForPainting(). 3062 frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called not during FrameView::updateLayoutAndStyleForPainting().
3063 markContainingBlockChainForPaintInvalidation(); 3063 markContainingBlockChainForPaintInvalidation();
3064 } 3064 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 { 3134 {
3135 if (object1) { 3135 if (object1) {
3136 const blink::RenderObject* root = object1; 3136 const blink::RenderObject* root = object1;
3137 while (root->parent()) 3137 while (root->parent())
3138 root = root->parent(); 3138 root = root->parent();
3139 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3139 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3140 } 3140 }
3141 } 3141 }
3142 3142
3143 #endif 3143 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderObjectChildList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698