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

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

Issue 1486743002: Clean up some remaining obsolete coordinate-space naming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Mac compile Created 5 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
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // supports only one namespace for the anchors. 237 // supports only one namespace for the anchors.
238 collectLinkedDestinations(frame()->document()); 238 collectLinkedDestinations(frame()->document());
239 m_linkedDestinationsValid = true; 239 m_linkedDestinationsValid = true;
240 } 240 }
241 241
242 for (const auto& entry : m_linkedDestinations) { 242 for (const auto& entry : m_linkedDestinations) {
243 LayoutObject* layoutObject = entry.value->layoutObject(); 243 LayoutObject* layoutObject = entry.value->layoutObject();
244 if (!layoutObject || !layoutObject->frameView()) 244 if (!layoutObject || !layoutObject->frameView())
245 continue; 245 continue;
246 IntRect boundingBox = layoutObject->absoluteBoundingBoxRect(); 246 IntRect boundingBox = layoutObject->absoluteBoundingBoxRect();
247 boundingBox = layoutObject->frameView()->convertToContainingWindow(bound ingBox); 247 // TODO(bokan): boundingBox looks to be in content coordinates but
248 // convertToRootFrame doesn't apply scroll offsets when converting up to
249 // the root frame.
250 boundingBox = layoutObject->frameView()->convertToRootFrame(boundingBox) ;
248 if (!pageRect.intersects(boundingBox)) 251 if (!pageRect.intersects(boundingBox))
249 continue; 252 continue;
250 IntPoint point = boundingBox.minXMinYCorner(); 253 IntPoint point = boundingBox.minXMinYCorner();
251 point.clampNegativeToZero(); 254 point.clampNegativeToZero();
252 SkAutoDataUnref nameData(SkData::NewWithCString(entry.key.utf8().data()) ); 255 SkAutoDataUnref nameData(SkData::NewWithCString(entry.key.utf8().data()) );
253 SkAnnotateNamedDestination(canvas, SkPoint::Make(point.x(), point.y()), nameData); 256 SkAnnotateNamedDestination(canvas, SkPoint::Make(point.x(), point.y()), nameData);
254 } 257 }
255 } 258 }
256 259
257 String PrintContext::pageProperty(LocalFrame* frame, const char* propertyName, i nt pageNumber) 260 String PrintContext::pageProperty(LocalFrame* frame, const char* propertyName, i nt pageNumber)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 313
311 DEFINE_TRACE(PrintContext) 314 DEFINE_TRACE(PrintContext)
312 { 315 {
313 #if ENABLE(OILPAN) 316 #if ENABLE(OILPAN)
314 visitor->trace(m_frame); 317 visitor->trace(m_frame);
315 visitor->trace(m_linkedDestinations); 318 visitor->trace(m_linkedDestinations);
316 #endif 319 #endif
317 } 320 }
318 321
319 } 322 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698