Closed
Bug 334765
Opened 19 years ago
Closed 18 years ago
Google calendar creates appointments for the wrong dates
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: sharparrow1, Assigned: roc)
References
()
Details
(Keywords: testcase)
Attachments
(2 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Steps:
1. Scroll down in view of week
2. Click to create appointment
Expected results:
Appointment time is the time that was clicked
Actual results:
Appointment time offset by some amount which depends on where you are scrolled.
The bug is in nsGenericHTMLElement::GetOffsetRect; bug 328881 changed the way adding up frame offsets works.
Testcase coming up.
Reporter | ||
Comment 1•19 years ago
|
||
Assignee | ||
Comment 2•19 years ago
|
||
*** Bug 330619 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 3•19 years ago
|
||
1) Ignore scroll position while compute offset rects for boxobjects and HTML elements
2) Move code to union continuation rects into a shared function
Assignee: general → roc
Status: NEW → ASSIGNED
Attachment #220044 -
Flags: superreview?(dbaron)
Attachment #220044 -
Flags: review?(dbaron)
Updated•18 years ago
|
Flags: blocking1.9a1?
Comment 4•18 years ago
|
||
FWIW, I can confirm that this does indeed fix the google calendar regression.
Updated•18 years ago
|
Flags: blocking1.9a1? → blocking1.9a1+
Comment 6•18 years ago
|
||
(In reply to comment #5)
> erm. why isn't this in cvs? or is it?
Because it's still waiting for r/sr?
Comment 7•18 years ago
|
||
roc, once this lands the fixed-pos code in nsHTMLReflowState::CalculateHypotheticalBox should also switch to nsLayoutUtils::GetOffsetIgnoringScrolling, right?
Assignee | ||
Comment 8•18 years ago
|
||
Yes.
Assignee | ||
Comment 9•18 years ago
|
||
Comment on attachment 220044 [details] [diff] [review]
fix
Tossing the review to Boris.
Attachment #220044 -
Flags: superreview?(dbaron)
Attachment #220044 -
Flags: superreview?(bzbarsky)
Attachment #220044 -
Flags: review?(dbaron)
Attachment #220044 -
Flags: review?(bzbarsky)
Comment 10•18 years ago
|
||
Comment on attachment 220044 [details] [diff] [review]
fix
>Index: layout/base/nsLayoutUtils.cpp
>+nsLayoutUtils::GetUnionOfAllRects(nsIFrame* aFrame)
Should this guard against aFrame->GetParent() being null? It'll crash at the moment if that happens.
>Index: layout/base/nsLayoutUtils.h
>+ * @return the offset of aFrame from its parent, as if it was scrolled to
s/was/were/
r+sr=bzbarsky with those nits; let's do the reflow state change in a followup.
Attachment #220044 -
Flags: superreview?(bzbarsky)
Attachment #220044 -
Flags: superreview+
Attachment #220044 -
Flags: review?(bzbarsky)
Attachment #220044 -
Flags: review+
Assignee | ||
Comment 11•18 years ago
|
||
(In reply to comment #10)
> (From update of attachment 220044 [details] [diff] [review] [edit])
> >Index: layout/base/nsLayoutUtils.cpp
> >+nsLayoutUtils::GetUnionOfAllRects(nsIFrame* aFrame)
>
> Should this guard against aFrame->GetParent() being null? It'll crash at the
> moment if that happens.
Yes. I'll just return aFrame->GetRect() in that case (there can't be continuations).
Assignee | ||
Comment 12•18 years ago
|
||
checked in
Assignee | ||
Comment 13•18 years ago
|
||
This may have caused a Tp regression on btek :-(
Comment 14•18 years ago
|
||
I wonder if this is also responsible for Thunderbird crazyhorse orange.
Comment 15•18 years ago
|
||
(In reply to comment #14)
> I wonder if this is also responsible for Thunderbird crazyhorse orange.
>
Evidently not.
Assignee | ||
Comment 16•18 years ago
|
||
Backing out seemed to show that this is indeed the cause of the btek regression :-(.
But do these GetOffsetRect functions actually get called during Tp? Through XUL maybe? Tomorrow I'll try relanding just the HTML part of the fix.
Comment 17•18 years ago
|
||
I wouldn't be surprised if the Tp pages call those functions... you could breakpoint and run Tp and see?
Assignee | ||
Comment 18•18 years ago
|
||
I added printfs to nsBoxObject::GetOffsetRect and nsGenericHTMLElement::GetOffsetRect. They don't get hit during Tp :-|.
Assignee | ||
Comment 19•18 years ago
|
||
Alright, here's a new approach. It should be faster than the previous try, just in case that matters, and it also changes only nsBoxObject for now. Basically I've added a custom method to nsIFrame to avoid the QueryInterface call.
If this lands, and it doesn't perturb btek or anyone else, then I'll make another patch for nsGenericHTMLElement offsetX/Y.
Attachment #220044 -
Attachment is obsolete: true
Attachment #225540 -
Flags: superreview?(bzbarsky)
Attachment #225540 -
Flags: review?(bzbarsky)
Comment 20•18 years ago
|
||
Comment on attachment 225540 [details] [diff] [review]
new patch
>Index: layout/generic/nsGfxScrollFrame.h
>+ if (aChild == mInner.GetScrolledFrame()) pt += GetScrollPosition();
...
>+ if (aChild == mInner.GetScrolledFrame()) pt -= GetScrollPosition();
Those can't both be right. The += should be what you want, right?
r+sr=bzbarsky with that fixed.
Attachment #225540 -
Flags: superreview?(bzbarsky)
Attachment #225540 -
Flags: superreview+
Attachment #225540 -
Flags: review?(bzbarsky)
Attachment #225540 -
Flags: review+
Assignee | ||
Comment 21•18 years ago
|
||
Yes, += is what I want, and what I tested :-|
Assignee | ||
Comment 22•18 years ago
|
||
checked in. Waiting for performance results...
Assignee | ||
Comment 23•18 years ago
|
||
No btek regression this time. This regression is fixed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Verified FIXED for me using build 2006-06-19-10 of SeaMonkey trunk under Windows XP with the Google Calendar application at http://www.google.com/calendar/render?pli=1. Dates can now be correctly chosen.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•