Closed
Bug 547267
Opened 15 years ago
Closed 15 years ago
nsStyleVisibility should default to the document's Content-Language
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(2 files, 1 obsolete file)
2.81 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
2.77 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
See Bug 524107 comment #12.
If there's no explicit 'lang' attribute in scope, nsStyleVisibility should fall back to the document's Content-Language in preference to a language (group) guessed from the charset.
Assignee | ||
Comment 1•15 years ago
|
||
Based on instrumenting the nsStyleVisibility constructor to see what language codes it finds, this seems to be doing the right thing. I guess we should really have a unit test for it though.
Assignee: nobody → jfkthame
Attachment #427922 -
Flags: review?(roc)
Comment on attachment 427922 [details] [diff] [review]
patch, v1
Style system stuff probably needs dbaron...
Attachment #427922 -
Flags: review?(roc) → review?(dbaron)
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #427922 -
Attachment is obsolete: true
Attachment #428795 -
Flags: review?(dbaron)
Attachment #427922 -
Flags: review?(dbaron)
Comment on attachment 428795 [details] [diff] [review]
patch, v2 - updated after landing of bug 524107
>+ /**
>+ * Give access to our nsILanguageAtomService, so that others don't
>+ * have to look up the service separately and manage their own
>+ * references.
>+ */
>+ nsILanguageAtomService* GetLangService() const { return mLangService; }
It looks like this isn't actually used. Remove it?
Other than that, this looks fine, although I think the code would be easier to understand if nsPresContext::GetLanguage were called nsPresContext::GetLanguageFromCharset or something ugly like that. Maybe worth a followup patch?
r=dbaron
Attachment #428795 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 5•15 years ago
|
||
(In reply to comment #4)
> >+ nsILanguageAtomService* GetLangService() const { return mLangService; }
>
> It looks like this isn't actually used. Remove it?
You're right - that was left over from the first version of the patch, but no longer needed since bug 524107 landed.
Pushed http://hg.mozilla.org/mozilla-central/rev/433f8ac169b1
Assignee | ||
Comment 6•15 years ago
|
||
(In reply to comment #4)
> I think the code would be easier to
> understand if nsPresContext::GetLanguage were called
> nsPresContext::GetLanguageFromCharset or something ugly like that. Maybe worth
> a followup patch?
Yes, I think that would be good. Turns out this is only used in two places, AFAICT, so the followup is trivial.
Attachment #429056 -
Flags: review?(dbaron)
Comment on attachment 429056 [details] [diff] [review]
followup: rename nsPresContext::GetLanguage to GetLanguageFromCharset
r=dbaron
The canvas caller could probably be improved at some point, too...
Attachment #429056 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 8•15 years ago
|
||
(In reply to comment #7)
> The canvas caller could probably be improved at some point, too...
Yes, I was just looking at that, but will file a separate bug on it.
Assignee | ||
Comment 9•15 years ago
|
||
Pushed followup:
http://hg.mozilla.org/mozilla-central/rev/d928716e11bb
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•