mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1049010, layout should use composed doc, not current doc in many cases, r=wchen
--HG-- extra : rebase_source : 42ce2eebfd38ea2e6dbe5711954c601f19d72467
This commit is contained in:
parent
70bc61a2af
commit
3390dd919d
@ -62,7 +62,7 @@ nsColorControlFrame::GetFrameName(nsAString& aResult) const
|
||||
nsresult
|
||||
nsColorControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
|
||||
{
|
||||
nsCOMPtr<nsIDocument> doc = mContent->GetCurrentDoc();
|
||||
nsCOMPtr<nsIDocument> doc = mContent->GetComposedDoc();
|
||||
mColorContent = doc->CreateHTMLElement(nsGkAtoms::div);
|
||||
|
||||
// Mark the element to be native anonymous before setting any attributes.
|
||||
|
@ -1466,7 +1466,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
|
||||
// draw a focus indicator only when focus rings should be drawn
|
||||
nsIDocument* doc = mContent->GetCurrentDoc();
|
||||
nsIDocument* doc = mContent->GetComposedDoc();
|
||||
if (doc) {
|
||||
nsPIDOMWindow* window = doc->GetWindow();
|
||||
if (window && window->ShouldShowFocusRing()) {
|
||||
|
@ -632,7 +632,7 @@ void nsTextControlFrame::SetFocus(bool aOn, bool aRepaint)
|
||||
if (!isFocusedRightNow) {
|
||||
// Don't scroll the current selection if we've been focused using the mouse.
|
||||
uint32_t lastFocusMethod = 0;
|
||||
nsIDocument* doc = GetContent()->GetCurrentDoc();
|
||||
nsIDocument* doc = GetContent()->GetComposedDoc();
|
||||
if (doc) {
|
||||
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
if (fm) {
|
||||
|
@ -165,7 +165,7 @@ nsBoxObject::GetOffsetRect(nsIntRect& aRect)
|
||||
nsPoint origin = frame->GetPositionIgnoringScrolling();
|
||||
|
||||
// Find the frame parent whose content is the document element.
|
||||
Element *docElement = mContent->GetCurrentDoc()->GetRootElement();
|
||||
Element* docElement = mContent->GetComposedDoc()->GetRootElement();
|
||||
nsIFrame* parent = frame->GetParent();
|
||||
for (;;) {
|
||||
// If we've hit the document element, break here
|
||||
|
@ -2522,7 +2522,7 @@ nsTreeBodyFrame::GetCursor(const nsPoint& aPoint,
|
||||
// Check the GetScriptHandlingObject so we don't end up running code when
|
||||
// the document is a zombie.
|
||||
bool dummy;
|
||||
if (mView && GetContent()->GetCurrentDoc()->GetScriptHandlingObject(dummy)) {
|
||||
if (mView && GetContent()->GetComposedDoc()->GetScriptHandlingObject(dummy)) {
|
||||
int32_t row;
|
||||
nsTreeColumn* col;
|
||||
nsIAtom* child;
|
||||
@ -2803,7 +2803,7 @@ nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
// Bail out now if there's no view or we can't run script because the
|
||||
// document is a zombie
|
||||
if (!mView || !GetContent()->GetCurrentDoc()->GetWindow())
|
||||
if (!mView || !GetContent ()->GetComposedDoc()->GetWindow())
|
||||
return;
|
||||
|
||||
aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
|
Loading…
Reference in New Issue
Block a user