Skip to content

Commit 982673f

Browse files
committed
Merge pull request #89 from SWTI2014/rendering/new-rendering-pipeline
Close #75: New rendering pipeline
2 parents a541aa0 + ecac7f8 commit 982673f

File tree

124 files changed

+414
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+414
-200
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
accessing
22
cssPrefixMap
33
^ cssPrefixMap ifNil: [
4-
Dictionary newFrom: {
4+
cssPrefixMap := Dictionary newFrom: {
55
'font' -> CSSFontFormatter new.
66
'color' -> CSSColorFormatter new
77
}]

packages/HTML.package/DHtmlFormatter.class/methodProperties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"class" : {
33
},
44
"instance" : {
5-
"cssPrefixMap" : "pf 5/25/2014 13:57",
5+
"cssPrefixMap" : "rs 5/30/2014 16:12:55.942",
66
"decreaseFontBy:" : "bolot 5/18/2000 11:55",
77
"endFont:" : "bolot 5/18/2000 11:23",
88
"endHeader:" : "rs 5/18/2014 14:16:30.63",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
instance creation
2+
forForm: form
3+
"create a FormData for the given form"
4+
^self new form: form

packages/HTML.package/FormInputSet.class/class/forForm.andBrowser..st

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
accessing
2+
browser
3+
"get the browser object TextURL-style"
4+
htmlMorph ifNotNil: [ :m |
5+
[ m ~= nil ] whileTrue: [
6+
(m hasProperty: #webBrowserView) ifTrue: [ ^ m model ].
7+
m := m owner ]].
8+
^ nil
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
accessing
2+
form: aForm
3+
form := aForm

packages/HTML.package/FormInputSet.class/instance/form.browser..st

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
initialize-release
2+
initialize
3+
super initialize.
4+
inputs := OrderedCollection new.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
accessing
2+
morph: aHtmlMorph
3+
htmlMorph := aHtmlMorph

packages/HTML.package/FormInputSet.class/instance/submit.st

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/HTML.package/FormInputSet.class/instance/submitAsync.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ submitAsync
99
(inputValues includesKey: input name) ifFalse: [
1010
inputValues at: input name put: (OrderedCollection new: 1) ].
1111
(inputValues at: input name) add: input value ] ].
12-
^ browser submitFormWithInputsAsync: inputValues url: form url
12+
^ self browser submitFormWithInputsAsync: inputValues url: form url
1313
method: form method encoding: form encoding
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"class" : {
3-
"forForm:andBrowser:" : "ls 7/16/1998 22:01" },
3+
"forForm:" : "rs 5/30/2014 15:25:00.848" },
44
"instance" : {
55
"addInput:" : "ls 8/5/1998 03:57",
6-
"form:browser:" : "LaurentLaffont 2/26/2010 23:13",
6+
"browser" : "rs 5/30/2014 15:22:38.872",
7+
"form:" : "rs 5/30/2014 15:25:36.328",
8+
"initialize" : "rs 5/30/2014 15:25:47.98",
79
"inputs" : "ls 8/11/1998 03:30",
10+
"morph:" : "rs 5/30/2014 15:26:08.476",
811
"reset" : "ls 8/5/1998 03:58",
9-
"submit" : "rs 5/19/2014 22:54:44.798",
10-
"submitAsync" : "rs 5/19/2014 22:54:35.618" } }
12+
"submitAsync" : "rs 5/30/2014 15:41:41.972" } }

packages/HTML.package/FormInputSet.class/properties.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"instvars" : [
99
"inputs",
1010
"browser",
11-
"form" ],
11+
"form",
12+
"htmlMorph" ],
1213
"name" : "FormInputSet",
1314
"pools" : [
1415
],
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
as yet unclassified
2+
isInline
3+
^ false

