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

Side by Side Diff: Source/core/rendering/FloatingObjects.cpp

Issue 811843003: replace COMPILE_ASSERT with static_assert in core/rendering/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 | Source/core/rendering/InlineBox.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) 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. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 21 matching lines...) Expand all
32 32
33 namespace blink { 33 namespace blink {
34 34
35 struct SameSizeAsFloatingObject { 35 struct SameSizeAsFloatingObject {
36 void* pointers[2]; 36 void* pointers[2];
37 LayoutRect rect; 37 LayoutRect rect;
38 int paginationStrut; 38 int paginationStrut;
39 uint32_t bitfields : 8; 39 uint32_t bitfields : 8;
40 }; 40 };
41 41
42 COMPILE_ASSERT(sizeof(FloatingObject) == sizeof(SameSizeAsFloatingObject), Float ingObject_should_stay_small); 42 static_assert(sizeof(FloatingObject) == sizeof(SameSizeAsFloatingObject), "Float ingObject should stay small");
43 43
44 FloatingObject::FloatingObject(RenderBox* renderer) 44 FloatingObject::FloatingObject(RenderBox* renderer)
45 : m_renderer(renderer) 45 : m_renderer(renderer)
46 , m_originatingLine(0) 46 , m_originatingLine(0)
47 , m_paginationStrut(0) 47 , m_paginationStrut(0)
48 , m_shouldPaint(true) 48 , m_shouldPaint(true)
49 , m_isDescendant(false) 49 , m_isDescendant(false)
50 , m_isPlaced(false) 50 , m_isPlaced(false)
51 #if ENABLE(ASSERT) 51 #if ENABLE(ASSERT)
52 , m_isInPlacedTree(false) 52 , m_isInPlacedTree(false)
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 } 526 }
527 527
528 String ValueToString<FloatingObject*>::string(const FloatingObject* floatingObje ct) 528 String ValueToString<FloatingObject*>::string(const FloatingObject* floatingObje ct)
529 { 529 {
530 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped MaxY()); 530 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped MaxY());
531 } 531 }
532 #endif 532 #endif
533 533
534 534
535 } // namespace blink 535 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/InlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698