Closed
Bug 663375
Opened 13 years ago
Closed 13 years ago
css media="print" text-decoration styles not being processed correctly
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: ronaa, Assigned: MatsPalmgren_bugz)
References
()
Details
(Keywords: testcase)
Attachments
(4 files, 2 obsolete files)
476 bytes,
text/html
|
Details | |
460 bytes,
text/html
|
Details | |
13.64 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
13.58 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Not all properties of a style within a <style media="print"> tag are being processed, such as color, background-color and text-decoration. Reproducible: Always Steps to Reproduce: 1. Invoke http://www.armonkplayers.org/reservations/test.html 2. Observe page as displayed in browser. 3. Do a "Print Preview" or Print Actual Results: The contents of the second table cell (BBB) is properly printed twice as large as the other cells, but the color, background-color and text-decoration properties are wrong. Expected Results: The second cell should be white text on a black background and underlined. The style sheets in question: <style type="text/css"> .b { color: red; background-color: white; text-decoration: line-through; } </style> <style type="text/css" media="print"> .b { color: white; background-color: black; text-decoration: underline; font-size: 200% } </style>
Comment 1•13 years ago
|
||
Works for me on http://hg.mozilla.org/mozilla-central/rev/1619d8fc6416 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110610 Firefox/7.0a1 ID:20110610030736 Check "Print Background (colors & images)" in File – Page Setup… dialog.
Comment 2•13 years ago
|
||
WFM too against Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 ID:20110413222027 with "Print Background (colors & images)" checked.
Version: unspecified → 4.0 Branch
Reporter | ||
Comment 3•13 years ago
|
||
I am sorry to have "spun your wheels". I suppose the folks at Mozilla figure that if you are not honoring 'background-color', then you really cannot honor 'color' either. But what is the rationale for ignoring 'text-decoration'? So all in all, this is a print option that goes a bit beyond what I would expect. Anyway, thanks for your time.
Assignee | ||
Comment 4•13 years ago
|
||
Seems like a valid bug to me. We should do the same color mangling for the text-decoration lines as we do for the text.
Assignee: nobody → matspal
Severity: major → normal
Status: UNCONFIRMED → ASSIGNED
Component: General → Layout
Ever confirmed: true
Keywords: testcase
OS: Windows 7 → All
Product: Firefox → Core
QA Contact: general → layout
Hardware: x86 → All
Summary: css media="print" styles not being processed correctly → css media="print" text-decoration styles not being processed correctly
Version: 4.0 Branch → unspecified
Assignee | ||
Comment 5•13 years ago
|
||
Assignee | ||
Comment 6•13 years ago
|
||
Assignee | ||
Comment 7•13 years ago
|
||
Something like this... should merge the nsLayoutUtils::GetColor with part 2 in bug 312156 which does mostly the same thing.
Likely best to hold off on this until bug 403524 lands.
Assignee | ||
Comment 9•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #538802 -
Attachment is obsolete: true
Assignee | ||
Comment 10•13 years ago
|
||
updated to tip
Attachment #538804 -
Attachment is obsolete: true
Attachment #551559 -
Flags: review?(dbaron)
Comment on attachment 551559 [details] [diff] [review] fix >- } while (context && hasDecorationLines && (0 != decorMask)); >+ } while (0 != decorMask && >+ NS_SUCCEEDED(f->GetParentStyleContextFrame(presContext, &f, &isChild)) && >+ f); GetParentStyleContextFrame is intended for use only when reconstructing the style contexts. You either want to continue walking up the style context tree as this code was, or you should use nsLayoutUtils::GetParentOrPlaceholderFor. (Though, really, this code should be entirely rewritten... or we should just find a way to get rid of nsTextBoxFrame. Not for this patch, though.) r=dbaron with that
Attachment #551559 -
Flags: review?(dbaron) → review+
Comment on attachment 551559 [details] [diff] [review] fix >- const nscolor color = useOverride ? overrideColor >- : context->GetVisitedDependentColor(eCSSProperty_text_decoration_color); >+ const nscolor color = useOverride ? overrideColor : >+ nsLayoutUtils::GetColor(f, eCSSProperty_text_decoration_color); And please leave the : on the following line.
Assignee | ||
Comment 13•13 years ago
|
||
Assignee | ||
Comment 14•13 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/e9f6607a3990
Flags: in-testsuite?
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
Comment 15•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/e9f6607a3990
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
You need to log in
before you can comment on or make changes to this bug.
Description
•