void KeyframeAnimation::pauseAnimation(double timeOffset) { if (!m_object) return; #if USE(ACCELERATED_COMPOSITING) if (m_object->isComposited()) toRenderBoxModelObject(m_object)->animationPaused(timeOffset, m_keyframes.animationName()); #else UNUSED_PARAM(timeOffset); #endif // Restore the original (unanimated) style if (!paused()) setNeedsStyleRecalc(m_object->node()); }
void ContainerNode::setHovered(bool over) { if (over == hovered()) return; Node::setHovered(over); // note that we need to recalc the style // FIXME: Move to Element if (renderer()) { if (renderer()->style()->affectedByHoverRules()) setNeedsStyleRecalc(); if (renderer() && renderer()->style()->hasAppearance()) renderer()->theme()->stateChanged(renderer(), HoverState); } }
void ImplicitAnimation::pauseAnimation(double timeOffset) { if (!m_object) return; #if USE(ACCELERATED_COMPOSITING) if (m_object->isComposited()) toRenderBoxModelObject(m_object)->transitionPaused(m_animation.get(), timeOffset); // KxDx animationName #else UNUSED_PARAM(timeOffset); #endif // Restore the original (unanimated) style if (!paused()) setNeedsStyleRecalc(m_object->node()); }
void HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged(Element* child) { ASSERT(selfOrAncestorHasDirAutoAttribute()); Node* strongDirectionalityTextNode; TextDirection textDirection = directionality(&strongDirectionalityTextNode); setHasDirAutoFlagRecursively(child, false); if (!renderer() || !renderer()->style() || renderer()->style()->direction() == textDirection) return; auto lineage = elementLineage(this); for (auto elementToAdjust = lineage.begin(), end = lineage.end(); elementToAdjust != end; ++elementToAdjust) { if (elementAffectsDirectionality(&*elementToAdjust)) { elementToAdjust->setNeedsStyleRecalc(); return; } } }
void KeyframeAnimation::endAnimation() { if (!m_object) return; #if USE(ACCELERATED_COMPOSITING) if (m_object->hasLayer()) { RenderLayer* layer = toRenderBoxModelObject(m_object)->layer(); if (layer->isComposited()) layer->backing()->animationFinished(m_keyframes.animationName()); } #endif // Restore the original (unanimated) style if (!paused()) setNeedsStyleRecalc(m_object->node()); }
void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName) { if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) { SVGElement::InvalidationGuard invalidationGuard(this); if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) { invalidateSVGPresentationAttributeStyle(); setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::fromAttribute(attrName)); } updateRelativeLengthsInformation(); if (m_targetElementInstance) { ASSERT(m_targetElementInstance->correspondingElement()); transferUseWidthAndHeightIfNeeded(*this, m_targetElementInstance.get(), *m_targetElementInstance->correspondingElement()); } LayoutObject* object = this->layoutObject(); if (object) markForLayoutAndParentResourceInvalidation(object); return; } if (SVGURIReference::isKnownAttribute(attrName)) { SVGElement::InvalidationGuard invalidationGuard(this); if (isStructurallyExternal()) { KURL url = document().completeURL(hrefString()); const KURL& existingURL = m_resource ? m_resource->url() : KURL(); if (url.hasFragmentIdentifier() && !equalIgnoringFragmentIdentifier(url, existingURL)) { FetchRequest request(ResourceRequest(url), localName()); setDocumentResource(DocumentResource::fetchSVGDocument(request, document().fetcher())); } } else { setDocumentResource(nullptr); } invalidateShadowTree(); return; } SVGGraphicsElement::svgAttributeChanged(attrName); }
void HTMLTextAreaElement::setValueCommon(const String& newValue, TextFieldEventBehavior eventBehavior, SetValueCommonOption setValueOption) { // Code elsewhere normalizes line endings added by the user via the keyboard or pasting. // We normalize line endings coming from JavaScript here. String normalizedValue = newValue.isNull() ? "" : newValue; normalizedValue.replace("\r\n", "\n"); normalizedValue.replace('\r', '\n'); // Return early because we don't want to trigger other side effects // when the value isn't changing. // FIXME: Simple early return doesn't match the Firefox ever. // Remove these lines. if (normalizedValue == value()) { if (setValueOption == SetSeletion) { setNeedsValidityCheck(); if (isFinishedParsingChildren()) { // Set the caret to the end of the text value except for initialize. unsigned endOfString = m_value.length(); setSelectionRange(endOfString, endOfString, SelectionHasNoDirection, ChangeSelectionIfFocused); } } return; } m_value = normalizedValue; setInnerEditorValue(m_value); if (eventBehavior == DispatchNoEvent) setLastChangeWasNotUserEdit(); updatePlaceholderVisibility(false); setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::ControlValue)); m_suggestedValue = String(); setNeedsValidityCheck(); if (isFinishedParsingChildren()) { // Set the caret to the end of the text value except for initialize. unsigned endOfString = m_value.length(); setSelectionRange(endOfString, endOfString, SelectionHasNoDirection, ChangeSelectionIfFocused); } notifyFormStateChanged(); if (eventBehavior == DispatchNoEvent) { setTextAsOfLastFormControlChangeEvent(normalizedValue); } else { if (eventBehavior == DispatchInputAndChangeEvent) dispatchFormControlInputEvent(); dispatchFormControlChangeEvent(); } }
void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName) { SVGStyledTransformableElement::svgAttributeChanged(attrName); if (!renderer()) return; if (SVGURIReference::isKnownAttribute(attrName)) { if (m_isPendingResource) { document()->accessSVGExtensions()->removePendingResource(m_resourceId); m_resourceId = String(); m_isPendingResource = false; } invalidateShadowTree(); return; } if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) { updateContainerOffsets(); return; } if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) { updateContainerSizes(); return; } // Be very careful here, if svgAttributeChanged() has been called because a SVG CSS property changed, we do NOT want to reclone the tree! if (SVGStyledElement::isKnownAttribute(attrName)) { setNeedsStyleRecalc(); return; } if (SVGStyledTransformableElement::isKnownAttribute(attrName)) { renderer()->setNeedsTransformUpdate(); renderer()->setNeedsLayout(true); return; } if (SVGTests::isKnownAttribute(attrName) || SVGLangSpace::isKnownAttribute(attrName) || SVGExternalResourcesRequired::isKnownAttribute(attrName)) invalidateShadowTree(); }
void ImplicitAnimation::pauseAnimation(double timeOffset) { if (!m_object) return; #if USE(ACCELERATED_COMPOSITING) if (m_object->hasLayer()) { RenderLayer* layer = toRenderBoxModelObject(m_object)->layer(); if (layer->isComposited()) layer->backing()->transitionPaused(timeOffset, m_animatingProperty); } #else UNUSED_PARAM(timeOffset); #endif // Restore the original (unanimated) style if (!paused()) setNeedsStyleRecalc(m_object->node()); }
void WMLInputElement::setValue(const String& value, bool) { setFormControlValueMatchesRenderer(false); m_data.setValue(constrainValue(value)); if (inDocument()) document()->updateStyleIfNeeded(); if (renderer()) renderer()->updateFromElement(); setNeedsStyleRecalc(); unsigned max = m_data.value().length(); if (document()->focusedNode() == this) InputElement::updateSelectionRange(this, this, max, max); else cacheSelection(max, max); InputElement::notifyFormStateChanged(this); }
void StyledElement::styleAttributeChanged(const AtomicString& newStyleString, AttributeModificationReason reason) { WTF::OrdinalNumber startLineNumber = WTF::OrdinalNumber::beforeFirst(); if (document().scriptableDocumentParser() && !document().isInDocumentWrite()) startLineNumber = document().scriptableDocumentParser()->textPosition().m_line; if (newStyleString.isNull()) { if (PropertySetCSSStyleDeclaration* cssomWrapper = inlineStyleCSSOMWrapper()) cssomWrapper->clearParentElement(); ensureUniqueElementData().m_inlineStyle = nullptr; } else if (reason == ModifiedByCloning || document().contentSecurityPolicy()->allowInlineStyle(document().url(), startLineNumber, isInUserAgentShadowTree())) setInlineStyleFromString(newStyleString); elementData()->setStyleAttributeIsDirty(false); setNeedsStyleRecalc(InlineStyleChange); InspectorInstrumentation::didInvalidateStyleAttr(document(), *this); }
void Text::recalcStyle(StyleChange change) { if (change != NoChange && parentNode()) { if (renderer()) renderer()->setStyle(parentNode()->renderer()->style()); } if (needsStyleRecalc()) { if (renderer()) { if (renderer()->isText()) toRenderText(renderer())->setText(dataImpl()); } else { if (attached()) detach(); attach(); } } setNeedsStyleRecalc(NoStyleChange); }
void SVGAElement::svgAttributeChanged(const QualifiedName& attrName) { if (!isSupportedAttribute(attrName)) { SVGGraphicsElement::svgAttributeChanged(attrName); return; } SVGElementInstance::InvalidationGuard invalidationGuard(this); // Unlike other SVG*Element classes, SVGAElement only listens to SVGURIReference changes // as none of the other properties changes the linking behaviour for our <a> element. if (SVGURIReference::isKnownAttribute(attrName)) { bool wasLink = isLink(); setIsLink(!href().isNull() && !shouldProhibitLinks(this)); if (wasLink != isLink()) setNeedsStyleRecalc(); } }
void SVGAElement::svgAttributeChanged(const QualifiedName& attrName) { // Unlike other SVG*Element classes, SVGAElement only listens to SVGURIReference changes // as none of the other properties changes the linking behaviour for our <a> element. if (SVGURIReference::isKnownAttribute(attrName)) { SVGElement::InvalidationGuard invalidationGuard(this); bool wasLink = isLink(); setIsLink(!hrefString().isNull()); if (wasLink != isLink()) setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::LinkColorChange)); return; } SVGGraphicsElement::svgAttributeChanged(attrName); }
String PropertySetCSSStyleDeclaration::removeProperty(const String& propertyName, ExceptionCode& ec) { #if ENABLE(MUTATION_OBSERVERS) StyleAttributeMutationScope mutationScope(this); #endif CSSPropertyID propertyID = cssPropertyID(propertyName); if (!propertyID) return String(); ec = 0; String result; bool changes = m_propertySet->removeProperty(propertyID, &result); if (changes) { setNeedsStyleRecalc(); #if ENABLE(MUTATION_OBSERVERS) mutationScope.enqueueMutationRecord(); #endif } return result; }
void ContainerNode::setActive(bool down, bool pause) { if (down == active()) return; Node::setActive(down); // note that we need to recalc the style // FIXME: Move to Element if (renderer()) { bool reactsToPress = renderer()->style()->affectedByActiveRules(); if (reactsToPress) setNeedsStyleRecalc(); if (renderer() && renderer()->style()->hasAppearance()) { if (renderer()->theme()->stateChanged(renderer(), PressedState)) reactsToPress = true; } if (reactsToPress && pause) { // The delay here is subtle. It relies on an assumption, namely that the amount of time it takes // to repaint the "down" state of the control is about the same time as it would take to repaint the // "up" state. Once you assume this, you can just delay for 100ms - that time (assuming that after you // leave this method, it will be about that long before the flush of the up state happens again). #ifdef HAVE_FUNC_USLEEP double startTime = currentTime(); #endif // Ensure there are no pending changes Document::updateStyleForAllDocuments(); // Do an immediate repaint. if (renderer()) renderer()->repaint(true); // FIXME: Find a substitute for usleep for Win32. // Better yet, come up with a way of doing this that doesn't use this sort of thing at all. #ifdef HAVE_FUNC_USLEEP // Now pause for a small amount of time (1/10th of a second from before we repainted in the pressed state) double remainingTime = 0.1 - (currentTime() - startTime); if (remainingTime > 0) usleep(static_cast<useconds_t>(remainingTime * 1000000.0)); #endif } } }
void PropertySetCSSStyleDeclaration::setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode& ec) { #if ENABLE(MUTATION_OBSERVERS) StyleAttributeMutationScope mutationScope(this); #endif CSSPropertyID propertyID = cssPropertyID(propertyName); if (!propertyID) return; bool important = priority.find("important", 0, false) != notFound; ec = 0; bool changed = m_propertySet->setProperty(propertyID, value, important, contextStyleSheet()); if (changed) { // CSS DOM requires raising SYNTAX_ERR of parsing failed, but this is too dangerous for compatibility, // see <http://bugs.webkit.org/show_bug.cgi?id=7296>. setNeedsStyleRecalc(); #if ENABLE(MUTATION_OBSERVERS) mutationScope.enqueueMutationRecord(); #endif } }
void Element::attributeChanged(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason reason) { bool testShouldInvalidateStyle = inActiveDocument() && styleChangeType() < SubtreeStyleChange; if (isStyledElement() && name == HTMLNames::styleAttr) { styleAttributeChanged(newValue); } if (name == HTMLNames::idAttr) { AtomicString oldId = elementData()->idForStyleResolution(); AtomicString newId = newValue; if (newId != oldId) { elementData()->setIdForStyleResolution(newId); if (testShouldInvalidateStyle && (affectedByIdSelector(oldId) || affectedByIdSelector(newId))) setNeedsStyleRecalc(LocalStyleChange); } } else if (name == HTMLNames::classAttr) { classAttributeChanged(newValue); } }
void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName) { if (attrName == SVGNames::rAttr || attrName == SVGNames::cxAttr || attrName == SVGNames::cyAttr) { SVGElement::InvalidationGuard invalidationGuard(this); invalidateSVGPresentationAttributeStyle(); setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::fromAttribute(attrName)); updateRelativeLengthsInformation(); LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject()); if (!layoutObject) return; layoutObject->setNeedsShapeUpdate(); markForLayoutAndParentResourceInvalidation(layoutObject); return; } SVGGraphicsElement::svgAttributeChanged(attrName); }
void SVGImageElement::svgAttributeChanged(const QualifiedName& attrName) { bool isLengthAttribute = attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr; if (isLengthAttribute || attrName == SVGNames::preserveAspectRatioAttr) { SVGElement::InvalidationGuard invalidationGuard(this); if (isLengthAttribute) { invalidateSVGPresentationAttributeStyle(); setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::fromAttribute(attrName)); updateRelativeLengthsInformation(); } LayoutObject* object = this->layoutObject(); if (!object) return; // FIXME: if isLengthAttribute then we should avoid this // call if the viewport didn't change, however since we don't // have the computed style yet we can't use updateImageViewport. // See http://crbug.com/466200. markForLayoutAndParentResourceInvalidation(object); return; } if (SVGURIReference::isKnownAttribute(attrName)) { SVGElement::InvalidationGuard invalidationGuard(this); if (inDocument()) imageLoader().updateFromElement(ImageLoader::UpdateIgnorePreviousError); else m_needsLoaderURIUpdate = true; return; } SVGGraphicsElement::svgAttributeChanged(attrName); }
void HTMLAnchorElement::parseAttribute(const Attribute& attribute) { if (attribute.name() == hrefAttr) { bool wasLink = isLink(); setIsLink(!attribute.isNull()); if (wasLink != isLink()) setNeedsStyleRecalc(); if (isLink()) { String parsedURL = stripLeadingAndTrailingHTMLSpaces(attribute.value()); if (document()->isDNSPrefetchEnabled()) { if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "https") || parsedURL.startsWith("//")) prefetchDNS(document()->completeURL(parsedURL).host()); } } invalidateCachedVisitedLinkHash(); } else if (attribute.name() == nameAttr || attribute.name() == titleAttr) { // Do nothing. } else if (attribute.name() == relAttr) setRel(attribute.value()); else HTMLElement::parseAttribute(attribute); }
String CSSVariablesDeclaration::removeVariable(const String& variableName, ExceptionCode&) { // FIXME: The spec has this method taking an exception code but no exceptions are // specified as being thrown. RefPtr<CSSValue> val = m_variablesMap.take(variableName); String result = val ? val->cssText() : ""; if (val) { int s = m_variableNames.size(); for (int i = 0; i < s; ++i) { if (m_variableNames[i] == variableName) { m_variableNames.remove(i); i--; s--; } } setNeedsStyleRecalc(); } // FIXME: Communicate this change so that the document will update. return result; }
bool CSSMutableStyleDeclaration::setProperty(int propertyID, const String& value, bool important, bool notifyChanged) { ASSERT(!m_iteratorCount); // Setting the value to an empty string just removes the property in both IE and Gecko. // Setting it to null seems to produce less consistent results, but we treat it just the same. if (value.isEmpty()) { removeProperty(propertyID, notifyChanged, false); return true; } // When replacing an existing property value, this moves the property to the end of the list. // Firefox preserves the position, and MSIE moves the property to the beginning. bool success = CSSParser::parseValue(this, propertyID, value, important, useStrictParsing()); if (!success) { // CSS DOM requires raising SYNTAX_ERR here, but this is too dangerous for compatibility, // see <http://bugs.webkit.org/show_bug.cgi?id=7296>. } else if (notifyChanged) setNeedsStyleRecalc(); return success; }
bool KeyframeAnimation::sendAnimationEvent(const AtomicString& eventType, double elapsedTime) { Document::ListenerType listenerType; if (eventType == eventNames().webkitAnimationIterationEvent) listenerType = Document::ANIMATIONITERATION_LISTENER; else if (eventType == eventNames().webkitAnimationEndEvent) listenerType = Document::ANIMATIONEND_LISTENER; else { ASSERT(eventType == eventNames().webkitAnimationStartEvent); if (m_startEventDispatched) return false; m_startEventDispatched = true; listenerType = Document::ANIMATIONSTART_LISTENER; } if (shouldSendEventForListener(listenerType)) { // Dispatch the event RefPtr<Element> element; if (m_object->node() && m_object->node()->isElementNode()) element = static_cast<Element*>(m_object->node()); ASSERT(!element || (element->document() && !element->document()->inPageCache())); if (!element) return false; // Schedule event handling m_compAnim->animationController()->addEventToDispatch(element, eventType, m_keyframes.animationName(), elapsedTime); // Restore the original (unanimated) style if (eventType == eventNames().webkitAnimationEndEvent && element->renderer()) setNeedsStyleRecalc(element.get()); return true; // Did dispatch an event } return false; // Did not dispatch an event }
void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == hrefAttr) { bool wasLink = isLink(); setIsLink(!value.isNull()); if (wasLink != isLink()) { setNeedsStyleRecalc(); invalidateParentDistributionIfNecessary(this, SelectRuleFeatureSet::RuleFeatureLink | SelectRuleFeatureSet::RuleFeatureVisited | SelectRuleFeatureSet::RuleFeatureEnabled); } if (isLink()) { String parsedURL = stripLeadingAndTrailingHTMLSpaces(value); if (document()->isDNSPrefetchEnabled()) { if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "https") || parsedURL.startsWith("//")) prefetchDNS(document()->completeURL(parsedURL).host()); } } invalidateCachedVisitedLinkHash(); } else if (name == nameAttr || name == titleAttr) { // Do nothing. } else if (name == relAttr) setRel(value); else HTMLElement::parseAttribute(name, value); }
String CSSMutableStyleDeclaration::removeProperty(int propertyID, bool notifyChanged, bool returnText) { ASSERT(!m_iteratorCount); if (removeShorthandProperty(propertyID, notifyChanged)) { // FIXME: Return an equivalent shorthand when possible. return String(); } CSSProperty* foundProperty = findPropertyWithId(propertyID); if (!foundProperty) return String(); String value = returnText ? foundProperty->value()->cssText() : String(); // A more efficient removal strategy would involve marking entries as empty // and sweeping them when the vector grows too big. m_properties.remove(foundProperty - m_properties.data()); if (notifyChanged) setNeedsStyleRecalc(); return value; }
void HTMLElement::calculateAndAdjustDirectionality() { TextDirection textDirection = directionality(); if (layoutObject() && layoutObject()->style() && layoutObject()->style()->direction() != textDirection) setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange)); }
void HTMLBodyElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == vlinkAttr || name == alinkAttr || name == linkAttr) { if (value.isNull()) { if (name == linkAttr) document().textLinkColors().resetLinkColor(); else if (name == vlinkAttr) document().textLinkColors().resetVisitedLinkColor(); else document().textLinkColors().resetActiveLinkColor(); } else { RGBA32 color; if (BisonCSSParser::parseColor(color, value, !document().inQuirksMode())) { if (name == linkAttr) document().textLinkColors().setLinkColor(color); else if (name == vlinkAttr) document().textLinkColors().setVisitedLinkColor(color); else document().textLinkColors().setActiveLinkColor(color); } } setNeedsStyleRecalc(SubtreeStyleChange); } else if (name == onloadAttr) document().setWindowAttributeEventListener(EventTypeNames::load, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onbeforeunloadAttr) document().setWindowAttributeEventListener(EventTypeNames::beforeunload, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onunloadAttr) document().setWindowAttributeEventListener(EventTypeNames::unload, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onpagehideAttr) document().setWindowAttributeEventListener(EventTypeNames::pagehide, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onpageshowAttr) document().setWindowAttributeEventListener(EventTypeNames::pageshow, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onpopstateAttr) document().setWindowAttributeEventListener(EventTypeNames::popstate, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onblurAttr) document().setWindowAttributeEventListener(EventTypeNames::blur, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onerrorAttr) document().setWindowAttributeEventListener(EventTypeNames::error, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onfocusAttr) document().setWindowAttributeEventListener(EventTypeNames::focus, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (RuntimeEnabledFeatures::orientationEventEnabled() && name == onorientationchangeAttr) document().setWindowAttributeEventListener(EventTypeNames::orientationchange, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onhashchangeAttr) document().setWindowAttributeEventListener(EventTypeNames::hashchange, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onmessageAttr) document().setWindowAttributeEventListener(EventTypeNames::message, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onresizeAttr) document().setWindowAttributeEventListener(EventTypeNames::resize, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onscrollAttr) document().setWindowAttributeEventListener(EventTypeNames::scroll, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onselectionchangeAttr) document().setAttributeEventListener(EventTypeNames::selectionchange, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onstorageAttr) document().setWindowAttributeEventListener(EventTypeNames::storage, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == ononlineAttr) document().setWindowAttributeEventListener(EventTypeNames::online, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onofflineAttr) document().setWindowAttributeEventListener(EventTypeNames::offline, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else if (name == onlanguagechangeAttr) document().setWindowAttributeEventListener(EventTypeNames::languagechange, createAttributeEventListener(document().frame(), name, value, eventParameterName())); else HTMLElement::parseAttribute(name, value); }
void SVGUseElement::invalidateShadowTree() { m_needsShadowTreeRecreation = true; setNeedsStyleRecalc(); }