Changeset 29428 in webkit
- Timestamp:
- Jan 11, 2008, 11:19:27 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r29425 r29428 1 2008-01-11 Geoffrey Garen <ggaren@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Fixed <rdar://problem/5665251> REGRESSION (r28880-r28886): Global 6 variable access (16644) 7 8 This bug was caused by var declarations shadowing built-in properties of 9 the global object. 10 11 To match Firefox, we've decided that var declarations will never shadow 12 built-in properties of the global object or its prototypes. We used to 13 behave more like IE, which allows shadowing, but walking that line got 14 us into trouble with websites that sent us down the Firefox codepath. 15 16 * kjs/JSVariableObject.h: 17 (KJS::JSVariableObject::symbolTableGet): New code to support calling 18 hasProperty before the variable object is fully initialized (so you 19 can call it during initialization). 20 21 * kjs/nodes.cpp:. 22 (KJS::ProgramNode::initializeSymbolTable): Always do a full hasProperty 23 check when looking for duplicates, not getDirect, since it only checks 24 the property map, and not hasOwnProperty, since it doesn't check 25 prototypes. 26 (KJS::EvalNode::processDeclarations): ditto 27 28 * kjs/property_slot.h: 29 (KJS::PropertySlot::ungettableGetter): Best function name evar. 30 1 31 2008-01-11 Cameron Zwarich <cwzwarich@uwaterloo.ca> 2 32 -
trunk/JavaScriptCore/kjs/JSVariableObject.h
r29425 r29428 92 92 size_t index = symbolTable().get(propertyName.ustring().rep()); 93 93 if (index != missingSymbolMarker()) { 94 #ifndef NDEBUG 95 // During initialization, the variable object needs to advertise that it has certain 96 // properties, even if they're not ready for access yet. This check verifies that 97 // no one tries to access such a property. 98 99 // In a release build, we optimize this check away and just return an invalid pointer. 100 // There's no harm in an invalid pointer, since no one dereferences it. 101 if (index >= d->localStorage.size()) { 102 slot.setUngettable(this); 103 return true; 104 } 105 #endif 94 106 slot.setValueSlot(this, &d->localStorage[index].value); 95 107 return true; -
trunk/JavaScriptCore/kjs/nodes.cpp
r29425 r29428 4327 4327 for (size_t i = 0; i < size; ++i) { 4328 4328 const Identifier& ident = m_varStack[i].first; 4329 if (variableObject-> getDirect(ident)) {4329 if (variableObject->hasProperty(exec, ident)) { 4330 4330 m_varIndexes[i] = missingSymbolMarker(); // Signal not to initialize this declaration. 4331 4331 continue; … … 4475 4475 Identifier& ident = m_varStack[i].first; 4476 4476 bool isConstant = m_varStack[i].second & DeclarationStacks::IsConstant; 4477 if (variableObject->has OwnProperty(exec, ident))4477 if (variableObject->hasProperty(exec, ident)) 4478 4478 continue; 4479 4479 int attributes = minAttributes; -
trunk/JavaScriptCore/kjs/property_slot.cpp
r29067 r29428 33 33 } 34 34 35 JSValue* PropertySlot::ungettableGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&) 36 { 37 ASSERT_NOT_REACHED(); 38 return jsUndefined(); 39 } 40 35 41 JSValue *PropertySlot::functionGetter(ExecState* exec, JSObject* originalObject, const Identifier&, const PropertySlot& slot) 36 42 { -
trunk/JavaScriptCore/kjs/property_slot.h
r27633 r29428 110 110 } 111 111 112 void setUngettable(JSObject* slotBase) // Used to signal that you have a property, but trying to get it at this time is an error. 113 { 114 m_slotBase = slotBase; 115 m_getValue = ungettableGetter; 116 } 117 112 118 JSObject* slotBase() const { return m_slotBase; } 113 119 … … 117 123 private: 118 124 static JSValue* undefinedGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&); 125 static JSValue* ungettableGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&); 119 126 static JSValue* functionGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&); 120 127 -
trunk/LayoutTests/ChangeLog
r29427 r29428 1 2008-01-11 Geoffrey Garen <ggaren@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Fixed <rdar://problem/5665251> REGRESSION (r28880-r28886): Global 6 variable access (16644) 7 8 Added a test. Updated other tests to match new behavior. 9 10 * fast/js/var-declarations-shadowing-expected.txt: Added. 11 * fast/js/var-declarations-shadowing.html: Added. 12 13 * fast/dom/HTMLScriptElement/script-load-events.html: Changed this test 14 a bit because the original design made it hard to understand why it was failing. 15 * fast/dom/HTMLScriptElement/script-load-events-expected.txt: 16 17 * fast/dom/Window/get-set-properties.html: Changed this test to expect 18 our new behavior, which matches Firefox. 19 * fast/dom/Window/get-set-properties-expected.txt: 20 21 * fast/dom/Window/window-property-shadowing.html: Removed some cases 22 that differed from Firefox. 23 * fast/dom/Window/window-property-shadowing-expected.txt: 24 25 * http/tests/security/cross-frame-access-put-expected.txt: This test emits 26 more "Unsafe JavaScript attempt" messages now because property sets that 27 used to be prohibited (somewhat accidentally) by the ReadOnly attribute 28 are now prohibited by security checks. 29 1 30 2008-01-11 Anyang Ren <anyang.ren@gmail.com> 2 31 -
trunk/LayoutTests/fast/dom/HTMLScriptElement/script-load-events-expected.txt
r21687 r29428 1 1 This tests for regressions against http://bugzilla.opendarwin.org/show_bug.cgi?id=5812 Generate load events for <script> elements. 2 Test result:PASS2 PASS -
trunk/LayoutTests/fast/dom/HTMLScriptElement/script-load-events.html
r21591 r29428 7 7 function loaded(i) 8 8 { 9 status[i -1] = "L";9 status[i] = "L"; 10 10 } 11 11 12 12 function erred(i) 13 13 { 14 status[i -1] = "E";14 status[i] = "E"; 15 15 } 16 16 17 17 function endTest() 18 18 { 19 var failures = ""; 20 if (status[0] != "E") 21 failures += "0 "; 22 if (status[1] != "E") 23 failures += "1 "; 24 25 if (status[2] != "L") 26 failures += "2 "; 27 if (status[3] != "L") 28 failures += "3 "; 29 if (status[4] != "L") 30 failures += "4 "; 31 if (status[5] != "L") 32 failures += "5 "; 33 19 34 var results = document.getElementById("results"); 20 21 if (status[0]=="E" && 22 status[1]=="E" && 23 status[2]=="L" && 24 status[3]=="L" && 25 status[4]=="L" && 26 status[5]=="L") 27 results.innerText = "PASS"; 35 if (failures) 36 results.innerHTML = "FAIL: The following tests failed: " + failures; 28 37 else 29 results.innerText = "FAIL: " + status; 30 } 38 results.innerHTML = "PASS"; 31 39 32 function loaded6() 33 { 34 loaded(6); 35 endTest(); 40 if (window.layoutTestController) 41 layoutTestController.notifyDone(); 36 42 } 37 43 38 44 function test() 39 45 { 40 if (window.layoutTestController) 46 if (window.layoutTestController) { 41 47 layoutTestController.dumpAsText(); 42 var e = document.createElement( "script" ) ; 43 e.type = "text/javascript" ; 44 document.getElementsByTagName("head")[0].appendChild( e ) ; 45 46 e.onload = loaded6; 47 endTest(); // called here in case the load even doesn't fire 48 e.src = 'resources/script-load.js' ; 48 layoutTestController.waitUntilDone(); 49 } 50 51 var e = document.createElement("script"); 52 e.type = "text/javascript"; 53 e.src = 'resources/script-load.js'; 54 e.onload = function() { 55 loaded(5); 56 endTest(); 57 }; 58 document.getElementsByTagName("head")[0].appendChild( e ); 49 59 } 50 60 </script> 51 61 </head> 52 62 <body onload="test()"> 63 <script type="text/javascript" onload="loaded(0)" onerror="erred(0)" src="resources/certainlydoesnotexist.js"></script> 53 64 <script type="text/javascript" onload="loaded(1)" onerror="erred(1)" src="resources/certainlydoesnotexist.js"></script> 54 <script type="text/javascript" onload="loaded(2)" onerror="erred(2)" src="resources/ certainlydoesnotexist.js"></script>65 <script type="text/javascript" onload="loaded(2)" onerror="erred(2)" src="resources/script-load.js"></script> 55 66 <script type="text/javascript" onload="loaded(3)" onerror="erred(3)" src="resources/script-load.js"></script> 56 <script type="text/javascript" onload="loaded(4)" onerror="erred(4)" src="resources/script-load.js"></script>57 67 <script type="text/javascript"> 58 document.write('<script type="text/javascript" onload="loaded( 5)" onerror="erred(5)" src="resources/script-load.js"></script'+'>');68 document.write('<script type="text/javascript" onload="loaded(4)" onerror="erred(4)" src="resources/script-load.js"></script'+'>'); 59 69 </script> 60 70 This tests for regressions against <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=5812">http://bugzilla.opendarwin.org/show_bug.cgi?id=5812</a> 61 71 Generate load events for <script> elements</i>. 62 72 <hr> 63 <p >Test result: <span id="results"></span></p>73 <p id="results">FAIL: Test never finished.</p> 64 74 </body> 65 75 </html> -
trunk/LayoutTests/fast/dom/Window/get-set-properties-expected.txt
r24182 r29428 1 T ests getting and setting window properties and functions.1 This page tests getting and setting window properties and functions. 2 2 3 3 4 4 ----- tests for getting/setting read-write properties ----- 5 5 6 PASS: canGet('addEventListener') should be 'true' and is.7 PASS: canSet('addEventListener') should be 'true' and is.8 PASS: canGet('alert') should be 'true' and is.9 PASS: canSet('alert') should be 'true' and is.10 PASS: canGet('atob') should be 'true' and is.11 PASS: canSet('atob') should be 'true' and is.12 6 PASS: canGet('Attr') should be 'true' and is. 13 7 PASS: canSet('Attr') should be 'true' and is. 14 PASS: canGet('btoa') should be 'true' and is.15 PASS: canSet('btoa') should be 'true' and is.16 PASS: canGet('captureEvents') should be 'true' and is.17 PASS: canSet('captureEvents') should be 'true' and is.18 8 PASS: canGet('CDATASection') should be 'true' and is. 19 9 PASS: canSet('CDATASection') should be 'true' and is. 20 PASS: canGet('CharacterData') should be 'true' and is.21 PASS: canSet('CharacterData') should be 'true' and is.22 PASS: canGet('clearInterval') should be 'true' and is.23 PASS: canSet('clearInterval') should be 'true' and is.24 PASS: canGet('clearTimeout') should be 'true' and is.25 PASS: canSet('clearTimeout') should be 'true' and is.26 PASS: canGet('Comment') should be 'true' and is.27 PASS: canSet('Comment') should be 'true' and is.28 PASS: canGet('console') should be 'true' and is.29 PASS: canSet('console') should be 'true' and is.30 10 PASS: canGet('CSSPrimitiveValue') should be 'true' and is. 31 11 PASS: canSet('CSSPrimitiveValue') should be 'true' and is. … … 36 16 PASS: canGet('CSSValue') should be 'true' and is. 37 17 PASS: canSet('CSSValue') should be 'true' and is. 18 PASS: canGet('CharacterData') should be 'true' and is. 19 PASS: canSet('CharacterData') should be 'true' and is. 20 PASS: canGet('Comment') should be 'true' and is. 21 PASS: canSet('Comment') should be 'true' and is. 22 PASS: canGet('DOMException') should be 'true' and is. 23 PASS: canSet('DOMException') should be 'true' and is. 24 PASS: canGet('DOMImplementation') should be 'true' and is. 25 PASS: canSet('DOMImplementation') should be 'true' and is. 26 PASS: canGet('DOMParser') should be 'true' and is. 27 PASS: canSet('DOMParser') should be 'true' and is. 38 28 PASS: canGet('Document') should be 'true' and is. 39 29 PASS: canSet('Document') should be 'true' and is. … … 42 32 PASS: canGet('DocumentType') should be 'true' and is. 43 33 PASS: canSet('DocumentType') should be 'true' and is. 44 PASS: canGet('DOMException') should be 'true' and is.45 PASS: canSet('DOMException') should be 'true' and is.46 PASS: canGet('DOMImplementation') should be 'true' and is.47 PASS: canSet('DOMImplementation') should be 'true' and is.48 PASS: canGet('DOMParser') should be 'true' and is.49 PASS: canSet('DOMParser') should be 'true' and is.50 34 PASS: canGet('Element') should be 'true' and is. 51 35 PASS: canSet('Element') should be 'true' and is. … … 58 42 PASS: canGet('Event') should be 'true' and is. 59 43 PASS: canSet('Event') should be 'true' and is. 60 PASS: canGet('event') should be 'true' and is.61 PASS: canSet('event') should be 'true' and is.62 44 PASS: canGet('HTMLAnchorElement') should be 'true' and is. 63 45 PASS: canSet('HTMLAnchorElement') should be 'true' and is. … … 66 48 PASS: canGet('HTMLAreaElement') should be 'true' and is. 67 49 PASS: canSet('HTMLAreaElement') should be 'true' and is. 50 PASS: canGet('HTMLBRElement') should be 'true' and is. 51 PASS: canSet('HTMLBRElement') should be 'true' and is. 68 52 PASS: canGet('HTMLBaseElement') should be 'true' and is. 69 53 PASS: canSet('HTMLBaseElement') should be 'true' and is. … … 72 56 PASS: canGet('HTMLBodyElement') should be 'true' and is. 73 57 PASS: canSet('HTMLBodyElement') should be 'true' and is. 74 PASS: canGet('HTMLBRElement') should be 'true' and is.75 PASS: canSet('HTMLBRElement') should be 'true' and is.76 58 PASS: canGet('HTMLButtonElement') should be 'true' and is. 77 59 PASS: canSet('HTMLButtonElement') should be 'true' and is. 78 60 PASS: canGet('HTMLCanvasElement') should be 'true' and is. 79 61 PASS: canSet('HTMLCanvasElement') should be 'true' and is. 62 PASS: canGet('HTMLDListElement') should be 'true' and is. 63 PASS: canSet('HTMLDListElement') should be 'true' and is. 80 64 PASS: canGet('HTMLDirectoryElement') should be 'true' and is. 81 65 PASS: canSet('HTMLDirectoryElement') should be 'true' and is. 82 66 PASS: canGet('HTMLDivElement') should be 'true' and is. 83 67 PASS: canSet('HTMLDivElement') should be 'true' and is. 84 PASS: canGet('HTMLDListElement') should be 'true' and is.85 PASS: canSet('HTMLDListElement') should be 'true' and is.86 68 PASS: canGet('HTMLDocument') should be 'true' and is. 87 69 PASS: canSet('HTMLDocument') should be 'true' and is. … … 98 80 PASS: canGet('HTMLFrameSetElement') should be 'true' and is. 99 81 PASS: canSet('HTMLFrameSetElement') should be 'true' and is. 82 PASS: canGet('HTMLHRElement') should be 'true' and is. 83 PASS: canSet('HTMLHRElement') should be 'true' and is. 100 84 PASS: canGet('HTMLHeadElement') should be 'true' and is. 101 85 PASS: canSet('HTMLHeadElement') should be 'true' and is. 102 86 PASS: canGet('HTMLHeadingElement') should be 'true' and is. 103 87 PASS: canSet('HTMLHeadingElement') should be 'true' and is. 104 PASS: canGet('HTMLHRElement') should be 'true' and is.105 PASS: canSet('HTMLHRElement') should be 'true' and is.106 88 PASS: canGet('HTMLHtmlElement') should be 'true' and is. 107 89 PASS: canSet('HTMLHtmlElement') should be 'true' and is. … … 114 96 PASS: canGet('HTMLIsIndexElement') should be 'true' and is. 115 97 PASS: canSet('HTMLIsIndexElement') should be 'true' and is. 98 PASS: canGet('HTMLLIElement') should be 'true' and is. 99 PASS: canSet('HTMLLIElement') should be 'true' and is. 116 100 PASS: canGet('HTMLLabelElement') should be 'true' and is. 117 101 PASS: canSet('HTMLLabelElement') should be 'true' and is. 118 102 PASS: canGet('HTMLLegendElement') should be 'true' and is. 119 103 PASS: canSet('HTMLLegendElement') should be 'true' and is. 120 PASS: canGet('HTMLLIElement') should be 'true' and is.121 PASS: canSet('HTMLLIElement') should be 'true' and is.122 104 PASS: canGet('HTMLLinkElement') should be 'true' and is. 123 105 PASS: canSet('HTMLLinkElement') should be 'true' and is. … … 212 194 PASS: canGet('XSLTProcessor') should be 'true' and is. 213 195 PASS: canSet('XSLTProcessor') should be 'true' and is. 196 PASS: canGet('addEventListener') should be 'true' and is. 197 PASS: canSet('addEventListener') should be 'true' and is. 198 PASS: canGet('alert') should be 'true' and is. 199 PASS: canSet('alert') should be 'true' and is. 200 PASS: canGet('atob') should be 'true' and is. 201 PASS: canSet('atob') should be 'true' and is. 202 PASS: canGet('btoa') should be 'true' and is. 203 PASS: canSet('btoa') should be 'true' and is. 204 PASS: canGet('captureEvents') should be 'true' and is. 205 PASS: canSet('captureEvents') should be 'true' and is. 206 PASS: canGet('clearInterval') should be 'true' and is. 207 PASS: canSet('clearInterval') should be 'true' and is. 208 PASS: canGet('clearTimeout') should be 'true' and is. 209 PASS: canSet('clearTimeout') should be 'true' and is. 210 PASS: canGet('clientInformation') should be 'true' and is. 211 PASS: canSet('clientInformation') should be 'true' and is. 212 PASS: canGet('console') should be 'true' and is. 213 PASS: canSet('console') should be 'true' and is. 214 PASS: canGet('defaultStatus') should be 'true' and is. 215 PASS: canSet('defaultStatus') should be 'true' and is. 216 PASS: canGet('defaultstatus') should be 'true' and is. 217 PASS: canSet('defaultstatus') should be 'true' and is. 218 PASS: canGet('devicePixelRatio') should be 'true' and is. 219 PASS: canSet('devicePixelRatio') should be 'true' and is. 220 PASS: canGet('event') should be 'true' and is. 221 PASS: canSet('event') should be 'true' and is. 222 PASS: canGet('frames') should be 'true' and is. 223 PASS: canSet('frames') should be 'true' and is. 224 PASS: canGet('innerHeight') should be 'true' and is. 225 PASS: canSet('innerHeight') should be 'true' and is. 226 PASS: canGet('innerWidth') should be 'true' and is. 227 PASS: canSet('innerWidth') should be 'true' and is. 228 PASS: canGet('length') should be 'true' and is. 229 PASS: canSet('length') should be 'true' and is. 230 PASS: canGet('locationbar') should be 'true' and is. 231 PASS: canSet('locationbar') should be 'true' and is. 232 PASS: canGet('menubar') should be 'true' and is. 233 PASS: canSet('menubar') should be 'true' and is. 234 PASS: canGet('navigator') should be 'true' and is. 235 PASS: canSet('navigator') should be 'true' and is. 236 PASS: canGet('offscreenBuffering') should be 'true' and is. 237 PASS: canSet('offscreenBuffering') should be 'true' and is. 238 PASS: canGet('opener') should be 'true' and is. 239 PASS: canSet('opener') should be 'true' and is. 240 PASS: canGet('outerHeight') should be 'true' and is. 241 PASS: canSet('outerHeight') should be 'true' and is. 242 PASS: canGet('outerWidth') should be 'true' and is. 243 PASS: canSet('outerWidth') should be 'true' and is. 244 PASS: canGet('parent') should be 'true' and is. 245 PASS: canSet('parent') should be 'true' and is. 246 PASS: canGet('personalbar') should be 'true' and is. 247 PASS: canSet('personalbar') should be 'true' and is. 248 PASS: canGet('screenLeft') should be 'true' and is. 249 PASS: canSet('screenLeft') should be 'true' and is. 250 PASS: canGet('screenTop') should be 'true' and is. 251 PASS: canSet('screenTop') should be 'true' and is. 252 PASS: canGet('screenX') should be 'true' and is. 253 PASS: canSet('screenX') should be 'true' and is. 254 PASS: canGet('screenY') should be 'true' and is. 255 PASS: canSet('screenY') should be 'true' and is. 256 PASS: canGet('scrollX') should be 'true' and is. 257 PASS: canSet('scrollX') should be 'true' and is. 258 PASS: canGet('scrollY') should be 'true' and is. 259 PASS: canSet('scrollY') should be 'true' and is. 260 PASS: canGet('scrollbars') should be 'true' and is. 261 PASS: canSet('scrollbars') should be 'true' and is. 262 PASS: canGet('self') should be 'true' and is. 263 PASS: canSet('self') should be 'true' and is. 264 PASS: canGet('status') should be 'true' and is. 265 PASS: canSet('status') should be 'true' and is. 266 PASS: canGet('statusbar') should be 'true' and is. 267 PASS: canSet('statusbar') should be 'true' and is. 268 PASS: canGet('toolbar') should be 'true' and is. 269 PASS: canSet('toolbar') should be 'true' and is. 270 PASS: canGet('top') should be 'true' and is. 271 PASS: canSet('top') should be 'true' and is. 214 272 215 273 ----- tests for getting/setting readonly properties ----- 216 274 217 PASS: canGet('clientInformation') should be 'true' and is.218 PASS: canSet('clientInformation') should be 'false' and is.219 275 PASS: canGet('closed') should be 'true' and is. 220 276 PASS: canSet('closed') should be 'false' and is. 221 PASS: canGet('defaultStatus') should be 'true' and is.222 PASS: canSet('defaultStatus') should be 'false' and is.223 PASS: canGet('defaultstatus') should be 'true' and is.224 PASS: canSet('defaultstatus') should be 'false' and is.225 PASS: canGet('devicePixelRatio') should be 'true' and is.226 PASS: canSet('devicePixelRatio') should be 'false' and is.227 277 PASS: canGet('document') should be 'true' and is. 228 278 PASS: canSet('document') should be 'false' and is. 229 PASS: canGet('frames') should be 'true' and is.230 PASS: canSet('frames') should be 'false' and is.231 279 PASS: canGet('history') should be 'true' and is. 232 280 PASS: canSet('history') should be 'false' and is. 233 PASS: canGet('innerHeight') should be 'true' and is.234 PASS: canSet('innerHeight') should be 'false' and is.235 PASS: canGet('innerWidth') should be 'true' and is.236 PASS: canSet('innerWidth') should be 'false' and is.237 PASS: canGet('length') should be 'true' and is.238 PASS: canSet('length') should be 'false' and is.239 PASS: canGet('locationbar') should be 'true' and is.240 PASS: canSet('locationbar') should be 'false' and is.241 PASS: canGet('menubar') should be 'true' and is.242 PASS: canSet('menubar') should be 'false' and is.243 281 PASS: canGet('name') should be 'true' and is. 244 282 PASS: canSet('name') should be 'false' and is. 245 PASS: canGet('navigator') should be 'true' and is.246 PASS: canSet('navigator') should be 'false' and is.247 PASS: canGet('offscreenBuffering') should be 'true' and is.248 PASS: canSet('offscreenBuffering') should be 'false' and is.249 PASS: canGet('opener') should be 'true' and is.250 PASS: canSet('opener') should be 'false' and is.251 PASS: canGet('outerHeight') should be 'true' and is.252 PASS: canSet('outerHeight') should be 'false' and is.253 PASS: canGet('outerWidth') should be 'true' and is.254 PASS: canSet('outerWidth') should be 'false' and is.255 283 PASS: canGet('pageXOffset') should be 'true' and is. 256 284 PASS: canSet('pageXOffset') should be 'false' and is. 257 285 PASS: canGet('pageYOffset') should be 'true' and is. 258 286 PASS: canSet('pageYOffset') should be 'false' and is. 259 PASS: canGet('parent') should be 'true' and is.260 PASS: canSet('parent') should be 'false' and is.261 PASS: canGet('personalbar') should be 'true' and is.262 PASS: canSet('personalbar') should be 'false' and is.263 287 PASS: canGet('screen') should be 'true' and is. 264 288 PASS: canSet('screen') should be 'false' and is. 265 PASS: canGet('screenLeft') should be 'true' and is.266 PASS: canSet('screenLeft') should be 'false' and is.267 PASS: canGet('screenTop') should be 'true' and is.268 PASS: canSet('screenTop') should be 'false' and is.269 PASS: canGet('screenX') should be 'true' and is.270 PASS: canSet('screenX') should be 'false' and is.271 PASS: canGet('screenY') should be 'true' and is.272 PASS: canSet('screenY') should be 'false' and is.273 PASS: canGet('scrollbars') should be 'true' and is.274 PASS: canSet('scrollbars') should be 'false' and is.275 PASS: canGet('scrollX') should be 'true' and is.276 PASS: canSet('scrollX') should be 'false' and is.277 PASS: canGet('scrollY') should be 'true' and is.278 PASS: canSet('scrollY') should be 'false' and is.279 PASS: canGet('self') should be 'true' and is.280 PASS: canSet('self') should be 'false' and is.281 PASS: canGet('status') should be 'true' and is.282 PASS: canSet('status') should be 'false' and is.283 PASS: canGet('statusbar') should be 'true' and is.284 PASS: canSet('statusbar') should be 'false' and is.285 PASS: canGet('toolbar') should be 'true' and is.286 PASS: canSet('toolbar') should be 'false' and is.287 PASS: canGet('top') should be 'true' and is.288 PASS: canSet('top') should be 'false' and is.289 289 PASS: canGet('window') should be 'true' and is. 290 290 PASS: canSet('window') should be 'false' and is. 291 291 292 ----- tests for getting/setting function -----292 ----- tests for getting/setting functions ----- 293 293 294 294 PASS: canGet('blur') should be 'true' and is. -
trunk/LayoutTests/fast/dom/Window/get-set-properties.html
r24182 r29428 1 <p>T ests getting and setting window properties and functions.</p>1 <p>This page tests getting and setting window properties and functions.</p> 2 2 <pre id="console"></pre> 3 3 … … 58 58 59 59 var windowReadWriteProperties = [ 60 "addEventListener",61 "alert",62 "atob",63 60 "Attr", 64 "btoa",65 "captureEvents",66 61 "CDATASection", 67 "CharacterData",68 "clearInterval",69 "clearTimeout",70 "Comment",71 "console",72 62 "CSSPrimitiveValue", 73 63 "CSSRule", 74 64 "CSSStyleDeclaration", 75 65 "CSSValue", 66 "CharacterData", 67 "Comment", 68 "DOMException", 69 "DOMImplementation", 70 "DOMParser", 76 71 "Document", 77 72 "DocumentFragment", 78 73 "DocumentType", 79 "DOMException",80 "DOMImplementation",81 "DOMParser",82 74 "Element", 83 75 "Entity", … … 85 77 "EvalError", 86 78 "Event", 87 "event",88 79 "HTMLAnchorElement", 89 80 "HTMLAppletElement", 90 81 "HTMLAreaElement", 82 "HTMLBRElement", 91 83 "HTMLBaseElement", 92 84 "HTMLBaseFontElement", 93 85 "HTMLBodyElement", 94 "HTMLBRElement",95 86 "HTMLButtonElement", 96 87 "HTMLCanvasElement", 88 "HTMLDListElement", 97 89 "HTMLDirectoryElement", 98 90 "HTMLDivElement", 99 "HTMLDListElement",100 91 "HTMLDocument", 101 92 "HTMLElement", … … 105 96 "HTMLFrameElement", 106 97 "HTMLFrameSetElement", 98 "HTMLHRElement", 107 99 "HTMLHeadElement", 108 100 "HTMLHeadingElement", 109 "HTMLHRElement",110 101 "HTMLHtmlElement", 111 102 "HTMLIFrameElement", … … 113 104 "HTMLInputElement", 114 105 "HTMLIsIndexElement", 106 "HTMLLIElement", 115 107 "HTMLLabelElement", 116 108 "HTMLLegendElement", 117 "HTMLLIElement",118 109 "HTMLLinkElement", 119 110 "HTMLMapElement", … … 162 153 "XPathResult", 163 154 "XSLTProcessor", 164 ]; 165 166 var windowReadOnlyProperties = [ 155 "addEventListener", 156 "alert", 157 "atob", 158 "btoa", 159 "captureEvents", 160 "clearInterval", 161 "clearTimeout", 167 162 "clientInformation", 168 "c losed",163 "console", 169 164 "defaultStatus", 170 165 "defaultstatus", 171 166 "devicePixelRatio", 172 " document",167 "event", 173 168 "frames", 174 "history",175 169 "innerHeight", 176 170 "innerWidth", … … 178 172 "locationbar", 179 173 "menubar", 180 "name",181 174 "navigator", 182 175 "offscreenBuffering", … … 184 177 "outerHeight", 185 178 "outerWidth", 186 "pageXOffset",187 "pageYOffset",188 179 "parent", 189 180 "personalbar", 190 "screen",191 181 "screenLeft", 192 182 "screenTop", 193 183 "screenX", 194 184 "screenY", 195 "scrollbars",196 185 "scrollX", 197 186 "scrollY", 187 "scrollbars", 198 188 "self", 199 189 "status", 200 190 "statusbar", 201 191 "toolbar", 202 "top", 192 "top" 193 ]; 194 195 var windowReadOnlyProperties = [ 196 "closed", 197 "document", 198 "history", 199 "name", 200 "pageXOffset", 201 "pageYOffset", 202 "screen", 203 203 "window" 204 204 ]; … … 277 277 } 278 278 279 log("\n----- tests for getting/setting function -----\n");279 log("\n----- tests for getting/setting functions -----\n"); 280 280 281 281 for (var i = 0; i < windowFunctions.length; i++) { //> -
trunk/LayoutTests/fast/dom/Window/window-property-shadowing-expected.txt
r23987 r29428 1 PASS: screen successfully shadowed2 PASS: history successfully shadowed3 1 PASS: locationbar successfully shadowed 4 2 PASS: menubar successfully shadowed … … 7 5 PASS: toolbar successfully shadowed 8 6 PASS: devicePixelRatio successfully shadowed 9 PASS: closed successfully shadowed10 PASS: crypto successfully shadowed11 7 PASS: defaultStatus successfully shadowed 12 8 PASS: defaultstatus successfully shadowed … … 19 15 PASS: name successfully shadowed 20 16 PASS: navigator successfully shadowed 21 PASS: location successfully shadowed22 17 PASS: clientInformation successfully shadowed 23 18 PASS: offscreenBuffering successfully shadowed … … 25 20 PASS: outerHeight successfully shadowed 26 21 PASS: outerWidth successfully shadowed 27 PASS: pageXOffset successfully shadowed28 PASS: pageYOffset successfully shadowed29 22 PASS: parent successfully shadowed 30 23 PASS: screenX successfully shadowed … … 36 29 PASS: self successfully shadowed 37 30 PASS: top successfully shadowed 38 PASS: onabort successfully shadowed39 PASS: onblur successfully shadowed40 PASS: onchange successfully shadowed41 PASS: onclick successfully shadowed42 PASS: ondblclick successfully shadowed43 PASS: onerror successfully shadowed44 PASS: onfocus successfully shadowed45 PASS: onkeydown successfully shadowed46 PASS: onkeypress successfully shadowed47 PASS: onkeyup successfully shadowed48 PASS: onload successfully shadowed49 PASS: onmousedown successfully shadowed50 PASS: onmousemove successfully shadowed51 PASS: onmouseout successfully shadowed52 PASS: onmouseover successfully shadowed53 PASS: onmouseup successfully shadowed54 PASS: onmousewheel successfully shadowed55 PASS: onreset successfully shadowed56 PASS: onresize successfully shadowed57 PASS: onscroll successfully shadowed58 PASS: onsearch successfully shadowed59 PASS: onselect successfully shadowed60 PASS: onsubmit successfully shadowed61 PASS: onunload successfully shadowed62 PASS: onbeforeunload successfully shadowed63 PASS: frameElement successfully shadowed64 PASS: window successfully shadowed65 31 PASS: getSelection successfully shadowed 66 32 PASS: getComputedStyle successfully shadowed -
trunk/LayoutTests/fast/dom/Window/window-property-shadowing.html
r28884 r29428 16 16 17 17 // Window Attributes 18 var screen = 1;19 log(screen == 1 ? "PASS: screen successfully shadowed" : "FAIL: screen was not shadowed");20 var history = 1;21 log(history == 1 ? "PASS: history successfully shadowed" : "FAIL: history was not shadowed");22 18 var locationbar = 1; 23 19 log(locationbar == 1 ? "PASS: locationbar successfully shadowed" : "FAIL: locationbar was not shadowed"); … … 32 28 var devicePixelRatio = 1; 33 29 log(devicePixelRatio == 1 ? "PASS: devicePixelRatio successfully shadowed" : "FAIL: devicePixelRatio was not shadowed"); 34 var closed = 1;35 log(closed == 1 ? "PASS: closed successfully shadowed" : "FAIL: closed was not shadowed");36 var crypto = 1;37 log(crypto == 1 ? "PASS: crypto successfully shadowed" : "FAIL: crypto was not shadowed");38 30 var defaultStatus = 1; 39 31 log(defaultStatus == 1 ? "PASS: defaultStatus successfully shadowed" : "FAIL: defaultStatus was not shadowed"); … … 56 48 var navigator = 1; 57 49 log(navigator == 1 ? "PASS: navigator successfully shadowed" : "FAIL: navigator was not shadowed"); 58 var location = 1;59 log(location == 1 ? "PASS: location successfully shadowed" : "FAIL: location was not shadowed");60 50 var clientInformation = 1; 61 51 log(clientInformation == 1 ? "PASS: clientInformation successfully shadowed" : "FAIL: clientInformation was not shadowed"); … … 68 58 var outerWidth = 1; 69 59 log(outerWidth == 1 ? "PASS: outerWidth successfully shadowed" : "FAIL: outerWidth was not shadowed"); 70 var pageXOffset = 1;71 log(pageXOffset == 1 ? "PASS: pageXOffset successfully shadowed" : "FAIL: pageXOffset was not shadowed");72 var pageYOffset = 1;73 log(pageYOffset == 1 ? "PASS: pageYOffset successfully shadowed" : "FAIL: pageYOffset was not shadowed");74 60 var parent = 1; 75 61 log(parent == 1 ? "PASS: parent successfully shadowed" : "FAIL: parent was not shadowed"); … … 90 76 var top = 1; 91 77 log(top == 1 ? "PASS: top successfully shadowed" : "FAIL: top was not shadowed"); 92 var onabort = 1;93 log(onabort == 1 ? "PASS: onabort successfully shadowed" : "FAIL: onabort was not shadowed");94 var onblur = 1;95 log(onblur == 1 ? "PASS: onblur successfully shadowed" : "FAIL: onblur was not shadowed");96 var onchange = 1;97 log(onchange == 1 ? "PASS: onchange successfully shadowed" : "FAIL: onchange was not shadowed");98 var onclick = 1;99 log(onclick == 1 ? "PASS: onclick successfully shadowed" : "FAIL: onclick was not shadowed");100 var ondblclick = 1;101 log(ondblclick == 1 ? "PASS: ondblclick successfully shadowed" : "FAIL: ondblclick was not shadowed");102 var onerror = 1;103 log(onerror == 1 ? "PASS: onerror successfully shadowed" : "FAIL: onerror was not shadowed");104 var onfocus = 1;105 log(onfocus == 1 ? "PASS: onfocus successfully shadowed" : "FAIL: onfocus was not shadowed");106 var onkeydown = 1;107 log(onkeydown == 1 ? "PASS: onkeydown successfully shadowed" : "FAIL: onkeydown was not shadowed");108 var onkeypress = 1;109 log(onkeypress == 1 ? "PASS: onkeypress successfully shadowed" : "FAIL: onkeypress was not shadowed");110 var onkeyup = 1;111 log(onkeyup == 1 ? "PASS: onkeyup successfully shadowed" : "FAIL: onkeyup was not shadowed");112 var onload = 1;113 log(onload == 1 ? "PASS: onload successfully shadowed" : "FAIL: onload was not shadowed");114 var onmousedown = 1;115 log(onmousedown == 1 ? "PASS: onmousedown successfully shadowed" : "FAIL: onmousedown was not shadowed");116 var onmousemove = 1;117 log(onmousemove == 1 ? "PASS: onmousemove successfully shadowed" : "FAIL: onmousemove was not shadowed");118 var onmouseout = 1;119 log(onmouseout == 1 ? "PASS: onmouseout successfully shadowed" : "FAIL: onmouseout was not shadowed");120 var onmouseover = 1;121 log(onmouseover == 1 ? "PASS: onmouseover successfully shadowed" : "FAIL: onmouseover was not shadowed");122 var onmouseup = 1;123 log(onmouseup == 1 ? "PASS: onmouseup successfully shadowed" : "FAIL: onmouseup was not shadowed");124 var onmousewheel = 1;125 log(onmousewheel == 1 ? "PASS: onmousewheel successfully shadowed" : "FAIL: onmousewheel was not shadowed");126 var onreset = 1;127 log(onreset == 1 ? "PASS: onreset successfully shadowed" : "FAIL: onreset was not shadowed");128 var onresize = 1;129 log(onresize == 1 ? "PASS: onresize successfully shadowed" : "FAIL: onresize was not shadowed");130 var onscroll = 1;131 log(onscroll == 1 ? "PASS: onscroll successfully shadowed" : "FAIL: onscroll was not shadowed");132 var onsearch = 1;133 log(onsearch == 1 ? "PASS: onsearch successfully shadowed" : "FAIL: onsearch was not shadowed");134 var onselect = 1;135 log(onselect == 1 ? "PASS: onselect successfully shadowed" : "FAIL: onselect was not shadowed");136 var onsubmit = 1;137 log(onsubmit == 1 ? "PASS: onsubmit successfully shadowed" : "FAIL: onsubmit was not shadowed");138 var onunload = 1;139 log(onunload == 1 ? "PASS: onunload successfully shadowed" : "FAIL: onunload was not shadowed");140 var onbeforeunload = 1;141 log(onbeforeunload == 1 ? "PASS: onbeforeunload successfully shadowed" : "FAIL: onbeforeunload was not shadowed");142 var frameElement = 1;143 log(frameElement == 1 ? "PASS: frameElement successfully shadowed" : "FAIL: frameElement was not shadowed");144 var window = 1;145 log(window == 1 ? "PASS: window successfully shadowed" : "FAIL: window was not shadowed");146 78 147 79 // Window functions -
trunk/LayoutTests/http/tests/security/cross-frame-access-put-expected.txt
r27161 r29428 1 1 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html from frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html. Domains, protocols and ports must match. 2 3 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 4 5 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 6 7 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 8 9 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 10 11 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 12 13 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 14 15 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 16 17 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 18 19 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 20 21 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 22 23 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 24 25 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 26 27 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 28 29 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 30 31 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 32 33 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 34 35 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 36 37 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 38 39 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 40 41 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 42 43 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 44 45 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. 2 46 3 47 CONSOLE MESSAGE: line 1: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-put-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-put.html. Domains, protocols and ports must match. -
trunk/WebCore/ChangeLog
r29427 r29428 1 2008-01-11 Geoffrey Garen <ggaren@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Fixed <rdar://problem/5665251> REGRESSION (r28880-r28886): Global 6 variable access (16644) 7 8 Removed the ReadOnly bit from some properties, to match Firefox. Also 9 removed status-related setters, to allow using their names as variable 10 names. 11 12 * bindings/scripts/CodeGeneratorJS.pm: Added support for properties that 13 are one-way across domain boundaries, to match Firefox. 14 15 * bindings/js/kjs_window.cpp: Changed ReadOnly declarations to match FF. 16 17 * bindings/scripts/CodeGeneratorJS.pm: Don't use JSObject:: because 18 we don't know that JSObject is our base class. 19 20 * page/DOMWindow.idl: Replaced lots of readonly declarations with 21 [Replaceable] declarations. 22 23 * page/DOMWindow.h: Removed interfaces for setting status text via the 24 DOM. (They were getting in the way of, e.g., "var status" 25 declarations.) By default, IE 7 and FF disable these interfaces in order 26 to defend against phishing attacks that try to spoof domain names in the 27 statusbar. 28 * page/DOMWindow.cpp: 29 1 30 2008-01-11 Anyang Ren <anyang.ren@gmail.com> 2 31 -
trunk/WebCore/bindings/js/kjs_window.cpp
r29388 r29428 165 165 event Window::Event_ DontDelete 166 166 location Window::Location_ DontDelete 167 navigator Window::Navigator_ DontDelete |ReadOnly168 clientInformation Window::ClientInformation DontDelete |ReadOnly167 navigator Window::Navigator_ DontDelete 168 clientInformation Window::ClientInformation DontDelete 169 169 # -- Event Listeners -- 170 170 onabort Window::Onabort DontDelete … … 489 489 // FIXME: this will make the "navigator" object accessible from windows that fail 490 490 // the security check the first time, but not subsequent times, seems weird. 491 const_cast<Window *>(this)->putDirect("navigator", n, DontDelete |ReadOnly);492 const_cast<Window *>(this)->putDirect("clientInformation", n, DontDelete |ReadOnly);491 const_cast<Window *>(this)->putDirect("navigator", n, DontDelete); 492 const_cast<Window *>(this)->putDirect("clientInformation", n, DontDelete); 493 493 return n; 494 494 } -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r29325 r29428 901 901 . "AttrNum: {\n"); 902 902 903 if ($dataNode->extendedAttributes->{"CheckDomainSecurity"} && !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurity"}) { 903 if ($dataNode->extendedAttributes->{"CheckDomainSecurity"} && 904 !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurity"} && 905 !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurityOnRead"}) { 904 906 push(@implContent, " if (!allowsAccessFrom(exec))\n"); 905 907 push(@implContent, " return jsUndefined();\n"); … … 1015 1017 $implIncludes{"JS" . $constructorType . ".h"} = 1; 1016 1018 push(@implContent, " // Shadowing a built-in constructor\n"); 1017 push(@implContent, " JSObject::put(exec,\"$name\", value);\n");1019 push(@implContent, " putDirect(\"$name\", value);\n"); 1018 1020 } elsif ($attribute->signature->extendedAttributes->{"Replaceable"}) { 1019 push(@implContent, " JSObject::put(exec,\"$name\", value);\n");1021 push(@implContent, " putDirect(\"$name\", value);\n"); 1020 1022 } else { 1021 1023 if ($podType) { -
trunk/WebCore/page/DOMWindow.cpp
r29051 r29428 507 507 } 508 508 509 void DOMWindow::setStatus(const String& string)510 {511 if (!m_frame)512 return;513 514 m_frame->setJSStatusBarText(string);515 }516 517 509 String DOMWindow::defaultStatus() const 518 510 { … … 521 513 522 514 return m_frame->jsDefaultStatusBarText(); 523 }524 525 void DOMWindow::setDefaultStatus(const String& string)526 {527 if (!m_frame)528 return;529 530 m_frame->setJSDefaultStatusBarText(string);531 515 } 532 516 -
trunk/WebCore/page/DOMWindow.h
r29051 r29428 110 110 111 111 String status() const; 112 void setStatus(const String&);113 112 String defaultStatus() const; 114 113 void setDefaultStatus(const String&); -
trunk/WebCore/page/DOMWindow.idl
r29073 r29428 30 30 readonly attribute Screen screen; 31 31 readonly attribute [DoNotCheckDomainSecurity] History history; 32 readonly attributeBarInfo locationbar;33 readonly attributeBarInfo menubar;34 readonly attributeBarInfo personalbar;35 readonly attributeBarInfo scrollbars;36 readonly attributeBarInfo statusbar;37 readonly attributeBarInfo toolbar;32 attribute [Replaceable] BarInfo locationbar; 33 attribute [Replaceable] BarInfo menubar; 34 attribute [Replaceable] BarInfo personalbar; 35 attribute [Replaceable] BarInfo scrollbars; 36 attribute [Replaceable] BarInfo statusbar; 37 attribute [Replaceable] BarInfo toolbar; 38 38 39 39 DOMSelection getSelection(); … … 61 61 in boolean showDialog); 62 62 63 readonly attributeboolean offscreenBuffering;64 65 readonly attributelong outerHeight;66 readonly attributelong outerWidth;67 readonly attributelong innerHeight;68 readonly attributelong innerWidth;69 readonly attributelong screenX;70 readonly attributelong screenY;71 readonly attributelong screenLeft;72 readonly attributelong screenTop;73 readonly attributelong scrollX;74 readonly attributelong scrollY;63 attribute [Replaceable] boolean offscreenBuffering; 64 65 attribute [Replaceable] long outerHeight; 66 attribute [Replaceable] long outerWidth; 67 attribute [Replaceable] long innerHeight; 68 attribute [Replaceable] long innerWidth; 69 attribute [Replaceable] long screenX; 70 attribute [Replaceable] long screenY; 71 attribute [Replaceable] long screenLeft; 72 attribute [Replaceable] long screenTop; 73 attribute [Replaceable] long scrollX; 74 attribute [Replaceable] long scrollY; 75 75 readonly attribute long pageXOffset; 76 76 readonly attribute long pageYOffset; … … 86 86 readonly attribute [DoNotCheckDomainSecurity] boolean closed; 87 87 88 readonly attribute [DoNotCheckDomainSecurity] unsigned long length;89 90 91 92 attributeDOMString status;93 attributeDOMString defaultStatus;88 attribute [Replaceable, DoNotCheckDomainSecurityOnRead] unsigned long length; 89 90 attribute DOMString name; 91 92 attribute [Replaceable] DOMString status; 93 attribute [Replaceable] DOMString defaultStatus; 94 94 #if defined(LANGUAGE_JAVASCRIPT) 95 96 attributeDOMString defaultstatus;95 // This attribute is an alias of defaultStatus and is necessary for legacy uses. 96 attribute [Replaceable] DOMString defaultstatus; 97 97 #endif 98 98 99 99 // Self referential attributes 100 readonly attribute [DoNotCheckDomainSecurity] DOMWindow self;100 attribute [Replaceable, DoNotCheckDomainSecurityOnRead] DOMWindow self; 101 101 readonly attribute [DoNotCheckDomainSecurity] DOMWindow window; 102 readonly attribute [DoNotCheckDomainSecurity] DOMWindow frames;103 104 readonly attribute [DoNotCheckDomainSecurity] DOMWindow opener;105 readonly attribute [DoNotCheckDomainSecurity] DOMWindow parent;106 readonly attribute [DoNotCheckDomainSecurity] DOMWindow top;102 attribute [Replaceable, DoNotCheckDomainSecurityOnRead] DOMWindow frames; 103 104 attribute [Replaceable, DoNotCheckDomainSecurityOnRead] DOMWindow opener; 105 attribute [Replaceable, DoNotCheckDomainSecurity] DOMWindow parent; 106 attribute [Replaceable, DoNotCheckDomainSecurity] DOMWindow top; 107 107 108 108 // DOM Level 2 AbstractView Interface … … 117 117 in DOMString pseudoElement, 118 118 in [Optional] boolean authorOnly); 119 readonly attributedouble devicePixelRatio;119 attribute [Replaceable] double devicePixelRatio; 120 120 121 121 #if defined(ENABLE_DATABASE)
Note:
See TracChangeset
for help on using the changeset viewer.