Reviewers: felix8a,
Description:
Fixes <https://code.google.com/p/google-caja/issues/detail?id=1824> and
some jQuery tests.
Please review this at https://codereview.appspot.com/11853043/
Affected files:
M src/com/google/caja/plugin/domado.js
M tests/com/google/caja/plugin/third-party-tests.json
Index: tests/com/google/caja/plugin/third-party-tests.json
===================================================================
--- tests/com/google/caja/plugin/third-party-tests.json (revision 5508)
+++ tests/com/google/caja/plugin/third-party-tests.json (working copy)
@@ -105,7 +105,7 @@
},
{
"guest": "manipulation",
- "expected-pass": { "firefox": 574, "chrome": 559 },
+ "expected-pass": { "firefox": 588, "chrome": 559 },
"comment": [
"Current modifications made to test suite:",
"Removed SES-incompatible Array.prototype modification; was
only",
@@ -149,7 +149,7 @@
},
{
"guest": "effects",
- "expected-pass": { "firefox": 552, "chrome": 551 },
+ "expected-pass": 552,
"comment": [
"Current failure categories:",
"fill-opacity SVG-only CSS property."
Index: src/com/google/caja/plugin/domado.js
===================================================================
--- src/com/google/caja/plugin/domado.js (revision 5508)
+++ src/com/google/caja/plugin/domado.js (working copy)
@@ -1863,18 +1863,25 @@
feralPseudoWindow.className = 'caja-vdoc-wrapper';
feralPseudoDocument.className = 'caja-vdoc-wrapper
caja-vdoc-inner ' +
'vdoc-container___ ' + idClass;
- // Visual isolation.
+ // Visual isolation and formatting. We use inline styles because
they
+ // cannot be overridden by any stylesheet.
// TODO(kpreid): Add explanation of how these style rules produce
the
// needed effects.
- makeDOMAccessible(outerIsolator.style);
- outerIsolator.style.display = 'block';
+ [outerIsolator, feralPseudoWindow, feralPseudoDocument].forEach(
+ function(el) {
+ makeDOMAccessible(el.style);
+ // Ensure block display and no additional borders/gaps.
+ el.style.display = 'block';
+ el.style.margin = '0';
+ el.style.border = 'none';
+ el.style.padding = '0';
+ });
+ // Establish a new coordinate system for absolutely-positioned
elements.
+ // TODO(kpreid): Explain why it is necessary to have two nested.
outerIsolator.style.position = 'relative';
+ feralPseudoWindow.style.position = 'relative';
+ // Clip content to bounds of container.
outerIsolator.style.overflow = 'hidden';
- outerIsolator.style.margin = '0';
- outerIsolator.style.padding = '0';
- makeDOMAccessible(feralPseudoWindow.style);
- feralPseudoWindow.style.display = 'block';
- feralPseudoWindow.style.position = 'relative';
// Final hookup; move existing children (like static HTML produced
by
// the cajoler) into the virtual document.
while (outerContainerNode.firstChild) {
--
---
You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.