<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>65637</bug_id>
          
          <creation_ts>2011-08-03 13:04:28 -0700</creation_ts>
          <short_desc>Crash beneath PlatformCALayerWinInternal::updateTiles when zooming on Google Maps</short_desc>
          <delta_ts>2011-08-04 11:15:14 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://maps.google.com/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, PlatformOnly</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Roben (:aroben)">aroben</reporter>
          <assigned_to name="Adam Roben (:aroben)">aroben</assigned_to>
          <cc>cmarrin</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>446038</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-03 13:04:28 -0700</bug_when>
    <thetext>To reproduce:

1. Go to Google Maps
2. Select Satellite view
3. Zoom in and out using the scroll wheel

Eventually, you&apos;ll crash beneath PlatformCALayerWinInternal::updateTiles due to a null CFArrayRef being passed to CFArrayGetValueAtIndex. Here&apos;s the backtrace:


 	CoreFoundation.dll!CF_IS_OBJC()	C++
 	CoreFoundation.dll!CFArrayGetValueAtIndex() + 0xe bytes	C++
 	WebKit.dll!WebCore::PlatformCALayerWinInternal::updateTiles()  Line 444 + 0x17 bytes	C++
 	WebKit.dll!WebCore::PlatformCALayerWinInternal::setBounds(const WebCore::FloatRect &amp; rect={...})  Line 329	C++
 	WebKit.dll!WebCore::PlatformCALayer::setBounds(const WebCore::FloatRect &amp; value={...})  Line 364	C++
&gt;	WebKit.dll!WebCore::GraphicsLayerCA::updateGeometry(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...})  Line 1058	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer=true, float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...})  Line 2087	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::updateGeometry(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...})  Line 1018	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...})  Line 894	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=true)  Line 842	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=true)  Line 850	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=true)  Line 850	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=true)  Line 850	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=true)  Line 850	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=true)  Line 850	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=false)  Line 850	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=false)  Line 850	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=false)  Line 850	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::recursiveCommitChanges(float pageScaleFactor=1.0000000, const WebCore::FloatPoint &amp; positionRelativeToBase={...}, bool affectedByPageScale=false)  Line 850	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::syncCompositingState()  Line 816	C++
 	WebKit.dll!WebCore::RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot=true)  Line 207 + 0x12 bytes	C++
 	WebKit.dll!WebCore::FrameView::syncCompositingStateForThisFrame(WebCore::Frame * rootFrameForSync=0x03d7b580)  Line 700	C++
 	WebKit.dll!WebCore::FrameView::syncCompositingStateIncludingSubframes()  Line 787 + 0x17 bytes	C++
 	WebKit.dll!WebKit::LayerTreeHostCA::flushPendingLayerChanges()  Line 247	C++
 	WebKit.dll!WebKit::LayerTreeHostCA::performScheduledLayerFlush()  Line 224 + 0x8 bytes	C++
 	WebKit.dll!WebKit::LayerTreeHostCAWin::flushPendingLayerChangesNow()  Line 240	C++
 	WebKit.dll!WebCore::LayerChangesFlusher::hookFired(int code=0, unsigned int wParam=1, long lParam=1244088)  Line 89 + 0x20 bytes	C++
 	WebKit.dll!WebCore::LayerChangesFlusher::hookCallback(int code=0, unsigned int wParam=1, long lParam=1244088)  Line 75	C++
 	user32.dll!_DispatchHookW@16()  + 0x31 bytes	
 	user32.dll!_CallHookWithSEH@16()  + 0x21 bytes	
 	user32.dll!___fnHkINLPMSG@4()  + 0x25 bytes	
 	ntdll.dll!_KiUserCallbackDispatcher@12()  + 0x13 bytes	
 	user32.dll!_NtUserGetMessage@16()  + 0xc bytes	
 	WebKit.dll!RunLoop::run()  Line 74 + 0x12 bytes	C++
 	WebKit.dll!WebKit::WebProcessMain(const WebKit::CommandLine &amp; commandLine={...})  Line 82	C++
 	WebKit.dll!WebKitMain(const WebKit::CommandLine &amp; commandLine={...})  Line 50 + 0x9 bytes	C++
 	WebKit.dll!WebKitMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpstrCmdLine=0x00021118, int nCmdShow=10)  Line 187 + 0x9 bytes	C++
 	WebKit2WebProcess.exe!wWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpstrCmdLine=0x00021118, int nCmdShow=10)  Line 66 + 0x18 bytes	C++
 	WebKit2WebProcess.exe!__tmainCRTStartup()  Line 589 + 0x1c bytes	C
 	kernel32.dll!_BaseProcessStart@4()  + 0x23 bytes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446040</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-03 13:04:52 -0700</bug_when>
    <thetext>&lt;rdar://problem/9784849&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446042</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-03 13:07:29 -0700</bug_when>
    <thetext>PlatformCALayer::setBounds is being passed a rect with size 33554432x33554432. This comes from GraphicsLayerCA::m_size.

