[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:48:16 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5509c84bd626cd70f61c115544e72b08a6e9a381
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 23 22:36:07 2003 +0000

    	Clean up the mess left by a couple of previous checkins.  I had
    	patched computeLength and computeLengthFloat to take a CSSStyleSelector,
    	but then I came up with a simpler solution that didn't require that
    	the selector be passed in as an argument.  I forgot, however, to revert
    	the functions back to their original forms.  This patch does that.
    
            Reviewed by john
    
            * khtml/css/css_valueimpl.cpp:
            (CSSPrimitiveValueImpl::computeLength):
            (CSSPrimitiveValueImpl::computeLengthFloat):
            * khtml/css/css_valueimpl.h:
            * khtml/css/cssstyleselector.cpp:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4693 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d71c190..e270df6 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,21 @@
 2003-07-23  Dave Hyatt  <hyatt at apple.com>
 
+	Clean up the mess left by a couple of previous checkins.  I had
+	patched computeLength and computeLengthFloat to take a CSSStyleSelector,
+	but then I came up with a simpler solution that didn't require that
+	the selector be passed in as an argument.  I forgot, however, to revert
+	the functions back to their original forms.  This patch does that.
+	
+        Reviewed by john
+
+        * khtml/css/css_valueimpl.cpp:
+        (CSSPrimitiveValueImpl::computeLength):
+        (CSSPrimitiveValueImpl::computeLengthFloat):
+        * khtml/css/css_valueimpl.h:
+        * khtml/css/cssstyleselector.cpp:
+
+2003-07-23  Dave Hyatt  <hyatt at apple.com>
+
 	Temporary hack to ensure that the layout tests will not all
 	be failures if/when the layout tests regression gets fixed.
 	Will remove once we can run the tests.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d71c190..e270df6 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,21 @@
 2003-07-23  Dave Hyatt  <hyatt at apple.com>
 
+	Clean up the mess left by a couple of previous checkins.  I had
+	patched computeLength and computeLengthFloat to take a CSSStyleSelector,
+	but then I came up with a simpler solution that didn't require that
+	the selector be passed in as an argument.  I forgot, however, to revert
+	the functions back to their original forms.  This patch does that.
+	
+        Reviewed by john
+
+        * khtml/css/css_valueimpl.cpp:
+        (CSSPrimitiveValueImpl::computeLength):
+        (CSSPrimitiveValueImpl::computeLengthFloat):
+        * khtml/css/css_valueimpl.h:
+        * khtml/css/cssstyleselector.cpp:
+
+2003-07-23  Dave Hyatt  <hyatt at apple.com>
+
 	Temporary hack to ensure that the layout tests will not all
 	be failures if/when the layout tests regression gets fixed.
 	Will remove once we can run the tests.
diff --git a/WebCore/khtml/css/css_valueimpl.cpp b/WebCore/khtml/css/css_valueimpl.cpp
index 41bd325..0917b1a 100644
--- a/WebCore/khtml/css/css_valueimpl.cpp
+++ b/WebCore/khtml/css/css_valueimpl.cpp
@@ -500,10 +500,9 @@ void CSSPrimitiveValueImpl::cleanup()
     m_type = 0;
 }
 
-int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics,
-                                          khtml::CSSStyleSelector* selector )
+int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics )
 {
-    double result = computeLengthFloat( style, devMetrics, selector );
+    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.
@@ -515,9 +514,9 @@ int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDevic
 }
 
 int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics, 
-                                          khtml::CSSStyleSelector* selector, double multiplier )
+                                          double multiplier )
 {
-    double result = multiplier * computeLengthFloat( style, devMetrics, selector );
+    double result = multiplier * 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.
@@ -529,7 +528,7 @@ int CSSPrimitiveValueImpl::computeLength( khtml::RenderStyle *style, QPaintDevic
 }
 
 double CSSPrimitiveValueImpl::computeLengthFloat( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics,
-                                                  khtml::CSSStyleSelector* selector, bool applyZoomFactor )
+                                                  bool applyZoomFactor )
 {
     unsigned short type = primitiveType();
 
@@ -543,7 +542,7 @@ double CSSPrimitiveValueImpl::computeLengthFloat( khtml::RenderStyle *style, QPa
     switch(type)
     {
     case CSSPrimitiveValue::CSS_EMS:
-        factor = (selector && applyZoomFactor) ?
+        factor = applyZoomFactor ?
           style->htmlFont().getFontDef().computedSize :
           style->htmlFont().getFontDef().specifiedSize;
         break;
diff --git a/WebCore/khtml/css/css_valueimpl.h b/WebCore/khtml/css/css_valueimpl.h
index 2172f71..e48ac68 100644
--- a/WebCore/khtml/css/css_valueimpl.h
+++ b/WebCore/khtml/css/css_valueimpl.h
@@ -35,7 +35,6 @@
 namespace khtml {
     class RenderStyle;
     class CachedImage;
-    class CSSStyleSelector;
 }
 
 namespace DOM {
@@ -177,12 +176,10 @@ public:
      * this is screen/printer dependent, so we probably need a config option for this,
      * and some tool to calibrate.
      */
-    int computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics,
-                       khtml::CSSStyleSelector* selector );
-    int computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics, 
-                       khtml::CSSStyleSelector* selector, double multiplier );
+    int computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics );
+    int computeLength( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics, double multiplier );
     double computeLengthFloat( khtml::RenderStyle *style, QPaintDeviceMetrics *devMetrics,
-                               khtml::CSSStyleSelector* selector, bool applyZoomFactor = true );
+                               bool applyZoomFactor = true );
 
     // use with care!!!
     void setPrimitiveType(unsigned short type) { m_type = type; }
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index 1cf3bcd..7a4933b 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -1332,7 +1332,7 @@ static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyl
     } else {
 	int type = primitiveValue->primitiveType();
 	if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
-	    l = Length(primitiveValue->computeLength(style, paintDeviceMetrics, selector), Fixed);
+	    l = Length(primitiveValue->computeLength(style, paintDeviceMetrics), Fixed);
 	else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
 	    l = Length(int(primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE)), Percent);
 	else if(type == CSSPrimitiveValue::CSS_NUMBER)
