static inline bool rendererObscuresBackground(RenderObject* object) { return object && object->style()->visibility() == VISIBLE && object->style()->opacity() == 1 && !object->style()->hasTransform() && !isComposited(object); }
bool RenderWidget::setWidgetGeometry(const LayoutRect& frame) { IntRect clipRect = roundedIntRect(enclosingLayer()->childrenClipRect()); IntRect newFrameRect = roundedIntRect(frame); IntRect oldFrameRect = m_widget->frameRect(); bool clipChanged = m_clipRect != clipRect; bool boundsChanged = oldFrameRect != newFrameRect; if (!boundsChanged && !clipChanged) return false; m_clipRect = clipRect; WeakPtr<RenderWidget> weakThis = createWeakPtr(); // These calls *may* cause this renderer to disappear from underneath... if (boundsChanged) m_widget->setFrameRect(newFrameRect); else if (clipChanged) m_widget->clipRectChanged(); // ...so we follow up with a sanity check. if (!weakThis) return true; if (boundsChanged && isComposited()) layer()->backing()->updateAfterWidgetResize(); return oldFrameRect.size() != newFrameRect.size(); }
static inline bool rendererObscuresBackground(RenderObject* rootObject) { if (!rootObject) return false; RenderStyle* style = rootObject->style(); if (style->visibility() != VISIBLE || style->opacity() != 1 || style->hasTransform()) return false; if (isComposited(rootObject)) return false; const RenderObject* rootRenderer = rootObject->rendererForRootBackground(); if (rootRenderer->style()->backgroundClip() == TextFillBox) return false; return true; }