Closed Bug 1075279 Opened 10 years ago Closed 10 years ago

GetCurrentDoc fixes in content/html

Categories

(Core :: DOM: Core & HTML, defect)

34 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: smaug, Assigned: smaug)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached patch v1Splinter Review
https://tbpl.mozilla.org/?tree=Try&rev=ad1ddb82bd2f

Still quite some XXX comments.
Attachment #8497898 - Flags: review?(wchen)
Comment on attachment 8497898 [details] [diff] [review]
v1

Review of attachment 8497898 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/html/content/src/HTMLLinkElement.cpp
@@ +183,5 @@
>    // ShadowRoot.
>    ShadowRoot* oldShadowRoot = GetBindingParent() ?
>      GetBindingParent()->GetShadowRoot() : nullptr;
>  
>    if (oldDoc && !oldShadowRoot) {

Since the fix in bug 1074738 is going to be updating link state for <link> in the composed tree, we probably want to use the composed document here just to call UnregisterPendingLinkUpdate and we should remove the !oldShadowRoot in this expression.

Same thing for HTMLLinkElement::BindToTree, we should use the composed doc for RegisterPendingLinkUpdate and remove !ContainingShadow() in the if condition.
Attachment #8497898 - Flags: review?(wchen) → review+
Attached patch v2Splinter Review
Assignee: nobody → bugs
https://hg.mozilla.org/mozilla-central/rev/a9bf2deaec5d
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.