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

Unified Diff: sky/engine/core/html/HTMLImageElement.cpp

Issue 732813002: Remove sizes attr. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/css/parser/SizesAttributeParserTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/HTMLImageElement.cpp
diff --git a/sky/engine/core/html/HTMLImageElement.cpp b/sky/engine/core/html/HTMLImageElement.cpp
index 4bf05c94ec536fa0fd24543c58051dbffba7fffb..113fee9a404e58f95727dfabd358d6059ed5fc81 100644
--- a/sky/engine/core/html/HTMLImageElement.cpp
+++ b/sky/engine/core/html/HTMLImageElement.cpp
@@ -29,7 +29,6 @@
#include "core/css/MediaQueryListListener.h"
#include "core/css/MediaQueryMatcher.h"
#include "core/css/MediaValuesDynamic.h"
-#include "core/css/parser/SizesAttributeParser.h"
#include "core/dom/Attribute.h"
#include "core/dom/NodeTraversal.h"
#include "core/fetch/ImageResource.h"
@@ -384,14 +383,6 @@ FloatSize HTMLImageElement::defaultDestinationSize() const
void HTMLImageElement::selectSourceURL(ImageLoader::UpdateFromElementBehavior behavior)
{
unsigned effectiveSize = 0;
- if (RuntimeEnabledFeatures::pictureSizesEnabled()) {
- String sizes = getAttribute(HTMLNames::sizesAttr);
- if (!sizes.isNull())
- UseCounter::count(document(), UseCounter::Sizes);
- SizesAttributeParser parser = SizesAttributeParser(MediaValuesDynamic::create(document()), sizes);
- effectiveSize = parser.length();
- m_effectiveSizeViewportDependant = parser.viewportDependant();
- }
ImageCandidate candidate = bestFitSourceForImageAttributes(
document().devicePixelRatio(), effectiveSize,
getAttribute(HTMLNames::srcAttr), getAttribute(HTMLNames::srcsetAttr));
« no previous file with comments | « sky/engine/core/css/parser/SizesAttributeParserTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698