Closed Bug 15282 Opened 25 years ago Closed 24 years ago

selection code should respect style context settings

Categories

(Core :: DOM: Selection, defect, P1)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: buster, Assigned: attinasi)

References

()

Details

(Keywords: css3, polish, Whiteboard: [Need Info])

today, selection painting is hard-coded.
all the UI properties from CSS-3 are implemented in gecko, so we should start
using them.
this has several parts:
(1) for every frame, selection must look at the nsStyleUserInterface part of the
nsStyleContext to determine if the frame is selectable or not
(2)if the frame is selectable, selection must ask the style context how to
render the selection.  possibilities include invert, system
highlight foreground/background colors, outline, etc.
(3) once selection respects style, we need to add proper defaults to UA.CSS and
possibly other style sheets like the edit non-wysiwyg style sheet.
For example, the syntax for allowing selection of visible named anchors would
be:
a[name]: before {
  content : url(the_image_we_display);
  user-select : element;
}

the autocomplete stuff would probably be
whatever_acw_uses: before {
  user-select : none;
}

Peter will add some extra info about how to do this efficiently, how to protect
ourselves against style sheets causing reflows during selection (we'll
effectively forbid it), etc.
a reasonable default for us.css would be
:selection { background-color: Highlight; color: HighlightText; }
where Highlight and HighlightText should already implemented on all platforms to
get the system colors.  (See Rods if there is a platform where this is not
true.)
There would also be some !important properties added to this style rule to
prevent reflows during selection, peterl has details.
Summary: selection code should respect style context settings → {css3} selection code should respect style context settings
*** Bug 16148 has been marked as a duplicate of this bug. ***
Blocks: 16170
*** Bug 4542 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Target Milestone: M14
setting the milestone to M14 and setting status to assigned
Keywords: css3
Summary: {css3} selection code should respect style context settings → selection code should respect style context settings
Target Milestone: M14 → M15
OS: Windows NT → All
Priority: P3 → P1
Hardware: PC → All
moving to m16
Target Milestone: M15 → M16
updating keyword and status whiteboard to reflect that this is a beta 2 feature 
work bug that the Composer team deems a must fix for beta 2.
Severity: normal → major
Keywords: beta2
Whiteboard: Composer feature work
Keywords: nsbeta2
[nsbeta2+ until 5/16]
Whiteboard: Composer feature work → [nsbeta2+ until 5/16] Composer feature work
nominate for nsbeta3, setting to m17 and updating keyword and whiteboard
Keywords: nsbeta2nsbeta3
Whiteboard: [nsbeta2+ until 5/16] Composer feature work
Target Milestone: M16 → M17
tring to bounce this to marc. sounds like your cup of tea.
Assignee: mjudge → attinasi
Status: ASSIGNED → NEW
What is it I am suppossed to be doing here? Style alerady supports the 
user-select property. Please advise and explain how this is my cup of tea.
Keywords: polish
Adding Need Info to status whiteboard - I don't understand the problem that is 
being reported, ergo I don't understand how I can fix it.
Whiteboard: [Need Info]
New milestone: still hoping somebody can clue me in to what is suppossed to be 
done here...
Target Milestone: M17 → M20
CC'ing Pierre - I think we are done with this bug, no?
I'm getting the feeling that nobody cares about (or understands) this bug...

I need to know what it is about, why it was assigned to me, why it is important 
for beta3, and ONLY THEN can I actually do something with it. If there is no 
traction on this bug in the next few days it is getting closed.
This bug is outdated. We obey 'user-select', although not correcty yet (this is 
bug 42864 that I'm going to check in later today) and we also use the colors from 
the LookAndFeel, which gets them from the OS.

Marking fixed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Thanks Pierre!
*SPAM*: Changing the QA contact of all open/resolved Selection bugs from 
elig@netscape.com to BlakeR1234@aol.com.  After the many great years of service 
Eli has given to Mozilla, it's time for him to move on; he has accepted a 
position at Eazel.  We'll be sad to see him go, and I'll do my best to fill his 
spot...
QA Contact: elig → BlakeR1234
You need to log in before you can comment on or make changes to this bug.