Diff
Modified: trunk/Source/WebCore/ChangeLog (101065 => 101066)
--- trunk/Source/WebCore/ChangeLog 2011-11-23 12:16:13 UTC (rev 101065)
+++ trunk/Source/WebCore/ChangeLog 2011-11-23 12:19:33 UTC (rev 101066)
@@ -1,3 +1,27 @@
+2011-11-23 Rafael Weinstein <[email protected]>
+
+ Remove notifyChange from the public interface of CSSMutableStyleDeclaration
+ https://bugs.webkit.org/show_bug.cgi?id=72660
+
+ Reviewed by Ojan Vafai.
+
+ No tests needed. This is only a refactor.
+
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
+ (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
+ * css/CSSMutableStyleDeclaration.h:
+ (WebCore::CSSMutableStyleDeclaration::setProperty):
+ (WebCore::CSSMutableStyleDeclaration::removeProperty):
+ (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::leftToRightDeclaration):
+ (WebCore::rightToLeftDeclaration):
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::setContentEditable):
+
2011-11-23 Scott Graham <[email protected]>
Adding gamepad support
Modified: trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp (101065 => 101066)
--- trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp 2011-11-23 12:16:13 UTC (rev 101065)
+++ trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp 2011-11-23 12:19:33 UTC (rev 101066)
@@ -77,7 +77,7 @@
if (candidates.contains(property->id())) {
if (!important && candidates.get(property->id()))
continue;
- removeProperty(property->id(), false);
+ removeProperty(property->id(), false, false);
}
m_properties.append(*property);
candidates.set(property->id(), important);
@@ -692,7 +692,7 @@
// Only add properties that have no !important counterpart present
if (!getPropertyPriority(property.id()) || property.isImportant()) {
- removeProperty(property.id(), false);
+ removeProperty(property.id(), false, false);
m_properties.append(property);
}
}
Modified: trunk/Source/WebCore/css/CSSMutableStyleDeclaration.h (101065 => 101066)
--- trunk/Source/WebCore/css/CSSMutableStyleDeclaration.h 2011-11-23 12:16:13 UTC (rev 101065)
+++ trunk/Source/WebCore/css/CSSMutableStyleDeclaration.h 2011-11-23 12:19:33 UTC (rev 101066)
@@ -106,11 +106,11 @@
virtual PassRefPtr<CSSMutableStyleDeclaration> copy() const;
- bool setProperty(int propertyID, int value, bool important = false, bool notifyChanged = true);
- bool setProperty(int propertyId, double value, CSSPrimitiveValue::UnitTypes, bool important = false, bool notifyChanged = true);
- bool setProperty(int propertyID, const String& value, bool important = false, bool notifyChanged = true);
+ bool setProperty(int propertyID, int value, bool important = false) { return setProperty(propertyID, value, important, true); }
+ bool setProperty(int propertyId, double value, CSSPrimitiveValue::UnitTypes unit, bool important = false) { return setProperty(propertyId, value, unit, important, true); }
+ bool setProperty(int propertyID, const String& value, bool important = false) { return setProperty(propertyID, value, important, true); }
- String removeProperty(int propertyID, bool notifyChanged = true, bool returnText = false);
+ void removeProperty(int propertyID) { removeProperty(propertyID, true, false); }
// setLengthProperty treats integers as pixels! (Needed for conversion of HTML attributes.)
void setLengthProperty(int propertyId, const String& value, bool important, bool multiLength = false);
@@ -128,7 +128,7 @@
PassRefPtr<CSSMutableStyleDeclaration> copyBlockProperties() const;
void removeBlockProperties();
- void removePropertiesInSet(const int* set, unsigned length, bool notifyChanged = true);
+ void removePropertiesInSet(const int* set, unsigned length) { removePropertiesInSet(set, length, true); }
void merge(const CSSMutableStyleDeclaration*, bool argOverridesOnConflict = true);
@@ -165,8 +165,13 @@
template<size_t size> String getCommonValue(const int (&properties)[size]) const { return getCommonValue(properties, size); }
template<size_t size> String getLayeredShorthandValue(const int (&properties)[size]) const { return getLayeredShorthandValue(properties, size); }
+ bool setProperty(int propertyID, int value, bool important, bool notifyChanged);
+ bool setProperty(int propertyId, double value, CSSPrimitiveValue::UnitTypes, bool important, bool notifyChanged);
+ bool setProperty(int propertyID, const String& value, bool important, bool notifyChanged);
void setPropertyInternal(const CSSProperty&, CSSProperty* slot = 0);
+ String removeProperty(int propertyID, bool notifyChanged, bool returnText);
bool removeShorthandProperty(int propertyID, bool notifyChanged);
+ void removePropertiesInSet(const int* set, unsigned length, bool notifyChanged);
Vector<CSSProperty>::const_iterator findPropertyWithId(int propertyId) const;
Vector<CSSProperty>::iterator findPropertyWithId(int propertyId);
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (101065 => 101066)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-11-23 12:16:13 UTC (rev 101065)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-11-23 12:19:33 UTC (rev 101066)
@@ -326,7 +326,7 @@
{
DEFINE_STATIC_LOCAL(RefPtr<CSSMutableStyleDeclaration>, leftToRightDecl, (CSSMutableStyleDeclaration::create()));
if (!leftToRightDecl->length()) {
- leftToRightDecl->setProperty(CSSPropertyDirection, "ltr", false, false);
+ leftToRightDecl->setProperty(CSSPropertyDirection, "ltr", false);
leftToRightDecl->setStrictParsing(false);
}
return leftToRightDecl.get();
@@ -336,7 +336,7 @@
{
DEFINE_STATIC_LOCAL(RefPtr<CSSMutableStyleDeclaration>, rightToLeftDecl, (CSSMutableStyleDeclaration::create()));
if (!rightToLeftDecl->length()) {
- rightToLeftDecl->setProperty(CSSPropertyDirection, "rtl", false, false);
+ rightToLeftDecl->setProperty(CSSPropertyDirection, "rtl", false);
rightToLeftDecl->setStrictParsing(false);
}
return rightToLeftDecl.get();
Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (101065 => 101066)
--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp 2011-11-23 12:16:13 UTC (rev 101065)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp 2011-11-23 12:19:33 UTC (rev 101066)
@@ -390,11 +390,11 @@
float desiredFontSize = max(MinimumFontSize, startingFontSizes.get(node) + style->fontSizeDelta());
RefPtr<CSSValue> value = inlineStyleDecl->getPropertyCSSValue(CSSPropertyFontSize);
if (value) {
- inlineStyleDecl->removeProperty(CSSPropertyFontSize, true);
+ inlineStyleDecl->removeProperty(CSSPropertyFontSize);
currentFontSize = computedFontSize(node);
}
if (currentFontSize != desiredFontSize) {
- inlineStyleDecl->setProperty(CSSPropertyFontSize, String::number(desiredFontSize) + "px", false, false);
+ inlineStyleDecl->setProperty(CSSPropertyFontSize, String::number(desiredFontSize) + "px", false);
setNodeAttribute(element.get(), styleAttr, inlineStyleDecl->cssText());
}
if (inlineStyleDecl->isEmpty()) {
Modified: trunk/Source/WebCore/html/HTMLElement.cpp (101065 => 101066)
--- trunk/Source/WebCore/html/HTMLElement.cpp 2011-11-23 12:16:13 UTC (rev 101065)
+++ trunk/Source/WebCore/html/HTMLElement.cpp 2011-11-23 12:19:33 UTC (rev 101066)
@@ -723,9 +723,9 @@
addCSSProperty(attr, CSSPropertyWebkitLineBreak, CSSValueAfterWhiteSpace);
} else if (equalIgnoringCase(enabled, "false")) {
addCSSProperty(attr, CSSPropertyWebkitUserModify, CSSValueReadOnly);
- attr->decl()->removeProperty(CSSPropertyWordWrap, false);
- attr->decl()->removeProperty(CSSPropertyWebkitNbspMode, false);
- attr->decl()->removeProperty(CSSPropertyWebkitLineBreak, false);
+ attr->decl()->removeProperty(CSSPropertyWordWrap);
+ attr->decl()->removeProperty(CSSPropertyWebkitNbspMode);
+ attr->decl()->removeProperty(CSSPropertyWebkitLineBreak);
} else if (equalIgnoringCase(enabled, "plaintext-only")) {
addCSSProperty(attr, CSSPropertyWebkitUserModify, CSSValueReadWritePlaintextOnly);
addCSSProperty(attr, CSSPropertyWordWrap, CSSValueBreakWord);