OLD | NEW |
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 21 matching lines...) Expand all Loading... |
32 #include "HTMLNames.h" | 32 #include "HTMLNames.h" |
33 #include "SVGNames.h" | 33 #include "SVGNames.h" |
34 #include "core/dom/ContainerNode.h" | 34 #include "core/dom/ContainerNode.h" |
35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
36 #include "core/dom/Element.h" | 36 #include "core/dom/Element.h" |
37 #include "core/html/HTMLIFrameElement.h" | 37 #include "core/html/HTMLIFrameElement.h" |
38 #include "core/html/HTMLInputElement.h" | 38 #include "core/html/HTMLInputElement.h" |
39 #include "core/html/HTMLTextAreaElement.h" | 39 #include "core/html/HTMLTextAreaElement.h" |
40 #include "core/frame/FrameView.h" | 40 #include "core/frame/FrameView.h" |
41 #include "core/frame/Settings.h" | 41 #include "core/frame/Settings.h" |
42 #include "core/rendering/Pagination.h" | |
43 #include "core/rendering/RenderTheme.h" | 42 #include "core/rendering/RenderTheme.h" |
44 #include "core/rendering/style/GridPosition.h" | 43 #include "core/rendering/style/GridPosition.h" |
45 #include "core/rendering/style/RenderStyle.h" | 44 #include "core/rendering/style/RenderStyle.h" |
46 #include "core/rendering/style/RenderStyleConstants.h" | 45 #include "core/rendering/style/RenderStyleConstants.h" |
47 #include "platform/Length.h" | 46 #include "platform/Length.h" |
48 #include "wtf/Assertions.h" | 47 #include "wtf/Assertions.h" |
49 | 48 |
50 namespace WebCore { | 49 namespace WebCore { |
51 | 50 |
52 using namespace HTMLNames; | 51 using namespace HTMLNames; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // If either overflow value is not visible, change to auto. | 299 // If either overflow value is not visible, change to auto. |
301 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) { | 300 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) { |
302 // FIXME: Once we implement pagination controls, overflow-x should defau
lt to hidden | 301 // FIXME: Once we implement pagination controls, overflow-x should defau
lt to hidden |
303 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w
e'll let it | 302 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w
e'll let it |
304 // default to auto so we can at least scroll through the pages. | 303 // default to auto so we can at least scroll through the pages. |
305 style->setOverflowX(OAUTO); | 304 style->setOverflowX(OAUTO); |
306 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE)
{ | 305 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE)
{ |
307 style->setOverflowY(OAUTO); | 306 style->setOverflowY(OAUTO); |
308 } | 307 } |
309 | 308 |
310 // Call setStylesForPaginationMode() if a pagination mode is set for any non
-root elements. If these | |
311 // styles are specified on a root element, then they will be incorporated in | |
312 // StyleAdjuster::styleForDocument(). | |
313 if ((style->overflowY() == OPAGEDX || style->overflowY() == OPAGEDY) && !(e
&& (e->hasTagName(htmlTag) || e->hasTagName(bodyTag)))) | |
314 Pagination::setStylesForPaginationMode(WebCore::paginationModeForRenderS
tyle(style), style); | |
315 | |
316 // Table rows, sections and the table itself will support overflow:hidden an
d will ignore scroll/auto. | 309 // Table rows, sections and the table itself will support overflow:hidden an
d will ignore scroll/auto. |
317 // FIXME: Eventually table sections will support auto and scroll. | 310 // FIXME: Eventually table sections will support auto and scroll. |
318 if (style->display() == TABLE || style->display() == INLINE_TABLE | 311 if (style->display() == TABLE || style->display() == INLINE_TABLE |
319 || style->display() == TABLE_ROW_GROUP || style->display() == TABLE_ROW)
{ | 312 || style->display() == TABLE_ROW_GROUP || style->display() == TABLE_ROW)
{ |
320 if (style->overflowX() != OVISIBLE && style->overflowX() != OHIDDEN) | 313 if (style->overflowX() != OVISIBLE && style->overflowX() != OHIDDEN) |
321 style->setOverflowX(OVISIBLE); | 314 style->setOverflowX(OVISIBLE); |
322 if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN) | 315 if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN) |
323 style->setOverflowY(OVISIBLE); | 316 style->setOverflowY(OVISIBLE); |
324 } | 317 } |
325 | 318 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 if (prop.isNamedGridArea() && !map.contains(prop.namedGridLine())) \ | 403 if (prop.isNamedGridArea() && !map.contains(prop.namedGridLine())) \ |
411 style->setGrid##Prop(GridPosition()); | 404 style->setGrid##Prop(GridPosition()); |
412 | 405 |
413 CLEAR_UNKNOWN_NAMED_AREA(columnStartPosition, ColumnStart); | 406 CLEAR_UNKNOWN_NAMED_AREA(columnStartPosition, ColumnStart); |
414 CLEAR_UNKNOWN_NAMED_AREA(columnEndPosition, ColumnEnd); | 407 CLEAR_UNKNOWN_NAMED_AREA(columnEndPosition, ColumnEnd); |
415 CLEAR_UNKNOWN_NAMED_AREA(rowStartPosition, RowStart); | 408 CLEAR_UNKNOWN_NAMED_AREA(rowStartPosition, RowStart); |
416 CLEAR_UNKNOWN_NAMED_AREA(rowEndPosition, RowEnd); | 409 CLEAR_UNKNOWN_NAMED_AREA(rowEndPosition, RowEnd); |
417 } | 410 } |
418 | 411 |
419 } | 412 } |
OLD | NEW |