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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

Issue 2229643002: Don't invalidate paint on background image change if it's obscured (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@BackgroundObscured
Patch Set: Rebase Created 4 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
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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 1028
1029 void updateShapeOutsideInfoAfterStyleChange(const ComputedStyle&, const Comp utedStyle* oldStyle); 1029 void updateShapeOutsideInfoAfterStyleChange(const ComputedStyle&, const Comp utedStyle* oldStyle);
1030 void updateGridPositionAfterStyleChange(const ComputedStyle*); 1030 void updateGridPositionAfterStyleChange(const ComputedStyle*);
1031 void updateScrollSnapMappingAfterStyleChange(const ComputedStyle*, const Com putedStyle* oldStyle); 1031 void updateScrollSnapMappingAfterStyleChange(const ComputedStyle*, const Com putedStyle* oldStyle);
1032 void clearScrollSnapMapping(); 1032 void clearScrollSnapMapping();
1033 void addScrollSnapMapping(); 1033 void addScrollSnapMapping();
1034 1034
1035 bool autoWidthShouldFitContent() const; 1035 bool autoWidthShouldFitContent() const;
1036 LayoutUnit shrinkToFitLogicalWidth(LayoutUnit availableLogicalWidth, LayoutU nit bordersPlusPadding) const; 1036 LayoutUnit shrinkToFitLogicalWidth(LayoutUnit availableLogicalWidth, LayoutU nit bordersPlusPadding) const;
1037 1037
1038 // Returns true if we queued up a paint invalidation.
1039 bool invalidatePaintOfLayerRectsForImage(WrappedImagePtr, const FillLayer&, bool drawingBackground);
1040
1041 bool stretchesToViewportInQuirksMode() const; 1038 bool stretchesToViewportInQuirksMode() const;
1042 bool skipContainingBlockForPercentHeightCalculation(const LayoutBox* contain ingBlock) const; 1039 bool skipContainingBlockForPercentHeightCalculation(const LayoutBox* contain ingBlock) const;
1043 1040
1044 virtual void computePositionedLogicalHeight(LogicalExtentComputedValues&) co nst; 1041 virtual void computePositionedLogicalHeight(LogicalExtentComputedValues&) co nst;
1045 void computePositionedLogicalWidthUsing(SizeType, Length logicalWidth, const LayoutBoxModelObject* containerBlock, TextDirection containerDirection, 1042 void computePositionedLogicalWidthUsing(SizeType, Length logicalWidth, const LayoutBoxModelObject* containerBlock, TextDirection containerDirection,
1046 LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding, 1043 LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding,
1047 const Length& logicalLeft, const Length& logicalRight, const Length& mar ginLogicalLeft, 1044 const Length& logicalLeft, const Length& logicalRight, const Length& mar ginLogicalLeft,
1048 const Length& marginLogicalRight, LogicalExtentComputedValues&) const; 1045 const Length& marginLogicalRight, LogicalExtentComputedValues&) const;
1049 void computePositionedLogicalHeightUsing(SizeType, Length logicalHeightLengt h, const LayoutBoxModelObject* containerBlock, 1046 void computePositionedLogicalHeightUsing(SizeType, Length logicalHeightLengt h, const LayoutBoxModelObject* containerBlock,
1050 LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, Layout Unit logicalHeight, 1047 LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, Layout Unit logicalHeight,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 1088
1092 void frameRectChanged() 1089 void frameRectChanged()
1093 { 1090 {
1094 // The frame rect may change because of layout of other objects. 1091 // The frame rect may change because of layout of other objects.
1095 // Should check this object for paint invalidation. 1092 // Should check this object for paint invalidation.
1096 if (!needsLayout()) 1093 if (!needsLayout())
1097 setMayNeedPaintInvalidation(); 1094 setMayNeedPaintInvalidation();
1098 } 1095 }
1099 1096
1100 // Returns true if the box intersects the viewport visible to the user. 1097 // Returns true if the box intersects the viewport visible to the user.
1101 bool intersectsVisibleViewport(); 1098 bool intersectsVisibleViewport() const;
1102 1099
1103 virtual bool isInSelfHitTestingPhase(HitTestAction hitTestAction) const { re turn hitTestAction == HitTestForeground; } 1100 virtual bool isInSelfHitTestingPhase(HitTestAction hitTestAction) const { re turn hitTestAction == HitTestForeground; }
1104 1101
1105 void updateBackgroundAttachmentFixedStatusAfterStyleChange(); 1102 void updateBackgroundAttachmentFixedStatusAfterStyleChange();
1106 1103
1107 // The CSS border box rect for this box. 1104 // The CSS border box rect for this box.
1108 // 1105 //
1109 // The rectangle is in this box's physical coordinates but with a 1106 // The rectangle is in this box's physical coordinates but with a
1110 // flipped block-flow direction (see the COORDINATE SYSTEMS section 1107 // flipped block-flow direction (see the COORDINATE SYSTEMS section
1111 // in LayoutBoxModelObject). The location is the distance from this 1108 // in LayoutBoxModelObject). The location is the distance from this
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 || breakValue == BreakLeft 1233 || breakValue == BreakLeft
1237 || breakValue == BreakPage 1234 || breakValue == BreakPage
1238 || breakValue == BreakRecto 1235 || breakValue == BreakRecto
1239 || breakValue == BreakRight 1236 || breakValue == BreakRight
1240 || breakValue == BreakVerso; 1237 || breakValue == BreakVerso;
1241 } 1238 }
1242 1239
1243 } // namespace blink 1240 } // namespace blink
1244 1241
1245 #endif // LayoutBox_h 1242 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698