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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1490063002: Implement Paint Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge 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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 updatePaintingPhases(); 561 updatePaintingPhases();
562 562
563 updateElementIdAndCompositorMutableProperties(); 563 updateElementIdAndCompositorMutableProperties();
564 564
565 return layerConfigChanged; 565 return layerConfigChanged;
566 } 566 }
567 567
568 static IntRect clipBox(LayoutBox* layoutObject) 568 static IntRect clipBox(LayoutBox* layoutObject)
569 { 569 {
570 LayoutRect result = LayoutRect(LayoutRect::infiniteIntRect()); 570 LayoutRect result = LayoutRect(LayoutRect::infiniteIntRect());
571 if (layoutObject->hasOverflowClip()) 571 if (layoutObject->hasOverflowClip() || layoutObject->style()->containsPaint( ))
572 result = layoutObject->overflowClipRect(LayoutPoint()); 572 result = layoutObject->overflowClipRect(LayoutPoint());
573 573
574 if (layoutObject->hasClip()) 574 if (layoutObject->hasClip())
575 result.intersect(layoutObject->clipRect(LayoutPoint())); 575 result.intersect(layoutObject->clipRect(LayoutPoint()));
576 576
577 return pixelSnappedIntRect(result); 577 return pixelSnappedIntRect(result);
578 } 578 }
579 579
580 static LayoutPoint computeOffsetFromCompositedAncestor(const PaintLayer* layer, const PaintLayer* compositedAncestor) 580 static LayoutPoint computeOffsetFromCompositedAncestor(const PaintLayer* layer, const PaintLayer* compositedAncestor)
581 { 581 {
(...skipping 2020 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2602 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2603 name = "Scrolling Block Selection Layer"; 2603 name = "Scrolling Block Selection Layer";
2604 } else { 2604 } else {
2605 ASSERT_NOT_REACHED(); 2605 ASSERT_NOT_REACHED();
2606 } 2606 }
2607 2607
2608 return name; 2608 return name;
2609 } 2609 }
2610 2610
2611 } // namespace blink 2611 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698