Skip to content

Commit

Permalink
Merge pull request #93 from SWTI2014/parsing/link-rel
Browse files Browse the repository at this point in the history
Ref #53: Parsing/link-rel
  • Loading branch information
MrSerth committed Jun 5, 2014
2 parents e31344d + 948065b commit 6de0053
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 5 deletions.
11 changes: 11 additions & 0 deletions packages/HTML.package/CSSStyleSheet.class/instance/loadStyles.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
accessing
loadStyles

| doc |

doc := (self url asUrlRelativeTo: self document requestUrl asUrl) retrieveContents.
self
content: doc content;
start: 0;
end: doc content size.
self parseContents: (ReadStream on: self content).
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
"isComment" : "tb 12/20/2005 13:33",
"isInline" : "tb 1/4/2006 08:23",
"isStyleSheet" : "tb 12/17/2005 22:25",
"loadStyles" : "js 6/5/2014 14:58",
"media" : "tb 12/30/2005 14:50",
"parseAtRule:media:" : "tb 1/6/2006 09:43",
"parseContents:" : "tb 1/3/2006 17:04",
"parseStyles:media:" : "tb 1/3/2006 17:07",
"parseStyles:media:" : "js 6/1/2014 13:44",
"tag" : "tb 12/20/2005 13:17",
"url" : "tb 1/4/2006 08:22",
"url:" : "PK 10/18/2010 22:23" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'HTML-js.71'message 'Ref #53 Add method and method call to retrieve and apply css content of every stylesheet linked in a link-tag.'id 'b416c44b-0b04-174e-ae96-031ac152f810'date '1 June 2014'time '2:02:43.064 pm'author 'js'ancestors ((id '1d84afc6-c0ac-48ac-a577-d3299e218d7c'))stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'HTML-js.72'message 'Simplify specific code "parent parent parent parent" to general "self document"'id '01e5d6ea-991a-fa40-ae52-b7892589e946'date '1 June 2014'time '2:46:11.928 pm'author 'js'ancestors ((id 'b416c44b-0b04-174e-ae96-031ac152f810'))stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(name 'HTML-js.73'message 'Rename setContent to loadStyle
Add test for link-rel tag'id '623f2e09-f5a3-f341-983d-db0048891896'date '5 June 2014'time '3:01:32.3 pm'author 'js'ancestors ((id '01e5d6ea-991a-fa40-ae52-b7892589e946'))stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'HTML-js.74'message 'Remove empty stylesheet test class'id '4d0f61cc-2257-7549-ba0d-9a68c931446c'date '5 June 2014'time '8:11:19.623 pm'author 'js'ancestors ((id '623f2e09-f5a3-f341-983d-db0048891896'))stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ displayTextHtmlPage: newSource
UTF8TextConverter strictUtf8Conversions: utf8mode.
self status: 'parsing...' translated.
document := (HtmlDocument new parseContents: (ReadStream on: pageSource)).
document requestUrl: currentUrl;
responseUrl: currentUrl.
self status: 'appling styles...' translated.
document
requestUrl: currentUrl;
responseUrl: currentUrl.
self status: 'applying styles...' translated.
document stylesheets do: [:stylesheet | stylesheet loadStyles].
document applyStyles.
self status: 'laying out...' translated.
self webContentsPane show: document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"displayHistory" : "LaurentLaffont 2/26/2010 23:08",
"displayImagePage:" : "LaurentLaffont 2/26/2010 23:08",
"displayPlainTextPage:" : "LaurentLaffont 2/26/2010 23:08",
"displayTextHtmlPage:" : "SS 6/5/2014 11:45",
"displayTextHtmlPage:" : "js 6/5/2014 14:58",
"doItContext" : "ls 9/14/1998 20:15",
"doItReceiver" : "ls 9/14/1998 20:15",
"document" : "ls 7/14/1998 02:47",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'Scamper-js.5'message 'Set requestUrl and responseUrl of HtmlDocument as currentUrl'id 'aa7fdd36-0fbf-af4a-a9bf-0c5077e98ccd'date '1 June 2014'time '1:59:05.307 pm'author 'js'ancestors ((id '173e5752-681e-43d8-8403-5f3a06bee531'))stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'Scamper-js.6'message 'Rename setContent to loadStyles'id '30c3d117-5352-7b42-8adb-dd454409c310'date '5 June 2014'time '3:02:59.071 pm'author 'js'ancestors ((id 'aa7fdd36-0fbf-af4a-a9bf-0c5077e98ccd'))stepChildren ())
Expand Down

0 comments on commit 6de0053

Please sign in to comment.