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

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

Issue 2743053003: [Reland #1] Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: Fix DOM object leaks. Diff this against Patch Set 10. Created 3 years, 9 months 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 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 HTMLFrameOwnerElement* ownerElement) { 1630 HTMLFrameOwnerElement* ownerElement) {
1631 DCHECK(m_client); 1631 DCHECK(m_client);
1632 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe"); 1632 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe");
1633 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() 1633 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope()
1634 ? WebTreeScopeType::Document 1634 ? WebTreeScopeType::Document
1635 : WebTreeScopeType::Shadow; 1635 : WebTreeScopeType::Shadow;
1636 WebFrameOwnerProperties ownerProperties( 1636 WebFrameOwnerProperties ownerProperties(
1637 ownerElement->browsingContextContainerName(), 1637 ownerElement->browsingContextContainerName(),
1638 ownerElement->scrollingMode(), ownerElement->marginWidth(), 1638 ownerElement->scrollingMode(), ownerElement->marginWidth(),
1639 ownerElement->marginHeight(), ownerElement->allowFullscreen(), 1639 ownerElement->marginHeight(), ownerElement->allowFullscreen(),
1640 ownerElement->allowPaymentRequest(), ownerElement->csp(), 1640 ownerElement->allowPaymentRequest(), ownerElement->isDisplayNone(),
1641 ownerElement->delegatedPermissions(), ownerElement->allowedFeatures()); 1641 ownerElement->csp(), ownerElement->delegatedPermissions(),
1642 ownerElement->allowedFeatures());
1642 // FIXME: Using subResourceAttributeName as fallback is not a perfect 1643 // FIXME: Using subResourceAttributeName as fallback is not a perfect
1643 // solution. subResourceAttributeName returns just one attribute name. The 1644 // solution. subResourceAttributeName returns just one attribute name. The
1644 // element might not have the attribute, and there might be other attributes 1645 // element might not have the attribute, and there might be other attributes
1645 // which can identify the element. 1646 // which can identify the element.
1646 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFrame( 1647 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFrame(
1647 name, 1648 name,
1648 ownerElement->getAttribute(ownerElement->subResourceAttributeName())); 1649 ownerElement->getAttribute(ownerElement->subResourceAttributeName()));
1649 WebLocalFrameImpl* webframeChild = 1650 WebLocalFrameImpl* webframeChild =
1650 toWebLocalFrameImpl(m_client->createChildFrame( 1651 toWebLocalFrameImpl(m_client->createChildFrame(
1651 this, scope, name, uniqueName, 1652 this, scope, name, uniqueName,
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2463 createMarkup(startPosition, endPosition, AnnotateForInterchange, 2464 createMarkup(startPosition, endPosition, AnnotateForInterchange,
2464 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2465 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2465 } else { 2466 } else {
2466 clipHtml = 2467 clipHtml =
2467 createMarkup(endPosition, startPosition, AnnotateForInterchange, 2468 createMarkup(endPosition, startPosition, AnnotateForInterchange,
2468 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2469 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2469 } 2470 }
2470 } 2471 }
2471 2472
2472 } // namespace blink 2473 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698