[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:07:36 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 721ef7f12a25b2be2b5dd7775e1fd315a360d74f
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 30 22:00:36 2003 +0000

            Reviewed by me
    
    	Rolling out this code since it caused a big performance
    	regression.
    
    	2003-10-29  David Hyatt  <hyatt at apple.com>
    
    		Add the paged media properties to RenderStyle.
    		They aren't used yet, but they should now be
    		parsed and interpreted correctly.
    
            * khtml/css/cssstyleselector.cpp:
            (khtml::CSSStyleSelector::applyRule):
            * khtml/rendering/render_style.cpp:
            (StyleSurroundData::StyleSurroundData):
            (StyleBoxData::StyleBoxData):
            (StyleBoxData::operator==):
            (StyleVisualData::~StyleVisualData):
            (StyleVisualData::StyleVisualData):
            (StyleBackgroundData::StyleBackgroundData):
            (StyleFlexibleBoxData::StyleFlexibleBoxData):
            (opacity):
            (textShadow):
            (StyleInheritedData::StyleInheritedData):
            (StyleInheritedData::~StyleInheritedData):
            (StyleInheritedData::operator==):
            * khtml/rendering/render_style.h:
            (khtml::StyleBackgroundData::~StyleBackgroundData):
            (khtml::StyleFlexibleBoxData::~StyleFlexibleBoxData):
            (khtml::RenderStyle::NonInheritedFlags::operator==):
            (khtml::RenderStyle::setBitDefaults):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5317 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c0cceee..07c17c2 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,37 @@
+2003-10-30  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by me
+
+	Rolling out this code since it caused a big performance 
+	regression.
+
+	2003-10-29  David Hyatt  <hyatt at apple.com>
+
+		Add the paged media properties to RenderStyle.  
+		They aren't used yet, but they should now be
+		parsed and interpreted correctly.
+
+        * khtml/css/cssstyleselector.cpp:
+        (khtml::CSSStyleSelector::applyRule):
+        * khtml/rendering/render_style.cpp:
+        (StyleSurroundData::StyleSurroundData):
+        (StyleBoxData::StyleBoxData):
+        (StyleBoxData::operator==):
+        (StyleVisualData::~StyleVisualData):
+        (StyleVisualData::StyleVisualData):
+        (StyleBackgroundData::StyleBackgroundData):
+        (StyleFlexibleBoxData::StyleFlexibleBoxData):
+        (opacity):
+        (textShadow):
+        (StyleInheritedData::StyleInheritedData):
+        (StyleInheritedData::~StyleInheritedData):
+        (StyleInheritedData::operator==):
+        * khtml/rendering/render_style.h:
+        (khtml::StyleBackgroundData::~StyleBackgroundData):
+        (khtml::StyleFlexibleBoxData::~StyleFlexibleBoxData):
+        (khtml::RenderStyle::NonInheritedFlags::operator==):
+        (khtml::RenderStyle::setBitDefaults):
+
 2003-10-29  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3466628, widgets in overflow blocks don't move when the overflow block is scrolled.  This
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index d647622..6442a5f 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -2014,74 +2014,11 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
         style->setOverflow(o);
         return;
     }
