[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 08:25:22 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 1d53d37c629158dc024c226b5d51c13e94967d5b
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 4 22:22:13 2004 +0000
Fix line-height regression on altavista.
* khtml/rendering/render_br.cpp:
(RenderBR::RenderBR):
(RenderBR::position):
(RenderBR::lineHeight):
(RenderBR::setStyle):
* khtml/rendering/render_br.h:
* khtml/rendering/render_flow.h:
(khtml::RenderFlow::RenderFlow):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6c8848a..373cde2 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,18 @@
2004-02-04 David Hyatt <hyatt at apple.com>
+ Fix line-height regression on altavista.
+
+ * khtml/rendering/render_br.cpp:
+ (RenderBR::RenderBR):
+ (RenderBR::position):
+ (RenderBR::lineHeight):
+ (RenderBR::setStyle):
+ * khtml/rendering/render_br.h:
+ * khtml/rendering/render_flow.h:
+ (khtml::RenderFlow::RenderFlow):
+
+2004-02-04 David Hyatt <hyatt at apple.com>
+
Fix a regression in the line-height of first-lines and inline-blocks.
Reviewed by darin
diff --git a/WebCore/khtml/rendering/render_br.cpp b/WebCore/khtml/rendering/render_br.cpp
index 74aa850..c1ed931 100644
--- a/WebCore/khtml/rendering/render_br.cpp
+++ b/WebCore/khtml/rendering/render_br.cpp
@@ -25,7 +25,8 @@ using namespace khtml;
RenderBR::RenderBR(DOM::NodeImpl* node)
- : RenderText(node, new DOM::DOMStringImpl(QChar('\n'))), m_x(0), m_y(0), m_height(0)
+ : RenderText(node, new DOM::DOMStringImpl(QChar('\n'))), m_x(0), m_y(0), m_height(0),
+ m_lineHeight(-1)
{
}
@@ -47,6 +48,35 @@ void RenderBR::position(InlineBox* box, int from, int len, bool reverse)
m_firstTextBox = m_lastTextBox = 0;
}
+short RenderBR::lineHeight(bool firstLine, bool isRootLineBox) const
+{
+ if (firstLine) {
+ RenderStyle* s = style(firstLine);
+ Length lh = s->lineHeight();
+ if (lh.value < 0) {
+ if (s == style()) {
+ if (m_lineHeight == -1)
+ m_lineHeight = RenderObject::lineHeight(false);
+ return m_lineHeight;
+ }
+ return s->fontMetrics().lineSpacing();
+ }
+ if (lh.isPercent())
+ return lh.minWidth(s->font().pixelSize());
+ return lh.value;
+ }
+
+ if (m_lineHeight == -1)
+ m_lineHeight = RenderObject::lineHeight(false);
+ return m_lineHeight;
+}
+
+void RenderBR::setStyle(RenderStyle* _style)
+{
+ RenderText::setStyle(_style);
+ m_lineHeight = -1;
+}
+
FindSelectionResult RenderBR::checkSelectionPointIgnoringContinuations(int _x, int _y, int _tx, int _ty, DOM::NodeImpl*& node, int &offset)
{
FindSelectionResult result = RenderText::checkSelectionPointIgnoringContinuations(_x, _y, _tx, _ty, node, offset);
diff --git a/WebCore/khtml/rendering/render_br.h b/WebCore/khtml/rendering/render_br.h
index a2b3ea5..e6644fe 100644
--- a/WebCore/khtml/rendering/render_br.h
+++ b/WebCore/khtml/rendering/render_br.h
@@ -45,6 +45,9 @@ public:
virtual unsigned int width(unsigned int, unsigned int, const Font *) const { return 0; }
virtual unsigned int width( unsigned int, unsigned int, bool) const { return 0; }
+ virtual short lineHeight(bool firstLine, bool isRootLineBox=false) const;
+ virtual void setStyle(RenderStyle* _style);
+
// overrides
virtual void calcMinMaxWidth() {}
virtual short minWidth() const { return 0; }
@@ -67,6 +70,8 @@ private:
int m_x;
int m_y;
int m_height;
+ mutable short m_lineHeight;
+
};
}
diff --git a/WebCore/khtml/rendering/render_flow.h b/WebCore/khtml/rendering/render_flow.h
index 2cd8c90..adb81e8 100644
--- a/WebCore/khtml/rendering/render_flow.h
+++ b/WebCore/khtml/rendering/render_flow.h
@@ -43,8 +43,8 @@ class RenderFlow : public RenderBox
{
public:
RenderFlow(DOM::NodeImpl* node)
- : RenderBox(node)
- { m_continuation = 0; m_firstLineBox = 0; m_lastLineBox = 0; }
+ : RenderBox(node), m_lineHeight(-1)
+ { m_continuation = 0; m_firstLineBox = 0; m_lastLineBox = 0;}
virtual RenderFlow* continuation() const { return m_continuation; }
void setContinuation(RenderFlow* c) { m_continuation = c; }
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list