[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:08:12 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit fb1fc5f8eecbbdf06d4cd926850c6dfa0066a801
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 31 19:46:30 2003 +0000
Reviewed by David
<rdar://problem/3468910>: REGRESSION: other than focus rings, outlines styles are broken
Outlines now draw like they used to.
* khtml/rendering/render_inline.cpp:
(RenderInline::paintObject): Now branches to call focus ring or "regular" outlines.
(RenderInline::paintFocusRing): Broke out drawing aqua focus rings into its
own function.
(RenderInline::paintOutlines): New function to draw "regular outlines.
(RenderInline::paintOutline): Removed code which special-cased aqua outlines.
* khtml/rendering/render_inline.h: Added paintOutlines declaration.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index cb84844..d86076a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2003-10-31 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by David
+
+ <rdar://problem/3468910>: REGRESSION: other than focus rings, outlines styles are broken
+
+ Outlines now draw like they used to.
+
+ * khtml/rendering/render_inline.cpp:
+ (RenderInline::paintObject): Now branches to call focus ring or "regular" outlines.
+ (RenderInline::paintFocusRing): Broke out drawing aqua focus rings into its
+ own function.
+ (RenderInline::paintOutlines): New function to draw "regular outlines.
+ (RenderInline::paintOutline): Removed code which special-cased aqua outlines.
+ * khtml/rendering/render_inline.h: Added paintOutlines declaration.
+
2003-10-31 David Hyatt <hyatt at apple.com>
Fix for 3467419, highlighted text in "search in books" Amazon feature is obscured. The
diff --git a/WebCore/khtml/rendering/render_inline.cpp b/WebCore/khtml/rendering/render_inline.cpp
index 9eecd49..652cd4e 100644
--- a/WebCore/khtml/rendering/render_inline.cpp
+++ b/WebCore/khtml/rendering/render_inline.cpp
@@ -295,11 +295,17 @@ void RenderInline::paintObject(QPainter *p, int _x, int _y,
paintLineBoxDecorations(p, _x, _y, _w, _h, _tx, _ty, paintAction);
if (style()->visibility() == VISIBLE && paintAction == PaintActionOutline) {
- QRect r(_x, _y, _w, _h);
- paintOutline(p, _tx, _ty, r, r, r);
+#if APPLE_CHANGES
+ EBorderStyle os = style()->outlineStyle();
+ if (os == APPLEAQUA)
+ paintFocusRing(p, _tx, _ty);
+ else
+#endif
+ paintOutlines(p, _tx, _ty);
}
}
+#if APPLE_CHANGES
void RenderInline::addFocusRingRects(QPainter *p, int _tx, int _ty)
{
for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
@@ -320,6 +326,38 @@ void RenderInline::addFocusRingRects(QPainter *p, int _tx, int _ty)
_ty - containingBlock()->yPos() + continuation()->yPos());
}
+void RenderInline::paintFocusRing(QPainter *p, int tx, int ty)
+{
+ int ow = style()->outlineWidth();
+ if (ow == 0 || m_isContinuation) // Continuations get painted by the original inline.
+ return;
+
+ QColor oc = style()->outlineColor();
+ if (!oc.isValid())
+ oc = style()->color();
+
+ p->initFocusRing(ow, oc);
+ addFocusRingRects(p, tx, ty);
+ p->drawFocusRing();
+ p->clearFocusRing();
+}
+#endif
+
+void RenderInline::paintOutlines(QPainter *p, int _tx, int _ty)
+{
+ QPtrList <QRect> rects;
+ rects.setAutoDelete(true);
+
+ rects.append(new QRect());
+ for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
+ rects.append(new QRect(curr->xPos(), curr->yPos(), curr->width(), curr->height()));
+ }
+ rects.append(new QRect());
+
+ for (unsigned int i = 1; i < rects.count() - 1; i++)
+ paintOutline(p, _tx, _ty, *rects.at(i-1), *rects.at(i), *rects.at(i+1));
+}
+
void RenderInline::paintOutline(QPainter *p, int tx, int ty, const QRect &lastline, const QRect &thisline, const QRect &nextline)
{
int ow = style()->outlineWidth();
@@ -336,16 +374,6 @@ void RenderInline::paintOutline(QPainter *p, int tx, int ty, const QRect &lastli
int b = ty + thisline.bottom() + 1;
int r = tx + thisline.right() + 1;
-#ifdef APPLE_CHANGES
- if (os == APPLEAQUA) {
- p->initFocusRing(ow, oc);
- addFocusRingRects(p, tx, ty);
- p->drawFocusRing();
- p->clearFocusRing();
- return;
- }
-#endif
-
// left edge
drawBorder(p,
l - ow,
diff --git a/WebCore/khtml/rendering/render_inline.h b/WebCore/khtml/rendering/render_inline.h
index 87a40c0..ac70483 100644
--- a/WebCore/khtml/rendering/render_inline.h
+++ b/WebCore/khtml/rendering/render_inline.h
@@ -76,11 +76,13 @@ public:
#ifdef APPLE_CHANGES
virtual void addFocusRingRects(QPainter *painter, int _tx, int _ty);
+ void paintFocusRing(QPainter *p, int tx, int ty);
#endif
protected:
static RenderInline* cloneInline(RenderFlow* src);
void paintOutline(QPainter *p, int tx, int ty, const QRect &prevLine, const QRect &thisLine, const QRect &nextLine);
+ void paintOutlines(QPainter *p, int tx, int ty);
private:
bool m_isContinuation : 1; // Whether or not we're a continuation of an inline.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list