It looks like both updateTiles and constrainedSize have the same vulnerability to overflow. The overflow is breaking our calculations that try to limit the number of tiles a layer can have.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446043</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-03 13:08:40 -0700</bug_when>
    <thetext>Specifically, the overflow happens in a calculation like this:

int numTilesHorizontal = ceil(m_constrainedSize.width / m_tileSize.width);
int numTilesVertical = ceil(m_constrainedSize.height / m_tileSize.height);
int numTilesTotal = numTilesHorizontal * numTilesVertical;

numTilesHorizontal and numTilesVertical are both 65536. The calculation of numTilesTotal results in overflow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446051</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-03 13:21:02 -0700</bug_when>
    <thetext>I set a breakpoint on GraphicsLayer::setSize to try to figure out where the huge size is coming from. Here&apos;s where it got hit, when passed a rect of size 67108864x67108864:


&gt;	WebKit.dll!WebCore::GraphicsLayer::setSize(const WebCore::FloatSize &amp; size={...})  Line 246	C++
 	WebKit.dll!WebCore::GraphicsLayerCA::setSize(const WebCore::FloatSize &amp; size={...})  Line 402	C++
 	WebKit.dll!WebCore::RenderLayerBacking::updateGraphicsLayerGeometry()  Line 422 + 0x2d bytes	C++
 	WebKit.dll!WebCore::RenderLayerCompositor::rebuildCompositingLayerTree(WebCore::RenderLayer * layer=0x22bbc6bc, const WebCore::CompositingState &amp; compositingState={...}, WTF::Vector&lt;WebCore::GraphicsLayer *,0&gt; &amp; childLayersOfEnclosingLayer=[0]())  Line 850	C++
 	WebKit.dll!WebCore::RenderLayerCompositor::rebuildCompositingLayerTree(WebCore::RenderLayer * layer=0x0c8ac69c, const WebCore::CompositingState &amp; compositingState={...}, WTF::Vector&lt;WebCore::GraphicsLayer *,0&gt; &amp; childLayersOfEnclosingLayer=[0]())  Line 902	C++
 	WebKit.dll!WebCore::RenderLayerCompositor::rebuildCompositingLayerTree(WebCore::RenderLayer * layer=0x0aa51024, const WebCore::CompositingState &amp; compositingState={...}, WTF::Vector&lt;WebCore::GraphicsLayer *,0&gt; &amp; childLayersOfEnclosingLayer=[0]())  Line 902	C++
 	WebKit.dll!WebCore::RenderLayerCompositor::rebuildCompositingLayerTree(WebCore::RenderLayer * layer=0x064ad8e4, const WebCore::CompositingState &amp; compositingState={...}, WTF::Vector&lt;WebCore::GraphicsLayer *,0&gt; &amp; childLayersOfEnclosingLayer=[0]())  Line 902	C++
 	WebKit.dll!WebCore::RenderLayerCompositor::rebuildCompositingLayerTree(WebCore::RenderLayer * layer=0x064da904, const WebCore::CompositingState &amp; compositingState={...}, WTF::Vector&lt;WebCore::GraphicsLayer *,0&gt; &amp; childLayersOfEnclosingLayer=[0]())  Line 902	C++
 	WebKit.dll!WebCore::RenderLayerCompositor::updateCompositingLayers(WebCore::CompositingUpdateType updateType=CompositingUpdateAfterLayoutOrStyleChange, WebCore::RenderLayer * updateRoot=0x064da904)  Line 307	C++
 	WebKit.dll!WebCore::FrameView::updateCompositingLayers()  Line 629	C++
 	WebKit.dll!WebCore::FrameView::layout(bool allowSubtree=true)  Line 1042	C++
 	WebKit.dll!WebCore::Document::updateLayout()  Line 1621	C++
 	WebKit.dll!WebCore::RenderLayer::hitTest(const WebCore::HitTestRequest &amp; request={...}, WebCore::HitTestResult &amp; result={...})  Line 2860	C++
 	WebKit.dll!WebCore::Document::prepareMouseEvent(const WebCore::HitTestRequest &amp; request={...}, const WebCore::IntPoint &amp; documentPoint={...}, const WebCore::PlatformMouseEvent &amp; event={...})  Line 2649	C++
 	WebKit.dll!WebCore::EventHandler::prepareMouseEvent(const WebCore::HitTestRequest &amp; request={...}, const WebCore::PlatformMouseEvent &amp; mev={...})  Line 1924 + 0x39 bytes	C++
 	WebKit.dll!WebCore::EventHandler::handleMouseMoveEvent(const WebCore::PlatformMouseEvent &amp; mouseEvent={...}, WebCore::HitTestResult * hoveredNode=0x0012f5a4)  Line 1605	C++
 	WebKit.dll!WebCore::EventHandler::mouseMoved(const WebCore::PlatformMouseEvent &amp; event={...})  Line 1536 + 0x10 bytes	C++
 	WebKit.dll!WebKit::handleMouseEvent(const WebKit::WebMouseEvent &amp; mouseEvent={...}, WebCore::Page * page=0x03dc8f20)  Line 1053 + 0x13 bytes	C++
 	WebKit.dll!WebKit::WebPage::mouseEvent(const WebKit::WebMouseEvent &amp; mouseEvent={...})  Line 1079 + 0x15 bytes	C++
 	WebKit.dll!CoreIPC::callMemberFunction&lt;WebKit::WebPage,void (__thiscall WebKit::WebPage::*)(WebKit::WebMouseEvent const &amp;),WebKit::WebMouseEvent&gt;(const CoreIPC::Arguments1&lt;WebKit::WebMouseEvent&gt; &amp; args={...}, WebKit::WebPage * object=0x03dc8b48, void (const WebKit::WebMouseEvent &amp;)* function=0x10008f67)  Line 19 + 0xf bytes	C++
 	WebKit.dll!CoreIPC::handleMessage&lt;Messages::WebPage::MouseEvent,WebKit::WebPage,void (__thiscall WebKit::WebPage::*)(WebKit::WebMouseEvent const &amp;)&gt;(CoreIPC::ArgumentDecoder * argumentDecoder=0x223acbd0, WebKit::WebPage * object=0x03dc8b48, void (const WebKit::WebMouseEvent &amp;)* function=0x10008f67)  Line 277 + 0x15 bytes	C++
 	WebKit.dll!WebKit::WebPage::didReceiveWebPageMessage(CoreIPC::Connection * __formal=0x03da4cf0, CoreIPC::MessageID messageID={...}, CoreIPC::ArgumentDecoder * arguments=0x223acbd0)  Line 104 + 0x23 bytes	C++
 	WebKit.dll!WebKit::WebPage::didReceiveMessage(CoreIPC::Connection * connection=0x03da4cf0, CoreIPC::MessageID messageID={...}, CoreIPC::ArgumentDecoder * arguments=0x223acbd0)  Line 2087	C++
 	WebKit.dll!WebKit::WebProcess::didReceiveMessage(CoreIPC::Connection * connection=0x03da4cf0, CoreIPC::MessageID messageID={...}, CoreIPC::ArgumentDecoder * arguments=0x223acbd0)  Line 642	C++
 	WebKit.dll!CoreIPC::Connection::dispatchMessage(CoreIPC::Connection::Message&lt;CoreIPC::ArgumentDecoder&gt; &amp; message={...})  Line 689 + 0x30 bytes	C++
 	WebKit.dll!CoreIPC::Connection::dispatchMessages()  Line 717	C++
 	WebKit.dll!MemberFunctionWorkItem0&lt;CoreIPC::Connection&gt;::execute()  Line 79 + 0x10 bytes	C++
 	WebKit.dll!RunLoop::performWork()  Line 63 + 0x1a bytes	C++
 	WebKit.dll!RunLoop::wndProc(HWND__ * hWnd=0x001805c8, unsigned int message=1025, unsigned int wParam=64637248, long lParam=0)  Line 62	C++
 	WebKit.dll!RunLoop::RunLoopWndProc(HWND__ * hWnd=0x001805c8, unsigned int message=1025, unsigned int wParam=64637248, long lParam=0)  Line 44 + 0x18 bytes	C++
 	user32.dll!_InternalCallWinProc@20()  + 0x28 bytes	
 	user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 bytes	
 	user32.dll!_DispatchMessageWorker@8()  + 0xdc bytes	
 	user32.dll!_DispatchMessageW@4()  + 0xf bytes	
 	WebKit.dll!RunLoop::run()  Line 78 + 0xc bytes	C++
 	WebKit.dll!WebKit::WebProcessMain(const WebKit::CommandLine &amp; commandLine={...})  Line 82	C++
 	WebKit.dll!WebKitMain(const WebKit::CommandLine &amp; commandLine={...})  Line 50 + 0x9 bytes	C++
 	WebKit.dll!WebKitMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpstrCmdLine=0x00021118, int nCmdShow=10)  Line 187 + 0x9 bytes	C++
 	WebKit2WebProcess.exe!wWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpstrCmdLine=0x00021118, int nCmdShow=10)  Line 66 + 0x18 bytes	C++
 	WebKit2WebProcess.exe!__tmainCRTStartup()  Line 589 + 0x1c bytes	C
 	kernel32.dll!_BaseProcessStart@4()  + 0x23 bytes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446079</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-03 14:20:45 -0700</bug_when>
    <thetext>Checking for overflow in PlatformCALayerWinInternal::constrainedSize makes the crash go away. Chris Marrin says we will end up just rendering the upper-left portion of the layer, which matches Mac&apos;s behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446119</commentid>
    <comment_count>6</comment_count>
      <attachid>102834</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-03 15:03:44 -0700</bug_when>
    <thetext>Created attachment 102834
Detect and handle overflow in PlatformCALayerWinInternal::constrainedSize</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446148</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-03 15:37:58 -0700</bug_when>
    <thetext>Thanks for reviewing, Sam. I&apos;ll wait until tomorrow to commit this so that I have time to watch the bots.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446163</commentid>
    <comment_count>8</comment_count>
      <attachid>102834</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-08-03 15:57:14 -0700</bug_when>
    <thetext>Comment on attachment 102834
Detect and handle overflow in PlatformCALayerWinInternal::constrainedSize

GraphicsLayerCA::constrainedSize() already does some size limiting; why does PlatformCALayerWinInternal need it too? FWIW, that code uses floats to get around the overflow issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446165</commentid>
    <comment_count>9</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-08-03 15:57:45 -0700</bug_when>
    <thetext>Sorry i clobbered the review status, but perhaps Adam would like to reconsider.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446494</commentid>
    <comment_count>10</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-04 07:53:28 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; GraphicsLayerCA::constrainedSize() already does some size limiting; why does PlatformCALayerWinInternal need it too? FWIW, that code uses floats to get around the overflow issues.

We in fact have three constrainedSize functions:

FloatSize GraphicsLayerCA::constrainedSize() const
CGSize PlatformCALayerWinInternal::constrainedSize(const CGSize&amp; size) const
CGSize WebTiledLayer::constrainedSize(const CGSize&amp; size) const

That seems like two too many to me. (I suspect that the entire WebTiledLayer class isn&apos;t even used anymore, but I haven&apos;t confirmed this yet.) I&apos;m not sure why we have so many. Chris would probably know, since I think he wrote all but the first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446514</commentid>
    <comment_count>11</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-08-04 08:40:09 -0700</bug_when>
    <thetext>I&apos;m just surprised that PlatformCALayerWinInternal ever saw the huge layer, since I would have expected GraphicsLayerCA to constrain first. Is that not the case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446519</commentid>
    <comment_count>12</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-04 08:44:55 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; I&apos;m just surprised that PlatformCALayerWinInternal ever saw the huge layer, since I would have expected GraphicsLayerCA to constrain first. Is that not the case?

GraphicsLayerCA only constrains on Leopard and SnowLeopard. We should change it to constrain on Windows, too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446583</commentid>
    <comment_count>13</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-04 09:56:58 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #11)
&gt; &gt; I&apos;m just surprised that PlatformCALayerWinInternal ever saw the huge layer, since I would have expected GraphicsLayerCA to constrain first. Is that not the case?
&gt; 
&gt; GraphicsLayerCA only constrains on Leopard and SnowLeopard. We should change it to constrain on Windows, too.

I have a patch that gets rid of PlatformCALayerWinInteral&apos;s constraining code and uses GraphicsLayerCA&apos;s instead. But I noticed a difference between the two implementations: when both width and height are too large, GraphicsLayerCA constrains whichever is larger down to just a single tile, while PlatformCALayerWinInternal constrains both proportionally until we have a small enough number of tiles. PlatformCALayerWinInternal&apos;s behavior seems slightly better, since you end up with a proportional rectangle of rendered content in the upper-left rather than just a one-tile-wide strip; maybe we should change GraphicsLayerCA to do the same thing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446600</commentid>
    <comment_count>14</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-08-04 10:25:44 -0700</bug_when>
    <thetext>Agreed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446623</commentid>
    <comment_count>15</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-04 10:58:37 -0700</bug_when>
    <thetext>I think it might make the most sense to do this in two parts:

