[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 06:38:00 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d27d0802b00e1c9de193c8be3fde1beb2682f45d
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 11 03:02:41 2002 +0000

    	Fix the CSS clip property.
    
            * khtml/css/cssparser.cpp:
            (StyleBaseImpl::parseValue):
            * khtml/css/cssstyleselector.cpp:
            * khtml/ecma/kjs_css.cpp:
            (DOMCSSStyleDeclaration::tryPut):
            * khtml/rendering/render_box.cpp:
            (RenderBox::calcClip):
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::printObject):
            * khtml/rendering/render_replaced.cpp:
            (RenderReplaced::print):
            * khtml/rendering/render_style.cpp:
            (StyleVisualData::StyleVisualData):
            (RenderStyle::diff):
            * khtml/rendering/render_style.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 2838e39..57ad420 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,23 @@
+2002-09-10  David Hyatt  <hyatt at apple.com>
+
+	Fix the CSS clip property.
+	
+        * khtml/css/cssparser.cpp:
+        (StyleBaseImpl::parseValue):
+        * khtml/css/cssstyleselector.cpp:
+        * khtml/ecma/kjs_css.cpp:
+        (DOMCSSStyleDeclaration::tryPut):
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::calcClip):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::printObject):
+        * khtml/rendering/render_replaced.cpp:
+        (RenderReplaced::print):
+        * khtml/rendering/render_style.cpp:
+        (StyleVisualData::StyleVisualData):
+        (RenderStyle::diff):
+        * khtml/rendering/render_style.h:
+
 2002-09-10  Richard Williamson (Local)  <rjw at apple.com>
 
         Fixed broken DOM handling of click count.  DOM click 
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 2838e39..57ad420 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,23 @@
+2002-09-10  David Hyatt  <hyatt at apple.com>
+
+	Fix the CSS clip property.
+	
+        * khtml/css/cssparser.cpp:
+        (StyleBaseImpl::parseValue):
+        * khtml/css/cssstyleselector.cpp:
+        * khtml/ecma/kjs_css.cpp:
+        (DOMCSSStyleDeclaration::tryPut):
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::calcClip):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::printObject):
+        * khtml/rendering/render_replaced.cpp:
+        (RenderReplaced::print):
+        * khtml/rendering/render_style.cpp:
+        (StyleVisualData::StyleVisualData):
+        (RenderStyle::diff):
+        * khtml/rendering/render_style.h:
+
 2002-09-10  Richard Williamson (Local)  <rjw at apple.com>
 
         Fixed broken DOM handling of click count.  DOM click 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2838e39..57ad420 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,23 @@
+2002-09-10  David Hyatt  <hyatt at apple.com>
+
+	Fix the CSS clip property.
+	
+        * khtml/css/cssparser.cpp:
+        (StyleBaseImpl::parseValue):
+        * khtml/css/cssstyleselector.cpp:
+        * khtml/ecma/kjs_css.cpp:
+        (DOMCSSStyleDeclaration::tryPut):
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::calcClip):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::printObject):
+        * khtml/rendering/render_replaced.cpp:
+        (RenderReplaced::print):
+        * khtml/rendering/render_style.cpp:
+        (StyleVisualData::StyleVisualData):
+        (RenderStyle::diff):
+        * khtml/rendering/render_style.h:
+
 2002-09-10  Richard Williamson (Local)  <rjw at apple.com>
 
         Fixed broken DOM handling of click count.  DOM click 
diff --git a/WebCore/khtml/css/cssparser.cpp b/WebCore/khtml/css/cssparser.cpp
index 4bf10b7..199b9cb 100644
--- a/WebCore/khtml/css/cssparser.cpp
+++ b/WebCore/khtml/css/cssparser.cpp
@@ -1212,7 +1212,6 @@ bool StyleBaseImpl::parseValue( const QChar *curP, const QChar *endP, int propId
             parsedValue = parseContent(curP,endP);
         }
 
-      case CSS_PROP__KONQ_JS_CLIP:
       case CSS_PROP_CLIP:                 // <shape> | auto | inherit
       {
 	  int i;
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index 0479a49..e47fc92 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -2389,7 +2389,6 @@ void CSSStyleSelector::applyRule( DOM::CSSProperty *prop )
     }
 
 // rect