packages/HTML.package/HtmlDIVNode.class/methodProperties.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
"class" : {
33
},
44
"instance" : {
5+
"isInline" : "rs 5/28/2014 12:28:24.18",
56
"tag" : "" } }
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
as yet unclassified
2+
addToHtmlMorph: aHtmlBlockMorph
3+
| inlineNodes |
4+
5+
inlineNodes := OrderedCollection new.
6+
htmlMorph := HtmlBlockMorph newFor: self.
7+
8+
self children do: [ :child | child isInline
9+
ifTrue: [ inlineNodes add: child ]
10+
ifFalse: [ self flushInlineNodes: inlineNodes to: htmlMorph;
11+
flushBlockNode: child to: htmlMorph]
12+
].
13+
self flushInlineNodes: inlineNodes to: htmlMorph.
14+
15+
aHtmlBlockMorph addChild: htmlMorph.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
accessing
2+
associatedForm
3+
^ associatedForm ifNil: [ associatedForm := self parent associatedForm ]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
as yet unclassified
2+
flushBlockNode: blockNode to: aHtmlMorph
3+
blockNode addToHtmlMorph: aHtmlMorph.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
as yet unclassified
2+
flushInlineNodes: inlineNodes to: aHtmlBlockMorph
3+
| formatter htmlInlineMorph |
4+
inlineNodes ifNotEmpty: [
5+
formatter := HtmlFormatter preferredFormatterClass new.
6+
inlineNodes do: [ :node | node addToFormatter: formatter ].
7+
htmlInlineMorph := formatter htmlInlineMorph.
8+
htmlInlineMorph text ifNotEmpty: [
9+
htmlInlineMorph nodes: inlineNodes.
10+
aHtmlBlockMorph addChild: htmlInlineMorph ] ]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
as yet unclassified
2+
isInline
3+
^ isInline ifNil: [ isInline := self children ifEmpty: [ true ]
4+
ifNotEmpty: [ self children allSatisfy: [ :child | child isInline ]]]

packages/HTML.package/HtmlDOMNode.class/methodProperties.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"instance" : {
77
"addStyle:" : "j.c 6/14/2007 12:24",
88
"addToFormatter:" : "rs 5/18/2014 15:33:20.542",
9+
"addToHtmlMorph:" : "rs 5/28/2014 12:40:28.418",
10+
"associatedForm" : "rs 5/29/2014 23:10:34.728",
911
"attributes" : "tb 11/30/2005 12:26",
1012
"attributes:" : "tb 7/12/2007 11:04",
1113
"childDTDTags" : "tb 12/1/2005 09:11",
@@ -21,6 +23,8 @@
2123
"endStyles:" : "rs 5/18/2014 15:33:59.432",
2224
"endTagMissing" : "tb 12/5/2005 12:02",
2325
"endTagMissing:" : "sebastian.sastre 9/20/2010 11:53",
26+
"flushBlockNode:to:" : "SN 5/25/2014 15:38",
27+
"flushInlineNodes:to:" : "rs 5/29/2014 22:59:26.474",
2428
"hasTrailingSlash" : "tb 1/3/2006 17:29",
2529
"hasTrailingSlash:" : "sebastian.sastre 9/20/2010 11:53",
2630
"id" : "tb 7/12/2007 11:07",
@@ -30,6 +34,7 @@
3034
"isDocument" : "tb 12/2/2005 12:26",
3135
"isImplied" : "tb 11/30/2005 12:21",
3236
"isImplied:" : "tb 11/30/2005 12:21",
37+
"isInline" : "rs 5/28/2014 13:02:59.494",
3338
"isSelfContained" : "tb 12/2/2005 09:34",
3439
"isStyleSheet" : "tb 12/17/2005 22:26",
3540
"loader" : "tb 1/8/2006 10:03",

packages/HTML.package/HtmlDOMNode.class/properties.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
"endTagMissing",
1616
"styles",
1717
"id",
18-
"classes" ],
18+
"classes",
19+
"htmlMorph",
20+
"isInline",
21+
"associatedForm" ],
1922
"name" : "HtmlDOMNode",
2023
"pools" : [
2124
],
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
accessing
2+
associatedForm
3+
^ nil

