Chromium Code Reviews| 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 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 #include "core/page/PointerLockController.h" | 159 #include "core/page/PointerLockController.h" |
| 160 #include "core/page/Settings.h" | 160 #include "core/page/Settings.h" |
| 161 #include "core/page/scrolling/ScrollingCoordinator.h" | 161 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 162 #include "core/platform/ScrollbarTheme.h" | 162 #include "core/platform/ScrollbarTheme.h" |
| 163 #include "core/rendering/FastTextAutosizer.h" | 163 #include "core/rendering/FastTextAutosizer.h" |
| 164 #include "core/rendering/HitTestResult.h" | 164 #include "core/rendering/HitTestResult.h" |
| 165 #include "core/rendering/RenderView.h" | 165 #include "core/rendering/RenderView.h" |
| 166 #include "core/rendering/RenderWidget.h" | 166 #include "core/rendering/RenderWidget.h" |
| 167 #include "core/rendering/TextAutosizer.h" | 167 #include "core/rendering/TextAutosizer.h" |
| 168 #include "core/svg/SVGDocumentExtensions.h" | 168 #include "core/svg/SVGDocumentExtensions.h" |
| 169 #include "core/svg/SVGFontFaceElement.h" | |
| 169 #include "core/svg/SVGStyleElement.h" | 170 #include "core/svg/SVGStyleElement.h" |
| 170 #include "core/xml/XSLTProcessor.h" | 171 #include "core/xml/XSLTProcessor.h" |
| 171 #include "core/xml/parser/XMLDocumentParser.h" | 172 #include "core/xml/parser/XMLDocumentParser.h" |
| 172 #include "platform/DateComponents.h" | 173 #include "platform/DateComponents.h" |
| 173 #include "platform/Language.h" | 174 #include "platform/Language.h" |
| 174 #include "platform/TraceEvent.h" | 175 #include "platform/TraceEvent.h" |
| 175 #include "platform/network/HTTPParsers.h" | 176 #include "platform/network/HTTPParsers.h" |
| 176 #include "platform/text/PlatformLocale.h" | 177 #include "platform/text/PlatformLocale.h" |
| 177 #include "platform/text/SegmentedString.h" | 178 #include "platform/text/SegmentedString.h" |
| 178 #include "platform/weborigin/OriginAccessEntry.h" | 179 #include "platform/weborigin/OriginAccessEntry.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 385 , m_contextFeatures(ContextFeatures::defaultSwitch()) | 386 , m_contextFeatures(ContextFeatures::defaultSwitch()) |
| 386 , m_wellFormed(false) | 387 , m_wellFormed(false) |
| 387 , m_printing(false) | 388 , m_printing(false) |
| 388 , m_paginatedForScreen(false) | 389 , m_paginatedForScreen(false) |
| 389 , m_compatibilityMode(NoQuirksMode) | 390 , m_compatibilityMode(NoQuirksMode) |
| 390 , m_compatibilityModeLocked(false) | 391 , m_compatibilityModeLocked(false) |
| 391 , m_didPostCheckFocusedElementTask(false) | 392 , m_didPostCheckFocusedElementTask(false) |
| 392 , m_domTreeVersion(++s_globalTreeVersion) | 393 , m_domTreeVersion(++s_globalTreeVersion) |
| 393 , m_listenerTypes(0) | 394 , m_listenerTypes(0) |
| 394 , m_mutationObserverTypes(0) | 395 , m_mutationObserverTypes(0) |
| 395 , m_styleEngine(StyleEngine::create(*this)) | |
| 396 , m_visitedLinkState(VisitedLinkState::create(*this)) | 396 , m_visitedLinkState(VisitedLinkState::create(*this)) |
| 397 , m_visuallyOrdered(false) | 397 , m_visuallyOrdered(false) |
| 398 , m_readyState(Complete) | 398 , m_readyState(Complete) |
| 399 , m_bParsing(false) | 399 , m_bParsing(false) |
| 400 , m_styleRecalcTimer(this, &Document::styleRecalcTimerFired) | 400 , m_styleRecalcTimer(this, &Document::styleRecalcTimerFired) |
| 401 , m_inStyleRecalc(false) | 401 , m_inStyleRecalc(false) |
| 402 , m_gotoAnchorNeededAfterStylesheetsLoad(false) | 402 , m_gotoAnchorNeededAfterStylesheetsLoad(false) |
| 403 , m_containsValidityStyleRules(false) | 403 , m_containsValidityStyleRules(false) |
| 404 , m_updateFocusAppearanceRestoresSelection(false) | 404 , m_updateFocusAppearanceRestoresSelection(false) |
| 405 , m_containsPlugins(false) | 405 , m_containsPlugins(false) |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 | 473 |
| 474 initSecurityContext(initializer); | 474 initSecurityContext(initializer); |
| 475 initDNSPrefetch(); | 475 initDNSPrefetch(); |
| 476 | 476 |
| 477 for (unsigned i = 0; i < WTF_ARRAY_LENGTH(m_nodeListCounts); i++) | 477 for (unsigned i = 0; i < WTF_ARRAY_LENGTH(m_nodeListCounts); i++) |
| 478 m_nodeListCounts[i] = 0; | 478 m_nodeListCounts[i] = 0; |
| 479 | 479 |
| 480 InspectorCounters::incrementCounter(InspectorCounters::DocumentCounter); | 480 InspectorCounters::incrementCounter(InspectorCounters::DocumentCounter); |
| 481 | 481 |
| 482 m_lifecyle.advanceTo(DocumentLifecycle::Inactive); | 482 m_lifecyle.advanceTo(DocumentLifecycle::Inactive); |
| 483 | |
| 484 // Since CSSFontSelector requires Document::m_fetcher and StyleEngine owns | |
| 485 // CSSFontSelector, need to initialize m_styleEngine after initializing | |
| 486 // m_fetcher. | |
| 487 m_styleEngine = StyleEngine::create(*this); | |
| 483 } | 488 } |
| 484 | 489 |
| 485 Document::~Document() | 490 Document::~Document() |
| 486 { | 491 { |
| 487 ASSERT(!renderView()); | 492 ASSERT(!renderView()); |
| 488 ASSERT(m_ranges.isEmpty()); | 493 ASSERT(m_ranges.isEmpty()); |
| 489 ASSERT(!m_parentTreeScope); | 494 ASSERT(!m_parentTreeScope); |
| 490 ASSERT(!hasGuardRefCount()); | 495 ASSERT(!hasGuardRefCount()); |
| 491 | 496 |
| 492 if (m_templateDocument) | 497 if (m_templateDocument) |
| (...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1944 StyleResolver* Document::styleResolver() const | 1949 StyleResolver* Document::styleResolver() const |
| 1945 { | 1950 { |
| 1946 return m_styleEngine->resolver(); | 1951 return m_styleEngine->resolver(); |
| 1947 } | 1952 } |
| 1948 | 1953 |
| 1949 void Document::clearStyleResolver() | 1954 void Document::clearStyleResolver() |
| 1950 { | 1955 { |
| 1951 m_styleEngine->clearResolver(); | 1956 m_styleEngine->clearResolver(); |
| 1952 } | 1957 } |
| 1953 | 1958 |
| 1959 CSSFontSelector* Document::fontSelector() const | |
|
dglazkov
2013/12/02 17:47:42
This function doesn't do anything useful and hides
tasak
2013/12/05 05:09:44
Done.
| |
| 1960 { | |
| 1961 return m_styleEngine->fontSelector(); | |
| 1962 } | |
| 1963 | |
| 1954 void Document::attach(const AttachContext& context) | 1964 void Document::attach(const AttachContext& context) |
| 1955 { | 1965 { |
| 1956 ASSERT(m_lifecyle.state() == DocumentLifecycle::Inactive); | 1966 ASSERT(m_lifecyle.state() == DocumentLifecycle::Inactive); |
| 1957 ASSERT(!m_axObjectCache || this != topDocument()); | 1967 ASSERT(!m_axObjectCache || this != topDocument()); |
| 1958 | 1968 |
| 1959 m_renderView = new RenderView(this); | 1969 m_renderView = new RenderView(this); |
| 1960 setRenderer(m_renderView); | 1970 setRenderer(m_renderView); |
| 1961 | 1971 |
| 1962 m_renderView->setIsInWindow(true); | 1972 m_renderView->setIsInWindow(true); |
| 1963 m_renderView->setStyle(StyleResolver::styleForDocument(*this)); | 1973 m_renderView->setStyle(StyleResolver::styleForDocument(*this)); |
| (...skipping 3253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5217 } | 5227 } |
| 5218 | 5228 |
| 5219 FastTextAutosizer* Document::fastTextAutosizer() | 5229 FastTextAutosizer* Document::fastTextAutosizer() |
| 5220 { | 5230 { |
| 5221 if (!m_fastTextAutosizer && RuntimeEnabledFeatures::fastTextAutosizingEnable d()) | 5231 if (!m_fastTextAutosizer && RuntimeEnabledFeatures::fastTextAutosizingEnable d()) |
| 5222 m_fastTextAutosizer = FastTextAutosizer::create(this); | 5232 m_fastTextAutosizer = FastTextAutosizer::create(this); |
| 5223 return m_fastTextAutosizer.get(); | 5233 return m_fastTextAutosizer.get(); |
| 5224 } | 5234 } |
| 5225 | 5235 |
| 5226 } // namespace WebCore | 5236 } // namespace WebCore |
| OLD | NEW |