-    case CSS_PROP__KONQ_JS_CLIP:
     case CSS_PROP_CLIP:
     {
 	Length top;
@@ -2420,8 +2419,8 @@ void CSSStyleSelector::applyRule( DOM::CSSProperty *prop )
 // 	qDebug("setting clip bottom to %d", bottom.value );
 // 	qDebug("setting clip left to %d", left.value );
 	style->setClip( top, right, bottom, left );
-
-	style->setJsClipMode( (!strictParsing && prop->m_id == CSS_PROP__KONQ_JS_CLIP) ? true : false );
+    style->setHasClip();
+    
         // rect, ident
         break;
     }
diff --git a/WebCore/khtml/ecma/kjs_css.cpp b/WebCore/khtml/ecma/kjs_css.cpp
index 1df9189..9a6d9cb 100644
--- a/WebCore/khtml/ecma/kjs_css.cpp
+++ b/WebCore/khtml/ecma/kjs_css.cpp
@@ -150,11 +150,6 @@ Value DOMCSSStyleDeclaration::tryGet(ExecState *exec, const UString &propertyNam
 void DOMCSSStyleDeclaration::tryPut(ExecState *exec, const UString &pName, const Value& value, int )
 {
   UString propertyName = pName;
-   if ( propertyName == "clip" ) {
-//      QString propvalue = value.toString(exec).qstring();
-//      qDebug("clip: %s", propvalue.latin1());
-    propertyName = "-konq-js-clip";
-   }
 
 #ifdef KJS_VERBOSE
   kdDebug(6070) << "DOMCSSStyleDeclaration::tryPut " << propertyName.qstring() << endl;
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index a4d25b3..b027ec1 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -327,11 +327,8 @@ void RenderBox::calcClip(QPainter* p, int tx, int ty)
     }
     if (!style()->clipRight().isVariable())
     {
-	int w = style()->clipRight().width(m_width-bl-br);
-	if ( style()->jsClipMode() )
-	    clipw = w + tx + bl;
-	else
-	    clipw -= m_width - bl - br - w;
+        int w = style()->clipRight().width(m_width-bl-br);
+        clipw -= m_width - bl - br - w;
     }
     if (!style()->clipTop().isVariable())
     {
@@ -341,11 +338,8 @@ void RenderBox::calcClip(QPainter* p, int tx, int ty)
     }
     if (!style()->clipBottom().isVariable())
     {
-	int h = style()->clipBottom().width(m_height-bt-bb);
-	if ( style()->jsClipMode() )
-	    cliph = h + ty + bt;
-	else
-            cliph -= m_height - bt - bb - h;
+        int h = style()->clipBottom().width(m_height-bt-bb);
+        cliph -= m_height - bt - bb - h;
     }
     //kdDebug( 6040 ) << "setting clip("<<clipx<<","<<clipy<<","<<clipw<<","<<cliph<<")"<<endl;
 
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index e7a4d59..be97db3 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -154,7 +154,7 @@ void RenderFlow::printObject(QPainter *p, int _x, int _y,
 
     bool clipped = false;
     // overflow: hidden
-    if (style()->overflow()==OHIDDEN || style()->jsClipMode() ) {
+    if (style()->overflow()==OHIDDEN || (isPositioned() && style()->hasClip())) {
         calcClip(p, _tx, _ty);
         clipped = true;
     }
diff --git a/WebCore/khtml/rendering/render_replaced.cpp b/WebCore/khtml/rendering/render_replaced.cpp
index 9f42afe..9683f23 100644
--- a/WebCore/khtml/rendering/render_replaced.cpp
+++ b/WebCore/khtml/rendering/render_replaced.cpp
@@ -66,7 +66,7 @@ void RenderReplaced::print( QPainter *p, int _x, int _y, int _w, int _h,
 
     // overflow: hidden
     bool clipped = false;
-    if (style()->overflow()==OHIDDEN || style()->jsClipMode() ) {
+    if (style()->overflow()==OHIDDEN) {
         calcClip(p, _tx, _ty);
 	clipped = true;
     }
diff --git a/WebCore/khtml/rendering/render_style.cpp b/WebCore/khtml/rendering/render_style.cpp
index 749d80f..e9fa537 100644
--- a/WebCore/khtml/rendering/render_style.cpp
+++ b/WebCore/khtml/rendering/render_style.cpp
@@ -74,7 +74,7 @@ bool StyleBoxData::operator==(const StyleBoxData& o) const
 }
 
 StyleVisualData::StyleVisualData()
-    : colspan( 1 ), counter_increment( 0 ), counter_reset( 0 ),
+    : hasClip(false), colspan( 1 ), counter_increment( 0 ), counter_reset( 0 ),
       palette( QApplication::palette() )
 {
 }
@@ -84,7 +84,7 @@ StyleVisualData::~StyleVisualData() {
 
 StyleVisualData::StyleVisualData(const StyleVisualData& o )
     : Shared<StyleVisualData>(),
-      clip( o.clip ), colspan( o.colspan ),
+      clip( o.clip ), hasClip( o.hasClip ), colspan( o.colspan ),
       counter_increment( o.counter_increment ), counter_reset( o.counter_reset ),
       palette( o.palette )
 {
@@ -407,7 +407,6 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const
 	 !(noninherited_flags._overflow == other->noninherited_flags._overflow) ||
 	 !(noninherited_flags._bg_repeat == other->noninherited_flags._bg_repeat) ||
 	 !(noninherited_flags._bg_attachment == other->noninherited_flags._bg_attachment) ||
-	 !(noninherited_flags._jsClipMode == other->noninherited_flags._jsClipMode) ||
 	 !(inherited_flags._text_decoration == other->inherited_flags._text_decoration) ||
 	 *background.get() != *other->background.get()
 	)
diff --git a/WebCore/khtml/rendering/render_style.h b/WebCore/khtml/rendering/render_style.h
index 7e6f7ba..4a56136 100644
--- a/WebCore/khtml/rendering/render_style.h
+++ b/WebCore/khtml/rendering/render_style.h
@@ -322,6 +322,7 @@ public:
 
     bool operator==( const StyleVisualData &o ) const {
 	return ( clip == o.clip &&
+         hasClip == o.hasClip &&
 		 colspan == o.colspan &&
 		 counter_increment == o.counter_increment &&
 		 counter_reset == o.counter_reset &&
@@ -332,7 +333,8 @@ public:
     }
 
     LengthBox clip;
-
+    bool hasClip : 1;
+    
     short colspan; // for html, not a css2 attribute
 
     short counter_increment; //ok, so these are not visual mode spesific
@@ -552,7 +554,6 @@ protected:
         PseudoId _styleType : 3;
         bool _hasHover : 1;
         bool _hasActive : 1;
-        bool _jsClipMode : 1;
         EUnicodeBidi _unicodeBidi : 2;
     } noninherited_flags;
 
@@ -612,7 +613,6 @@ protected:
 	noninherited_flags._styleType = NOPSEUDO;
 	noninherited_flags._hasHover = false;
 	noninherited_flags._hasActive = false;
-	noninherited_flags._jsClipMode = false;
 	noninherited_flags._unicodeBidi = UBNormal;
     }
 
@@ -700,8 +700,8 @@ public:
     Length clipRight() const { return visual->clip.right; }
     Length clipTop() const { return visual->clip.top; }
     Length clipBottom() const { return visual->clip.bottom; }
-    bool jsClipMode() const { return noninherited_flags._jsClipMode; }
-
+    bool hasClip() const { return visual->hasClip; }
+    
     EUnicodeBidi unicodeBidi() const { return noninherited_flags._unicodeBidi; }
 
     EClear clear() const { return  noninherited_flags._clear; }
@@ -805,13 +805,13 @@ public:
     void setVerticalAlign(EVerticalAlign v) { noninherited_flags._vertical_align = v; }
     void setVerticalAlignLength(Length l) { SET_VAR(box, vertical_align, l ) }
 
+    void setHasClip() { SET_VAR(visual,hasClip,true) }
     void setClipLeft(Length v) { SET_VAR(visual,clip.left,v) }
     void setClipRight(Length v) { SET_VAR(visual,clip.right,v) }
     void setClipTop(Length v) { SET_VAR(visual,clip.top,v) }
     void setClipBottom(Length v) { SET_VAR(visual,clip.bottom,v) }
     void setClip( Length top, Length right, Length bottom, Length left );
-    void setJsClipMode( bool b ) { noninherited_flags._jsClipMode = b; }
-
+    
     void setUnicodeBidi( EUnicodeBidi b ) { noninherited_flags._unicodeBidi = b; }
 
     void setClear(EClear v) {  noninherited_flags._clear = v; }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list