Bug 842016 - Make pointer-events not affect whether SVG text renders. r=longsonr
authorCameron McCormack <cam@mcc.id.au>
Sun, 17 Feb 2013 19:28:29 +1100
changeset 122171 5e137a87e84f08a1143349300c8d0f999602af7a
parent 122170 6693706cbd4f99090f444aabdc12d788670b50a2
child 122172 db9ec9c7ce228c79c23a9a5e1bb42f6fd0fe5a4b
push id24320
push userryanvm@gmail.com
push dateSun, 17 Feb 2013 12:06:45 +0000
treeherdermozilla-central@5e137a87e84f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr
bugs842016
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 842016 - Make pointer-events not affect whether SVG text renders. r=longsonr
layout/reftests/svg/text/reftest.list
layout/reftests/svg/text/simple-pointer-events.svg
layout/svg/nsSVGTextFrame2.cpp
--- a/layout/reftests/svg/text/reftest.list
+++ b/layout/reftests/svg/text/reftest.list
@@ -24,16 +24,17 @@ default-preferences pref(svg.text.css-fr
 == simple-dx-bidi-2.svg simple-dx-bidi-2-ref.svg
 == simple-dx-rtl.svg simple-dx-rtl-ref.svg
 == simple-dx-rtl-2.svg simple-dx-rtl-2-ref.svg
 
 == simple-fill-color-dynamic.svg simple-fill-color-dynamic-ref.svg
 == simple-fill-color.svg simple-fill-color-ref.html
 HTTP(../..) == simple-fill-gradient.svg simple-fill-gradient-ref.svg
 == simple-fill-none.svg simple.svg
+== simple-pointer-events.svg simple.svg
 
 == simple-multiple-dx.svg simple-multiple-dx-ref.html
 == simple-multiple-dx-2.svg simple-multiple-dx.svg
 == simple-multiple-dx-anchor-end-bidi.svg simple-multiple-dx-anchor-end-bidi-ref.svg
 HTTP(../..) == simple-multiple-dx-anchor-middle-bidi.svg simple-multiple-dx-anchor-middle-bidi-ref.svg
 == simple-multiple-dx-anchor-end-rtl.svg simple-multiple-dx-anchor-end-rtl-ref.svg
 == simple-multiple-dx-anchor-end.svg simple-multiple-dx-anchor-end-ref.svg
 HTTP(../..) == simple-multiple-dx-anchor-middle-rtl.svg simple-multiple-dx-anchor-middle-rtl-ref.svg
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/text/simple-pointer-events.svg
@@ -0,0 +1,7 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+  <text x="100" y="100" style="font: 16px sans-serif; pointer-events: none">hello</text>
+</svg>
--- a/layout/svg/nsSVGTextFrame2.cpp
+++ b/layout/svg/nsSVGTextFrame2.cpp
@@ -3328,17 +3328,17 @@ nsSVGTextFrame2::ReflowSVG()
 
   gfxRect r;
   TextRenderedRunIterator it(this, TextRenderedRunIterator::eAllFrames);
   for (TextRenderedRun run = it.Current(); run.mFrame; run = it.Next()) {
     uint32_t runFlags = 0;
     uint16_t hitTestFlags = nsSVGUtils::GetGeometryHitTestFlags(run.mFrame);
 
     if ((hitTestFlags & SVG_HIT_TEST_FILL) ||
-        run.mFrame->StyleSVG()->mFill.mType == eStyleSVGPaintType_None) {
+        run.mFrame->StyleSVG()->mFill.mType != eStyleSVGPaintType_None) {
       runFlags |= TextRenderedRun::eIncludeFill;
     }
     if ((hitTestFlags & SVG_HIT_TEST_STROKE) ||
         nsSVGUtils::HasStroke(run.mFrame)) {
       runFlags |= TextRenderedRun::eIncludeStroke;
     }
 
     if (runFlags) {