Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 60... Línea 60...
60
            and ((@style) or (name() = "strong") or (name() = "em"))]');
60
            and ((@style) or (name() = "strong") or (name() = "em"))]');
Línea 61... Línea 61...
61
 
61
 
62
        foreach ($entries as $element) {
62
        foreach ($entries as $element) {
Línea 63... Línea 63...
63
            $style = $this->css->get_style($element);
63
            $style = $this->css->get_style($element);
64
 
64
 
-
 
65
            if (isset($style['background-color']) || isset($style['color']) || isset($style['background'])) {
-
 
66
                if (!isset($style['background-color'])) {
-
 
67
                    if (isset($style['background'])) {
-
 
68
                        // Parsing background-color from CSS background shortcut string.
-
 
69
                        $style['background-color'] = '#' . $this->convert_color($style['background']);
-
 
70
                        // If value is empty after hash, then use defaultbackground.
-
 
71
                        if ($style['background-color'] == '#') {
-
 
72
                            $style['background-color'] = $this->defaultbackground;
65
            if (isset($style['background-color']) || isset($style['color'])) {
73
                        }
-
 
74
                    } else {
66
                if (!isset($style['background-color'])) {
75
                        $style['background-color'] = $this->defaultbackground;
Línea 67... Línea 76...
67
                    $style['background-color'] = $this->defaultbackground;
76
                    }
68
                }
77
                }
69
 
78
 
Línea 80... Línea 89...
80
                    }
89
                    }
Línea 81... Línea 90...
81
 
90
 
82
                    $style['color'] = '#' . $this->convert_color($style['color']);
91
                    $style['color'] = '#' . $this->convert_color($style['color']);
Línea 83... Línea -...
83
                    $style['background-color'] = '#' . $this->convert_color($background);
-
 
84
 
-
 
85
                    if (substr($background, 0, 3) == "rgb") {
-
 
86
                        $background = '#' . $this->convert_color($background);
-
 
87
                    }
92
                    $style['background-color'] = '#' . $this->convert_color($background);
88
 
93
 
89
                    $luminosity = $this->get_luminosity($style['color'], $background);
94
                    $luminosity = $this->get_luminosity($style['color'], $style['background-color']);
90
                    $fontsize = 0;
95
                    $fontsize = 0;
Línea 91... Línea 96...
91
                    $bold = false;
96
                    $bold = false;