[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/khtml
From:       Allan Sandfeld Jensen <kde () carewolf ! com>
Date:       2005-03-22 10:34:49
Message-ID: 20050322103449.749E93C2 () office ! kde ! org
[Download RAW message or body]

CVS commit by carewolf: 

Make DIV-children override their NS-layer parent.
BUG: 93720


  M +4 -0      ChangeLog   1.409
  M +14 -3     html/html_blockimpl.cpp   1.80
  M +3 -0      html/html_blockimpl.h   1.43


--- kdelibs/khtml/ChangeLog  #1.408:1.409
@@ -1,4 +1,8 @@
 2005-03-22  Allan Sandfeld Jensen <kde@carewolf.com>
 
+        * html/htmlblockimpl.cpp: When a NS-layer gets DIV layer children. The NS \
layer should let the DIV layer control position. +
+2005-03-22  Allan Sandfeld Jensen <kde@carewolf.com>
+
         * misc/loader.cpp: Do not override existing charset with an empty one.
 

--- kdelibs/khtml/html/html_blockimpl.cpp  #1.79:1.80
@@ -260,5 +260,5 @@ HTMLLayerElementImpl::HTMLLayerElementIm
     : HTMLDivElementImpl( doc, _tagid )
 {
-    fixed = false;
+    transparent = fixed = false;
 }
 
@@ -275,5 +275,5 @@ void HTMLLayerElementImpl::parseAttribut
             break;
         case ATTR_PAGEX:
-            if (!fixed) {
+            if (!transparent && !fixed) {
                 addCSSProperty(CSS_PROP_POSITION, CSS_VAL_FIXED);
                 fixed = true;
@@ -282,5 +282,5 @@ void HTMLLayerElementImpl::parseAttribut
             break;
         case ATTR_PAGEY:
-            if (!fixed) {
+            if (!transparent && !fixed) {
                 addCSSProperty(CSS_PROP_POSITION, CSS_VAL_FIXED);
                 fixed = true;
@@ -325,2 +325,13 @@ void HTMLLayerElementImpl::parseAttribut
 }
 
+NodeImpl *HTMLLayerElementImpl::addChild(NodeImpl *child)
+{
+    NodeImpl *retval = HTMLDivElementImpl::addChild(child);
+    // When someone adds standard layers, we make sure not to interfere
+    if (retval->id() == ID_DIV) {
+        if (!transparent)
+            addCSSProperty(CSS_PROP_POSITION, CSS_VAL_STATIC);
+        transparent = true;
+    }
+    return retval;
+}
\ No newline at end of file

--- kdelibs/khtml/html/html_blockimpl.h  #1.42:1.43
@@ -92,6 +92,9 @@ public:
 
     virtual void parseAttribute(AttributeImpl *);
+    virtual NodeImpl *addChild(NodeImpl *child);
+
 private:
     bool fixed;
+    bool transparent;
 };
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic