Changeset 77242 in webkit
- Timestamp:
- Feb 1, 2011 4:42:16 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r77165 r77242 1 2011-02-01 Darin Fisher <darin@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Fix some Visual Studio compiler warnings. 6 https://bugs.webkit.org/show_bug.cgi?id=53476 7 8 * wtf/MathExtras.h: 9 (clampToInteger): 10 (clampToPositiveInteger): 11 * wtf/ThreadingWin.cpp: 12 (WTF::absoluteTimeToWaitTimeoutInterval): 13 1 14 2011-01-31 Oliver Hunt <oliver@apple.com> 2 15 -
trunk/Source/JavaScriptCore/wtf/MathExtras.h
r77045 r77242 223 223 inline int clampToInteger(float d) 224 224 { 225 const float minIntAsFloat = st d::numeric_limits<int>::min();226 const float maxIntAsFloat = st d::numeric_limits<int>::max();225 const float minIntAsFloat = static_cast<float>(std::numeric_limits<int>::min()); 226 const float maxIntAsFloat = static_cast<float>(std::numeric_limits<int>::max()); 227 227 return static_cast<int>(std::max(std::min(d, maxIntAsFloat), minIntAsFloat)); 228 228 } … … 230 230 inline int clampToPositiveInteger(float d) 231 231 { 232 const float maxIntAsFloat = st d::numeric_limits<int>::max();232 const float maxIntAsFloat = static_cast<float>(std::numeric_limits<int>::max()); 233 233 return static_cast<int>(std::max<float>(std::min(d, maxIntAsFloat), 0)); 234 234 } -
trunk/Source/JavaScriptCore/wtf/ThreadingWin.cpp
r76967 r77242 492 492 return INFINITE; 493 493 494 return (absoluteTime - currentTime) * 1000;494 return static_cast<DWORD>((absoluteTime - currentTime) * 1000.0); 495 495 } 496 496 -
trunk/Source/WebKit/chromium/ChangeLog
r77236 r77242 1 2011-02-01 Darin Fisher <darin@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Fix some Visual Studio compiler warnings. 6 https://bugs.webkit.org/show_bug.cgi?id=53476 7 8 * src/GraphicsContext3DChromium.cpp: 9 (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): 10 * src/WebFrameImpl.cpp: 11 (WebKit::WebFrameImpl::forms): 12 * src/WebMediaPlayerClientImpl.cpp: 13 (WebKit::WebMediaPlayerClientImpl::repaint): 14 * src/WebScrollbarImpl.cpp: 15 (WebKit::WebScrollbarImpl::setValue): 16 * src/WebViewImpl.cpp: 17 (WebKit::WebViewImpl::doPixelReadbackToCanvas): 18 (WebKit::WebViewImpl::setZoomLevel): 19 (WebKit::WebViewImplScrollbarPaintInterface::paint): 20 1 21 2011-02-01 Hans Wennborg <hans@chromium.org> 2 22 -
trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
r76717 r77242 206 206 SkCanvas canvas(*canvasBitmap); 207 207 SkRect dst; 208 dst.set(SkIntToScalar(0), SkIntToScalar(0), canvasBitmap->width(), canvasBitmap->height());208 dst.set(SkIntToScalar(0), SkIntToScalar(0), SkIntToScalar(canvasBitmap->width()), SkIntToScalar(canvasBitmap->height())); 209 209 canvas.drawBitmapRect(m_resizingBitmap, 0, dst); 210 210 } -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r76889 r77242 686 686 687 687 WebVector<WebFormElement> temp(formCount); 688 unsigned i= 0;689 for (size_t sourceIndex = 0; i< forms->length(); ++sourceIndex) {688 size_t j = 0; 689 for (size_t sourceIndex = 0; j < forms->length(); ++sourceIndex) { 690 690 Node* node = forms->item(sourceIndex); 691 691 // Strange but true, sometimes item can be 0. 692 692 if (node && node->isHTMLElement()) 693 temp[ i++] = static_cast<HTMLFormElement*>(node);694 } 695 ASSERT( i== formCount);693 temp[j++] = static_cast<HTMLFormElement*>(node); 694 } 695 ASSERT(j == formCount); 696 696 results.swap(temp); 697 697 } -
trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
r70919 r77242 145 145 #if USE(ACCELERATED_COMPOSITING) 146 146 if (m_videoLayer.get() && supportsAcceleratedRendering()) 147 m_videoLayer->setNeedsDisplay( FloatRect(0, 0, m_videoLayer->bounds().width(), m_videoLayer->bounds().height()));147 m_videoLayer->setNeedsDisplay(IntRect(0, 0, m_videoLayer->bounds().width(), m_videoLayer->bounds().height())); 148 148 #endif 149 149 m_mediaPlayer->repaint(); -
trunk/Source/WebKit/chromium/src/WebScrollbarImpl.cpp
r76455 r77242 96 96 void WebScrollbarImpl::setValue(int position) 97 97 { 98 WebCore::ScrollableArea::scrollToOffsetWithoutAnimation(m_scrollbar->orientation(), position);98 WebCore::ScrollableArea::scrollToOffsetWithoutAnimation(m_scrollbar->orientation(), static_cast<float>(position)); 99 99 } 100 100 -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r76677 r77242 1034 1034 imageBuffer->putPremultipliedImageData(pixelArray.get(), rect.size(), IntRect(IntPoint(), rect.size()), IntPoint()); 1035 1035 gc.save(); 1036 gc.translate( FloatSize(0.0f, bitmapHeight));1036 gc.translate(IntSize(0, bitmapHeight)); 1037 1037 gc.scale(FloatSize(1.0f, -1.0f)); 1038 1038 // Use invertRect in next line, so that transform above inverts it back to … … 1617 1617 pluginContainer->plugin()->setZoomLevel(m_zoomLevel, textOnly); 1618 1618 else { 1619 double zoomFactor = zoomLevelToZoomFactor(m_zoomLevel);1619 float zoomFactor = static_cast<float>(zoomLevelToZoomFactor(m_zoomLevel)); 1620 1620 if (textOnly) 1621 1621 frame->setPageAndTextZoomFactors(1, zoomFactor); … … 2374 2374 FrameView* view = page->mainFrame()->view(); 2375 2375 2376 context.translate( view->scrollX(), view->scrollY());2376 context.translate(static_cast<float>(view->scrollX()), static_cast<float>(view->scrollY())); 2377 2377 IntRect windowRect = view->contentsToWindow(contentRect); 2378 2378 view->paintScrollbars(&context, windowRect);
Note: See TracChangeset
for help on using the changeset viewer.