Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1109)

Unified Diff: Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 1218413002: Remove width calculation in `Width` hint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed widthAttr support in `Width` hint Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLImageElementTest.cpp ('k') | Source/core/html/parser/HTMLPreloadScannerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLPreloadScanner.cpp
diff --git a/Source/core/html/parser/HTMLPreloadScanner.cpp b/Source/core/html/parser/HTMLPreloadScanner.cpp
index 7e9abb7a698625c9e55ed0168c9d570a41c028c2..44395718c6253b2dd08370460cb8b2d26e62e11a 100644
--- a/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -119,9 +119,6 @@ public:
, m_sourceSize(0)
, m_sourceSizeSet(false)
, m_isCORSEnabled(false)
- , m_widthValue(0)
- , m_widthValueSet(false)
- , m_widthPresent(false)
, m_defer(FetchRequest::NoDefer)
, m_allowCredentials(DoNotAllowStoredCredentials)
, m_mediaValues(mediaValues)
@@ -195,9 +192,6 @@ public:
if (sourceSizeSet) {
resourceWidth.width = sourceSize;
resourceWidth.isSet = true;
- } else {
- resourceWidth.isSet = m_widthValueSet;
- resourceWidth.width = m_widthValue;
}
OwnPtr<PreloadRequest> request = PreloadRequest::create(initiatorFor(m_tagImpl), position, m_urlToLoad, predictedBaseURL, resourceType(), resourceWidth, clientHintsPreferences, requestType);
@@ -242,9 +236,6 @@ private:
m_srcsetImageCandidate = bestFitSourceForSrcsetAttribute(m_mediaValues->devicePixelRatio(), m_sourceSize, m_srcsetAttributeValue);
setUrlToLoad(bestFitSourceForImageAttributes(m_mediaValues->devicePixelRatio(), m_sourceSize, m_imgSrcUrl, m_srcsetImageCandidate), AllowURLReplacement);
}
- } else if (match(attributeName, widthAttr) && !m_widthPresent) {
- m_widthPresent = true;
- m_widthValue = HTMLImageElement::widthAttributeToInt(attributeValue, m_widthValueSet);
}
}
@@ -416,9 +407,6 @@ private:
float m_sourceSize;
bool m_sourceSizeSet;
bool m_isCORSEnabled;
- int m_widthValue;
- bool m_widthValueSet;
- bool m_widthPresent;
FetchRequest::DeferOption m_defer;
StoredCredentials m_allowCredentials;
RefPtr<MediaValues> m_mediaValues;
« no previous file with comments | « Source/core/html/HTMLImageElementTest.cpp ('k') | Source/core/html/parser/HTMLPreloadScannerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698