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

Side by Side Diff: Source/core/rendering/InlineTextBox.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 | « Source/core/rendering/InlineFlowBox.cpp ('k') | Source/core/rendering/PaintPhase.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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 29 matching lines...) Expand all
40 #include <algorithm> 40 #include <algorithm>
41 41
42 namespace blink { 42 namespace blink {
43 43
44 struct SameSizeAsInlineTextBox : public InlineBox { 44 struct SameSizeAsInlineTextBox : public InlineBox {
45 unsigned variables[1]; 45 unsigned variables[1];
46 unsigned short variables2[2]; 46 unsigned short variables2[2];
47 void* pointers[2]; 47 void* pointers[2];
48 }; 48 };
49 49
50 COMPILE_ASSERT(sizeof(InlineTextBox) == sizeof(SameSizeAsInlineTextBox), InlineT extBox_should_stay_small); 50 static_assert(sizeof(InlineTextBox) == sizeof(SameSizeAsInlineTextBox), "InlineT extBox should stay small");
51 51
52 typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap; 52 typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap;
53 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow; 53 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow;
54 54
55 void InlineTextBox::destroy() 55 void InlineTextBox::destroy()
56 { 56 {
57 AbstractInlineTextBox::willDestroy(this); 57 AbstractInlineTextBox::willDestroy(this);
58 58
59 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow) 59 if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow)
60 gTextBoxesWithOverflow->remove(this); 60 gTextBoxesWithOverflow->remove(this);
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 541 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
542 const int rendererCharacterOffset = 75; 542 const int rendererCharacterOffset = 75;
543 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 543 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
544 fputc(' ', stderr); 544 fputc(' ', stderr);
545 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 545 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
546 } 546 }
547 547
548 #endif 548 #endif
549 549
550 } // namespace blink 550 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/InlineFlowBox.cpp ('k') | Source/core/rendering/PaintPhase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698