This commit is contained in:
Justin Wood 2011-08-20 15:07:27 -04:00
Родитель 5e50dbe670 8c4b755d3c
Коммит fa58940cde
33 изменённых файлов: 672 добавлений и 376 удалений

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

@ -103,9 +103,11 @@ nsDOMMessageEvent::UnrootData()
}
NS_IMETHODIMP
nsDOMMessageEvent::GetData(jsval* aData)
nsDOMMessageEvent::GetData(JSContext* aCx, jsval* aData)
{
*aData = mData;
if (!JS_WrapValue(aCx, aData))
return NS_ERROR_FAILURE;
return NS_OK;
}

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

@ -137,6 +137,8 @@ _CHROME_FILES = \
test_bug602962.xul \
test_bug617528.xul \
window_bug617528.xul \
test_bug679494.xul \
file_bug679494.html \
$(NULL)
libs:: $(_TEST_FILES)

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

@ -0,0 +1,8 @@
<html>
<head>
<title>Test for Bug 679494</title>
</head>
<body>
There and back again.
</body>
</html>

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

@ -0,0 +1,37 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=67949
-->
<window title="Mozilla Bug 67949" onload="doTest();"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<title>Test for Bug 67949</title>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<body xmlns="http://www.w3.org/1999/xhtml">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=67949">Mozilla Bug 67949</a>
<p id="display"></p>
<div id="content" style="display: none">
<iframe id="contentframe" src="http://mochi.test:8888/tests/content/event/test/file_679494.html"></iframe>
</div>
</body>
<script class="testbody" type="application/javascript;version=1.8"><![CDATA[
/* Test for bug 679494 */
function doTest() {
SimpleTest.waitForExplicitFinish();
var w = document.getElementById("contentframe").contentWindow;
w.addEventListener("message", function(e) {
is("test", e.data, "We got the data without a compartment mismatch assertion!");
SimpleTest.finish();
}, false);
w.postMessage("test", "*");
}
]]></script>
</window>

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

@ -36,6 +36,7 @@
* ***** END LICENSE BLOCK ***** */
#include "nsIDOMHTMLTableCellElement.h"
#include "nsIDOMHTMLTableRowElement.h"
#include "nsHTMLTableElement.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMEventTarget.h"
#include "nsMappedAttributes.h"
@ -44,6 +45,7 @@
#include "nsStyleConsts.h"
#include "nsPresContext.h"
#include "nsRuleData.h"
#include "nsRuleWalker.h"
#include "nsIDocument.h"
#include "celldata.h"
@ -203,19 +205,15 @@ nsHTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
nsresult rv = nsGenericHTMLElement::WalkContentStyleRules(aRuleWalker);
NS_ENSURE_SUCCESS(rv, rv);
// Add style information from the mapped attributes of the table
// element. This depends on the strange behavior of the
// |MapAttributesIntoRule| in nsHTMLTableElement.cpp, which is
// technically incorrect since it's violating the nsIStyleRule
// contract. However, things are OK (except for the incorrect
// dependence on display type rather than tag) since tables and cells
// match different, less specific, rules.
nsIContent* table = GetTable();
if (table) {
rv = table->WalkContentStyleRules(aRuleWalker);
nsIContent* node = GetTable();
if (node && node->IsHTML() && node->NodeInfo()->Equals(nsGkAtoms::table)) {
nsHTMLTableElement* table = static_cast<nsHTMLTableElement*>(node);
nsMappedAttributes* tableInheritedAttributes =
table->GetAttributesMappedForCell();
if (tableInheritedAttributes)
aRuleWalker->Forward(tableInheritedAttributes);
}
return rv;
return NS_OK;
}

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

