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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2604073002: Apply offset from the correct graphics layer; simplify code for link highlights. (Closed)
Patch Set: Created 3 years, 11 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 if (m_rareData) 541 if (m_rareData)
542 m_rareData->enclosingPaginationLayer = nullptr; 542 m_rareData->enclosingPaginationLayer = nullptr;
543 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) 543 for (PaintLayer* child = firstChild(); child; child = child->nextSibling())
544 child->clearPaginationRecursive(); 544 child->clearPaginationRecursive();
545 } 545 }
546 546
547 void PaintLayer::mapPointInPaintInvalidationContainerToBacking( 547 void PaintLayer::mapPointInPaintInvalidationContainerToBacking(
548 const LayoutBoxModelObject& paintInvalidationContainer, 548 const LayoutBoxModelObject& paintInvalidationContainer,
549 FloatPoint& point) { 549 FloatPoint& point) {
550 PaintLayer* paintInvalidationLayer = paintInvalidationContainer.layer(); 550 PaintLayer* paintInvalidationLayer = paintInvalidationContainer.layer();
551 if (!paintInvalidationLayer->groupedMapping()) { 551 if (!paintInvalidationLayer->groupedMapping())
552 point.move(paintInvalidationLayer->compositedLayerMapping()
553 ->contentOffsetInCompositingLayer());
Xianzhu 2016/12/29 05:48:12 Was confused by this when working on VisualRectMap
Xianzhu 2016/12/29 06:33:00 I just paused CQ because of a question: Is there
chrishtr 2016/12/29 16:53:04 This one is not ok. Re-inserted this line. As you
554 return; 552 return;
555 }
556 553
557 LayoutBoxModelObject* transformedAncestor = 554 LayoutBoxModelObject* transformedAncestor =
558 paintInvalidationLayer->enclosingTransformedAncestor()->layoutObject(); 555 paintInvalidationLayer->enclosingTransformedAncestor()->layoutObject();
559 if (!transformedAncestor) 556 if (!transformedAncestor)
560 return; 557 return;
561 558
562 // |paintInvalidationContainer| may have a local 2D transform on it, so take 559 // |paintInvalidationContainer| may have a local 2D transform on it, so take
563 // that into account when mapping into the space of the transformed ancestor. 560 // that into account when mapping into the space of the transformed ancestor.
564 point = paintInvalidationContainer.localToAncestorPoint(point, 561 point = paintInvalidationContainer.localToAncestorPoint(point,
565 transformedAncestor); 562 transformedAncestor);
(...skipping 2682 matching lines...) Expand 10 before | Expand all | Expand 10 after
3248 } 3245 }
3249 3246
3250 void showLayerTree(const blink::LayoutObject* layoutObject) { 3247 void showLayerTree(const blink::LayoutObject* layoutObject) {
3251 if (!layoutObject) { 3248 if (!layoutObject) {
3252 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3249 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3253 return; 3250 return;
3254 } 3251 }
3255 showLayerTree(layoutObject->enclosingLayer()); 3252 showLayerTree(layoutObject->enclosingLayer());
3256 } 3253 }
3257 #endif 3254 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp ('k') | third_party/WebKit/Source/web/LinkHighlightImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698