add tests to MANIFEST and Makefile.PL.  also, require upcoming HTML::Query version we are about to release.

git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2748 49aadcc1-c794-da11-82e1-00902723a867
Contribution from Michael Peters (wonko) from CPAN RT.

Add support for specificity calculation. I looked up a number of different implementations for this that were available on other libraries - this seemed to be equally if not more complete, and shorter.

Including his test verbatim, including his patch but altering it slightly to comply with existing conventions within the lib.

Original contribution here:
https://rt.cpan.org/Public/Bug/Display.html?id=59064



git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2768 49aadcc1-c794-da11-82e1-00902723a867
Contribution from Michael Peters (wonko) from CPAN RT.

The same thread from CPAN that included the specificity patch also included support for applying the cascade, along with a test.

I've merged that code into the current form of the tree. There have been many changes so the patch could not be applied directly.

I've removed references to refaddr and instead used the address method for HTML::Element which basically provides the same type of idea of uniquely identifying an element, but via a scalar.

We probably want to refactor this a little bit, but I've added the tests that came along with the patch and it works as described.

I've additionally added an acid test from HTML::Query to test out the inlinification. At this point I realized we have a broken grandfather operator in that library as well as a broken universal selector.

Additionally there is a precendence order bug within the included patch as revealed by the acid test. We'll work on fixing those up text.


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2770 49aadcc1-c794-da11-82e1-00902723a867
rework the hierarchy of the module. I like the lib layout better.

updated MANIFEST with new tests


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2773 49aadcc1-c794-da11-82e1-00902723a867
add url parsing fix contributed by "david@ytfc.com" - email sent out to him for full name to be added to contributors list.

Original patch submitted on CPAN RT here:
https://rt.cpan.org/Public/Bug/Display.html?id=61720

Included a test which confirmed the problem.

Additionally tests have been updated a bit, as well as the addition of the acidtest here to make sure the Inliner is working end to end on a complex set of styles


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2782 49aadcc1-c794-da11-82e1-00902723a867
adjust tests, the cascade test needed to be more specific to se the problem


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2795 49aadcc1-c794-da11-82e1-00902723a867
correct this test, there were errors in some of the calculated values

additionally add some new selectors


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2805 49aadcc1-c794-da11-82e1-00902723a867
correct the acidtest_result

this file is partially generated by a previous generation of the tool. I then went in and fixed the tags that visually looked to be incorrect.

There is a chance it is still no good...


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2806 49aadcc1-c794-da11-82e1-00902723a867
updated the specificity calculation method - reuses the same technique from HTML::Query

switched over to CSS::Simple, and adjusted the interface to match. CSS::Simple preserves ordering over CSS::Tiny, as well as provides interface changes that I needed.

reindented the file to be more readable


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2807 49aadcc1-c794-da11-82e1-00902723a867
add code to fetch remote html documents using LWP

add code to absolutize remotely fetched documents

add code to automatically fetch LINK stylesheets and place them inline into the document - currently we only allow one <style> tag, otherwise we die...

add code to absolutize the fetched stylesheet for url() declarations


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2812 49aadcc1-c794-da11-82e1-00902723a867
add perl script to test out functionality - useful for validating behaviour


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2813 49aadcc1-c794-da11-82e1-00902723a867
fix up warnings we were getting


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2814 49aadcc1-c794-da11-82e1-00902723a867
Vick's fixes for absolutizing the links within the stylesheet


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2815 49aadcc1-c794-da11-82e1-00902723a867
add new rules for testing out specificity counts for the html tagh


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2817 49aadcc1-c794-da11-82e1-00902723a867
correct error in earlier version of acidtest results


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2820 49aadcc1-c794-da11-82e1-00902723a867
recurse from root of the tree when collapsing styles

rework some recursive calls to be just functions. If we use the $tree->look_down method we can specifically query for very specific elements such as link or style blocks, cleaner than the recurse calls we had earlier that did the same type of work



git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2821 49aadcc1-c794-da11-82e1-00902723a867
replace some code with the _split method which already did that type of work

clean up some queries, some other misc. work


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2824 49aadcc1-c794-da11-82e1-00902723a867
fix up tests that were tagged improperly


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2825 49aadcc1-c794-da11-82e1-00902723a867
accept multiple stylesheets, it seems to "just work" due to the way that we store our selectors. Probably needs more testing.

widen the types of documents we select, currently mimicking the way firefox works. If you are link you must include rel=stylesheet

if you are style you do not need any attributes to be recognized correctly. Seems there are lots of folks out there who haven't
been caring about the best practices for these.

update the library to use the new HTML::Query calling methods


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2852 49aadcc1-c794-da11-82e1-00902723a867
add file to manifest


git-svn-id: http://repo/sysadmin/perlmodules/CSS-Inliner@2858 49aadcc1-c794-da11-82e1-00902723a867