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

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

Issue 1209133002: Traverse into child LayoutViews during invalidateTreeIfNeeded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: public invalidateTreeIfNeeded Created 5 years, 5 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/layout/LayoutObject.h ('k') | Source/core/layout/LayoutPart.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) 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 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 break; 2352 break;
2353 } 2353 }
2354 } 2354 }
2355 } 2355 }
2356 return multicolContainer; 2356 return multicolContainer;
2357 } 2357 }
2358 2358
2359 return o; 2359 return o;
2360 } 2360 }
2361 2361
2362 LayoutObject* LayoutObject::containerCrossingFrameBoundaries() const
2363 {
2364 return isLayoutView() ? frame()->ownerLayoutObject() : container();
2365 }
2366
2362 bool LayoutObject::isSelectionBorder() const 2367 bool LayoutObject::isSelectionBorder() const
2363 { 2368 {
2364 SelectionState st = selectionState(); 2369 SelectionState st = selectionState();
2365 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth; 2370 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth;
2366 } 2371 }
2367 2372
2368 inline void LayoutObject::clearLayoutRootIfNeeded() const 2373 inline void LayoutObject::clearLayoutRootIfNeeded() const
2369 { 2374 {
2370 if (FrameView* view = frameView()) { 2375 if (FrameView* view = frameView()) {
2371 if (!documentBeingDestroyed()) 2376 if (!documentBeingDestroyed())
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
3102 return PaintInvalidationForcedByLayout; 3107 return PaintInvalidationForcedByLayout;
3103 case DocumentLifecycle::InCompositingUpdate: 3108 case DocumentLifecycle::InCompositingUpdate:
3104 return PaintInvalidationCompositingUpdate; 3109 return PaintInvalidationCompositingUpdate;
3105 default: 3110 default:
3106 return PaintInvalidationFull; 3111 return PaintInvalidationFull;
3107 } 3112 }
3108 } 3113 }
3109 3114
3110 inline void LayoutObject::markContainerChainForPaintInvalidation() 3115 inline void LayoutObject::markContainerChainForPaintInvalidation()
3111 { 3116 {
3112 for (LayoutObject* container = this->container(); container && !container->s houldCheckForPaintInvalidationRegardlessOfPaintInvalidationState(); container = container->container()) 3117 for (LayoutObject* container = this->containerCrossingFrameBoundaries(); con tainer && !container->shouldCheckForPaintInvalidationRegardlessOfPaintInvalidati onState(); container = container->containerCrossingFrameBoundaries())
3113 container->setSelfMayNeedPaintInvalidation(); 3118 container->setSelfMayNeedPaintInvalidation();
3114 } 3119 }
3115 3120
3116 void LayoutObject::setLayoutDidGetCalledSinceLastFrame() 3121 void LayoutObject::setLayoutDidGetCalledSinceLastFrame()
3117 { 3122 {
3118 m_bitfields.setLayoutDidGetCalledSinceLastFrame(true); 3123 m_bitfields.setLayoutDidGetCalledSinceLastFrame(true);
3119 3124
3120 // Make sure our parent is marked as needing invalidation. 3125 // Make sure our parent is marked as needing invalidation.
3121 // This would be unneeded if we allowed sub-tree invalidation (akin to sub-t ree layouts). 3126 // This would be unneeded if we allowed sub-tree invalidation (akin to sub-t ree layouts).
3122 markContainerChainForPaintInvalidation(); 3127 markContainerChainForPaintInvalidation();
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
3271 const blink::LayoutObject* root = object1; 3276 const blink::LayoutObject* root = object1;
3272 while (root->parent()) 3277 while (root->parent())
3273 root = root->parent(); 3278 root = root->parent();
3274 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3279 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3275 } else { 3280 } else {
3276 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3281 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3277 } 3282 }
3278 } 3283 }
3279 3284
3280 #endif 3285 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/layout/LayoutPart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698