Closed
Bug 137315
Opened 23 years ago
Closed 21 years ago
[FIXr]Incorrect line numbers in HTML files (part 2)
Categories
(Core :: DOM: HTML Parser, defect, P3)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla1.7beta
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(3 files, 2 obsolete files)
641 bytes,
text/html
|
Details | |
367 bytes,
text/html
|
Details | |
9.70 KB,
patch
|
Details | Diff | Splinter Review |
This is a followup to bug 111576. The patch there does not handle newlines
correctly in the following types of tokens:
1) CDATA tokens
2) Attribute value tokens
Assignee | ||
Comment 1•23 years ago
|
||
Load the testcase and look at the line number reported for the error in the JS
console...
Assignee | ||
Comment 2•23 years ago
|
||
Yes, I'm aware of the attribute value issue.
Comment in bug 111576:
------- Additional Comment #46 From harishd@netscape.com 2002-03-21 15:56 -------
FYI: The patch still has a problem with newlines within quoted attribute values
--
I recluctant to fix it because I expected perf. hit. Boris, do you see any
performance problems with your patch?
Comment on attachment 79085 [details] [diff] [review]
Proposed fix v 1.0
> static const PRUnichar theTerminalCharsQuote[] = {
>- PRUnichar(kQuote), PRUnichar('&'), PRUnichar(0) };
>+ PRUnichar(kQuote), PRUnichar('&'), PRUnichar(kCR),
>+ PRUnichar(kNewLine), PRUnichar(0) };
> static const PRUnichar theTerminalCharsApostrophe[] = {
>- PRUnichar(kApostrophe), PRUnichar('&'), PRUnichar(0) };
>+ PRUnichar(kApostrophe), PRUnichar('&'), PRUnichar(kCR),
>+ PRUnichar(kNewLine), PRUnichar(0) };
I'm a bit worried about this because it changes the current behavior. Boris,
how well have to tested this? Have you made sure that cases like name="value\n"
,name=\nvalue\n etc. work correctly?
Assignee | ||
Comment 5•23 years ago
|
||
Assignee | ||
Comment 6•23 years ago
|
||
I haven't noticed any perf issues, but I haven't rigorously tested performance
either.... Having an idea of what to test, would be great. Should I just try
to get someone to run the pageload tests?
I tested attr="foo\nbar", and attached is a testcase that tests the other
possibilities you mention. In all cases our behavior is the same as it was
before my change.
If attr values in particular are an issue, I can split out the CDATA part of the
patch and land that separately (that part is a lot less scary :)).
Now that I read bug 111576 again, the newline counter in the scanner that you
mention sounds like a much better idea... if you're going to implement that
anyway, I think I'd be ok with just fixing CDATA for 1.0 and leaving attribute
values to be fixed by the "real fix".
>Now that I read bug 111576 again, the newline counter in the scanner that you
>mention sounds like a much better idea... if you're going to implement that
>anyway, I think I'd be ok with just fixing CDATA for 1.0 and leaving attribute
>values to be fixed by the "real fix".
If you're confident with your changes then go ahead [ provided page-load perf. /
browser buster tests (komodo.mozilla.org/buster) pass :) ].
Anyway, since you've done all the work reassigning bug to you ;)
Assignee: harishd → bzbarsky
Assignee | ||
Comment 8•23 years ago
|
||
jrgm, could you run this patch through the pageload test? Or is there a way I
can land it on a tinderbox machine that runs pageload tests and see what the
result is?
Assignee | ||
Updated•23 years ago
|
Priority: -- → P2
Summary: Incorrect line numbers in HTML files (part 2) → [FIX]Incorrect line numbers in HTML files (part 2)
Target Milestone: --- → mozilla1.1beta
Boris: If I get the time I will run your patch through the page load tests today.
Assignee | ||
Updated•23 years ago
|
Priority: P2 → P1
Target Milestone: mozilla1.1beta → mozilla1.2alpha
Assignee | ||
Updated•22 years ago
|
Target Milestone: mozilla1.2alpha → mozilla1.2beta
Assignee | ||
Comment 10•22 years ago
|
||
I don't think I care anymore.
Assignee: bzbarsky → harishd
Priority: P1 → --
Target Milestone: mozilla1.2beta → ---
Updated•22 years ago
|
Priority: -- → P3
QA Contact: moied → dsirnapalli
Comment 11•21 years ago
|
||
Out of interest, has Bug #208030 fixed this issue as well? I don't have a
working build with that patch in, so I can't check.
Assignee | ||
Comment 12•21 years ago
|
||
It couldn't possibly have fixed it, since it was an internal JS engine fix,
whereas this bug is about incorrect line numbers being reported to the JS engine
as "start" line numbers for scripts.
Harish, the more I think about this the more I think it should not be a big perf
issue... If there is no way to get perf results, I would like to just land this
during a quiet spell, watch tinderbox, and back out if there are perf issues.
If you're ok with that, could you please, r= the patch?
Assignee | ||
Comment 13•21 years ago
|
||
Attachment #79085 -
Attachment is obsolete: true
Assignee | ||
Comment 14•21 years ago
|
||
Comment on attachment 141378 [details] [diff] [review]
Merged to trunk
choess, since I'm not likely to get r=harish, could I get r=you? ;)
Attachment #141378 -
Flags: review?(choess)
Comment 15•21 years ago
|
||
Comment on attachment 141378 [details] [diff] [review]
Merged to trunk
Looks good to me.
Attachment #141378 -
Flags: review?(choess) → review+
Assignee | ||
Comment 16•21 years ago
|
||
Comment on attachment 141378 [details] [diff] [review]
Merged to trunk
jst, what do you think? This should make our line number reporting in the JS
console finally right...
Attachment #141378 -
Flags: superreview?(jst)
Comment 17•21 years ago
|
||
Comment on attachment 141378 [details] [diff] [review]
Merged to trunk
Looks good. sr=jst
Attachment #141378 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Updated•21 years ago
|
Assignee: harishd → bzbarsky
Status: ASSIGNED → NEW
Summary: [FIX]Incorrect line numbers in HTML files (part 2) → [FIXr]Incorrect line numbers in HTML files (part 2)
Target Milestone: mozilla1.5alpha → mozilla1.7beta
Assignee | ||
Comment 18•21 years ago
|
||
Attachment #141378 -
Attachment is obsolete: true
Assignee | ||
Comment 19•21 years ago
|
||
Checked in for 1.7b. Tinderbox shows no perfomance impact from this change.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 20•21 years ago
|
||
attachment 141778 [details] [diff] [review]:
Nit: methods' comments have different number of parameters than actual methods.
Assignee | ||
Comment 21•21 years ago
|
||
I'm aware of that. Note that this is a problem without this patch too... and
since I knew that someone else (choess) is working on comments in the parser in
general I didn't change them for now to save him the pain of merging in fixes
that he's making anyway.
Assignee | ||
Comment 22•21 years ago
|
||
This caused bug 235171
You need to log in
before you can comment on or make changes to this bug.
Description
•