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

Issue 115693010: Fix Range.createContextualFragment for non-Element contexts. (Closed)

Created:
7 years ago by pwnall-personal
Modified:
6 years, 6 months ago
Reviewers:
pdr., yosin_UTC9, adamk, eseidel
CC:
blink-reviews, dglazkov+blink, sof, eae+blinkwatch, adamk+blink_chromium.org, pdr., yosin_UTC9
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Fix Range.createContextualFragment for non-HTMLElement contexts. This implements the algorithm below for HTML, XHTML and SVG documents. http://domparsing.spec.whatwg.org/#extensions-to-the-range-interface BUG=311289, 107982 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176569

Patch Set 1 #

Patch Set 2 : Handle XHTML documents. #

Patch Set 3 : Handle SVG elements. #

Patch Set 4 : Handle SVG documents. #

Patch Set 5 : Minor cleanup, more testing. #

Total comments: 4

Patch Set 6 : Better rebasing. #

Patch Set 7 : LayoutTest for a case mentioned in review. #

Patch Set 8 : Addressed feedback. #

Total comments: 8

Patch Set 9 : Addressed 2nd round of feedback. #

Total comments: 12

Patch Set 10 : Rebased. #

Patch Set 11 : Addressed 3rd round of feedback. #

Total comments: 2