1) Fix the overflow bug that caused this crash using the already-attached patch
2) Unify GraphicsLayerCA::constrainedSize and PlatformCALayerWinInternal::constrainedSize

I filed bug 65705 to cover (2).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>446636</commentid>
    <comment_count>16</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-08-04 11:15:14 -0700</bug_when>
    <thetext>Committed r92389: &lt;http://trac.webkit.org/changeset/92389&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>102834</attachid>
            <date>2011-08-03 15:03:44 -0700</date>
            <delta_ts>2011-08-04 10:58:46 -0700</delta_ts>
            <desc>Detect and handle overflow in PlatformCALayerWinInternal::constrainedSize</desc>
            <filename>bug-65637-20110803180410.patch</filename>
            <type>text/plain</type>
            <size>5385</size>
            <attacher name="Adam Roben (:aroben)">aroben</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTIyOTEKZGlmZiAtLWdpdCBhL0xheW91dFRlc3RzL0NoYW5n
ZUxvZyBiL0xheW91dFRlc3RzL0NoYW5nZUxvZwppbmRleCAxMjhjZGE4MTl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aWxlQ291
bnQgLyB0aWxlUm93cyk7CiAgICAgICAgIGVsc2UgaWYgKHRpbGVDb2x1bW5zIDwgY1NxcnRNYXhU
aWxlQ291bnQpCkBAIC00MjMsNiArNDI0LDcgQEAgdm9pZCBQbGF0Zm9ybUNBTGF5ZXJXaW5JbnRl
cm5hbDo6dXBkYXRlVGlsZXMoKQogICAgIGludCBudW1UaWxlc0hvcml6b250YWwgPSBjZWlsKG1f
Y29uc3RyYWluZWRTaXplLndpZHRoIC8gbV90aWxlU2l6ZS53aWR0aCk7CiAgICAgaW50IG51bVRp
bGVzVmVydGljYWwgPSBjZWlsKG1fY29uc3RyYWluZWRTaXplLmhlaWdodCAvIG1fdGlsZVNpemUu
aGVpZ2h0KTsKICAgICBpbnQgbnVtVGlsZXNUb3RhbCA9IG51bVRpbGVzSG9yaXpvbnRhbCAqIG51
bVRpbGVzVmVydGljYWw7CisgICAgQVNTRVJUKCFtX2NvbnN0cmFpbmVkU2l6ZS5oZWlnaHQgfHwg
IW1fY29uc3RyYWluZWRTaXplLndpZHRoIHx8IG51bVRpbGVzVG90YWwgPiAwKTsKIAogICAgIGlu
dCBudW1UaWxlc1RvQ2hhbmdlID0gbnVtVGlsZXNUb3RhbCAtIHRpbGVDb3VudCgpOwogICAgIGlm
IChudW1UaWxlc1RvQ2hhbmdlID49IDApIHsK
</data>

          </attachment>
      

    </bug>

</bugzilla>