Changeset 273219 in webkit
- Timestamp:
- Feb 21, 2021 9:20:47 AM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r273214 r273219 1 2021-02-21 Martin Robinson <mrobinson@igalia.com> 2 3 Small improvements to r273073 4 https://bugs.webkit.org/show_bug.cgi?id=222179 5 6 Reviewed by Darin Adler. 7 8 No new tests, because this should not change behavior. 9 10 * rendering/RenderObject.cpp: 11 (WebCore::RenderObject::enclosingScrollableContainerForSnapping const): Replace 12 a while loop with a for loop and prefer downcast<> to static_cast<>. 13 1 14 2021-02-20 Chris Fleizach <cfleizach@apple.com> 2 15 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r273073 r273219 460 460 // the containing block chain for positioned elements. This is important because 461 461 // scrollable overflow does not establish a new containing block for children. 462 auto* candidate = container(); 463 while (candidate) { 462 for (auto* candidate = container(); candidate; candidate = candidate->container()) { 464 463 // Currently the RenderView can look like it has scrollable overflow, but we never 465 464 // want to return this as our container. Instead we should use the root element. … … 467 466 break; 468 467 if (candidate->hasOverflowClip()) 469 return static_cast<RenderBox*>(candidate); 470 candidate = candidate->container(); 468 return downcast<RenderBox>(candidate); 471 469 } 472 470
Note: See TracChangeset
for help on using the changeset viewer.