Bug 338033 - No visible focus indicator on image map areas with black background r=roc
authorTakeshi Kurosawa <taken.spc@gmail.com>
Sat, 27 Apr 2013 17:54:36 +0900
changeset 141085 beb08ab90a3d6ae41cc35805facf2d70d955b541
parent 141084 84235d548347579b1f7bf092197dd9208fe56a2b
child 141086 6543154c748714800e0bd9e84cd8cf4a0de5e0dc
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs338033
milestone23.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 338033 - No visible focus indicator on image map areas with black background r=roc
layout/generic/nsImageFrame.cpp
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -1348,19 +1348,22 @@ nsImageFrame::PaintImage(nsRenderingCont
 
   nsLayoutUtils::DrawSingleImage(&aRenderingContext, aImage,
     nsLayoutUtils::GetGraphicsFilterForFrame(this), dest, aDirtyRect,
     nullptr, aFlags);
 
   nsImageMap* map = GetImageMap();
   if (nullptr != map) {
     aRenderingContext.PushState();
+    aRenderingContext.Translate(inner.TopLeft());
+    aRenderingContext.SetColor(NS_RGB(255, 255, 255));
+    aRenderingContext.SetLineStyle(nsLineStyle_kSolid);
+    map->Draw(this, aRenderingContext);
     aRenderingContext.SetColor(NS_RGB(0, 0, 0));
     aRenderingContext.SetLineStyle(nsLineStyle_kDotted);
-    aRenderingContext.Translate(inner.TopLeft());
     map->Draw(this, aRenderingContext);
     aRenderingContext.PopState();
   }
 }
 
 void
 nsImageFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                const nsRect&           aDirtyRect,