Patch Set 12 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+392 lines, -9 lines) Patch
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-attached-text-node-range.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-attached-text-node-range-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-bodyless-document-range.html View 1 2 3 4 5 6 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-bodyless-document-range-expected.txt View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-bodyless-xml-document-range.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-bodyless-xml-document-range-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-detached-text-node-range.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-detached-text-node-range-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-document-fragment-range.html View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-document-fragment-range-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-document-range.html View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-document-range-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-html-element-range.html View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-html-element-range-expected.txt View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-svg-element-range.html View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-svg-element-range-expected.txt View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-xhtml-document-range.xhtml View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-xhtml-document-range-expected.txt View 1 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-xhtml-html-element-range.xhtml View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-xhtml-html-element-range-expected.txt View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-xml-element-range.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Range/create-contextual-fragment-from-xml-element-range-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/dom/create-contextual-fragment-from-bodyless-svg-document-range.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +32 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/dom/create-contextual-fragment-from-bodyless-svg-document-range-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/dom/create-contextual-fragment-from-svg-document-range.html View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/dom/create-contextual-fragment-from-svg-document-range-expected.txt View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/dom/resources/empty-svg-file.svg View 1 2 3 4 5 6 7 8 9 10 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/http/tests/dom/resources/svg-document.svg View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/dom/Range.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +35 lines, -6 lines 0 comments Download
M Source/core/editing/markup.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -2 lines 0 comments Download
M Source/core/editing/markup.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +14 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
pwnall-personal
Can you please take a look? I saw a GoodFirstBug related to a bug a ...
7 years ago (2013-12-22 20:25:05 UTC) #1
mtomasz
On 2013/12/22 20:25:05, pwnall wrote: > Can you please take a look? > > I ...
6 years, 8 months ago (2014-04-08 04:13:29 UTC) #2
mtomasz
On 2014/04/08 04:13:29, mtomasz wrote: > On 2013/12/22 20:25:05, pwnall wrote: > > Can you ...
6 years, 8 months ago (2014-04-08 04:13:50 UTC) #3
eseidel
https://codereview.chromium.org/115693010/diff/180001/Source/core/editing/markup.h File Source/core/editing/markup.h (right): https://codereview.chromium.org/115693010/diff/180001/Source/core/editing/markup.h#newcode58 Source/core/editing/markup.h:58: PassRefPtr<DocumentFragment> createContextualFragment(const String&, SVGElement*, ParserContentPolicy, ExceptionState&); Why is SVG ...
6 years, 8 months ago (2014-04-10 04:28:50 UTC) #4
eseidel
This is a good review for either yosin or pdr.
6 years, 6 months ago (2014-05-28 22:29:33 UTC) #5
pwnall-personal
On 2014/05/28 22:29:33, eseidel wrote: > This is a good review for either yosin or ...
6 years, 6 months ago (2014-05-28 22:35:48 UTC) #6
yosin_UTC9
https://codereview.chromium.org/115693010/diff/180001/Source/core/dom/Range.cpp File Source/core/dom/Range.cpp (right): https://codereview.chromium.org/115693010/diff/180001/Source/core/dom/Range.cpp#newcode1156 Source/core/dom/Range.cpp:1156: ASSERT(element && (element->isHTMLElement() || element->isSVGElement())); Is this ASSERT always ...
6 years, 6 months ago (2014-05-29 03:53:06 UTC) #7
pwnall-personal
I rebased the patch and cleaned it up a bit. Can you please take another ...
6 years, 6 months ago (2014-06-02 06:57:57 UTC) #8
eseidel
https://codereview.chromium.org/115693010/diff/580041/Source/core/dom/Range.cpp File Source/core/dom/Range.cpp (right): https://codereview.chromium.org/115693010/diff/580041/Source/core/dom/Range.cpp#newcode1010 Source/core/dom/Range.cpp:1010: if (document.isSVGDocument()) { I would have just written this ...
6 years, 6 months ago (2014-06-02 16:51:27 UTC) #9
pwnall-personal
Thank you very much for the feedback! Can you please take another look? https://codereview.chromium.org/115693010/diff/580041/Source/core/dom/Range.cpp File ...
6 years, 6 months ago (2014-06-03 00:09:00 UTC) #10
eseidel
The if cascade still feels a little tortured, but the idea of this CL is ...
6 years, 6 months ago (2014-06-03 00:27:01 UTC) #11
eseidel
We're worrying about very small details here. As long as the big-picture is OK (that ...
6 years, 6 months ago (2014-06-03 00:32:45 UTC) #12
pwnall-personal
On 2014/06/03 00:32:45, eseidel wrote: > We're worrying about very small details here. As long ...
6 years, 6 months ago (2014-06-04 06:52:46 UTC) #13
pwnall-personal
I read up and cleaned up the code a bit more. I also added a ...
6 years, 6 months ago (2014-06-04 06:54:38 UTC) #14
eseidel
I'm about to get on a plane, but I'm happy to look more later. https://codereview.chromium.org/115693010/diff/640001/Source/core/dom/Range.cpp ...
6 years, 6 months ago (2014-06-04 15:00:22 UTC) #15
pwnall-personal
https://codereview.chromium.org/115693010/diff/640001/Source/core/dom/Range.cpp File Source/core/dom/Range.cpp (right): https://codereview.chromium.org/115693010/diff/640001/Source/core/dom/Range.cpp#newcode1006 Source/core/dom/Range.cpp:1006: element = HTMLBodyElement::create(document); On 2014/06/04 15:00:22, eseidel wrote: > ...
6 years, 6 months ago (2014-06-05 22:59:50 UTC) #16
pwnall-personal
On 2014/06/04 15:00:22, eseidel wrote: > I'm about to get on a plane, but I'm ...
6 years, 6 months ago (2014-06-19 19:55:20 UTC) #17
eseidel
lgtm
6 years, 6 months ago (2014-06-19 21:33:08 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/costan@gmail.com/115693010/640001
6 years, 6 months ago (2014-06-19 21:34:15 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-19 21:34:58 UTC) #20
commit-bot: I haz the power
Failed to apply patch for Source/core/dom/Range.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 6 months ago (2014-06-19 21:34:58 UTC) #21
pwnall-personal
The CQ bit was checked by costan@gmail.com
6 years, 6 months ago (2014-06-20 00:19:36 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/costan@gmail.com/115693010/660001
6 years, 6 months ago (2014-06-20 00:19:59 UTC) #23
pwnall-personal
On 2014/06/19 21:33:08, eseidel wrote: > lgtm Thank you for the quick feedback! I know ...
6 years, 6 months ago (2014-06-20 00:20:27 UTC) #24
commit-bot: I haz the power
6 years, 6 months ago (2014-06-20 01:40:51 UTC) #25
Message was sent while issue was closed.
Change committed as 176569

Powered by Google App Engine
This is Rietveld 408576698