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

Unified Diff: Source/core/dom/Document.cpp

Issue 138443013: Remove iframe@seamless (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Include remove tests Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 56f72966d6f0716198e97a6b11097247277b5615..ff03ea5951396e3482729a727cd8ab5c37cdbb9a 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -447,7 +447,6 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, m_sawElementsInKnownNamespaces(false)
, m_isSrcdocDocument(false)
, m_isMobileDocument(false)
- , m_mayDisplaySeamlesslyWithParent(false)
, m_renderView(0)
, m_weakFactory(this)
, m_contextDocument(initializer.contextDocument())
@@ -1532,13 +1531,6 @@ void Document::scheduleStyleRecalc()
if (!isActive())
return;
- if (shouldDisplaySeamlesslyWithParent()) {
- // When we're seamless, our parent document manages our style recalcs.
- ownerElement()->setNeedsStyleRecalc();
- ownerElement()->document().scheduleStyleRecalc();
- return;
- }
-
if (m_styleRecalcTimer.isActive() || !shouldScheduleLayout())
return;
@@ -1598,10 +1590,6 @@ void Document::setStyleDependentState(RenderStyle* documentStyle)
renderView()->updateColumnInfoFromStyle(documentStyle);
}
- // Seamless iframes want to inherit their font from their parent iframe, so early return before setting the font.
- if (shouldDisplaySeamlesslyWithParent())
- return;
-
FontBuilder fontBuilder;
fontBuilder.initForStyleResolve(*this, documentStyle, isSVGDocument());
RefPtr<CSSFontSelector> selector = m_styleEngine->fontSelector();
@@ -1678,7 +1666,7 @@ void Document::recalcStyle(StyleRecalcChange change)
evaluateMediaQueryList();
}
- // FIXME: We should update style on our ancestor chain before proceeding (especially for seamless),
+ // FIXME: We should update style on our ancestor chain before proceeding
// however doing so currently causes several tests to crash, as Frame::setDocument calls Document::attach
// before setting the DOMWindow on the Frame, or the SecurityOrigin on the document. The attach, in turn
// resolves style (here) and then when we resolve style on the parent chain, we may end up
@@ -1701,7 +1689,7 @@ void Document::recalcStyle(StyleRecalcChange change)
// See printing/setPrinting.html, printing/width-overflow.html though they only fail on
// mac when accessing the resolver by what appears to be a viewport size difference.
- if (change == Force || (change >= Inherit && shouldDisplaySeamlesslyWithParent())) {
+ if (change == Force) {
m_hasNodesWithPlaceholderStyle = false;
RefPtr<RenderStyle> documentStyle = StyleResolver::styleForDocument(*this, m_styleEngine->fontSelector());
StyleRecalcChange localChange = RenderStyle::compare(documentStyle.get(), renderView()->style());
@@ -2237,12 +2225,6 @@ PassRefPtr<DocumentParser> Document::implicitOpen()
setCompatibilityMode(NoQuirksMode);
- // Documents rendered seamlessly should start out requiring a stylesheet
- // collection update in order to ensure they inherit all the relevant data
- // from their parent.
- if (shouldDisplaySeamlesslyWithParent())
- styleResolverChanged(RecalcStyleDeferred);
-
m_parser = createParser();
setParsing(true);
setReadyState(Loading);
@@ -2813,13 +2795,6 @@ Frame* Document::findUnsafeParentScrollPropagationBoundary()
return 0;
}
-
-void Document::seamlessParentUpdatedStylesheets()
-{
- m_styleEngine->didModifySeamlessParentStyleSheet();
- styleResolverChanged(RecalcStyleImmediately);
-}
-
void Document::didRemoveAllPendingStylesheet()
{
m_needsNotifyRemoveAllPendingStylesheet = false;
@@ -3260,22 +3235,6 @@ void Document::styleResolverChanged(RecalcStyleTime updateTime, StyleResolverUpd
updateStyleIfNeeded();
}
-void Document::notifySeamlessChildDocumentsOfStylesheetUpdate() const
-{
- // If we're not in a frame yet any potential child documents won't have a StyleResolver to update.
- if (!frame())
- return;
-
- // Seamless child frames are expected to notify their seamless children recursively, so we only do direct children.
- for (Frame* child = frame()->tree().firstChild(); child; child = child->tree().nextSibling()) {
- Document* childDocument = child->document();
- if (childDocument->shouldDisplaySeamlesslyWithParent()) {
- ASSERT(childDocument->seamlessParentIFrame()->document() == this);
- childDocument->seamlessParentUpdatedStylesheets();
- }
- }
-}
-
void Document::setHoverNode(PassRefPtr<Node> newHoverNode)
{
m_hoverNode = newHoverNode;
@@ -4533,10 +4492,6 @@ void Document::initSecurityContext(const DocumentInit& initializer)
setBaseURLOverride(initializer.parentBaseURL());
}
- // FIXME: What happens if we inherit the security origin? This check may need to be later.
- // <iframe seamless src="about:blank"> likely won't work as-is.
- m_mayDisplaySeamlesslyWithParent = initializer.isSeamlessAllowedFor(this);
-
if (!shouldInheritSecurityOriginFromOwner(m_url))
return;
@@ -4972,24 +4927,6 @@ void Document::resetLastHandledUserGestureTimestamp()
m_lastHandledUserGestureTimestamp = currentTime();
}
-HTMLIFrameElement* Document::seamlessParentIFrame() const
-{
- if (!shouldDisplaySeamlesslyWithParent())
- return 0;
-
- return toHTMLIFrameElement(this->ownerElement());
-}
-
-bool Document::shouldDisplaySeamlesslyWithParent() const
-{
- if (!RuntimeEnabledFeatures::seamlessIFramesEnabled())
- return false;
- HTMLFrameOwnerElement* ownerElement = this->ownerElement();
- if (!ownerElement)
- return false;
- return m_mayDisplaySeamlesslyWithParent && ownerElement->hasTagName(iframeTag) && ownerElement->fastHasAttribute(seamlessAttr);
-}
-
DocumentLoader* Document::loader() const
{
if (!m_frame)

Powered by Google App Engine
This is Rietveld 408576698