Title: [102026] branches/safari-534.53-branch/Source/WebCore
Revision
102026
Author
[email protected]
Date
2011-12-05 12:07:10 -0800 (Mon, 05 Dec 2011)

Log Message

Fixes to the branch made by Simon to get us building again.
        
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::mapNinePieceImageWidth):
(WebCore::CSSStyleSelector::loadPendingImages):
* rendering/RenderBoxModelObject.cpp:
(WebCore::computeBorderImageSide):
(WebCore::RenderBoxModelObject::paintNinePieceImage):

Modified Paths

Diff

Modified: branches/safari-534.53-branch/Source/WebCore/ChangeLog (102025 => 102026)


--- branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-05 20:03:59 UTC (rev 102025)
+++ branches/safari-534.53-branch/Source/WebCore/ChangeLog	2011-12-05 20:07:10 UTC (rev 102026)
@@ -1,3 +1,14 @@
+2011-12-05  Lucas Forschler  <[email protected]>
+
+        Fixes to the branch made by Simon to get us building again.
+        
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::mapNinePieceImageWidth):
+        (WebCore::CSSStyleSelector::loadPendingImages):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::computeBorderImageSide):
+        (WebCore::RenderBoxModelObject::paintNinePieceImage):
+
 2011-12-02  Lucas Forschler  <[email protected]>
 
     Merge 90959

Modified: branches/safari-534.53-branch/Source/WebCore/css/CSSStyleSelector.cpp (102025 => 102026)


--- branches/safari-534.53-branch/Source/WebCore/css/CSSStyleSelector.cpp	2011-12-05 20:03:59 UTC (rev 102025)
+++ branches/safari-534.53-branch/Source/WebCore/css/CSSStyleSelector.cpp	2011-12-05 20:07:10 UTC (rev 102026)
@@ -6269,7 +6269,7 @@
         return;
 
     // Get our zoom value.
-    float zoom = useSVGZoomRules() ? 1.0f : style()->effectiveZoom();
+    float zoom = useSVGZoomRules(m_element) ? 1.0f : style()->effectiveZoom();
 
     // Retrieve the primitive value.
     CSSPrimitiveValue* borderWidths = static_cast<CSSPrimitiveValue*>(value);
@@ -6282,28 +6282,28 @@
     else if (slices->top()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE)
         box.m_top = Length(slices->top()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
     else
-        box.m_top = slices->top()->computeLength<Length>(style(), rootElementStyle(), zoom);
+        box.m_top = Length(slices->top()->computeLengthIntForLength(style(), m_rootElementStyle, zoom), Fixed);
 
     if (slices->right()->primitiveType() == CSSPrimitiveValue::CSS_NUMBER)
         box.m_right = Length(slices->right()->getIntValue(), Relative);
     else if (slices->right()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE)
         box.m_right = Length(slices->right()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
     else
-        box.m_right = slices->right()->computeLength<Length>(style(), rootElementStyle(), zoom);
+        box.m_right = Length(slices->right()->computeLengthIntForLength(style(), m_rootElementStyle, zoom), Fixed);
 
     if (slices->bottom()->primitiveType() == CSSPrimitiveValue::CSS_NUMBER)
         box.m_bottom = Length(slices->bottom()->getIntValue(), Relative);
     else if (slices->bottom()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE)
         box.m_bottom = Length(slices->bottom()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
     else
-        box.m_bottom = slices->bottom()->computeLength<Length>(style(), rootElementStyle(), zoom);
+        box.m_bottom = Length(slices->bottom()->computeLengthIntForLength(style(), m_rootElementStyle, zoom), Fixed);
 
     if (slices->left()->primitiveType() == CSSPrimitiveValue::CSS_NUMBER)
         box.m_left = Length(slices->left()->getIntValue(), Relative);
     else if (slices->left()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE)
         box.m_left = Length(slices->left()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
     else
-        box.m_left = slices->left()->computeLength<Length>(style(), rootElementStyle(), zoom);
+        box.m_left = Length(slices->left()->computeLengthIntForLength(style(), m_rootElementStyle, zoom), Fixed);
 
     image.setBorderSlices(box);
 }
@@ -7058,6 +7058,7 @@
                     if (maskImage.image() && maskImage.image()->isPendingImage()) {
                         CSSImageValue* imageValue = static_cast<StylePendingImage*>(maskImage.image())->cssImageValue();
                         reflection->setMask(NinePieceImage(imageValue->cachedImage(cachedResourceLoader), maskImage.imageSlices(), maskImage.fill(), maskImage.borderSlices(), maskImage.horizontalRule(), maskImage.verticalRule()));
+                    }
                 }
                 break;
             }

Modified: branches/safari-534.53-branch/Source/WebCore/rendering/RenderBoxModelObject.cpp (102025 => 102026)


--- branches/safari-534.53-branch/Source/WebCore/rendering/RenderBoxModelObject.cpp	2011-12-05 20:03:59 UTC (rev 102025)
+++ branches/safari-534.53-branch/Source/WebCore/rendering/RenderBoxModelObject.cpp	2011-12-05 20:07:10 UTC (rev 102026)
@@ -918,7 +918,7 @@
     destRect.intersect(paintRect);
 }
 
-static LayoutUnit computeBorderImageSide(Length borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent)
+static int computeBorderImageSide(Length borderSlice, int borderSide, int imageSide, int boxExtent)
 {
     if (borderSlice.isRelative())
         return borderSlice.value() * borderSide;
@@ -947,10 +947,10 @@
     int imageWidth = imageSize.width();
     int imageHeight = imageSize.height();
 
-    int topSlice = min<LayoutUnit>(imageHeight, ninePieceImage.imageSlices().top().calcValue(imageHeight));
-    int rightSlice = min<LayoutUnit>(imageWidth, ninePieceImage.imageSlices().right().calcValue(imageWidth));
-    int bottomSlice = min<LayoutUnit>(imageHeight, ninePieceImage.imageSlices().bottom().calcValue(imageHeight));
-    int leftSlice = min<LayoutUnit>(imageWidth, ninePieceImage.imageSlices().left().calcValue(imageWidth));
+    int topSlice = min<int>(imageHeight, ninePieceImage.imageSlices().top().calcValue(imageHeight));
+    int rightSlice = min<int>(imageWidth, ninePieceImage.imageSlices().right().calcValue(imageWidth));
+    int bottomSlice = min<int>(imageHeight, ninePieceImage.imageSlices().bottom().calcValue(imageHeight));
+    int leftSlice = min<int>(imageWidth, ninePieceImage.imageSlices().left().calcValue(imageWidth));
     
     ENinePieceImageRule hRule = ninePieceImage.horizontalRule();
     ENinePieceImageRule vRule = ninePieceImage.verticalRule();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to