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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 858713002: Remove viewportDefiningElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 ASSERT(!m_isParsing); 1282 ASSERT(!m_isParsing);
1283 ASSERT(!firstChild()); 1283 ASSERT(!firstChild());
1284 ASSERT(!m_focusedElement); 1284 ASSERT(!m_focusedElement);
1285 1285
1286 m_parser = HTMLDocumentParser::create(toHTMLDocument(*this), false); 1286 m_parser = HTMLDocumentParser::create(toHTMLDocument(*this), false);
1287 setParsing(true); 1287 setParsing(true);
1288 setReadyState(Loading); 1288 setReadyState(Loading);
1289 return m_parser.get(); 1289 return m_parser.get();
1290 } 1290 }
1291 1291
1292 Element* Document::viewportDefiningElement(RenderStyle* rootStyle) const
1293 {
1294 // If a BODY element sets non-visible overflow, it is to be propagated to th e viewport, as long
1295 // as the following conditions are all met:
1296 // (1) The root element is HTML.
1297 // (2) It is the primary BODY element (we only assert for this, expecting ca llers to behave).
1298 // (3) The root element has visible overflow.
1299 // Otherwise it's the root element's properties that are to be propagated.
1300 Element* rootElement = documentElement();
1301 if (!rootElement)
1302 return 0;
1303 if (!rootStyle) {
1304 rootStyle = rootElement->renderStyle();
1305 if (!rootStyle)
1306 return 0;
1307 }
1308 return rootElement;
1309 }
1310
1311 void Document::implicitClose() 1292 void Document::implicitClose()
1312 { 1293 {
1313 ASSERT(!inStyleRecalc()); 1294 ASSERT(!inStyleRecalc());
1314 1295
1315 bool doload = !parsing() && m_parser && !processingLoadEvent(); 1296 bool doload = !parsing() && m_parser && !processingLoadEvent();
1316 1297
1317 // If the load was blocked because of a pending location change and the loca tion change triggers a same document 1298 // If the load was blocked because of a pending location change and the loca tion change triggers a same document
1318 // navigation, don't fire load events after the same document navigation com pletes (unless there's an explicit open). 1299 // navigation, don't fire load events after the same document navigation com pletes (unless there's an explicit open).
1319 m_loadEventProgress = LoadEventTried; 1300 m_loadEventProgress = LoadEventTried;
1320 1301
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 using namespace blink; 2612 using namespace blink;
2632 void showLiveDocumentInstances() 2613 void showLiveDocumentInstances()
2633 { 2614 {
2634 WeakDocumentSet& set = liveDocumentSet(); 2615 WeakDocumentSet& set = liveDocumentSet();
2635 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 2616 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
2636 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 2617 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
2637 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 2618 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
2638 } 2619 }
2639 } 2620 }
2640 #endif 2621 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698