Changeset 100182 in webkit
- Timestamp:
- Nov 14, 2011, 12:58:30 PM (15 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/page/DOMWindow.cpp (modified) (1 diff)
-
WebCore/page/SecurityOrigin.cpp (modified) (1 diff)
-
WebCore/page/SecurityOrigin.h (modified) (1 diff)
-
WebKit/chromium/ChangeLog (modified) (1 diff)
-
WebKit/chromium/src/WebSecurityOrigin.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r100181 r100182 1 2011-11-14 Adam Barth <abarth@webkit.org> 2 3 Remove the concept of an empty SecurityOrigin 4 https://bugs.webkit.org/show_bug.cgi?id=72287 5 6 Reviewed by Eric Seidel. 7 8 This concept is fragile and doesn't exist in the specs. Previous 9 patches have removed most of the code relying upon this function. This 10 patch removes a couple stragglers. 11 12 * page/DOMWindow.cpp: 13 (WebCore::DOMWindow::postMessage): 14 - This check should really be about unique origins because it 15 doesn't make sense to target postMessages at unique origins, as 16 explained in the comment. 17 * page/SecurityOrigin.cpp: 18 * page/SecurityOrigin.h: 19 1 20 2011-11-14 Adam Barth <abarth@webkit.org> 2 21 -
trunk/Source/WebCore/page/DOMWindow.cpp
r98388 r100182 879 879 if (targetOrigin != "*") { 880 880 target = SecurityOrigin::createFromString(targetOrigin); 881 if (target->isEmpty()) { 881 // It doesn't make sense target a postMessage at a unique origin 882 // because there's no way to represent a unique origin in a string. 883 if (target->isUnique()) { 882 884 ec = SYNTAX_ERR; 883 885 return; -
trunk/Source/WebCore/page/SecurityOrigin.cpp
r100100 r100182 133 133 , m_enforceFilePathSeparation(other->m_enforceFilePathSeparation) 134 134 { 135 }136 137 bool SecurityOrigin::isEmpty() const138 {139 ASSERT(!m_protocol.isEmpty() || m_isUnique);140 return m_protocol.isEmpty();141 135 } 142 136 -
trunk/Source/WebCore/page/SecurityOrigin.h
r100100 r100182 135 135 bool isUnique() const { return m_isUnique; } 136 136 137 // The empty SecurityOrigin is a unique security orign (in the sense of138 // isUnique above) that was created for a "blank" document, such about139 // about:blank. Empty origins differ from unique origins in that they can140 // sometimes be replaced by non-empty origins, for example when an141 // about:blank iframe inherits its security origin from its parent frame.142 bool isEmpty() const;143 144 137 // Marks a file:// origin as being in a domain defined by its path. 145 138 void enforceFilePathSeparation(); -
trunk/Source/WebKit/chromium/ChangeLog
r100180 r100182 1 2011-11-14 Adam Barth <abarth@webkit.org> 2 3 Remove the concept of an empty SecurityOrigin 4 https://bugs.webkit.org/show_bug.cgi?id=72287 5 6 Reviewed by Eric Seidel. 7 8 I'll rename the API in a subsequent patch. 9 10 * src/WebSecurityOrigin.cpp: 11 (WebKit::WebSecurityOrigin::isEmpty): 12 1 13 2011-11-14 Vincent Scheib <scheib@chromium.org> 2 14 -
trunk/Source/WebKit/chromium/src/WebSecurityOrigin.cpp
r99239 r100182 91 91 } 92 92 93 // FIXME: Rename this API to isUnique. 93 94 bool WebSecurityOrigin::isEmpty() const 94 95 { 95 96 ASSERT(m_private); 96 return m_private->is Empty();97 return m_private->isUnique(); 97 98 } 98 99
Note:
See TracChangeset
for help on using the changeset viewer.