@@ -542,7 +542,13 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const
542542// inherited attributes
543543// DataRef<StyleInheritedData> inherited;
544544
545- if ( *box.get () != *other->box .get () ||
545+ if ( box->width != other->box ->width ||
546+ box->min_width != other->box ->min_width ||
547+ box->max_width != other->box ->max_width ||
548+ box->height != other->box ->height ||
549+ box->min_height != other->box ->min_height ||
550+ box->max_height != other->box ->max_height ||
551+ box->vertical_align != other->box ->vertical_align ||
546552 !(surround->margin == other->surround ->margin ) ||
547553 !(surround->padding == other->surround ->padding ) ||
548554 css3NonInheritedData->marginTopCollapse != other->css3NonInheritedData ->marginTopCollapse ||
@@ -569,7 +575,7 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const
569575 visual->counter_increment != other->visual ->counter_increment ||
570576 visual->counter_reset != other->visual ->counter_reset ||
571577 css3NonInheritedData->textOverflow != other->css3NonInheritedData ->textOverflow )
572- return CbLayout ;
578+ return Layout ;
573579
574580 // changes causing Layout changes:
575581
@@ -588,7 +594,7 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const
588594 !(inherited_flags._empty_cells == other->inherited_flags ._empty_cells ) ||
589595 !(inherited_flags._caption_side == other->inherited_flags ._caption_side ) ||
590596 !(noninherited_flags._table_layout == other->noninherited_flags ._table_layout ))
591- return CbLayout ;
597+ return Layout ;
592598 }
593599
594600// only for lists:
@@ -630,18 +636,33 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const
630636 borderRightWidth () != other->borderRightWidth ())
631637 return Layout;
632638
639+ #if APPLE_CHANGES
640+ // If regions change trigger a relayout to re-calc regions.
641+ if (!(css3NonInheritedData->m_dashboardRegions == other->css3NonInheritedData ->m_dashboardRegions ))
642+ return Layout;
643+ #endif
644+
633645 // Make sure these left/top/right/bottom checks stay below all layout checks and above
634646 // all visible checks.
635- if (other->position () != STATIC && !(surround->offset == other->surround ->offset )) {
636- // FIXME: would like to do this at some point, but will need a new hint that indicates
637- // descendants need to be repainted too.
638- // if (other->position() == RELATIVE)
639- // return Visible;
640- // else
641- return Layout;
647+ if (other->position () != STATIC ) {
648+ if (!(surround->offset == other->surround ->offset )) {
649+ // FIXME: We will need to do a bit of work in RenderObject/Box::setStyle before we
650+ // can stop doing a layout when relative positioned objects move. In particular, we'll need
651+ // to update scrolling positions and figure out how to do a repaint properly of the updated layer.
652+ // if (other->position() == RELATIVE)
653+ // return RepaintLayer;
654+ // else
655+ return Layout;
656+ }
657+ else if (box->z_index != other->box ->z_index || box->z_auto != other->box ->z_auto ||
658+ !(visual->clip == other->visual ->clip ) || visual->hasClip != other->visual ->hasClip )
659+ return RepaintLayer;
642660 }
643661
644- // Visible:
662+ if (css3NonInheritedData->opacity != other->css3NonInheritedData ->opacity )
663+ return RepaintLayer;
664+
665+ // Repaint:
645666// EVisibility _visibility : 2;
646667// EOverflow _overflow : 4 ;
647668// EBackgroundRepeat _bg_repeat : 2;
@@ -657,23 +678,14 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const
657678 !(inherited_flags._should_correct_text_color == other->inherited_flags ._should_correct_text_color ) ||
658679 !(surround->border == other->surround ->border ) ||
659680 *background.get () != *other->background .get () ||
660- !(visual->clip == other->visual ->clip ) ||
661- visual->hasClip != other->visual ->hasClip ||
662681 visual->textDecoration != other->visual ->textDecoration ||
663- css3NonInheritedData->opacity != other->css3NonInheritedData ->opacity ||
664682 !css3InheritedData->shadowDataEquivalent (*other->css3InheritedData .get ()) ||
665683 css3InheritedData->userModify != other->css3InheritedData ->userModify ||
666684 css3NonInheritedData->userSelect != other->css3NonInheritedData ->userSelect ||
667685 css3NonInheritedData->userDrag != other->css3NonInheritedData ->userDrag ||
668686 !(visual->palette == other->visual ->palette )
669687 )
670- return Visible;
671-
672- #if APPLE_CHANGES
673- // If regions change trigger a relayout to re-calc regions.
674- if (!(css3NonInheritedData->m_dashboardRegions == other->css3NonInheritedData ->m_dashboardRegions ))
675- return Layout;
676- #endif
688+ return Repaint;
677689
678690 return Equal;
679691}
0 commit comments