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

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, 8 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 while (object && !object->isBoxModelObject()) 181 while (object && !object->isBoxModelObject())
182 object = object->parent(); 182 object = object->parent();
183 if (!object) 183 if (!object)
184 return nullptr; 184 return nullptr;
185 return toLayoutBoxModelObject(object); 185 return toLayoutBoxModelObject(object);
186 } 186 }
187 187
188 int PrintContext::pageNumberForElement(Element* element, const FloatSize& pageSi zeInPixels) 188 int PrintContext::pageNumberForElement(Element* element, const FloatSize& pageSi zeInPixels)
189 { 189 {
190 // Make sure the element is not freed during the layout. 190 // Make sure the element is not freed during the layout.
191 RefPtrWillBeRawPtr<Element> protect(element); 191 RawPtr<Element> protect(element);
192 element->document().updateLayout(); 192 element->document().updateLayout();
193 193
194 LayoutBoxModelObject* box = enclosingBoxModelObject(element->layoutObject()) ; 194 LayoutBoxModelObject* box = enclosingBoxModelObject(element->layoutObject()) ;
195 if (!box) 195 if (!box)
196 return -1; 196 return -1;
197 197
198 LocalFrame* frame = element->document().frame(); 198 LocalFrame* frame = element->document().frame();
199 FloatRect pageRect(FloatPoint(0, 0), pageSizeInPixels); 199 FloatRect pageRect(FloatPoint(0, 0), pageSizeInPixels);
200 PrintContext printContext(frame); 200 PrintContext printContext(frame);
201 printContext.begin(pageRect.width(), pageRect.height()); 201 printContext.begin(pageRect.width(), pageRect.height());
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 DEFINE_TRACE(PrintContext) 318 DEFINE_TRACE(PrintContext)
319 { 319 {
320 #if ENABLE(OILPAN) 320 #if ENABLE(OILPAN)
321 visitor->trace(m_frame); 321 visitor->trace(m_frame);
322 visitor->trace(m_linkedDestinations); 322 visitor->trace(m_linkedDestinations);
323 #endif 323 #endif
324 } 324 }
325 325
326 } // namespace blink 326 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/PrintContext.h ('k') | third_party/WebKit/Source/core/page/PrintContextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698