-
-    case CSS_PROP_PAGE_BREAK_BEFORE:
-    {
-        if(value->cssValueType() == CSSValue::CSS_INHERIT)
-        {
-            if(!parentNode) return;
-            style->setPageBreakBefore(parentStyle->pageBreakBefore());
-            return;
-        }
-        if(!primitiveValue) return;
-        switch (primitiveValue->getIdent()) {
-            case CSS_VAL_AUTO:
-                style->setPageBreakBefore(PBAUTO);
-                break;
-            case CSS_VAL_LEFT:
-            case CSS_VAL_RIGHT:
-            case CSS_VAL_ALWAYS:
-                style->setPageBreakBefore(PBALWAYS); // CSS2.1: "Conforming user agents may map left/right to always."
-                break;
-            case CSS_VAL_AVOID:
-                style->setPageBreakInside(PBAVOID);
-                break;
-        }
-        break;
-    }
-
-    case CSS_PROP_PAGE_BREAK_AFTER:
-    {
-        if(value->cssValueType() == CSSValue::CSS_INHERIT)
-        {
-            if(!parentNode) return;
-            style->setPageBreakAfter(parentStyle->pageBreakAfter());
-            return;
-        }
-        if(!primitiveValue) return;
-        switch (primitiveValue->getIdent()) {
-            case CSS_VAL_AUTO:
-                style->setPageBreakAfter(PBAUTO);
-                break;
-            case CSS_VAL_LEFT:
-            case CSS_VAL_RIGHT:
-            case CSS_VAL_ALWAYS:
-                style->setPageBreakAfter(PBALWAYS); // CSS2.1: "Conforming user agents may map left/right to always."
-                break;
-            case CSS_VAL_AVOID:
-                style->setPageBreakAfter(PBAVOID);
-                break;
-        }
-        break;
-    }
-
-    case CSS_PROP_PAGE_BREAK_INSIDE: {
-        if(value->cssValueType() == CSSValue::CSS_INHERIT)
-        {
-            if(!parentNode) return;
-            style->setPageBreakInside(parentStyle->pageBreakInside());
-            return;
-        }
-        if(!primitiveValue) return;
-        if (primitiveValue->getIdent() == CSS_VAL_AUTO)
-            style->setPageBreakInside(PBAUTO);
-        else if (primitiveValue->getIdent() == CSS_VAL_AVOID)
-            style->setPageBreakInside(PBAVOID);
-        return;
-    }
-        
+    break;
     case CSS_PROP_PAGE:
-
+    case CSS_PROP_PAGE_BREAK_AFTER:
+    case CSS_PROP_PAGE_BREAK_BEFORE:
+    case CSS_PROP_PAGE_BREAK_INSIDE:
 //    case CSS_PROP_PAUSE_AFTER:
 //    case CSS_PROP_PAUSE_BEFORE:
         break;
@@ -2908,32 +2845,6 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
         style->setZIndex(z_index);
         return;
     }
-        
-    case CSS_PROP_WIDOWS:
-    {
-        if (value->cssValueType() == CSSValue::CSS_INHERIT) {
-            if(!parentNode) return;
-            style->setWidows(parentStyle->widows());
-        } else {
-            if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
-                return;
-            style->setWidows((int)primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER));
-        }
-        break;
-    }
-        
-    case CSS_PROP_ORPHANS:
-    {
-        if (value->cssValueType() == CSSValue::CSS_INHERIT) {
-            if(!parentNode) return;
-            style->setOrphans(parentStyle->orphans());
-        } else {
-            if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
-                return;
-            style->setOrphans((int)primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER));
-        }
-        break;
-    }        
 
 // length, percent, number
     case CSS_PROP_LINE_HEIGHT:
diff --git a/WebCore/khtml/rendering/render_style.cpp b/WebCore/khtml/rendering/render_style.cpp
index 33449e6..539e304 100644
--- a/WebCore/khtml/rendering/render_style.cpp
+++ b/WebCore/khtml/rendering/render_style.cpp
@@ -38,6 +38,13 @@ StyleSurroundData::StyleSurroundData()
 {
 }
 
+StyleSurroundData::StyleSurroundData(const StyleSurroundData& o )
+    : Shared<StyleSurroundData>(),
+      offset( o.offset ), margin( o.margin ), padding( o.padding ),
+      border( o.border )
+{
+}
+
 bool StyleSurroundData::operator==(const StyleSurroundData& o) const
 {
     return offset==o.offset && margin==o.margin &&
@@ -58,6 +65,15 @@ StyleBoxData::StyleBoxData()
     max_height.value = UNDEFINED;
 }
 
