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

Side by Side Diff: Source/core/rendering/RenderBox.h

Issue 399173005: Incrementally invalidate boxes with borders if possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); 673 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild);
674 674
675 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur rentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& container Rect) const OVERRIDE; 675 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur rentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& container Rect) const OVERRIDE;
676 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const OVERRIDE; 676 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const OVERRIDE;
677 677
678 void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalH eight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight; } 678 void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalH eight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight; }
679 679
680 virtual InvalidationReason getPaintInvalidationReason(const RenderLayerModel Object& paintInvalidationContainer, 680 virtual InvalidationReason getPaintInvalidationReason(const RenderLayerModel Object& paintInvalidationContainer,
681 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer, 681 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer,
682 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva lidationContainer) OVERRIDE; 682 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva lidationContainer) OVERRIDE;
683 virtual void incrementallyInvalidatePaint(const RenderLayerModelObject& pain tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds , const LayoutPoint& positionFromPaintInvalidationContainer) OVERRIDE;
683 684
684 private: 685 private:
685 void updateShapeOutsideInfoAfterStyleChange(const RenderStyle&, const Render Style* oldStyle); 686 void updateShapeOutsideInfoAfterStyleChange(const RenderStyle&, const Render Style* oldStyle);
686 void updateGridPositionAfterStyleChange(const RenderStyle*); 687 void updateGridPositionAfterStyleChange(const RenderStyle*);
687 688
688 bool autoWidthShouldFitContent() const; 689 bool autoWidthShouldFitContent() const;
689 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&) const; 690 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&) const;
690 691
691 // Returns true if we did a full repaint 692 // Returns true if we did a full repaint
692 bool repaintLayerRectsForImage(WrappedImagePtr, const FillLayer&, bool drawi ngBackground); 693 bool repaintLayerRectsForImage(WrappedImagePtr, const FillLayer&, bool drawi ngBackground);
(...skipping 27 matching lines...) Expand all
720 virtual void computePreferredLogicalWidths() { clearPreferredLogicalWidthsDi rty(); } 721 virtual void computePreferredLogicalWidths() { clearPreferredLogicalWidthsDi rty(); }
721 722
722 RenderBoxRareData& ensureRareData() 723 RenderBoxRareData& ensureRareData()
723 { 724 {
724 if (!m_rareData) 725 if (!m_rareData)
725 m_rareData = adoptPtr(new RenderBoxRareData()); 726 m_rareData = adoptPtr(new RenderBoxRareData());
726 return *m_rareData.get(); 727 return *m_rareData.get();
727 } 728 }
728 729
729 void savePreviousBorderBoxSizeIfNeeded(); 730 void savePreviousBorderBoxSizeIfNeeded();
731 LayoutSize getPreviousBorderBoxSize(const LayoutSize& previousBoundsSize) co nst;
esprehn 2014/08/19 01:59:12 no get(), computePreviousBorderBoxSize(...) ?
Xianzhu 2014/08/19 16:06:20 Done.
732
730 bool logicalHeightComputesAsNone(SizeType) const; 733 bool logicalHeightComputesAsNone(SizeType) const;
731 734
732 void invalidatePaintIfNeeded(const PaintInvalidationState&, const RenderLaye rModelObject& newPaintInvalidationContainer); 735 void invalidatePaintIfNeeded(const PaintInvalidationState&, const RenderLaye rModelObject& newPaintInvalidationContainer);
733 736
734 bool isBox() const WTF_DELETED_FUNCTION; // This will catch anyone doing an unnecessary check. 737 bool isBox() const WTF_DELETED_FUNCTION; // This will catch anyone doing an unnecessary check.
735 738
736 // The width/height of the contents + borders + padding. The x/y location i s relative to our container (which is not always our parent). 739 // The width/height of the contents + borders + padding. The x/y location i s relative to our container (which is not always our parent).
737 LayoutRect m_frameRect; 740 LayoutRect m_frameRect;
738 741
739 // Our intrinsic height, used for min-height: min-content etc. Maintained by 742 // Our intrinsic height, used for min-height: min-content etc. Maintained by
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 if (UNLIKELY(inlineBoxWrapper() != 0)) 798 if (UNLIKELY(inlineBoxWrapper() != 0))
796 deleteLineBoxWrapper(); 799 deleteLineBoxWrapper();
797 } 800 }
798 801
799 ensureRareData().m_inlineBoxWrapper = boxWrapper; 802 ensureRareData().m_inlineBoxWrapper = boxWrapper;
800 } 803 }
801 804
802 } // namespace blink 805 } // namespace blink
803 806
804 #endif // RenderBox_h 807 #endif // RenderBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698