@@ -2072,7 +2072,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
       Length l;
       int type = primitiveValue->primitiveType();
       if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
-	l = Length(primitiveValue->computeLength(style, paintDeviceMetrics, this), Fixed);
+	l = Length(primitiveValue->computeLength(style, paintDeviceMetrics), Fixed);
       else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
 	l = Length((int)primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
       else
@@ -2086,7 +2086,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
       Length l;
       int type = primitiveValue->primitiveType();
       if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
-	l = Length(primitiveValue->computeLength(style, paintDeviceMetrics, this), Fixed);
+	l = Length(primitiveValue->computeLength(style, paintDeviceMetrics), Fixed);
       else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
 	l = Length((int)primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
       else
@@ -2098,7 +2098,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
         {
         if(!primitiveValue) break;
         short spacing = 0;
-        spacing =  primitiveValue->computeLength(style, paintDeviceMetrics, this);
+        spacing =  primitiveValue->computeLength(style, paintDeviceMetrics);
         style->setBorderSpacing(spacing);
         break;
         }
@@ -2313,7 +2313,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
             width = 5;
             break;
         case CSS_VAL_INVALID:
-            width = primitiveValue->computeLength(style, paintDeviceMetrics, this);
+            width = primitiveValue->computeLength(style, paintDeviceMetrics);
             break;
         default:
             return;
@@ -2368,7 +2368,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
             width = 0;
         } else {
 	    if(!primitiveValue) return;
-	    width = primitiveValue->computeLength(style, paintDeviceMetrics, this);
+	    width = primitiveValue->computeLength(style, paintDeviceMetrics);
 	}
         switch(id)
         {
@@ -2458,7 +2458,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
             int type = primitiveValue->primitiveType();
             if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
                 // Handle our quirky margin units if we have them.
-                l = Length(primitiveValue->computeLength(style, paintDeviceMetrics, this), Fixed, 
+                l = Length(primitiveValue->computeLength(style, paintDeviceMetrics), Fixed, 
                            primitiveValue->isQuirkValue());
             else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
                 l = Length((int)primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
@@ -2544,7 +2544,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
         {
             int type = primitiveValue->primitiveType();
             if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
-                l = Length(primitiveValue->computeLength(style, paintDeviceMetrics, this), Fixed);
+                l = Length(primitiveValue->computeLength(style, paintDeviceMetrics), Fixed);
             else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
             {
                 // ### compute from parents height!!!
@@ -2611,7 +2611,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
 	  int type = primitiveValue->primitiveType();
 	  Length l;
 	  if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
-	    l = Length(primitiveValue->computeLength(style, paintDeviceMetrics, this), Fixed );
+	    l = Length(primitiveValue->computeLength(style, paintDeviceMetrics), Fixed );
 	  else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
 	    l = Length( int( primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE) ), Percent );
 
@@ -2668,7 +2668,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
                                            type != CSSPrimitiveValue::CSS_EMS && 
                                            type != CSSPrimitiveValue::CSS_EXS);
             if (type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
-                size = primitiveValue->computeLengthFloat(parentStyle, paintDeviceMetrics, this, false);
+                size = primitiveValue->computeLengthFloat(parentStyle, paintDeviceMetrics, false);
             else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
                 size = (primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE)
                         * oldSize) / 100;
@@ -2743,8 +2743,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
                 if (type != CSSPrimitiveValue::CSS_EMS && type != CSSPrimitiveValue::CSS_EXS && view && view->part()) {
                     multiplier = view->part()->zoomFactor() / 100.0;
                 }
-                lineHeight = Length(primitiveValue->computeLength(style, paintDeviceMetrics, 
-                                                                  this, multiplier), Fixed);
+                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)
@@ -3122,9 +3121,9 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
         for (int i = 0; i < len; i++) {
             ShadowValueImpl *item = static_cast<ShadowValueImpl*>(list->item(i));
 
-            int x = item->x->computeLength(style, paintDeviceMetrics, this);
-            int y = item->y->computeLength(style, paintDeviceMetrics, this);
-            int blur = item->blur ? item->blur->computeLength(style, paintDeviceMetrics, this) : 0;
+            int x = item->x->computeLength(style, paintDeviceMetrics);
+            int y = item->y->computeLength(style, paintDeviceMetrics);
+            int blur = item->blur ? item->blur->computeLength(style, paintDeviceMetrics) : 0;
             QColor col = khtml::transparentColor;
             if (item->color) {
                 int ident = item->color->getIdent();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list