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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2293293003: Make CaretBase a DisplayItemClient. (Closed)
Patch Set: Fix unit test and disable failing test on SPv2. Created 4 years, 3 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
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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 // Non-composited scrolling should be included in the bounds of scrolled ite ms. Since mapToVisualRectInAncestorSpace does not include 1112 // Non-composited scrolling should be included in the bounds of scrolled ite ms. Since mapToVisualRectInAncestorSpace does not include
1113 // scrolling of the ancestor, we need to add it back in after. 1113 // scrolling of the ancestor, we need to add it back in after.
1114 if (paintInvalidationContainer.isBox() && !paintInvalidationContainer.usesCo mpositedScrolling() && this != &paintInvalidationContainer) { 1114 if (paintInvalidationContainer.isBox() && !paintInvalidationContainer.usesCo mpositedScrolling() && this != &paintInvalidationContainer) {
1115 const LayoutBox* box = toLayoutBox(&paintInvalidationContainer); 1115 const LayoutBox* box = toLayoutBox(&paintInvalidationContainer);
1116 if (box->hasOverflowClip()) 1116 if (box->hasOverflowClip())
1117 return -box->scrolledContentOffset(); 1117 return -box->scrolledContentOffset();
1118 } 1118 }
1119 return IntSize(); 1119 return IntSize();
1120 } 1120 }
1121 1121
1122 void LayoutObject::invalidatePaintRectangle(const LayoutRect& dirtyRect, Display ItemClient* displayItemClient) const 1122 LayoutRect LayoutObject::invalidatePaintRectangle(const LayoutRect& dirtyRect, D isplayItemClient* displayItemClient) const
1123 { 1123 {
1124 ObjectPaintInvalidator(*this).invalidatePaintRectangle(dirtyRect, displayIte mClient); 1124 return ObjectPaintInvalidator(*this).invalidatePaintRectangle(dirtyRect, dis playItemClient);
1125 } 1125 }
1126 1126
1127 void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv alidationState) 1127 void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv alidationState)
1128 { 1128 {
1129 ensureIsReadyForPaintInvalidation(); 1129 ensureIsReadyForPaintInvalidation();
1130 1130
1131 // If we didn't need paint invalidation then our children don't need as well . 1131 // If we didn't need paint invalidation then our children don't need as well .
1132 // Skip walking down the tree as everything should be fine below us. 1132 // Skip walking down the tree as everything should be fine below us.
1133 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) 1133 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
1134 return; 1134 return;
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
3233 const blink::LayoutObject* root = object1; 3233 const blink::LayoutObject* root = object1;
3234 while (root->parent()) 3234 while (root->parent())
3235 root = root->parent(); 3235 root = root->parent();
3236 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3236 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3237 } else { 3237 } else {
3238 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3238 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3239 } 3239 }
3240 } 3240 }
3241 3241
3242 #endif 3242 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698