Closed
Bug 212133
Opened 21 years ago
Closed 21 years ago
[FIXr]Images flub xml:base
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.5beta
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
()
Details
Attachments
(1 file, 1 obsolete file)
4.23 KB,
patch
|
caillon
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
The basic problem is that the load is kicked off at attr-setting time, before we
have a parent...
This also causes problems at http://www.hixie.ch/tests/adhoc/xml/base/002.xml
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #127324 -
Flags: superreview?(jst)
Attachment #127324 -
Flags: review?(caillon)
Comment 2•21 years ago
|
||
Comment on attachment 127324 [details] [diff] [review]
Proposed patch
>@@ -388,20 +388,34 @@ nsImageLoadingContent::ImageURIChanged(c
>+ // Do we actually need to do anything?
>+ nsCOMPtr<nsIURI> existingURI;
This can be inside the if.
>+ nsCOMPtr<imgIRequest> request = mPendingRequest ? mPendingRequest : mCurrentRequest;
>+ if (request) {
>+ request->GetURI(getter_AddRefs(existingURI));
> NS_IMETHODIMP
> nsHTMLImageElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
> const nsAString& aValue, PRBool aNotify)
> {
>- // Call ImageURIChanged first so that the image load kicks off
>- // _before_ the reflow triggered by the SetAttr
>- if (aNameSpaceID == kNameSpaceID_None && aName == nsHTMLAtoms::src) {
>+ // Call ImageURIChanged first so that the image load kicks off _before_ the
>+ // reflow triggered by the SetAttr. If aNotify is false, we are coming from
>+ // the parser or some such place; we'll get our parent set after all the
>+ // attributes have been set, so we'll do the image load from SetParent.
This comment now has a strange feeling to it (the thing it talks about first
comes after the thing it talks about second in the source). Perhaps moving the
"Call ImageURIChanged..." portion inside the if would help?
>+ if (aNotify &&
>+ aNameSpaceID == kNameSpaceID_None && aName == nsHTMLAtoms::src) {
> ImageURIChanged(aValue);
>+NS_IMETHODIMP
>+nsHTMLImageElement::SetDocument(nsIDocument* aDocument, PRBool aDeep,
>+ PRBool aCompileEventHandlers)
>+{
>+ nsresult rv = nsGenericHTMLLeafElement::SetDocument(aDocument, aDeep,
>+ aCompileEventHandlers);
>+ if (aDocument && mParent) {
>+ // Our base url may have changed; claim that our URI changed, and the
"Our base url" ... could you use URI instead of url? And in SetParent() below
as well?
r=me.
Attachment #127324 -
Flags: review?(caillon) → review+
Comment 3•21 years ago
|
||
Comment on attachment 127324 [details] [diff] [review]
Proposed patch
sr=jst
Attachment #127324 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 4•21 years ago
|
||
Made those changes, as well as a change to nsImageDocument to not reenable the
image loading content till after it's been appended to its parent, and checked
in for 1.5a.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Summary: Images flub xml:base → Images flub xml:base
Assignee | ||
Comment 5•21 years ago
|
||
I had to back this out due to perf issues. Basically, SetDocument() is called
twice on every node during parsing and the check in nsImageLoadingContent, while
helping some, was itself not so cheap.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•21 years ago
|
||
This should be faster, I think....
Attachment #127324 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #127394 -
Flags: superreview?(jst)
Attachment #127394 -
Flags: review?(caillon)
Assignee | ||
Updated•21 years ago
|
Priority: -- → P2
Summary: Images flub xml:base → [FIX]Images flub xml:base
Target Milestone: --- → mozilla1.5beta
Comment 7•21 years ago
|
||
Attachment #127394 -
Flags: review?(caillon) → review+
Comment 8•21 years ago
|
||
Comment on attachment 127394 [details] [diff] [review]
Proposed better patch
sr=jst
Attachment #127394 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Updated•21 years ago
|
Summary: [FIX]Images flub xml:base → [FIXr]Images flub xml:base
Assignee | ||
Comment 9•21 years ago
|
||
Checked in. Here's hoping that sticks to the tree.... (insofar as I can
determine perf regressions at all in today's frenzy :( ).
Status: REOPENED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•21 years ago
|
||
Luck is not with us.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 11•21 years ago
|
||
Checked in again; last backout was a false alarm.
Status: REOPENED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•