<?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>69370</bug_id>
          
          <creation_ts>2011-10-04 13:46:18 -0700</creation_ts>
          <short_desc>WebKit not ensure font load before calling Skia to drawPosText during Chrome printing</short_desc>
          <delta_ts>2011-10-13 17:16:55 -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://code.google.com/p/chromium/issues/detail?id=94421</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>69684</dependson>
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Arthur Hsu">arthurhsu</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>agl</cc>
    
    <cc>jamesr</cc>
    
    <cc>simonjam</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>477896</commentid>
    <comment_count>0</comment_count>
    <who name="Arthur Hsu">arthurhsu</who>
    <bug_when>2011-10-04 13:46:18 -0700</bug_when>
    <thetext>In Chrome sandbox model, GDI calls such as GetOutlineTextMetrics() can fail if the font is not loaded in memory already.  Chrome browser process implements a hack that will force GDI to load the desired font into memory, and in WebKit terms, it&apos;s called PlatformSupport::ensureFontLoaded().

This means that WebKit renderer must call PlatformSupport::ensureFontLoaded() right before calling Skia to draw glyphs because they are both in sandbox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>477936</commentid>
    <comment_count>1</comment_count>
      <attachid>109685</attachid>
    <who name="Arthur Hsu">arthurhsu</who>
    <bug_when>2011-10-04 14:15:44 -0700</bug_when>
    <thetext>Created attachment 109685
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>477943</commentid>
    <comment_count>2</comment_count>
      <attachid>109685</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-10-04 14:19:37 -0700</bug_when>
    <thetext>Comment on attachment 109685
Patch

Is there any way to construct a test case for this?

What is the failure mode if this doesn&apos;t happen?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>477954</commentid>
    <comment_count>3</comment_count>
    <who name="Arthur Hsu">arthurhsu</who>
    <bug_when>2011-10-04 14:24:56 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 109685 [details])
&gt; Is there any way to construct a test case for this?

This currently causes problem only in Chrome printing code because Skia needs to query GDI outline text metrics for generating PDF data.  I&apos;m not sure how that sandbox/PDF generation can fit in WebKit testing.

&gt; What is the failure mode if this doesn&apos;t happen?

In Chrome it will crash the renderer and the printing will fail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478789</commentid>
    <comment_count>4</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-10-05 16:53:15 -0700</bug_when>
    <thetext>So this is just a fix for printing?  You should update the bug title to reflect that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478845</commentid>
    <comment_count>5</comment_count>
    <who name="Arthur Hsu">arthurhsu</who>
    <bug_when>2011-10-05 18:09:04 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; So this is just a fix for printing?  You should update the bug title to reflect that.

Done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>479331</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Langley">agl</who>
    <bug_when>2011-10-06 11:38:12 -0700</bug_when>
    <thetext>This LGTM, but I am not a WebKit reviewer. You need an r+ from a real WebKit reviewer before committing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>479332</commentid>
    <comment_count>7</comment_count>
      <attachid>109685</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-10-06 11:39:24 -0700</bug_when>
    <thetext>Comment on attachment 109685
Patch

agl&apos;s LGTM is good enough for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>479387</commentid>
    <comment_count>8</comment_count>
      <attachid>109685</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-10-06 12:26:42 -0700</bug_when>
    <thetext>Comment on attachment 109685
Patch

Clearing flags on attachment: 109685

Committed r96847: &lt;http://trac.webkit.org/changeset/96847&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>479388</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-10-06 12:26:47 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>480434</commentid>
    <comment_count>10</comment_count>
    <who name="James Simonsen">simonjam</who>
    <bug_when>2011-10-07 18:56:58 -0700</bug_when>
    <thetext>There&apos;s a pretty significant memory regression on Chromium Windows. This is the only Windows change in the regression range, so we&apos;re going to try rolling it out and see if memory returns to normal. If it turns out this isn&apos;t causing it, I&apos;ll roll it back in.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483447</commentid>
    <comment_count>11</comment_count>
      <attachid>110897</attachid>
    <who name="James Simonsen">simonjam</who>
    <bug_when>2011-10-13 13:45:10 -0700</bug_when>
    <thetext>Created attachment 110897
