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

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

Issue 1161863004: Change Layout::adjustCompositedContainerForSpecialAncestors into an overloaded version of container… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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') | no next file » | 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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 return result; 1041 return result;
1042 } 1042 }
1043 1043
1044 void LayoutObject::paint(const PaintInfo&, const LayoutPoint&) 1044 void LayoutObject::paint(const PaintInfo&, const LayoutPoint&)
1045 { 1045 {
1046 } 1046 }
1047 1047
1048 const LayoutBoxModelObject* LayoutObject::containerForPaintInvalidation() const 1048 const LayoutBoxModelObject* LayoutObject::containerForPaintInvalidation() const
1049 { 1049 {
1050 RELEASE_ASSERT(isRooted()); 1050 RELEASE_ASSERT(isRooted());
1051 return adjustCompositedContainerForSpecialAncestors(enclosingCompositedConta iner()); 1051 return containerForPaintInvalidation(enclosingCompositedContainer());
1052 } 1052 }
1053 1053
1054 const LayoutBoxModelObject* LayoutObject::enclosingCompositedContainer() const 1054 const LayoutBoxModelObject* LayoutObject::enclosingCompositedContainer() const
1055 { 1055 {
1056 LayoutBoxModelObject* container = 0; 1056 LayoutBoxModelObject* container = 0;
1057 // FIXME: CompositingState is not necessarily up to date for many callers of this function. 1057 // FIXME: CompositingState is not necessarily up to date for many callers of this function.
1058 DisableCompositingQueryAsserts disabler; 1058 DisableCompositingQueryAsserts disabler;
1059 1059
1060 if (DeprecatedPaintLayer* compositingLayer = enclosingLayer()->enclosingLaye rForPaintInvalidationCrossingFrameBoundaries()) 1060 if (DeprecatedPaintLayer* compositingLayer = enclosingLayer()->enclosingLaye rForPaintInvalidationCrossingFrameBoundaries())
1061 container = compositingLayer->layoutObject(); 1061 container = compositingLayer->layoutObject();
1062 return container; 1062 return container;
1063 } 1063 }
1064 1064
1065 const LayoutBoxModelObject* LayoutObject::adjustCompositedContainerForSpecialAnc estors(const LayoutBoxModelObject* paintInvalidationContainer) const 1065 const LayoutBoxModelObject* LayoutObject::containerForPaintInvalidation(const La youtBoxModelObject* paintInvalidationContainer) const
leviw_travelin_and_unemployed 2015/06/02 17:49:51 I like the simplification ideal behind this patch,
1066 { 1066 {
1067 if (paintInvalidationContainer) 1067 if (paintInvalidationContainer)
1068 return paintInvalidationContainer; 1068 return paintInvalidationContainer;
1069 1069
1070 LayoutView* layoutView = view(); 1070 LayoutView* layoutView = view();
1071 while (layoutView->frame()->ownerLayoutObject()) 1071 while (layoutView->frame()->ownerLayoutObject())
1072 layoutView = layoutView->frame()->ownerLayoutObject()->view(); 1072 layoutView = layoutView->frame()->ownerLayoutObject()->view();
1073 return layoutView; 1073 return layoutView;
1074 } 1074 }
1075 1075
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after
3305 const blink::LayoutObject* root = object1; 3305 const blink::LayoutObject* root = object1;
3306 while (root->parent()) 3306 while (root->parent())
3307 root = root->parent(); 3307 root = root->parent();
3308 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3308 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3309 } else { 3309 } else {
3310 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3310 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3311 } 3311 }
3312 } 3312 }
3313 3313
3314 #endif 3314 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698