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

Unified Diff: Source/modules/accessibility/AXObject.h

Issue 1269263003: The start and end arguments should be unsigned long in setSelectionRange() function Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/modules/accessibility/AXLayoutObject.cpp ('k') | Source/web/WebAXObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXObject.h
diff --git a/Source/modules/accessibility/AXObject.h b/Source/modules/accessibility/AXObject.h
index 92f50f360b6eb676d5d14184d947e7e703ed6c8f..087ae3fdfe58aebede33fcd6c3d59f2093271677 100644
--- a/Source/modules/accessibility/AXObject.h
+++ b/Source/modules/accessibility/AXObject.h
@@ -414,30 +414,30 @@ public:
RefPtrWillBePersistent<AXObject> anchorObject;
// The number of characters and child objects in the anchor object
// before the range starts.
- int anchorOffset;
+ unsigned anchorOffset;
// The deepest descendant in which the range ends.
// (nullptr means the current object.)
RefPtrWillBePersistent<AXObject> focusObject;
// The number of characters and child objects in the focus object
// before the range ends.
- int focusOffset;
+ unsigned focusOffset;
AXRange()
: anchorObject(nullptr)
- , anchorOffset(-1)
+ , anchorOffset(UINT_MAX)
, focusObject(nullptr)
- , focusOffset(-1)
+ , focusOffset(UINT_MAX)
{ }
- AXRange(int startOffset, int endOffset)
+ AXRange(unsigned startOffset, unsigned endOffset)
: anchorObject(nullptr)
, anchorOffset(startOffset)
, focusObject(nullptr)
, focusOffset(endOffset)
{ }
- AXRange(PassRefPtrWillBeRawPtr<AXObject> anchorObject, int anchorOffset,
- PassRefPtrWillBeRawPtr<AXObject> focusObject, int focusOffset)
+ AXRange(PassRefPtrWillBeRawPtr<AXObject> anchorObject, unsigned anchorOffset,
+ PassRefPtrWillBeRawPtr<AXObject> focusObject, unsigned focusOffset)
: anchorObject(anchorObject)
, anchorOffset(anchorOffset)
, focusObject(focusObject)
@@ -447,8 +447,7 @@ public:
bool isValid() const
{
return ((anchorObject && focusObject)
- || (!anchorObject && !focusObject))
- && anchorOffset >= 0 && focusOffset >= 0;
+ || (!anchorObject && !focusObject));
}
// Determines if the range only refers to text offsets under the current object.
« no previous file with comments | « Source/modules/accessibility/AXLayoutObject.cpp ('k') | Source/web/WebAXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698