<?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>44969</bug_id>
          
          <creation_ts>2010-08-31 11:57:19 -0700</creation_ts>
          <short_desc>Track the right gesture state during the asynchronous form submission.</short_desc>
          <delta_ts>2010-09-03 12:49:41 -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>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Johnny(Jianning) Ding">jnd</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>cevans</cc>
    
    <cc>commit-queue</cc>
    
    <cc>enrica</cc>
    
    <cc>eric</cc>
    
    <cc>inferno</cc>
    
    <cc>mihaip</cc>
    
    <cc>scarybeasts</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>272255</commentid>
    <comment_count>0</comment_count>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-08-31 11:57:19 -0700</bug_when>
    <thetext>The following html can bypass chromium&apos;s popup blocker (You can also run the attached test case)
&lt;form id=&quot;frm1&quot; action=&quot;http://www.google.com&quot; target=&quot;_blank&quot;&gt; 
&lt;input type=&quot;submit&quot; value=&quot;Submit&quot;/&gt; 
&lt;/form&gt; 
&lt;script&gt; 
var form1 = document.getElementById(&apos;frm1&apos;);
form1.submit();
&lt;/script&gt;

It&apos;s because WebKit can not provide correct gesture state during the asynchronous form submission.

In WebKit, when submitting a form, the FrameLoader::submitForm can get right gesture state to allow or disallow the popup form submission according to setting&apos;s m_javaScriptCanOpenWindowsAutomatically (See DOMWindow::allowPopUp) before scheduling the submission.
However, in chromium, we keep setting&apos;s m_javaScriptCanOpenWindowsAutomatically always true to always schedule any form submissions to allow the embedder (aka browser process) to make the decision by leveraging the chromium&apos;s popup blocker feature.

In WebKit, the actual form submission is asynchronous and executed in ScheduledFormSubmission::fire, so during the real executing time, we lost the right context to get the right correct gesture state.
In chromium, the RenderView::createView tried to call WebFrame::isProcessingUserGesture to get the gesture state when doing the real form submission, since we can not get the active(entered) frame in that time, the ScriptController::processingUserGesture returns true, so chromium thinks the popup submission is gesture-initiated, that is why the above test code bypasses chromium&apos;s popup blocker.

To fix this issue, we need to express the following logic:
if a submission was scheduled in response to a user gesture, set UserGestureIndicator&apos;s state to DefinitelyProcessingUserGesture when the submission timer fires; otherwise, set the state to DefinitelyNotProcessingUserGesture during the submission timer fires. (The solution actually is from Andy&apos;s comments in bug 34541).

The patch will look like

ScheduledFormSubmission::ScheduledFormSubmission(PassRefPtr&lt;FormSubmission&gt; submission, bool lockBackForwardList, bool duringLoad, bool wasUserGesture)
        : ScheduledNavigation(0, submission-&gt;lockHistory(), lockBackForwardList, duringLoad, true)
        , m_submission(submission)
        , m_haveToldClient(false)
        , m_wasUserGesture(wasUserGesture)

virtual void ScheduledFormSubmission::fire(Frame* frame)
{
     UserGestureIndicator gestureIndicator(m_wasUserGesture ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
     ...

@Adam, what do you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272256</commentid>
    <comment_count>1</comment_count>
      <attachid>66081</attachid>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-08-31 11:57:53 -0700</bug_when>
    <thetext>Created attachment 66081
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272260</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-08-31 12:02:46 -0700</bug_when>
    <thetext>Yes.  That&apos;s the right solution.  We do something similar is a couple other cases where we need to track the user gesture state across async operations.  That&apos;s actually why we created UserGestureIndicator in the first place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272263</commentid>
    <comment_count>3</comment_count>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-08-31 12:05:50 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Yes.  That&apos;s the right solution.  We do something similar is a couple other cases where we need to track the user gesture state across async operations.  That&apos;s actually why we created UserGestureIndicator in the first place.

Thanks for super fast response:) Will give a patch after getting up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272410</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Evans">cevans</who>
    <bug_when>2010-08-31 14:55:05 -0700</bug_when>
    <thetext>@jnd, @abarth: we in fact had exactly this logic for exactly this case :) Adam and I added it a while ago in this CL:
http://trac.webkit.org/changeset/57313/trunk/WebCore/loader/RedirectScheduler.cpp
(plus follow-up fix):
http://trac.webkit.org/changeset/59462/trunk/WebCore/loader/RedirectScheduler.cpp

However, this subsequent CL seems to have backed part of our changes out:
http://trac.webkit.org/changeset/65340/trunk/WebCore/loader/RedirectScheduler.cpp

Adding Mihai - do you perhaps remember why the UserGestureIndicator part changed in 65340?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272416</commentid>
    <comment_count>5</comment_count>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2010-08-31 15:01:00 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; However, this subsequent CL seems to have backed part of our changes out:
