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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 334373002: Clear absolute clip rects when transform changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/compositing/overflow/transform-should-update-absolute-clip-rects-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 bool hadTransform = m_transform; 498 bool hadTransform = m_transform;
499 if (hasTransform != hadTransform) { 499 if (hasTransform != hadTransform) {
500 if (hasTransform) 500 if (hasTransform)
501 m_transform = adoptPtr(new TransformationMatrix); 501 m_transform = adoptPtr(new TransformationMatrix);
502 else 502 else
503 m_transform.clear(); 503 m_transform.clear();
504 504
505 // Layers with transforms act as clip rects roots, so clear the cached c lip rects here. 505 // Layers with transforms act as clip rects roots, so clear the cached c lip rects here.
506 m_clipper.clearClipRectsIncludingDescendants(); 506 m_clipper.clearClipRectsIncludingDescendants();
507 } else if (hasTransform) {
508 m_clipper.clearClipRectsIncludingDescendants(AbsoluteClipRects);
Ian Vollick 2014/06/17 15:57:28 Doesn't this mean that even if we call updateTrans
ajuma 2014/06/17 16:01:50 The caller of updateTransform (RenderLayer::styleC
Ian Vollick 2014/06/17 16:07:25 Ah, thanks. In that case, maybe we could add an AS
ajuma 2014/06/17 17:10:40 Adding an ASSERT is a good idea, but we don't have
507 } 509 }
508 510
509 if (hasTransform) { 511 if (hasTransform) {
510 RenderBox* box = renderBox(); 512 RenderBox* box = renderBox();
511 ASSERT(box); 513 ASSERT(box);
512 m_transform->makeIdentity(); 514 m_transform->makeIdentity();
513 box->style()->applyTransform(*m_transform, box->pixelSnappedBorderBoxRec t().size(), RenderStyle::IncludeTransformOrigin); 515 box->style()->applyTransform(*m_transform, box->pixelSnappedBorderBoxRec t().size(), RenderStyle::IncludeTransformOrigin);
514 makeMatrixRenderable(*m_transform, compositor()->hasAcceleratedCompositi ng()); 516 makeMatrixRenderable(*m_transform, compositor()->hasAcceleratedCompositi ng());
515 } 517 }
516 518
(...skipping 3347 matching lines...) Expand 10 before | Expand all | Expand 10 after
3864 } 3866 }
3865 } 3867 }
3866 3868
3867 void showLayerTree(const WebCore::RenderObject* renderer) 3869 void showLayerTree(const WebCore::RenderObject* renderer)
3868 { 3870 {
3869 if (!renderer) 3871 if (!renderer)
3870 return; 3872 return;
3871 showLayerTree(renderer->enclosingLayer()); 3873 showLayerTree(renderer->enclosingLayer());
3872 } 3874 }
3873 #endif 3875 #endif
OLDNEW
« no previous file with comments | « LayoutTests/compositing/overflow/transform-should-update-absolute-clip-rects-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698