OLD | NEW |
---|---|
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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1338 PositionWithAffinity positionWithAffinity = result.position(); | 1338 PositionWithAffinity positionWithAffinity = result.position(); |
1339 if (positionWithAffinity.isNull()) | 1339 if (positionWithAffinity.isNull()) |
1340 return nullptr; | 1340 return nullptr; |
1341 | 1341 |
1342 Position rangeCompliantPosition = | 1342 Position rangeCompliantPosition = |
1343 positionWithAffinity.position().parentAnchoredEquivalent(); | 1343 positionWithAffinity.position().parentAnchoredEquivalent(); |
1344 return Range::createAdjustedToTreeScope(*this, rangeCompliantPosition); | 1344 return Range::createAdjustedToTreeScope(*this, rangeCompliantPosition); |
1345 } | 1345 } |
1346 | 1346 |
1347 Element* Document::scrollingElement() { | 1347 Element* Document::scrollingElement() { |
1348 if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled() && inQuirksMode()) | |
1349 updateStyleAndLayoutTree(); | |
1350 return scrollingElementNoLayout(); | |
1351 } | |
1352 | |
1353 Element* Document::scrollingElementNoLayout() { | |
1348 if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled()) { | 1354 if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled()) { |
1349 if (inQuirksMode()) { | 1355 if (inQuirksMode()) { |
1350 updateStyleAndLayoutTree(); | 1356 DCHECK(m_lifecycle.state() >= DocumentLifecycle::StyleClean); |
chrishtr
2017/01/11 17:19:00
StyleClean is the right one, since updateStyleAndL
| |
1351 HTMLBodyElement* body = firstBodyElement(); | 1357 HTMLBodyElement* body = firstBodyElement(); |
1352 if (body && body->layoutObject() && | 1358 if (body && body->layoutObject() && |
1353 body->layoutObject()->hasOverflowClip()) | 1359 body->layoutObject()->hasOverflowClip()) |
1354 return nullptr; | 1360 return nullptr; |
1355 | 1361 |
1356 return body; | 1362 return body; |
1357 } | 1363 } |
1358 | 1364 |
1359 return documentElement(); | 1365 return documentElement(); |
1360 } | 1366 } |
(...skipping 5222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6583 } | 6589 } |
6584 | 6590 |
6585 void showLiveDocumentInstances() { | 6591 void showLiveDocumentInstances() { |
6586 WeakDocumentSet& set = liveDocumentSet(); | 6592 WeakDocumentSet& set = liveDocumentSet(); |
6587 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6593 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6588 for (Document* document : set) | 6594 for (Document* document : set) |
6589 fprintf(stderr, "- Document %p URL: %s\n", document, | 6595 fprintf(stderr, "- Document %p URL: %s\n", document, |
6590 document->url().getString().utf8().data()); | 6596 document->url().getString().utf8().data()); |
6591 } | 6597 } |
6592 #endif | 6598 #endif |
OLD | NEW |