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

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

Issue 2051333005: Let FrameView track object paint invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TrackInvalidation
Patch Set: NeedsRebaseline Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2822 2822
2823 invalidatePaintRectangle(paintInvalidationRect); // We need to do a part ial paint invalidation of our content. 2823 invalidatePaintRectangle(paintInvalidationRect); // We need to do a part ial paint invalidation of our content.
2824 if (hasReflection()) 2824 if (hasReflection())
2825 invalidatePaintRectangle(reflectedRect(paintInvalidationRect)); 2825 invalidatePaintRectangle(reflectedRect(paintInvalidationRect));
2826 } 2826 }
2827 2827
2828 m_paintInvalidationLogicalTop = LayoutUnit(); 2828 m_paintInvalidationLogicalTop = LayoutUnit();
2829 m_paintInvalidationLogicalBottom = LayoutUnit(); 2829 m_paintInvalidationLogicalBottom = LayoutUnit();
2830 } 2830 }
2831 2831
2832 void LayoutBlockFlow::invalidateDisplayItemClients(const LayoutBoxModelObject& p aintInvalidationContainer, PaintInvalidationReason invalidationReason) const 2832 void LayoutBlockFlow::invalidateDisplayItemClients(PaintInvalidationReason inval idationReason) const
2833 { 2833 {
2834 LayoutBlock::invalidateDisplayItemClients(paintInvalidationContainer, invali dationReason); 2834 LayoutBlock::invalidateDisplayItemClients(invalidationReason);
2835 2835
2836 // If the block is a continuation or containing block of an inline continuat ion, invalidate the 2836 // If the block is a continuation or containing block of an inline continuat ion, invalidate the
2837 // start object of the continuations if it has focus ring because change of continuation may change 2837 // start object of the continuations if it has focus ring because change of continuation may change
2838 // the shape of the focus ring. 2838 // the shape of the focus ring.
2839 if (!isAnonymous()) 2839 if (!isAnonymous())
2840 return; 2840 return;
2841 2841
2842 LayoutObject* startOfContinuations = nullptr; 2842 LayoutObject* startOfContinuations = nullptr;
2843 if (LayoutInline* inlineElementContinuation = this->inlineElementContinuatio n()) { 2843 if (LayoutInline* inlineElementContinuation = this->inlineElementContinuatio n()) {
2844 // This block is an anonymous block continuation. 2844 // This block is an anonymous block continuation.
2845 startOfContinuations = inlineElementContinuation->node()->layoutObject() ; 2845 startOfContinuations = inlineElementContinuation->node()->layoutObject() ;
2846 } else if (LayoutObject* firstChild = this->firstChild()) { 2846 } else if (LayoutObject* firstChild = this->firstChild()) {
2847 // This block is the anonymous containing block of an inline element con tinuation. 2847 // This block is the anonymous containing block of an inline element con tinuation.
2848 if (firstChild->isElementContinuation()) 2848 if (firstChild->isElementContinuation())
2849 startOfContinuations = firstChild->node()->layoutObject(); 2849 startOfContinuations = firstChild->node()->layoutObject();
2850 } 2850 }
2851 if (startOfContinuations && startOfContinuations->styleRef().outlineStyleIsA uto()) 2851 if (startOfContinuations && startOfContinuations->styleRef().outlineStyleIsA uto())
2852 startOfContinuations->invalidateDisplayItemClient(*startOfContinuations) ; 2852 startOfContinuations->slowSetPaintingLayerNeedsRepaintAndInvalidateDispl ayItemClient(*startOfContinuations, invalidationReason);
2853 } 2853 }
2854 2854
2855 void LayoutBlockFlow::clearFloats(EClear clear) 2855 void LayoutBlockFlow::clearFloats(EClear clear)
2856 { 2856 {
2857 positionNewFloats(); 2857 positionNewFloats();
2858 // set y position 2858 // set y position
2859 LayoutUnit newY; 2859 LayoutUnit newY;
2860 switch (clear) { 2860 switch (clear) {
2861 case ClearLeft: 2861 case ClearLeft:
2862 newY = lowestFloatLogicalBottom(FloatingObject::FloatLeft); 2862 newY = lowestFloatLogicalBottom(FloatingObject::FloatLeft);
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
3829 if (!rect.isEmpty()) 3829 if (!rect.isEmpty())
3830 rects.append(rect); 3830 rects.append(rect);
3831 } 3831 }
3832 } 3832 }
3833 3833
3834 if (inlineElementContinuation) 3834 if (inlineElementContinuation)
3835 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in lineElementContinuation->containingBlock()->location() - location()), includeBlo ckOverflows); 3835 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in lineElementContinuation->containingBlock()->location() - location()), includeBlo ckOverflows);
3836 } 3836 }
3837 3837
3838 } // namespace blink 3838 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698