Bug 105276 - [EFL][WK2] Writing immediately to created windows (open) fails
Summary: [EFL][WK2] Writing immediately to created windows (open) fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mikhail Pozdnyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 03:44 PST by Kenneth Rohde Christiansen
Modified: 2013-01-10 03:07 PST (History)
9 users (show)

See Also:


Attachments
patch (1.37 KB, patch)
2013-01-04 05:37 PST, Mikhail Pozdnyakov
kenneth: review+
Details | Formatted Diff | Diff
to be landed (1.74 KB, patch)
2013-01-09 04:32 PST, Mikhail Pozdnyakov
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Rohde Christiansen 2012-12-18 03:44:54 PST
On the other hand using setTimeout(..., 0) makes it work.

Output:

run-launcher --efl -2 -r 1 ManualTests/window-geometry.html 
Starting webkit launcher.
HTML5 local storage is enabled for this view.
did commit load for frame
efl informLoadCommitted
HTML5 local storage is enabled for this view.
minibrowser: location(0,0) size=(1,1) url=about:blank
did commit load for frame
efl informLoadCommitted
write! <style>body { margin: 0 }</style><body></body> <- printed at end of function
HTML5 local storage is enabled for this view.
minibrowser: location(0,0) size=(1,1) url=about:blank
did commit load for frame
efl informLoadCommitted
write! <style>body { margin: 0 }</style><body></body>
did commit load for frame
efl informLoadCommitted
did commit load for frame
efl informLoadCommitted

The following patch to the test makes the write work:

-    win = window.open("about:blank", "", "location=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no, left=0, top=0, width=1, height=1");
-    win.document.write("<style>body { margin: 0 }</style><body></body>");
-    win.document.getElementsByTagName('body')[0].innerHTML = div.outerHTML;
-    setWindowRect(win, div.getClientRects()[0], fromWindow);
+    var win = window.open("about:blank", "", "location=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no, left=0, top=0, width=1, height=1");
+
+    setTimeout(function() {
+        win.document.write("<style>body { margin: 0 }</style><body></body>");
+        win.document.getElementsByTagName('body')[0].innerHTML = div.outerHTML;
+        setWindowRect(win, div.getClientRects()[0], fromWindow);
+    }, 0);
Comment 1 Kenneth Rohde Christiansen 2012-12-18 03:59:05 PST
Just checked it does get fine into HTMLDocumentParser::insert
Comment 2 Mikhail Pozdnyakov 2013-01-04 05:37:15 PST
Created attachment 181293 [details]
patch
Comment 3 Kenneth Rohde Christiansen 2013-01-08 12:49:05 PST
Comment on attachment 181293 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=181293&action=review

> Tools/MiniBrowser/efl/main.c:1225
> -    if (url)
> +    if (url && strcmp(url, "about:blank"))

this needs a comment
Comment 4 Mikhail Pozdnyakov 2013-01-09 04:32:45 PST
Created attachment 181895 [details]
to be landed
Comment 5 WebKit Review Bot 2013-01-09 05:30:21 PST
Comment on attachment 181895 [details]
to be landed

Rejecting attachment 181895 [details] from commit-queue.

New failing tests:
inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
Full output: http://queues.webkit.org/results/15755555
Comment 6 Mikhail Pozdnyakov 2013-01-09 05:32:04 PST
(In reply to comment #5)
> (From update of attachment 181895 [details])
> Rejecting attachment 181895 [details] from commit-queue.
> 
> New failing tests:
> inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
> Full output: http://queues.webkit.org/results/15755555

Unrelated
Comment 7 WebKit Review Bot 2013-01-09 05:48:09 PST
Comment on attachment 181895 [details]
to be landed

Attachment 181895 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/15763511

New failing tests:
inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
Comment 8 Mikhail Pozdnyakov 2013-01-10 03:07:33 PST
Committed in r139303.