+StyleBoxData::StyleBoxData(const StyleBoxData& o )
+    : Shared<StyleBoxData>(),
+      width( o.width ), height( o.height ),
+      min_width( o.min_width ), max_width( o.max_width ),
+      min_height ( o.min_height ), max_height( o.max_height ),
+      z_index( o.z_index ), z_auto( o.z_auto )
+{
+}
+
 bool StyleBoxData::operator==(const StyleBoxData& o) const
 {
     return
@@ -68,7 +84,7 @@ bool StyleBoxData::operator==(const StyleBoxData& o) const
 	    min_height == o.min_height &&
 	    max_height == o.max_height &&
 	    z_index == o.z_index &&
-            z_auto == o.z_auto;
+        z_auto == o.z_auto;
 }
 
 StyleVisualData::StyleVisualData()
@@ -77,11 +93,32 @@ StyleVisualData::StyleVisualData()
 {
 }
 
+StyleVisualData::~StyleVisualData() {
+}
+
+StyleVisualData::StyleVisualData(const StyleVisualData& o )
+    : Shared<StyleVisualData>(),
+      clip( o.clip ), hasClip( o.hasClip ), textDecoration(o.textDecoration), colspan( o.colspan ),
+      counter_increment( o.counter_increment ), counter_reset( o.counter_reset ),
+      palette( o.palette )
+{
+}
+
+
+
 StyleBackgroundData::StyleBackgroundData()
     : image( 0 )
 {
 }
 
+StyleBackgroundData::StyleBackgroundData(const StyleBackgroundData& o )
+    : Shared<StyleBackgroundData>(),
+      color( o.color ), image( o.image ),
+      x_position( o.x_position ), y_position( o.y_position ),
+      outline( o.outline )
+{
+}
+
 bool StyleBackgroundData::operator==(const StyleBackgroundData& o) const
 {
     return
@@ -109,6 +146,7 @@ bool StyleMarqueeData::operator==(const StyleMarqueeData& o) const
 }
 
 StyleFlexibleBoxData::StyleFlexibleBoxData()
+: Shared<StyleFlexibleBoxData>()
 {
     flex = 0.0f;
     flex_group = 1;
@@ -120,6 +158,19 @@ StyleFlexibleBoxData::StyleFlexibleBoxData()
     flexed_height = -1;
 }
 
+StyleFlexibleBoxData::StyleFlexibleBoxData(const StyleFlexibleBoxData& o)
+: Shared<StyleFlexibleBoxData>()
+{
+    flex = o.flex;
+    flex_group = o.flex_group;
+    ordinal_group = o.ordinal_group;
+    align = o.align;
+    pack = o.pack;
+    orient = o.orient;
+    lines = o.lines;
+    flexed_height = o.flexed_height;
+}
+
 bool StyleFlexibleBoxData::operator==(const StyleFlexibleBoxData& o) const
 {
     return flex == o.flex && flex_group == o.flex_group &&
@@ -129,7 +180,7 @@ bool StyleFlexibleBoxData::operator==(const StyleFlexibleBoxData& o) const
 }
 
 StyleCSS3NonInheritedData::StyleCSS3NonInheritedData()
-:opacity(1.0f)
+:Shared<StyleCSS3NonInheritedData>(), opacity(1.0f)
 {
 }
 
@@ -144,8 +195,10 @@ bool StyleCSS3NonInheritedData::operator==(const StyleCSS3NonInheritedData& o) c
 }
 
 StyleCSS3InheritedData::StyleCSS3InheritedData()
-:textShadow(0)
-{}
+:Shared<StyleCSS3InheritedData>(), textShadow(0)
+{
+
+}
 
 StyleCSS3InheritedData::StyleCSS3InheritedData(const StyleCSS3InheritedData& o)
 :Shared<StyleCSS3InheritedData>()
