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

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

Issue 708233002: Remove many attributes. (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/html/HTMLImageElement.h ('k') | sky/engine/core/html/HTMLImageElement.idl » ('j') | 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 7d3c8728f1d937665f4120a7d229065962703c86..a0e92c441162704ef6b2b8eba36d7a5f28620088 100644
--- a/sky/engine/core/html/HTMLImageElement.cpp
+++ b/sky/engine/core/html/HTMLImageElement.cpp
@@ -75,7 +75,6 @@ private:
HTMLImageElement::HTMLImageElement(Document& document, bool createdByParser)
: HTMLElement(HTMLNames::imgTag, document)
, m_imageLoader(HTMLImageLoader::create(this))
- , m_compositeOperator(CompositeSourceOver)
, m_imageDevicePixelRatio(1.0f)
, m_elementCreatedByParser(createdByParser)
, m_intrinsicSizingViewportDependant(false)
@@ -158,14 +157,6 @@ void HTMLImageElement::parseAttribute(const QualifiedName& name, const AtomicStr
toRenderImage(renderer())->updateAltText();
} else if (name == HTMLNames::srcAttr || name == HTMLNames::srcsetAttr || name == HTMLNames::sizesAttr) {
selectSourceURL(ImageLoader::UpdateIgnorePreviousError);
- } else if (name == HTMLNames::usemapAttr) {
- setIsLink(!value.isNull());
- } else if (name == HTMLNames::compositeAttr) {
- blink::WebBlendMode blendOp = blink::WebBlendModeNormal;
- if (!parseCompositeAndBlendOperator(value, m_compositeOperator, blendOp))
- m_compositeOperator = CompositeSourceOver;
- else if (m_compositeOperator != CompositeSourceOver)
- UseCounter::count(document(), UseCounter::HTMLImageElementComposite);
} else {
HTMLElement::parseAttribute(name, value);
}
@@ -316,9 +307,6 @@ const String& HTMLImageElement::currentSrc() const
bool HTMLImageElement::isURLAttribute(const Attribute& attribute) const
{
return attribute.name() == HTMLNames::srcAttr
- || attribute.name() == HTMLNames::lowsrcAttr
- || attribute.name() == HTMLNames::longdescAttr
- || (attribute.name() == HTMLNames::usemapAttr && attribute.value().string()[0] != '#')
|| HTMLElement::isURLAttribute(attribute);
}
@@ -377,20 +365,6 @@ void HTMLImageElement::didMoveToNewDocument(Document& oldDocument)
HTMLElement::didMoveToNewDocument(oldDocument);
}
-bool HTMLImageElement::isServerMap() const
-{
- if (!hasAttribute(HTMLNames::ismapAttr))
- return false;
-
- const AtomicString& usemap = getAttribute(HTMLNames::usemapAttr);
-
- // If the usemap attribute starts with '#', it refers to a map element in the document.
- if (usemap.string()[0] == '#')
- return false;
-
- return document().completeURL(stripLeadingAndTrailingHTMLSpaces(usemap)).isEmpty();
-}
-
Image* HTMLImageElement::imageContents()
{
if (!imageLoader().imageComplete())
« no previous file with comments | « sky/engine/core/html/HTMLImageElement.h ('k') | sky/engine/core/html/HTMLImageElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698