[Webkit-unassigned] [Bug 7562] Safari does not allow to access (copy) CSS generated content

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 13 15:04:02 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=7562


Nicholas Wilson <nicholas at nicholaswilson.me.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #53285|                            |review?
               Flag|                            |




--- Comment #6 from Nicholas Wilson <nicholas at nicholaswilson.me.uk>  2010-04-13 15:04:01 PST ---
Created an attachment (id=53285)
 --> (https://bugs.webkit.org/attachment.cgi?id=53285)
Demo of adding in quote marks

I am unconvinced generally that generated content should be copied. It is,
after all, presentational and not to do with the content. The semantic markup
ought to be enough to determine most of the plain text representation, though I
guess it makes sense to 'lynx-ify' it a bit. Indeed, with most generated
content it is intended that it not be copied: think of all the fancy ΒΆ
(pilcrow) signs after paragraphs, or 'content: "#" attr(id)' used on headings,
or line numbers on code. Those are presentational aspects only intended for the
rendered presentation (media: screen), not a plain text one.

On the other hand, q is a bit different, because the instruction to include
quotation marks is not just in the CSS presentational instruction, but is also
a genuine command embedded in the semantics of the element:

"Quotation punctuation (such as quotation marks) that is quoting the contents
of the element [that is, q] must not appear immediately before, after, or
inside elements; they *will be* inserted into the rendering by the user
agent."[HTML5]

I would suggest that "WebKit does not copy generated content" is not really
what the bug is about. What is missing is that the plain text representation a
Range should include quote marks around q elements.

The solution then ought not to involve treating some general case and
transforming data from the render tree to use for pasting. It is instead more
'correct' just to stick with pasting real DOM content, as we are already doing,
and add in a rule to appropriately insert quotation marks as UAs are
instructed.

The q tag is included in the html version put on the paste buffer, so other
applications picking it up from there should follow the same logic and apply
the quote marks themselves. Note however that popular applications do not do
that (OO.o for example applies a sort of default style when it transforms
pasted HTML into its own formatting, but that does not include quote marks
around q; not our bug really though).

In any case, it has taken longer for me to type this comment than type the
patch, which is a rough demonstration of how it would work, as I have not had
time to worked out all of the case TextIterator deals with. It is a basic five
line fix in the immediate term though.

The big blocker to doing this properly is bug 6503 which prevents this being
properly language dependent. Then the proper UA style can be applied (bug
3234).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list