Bug 59415

Summary: pre element does not strip a leading newline character
Product: WebKit Reporter: Ryou Ezoe <boostcpp>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
test case (seems to work correctly) none

Ryou Ezoe
Reported 2011-04-25 21:38:48 PDT
In the HTML5 specification. pre element has this note. Note: In the HTML syntax, a leading newline character immediately following the pre element start tag is stripped. So for a following markup(including newline) <pre> a </pre> Webkit must strip a leading newline and behave as if it is written as <pre>a </pre> Also, textContent for this pre element's node must be "a\n".
Attachments
test case (seems to work correctly) (105 bytes, text/html)
2011-04-26 09:45 PDT, Alexey Proskuryakov
no flags
Alexey Proskuryakov
Comment 1 2011-04-26 09:45:43 PDT
Created attachment 91119 [details] test case (seems to work correctly)
Alexey Proskuryakov
Comment 2 2011-04-26 09:46:31 PDT
It seems to work that way in both Safari/WebKit 5.0.5 and a recent local build. Where is it broken?
Ryou Ezoe
Comment 3 2011-04-26 17:40:10 PDT
Sorry. I misinterpret the spec. A leading newline is stripped only in the HTML syntax. I tested it in XHTML. I want this report to be closed. Sorry for not add comment immediately. I couldn't figure out how to search my report.
Alexey Proskuryakov
Comment 4 2011-04-26 19:26:37 PDT
Thank you for following up on this!
Note You need to log in before you can comment on or make changes to this bug.