@@ -170,8 +223,21 @@ bool StyleCSS3InheritedData::shadowDataEquivalent(const StyleCSS3InheritedData&
 StyleInheritedData::StyleInheritedData()
     : indent( Fixed ), line_height( -100, Percent ), style_image( 0 ),
       cursor_image( 0 ), font(), color( Qt::black ), 
-      horizontal_border_spacing( 0 ), vertical_border_spacing( 0 ), widows( 2 ), orphans( 2 ),
-      pageBreakInside( PBAUTO )
+      horizontal_border_spacing( 0 ), vertical_border_spacing( 0 )
+{
+}
+
+StyleInheritedData::~StyleInheritedData()
+{
+}
+
+StyleInheritedData::StyleInheritedData(const StyleInheritedData& o )
+    : Shared<StyleInheritedData>(),
+      indent( o.indent ), line_height( o.line_height ), style_image( o.style_image ),
+      cursor_image( o.cursor_image ), font( o.font ),
+      color( o.color ),
+      horizontal_border_spacing( o.horizontal_border_spacing ),
+      vertical_border_spacing( o.vertical_border_spacing )
 {
 }
 
@@ -185,10 +251,10 @@ bool StyleInheritedData::operator==(const StyleInheritedData& o) const
 	font == o.font &&
 	color == o.color &&
         horizontal_border_spacing == o.horizontal_border_spacing &&
-        vertical_border_spacing == o.vertical_border_spacing && 
-        widows == o.widows &&
-        orphans == o.orphans &&
-        pageBreakInside == o.pageBreakInside;
+        vertical_border_spacing == o.vertical_border_spacing;
+
+    // doesn't work because structs are not packed
+    //return memcmp(this, &o, sizeof(*this))==0;
 }
 
 RenderStyle::RenderStyle()
diff --git a/WebCore/khtml/rendering/render_style.h b/WebCore/khtml/rendering/render_style.h
index fe1595a..6e7969e 100644
--- a/WebCore/khtml/rendering/render_style.h
+++ b/WebCore/khtml/rendering/render_style.h
@@ -271,6 +271,7 @@ class StyleSurroundData : public Shared<StyleSurroundData>
 public:
     StyleSurroundData();
 
