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

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: First attempt to land. 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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 setOverflowFromLogicalRects(logicalLayoutOverflow, logicalVisualOverflow, li neTop, lineBottom); 946 setOverflowFromLogicalRects(logicalLayoutOverflow, logicalVisualOverflow, li neTop, lineBottom);
946 } 947 }
947 948
948 void InlineFlowBox::setLayoutOverflow(const LayoutRect& rect, const LayoutRect& frameBox) 949 void InlineFlowBox::setLayoutOverflow(const LayoutRect& rect, const LayoutRect& frameBox)
949 { 950 {
950 ASSERT(!knownToHaveNoOverflow()); 951 ASSERT(!knownToHaveNoOverflow());
951 if (frameBox.contains(rect) || rect.isEmpty()) 952 if (frameBox.contains(rect) || rect.isEmpty())
952 return; 953 return;
953 954
954 if (!m_overflow) 955 if (!m_overflow)
955 m_overflow = adoptPtr(new SimpleOverflowModel(frameBox, frameBox)); 956 m_overflow = wrapUnique(new SimpleOverflowModel(frameBox, frameBox));
956 957
957 m_overflow->setLayoutOverflow(rect); 958 m_overflow->setLayoutOverflow(rect);
958 } 959 }
959 960
960 void InlineFlowBox::setVisualOverflow(const LayoutRect& rect, const LayoutRect& frameBox) 961 void InlineFlowBox::setVisualOverflow(const LayoutRect& rect, const LayoutRect& frameBox)
961 { 962 {
962 ASSERT(!knownToHaveNoOverflow()); 963 ASSERT(!knownToHaveNoOverflow());
963 if (frameBox.contains(rect) || rect.isEmpty()) 964 if (frameBox.contains(rect) || rect.isEmpty())
964 return; 965 return;
965 966
966 if (!m_overflow) 967 if (!m_overflow)
967 m_overflow = adoptPtr(new SimpleOverflowModel(frameBox, frameBox)); 968 m_overflow = wrapUnique(new SimpleOverflowModel(frameBox, frameBox));
968 969
969 m_overflow->setVisualOverflow(rect); 970 m_overflow->setVisualOverflow(rect);
970 } 971 }
971 972
972 void InlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalLayoutO verflow, const LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom) 973 void InlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalLayoutO verflow, const LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom)
973 { 974 {
974 ASSERT(!knownToHaveNoOverflow()); 975 ASSERT(!knownToHaveNoOverflow());
975 LayoutRect frameBox = frameRectIncludingLineHeight(lineTop, lineBottom); 976 LayoutRect frameBox = frameRectIncludingLineHeight(lineTop, lineBottom);
976 977
977 LayoutRect layoutOverflow(isHorizontal() ? logicalLayoutOverflow : logicalLa youtOverflow.transposedRect()); 978 LayoutRect layoutOverflow(isHorizontal() ? logicalLayoutOverflow : logicalLa youtOverflow.transposedRect());
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 ASSERT(child->prevOnLine() == prev); 1316 ASSERT(child->prevOnLine() == prev);
1316 prev = child; 1317 prev = child;
1317 } 1318 }
1318 ASSERT(prev == m_lastChild); 1319 ASSERT(prev == m_lastChild);
1319 #endif 1320 #endif
1320 } 1321 }
1321 1322
1322 #endif 1323 #endif
1323 1324
1324 } // namespace blink 1325 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineFlowBox.h ('k') | third_party/WebKit/Source/core/layout/line/RootInlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698