Title: [242620] trunk/Source/WebCore
- Revision
- 242620
- Author
- [email protected]
- Date
- 2019-03-07 16:23:51 -0800 (Thu, 07 Mar 2019)
Log Message
Make sure an empty host matches the internal representation "nullOrigin" in WebCore::RegistrableDomain::matches()
https://bugs.webkit.org/show_bug.cgi?id=195435
Reviewed by Brent Fulgham.
No new tests. Tests are currently failing and will pass again with
this patch.
WebCore::RegistrableDomain::matches() is a quick way to compare a
RegistrableDomain with a URL. Since RegistrableDomain represents the
empty host as "nullOrigin," a URL with an empty host needs to match
that representation in WebCore::RegistrableDomain::matches().
Failure to do so caused debug assertions in fast/ layout tests after
https://trac.webkit.org/changeset/242603/webkit.
* platform/RegistrableDomain.h:
(WebCore::RegistrableDomain::matches const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (242619 => 242620)
--- trunk/Source/WebCore/ChangeLog 2019-03-08 00:18:59 UTC (rev 242619)
+++ trunk/Source/WebCore/ChangeLog 2019-03-08 00:23:51 UTC (rev 242620)
@@ -1,3 +1,23 @@
+2019-03-07 John Wilander <[email protected]>
+
+ Make sure an empty host matches the internal representation "nullOrigin" in WebCore::RegistrableDomain::matches()
+ https://bugs.webkit.org/show_bug.cgi?id=195435
+
+ Reviewed by Brent Fulgham.
+
+ No new tests. Tests are currently failing and will pass again with
+ this patch.
+
+ WebCore::RegistrableDomain::matches() is a quick way to compare a
+ RegistrableDomain with a URL. Since RegistrableDomain represents the
+ empty host as "nullOrigin," a URL with an empty host needs to match
+ that representation in WebCore::RegistrableDomain::matches().
+ Failure to do so caused debug assertions in fast/ layout tests after
+ https://trac.webkit.org/changeset/242603/webkit.
+
+ * platform/RegistrableDomain.h:
+ (WebCore::RegistrableDomain::matches const):
+
2019-03-07 Justin Fan <[email protected]>
Unreviewed build fixes since MTLClampToBorderColor is only supported on macOS.
Modified: trunk/Source/WebCore/platform/RegistrableDomain.h (242619 => 242620)
--- trunk/Source/WebCore/platform/RegistrableDomain.h 2019-03-08 00:18:59 UTC (rev 242619)
+++ trunk/Source/WebCore/platform/RegistrableDomain.h 2019-03-08 00:23:51 UTC (rev 242620)
@@ -59,6 +59,8 @@
bool matches(const URL& url) const
{
auto host = url.host();
+ if (host.isEmpty() && m_registrableDomain == "nullOrigin"_s)
+ return true;
if (!host.endsWith(m_registrableDomain))
return false;
if (host.length() == m_registrableDomain.length())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes