[Webkit-unassigned] [Bug 10216] PDF created by printing should have live hyperlinks

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Fri Sep 22 23:26:46 PDT 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=10216





------- Comment #12 from hyatt at apple.com  2006-09-22 23:26 PDT -------
This will be cool functionality to have, and I'm glad you're working on this. 
This new patch is conceptually closer to outline and that's a good thing.

However, I still think this patch is way too intrusive in terms of how far it
has to sink its hooks into the RenderTree code.  I would like to see more code
sharing with outline focus rings.  

I think the patch could become a lot smaller in terms of painting intrusion if
we use CSS to your advantage.  CSS already has a way of asking if something is
a link and only applying a style if that is true.

So when printing only, there could be a style rule in html4.css like:

@media print {

:-webkit-any-link {
    ... add something cool here ...
}

}

Given that outline already collects rects and then paints the outline, if
outline itself were enhanced with an extension that indicated that all links
should have a special link-tagging annotation, then I think the resulting
intrusion into the RenderTree code becomes very minimal.

So for example, we could say something like:

-webkit-outline-annotation: link;

...and make that part of the outline property.  If that is present it would (a)
cause the element to think it needs to "paint" its outline and (b) At the time
the outline gets "painted", the URL of the link would also get tagged with the
outline rect.

You'd basically then be able to add the link tagging code to only two places:

(1) void RenderObject::paintOutline

and

(2) void RenderFlow::paintLines (at the end where the outlines are drawn)

...and avoid having to intrude into so many painting methods (and also avoid
having to have a hasLink method on RenderObject).

Beth can help you with adding a CSS property (this is not hard at all), since
she has done it many times.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list