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

Issue 2673303002: All offset in dom/Range.idl should be unsigned long (Closed)

Created:
3 years, 10 months ago by Sunny
Modified:
3 years, 10 months ago
Reviewers:
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, kinuko+watch, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

All offset in dom/Range.idl should be unsigned long https://dom.spec.whatwg.org/#interface-range According to DOM standard, all offsets (including attributes and arguments) in `dom/Range.idl` should be `unsigned long`. For `m_offsetInContainer` in `RangeBoundaryPoint`, it can't be negative value to indicate invalid offset since signedness changes to unsigned, so the new bool value `m_isValidOffset` is introduced. And RangeBoundaryPoint::invalidateOffset() has been removed since it's not used in codebase. Tests were changed accordingly BUG=658716

Patch Set 1 #

Patch Set 2 : Remove unnecessary static_cast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -163 lines) Patch
M third_party/WebKit/Source/core/dom/Range.h View 6 chunks +13 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Range.cpp View 1 13 chunks +23 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Range.idl View 2 chunks +6 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h View 9 chunks +31 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/dom/RangeTest.cpp View 5 chunks +26 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StaticRangeTest.cpp View 2 chunks +20 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp View 8 chunks +16 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/editing/iterators/CharacterIteratorTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/TextFinderTest.cpp View 14 chunks +32 lines, -32 lines 0 comments Download

Messages

Total messages: 1 (1 generated)
Sunny
3 years, 10 months ago (2017-02-07 02:43:43 UTC) #1
Description was changed from

==========
All offset in dom/Range.idl should be unsigned long

https://dom.spec.whatwg.org/#interface-range

According to DOM standard, all offsets (including attributes
and arguments) in `dom/Range.idl` should be `unsigned long`.

For `m_offsetInContainer` in `RangeBoundaryPoint`, it can't be
negative value to indicate invalid offset since signedness changes
to signed, so the new bool value `m_isValidOffset` is introduced.

And RangeBoundaryPoint::invalidateOffset() has been removed since
it's not used in codebase.

Tests were changed accordingly

BUG=658716
==========

to

==========
All offset in dom/Range.idl should be unsigned long

https://dom.spec.whatwg.org/#interface-range

According to DOM standard, all offsets (including attributes
and arguments) in `dom/Range.idl` should be `unsigned long`.

For `m_offsetInContainer` in `RangeBoundaryPoint`, it can't be
negative value to indicate invalid offset since signedness changes
to unsigned, so the new bool value `m_isValidOffset` is introduced.

And RangeBoundaryPoint::invalidateOffset() has been removed since
it's not used in codebase.

Tests were changed accordingly

BUG=658716
==========

Powered by Google App Engine
This is Rietveld 408576698