diff --git a/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundAttribute.of.to..st b/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundAttribute.of.to..st
index df2f2d1f..a2818f78 100644
--- a/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundAttribute.of.to..st
+++ b/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundAttribute.of.to..st
@@ -16,11 +16,13 @@ readBackgroundAttribute: propertyValue of: aCSSProperty to: aContext
(self isValidRepeatValue: each)
ifTrue: [ self readBackgroundRepeatAttribute: each to: shorthandContext ]
ifFalse: [
- ((positionValues size < 2) and: [ each asInteger notNil ])
+ ((positionValues size < 2) and: [ each asInteger notNil ] and: [ each first ~= $#])
ifTrue: [ positionValues add: each ]
ifFalse: [
(index = 1)
ifTrue: [self readBackgroundColorAttribute: each to: shorthandContext ]]]]].
- positionValues size = 2 ifTrue: [ self readBackgroundPositionAttribute: positionValues first, ' ', positionValues second to: shorthandContext ].
+ positionValues size = 2 ifTrue: [
+ self readBackgroundPositionAttribute: positionValues first, ' ',
+ positionValues second to: shorthandContext ].
aContext addAll: shorthandContext
\ No newline at end of file
diff --git a/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundImageAttribute.of.to..st b/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundImageAttribute.of.to..st
index 243edfb0..bc6e176f 100644
--- a/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundImageAttribute.of.to..st
+++ b/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundImageAttribute.of.to..st
@@ -7,7 +7,9 @@ readBackgroundImageAttribute: propertyValue of: aCSSProperty to: aContext
openBracketPosition := propertyValue findString: '(' startingAt: 4.
closingBracketPosition := propertyValue findLastOccurrenceOfString: ')'
startingAt: openBracketPosition.
-
+
+ openBracketPosition < closingBracketPosition ifFalse: [ ^ self ].
+
urlString := (propertyValue copyFrom: openBracketPosition + 1 to: closingBracketPosition - 1)
trimBoth: [:char | char isSeparator or: [char = $"] or: [char = $']].
url := urlString.
diff --git a/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundPositionAttribute.to..st b/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundPositionAttribute.to..st
index fafcbf61..f24c82e1 100644
--- a/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundPositionAttribute.to..st
+++ b/packages/HTML.package/CSSBackgroundFormatter.class/instance/readBackgroundPositionAttribute.to..st
@@ -3,8 +3,8 @@ readBackgroundPositionAttribute: propertyValue to: aContext
| values position |
values := propertyValue splitOn: ' '.
position := 0@0.
- values first asNumber ifNotNil: [:xPos | position := position + ( xPos @ 0)].
- values size > 1 ifTrue: [
- values second asNumber ifNotNil: [:yPos | position := position + ( 0 @ yPos )]].
+ (self isNumber: values first) ifTrue: [position := position + ( values first asNumber @ 0)].
+ values size > 1 ifTrue: [
+ (self isNumber: values second) ifTrue: [position := position + ( 0 @ values second asNumber )]].
aContext at: #backgroundPosition put: position
\ No newline at end of file
diff --git a/packages/HTML.package/CSSBackgroundFormatter.class/methodProperties.json b/packages/HTML.package/CSSBackgroundFormatter.class/methodProperties.json
index 1a0bfa3f..6075cf0c 100644
--- a/packages/HTML.package/CSSBackgroundFormatter.class/methodProperties.json
+++ b/packages/HTML.package/CSSBackgroundFormatter.class/methodProperties.json
@@ -4,8 +4,8 @@
"instance" : {
"isValidRepeatValue:" : "rs 6/20/2014 18:44:10.982",
"parseTextAttributesFrom:into:" : "rs 6/20/2014 20:52:07.231",
- "readBackgroundAttribute:of:to:" : "rs 6/21/2014 10:28:51.341",
+ "readBackgroundAttribute:of:to:" : "rs 7/5/2014 10:16:48.535",
"readBackgroundColorAttribute:to:" : "rs 6/20/2014 18:33:38.685",
- "readBackgroundImageAttribute:of:to:" : "rs 6/21/2014 11:55:16.861",
- "readBackgroundPositionAttribute:to:" : "rs 6/20/2014 22:01:33.857",
+ "readBackgroundImageAttribute:of:to:" : "rs 7/5/2014 11:49:00.748",
+ "readBackgroundPositionAttribute:to:" : "rs 7/5/2014 10:31:31.526",
"readBackgroundRepeatAttribute:to:" : "rs 6/20/2014 18:48:01.003" } }
diff --git a/packages/HTML.package/CSSFormatter.class/instance/absoluteSizeToPx.defaultSize..st b/packages/HTML.package/CSSFormatter.class/instance/absoluteSizeToPx.defaultSize..st
index 641f94a1..04a857ec 100644
--- a/packages/HTML.package/CSSFormatter.class/instance/absoluteSizeToPx.defaultSize..st
+++ b/packages/HTML.package/CSSFormatter.class/instance/absoluteSizeToPx.defaultSize..st
@@ -2,7 +2,7 @@ size-conversion
absoluteSizeToPx: aString defaultSize: aNumber
| value |
aString ifNil: [^aNumber].
- value := aString asNumber.
+ value := (self isNumber: aString) ifTrue: [ aString asNumber] ifFalse: [nil].
value ifNil: [^aNumber].
(aString endsWith: 'cm') ifTrue: [ ^self inToPx: (self cmToIn: value) ].
diff --git a/packages/HTML.package/CSSFormatter.class/instance/isNumber..st b/packages/HTML.package/CSSFormatter.class/instance/isNumber..st
new file mode 100644
index 00000000..c22d8437
--- /dev/null
+++ b/packages/HTML.package/CSSFormatter.class/instance/isNumber..st
@@ -0,0 +1,10 @@
+size-conversion
+isNumber: aString
+
+ (aString size > 0 and: [aString first isDigit])
+ ifTrue: [ ^ true ].
+
+ (aString size > 1 and: [aString first = $-] and: [aString second isDigit])
+ ifTrue: [ ^ true ].
+
+ ^ false
\ No newline at end of file
diff --git a/packages/HTML.package/CSSFormatter.class/methodProperties.json b/packages/HTML.package/CSSFormatter.class/methodProperties.json
index a7a7ed62..3f882f5e 100644
--- a/packages/HTML.package/CSSFormatter.class/methodProperties.json
+++ b/packages/HTML.package/CSSFormatter.class/methodProperties.json
@@ -2,11 +2,12 @@
"class" : {
},
"instance" : {
- "absoluteSizeToPx:defaultSize:" : "SN 6/21/2014 13:15",
+ "absoluteSizeToPx:defaultSize:" : "rs 7/5/2014 11:47:20.346",
"cmToIn:" : "SN 6/21/2014 11:31",
"inToPx:" : "SN 6/21/2014 11:38",
"isAbsoluteSize:" : "SN 6/25/2014 00:06",
"isAbsoluteSize:ifTrue:" : "SN 6/21/2014 12:16",
+ "isNumber:" : "rs 7/5/2014 10:28:11.467",
"isRelativeSize:" : "SN 6/28/2014 10:29",
"isRelativeSize:ifTrue:" : "SN 6/21/2014 12:16",
"mmToIn:" : "SN 6/21/2014 11:31",
diff --git a/packages/HTML.package/CSSSizeFormatter.class/instance/parseTextAttributesFrom.into..st b/packages/HTML.package/CSSSizeFormatter.class/instance/parseTextAttributesFrom.into..st
index 29981190..05fef9df 100644
--- a/packages/HTML.package/CSSSizeFormatter.class/instance/parseTextAttributesFrom.into..st
+++ b/packages/HTML.package/CSSSizeFormatter.class/instance/parseTextAttributesFrom.into..st
@@ -1,7 +1,21 @@
parsing
parseTextAttributesFrom: aCSSProperty into: aContext
- aCSSProperty propertyName = 'height'
+ (aCSSProperty propertyName = 'height' and: [ self isNumber: aCSSProperty propertyString ])
ifTrue: [ aContext at: #height put: aCSSProperty propertyString asInteger ].
aCSSProperty propertyName = 'width'
- ifTrue: [ aContext at: #width put: aCSSProperty propertyString asInteger ]
\ No newline at end of file
+ ifTrue: [
+ aContext at: #absoluteWidth put: nil.
+ aContext at: #relativeWidth put: nil.
+
+ aCSSProperty propertyString = 'auto' ifTrue: [
+ aContext at: #absoluteWidth put: #auto.
+ ^ self].
+
+ self isRelativeSize: aCSSProperty propertyString ifTrue: [
+ "hope it's percent"
+ aContext at: #relativeWidth put: aCSSProperty propertyString asInteger.
+ ^ self].
+ self isAbsoluteSize: aCSSProperty propertyString
+ ifTrue: [ aContext at: #absoluteWidth put:
+ (self absoluteSizeToPx: aCSSProperty propertyString defaultSize: 0) ] ]
\ No newline at end of file
diff --git a/packages/HTML.package/CSSSizeFormatter.class/methodProperties.json b/packages/HTML.package/CSSSizeFormatter.class/methodProperties.json
index 1f82e412..035555ba 100644
--- a/packages/HTML.package/CSSSizeFormatter.class/methodProperties.json
+++ b/packages/HTML.package/CSSSizeFormatter.class/methodProperties.json
@@ -2,4 +2,4 @@
"class" : {
},
"instance" : {
- "parseTextAttributesFrom:into:" : "rs 6/20/2014 20:16:31.89" } }
+ "parseTextAttributesFrom:into:" : "rs 7/5/2014 10:29:07.349" } }
diff --git a/packages/HTML.package/Color.extension/class/fromHexRGBString..st b/packages/HTML.package/Color.extension/class/fromHexRGBString..st
index 41be4a38..7a598ceb 100644
--- a/packages/HTML.package/Color.extension/class/fromHexRGBString..st
+++ b/packages/HTML.package/Color.extension/class/fromHexRGBString..st
@@ -5,12 +5,22 @@ fromHexRGBString: aString
aString first = $#
ifTrue: [ aColorHex := aString allButFirst ]
ifFalse: [ aColorHex := aString ].
- (aColorHex size = 3 and: [
- aColorHex allSatisfy: [ :each | '0123456789ABCDEFabcdef' includes: each ] ])
+ (aColorHex allSatisfy: [ :each | '0123456789ABCDEFabcdef' includes: each ])
+ ifFalse: [ ^ nil ].
+
+ (aColorHex size = 3)
ifTrue: [
| green red blue |
red := (Integer readFrom: (aColorHex first: 1) base: 16) / 15.
green := (Integer readFrom: (aColorHex copyFrom: 2 to: 2) base: 16) / 15.
blue := (Integer readFrom: (aColorHex last: 1) base: 16) / 15.
^self r: red g: green b: blue ].
+ (aColorHex size = 6)
+ ifTrue: [
+ | green red blue |
+ red := (Integer readFrom: (aColorHex first: 2) base: 16) / 255.
+ green := (Integer readFrom: (aColorHex copyFrom: 3 to: 4) base: 16) / 255.
+ blue := (Integer readFrom: (aColorHex last: 2) base: 16) / 255.
+ ^self r: red g: green b: blue ].
+
^nil
\ No newline at end of file
diff --git a/packages/HTML.package/Color.extension/methodProperties.json b/packages/HTML.package/Color.extension/methodProperties.json
index 22343c37..212f1c01 100644
--- a/packages/HTML.package/Color.extension/methodProperties.json
+++ b/packages/HTML.package/Color.extension/methodProperties.json
@@ -2,7 +2,7 @@
"class" : {
"fromColorName:" : "pf 5/25/2014 13:53",
"fromHTMLString:" : "js 5/25/2014 15:25",
- "fromHexRGBString:" : "pf 5/25/2014 12:35",
+ "fromHexRGBString:" : "rs 7/3/2014 16:05:08.409",
"fromRGBFunction:" : "js 5/25/2014 15:35",
"fromRGBPercentageFunction:" : "js 5/25/2014 15:32",
"htmlColors1" : "SS 5/29/2014 16:39",
diff --git a/packages/HTML.package/ColorConversionTest.class/instance/test02ConvertHexRGBToColor.st b/packages/HTML.package/ColorConversionTest.class/instance/test02ConvertHexRGBToColor.st
index a56cae19..fc5a7f54 100644
--- a/packages/HTML.package/ColorConversionTest.class/instance/test02ConvertHexRGBToColor.st
+++ b/packages/HTML.package/ColorConversionTest.class/instance/test02ConvertHexRGBToColor.st
@@ -4,4 +4,5 @@ test02ConvertHexRGBToColor
self assert: (Color fromHTMLString: '#fff') equals: (Color r: 1 g: 1 b: 1).
self assert: (Color fromHTMLString: '#FFF') equals: (Color r: 1 g: 1 b: 1).
self assert: (Color fromHTMLString: '#000') equals: (Color r: 0 g: 0 b: 0).
- self assert: (Color fromHTMLString: '#f08') equals: (Color r: 1 g: 0 b: 0.534).
\ No newline at end of file
+ self assert: (Color fromHTMLString: '#f08') equals: (Color r: 1 g: 0 b: 0.534).
+ self assert: (Color fromHTMLString: '#abcdef') equals: (Color r: 171/255 g: 205/255 b:239/255)
\ No newline at end of file
diff --git a/packages/HTML.package/ColorConversionTest.class/methodProperties.json b/packages/HTML.package/ColorConversionTest.class/methodProperties.json
index 6556d968..64f289e9 100644
--- a/packages/HTML.package/ColorConversionTest.class/methodProperties.json
+++ b/packages/HTML.package/ColorConversionTest.class/methodProperties.json
@@ -3,7 +3,7 @@
},
"instance" : {
"test01ConvertNameToColor" : "SS 5/29/2014 16:41",
- "test02ConvertHexRGBToColor" : "pf 5/25/2014 12:39",
+ "test02ConvertHexRGBToColor" : "rs 7/4/2014 22:01:57.437",
"test03ConvertHexRRGGBBToColor" : "pf 5/25/2014 12:41",
"test04ConvertRGBDecimalFunctionToColor" : "pf 5/25/2014 14:48",
"test05ConvertRGBPercentFunctionToColor" : "pf 5/25/2014 14:50",
diff --git a/packages/HTML.package/DownloadingImageMorph.class/instance/setContents.st b/packages/HTML.package/DownloadingImageMorph.class/instance/setContents.st
index 9737095a..f2925213 100644
--- a/packages/HTML.package/DownloadingImageMorph.class/instance/setContents.st
+++ b/packages/HTML.package/DownloadingImageMorph.class/instance/setContents.st
@@ -15,4 +15,6 @@ setContents
defaultExtent isNil
ifFalse: [imageMorph extent: defaultExtent].
self extent ~= imageMorph extent
- ifTrue: [ self extent: imageMorph extent ]
\ No newline at end of file
+ ifTrue: [ self extent: imageMorph extent ].
+ "TODO: trigger scrollbar reevaluation of WebPageMorph"
+ self owner composeToBounds
\ No newline at end of file
diff --git a/packages/HTML.package/DownloadingImageMorph.class/methodProperties.json b/packages/HTML.package/DownloadingImageMorph.class/methodProperties.json
index 53b13568..2f30d6a8 100644
--- a/packages/HTML.package/DownloadingImageMorph.class/methodProperties.json
+++ b/packages/HTML.package/DownloadingImageMorph.class/methodProperties.json
@@ -8,7 +8,7 @@
"formatter" : "bolot 2/27/2000 23:38",
"formatter:" : "LaurentLaffont 2/26/2010 23:13",
"initialize" : "LaurentLaffont 2/26/2010 23:13",
- "setContents" : "SN 6/21/2014 10:46",
+ "setContents" : "rs 7/5/2014 11:30:13.727",
"setNoImageContents" : "LaurentLaffont 2/26/2010 23:13",
"step" : "LaurentLaffont 2/26/2010 23:13",
"stepTime" : "ls 9/15/1998 19:19",
diff --git a/packages/HTML.package/HtmlBODYNode.class/instance/defaultBlockMorph.st b/packages/HTML.package/HtmlBODYNode.class/instance/defaultBlockMorph.st
new file mode 100644
index 00000000..db84f4b3
--- /dev/null
+++ b/packages/HTML.package/HtmlBODYNode.class/instance/defaultBlockMorph.st
@@ -0,0 +1,3 @@
+initialize-release
+defaultBlockMorph
+ ^ HtmlBodyMorph
\ No newline at end of file
diff --git a/packages/HTML.package/HtmlBODYNode.class/methodProperties.json b/packages/HTML.package/HtmlBODYNode.class/methodProperties.json
index 88d7363f..5c54809f 100644
--- a/packages/HTML.package/HtmlBODYNode.class/methodProperties.json
+++ b/packages/HTML.package/HtmlBODYNode.class/methodProperties.json
@@ -2,4 +2,5 @@
"class" : {
},
"instance" : {
+ "defaultBlockMorph" : "rs 6/28/2014 14:10:32.202",
"tag" : "" } }
diff --git a/packages/HTML.package/HtmlDOMNode.class/instance/getHtmlBlockMorph.st b/packages/HTML.package/HtmlDOMNode.class/instance/getHtmlBlockMorph.st
index 1245f201..90cb39d7 100644
--- a/packages/HTML.package/HtmlDOMNode.class/instance/getHtmlBlockMorph.st
+++ b/packages/HTML.package/HtmlDOMNode.class/instance/getHtmlBlockMorph.st
@@ -1,13 +1,6 @@
rendering
getHtmlBlockMorph
- | inlineNodes |
-
- inlineNodes := OrderedCollection new.
- htmlMorph := self defaultBlockMorph newFor: self.
- self children do: [ :child | child isRenderedInline
- ifTrue: [ inlineNodes add: child ]
- ifFalse: [ self flushInlineNodes: inlineNodes to: htmlMorph;
- flushBlockNode: child to: htmlMorph] ].
- self flushInlineNodes: inlineNodes to: htmlMorph.
+ htmlMorph := self defaultBlockMorph newFor: self.
+ self renderChildrenInto: htmlMorph.
^ htmlMorph
\ No newline at end of file
diff --git a/packages/HTML.package/HtmlDOMNode.class/instance/renderChildrenInto..st b/packages/HTML.package/HtmlDOMNode.class/instance/renderChildrenInto..st
new file mode 100644
index 00000000..24e706b9
--- /dev/null
+++ b/packages/HTML.package/HtmlDOMNode.class/instance/renderChildrenInto..st
@@ -0,0 +1,10 @@
+rendering
+renderChildrenInto: aHtmlBlockMorph
+ | inlineNodes |
+
+ inlineNodes := OrderedCollection new.
+ self children do: [ :child | child isRenderedInline
+ ifTrue: [ inlineNodes add: child ]
+ ifFalse: [ self flushInlineNodes: inlineNodes to: aHtmlBlockMorph;
+ flushBlockNode: child to: aHtmlBlockMorph] ].
+ self flushInlineNodes: inlineNodes to: aHtmlBlockMorph
\ No newline at end of file
diff --git a/packages/HTML.package/HtmlDOMNode.class/methodProperties.json b/packages/HTML.package/HtmlDOMNode.class/methodProperties.json
index c65ced27..3cb42ac4 100644
--- a/packages/HTML.package/HtmlDOMNode.class/methodProperties.json
+++ b/packages/HTML.package/HtmlDOMNode.class/methodProperties.json
@@ -30,7 +30,7 @@
"endTagMissing:" : "sebastian.sastre 9/20/2010 11:53",
"flushBlockNode:to:" : "SN 5/25/2014 15:38",
"flushInlineNodes:to:" : "rs 6/13/2014 19:29:07.823",
- "getHtmlBlockMorph" : "rs 6/8/2014 13:17:59.51",
+ "getHtmlBlockMorph" : "rs 6/28/2014 14:01:51.067",
"hasTrailingSlash" : "tb 1/3/2006 17:29",
"hasTrailingSlash:" : "sebastian.sastre 9/20/2010 11:53",
"id" : "tb 7/12/2007 11:07",
@@ -50,6 +50,7 @@
"parseContents:" : "SebastianSastre 1/15/2012 16:40",
"rawTag" : "tb 12/2/2005 20:33",
"recoverFromLTIn:stream:" : "tb 12/10/2005 21:41",
+ "renderChildrenInto:" : "rs 6/28/2014 14:01:31.325",
"startStyles:" : "rs 5/18/2014 15:33:41.852",
"styles" : "tb 12/30/2005 20:08",
"styles:" : "tb 12/30/2005 20:08",
diff --git a/packages/HTML.package/HtmlDocument.class/instance/addToHtmlMorph..st b/packages/HTML.package/HtmlDocument.class/instance/addToHtmlMorph..st
new file mode 100644
index 00000000..2723957a
--- /dev/null
+++ b/packages/HTML.package/HtmlDocument.class/instance/addToHtmlMorph..st
@@ -0,0 +1,3 @@
+rendering
+addToHtmlMorph: aHtmlBlockMorph
+ self renderChildrenInto: aHtmlBlockMorph
\ No newline at end of file
diff --git a/packages/HTML.package/HtmlDocument.class/methodProperties.json b/packages/HTML.package/HtmlDocument.class/methodProperties.json
index 1b813ad8..756546ec 100644
--- a/packages/HTML.package/HtmlDocument.class/methodProperties.json
+++ b/packages/HTML.package/HtmlDocument.class/methodProperties.json
@@ -2,6 +2,7 @@
"class" : {
},
"instance" : {
+ "addToHtmlMorph:" : "rs 6/28/2014 14:12:49.155",
"allStyles" : "tb 12/30/2005 20:49",
"applyStyles" : "tb 7/12/2007 12:55",
"associatedForm" : "rs 5/29/2014 23:11:28.394",
diff --git a/packages/HTML.package/HtmlHTMLNode.class/instance/addToHtmlMorph..st b/packages/HTML.package/HtmlHTMLNode.class/instance/addToHtmlMorph..st
new file mode 100644
index 00000000..2723957a
--- /dev/null
+++ b/packages/HTML.package/HtmlHTMLNode.class/instance/addToHtmlMorph..st
@@ -0,0 +1,3 @@
+rendering
+addToHtmlMorph: aHtmlBlockMorph
+ self renderChildrenInto: aHtmlBlockMorph
\ No newline at end of file
diff --git a/packages/HTML.package/HtmlHTMLNode.class/methodProperties.json b/packages/HTML.package/HtmlHTMLNode.class/methodProperties.json
index 936872b3..f87ce9ce 100644
--- a/packages/HTML.package/HtmlHTMLNode.class/methodProperties.json
+++ b/packages/HTML.package/HtmlHTMLNode.class/methodProperties.json
@@ -2,5 +2,6 @@
"class" : {
},
"instance" : {
+ "addToHtmlMorph:" : "rs 6/28/2014 14:02:09.556",
"createImpliedNodes" : "tb 12/1/2005 09:12",
"tag" : "tb 11/29/2005 09:19" } }
diff --git a/packages/HTML.package/monticello.meta/version b/packages/HTML.package/monticello.meta/version
index 77d81aba..01191c6a 100644
--- a/packages/HTML.package/monticello.meta/version
+++ b/packages/HTML.package/monticello.meta/version
@@ -1 +1 @@
-6e188467-d07d-4e49-be20-fa225e8f7845
\ No newline at end of file
+6e188467-d07d-4e49-be20-fa225e8f7845
diff --git a/packages/HTML.package/monticello.meta/version.d/HTML-rs.113_b49e40ea-38e5-3241-9e1a-5d692da8925f b/packages/HTML.package/monticello.meta/version.d/HTML-rs.113_b49e40ea-38e5-3241-9e1a-5d692da8925f
new file mode 100644
index 00000000..588e6e95
--- /dev/null
+++ b/packages/HTML.package/monticello.meta/version.d/HTML-rs.113_b49e40ea-38e5-3241-9e1a-5d692da8925f
@@ -0,0 +1 @@
+(name 'HTML-rs.113'
message 'Fix scrollbars (and 6-digit-hex-color parsing)'
id 'b49e40ea-38e5-3241-9e1a-5d692da8925f'
date '4 July 2014'
time '10:42:59.927 pm'
author 'rs'
ancestors ((id 'fea643b6-5bbb-4b70-9584-e8f6b9377725'))
stepChildren ())
\ No newline at end of file
diff --git a/packages/HTML.package/monticello.meta/version.d/HTML-rs.114_d8a3e21d-3ec3-0944-bc0b-bbb4351006a8 b/packages/HTML.package/monticello.meta/version.d/HTML-rs.114_d8a3e21d-3ec3-0944-bc0b-bbb4351006a8
new file mode 100644
index 00000000..7f3a3be9
--- /dev/null
+++ b/packages/HTML.package/monticello.meta/version.d/HTML-rs.114_d8a3e21d-3ec3-0944-bc0b-bbb4351006a8
@@ -0,0 +1 @@
+(name 'HTML-rs.114'
message 'Fix two CSS parsing bugs'
id 'd8a3e21d-3ec3-0944-bc0b-bbb4351006a8'
date '5 July 2014'
time '10:33:23.107 am'
author 'rs'
ancestors ((id 'b49e40ea-38e5-3241-9e1a-5d692da8925f'))
stepChildren ())
\ No newline at end of file
diff --git a/packages/HTML.package/monticello.meta/version.d/HTML-rs.115_c886c165-d5f3-6e4b-a787-a61dfb704d95 b/packages/HTML.package/monticello.meta/version.d/HTML-rs.115_c886c165-d5f3-6e4b-a787-a61dfb704d95
new file mode 100644
index 00000000..1a5dfb24
--- /dev/null
+++ b/packages/HTML.package/monticello.meta/version.d/HTML-rs.115_c886c165-d5f3-6e4b-a787-a61dfb704d95
@@ -0,0 +1 @@
+(name 'HTML-rs.115'
message 'Improve Tanzmaus'
id 'c886c165-d5f3-6e4b-a787-a61dfb704d95'
date '5 July 2014'
time '11:32:12.275 am'
author 'rs'
ancestors ((id 'd8a3e21d-3ec3-0944-bc0b-bbb4351006a8'))
stepChildren ())
\ No newline at end of file
diff --git a/packages/HTML.package/monticello.meta/version.d/HTML-rs.116_9a45a462-f02e-314e-9f9c-602b1c738d0d b/packages/HTML.package/monticello.meta/version.d/HTML-rs.116_9a45a462-f02e-314e-9f9c-602b1c738d0d
new file mode 100644
index 00000000..000c5318
--- /dev/null
+++ b/packages/HTML.package/monticello.meta/version.d/HTML-rs.116_9a45a462-f02e-314e-9f9c-602b1c738d0d
@@ -0,0 +1 @@
+(name 'HTML-rs.116'
message 'Fix link bug and others'
id '9a45a462-f02e-314e-9f9c-602b1c738d0d'
date '5 July 2014'
time '11:51:07.118 am'
author 'rs'
ancestors ((id 'c886c165-d5f3-6e4b-a787-a61dfb704d95'))
stepChildren ())
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/adjustBoundsToSubmorphs.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/adjustBoundsToSubmorphs.st
new file mode 100644
index 00000000..9cfb8883
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/adjustBoundsToSubmorphs.st
@@ -0,0 +1,24 @@
+layout
+adjustBoundsToSubmorphs
+"My bounds should always enclose the submorph's bounds
+(that's actually not 100% correct, e.g. take the case of
+
).
+If I don't have submorphs (e.g. I'm just background-image'd), take
+my computedSize and the given position
+Otherwise take the submorphBounds and make sure they
+have at least an extent of computedSize (the resulting bounds
+may reside completely in the negative space because of
+TextMorph's submorph placement - see BitBltDisplayScanner).
+However it's important to set a correct width as it is used
+for table column breadth ratio calulation"
+ | submorphCorner delta |
+ submorphCorner := self submorphs
+ ifEmpty: [ self position + self computedSize ]
+ ifNotEmpty: [ ((self submorphBounds origin extent: self computedSize)
+ quickMerge: self submorphBounds) corner asIntegerPoint ].
+ delta := submorphCorner - self bounds corner.
+ (delta isZero)
+ ifTrue: [ ^ false ]
+ ifFalse:
+ [ self extent: submorphCorner - self position.
+ ^true ]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/computedSize.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/computedSize.st
new file mode 100644
index 00000000..ab5d0a46
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/computedSize.st
@@ -0,0 +1,4 @@
+accessing
+computedSize
+
+ ^ self computedWidth @ self cssHeight
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/computedWidth..st b/packages/Scamper.package/HtmlBlockMorph.class/instance/computedWidth..st
new file mode 100644
index 00000000..e8f92a7f
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/computedWidth..st
@@ -0,0 +1,5 @@
+accessing
+computedWidth: aWidth
+
+ computedWidth := aWidth.
+ self layoutChanged
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/computedWidth.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/computedWidth.st
new file mode 100644
index 00000000..7523d5e5
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/computedWidth.st
@@ -0,0 +1,4 @@
+accessing
+computedWidth
+
+ ^ computedWidth ifNil: [ 0 ]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/cornerOf.relativeTo..st b/packages/Scamper.package/HtmlBlockMorph.class/instance/cornerOf.relativeTo..st
new file mode 100644
index 00000000..5a624871
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/cornerOf.relativeTo..st
@@ -0,0 +1,5 @@
+layout
+cornerOf: aRectangle relativeTo: aPoint
+ | translation |
+ translation := aPoint - aRectangle origin.
+ ^ aRectangle corner - translation
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/cssHeight.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/cssHeight.st
new file mode 100644
index 00000000..5be7da8f
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/cssHeight.st
@@ -0,0 +1,8 @@
+layout
+cssHeight
+
+ | resolver |
+ self node ifNil: [ ^ 0 ].
+
+ resolver := CSSStyleResolver for: node.
+ ^ resolver ifStyleNotNil: #height do: [:value | value ] ifNil: [ 0 ]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/cssSize.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/cssSize.st
deleted file mode 100644
index 599949fd..00000000
--- a/packages/Scamper.package/HtmlBlockMorph.class/instance/cssSize.st
+++ /dev/null
@@ -1,11 +0,0 @@
-layout
-cssSize
- | size resolver |
- size := 0@0.
- self node ifNil: [ ^ size ].
-
- resolver := CSSStyleResolver for: node.
- resolver ifStyleNotNil: #width do: [:value | size := size + (value @ 0) ].
- resolver ifStyleNotNil: #height do: [:value | size := size + (0 @ value) ].
-
- ^ size
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/defaultBounds.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/defaultBounds.st
index b0f3c72f..1c7c4688 100644
--- a/packages/Scamper.package/HtmlBlockMorph.class/instance/defaultBounds.st
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/defaultBounds.st
@@ -1,4 +1,4 @@
initialization
defaultBounds
"answer the default bounds for the receiver"
- ^ 0 @ 0 corner: self cssSize
\ No newline at end of file
+ ^ 0 @ 0 corner: self computedSize
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/drawBackground.withRepeat.On..st b/packages/Scamper.package/HtmlBlockMorph.class/instance/drawBackground.withRepeat.On..st
index bd04bbc5..c4dfb90d 100644
--- a/packages/Scamper.package/HtmlBlockMorph.class/instance/drawBackground.withRepeat.On..st
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/drawBackground.withRepeat.On..st
@@ -3,6 +3,7 @@ drawBackground: anImage withRepeat: repeat On: aCanvas
| fillBounds fillStyle |
fillBounds := self bounds.
fillStyle := BitmapFillStyle fromForm: anImage.
+ fillStyle origin: fillBounds origin.
(repeat == #repeatX or: [ repeat == #noRepeat])
ifTrue: [ fillBounds := fillBounds withHeight: anImage height ].
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/isHtmlBlockMorph.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/isHtmlBlockMorph.st
new file mode 100644
index 00000000..7f2fc14a
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/isHtmlBlockMorph.st
@@ -0,0 +1,3 @@
+testing
+isHtmlBlockMorph
+ ^ true
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/isHtmlBodyMorph.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/isHtmlBodyMorph.st
new file mode 100644
index 00000000..a7a71e45
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/isHtmlBodyMorph.st
@@ -0,0 +1,3 @@
+testing
+isHtmlBodyMorph
+ ^ false
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/layoutChanged.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/layoutChanged.st
index 27c1ab61..d774ae4b 100644
--- a/packages/Scamper.package/HtmlBlockMorph.class/instance/layoutChanged.st
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/layoutChanged.st
@@ -1,10 +1,6 @@
layout
layoutChanged
- | delta submorphCorner |
- submorphCorner := self submorphs
- ifEmpty: [ self defaultBounds corner ]
- ifNotEmpty: [ (self defaultBounds quickMerge: self submorphBounds) corner asIntegerPoint ].
- delta := submorphCorner - self bounds corner.
- (delta isZero)
- ifTrue: [ super layoutChanged ]
- ifFalse: [ self extent: submorphCorner - self position ]
\ No newline at end of file
+ self suppressLayoutUpdates ifTrue: [ ^ self ].
+
+ self adjustBoundsToSubmorphs
+ ifFalse: [ super layoutChanged ]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/preferredMinimumWidth.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/preferredMinimumWidth.st
new file mode 100644
index 00000000..58789d23
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/preferredMinimumWidth.st
@@ -0,0 +1,20 @@
+layout
+preferredMinimumWidth
+ | resolver ownWidth childrenWidth |
+ self node ifNil: [ ^ #auto ].
+
+ resolver := CSSStyleResolver for: node.
+
+ "TODO: add support for intrinsic widths of replaced elements here"
+ "add margins and paddings and border-widths here"
+ resolver ifStyleNotNil: #absoluteWidth
+ do: [:value | ownWidth := value ] ifNil: [ ^ ownWidth := #auto ].
+
+ childrenWidth := (self submorphs
+ collect: [ :morph | morph preferredMinimumWidth ]
+ thenSelect: [ :width | width ~= #auto ])
+ ifNotEmpty: [ :widths | widths max ] ifEmpty: [ #auto ].
+
+ (ownWidth == #auto)
+ ifTrue: [ ^ childrenWidth ]
+ ifFalse: [ ^ ownWidth ]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/setWidth..st b/packages/Scamper.package/HtmlBlockMorph.class/instance/setWidth..st
new file mode 100644
index 00000000..d4666be7
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/setWidth..st
@@ -0,0 +1,20 @@
+layout
+setWidth: availableWidth
+
+ | resolver absoluteWidth relativeWidth resultWidth |
+ self node ifNil: [ ^ self ].
+
+ resolver := CSSStyleResolver for: node.
+
+ absoluteWidth := (resolver getStyle: #absoluteWidth) ifNil: [ #auto ].
+ relativeWidth := (resolver getStyle: #relativeWidth) ifNil: [ 100 ].
+ (absoluteWidth == #auto)
+ ifTrue: [
+ "subtract margin, padding border-width here"
+ resultWidth := availableWidth * relativeWidth / 100 ]
+ ifFalse: [ resultWidth := absoluteWidth ].
+ self computedWidth: resultWidth;
+ suppressLayoutUpdates: true;
+ updateSubmorphWidth: resultWidth;
+ suppressLayoutUpdates: false;
+ layoutChanged
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/suppressLayoutUpdates..st b/packages/Scamper.package/HtmlBlockMorph.class/instance/suppressLayoutUpdates..st
new file mode 100644
index 00000000..a33f93f2
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/suppressLayoutUpdates..st
@@ -0,0 +1,4 @@
+accessing
+suppressLayoutUpdates: anObject
+
+ suppressLayoutUpdates := anObject
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/suppressLayoutUpdates.st b/packages/Scamper.package/HtmlBlockMorph.class/instance/suppressLayoutUpdates.st
new file mode 100644
index 00000000..07de2e19
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/suppressLayoutUpdates.st
@@ -0,0 +1,4 @@
+accessing
+suppressLayoutUpdates
+
+ ^ suppressLayoutUpdates ifNil: [ false ]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/instance/updateSubmorphWidth..st b/packages/Scamper.package/HtmlBlockMorph.class/instance/updateSubmorphWidth..st
new file mode 100644
index 00000000..aa06967f
--- /dev/null
+++ b/packages/Scamper.package/HtmlBlockMorph.class/instance/updateSubmorphWidth..st
@@ -0,0 +1,4 @@
+layout
+updateSubmorphWidth: aWidth
+
+ self submorphsDo: [:morph | morph setWidth: aWidth ]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/methodProperties.json b/packages/Scamper.package/HtmlBlockMorph.class/methodProperties.json
index 293485d9..99f38ce9 100644
--- a/packages/Scamper.package/HtmlBlockMorph.class/methodProperties.json
+++ b/packages/Scamper.package/HtmlBlockMorph.class/methodProperties.json
@@ -3,23 +3,35 @@
"newFor:" : "SN 5/25/2014 14:54" },
"instance" : {
"addChild:" : "rs 5/28/2014 16:04:49.114",
+ "adjustBoundsToSubmorphs" : "SN 7/5/2014 13:46",
"backgroundImage" : "rs 6/15/2014 11:41:56.559",
"backgroundImage:" : "rs 6/15/2014 12:30:43.079",
"children" : "SN 5/25/2014 15:35",
"children:" : "SN 5/25/2014 15:35",
"clip:withOrigin:" : "rs 6/20/2014 22:11:40.144",
- "cssSize" : "SS 6/23/2014 11:53",
- "defaultBounds" : "rs 6/20/2014 20:23:38.196",
+ "computedSize" : "rs 6/28/2014 14:59:27.313",
+ "computedWidth" : "rs 7/3/2014 00:41:05.224",
+ "computedWidth:" : "rs 6/28/2014 14:51:34.919",
+ "cornerOf:relativeTo:" : "rs 6/28/2014 17:52:28.07",
+ "cssHeight" : "rs 6/28/2014 12:27:47.953",
+ "defaultBounds" : "rs 6/28/2014 12:28:32.797",
"defaultColor" : "SN 5/25/2014 15:22",
"downloadBackgroundImageAsync:" : "rs 6/15/2014 11:40:40.306",
- "drawBackground:withRepeat:On:" : "rs 6/21/2014 12:14:38.57",
+ "drawBackground:withRepeat:On:" : "rs 7/3/2014 13:44:54.529",
"drawBackgroundColor:On:" : "rs 6/15/2014 14:05:45.868",
"drawOn:" : "SS 6/23/2014 11:53",
"incompleteMorphs" : "SN 5/25/2014 15:32",
"initialize" : "rs 6/21/2014 11:04:16.25",
- "layoutChanged" : "rs 6/8/2014 12:54:50.217",
+ "isHtmlBlockMorph" : "rs 6/28/2014 19:59:58.552",
+ "isHtmlBodyMorph" : "rs 6/28/2014 14:08:31.643",
+ "layoutChanged" : "rs 7/3/2014 13:01:09.048",
"node" : "SN 5/25/2014 14:50",
"node:" : "SN 5/25/2014 14:50",
+ "preferredMinimumWidth" : "SN 7/5/2014 13:50",
"processBackgroundImage:at:" : "rs 6/21/2014 11:22:03.987",
"processedBackgroundImage" : "rs 6/21/2014 11:04:00.545",
- "processedBackgroundImage:" : "rs 6/21/2014 11:04:00.561" } }
+ "processedBackgroundImage:" : "rs 6/21/2014 11:04:00.561",
+ "setWidth:" : "rs 7/3/2014 13:04:13.117",
+ "suppressLayoutUpdates" : "rs 7/3/2014 12:58:31.202",
+ "suppressLayoutUpdates:" : "rs 7/3/2014 12:58:16.941",
+ "updateSubmorphWidth:" : "rs 6/28/2014 19:43:32.631" } }
diff --git a/packages/Scamper.package/HtmlBlockMorph.class/properties.json b/packages/Scamper.package/HtmlBlockMorph.class/properties.json
index d5262008..bb63c4c2 100644
--- a/packages/Scamper.package/HtmlBlockMorph.class/properties.json
+++ b/packages/Scamper.package/HtmlBlockMorph.class/properties.json
@@ -9,7 +9,9 @@
"node",
"children",
"backgroundImage",
- "processedBackgroundImage" ],
+ "processedBackgroundImage",
+ "computedWidth",
+ "suppressLayoutUpdates" ],
"name" : "HtmlBlockMorph",
"pools" : [
],
diff --git a/packages/Scamper.package/HtmlBodyMorph.class/README.md b/packages/Scamper.package/HtmlBodyMorph.class/README.md
new file mode 100644
index 00000000..e69de29b
diff --git a/packages/Scamper.package/HtmlBodyMorph.class/instance/computedSize.st b/packages/Scamper.package/HtmlBodyMorph.class/instance/computedSize.st
new file mode 100644
index 00000000..2f7a6bf4
--- /dev/null
+++ b/packages/Scamper.package/HtmlBodyMorph.class/instance/computedSize.st
@@ -0,0 +1,4 @@
+accessing
+computedSize
+
+ ^ self computedWidth @ (self cssHeight max: self minimumHeight)
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBodyMorph.class/instance/isHtmlBodyMorph.st b/packages/Scamper.package/HtmlBodyMorph.class/instance/isHtmlBodyMorph.st
new file mode 100644
index 00000000..44726a79
--- /dev/null
+++ b/packages/Scamper.package/HtmlBodyMorph.class/instance/isHtmlBodyMorph.st
@@ -0,0 +1,3 @@
+testing
+isHtmlBodyMorph
+ ^ true
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBodyMorph.class/instance/minimumHeight..st b/packages/Scamper.package/HtmlBodyMorph.class/instance/minimumHeight..st
new file mode 100644
index 00000000..8aad2006
--- /dev/null
+++ b/packages/Scamper.package/HtmlBodyMorph.class/instance/minimumHeight..st
@@ -0,0 +1,5 @@
+accessing
+minimumHeight: aHeight
+
+ minimumHeight := aHeight.
+ self layoutChanged
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBodyMorph.class/instance/minimumHeight.st b/packages/Scamper.package/HtmlBodyMorph.class/instance/minimumHeight.st
new file mode 100644
index 00000000..a2a3ae59
--- /dev/null
+++ b/packages/Scamper.package/HtmlBodyMorph.class/instance/minimumHeight.st
@@ -0,0 +1,4 @@
+accessing
+minimumHeight
+
+ ^ minimumHeight ifNil: [ 0 ]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlBodyMorph.class/methodProperties.json b/packages/Scamper.package/HtmlBodyMorph.class/methodProperties.json
new file mode 100644
index 00000000..b040ed20
--- /dev/null
+++ b/packages/Scamper.package/HtmlBodyMorph.class/methodProperties.json
@@ -0,0 +1,8 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "computedSize" : "rs 6/28/2014 14:59:40.422",
+ "isHtmlBodyMorph" : "rs 6/28/2014 14:08:39.99",
+ "minimumHeight" : "rs 6/28/2014 14:55:36.622",
+ "minimumHeight:" : "rs 6/28/2014 14:52:38.982" } }
diff --git a/packages/Scamper.package/HtmlBodyMorph.class/properties.json b/packages/Scamper.package/HtmlBodyMorph.class/properties.json
new file mode 100644
index 00000000..3ea08884
--- /dev/null
+++ b/packages/Scamper.package/HtmlBodyMorph.class/properties.json
@@ -0,0 +1,14 @@
+{
+ "category" : "Scamper-HTML-Morphs",
+ "classinstvars" : [
+ ],
+ "classvars" : [
+ ],
+ "commentStamp" : "",
+ "instvars" : [
+ "minimumHeight" ],
+ "name" : "HtmlBodyMorph",
+ "pools" : [
+ ],
+ "super" : "HtmlBlockMorph",
+ "type" : "normal" }
diff --git a/packages/Scamper.package/HtmlDocumentMorph.class/instance/setMinimumHeight..st b/packages/Scamper.package/HtmlDocumentMorph.class/instance/setMinimumHeight..st
new file mode 100644
index 00000000..6c1132f7
--- /dev/null
+++ b/packages/Scamper.package/HtmlDocumentMorph.class/instance/setMinimumHeight..st
@@ -0,0 +1,6 @@
+rendering
+setMinimumHeight: aHeight
+
+ | bodyMorph |
+ bodyMorph := self submorphs detect: [:m | m isHtmlBodyMorph ] ifNone: [ nil ].
+ bodyMorph ifNotNil: [ :m | m minimumHeight: aHeight ]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlDocumentMorph.class/methodProperties.json b/packages/Scamper.package/HtmlDocumentMorph.class/methodProperties.json
index 4259251b..5a20527b 100644
--- a/packages/Scamper.package/HtmlDocumentMorph.class/methodProperties.json
+++ b/packages/Scamper.package/HtmlDocumentMorph.class/methodProperties.json
@@ -6,4 +6,5 @@
"document" : "SN 5/25/2014 14:50",
"document:" : "SN 5/25/2014 14:50",
"render" : "SN 5/25/2014 14:15",
- "renderDocument:" : "rs 6/4/2014 00:07:08.87" } }
+ "renderDocument:" : "rs 6/4/2014 00:07:08.87",
+ "setMinimumHeight:" : "rs 6/28/2014 14:54:03.453" } }
diff --git a/packages/Scamper.package/HtmlGridLayout.class/instance/columns..st b/packages/Scamper.package/HtmlGridLayout.class/instance/columns..st
index df7e6b60..14b60b5c 100644
--- a/packages/Scamper.package/HtmlGridLayout.class/instance/columns..st
+++ b/packages/Scamper.package/HtmlGridLayout.class/instance/columns..st
@@ -1,5 +1,5 @@
accessing
columns: anObject
- columns := anObject
+ columns := anObject.
self recomputeRatios: columns.
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlGridLayout.class/methodProperties.json b/packages/Scamper.package/HtmlGridLayout.class/methodProperties.json
index 421b749a..d08f4b2c 100644
--- a/packages/Scamper.package/HtmlGridLayout.class/methodProperties.json
+++ b/packages/Scamper.package/HtmlGridLayout.class/methodProperties.json
@@ -3,7 +3,7 @@
},
"instance" : {
"columns" : "pf 6/21/2014 10:25",
- "columns:" : "pf 6/21/2014 10:39",
+ "columns:" : "rs 6/28/2014 20:12:36.296",
"computeSpacePositions:in:" : "pf 6/21/2014 12:14",
"initialize" : "pf 6/21/2014 10:26",
"layout:in:" : "pf 6/27/2014 00:09",
diff --git a/packages/Scamper.package/HtmlInlineMorph.class/instance/extent..st b/packages/Scamper.package/HtmlInlineMorph.class/instance/extent..st
new file mode 100644
index 00000000..8249801c
--- /dev/null
+++ b/packages/Scamper.package/HtmlInlineMorph.class/instance/extent..st
@@ -0,0 +1,4 @@
+geometry
+extent: aPoint
+ self wrapFlag: true.
+ super extent: aPoint
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlInlineMorph.class/instance/initialize.st b/packages/Scamper.package/HtmlInlineMorph.class/instance/initialize.st
index 1ce51c22..b293f87b 100644
--- a/packages/Scamper.package/HtmlInlineMorph.class/instance/initialize.st
+++ b/packages/Scamper.package/HtmlInlineMorph.class/instance/initialize.st
@@ -1,4 +1,4 @@
initialization
initialize
super initialize.
- self nodes: OrderedCollection new.
\ No newline at end of file
+ self nodes: OrderedCollection new
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlInlineMorph.class/instance/isHtmlBodyMorph.st b/packages/Scamper.package/HtmlInlineMorph.class/instance/isHtmlBodyMorph.st
new file mode 100644
index 00000000..a7a71e45
--- /dev/null
+++ b/packages/Scamper.package/HtmlInlineMorph.class/instance/isHtmlBodyMorph.st
@@ -0,0 +1,3 @@
+testing
+isHtmlBodyMorph
+ ^ false
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlInlineMorph.class/instance/preferredMinimumWidth.st b/packages/Scamper.package/HtmlInlineMorph.class/instance/preferredMinimumWidth.st
new file mode 100644
index 00000000..b5fb4cd0
--- /dev/null
+++ b/packages/Scamper.package/HtmlInlineMorph.class/instance/preferredMinimumWidth.st
@@ -0,0 +1,4 @@
+layout
+preferredMinimumWidth
+
+ ^ #auto
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlInlineMorph.class/instance/setWidth..st b/packages/Scamper.package/HtmlInlineMorph.class/instance/setWidth..st
new file mode 100644
index 00000000..d428748b
--- /dev/null
+++ b/packages/Scamper.package/HtmlInlineMorph.class/instance/setWidth..st
@@ -0,0 +1,4 @@
+layout
+setWidth: availableWidth
+
+ self width: availableWidth
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlInlineMorph.class/methodProperties.json b/packages/Scamper.package/HtmlInlineMorph.class/methodProperties.json
index cae9dec2..5b7af379 100644
--- a/packages/Scamper.package/HtmlInlineMorph.class/methodProperties.json
+++ b/packages/Scamper.package/HtmlInlineMorph.class/methodProperties.json
@@ -3,8 +3,12 @@
},
"instance" : {
"children" : "pf 6/27/2014 14:31",
+ "extent:" : "rs 7/3/2014 13:12:29.25",
"incompleteMorphs" : "SN 5/25/2014 15:34",
"incompleteMorphs:" : "SN 5/25/2014 15:34",
- "initialize" : "rs 5/28/2014 16:36:11.768",
+ "initialize" : "rs 6/28/2014 18:37:53.977",
+ "isHtmlBodyMorph" : "rs 7/3/2014 13:07:24.748",
"nodes" : "SN 5/25/2014 14:49",
- "nodes:" : "SN 5/25/2014 14:49" } }
+ "nodes:" : "SN 5/25/2014 14:49",
+ "preferredMinimumWidth" : "rs 6/28/2014 12:03:07.683",
+ "setWidth:" : "rs 7/3/2014 13:13:37.589" } }
diff --git a/packages/Scamper.package/HtmlTableMorph.class/instance/computedWidth..st b/packages/Scamper.package/HtmlTableMorph.class/instance/computedWidth..st
new file mode 100644
index 00000000..47102209
--- /dev/null
+++ b/packages/Scamper.package/HtmlTableMorph.class/instance/computedWidth..st
@@ -0,0 +1,5 @@
+accessing
+computedWidth: aWidth
+
+ computedWidth := aWidth.
+ self width: aWidth
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlTableMorph.class/instance/updateSubmorphWidth..st b/packages/Scamper.package/HtmlTableMorph.class/instance/updateSubmorphWidth..st
new file mode 100644
index 00000000..79394b27
--- /dev/null
+++ b/packages/Scamper.package/HtmlTableMorph.class/instance/updateSubmorphWidth..st
@@ -0,0 +1,7 @@
+layout
+updateSubmorphWidth: aWidth
+ self submorphs select: [ :morph | morph isHtmlBlockMorph ] thenDo: [ :morph |
+ | position |
+ position := morph valueOfProperty: #gridPosition.
+ position ifNotNil: [ :pos | morph setWidth:
+ (self layoutPolicy columns at: position column) breadth ]]
\ No newline at end of file
diff --git a/packages/Scamper.package/HtmlTableMorph.class/methodProperties.json b/packages/Scamper.package/HtmlTableMorph.class/methodProperties.json
index c829db30..d14b2af8 100644
--- a/packages/Scamper.package/HtmlTableMorph.class/methodProperties.json
+++ b/packages/Scamper.package/HtmlTableMorph.class/methodProperties.json
@@ -7,8 +7,10 @@
"addLineFrom:to:" : "pf 6/27/2014 00:16",
"addTableLines" : "pf 6/24/2014 21:12",
"addVerticalTableLines" : "pf 6/27/2014 00:18",
+ "computedWidth:" : "rs 6/28/2014 20:27:20.246",
"ensureColumns:" : "pf 6/27/2014 00:13",
"ensureHeight:ofRow:" : "pf 6/21/2014 11:54",
"ensureWidth:ofColumn:" : "pf 6/21/2014 11:52",
"initialize" : "pf 6/24/2014 21:11",
- "layoutChanged" : "pf 6/24/2014 21:09" } }
+ "layoutChanged" : "pf 6/24/2014 21:09",
+ "updateSubmorphWidth:" : "SN 7/5/2014 13:56" } }
diff --git a/packages/Scamper.package/Morph.extension/instance/isHtmlBlockMorph.st b/packages/Scamper.package/Morph.extension/instance/isHtmlBlockMorph.st
new file mode 100644
index 00000000..66910706
--- /dev/null
+++ b/packages/Scamper.package/Morph.extension/instance/isHtmlBlockMorph.st
@@ -0,0 +1,3 @@
+*scamper-html-morphs
+isHtmlBlockMorph
+ ^ false
\ No newline at end of file
diff --git a/packages/Scamper.package/Morph.extension/methodProperties.json b/packages/Scamper.package/Morph.extension/methodProperties.json
new file mode 100644
index 00000000..ee23b9ba
--- /dev/null
+++ b/packages/Scamper.package/Morph.extension/methodProperties.json
@@ -0,0 +1,5 @@
+{
+ "class" : {
+ },
+ "instance" : {
+ "isHtmlBlockMorph" : "rs 6/28/2014 20:00:40.839" } }
diff --git a/packages/Scamper.package/Morph.extension/properties.json b/packages/Scamper.package/Morph.extension/properties.json
new file mode 100644
index 00000000..58989fd6
--- /dev/null
+++ b/packages/Scamper.package/Morph.extension/properties.json
@@ -0,0 +1,2 @@
+{
+ "name" : "Morph" }
diff --git a/packages/Scamper.package/WebPageMorph.class/instance/extent..st b/packages/Scamper.package/WebPageMorph.class/instance/extent..st
new file mode 100644
index 00000000..280df62d
--- /dev/null
+++ b/packages/Scamper.package/WebPageMorph.class/instance/extent..st
@@ -0,0 +1,8 @@
+layout
+extent: newExtent
+ super extent: newExtent.
+ "Bug: Because the document is always sized to both-scrollbars-hidden-bounds"
+ "there will always be scrollbars in both directions, even if only one is needed"
+ self hideScrollBarsIndefinitely;
+ updateDocumentSize;
+ hideScrollBarsIndefinitely: false
\ No newline at end of file
diff --git a/packages/Scamper.package/WebPageMorph.class/instance/hExtraScrollRange.st b/packages/Scamper.package/WebPageMorph.class/instance/hExtraScrollRange.st
new file mode 100644
index 00000000..b3fb5af8
--- /dev/null
+++ b/packages/Scamper.package/WebPageMorph.class/instance/hExtraScrollRange.st
@@ -0,0 +1,4 @@
+geometry
+hExtraScrollRange
+ "Don't know what this was originally for - prevents unneeded scrollbars from disappearing"
+ ^ 0
\ No newline at end of file
diff --git a/packages/Scamper.package/WebPageMorph.class/instance/hMargin.st b/packages/Scamper.package/WebPageMorph.class/instance/hMargin.st
new file mode 100644
index 00000000..7e52402e
--- /dev/null
+++ b/packages/Scamper.package/WebPageMorph.class/instance/hMargin.st
@@ -0,0 +1,3 @@
+layout
+hMargin
+ ^0
\ No newline at end of file
diff --git a/packages/Scamper.package/WebPageMorph.class/instance/layoutChanged.st b/packages/Scamper.package/WebPageMorph.class/instance/layoutChanged.st
index 95f00da2..b7c3abb5 100644
--- a/packages/Scamper.package/WebPageMorph.class/instance/layoutChanged.st
+++ b/packages/Scamper.package/WebPageMorph.class/instance/layoutChanged.st
@@ -1,6 +1,7 @@
layout
layoutChanged
- "compute new bounds"
- self changed.
- super layoutChanged.
- self changed.
\ No newline at end of file
+ "compute new bounds"
+
+ self changed.
+ super layoutChanged.
+ self changed
\ No newline at end of file
diff --git a/packages/Scamper.package/WebPageMorph.class/instance/show..st b/packages/Scamper.package/WebPageMorph.class/instance/show..st
index 7f4003e0..7f8afc63 100644
--- a/packages/Scamper.package/WebPageMorph.class/instance/show..st
+++ b/packages/Scamper.package/WebPageMorph.class/instance/show..st
@@ -3,4 +3,6 @@ show: aHtmlDocument
self document: aHtmlDocument;
documentMorph: (HtmlDocumentMorph newFor: aHtmlDocument);
startDownloadingMorphState: documentMorph incompleteMorphs;
- resetExtent.
\ No newline at end of file
+ layoutChanged;
+ resetExtent;
+ updateDocumentSize
\ No newline at end of file
diff --git a/packages/Scamper.package/WebPageMorph.class/instance/updateDocumentSize.st b/packages/Scamper.package/WebPageMorph.class/instance/updateDocumentSize.st
new file mode 100644
index 00000000..5b325b83
--- /dev/null
+++ b/packages/Scamper.package/WebPageMorph.class/instance/updateDocumentSize.st
@@ -0,0 +1,9 @@
+layout
+updateDocumentSize
+ | documentWidth |
+ documentMorph ifNotNil: [ :dm |
+ documentWidth := self documentMorph preferredMinimumWidth.
+ (documentWidth == #auto)
+ ifTrue: [ self documentMorph setWidth: self scroller width ]
+ ifFalse: [ self documentMorph setWidth: (self scroller width max: documentWidth) ].
+ documentMorph setMinimumHeight: (self scroller height)].
\ No newline at end of file
diff --git a/packages/Scamper.package/WebPageMorph.class/instance/vExtraScrollRange.st b/packages/Scamper.package/WebPageMorph.class/instance/vExtraScrollRange.st
new file mode 100644
index 00000000..1e519410
--- /dev/null
+++ b/packages/Scamper.package/WebPageMorph.class/instance/vExtraScrollRange.st
@@ -0,0 +1,4 @@
+geometry
+vExtraScrollRange
+ "Don't know what this was originally for - prevents unneeded scrollbars from disappearing"
+ ^ 0
\ No newline at end of file
diff --git a/packages/Scamper.package/WebPageMorph.class/methodProperties.json b/packages/Scamper.package/WebPageMorph.class/methodProperties.json
index a9bd9724..895fa0e8 100644
--- a/packages/Scamper.package/WebPageMorph.class/methodProperties.json
+++ b/packages/Scamper.package/WebPageMorph.class/methodProperties.json
@@ -6,10 +6,15 @@
"document:" : "SN 5/25/2014 14:10",
"documentMorph" : "SN 5/25/2014 14:01",
"documentMorph:" : "SN 5/25/2014 15:01",
+ "extent:" : "rs 7/5/2014 11:31:43.97",
+ "hExtraScrollRange" : "rs 7/4/2014 22:40:24.736",
+ "hMargin" : "rs 7/4/2014 22:11:50.665",
"initialize" : "pf 6/28/2014 11:51",
- "layoutChanged" : "SN 5/25/2014 13:56",
+ "layoutChanged" : "rs 7/3/2014 14:14:36.119",
"resetExtent" : "SN 5/25/2014 16:09",
"scamper" : "SN 5/25/2014 14:25",
"scamper:" : "SN 5/25/2014 14:25",
- "show:" : "SN 5/25/2014 16:10",
- "startDownloadingMorphState:" : "SN 5/25/2014 15:41" } }
+ "show:" : "rs 7/4/2014 21:57:26.787",
+ "startDownloadingMorphState:" : "SN 5/25/2014 15:41",
+ "updateDocumentSize" : "rs 6/28/2014 14:44:47.987",
+ "vExtraScrollRange" : "rs 7/4/2014 22:40:20.314" } }
diff --git a/packages/Scamper.package/monticello.meta/version b/packages/Scamper.package/monticello.meta/version
index 92d4ccbd..5e6ee86e 100644
--- a/packages/Scamper.package/monticello.meta/version
+++ b/packages/Scamper.package/monticello.meta/version
@@ -1 +1 @@
-30fe34f5-bba6-4662-a703-918c908ce8d4
\ No newline at end of file
+99536d91-0c4d-7046-a839-249f979518cb
\ No newline at end of file
diff --git a/packages/Scamper.package/monticello.meta/version.d/Scamper-SN.31_e435103f-7220-f341-a4c6-44e9c01e221d b/packages/Scamper.package/monticello.meta/version.d/Scamper-SN.31_e435103f-7220-f341-a4c6-44e9c01e221d
deleted file mode 100644
index c3f1c6a7..00000000
--- a/packages/Scamper.package/monticello.meta/version.d/Scamper-SN.31_e435103f-7220-f341-a4c6-44e9c01e221d
+++ /dev/null
@@ -1 +0,0 @@
-(name 'Scamper-SN.31'
message 'Fix ZeroDivide in table with column of width 0.'
id 'e435103f-7220-f341-a4c6-44e9c01e221d'
date '5 July 2014'
time '10:35:06.219 am'
author 'SN'
ancestors ((id '89c5fb7c-b207-fc40-9fec-a1a253ea0461'))
stepChildren ())
\ No newline at end of file
diff --git a/packages/Scamper.package/monticello.meta/version.d/Scamper-SN.39_99536d91-0c4d-7046-a839-249f979518cb b/packages/Scamper.package/monticello.meta/version.d/Scamper-SN.39_99536d91-0c4d-7046-a839-249f979518cb
new file mode 100644
index 00000000..aa83c7c4
--- /dev/null
+++ b/packages/Scamper.package/monticello.meta/version.d/Scamper-SN.39_99536d91-0c4d-7046-a839-249f979518cb
@@ -0,0 +1 @@
+(name 'Scamper-SN.39'
message 'Fix code formatting issues.'
id '99536d91-0c4d-7046-a839-249f979518cb'
date '5 July 2014'
time '2:09:42.257 pm'
author 'SN'
ancestors ((id '30fe34f5-bba6-4662-a703-918c908ce8d4'))
stepChildren ())
\ No newline at end of file