Change the way we determine the style context parent frame to skip css anonboxes unless we're determining the style context parent for something that isitself a css anon box (and is not a non-element frame). Fixes bug 323656(which is where the patch is), bug 85872, bug 280610. As far as I can tell,also fixes bug 317876, bug 372376, bug 374297. r+sr=dbaron

This commit is contained in:
bzbarsky@mit.edu 2007-04-15 16:14:26 -07:00
Родитель ba44c08179
Коммит b82e527dc9
18 изменённых файлов: 587 добавлений и 53 удалений

Просмотреть файл

@ -6654,17 +6654,12 @@ already_AddRefed<nsStyleContext>
nsCSSFrameConstructor::ResolveStyleContext(nsIFrame* aParentFrame,
nsIContent* aContent)
{
aParentFrame = nsFrame::CorrectStyleParentFrame(aParentFrame, nsnull);
// Resolve the style context based on the content object and the parent
// style context
nsStyleContext* parentStyleContext = aParentFrame->GetStyleContext();
// skip past any parents that are scrolled-content. We want to inherit directly
// from the outer scroll frame.
while (parentStyleContext && parentStyleContext->GetPseudoType() ==
nsCSSAnonBoxes::scrolledContent) {
parentStyleContext = parentStyleContext->GetParent();
}
nsStyleSet *styleSet = mPresShell->StyleSet();
if (aContent->IsNodeOfType(nsINode::eELEMENT)) {
@ -11216,7 +11211,10 @@ nsCSSFrameConstructor::ProcessChildren(nsFrameConstructorState& aState,
// XXXbz ideally, this would do all the pushing of various
// containing blocks as needed, so callers don't have to do it...
nsresult rv = NS_OK;
nsStyleContext* styleContext = aFrame->GetStyleContext();
// :before/:after content should have the same style context parent
// as normal kids.
nsStyleContext* styleContext =
nsFrame::CorrectStyleParentFrame(aFrame, nsnull)->GetStyleContext();
if (aCanHaveGeneratedContent) {
// Probe for generated content before

Просмотреть файл

@ -41,6 +41,10 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_MOCHITEST
DIRS += test
endif
MODULE = layout
LIBRARY_NAME = gkgeneric_s
LIBXUL_LIBRARY = 1

Просмотреть файл

@ -118,6 +118,7 @@
#include "nsWidgetsCID.h" // for NS_LOOKANDFEEL_CID
#include "nsUnicharUtils.h"
#include "nsLayoutErrors.h"
#include "nsContentErrors.h"
#include "nsHTMLContainerFrame.h"
#include "nsBoxLayoutState.h"
#include "nsBlockFrame.h"
@ -5433,25 +5434,15 @@ GetIBSpecialSibling(nsPresContext* aPresContext,
aPresContext->PropertyTable()->GetProperty(aFrame,
nsGkAtoms::IBSplitSpecialPrevSibling, &rv));
if (NS_OK == rv) {
if (NS_PROPTABLE_PROP_NOT_THERE == rv) {
*aSpecialSibling = nsnull;
rv = NS_OK;
} else if (NS_SUCCEEDED(rv)) {
NS_ASSERTION(specialSibling, "null special sibling");
*aSpecialSibling = specialSibling;
}
return NS_OK;
}
static PRBool
IsTablePseudo(nsIAtom* aPseudo)
{
return
aPseudo == nsCSSAnonBoxes::tableOuter ||
aPseudo == nsCSSAnonBoxes::table ||
aPseudo == nsCSSAnonBoxes::tableRowGroup ||
aPseudo == nsCSSAnonBoxes::tableRow ||
aPseudo == nsCSSAnonBoxes::tableCell ||
aPseudo == nsCSSAnonBoxes::tableColGroup ||
aPseudo == nsCSSAnonBoxes::tableCol;
return rv;
}
/**
@ -5469,37 +5460,73 @@ GetCorrectedParent(nsPresContext* aPresContext, nsIFrame* aFrame,
nsIFrame** aSpecialParent)
{
nsIFrame *parent = aFrame->GetParent();
*aSpecialParent = parent;
if (parent) {
nsIAtom* pseudo = aFrame->GetStyleContext()->GetPseudoType();
// if this frame itself is not scrolled-content, then skip any scrolled-content
// parents since they're basically anonymous as far as the style system goes
if (pseudo != nsCSSAnonBoxes::scrolledContent) {
while (parent->GetStyleContext()->GetPseudoType() ==
nsCSSAnonBoxes::scrolledContent) {
parent = parent->GetParent();
}
}
// If the frame is not a table pseudo frame, we want to move up
// the tree till we get to a non-table-pseudo frame.
if (!IsTablePseudo(pseudo)) {
while (IsTablePseudo(parent->GetStyleContext()->GetPseudoType())) {
parent = parent->GetParent();
}
}
if (parent->GetStateBits() & NS_FRAME_IS_SPECIAL) {
GetIBSpecialSibling(aPresContext, parent, aSpecialParent);
} else {
*aSpecialParent = parent;
}
if (!parent) {
*aSpecialParent = nsnull;
} else {
*aSpecialParent =
nsFrame::CorrectStyleParentFrame(parent,
aFrame->GetStyleContext()->
GetPseudoType());
}
return NS_OK;
}
/* static */
nsIFrame*
nsFrame::CorrectStyleParentFrame(nsIFrame* aProspectiveParent,
nsIAtom* aChildPseudo)
{
NS_PRECONDITION(aProspectiveParent, "Must have a prospective parent");
// Anon boxes are parented to their actual parent already, except
// for non-elements. Those should not be treated as an anon box.
if (aChildPseudo && aChildPseudo != nsCSSAnonBoxes::mozNonElement &&
nsCSSAnonBoxes::IsAnonBox(aChildPseudo)) {
NS_ASSERTION(aChildPseudo != nsCSSAnonBoxes::mozAnonymousBlock &&
aChildPseudo != nsCSSAnonBoxes::mozAnonymousPositionedBlock,
"Should have dealt with kids that have NS_FRAME_IS_SPECIAL "
"elsewhere");
return aProspectiveParent;
}
// Otherwise, walk up out of all anon boxes
nsIFrame* parent = aProspectiveParent;
do {
if (parent->GetStateBits() & NS_FRAME_IS_SPECIAL) {
nsIFrame* sibling;
nsresult rv =
GetIBSpecialSibling(parent->PresContext(), parent, &sibling);
if (NS_FAILED(rv)) {
// If GetIBSpecialSibling fails, then what? we used to return what is
// now |aProspectiveParent|, but maybe |parent| would make more sense?
NS_NOTREACHED("Shouldn't get here");
return aProspectiveParent;
}
if (sibling) {
// |parent| was the block in an {ib} split; use the inline as
// |the style parent.
parent = sibling;
}
}
nsIAtom* parentPseudo = parent->GetStyleContext()->GetPseudoType();
if (!parentPseudo || !nsCSSAnonBoxes::IsAnonBox(parentPseudo)) {
return parent;
}
parent = parent->GetParent();
} while (parent);
// We can get here if aProspectiveParent is the scrollframe for a viewport
// and the kids are the anonymous scrollbars.
NS_ASSERTION(aProspectiveParent->GetStyleContext()->GetPseudoType() ==
nsCSSAnonBoxes::viewportScroll,
"Should have found a parent before this");
return aProspectiveParent;
}
nsresult
nsFrame::DoGetParentStyleContextFrame(nsPresContext* aPresContext,
nsIFrame** aProviderFrame,
@ -5521,9 +5548,16 @@ nsFrame::DoGetParentStyleContextFrame(nsPresContext* aPresContext,
* using GetIBSpecialSibling
*/
if (mState & NS_FRAME_IS_SPECIAL) {
GetIBSpecialSibling(aPresContext, this, aProviderFrame);
if (*aProviderFrame)
nsresult rv = GetIBSpecialSibling(aPresContext, this, aProviderFrame);
if (NS_FAILED(rv)) {
NS_NOTREACHED("Shouldn't get here");
*aProviderFrame = nsnull;
return rv;
}
if (*aProviderFrame) {
return NS_OK;
}
}
// If this frame is one of the blocks that split an inline, we must

Просмотреть файл

@ -518,6 +518,18 @@ public:
nsresult DisplayOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);
/**
* Adjust the given parent frame to the right style context parent frame for
* the child, given the pseudo-type of the prospective child. This handles
* things like walking out of table pseudos and so forth.
*
* @param aProspectiveParent what GetParent() on the child returns.
* Must not be null.
* @param aChildPseudo the child's pseudo type, if any.
*/
static nsIFrame*
CorrectStyleParentFrame(nsIFrame* aProspectiveParent, nsIAtom* aChildPseudo);
protected:
// Protected constructor and destructor
nsFrame(nsStyleContext* aContext);

Просмотреть файл

@ -0,0 +1,51 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2007
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = layout/generic/test
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
_TEST_FILES = test_bug323656.html \
$(NULL)
libs:: $(_TEST_FILES)
$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)

Просмотреть файл

@ -0,0 +1,52 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=323656
-->
<head>
<title>Test for Bug 323656</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<style>
/**
* The idea is that "color" inherits by default while "border-color" does
* not. So if the former is red and the latter is green on a parent, and
* the child's border-color is set to "inherit", it'll be green only if
* the child is inheriting from the parent. If not, it'll either be
* whatever the border-color is on what it's inheriting from, which will
* be red if what it's inheriting from has the default (currentColor)
*border-color).
*/
/* 't' for "test" */
#display, #display *
{ color: red; border: 0px hidden red; background: transparent }
#display .t { border-color: green }
#display .t > :first-child
{ border-color: inherit; border-style: solid; border-width: 10px }
</style>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=323656">Mozilla Bug 323656</a>
<p id="display">
<select size="1" class="t">
<option id="testOption"></option>
</select>
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
/** Test for Bug 323656 **/
var s = document.defaultView.getComputedStyle($("testOption"), "");
is(s.borderRightColor, "rgb(0, 128, 0)", "Inheritance broken");
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>Test inheritance through various table anonymous boxes</title>
<style>
/**
* The idea is that "color" inherits by default while "border-color" does
* not. So if the former is red and the latter is green on a parent, and
* the child's border-color is set to "inherit", it'll be green only if
* the child is inheriting from the parent. If not, it'll either be
* whatever the border-color is on what it's inheriting from, which will
* be red if what it's inheriting from has the default (currentColor)
* border-color).
*/
/* 't' for "test" */
* { color: green; border: 0px hidden green; background: transparent }
.t { border-color: green }
.t > :first-child
{ border-color: green; border-style: solid; border-width: 10px }
</style>
</head>
<body>
<table><tr><td class="t"><div></div></td></tr></table>
<div style="display: table" class="t"><div></div></div>
<div style="display: table-row-group" class="t"><div></div></div>
<div style="display: table-row" class="t"><div></div></div>
<div style="display: table-cell" class="t"><div></div></div>
<div><span><div style="display: table" class="t"><div></div></div></span></div>
<div><span><div style="display: table-row-group" class="t"><div></div></div></span></div>
<div><span><div style="display: table-row" class="t"><div></div></div></span></div>
<div><span><div style="display: table-cell" class="t"><div></div></div></span></div>
<table><tr><td class="t"><div></div></td></tr></table>
<div style="display: table" class="t"><div></div></div>
<div style="display: table-row-group" class="t"><div></div></div>
<div style="display: table-row" class="t"><div></div></div>
<div style="display: table-cell" class="t"><div></div></div>
<div><span><div style="display: table" class="t"><div></div></div></span></div>
<div><span><div style="display: table-row-group" class="t"><div></div></div></span></div>
<div><span><div style="display: table-row" class="t"><div></div></div></span></div>
<div><span><div style="display: table-cell" class="t"><div></div></div></span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<title>Test inheritance through various table anonymous boxes</title>
<style>
/**
* The idea is that "color" inherits by default while "border-color" does
* not. So if the former is red and the latter is green on a parent, and
* the child's border-color is set to "inherit", it'll be green only if
* the child is inheriting from the parent. If not, it'll either be
* whatever the border-color is on what it's inheriting from, which will
* be red if what it's inheriting from has the default (currentColor)
* border-color).
*/
/* 't' for "test" */
* { color: red; border: 0px hidden red; background: transparent }
.t { border-color: green }
.t > :first-child
{ border-color: inherit; border-style: solid; border-width: 10px }
</style>
<script>
function makeDiv() {
return document.createElement("div");
}
window.onload = function() {
var lst = document.getElementsByClassName("d");
for (var i = 0; i < lst.length; ++i) {
lst[i].appendChild(makeDiv());
}
}
</script>
</head>
<body>
<table><tr><td class="t"><div></div></td></tr></table>
<div style="display: table" class="t"><div></div></div>
<div style="display: table-row-group" class="t"><div></div></div>
<div style="display: table-row" class="t"><div></div></div>
<div style="display: table-cell" class="t"><div></div></div>
<div><span><div style="display: table" class="t"><div></div></div></span></div>
<div><span><div style="display: table-row-group" class="t"><div></div></div></span></div>
<div><span><div style="display: table-row" class="t"><div></div></div></span></div>
<div><span><div style="display: table-cell" class="t"><div></div></div></span></div>
<table><tr><td class="t d"></td></tr></table>
<div style="display: table" class="t d"></div>
<div style="display: table-row-group" class="t d"></div>
<div style="display: table-row" class="t d"></div>
<div style="display: table-cell" class="t d"></div>
<div><span><div style="display: table" class="t d"></div></span></div>
<div><span><div style="display: table-row-group" class="t d"></div></span></div>
<div><span><div style="display: table-row" class="t d"></div></span></div>
<div><span><div style="display: table-cell" class="t d"></div></span></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<title>Test inheritance through fieldsets and legends</title>
<style>
/**
* The idea is that "color" inherits by default while "border-color" does
* not. So if the former is red and the latter is green on a parent, and
* the child's border-color is set to "inherit", it'll be green only if
* the child is inheriting from the parent. If not, it'll either be
* whatever the border-color is on what it's inheriting from, which will
* be red if what it's inheriting from has the default (currentColor)
* border-color).
*/
/* 't' for "test" */
* { color: green; border: 0px hidden green; background: transparent }
.t { border-color: green }
.t > :first-child
{ border-color: green; border-style: solid; border-width: 10px }
</style>
</head>
<body>
<fieldset class="t"><div></div></fieldset>
<fieldset><legend class="t"><span></span></legend></fieldset>
<fieldset class="t"><div></div></fieldset>
<fieldset><legend class="t"><span></span></legend></fieldset>
</body>
</html>

Просмотреть файл

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<title>Test inheritance through fieldsets and legends</title>
<style>
/**
* The idea is that "color" inherits by default while "border-color" does
* not. So if the former is red and the latter is green on a parent, and
* the child's border-color is set to "inherit", it'll be green only if
* the child is inheriting from the parent. If not, it'll either be
* whatever the border-color is on what it's inheriting from, which will
* be red if what it's inheriting from has the default (currentColor)
* border-color).
*/
/* 't' for "test" */
* { color: red; border: 0px hidden red; background: transparent }
.t { border-color: green }
.t > :first-child
{ border-color: inherit; border-style: solid; border-width: 10px }
</style>
<script>
function make(str) {
return document.createElement(str);
}
window.onload = function() {
document.getElementById("f").appendChild(make("div"));
document.getElementById("l").appendChild(make("span"));
}
</script>
</head>
<body>
<fieldset class="t"><div></div></fieldset>
<fieldset><legend class="t"><span></span></legend></fieldset>
<fieldset class="t" id="f"></fieldset>
<fieldset><legend class="t" id="l"></legend></fieldset>
</body>
</html>

Просмотреть файл

@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<title>
Test inheritance through various anonymous boxes: {ib}
situations, buttons, overflow, columns, listboxes, first-line
</title>
<style>
/**
* The idea is that "color" inherits by default while "border-color" does
* not. So if the former is red and the latter is green on a parent, and
* the child's border-color is set to "inherit", it'll be green only if
* the child is inheriting from the parent. If not, it'll either be
* whatever the border-color is on what it's inheriting from, which will
* be red if what it's inheriting from has the default (currentColor)
* border-color).
*/
/* 't' for "test" */
* { color: green; border: 0px hidden green; background: transparent }
.t { border-color: green }
.t:not(.d2) > :first-child, .d2 > span
{ border-color: green; border-style: solid; border-width: 10px }
.f::first-line { border-color: green }
</style>
</head>
<body>
<div class="t"><div></div></div>
<span class="t"><div></div></span>
<span style="position: relative" class="t"><div></div></span>
<div class="f"><span></span><br><span></span></div>
<button class="t"><div></div></button>
<div style="overflow: auto" class="t"><div></div></div>
<div style="-moz-column-count: 2" class="t"><div></div></div>
<select size="2" class="t">
<option></option>
</select>
<div class="t"><div></div></div>
<span class="t"><div></div></span>
<span style="position: relative" class="t"><div></div></span>
<div class="f"><span></span><br><span></span></div>
<button class="t"><div></div></button>
<div style="overflow: auto" class="t"><div></div></div>
<div style="-moz-column-count: 2" class="t"><div></div></div>
<select size="2" class="t">
<option></option>
</select>
<span class="t d2"><div></div><span></span></span>
<span style="position: relative" class="t d2"><div></div><span></span></span>
</body>
</html>

Просмотреть файл

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html>
<head>
<title>Test inheritance through various anonymous boxes: {ib}
situations, buttons, overflow, columns, listboxes, first-line</title>
<style>
/**
* The idea is that "color" inherits by default while "border-color" does
* not. So if the former is red and the latter is green on a parent, and
* the child's border-color is set to "inherit", it'll be green only if
* the child is inheriting from the parent. If not, it'll either be
* whatever the border-color is on what it's inheriting from, which will
* be red if what it's inheriting from has the default (currentColor)
* border-color).
*/
/* 't' for "test" */
* { color: red; border: 0px hidden red; background: transparent }
.t { border-color: green }
.t:not(.d2) > :first-child
{ border-color: inherit; border-style: solid; border-width: 10px }
.d2 > span { border-style: solid; border-width: 10px }
.f::first-line { border-color: green }
</style>
<script>
function make(str) {
return document.createElement(str);
}
function makeDiv() {
return make("div");
}
window.onload = function() {
var lst = document.getElementsByClassName("d");
for (var i = 0; i < lst.length; ++i) {
if (lst[i].nodeName != "select") {
lst[i].appendChild(makeDiv());
} else {
lst[i].appendChild(make("option"));
}
}
lst = document.getElementsByClassName("d2");
for (i = 0; i < lst.length; ++i) {
var span = lst[i].getElementsByTagName("span")[0];
span.style.cssText =
"border-color: inherit; border-style: solid; border-width: 10px";
}
var x = document.getElementsByClassName("f d")[0];
x.appendChild(make("span"));
x.appendChild(make("br"));
x.appendChild(make("span"));
}
</script>
</head>
<body>
<div class="t"><div></div></div>
<span class="t"><div></div></span>
<span style="position: relative" class="t"><div></div></span>
<div class="f"><span></span><br><span></span></div>
<button class="t"><div></div></button>
<div style="overflow: auto" class="t"><div></div></div>
<div style="-moz-column-count: 2" class="t"><div></div></div>
<select size="2" class="t">
<option></option>
</select>
<div class="t d"></div>
<span class="t d"></span>
<span style="position: relative" class="t d"></span>
<div class="f d"></div>
<button class="t d"></button>
<div style="overflow: auto" class="t d"></div>
<div style="-moz-column-count: 2" class="t d"></div>
<select size="2" class="t d">
<option></option>
</select>
<span class="t d2"><div></div><span></span></span>
<span style="position: relative" class="t d2"><div></div><span></span></span>
</body>
</html>

Просмотреть файл

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>Test inheritance through first-letter</title>
<style>
.f2 { color: blue }
.f2 > span { color: green }
</style>
<body>
<div class="f2"><span>A</span>BC</div>
<div class="f2"><span>A</span>BC</div>
<div class="f2"><span>A</span>BC</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>Test inheritance through first-letter</title>
<style>
.f2 > * { color: blue }
.f2::first-letter { color: green }
</style>
<script>
function make(str) {
return document.createElement(str);
}
window.onload = function() {
var x = document.getElementById("d1");
var y = make("span");
y.appendChild(document.createTextNode("ABC"));
x.appendChild(y);
x = document.getElementById("d2");
y = make("span");
x.appendChild(y);
y.appendChild(document.createTextNode("ABC"));
}
</script>
<body>
<div class="f2"><span>ABC</span></div>
<div class="f2" id="d1"></div>
<div class="f2" id="d2"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>Testcase for foreignObject</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=367366 -->
<rect width="100%" height="100%" fill="red"/>
<foreignObject width="100%" height="100%"
style="border-color: green; color: red">
<div xmlns="http://www.w3.org/1999/xhtml"
style="border-style: solid; border-width: 30px; border-color: green;
background: green; width:100%; height:100%;"/>
</foreignObject>
</svg>

После

Ширина:  |  Высота:  |  Размер: 506 B

Просмотреть файл

@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>Testcase for foreignObject</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=367366 -->
<rect width="100%" height="100%" fill="red"/>
<foreignObject width="100%" height="100%"
style="border-color: green; color: red">
<div xmlns="http://www.w3.org/1999/xhtml"
style="border-style: solid; border-width: 30px; border-color: inherit;
background: green; width:100%; height:100%;"/>
</foreignObject>
</svg>

После

Ширина:  |  Высота:  |  Размер: 508 B

Просмотреть файл

@ -97,6 +97,11 @@ fails == 25888-3r.html 25888-3r-ref.html # bug 25888
== 315620-2a.xhtml 315620-2-ref.xhtml
!= 315620-2b.xhtml 315620-2-ref.xhtml
== 322461-1.xml 322461-1-ref.html
== 323656-1.html 323656-1-ref.html
== 323656-2.html 323656-2-ref.html
== 323656-3.html 323656-3-ref.html
== 323656-4.html 323656-4-ref.html
fails == 323656-5.svg 323656-5-ref.svg # bug 377584
== 325486-1.html 325486-1-ref.html
random == 328829-1.xhtml 328829-1-ref.xhtml # bug 369046 (intermittent)
== 328829-2.xhtml 328829-2-ref.xhtml

Просмотреть файл

@ -57,7 +57,6 @@ CSS_ANON_BOX(mozNonElement, ":-moz-non-element")
CSS_ANON_BOX(mozAnonymousBlock, ":-moz-anonymous-block")
CSS_ANON_BOX(mozAnonymousPositionedBlock, ":-moz-anonymous-positioned-block")
CSS_ANON_BOX(mozFirstLineFixup, ":-moz-first-line-fixup")
CSS_ANON_BOX(mozLineFrame, ":-moz-line-frame")
CSS_ANON_BOX(buttonContent, ":-moz-button-content")
@ -90,7 +89,6 @@ CSS_ANON_BOX(scrolledPageSequence, ":-moz-scrolled-page-sequence")
CSS_ANON_BOX(columnContent, ":-moz-column-content")
CSS_ANON_BOX(viewport, ":-moz-viewport")
CSS_ANON_BOX(viewportScroll, ":-moz-viewport-scroll")
CSS_ANON_BOX(selectScrolledContent, ":-moz-select-scrolled-content")
#ifdef MOZ_XUL
CSS_ANON_BOX(moztreecolumn, ":-moz-tree-column")