@ -34,14 +34,13 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIDOMHTMLTableElement.h"
#include "nsHTMLTableElement.h"
#include "nsIDOMHTMLTableCaptionElem.h"
#include "nsIDOMHTMLTableSectionElem.h"
#include "nsCOMPtr.h"
#include "nsIDOMEventTarget.h"
#include "nsDOMError.h"
#include "nsContentList.h"
#include "nsMappedAttributes.h"
#include "nsGenericHTMLElement.h"
#include "nsGkAtoms.h"
#include "nsStyleConsts.h"
@ -56,59 +55,7 @@
#include "nsGenericHTMLElement.h"
#include "nsIHTMLCollection.h"
/* end for collections */
class TableRowsCollection;
class nsHTMLTableElement : public nsGenericHTMLElement,
public nsIDOMHTMLTableElement
{
public:
nsHTMLTableElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~nsHTMLTableElement();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE(nsGenericHTMLElement::)
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
// nsIDOMHTMLTableElement
NS_DECL_NSIDOMHTMLTABLEELEMENT
virtual PRBool ParseAttribute(PRInt32 aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
nsAttrValue& aResult);
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsHTMLTableElement,
nsGenericHTMLElement)
already_AddRefed<nsIDOMHTMLTableSectionElement> GetTHead() {
return GetSection(nsGkAtoms::thead);
}
already_AddRefed<nsIDOMHTMLTableSectionElement> GetTFoot() {
return GetSection(nsGkAtoms::tfoot);
}
nsContentList* TBodies();
protected:
already_AddRefed<nsIDOMHTMLTableSectionElement> GetSection(nsIAtom *aTag);
nsRefPtr<nsContentList> mTBodies;
nsRefPtr<TableRowsCollection> mRows;
};
#include "nsHTMLStyleSheet.h"
/* ------------------------------ TableRowsCollection -------------------------------- */
/**
@ -367,7 +314,8 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Table)
nsHTMLTableElement::nsHTMLTableElement(already_AddRefed<nsINodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
: nsGenericHTMLElement(aNodeInfo),
mTableInheritedAttributes(TABLE_ATTRS_DIRTY)
{
}
@ -376,6 +324,7 @@ nsHTMLTableElement::~nsHTMLTableElement()
if (mRows) {
mRows->ParentDestroyed();
}
ReleaseInheritedAttributes();
}
@ -1030,219 +979,155 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsCompatibility mode = presContext->CompatibilityMode();
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(TableBorder)) {
const nsStyleDisplay* readDisplay = aData->mStyleContext->GetStyleDisplay();
if (readDisplay->mDisplay != NS_STYLE_DISPLAY_TABLE_CELL) {
// cellspacing
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::cellspacing);
nsCSSValue* borderSpacing = aData->ValueForBorderSpacing();
if (value && value->Type() == nsAttrValue::eInteger) {
if (borderSpacing->GetUnit() == eCSSUnit_Null)
borderSpacing->
SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
// cellspacing
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::cellspacing);
nsCSSValue* borderSpacing = aData->ValueForBorderSpacing();
if (value && value->Type() == nsAttrValue::eInteger) {
if (borderSpacing->GetUnit() == eCSSUnit_Null) {
borderSpacing->
SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
}
else if (value && value->Type() == nsAttrValue::ePercent &&
eCompatibility_NavQuirks == mode) {
// in quirks mode, treat a % cellspacing value a pixel value.
if (borderSpacing->GetUnit() == eCSSUnit_Null)
borderSpacing->
SetFloatValue(100.0f * value->GetPercentValue(), eCSSUnit_Pixel);
}
else if (value && value->Type() == nsAttrValue::ePercent &&
eCompatibility_NavQuirks == mode) {
// in quirks mode, treat a % cellspacing value a pixel value.
if (borderSpacing->GetUnit() == eCSSUnit_Null) {
borderSpacing->
SetFloatValue(100.0f * value->GetPercentValue(), eCSSUnit_Pixel);
}
}
}
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Table)) {
const nsStyleDisplay* readDisplay = aData->mStyleContext->GetStyleDisplay();
if (readDisplay->mDisplay != NS_STYLE_DISPLAY_TABLE_CELL) {
const nsAttrValue* value;
// layout
nsCSSValue* tableLayout = aData->ValueForTableLayout();
if (tableLayout->GetUnit() == eCSSUnit_Null) {
value = aAttributes->GetAttr(nsGkAtoms::layout);
if (value && value->Type() == nsAttrValue::eEnum)
tableLayout->SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
}
// cols
value = aAttributes->GetAttr(nsGkAtoms::cols);
if (value) {
nsCSSValue* cols = aData->ValueForCols();
if (value->Type() == nsAttrValue::eInteger)
cols->SetIntValue(value->GetIntegerValue(), eCSSUnit_Integer);
else // COLS had no value, so it refers to all columns
cols->SetIntValue(NS_STYLE_TABLE_COLS_ALL, eCSSUnit_Enumerated);
}
const nsAttrValue* value;
// layout
nsCSSValue* tableLayout = aData->ValueForTableLayout();
if (tableLayout->GetUnit() == eCSSUnit_Null) {
value = aAttributes->GetAttr(nsGkAtoms::layout);
if (value && value->Type() == nsAttrValue::eEnum)
tableLayout->SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
}
// cols
value = aAttributes->GetAttr(nsGkAtoms::cols);
if (value) {
nsCSSValue* cols = aData->ValueForCols();
if (value->Type() == nsAttrValue::eInteger)
cols->SetIntValue(value->GetIntegerValue(), eCSSUnit_Integer);
else // COLS had no value, so it refers to all columns
cols->SetIntValue(NS_STYLE_TABLE_COLS_ALL, eCSSUnit_Enumerated);
}
}
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Margin)) {
const nsStyleDisplay* readDisplay = aData->mStyleContext->GetStyleDisplay();
if (readDisplay->mDisplay != NS_STYLE_DISPLAY_TABLE_CELL) {
// align; Check for enumerated type (it may be another type if
// illegal)
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
// align; Check for enumerated type (it may be another type if
// illegal)
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
if (value && value->Type() == nsAttrValue::eEnum) {
if (value->GetEnumValue() == NS_STYLE_TEXT_ALIGN_CENTER ||
value->GetEnumValue() == NS_STYLE_TEXT_ALIGN_MOZ_CENTER) {
nsCSSValue* marginLeft = aData->ValueForMarginLeftValue();
if (marginLeft->GetUnit() == eCSSUnit_Null)
marginLeft->SetAutoValue();
nsCSSValue* marginRight = aData->ValueForMarginRightValue();
if (marginRight->GetUnit() == eCSSUnit_Null)
marginRight->SetAutoValue();
}
}
// hspace is mapped into left and right margin,
// vspace is mapped into top and bottom margins
// - *** Quirks Mode only ***
if (eCompatibility_NavQuirks == mode) {
value = aAttributes->GetAttr(nsGkAtoms::hspace);
if (value && value->Type() == nsAttrValue::eInteger) {
nsCSSValue* marginLeft = aData->ValueForMarginLeftValue();
if (marginLeft->GetUnit() == eCSSUnit_Null)
marginLeft->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
nsCSSValue* marginRight = aData->ValueForMarginRightValue();
if (marginRight->GetUnit() == eCSSUnit_Null)
marginRight->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
}
value = aAttributes->GetAttr(nsGkAtoms::vspace);
if (value && value->Type() == nsAttrValue::eInteger) {
nsCSSValue* marginTop = aData->ValueForMarginTop();
if (marginTop->GetUnit() == eCSSUnit_Null)
marginTop->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
nsCSSValue* marginBottom = aData->ValueForMarginBottom();
if (marginBottom->GetUnit() == eCSSUnit_Null)
marginBottom->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
}
if (value && value->Type() == nsAttrValue::eEnum) {
if (value->GetEnumValue() == NS_STYLE_TEXT_ALIGN_CENTER ||
value->GetEnumValue() == NS_STYLE_TEXT_ALIGN_MOZ_CENTER) {
nsCSSValue* marginLeft = aData->ValueForMarginLeftValue();
if (marginLeft->GetUnit() == eCSSUnit_Null)
marginLeft->SetAutoValue();
nsCSSValue* marginRight = aData->ValueForMarginRightValue();
if (marginRight->GetUnit() == eCSSUnit_Null)
marginRight->SetAutoValue();
}
}
}
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Padding)) {
const nsStyleDisplay* readDisplay = aData->mStyleContext->GetStyleDisplay();
if (readDisplay->mDisplay == NS_STYLE_DISPLAY_TABLE_CELL) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::cellpadding);
if (value) {
nsAttrValue::ValueType valueType = value->Type();
if (valueType == nsAttrValue::eInteger || valueType == nsAttrValue::ePercent) {
// We have cellpadding. This will override our padding values if we don't
// have any set.
nsCSSValue padVal;
if (valueType == nsAttrValue::eInteger)
padVal.SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
else {
// when we support % cellpadding in standard mode, uncomment the following
float pctVal = value->GetPercentValue();
//if (eCompatibility_NavQuirks == mode) {
// in quirks mode treat a pct cellpadding value as a pixel value
padVal.SetFloatValue(100.0f * pctVal, eCSSUnit_Pixel);
//}
//else {
// padVal.SetPercentValue(pctVal);
//}
}
nsCSSValue* paddingLeft = aData->ValueForPaddingLeftValue();
if (paddingLeft->GetUnit() == eCSSUnit_Null)
*paddingLeft = padVal;
nsCSSValue* paddingRight = aData->ValueForPaddingRightValue();
if (paddingRight->GetUnit() == eCSSUnit_Null)
*paddingRight = padVal;
nsCSSValue* paddingTop = aData->ValueForPaddingTop();
if (paddingTop->GetUnit() == eCSSUnit_Null)
*paddingTop = padVal;
nsCSSValue* paddingBottom = aData->ValueForPaddingBottom();
if (paddingBottom->GetUnit() == eCSSUnit_Null)
*paddingBottom = padVal;
}
// hspace is mapped into left and right margin,
// vspace is mapped into top and bottom margins
// - *** Quirks Mode only ***
if (eCompatibility_NavQuirks == mode) {
value = aAttributes->GetAttr(nsGkAtoms::hspace);
if (value && value->Type() == nsAttrValue::eInteger) {
nsCSSValue* marginLeft = aData->ValueForMarginLeftValue();
if (marginLeft->GetUnit() == eCSSUnit_Null)
marginLeft->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
nsCSSValue* marginRight = aData->ValueForMarginRightValue();
if (marginRight->GetUnit() == eCSSUnit_Null)
marginRight->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
}
value = aAttributes->GetAttr(nsGkAtoms::vspace);
if (value && value->Type() == nsAttrValue::eInteger) {
nsCSSValue* marginTop = aData->ValueForMarginTop();
if (marginTop->GetUnit() == eCSSUnit_Null)
marginTop->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
nsCSSValue* marginBottom = aData->ValueForMarginBottom();
if (marginBottom->GetUnit() == eCSSUnit_Null)
marginBottom->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
}
}
}
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Position)) {
const nsStyleDisplay* readDisplay = aData->mStyleContext->GetStyleDisplay();
if (readDisplay->mDisplay != NS_STYLE_DISPLAY_TABLE_CELL) {
// width: value
nsCSSValue* width = aData->ValueForWidth();
if (width->GetUnit() == eCSSUnit_Null) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::width);
if (value && value->Type() == nsAttrValue::eInteger)
width->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
else if (value && value->Type() == nsAttrValue::ePercent)
width->SetPercentValue(value->GetPercentValue());
}
// height: value
nsCSSValue* height = aData->ValueForHeight();
if (height->GetUnit() == eCSSUnit_Null) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::height);
if (value && value->Type() == nsAttrValue::eInteger)
height->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
else if (value && value->Type() == nsAttrValue::ePercent)
height->SetPercentValue(value->GetPercentValue());
}
// width: value
nsCSSValue* width = aData->ValueForWidth();
if (width->GetUnit() == eCSSUnit_Null) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::width);
if (value && value->Type() == nsAttrValue::eInteger)
width->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
else if (value && value->Type() == nsAttrValue::ePercent)
width->SetPercentValue(value->GetPercentValue());
}
// height: value
nsCSSValue* height = aData->ValueForHeight();
if (height->GetUnit() == eCSSUnit_Null) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::height);
if (value && value->Type() == nsAttrValue::eInteger)
height->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
else if (value && value->Type() == nsAttrValue::ePercent)
height->SetPercentValue(value->GetPercentValue());
}
}
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Visibility)) {
const nsStyleDisplay* readDisplay = aData->mStyleContext->GetStyleDisplay();
if (readDisplay->mDisplay != NS_STYLE_DISPLAY_TABLE_CELL)
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Border)) {
const nsStyleDisplay* readDisplay = aData->mStyleContext->GetStyleDisplay();
if (readDisplay->mDisplay != NS_STYLE_DISPLAY_TABLE_CELL) {
// bordercolor
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::bordercolor);
nscolor color;
if (value && presContext->UseDocumentColors() &&
value->GetColorValue(color)) {
nsCSSValue* borderLeftColor = aData->ValueForBorderLeftColorValue();
if (borderLeftColor->GetUnit() == eCSSUnit_Null)
borderLeftColor->SetColorValue(color);
nsCSSValue* borderRightColor = aData->ValueForBorderRightColorValue();
if (borderRightColor->GetUnit() == eCSSUnit_Null)
borderRightColor->SetColorValue(color);
nsCSSValue* borderTopColor = aData->ValueForBorderTopColor();
if (borderTopColor->GetUnit() == eCSSUnit_Null)
borderTopColor->SetColorValue(color);
nsCSSValue* borderBottomColor = aData->ValueForBorderBottomColor();
if (borderBottomColor->GetUnit() == eCSSUnit_Null)
borderBottomColor->SetColorValue(color);
}
// bordercolor
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::bordercolor);
nscolor color;
if (value && presContext->UseDocumentColors() &&
value->GetColorValue(color)) {
nsCSSValue* borderLeftColor = aData->ValueForBorderLeftColorValue();
if (borderLeftColor->GetUnit() == eCSSUnit_Null)
borderLeftColor->SetColorValue(color);
nsCSSValue* borderRightColor = aData->ValueForBorderRightColorValue();
if (borderRightColor->GetUnit() == eCSSUnit_Null)
borderRightColor->SetColorValue(color);
nsCSSValue* borderTopColor = aData->ValueForBorderTopColor();
if (borderTopColor->GetUnit() == eCSSUnit_Null)
borderTopColor->SetColorValue(color);
nsCSSValue* borderBottomColor = aData->ValueForBorderBottomColor();
if (borderBottomColor->GetUnit() == eCSSUnit_Null)
borderBottomColor->SetColorValue(color);
}
// border
const nsAttrValue* borderValue = aAttributes->GetAttr(nsGkAtoms::border);
if (borderValue) {
// border = 1 pixel default
PRInt32 borderThickness = 1;
// border
const nsAttrValue* borderValue = aAttributes->GetAttr(nsGkAtoms::border);
if (borderValue) {
// border = 1 pixel default
PRInt32 borderThickness = 1;
if (borderValue->Type() == nsAttrValue::eInteger)
borderThickness = borderValue->GetIntegerValue();
if (borderValue->Type() == nsAttrValue::eInteger)
borderThickness = borderValue->GetIntegerValue();
// by default, set all border sides to the specified width
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidthValue();
if (borderLeftWidth->GetUnit() == eCSSUnit_Null)
borderLeftWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidthValue();
if (borderRightWidth->GetUnit() == eCSSUnit_Null)
borderRightWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
nsCSSValue* borderTopWidth = aData->ValueForBorderTopWidth();
if (borderTopWidth->GetUnit() == eCSSUnit_Null)
borderTopWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
nsCSSValue* borderBottomWidth = aData->ValueForBorderBottomWidth();
if (borderBottomWidth->GetUnit() == eCSSUnit_Null)
borderBottomWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
}
// by default, set all border sides to the specified width
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidthValue();
if (borderLeftWidth->GetUnit() == eCSSUnit_Null)
borderLeftWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidthValue();
if (borderRightWidth->GetUnit() == eCSSUnit_Null)
borderRightWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
nsCSSValue* borderTopWidth = aData->ValueForBorderTopWidth();
if (borderTopWidth->GetUnit() == eCSSUnit_Null)
borderTopWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
nsCSSValue* borderBottomWidth = aData->ValueForBorderBottomWidth();
if (borderBottomWidth->GetUnit() == eCSSUnit_Null)
borderBottomWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
}
}
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Background)) {
const nsStyleDisplay* readDisplay = aData->mStyleContext->GetStyleDisplay();
if (readDisplay->mDisplay != NS_STYLE_DISPLAY_TABLE_CELL)
nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
}
nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(PRBool)
@ -1279,3 +1164,144 @@ nsHTMLTableElement::GetAttributeMappingFunction() const
{
return &MapAttributesIntoRule;
}
static void
MapInheritedTableAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Padding)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::cellpadding);
if (value) {
nsAttrValue::ValueType valueType = value->Type();
if (valueType == nsAttrValue::eInteger ||
valueType == nsAttrValue::ePercent) {
// We have cellpadding. This will override our padding values if we
// don't have any set.
nsCSSValue padVal;
if (valueType == nsAttrValue::eInteger)
padVal.SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
else {
// when we support % cellpadding in standard mode, uncomment the
// following
float pctVal = value->GetPercentValue();
//if (eCompatibility_NavQuirks == mode) {
// in quirks mode treat a pct cellpadding value as a pixel value
padVal.SetFloatValue(100.0f * pctVal, eCSSUnit_Pixel);
//}
//else {
// padVal.SetPercentValue(pctVal);
//}
}
nsCSSValue* paddingLeft = aData->ValueForPaddingLeftValue();
if (paddingLeft->GetUnit() == eCSSUnit_Null)
*paddingLeft = padVal;
nsCSSValue* paddingRight = aData->ValueForPaddingRightValue();
if (paddingRight->GetUnit() == eCSSUnit_Null)
*paddingRight = padVal;
nsCSSValue* paddingTop = aData->ValueForPaddingTop();
if (paddingTop->GetUnit() == eCSSUnit_Null)
*paddingTop = padVal;
nsCSSValue* paddingBottom = aData->ValueForPaddingBottom();
if (paddingBottom->GetUnit() == eCSSUnit_Null)
*paddingBottom = padVal;
}
}
}
}
nsMappedAttributes*
nsHTMLTableElement::GetAttributesMappedForCell()
{
if (mTableInheritedAttributes) {
if (mTableInheritedAttributes == TABLE_ATTRS_DIRTY)
BuildInheritedAttributes();
if (mTableInheritedAttributes != TABLE_ATTRS_DIRTY)
return mTableInheritedAttributes;
}
return nsnull;
}
void
nsHTMLTableElement::BuildInheritedAttributes()
{
NS_ASSERTION(mTableInheritedAttributes == TABLE_ATTRS_DIRTY,
"potential leak, plus waste of work");
nsIDocument *document = GetCurrentDoc();
nsHTMLStyleSheet* sheet = document ?
document->GetAttributeStyleSheet() : nsnull;
nsRefPtr<nsMappedAttributes> newAttrs;
if (sheet) {
const nsAttrValue* value = mAttrsAndChildren.GetAttr(nsGkAtoms::cellpadding);
if (value) {
nsRefPtr<nsMappedAttributes> modifiableMapped = new
nsMappedAttributes(sheet, MapInheritedTableAttributesIntoRule);
if (modifiableMapped) {
nsAttrValue val(*value);
modifiableMapped->SetAndTakeAttr(nsGkAtoms::cellpadding, val);
}
newAttrs = sheet->UniqueMappedAttributes(modifiableMapped);
NS_ASSERTION(newAttrs, "out of memory, but handling gracefully");
if (newAttrs != modifiableMapped) {
// Reset the stylesheet of modifiableMapped so that it doesn't
// spend time trying to remove itself from the hash. There is no
// risk that modifiableMapped is in the hash since we created
// it ourselves and it didn't come from the stylesheet (in which
// case it would not have been modifiable).
modifiableMapped->DropStyleSheetReference();
}
}
mTableInheritedAttributes = newAttrs;
NS_IF_ADDREF(mTableInheritedAttributes);
}
}
nsresult
nsHTMLTableElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
PRBool aCompileEventHandlers)
{
ReleaseInheritedAttributes();
return nsGenericHTMLElement::BindToTree(aDocument, aParent,
aBindingParent,
aCompileEventHandlers);
}
void
nsHTMLTableElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
{
ReleaseInheritedAttributes();
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
}
nsresult
nsHTMLTableElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
nsIAtom* aPrefix, const nsAString& aValue,
PRBool aNotify)
{
PRBool isCellPadding = (aAttribute == nsGkAtoms::cellpadding);
if (isCellPadding) {
ReleaseInheritedAttributes();
}
nsresult rv = nsGenericHTMLElement::SetAttr(aNameSpaceID, aAttribute,
aPrefix, aValue, aNotify);
if (isCellPadding) {
BuildInheritedAttributes();
}
return rv;
}
nsresult
nsHTMLTableElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify)
{
PRBool isCellPadding = (aAttribute == nsGkAtoms::cellpadding);
if (isCellPadding) {
ReleaseInheritedAttributes();
}
return nsGenericHTMLElement::UnsetAttr(aNameSpaceID, aAttribute, aNotify);
}

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

@ -0,0 +1,116 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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 Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* 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 ***** */
#include "nsIDOMHTMLTableElement.h"
#include "nsGenericHTMLElement.h"
#include "nsMappedAttributes.h"
#define TABLE_ATTRS_DIRTY ((nsMappedAttributes*)0x1)
class TableRowsCollection;
class nsHTMLTableElement : public nsGenericHTMLElement,
public nsIDOMHTMLTableElement
{
public:
nsHTMLTableElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~nsHTMLTableElement();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE(nsGenericHTMLElement::)
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)
// nsIDOMHTMLTableElement
NS_DECL_NSIDOMHTMLTABLEELEMENT
virtual PRBool ParseAttribute(PRInt32 aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
nsAttrValue& aResult);
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
PRBool aCompileEventHandlers);
virtual void UnbindFromTree(PRBool aDeep = PR_TRUE,
PRBool aNullParent = PR_TRUE);
virtual nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom *aName,
nsIAtom *aPrefix, const nsAString &aValue,
PRBool aNotify);
virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify);
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsHTMLTableElement,
nsGenericHTMLElement)
nsMappedAttributes* GetAttributesMappedForCell();
already_AddRefed<nsIDOMHTMLTableSectionElement> GetTHead() {
return GetSection(nsGkAtoms::thead);
}
already_AddRefed<nsIDOMHTMLTableSectionElement> GetTFoot() {
return GetSection(nsGkAtoms::tfoot);
}
nsContentList* TBodies();
protected:
already_AddRefed<nsIDOMHTMLTableSectionElement> GetSection(nsIAtom *aTag);
nsRefPtr<nsContentList> mTBodies;
nsRefPtr<TableRowsCollection> mRows;
// Sentinel value of TABLE_ATTRS_DIRTY indicates that this is dirty and needs
// to be recalculated.
nsMappedAttributes *mTableInheritedAttributes;
void BuildInheritedAttributes();
void ReleaseInheritedAttributes() {
if (mTableInheritedAttributes &&
mTableInheritedAttributes != TABLE_ATTRS_DIRTY)
NS_RELEASE(mTableInheritedAttributes);
mTableInheritedAttributes = TABLE_ATTRS_DIRTY;
}
};

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

