void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderStyle& newStyle) { s_wasFloating = isFloating(); // If our z-index changes value or our visibility changes, // we need to dirty our stacking context's z-order list. RenderStyle* oldStyle = style(); if (oldStyle) { // Do a repaint with the old style first through RenderLayerRepainter. // RenderObject::styleWillChange takes care of repainting objects without RenderLayers. if (parent() && diff.needsRepaintLayer()) { layer()->repainter().repaintIncludingNonCompositingDescendants(); if (oldStyle->hasClip() != newStyle.hasClip() || oldStyle->clip() != newStyle.clip()) layer()->clipper().clearClipRectsIncludingDescendants(); } else if (diff.needsFullLayout()) { if (hasLayer()) { if (!layer()->hasCompositedLayerMapping() && oldStyle->position() != newStyle.position()) layer()->repainter().repaintIncludingNonCompositingDescendants(); } else if (newStyle.hasTransform() || newStyle.opacity() < 1 || newStyle.hasFilter()) { // If we don't have a layer yet, but we are going to get one because of transform or opacity, // then we need to repaint the old position of the object. paintInvalidationForWholeRenderer(); } } } RenderObject::styleWillChange(diff, newStyle); }
void RenderProgress::updateFromElement() { HTMLProgressElement* element = progressElement(); if (m_position == element->position()) return; m_position = element->position(); updateAnimationState(); paintInvalidationForWholeRenderer(); RenderBlockFlow::updateFromElement(); }
void RenderSVGImage::imageChanged(WrappedImagePtr, const IntRect*) { // The image resource defaults to nullImage until the resource arrives. // This empty image may be cached by SVG resources which must be invalidated. if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this)) resources->removeClientFromCache(this); // Eventually notify parent resources, that we've changed. RenderSVGResource::markForLayoutAndParentResourceInvalidation(this, false); // Update the SVGImageCache sizeAndScales entry in case image loading finished after layout. // (https://bugs.webkit.org/show_bug.cgi?id=99489) m_objectBoundingBox = FloatRect(); updateImageViewport(); invalidateBufferedForeground(); paintInvalidationForWholeRenderer(); }
void RenderProgress::animationTimerFired(Timer<RenderProgress>*) { paintInvalidationForWholeRenderer(); if (!m_animationTimer.isActive() && m_animating) m_animationTimer.startOneShot(m_animationRepeatInterval, FROM_HERE); }