Changeset 113945 in webkit
- Timestamp:
- Apr 11, 2012 11:35:40 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r113944 r113945 1 2012-04-11 Adam Barth <abarth@webkit.org> 2 3 Implement Location.ancestorOrigins 4 https://bugs.webkit.org/show_bug.cgi?id=83493 5 6 Reviewed by David Levin. 7 8 * fast/dom/Window/Location/ancestor-origins-expected.txt: Added. 9 * fast/dom/Window/Location/ancestor-origins.html: Added. 10 1 11 2012-04-11 Antonio Gomes <agomes@rim.com> 2 12 -
trunk/LayoutTests/fast/dom/Window/window-appendages-cleared-expected.txt
r107058 r113945 6 6 PASS history.replaceState == "LEFTOVER" is false 7 7 PASS history.state == "LEFTOVER" is false 8 PASS location.ancestorOrigins == "LEFTOVER" is false 8 9 PASS location.assign == "LEFTOVER" is false 9 10 PASS location.hash == "LEFTOVER" is false -
trunk/Source/WebCore/ChangeLog
r113940 r113945 1 2012-04-11 Adam Barth <abarth@webkit.org> 2 3 Implement Location.ancestorOrigins 4 https://bugs.webkit.org/show_bug.cgi?id=83493 5 6 Reviewed by David Levin. 7 8 Test: fast/dom/Window/Location/ancestor-origins.html 9 10 This patch implements Location.ancestorOrigins(), which returns a list 11 of the origins of the enclosing frames. This API has been discussed 12 both on webkit-dev (see discussion following 13 https://lists.webkit.org/pipermail/webkit-dev/2012-March/020090.html) 14 and on the whatwg list (see discussion following 15 http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-March/035188.html). 16 17 * page/Location.cpp: 18 (WebCore::Location::ancestorOrigins): 19 (WebCore): 20 * page/Location.h: 21 (Location): 22 * page/Location.idl: 23 1 24 2012-04-11 Raymond Liu <raymond.liu@intel.com> 2 25 -
trunk/Source/WebCore/page/Location.cpp
r104380 r113945 125 125 } 126 126 127 PassRefPtr<DOMStringList> Location::ancestorOrigins() const 128 { 129 RefPtr<DOMStringList> origins = DOMStringList::create(); 130 if (!m_frame) 131 return origins.release(); 132 for (Frame* frame = m_frame->tree()->parent(true); frame; frame = frame->tree()->parent(true)) 133 origins->append(frame->document()->securityOrigin()->toString()); 134 return origins.release(); 135 } 136 127 137 String Location::hash() const 128 138 { -
trunk/Source/WebCore/page/Location.h
r104380 r113945 30 30 #define Location_h 31 31 32 #include "DOMStringList.h" 32 33 #include "DOMWindowProperty.h" 33 34 #include <wtf/PassRefPtr.h> … … 72 73 String toString() const { return href(); } 73 74 75 PassRefPtr<DOMStringList> ancestorOrigins() const; 76 74 77 private: 75 78 explicit Location(Frame*); -
trunk/Source/WebCore/page/Location.idl
r108201 r113945 65 65 #endif 66 66 67 readonly attribute DOMStringList ancestorOrigins; 68 67 69 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 68 70 [NotEnumerable, Custom, V8Unforgeable, V8ReadOnly, ImplementedAs=toStringFunction] DOMString toString();
Note: See TracChangeset
for help on using the changeset viewer.