@ -287,6 +287,20 @@ NS_IMETHODIMP nsSVGFE::GetResult(nsIDOMSVGAnimatedString * *aResult)
return GetResultImageName().ToDOMAnimatedString(aResult, this);
}
//----------------------------------------------------------------------
// nsIContent methods
NS_IMETHODIMP_(PRBool)
nsSVGFE::IsAttributeMapped(const nsIAtom* name) const
{
static const MappedAttributeEntry* const map[] = {
sFiltersMap
};
return FindAttributeDependence(name, map, NS_ARRAY_LENGTH(map)) ||
nsSVGFEBase::IsAttributeMapped(name);
}
//----------------------------------------------------------------------
// nsSVGElement methods
@ -2751,8 +2765,7 @@ NS_IMETHODIMP_(PRBool)
nsSVGFEFloodElement::IsAttributeMapped(const nsIAtom* name) const
{
static const MappedAttributeEntry* const map[] = {
sFEFloodMap,
sFiltersMap
sFEFloodMap
};
return FindAttributeDependence(name, map, NS_ARRAY_LENGTH(map)) ||

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

@ -147,6 +147,9 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSVGFILTERPRIMITIVESTANDARDATTRIBUTES
// nsIContent interface
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsSVGString& GetResultImageName() = 0;
// Return a list of all image names used as sources. Default is to
// return no sources.

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

@ -1,45 +0,0 @@
#
# ***** 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
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# 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@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

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

@ -1,46 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Johnny Stenback <jst@netscape.com> (original author)
*
* 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 ***** */
#include "nsIDOMDocumentStyle.idl"
[scriptable, uuid(39f76c23-45b2-428a-9240-a981e5abf148)]
interface nsIDOMDocumentCSS : nsIDOMDocumentStyle
{
nsIDOMCSSStyleDeclaration getOverrideStyle(in nsIDOMElement elt,
in DOMString pseudoElt);
};

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

@ -51,6 +51,7 @@ interface nsIDOMMessageEvent : nsIDOMEvent
/**
* Custom string data associated with this event.
*/
[implicit_jscontext]
readonly attribute jsval data;
/**

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

@ -74,7 +74,6 @@ interface nsIDOMSVGSVGElement
nsIDOMSVGFitToViewBox,
nsIDOMSVGZoomAndPan,
events::nsIDOMEventTarget,
css::nsIDOMDocumentCSS
*/
{
readonly attribute nsIDOMSVGAnimatedLength x;

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

@ -0,0 +1,40 @@
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Test Page</title>
<style type="text/css">
<!--
td{
background-color: rgb(140,140,140);
}
-->
</style>
</head>
<body>
<table cellpadding=0 cellspacing=0 border=0 width=150>
<tr><td><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></td></tr>
<tr><td><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width=150>
<tr><td><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></td></tr>
<tr><td><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0>
<tr><td><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></td></tr>
<tr><td><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></td></tr>
</table>
<hr>
</body>
</html>

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

@ -0,0 +1,41 @@
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Test Page</title>
<style type="text/css">
<!--
.nav {
display:block;
background-color: rgb(140,140,140);
}
-->
</style>
</head>
<body>
<table cellpadding=0 cellspacing=0 border=0 width=150>
<tr><td class="nav"><a href="a.htm"><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></a></td></tr>
<tr><td class="nav"><a href="a.htm"><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></a></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width=150>
<tr><td><a href="a.htm" class="nav"><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></a></td></tr>
<tr><td><a href="a.htm" class="nav"><img width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></a></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width=150>
<tr><td><a href="a.htm"><img class="nav" width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></a></td></tr>
<tr><td><a href="a.htm"><img class="nav" width="16" height="16"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4z8AAAAMBAQD3A0FDAAAAAElFTkSuQmCC"
border=0></a></td></tr>
</table>
<hr>
</body>
</html>

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

@ -0,0 +1,26 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>border crosstalk</title>
</head>
<style>
table.t1 td {border: 1px solid black}
</style>
<body >
<TABLE style="border-collapse:collapse" class="t1">
<TR><TD>1</td> <TD>2</td> <TD>3</td></tr>
</TABLE>
<table border="1">
<tr><td>1</td><td>2</td></tr>
<tr><td >3</td><td>4</td></tr>
</table>
</body>
</html>

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

@ -0,0 +1,24 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>border crosstalk</title>
</head>
<body >
<TABLE border="1" style="border-collapse:collapse">
<TR><TD>1</td> <TD>2</td> <TD>3</td></tr>
</TABLE>
<table border="1">
<tr><td>1</td><td>2</td></tr>
<tr><td >3</td><td>4</td></tr>
</table>
</body>
</html>

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

@ -0,0 +1,20 @@
<html>
<head>
<style type="text/css">
.forms {display:inline;}
.nn2{background-image: url("260406.gif");width:20px;height:18px;}
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>P</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="nn2"></td>
</tr>
</table>
</body>
</html>

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

@ -0,0 +1,20 @@
<html>
<head>
<style type="text/css">
.forms {display:inline;}
.nn2{background-image: url("260406.gif");width:20px;height:18px;}
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="forms">P</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="nn2"></td>
</tr>
</table>
</body>
</html>

Двоичные данные
layout/reftests/bugs/260406.gif Normal file

Двоичный файл не отображается.

После

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

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

@ -138,6 +138,7 @@ random == 99850-1b.html 99850-1-ref.html # bug 471629
== 167496-1.html 167496-1-ref.html
== 169749-1.html 169749-1-ref.html
== 172073-1.html 172073-1-ref.html
== 175190-1.html 175190-1-ref.html
== 179596-1a.html 179596-1a-ref.html
== 179596-1b.html 179596-1b-ref.html
== 179596-2.html 179596-2-ref.html
@ -146,6 +147,7 @@ random == 99850-1b.html 99850-1-ref.html # bug 471629
== 180085-1.html 180085-1-ref.html
== 180085-2.html 180085-2-ref.html
== 185388-1.html 185388-1-ref.html
== 186317-1.html 186317-1-ref.html
== 192902-1.html 192902-ref.html
== 192767-01.xul 192767-11.xul
== 192767-02.xul 192767-12.xul
@ -268,6 +270,7 @@ fails-if(Android) != 192767-17.xul 192767-37.xul
== 252920-1.html 252920-1-ref.html
== 253701-1.html 253701-1-ref.html
== 255820-1.html 255820-1-ref.html
== 260406-1.html 260406-1-ref.html
== 261826-1.xul 261826-1-ref.xul
== 262151-1.html 262151-1-ref.html
== 262998-1.html 262998-1-ref.html

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

До

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

После

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

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

@ -0,0 +1,28 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg class="reftest-wait" xmlns="http://www.w3.org/2000/svg" onload="startTest()">
<defs>
<filter id="f" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
x="0" y="0" width="1" height="1">
<feFlood flood-color="#ff0000" flood-opacity="0.5" result="flood"/>
<feComposite id="comp" width="1" height="1" in="flood" operator="over" in2="SourceGraphic"/>
</filter>
</defs>
<rect width="100" height="100" fill="lime" filter="url(#f)"/>
<script>
function startTest() {
document.addEventListener("MozReftestInvalidate", doTest, false);
// in case we're not gecko
setTimeout(doTest, 5000);
}
function doTest() {
document.getElementById("comp").setAttribute("color-interpolation-filters", "sRGB");
document.documentElement.removeAttribute('class');
}
</script>
</svg>

После

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

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

@ -64,7 +64,8 @@ fails-if(Android) == dynamic-conditions-01.svg pass.svg # bug 652050
== dynamic-clipPath-01.svg pass.svg
== dynamic-feFlood-01.svg pass.svg
== dynamic-feImage-01.svg pass.svg
== dynamic-filter-contents-01.svg dynamic-filter-contents-01-ref.svg
== dynamic-filter-contents-01a.svg dynamic-filter-contents-01-ref.svg
== dynamic-filter-contents-01b.svg dynamic-filter-contents-01-ref.svg
== dynamic-gradient-contents-01.svg pass.svg
== dynamic-gradient-contents-02.svg pass.svg
== dynamic-inner-svg-01.svg pass.svg

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

@ -1,7 +1,7 @@
== 121142-1a.html 121142-1-ref.html
== 121142-1b.html 121142-1-ref.html
== 121142-2.html 121142-2-ref.html
fails == 156888-1.html 156888-1-ref.html # bug 484825
== 156888-1.html 156888-1-ref.html
== 156888-2.html 156888-2-ref.html
== 162063-1.xhtml about:blank
== 203923-1.html white-space-ref.html

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

@ -1,6 +0,0 @@
[DEFAULT]
head = head_plugins.js
tail =
[test_bug455213.js]
[test_bug471245.js]

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

@ -39,7 +39,6 @@
# This file contains makefiles that will be generated for every XUL app.
MAKEFILES_db="
db/Makefile
db/sqlite3/src/Makefile
"

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

@ -111,7 +111,6 @@ endif
tier_platform_dirs += \
modules/libjar \
db \
storage \
$(NULL)

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

@ -91,7 +91,6 @@ def build_interface(iface, ifaces):
isPtr = (tag == xpt.Type.Tags.char_ptr or tag == xpt.Type.Tags.wchar_t_ptr)
return xpt.SimpleType(tag,
pointer=isPtr,
#XXXkhuey unique_pointer is completely unused (bug 677787.)
reference=False)
if isinstance(type, xpidl.Array):
@ -118,7 +117,6 @@ def build_interface(iface, ifaces):
isRef = type.isRef(calltype) and not type.specialtype == 'jsval'
return xpt.SimpleType(TypeMap[type.specialtype],
pointer=isPtr,
#XXXkhuey unique_pointer is completely unused
reference=isRef)
elif iid_is != None:
return xpt.InterfaceIsType(iid_is)
@ -126,7 +124,6 @@ def build_interface(iface, ifaces):
# void ptr
return xpt.SimpleType(TypeMap['void'],
pointer=True,
#XXXkhuey unique_pointer is completely unused
reference=False)
raise Exception("Unknown type!")

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

@ -74,9 +74,6 @@ public:
PRBool IsPointer() const
{return 0 != (XPT_TDP_IS_POINTER(flags));}
PRBool IsUniquePointer() const
{return 0 != (XPT_TDP_IS_UNIQUE_POINTER(flags));}
PRBool IsReference() const
{return 0 != (XPT_TDP_IS_REFERENCE(flags));}

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

@ -337,14 +337,12 @@ struct XPTTypeDescriptorPrefix {
/* flag bits -- fur and jband were right, I was miserably wrong */
#define XPT_TDP_POINTER 0x80
#define XPT_TDP_UNIQUE_POINTER 0x40
#define XPT_TDP_REFERENCE 0x20
#define XPT_TDP_FLAGMASK 0xe0
#define XPT_TDP_TAGMASK (~XPT_TDP_FLAGMASK)
#define XPT_TDP_TAG(tdp) ((tdp).flags & XPT_TDP_TAGMASK)
#define XPT_TDP_IS_POINTER(flags) (flags & XPT_TDP_POINTER)
#define XPT_TDP_IS_UNIQUE_POINTER(flags) (flags & XPT_TDP_UNIQUE_POINTER)
#define XPT_TDP_IS_REFERENCE(flags) (flags & XPT_TDP_REFERENCE)
/*

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

@ -158,7 +158,6 @@ class TypelibCompareMixin:
self.assertEqual(type(t1), type(t2), "type types should be equal")
self.assertEqual(t1.pointer, t2.pointer,
"pointer flag should be equal for %s and %s" % (t1, t2))
self.assertEqual(t1.unique_pointer, t2.unique_pointer)
self.assertEqual(t1.reference, t2.reference)
if isinstance(t1, xpt.SimpleType):
self.assertEqual(t1.tag, t2.tag)

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

@ -141,9 +141,8 @@ class Type(object):
'jsval',
)
def __init__(self, pointer=False, unique_pointer=False, reference=False):
def __init__(self, pointer=False, reference=False):
self.pointer = pointer
self.unique_pointer = unique_pointer
self.reference = reference
if reference and not pointer:
raise Exception("If reference is True pointer must be True too")
@ -159,7 +158,6 @@ class Type(object):
"""
return {'pointer': bool(byte & 0x80),
'unique_pointer': bool(byte & 0x40),
'reference': bool(byte & 0x20),
}
@ -171,8 +169,6 @@ class Type(object):
flags = 0
if self.pointer:
flags |= 0x80
if self.unique_pointer:
flags |= 0x40
if self.reference:
flags |= 0x20
return flags