packages/HTML.package/HtmlDocument.class/methodProperties.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"instance" : {
55
"allStyles" : "tb 12/30/2005 20:49",
66
"applyStyles" : "tb 7/12/2007 12:55",
7+
"associatedForm" : "rs 5/29/2014 23:11:28.394",
78
"content" : "tb 12/2/2005 20:38",
89
"content:" : "PK 10/18/2010 22:31",
910
"createImpliedNodes" : "tb 12/1/2005 00:24",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
as yet unclassified
2+
addToHtmlMorph: aHtmlBlockMorph
3+
super addToHtmlMorph: aHtmlBlockMorph.
4+
5+
associatedForm morph: htmlMorph.
6+
associatedForm reset
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
accessing
2+
associatedForm
3+
^ associatedForm

packages/HTML.package/HtmlFORMNode.class/instance/endStyles..st

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
as yet unclassified
2+
initialize
3+
super initialize.
4+
associatedForm := FormInputSet forForm: self
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
as yet unclassified
2+
isInline
3+
^ false

packages/HTML.package/HtmlFORMNode.class/instance/startStyles..st

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/HTML.package/HtmlFORMNode.class/methodProperties.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"class" : {
33
},
44
"instance" : {
5+
"addToHtmlMorph:" : "rs 5/30/2014 16:30:08.608",
6+
"associatedForm" : "rs 5/29/2014 23:11:52.896",
57
"encoding" : "pf 5/18/2014 14:31",
6-
"endStyles:" : "rs 5/18/2014 15:24:37.044",
8+
"initialize" : "rs 5/30/2014 15:24:27.908",
9+
"isInline" : "rs 5/30/2014 16:03:29.766",
710
"method" : "pf 5/18/2014 14:31",
8-
"startStyles:" : "rs 5/18/2014 15:24:15.682",
911
"tag" : "",
1012
"url" : "pf 5/18/2014 14:30" } }

packages/HTML.package/HtmlFormatter.class/instance/currentFormData.st

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/HTML.package/HtmlFormatter.class/instance/endForm.st

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
formatting
2+
htmlInlineMorph
3+
| text htmlInlineMorph |
4+
text := outputStream contents.
5+
htmlInlineMorph := HtmlInlineMorph new contents: text.
6+
morphsToEmbed do:[ :m | htmlInlineMorph addMorph: m ].
7+
htmlInlineMorph incompleteMorphs: self incompleteMorphs.
8+
^htmlInlineMorph

packages/HTML.package/HtmlFormatter.class/instance/initialize.st

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ initialize
55
indentLevel := boldLevel := italicsLevel := underlineLevel := strikeLevel := centerLevel := 0.
66
listLengths := OrderedCollection new.
77
listTypes := OrderedCollection new.
8-
formDatas := OrderedCollection new.
98
precedingSpaces := 0.
109
precedingNewlines := 1000. "more than will ever be asked for"
1110
morphsToEmbed := OrderedCollection new.

