Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3194

css: rect() needs comma-separated value

XMLWordPrintable

    • Yes

      While browsers seem to be happy about the following css snippet:

      clip: rect(0 0 100px 0);
      

      .. the cssparser used by HtmlUnit isn't; it's following the spec a little closer, and enforce those values to be comma separated.
      This would be the correct syntax

      clip:rect(0, 0, 100px, 0);
      

      Attached is a patch that fixes the issue for magnolia-gui and m-m-admininterface. (hoping there are no other places where this property is set that weren't found with find . ! -path "/target/" ! -name ".java" ! -path "/.svn/*" -exec grep -H rect( {} \;)

      Additional patch updates the version of HtmlUnit used in integration tests to 2.7, enables css parsing, and consequently fixes the issues we've had with integration tests since MAGNOLIA-3180 (MAGNOLIA-3180 did not break anything per se, since the tests were not checking the rendered results; the real issue is that we were disabling css in those tests, thus preventing the tree javascript to do its job; now that HtmlUnit supports css @import, we were able to enable css parsing)

      http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Rect
      http://www.w3.org/TR/1998/REC-CSS2-19980512/visufx.html#value-def-shape

        Acceptance criteria

          1. clip-rect-comma.patch
            3 kB
            Magnolia International
          2. enablecss_in_tests.patch
            2 kB
            Magnolia International

              pbaerfuss Philipp Bärfuss
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: