summaryrefslogtreecommitdiff
path: root/Source/WebCore/css
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-22 13:36:28 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-22 13:36:28 +0200
commitc311cf639cc1d6570d67b0a80a8ba04dc992a658 (patch)
tree6e16fefc7ece11ce4ec1e475a58a537a7acebaf8 /Source/WebCore/css
parent5ef7c8a6a70875d4430752d146bdcb069605d71d (diff)
downloadqtwebkit-c311cf639cc1d6570d67b0a80a8ba04dc992a658.tar.gz
Imported WebKit commit 35255d8c2fd37ba4359e75fe0ebe6aec87687f9c (http://svn.webkit.org/repository/webkit/trunk@126284)
New snapshot that includes MSVC 64-bit build fix
Diffstat (limited to 'Source/WebCore/css')
-rw-r--r--Source/WebCore/css/CSSCanvasValue.cpp2
-rw-r--r--Source/WebCore/css/CSSCharsetRule.cpp2
-rw-r--r--Source/WebCore/css/CSSFontFaceSrcValue.cpp4
-rw-r--r--Source/WebCore/css/CSSFunctionValue.cpp2
-rw-r--r--Source/WebCore/css/CSSImageSetValue.cpp2
-rw-r--r--Source/WebCore/css/CSSImageValue.cpp2
-rw-r--r--Source/WebCore/css/CSSParser.cpp14
-rw-r--r--Source/WebCore/css/CSSPrimitiveValue.cpp30
-rw-r--r--Source/WebCore/css/CSSStyleSheet.cpp2
-rw-r--r--Source/WebCore/css/CSSValue.cpp2
-rw-r--r--Source/WebCore/css/CSSVariableValue.h4
-rw-r--r--Source/WebCore/css/FontFeatureValue.cpp2
-rw-r--r--Source/WebCore/css/MediaQuery.cpp4
-rw-r--r--Source/WebCore/css/MediaQueryExp.cpp4
-rw-r--r--Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp70
-rw-r--r--Source/WebCore/css/StyleRuleImport.cpp2
-rw-r--r--Source/WebCore/css/StyleSheetContents.cpp4
-rw-r--r--Source/WebCore/css/WebKitCSSKeyframeRule.cpp2
-rw-r--r--Source/WebCore/css/WebKitCSSKeyframesRule.cpp2
-rw-r--r--Source/WebCore/css/WebKitCSSSVGDocumentValue.cpp2
-rw-r--r--Source/WebCore/css/WebKitCSSShaderValue.cpp2
-rw-r--r--Source/WebCore/css/html.css11
22 files changed, 115 insertions, 56 deletions
diff --git a/Source/WebCore/css/CSSCanvasValue.cpp b/Source/WebCore/css/CSSCanvasValue.cpp
index 4925b3938..63777bb4d 100644
--- a/Source/WebCore/css/CSSCanvasValue.cpp
+++ b/Source/WebCore/css/CSSCanvasValue.cpp
@@ -97,7 +97,7 @@ void CSSCanvasValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectI
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
CSSImageGeneratorValue::reportBaseClassMemoryUsage(memoryObjectInfo);
- info.addMember(m_name);
+ info.addInstrumentedMember(m_name);
info.addInstrumentedMember(m_element);
}
diff --git a/Source/WebCore/css/CSSCharsetRule.cpp b/Source/WebCore/css/CSSCharsetRule.cpp
index b7d201c86..a3c3e1b9a 100644
--- a/Source/WebCore/css/CSSCharsetRule.cpp
+++ b/Source/WebCore/css/CSSCharsetRule.cpp
@@ -40,7 +40,7 @@ void CSSCharsetRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectI
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
- info.addMember(m_encoding);
+ info.addInstrumentedMember(m_encoding);
}
} // namespace WebCore
diff --git a/Source/WebCore/css/CSSFontFaceSrcValue.cpp b/Source/WebCore/css/CSSFontFaceSrcValue.cpp
index a00115db1..db4eb9b36 100644
--- a/Source/WebCore/css/CSSFontFaceSrcValue.cpp
+++ b/Source/WebCore/css/CSSFontFaceSrcValue.cpp
@@ -100,8 +100,8 @@ CachedFont* CSSFontFaceSrcValue::cachedFont(Document* document)
void CSSFontFaceSrcValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_resource);
- info.addMember(m_format);
+ info.addInstrumentedMember(m_resource);
+ info.addInstrumentedMember(m_format);
// FIXME: add m_cachedFont when MemoryCache is instrumented.
#if ENABLE(SVG_FONTS)
info.addInstrumentedMember(m_svgFontFaceElement);
diff --git a/Source/WebCore/css/CSSFunctionValue.cpp b/Source/WebCore/css/CSSFunctionValue.cpp
index 628a989ba..9f8f24f30 100644
--- a/Source/WebCore/css/CSSFunctionValue.cpp
+++ b/Source/WebCore/css/CSSFunctionValue.cpp
@@ -53,7 +53,7 @@ String CSSFunctionValue::customCssText() const
void CSSFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_name);
+ info.addInstrumentedMember(m_name);
info.addInstrumentedMember(m_args);
}
diff --git a/Source/WebCore/css/CSSImageSetValue.cpp b/Source/WebCore/css/CSSImageSetValue.cpp
index c3163f55c..28451a254 100644
--- a/Source/WebCore/css/CSSImageSetValue.cpp
+++ b/Source/WebCore/css/CSSImageSetValue.cpp
@@ -174,7 +174,7 @@ void CSSImageSetValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjec
void CSSImageSetValue::ImageWithScale::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(imageURL);
+ info.addInstrumentedMember(imageURL);
}
} // namespace WebCore
diff --git a/Source/WebCore/css/CSSImageValue.cpp b/Source/WebCore/css/CSSImageValue.cpp
index 542192d5d..b7f4d73cd 100644
--- a/Source/WebCore/css/CSSImageValue.cpp
+++ b/Source/WebCore/css/CSSImageValue.cpp
@@ -129,7 +129,7 @@ PassRefPtr<CSSValue> CSSImageValue::cloneForCSSOM() const
void CSSImageValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_url);
+ info.addInstrumentedMember(m_url);
// No need to report m_image as it is counted as part of RenderArena.
}
diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp
index 4a2e38bb9..ec0f1c204 100644
--- a/Source/WebCore/css/CSSParser.cpp
+++ b/Source/WebCore/css/CSSParser.cpp
@@ -62,6 +62,7 @@
#include "FontValue.h"
#include "HTMLParserIdioms.h"
#include "HashTools.h"
+#include "HistogramSupport.h"
#include "MediaList.h"
#include "MediaQueryExp.h"
#include "Page.h"
@@ -5335,7 +5336,7 @@ static inline bool parseAlphaValue(const UChar*& string, const UChar* end, const
if (length < 2)
return false;
- if (string[length - 1] != terminator)
+ if (string[length - 1] != terminator || !isASCIIDigit(string[length - 2]))
return false;
if (string[0] != '0' && string[0] != '1' && string[0] != '.') {
@@ -10124,7 +10125,16 @@ static CSSPropertyID cssPropertyID(const UChar* propertyName, unsigned length)
}
const Property* hashTableEntry = findProperty(name, length);
- return hashTableEntry ? static_cast<CSSPropertyID>(hashTableEntry->id) : CSSPropertyInvalid;
+ const CSSPropertyID propertyID = hashTableEntry ? static_cast<CSSPropertyID>(hashTableEntry->id) : CSSPropertyInvalid;
+
+ // 600 is comfortably larger than numCSSProperties to allow for growth
+ static const int CSSPropertyHistogramSize = 600;
+ COMPILE_ASSERT(CSSPropertyHistogramSize > numCSSProperties, number_of_css_properties_exceed_CSSPropertyHistogramSize);
+
+ if (hasPrefix(buffer, length, "-webkit-") && propertyID != CSSPropertyInvalid)
+ HistogramSupport::histogramEnumeration("CSS.PrefixUsage", max(1, propertyID - firstCSSProperty), CSSPropertyHistogramSize);
+
+ return propertyID;
}
CSSPropertyID cssPropertyID(const String& string)
diff --git a/Source/WebCore/css/CSSPrimitiveValue.cpp b/Source/WebCore/css/CSSPrimitiveValue.cpp
index bbd6700d3..7d1ca2974 100644
--- a/Source/WebCore/css/CSSPrimitiveValue.cpp
+++ b/Source/WebCore/css/CSSPrimitiveValue.cpp
@@ -1,6 +1,6 @@
/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -1001,32 +1001,32 @@ String CSSPrimitiveValue::customCssText() const
}
case CSS_RGBCOLOR:
case CSS_PARSER_HEXCOLOR: {
- DEFINE_STATIC_LOCAL(const String, commaSpace, (", "));
- DEFINE_STATIC_LOCAL(const String, rgbParen, ("rgb("));
- DEFINE_STATIC_LOCAL(const String, rgbaParen, ("rgba("));
-
RGBA32 rgbColor = m_value.rgbcolor;
if (m_primitiveUnitType == CSS_PARSER_HEXCOLOR)
Color::parseHexColor(m_value.string, rgbColor);
Color color(rgbColor);
- Vector<UChar> result;
+ Vector<LChar> result;
result.reserveInitialCapacity(32);
- if (color.hasAlpha())
- append(result, rgbaParen);
+ bool colorHasAlpha = color.hasAlpha();
+ if (colorHasAlpha)
+ result.append("rgba(", 5);
else
- append(result, rgbParen);
+ result.append("rgb(", 4);
appendNumber(result, static_cast<unsigned char>(color.red()));
- append(result, commaSpace);
+ result.append(", ", 2);
appendNumber(result, static_cast<unsigned char>(color.green()));
- append(result, commaSpace);
+ result.append(", ", 2);
appendNumber(result, static_cast<unsigned char>(color.blue()));
- if (color.hasAlpha()) {
- append(result, commaSpace);
- append(result, String::number(color.alpha() / 255.0f));
+ if (colorHasAlpha) {
+ result.append(", ", 2);
+
+ NumberToStringBuffer buffer;
+ const char* alphaString = numberToFixedPrecisionString(color.alpha() / 255.0f, 6, buffer, true);
+ result.append(alphaString, strlen(alphaString));
}
result.append(')');
@@ -1252,7 +1252,7 @@ void CSSPrimitiveValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObje
case CSS_VARIABLE_NAME:
#endif
// FIXME: detect other cases when m_value is StringImpl*
- info.addMember(m_value.string);
+ info.addInstrumentedMember(m_value.string);
break;
case CSS_COUNTER:
info.addMember(m_value.counter);
diff --git a/Source/WebCore/css/CSSStyleSheet.cpp b/Source/WebCore/css/CSSStyleSheet.cpp
index f16f8bbb3..ec0ebe6fa 100644
--- a/Source/WebCore/css/CSSStyleSheet.cpp
+++ b/Source/WebCore/css/CSSStyleSheet.cpp
@@ -181,7 +181,7 @@ void CSSStyleSheet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
info.addInstrumentedMember(m_contents);
- info.addMember(m_title);
+ info.addInstrumentedMember(m_title);
info.addInstrumentedMember(m_mediaQueries);
info.addInstrumentedMember(m_ownerNode);
info.addInstrumentedMember(m_ownerRule);
diff --git a/Source/WebCore/css/CSSValue.cpp b/Source/WebCore/css/CSSValue.cpp
index da1ac3314..ee0a18cf5 100644
--- a/Source/WebCore/css/CSSValue.cpp
+++ b/Source/WebCore/css/CSSValue.cpp
@@ -82,7 +82,7 @@ public:
void reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_cssText);
+ info.addInstrumentedMember(m_cssText);
}
private:
diff --git a/Source/WebCore/css/CSSVariableValue.h b/Source/WebCore/css/CSSVariableValue.h
index e0b97d3ff..3020e1e1b 100644
--- a/Source/WebCore/css/CSSVariableValue.h
+++ b/Source/WebCore/css/CSSVariableValue.h
@@ -51,8 +51,8 @@ public:
void reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_name);
- info.addMember(m_value);
+ info.addInstrumentedMember(m_name);
+ info.addInstrumentedMember(m_value);
}
private:
diff --git a/Source/WebCore/css/FontFeatureValue.cpp b/Source/WebCore/css/FontFeatureValue.cpp
index 491b192e6..413eaa4a2 100644
--- a/Source/WebCore/css/FontFeatureValue.cpp
+++ b/Source/WebCore/css/FontFeatureValue.cpp
@@ -53,7 +53,7 @@ String FontFeatureValue::customCssText() const
void FontFeatureValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_tag);
+ info.addInstrumentedMember(m_tag);
}
}
diff --git a/Source/WebCore/css/MediaQuery.cpp b/Source/WebCore/css/MediaQuery.cpp
index 1aabd69d4..44c32c142 100644
--- a/Source/WebCore/css/MediaQuery.cpp
+++ b/Source/WebCore/css/MediaQuery.cpp
@@ -137,9 +137,9 @@ String MediaQuery::cssText() const
void MediaQuery::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_mediaType);
+ info.addInstrumentedMember(m_mediaType);
info.addInstrumentedVectorPtr(m_expressions);
- info.addMember(m_serializationCache);
+ info.addInstrumentedMember(m_serializationCache);
}
} //namespace
diff --git a/Source/WebCore/css/MediaQueryExp.cpp b/Source/WebCore/css/MediaQueryExp.cpp
index 3c778956c..4b91997d7 100644
--- a/Source/WebCore/css/MediaQueryExp.cpp
+++ b/Source/WebCore/css/MediaQueryExp.cpp
@@ -112,8 +112,8 @@ String MediaQueryExp::serialize() const
void MediaQueryExp::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_mediaFeature);
- info.addMember(m_serializationCache);
+ info.addInstrumentedMember(m_mediaFeature);
+ info.addInstrumentedMember(m_serializationCache);
info.addInstrumentedMember(m_value);
}
diff --git a/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp b/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
index dee9ad345..5fc2d3803 100644
--- a/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
+++ b/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
@@ -31,6 +31,7 @@
#include "MutationRecord.h"
#include "StylePropertySet.h"
#include "StyledElement.h"
+#include "UndoManager.h"
using namespace std;
@@ -53,15 +54,38 @@ public:
ASSERT(!s_currentDecl);
s_currentDecl = decl;
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
if (!s_currentDecl->parentElement())
return;
+
+ bool shouldReadOldValue = false;
+
+#if ENABLE(MUTATION_OBSERVERS)
m_mutationRecipients = MutationObserverInterestGroup::createForAttributesMutation(s_currentDecl->parentElement(), HTMLNames::styleAttr);
- if (!m_mutationRecipients)
- return;
+ if (m_mutationRecipients && m_mutationRecipients->isOldValueRequested())
+ shouldReadOldValue = true;
+#endif
+#if ENABLE(UNDO_MANAGER)
+ m_isRecordingAutomaticTransaction = UndoManager::isRecordingAutomaticTransaction(s_currentDecl->parentElement());
+ if (m_isRecordingAutomaticTransaction)
+ shouldReadOldValue = true;
+#endif
+
+ AtomicString oldValue;
+ if (shouldReadOldValue)
+ oldValue = s_currentDecl->parentElement()->getAttribute(HTMLNames::styleAttr);
+
+#if ENABLE(MUTATION_OBSERVERS)
+ if (m_mutationRecipients) {
+ AtomicString requestedOldValue = m_mutationRecipients->isOldValueRequested() ? oldValue : nullAtom;
+ m_mutation = MutationRecord::createAttributes(s_currentDecl->parentElement(), HTMLNames::styleAttr, requestedOldValue);
+ }
+#endif
+#if ENABLE(UNDO_MANAGER)
+ if (m_isRecordingAutomaticTransaction)
+ m_oldValue = oldValue;
+#endif
- AtomicString oldValue = m_mutationRecipients->isOldValueRequested() ? s_currentDecl->parentElement()->getAttribute(HTMLNames::styleAttr) : nullAtom;
- m_mutation = MutationRecord::createAttributes(s_currentDecl->parentElement(), HTMLNames::styleAttr, oldValue);
#endif
}
@@ -74,6 +98,14 @@ public:
#if ENABLE(MUTATION_OBSERVERS)
if (m_mutation && s_shouldDeliver)
m_mutationRecipients->enqueueMutationRecord(m_mutation);
+#endif
+#if ENABLE(UNDO_MANAGER)
+ if (m_isRecordingAutomaticTransaction && s_shouldDeliver) {
+ UndoManager::addTransactionStep(AttrChangingDOMTransactionStep::create(
+ s_currentDecl->parentElement(), HTMLNames::styleAttr, m_oldValue, s_currentDecl->parentElement()->getAttribute(HTMLNames::styleAttr)));
+ }
+#endif
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
s_shouldDeliver = false;
#endif
if (!s_shouldNotifyInspector) {
@@ -88,7 +120,7 @@ public:
InspectorInstrumentation::didInvalidateStyleAttr(localCopyStyleDecl->parentElement()->document(), localCopyStyleDecl->parentElement());
}
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
void enqueueMutationRecord()
{
s_shouldDeliver = true;
@@ -104,18 +136,24 @@ private:
static unsigned s_scopeCount;
static PropertySetCSSStyleDeclaration* s_currentDecl;
static bool s_shouldNotifyInspector;
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
static bool s_shouldDeliver;
+#endif
+#if ENABLE(MUTATION_OBSERVERS)
OwnPtr<MutationObserverInterestGroup> m_mutationRecipients;
RefPtr<MutationRecord> m_mutation;
#endif
+#if ENABLE(UNDO_MANAGER)
+ bool m_isRecordingAutomaticTransaction;
+ AtomicString m_oldValue;
+#endif
};
unsigned StyleAttributeMutationScope::s_scopeCount = 0;
PropertySetCSSStyleDeclaration* StyleAttributeMutationScope::s_currentDecl = 0;
bool StyleAttributeMutationScope::s_shouldNotifyInspector = false;
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
bool StyleAttributeMutationScope::s_shouldDeliver = false;
#endif
@@ -158,7 +196,7 @@ String PropertySetCSSStyleDeclaration::cssText() const
void PropertySetCSSStyleDeclaration::setCssText(const String& text, ExceptionCode& ec)
{
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
StyleAttributeMutationScope mutationScope(this);
#endif
willMutate();
@@ -169,7 +207,7 @@ void PropertySetCSSStyleDeclaration::setCssText(const String& text, ExceptionCod
didMutate(PropertyChanged);
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
mutationScope.enqueueMutationRecord();
#endif
}
@@ -219,7 +257,7 @@ bool PropertySetCSSStyleDeclaration::isPropertyImplicit(const String& propertyNa
void PropertySetCSSStyleDeclaration::setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode& ec)
{
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
StyleAttributeMutationScope mutationScope(this);
#endif
CSSPropertyID propertyID = cssPropertyID(propertyName);
@@ -238,7 +276,7 @@ void PropertySetCSSStyleDeclaration::setProperty(const String& propertyName, con
if (changed) {
// CSS DOM requires raising SYNTAX_ERR of parsing failed, but this is too dangerous for compatibility,
// see <http://bugs.webkit.org/show_bug.cgi?id=7296>.
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
mutationScope.enqueueMutationRecord();
#endif
}
@@ -246,7 +284,7 @@ void PropertySetCSSStyleDeclaration::setProperty(const String& propertyName, con
String PropertySetCSSStyleDeclaration::removeProperty(const String& propertyName, ExceptionCode& ec)
{
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
StyleAttributeMutationScope mutationScope(this);
#endif
CSSPropertyID propertyID = cssPropertyID(propertyName);
@@ -262,7 +300,7 @@ String PropertySetCSSStyleDeclaration::removeProperty(const String& propertyName
didMutate(changed ? PropertyChanged : NoChanges);
if (changed) {
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
mutationScope.enqueueMutationRecord();
#endif
}
@@ -281,7 +319,7 @@ String PropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPropertyID pr
void PropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID propertyID, const String& value, bool important, ExceptionCode& ec)
{
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
StyleAttributeMutationScope mutationScope(this);
#endif
willMutate();
@@ -292,7 +330,7 @@ void PropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID propertyI
didMutate(changed ? PropertyChanged : NoChanges);
if (changed) {
-#if ENABLE(MUTATION_OBSERVERS)
+#if ENABLE(MUTATION_OBSERVERS) || ENABLE(UNDO_MANAGER)
mutationScope.enqueueMutationRecord();
#endif
}
diff --git a/Source/WebCore/css/StyleRuleImport.cpp b/Source/WebCore/css/StyleRuleImport.cpp
index 24942521d..382313e67 100644
--- a/Source/WebCore/css/StyleRuleImport.cpp
+++ b/Source/WebCore/css/StyleRuleImport.cpp
@@ -134,7 +134,7 @@ void StyleRuleImport::requestStyleSheet()
void StyleRuleImport::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_strHref);
+ info.addInstrumentedMember(m_strHref);
info.addInstrumentedMember(m_mediaQueries);
info.addInstrumentedMember(m_styleSheet);
}
diff --git a/Source/WebCore/css/StyleSheetContents.cpp b/Source/WebCore/css/StyleSheetContents.cpp
index 96b4e54fa..cc3cec52a 100644
--- a/Source/WebCore/css/StyleSheetContents.cpp
+++ b/Source/WebCore/css/StyleSheetContents.cpp
@@ -486,8 +486,8 @@ void StyleSheetContents::removedFromMemoryCache()
void StyleSheetContents::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_originalURL);
- info.addMember(m_encodingFromCharsetRule);
+ info.addInstrumentedMember(m_originalURL);
+ info.addInstrumentedMember(m_encodingFromCharsetRule);
info.addVector(m_importRules);
info.addInstrumentedVector(m_childRules);
info.addHashMap(m_namespaces);
diff --git a/Source/WebCore/css/WebKitCSSKeyframeRule.cpp b/Source/WebCore/css/WebKitCSSKeyframeRule.cpp
index 5c093022c..80069326f 100644
--- a/Source/WebCore/css/WebKitCSSKeyframeRule.cpp
+++ b/Source/WebCore/css/WebKitCSSKeyframeRule.cpp
@@ -90,7 +90,7 @@ void StyleKeyframe::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
info.addInstrumentedMember(m_properties);
- info.addMember(m_key);
+ info.addInstrumentedMember(m_key);
}
WebKitCSSKeyframeRule::WebKitCSSKeyframeRule(StyleKeyframe* keyframe, WebKitCSSKeyframesRule* parent)
diff --git a/Source/WebCore/css/WebKitCSSKeyframesRule.cpp b/Source/WebCore/css/WebKitCSSKeyframesRule.cpp
index 383068da6..ca47f79bd 100644
--- a/Source/WebCore/css/WebKitCSSKeyframesRule.cpp
+++ b/Source/WebCore/css/WebKitCSSKeyframesRule.cpp
@@ -91,7 +91,7 @@ void StyleRuleKeyframes::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObj
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
info.addInstrumentedVector(m_keyframes);
- info.addMember(m_name);
+ info.addInstrumentedMember(m_name);
}
WebKitCSSKeyframesRule::WebKitCSSKeyframesRule(StyleRuleKeyframes* keyframesRule, CSSStyleSheet* parent)
diff --git a/Source/WebCore/css/WebKitCSSSVGDocumentValue.cpp b/Source/WebCore/css/WebKitCSSSVGDocumentValue.cpp
index 3e16bbd32..d2fbdf18c 100644
--- a/Source/WebCore/css/WebKitCSSSVGDocumentValue.cpp
+++ b/Source/WebCore/css/WebKitCSSSVGDocumentValue.cpp
@@ -67,7 +67,7 @@ String WebKitCSSSVGDocumentValue::customCssText() const
void WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_url);
+ info.addInstrumentedMember(m_url);
// FIXME: add m_document when cached resources are instrumented.
}
diff --git a/Source/WebCore/css/WebKitCSSShaderValue.cpp b/Source/WebCore/css/WebKitCSSShaderValue.cpp
index 482a36089..b89b1834e 100644
--- a/Source/WebCore/css/WebKitCSSShaderValue.cpp
+++ b/Source/WebCore/css/WebKitCSSShaderValue.cpp
@@ -83,7 +83,7 @@ String WebKitCSSShaderValue::customCssText() const
void WebKitCSSShaderValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
- info.addMember(m_url);
+ info.addInstrumentedMember(m_url);
}
} // namespace WebCore
diff --git a/Source/WebCore/css/html.css b/Source/WebCore/css/html.css
index d60ca0ed5..c213d38d6 100644
--- a/Source/WebCore/css/html.css
+++ b/Source/WebCore/css/html.css
@@ -530,6 +530,17 @@ input::-webkit-datetime-edit-second-field {
padding: 0.15em;
}
+/* Remove focus ring from fields and use highlight color */
+input::-webkit-datetime-edit-ampm-field:focus,
+input::-webkit-datetime-edit-hour-field:focus,
+input::-webkit-datetime-edit-millisecond-fiel:focus,
+input::-webkit-datetime-edit-minute-field:focus,
+input::-webkit-datetime-edit-second-field:focus {
+ background-color: highlight;
+ color: highlighttext;
+ outline: none;
+}
+
/* This selector is used when step >= 60 second but format contains second field. */
input::-webkit-datetime-edit-second-field[readonly] {
color: GrayText;