Bug 778654 - Display tabIndex outline; r?heycam
MozReview-Commit-ID: GRZzECINScl
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -3254,16 +3254,17 @@ SVGTextFrame::BuildDisplayList(nsDisplay
// have updated mPositions, etc. In this case, we just avoid
// painting.
return;
}
if (!IsVisibleForPainting(aBuilder) &&
aBuilder->IsForPainting()) {
return;
}
+ DisplayOutline(aBuilder, aLists);
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplaySVGText(aBuilder, this));
}
nsresult
SVGTextFrame::AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType)
--- a/layout/svg/nsSVGContainerFrame.cpp
+++ b/layout/svg/nsSVGContainerFrame.cpp
@@ -143,16 +143,17 @@ nsSVGDisplayContainerFrame::BuildDisplay
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// mContent could be a XUL element so check for an SVG element before casting
if (mContent->IsSVGElement() &&
!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
return;
}
+ DisplayOutline(aBuilder, aLists);
return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
}
void
nsSVGDisplayContainerFrame::InsertFrames(ChildListID aListID,
nsIFrame* aPrevFrame,
nsFrameList& aFrameList)
{
--- a/layout/svg/nsSVGForeignObjectFrame.cpp
+++ b/layout/svg/nsSVGForeignObjectFrame.cpp
@@ -161,16 +161,17 @@ nsSVGForeignObjectFrame::Reflow(nsPresCo
void
nsSVGForeignObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
return;
}
+ DisplayOutline(aBuilder, aLists);
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
}
bool
nsSVGForeignObjectFrame::IsSVGTransformed(Matrix *aOwnTransform,
Matrix *aFromParentTransform) const
{
bool foundTransform = false;
--- a/layout/svg/nsSVGPathGeometryFrame.cpp
+++ b/layout/svg/nsSVGPathGeometryFrame.cpp
@@ -261,16 +261,17 @@ void
nsSVGPathGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions() ||
(!IsVisibleForPainting(aBuilder) && aBuilder->IsForPainting())) {
return;
}
+ DisplayOutline(aBuilder, aLists);
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplaySVGPathGeometry(aBuilder, this));
}
//----------------------------------------------------------------------
// nsISVGChildFrame methods
DrawResult
--- a/layout/svg/svg.css
+++ b/layout/svg/svg.css
@@ -71,16 +71,21 @@ foreignObject {
*|*::-moz-svg-marker-anon-child {
clip-path: inherit;
filter: inherit;
mask: inherit;
opacity: inherit;
}
+*:-moz-focusring {
+ /* Don't specify the outline-color, we should always use initial value. */
+ outline: 1px dotted;
+}
+
/* nsDocumentViewer::CreateStyleSet doesn't load ua.css.
* A few styles are common to html and SVG though
* so we copy the rules below from that file.
*/
/* Links */
*|*:any-link {