Simple tweak to background-attachment. Don't apply the slow repaint flag until...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 4 Sep 2004 03:58:13 +0000 (03:58 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 4 Sep 2004 03:58:13 +0000 (03:58 +0000)
resolved, since while cascading someone may set the attachment to fixed but later override with scroll.

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::adjustRenderStyle):
        (khtml::CSSStyleSelector::applyProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7456 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/css/cssstyleselector.cpp

index 6cc974cd35db0db3e2c343a708fc07301d1dfc28..5a8d15aece06d800f63f97b82efc6a9c348a0c37 100644 (file)
@@ -1,3 +1,12 @@
+2004-09-03  David Hyatt  <hyatt@apple.com>
+
+       Simple tweak to background-attachment.  Don't apply the slow repaint flag until after the whole style has been
+       resolved, since while cascading someone may set the attachment to fixed but later override with scroll.
+
+        * khtml/css/cssstyleselector.cpp:
+        (khtml::CSSStyleSelector::adjustRenderStyle):
+        (khtml::CSSStyleSelector::applyProperty):
+
 2004-09-03  Richard Williamson   <rjw@apple.com>
 
        Fixed <rdar://problem/3781001>: redirection of URL via resource load delegate does not correctly set base URL for subsequent loads
index 9378a77d907ade30c095a2bd6fa0245717618317..0baa530e0a8ec0db736458ad15ae7a99375efbe0 100644 (file)
@@ -917,6 +917,11 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, DOM::ElementImpl *e
         style->setTextDecorationsInEffect(style->textDecoration());
     else
         style->addToTextDecorationsInEffect(style->textDecoration());
+        
+    // Only use slow repaints if we actually have a background image and if our overflow is set to
+    // auto.  (Fixed backgrounds 
+    if (!style->backgroundAttachment() && style->backgroundImage() && view)
+        view->useSlowRepaints();
 }
 
 static bool subject;
@@ -1710,16 +1715,10 @@ void CSSStyleSelector::applyProperty( int id, DOM::CSSValueImpl *value )
     case CSS_PROP_BACKGROUND_ATTACHMENT:
         HANDLE_INHERIT_AND_INITIAL(backgroundAttachment, BackgroundAttachment)
         if(!primitiveValue) break;
-        switch(primitiveValue->getIdent())
-        {
+        switch (primitiveValue->getIdent()) {
         case CSS_VAL_FIXED:
-            {
-                style->setBackgroundAttachment(false);
-               // only use slow repaints if we actually have a background pixmap
-                if( style->backgroundImage() && view )
-                    view->useSlowRepaints();
-                break;
-            }
+            style->setBackgroundAttachment(false);
+            break;
         case CSS_VAL_SCROLL:
             style->setBackgroundAttachment(true);
             break;