mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Backed out changeset 7d7457d5ca8a (bug 1338936)
This commit is contained in:
parent
c7c107adf2
commit
a64b195d9b
@ -1522,12 +1522,6 @@ nsGenericHTMLElement::MapBackgroundInto(const nsMappedAttributes* aAttributes,
|
||||
if (!aData->ShouldComputeStyleStruct(NS_STYLE_INHERIT_BIT(Background)))
|
||||
return;
|
||||
|
||||
if (aData->IsServo()) {
|
||||
// FIXME(bug 1339711)
|
||||
NS_WARNING("stylo: cannot handle background presentation attribute");
|
||||
return;
|
||||
}
|
||||
|
||||
nsPresContext* presContext = aData->PresContext();
|
||||
|
||||
if (!aData->PropertyIsSet(eCSSProperty_background_image) &&
|
||||
@ -1551,6 +1545,9 @@ nsGenericHTMLElement::MapBackgroundInto(const nsMappedAttributes* aAttributes,
|
||||
nsCSSValueList* list = backImage->SetListValue();
|
||||
list->mValue.SetImageValue(value->GetImageValue());
|
||||
}
|
||||
} else {
|
||||
// FIXME(bug 1330041)
|
||||
MOZ_ASSERT_UNREACHABLE("stylo: cannot handle background");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -490,12 +490,6 @@ void
|
||||
nsMathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes,
|
||||
GenericSpecifiedValues* aGenericData)
|
||||
{
|
||||
if (aGenericData->IsServo()) {
|
||||
// FIXME (bug 1339711) handle MathML properties in Stylo
|
||||
NS_WARNING("stylo: cannot handle MathML presentation attributes");
|
||||
return;
|
||||
}
|
||||
|
||||
nsRuleData* aData = aGenericData->AsGecko();
|
||||
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Font)) {
|
||||
// scriptsizemultiplier
|
||||
|
@ -175,46 +175,10 @@ SERVO_BINDING_FUNC(Servo_DeclarationBlock_RemoveProperty, void,
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_RemovePropertyById, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property)
|
||||
|
||||
// presentation attributes
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_PropertyIsSet, bool,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetIdentStringValue, void,
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_AddPresValue, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property,
|
||||
const nsAString& value)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetKeywordValue, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property,
|
||||
int32_t value)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetIntValue, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property,
|
||||
int32_t value)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetPixelValue, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property,
|
||||
float value)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetPercentValue, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property,
|
||||
float value)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetAutoValue, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetCurrentColor, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetColorValue, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
nsCSSPropertyID property,
|
||||
nscolor value)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetFontFamily, void,
|
||||
RawServoDeclarationBlockBorrowed declarations,
|
||||
const nsAString& value)
|
||||
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetTextDecorationColorOverride, void,
|
||||
RawServoDeclarationBlockBorrowed declarations)
|
||||
nsCSSValueBorrowedMut css_value)
|
||||
|
||||
// CSS supports()
|
||||
SERVO_BINDING_FUNC(Servo_CSSSupports2, bool,
|
||||
|
@ -3,7 +3,6 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "mozilla/ServoSpecifiedValues.h"
|
||||
|
||||
namespace {
|
||||
@ -25,79 +24,3 @@ ServoSpecifiedValues::ServoSpecifiedValues(nsPresContext* aContext,
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool
|
||||
ServoSpecifiedValues::PropertyIsSet(nsCSSPropertyID aId)
|
||||
{
|
||||
// We always create fresh ServoSpecifiedValues for each property
|
||||
// mapping, so unlike Gecko there aren't existing properties from
|
||||
// the cascade that we wish to avoid overwriting.
|
||||
//
|
||||
// If a property is being overwritten, that's a bug. Check for it
|
||||
// in debug mode (this is O(n^2) behavior since Servo will traverse
|
||||
// the array each time you add a new property)
|
||||
MOZ_ASSERT(!Servo_DeclarationBlock_PropertyIsSet(mDecl, aId),
|
||||
"Presentation attribute mappers should never attempt to set the same property twice");
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetIdentStringValue(nsCSSPropertyID aId,
|
||||
const nsString& aValue)
|
||||
{
|
||||
Servo_DeclarationBlock_SetIdentStringValue(mDecl, aId, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetKeywordValue(nsCSSPropertyID aId, int32_t aValue)
|
||||
{
|
||||
Servo_DeclarationBlock_SetKeywordValue(mDecl, aId, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetIntValue(nsCSSPropertyID aId, int32_t aValue)
|
||||
{
|
||||
Servo_DeclarationBlock_SetIntValue(mDecl, aId, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetPixelValue(nsCSSPropertyID aId, float aValue)
|
||||
{
|
||||
Servo_DeclarationBlock_SetPixelValue(mDecl, aId, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetPercentValue(nsCSSPropertyID aId, float aValue)
|
||||
{
|
||||
Servo_DeclarationBlock_SetPercentValue(mDecl, aId, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetAutoValue(nsCSSPropertyID aId)
|
||||
{
|
||||
Servo_DeclarationBlock_SetAutoValue(mDecl, aId);
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetCurrentColor(nsCSSPropertyID aId)
|
||||
{
|
||||
Servo_DeclarationBlock_SetCurrentColor(mDecl, aId);
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetColorValue(nsCSSPropertyID aId, nscolor aColor)
|
||||
{
|
||||
Servo_DeclarationBlock_SetColorValue(mDecl, aId, aColor);
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetFontFamily(const nsString& aValue)
|
||||
{
|
||||
Servo_DeclarationBlock_SetFontFamily(mDecl, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
ServoSpecifiedValues::SetTextDecorationColorOverride()
|
||||
{
|
||||
Servo_DeclarationBlock_SetTextDecorationColorOverride(mDecl);
|
||||
}
|
||||
|
@ -24,80 +24,81 @@ public:
|
||||
ServoSpecifiedValues(nsPresContext* aContext, RawServoDeclarationBlock* aDecl);
|
||||
|
||||
// GenericSpecifiedValues overrides
|
||||
bool PropertyIsSet(nsCSSPropertyID aId);
|
||||
bool PropertyIsSet(nsCSSPropertyID aId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void SetIdentStringValue(nsCSSPropertyID aId,
|
||||
const nsString& aValue);
|
||||
const nsString& aValue) {
|
||||
|
||||
}
|
||||
|
||||
void SetIdentStringValueIfUnset(nsCSSPropertyID aId,
|
||||
const nsString& aValue) {
|
||||
if (!PropertyIsSet(aId)) {
|
||||
SetIdentStringValue(aId, aValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SetKeywordValue(nsCSSPropertyID aId,
|
||||
int32_t aValue);
|
||||
int32_t aValue) {
|
||||
}
|
||||
|
||||
void SetKeywordValueIfUnset(nsCSSPropertyID aId,
|
||||
int32_t aValue) {
|
||||
if (!PropertyIsSet(aId)) {
|
||||
SetKeywordValue(aId, aValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void SetIntValue(nsCSSPropertyID aId,
|
||||
int32_t aValue);
|
||||
int32_t aValue) {
|
||||
}
|
||||
|
||||
void SetPixelValue(nsCSSPropertyID aId,
|
||||
float aValue);
|
||||
float aValue) {
|
||||
}
|
||||
|
||||
void SetPixelValueIfUnset(nsCSSPropertyID aId,
|
||||
float aValue) {
|
||||
if (!PropertyIsSet(aId)) {
|
||||
SetPixelValue(aId, aValue);
|
||||
}
|
||||
}
|
||||
|
||||
void SetPercentValue(nsCSSPropertyID aId,
|
||||
float aValue);
|
||||
float aValue) {
|
||||
}
|
||||
|
||||
void SetAutoValue(nsCSSPropertyID aId);
|
||||
void SetAutoValue(nsCSSPropertyID aId) {
|
||||
}
|
||||
|
||||
void SetAutoValueIfUnset(nsCSSPropertyID aId) {
|
||||
if (!PropertyIsSet(aId)) {
|
||||
SetAutoValue(aId);
|
||||
}
|
||||
}
|
||||
|
||||
void SetPercentValueIfUnset(nsCSSPropertyID aId,
|
||||
float aValue) {
|
||||
if (!PropertyIsSet(aId)) {
|
||||
SetPercentValue(aId, aValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SetCurrentColor(nsCSSPropertyID aId);
|
||||
void SetCurrentColor(nsCSSPropertyID aId) {
|
||||
|
||||
}
|
||||
|
||||
void SetCurrentColorIfUnset(nsCSSPropertyID aId) {
|
||||
if (!PropertyIsSet(aId)) {
|
||||
SetCurrentColor(aId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SetColorValue(nsCSSPropertyID aId,
|
||||
nscolor aValue);
|
||||
nscolor aValue) {
|
||||
|
||||
}
|
||||
|
||||
void SetColorValueIfUnset(nsCSSPropertyID aId,
|
||||
nscolor aValue) {
|
||||
if (!PropertyIsSet(aId)) {
|
||||
SetColorValue(aId, aValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SetFontFamily(const nsString& aValue);
|
||||
void SetTextDecorationColorOverride();
|
||||
void SetFontFamily(const nsString& aValue) {
|
||||
|
||||
}
|
||||
void SetTextDecorationColorOverride() {
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
RefPtr<RawServoDeclarationBlock> mDecl;
|
||||
|
Loading…
Reference in New Issue
Block a user