DescriptionThe opaque and foreign node restrictions as previously implemented are
completely broken, because they attempt to suppress ancestor methods
by overriding them, and the nodes are not even marked editable. To
achieve proper protection, all amplification-capable function objects
(that is, TameNode methods) must instead respect the intended policy.
To achieve this, several new flags are defined to capture the intended
behavior of opaque and foreign nodes. To maintain simplicity, all flags
(including the existing editability flags) are bundled into 'node
policy' objects, of which there are a small set.
Furthermore, the current taming membrane has as a premise that there is
only one tame object per feral object; but this is inconsistent with the
Domado design which determines editability flags according to the way
in which the node being tamed was reached. In order to avoid accidental
mutability of opaque nodes' children, the node policy of a node is now
almost always determined by the policy of its parent node -- with the
exceptions of opaque nodes and foreign nodes. Incidentally, an attempt
to tame a foreign node's descendant (which should never happen) is now
guaranteed to crash, as the foreign node policy refuses to specify a
child policy.
Foreign nodes' descendants are now hidden from NodeLists; this adds
the cost of scanning a prefix of the host NodeList to filter it, but the
results are cached as long as the guest does not modify the DOM.
Node editability and child-relationship editability checks have been
refactored to be implemented in one place each.
Also added a note about our slightly inaccurate implementation of
innerText.
@r5143
Patch Set 1 #Patch Set 2 : Replace Domado's editable flags with node policy objects determined by parents. #
Total comments: 11
Patch Set 3 : Replace Domado's editable flags with node policy objects determined by parents. #Patch Set 4 : Replace Domado's editable flags with node policy objects determined by parents. #Patch Set 5 : Replace Domado's editable flags with node policy objects determined by parents. #Patch Set 6 : Replace Domado's editable flags with node policy objects determined by parents. #Patch Set 7 : Replace Domado's editable flags with node policy objects determined by parents. #Patch Set 8 : Replace Domado's editable flags with node policy objects determined by parents. #Patch Set 9 : Replace Domado's editable flags with node policy objects determined by parents. #
Total comments: 6
Patch Set 10 : Replace Domado's editable flags with node policy objects determined by parents. #Patch Set 11 : Replace Domado's editable flags with node policy objects determined by parents. #MessagesTotal messages: 23
|