+    StyleSurroundData(const StyleSurroundData& o );
     bool operator==(const StyleSurroundData& o) const;
     bool operator!=(const StyleSurroundData& o) const {
         return !(*this == o);
@@ -291,6 +292,13 @@ class StyleBoxData : public Shared<StyleBoxData>
 public:
     StyleBoxData();
 
+    StyleBoxData(const StyleBoxData& o );
+
+
+    // copy and assignment
+//    StyleBoxData(const StyleBoxData &other);
+//    const StyleBoxData &operator = (const StyleBoxData &other);
+
     bool operator==(const StyleBoxData& o) const;
     bool operator!=(const StyleBoxData& o) const {
         return !(*this == o);
@@ -340,6 +348,10 @@ class StyleVisualData : public Shared<StyleVisualData>
 public:
     StyleVisualData();
 
+    ~StyleVisualData();
+
+    StyleVisualData(const StyleVisualData& o );
+
     bool operator==( const StyleVisualData &o ) const {
 	return ( clip == o.clip &&
                  hasClip == o.hasClip &&
@@ -375,6 +387,8 @@ class StyleBackgroundData : public Shared<StyleBackgroundData>
 {
 public:
     StyleBackgroundData();
+    ~StyleBackgroundData() {}
+    StyleBackgroundData(const StyleBackgroundData& o );
 
     bool operator==(const StyleBackgroundData& o) const;
     bool operator!=(const StyleBackgroundData &o) const {
@@ -426,6 +440,8 @@ class StyleFlexibleBoxData : public Shared<StyleFlexibleBoxData>
 {
 public:
     StyleFlexibleBoxData();
+    ~StyleFlexibleBoxData() {}
+    StyleFlexibleBoxData(const StyleFlexibleBoxData& o);
 
     bool operator==(const StyleFlexibleBoxData& o) const;
     bool operator!=(const StyleFlexibleBoxData &o) const {
@@ -526,14 +542,12 @@ enum ETextDecoration {
     TDNONE = 0x0 , UNDERLINE = 0x1, OVERLINE = 0x2, LINE_THROUGH= 0x4, BLINK = 0x8
 };
 
-enum EPageBreak {
-    PBAUTO, PBALWAYS, PBAVOID
-};
-
 class StyleInheritedData : public Shared<StyleInheritedData>
 {
 public:
     StyleInheritedData();
+    ~StyleInheritedData();
+    StyleInheritedData(const StyleInheritedData& o );
 
     bool operator==(const StyleInheritedData& o) const;
     bool operator != ( const StyleInheritedData &o ) const {
@@ -553,11 +567,6 @@ public:
     
     short horizontal_border_spacing;
     short vertical_border_spacing;
-    
-    // Paged media properties.
-    short widows;
-    short orphans;
-    EPageBreak pageBreakInside : 2;
 };
 
 
@@ -697,9 +706,7 @@ protected:
             (_clear == other._clear) &&
             (_position == other._position) &&
             (_floating == other._floating) &&
-            (_table_layout == other._table_layout) && 
-            (_page_break_before == other._page_break_before) &&
-            (_page_break_after == other._page_break_after) &&
+            (_table_layout == other._table_layout) &&
             (_flowAroundFloats == other._flowAroundFloats) &&
             (_styleType == other._styleType) &&
             (_affectedByHover == other._affectedByHover) &&
@@ -722,10 +729,6 @@ protected:
         EPosition _position : 2;
         EFloat _floating : 2;
         ETableLayout _table_layout : 1;
-        
-        EPageBreak _page_break_before : 2;
-        EPageBreak _page_break_after : 2;
-        
         bool _flowAroundFloats :1;
 
         PseudoId _styleType : 3;
@@ -787,8 +790,6 @@ protected:
 	noninherited_flags._position = STATIC;
 	noninherited_flags._floating = FNONE;
 	noninherited_flags._table_layout = TAUTO;
-        noninherited_flags._page_break_before = PBAUTO;
-        noninherited_flags._page_break_after = PBAUTO;
 	noninherited_flags._flowAroundFloats=false;
 	noninherited_flags._styleType = NOPSEUDO;
         noninherited_flags._affectedByHover = false;
@@ -962,12 +963,6 @@ public:
 
     CachedImage *cursorImage() const { return inherited->cursor_image; }
 
-    short widows() const { return inherited->widows; }
-    short orphans() const { return inherited->orphans; }
-    EPageBreak pageBreakInside() const { return inherited->pageBreakInside; }
-    EPageBreak pageBreakBefore() const { return noninherited_flags._page_break_before; }
-    EPageBreak pageBreakAfter() const { return noninherited_flags._page_break_after; }
-    
     // CSS3 Getter Methods
     ShadowData* textShadow() const { return css3InheritedData->textShadow; }
     float opacity() { return css3NonInheritedData->opacity; }
@@ -1130,12 +1125,6 @@ public:
     int zIndex() const { return box->z_index; }
     void setZIndex(int v) { SET_VAR(box, z_auto, false); SET_VAR(box,z_index,v) }
 
-    void setWidows(short w) { SET_VAR(inherited, widows, w); }
-    void setOrphans(short o) { SET_VAR(inherited, orphans, o); }
-    void setPageBreakInside(EPageBreak b) { SET_VAR(inherited, pageBreakInside, b); }
-    void setPageBreakBefore(EPageBreak b) { noninherited_flags._page_break_before = b; }
-    void setPageBreakAfter(EPageBreak b) { noninherited_flags._page_break_after = b; }
-    
     // CSS3 Setters
     void setTextShadow(ShadowData* val, bool add=false);
     void setOpacity(float f) { SET_VAR(css3NonInheritedData, opacity, f); }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list