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

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

Issue 2419663009: Convert a few more CFI blacklist entries into DISABLE_CFI_PERF attributes. (Closed)
Patch Set: Created 4 years, 2 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
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 4650 matching lines...) Expand 10 before | Expand all | Expand 10 after
4661 bool LayoutBox::shrinkToAvoidFloats() const { 4661 bool LayoutBox::shrinkToAvoidFloats() const {
4662 // Floating objects don't shrink. Objects that don't avoid floats don't 4662 // Floating objects don't shrink. Objects that don't avoid floats don't
4663 // shrink. 4663 // shrink.
4664 if (isInline() || !avoidsFloats() || isFloating()) 4664 if (isInline() || !avoidsFloats() || isFloating())
4665 return false; 4665 return false;
4666 4666
4667 // Only auto width objects can possibly shrink to avoid floats. 4667 // Only auto width objects can possibly shrink to avoid floats.
4668 return style()->width().isAuto(); 4668 return style()->width().isAuto();
4669 } 4669 }
4670 4670
4671 DISABLE_CFI_PERF
4671 static bool shouldBeConsideredAsReplaced(Node* node) { 4672 static bool shouldBeConsideredAsReplaced(Node* node) {
4672 // Checkboxes and radioboxes are not isAtomicInlineLevel() nor do they have 4673 // Checkboxes and radioboxes are not isAtomicInlineLevel() nor do they have
4673 // their own layoutObject in which to override avoidFloats(). 4674 // their own layoutObject in which to override avoidFloats().
4674 return node && node->isElementNode() && 4675 return node && node->isElementNode() &&
4675 (toElement(node)->isFormControlElement() || 4676 (toElement(node)->isFormControlElement() ||
4676 isHTMLImageElement(toElement(node))); 4677 isHTMLImageElement(toElement(node)));
4677 } 4678 }
4678 4679
4679 DISABLE_CFI_PERF 4680 DISABLE_CFI_PERF
4680 bool LayoutBox::avoidsFloats() const { 4681 bool LayoutBox::avoidsFloats() const {
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
5587 LayoutRect rect = frameRect(); 5588 LayoutRect rect = frameRect();
5588 5589
5589 LayoutBlock* block = containingBlock(); 5590 LayoutBlock* block = containingBlock();
5590 if (block) 5591 if (block)
5591 block->adjustChildDebugRect(rect); 5592 block->adjustChildDebugRect(rect);
5592 5593
5593 return rect; 5594 return rect;
5594 } 5595 }
5595 5596
5596 } // namespace blink 5597 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698