[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:33:56 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 77869b45b70830472f2de58d2b7a0043b8d04abb
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Apr 3 19:07:38 2003 +0000
Reviewed by John.
- fixed 3194468 -- ARCH: text zoom should scale line-height as well as font-size
* khtml/css/css_valueimpl.h:
* khtml/css/css_valueimpl.cpp: (CSSPrimitiveValueImpl::computeLength): Add a new version that does
a multiply before rounding. Also simplify the rounding code.
* khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): For line height, multiply by the
text zoom factor in cases where the height isn't already relative to the font size.
- other changes
* khtml/rendering/render_replaced.cpp: (RenderWidget::paintObject): Disable code to work around
X11 widget size limit. It can only do harm for us.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 2a0e2de..cc65c77 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,23 @@
2003-04-03 Darin Adler <darin at apple.com>
+ Reviewed by John.
+
+ - fixed 3194468 -- ARCH: text zoom should scale line-height as well as font-size
+
+ * khtml/css/css_valueimpl.h:
+ * khtml/css/css_valueimpl.cpp: (CSSPrimitiveValueImpl::computeLength): Add a new version that does
+ a multiply before rounding. Also simplify the rounding code.
+
+ * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): For line height, multiply by the
+ text zoom factor in cases where the height isn't already relative to the font size.
+
+ - other changes
+
+ * khtml/rendering/render_replaced.cpp: (RenderWidget::paintObject): Disable code to work around
+ X11 widget size limit. It can only do harm for us.
+
+2003-04-03 Darin Adler <darin at apple.com>
+
Reviewed by Ken.
- fixed bug 3216832 -- REGRESSION: scroll bar doesn't appear soon enough when shrinking excite.com horizontally
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2a0e2de..cc65c77 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,23 @@
2003-04-03 Darin Adler <darin at apple.com>
+ Reviewed by John.
+
+ - fixed 3194468 -- ARCH: text zoom should scale line-height as well as font-size
+
+ * khtml/css/css_valueimpl.h:
+ * khtml/css/css_valueimpl.cpp: (CSSPrimitiveValueImpl::computeLength): Add a new version that does
+ a multiply before rounding. Also simplify the rounding code.
+
+ * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): For line height, multiply by the
+ text zoom factor in cases where the height isn't already relative to the font size.
+
+ - other changes
+
+ * khtml/rendering/render_replaced.cpp: (RenderWidget::paintObject): Disable code to work around
+ X11 widget size limit. It can only do harm for us.
+
+2003-04-03 Darin Adler <darin at apple.com>
+
Reviewed by Ken.
- fixed bug 3216832 -- REGRESSION: scroll bar doesn't appear soon enough when shrinking excite.com horizontally
diff --git a/WebCore/khtml/css/css_valueimpl.cpp b/WebCore/khtml/css/css_valueimpl.cpp
index dd57650..fe2ae51 100644
--- a/WebCore/khtml/css/css_valueimpl.cpp
+++ b/WebCore/khtml/css/css_valueimpl.cpp
@@ -501,14 +501,25 @@ void CSSPrimitiveValueImpl::cleanup()
int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics )
{
double result = computeLengthFloat( style, devMetrics );
+#if APPLE_CHANGES
+ // This conversion is imprecise, often resulting in values of, e.g., 44.99998. We
+ // need to go ahead and round if we're really close to the next integer value.
+ int intResult = (int)(result + (result < 0 ? -0.01 : +0.01));
+#else
int intResult = (int)result;
+#endif
+ return intResult;
+}
+
+int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics, double multiplier )
+{
+ double result = multiplier * computeLengthFloat( style, devMetrics );
#if APPLE_CHANGES
- // This conversion is imprecise, often resulting in values of e.g., 44.99998. We
+ // This conversion is imprecise, often resulting in values of, e.g., 44.99998. We
// need to go ahead and round if we're really close to the next integer value.
- double newResult = (intResult < 0) ? result-0.01 : result+0.01;
- int secondIntResult = (int)newResult;
- if (secondIntResult != intResult)
- return secondIntResult;
+ int intResult = (int)(result + (result < 0 ? -0.01 : +0.01));
+#else
+ int intResult = (int)result;
#endif
return intResult;
}
diff --git a/WebCore/khtml/css/css_valueimpl.h b/WebCore/khtml/css/css_valueimpl.h
index c537f92..fca6fd1 100644
--- a/WebCore/khtml/css/css_valueimpl.h
+++ b/WebCore/khtml/css/css_valueimpl.h
@@ -178,7 +178,7 @@ public:
* and some tool to calibrate.
*/
int computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics );
-
+ int computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics, double multiplier );
double computeLengthFloat( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics );
// use with care!!!
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index bae0c28..89a57da 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -2736,9 +2736,15 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
int type = primitiveValue->primitiveType();
if(primitiveValue->getIdent() == CSS_VAL_NORMAL)
lineHeight = Length( -100, Percent );
- else if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
- lineHeight = Length(primitiveValue->computeLength(style, paintDeviceMetrics), Fixed);
- else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
+ else if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG) {
+ double multiplier = 1.0;
+ // Scale for the font zoom factor only for types other than "em" and "ex", since those are
+ // already based on the font size.
+ if (type != CSSPrimitiveValue::CSS_EMS && type != CSSPrimitiveValue::CSS_EXS && view && view->part()) {
+ multiplier = view->part()->zoomFactor() / 100.0;
+ }
+ lineHeight = Length(primitiveValue->computeLength(style, paintDeviceMetrics, multiplier), Fixed);
+ } else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
lineHeight = Length( ( style->font().pixelSize() * int(primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE)) ) / 100, Fixed );
else if(type == CSSPrimitiveValue::CSS_NUMBER)
lineHeight = Length(int(primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER)*100), Percent);
diff --git a/WebCore/khtml/rendering/render_replaced.cpp b/WebCore/khtml/rendering/render_replaced.cpp
index 3fb5b3a..32710d0 100644
--- a/WebCore/khtml/rendering/render_replaced.cpp
+++ b/WebCore/khtml/rendering/render_replaced.cpp
@@ -259,6 +259,7 @@ void RenderWidget::paintObject(QPainter* /*p*/, int, int, int, int, int _tx, int
int xPos = _tx+borderLeft()+paddingLeft();
int yPos = _ty+borderTop()+paddingTop();
+#if !APPLE_CHANGES
int childw = m_widget->width();
int childh = m_widget->height();
if ( (childw == 2000 || childh == 3072) && m_widget->inherits( "KHTMLView" ) ) {
@@ -292,6 +293,8 @@ void RenderWidget::paintObject(QPainter* /*p*/, int, int, int, int, int _tx, int
xPos = xNew;
yPos = yNew;
}
+#endif
+
m_view->addChild(m_widget, xPos, yPos );
m_widget->show();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list