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

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

Issue 211193002: Compute correct repaint rect for decorated RenderSVGRoots (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make border tests less RAL/non-RAL sensitive. Created 6 years, 8 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/RenderBoxModelObject.h ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 ASSERT(!continuation()); 121 ASSERT(!continuation());
122 122
123 // If this is a first-letter object with a remaining text fragment then the 123 // If this is a first-letter object with a remaining text fragment then the
124 // entry needs to be cleared from the map. 124 // entry needs to be cleared from the map.
125 if (firstLetterRemainingText()) 125 if (firstLetterRemainingText())
126 setFirstLetterRemainingText(0); 126 setFirstLetterRemainingText(0);
127 127
128 RenderLayerModelObject::willBeDestroyed(); 128 RenderLayerModelObject::willBeDestroyed();
129 } 129 }
130 130
131 bool RenderBoxModelObject::calculateHasBoxDecorations() const
132 {
133 RenderStyle* styleToUse = style();
134 ASSERT(styleToUse);
135 return hasBackground() || styleToUse->hasBorder() || styleToUse->hasAppearan ce() || styleToUse->boxShadow();
136 }
137
131 void RenderBoxModelObject::updateFromStyle() 138 void RenderBoxModelObject::updateFromStyle()
132 { 139 {
133 RenderLayerModelObject::updateFromStyle(); 140 RenderLayerModelObject::updateFromStyle();
134 141
135 RenderStyle* styleToUse = style(); 142 RenderStyle* styleToUse = style();
136 setHasBoxDecorations(hasBackground() || styleToUse->hasBorder() || styleToUs e->hasAppearance() || styleToUse->boxShadow()); 143 setHasBoxDecorations(calculateHasBoxDecorations());
137 setInline(styleToUse->isDisplayInlineType()); 144 setInline(styleToUse->isDisplayInlineType());
138 setPositionState(styleToUse->position()); 145 setPositionState(styleToUse->position());
139 setHorizontalWritingMode(styleToUse->isHorizontalWritingMode()); 146 setHorizontalWritingMode(styleToUse->isHorizontalWritingMode());
140 } 147 }
141 148
142 static LayoutSize accumulateInFlowPositionOffsets(const RenderObject* child) 149 static LayoutSize accumulateInFlowPositionOffsets(const RenderObject* child)
143 { 150 {
144 if (!child->isAnonymousBlock() || !child->isInFlowPositioned()) 151 if (!child->isAnonymousBlock() || !child->isInFlowPositioned())
145 return LayoutSize(); 152 return LayoutSize();
146 LayoutSize offset; 153 LayoutSize offset;
(...skipping 2670 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2824 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2818 for (RenderObject* child = startChild; child && child != endChild; ) { 2825 for (RenderObject* child = startChild; child && child != endChild; ) {
2819 // Save our next sibling as moveChildTo will clear it. 2826 // Save our next sibling as moveChildTo will clear it.
2820 RenderObject* nextSibling = child->nextSibling(); 2827 RenderObject* nextSibling = child->nextSibling();
2821 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 2828 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
2822 child = nextSibling; 2829 child = nextSibling;
2823 } 2830 }
2824 } 2831 }
2825 2832
2826 } // namespace WebCore 2833 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.h ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698