| OLD | NEW |
| 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, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. 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 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 | 981 |
| 982 for (const FillLayer* curLayer = &layers; curLayer; curLayer = curLayer->nex
t()) { | 982 for (const FillLayer* curLayer = &layers; curLayer; curLayer = curLayer->nex
t()) { |
| 983 if (curLayer->image() && image == curLayer->image()->data() && curLayer-
>image()->canRender(*this)) { | 983 if (curLayer->image() && image == curLayer->image()->data() && curLayer-
>image()->canRender(*this)) { |
| 984 layerRenderer->setShouldDoFullPaintInvalidation(true); | 984 layerRenderer->setShouldDoFullPaintInvalidation(true); |
| 985 return true; | 985 return true; |
| 986 } | 986 } |
| 987 } | 987 } |
| 988 return false; | 988 return false; |
| 989 } | 989 } |
| 990 | 990 |
| 991 void RenderBox::clearPaintInvalidationState(const PaintInvalidationState& paintI
nvalidationState) | |
| 992 { | |
| 993 RenderBoxModelObject::clearPaintInvalidationState(paintInvalidationState); | |
| 994 | |
| 995 if (ScrollableArea* area = scrollableArea()) | |
| 996 area->resetScrollbarDamage(); | |
| 997 } | |
| 998 | |
| 999 #if ENABLE(ASSERT) | |
| 1000 bool RenderBox::paintInvalidationStateIsDirty() const | |
| 1001 { | |
| 1002 if (ScrollableArea* area = scrollableArea()) { | |
| 1003 if (area->hasVerticalBarDamage() || area->hasHorizontalBarDamage()) | |
| 1004 return true; | |
| 1005 } | |
| 1006 return RenderBoxModelObject::paintInvalidationStateIsDirty(); | |
| 1007 } | |
| 1008 #endif | |
| 1009 | |
| 1010 bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumu
latedOffset, ContentsClipBehavior contentsClipBehavior) | 991 bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumu
latedOffset, ContentsClipBehavior contentsClipBehavior) |
| 1011 { | 992 { |
| 1012 if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == Paint
PhaseSelfOutline || paintInfo.phase == PaintPhaseMask) | 993 if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == Paint
PhaseSelfOutline || paintInfo.phase == PaintPhaseMask) |
| 1013 return false; | 994 return false; |
| 1014 | 995 |
| 1015 bool isControlClip = hasControlClip(); | 996 bool isControlClip = hasControlClip(); |
| 1016 bool isOverflowClip = hasOverflowClip() && !layer()->isSelfPaintingLayer(); | 997 bool isOverflowClip = hasOverflowClip() && !layer()->isSelfPaintingLayer(); |
| 1017 | 998 |
| 1018 if (!isControlClip && !isOverflowClip) | 999 if (!isControlClip && !isOverflowClip) |
| 1019 return false; | 1000 return false; |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 { | 1215 { |
| 1235 if (inlineBoxWrapper()) { | 1216 if (inlineBoxWrapper()) { |
| 1236 if (!documentBeingDestroyed()) | 1217 if (!documentBeingDestroyed()) |
| 1237 inlineBoxWrapper()->remove(); | 1218 inlineBoxWrapper()->remove(); |
| 1238 inlineBoxWrapper()->destroy(); | 1219 inlineBoxWrapper()->destroy(); |
| 1239 ASSERT(m_rareData); | 1220 ASSERT(m_rareData); |
| 1240 m_rareData->m_inlineBoxWrapper = 0; | 1221 m_rareData->m_inlineBoxWrapper = 0; |
| 1241 } | 1222 } |
| 1242 } | 1223 } |
| 1243 | 1224 |
| 1244 LayoutRect RenderBox::clippedOverflowRectForPaintInvalidation(const RenderLayerM
odelObject* paintInvalidationContainer, const PaintInvalidationState* paintInval
idationState) const | |
| 1245 { | |
| 1246 LayoutRect r = visualOverflowRect(); | |
| 1247 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); | |
| 1248 return r; | |
| 1249 } | |
| 1250 | |
| 1251 void RenderBox::mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* pain
tInvalidationState) const | 1225 void RenderBox::mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* pain
tInvalidationState) const |
| 1252 { | 1226 { |
| 1253 // The rect we compute at each step is shifted by our x/y offset in the pare
nt container's coordinate space. | 1227 // The rect we compute at each step is shifted by our x/y offset in the pare
nt container's coordinate space. |
| 1254 // | 1228 // |
| 1255 // RenderView::computeRectForPaintInvalidation then converts the rect to phy
sical coordinates. We also convert to | 1229 // RenderView::computeRectForPaintInvalidation then converts the rect to phy
sical coordinates. We also convert to |
| 1256 // physical when we hit a paintInvalidationContainer boundary. Therefore the
final rect returned is always in the | 1230 // physical when we hit a paintInvalidationContainer boundary. Therefore the
final rect returned is always in the |
| 1257 // physical coordinate space of the paintInvalidationContainer. | 1231 // physical coordinate space of the paintInvalidationContainer. |
| 1258 RenderStyle* styleToUse = style(); | 1232 RenderStyle* styleToUse = style(); |
| 1259 | 1233 |
| 1260 EPosition position = styleToUse->position(); | 1234 EPosition position = styleToUse->position(); |
| (...skipping 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3301 | 3275 |
| 3302 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 3276 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 3303 { | 3277 { |
| 3304 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); | 3278 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); |
| 3305 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 3279 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 3306 ASSERT(hasBackground == style.hasBackground()); | 3280 ASSERT(hasBackground == style.hasBackground()); |
| 3307 hasBorder = style.hasBorder(); | 3281 hasBorder = style.hasBorder(); |
| 3308 } | 3282 } |
| 3309 | 3283 |
| 3310 } // namespace blink | 3284 } // namespace blink |
| OLD | NEW |