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) 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 struct SameSizeAsLayoutObject { | 132 struct SameSizeAsLayoutObject { |
133 virtual ~SameSizeAsLayoutObject() { } // Allocate vtable pointer. | 133 virtual ~SameSizeAsLayoutObject() { } // Allocate vtable pointer. |
134 void* pointers[6]; | 134 void* pointers[6]; |
135 #if ENABLE(ASSERT) | 135 #if ENABLE(ASSERT) |
136 unsigned m_debugBitfields : 2; | 136 unsigned m_debugBitfields : 2; |
137 #endif | 137 #endif |
138 unsigned m_bitfields; | 138 unsigned m_bitfields; |
139 unsigned m_bitfields2; | 139 unsigned m_bitfields2; |
140 LayoutRect rect; // Stores the previous paint invalidation rect. | 140 LayoutRect rect; // Stores the previous paint invalidation rect. |
141 LayoutPoint position; // Stores the previous position from the paint invalid
ation container. | 141 LayoutPoint position; // Stores the previous position from the paint invalid
ation container. |
| 142 unsigned cacheGeneration; |
142 }; | 143 }; |
143 | 144 |
144 static_assert(sizeof(LayoutObject) == sizeof(SameSizeAsLayoutObject), "LayoutObj
ect should stay small"); | 145 static_assert(sizeof(LayoutObject) == sizeof(SameSizeAsLayoutObject), "LayoutObj
ect should stay small"); |
145 | 146 |
146 bool LayoutObject::s_affectsParentBlock = false; | 147 bool LayoutObject::s_affectsParentBlock = false; |
147 | 148 |
148 typedef HashMap<const LayoutObject*, LayoutRect> SelectionPaintInvalidationMap; | 149 typedef HashMap<const LayoutObject*, LayoutRect> SelectionPaintInvalidationMap; |
149 static SelectionPaintInvalidationMap* selectionPaintInvalidationMap = nullptr; | 150 static SelectionPaintInvalidationMap* selectionPaintInvalidationMap = nullptr; |
150 | 151 |
151 // The pointer to paint properties is implemented as a global hash map temporari
ly, | 152 // The pointer to paint properties is implemented as a global hash map temporari
ly, |
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 | 1272 |
1272 const LayoutBoxModelObject& paintInvalidationContainer = containerForPaintIn
validation(); | 1273 const LayoutBoxModelObject& paintInvalidationContainer = containerForPaintIn
validation(); |
1273 LayoutRect dirtyRectOnBacking = dirtyRect; | 1274 LayoutRect dirtyRectOnBacking = dirtyRect; |
1274 PaintLayer::mapRectToPaintInvalidationBacking(this, &paintInvalidationContai
ner, dirtyRectOnBacking); | 1275 PaintLayer::mapRectToPaintInvalidationBacking(this, &paintInvalidationContai
ner, dirtyRectOnBacking); |
1275 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRectOnBacking
, PaintInvalidationRectangle); | 1276 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRectOnBacking
, PaintInvalidationRectangle); |
1276 return &paintInvalidationContainer; | 1277 return &paintInvalidationContainer; |
1277 } | 1278 } |
1278 | 1279 |
1279 void LayoutObject::invalidatePaintRectangle(const LayoutRect& rect) const | 1280 void LayoutObject::invalidatePaintRectangle(const LayoutRect& rect) const |
1280 { | 1281 { |
1281 const LayoutBoxModelObject* paintInvalidationContainer = invalidatePaintRect
angleInternal(rect); | 1282 if (const LayoutBoxModelObject* paintInvalidationContainer = invalidatePaint
RectangleInternal(rect)) { |
1282 if (paintInvalidationContainer) { | |
1283 // Don't need to change the paint invalidation bounds of the client, so
pass nullptr. | 1283 // Don't need to change the paint invalidation bounds of the client, so
pass nullptr. |
1284 invalidateDisplayItemClients(*paintInvalidationContainer, PaintInvalidat
ionRectangle, nullptr); | 1284 invalidateDisplayItemClients(*paintInvalidationContainer, PaintInvalidat
ionRectangle, nullptr); |
1285 } | 1285 } |
1286 } | 1286 } |
1287 | 1287 |
1288 void LayoutObject::invalidatePaintRectangleNotInvalidatingDisplayItemClients(con
st LayoutRect& r) const | 1288 void LayoutObject::invalidatePaintRectangleNotInvalidatingDisplayItemClients(con
st LayoutRect& r) const |
1289 { | 1289 { |
1290 invalidatePaintRectangleInternal(r); | 1290 invalidatePaintRectangleInternal(r); |
1291 } | 1291 } |
1292 | 1292 |
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3518 const blink::LayoutObject* root = object1; | 3518 const blink::LayoutObject* root = object1; |
3519 while (root->parent()) | 3519 while (root->parent()) |
3520 root = root->parent(); | 3520 root = root->parent(); |
3521 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3521 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3522 } else { | 3522 } else { |
3523 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3523 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3524 } | 3524 } |
3525 } | 3525 } |
3526 | 3526 |
3527 #endif | 3527 #endif |
OLD | NEW |