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

Side by Side Diff: Source/modules/accessibility/AXObject.cpp

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Build fix Created 5 years, 6 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, 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 1080
1081 return IntPoint(area->maximumScrollPosition().x(), area->maximumScrollPositi on().y()); 1081 return IntPoint(area->maximumScrollPosition().x(), area->maximumScrollPositi on().y());
1082 } 1082 }
1083 1083
1084 void AXObject::setScrollOffset(const IntPoint& offset) const 1084 void AXObject::setScrollOffset(const IntPoint& offset) const
1085 { 1085 {
1086 ScrollableArea* area = getScrollableAreaIfScrollable(); 1086 ScrollableArea* area = getScrollableAreaIfScrollable();
1087 if (!area) 1087 if (!area)
1088 return; 1088 return;
1089 1089
1090 area->setScrollPosition(DoublePoint(offset.x(), offset.y())); 1090 // TODO(bokan): This should potentially be a UserScroll.
1091 area->setScrollPosition(DoublePoint(offset.x(), offset.y()), ProgrammaticScr oll);
1091 } 1092 }
1092 1093
1093 // 1094 //
1094 // Modify or take an action on an object. 1095 // Modify or take an action on an object.
1095 // 1096 //
1096 1097
1097 bool AXObject::press() const 1098 bool AXObject::press() const
1098 { 1099 {
1099 Element* actionElem = actionElement(); 1100 Element* actionElem = actionElement();
1100 if (!actionElem) 1101 if (!actionElem)
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 } 1473 }
1473 1474
1474 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) 1475 const AtomicString& AXObject::internalRoleName(AccessibilityRole role)
1475 { 1476 {
1476 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo leNameVector(); 1477 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo leNameVector();
1477 1478
1478 return internalRoleNameVector->at(role); 1479 return internalRoleNameVector->at(role);
1479 } 1480 }
1480 1481
1481 } // namespace blink 1482 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp ('k') | Source/modules/accessibility/AXScrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698