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

Side by Side Diff: third_party/WebKit/Source/core/page/PrintContext.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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) 2007 Alp Toker <alp@atoker.com> 2 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
3 * Copyright (C) 2007 Apple Inc. 3 * Copyright (C) 2007 Apple Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 while (object && !object->isBoxModelObject()) 178 while (object && !object->isBoxModelObject())
179 object = object->parent(); 179 object = object->parent();
180 if (!object) 180 if (!object)
181 return nullptr; 181 return nullptr;
182 return toLayoutBoxModelObject(object); 182 return toLayoutBoxModelObject(object);
183 } 183 }
184 184
185 int PrintContext::pageNumberForElement(Element* element, const FloatSize& pageSi zeInPixels) 185 int PrintContext::pageNumberForElement(Element* element, const FloatSize& pageSi zeInPixels)
186 { 186 {
187 // Make sure the element is not freed during the layout. 187 // Make sure the element is not freed during the layout.
188 RefPtrWillBeRawPtr<Element> protect(element); 188 RawPtr<Element> protect(element);
189 element->document().updateLayout(); 189 element->document().updateLayout();
190 190
191 LayoutBoxModelObject* box = enclosingBoxModelObject(element->layoutObject()) ; 191 LayoutBoxModelObject* box = enclosingBoxModelObject(element->layoutObject()) ;
192 if (!box) 192 if (!box)
193 return -1; 193 return -1;
194 194
195 LocalFrame* frame = element->document().frame(); 195 LocalFrame* frame = element->document().frame();
196 FloatRect pageRect(FloatPoint(0, 0), pageSizeInPixels); 196 FloatRect pageRect(FloatPoint(0, 0), pageSizeInPixels);
197 PrintContext printContext(frame); 197 PrintContext printContext(frame);
198 printContext.begin(pageRect.width(), pageRect.height()); 198 printContext.begin(pageRect.width(), pageRect.height());
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 DEFINE_TRACE(PrintContext) 315 DEFINE_TRACE(PrintContext)
316 { 316 {
317 #if ENABLE(OILPAN) 317 #if ENABLE(OILPAN)
318 visitor->trace(m_frame); 318 visitor->trace(m_frame);
319 visitor->trace(m_linkedDestinations); 319 visitor->trace(m_linkedDestinations);
320 #endif 320 #endif
321 } 321 }
322 322
323 } // namespace blink 323 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698