Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake Document store Ranges, and update ranges in Node subclasses #6817
Conversation
|
Review status: 0 of 10 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. components/script/dom/range.rs, line 861 [r1] (raw file): Comments from the review on Reviewable.io |
48a75fe
to
ba99c97
|
|
|
r? @nox |
|
I'm doing this differently already, with weak references and a vector per Node. Which way should we go? |
|
This is what we talked about before, right? It's still not clear to me what we gain by storing ranged on a per-node basis. For the Range updating steps in this PR, we need to be able to look up Ranges that start or end with a given node, as well as Ranges whose start or end node's descendant is a given node. This seems pretty complex to implement when Ranges are stored on various nodes. But if you have ideas for how to do this, let me know! If we can't figure this out, we should do weak refs and vector per Document, so we can actually follow the spec and do the right thing |
|
@dzbarsky I introduce an unbinding context which contains the necessary information about the inclusive ancestor that was removed (its index, more or less). Still, I'm going to read through the code in this PR. |
Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
|
@dzbarsky Did you have the time to look at my other branch? Which way do you think we should go? |
|
@nox yeah I looked briefly, let's do it your way. It ended up being nicer than I expected. Not sure if I'll have time to review it in detail in the near future though. |
Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
dzbarsky commentedJul 29, 2015