Title: [201311] trunk/Source/WebCore
- Revision
- 201311
- Author
- [email protected]
- Date
- 2016-05-23 18:50:42 -0700 (Mon, 23 May 2016)
Log Message
Avoid unnecessary call to Document::completeURL() in HTMLLinkElement::process()
https://bugs.webkit.org/show_bug.cgi?id=157993
Reviewed by Ryosuke Niwa.
Avoid unnecessary call to Document::completeURL() in HTMLLinkElement::process().
The call to getNonEmptyURLAttribute() already calls Document::completeURL()
internally so we can just reuse the returned URL.
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (201310 => 201311)
--- trunk/Source/WebCore/ChangeLog 2016-05-24 01:03:13 UTC (rev 201310)
+++ trunk/Source/WebCore/ChangeLog 2016-05-24 01:50:42 UTC (rev 201311)
@@ -1,3 +1,17 @@
+2016-05-23 Chris Dumez <[email protected]>
+
+ Avoid unnecessary call to Document::completeURL() in HTMLLinkElement::process()
+ https://bugs.webkit.org/show_bug.cgi?id=157993
+
+ Reviewed by Ryosuke Niwa.
+
+ Avoid unnecessary call to Document::completeURL() in HTMLLinkElement::process().
+ The call to getNonEmptyURLAttribute() already calls Document::completeURL()
+ internally so we can just reuse the returned URL.
+
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::process):
+
2016-05-23 Jiewen Tan <[email protected]>
Null popstate event fired when navigating back to a cached page with a stateless history entry
Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (201310 => 201311)
--- trunk/Source/WebCore/html/HTMLLinkElement.cpp 2016-05-24 01:03:13 UTC (rev 201310)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp 2016-05-24 01:50:42 UTC (rev 201311)
@@ -227,7 +227,7 @@
if (m_cachedSheet) {
removePendingSheet();
m_cachedSheet->removeClient(this);
- m_cachedSheet = 0;
+ m_cachedSheet = nullptr;
}
if (!shouldLoadLink())
@@ -240,9 +240,9 @@
Optional<RenderStyle> documentStyle;
if (document().hasLivingRenderTree())
documentStyle = Style::resolveForDocument(document());
- RefPtr<MediaQuerySet> media = MediaQuerySet::createAllowingDescriptionSyntax(m_media);
+ auto media = MediaQuerySet::createAllowingDescriptionSyntax(m_media);
MediaQueryEvaluator evaluator(document().frame()->view()->mediaType(), document().frame(), documentStyle ? &*documentStyle : nullptr);
- mediaQueryMatches = evaluator.eval(media.get());
+ mediaQueryMatches = evaluator.eval(media.ptr());
}
// Don't hold up render tree construction and script execution on stylesheets
@@ -254,7 +254,7 @@
Optional<ResourceLoadPriority> priority;
if (!isActive)
priority = ResourceLoadPriority::VeryLow;
- CachedResourceRequest request(ResourceRequest(document().completeURL(url)), charset, priority);
+ CachedResourceRequest request(url, charset, priority);
request.setInitiator(this);
if (document().contentSecurityPolicy()->allowStyleWithNonce(fastGetAttribute(HTMLNames::nonceAttr))) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes