Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2564633002: Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: Add new layout tests. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 const AtomicString& name, 1583 const AtomicString& name,
1584 HTMLFrameOwnerElement* ownerElement) { 1584 HTMLFrameOwnerElement* ownerElement) {
1585 DCHECK(m_client); 1585 DCHECK(m_client);
1586 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe"); 1586 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe");
1587 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() 1587 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope()
1588 ? WebTreeScopeType::Document 1588 ? WebTreeScopeType::Document
1589 : WebTreeScopeType::Shadow; 1589 : WebTreeScopeType::Shadow;
1590 WebFrameOwnerProperties ownerProperties( 1590 WebFrameOwnerProperties ownerProperties(
1591 ownerElement->scrollingMode(), ownerElement->marginWidth(), 1591 ownerElement->scrollingMode(), ownerElement->marginWidth(),
1592 ownerElement->marginHeight(), ownerElement->allowFullscreen(), 1592 ownerElement->marginHeight(), ownerElement->allowFullscreen(),
1593 ownerElement->csp(), ownerElement->delegatedPermissions()); 1593 ownerElement->isDisplayNone(), ownerElement->csp(),
1594 ownerElement->delegatedPermissions());
1594 // FIXME: Using subResourceAttributeName as fallback is not a perfect 1595 // FIXME: Using subResourceAttributeName as fallback is not a perfect
1595 // solution. subResourceAttributeName returns just one attribute name. The 1596 // solution. subResourceAttributeName returns just one attribute name. The
1596 // element might not have the attribute, and there might be other attributes 1597 // element might not have the attribute, and there might be other attributes
1597 // which can identify the element. 1598 // which can identify the element.
1598 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFrame( 1599 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFrame(
1599 name, 1600 name,
1600 ownerElement->getAttribute(ownerElement->subResourceAttributeName())); 1601 ownerElement->getAttribute(ownerElement->subResourceAttributeName()));
1601 WebLocalFrameImpl* webframeChild = 1602 WebLocalFrameImpl* webframeChild =
1602 toWebLocalFrameImpl(m_client->createChildFrame( 1603 toWebLocalFrameImpl(m_client->createChildFrame(
1603 this, scope, name, uniqueName, 1604 this, scope, name, uniqueName,
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2342 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2342 } 2343 }
2343 UseCounter::count(frame(), feature); 2344 UseCounter::count(frame(), feature);
2344 } 2345 }
2345 2346
2346 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { 2347 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const {
2347 return m_inputMethodController.get(); 2348 return m_inputMethodController.get();
2348 } 2349 }
2349 2350
2350 } // namespace blink 2351 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698