8000 Move frameset-ok test to un-specced tests. · t-web/html5lib-php@ceac41b · GitHub
[go: up one dir, main page]

Skip to content

Commit ceac41b

Browse files
author
Edward Z. Yang ext:(%22)
committed
Move frameset-ok test to un-specced tests.
1 parent 61b2f7c commit ceac41b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

library/HTML5/TreeBuilder.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,13 @@ class HTML5_TreeBuilder {
100100
private function strConst($number) {
101101
static $lookup;
102102
if (!$lookup) {
103+
$lookup = array();
103104
$r = new ReflectionClass('HTML5_TreeBuilder');
104-
$lookup = array_flip($r->getConstants());
105+
$consts = $r->getConstants();
106+
foreach ($consts as $const => $num) {
107+
if (!is_int($num)) continue;
108+
$lookup[$num] = $const;
109+
}
105110
}
106111
return $lookup[$number];
107112
}
@@ -154,6 +159,7 @@ public function emitToken($token, $mode = null) {
154159
$this->printStack();
155160
$this->printActiveFormattingElements();
156161
if ($this->foster_parent) echo " -> this is a foster parent mode\n";
162+
if ($this->flag_frameset_ok) echo " -> frameset ok\n";
157163
*/
158164

159165
if ($this->ignore_lf_token) $this->ignore_lf_token--;

0 commit comments

Comments
 (0)
0