Skip to content

New rendering pipeline #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 5, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
accessing
cssPrefixMap
^ cssPrefixMap ifNil: [
Dictionary newFrom: {
cssPrefixMap := Dictionary newFrom: {
'font' -> CSSFontFormatter new.
'color' -> CSSColorFormatter new
}]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
},
"instance" : {
"cssPrefixMap" : "pf 5/25/2014 13:57",
"cssPrefixMap" : "rs 5/30/2014 16:12:55.942",
"decreaseFontBy:" : "bolot 5/18/2000 11:55",
"endFont:" : "bolot 5/18/2000 11:23",
"endHeader:" : "rs 5/18/2014 14:16:30.63",
Expand Down
4 changes: 4 additions & 0 deletions packages/HTML.package/FormInputSet.class/class/forForm..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
instance creation
forForm: form
"create a FormData for the given form"
^self new form: form

This file was deleted.

8 changes: 8 additions & 0 deletions packages/HTML.package/FormInputSet.class/instance/browser.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
accessing
browser
"get the browser object TextURL-style"
htmlMorph ifNotNil: [ :m |
[ m ~= nil ] whileTrue: [
(m hasProperty: #webBrowserView) ifTrue: [ ^ m model ].
m := m owner ]].
^ nil
3 changes: 3 additions & 0 deletions packages/HTML.package/FormInputSet.class/instance/form..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
form: aForm
form := aForm

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
initialize-release
initialize
super initialize.
inputs := OrderedCollection new.
3 changes: 3 additions & 0 deletions packages/HTML.package/FormInputSet.class/instance/morph..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
morph: aHtmlMorph
htmlMorph := aHtmlMorph
14 changes: 0 additions & 14 deletions packages/HTML.package/FormInputSet.class/instance/submit.st

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ submitAsync
(inputValues includesKey: input name) ifFalse: [
inputValues at: input name put: (OrderedCollection new: 1) ].
(inputValues at: input name) add: input value ] ].
^ browser submitFormWithInputsAsync: inputValues url: form url
^ self browser submitFormWithInputsAsync: inputValues url: form url
method: form method encoding: form encoding
10 changes: 6 additions & 4 deletions packages/HTML.package/FormInputSet.class/methodProperties.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"class" : {
"forForm:andBrowser:" : "ls 7/16/1998 22:01" },
"forForm:" : "rs 5/30/2014 15:25:00.848" },
"instance" : {
"addInput:" : "ls 8/5/1998 03:57",
"form:browser:" : "LaurentLaffont 2/26/2010 23:13",
"browser" : "rs 5/30/2014 15:22:38.872",
"form:" : "rs 5/30/2014 15:25:36.328",
"initialize" : "rs 5/30/2014 15:25:47.98",
"inputs" : "ls 8/11/1998 03:30",
"morph:" : "rs 5/30/2014 15:26:08.476",
"reset" : "ls 8/5/1998 03:58",
"submit" : "rs 5/19/2014 22:54:44.798",
"submitAsync" : "rs 5/19/2014 22:54:35.618" } }
"submitAsync" : "rs 5/30/2014 15:41:41.972" } }
3 changes: 2 additions & 1 deletion packages/HTML.package/FormInputSet.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"instvars" : [
"inputs",
"browser",
"form" ],
"form",
"htmlMorph" ],
"name" : "FormInputSet",
"pools" : [
],
Expand Down
3 changes: 3 additions & 0 deletions packages/HTML.package/HtmlDIVNode.class/instance/isInline.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
isInline
^ false
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"class" : {
},
"instance" : {
"isInline" : "rs 5/28/2014 12:28:24.18",
"tag" : "" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
as yet unclassified
addToHtmlMorph: aHtmlBlockMorph
| inlineNodes |

inlineNodes := OrderedCollection new.
htmlMorph := HtmlBlockMorph newFor: self.

self children do: [ :child | child isInline
ifTrue: [ inlineNodes add: child ]
ifFalse: [ self flushInlineNodes: inlineNodes to: htmlMorph;
flushBlockNode: child to: htmlMorph]
].
self flushInlineNodes: inlineNodes to: htmlMorph.

aHtmlBlockMorph addChild: htmlMorph.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
associatedForm
^ associatedForm ifNil: [ associatedForm := self parent associatedForm ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
flushBlockNode: blockNode to: aHtmlMorph
blockNode addToHtmlMorph: aHtmlMorph.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
as yet unclassified
flushInlineNodes: inlineNodes to: aHtmlBlockMorph
| formatter htmlInlineMorph |
inlineNodes ifNotEmpty: [
formatter := HtmlFormatter preferredFormatterClass new.
inlineNodes do: [ :node | node addToFormatter: formatter ].
htmlInlineMorph := formatter htmlInlineMorph.
htmlInlineMorph text ifNotEmpty: [
htmlInlineMorph nodes: inlineNodes.
aHtmlBlockMorph addChild: htmlInlineMorph ] ]
4 changes: 4 additions & 0 deletions packages/HTML.package/HtmlDOMNode.class/instance/isInline.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
isInline
^ isInline ifNil: [ isInline := self children ifEmpty: [ true ]
ifNotEmpty: [ self children allSatisfy: [ :child | child isInline ]]]
5 changes: 5 additions & 0 deletions packages/HTML.package/HtmlDOMNode.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"instance" : {
"addStyle:" : "j.c 6/14/2007 12:24",
"addToFormatter:" : "rs 5/18/2014 15:33:20.542",
"addToHtmlMorph:" : "rs 5/28/2014 12:40:28.418",
"associatedForm" : "rs 5/29/2014 23:10:34.728",
"attributes" : "tb 11/30/2005 12:26",
"attributes:" : "tb 7/12/2007 11:04",
"childDTDTags" : "tb 12/1/2005 09:11",
Expand All @@ -21,6 +23,8 @@
"endStyles:" : "rs 5/18/2014 15:33:59.432",
"endTagMissing" : "tb 12/5/2005 12:02",
"endTagMissing:" : "sebastian.sastre 9/20/2010 11:53",
"flushBlockNode:to:" : "SN 5/25/2014 15:38",
"flushInlineNodes:to:" : "rs 5/29/2014 22:59:26.474",
"hasTrailingSlash" : "tb 1/3/2006 17:29",
"hasTrailingSlash:" : "sebastian.sastre 9/20/2010 11:53",
"id" : "tb 7/12/2007 11:07",
Expand All @@ -30,6 +34,7 @@
"isDocument" : "tb 12/2/2005 12:26",
"isImplied" : "tb 11/30/2005 12:21",
"isImplied:" : "tb 11/30/2005 12:21",
"isInline" : "rs 5/28/2014 13:02:59.494",
"isSelfContained" : "tb 12/2/2005 09:34",
"isStyleSheet" : "tb 12/17/2005 22:26",
"loader" : "tb 1/8/2006 10:03",
Expand Down
5 changes: 4 additions & 1 deletion packages/HTML.package/HtmlDOMNode.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"endTagMissing",
"styles",
"id",
"classes" ],
"classes",
"htmlMorph",
"isInline",
"associatedForm" ],
"name" : "HtmlDOMNode",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
associatedForm
^ nil
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"instance" : {
"allStyles" : "tb 12/30/2005 20:49",
"applyStyles" : "tb 7/12/2007 12:55",
"associatedForm" : "rs 5/29/2014 23:11:28.394",
"content" : "tb 12/2/2005 20:38",
"content:" : "PK 10/18/2010 22:31",
"createImpliedNodes" : "tb 12/1/2005 00:24",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
addToHtmlMorph: aHtmlBlockMorph
super addToHtmlMorph: aHtmlBlockMorph.

associatedForm morph: htmlMorph.
associatedForm reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
associatedForm
^ associatedForm

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
initialize
super initialize.
associatedForm := FormInputSet forForm: self
3 changes: 3 additions & 0 deletions packages/HTML.package/HtmlFORMNode.class/instance/isInline.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
isInline
^ false

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"class" : {
},
"instance" : {
"addToHtmlMorph:" : "rs 5/30/2014 16:30:08.608",
"associatedForm" : "rs 5/29/2014 23:11:52.896",
"encoding" : "pf 5/18/2014 14:31",
"endStyles:" : "rs 5/18/2014 15:24:37.044",
"initialize" : "rs 5/30/2014 15:24:27.908",
"isInline" : "rs 5/30/2014 16:03:29.766",
"method" : "pf 5/18/2014 14:31",
"startStyles:" : "rs 5/18/2014 15:24:15.682",
"tag" : "",
"url" : "pf 5/18/2014 14:30" } }

This file was deleted.

6 changes: 0 additions & 6 deletions packages/HTML.package/HtmlFormatter.class/instance/endForm.st

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
formatting
htmlInlineMorph
| text htmlInlineMorph |
text := outputStream contents.
htmlInlineMorph := HtmlInlineMorph new contents: text.
morphsToEmbed do:[ :m | htmlInlineMorph addMorph: m ].
htmlInlineMorph incompleteMorphs: self incompleteMorphs.
^htmlInlineMorph
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ initialize
indentLevel := boldLevel := italicsLevel := underlineLevel := strikeLevel := centerLevel := 0.
listLengths := OrderedCollection new.
listTypes := OrderedCollection new.
formDatas := OrderedCollection new.
precedingSpaces := 0.
precedingNewlines := 1000. "more than will ever be asked for"
morphsToEmbed := OrderedCollection new.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
"baseUrl:" : "LaurentLaffont 2/26/2010 23:13",
"browser" : "ls 7/16/1998 22:07",
"browser:" : "LaurentLaffont 2/26/2010 23:13",
"currentFormData" : "ls 7/16/1998 22:07",
"decreaseBold" : "LaurentLaffont 2/26/2010 23:13",
"decreaseIndent" : "LaurentLaffont 2/26/2010 23:13",
"decreaseItalics" : "LaurentLaffont 2/26/2010 23:13",
"decreasePreformatted" : "LaurentLaffont 2/26/2010 23:13",
"decreaseStrike" : "LaurentLaffont 2/26/2010 23:13",
"decreaseUnderline" : "LaurentLaffont 2/26/2010 23:13",
"endForm" : "bolot 8/29/1999 18:40",
"endHeader:" : "bolot 5/18/2000 12:02",
"endLink:" : "LaurentLaffont 2/26/2010 23:13",
"endListItem" : "ls 8/20/1998 11:34",
Expand All @@ -32,6 +30,7 @@
"ensureNewlines:" : "ls 6/25/1998 17:21",
"ensureSpaces:" : "ls 8/16/1998 11:34",
"hr" : "LaurentLaffont 2/26/2010 23:13",
"htmlInlineMorph" : "SN 5/25/2014 15:34",
"imageMapNamed:" : "bolot 11/4/1999 00:37",
"incompleteMorphs" : "ls 9/5/1998 18:08",
"increaseBold" : "LaurentLaffont 2/26/2010 23:13",
Expand All @@ -40,10 +39,9 @@
"increasePreformatted" : "LaurentLaffont 2/26/2010 23:13",
"increaseStrike" : "LaurentLaffont 2/26/2010 23:13",
"increaseUnderline" : "LaurentLaffont 2/26/2010 23:13",
"initialize" : "LaurentLaffont 5/31/2010 21:10",
"initialize" : "rs 5/30/2014 15:30:30.404",
"noteAnchorStart:" : "ls 9/10/1998 03:26",
"setAttributes" : "LaurentLaffont 2/26/2010 23:13",
"startForm:" : "bolot 8/29/1999 18:40",
"startHeader:" : "bolot 5/18/2000 12:02",
"startLink:" : "LaurentLaffont 2/26/2010 23:13",
"startListItem" : "bf 11/4/1999 22:23",
Expand Down
1 change: 0 additions & 1 deletion packages/HTML.package/HtmlFormatter.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"instvars" : [
"browser",
"baseUrl",
"formDatas",
"outputStream",
"preformattedLevel",
"indentLevel",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ addToFormatter: formatter
| morph url |
self src isNil ifTrue: [ ^self ].
url := self src.
formatter baseUrl ifNotNil: [
url := url asUrlRelativeTo: formatter baseUrl asUrl].


url := url asUrlRelativeTo: self document url asUrl.
morph := DownloadingImageMorph new.
morph defaultExtent: self imageExtent.
morph altText: self alt.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
},
"instance" : {
"addToFormatter:" : "pf 5/18/2014 13:53",
"addToFormatter:" : "SN 5/25/2014 15:55",
"alt" : "pf 5/18/2014 13:54",
"imageExtent" : "pf 5/18/2014 13:52",
"src" : "pf 5/18/2014 13:53",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ addCheckBoxButtonToFormatter: formatter
value := self attributes at: 'value' ifAbsent: [nil].
value ifNil: [ ^value ].

formData := formatter currentFormData.
formData := self associatedForm.
formData ifNil: [ ^self ].

checked := (self attributes at: 'checked' ifAbsent: [nil]) isNil not.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ addFileInputToFormatter: formatter
formatter addMorph: inputMorph;
addMorph: ((PluggableButtonMorph on: fileInput getState: nil action: #browse)
label: 'Browse').
formatter currentFormData addInput: fileInput
self associatedForm addInput: fileInput
Loading