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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 18 matching lines...) Expand all
29 #include "core/layout/api/LineLayoutRubyBase.h" 29 #include "core/layout/api/LineLayoutRubyBase.h"
30 #include "core/layout/api/LineLayoutRubyRun.h" 30 #include "core/layout/api/LineLayoutRubyRun.h"
31 #include "core/layout/api/LineLayoutRubyText.h" 31 #include "core/layout/api/LineLayoutRubyText.h"
32 #include "core/layout/line/GlyphOverflow.h" 32 #include "core/layout/line/GlyphOverflow.h"
33 #include "core/layout/line/InlineTextBox.h" 33 #include "core/layout/line/InlineTextBox.h"
34 #include "core/layout/line/RootInlineBox.h" 34 #include "core/layout/line/RootInlineBox.h"
35 #include "core/paint/BoxPainter.h" 35 #include "core/paint/BoxPainter.h"
36 #include "core/paint/InlineFlowBoxPainter.h" 36 #include "core/paint/InlineFlowBoxPainter.h"
37 #include "core/style/ShadowList.h" 37 #include "core/style/ShadowList.h"
38 #include "platform/fonts/Font.h" 38 #include "platform/fonts/Font.h"
39 #include "wtf/PtrUtil.h"
39 #include <algorithm> 40 #include <algorithm>
40 #include <math.h> 41 #include <math.h>
41 42
42 namespace blink { 43 namespace blink {
43 44
44 struct SameSizeAsInlineFlowBox : public InlineBox { 45 struct SameSizeAsInlineFlowBox : public InlineBox {
45 void* pointers[5]; 46 void* pointers[5];
46 uint32_t bitfields : 23; 47 uint32_t bitfields : 23;
47 }; 48 };
48 49
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 setOverflowFromLogicalRects(logicalLayoutOverflow, logicalVisualOverflow, li neTop, lineBottom); 945 setOverflowFromLogicalRects(logicalLayoutOverflow, logicalVisualOverflow, li neTop, lineBottom);
945 } 946 }
946 947
947 void InlineFlowBox::setLayoutOverflow(const LayoutRect& rect, const LayoutRect& frameBox) 948 void InlineFlowBox::setLayoutOverflow(const LayoutRect& rect, const LayoutRect& frameBox)
948 { 949 {
949 ASSERT(!knownToHaveNoOverflow()); 950 ASSERT(!knownToHaveNoOverflow());
950 if (frameBox.contains(rect) || rect.isEmpty()) 951 if (frameBox.contains(rect) || rect.isEmpty())
951 return; 952 return;
952 953
953 if (!m_overflow) 954 if (!m_overflow)
954 m_overflow = adoptPtr(new SimpleOverflowModel(frameBox, frameBox)); 955 m_overflow = wrapUnique(new SimpleOverflowModel(frameBox, frameBox));
955 956
956 m_overflow->setLayoutOverflow(rect); 957 m_overflow->setLayoutOverflow(rect);
957 } 958 }
958 959
959 void InlineFlowBox::setVisualOverflow(const LayoutRect& rect, const LayoutRect& frameBox) 960 void InlineFlowBox::setVisualOverflow(const LayoutRect& rect, const LayoutRect& frameBox)
960 { 961 {
961 ASSERT(!knownToHaveNoOverflow()); 962 ASSERT(!knownToHaveNoOverflow());
962 if (frameBox.contains(rect) || rect.isEmpty()) 963 if (frameBox.contains(rect) || rect.isEmpty())
963 return; 964 return;
964 965
965 if (!m_overflow) 966 if (!m_overflow)
966 m_overflow = adoptPtr(new SimpleOverflowModel(frameBox, frameBox)); 967 m_overflow = wrapUnique(new SimpleOverflowModel(frameBox, frameBox));
967 968
968 m_overflow->setVisualOverflow(rect); 969 m_overflow->setVisualOverflow(rect);
969 } 970 }
970 971
971 void InlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalLayoutO verflow, const LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom) 972 void InlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalLayoutO verflow, const LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom)
972 { 973 {
973 ASSERT(!knownToHaveNoOverflow()); 974 ASSERT(!knownToHaveNoOverflow());
974 LayoutRect frameBox = frameRectIncludingLineHeight(lineTop, lineBottom); 975 LayoutRect frameBox = frameRectIncludingLineHeight(lineTop, lineBottom);
975 976
976 LayoutRect layoutOverflow(isHorizontal() ? logicalLayoutOverflow : logicalLa youtOverflow.transposedRect()); 977 LayoutRect layoutOverflow(isHorizontal() ? logicalLayoutOverflow : logicalLa youtOverflow.transposedRect());
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 ASSERT(child->prevOnLine() == prev); 1315 ASSERT(child->prevOnLine() == prev);
1315 prev = child; 1316 prev = child;
1316 } 1317 }
1317 ASSERT(prev == m_lastChild); 1318 ASSERT(prev == m_lastChild);
1318 #endif 1319 #endif
1319 } 1320 }
1320 1321
1321 #endif 1322 #endif
1322 1323
1323 } // namespace blink 1324 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698