packages/HTML.package/HtmlFormatter.class/instance/startForm..st

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/HTML.package/HtmlFormatter.class/methodProperties.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
"baseUrl:" : "LaurentLaffont 2/26/2010 23:13",
1717
"browser" : "ls 7/16/1998 22:07",
1818
"browser:" : "LaurentLaffont 2/26/2010 23:13",
19-
"currentFormData" : "ls 7/16/1998 22:07",
2019
"decreaseBold" : "LaurentLaffont 2/26/2010 23:13",
2120
"decreaseIndent" : "LaurentLaffont 2/26/2010 23:13",
2221
"decreaseItalics" : "LaurentLaffont 2/26/2010 23:13",
2322
"decreasePreformatted" : "LaurentLaffont 2/26/2010 23:13",
2423
"decreaseStrike" : "LaurentLaffont 2/26/2010 23:13",
2524
"decreaseUnderline" : "LaurentLaffont 2/26/2010 23:13",
26-
"endForm" : "bolot 8/29/1999 18:40",
2725
"endHeader:" : "bolot 5/18/2000 12:02",
2826
"endLink:" : "LaurentLaffont 2/26/2010 23:13",
2927
"endListItem" : "ls 8/20/1998 11:34",
@@ -32,6 +30,7 @@
3230
"ensureNewlines:" : "ls 6/25/1998 17:21",
3331
"ensureSpaces:" : "ls 8/16/1998 11:34",
3432
"hr" : "LaurentLaffont 2/26/2010 23:13",
33+
"htmlInlineMorph" : "SN 5/25/2014 15:34",
3534
"imageMapNamed:" : "bolot 11/4/1999 00:37",
3635
"incompleteMorphs" : "ls 9/5/1998 18:08",
3736
"increaseBold" : "LaurentLaffont 2/26/2010 23:13",
@@ -40,10 +39,9 @@
4039
"increasePreformatted" : "LaurentLaffont 2/26/2010 23:13",
4140
"increaseStrike" : "LaurentLaffont 2/26/2010 23:13",
4241
"increaseUnderline" : "LaurentLaffont 2/26/2010 23:13",
43-
"initialize" : "LaurentLaffont 5/31/2010 21:10",
42+
"initialize" : "rs 5/30/2014 15:30:30.404",
4443
"noteAnchorStart:" : "ls 9/10/1998 03:26",
4544
"setAttributes" : "LaurentLaffont 2/26/2010 23:13",
46-
"startForm:" : "bolot 8/29/1999 18:40",
4745
"startHeader:" : "bolot 5/18/2000 12:02",
4846
"startLink:" : "LaurentLaffont 2/26/2010 23:13",
4947
"startListItem" : "bf 11/4/1999 22:23",

packages/HTML.package/HtmlFormatter.class/properties.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"instvars" : [
1010
"browser",
1111
"baseUrl",
12-
"formDatas",
1312
"outputStream",
1413
"preformattedLevel",
1514
"indentLevel",

packages/HTML.package/HtmlIMGNode.class/instance/addToFormatter..st

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ addToFormatter: formatter
33
| morph url |
44
self src isNil ifTrue: [ ^self ].
55
url := self src.
6-
formatter baseUrl ifNotNil: [
7-
url := url asUrlRelativeTo: formatter baseUrl asUrl].
8-
9-
6+
url := url asUrlRelativeTo: self document url asUrl.
107
morph := DownloadingImageMorph new.
118
morph defaultExtent: self imageExtent.
129
morph altText: self alt.

packages/HTML.package/HtmlIMGNode.class/methodProperties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"class" : {
33
},
44
"instance" : {
5-
"addToFormatter:" : "pf 5/18/2014 13:53",
5+
"addToFormatter:" : "SN 5/25/2014 15:55",
66
"alt" : "pf 5/18/2014 13:54",
77
"imageExtent" : "pf 5/18/2014 13:52",
88
"src" : "pf 5/18/2014 13:53",

packages/HTML.package/HtmlINPUTNode.class/instance/addCheckBoxButtonToFormatter..st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ addCheckBoxButtonToFormatter: formatter
88
value := self attributes at: 'value' ifAbsent: [nil].
99
value ifNil: [ ^value ].
1010

11-
formData := formatter currentFormData.
11+
formData := self associatedForm.
1212
formData ifNil: [ ^self ].
1313

1414
checked := (self attributes at: 'checked' ifAbsent: [nil]) isNil not.

packages/HTML.package/HtmlINPUTNode.class/instance/addFileInputToFormatter..st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ addFileInputToFormatter: formatter
99
formatter addMorph: inputMorph;
1010
addMorph: ((PluggableButtonMorph on: fileInput getState: nil action: #browse)
1111
label: 'Browse').
12-
formatter currentFormData addInput: fileInput
12+
self associatedForm addInput: fileInput

0 commit comments

Comments
 (0)