Reviewed by Oliver.
No regression test possible.
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createPattern):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isLiveLink):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::contentEditable):
* platform/DeprecatedString.cpp:
(WebCore::allocateHandle):
(WebCore::freeHandle):
* plugins/win/npapi.cpp:
(pluginViewForInstance):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::isWidthSpecified):
(WebCore::RenderImage::isHeightSpecified):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isControlStyled):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@23899
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-06-30 Adam Roben <aroben@apple.com>
+
+ Remove unreachable code uncovered by MSVC /W4
+
+ Reviewed by Oliver.
+
+ No regression test possible.
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::createPattern):
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::isLiveLink):
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::contentEditable):
+ * platform/DeprecatedString.cpp:
+ (WebCore::allocateHandle):
+ (WebCore::freeHandle):
+ * plugins/win/npapi.cpp:
+ (pluginViewForInstance):
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::isWidthSpecified):
+ (WebCore::RenderImage::isHeightSpecified):
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::isControlStyled):
+
2007-06-29 John Sullivan <sullivan@apple.com>
Reviewed by Oliver Hunt.
#include "HTMLCanvasElement.h"
#include "HTMLImageElement.h"
#include "HTMLNames.h"
+#include "NotImplemented.h"
#include "RenderHTMLCanvas.h"
#include "Settings.h"
#include "cssparser.h"
PassRefPtr<CanvasPattern> pattern = new CanvasPattern(image, repeatX, repeatY);
CGImageRelease(image);
return pattern;
-#elif PLATFORM(QT)
- fprintf(stderr, "FIXME: CanvasRenderingContext2D::createPattern patterns not implemented\n");
-#endif
+#else
+ notImplemented();
return 0;
+#endif
}
void CanvasRenderingContext2D::willDraw(const FloatRect& r)
case EditableLinkOnlyLiveWithShiftKey:
return m_wasShiftKeyDownOnMouseDown;
}
- // not reached
- ASSERT(0);
- return false;
}
}
default:
return "inherit";
}
- return "inherit";
}
void HTMLElement::setContentEditable(MappedAttribute* attr)
#define WEBCORE_REALLOCATE_CHARACTERS(P, N) (DeprecatedChar *)fastRealloc(P, sizeof(DeprecatedChar)*(N))
#define DELETE_QCHAR(P) fastFree(P)
+#ifndef CHECK_FOR_HANDLE_LEAKS
struct HandleNode;
struct HandlePageNode;
if (freeNodeAllocationPages == 0)
freeNodeAllocationPages = allocatePageNode();
}
+#endif
static inline DeprecatedStringData **allocateHandle()
{
#ifdef CHECK_FOR_HANDLE_LEAKS
return static_cast<DeprecatedStringData **>(fastMalloc(sizeof(DeprecatedStringData *)));
-#endif
+#else
initializeHandleNodes();
return reinterpret_cast<DeprecatedStringData **>(allocateNode(freeNodeAllocationPages));
+#endif
}
static void freeHandle(DeprecatedStringData **);
} type;
};
+#ifndef CHECK_FOR_HANDLE_LEAKS
+
static const size_t pageSize = 4096;
static const uintptr_t pageMask = ~(pageSize - 1);
static const size_t nodeBlockSize = pageSize / sizeof(HandleNode);
return allocated;
}
+#endif
+
void freeHandle(DeprecatedStringData **_free)
{
#ifdef CHECK_FOR_HANDLE_LEAKS
fastFree(_free);
return;
-#endif
+#else
HandleNode *free = (HandleNode *)_free;
HandleNode *base = (HandleNode *)((uintptr_t)free & pageMask);
freeNodeAllocationPages->next = pageNode;
freeNodeAllocationPages = pageNode;
}
+#endif
}
DeprecatedString DeprecatedString::fromUtf8(const char *chs)
{
if (instance && instance->ndata)
return static_cast<PluginViewWin*>(instance->ndata);
- else
- return PluginViewWin::currentPluginView();
- return 0;
+ return PluginViewWin::currentPluginView();
}
void* NPN_MemAlloc(uint32 size)
default:
return false;
}
- ASSERT(false);
- return false;
}
bool RenderImage::isHeightSpecified() const
default:
return false;
}
- ASSERT(false);
- return false;
}
int RenderImage::calcReplacedWidth() const
default:
return false;
}
-
- return false;
}
bool RenderTheme::supportsFocusRing(const RenderStyle* style) const