&gt; http://trac.webkit.org/changeset/65340/trunk/WebCore/loader/RedirectScheduler.cpp
&gt; 
&gt; Adding Mihai - do you perhaps remember why the UserGestureIndicator part changed in 65340?

It looked like an unused local variable. Now I see that simply creating a UserGestureIndicator instance toggles a static member. I can put it back (perhaps with a comment).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272431</commentid>
    <comment_count>6</comment_count>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2010-08-31 15:18:28 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; It looked like an unused local variable. Now I see that simply creating a UserGestureIndicator instance toggles a static member. I can put it back (perhaps with a comment).

It&apos;s also weird that fast/events/popup-blocked-to-post-blank.html still passes (based on http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fast%2Fevents%2Fpopup-blocked-to-post-blank.html) even with my change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272442</commentid>
    <comment_count>7</comment_count>
    <who name="Chris Evans">cevans</who>
    <bug_when>2010-08-31 15:37:42 -0700</bug_when>
    <thetext>@mihaip: unfortunately, the Chromium and Safari pop-up blockers work in totally different ways. Both were broken and I fixed both; but the test only tests the Safari blocker. I don&apos;t believe it&apos;s possible to test the Chromium blocker with a LayoutTest.
I take blame here for not adding a Chromium UI test.
Johnny, how bribe-able are you to add such a thing? Pop-up blocking keeps regressing; a Chromium UI test that checks all of the test cases we&apos;ve been dealing with recently would be invaluable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272622</commentid>
    <comment_count>8</comment_count>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-08-31 21:37:25 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; @mihaip: unfortunately, the Chromium and Safari pop-up blockers work in totally different ways. Both were broken and I fixed both; but the test only tests the Safari blocker. I don&apos;t believe it&apos;s possible to test the Chromium blocker with a LayoutTest.
&gt; I take blame here for not adding a Chromium UI test.
&gt; Johnny, how bribe-able are you to add such a thing? Pop-up blocking keeps regressing; a Chromium UI test that checks all of the test cases we&apos;ve been dealing with recently would be invaluable.

Hi Chris,
Yes, I am sorry I didn&apos;t find your original patch.
and sure thing, I will add a chrome UI test to address this bug, also I will bring your fix back into WebKit with comments.
Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272797</commentid>
    <comment_count>9</comment_count>
      <attachid>66211</attachid>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-09-01 07:31:43 -0700</bug_when>
    <thetext>Created attachment 66211
fix patch

Hi Adam, Chris,

This patch is to bring the Chris&apos;s original fix (in r57313 and r594620) back.
Since WebKit and Chromium implement popup blocker in different ways, the test fast/events/popup-blocked-to-post-blank.html can not cover this bug in chromium.
I will add a browser_test to address this bug in chromium once this patch is landed and taken by chromium trunk.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272912</commentid>
    <comment_count>10</comment_count>
      <attachid>66211</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-09-01 11:33:45 -0700</bug_when>
    <thetext>Comment on attachment 66211
fix patch

View in context: https://bugs.webkit.org/attachment.cgi?id=66211&amp;action=prettypatch

Mostly just questions.

&gt; WebCore/ChangeLog:9
&gt; +        fast/events/popup-blocked-to-post-blank.html can cover the test in WebKit.
&gt; +        A UI test will be added in chromium to address chromium&apos;s bug.
Is fast/events/popup-blocked-to-post-blank.html test currently failing?  If so, do we need to remove it from the Skipped list?  If not, then it doesn&apos;t seem to cover this change.

&gt; WebCore/loader/RedirectScheduler.cpp:188
&gt; +        // Please do not delete the following local variable gestureIndicator definition.
&gt; +        // The variable gestureIndicator toggles a static gesture state to let WebKit correctly
&gt; +        // track the user gesture state across async operations.
This comment is not needed.  Instead, we should have a test that breaks if you remove this line.

&gt; WebCore/loader/RedirectScheduler.cpp:324
&gt;      bool lockBackForwardList = mustLockBackForwardList(m_frame, UserGestureIndicator::processingUserGesture()) || (submission-&gt;state()-&gt;formSubmissionTrigger() == SubmittedByJavaScript &amp;&amp; m_frame-&gt;tree()-&gt;parent());
&gt;  
&gt; -    schedule(adoptPtr(new ScheduledFormSubmission(submission, lockBackForwardList, duringLoad)));
&gt; +    schedule(adoptPtr(new ScheduledFormSubmission(submission, lockBackForwardList, duringLoad, m_frame-&gt;loader()-&gt;isProcessingUserGesture())));
Why do we use  m_frame-&gt;loader()-&gt;isProcessingUserGesture() here but UserGestureIndicator::processingUserGesture() two lines above?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>273372</commentid>
    <comment_count>11</comment_count>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-09-02 06:38:03 -0700</bug_when>
    <thetext>(In reply to comment #10)
Thanks, Adam! Please see my inline comments.

&gt; Is fast/events/popup-blocked-to-post-blank.html test currently failing?  If so, do we need to remove it from the Skipped list?  If not, then it doesn&apos;t seem to cover this change.
At now fast/events/popup-blocked-to-post-blank.html is not failed in WebKit layout test, and I think it does cover this issue, which is to check whether the form submission issued popup window can bypass popup blocker or not. 
AFAIK this test is not in any skip lists, we can still keep it. (Please correct me if I was wrong).
But since Chromium&apos;s popup feature is implemented in another way (judgement in  embedder), this test can not cover the same issue in Chromium. I will add a Chromium test once this patch is landed and taken by Chromium.
Does that make sense?


&gt; This comment is not needed. Instead, we should have a test that breaks if you remove this line.
Yes, you are right!
The reason to add this comment is because the line looks like useless if someone is not familiar with the context. I want to remind him/her.
However removing it does not break WebKit, but does break Chromium. so a chromium test case to address this issue is definitely necessary. Like I said in above. I will add that test in chromium.
Of course, I will drop this comment in new patch.

&gt; Why do we use  m_frame-&gt;loader()-&gt;isProcessingUserGesture() here but UserGestureIndicator::processingUserGesture() two lines above?

The reason to use m_frame-&gt;loader()-&gt;isProcessingUserGesture() is because that call can cover all scenarios of user gesture, but UserGestureIndicator::processingUserGesture() does not.
FrameLoader::isProcessingUserGesture() can handle right gesture state in the scenario of form submission when javascript is disabled, can handle right gesture state in the scenario of form submission via href=&quot;javascript:form.submit()&quot;, can handle right gesture state in the scenario of form submission inside gesture event or non-gesture event (See Event::fromUserGesture).
Why the code in two lines above used serGestureIndicator::processingUserGesture(). To be honest, I don&apos;t know, but I &apos;d like to change it to use FrameLoader::isProcessingUserGesture().
Any comments?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>273375</commentid>
    <comment_count>12</comment_count>
      <attachid>66365</attachid>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-09-02 06:56:42 -0700</bug_when>
    <thetext>Created attachment 66365
new patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>273466</commentid>
    <comment_count>13</comment_count>
      <attachid>66365</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-09-02 11:24:45 -0700</bug_when>
    <thetext>Comment on attachment 66365
new patch

We need a test for this patch.  Honestly, the test is more important than the fix in cases like this.  Having a test in Chromium-land is nice, but we should have a LayoutTest too, otherwise we&apos;re only going to discover regressions after a merge, which is bad news bears.  This is common code to all WebKit ports.  We should be able to test it with a LayoutTest.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>273533</commentid>
    <comment_count>14</comment_count>
    <who name="Chris Evans">cevans</who>
    <bug_when>2010-09-02 13:43:44 -0700</bug_when>
    <thetext>@abarth - let us know if you have a way to actually test this in WebKit.
The Chromium port actually runs with WebKit&apos;s notification of a pop-up blocker _disabled_. Chromium instead relies on WebKit&apos;s UserGestureIndicator API returning the correct results at various times, such as in the asynchronous form submission context.

(The original patch for this did add a LayoutTest for this with WebKit&apos;s pop-up blocker enabled).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>273631</commentid>
    <comment_count>15</comment_count>
      <attachid>66365</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-09-02 15:47:38 -0700</bug_when>
    <thetext>Comment on attachment 66365
new patch

I see.  Ok, we&apos;ll this is likely to cause us more pain in the future...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>273635</commentid>
    <comment_count>16</comment_count>
    <who name="Chris Evans">cevans</who>
    <bug_when>2010-09-02 15:51:51 -0700</bug_when>
    <thetext>Thanks, Adam.
Johnny - a good Chromium test in the area of pop-up blocking would go some way to lessening any future pain...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>273759</commentid>
    <comment_count>17</comment_count>
    <who name="Johnny(Jianning) Ding">jnd</who>
    <bug_when>2010-09-02 19:49:01 -0700</bug_when>
    <thetext>(In reply to comment #16)
&gt; Thanks, Adam.
&gt; Johnny - a good Chromium test in the area of pop-up blocking would go some way to lessening any future pain...
Thanks Adam, Chris!
The chromium test will be added after landing this patch. I will send the cl to you tomorrow.(ooo today)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>274033</commentid>
    <comment_count>18</comment_count>
    <who name="Abhishek Arya">inferno</who>
    <bug_when>2010-09-03 10:57:23 -0700</bug_when>
    <thetext>Added commit queue flag so that this gets committed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>274052</commentid>
    <comment_count>19</comment_count>
      <attachid>66365</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-09-03 11:21:53 -0700</bug_when>
    <thetext>Comment on attachment 66365
new patch

Clearing flags on attachment: 66365

Committed r66742: &lt;http://trac.webkit.org/changeset/66742&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>274053</commentid>
    <comment_count>20</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-09-03 11:21:59 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>274134</commentid>
    <comment_count>21</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-09-03 12:49:41 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/66742 might have broken Qt Linux Release
The following changes are on the blame list:
http://trac.webkit.org/changeset/66742
http://trac.webkit.org/changeset/66743</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>66081</attachid>
            <date>2010-08-31 11:57:53 -0700</date>
            <delta_ts>2010-08-31 11:57:53 -0700</delta_ts>
            <desc>test case</desc>
            <filename>frame_submission.html</filename>
            <type>text/html</type>
            <size>228</size>
            <attacher name="Johnny(Jianning) Ding">jnd</attacher>
            
              <data encoding="base64">PGh0bWw+IAo8Ym9keT4gCjxmb3JtIGlkPSJmcm0xIiBhY3Rpb249Imh0dHA6Ly93d3cuZ29vZ2xl
LmNvbSIgdGFyZ2V0PSJfYmxhbmsiPiAKPGlucHV0IHR5cGU9InN1Ym1pdCIgdmFsdWU9IlN1Ym1p
dCIvPiAKPC9mb3JtPiAKPHNjcmlwdD4gCnZhciBmb3JtMSA9IGRvY3VtZW50LmdldEVsZW1lbnRC
eUlkKCdmcm0xJyk7CmZvcm0xLnN1Ym1pdCgpOwo8L3NjcmlwdD4gCjwvYm9keT4gCjwvaHRtbD4g
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>66211</attachid>
            <date>2010-09-01 07:31:43 -0700</date>
            <delta_ts>2010-09-02 06:56:42 -0700</delta_ts>
            <desc>fix patch</desc>
            <filename>patch001.txt</filename>
            <type>text/plain</type>
            <size>3273</size>
            <attacher name="Johnny(Jianning) Ding">jnd</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA2NjYwMCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTggQEAKKzIwMTAtMDktMDEgIEpvaG5ueSBEaW5nICA8am5kQGNocm9taXVtLm9y
Zz4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBTYXZl
IHRoZSBnZXN0dXJlIHN0YXRlIHRvIHRyYWNrIHRoZSB1c2VyIGdlc3R1cmUgc3RhdGUgYWNyb3Nz
IGFzeW5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AgYm9vbCBsb2NrQmFja0ZvcndhcmRMaXN0ID0gbXVzdExvY2tCYWNrRm9yd2Fy
ZExpc3QobV9mcmFtZSwgVXNlckdlc3R1cmVJbmRpY2F0b3I6OnByb2Nlc3NpbmdVc2VyR2VzdHVy
ZSgpKSB8fCAoc3VibWlzc2lvbi0+c3RhdGUoKS0+Zm9ybVN1Ym1pc3Npb25UcmlnZ2VyKCkgPT0g
U3VibWl0dGVkQnlKYXZhU2NyaXB0ICYmIG1fZnJhbWUtPnRyZWUoKS0+cGFyZW50KCkpOwogCi0g
ICAgc2NoZWR1bGUoYWRvcHRQdHIobmV3IFNjaGVkdWxlZEZvcm1TdWJtaXNzaW9uKHN1Ym1pc3Np
b24sIGxvY2tCYWNrRm9yd2FyZExpc3QsIGR1cmluZ0xvYWQpKSk7CisgICAgc2NoZWR1bGUoYWRv
cHRQdHIobmV3IFNjaGVkdWxlZEZvcm1TdWJtaXNzaW9uKHN1Ym1pc3Npb24sIGxvY2tCYWNrRm9y
d2FyZExpc3QsIGR1cmluZ0xvYWQsIG1fZnJhbWUtPmxvYWRlcigpLT5pc1Byb2Nlc3NpbmdVc2Vy
R2VzdHVyZSgpKSkpOwogfQogCiB2b2lkIFJlZGlyZWN0U2NoZWR1bGVyOjpzY2hlZHVsZVJlZnJl
c2goYm9vbCB3YXNVc2VyR2VzdHVyZSkK
</data>
<flag name="review"
          id="55151"
          type_id="1"
          status="-"
          setter="abarth"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>66365</attachid>
            <date>2010-09-02 06:56:42 -0700</date>
            <delta_ts>2010-09-03 11:21:53 -0700</delta_ts>
            <desc>new patch</desc>
            <filename>patch001.txt</filename>
            <type>text/plain</type>
            <size>3490</size>
            <attacher name="Johnny(Jianning) Ding">jnd</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT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