| 1 | package HTML::DOM::View; | ||||||||||
| 2 | |||||||||||
| 3 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 5 | ▶ | use Scalar::Util qw'weaken'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 5 | ▶ | use HTML::DOM::_FieldHash; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 5 | fieldhashes \my %doc; | |||||||||
| 10 | |||||||||||
| 11 | 5 | our $VERSION = '0.057'; | |||||||||
| 12 | |||||||||||
| 13 | # -------- DOM ATTRIBUTES -------- # | ||||||||||
| 14 | |||||||||||
| 15 | sub document { | ||||||||||
| 16 | 36 | ▶ | my $old = $doc{my $self = shift}; | ||||||||
|
Subroutine
document: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 17 | 36 | ▶ | $doc{$self} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | 36 | ▶ | defined $old ? $old :(); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | sub getComputedStyle { | ||||||||||
| 22 | 23 | ▶ | my($view, $elem, $pseudo) = @_; | ||||||||
|
Subroutine
getComputedStyle: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 23 | 23 | my($ua,$u) = map eval{$view->${\"u$_\_style_sheet"}}, 'a','ser'; | |||||||||
| 24 | 23 | my $doc = $view->document; | |||||||||
| 25 | |||||||||||
| 26 | 23 | require CSS::DOM; CSS::DOM->VERSION(.06); | |||||||||
| 27 | 23 | ▶ | return CSS::DOM'compute_style( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | #medium => ... | ||||||||||
| 29 | #height => $view->innerHeight; | ||||||||||
| 30 | #width => $view->innerWidth; | ||||||||||
| 31 | #ppi => ... | ||||||||||
| 32 | ua_sheet => $ua, | ||||||||||
| 33 | user_sheet => $u , | ||||||||||
| 34 | defined $doc ? | ||||||||||
| 35 | (author_sheets => scalar $doc->styleSheets ) : (), | ||||||||||
| 36 | element => $elem, | ||||||||||
| 37 | pseudo => $pseudo, | ||||||||||
| 38 | ); | ||||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | |||||||||||
| 42 | |||||||||||
| 43 | 5 | 1 | |||||||||
| 44 | |||||||||||
| 45 | __END__ | ||||||||||