Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(201)

Issue 98088: Fix ancestry for unattached nodes (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 10 months ago by metaweta
Modified:
16 years, 10 months ago
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fixes issue 1092. Unattached nodes have no className, so their className never matched idClass, which made domita think that the parent belonged to some other gadget. I added a check to return null if we hit document.body (i.e. it really does belong to another gadget) and added code to return the parnet node if it exits the loop (i.e. it's unattached).

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix ancestry for unattached nodes #

Total comments: 1

Patch Set 3 : Fix ancestry for unattached nodes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M src/com/google/caja/plugin/domita.js View 1 2 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 8
metaweta
16 years, 10 months ago (2009-08-01 00:53:01 UTC) #1
ihab.awad
LGTM
16 years, 10 months ago (2009-08-01 00:55:34 UTC) #2
MikeSamuel
http://codereview.appspot.com/98088/diff/1/2 File src/com/google/caja/plugin/domita.js (right): http://codereview.appspot.com/98088/diff/1/2#newcode1056 Line 1056: } else if (ancestor === document.body) { Instead ...
16 years, 10 months ago (2009-08-01 01:02:48 UTC) #3
metaweta
On 2009/08/01 01:02:48, MikeSamuel wrote: > http://codereview.appspot.com/98088/diff/1/2 > File src/com/google/caja/plugin/domita.js (right): > > http://codereview.appspot.com/98088/diff/1/2#newcode1056 > ...
16 years, 10 months ago (2009-08-01 01:10:25 UTC) #4
felix8a
http://codereview.appspot.com/98088/diff/1002/7 File src/com/google/caja/plugin/domita.js (right): http://codereview.appspot.com/98088/diff/1002/7#newcode1056 Line 1056: } else if (ancestor === node.ownerDocument.documentElement) { could ...
16 years, 10 months ago (2009-08-01 01:16:25 UTC) #5
metaweta
On 2009/08/01 01:02:48, MikeSamuel wrote: > Maybe use contains/compareDocumentPosition to check whether the node is ...
16 years, 10 months ago (2009-08-01 01:32:45 UTC) #6
metaweta
On 2009/08/01 01:16:25, felix8a wrote: > http://codereview.appspot.com/98088/diff/1002/7 > File src/com/google/caja/plugin/domita.js (right): > > http://codereview.appspot.com/98088/diff/1002/7#newcode1056 > ...
16 years, 10 months ago (2009-08-01 01:33:55 UTC) #7
metaweta
16 years, 10 months ago (2009-08-03 18:50:32 UTC) #8
@3628
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b