Diff
Modified: trunk/LayoutTests/ChangeLog (102574 => 102575)
--- trunk/LayoutTests/ChangeLog 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/LayoutTests/ChangeLog 2011-12-12 14:06:39 UTC (rev 102575)
@@ -1,3 +1,14 @@
+2011-12-12 Alexander Pavlov <[email protected]>
+
+ Unreviewed, build fix.
+
+ Revert r102570 which broke SnowLeopard builders.
+
+ * fast/css/style-enumerate-properties-expected.txt: Removed.
+ * fast/css/style-enumerate-properties.html: Removed.
+ * fast/dom/domListEnumeration-expected.txt:
+ * fast/dom/script-tests/domListEnumeration.js:
+
2011-11-30 Alexander Pavlov <[email protected]>
WebKit does not enumerate over CSS properties in HTMLElement.style
Deleted: trunk/LayoutTests/fast/css/style-enumerate-properties-expected.txt (102574 => 102575)
--- trunk/LayoutTests/fast/css/style-enumerate-properties-expected.txt 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/LayoutTests/fast/css/style-enumerate-properties-expected.txt 2011-12-12 14:06:39 UTC (rev 102575)
@@ -1,15 +0,0 @@
-This test makes sure that CSSStyleDeclaration enumerates _javascript_ properties for defined and non-defined CSS properties, indexed properties, and properties defined on the prototype. See Bug 23946.
-PASS document.body.style.length is 2
-PASS '0' in document.body.style is true
-PASS '1' in document.body.style is true
-PASS 'textDecoration' in document.body.style is true
-PASS 'borderTopColor' in document.body.style is true
-PASS 'border' in document.body.style is true
-PASS 'font' in document.body.style is true
-PASS 'cssText' in document.body.style is true
-PASS 'getPropertyCSSValue' in document.body.style is true
-PASS The CSS property order is correct
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/css/style-enumerate-properties.html (102574 => 102575)
--- trunk/LayoutTests/fast/css/style-enumerate-properties.html 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/LayoutTests/fast/css/style-enumerate-properties.html 2011-12-12 14:06:39 UTC (rev 102575)
@@ -1,46 +0,0 @@
-<head>
- <script src=""
- <script>
- if (window.layoutTestController)
- layoutTestController.dumpAsText();
-
-
- </script>
-</head>
-<body style="text-decoration: underline; border-top-color: green">
- <div id="description">This test makes sure that CSSStyleDeclaration enumerates _javascript_ properties for defined and non-defined CSS properties, indexed properties, and properties defined on the prototype. See <a href="" 23946</a>.</div>
- <div id="console"></div>
- <script>
- shouldBe("document.body.style.length", "2");
- shouldBeTrue("'0' in document.body.style");
- shouldBeTrue("'1' in document.body.style");
- shouldBeTrue("'textDecoration' in document.body.style");
- shouldBeTrue("'borderTopColor' in document.body.style");
- shouldBeTrue("'border' in document.body.style");
- shouldBeTrue("'font' in document.body.style");
- shouldBeTrue("'cssText' in document.body.style");
- shouldBeTrue("'getPropertyCSSValue' in document.body.style");
-
- // Test CSS property order.
- var started;
- var cssPropertyCount = 0;
- var previous;
- for (var p in document.body.style) {
- if (p === "alignmentBaseline")
- started = true;
- if (!started)
- continue;
- if (previous && previous >= p) {
- testFailed("Invalid CSS-mapped property order: '" + p + "' after '" + previous + "'");
- break;
- }
- if (++cssPropertyCount <= 100)
- previous = p;
- else {
- testPassed("The CSS property order is correct");
- break;
- }
- }
- </script>
- <script src=""
-</body>
Modified: trunk/LayoutTests/fast/dom/domListEnumeration-expected.txt (102574 => 102575)
--- trunk/LayoutTests/fast/dom/domListEnumeration-expected.txt 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/LayoutTests/fast/dom/domListEnumeration-expected.txt 2011-12-12 14:06:39 UTC (rev 102575)
@@ -66,6 +66,7 @@
PASS resultArray[2].item is cssRuleList.item(2)
[object CSSStyleDeclaration]
+PASS resultArray.length is 14
PASS resultArray[0].i is '0'
PASS resultArray[0].item is cssStyleDeclaration.item(0)
PASS resultArray[1].i is '1'
Modified: trunk/LayoutTests/fast/dom/script-tests/domListEnumeration.js (102574 => 102575)
--- trunk/LayoutTests/fast/dom/script-tests/domListEnumeration.js 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/LayoutTests/fast/dom/script-tests/domListEnumeration.js 2011-12-12 14:06:39 UTC (rev 102575)
@@ -173,6 +173,7 @@
//debug(escapeHTML(document.getElementsByTagName('style')));
var cssStyleDeclaration = document.styleSheets[2].cssRules[0].style;
resultArray = iterateList(cssStyleDeclaration);
+shouldBe("resultArray.length", "14");
shouldBe("resultArray[0].i", "'0'");
shouldBe("resultArray[0].item", "cssStyleDeclaration.item(0)");
shouldBe("resultArray[1].i", "'1'");
Modified: trunk/Source/_javascript_Core/ChangeLog (102574 => 102575)
--- trunk/Source/_javascript_Core/ChangeLog 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-12-12 14:06:39 UTC (rev 102575)
@@ -1,3 +1,13 @@
+2011-12-12 Alexander Pavlov <[email protected]>
+
+ Unreviewed, build fix.
+
+ Revert r102570 which broke SnowLeopard builders.
+
+ * _javascript_Core.exp:
+ * _javascript_Core.vcproj/_javascript_Core/_javascript_Core.def:
+ * wtf/text/WTFString.h:
+
2011-12-09 Alexander Pavlov <[email protected]>
WebKit does not enumerate over CSS properties in HTMLElement.style
Modified: trunk/Source/_javascript_Core/_javascript_Core.exp (102574 => 102575)
--- trunk/Source/_javascript_Core/_javascript_Core.exp 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/Source/_javascript_Core/_javascript_Core.exp 2011-12-12 14:06:39 UTC (rev 102575)
@@ -155,7 +155,6 @@
__ZN3JSC12RegExpObjectC1EPNS_14JSGlobalObjectEPNS_9StructureEPNS_6RegExpE
__ZN3JSC12SamplingTool5setupEv
__ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE
-__ZN3JSC12SmallStrings24singleCharacterStringRepEh
__ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh
__ZN3JSC12StringObject14finishCreationERNS_12JSGlobalDataEPNS_8JSStringE
__ZN3JSC12StringObject6s_infoE
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def (102574 => 102575)
--- trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def 2011-12-12 14:06:39 UTC (rev 102575)
@@ -53,7 +53,6 @@
?activityCallback@Heap@JSC@@QAEPAVGCActivityCallback@2@XZ
?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBD@Z
?add@Identifier@JSC@@SA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVExecState@2@PBD@Z
- ?add@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVJSGlobalData@2@PAVStringImpl@4@@Z
?add@PropertyNameArray@JSC@@QAEXPAVStringImpl@WTF@@@Z
?addBytes@MD5@WTF@@QAEXPBEI@Z
?addBytes@SHA1@WTF@@QAEXPBEI@Z
@@ -63,7 +62,6 @@
?addPropertyTransitionToExistingStructure@Structure@JSC@@SAPAV12@PAV12@ABVIdentifier@2@IPAVJSCell@2@AAI@Z
?addPropertyWithoutTransition@Structure@JSC@@QAEIAAVJSGlobalData@2@ABVIdentifier@2@IPAVJSCell@2@@Z
?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVExecState@2@PAVStringImpl@4@@Z
- ?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVJSGlobalData@2@PAVStringImpl@4@@Z
?addStaticGlobals@JSGlobalObject@JSC@@IAEXPAUGlobalPropertyInfo@12@H@Z
?allocatePropertyStorage@JSObject@JSC@@QAEXAAVJSGlobalData@2@II@Z
?allocateSlowCase@AllocationSpace@JSC@@AAEPAXAAUSizeClass@MarkedSpace@2@@Z
@@ -133,7 +131,7 @@
?currentThread@WTF@@YAIXZ
?currentThreadIsHoldingLock@JSLock@JSC@@SA_NXZ
?currentTime@WTF@@YANXZ
- ?execute@ParallelEnvironment@WTF@@QAEXPAX@Z
+ ?execute@ParallelEnvironment@WTF@@QAEXPAX@Z
?data@CString@WTF@@QBEPBDXZ
?dateToDaysFrom1970@WTF@@YANHHH@Z
?dayInMonthFromDayInYear@WTF@@YAHH_N@Z
@@ -315,7 +313,6 @@
?setter@PropertyDescriptor@JSC@@QBE?AVJSValue@2@XZ
?shrinkToFit@StringBuilder@WTF@@QAEXXZ
?signal@ThreadCondition@WTF@@QAEXXZ
- ?singleCharacterStringRep@SmallStrings@JSC@@QAEPAVStringImpl@WTF@@E@Z
?size@Heap@JSC@@QAEIXZ
?slowAppend@MarkedArgumentBuffer@JSC@@AAEXVJSValue@2@@Z
?slowValidateCell@JSC@@YAXPAVJSCell@1@@Z
Modified: trunk/Source/_javascript_Core/wtf/text/WTFString.h (102574 => 102575)
--- trunk/Source/_javascript_Core/wtf/text/WTFString.h 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/Source/_javascript_Core/wtf/text/WTFString.h 2011-12-12 14:06:39 UTC (rev 102575)
@@ -506,11 +506,6 @@
WTF_EXPORT_PRIVATE int codePointCompare(const String&, const String&);
-inline bool codePointCompareLessThan(const String& a, const String& b)
-{
- return codePointCompare(a.impl(), b.impl()) < 0;
-}
-
inline size_t find(const LChar* characters, unsigned length, LChar matchCharacter, unsigned index = 0)
{
while (index < length) {
Modified: trunk/Source/WebCore/ChangeLog (102574 => 102575)
--- trunk/Source/WebCore/ChangeLog 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/Source/WebCore/ChangeLog 2011-12-12 14:06:39 UTC (rev 102575)
@@ -1,3 +1,15 @@
+2011-12-12 Alexander Pavlov <[email protected]>
+
+ Unreviewed, build fix.
+
+ Revert r102570 which broke SnowLeopard builders.
+
+ * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
+ * css/CSSStyleDeclaration.idl:
+ * css/makeprop.pl:
+
2011-12-12 Ilya Tikhonovsky <[email protected]>
Web Inspector: chromium: UI: Detailed Heap snapshot shows too many objects' hidden properties.
Modified: trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp (102574 => 102575)
--- trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp 2011-12-12 14:06:39 UTC (rev 102575)
@@ -28,7 +28,6 @@
#include "CSSMutableStyleDeclaration.h"
#include "CSSPrimitiveValue.h"
-#include "CSSPropertyNames.h"
#include "CSSValue.h"
#include "JSCSSValue.h"
#include "JSNode.h"
@@ -38,11 +37,9 @@
#include <wtf/text/AtomicString.h>
#include <wtf/text/StringBuilder.h>
#include <wtf/text/StringConcatenate.h>
-#include <wtf/text/WTFString.h>
using namespace JSC;
using namespace WTF;
-using namespace std;
namespace WebCore {
@@ -142,6 +139,8 @@
return isCSSPropertyName(propertyName);
}
+// FIXME: You can get these properties, and set them (see putDelegate below),
+// but you should also be able to enumerate them.
JSValue JSCSSStyleDeclaration::nameGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)
{
JSCSSStyleDeclaration* thisObj = static_cast<JSCSSStyleDeclaration*>(asObject(slotBase));
@@ -196,31 +195,4 @@
return toJS(exec, globalObject(), WTF::getPtr(cssValue));
}
-void JSCSSStyleDeclaration::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
-{
- JSCSSStyleDeclaration* thisObject = jsCast<JSCSSStyleDeclaration*>(object);
- ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
-
- unsigned length = thisObject->impl()->length();
- for (unsigned i = 0; i < length; ++i)
- propertyNames.add(Identifier::from(exec, i));
-
- static Identifier* propertyIdentifiers = 0;
- if (!propertyIdentifiers) {
- Vector<String, numCSSProperties> jsPropertyNames;
- for (int id = firstCSSProperty; id < firstCSSProperty + numCSSProperties; ++id)
- jsPropertyNames.append(getJSPropertyName(static_cast<CSSPropertyID>(id)));
- sort(jsPropertyNames.begin(), jsPropertyNames.end(), WTF::codePointCompareLessThan);
-
- propertyIdentifiers = new Identifier[numCSSProperties];
- for (int i = 0; i < numCSSProperties; ++i)
- propertyIdentifiers[i] = Identifier(exec, jsPropertyNames[i].impl());
- }
-
- for (int i = 0; i < numCSSProperties; ++i)
- propertyNames.add(propertyIdentifiers[i]);
-
- Base::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp (102574 => 102575)
--- trunk/Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp 2011-12-12 14:06:39 UTC (rev 102575)
@@ -32,7 +32,6 @@
#include "V8CSSStyleDeclaration.h"
#include "CSSParser.h"
-#include "CSSPropertyNames.h"
#include "CSSStyleDeclaration.h"
#include "CSSValue.h"
#include "CSSPrimitiveValue.h"
@@ -49,9 +48,6 @@
#include <wtf/StdLibExtras.h>
#include <wtf/Vector.h>
-using namespace WTF;
-using namespace std;
-
namespace WebCore {
// FIXME: Next two functions look lifted verbatim from JSCSSStyleDeclarationCustom. Please remove duplication.
@@ -156,42 +152,6 @@
return propInfo;
}
-v8::Handle<v8::Array> V8CSSStyleDeclaration::namedPropertyEnumerator(const v8::AccessorInfo& info)
-{
- typedef Vector<String, numCSSProperties - 1> PreAllocatedPropertyVector;
- DEFINE_STATIC_LOCAL(PreAllocatedPropertyVector, propertyNames, ());
- DEFINE_STATIC_LOCAL(String, filterString, ("filter"));
- static unsigned propertyNamesLength = 0;
-
- if (propertyNames.isEmpty()) {
- for (int id = firstCSSProperty; id < firstCSSProperty + numCSSProperties; ++id) {
- String jsPropertyName = getJSPropertyName(static_cast<CSSPropertyID>(id));
- // The "filter" property is present in the list but should not be provided in the enumeration.
- // See a comment in the V8CSSStyleDeclaration::namedPropertyGetter() implementation.
- // FIXME: this should be removed (see bug 73426).
- if (jsPropertyName != filterString)
- propertyNames.append(jsPropertyName);
- }
- sort(propertyNames.begin(), propertyNames.end(), codePointCompareLessThan);
- propertyNamesLength = propertyNames.size();
- }
-
- v8::Handle<v8::Array> properties = v8::Array::New(propertyNamesLength);
- for (unsigned i = 0; i < propertyNamesLength; ++i) {
- String key = propertyNames.at(i);
- ASSERT(!key.isNull());
- properties->Set(v8::Integer::New(i), v8String(key));
- }
-
- return properties;
-}
-
-v8::Handle<v8::Integer> V8CSSStyleDeclaration::namedPropertyQuery(v8::Local<v8::String> v8Name, const v8::AccessorInfo& info)
-{
- INC_STATS("DOM.CSSStyleDeclaration.NamedPropertyQuery");
- return v8::Integer::New(v8::None);
-}
-
v8::Handle<v8::Value> V8CSSStyleDeclaration::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.CSSStyleDeclaration.NamedPropertyGetter");
@@ -200,13 +160,14 @@
return notHandledByInterceptor();
// Search the style declaration.
+ CSSStyleDeclaration* imp = V8CSSStyleDeclaration::toNative(info.Holder());
CSSPropertyInfo* propInfo = cssPropertyInfo(name);
// Do not handle non-property names.
if (!propInfo)
return notHandledByInterceptor();
- CSSStyleDeclaration* imp = V8CSSStyleDeclaration::toNative(info.Holder());
+
RefPtr<CSSValue> cssValue = imp->getPropertyCSSValue(propInfo->propID);
if (cssValue) {
if (propInfo->hadPixelOrPosPrefix &&
Modified: trunk/Source/WebCore/css/CSSStyleDeclaration.idl (102574 => 102575)
--- trunk/Source/WebCore/css/CSSStyleDeclaration.idl 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/Source/WebCore/css/CSSStyleDeclaration.idl 2011-12-12 14:06:39 UTC (rev 102575)
@@ -27,7 +27,6 @@
DelegatingPutFunction,
HasNameGetter,
HasIndexGetter,
- CustomGetPropertyNames,
V8DependentLifetime
] CSSStyleDeclaration {
attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString cssText
Modified: trunk/Source/WebCore/css/makeprop.pl (102574 => 102575)
--- trunk/Source/WebCore/css/makeprop.pl 2011-12-12 13:58:56 UTC (rev 102574)
+++ trunk/Source/WebCore/css/makeprop.pl 2011-12-12 14:06:39 UTC (rev 102575)
@@ -62,14 +62,10 @@
print GPERF << "EOF";
%{
/* This file is automatically generated from CSSPropertyNames.in by makeprop, do not edit */
-#include "config.h"
#include \"CSSPropertyNames.h\"
#include \"HashTools.h\"
#include <string.h>
-#include <wtf/ASCIICType.h>
-#include <wtf/text/WTFString.h>
-
namespace WebCore {
%}
%struct-type
@@ -118,28 +114,6 @@
return propertyNameStrings[index];
}
-WTF::String getJSPropertyName(CSSPropertyID id)
-{
- char result[maxCSSPropertyNameLength + 1];
- const char* cssPropertyName = getPropertyName(id);
- const char* propertyNamePointer = cssPropertyName;
- if (!propertyNamePointer)
- return emptyString();
-
- char* resultPointer = result;
- while (char character = *propertyNamePointer++) {
- if (character == '-') {
- char nextCharacter = *propertyNamePointer++;
- if (!nextCharacter)
- break;
- character = (propertyNamePointer - 2 != cssPropertyName) ? toASCIIUpper(nextCharacter) : nextCharacter;
- }
- *resultPointer++ = character;
- }
- *resultPointer = '\\0';
- return WTF::String(result);
-}
-
} // namespace WebCore
EOF
@@ -152,10 +126,6 @@
#include <string.h>
-namespace WTF {
-class String;
-}
-
namespace WebCore {
enum CSSPropertyID {
@@ -190,7 +160,6 @@
print HEADER << "EOF";
const char* getPropertyName(CSSPropertyID);
-WTF::String getJSPropertyName(CSSPropertyID);
} // namespace WebCore