[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:26:18 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 6044916f609b6bed39d0ca36fceab8df6d80ed3a
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 26 23:10:08 2003 +0000
Fix numerous regressions with text-decoration in quirks mode and
also fixed a bug where text-decoration:none is not being honored
on links.
Reviewed by mjs
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/render_object.cpp:
(RenderObject::getTextDecorationColors):
* khtml/rendering/render_object.h:
* khtml/rendering/render_text.cpp:
(TextRun::paintDecoration):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 11d4abf..a814806 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,20 @@
2003-02-26 David Hyatt <hyatt at apple.com>
+ Fix numerous regressions with text-decoration in quirks mode and
+ also fixed a bug where text-decoration:none is not being honored
+ on links.
+
+ Reviewed by mjs
+
+ * khtml/css/cssstyleselector.cpp:
+ * khtml/rendering/render_object.cpp:
+ (RenderObject::getTextDecorationColors):
+ * khtml/rendering/render_object.h:
+ * khtml/rendering/render_text.cpp:
+ (TextRun::paintDecoration):
+
+2003-02-26 David Hyatt <hyatt at apple.com>
+
Fix for 3179109. containingBlock() had a big old bug in it.
For ABSOLUTE positioned elements, it would return inline relative
positioned parents (when it should only be returning blocks).
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 11d4abf..a814806 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,20 @@
2003-02-26 David Hyatt <hyatt at apple.com>
+ Fix numerous regressions with text-decoration in quirks mode and
+ also fixed a bug where text-decoration:none is not being honored
+ on links.
+
+ Reviewed by mjs
+
+ * khtml/css/cssstyleselector.cpp:
+ * khtml/rendering/render_object.cpp:
+ (RenderObject::getTextDecorationColors):
+ * khtml/rendering/render_object.h:
+ * khtml/rendering/render_text.cpp:
+ (TextRun::paintDecoration):
+
+2003-02-26 David Hyatt <hyatt at apple.com>
+
Fix for 3179109. containingBlock() had a big old bug in it.
For ABSOLUTE positioned elements, it would return inline relative
positioned parents (when it should only be returning blocks).
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index bcd0827..5c233d6 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -476,7 +476,11 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e)
if ((style->display() == INLINE || style->display() == COMPACT || style->display() == RUN_IN) &&
(style->position() == ABSOLUTE || style->position() == FIXED || style->floating() != FNONE))
style->setDisplay(BLOCK);
-
+
+ // Finally update our text decorations in effect.
+ style->addToTextDecorationsInEffect(style->textDecoration());
+
+ // Now return the style.
return style;
}
@@ -2831,8 +2835,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
if(value->cssValueType() == CSSValue::CSS_INHERIT)
{
if(!parentNode) return;
- style->addToTextDecorationsInEffect(parentStyle->textDecorationsInEffect());
- style->setTextDecoration(parentStyle->textDecorationsInEffect());
+ style->setTextDecoration(parentStyle->textDecoration());
return;
}
int t = TDNONE;
@@ -2865,8 +2868,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
}
}
- style->addToTextDecorationsInEffect(t);
- style->setTextDecoration(t);
+ style->setTextDecoration(t);
break;
}
case CSS_PROP__KONQ_FLOW_MODE:
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index 76e8431..d216c86 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -1407,7 +1407,7 @@ InlineBox* RenderObject::createInlineBox()
}
void RenderObject::getTextDecorationColors(int& decorations, QColor& underline, QColor& overline,
- QColor& linethrough)
+ QColor& linethrough, bool quirksMode)
{
int newDecorations = decorations;
RenderObject* curr = this;
@@ -1430,9 +1430,16 @@ void RenderObject::getTextDecorationColors(int& decorations, QColor& underline,
curr = curr->parent();
if (curr && curr->isRenderBlock() && curr->continuation())
curr = curr->continuation();
- } while (curr && newDecorations);
-
- if (newDecorations)
- // Null out everything that's left.
- decorations &= ~newDecorations;
+ } while (curr && newDecorations && (!quirksMode || !curr->element() ||
+ (curr->element()->id() != ID_A && curr->element()->id() != ID_FONT)));
+
+ // If we bailed out, use the element we bailed out at (typically a <font> or <a> element).
+ if (newDecorations && curr) {
+ if (newDecorations & UNDERLINE)
+ underline = curr->style()->color();
+ if (newDecorations & OVERLINE)
+ overline = curr->style()->color();
+ if (newDecorations & LINE_THROUGH)
+ linethrough = curr->style()->color();
+ }
}
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index 1e7a8df..2d15b6d 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -488,7 +488,7 @@ public:
}
void getTextDecorationColors(int& decorations, QColor& underline, QColor& overline,
- QColor& linethrough);
+ QColor& linethrough, bool quirksMode=false);
enum BorderSide {
BSTop, BSBottom, BSLeft, BSRight
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 8949ae0..d4c95b5 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -105,7 +105,7 @@ void TextRun::paintDecoration( QPainter *pt, int _tx, int _ty, int deco)
// Get the text decoration colors.
QColor underline, overline, linethrough;
- object()->getTextDecorationColors(deco, underline, overline, linethrough);
+ object()->getTextDecorationColors(deco, underline, overline, linethrough, true);
// Use a special function for underlines to get the positioning exactly right.
if (deco & UNDERLINE) {
@@ -130,7 +130,7 @@ void TextRun::paintDecoration( QPainter *pt, int _tx, int _ty, int decoration)
int width = m_width - 1;
QColor underline, overline, linethrough;
- object()->getTextDecorationColors(decoration, underline, overline, linethrough);
+ object()->getTextDecorationColors(decoration, underline, overline, linethrough, true);
int underlineOffset = ( pt->fontMetrics().height() + m_baseline ) / 2;
if(underlineOffset <= m_baseline) underlineOffset = m_baseline+1;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list