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

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

Issue 2649523002: Replace ENABLE(ASSERT) leftovers with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | 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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 static_assert(sizeof(FloatingObject) == sizeof(SameSizeAsFloatingObject), 48 static_assert(sizeof(FloatingObject) == sizeof(SameSizeAsFloatingObject),
49 "FloatingObject should stay small"); 49 "FloatingObject should stay small");
50 50
51 FloatingObject::FloatingObject(LayoutBox* layoutObject) 51 FloatingObject::FloatingObject(LayoutBox* layoutObject)
52 : m_layoutObject(layoutObject), 52 : m_layoutObject(layoutObject),
53 m_originatingLine(nullptr), 53 m_originatingLine(nullptr),
54 m_shouldPaint(true), 54 m_shouldPaint(true),
55 m_isDescendant(false), 55 m_isDescendant(false),
56 m_isPlaced(false), 56 m_isPlaced(false),
57 m_isLowestNonOverhangingFloatInChild(false) 57 m_isLowestNonOverhangingFloatInChild(false)
58 #if ENABLE(ASSERT) 58 #if DCHECK_IS_ON()
59 , 59 ,
60 m_isInPlacedTree(false) 60 m_isInPlacedTree(false)
61 #endif 61 #endif
62 { 62 {
63 EFloat type = layoutObject->style()->floating(); 63 EFloat type = layoutObject->style()->floating();
64 DCHECK_NE(type, EFloat::kNone); 64 DCHECK_NE(type, EFloat::kNone);
65 if (type == EFloat::kLeft) 65 if (type == EFloat::kLeft)
66 m_type = FloatLeft; 66 m_type = FloatLeft;
67 else if (type == EFloat::kRight) 67 else if (type == EFloat::kRight)
68 m_type = FloatRight; 68 m_type = FloatRight;
69 } 69 }
70 70
71 FloatingObject::FloatingObject(LayoutBox* layoutObject, 71 FloatingObject::FloatingObject(LayoutBox* layoutObject,
72 Type type, 72 Type type,
73 const LayoutRect& frameRect, 73 const LayoutRect& frameRect,
74 bool shouldPaint, 74 bool shouldPaint,
75 bool isDescendant, 75 bool isDescendant,
76 bool isLowestNonOverhangingFloatInChild) 76 bool isLowestNonOverhangingFloatInChild)
77 : m_layoutObject(layoutObject), 77 : m_layoutObject(layoutObject),
78 m_originatingLine(nullptr), 78 m_originatingLine(nullptr),
79 m_frameRect(frameRect), 79 m_frameRect(frameRect),
80 m_type(type), 80 m_type(type),
81 m_isDescendant(isDescendant), 81 m_isDescendant(isDescendant),
82 m_isPlaced(true), 82 m_isPlaced(true),
83 m_isLowestNonOverhangingFloatInChild(isLowestNonOverhangingFloatInChild) 83 m_isLowestNonOverhangingFloatInChild(isLowestNonOverhangingFloatInChild)
84 #if ENABLE(ASSERT) 84 #if DCHECK_IS_ON()
85 , 85 ,
86 m_isInPlacedTree(false) 86 m_isInPlacedTree(false)
87 #endif 87 #endif
88 { 88 {
89 m_shouldPaint = shouldPaint || shouldPaintForCompositedLayoutPart(); 89 m_shouldPaint = shouldPaint || shouldPaintForCompositedLayoutPart();
90 } 90 }
91 91
92 bool FloatingObject::shouldPaintForCompositedLayoutPart() { 92 bool FloatingObject::shouldPaintForCompositedLayoutPart() {
93 // HACK: only non-self-painting floats should paint. However, due to the 93 // HACK: only non-self-painting floats should paint. However, due to the
94 // fundamental compositing bug, some LayoutPart objects may become 94 // fundamental compositing bug, some LayoutPart objects may become
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 const FloatingObject* floatingObject) { 748 const FloatingObject* floatingObject) {
749 return String::format("%p (%gx%g %gx%g)", floatingObject, 749 return String::format("%p (%gx%g %gx%g)", floatingObject,
750 floatingObject->frameRect().x().toFloat(), 750 floatingObject->frameRect().x().toFloat(),
751 floatingObject->frameRect().y().toFloat(), 751 floatingObject->frameRect().y().toFloat(),
752 floatingObject->frameRect().maxX().toFloat(), 752 floatingObject->frameRect().maxX().toFloat(),
753 floatingObject->frameRect().maxY().toFloat()); 753 floatingObject->frameRect().maxY().toFloat());
754 } 754 }
755 #endif 755 #endif
756 756
757 } // namespace blink 757 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698