[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:09:34 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 99a0b88df30ca7326d59bc194c57b5c46734b538
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 27 01:07:51 2002 +0000
Fix the font family stuff to be refcounted, so copying
fonts stays cheap. Re-enabling it.
Patch the render_arena code with some debugging info
to help detect when memory gets trashed.
Fix the background painting code to deal with negative
x and y bakcground positions. Fixes the brain on
brainjar.com.
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/render_arena.cpp:
(RenderArena::free):
* khtml/rendering/render_box.cpp:
(RenderBox::paintBackground):
* kwq/KWQFont.h:
* kwq/KWQFont.mm:
(QFontFamily::QFontFamily):
(QFontFamily::operator=):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 1ee119a..355a950 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,25 @@
+2002-11-26 David Hyatt <hyatt at apple.com>
+
+ Fix the font family stuff to be refcounted, so copying
+ fonts stays cheap. Re-enabling it.
+
+ Patch the render_arena code with some debugging info
+ to help detect when memory gets trashed.
+
+ Fix the background painting code to deal with negative
+ x and y bakcground positions. Fixes the brain on
+ brainjar.com.
+
+ * khtml/css/cssstyleselector.cpp:
+ * khtml/rendering/render_arena.cpp:
+ (RenderArena::free):
+ * khtml/rendering/render_box.cpp:
+ (RenderBox::paintBackground):
+ * kwq/KWQFont.h:
+ * kwq/KWQFont.mm:
+ (QFontFamily::QFontFamily):
+ (QFontFamily::operator=):
+
=== Alexander-34 ===
2002-11-26 David Hyatt <hyatt at apple.com>
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 1ee119a..355a950 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,25 @@
+2002-11-26 David Hyatt <hyatt at apple.com>
+
+ Fix the font family stuff to be refcounted, so copying
+ fonts stays cheap. Re-enabling it.
+
+ Patch the render_arena code with some debugging info
+ to help detect when memory gets trashed.
+
+ Fix the background painting code to deal with negative
+ x and y bakcground positions. Fixes the brain on
+ brainjar.com.
+
+ * khtml/css/cssstyleselector.cpp:
+ * khtml/rendering/render_arena.cpp:
+ (RenderArena::free):
+ * khtml/rendering/render_box.cpp:
+ (RenderBox::paintBackground):
+ * kwq/KWQFont.h:
+ * kwq/KWQFont.mm:
+ (QFontFamily::QFontFamily):
+ (QFontFamily::operator=):
+
=== Alexander-34 ===
2002-11-26 David Hyatt <hyatt at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1ee119a..355a950 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,25 @@
+2002-11-26 David Hyatt <hyatt at apple.com>
+
+ Fix the font family stuff to be refcounted, so copying
+ fonts stays cheap. Re-enabling it.
+
+ Patch the render_arena code with some debugging info
+ to help detect when memory gets trashed.
+
+ Fix the background painting code to deal with negative
+ x and y bakcground positions. Fixes the brain on
+ brainjar.com.
+
+ * khtml/css/cssstyleselector.cpp:
+ * khtml/rendering/render_arena.cpp:
+ (RenderArena::free):
+ * khtml/rendering/render_box.cpp:
+ (RenderBox::paintBackground):
+ * kwq/KWQFont.h:
+ * kwq/KWQFont.mm:
+ (QFontFamily::QFontFamily):
+ (QFontFamily::operator=):
+
=== Alexander-34 ===
2002-11-26 David Hyatt <hyatt at apple.com>
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index c86225d..1f5fb0f 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -2575,10 +2575,6 @@ void CSSStyleSelector::applyRule( DOM::CSSProperty *prop )
if (style->setFontDef( fontDef )) {
fontDirty = true;
}
-
- // Turn multiple fonts off for now until I can
- // figure out how to make it fast.
- return;
}
}
}
diff --git a/WebCore/khtml/rendering/render_arena.cpp b/WebCore/khtml/rendering/render_arena.cpp
index aa38ce8..e0b37c2 100644
--- a/WebCore/khtml/rendering/render_arena.cpp
+++ b/WebCore/khtml/rendering/render_arena.cpp
@@ -68,11 +68,13 @@ void* RenderArena::allocate(size_t size)
void RenderArena::free(size_t size, void* ptr)
{
-#ifdef DEBUG
+#if APPLE_CHANGES
+#ifndef NDEBUG
// Mark the memory with 0xdd in DEBUG builds so that there will be
// problems if someone tries to access memory that they've freed.
memset(ptr, 0xdd, size);
#endif
+#endif
// Ensure we have correct alignment for pointers. Important for Tru64
size = ROUNDUP(size, sizeof(void*));
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 3967a8e..25d947f 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -218,7 +218,7 @@ void RenderBox::paintBackground(QPainter *p, const QColor &c, CachedImage *bg, i
//scroll
int pw = m_width - vpab;
int h = isHtml() ? height : m_height;
- if (isTableCell()) {
+ if (isTableCell()) {
// Table cells' m_height variable is wrong. You have to take into
// account this hack extra stuff to get the right height.
// Otherwise using background-position: bottom won't work in
@@ -233,7 +233,18 @@ void RenderBox::paintBackground(QPainter *p, const QColor &c, CachedImage *bg, i
EBackgroundRepeat bgr = sptr->backgroundRepeat();
if( (bgr == NO_REPEAT || bgr == REPEAT_Y) && w > pixw ) {
cw = pixw;
- cx = _tx + sptr->backgroundXPosition().minWidth(pw-pixw);
+ int xPosition = sptr->backgroundXPosition().minWidth(pw-pixw);
+ if (xPosition >= 0)
+ cx = _tx + xPosition;
+ else {
+ cx = _tx;
+ if (pixw == 0)
+ sx = 0;
+ else {
+ sx = -xPosition;
+ cw += xPosition;
+ }
+ }
} else {
cw = w-vpab;
cx = _tx;
@@ -248,7 +259,18 @@ void RenderBox::paintBackground(QPainter *p, const QColor &c, CachedImage *bg, i
if( (bgr == NO_REPEAT || bgr == REPEAT_X) && h > pixh ) {
ch = pixh;
- cy = _ty + sptr->backgroundYPosition().minWidth(ph-pixh);
+ int yPosition = sptr->backgroundYPosition().minWidth(ph-pixh);
+ if (yPosition >= 0)
+ cy = _ty + yPosition;
+ else {
+ cy = _ty;
+ if (pixh == 0)
+ sy = 0;
+ else {
+ sy = -yPosition;
+ ch += yPosition;
+ }
+ }
} else {
ch = h-hpab;
cy = _ty;
diff --git a/WebCore/kwq/KWQFont.h b/WebCore/kwq/KWQFont.h
index ee3fd08..8360477 100644
--- a/WebCore/kwq/KWQFont.h
+++ b/WebCore/kwq/KWQFont.h
@@ -39,7 +39,7 @@ class NSString;
class QFontFamily {
public:
QFontFamily();
- ~QFontFamily() { delete _next; }
+ ~QFontFamily() { if (_next) _next->deref(); }
QFontFamily(const QFontFamily& other);
QFontFamily& operator=(const QFontFamily& other);
@@ -50,14 +50,25 @@ public:
NSString* getNSFamily() const { return _family; }
QFontFamily* next() { return _next; }
- void appendFamily(QFontFamily* family) { delete _next; _next = family; }
+ void appendFamily(QFontFamily* family)
+ {
+ if (_next)
+ _next->deref();
+ _next = family;
+ if (_next)
+ _next->ref();
+ }
bool operator==(const QFontFamily &compareFontFamily) const;
bool operator!=(const QFontFamily &x) const { return !(*this == x); }
+ void ref() { _refCnt++; };
+ void deref() { _refCnt--; if (_refCnt == 0) delete this; };
+
private:
NSString* _family;
QFontFamily* _next;
+ int _refCnt;
};
class QFont {
diff --git a/WebCore/kwq/KWQFont.mm b/WebCore/kwq/KWQFont.mm
index 86b850f..c39b301 100644
--- a/WebCore/kwq/KWQFont.mm
+++ b/WebCore/kwq/KWQFont.mm
@@ -32,25 +32,25 @@
QFontFamily::QFontFamily()
: _family(@"")
, _next(0)
+ , _refCnt(0)
{
}
QFontFamily::QFontFamily(const QFontFamily& other)
{
- if (other._next)
- _next = new QFontFamily(*(other._next));
- else
- _next = 0;
+ _next = other._next;
+ if (_next)
+ _next->ref();
_family = other._family;
}
QFontFamily& QFontFamily::operator=(const QFontFamily& other) {
if (this != &other) {
- delete _next;
- if (other._next)
- _next = new QFontFamily(*(other._next));
- else
- _next = 0;
+ if (_next)
+ _next->deref();
+ _next = other._next;
+ if (_next)
+ _next->ref();
_family = other._family;
}
return *this;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list