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

Unified Diff: Source/core/accessibility/AXObject.cpp

Issue 383153007: Fixes for re-enabling more MSVC level 4 warnings: Source/core/ edition (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Delete temp file Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/accessibility/AXObject.cpp
diff --git a/Source/core/accessibility/AXObject.cpp b/Source/core/accessibility/AXObject.cpp
index 08d9104b40042ab122302c3b75aed9ddd58578fb..a9dc525bf16b31d9375be7e19fa83a8ab8782d0d 100644
--- a/Source/core/accessibility/AXObject.cpp
+++ b/Source/core/accessibility/AXObject.cpp
@@ -720,10 +720,9 @@ void AXObject::scrollToMakeVisibleWithSubFocus(const IntRect& subfocus) const
{
// Search up the parent chain until we find the first one that's scrollable.
AXObject* scrollParent = parentObject();
- ScrollableArea* scrollableArea;
- for (scrollableArea = 0;
- scrollParent && !(scrollableArea = scrollParent->getScrollableAreaIfScrollable());
- scrollParent = scrollParent->parentObject()) { }
+ ScrollableArea* scrollableArea = scrollParent ? scrollParent->getScrollableAreaIfScrollable() : 0;
+ for (; scrollParent && !scrollableArea; scrollableArea = scrollParent ? scrollParent->getScrollableAreaIfScrollable() : 0)
dmazzoni 2014/07/16 21:21:16 I find this change a little harder to read. How ab
Peter Kasting 2014/07/16 23:06:58 Your first form won't work, but the second will.
+ scrollParent = scrollParent->parentObject();
if (!scrollableArea)
return;

Powered by Google App Engine
This is Rietveld 408576698