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

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

Issue 1187033004: No need for both isLayoutBoxModelObject() and isBoxModelObject(). (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') | Source/core/paint/FrameSetPainter.cpp » ('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 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 1662
1663 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) { 1663 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) {
1664 if (style()->hasBorder() || style()->hasOutline() 1664 if (style()->hasBorder() || style()->hasOutline()
1665 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace())) 1665 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace()))
1666 diff.setNeedsPaintInvalidationObject(); 1666 diff.setNeedsPaintInvalidationObject();
1667 } 1667 }
1668 1668
1669 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual 1669 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual
1670 // style changing, since it depends on whether we decide to composite these elements. When the 1670 // style changing, since it depends on whether we decide to composite these elements. When the
1671 // layer status of one of these elements changes, we need to force a layout. 1671 // layer status of one of these elements changes, we need to force a layout.
1672 if (!diff.needsFullLayout() && style() && isLayoutBoxModelObject()) { 1672 if (!diff.needsFullLayout() && style() && isBoxModelObject()) {
1673 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoDeprecatedPaintLayer; 1673 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoDeprecatedPaintLayer;
1674 if (hasLayer() != requiresLayer) 1674 if (hasLayer() != requiresLayer)
1675 diff.setNeedsFullLayout(); 1675 diff.setNeedsFullLayout();
1676 } 1676 }
1677 1677
1678 // If we have no layer(), just treat a PaintInvalidationLayer hint as a norm al paint invalidation. 1678 // If we have no layer(), just treat a PaintInvalidationLayer hint as a norm al paint invalidation.
1679 if (diff.needsPaintInvalidationLayer() && !hasLayer()) { 1679 if (diff.needsPaintInvalidationLayer() && !hasLayer()) {
1680 diff.clearNeedsPaintInvalidation(); 1680 diff.clearNeedsPaintInvalidation();
1681 diff.setNeedsPaintInvalidationObject(); 1681 diff.setNeedsPaintInvalidationObject();
1682 } 1682 }
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
3270 const blink::LayoutObject* root = object1; 3270 const blink::LayoutObject* root = object1;
3271 while (root->parent()) 3271 while (root->parent())
3272 root = root->parent(); 3272 root = root->parent();
3273 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3273 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3274 } else { 3274 } else {
3275 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3275 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3276 } 3276 }
3277 } 3277 }
3278 3278
3279 #endif 3279 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/FrameSetPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698