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

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

Issue 1728313003: Split ImageResourceClient into ResourceClient and ImageResourceObserver [2/2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and reflect comment Created 4 years, 9 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 LayoutBlock::styleDidChange(diff, oldStyle); 177 LayoutBlock::styleDidChange(diff, oldStyle);
178 // See adjustStyleBeforeSet() above. 178 // See adjustStyleBeforeSet() above.
179 ASSERT(!isOrthogonalWritingModeRoot()); 179 ASSERT(!isOrthogonalWritingModeRoot());
180 setInline(false); 180 setInline(false);
181 clearPositionedState(); 181 clearPositionedState();
182 setFloating(false); 182 setFloating(false);
183 if (oldStyle && (diff.needsPaintInvalidation() || diff.needsLayout())) 183 if (oldStyle && (diff.needsPaintInvalidation() || diff.needsLayout()))
184 setNeedsPaintInvalidation(); 184 setNeedsPaintInvalidation();
185 } 185 }
186 186
187 void LayoutScrollbarPart::imageChanged(WrappedImagePtr image, const IntRect* rec t) 187 void LayoutScrollbarPart::imageChanged(bool isNotifyingFinish, WrappedImagePtr i mage, const IntRect* rect)
188 { 188 {
189 setNeedsPaintInvalidation(); 189 setNeedsPaintInvalidation();
190 LayoutBlock::imageChanged(image, rect); 190 LayoutBlock::imageChanged(isNotifyingFinish, image, rect);
191 } 191 }
192 192
193 LayoutObject* LayoutScrollbarPart::layoutObjectOwningScrollbar() const 193 LayoutObject* LayoutScrollbarPart::layoutObjectOwningScrollbar() const
194 { 194 {
195 return (!m_scrollbar) ? nullptr : m_scrollbar->owningLayoutObject(); 195 return (!m_scrollbar) ? nullptr : m_scrollbar->owningLayoutObject();
196 } 196 }
197 197
198 void LayoutScrollbarPart::setNeedsPaintInvalidation() 198 void LayoutScrollbarPart::setNeedsPaintInvalidation()
199 { 199 {
200 if (m_scrollbar) { 200 if (m_scrollbar) {
201 m_scrollbar->setNeedsPaintInvalidation(AllParts); 201 m_scrollbar->setNeedsPaintInvalidation(AllParts);
202 return; 202 return;
203 } 203 }
204 204
205 // This LayoutScrollbarPart is a scroll corner or a resizer. 205 // This LayoutScrollbarPart is a scroll corner or a resizer.
206 ASSERT(m_part == NoPart); 206 ASSERT(m_part == NoPart);
207 if (FrameView* frameView = view()->frameView()) { 207 if (FrameView* frameView = view()->frameView()) {
208 if (frameView->isFrameViewScrollCorner(this)) { 208 if (frameView->isFrameViewScrollCorner(this)) {
209 frameView->setScrollCornerNeedsPaintInvalidation(); 209 frameView->setScrollCornerNeedsPaintInvalidation();
210 return; 210 return;
211 } 211 }
212 } 212 }
213 213
214 // This LayoutScrollbarPart belongs to a PaintLayerScrollableArea. 214 // This LayoutScrollbarPart belongs to a PaintLayerScrollableArea.
215 toLayoutBox(parent())->getScrollableArea()->setScrollCornerNeedsPaintInvalid ation(); 215 toLayoutBox(parent())->getScrollableArea()->setScrollCornerNeedsPaintInvalid ation();
216 } 216 }
217 217
218 } // namespace blink 218 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698