void HTMLObjectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { bool invalidateRenderer = false; if (name == formAttr) formAttributeChanged(); else if (name == typeAttr) { m_serviceType = value.string().left(value.find(';')).convertToASCIILowercase(); invalidateRenderer = !fastHasAttribute(classidAttr); setNeedsWidgetUpdate(true); } else if (name == dataAttr) { m_url = stripLeadingAndTrailingHTMLSpaces(value); document().updateStyleIfNeeded(); if (isImageType() && renderer()) { if (!m_imageLoader) m_imageLoader = std::make_unique<HTMLImageLoader>(*this); m_imageLoader->updateFromElementIgnoringPreviousError(); } invalidateRenderer = !fastHasAttribute(classidAttr); setNeedsWidgetUpdate(true); } else if (name == classidAttr) { invalidateRenderer = true; setNeedsWidgetUpdate(true); } else HTMLPlugInImageElement::parseAttribute(name, value); if (!invalidateRenderer || !inDocument() || !renderer()) return; clearUseFallbackContent(); setNeedsStyleRecalc(ReconstructRenderTree); }
void HTMLObjectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == formAttr) formAttributeChanged(); else if (name == typeAttr) { m_serviceType = value.string().left(value.find(';')).lower(); setNeedsWidgetUpdate(true); } else if (name == dataAttr) { m_url = stripLeadingAndTrailingHTMLSpaces(value); setNeedsWidgetUpdate(true); document().updateStyleIfNeeded(); if (renderer()) { if (isImageType()) { if (!m_imageLoader) m_imageLoader = std::make_unique<HTMLImageLoader>(*this); m_imageLoader->updateFromElementIgnoringPreviousError(); } } } else if (name == classidAttr) setNeedsWidgetUpdate(true); else if (name == onbeforeloadAttr) setAttributeEventListener(eventNames().beforeloadEvent, name, value); else HTMLPlugInImageElement::parseAttribute(name, value); }
void HTMLEmbedElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == typeAttr) { m_serviceType = value.string().left(value.find(";")).lower(); // FIXME: The only difference between this and HTMLObjectElement's corresponding // code is that HTMLObjectElement does setNeedsWidgetUpdate(true). Consider moving // this up to the HTMLPlugInImageElement to be shared. } else if (name == codeAttr) { m_url = stripLeadingAndTrailingHTMLSpaces(value); // FIXME: Why no call to updateImageLoaderWithNewURLSoon? // FIXME: If both code and src attributes are specified, last one parsed/changed wins. That can't be right! } else if (name == srcAttr) { m_url = stripLeadingAndTrailingHTMLSpaces(value); updateImageLoaderWithNewURLSoon(); // FIXME: If both code and src attributes are specified, last one parsed/changed wins. That can't be right! } else HTMLPlugInImageElement::parseAttribute(name, value); }
void HTMLObjectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == formAttr) formAttributeChanged(); else if (name == typeAttr) { m_serviceType = value.string().left(value.find(';')).lower(); setNeedsWidgetUpdate(true); } else if (name == dataAttr) { m_url = stripLeadingAndTrailingHTMLSpaces(value); setNeedsWidgetUpdate(true); updateImageLoaderWithNewURLSoon(); } else if (name == classidAttr) setNeedsWidgetUpdate(true); else if (name == onbeforeloadAttr) setAttributeEventListener(eventNames().beforeloadEvent, name, value); else HTMLPlugInImageElement::parseAttribute(name, value); }
void HTMLEmbedElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == typeAttr) { m_serviceType = value.string().left(value.find(';')).lower(); // FIXME: The only difference between this and HTMLObjectElement's corresponding // code is that HTMLObjectElement does setNeedsWidgetUpdate(true). Consider moving // this up to the HTMLPlugInImageElement to be shared. } else if (name == codeAttr) { m_url = stripLeadingAndTrailingHTMLSpaces(value); // FIXME: Why no call to the image loader? // FIXME: If both code and src attributes are specified, last one parsed/changed wins. That can't be right! } else if (name == srcAttr) { m_url = stripLeadingAndTrailingHTMLSpaces(value); document().updateStyleIfNeeded(); if (renderer() && isImageType()) { if (!m_imageLoader) m_imageLoader = std::make_unique<HTMLImageLoader>(*this); m_imageLoader->updateFromElementIgnoringPreviousError(); } // FIXME: If both code and src attributes are specified, last one parsed/changed wins. That can't be right! } else HTMLPlugInImageElement::parseAttribute(name, value); }
static inline bool nameIncludesHyphen(const AtomicString& name) { size_t hyphenPosition = name.find('-'); return (hyphenPosition != notFound); }