Patch for landing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>483670</commentid>
    <comment_count>12</comment_count>
    <who name="James Simonsen">simonjam</who>
    <bug_when>2011-10-13 17:16:34 -0700</bug_when>
    <thetext>Committed r97426: &lt;http://trac.webkit.org/changeset/97426&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>109685</attachid>
            <date>2011-10-04 14:15:44 -0700</date>
            <delta_ts>2011-10-13 13:45:07 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-69370-20111004141543.patch</filename>
            <type>text/plain</type>
            <size>1257</size>
            <attacher name="Arthur Hsu">arthurhsu</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDk2NjQxKQorKysgU291cmNlL1dlYkNvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMTEtMTAtMDQgIEFydGh1ciBI
c3UgIDxhcnRodXJoc3VAY2hyb21pdW0ub3JnPgorCisgICAgICAgIEVuc3VyZSBmb250IGxvYWRl
ZCBiZWZvcmUgY2FsbGluZyBTa2lhIHRvIGRyYXdQb3NUZXh0IGluIENocm9tZSBzYW5kYm94Cisg
ICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD02OTM3MAorCisg
ICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgICogcGxhdGZvcm0v
Z3JhcGhpY3MvY2hyb21pdW0vRm9udENocm9taXVtV2luLmNwcDoKKyAgICAgICAgKFdlYkNvcmU6
OkZvbnQ6OmRyYXdHbHlwaHMpOgorCiAyMDExLTEwLTA0ICBBbmRlcnMgQ2FybHNzb24gIDxhbmRl
cnNjYUBhcHBsZS5jb20+CiAKICAgICAgICAgVXNlIGNvbnN0IFBsYXRmb3JtV2hlZWxFdmVudCBy
ZWZlcmVuY2VzIHdoZXJlIHBvc3NpYmxlCkluZGV4OiBTb3VyY2UvV2ViQ29yZS9wbGF0Zm9ybS9n
cmFwaGljcy9jaHJvbWl1bS9Gb250Q2hyb21pdW1XaW4uY3BwCj09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJj
ZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL2Nocm9taXVtL0ZvbnRDaHJvbWl1bVdpbi5jcHAJ
KHJldmlzaW9uIDk2NjMxKQorKysgU291cmNlL1dlYkNvcmUvcGxhdGZvcm0vZ3JhcGhpY3MvY2hy
b21pdW0vRm9udENocm9taXVtV2luLmNwcAkod29ya2luZyBjb3B5KQpAQCAtNjksNiArNjksNyBA
QCB2b2lkIEZvbnQ6OmRyYXdHbHlwaHMoR3JhcGhpY3NDb250ZXh0KiBnCiAgICAgICAgIHJldHVy
bjsKIAogICAgIEhGT05UIGhmb250ID0gZm9udC0+cGxhdGZvcm1EYXRhKCkuaGZvbnQoKTsKKyAg
ICBQbGF0Zm9ybVN1cHBvcnQ6OmVuc3VyZUZvbnRMb2FkZWQoaGZvbnQpOwogCiAgICAgLy8gV2Ug
ZHJhdyB0aGUgZ2x5cGhzIGluIGNodW5rcyB0byBhdm9pZCBoYXZpbmcgdG8gZG8gYSBoZWFwIGFs
bG9jYXRpb24gZm9yCiAgICAgLy8gdGhlIGFycmF5cyBvZiBjaGFyYWN0ZXJzIGFuZCBhZHZhbmNl
cy4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>110897</attachid>
            <date>2011-10-13 13:45:10 -0700</date>
            <delta_ts>2011-10-13 17:16:55 -0700</delta_ts>
            <desc>Patch for landing</desc>
            <filename>bug-69370-20111013134509.patch</filename>
            <type>text/plain</type>
            <size>1388</size>
            <attacher name="James Simonsen">simonjam</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjog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