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

Issue 2532843002: Postpone DOM mutation event in Range::extractContents() (Closed)

Created:
4 years ago by yosin_UTC9
Modified:
4 years ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Postpone DOM mutation event in Range::extractContents() This patch makes |Range::extractContents()| to postpone DOM mutation event dispatching just before returning value rather than updating C++ variables which holds |Node*| for every DOM mutation calls, e.g. Node::appendChild(), Node::removeChild(), etc., to avoid running JavaScript code during in |extractContents()| for simplicity. For executing script in |RangeTest|, this patch makes |RangeTest| class to derived from |EditingTestBase|. This patch removes "fast/dom/Range/range-created-in-mutation-event-crash.xhtml" since it causes script error by calling |Range#getBoundingClientRect()| with |null| value and coverage of this test is as same as newly added gTest. This patch is similar to http://crrev.com/199383004 which makes |Range::deleteContents()| to postpone DOM mutation event. BUG=642537 TEST=run_webkit_unittets --gtest_filter=extractContentsWithDOMMutationEvent Committed: https://crrev.com/e19337b440249f853e44e2df4912236e07b60803 Cr-Commit-Position: refs/heads/master@{#434848}

Patch Set 1 : 2016-11-28T16:37:50 #

Patch Set 2 : 2016-11-28T18:02:27 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -56 lines) Patch
D third_party/WebKit/LayoutTests/fast/dom/Range/range-created-in-mutation-event-crash.xhtml View 1 1 chunk +0 lines, -31 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/dom/Range/range-created-in-mutation-event-crash-expected.txt View 1 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Range.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/RangeTest.cpp View 3 chunks +29 lines, -20 lines 0 comments Download

Messages

Total messages: 24 (18 generated)
yosin_UTC9
PTAL
4 years ago (2016-11-29 01:10:26 UTC) #15
tkent
lgtm. CL description: > For executing script in |RangeText|, this patch makes |RangeTest| class to ...
4 years ago (2016-11-29 01:14:55 UTC) #16
yosin_UTC9
On 2016/11/29 at 01:14:55, tkent wrote: > lgtm. > > CL description: > > For ...
4 years ago (2016-11-29 02:05:02 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2532843002/20001
4 years ago (2016-11-29 02:05:56 UTC) #20
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-11-29 02:54:46 UTC) #22
commit-bot: I haz the power
4 years ago (2016-11-29 03:04:10 UTC) #24
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e19337b440249f853e44e2df4912236e07b60803
Cr-Commit-Position: refs/heads/master@{#434848}

Powered by Google App Engine
This is Rietveld 408576698