WebCore/ChangeLog

 12010-07-01 Sam Magnuson <smagnuson@netflix.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 GraphicsLayer: z-index causes a repaint of a layer
 6 https://bugs.webkit.org/show_bug.cgi?id=41497
 7
 8 This patch will check for z-index in a layer and if it occurs then
 9 it will just send the children changed message but not need to
 10 setNeedsDisplay.
 11
 12 No new tests; this is an optimization.
 13
 14 * rendering/RenderObject.cpp:
 15 (WebCore::RenderObject::adjustStyleDifference):
 16 * rendering/style/RenderStyle.cpp:
 17 (WebCore::RenderStyle::diff):
 18 * rendering/style/RenderStyleConstants.h:
 19
1202010-10-07 Abhishek Arya <inferno@chromium.org>
221
322 Reviewed by Dave Hyatt.

WebCore/rendering/RenderObject.cpp

@@StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign
16971697 diff = StyleDifferenceRecompositeLayer;
16981698 }
16991699
 1700 // If zindex changed, and we are not composited, need to repaint.
 1701 if (contextSensitiveProperties & ContextSensitivePropertyZIndex) {
 1702 if ((!hasLayer() || !toRenderBoxModelObject(this)->layer()->isComposited()))
 1703 diff = StyleDifferenceRepaintLayer;
 1704 else if (diff < StyleDifferenceRecompositeLayer)
 1705 diff = StyleDifferenceRecompositeLayer;
 1706 }
 1707
17001708 // If opacity changed, and we are not composited, need to repaint (also
1701  // ignoring text nodes)
 1709 // ignoring text nodes).
17021710 if (contextSensitiveProperties & ContextSensitivePropertyOpacity) {
17031711 if (!isText() && (!hasLayer() || !toRenderBoxModelObject(this)->layer()->isComposited()))
17041712 diff = StyleDifferenceRepaintLayer;

WebCore/rendering/style/RenderStyle.cpp

@@StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
504504 // return RepaintLayer;
505505 //else
506506 return StyleDifferenceLayout;
507  } else if (m_box->zIndex() != other->m_box->zIndex() || m_box->hasAutoZIndex() != other->m_box->hasAutoZIndex() ||
508  visual->clip != other->visual->clip || visual->hasClip != other->visual->hasClip)
 507 } else if (m_box->zIndex() != other->m_box->zIndex() || m_box->hasAutoZIndex() != other->m_box->hasAutoZIndex()
 508 || visual->clip != other->visual->clip || visual->hasClip != other->visual->hasClip)
 509#if USE(ACCELERATED_COMPOSITING)
 510 changedContextSensitiveProperties |= ContextSensitivePropertyZIndex;
 511#else
509512 return StyleDifferenceRepaintLayer;
 513#endif
510514 }
511515
512516 if (rareNonInheritedData->opacity != other->rareNonInheritedData->opacity) {

WebCore/rendering/style/RenderStyleConstants.h

@@enum StyleDifference {
6161enum StyleDifferenceContextSensitiveProperty {
6262 ContextSensitivePropertyNone = 0,
6363 ContextSensitivePropertyTransform = (1 << 0),
64  ContextSensitivePropertyOpacity = (1 << 1)
 64 ContextSensitivePropertyOpacity = (1 << 1),
 65 ContextSensitivePropertyZIndex = (1 << 2)
6566};
6667
6768// Static pseudo styles. Dynamic ones are produced on the fly.