Bug 77307 - [chromium] Have WebFrameImpl::selectionAsMarkup create interchange markup.
Summary: [chromium] Have WebFrameImpl::selectionAsMarkup create interchange markup.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-29 17:05 PST by Peter Collingbourne
Modified: 2012-02-24 10:51 PST (History)
6 users (show)

See Also:


Attachments
Patch (1.32 KB, patch)
2012-01-29 17:09 PST, Peter Collingbourne
no flags Details | Formatted Diff | Diff
Patch (1.71 KB, patch)
2012-02-11 19:35 PST, Peter Collingbourne
no flags Details | Formatted Diff | Diff
Patch (5.41 KB, patch)
2012-02-17 10:26 PST, Peter Collingbourne
no flags Details | Formatted Diff | Diff
Patch (5.79 KB, patch)
2012-02-17 14:11 PST, Peter Collingbourne
no flags Details | Formatted Diff | Diff
Patch (6.21 KB, patch)
2012-02-21 19:32 PST, Peter Collingbourne
no flags Details | Formatted Diff | Diff
Patch (6.32 KB, patch)
2012-02-23 17:36 PST, Peter Collingbourne
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Collingbourne 2012-01-29 17:05:57 PST
[chromium] Have WebFrameImpl::selectionAsMarkup create interchange markup.
Comment 1 Peter Collingbourne 2012-01-29 17:09:41 PST
Created attachment 124476 [details]
Patch
Comment 2 Daniel Cheng 2012-02-08 17:18:25 PST
Comment on attachment 124476 [details]
Patch

Can you please add the "why" of this change to the ChangeLog? From this patch alone, it's not clear what you're trying to do--for example, why do we need to use AnnotateForInterchange now?
Comment 3 Peter Collingbourne 2012-02-11 19:35:37 PST
Created attachment 126666 [details]
Patch
Comment 4 Nico Weber 2012-02-14 17:47:20 PST
Tony, can you look at this?
Comment 5 Nico Weber 2012-02-14 17:47:27 PST
(the patch, that is)
Comment 6 Tony Chang 2012-02-15 09:48:17 PST
Comment on attachment 126666 [details]
Patch

This change should have a layout test associated with it.  Since WebFrame::selectionAsMarkup is part of the WebKit API, you can just call it directly from layoutTestController. The test would be chromium specific since it's the only port that has this function.
Comment 7 Peter Collingbourne 2012-02-17 10:26:16 PST
Created attachment 127606 [details]
Patch
Comment 8 WebKit Review Bot 2012-02-17 14:01:10 PST
Comment on attachment 127606 [details]
Patch

Attachment 127606 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11542469
Comment 9 Peter Collingbourne 2012-02-17 14:11:18 PST
Created attachment 127656 [details]
Patch
Comment 10 Tony Chang 2012-02-21 11:02:46 PST
Comment on attachment 127656 [details]
Patch

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

> LayoutTests/http/tests/misc/resources/chromium-selectionAsMarkup.html:20
> + 	    sel.indexOf("resources/chromium-selectionAsMarkup.html") != -1)
> +		document.body.innerHTML = "PASS";

This indenting is weird.  && is also supposed to go on a new line to make it easier to see what is part of the condition and what is the if body.  You could also just unwrap the if condition.

Also, it would be nice to make each of these checks separate so if one of them starts failing, it's easier to tell from the test output.

> LayoutTests/platform/chromium/http/tests/misc/selectionAsMarkup.html:3
> +layoutTestController.dumpAsText();
> +layoutTestController.waitUntilDone();

We normally wrap layoutTestController call with a if (window.layoutTestController).

> LayoutTests/platform/chromium/http/tests/misc/selectionAsMarkup.html:6
> +document.location.href = "http://localhost:8080/misc/resources/chromium-selectionAsMarkup.html";
> +</script>

I would add some text that says what this test is testing. E.g., "This test makes sure that the markup used by print selection contains absolute urls and pushed down styles. This test depends on layoutTestController."
Comment 11 Tony Chang 2012-02-21 11:03:24 PST
This code and test is fine overall, just some style nits.  Sorry for the slowness in reviewing.
Comment 12 Peter Collingbourne 2012-02-21 19:32:07 PST
Created attachment 128112 [details]
Patch
Comment 13 Tony Chang 2012-02-22 10:18:11 PST
Comment on attachment 128112 [details]
Patch

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

> LayoutTests/platform/chromium/http/tests/misc/selectionAsMarkup.html:11
> +This test makes sure that the markup used by print selection
> +contains absolute urls and pushed down styles. This test depends
> +on layoutTestController.

Sorry, it occurs to me that this text will not be visible because of the redirect.  I had meant for the text to be visible when loading the test in a browser (maybe by moving this text to the html file we redirect to).
Comment 14 Tony Chang 2012-02-22 10:18:59 PST
Comment on attachment 128112 [details]
Patch

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

> LayoutTests/http/tests/misc/resources/chromium-selectionAsMarkup.html:21
> +	if (sel.indexOf("not selection") != -1)
> +		errors += "FAIL: non-selection text found\n";

Are these tabs?  Please use 4 space indents.
Comment 15 Peter Collingbourne 2012-02-23 17:36:12 PST
Created attachment 128618 [details]
Patch
Comment 16 WebKit Review Bot 2012-02-24 10:51:27 PST
Comment on attachment 128618 [details]
Patch

Clearing flags on attachment: 128618

Committed r108821: <http://trac.webkit.org/changeset/108821>
Comment 17 WebKit Review Bot 2012-02-24 10:51:33 PST
All reviewed patches have been landed.  Closing bug.