WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
136916
Pending API request URL no set when loading Alternate HTML or plain text
https://bugs.webkit.org/show_bug.cgi?id=136916
Summary
Pending API request URL no set when loading Alternate HTML or plain text
Carlos Garcia Campos
Reported
2014-09-18 02:42:48 PDT
The effect in all the cases is that PageLoadState::isLoading() is false right after requesting a load, and the activeURL can be NULL or a previous URL.
Attachments
Patch
(10.50 KB, patch)
2014-09-18 02:55 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Rebased patch after r174029
(9.82 KB, patch)
2014-09-26 23:57 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Rebased patch
(12.06 KB, patch)
2014-10-08 23:51 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Rebased patch
(11.25 KB, patch)
2015-01-05 04:52 PST
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Now also including the xcode file changes
(14.10 KB, patch)
2015-01-05 06:30 PST
,
Carlos Garcia Campos
darin
: review+
Details
Formatted Diff
Diff
Patch for landing
(15.12 KB, patch)
2016-02-02 04:08 PST
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Try to fix iOS build
(15.12 KB, patch)
2016-04-18 02:55 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2014-09-18 02:55:55 PDT
Created
attachment 238300
[details]
Patch I've added a new unit test, but only to GTK and EFL builds, since I don't have a mac to add it to the xcode file too.
Carlos Garcia Campos
Comment 2
2014-09-18 02:56:46 PDT
Making this depend on #136913, since the new unit test will fail if #136913 is not fixed before.
Carlos Garcia Campos
Comment 3
2014-09-26 23:52:41 PDT
loadFile() has already been fixed in
r174029
Carlos Garcia Campos
Comment 4
2014-09-26 23:57:38 PDT
Created
attachment 238763
[details]
Rebased patch after
r174029
Darin Adler
Comment 5
2014-09-28 17:14:12 PDT
Sam, Anders, could one of you review?
Carlos Garcia Campos
Comment 6
2014-10-08 23:51:47 PDT
Created
attachment 239519
[details]
Rebased patch
Carlos Garcia Campos
Comment 7
2015-01-05 03:58:44 PST
loadData was already fixed in
r176408
Carlos Garcia Campos
Comment 8
2015-01-05 04:52:28 PST
Created
attachment 243972
[details]
Rebased patch
Carlos Garcia Campos
Comment 9
2015-01-05 06:30:10 PST
Created
attachment 243974
[details]
Now also including the xcode file changes To add the new api test to the build also for mac
Michael Catanzaro
Comment 10
2015-06-05 14:37:58 PDT
(In reply to
comment #5
)
> Sam, Anders, could one of you review?
Michael Catanzaro
Comment 11
2016-01-02 10:13:00 PST
Owners?
Darin Adler
Comment 12
2016-01-15 10:12:00 PST
Comment on
attachment 243974
[details]
Now also including the xcode file changes View in context:
https://bugs.webkit.org/attachment.cgi?id=243974&action=review
I’m saying review+ but I’d still like to understand if Anders agrees about this use of "about:blank".
> Source/WebKit2/UIProcess/WebPageProxy.cpp:860 > + auto transaction = m_pageLoadState.transaction(); > + m_pageLoadState.setPendingAPIRequestURL(transaction, ASCIILiteral("about:blank"));
I think it’s a little peculiar to actually set the URL to about::blank here. Do we agree that explicitly giving it this particular URL makes sense? Does WebKit already treat this as if it came from that URL in other ways or is that a new concept we are introducing? If WebKit does already use this URL then why are we having to inject it specifically here? I think this would read better without the local variable even though the other function does have it in a local variable since it uses it twice. I think blankURL().string() is better than ASCIILiteral("about:blank"). m_pageLoadState.setPendingAPIRequestURL(m_pageLoadState.transaction(), blankURL().string());
> Source/WebKit2/UIProcess/WebPageProxy.cpp:875 > + auto transaction = m_pageLoadState.transaction(); > + m_pageLoadState.setPendingAPIRequestURL(transaction, ASCIILiteral("about:blank"));
Same comments as above.
Darin Adler
Comment 13
2016-01-15 10:18:42 PST
Comment on
attachment 243974
[details]
Now also including the xcode file changes View in context:
https://bugs.webkit.org/attachment.cgi?id=243974&action=review
>> Source/WebKit2/UIProcess/WebPageProxy.cpp:860 >> + m_pageLoadState.setPendingAPIRequestURL(transaction, ASCIILiteral("about:blank")); > > I think it’s a little peculiar to actually set the URL to about::blank here. Do we agree that explicitly giving it this particular URL makes sense? Does WebKit already treat this as if it came from that URL in other ways or is that a new concept we are introducing? If WebKit does already use this URL then why are we having to inject it specifically here? > > I think this would read better without the local variable even though the other function does have it in a local variable since it uses it twice. I think blankURL().string() is better than ASCIILiteral("about:blank"). > > m_pageLoadState.setPendingAPIRequestURL(m_pageLoadState.transaction(), blankURL().string());
I found comments in FrameLoader::reload that say, "If a window is created by javascript, its main frame can have an empty but non-nil URL." Maybe that’s how the plain text string should work. Have an empty URL, not "about:blank".
Carlos Garcia Campos
Comment 14
2016-02-02 03:23:35 PST
Comment on
attachment 243974
[details]
Now also including the xcode file changes View in context:
https://bugs.webkit.org/attachment.cgi?id=243974&action=review
>>> Source/WebKit2/UIProcess/WebPageProxy.cpp:860 >>> + m_pageLoadState.setPendingAPIRequestURL(transaction, ASCIILiteral("about:blank")); >> >> I think it’s a little peculiar to actually set the URL to about::blank here. Do we agree that explicitly giving it this particular URL makes sense? Does WebKit already treat this as if it came from that URL in other ways or is that a new concept we are introducing? If WebKit does already use this URL then why are we having to inject it specifically here? >> >> I think this would read better without the local variable even though the other function does have it in a local variable since it uses it twice. I think blankURL().string() is better than ASCIILiteral("about:blank"). >> >> m_pageLoadState.setPendingAPIRequestURL(m_pageLoadState.transaction(), blankURL().string()); > > I found comments in FrameLoader::reload that say, "If a window is created by javascript, its main frame can have an empty but non-nil URL." > > Maybe that’s how the plain text string should work. Have an empty URL, not "about:blank".
This is what we are doing in other load methods, see WebPageProxy::loadHTMLString() and WebPageProxy::loadData(). You can see in the unit test I'm adding that it also checks existing cases like WKPageLoadData that indeed returns about:blank. So, I don't know if it's the best to do it, but it's consistent with what we do already.
Carlos Garcia Campos
Comment 15
2016-02-02 03:33:56 PST
(In reply to
comment #12
)
> Comment on
attachment 243974
[details]
> Now also including the xcode file changes > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=243974&action=review
> > I’m saying review+ but I’d still like to understand if Anders agrees about > this use of "about:blank". > > > Source/WebKit2/UIProcess/WebPageProxy.cpp:860 > > + auto transaction = m_pageLoadState.transaction(); > > + m_pageLoadState.setPendingAPIRequestURL(transaction, ASCIILiteral("about:blank")); > > I think it’s a little peculiar to actually set the URL to about::blank here. > Do we agree that explicitly giving it this particular URL makes sense? Does > WebKit already treat this as if it came from that URL in other ways or is > that a new concept we are introducing? If WebKit does already use this URL > then why are we having to inject it specifically here? > > I think this would read better without the local variable even though the > other function does have it in a local variable since it uses it twice. I > think blankURL().string() is better than ASCIILiteral("about:blank"). > > m_pageLoadState.setPendingAPIRequestURL(m_pageLoadState.transaction(), > blankURL().string());
The local variable is not because it's reused, but because we want the transaction to be finished when the function goes out of scope, the transaction destructor is the one committing the changes to the page load state.
Carlos Garcia Campos
Comment 16
2016-02-02 04:08:47 PST
Created
attachment 270483
[details]
Patch for landing
Carlos Garcia Campos
Comment 17
2016-02-11 01:15:23 PST
Anders?
Carlos Garcia Campos
Comment 18
2016-04-14 23:01:15 PDT
This patch has almost two years, and has been r+'ed for three months, just pending the final approval from Anders. And the same situation happens in
bug #139342
. If nobody objects I'll apply the inverse logic and land these patches next Monday, so Anders can roll them out if he disagrees. I don't see any other option to unblock these bugs.
Anders Carlsson
Comment 19
2016-04-15 09:36:29 PDT
OK.
Carlos Garcia Campos
Comment 20
2016-04-18 01:50:16 PDT
Committed
r199660
: <
http://trac.webkit.org/changeset/199660
>
WebKit Commit Bot
Comment 21
2016-04-18 02:45:32 PDT
Re-opened since this is blocked by
bug 156691
Carlos Garcia Campos
Comment 22
2016-04-18 02:55:34 PDT
Created
attachment 276628
[details]
Try to fix iOS build I think the only problem was a missing #if WK_HAVE_C_SPI in the test
Carlos Garcia Campos
Comment 23
2016-04-18 03:01:42 PDT
Committed
r199663
: <
http://trac.webkit.org/changeset/199663
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug