]> Cypherpunks repositories - gostls13.git/commit
html: adjust bookmark in "adoption agency" algorithm
authorAndrew Balholm <andybalholm@gmail.com>
Fri, 28 Oct 2011 23:51:59 +0000 (10:51 +1100)
committerNigel Tao <nigeltao@golang.org>
Fri, 28 Oct 2011 23:51:59 +0000 (10:51 +1100)
commit604e10c34d359f6522b076e488dccd7b075f4bc7
treefb890ab98ea2ad9c7d09ea6a2756df5932df00d8
parent03f163c7f22bfaab69a56d48160b0a184ce6bf54
html: adjust bookmark in "adoption agency" algorithm

In the adoption agency algorithm, the formatting element is sometimes
removed from the list of active formatting elements and reinserted at a later index.
In that case, the bookmark showing where it is to be reinserted needs to be moved,
so that its position relative to its neighbors remains the same
(and also so that it doesn't become out of bounds).

Pass tests1.dat, test 70:
<DIV> abc <B> def <I> ghi <P> jkl </B>

| <html>
|   <head>
|   <body>
|     <div>
|       " abc "
|       <b>
|         " def "
|         <i>
|           " ghi "
|       <i>
|         <p>
|           <b>
|             " jkl "

Also pass tests through test 76:
<test attribute---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->

R=nigeltao
CC=golang-dev
https://golang.org/cl/5322052
src/pkg/html/parse.go
src/pkg/html/parse_test.go