/[blink]
Chromium logo

Revision 171165


Jump to revision: Previous Next
Author: sigbjornf@opera.com
Date: Wed Apr 9 19:00:32 2014 UTC (9 years, 1 month ago)
Changed paths: 4
Log Message:
Add CharacterData.deleteData()/replaceData() overflow handling.

If the offset and count exceed the underlying length, the spec tells us

  http://dom.spec.whatwg.org/#concept-cd-replace (step 3)

to use a count that is equal to length minus the offset. Perform that
check in an overflow-sensitive manner.

(Change based on https://codereview.chromium.org/188693007/ )

R=
BUG=349898

Review URL: https://codereview.chromium.org/229793004

Changed paths

Path Details
Directorytrunk/LayoutTests/fast/dom/Range/deleteData-replaceData-count-overflow-expected.txt added
Directorytrunk/LayoutTests/fast/dom/Range/deleteData-replaceData-count-overflow.html added
Directorytrunk/Source/core/dom/CharacterData.cpp modified , text changed
Directorytrunk/Source/core/editing/FrameSelection.cpp modified , text changed

Properties

Name Value
commit-bot commit-bot@chromium.org

Powered by ViewVC 1.1.26 ViewVC Help