Bug 63640

Summary: [test case] Frames are not displayed (regression)
Product: [Applications] konqueror Reporter: Vincent Wagelaar <vincent>
Component: khtml rendererAssignee: Dirk Mueller <mueller>
Status: RESOLVED FIXED    
Severity: grave CC: kde, maksim
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Vincent Wagelaar 2003-09-03 03:41:23 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3 
OS:          Linux

When trying to load http://hannibal.lr-s.tudelft.nl/~vincent/bdoos/ the frames are not displayed (testcase stripped to the minimum).
Comment 1 Dirk Mueller 2003-11-07 23:52:04 UTC
*** Bug 58226 has been marked as a duplicate of this bug. ***
Comment 2 Stephan Kulow 2003-11-09 12:41:58 UTC
*** Bug 67616 has been marked as a duplicate of this bug. ***
Comment 3 Dirk Mueller 2003-11-19 18:45:04 UTC
fixed in CVS. 
Comment 4 Dirk Mueller 2003-11-19 19:45:08 UTC
sorry, was a bit quick here. 
Comment 5 Dirk Mueller 2003-11-19 21:15:23 UTC
Subject: kdelibs/khtml

CVS commit by mueller: 

  * html/html_baseimpl.cpp (attach): respect display: NONE on <frame>, since
  it is used to indicate the FOUC prevention code path now. 
CCMAIL: 63640-done@bugs.kde.org


  M +3 -0      ChangeLog   1.99
  M +1 -0      css/cssstyleselector.cpp   1.300
  M +8 -5      html/html_baseimpl.cpp   1.193


--- kdelibs/khtml/ChangeLog  #1.98:1.99
@@ -1,4 +1,7 @@
 2003-11-19  Dirk Mueller  <mueller@kde.org>
 
+        * html/html_baseimpl.cpp (attach): respect display: NONE on <frame>, since
+        it is used to indicate the FOUC prevention code path now. 
+
         * css/cssparser.cpp (parseColor): remove use of invalidColor. use a boolean
         return instead. invalidColor was confusing as it was actually a valid color. 

--- kdelibs/khtml/html/html_baseimpl.cpp  #1.192:1.193
@@ -319,10 +319,13 @@ void HTMLFrameElementImpl::attach()
     }
 
-    // ignore display: none for this element!
-
     if (parentNode()->renderer() && getDocument()->isURLAllowed(url.string()))  {
+        RenderStyle* _style = getDocument()->styleSelector()->styleForElement(this);
+        _style->ref();
+        if ( _style->display() != NONE ) {
         m_render = new (getDocument()->renderArena()) RenderFrame(this);
-        m_render->setStyle(getDocument()->styleSelector()->styleForElement(this));
+            m_render->setStyle(_style);
         parentNode()->renderer()->addChild(m_render, nextRenderer());
+        }
+        _style->deref();
     }
 

--- kdelibs/khtml/css/cssstyleselector.cpp  #1.299:1.300
@@ -539,4 +539,5 @@ void CSSStyleSelector::adjustRenderStyle
     // fix a crash where a site tries to position these objects.
     if ( e ) {
+        // ignore display: none for <frame>
         if ( e->id() == ID_FRAME ) {
             style->setPosition( STATIC );


Comment 6 Stephan Kulow 2003-11-27 11:35:29 UTC
*** Bug 68644 has been marked as a duplicate of this bug. ***