Bug 67973 - [test case] Font changing on a:hover
Summary: [test case] Font changing on a:hover
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: 4.0
Platform: unspecified Linux
: NOR major
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 67669 67780 68527 69058 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-12 08:52 UTC by Mary Ellen Foster
Modified: 2003-11-27 14:03 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Above testcase as an attachment (193 bytes, text/html)
2003-11-12 10:52 UTC, Mary Ellen Foster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mary Ellen Foster 2003-11-12 08:52:28 UTC
Version:           4.0 (using KDE 3.1.93 (3.2 beta 1), compiled sources)
Compiler:          gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
OS:          Linux (i686) release 2.4.20-19.9

I have looked at the other a:hover related bugs, but I didn't see anything immediately that looked like this exact issue; I'm very sorry if this does turn out to be a duplicate.

Basically, whene there is more than one font-family listed for a:link and a:hover, khtml seems to choose a different one for link than hover. In the testcase below, I see the text "link" in sans-serif until I move the mouse over it; at that point, it changes to my default serif font.

A website that shows this behaviour for me is http://news.bbc.co.uk/

Test case:

<html>
<style>
  a:link { font-family: sans-serif, serif; }
  a:hover { font-family: sans-serif, serif; }
</style>

<body>
Here is some text with a <a href="">link</a>
</body>
</html>
Comment 1 Mary Ellen Foster 2003-11-12 09:07:34 UTC
Whoops, got that backwards: I meant that the text is initially shown in *serif*, and then it switches to sans-serif when I move the mouse over it. My default Konqueror font is sans-serif as well, if that affects anything.
Comment 2 Stephan Kulow 2003-11-12 10:05:08 UTC
please "Create a New Attachment"
Comment 3 Mary Ellen Foster 2003-11-12 10:52:45 UTC
Created attachment 3173 [details]
Above testcase as an attachment
Comment 4 Sashmit Bhaduri 2003-11-13 15:27:53 UTC
Yup, this seems to hit a lot of pages. I think it's a regression too, as far as I can remember, it didn't in 3.1 (don't have it anymore to check)
Comment 5 Maksim Orlovich 2003-11-18 23:43:21 UTC
*** Bug 68527 has been marked as a duplicate of this bug. ***
Comment 6 Stephan Kulow 2003-11-23 17:48:53 UTC
Subject: kdelibs/khtml

CVS commit by coolo: 

slightly modified patch by Paul Sprakes to fix his own bug report which 
turned out to be a regression introduced by my fix for #60556 (see #67768
for detailed descriptions)
CCMAIL: 60556@bugs.kde.org
CCMAIL: 67768-done@bugs.kde.org
CCMAIL: 67973-done@bugs.kde.org

(will work out regression tests now :)


  M +6 -0      ChangeLog   1.102
  M +7 -14     css/cssstyleselector.cpp   1.301


--- kdelibs/khtml/ChangeLog  #1.101:1.102
@@ -1,2 +1,8 @@
+2003-11-23  Stephan Kulow  <coolo@kde.org>
+
+        * css/cssstyleselector.cpp (applyRule): fixing my fix for #60556, which 
+        introduced quite some regressions (thanks to Paul Sprakes for working
+        that out with me)
+
 2003-11-22  Stephan Kulow  <coolo@kde.org>
 

--- kdelibs/khtml/css/cssstyleselector.cpp  #1.300:1.301
@@ -1852,6 +1852,5 @@ void CSSStyleSelector::applyRule( int id
             }
         }
-        if (style->setFontDef( fontDef ))
-        fontDirty = true;
+        fontDirty |= style->setFontDef( fontDef );
         break;
     }
@@ -1874,6 +1873,5 @@ void CSSStyleSelector::applyRule( int id
                 return;
         }
-        if (style->setFontDef( fontDef ))
-            fontDirty = true;
+        fontDirty |= style->setFontDef( fontDef );
         break;
     }
@@ -1918,6 +1916,5 @@ void CSSStyleSelector::applyRule( int id
             }
         }
-        if (style->setFontDef( fontDef ))
-            fontDirty = true;
+        fontDirty |= style->setFontDef( fontDef );
         break;
     }
@@ -2773,6 +2770,5 @@ void CSSStyleSelector::applyRule( int id
 
         fontDef.size = size;
-        if (style->setFontDef( fontDef ))
-        fontDirty = true;
+        fontDirty |= style->setFontDef( fontDef );
         return;
     }
@@ -2982,10 +2978,8 @@ void CSSStyleSelector::applyRule( int id
             if ( !face.isEmpty() ) {
                 fontDef.family = face;
-                if (style->setFontDef( fontDef )) {
-                    fontDirty = true;
+                fontDirty |= style->setFontDef( fontDef );
                     return;
                 }
             }
-        }
         break;
     }
@@ -3164,6 +3158,5 @@ void CSSStyleSelector::applyRule( int id
             FontDef fontDef = parentStyle->htmlFont().fontDef;
             style->setLineHeight( parentStyle->lineHeight() );
-            if (style->setFontDef( fontDef ))
-                fontDirty = true;
+            fontDirty |= style->setFontDef( fontDef );
         } else if ( value->isFontValue() ) {
             FontValueImpl *font = static_cast<FontValueImpl *>(value);


Comment 7 Stephan Kulow 2003-11-24 11:50:03 UTC
*** Bug 67669 has been marked as a duplicate of this bug. ***
Comment 8 Stephan Kulow 2003-11-25 11:17:07 UTC
*** Bug 67780 has been marked as a duplicate of this bug. ***
Comment 9 Stephan Kulow 2003-11-27 14:03:52 UTC
*** Bug 69058 has been marked as a duplicate of this bug. ***