Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the way we determine the style context parent frame to skip cs…
…s 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
- Loading branch information
Showing
18 changed files
with
584 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Oops, something went wrong.