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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 ASSERT_NOT_REACHED(); 713 ASSERT_NOT_REACHED();
714 714
715 // This shouldn't happen. 715 // This shouldn't happen.
716 return currentScrollOffset; 716 return currentScrollOffset;
717 } 717 }
718 718
719 void AXObject::scrollToMakeVisibleWithSubFocus(const IntRect& subfocus) const 719 void AXObject::scrollToMakeVisibleWithSubFocus(const IntRect& subfocus) const
720 { 720 {
721 // Search up the parent chain until we find the first one that's scrollable. 721 // Search up the parent chain until we find the first one that's scrollable.
722 AXObject* scrollParent = parentObject(); 722 AXObject* scrollParent = parentObject();
723 ScrollableArea* scrollableArea; 723 ScrollableArea* scrollableArea = scrollParent ? scrollParent->getScrollableA reaIfScrollable() : 0;
724 for (scrollableArea = 0; 724 for (; scrollParent && !scrollableArea; scrollableArea = scrollParent ? scro llParent->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.
725 scrollParent && !(scrollableArea = scrollParent->getScrollableAreaIfScro llable()); 725 scrollParent = scrollParent->parentObject();
726 scrollParent = scrollParent->parentObject()) { }
727 if (!scrollableArea) 726 if (!scrollableArea)
728 return; 727 return;
729 728
730 IntRect objectRect = pixelSnappedIntRect(elementRect()); 729 IntRect objectRect = pixelSnappedIntRect(elementRect());
731 IntPoint scrollPosition = scrollableArea->scrollPosition(); 730 IntPoint scrollPosition = scrollableArea->scrollPosition();
732 IntRect scrollVisibleRect = scrollableArea->visibleContentRect(); 731 IntRect scrollVisibleRect = scrollableArea->visibleContentRect();
733 732
734 int desiredX = computeBestScrollOffset( 733 int desiredX = computeBestScrollOffset(
735 scrollPosition.x(), 734 scrollPosition.x(),
736 objectRect.x() + subfocus.x(), objectRect.x() + subfocus.maxX(), 735 objectRect.x() + subfocus.x(), objectRect.x() + subfocus.maxX(),
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 return ToggleButtonRole; 889 return ToggleButtonRole;
891 if (ariaHasPopup()) 890 if (ariaHasPopup())
892 return PopUpButtonRole; 891 return PopUpButtonRole;
893 // We don't contemplate RadioButtonRole, as it depends on the input 892 // We don't contemplate RadioButtonRole, as it depends on the input
894 // type. 893 // type.
895 894
896 return ButtonRole; 895 return ButtonRole;
897 } 896 }
898 897
899 } // namespace WebCore 898 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698