Rollout accidentally committed r25819
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2007 23:15:54 +0000 (23:15 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2007 23:15:54 +0000 (23:15 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25823 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.checksum [deleted file]
LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.png [deleted file]
LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.txt [deleted file]
LayoutTests/svg/custom/hit-test-unclosed-subpaths.svg [deleted file]
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/platform/graphics/cg/PathCG.cpp

index c8aac99b36ed209f0f43b847350932244d2b05e4..3ac39a8a87ca2797ef59b399eb05b67ddba2fc22 100644 (file)
@@ -1,16 +1,3 @@
-2007-05-10  Eric Seidel  <eric@webkit.org>
-
-        Reviewed by olliej.
-        
-        Test for http://bugs.webkit.org/show_bug.cgi?id=11931
-
-        * svg/custom/hit-test-unclosed-subpaths-expected.checksum: Added.
-        * svg/custom/hit-test-unclosed-subpaths-expected.png: Added.
-        * svg/custom/hit-test-unclosed-subpaths-expected.txt: Added.
-        * svg/custom/hit-test-unclosed-subpaths.svg: Added.
-
-=== Merged the following changes from branches/feature-branch ===
-
 2007-10-01  Lars Knoll  <lars@trolltech.com>
 
         Remove the separate ChangeLog in Layouttests/platform/qt.
diff --git a/LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.checksum b/LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.checksum
deleted file mode 100644 (file)
index 966a0f7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-00c54be0d5d68345dcf67de2b75d4af4
\ No newline at end of file
diff --git a/LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.png b/LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.png
deleted file mode 100644 (file)
index 7a784c4..0000000
Binary files a/LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.png and /dev/null differ
diff --git a/LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.txt b/LayoutTests/svg/custom/hit-test-unclosed-subpaths-expected.txt
deleted file mode 100644 (file)
index 85226bd..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-    RenderSVGContainer {svg} at (8.50,10) size 506.50x144
-      RenderPath {path} at (8.50,10) size 213x101.50 [stroke={[type=SOLID] [color=#000000] [stroke width=3.00]}] [fill={[type=SOLID] [color=#008000]}] [data="M10.00,10.00L10.00,110.00L110.00,110.00L110.00,10.00M120.00,10.00L120.00,110.00L220.00,110.00L220.00,10.00"]
-      RenderSVGText {text} at (10,150) size 800x18
-        RenderSVGInlineText {#text} at (0,-14) size 505x18
-          text run at (0,-14) width 505: "There should be 2 green squares above this (when run under DumpRenderTree)"
-caret: position 0 of child 0 {#text} of child 5 {text} of child 0 {svg} of document
diff --git a/LayoutTests/svg/custom/hit-test-unclosed-subpaths.svg b/LayoutTests/svg/custom/hit-test-unclosed-subpaths.svg
deleted file mode 100644 (file)
index dcbdbe3..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg">
-<script>
-function clickHandler(evt)
-{
-    evt.target.style.fill = "green";
-}
-
-if (window.layoutTestController)
-  layoutTestController.waitUntilDone();
-
-function doClick() {
-  if (window.eventSender) {
-      eventSender.mouseMoveTo(50, 50);
-      eventSender.mouseDown();
-      eventSender.mouseUp();
-      layoutTestController.notifyDone();
-  }
-}
-
-setTimeout("doClick()", 0);
-</script>
-<path onclick="clickHandler(evt)" fill="red" stroke="black" stroke-width="3" d="M 10 10 l 0 100 l 100 0 l 0 -100 M 120 10 l 0 100 l 100 0 l 0 -100"/>
-
-<text x="10" y="150">There should be 2 green squares above this (when run under DumpRenderTree)</text>
-
-</svg>
index f50866bb825eb16b98582d1aabb49df94ddf8414..f000e18c996cd0f5faf6626ab2c06b6fef28e852 100644 (file)
         * page/FrameView.cpp:
         (WebCore::FrameView::layout):
 
-2007-05-10  Eric Seidel  <eric@webkit.org>
-
-        Reviewed by olliej.
-
-        http://bugs.webkit.org/show_bug.cgi?id=11931
-        PathCG fails to hit on unclosed sub-paths
-
-        Test: svg/custom/hit-test-unclosed-subpaths.svg
-
-        * platform/graphics/cg/PathCG.cpp:
-        (WebCore::copyClosingSubpathsApplierFunction):
-        (WebCore::copyCGPathClosingSubpaths):
-        (WebCore::Path::contains): use new copy & close function
-
-=== Merged the following changes from branches/feature-branch ===
-
 2007-10-01  Eli Fidler  <eli@staikos.net>
 
         Reviewed by George Staikos.
index 71f9d809ebf99212351393704513601f5c565753..9842f25af7ce98599aa97a8ec00606d0fb47c17b 100644 (file)
                                DEAD_CODE_STRIPPING = NO;
                                GCC_OPTIMIZATION_LEVEL = 0;
                                STRIP_INSTALLED_PRODUCT = NO;
-                               WARNING_CFLAGS = (
-                                       "$(WARNING_CFLAGS_$(CURRENT_ARCH))",
-                                       "-Wno-shorten-64-to-32",
-                               );
                        };
                        name = Debug;
                };
                        baseConfigurationReference = 1CDD45E40BA9C84600F90147 /* DebugRelease.xcconfig */;
                        buildSettings = {
                                STRIP_INSTALLED_PRODUCT = NO;
-                               WARNING_CFLAGS = (
-                                       "$(WARNING_CFLAGS_$(CURRENT_ARCH))",
-                                       "-Wno-shorten-64-to-32",
-                               );
                        };
                        name = Release;
                };
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 1CDD45E60BA9C84600F90147 /* Base.xcconfig */;
                        buildSettings = {
-                               WARNING_CFLAGS = (
-                                       "$(WARNING_CFLAGS_$(CURRENT_ARCH))",
-                                       "-Wno-shorten-64-to-32",
-                               );
                        };
                        name = Production;
                };
index 41f6c22a1131fd718fbfebdeb8c10fcb88792727..e108dff1cedd398a7cd45289c71a443580629811 100644 (file)
@@ -62,48 +62,14 @@ Path& Path::operator=(const Path& other)
     return *this;
 }
 
-
-static void copyClosingSubpathsApplierFunction(void* info, const CGPathElement* element)
-{
-    CGMutablePathRef path = static_cast<CGMutablePathRef>(info);
-    CGPoint* points = element->points;
-    
-    switch (element->type) {
-    case kCGPathElementMoveToPoint:
-        if (!CGPathIsEmpty(path)) // to silence a warning when trying to close an empty path
-            CGPathCloseSubpath(path); // This is the only change from CGPathCreateMutableCopy
-        CGPathMoveToPoint(path, 0, points[0].x, points[0].y);
-        break;
-    case kCGPathElementAddLineToPoint:
-        CGPathAddLineToPoint(path, 0, points[0].x, points[0].y);
-        break;
-    case kCGPathElementAddQuadCurveToPoint:
-        CGPathAddQuadCurveToPoint(path, 0, points[0].x, points[0].y, points[1].x, points[1].y);
-        break;
-    case kCGPathElementAddCurveToPoint:
-        CGPathAddCurveToPoint(path, 0, points[0].x, points[0].y, points[1].x, points[1].y, points[2].x, points[2].y);
-        break;
-    case kCGPathElementCloseSubpath:
-        CGPathCloseSubpath(path);
-        break;
-    }
-}
-
-static CGMutablePathRef copyCGPathClosingSubpaths(CGPathRef originalPath)
-{
-    CGMutablePathRef path = CGPathCreateMutable();
-    CGPathApply(originalPath, path, copyClosingSubpathsApplierFunction);
-    CGPathCloseSubpath(path);
-    return path;
-}
-
 bool Path::contains(const FloatPoint &point, WindRule rule) const
 {
+    // CGPathContainsPoint returns false for non-closed paths, as a work-around, we copy and close the path first.  Radar 4758998 asks for a better CG API to use
     if (!boundingRect().contains(point))
         return false;
 
-    // CGPathContainsPoint returns false for non-closed paths, as a work-around, we copy and close the path first.  Radar 4758998 asks for a better CG API to use
-    CGMutablePathRef path = copyCGPathClosingSubpaths(m_path);
+    CGMutablePathRef path = CGPathCreateMutableCopy(m_path);
+    CGPathCloseSubpath(path);
     bool ret = CGPathContainsPoint(path, 0, point, rule == RULE_EVENODD ? true : false);
     CGPathRelease(path);
     return ret;