+2006-04-20 Geoffrey Garen <ggaren@apple.com>
+
+ Tests for global constants related to CSSRule, CSSValue, Event, and
+ NodeFilter objects.
+
+ * fast/dom/constants-expected.txt: Added.
+ * fast/dom/constants.html: Added.
+ * fast/dom/prototype-chain-expected.txt:
+ * fast/dom/resources/stylesheet.css: Added.
+ * fast/dom/xmlhttprequest-get-expected.txt:
+
2006-04-21 Beth Dakin <bdakin@apple.com>
Reviewed by Hyatt.
--- /dev/null
+This page tests CSSRule, CSSValue, NodeFilter, and Event. It tests:
+
+Whether their global constructors have the correct constant values
+Whether their objects have the correct constant values
+PASS: cssRule.UNKNOWN_RULE should be 0 and is.
+PASS: cssRule.STYLE_RULE should be 1 and is.
+PASS: cssRule.CHARSET_RULE should be 2 and is.
+PASS: cssRule.IMPORT_RULE should be 3 and is.
+PASS: cssRule.MEDIA_RULE should be 4 and is.
+PASS: cssRule.FONT_FACE_RULE should be 5 and is.
+PASS: cssRule.PAGE_RULE should be 6 and is.
+PASS: window.CSSRule.UNKNOWN_RULE should be 0 and is.
+PASS: window.CSSRule.STYLE_RULE should be 1 and is.
+PASS: window.CSSRule.CHARSET_RULE should be 2 and is.
+PASS: window.CSSRule.IMPORT_RULE should be 3 and is.
+PASS: window.CSSRule.MEDIA_RULE should be 4 and is.
+PASS: window.CSSRule.FONT_FACE_RULE should be 5 and is.
+PASS: window.CSSRule.PAGE_RULE should be 6 and is.
+PASS: cssValue.CSS_INHERIT should be 0 and is.
+PASS: cssValue.CSS_PRIMITIVE_VALUE should be 1 and is.
+PASS: cssValue.CSS_VALUE_LIST should be 2 and is.
+PASS: cssValue.CSS_CUSTOM should be 3 and is.
+PASS: window.CSSValue.CSS_INHERIT should be 0 and is.
+PASS: window.CSSValue.CSS_PRIMITIVE_VALUE should be 1 and is.
+PASS: window.CSSValue.CSS_VALUE_LIST should be 2 and is.
+PASS: window.CSSValue.CSS_CUSTOM should be 3 and is.
+PASS: nodeFilter.FILTER_ACCEPT should be 1 and is.
+PASS: nodeFilter.FILTER_REJECT should be 2 and is.
+PASS: nodeFilter.FILTER_SKIP should be 3 and is.
+PASS: nodeFilter.SHOW_ALL should be -1 and is.
+PASS: nodeFilter.SHOW_ELEMENT should be 1 and is.
+PASS: nodeFilter.SHOW_ATTRIBUTE should be 2 and is.
+PASS: nodeFilter.SHOW_TEXT should be 4 and is.
+PASS: nodeFilter.SHOW_CDATA_SECTION should be 8 and is.
+PASS: nodeFilter.SHOW_ENTITY_REFERENCE should be 16 and is.
+PASS: nodeFilter.SHOW_ENTITY should be 32 and is.
+PASS: nodeFilter.SHOW_PROCESSING_INSTRUCTION should be 64 and is.
+PASS: nodeFilter.SHOW_COMMENT should be 128 and is.
+PASS: nodeFilter.SHOW_DOCUMENT should be 256 and is.
+PASS: nodeFilter.SHOW_DOCUMENT_TYPE should be 512 and is.
+PASS: nodeFilter.SHOW_DOCUMENT_FRAGMENT should be 1024 and is.
+PASS: nodeFilter.SHOW_NOTATION should be 2048 and is.
+PASS: window.NodeFilter.FILTER_ACCEPT should be 1 and is.
+PASS: window.NodeFilter.FILTER_REJECT should be 2 and is.
+PASS: window.NodeFilter.FILTER_SKIP should be 3 and is.
+PASS: window.NodeFilter.SHOW_ALL should be -1 and is.
+PASS: window.NodeFilter.SHOW_ELEMENT should be 1 and is.
+PASS: window.NodeFilter.SHOW_ATTRIBUTE should be 2 and is.
+PASS: window.NodeFilter.SHOW_TEXT should be 4 and is.
+PASS: window.NodeFilter.SHOW_CDATA_SECTION should be 8 and is.
+PASS: window.NodeFilter.SHOW_ENTITY_REFERENCE should be 16 and is.
+PASS: window.NodeFilter.SHOW_ENTITY should be 32 and is.
+PASS: window.NodeFilter.SHOW_PROCESSING_INSTRUCTION should be 64 and is.
+PASS: window.NodeFilter.SHOW_COMMENT should be 128 and is.
+PASS: window.NodeFilter.SHOW_DOCUMENT should be 256 and is.
+PASS: window.NodeFilter.SHOW_DOCUMENT_TYPE should be 512 and is.
+PASS: window.NodeFilter.SHOW_DOCUMENT_FRAGMENT should be 1024 and is.
+PASS: window.NodeFilter.SHOW_NOTATION should be 2048 and is.
+PASS: event.CAPTURING_PHASE should be 1 and is.
+PASS: event.AT_TARGET should be 2 and is.
+PASS: event.BUBBLING_PHASE should be 3 and is.
+PASS: event.MOUSEDOWN should be 1 and is.
+PASS: event.MOUSEUP should be 2 and is.
+PASS: event.MOUSEOVER should be 4 and is.
+PASS: event.MOUSEOUT should be 8 and is.
+PASS: event.MOUSEMOVE should be 16 and is.
+PASS: event.MOUSEDRAG should be 32 and is.
+PASS: event.CLICK should be 64 and is.
+PASS: event.DBLCLICK should be 128 and is.
+PASS: event.KEYDOWN should be 256 and is.
+PASS: event.KEYUP should be 512 and is.
+PASS: event.KEYPRESS should be 1024 and is.
+PASS: event.DRAGDROP should be 2048 and is.
+PASS: event.FOCUS should be 4096 and is.
+PASS: event.BLUR should be 8192 and is.
+PASS: event.SELECT should be 16384 and is.
+PASS: event.CHANGE should be 32768 and is.
+PASS: window.Event.CAPTURING_PHASE should be 1 and is.
+PASS: window.Event.AT_TARGET should be 2 and is.
+PASS: window.Event.BUBBLING_PHASE should be 3 and is.
+PASS: window.Event.MOUSEDOWN should be 1 and is.
+PASS: window.Event.MOUSEUP should be 2 and is.
+PASS: window.Event.MOUSEOVER should be 4 and is.
+PASS: window.Event.MOUSEOUT should be 8 and is.
+PASS: window.Event.MOUSEMOVE should be 16 and is.
+PASS: window.Event.MOUSEDRAG should be 32 and is.
+PASS: window.Event.CLICK should be 64 and is.
+PASS: window.Event.DBLCLICK should be 128 and is.
+PASS: window.Event.KEYDOWN should be 256 and is.
+PASS: window.Event.KEYUP should be 512 and is.
+PASS: window.Event.KEYPRESS should be 1024 and is.
+PASS: window.Event.DRAGDROP should be 2048 and is.
+PASS: window.Event.FOCUS should be 4096 and is.
+PASS: window.Event.BLUR should be 8192 and is.
+PASS: window.Event.SELECT should be 16384 and is.
+PASS: window.Event.CHANGE should be 32768 and is.
+
--- /dev/null
+<html>
+<head>
+<link rel="stylesheet" href="resources/stylesheet.css">
+<script>
+function print(message, color) {
+ var paragraph = document.createElement("div");
+ paragraph.appendChild(document.createTextNode(message));
+ paragraph.style.fontFamily = "monospace";
+ if (color)
+ paragraph.style.color = color;
+ document.getElementById("console").appendChild(paragraph);
+}
+
+function shouldBe(a, b)
+{
+ var message, color;
+ var evalA;
+ try {
+ evalA = eval(a);
+ } catch (e) {
+ evalA = e;
+ }
+
+ if (evalA == b) {
+ color = "green";
+ message = "PASS: " + a + " should be " + b + " and is.";
+ } else {
+ color = "red";
+ message = "FAIL: " + a + " should be " + b + " but instead is " + evalA + ".";
+ }
+
+ print(message, color);
+}
+
+var cssRule, cssValue, nodeFilter, event;
+
+function test() {
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ cssRule = document.styleSheets[0].cssRules[0];
+ shouldBe("cssRule.UNKNOWN_RULE", 0);
+ shouldBe("cssRule.STYLE_RULE", 1);
+ shouldBe("cssRule.CHARSET_RULE", 2);
+ shouldBe("cssRule.IMPORT_RULE", 3);
+ shouldBe("cssRule.MEDIA_RULE", 4);
+ shouldBe("cssRule.FONT_FACE_RULE", 5);
+ shouldBe("cssRule.PAGE_RULE", 6);
+
+ shouldBe("window.CSSRule.UNKNOWN_RULE", 0);
+ shouldBe("window.CSSRule.STYLE_RULE", 1);
+ shouldBe("window.CSSRule.CHARSET_RULE", 2);
+ shouldBe("window.CSSRule.IMPORT_RULE", 3);
+ shouldBe("window.CSSRule.MEDIA_RULE", 4);
+ shouldBe("window.CSSRule.FONT_FACE_RULE", 5);
+ shouldBe("window.CSSRule.PAGE_RULE", 6);
+
+ cssValue = cssRule.style.getPropertyCSSValue("color");
+ shouldBe("cssValue.CSS_INHERIT", 0);
+ shouldBe("cssValue.CSS_PRIMITIVE_VALUE", 1);
+ shouldBe("cssValue.CSS_VALUE_LIST", 2);
+ shouldBe("cssValue.CSS_CUSTOM", 3);
+
+ shouldBe("window.CSSValue.CSS_INHERIT", 0);
+ shouldBe("window.CSSValue.CSS_PRIMITIVE_VALUE", 1);
+ shouldBe("window.CSSValue.CSS_VALUE_LIST", 2);
+ shouldBe("window.CSSValue.CSS_CUSTOM", 3);
+
+ var nodeIterator;
+ try {
+ nodeIterator = document.createNodeIterator(document,
+ NodeFilter.SHOW_ELEMENT,
+ function () { return NodeFilter.FILTER_ACCEPT; },
+ false);
+ } catch(e) {
+ nodeIterator = new Object();
+ }
+
+ nodeFilter = nodeIterator.filter;
+ shouldBe("nodeFilter.FILTER_ACCEPT", 1);
+ shouldBe("nodeFilter.FILTER_REJECT", 2);
+ shouldBe("nodeFilter.FILTER_SKIP", 3);
+ shouldBe("nodeFilter.SHOW_ALL", -1);
+ shouldBe("nodeFilter.SHOW_ELEMENT", 0x00000001);
+ shouldBe("nodeFilter.SHOW_ATTRIBUTE", 0x00000002);
+ shouldBe("nodeFilter.SHOW_TEXT", 0x00000004);
+ shouldBe("nodeFilter.SHOW_CDATA_SECTION", 0x00000008);
+ shouldBe("nodeFilter.SHOW_ENTITY_REFERENCE", 0x00000010);
+ shouldBe("nodeFilter.SHOW_ENTITY", 0x00000020);
+ shouldBe("nodeFilter.SHOW_PROCESSING_INSTRUCTION", 0x00000040);
+ shouldBe("nodeFilter.SHOW_COMMENT", 0x00000080);
+ shouldBe("nodeFilter.SHOW_DOCUMENT", 0x00000100);
+ shouldBe("nodeFilter.SHOW_DOCUMENT_TYPE", 0x00000200);
+ shouldBe("nodeFilter.SHOW_DOCUMENT_FRAGMENT", 0x00000400);
+ shouldBe("nodeFilter.SHOW_NOTATION", 0x00000800);
+
+ shouldBe("window.NodeFilter.FILTER_ACCEPT", 1);
+ shouldBe("window.NodeFilter.FILTER_REJECT", 2);
+ shouldBe("window.NodeFilter.FILTER_SKIP", 3);
+ shouldBe("window.NodeFilter.SHOW_ALL", -1);
+ shouldBe("window.NodeFilter.SHOW_ELEMENT", 0x00000001);
+ shouldBe("window.NodeFilter.SHOW_ATTRIBUTE", 0x00000002);
+ shouldBe("window.NodeFilter.SHOW_TEXT", 0x00000004);
+ shouldBe("window.NodeFilter.SHOW_CDATA_SECTION", 0x00000008);
+ shouldBe("window.NodeFilter.SHOW_ENTITY_REFERENCE", 0x00000010);
+ shouldBe("window.NodeFilter.SHOW_ENTITY", 0x00000020);
+ shouldBe("window.NodeFilter.SHOW_PROCESSING_INSTRUCTION", 0x00000040);
+ shouldBe("window.NodeFilter.SHOW_COMMENT", 0x00000080);
+ shouldBe("window.NodeFilter.SHOW_DOCUMENT", 0x00000100);
+ shouldBe("window.NodeFilter.SHOW_DOCUMENT_TYPE", 0x00000200);
+ shouldBe("window.NodeFilter.SHOW_DOCUMENT_FRAGMENT", 0x00000400);
+ shouldBe("window.NodeFilter.SHOW_NOTATION", 0x00000800);
+
+ event = document.createEvent("Event");
+ shouldBe("event.CAPTURING_PHASE", 1);
+ shouldBe("event.AT_TARGET", 2);
+ shouldBe("event.BUBBLING_PHASE", 3);
+ shouldBe("event.MOUSEDOWN", 1);
+ shouldBe("event.MOUSEUP", 2);
+ shouldBe("event.MOUSEOVER", 4);
+ shouldBe("event.MOUSEOUT", 8);
+ shouldBe("event.MOUSEMOVE", 16);
+ shouldBe("event.MOUSEDRAG", 32);
+ shouldBe("event.CLICK", 64);
+ shouldBe("event.DBLCLICK", 128);
+ shouldBe("event.KEYDOWN", 256);
+ shouldBe("event.KEYUP", 512);
+ shouldBe("event.KEYPRESS", 1024);
+ shouldBe("event.DRAGDROP", 2048);
+ shouldBe("event.FOCUS", 4096);
+ shouldBe("event.BLUR", 8192);
+ shouldBe("event.SELECT", 16384);
+ shouldBe("event.CHANGE", 32768);
+
+ shouldBe("window.Event.CAPTURING_PHASE", 1);
+ shouldBe("window.Event.AT_TARGET", 2);
+ shouldBe("window.Event.BUBBLING_PHASE", 3);
+ shouldBe("window.Event.MOUSEDOWN", 1);
+ shouldBe("window.Event.MOUSEUP", 2);
+ shouldBe("window.Event.MOUSEOVER", 4);
+ shouldBe("window.Event.MOUSEOUT", 8);
+ shouldBe("window.Event.MOUSEMOVE", 16);
+ shouldBe("window.Event.MOUSEDRAG", 32);
+ shouldBe("window.Event.CLICK", 64);
+ shouldBe("window.Event.DBLCLICK", 128);
+ shouldBe("window.Event.KEYDOWN", 256);
+ shouldBe("window.Event.KEYUP", 512);
+ shouldBe("window.Event.KEYPRESS", 1024);
+ shouldBe("window.Event.DRAGDROP", 2048);
+ shouldBe("window.Event.FOCUS", 4096);
+ shouldBe("window.Event.BLUR", 8192);
+ shouldBe("window.Event.SELECT", 16384);
+ shouldBe("window.Event.CHANGE", 32768);
+}
+</script>
+</head>
+<body onload="test();">
+<p>This page tests CSSRule, CSSValue, NodeFilter, and Event. It tests:</p>
+<ol>
+ <li>Whether their global constructors have the correct constant values</li>
+ <li>Whether their objects have the correct constant values</li>
+</ol>
+<hr>
+<div id='console'></div>
+</body>
+</html>
[object JSElement]
------ [object UIEvent] (3 prototypes) -----
+----- [object UIEvent] (4 prototypes) -----
[object Object]
[object DOMEvent]
+[object JSEvent]
+
[object JSUIEvent]
------ [object MouseEvent] (4 prototypes) -----
+----- [object MouseEvent] (5 prototypes) -----
[object Object]
[object DOMEvent]
+[object JSEvent]
+
[object JSUIEvent]
[object JSMouseEvent]
------ [object KeyboardEvent] (4 prototypes) -----
+----- [object KeyboardEvent] (5 prototypes) -----
[object Object]
[object DOMEvent]
+[object JSEvent]
+
[object JSUIEvent]
[object JSKeyboardEvent]
--- /dev/null
+.testStyle {
+ color: rgb(100, 100, 100);
+ font-family: aerial, times;
+ padding: 0 0 0 0;
+}
\ No newline at end of file
Event information
Event object: [object Event]
Event properties:
+AT_TARGET : '2'
+BLUR : '8192'
+BUBBLING_PHASE : '3'
+CAPTURING_PHASE : '1'
+CHANGE : '32768'
+CLICK : '64'
+DBLCLICK : '128'
+DRAGDROP : '2048'
+FOCUS : '4096'
+KEYDOWN : '256'
+KEYPRESS : '1024'
+KEYUP : '512'
+MOUSEDOWN : '1'
+MOUSEDRAG : '32'
+MOUSEMOVE : '16'
+MOUSEOUT : '8'
+MOUSEOVER : '4'
+MOUSEUP : '2'
+SELECT : '16384'
bubbles : 'true'
cancelBubble : 'false'
cancelable : 'true'
+2006-04-20 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej.
+
+ - Added autogeneration of JS bindings for CSSRule, CSSValue,
+ Event, and NodeFilter.
+
+ - Made related prototype objects hold the relevant constants, to
+ match Mozilla and the DOM 2 spec. (Previously, only the related
+ constructor objects held those constants, in accordance with the
+ DOM 3 spec.)
+
+ - Fixed up remaining Windows build issues.
+
+ * DerivedSources.make: Added new autogenerated files
+ * WebCore.xcodeproj/project.pbxproj: ditto
+ * bindings/js/kjs_css.cpp:
+ (KJS::DOMCSSRule::classInfo):
+ (KJS::DOMCSSRule::getOwnPropertySlot): scope call to classInfo()
+ because it's virtual and DOMCSSRule has a derrived class now.
+ (KJS::DOMCSSRule::put): ditto
+ (KJS::DOMCSSRuleFunc::callAsFunction):
+ (KJS::toJS):
+ * bindings/js/kjs_css.h:
+ * bindings/js/kjs_events.cpp:
+ (KJS::toJS):
+ * bindings/js/kjs_events.h:
+ * bindings/js/kjs_html.cpp:
+ (KJS::OptionConstructorImp::OptionConstructorImp):
+ * bindings/js/kjs_traversal.cpp:
+ (KJS::toJS):
+ * bindings/js/kjs_traversal.h:
+ * bindings/js/kjs_window.cpp:
+ (KJS::Window::getValueProperty): added CSSValue global object
+ * bindings/js/kjs_window.h:
+ (KJS::Window::):
+ * bindings/scripts/CodeGeneratorJS.pm: Changed generator to write
+ constants to prototype objects (previously only wrote constants to
+ constructor objects)
+ * css/CSSPrimitiveValue.idl: Removed LegacyParent since CSSValue now
+ exists in IDL
+ * css/CSSRule.idl: Added.
+ * css/CSSValue.idl: Added.
+ * css/css_ruleimpl.h:
+ (WebCore::CSSRule::):
+ * css/css_valueimpl.h:
+ * dom/Event.idl: Added.
+ * dom/MutationEvent.idl: Removed LegacyParent since Event now exists
+ in IDL
+ * dom/NodeFilter.idl: Added.
+ * dom/UIEvent.idl: Removed LegacyParent since event now exists in IDL
+ * dom/dom2_eventsimpl.h:
+ (WebCore::Event::):
+
2006-04-21 Darin Adler <darin@apple.com>
- one more attempt to fix Windows build
(WebCore::Image::tileInRect):
(WebCore::Image::scaleAndTileInRect):
+>>>>>>> .r13996
2006-04-20 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
DocTypeStrings.cpp \
HTMLEntityNames.c \
JSAttr.h \
+ JSCSSPrimitiveValue.h \
+ JSCSSRule.h \
+ JSCSSValue.h \
JSCanvasGradient.h \
JSCanvasPattern.h \
JSCanvasRenderingContext2D.h \
JSCanvasRenderingContext2DBaseTable.cpp \
- JSCounter.h \
JSCharacterData.h \
- JSCSSPrimitiveValue.h \
+ JSCounter.h \
JSDOMImplementation.h \
JSDOMParser.lut.h \
+ JSDOMWindow.h \
JSDocument.h \
JSDocumentType.h \
- JSDOMWindow.h \
JSElement.h \
+ JSEvent.h \
JSEntity.h \
JSHTMLCanvasElement.h \
JSKeyboardEvent.h \
JSMouseEvent.h \
JSMutationEvent.h \
+ JSNodeFilter.h \
JSNotation.h \
JSProcessingInstruction.h \
JSRange.h \
<Filter\r
Name="DerivedSources"\r
>\r
+ <File\r
+ RelativePath="..\..\DerivedSources\WebCore\JSCSSRule.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\DerivedSources\WebCore\JSCSSValue.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\DerivedSources\WebCore\JSEvent.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\DerivedSources\WebCore\JSNodeFilter.cpp"\r
+ >\r
+ </File>\r
<File\r
RelativePath="..\..\DerivedSources\WebCore\CharsetData.cpp"\r
>\r
RelativePath="..\..\platform\CookieJar.h"\r
>\r
</File>\r
+ <File\r
+ RelativePath="..\..\platform\CompositeOperator.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\platform\CompositeOperator.cpp"\r
+ >\r
+ </File>\r
<File\r
RelativePath="..\..\platform\Cursor.h"\r
>\r
<Filter\r
Name="js"\r
>\r
+ <File\r
+ RelativePath="..\..\bindings\js\JSHTMLElementWrapperFactory.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\bindings\js\JSHTMLElementWrapperFactory.cpp"\r
+ >\r
+ </File>\r
<File\r
RelativePath="..\..\bindings\js\JSCanvasRenderingContext2DBase.cpp"\r
>\r
1403B99809EB13AF00797C7F /* DOMWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1403B99609EB13AF00797C7F /* DOMWindow.cpp */; };
1403BA0C09EB18C700797C7F /* JSDOMWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1403BA0B09EB18C700797C7F /* JSDOMWindow.cpp */; };
1403BA0F09EB18F900797C7F /* JSDOMWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 1403BA0E09EB18F800797C7F /* JSDOMWindow.h */; };
+ 14115AFA09F847D600CA4FC1 /* NodeFilter.idl in Resources */ = {isa = PBXBuildFile; fileRef = 14115AF909F847D600CA4FC1 /* NodeFilter.idl */; };
+ 14115B5209F84B7100CA4FC1 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 14115B5109F84B7100CA4FC1 /* Node.h */; };
+ 14115B7209F84CD600CA4FC1 /* JSNodeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14115B7009F84CD600CA4FC1 /* JSNodeFilter.cpp */; };
+ 14115B7309F84CD600CA4FC1 /* JSNodeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 14115B7109F84CD600CA4FC1 /* JSNodeFilter.h */; };
+ 14CF787209F587CA00EB3665 /* CSSValue.idl in Resources */ = {isa = PBXBuildFile; fileRef = 14CF787109F587CA00EB3665 /* CSSValue.idl */; };
+ 14CF78A409F58CBF00EB3665 /* JSCSSValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14CF78A309F58CBF00EB3665 /* JSCSSValue.cpp */; };
+ 14CF78A609F58CD800EB3665 /* JSCSSValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 14CF78A509F58CD800EB3665 /* JSCSSValue.h */; };
+ 14CF7A7109F5CF9A00EB3665 /* CSSRule.idl in Resources */ = {isa = PBXBuildFile; fileRef = 14CF7A7009F5CF9A00EB3665 /* CSSRule.idl */; };
+ 14CF7B3309F6ECD700EB3665 /* JSCSSRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14CF7B3109F6ECD700EB3665 /* JSCSSRule.cpp */; };
+ 14CF7B3409F6ECD700EB3665 /* JSCSSRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 14CF7B3209F6ECD700EB3665 /* JSCSSRule.h */; };
+ 14CF7C2209F7110600EB3665 /* KeyboardEvent.idl in Resources */ = {isa = PBXBuildFile; fileRef = 14CF7C2009F7110600EB3665 /* KeyboardEvent.idl */; };
+ 14E836D309F8512000B85AE4 /* Event.idl in Resources */ = {isa = PBXBuildFile; fileRef = 14E836D209F8512000B85AE4 /* Event.idl */; };
+ 14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */; };
+ 14E8378E09F85D4F00B85AE4 /* JSEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E8378D09F85D4F00B85AE4 /* JSEvent.h */; };
14EC267F09CA07E000E1EEEC /* EventTargetNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 14EC267D09CA07E000E1EEEC /* EventTargetNode.h */; };
14EC268009CA07E000E1EEEC /* EventTargetNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14EC267E09CA07E000E1EEEC /* EventTargetNode.cpp */; };
550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; };
A818721F0977D3C0005826D9 /* ContainerNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81872140977D3C0005826D9 /* ContainerNode.cpp */; };
A81872200977D3C0005826D9 /* ChildNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872150977D3C0005826D9 /* ChildNodeList.h */; };
A81872210977D3C0005826D9 /* NodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81872160977D3C0005826D9 /* NodeList.cpp */; };
- A81872220977D3C0005826D9 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872170977D3C0005826D9 /* Node.h */; };
A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = A81872180977D3C0005826D9 /* NamedNodeMap.h */; };
A81872240977D3C0005826D9 /* NameNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81872190977D3C0005826D9 /* NameNodeList.cpp */; };
A81872250977D3C0005826D9 /* ChildNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A818721A0977D3C0005826D9 /* ChildNodeList.cpp */; };
1403B99609EB13AF00797C7F /* DOMWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindow.cpp; sourceTree = "<group>"; };
1403BA0B09EB18C700797C7F /* JSDOMWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindow.cpp; sourceTree = "<group>"; };
1403BA0E09EB18F800797C7F /* JSDOMWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMWindow.h; sourceTree = "<group>"; };
+ 14115AF909F847D600CA4FC1 /* NodeFilter.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NodeFilter.idl; sourceTree = "<group>"; };
+ 14115B5109F84B7100CA4FC1 /* Node.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = "<group>"; };
+ 14115B7009F84CD600CA4FC1 /* JSNodeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilter.cpp; sourceTree = "<group>"; };
+ 14115B7109F84CD600CA4FC1 /* JSNodeFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNodeFilter.h; sourceTree = "<group>"; };
141B94E509EC4223000E9413 /* MouseEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = MouseEvent.idl; sourceTree = "<group>"; };
141B94EE09EC425A000E9413 /* UIEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = UIEvent.idl; sourceTree = "<group>"; };
14813BF309EDF88E00F757E1 /* IDLParser.pm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.perl; name = IDLParser.pm; path = scripts/IDLParser.pm; sourceTree = "<group>"; };
+ 14CF787109F587CA00EB3665 /* CSSValue.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSValue.idl; sourceTree = "<group>"; };
+ 14CF78A309F58CBF00EB3665 /* JSCSSValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSValue.cpp; sourceTree = "<group>"; };
+ 14CF78A509F58CD800EB3665 /* JSCSSValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSValue.h; sourceTree = "<group>"; };
+ 14CF7A7009F5CF9A00EB3665 /* CSSRule.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSRule.idl; sourceTree = "<group>"; };
+ 14CF7B3109F6ECD700EB3665 /* JSCSSRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSRule.cpp; sourceTree = "<group>"; };
+ 14CF7B3209F6ECD700EB3665 /* JSCSSRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSRule.h; sourceTree = "<group>"; };
+ 14CF7C2009F7110600EB3665 /* KeyboardEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = KeyboardEvent.idl; sourceTree = "<group>"; };
+ 14E836D209F8512000B85AE4 /* Event.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Event.idl; sourceTree = "<group>"; };
+ 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSEvent.cpp; sourceTree = "<group>"; };
+ 14E8378D09F85D4F00B85AE4 /* JSEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEvent.h; sourceTree = "<group>"; };
14EC267D09CA07E000E1EEEC /* EventTargetNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTargetNode.h; sourceTree = "<group>"; };
14EC267E09CA07E000E1EEEC /* EventTargetNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventTargetNode.cpp; sourceTree = "<group>"; };
2D90660B0665D937006B6F1A /* ClipboardMac.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ClipboardMac.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8185F3809765765005826D9 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = "<group>"; };
A81872100977D3C0005826D9 /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NodeList.h; sourceTree = "<group>"; };
A81872110977D3C0005826D9 /* ContainerNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ContainerNode.h; sourceTree = "<group>"; };
- A81872120977D3C0005826D9 /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Node.cpp; sourceTree = "<group>"; };
A81872130977D3C0005826D9 /* NameNodeList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NameNodeList.h; sourceTree = "<group>"; };
A81872140977D3C0005826D9 /* ContainerNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContainerNode.cpp; sourceTree = "<group>"; };
A81872150977D3C0005826D9 /* ChildNodeList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ChildNodeList.h; sourceTree = "<group>"; };
A81872160977D3C0005826D9 /* NodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeList.cpp; sourceTree = "<group>"; };
- A81872170977D3C0005826D9 /* Node.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = "<group>"; };
A81872180977D3C0005826D9 /* NamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NamedNodeMap.h; sourceTree = "<group>"; };
A81872190977D3C0005826D9 /* NameNodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NameNodeList.cpp; sourceTree = "<group>"; };
A818721A0977D3C0005826D9 /* ChildNodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ChildNodeList.cpp; sourceTree = "<group>"; };
930705D909E0C9BF00B17FE4 /* JSCounter.h */,
930705E809E0C9F000B17FE4 /* JSCSSPrimitiveValue.cpp */,
930705EA09E0C9F600B17FE4 /* JSCSSPrimitiveValue.h */,
+ 14CF7B3109F6ECD700EB3665 /* JSCSSRule.cpp */,
+ 14CF7B3209F6ECD700EB3665 /* JSCSSRule.h */,
+ 14CF78A309F58CBF00EB3665 /* JSCSSValue.cpp */,
+ 14CF78A509F58CD800EB3665 /* JSCSSValue.h */,
659DDC8009E198BA001BF3C6 /* JSDocument.cpp */,
659DDC8109E198BA001BF3C6 /* JSDocument.h */,
65DF31E109D1CC60000BE325 /* JSDocumentType.cpp */,
65DF31E609D1CC60000BE325 /* JSElement.h */,
65DF322D09D1DDBC000BE325 /* JSEntity.cpp */,
65DF322E09D1DDBC000BE325 /* JSEntity.h */,
+ 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */,
+ 14E8378D09F85D4F00B85AE4 /* JSEvent.h */,
938E665F09F09B81008A48EC /* JSHTMLCanvasElement.cpp */,
938E666109F09B87008A48EC /* JSHTMLCanvasElement.h */,
A86629CE09DA2B47009633A5 /* JSKeyboardEvent.cpp */,
A86629CB09DA2B47009633A5 /* JSMouseEvent.h */,
65DF31E709D1CC60000BE325 /* JSMutationEvent.cpp */,
65DF31E809D1CC60000BE325 /* JSMutationEvent.h */,
+ 14115B7009F84CD600CA4FC1 /* JSNodeFilter.cpp */,
+ 14115B7109F84CD600CA4FC1 /* JSNodeFilter.h */,
65DF31E909D1CC60000BE325 /* JSNotation.cpp */,
65DF31EA09D1CC60000BE325 /* JSNotation.h */,
65DF31EB09D1CC60000BE325 /* JSProcessingInstruction.cpp */,
F523D18402DE42E8018635CA /* css */ = {
isa = PBXGroup;
children = (
+ 14CF7A7009F5CF9A00EB3665 /* CSSRule.idl */,
+ 14CF787109F587CA00EB3665 /* CSSValue.idl */,
930705C709E0C95F00B17FE4 /* Counter.idl */,
BCEA477A097CAAC80094C9E4 /* css_base.cpp */,
BCEA477B097CAAC80094C9E4 /* css_base.h */,
14EC267E09CA07E000E1EEEC /* EventTargetNode.cpp */,
14EC267D09CA07E000E1EEEC /* EventTargetNode.h */,
935FBCF109BA143B00E230B1 /* ExceptionCode.h */,
+ 14CF7C2009F7110600EB3665 /* KeyboardEvent.idl */,
A8C4A7F409D563270003AC8D /* MappedAttribute.cpp */,
A8C4A7F309D563270003AC8D /* MappedAttribute.h */,
A8C4A84B09D5649D0003AC8D /* MappedAttributeEntry.h */,
A81872190977D3C0005826D9 /* NameNodeList.cpp */,
A81872130977D3C0005826D9 /* NameNodeList.h */,
A8C4A7EE09D563270003AC8D /* Node.cpp */,
- A81872170977D3C0005826D9 /* Node.h */,
+ 14115B5109F84B7100CA4FC1 /* Node.h */,
+ 14115AF909F847D600CA4FC1 /* NodeFilter.idl */,
A81872160977D3C0005826D9 /* NodeList.cpp */,
A81872100977D3C0005826D9 /* NodeList.h */,
93EEC1F409C2877700C515D1 /* Notation.idl */,
93EEC1F709C2877700C515D1 /* WheelEvent.idl */,
F523D30902DE4476018635CA /* xml_tokenizer.cpp */,
F523D30A02DE4476018635CA /* xml_tokenizer.h */,
- A81872120977D3C0005826D9 /* Node.cpp */,
- A81872170977D3C0005826D9 /* Node.h */,
+ 14E836D209F8512000B85AE4 /* Event.idl */,
);
path = dom;
sourceTree = "<group>";
A818721C0977D3C0005826D9 /* ContainerNode.h in Headers */,
A818721E0977D3C0005826D9 /* NameNodeList.h in Headers */,
A81872200977D3C0005826D9 /* ChildNodeList.h in Headers */,
- A81872220977D3C0005826D9 /* Node.h in Headers */,
A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */,
654EC611097778F500DAB52C /* WebCoreFrameBridge.h in Headers */,
BCF1A5F1097839600061A123 /* IntSize.h in Headers */,
93B70EB309EEE5B5009D8468 /* RenderEmptyApplet.h in Headers */,
1403B99709EB13AF00797C7F /* DOMWindow.h in Headers */,
1403BA0F09EB18F900797C7F /* JSDOMWindow.h in Headers */,
+ 14CF78A609F58CD800EB3665 /* JSCSSValue.h in Headers */,
+ 14CF7B3409F6ECD700EB3665 /* JSCSSRule.h in Headers */,
938E65F109F09840008A48EC /* JSHTMLElementWrapperFactory.h in Headers */,
938E666209F09B87008A48EC /* JSHTMLCanvasElement.h in Headers */,
938E683C09F0BD7B008A48EC /* CompositeOperator.h in Headers */,
8116896009F2A4A000772CA0 /* SVGTRefElement.h in Headers */,
+ 14115B5209F84B7100CA4FC1 /* Node.h in Headers */,
+ 14115B7309F84CD600CA4FC1 /* JSNodeFilter.h in Headers */,
+ 14E8378E09F85D4F00B85AE4 /* JSEvent.h in Headers */,
93EB169709F880C00091F8FF /* WebCoreSystemInterface.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
A88AD3A40952486D001DD196 /* WKSpecularLightingFilter.cikernel in Resources */,
A88AD3A70952486D001DD196 /* WKSpotLightFilter.cikernel in Resources */,
A7638A92099592C30007E14F /* WKDisplacementMapFilter.cikernel in Resources */,
+ 14CF787209F587CA00EB3665 /* CSSValue.idl in Resources */,
+ 14CF7A7109F5CF9A00EB3665 /* CSSRule.idl in Resources */,
+ 14CF7C2209F7110600EB3665 /* KeyboardEvent.idl in Resources */,
+ 14115AFA09F847D600CA4FC1 /* NodeFilter.idl in Resources */,
+ 14E836D309F8512000B85AE4 /* Event.idl in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
93B70EB209EEE5B5009D8468 /* RenderEmptyApplet.cpp in Sources */,
1403B99809EB13AF00797C7F /* DOMWindow.cpp in Sources */,
1403BA0C09EB18C700797C7F /* JSDOMWindow.cpp in Sources */,
+ 14CF78A409F58CBF00EB3665 /* JSCSSValue.cpp in Sources */,
+ 14CF7B3309F6ECD700EB3665 /* JSCSSRule.cpp in Sources */,
938E65F709F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp in Sources */,
938E666009F09B81008A48EC /* JSHTMLCanvasElement.cpp in Sources */,
938E685409F0BE04008A48EC /* CompositeOperator.cpp in Sources */,
8116895F09F2A4A000772CA0 /* SVGTRefElement.cpp in Sources */,
+ 14115B7209F84CD600CA4FC1 /* JSNodeFilter.cpp in Sources */,
+ 14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */,
93EB169509F880B00091F8FF /* WebCoreSystemInterface.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
#include "Document.h"
#include "HTMLNames.h"
#include "JSCSSPrimitiveValue.h"
+#include "JSCSSRule.h"
#include "css_base.h"
#include "css_ruleimpl.h"
#include "css_stylesheetimpl.h"
{
CSSRule &cssRule = *m_impl;
switch (cssRule.type()) {
- case WebCore::STYLE_RULE:
+ case CSSRule::STYLE_RULE:
return &style_info;
- case WebCore::MEDIA_RULE:
+ case CSSRule::MEDIA_RULE:
return &media_info;
- case WebCore::FONT_FACE_RULE:
+ case CSSRule::FONT_FACE_RULE:
return &fontface_info;
- case WebCore::PAGE_RULE:
+ case CSSRule::PAGE_RULE:
return &page_info;
- case WebCore::IMPORT_RULE:
+ case CSSRule::IMPORT_RULE:
return &import_info;
- case WebCore::CHARSET_RULE:
+ case CSSRule::CHARSET_RULE:
return &charset_info;
- case WebCore::UNKNOWN_RULE:
+ case CSSRule::UNKNOWN_RULE:
default:
return &info;
}
bool DOMCSSRule::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
{
// first try the properties specific to this rule type
- const HashEntry* entry = Lookup::findEntry(classInfo()->propHashTable, propertyName);
+ const HashEntry* entry = Lookup::findEntry(DOMCSSRule::classInfo()->propHashTable, propertyName);
if (entry) {
slot.setStaticEntry(this, entry, staticValueGetter<DOMCSSRule>);
return true;
void DOMCSSRule::put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr)
{
- const HashTable* table = classInfo()->propHashTable; // get the right hashtable
+ const HashTable* table = DOMCSSRule::classInfo()->propHashTable; // get the right hashtable
const HashEntry* entry = Lookup::findEntry(table, propertyName);
if (entry) {
if (entry->attr & Function) // function: put as override property
return throwError(exec, TypeError);
CSSRule &cssRule = *static_cast<DOMCSSRule *>(thisObj)->impl();
- if (cssRule.type() == WebCore::MEDIA_RULE) {
+ if (cssRule.type() == CSSRule::MEDIA_RULE) {
CSSMediaRule &rule = static_cast<CSSMediaRule &>(cssRule);
if (id == DOMCSSRule::Media_InsertRule)
return jsNumber(rule.insertRule(args[0]->toString(exec), args[1]->toInt32(exec)));
JSValue *toJS(ExecState *exec, CSSRule *r)
{
- return cacheDOMObject<CSSRule, DOMCSSRule>(exec, r);
-}
-
-// -------------------------------------------------------------------------
-
-const ClassInfo CSSRuleConstructor::info = { "CSSRuleConstructor", 0, &CSSRuleConstructorTable, 0 };
-/*
-@begin CSSRuleConstructorTable 7
- UNKNOWN_RULE CSSRuleConstructor::UNKNOWN_RULE DontDelete|ReadOnly
- STYLE_RULE CSSRuleConstructor::STYLE_RULE DontDelete|ReadOnly
- CHARSET_RULE CSSRuleConstructor::CHARSET_RULE DontDelete|ReadOnly
- IMPORT_RULE CSSRuleConstructor::IMPORT_RULE DontDelete|ReadOnly
- MEDIA_RULE CSSRuleConstructor::MEDIA_RULE DontDelete|ReadOnly
- FONT_FACE_RULE CSSRuleConstructor::FONT_FACE_RULE DontDelete|ReadOnly
- PAGE_RULE CSSRuleConstructor::PAGE_RULE DontDelete|ReadOnly
-@end
-*/
-
-bool CSSRuleConstructor::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticValueSlot<CSSRuleConstructor, DOMObject>(exec, &CSSRuleConstructorTable, this, propertyName, slot);
-}
-
-JSValue *CSSRuleConstructor::getValueProperty(ExecState *, int token) const
-{
- switch (token) {
- case UNKNOWN_RULE:
- return jsNumber(WebCore::UNKNOWN_RULE);
- case STYLE_RULE:
- return jsNumber(WebCore::STYLE_RULE);
- case CHARSET_RULE:
- return jsNumber(WebCore::CHARSET_RULE);
- case IMPORT_RULE:
- return jsNumber(WebCore::IMPORT_RULE);
- case MEDIA_RULE:
- return jsNumber(WebCore::MEDIA_RULE);
- case FONT_FACE_RULE:
- return jsNumber(WebCore::FONT_FACE_RULE);
- case PAGE_RULE:
- return jsNumber(WebCore::PAGE_RULE);
- }
- return NULL;
-}
-
-JSValue *getCSSRuleConstructor(ExecState *exec)
-{
- return cacheGlobalObject<CSSRuleConstructor>( exec, "[[cssRule.constructor]]" );
+ return cacheDOMObject<CSSRule, JSCSSRule>(exec, r);
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
-const ClassInfo CSSValueConstructor::info = { "CSSValueConstructor", 0, &CSSValueConstructorTable, 0 };
-/*
-@begin CSSValueConstructorTable 5
- CSS_INHERIT CSSValueConstructor::CSS_INHERIT DontDelete|ReadOnly
- CSS_PRIMITIVE_VALUE CSSValueConstructor::CSS_PRIMITIVE_VALUE DontDelete|ReadOnly
- CSS_VALUE_LIST CSSValueConstructor::CSS_VALUE_LIST DontDelete|ReadOnly
- CSS_CUSTOM CSSValueConstructor::CSS_CUSTOM DontDelete|ReadOnly
-@end
-*/
-bool CSSValueConstructor::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticValueSlot<CSSValueConstructor, DOMObject>(exec, &CSSValueConstructorTable, this, propertyName, slot);
-}
-
-JSValue *CSSValueConstructor::getValueProperty(ExecState *, int token) const
-{
- switch (token) {
- case CSS_INHERIT:
- return jsNumber(WebCore::CSSValue::CSS_INHERIT);
- case CSS_PRIMITIVE_VALUE:
- return jsNumber(WebCore::CSSValue::CSS_PRIMITIVE_VALUE);
- case CSS_VALUE_LIST:
- return jsNumber(WebCore::CSSValue::CSS_VALUE_LIST);
- case CSS_CUSTOM:
- return jsNumber(WebCore::CSSValue::CSS_CUSTOM);
- }
- return NULL;
-}
-
-JSValue *getCSSValueConstructor(ExecState *exec)
-{
- return cacheGlobalObject<CSSValueConstructor>( exec, "[[cssValue.constructor]]" );
-}
-
-// -------------------------------------------------------------------------
-
const ClassInfo DOMCSSValueList::info = { "CSSValueList", 0, &DOMCSSValueListTable, 0 };
/*
JSValue* toJS(ExecState*, WebCore::CSSRule*);
- // Constructor for CSSRule - currently only used for some global values
- class CSSRuleConstructor : public DOMObject {
- public:
- CSSRuleConstructor(ExecState *) { }
- virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
- JSValue *getValueProperty(ExecState *exec, int token) const;
- // no put - all read-only
- virtual const ClassInfo* classInfo() const { return &info; }
- static const ClassInfo info;
- enum { UNKNOWN_RULE, STYLE_RULE, CHARSET_RULE, IMPORT_RULE, MEDIA_RULE, FONT_FACE_RULE, PAGE_RULE };
- };
-
- JSValue *getCSSRuleConstructor(ExecState *exec);
-
class DOMCSSValue : public DOMObject {
public:
DOMCSSValue(ExecState *, WebCore::CSSValue *v) : m_impl(v) { }
JSValue* toJS(ExecState*, WebCore::CSSValue*);
- // Constructor for CSSValue - currently only used for some global values
- class CSSValueConstructor : public DOMObject {
- public:
- CSSValueConstructor(ExecState *) { }
- virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
- JSValue *getValueProperty(ExecState *exec, int token) const;
- // no put - all read-only
- virtual const ClassInfo* classInfo() const { return &info; }
- static const ClassInfo info;
- enum { CSS_VALUE_LIST, CSS_PRIMITIVE_VALUE, CSS_CUSTOM, CSS_INHERIT };
- };
-
- JSValue *getCSSValueConstructor(ExecState *exec);
-
class DOMCSSValueList : public DOMCSSValue {
public:
DOMCSSValueList(ExecState *exec, WebCore::CSSValueList *l);
#include "Document.h"
#include "EventNames.h"
#include "Frame.h"
+#include "JSEvent.h"
#include "JSMutationEvent.h"
#include "JSWheelEvent.h"
#include "JSMouseEvent.h"
// -------------------------------------------------------------------------
-const ClassInfo EventConstructor::info = { "EventConstructor", 0, &EventConstructorTable, 0 };
-/*
-@begin EventConstructorTable 3
- CAPTURING_PHASE WebCore::Event::CAPTURING_PHASE DontDelete|ReadOnly
- AT_TARGET WebCore::Event::AT_TARGET DontDelete|ReadOnly
- BUBBLING_PHASE WebCore::Event::BUBBLING_PHASE DontDelete|ReadOnly
-# Reverse-engineered from Netscape
- MOUSEDOWN 1 DontDelete|ReadOnly
- MOUSEUP 2 DontDelete|ReadOnly
- MOUSEOVER 4 DontDelete|ReadOnly
- MOUSEOUT 8 DontDelete|ReadOnly
- MOUSEMOVE 16 DontDelete|ReadOnly
- MOUSEDRAG 32 DontDelete|ReadOnly
- CLICK 64 DontDelete|ReadOnly
- DBLCLICK 128 DontDelete|ReadOnly
- KEYDOWN 256 DontDelete|ReadOnly
- KEYUP 512 DontDelete|ReadOnly
- KEYPRESS 1024 DontDelete|ReadOnly
- DRAGDROP 2048 DontDelete|ReadOnly
- FOCUS 4096 DontDelete|ReadOnly
- BLUR 8192 DontDelete|ReadOnly
- SELECT 16384 DontDelete|ReadOnly
- CHANGE 32768 DontDelete|ReadOnly
-@end
-*/
-
-bool EventConstructor::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticValueSlot<EventConstructor, DOMObject>(exec, &EventConstructorTable, this, propertyName, slot);
-}
-
-JSValue *EventConstructor::getValueProperty(ExecState *, int token) const
-{
- // We use the token as the value to return directly
- return jsNumber(token);
-}
-
-JSValue *getEventConstructor(ExecState *exec)
-{
- return cacheGlobalObject<EventConstructor>(exec, "[[event.constructor]]");
-}
-
-// -------------------------------------------------------------------------
-
const ClassInfo DOMEvent::info = { "Event", 0, &DOMEventTable, 0 };
/*
@begin DOMEventTable 12
else if (e->isMutationEvent())
ret = new JSMutationEvent(exec, static_cast<MutationEvent *>(e));
else
- ret = new DOMEvent(exec, e);
+ ret = new JSEvent(exec, e);
interp->putDOMObject(e, ret);
}
// -------------------------------------------------------------------------
-
-const ClassInfo EventExceptionConstructor::info = { "EventExceptionConstructor", 0, &EventExceptionConstructorTable, 0 };
-/*
-@begin EventExceptionConstructorTable 1
- UNSPECIFIED_EVENT_TYPE_ERR WebCore::UNSPECIFIED_EVENT_TYPE_ERR-WebCore::EventExceptionOffset DontDelete|ReadOnly
-@end
-*/
-bool EventExceptionConstructor::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticValueSlot<EventExceptionConstructor, DOMObject>(exec, &EventExceptionConstructorTable, this, propertyName, slot);
-}
-
-JSValue *EventExceptionConstructor::getValueProperty(ExecState *, int token) const
-{
- // We use the token as the value to return directly
- return jsNumber(token);
-}
-
-JSValue *getEventExceptionConstructor(ExecState *exec)
-{
- return cacheGlobalObject<EventExceptionConstructor>(exec, "[[eventException.constructor]]");
-}
-
-// -------------------------------------------------------------------------
-
const ClassInfo Clipboard::info = { "Clipboard", 0, &ClipboardTable, 0 };
/* Source for ClipboardTable. Use "make hashtables" to regenerate.
KJS_DEFINE_PROTOTYPE(DOMEventProto)
- // Constructor object EventException
- class EventExceptionConstructor : public DOMObject {
- public:
- EventExceptionConstructor(ExecState*) { }
- virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
- JSValue* getValueProperty(ExecState*, int token) const;
- // no put - all read-only
- virtual const ClassInfo* classInfo() const { return &info; }
- static const ClassInfo info;
- };
-
- JSValue* getEventExceptionConstructor(ExecState*);
-
class Clipboard : public DOMObject {
friend class ClipboardProtoFunc;
public:
OptionConstructorImp::OptionConstructorImp(ExecState *exec, Document *d)
: m_doc(d)
{
- // ## isn't there some redundancy between JSObject::_proto and the "prototype" property ?
- //put(exec,"prototype", ...,DontEnum|DontDelete|ReadOnly);
-
- // no. of arguments for constructor
- // ## is 4 correct ? 0 to 4, it seems to be
put(exec,lengthPropertyName, jsNumber(4), ReadOnly|DontDelete|DontEnum);
}
#include "Document.h"
#include "Frame.h"
+#include "JSNodeFilter.h"
#include "kjs_proxy.h"
#include "kjs_traversal.lut.h"
}
-// -------------------------------------------------------------------------
-
-const ClassInfo NodeFilterConstructor::info = { "NodeFilterConstructor", 0, &NodeFilterConstructorTable, 0 };
-/*
-@begin NodeFilterConstructorTable 17
- FILTER_ACCEPT WebCore::NodeFilter::FILTER_ACCEPT DontDelete|ReadOnly
- FILTER_REJECT WebCore::NodeFilter::FILTER_REJECT DontDelete|ReadOnly
- FILTER_SKIP WebCore::NodeFilter::FILTER_SKIP DontDelete|ReadOnly
- SHOW_ALL WebCore::NodeFilter::SHOW_ALL DontDelete|ReadOnly
- SHOW_ELEMENT WebCore::NodeFilter::SHOW_ELEMENT DontDelete|ReadOnly
- SHOW_ATTRIBUTE WebCore::NodeFilter::SHOW_ATTRIBUTE DontDelete|ReadOnly
- SHOW_TEXT WebCore::NodeFilter::SHOW_TEXT DontDelete|ReadOnly
- SHOW_CDATA_SECTION WebCore::NodeFilter::SHOW_CDATA_SECTION DontDelete|ReadOnly
- SHOW_ENTITY_REFERENCE WebCore::NodeFilter::SHOW_ENTITY_REFERENCE DontDelete|ReadOnly
- SHOW_ENTITY WebCore::NodeFilter::SHOW_ENTITY DontDelete|ReadOnly
- SHOW_PROCESSING_INSTRUCTION WebCore::NodeFilter::SHOW_PROCESSING_INSTRUCTION DontDelete|ReadOnly
- SHOW_COMMENT WebCore::NodeFilter::SHOW_COMMENT DontDelete|ReadOnly
- SHOW_DOCUMENT WebCore::NodeFilter::SHOW_DOCUMENT DontDelete|ReadOnly
- SHOW_DOCUMENT_TYPE WebCore::NodeFilter::SHOW_DOCUMENT_TYPE DontDelete|ReadOnly
- SHOW_DOCUMENT_FRAGMENT WebCore::NodeFilter::SHOW_DOCUMENT_FRAGMENT DontDelete|ReadOnly
- SHOW_NOTATION WebCore::NodeFilter::SHOW_NOTATION DontDelete|ReadOnly
-@end
-*/
-bool NodeFilterConstructor::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticValueSlot<NodeFilterConstructor, DOMObject>(exec, &NodeFilterConstructorTable, this, propertyName, slot);
-}
-
-JSValue *NodeFilterConstructor::getValueProperty(ExecState *, int token) const
-{
- // We use the token as the value to return directly
- return jsNumber(token);
-}
-
-JSValue *getNodeFilterConstructor(ExecState *exec)
-{
- return cacheGlobalObject<NodeFilterConstructor>(exec, "[[nodeFilter.constructor]]");
-}
-
// -------------------------------------------------------------------------
const ClassInfo DOMNodeFilter::info = { "NodeFilter", 0, 0, 0 };
JSValue *toJS(ExecState* exec, NodeFilter* nf)
{
- return cacheDOMObject<NodeFilter, DOMNodeFilter>(exec, nf);
+ return cacheDOMObject<NodeFilter, JSNodeFilter>(exec, nf);
}
PassRefPtr<NodeFilter> toNodeFilter(JSValue* val)
RefPtr<WebCore::NodeIterator> m_impl;
};
- // Constructor object NodeFilter
- class NodeFilterConstructor : public DOMObject {
- public:
- NodeFilterConstructor(ExecState*) { }
- virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
- JSValue *getValueProperty(ExecState*, int token) const;
- // no put - all read-only
- virtual const ClassInfo* classInfo() const { return &info; }
- static const ClassInfo info;
- };
-
class DOMNodeFilter : public DOMObject {
public:
DOMNodeFilter(ExecState*, WebCore::NodeFilter*);
};
JSValue* toJS(ExecState*, WebCore::NodeIterator*);
- JSValue* getNodeFilterConstructor(ExecState*);
JSValue* toJS(ExecState*, WebCore::NodeFilter*);
JSValue* toJS(ExecState*, WebCore::TreeWalker*);
#include "Frame.h"
#include "FrameTree.h"
#include "HTMLDocument.h"
+#include "JSCSSRule.h"
+#include "JSCSSValue.h"
#include "JSDOMParser.h"
#include "JSDOMWindow.h"
+#include "JSEvent.h"
#include "JSMutationEvent.h"
+#include "JSNodeFilter.h"
#include "JSRange.h"
#include "JSXMLHttpRequest.h"
#include "JSXMLSerializer.h"
+#include "KWQKHTMLSettings.h"
#include "Logging.h"
#include "Page.h"
#include "PlugInInfoStore.h"
#include "css_stylesheetimpl.h"
#include "dom2_eventsimpl.h"
#include "htmlediting.h"
-#include "KWQKHTMLSettings.h"
#include "kjs_css.h"
#include "kjs_events.h"
#include "kjs_navigator.h"
NodeFilter Window::NodeFilter DontDelete
DOMException Window::DOMException DontDelete
CSSRule Window::CSSRule DontDelete
+ CSSValue Window::CSSValue DontDelete
MutationEvent Window::MutationEventCtor DontDelete
frames Window::Frames DontDelete|ReadOnly
history Window::History_ DontDelete|ReadOnly
case Range:
return JSRange::getConstructor(exec);
case NodeFilter:
- return getNodeFilterConstructor(exec);
+ return JSNodeFilter::getConstructor(exec);
case DOMException:
return getDOMExceptionConstructor(exec);
case CSSRule:
- return getCSSRuleConstructor(exec);
+ return JSCSSRule::getConstructor(exec);
+ case CSSValue:
+ return JSCSSValue::getConstructor(exec);
case EventCtor:
- return getEventConstructor(exec);
+ return JSEvent::getConstructor(exec);
case MutationEventCtor:
return JSMutationEvent::getConstructor(exec);
case Frames:
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
enum { Closed, Crypto, DefaultStatus, Status, Node, EventCtor, MutationEventCtor, Range,
- NodeFilter, DOMException, CSSRule, Frames, History_, Event_, InnerHeight,
+ NodeFilter, DOMException, CSSRule, CSSValue, Frames, History_, Event_, InnerHeight,
InnerWidth, Length, Location_, Locationbar, Name, Navigator_, ClientInformation,
Menubar, OffscreenBuffering, Opener, OuterHeight, OuterWidth, PageXOffset, PageYOffset,
Parent, Personalbar, ScreenX, ScreenY, Scrollbars, Scroll, ScrollBy,
return "#include \"kjs_css.h\"\n\n";
} elsif ($module eq "html") {
return "#include \"kjs_html.h\"\n\n";
+ } elsif ($module eq "traversal") {
+ return "#include \"kjs_traversal.h\"\n\n";
} else {
die ("Don't know what headers to include for module $module");
}
$type eq "CanvasPattern" or
$type eq "CharacterData" or
$type eq "Comment" or
+ $type eq "DOMException" or
$type eq "DOMImplementation" or
$type eq "DOMWindow" or
$type eq "Document" or
$implIncludes{"${type}.h"} = 1;
} elsif ($type eq "CSSStyleSheet" or $type eq "StyleSheet") {
$implIncludes{"css_stylesheetimpl.h"} = 1;
- } elsif ($type eq "CSSRuleList") {
+ } elsif ($type eq "CSSRuleList" or
+ $type eq "CSSRule") {
$implIncludes{"css_ruleimpl.h"} = 1;
- } elsif ($type eq "CSSPrimitiveValue" or $type eq "Counter" or $type eq "Rect" or $type eq "RGBColor") {
+ } elsif ($type eq "CSSPrimitiveValue" or
+ $type eq "CSSValue" or
+ $type eq "Counter" or
+ $type eq "Rect" or
+ $type eq "RGBColor") {
$implIncludes{"css_valueimpl.h"} = 1;
} elsif ($type eq "CSSStyleDeclaration") {
$implIncludes{"css_valueimpl.h"} = 1;
$type eq "WheelEvent") {
$implIncludes{"dom2_eventsimpl.h"} = 1;
} elsif ($type eq "NodeIterator" or
+ $type eq "NodeFilter" or
$type eq "TreeWalker") {
$implIncludes{"dom2_traversalimpl.h"} = 1;
} elsif ($type eq "ProcessingInstruction" or
}
# Add prototype declaration -- code adopted from the KJS_DEFINE_PROTOTYPE and KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE macros
- if ($numFunctions > 0) {
+ if ($numFunctions > 0 || $numConstants > 0) {
push(@headerContent, "class ${className}Proto : public KJS::JSObject {\n");
if (!$dataNode->extendedAttributes->{"DoNotCache"}) {
push(@headerContent, " friend KJS::JSObject* KJS_GCC_ROOT_NS_HACK cacheGlobalObject<${className}Proto>(KJS::ExecState*, const KJS::Identifier& propertyName);\n");
push(@headerContent, " virtual const KJS::ClassInfo* classInfo() const { return &info; }\n");
push(@headerContent, " static const KJS::ClassInfo info;\n");
push(@headerContent, " bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);\n");
+ if ($numConstants ne 0) {
+ push(@headerContent, " KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;\n");
+ }
push(@headerContent, "protected:\n");
if ($dataNode->extendedAttributes->{"DoNotCache"}) {
push(@headerContent, " ${className}Proto() { }\n");
} else {
push(@headerContent, " ${className}Proto(KJS::ExecState* exec)\n");
- if ($hasParent) {
+ if ($hasParent && $parentClassName ne "KJS::DOMCSSRule" && $parentClassName ne "KJS::DOMNodeFilter") {
push(@headerContent, " : KJS::JSObject(${parentClassName}Proto::self(exec)) { }\n");
} else {
push(@headerContent, " : KJS::JSObject(exec->lexicalInterpreter()->builtinObjectPrototype()) { }\n");
"(exec, &${className}ConstructorTable, this, propertyName, slot);\n}\n\n");
push(@implContent, "JSValue* ${className}Constructor::getValueProperty(ExecState*, int token) const\n{\n");
- push(@implContent, " // We use the token as the value to return directly\n");
+ push(@implContent, " // The token is the numeric value of its associated constant\n");
push(@implContent, " return jsNumber(token);\n}\n\n");
}
- # - Add all functions in a hashtable definition, if we have any.
+ # - Add functions and constants to a hashtable definition
my $numFunctions = @{$dataNode->functions};
- if ($numFunctions ne 0) {
- $hashSize = $numFunctions;
+ if ($numFunctions > 0 || $numConstants > 0) {
+ $hashSize = $numFunctions + $numConstants;
$hashName = $className . "ProtoTable";
@hashKeys = ();
@hashSpecials = ();
@hashParameters = ();
+ foreach my $constant (@{$dataNode->constants}) {
+ my $name = $constant->name;
+ push(@hashKeys, $name);
+
+ my $value = "${implClassName}::$name";
+ push(@hashValues, $value);
+
+ my $special = "DontDelete|ReadOnly";
+ push(@hashSpecials, $special);
+
+ my $numParameters = 0;
+ push(@hashParameters, $numParameters);
+ }
+
foreach my $function (@{$dataNode->functions}) {
my $name = $function->signature->name;
push(@hashKeys, $name);
\@hashKeys, \@hashValues,
\@hashSpecials, \@hashParameters);
- push(@implContent, "class ${className}ProtoFunc : public InternalFunctionImp {\n");
- push(@implContent, "public:\n");
- push(@implContent, " ${className}ProtoFunc(ExecState* exec, int i, int len, const Identifier& name)\n");
- push(@implContent, " : InternalFunctionImp(static_cast<FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)\n");
- push(@implContent, " , id(i)\n");
- push(@implContent, " {\n");
- push(@implContent, " put(exec, lengthPropertyName, jsNumber(len), DontDelete|ReadOnly|DontEnum);\n");
- push(@implContent, " }\n");
- push(@implContent, " virtual JSValue* callAsFunction(ExecState* exec, JSObject* thisObj, const List& args);\n");
- push(@implContent, "private:\n");
- push(@implContent, " int id;\n");
- push(@implContent, "};\n\n");
+ if($numFunctions > 0) {
+ push(@implContent, "class ${className}ProtoFunc : public InternalFunctionImp {\n");
+ push(@implContent, "public:\n");
+ push(@implContent, " ${className}ProtoFunc(ExecState* exec, int i, int len, const Identifier& name)\n");
+ push(@implContent, " : InternalFunctionImp(static_cast<FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)\n");
+ push(@implContent, " , id(i)\n");
+ push(@implContent, " {\n");
+ push(@implContent, " put(exec, lengthPropertyName, jsNumber(len), DontDelete|ReadOnly|DontEnum);\n");
+ push(@implContent, " }\n");
+ push(@implContent, " virtual JSValue* callAsFunction(ExecState* exec, JSObject* thisObj, const List& args);\n");
+ push(@implContent, "private:\n");
+ push(@implContent, " int id;\n");
+ push(@implContent, "};\n\n");
+ }
push(@implContent, "const ClassInfo ${className}Proto::info = { \"$className\", 0, &${className}ProtoTable, 0 };\n\n");
if ($dataNode->extendedAttributes->{"DoNotCache"}) {
}
push(@implContent, "bool ${className}Proto::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)\n");
push(@implContent, "{\n");
- push(@implContent, " return getStaticFunctionSlot<${className}ProtoFunc, JSObject>(exec, &${className}ProtoTable, this, propertyName, slot);\n");
+ if ($numConstants eq 0) {
+ push(@implContent, " return getStaticFunctionSlot<${className}ProtoFunc, JSObject>(exec, &${className}ProtoTable, this, propertyName, slot);\n");
+ } elsif ($numFunctions eq 0) {
+ push(@implContent, " return getStaticValueSlot<${className}Proto, JSObject>(exec, &${className}ProtoTable, this, propertyName, slot);\n");
+ } else {
+ push(@implContent, " return getStaticPropertySlot<${className}ProtoFunc, ${className}Proto, JSObject>(exec, &${className}ProtoTable, this, propertyName, slot);\n");
+ }
push(@implContent, "}\n\n");
+ if ($numConstants ne 0) {
+ push(@implContent, "JSValue* ${className}Proto::getValueProperty(ExecState*, int token) const\n{\n");
+ push(@implContent, " // The token is the numeric value of its associated constant\n");
+ push(@implContent, " return jsNumber(token);\n}\n\n");
+ }
}
# - Initialize static ClassInfo object
if ($dataNode->extendedAttributes->{"DoNotCache"}) {
push(@implContent, "{\n setPrototype(${className}Proto::self());\n}\n\n");
- } elsif ($numFunctions ne 0) {
+ } elsif ($numFunctions ne 0 || $numConstants ne 0) {
push(@implContent, "{\n setPrototype(${className}Proto::self(exec));\n}\n\n");
} else {
push(@implContent, "{\n}\n\n");
module css {
- interface [LegacyParent=KJS::DOMCSSValue] CSSPrimitiveValue : CSSValue {
+ interface CSSPrimitiveValue : CSSValue {
// UnitTypes
const unsigned short CSS_UNKNOWN = 0;
--- /dev/null
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+module css {
+
+ // Introduced in DOM Level 2:
+ interface [LegacyParent=KJS::DOMCSSRule] CSSRule {
+
+ // RuleType
+ const unsigned short UNKNOWN_RULE = 0;
+ const unsigned short STYLE_RULE = 1;
+ const unsigned short CHARSET_RULE = 2;
+ const unsigned short IMPORT_RULE = 3;
+ const unsigned short MEDIA_RULE = 4;
+ const unsigned short FONT_FACE_RULE = 5;
+ const unsigned short PAGE_RULE = 6;
+ };
+}
--- /dev/null
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+module css {
+
+ interface [LegacyParent=KJS::DOMCSSValue] CSSValue {
+ const unsigned short CSS_INHERIT = 0;
+ const unsigned short CSS_PRIMITIVE_VALUE = 1;
+ const unsigned short CSS_VALUE_LIST = 2;
+ const unsigned short CSS_CUSTOM = 3;
+ };
+
+}
class CSSStyleSheet;
class MediaList;
-enum CSSRuleType { UNKNOWN_RULE, STYLE_RULE, CHARSET_RULE, IMPORT_RULE, MEDIA_RULE, FONT_FACE_RULE, PAGE_RULE };
-
class CSSRule : public StyleBase
{
public:
+ enum CSSRuleType {
+ UNKNOWN_RULE,
+ STYLE_RULE,
+ CHARSET_RULE,
+ IMPORT_RULE,
+ MEDIA_RULE,
+ FONT_FACE_RULE,
+ PAGE_RULE
+ };
+
CSSRule(StyleBase *parent)
: StyleBase(parent), m_type(UNKNOWN_RULE) {}
} m_value;
};
-// FIXME: Remove when we rename everything to remove Impl.
-typedef CSSPrimitiveValue CSSPrimitiveValue;
-
// This value is used to handle quirky margins in reflow roots (body, td, and th) like WinIE.
// The basic idea is that a stylesheet can use the value __qem (for quirky em) instead of em
// in a stylesheet. When the quirky value is used, if you're in quirks mode, the margin will
--- /dev/null
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+module events {
+
+ // Introduced in DOM Level 2:
+ interface [LegacyParent=KJS::DOMEvent] Event {
+
+ // DOM PhaseType
+ const unsigned short CAPTURING_PHASE = 1;
+ const unsigned short AT_TARGET = 2;
+ const unsigned short BUBBLING_PHASE = 3;
+
+ // Reverse-engineered from Netscape
+ const unsigned short MOUSEDOWN = 1;
+ const unsigned short MOUSEUP = 2;
+ const unsigned short MOUSEOVER = 4;
+ const unsigned short MOUSEOUT = 8;
+ const unsigned short MOUSEMOVE = 16;
+ const unsigned short MOUSEDRAG = 32;
+ const unsigned short CLICK = 64;
+ const unsigned short DBLCLICK = 128;
+ const unsigned short KEYDOWN = 256;
+ const unsigned short KEYUP = 512;
+ const unsigned short KEYPRESS = 1024;
+ const unsigned short DRAGDROP = 2048;
+ const unsigned short FOCUS = 4096;
+ const unsigned short BLUR = 8192;
+ const unsigned short SELECT = 16384;
+ const unsigned short CHANGE = 32768;
+ };
+}
module events {
- interface [LegacyParent=KJS::DOMEvent] MutationEvent : Event {
+ interface MutationEvent : Event {
// DOM Level 2
--- /dev/null
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+module traversal {
+
+ // Introduced in DOM Level 2:
+ interface [LegacyParent=KJS::DOMNodeFilter] NodeFilter {
+
+ // Constants returned by acceptNode
+ const short FILTER_ACCEPT = 1;
+ const short FILTER_REJECT = 2;
+ const short FILTER_SKIP = 3;
+
+ // Constants for whatToShow
+ const unsigned long SHOW_ALL = 0xFFFFFFFF;
+ const unsigned long SHOW_ELEMENT = 0x00000001;
+ const unsigned long SHOW_ATTRIBUTE = 0x00000002;
+ const unsigned long SHOW_TEXT = 0x00000004;
+ const unsigned long SHOW_CDATA_SECTION = 0x00000008;
+ const unsigned long SHOW_ENTITY_REFERENCE = 0x00000010;
+ const unsigned long SHOW_ENTITY = 0x00000020;
+ const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x00000040;
+ const unsigned long SHOW_COMMENT = 0x00000080;
+ const unsigned long SHOW_DOCUMENT = 0x00000100;
+ const unsigned long SHOW_DOCUMENT_TYPE = 0x00000200;
+ const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400;
+ const unsigned long SHOW_NOTATION = 0x00000800;
+ };
+
+}
+\ No newline at end of file
// Introduced in DOM Level 2:
- interface [LegacyParent=KJS::DOMEvent] UIEvent : Event {
+ interface UIEvent : Event {
readonly attribute DOMWindow view;
readonly attribute long detail;
class Event : public Shared<Event>
{
public:
- enum PhaseType { CAPTURING_PHASE = 1, AT_TARGET = 2, BUBBLING_PHASE = 3 };
+ enum PhaseType {
+ CAPTURING_PHASE = 1,
+ AT_TARGET = 2,
+ BUBBLING_PHASE = 3
+ };
+
+ // Reverse-engineered from Netscape
+ enum EventType {
+ MOUSEDOWN = 1,
+ MOUSEUP = 2,
+ MOUSEOVER = 4,
+ MOUSEOUT = 8,
+ MOUSEMOVE = 16,
+ MOUSEDRAG = 32,
+ CLICK = 64,
+ DBLCLICK = 128,
+ KEYDOWN = 256,
+ KEYUP = 512,
+ KEYPRESS = 1024,
+ DRAGDROP = 2048,
+ FOCUS = 4096,
+ BLUR = 8192,
+ SELECT = 16384,
+ CHANGE = 32768
+ };
+
Event();
Event(const AtomicString& type, bool canBubbleArg, bool cancelableArg);
virtual ~Event();