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

Side by Side Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 19098002: Introduce isHTMLHtmlElement and toHTMLHtmlElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 5 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 | « Source/core/css/CSSDefaultStyleSheets.cpp ('k') | Source/core/dom/Document.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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "core/css/resolver/StyleBuilder.h" 70 #include "core/css/resolver/StyleBuilder.h"
71 #include "core/css/resolver/TransformBuilder.h" 71 #include "core/css/resolver/TransformBuilder.h"
72 #include "core/css/resolver/ViewportStyleResolver.h" 72 #include "core/css/resolver/ViewportStyleResolver.h"
73 #include "core/dom/DocumentStyleSheetCollection.h" 73 #include "core/dom/DocumentStyleSheetCollection.h"
74 #include "core/dom/FullscreenController.h" 74 #include "core/dom/FullscreenController.h"
75 #include "core/dom/NodeRenderStyle.h" 75 #include "core/dom/NodeRenderStyle.h"
76 #include "core/dom/NodeRenderingContext.h" 76 #include "core/dom/NodeRenderingContext.h"
77 #include "core/dom/Text.h" 77 #include "core/dom/Text.h"
78 #include "core/dom/WebCoreMemoryInstrumentation.h" 78 #include "core/dom/WebCoreMemoryInstrumentation.h"
79 #include "core/dom/shadow/ShadowRoot.h" 79 #include "core/dom/shadow/ShadowRoot.h"
80 #include "core/html/HTMLHtmlElement.h"
80 #include "core/html/HTMLIFrameElement.h" 81 #include "core/html/HTMLIFrameElement.h"
81 #include "core/html/HTMLInputElement.h" 82 #include "core/html/HTMLInputElement.h"
82 #include "core/html/HTMLOptGroupElement.h" 83 #include "core/html/HTMLOptGroupElement.h"
83 #include "core/html/HTMLTableElement.h" 84 #include "core/html/HTMLTableElement.h"
84 #include "core/html/track/WebVTTElement.h" 85 #include "core/html/track/WebVTTElement.h"
85 #include "core/inspector/InspectorInstrumentation.h" 86 #include "core/inspector/InspectorInstrumentation.h"
86 #include "core/loader/cache/CachedDocument.h" 87 #include "core/loader/cache/CachedDocument.h"
87 #include "core/loader/cache/CachedSVGDocumentReference.h" 88 #include "core/loader/cache/CachedSVGDocumentReference.h"
88 #include "core/page/Frame.h" 89 #include "core/page/Frame.h"
89 #include "core/page/FrameView.h" 90 #include "core/page/FrameView.h"
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 // FIXME: Once we implement pagination controls, overflow-x should defau lt to hidden 1545 // FIXME: Once we implement pagination controls, overflow-x should defau lt to hidden
1545 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w e'll let it 1546 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w e'll let it
1546 // default to auto so we can at least scroll through the pages. 1547 // default to auto so we can at least scroll through the pages.
1547 style->setOverflowX(OAUTO); 1548 style->setOverflowX(OAUTO);
1548 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE) 1549 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE)
1549 style->setOverflowY(OAUTO); 1550 style->setOverflowY(OAUTO);
1550 1551
1551 // Call setStylesForPaginationMode() if a pagination mode is set for any non -root elements. If these 1552 // Call setStylesForPaginationMode() if a pagination mode is set for any non -root elements. If these
1552 // styles are specified on a root element, then they will be incorporated in 1553 // styles are specified on a root element, then they will be incorporated in
1553 // StyleResolver::styleForDocument(). 1554 // StyleResolver::styleForDocument().
1554 if ((style->overflowY() == OPAGEDX || style->overflowY() == OPAGEDY) && !(e && (e->hasTagName(htmlTag) || e->hasTagName(bodyTag)))) 1555 if ((style->overflowY() == OPAGEDX || style->overflowY() == OPAGEDY) && !(e && (isHTMLHtmlElement(e) || e->hasTagName(bodyTag))))
1555 setStylesForPaginationMode(WebCore::paginationModeForRenderStyle(style), style); 1556 setStylesForPaginationMode(WebCore::paginationModeForRenderStyle(style), style);
1556 1557
1557 // Table rows, sections and the table itself will support overflow:hidden an d will ignore scroll/auto. 1558 // Table rows, sections and the table itself will support overflow:hidden an d will ignore scroll/auto.
1558 // FIXME: Eventually table sections will support auto and scroll. 1559 // FIXME: Eventually table sections will support auto and scroll.
1559 if (style->display() == TABLE || style->display() == INLINE_TABLE 1560 if (style->display() == TABLE || style->display() == INLINE_TABLE
1560 || style->display() == TABLE_ROW_GROUP || style->display() == TABLE_ROW) { 1561 || style->display() == TABLE_ROW_GROUP || style->display() == TABLE_ROW) {
1561 if (style->overflowX() != OVISIBLE && style->overflowX() != OHIDDEN) 1562 if (style->overflowX() != OVISIBLE && style->overflowX() != OHIDDEN)
1562 style->setOverflowX(OVISIBLE); 1563 style->setOverflowX(OVISIBLE);
1563 if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN) 1564 if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN)
1564 style->setOverflowY(OVISIBLE); 1565 style->setOverflowY(OVISIBLE);
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 void CachedMatchedProperties::reportMemoryUsage(MemoryObjectInfo* memoryObjectIn fo) const 2402 void CachedMatchedProperties::reportMemoryUsage(MemoryObjectInfo* memoryObjectIn fo) const
2402 { 2403 {
2403 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); 2404 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
2404 info.addMember(matchedProperties, "matchedProperties"); 2405 info.addMember(matchedProperties, "matchedProperties");
2405 info.addMember(ranges, "ranges"); 2406 info.addMember(ranges, "ranges");
2406 info.addMember(renderStyle, "renderStyle"); 2407 info.addMember(renderStyle, "renderStyle");
2407 info.addMember(parentRenderStyle, "parentRenderStyle"); 2408 info.addMember(parentRenderStyle, "parentRenderStyle");
2408 } 2409 }
2409 2410
2410 } // namespace WebCore 2411 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSDefaultStyleSheets.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698