| 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 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 document().updateLayoutIgnorePendingStylesheets(); | 653 document().updateLayoutIgnorePendingStylesheets(); |
| 654 | 654 |
| 655 // When in strict mode, clientWidth for the document element should return t
he width of the containing frame. | 655 // When in strict mode, clientWidth for the document element should return t
he width of the containing frame. |
| 656 // When in quirks mode, clientWidth for the body element should return the w
idth of the containing frame. | 656 // When in quirks mode, clientWidth for the body element should return the w
idth of the containing frame. |
| 657 bool inQuirksMode = document().inQuirksMode(); | 657 bool inQuirksMode = document().inQuirksMode(); |
| 658 if ((!inQuirksMode && document().documentElement() == this) | 658 if ((!inQuirksMode && document().documentElement() == this) |
| 659 || (inQuirksMode && isHTMLElement() && document().body() == this)) { | 659 || (inQuirksMode && isHTMLElement() && document().body() == this)) { |
| 660 if (FrameView* view = document().view()) { | 660 if (FrameView* view = document().view()) { |
| 661 if (LayoutView* layoutView = document().layoutView()) { | 661 if (LayoutView* layoutView = document().layoutView()) { |
| 662 if (document().page()->settings().forceZeroLayoutHeight()) | 662 if (document().page()->settings().forceZeroLayoutHeight()) |
| 663 return adjustLayoutUnitForAbsoluteZoom(view->unscaledVisible
ContentSize().width(), *layoutView); | 663 return adjustLayoutUnitForAbsoluteZoom(view->visibleContentS
ize().width(), *layoutView); |
| 664 return adjustLayoutUnitForAbsoluteZoom(view->layoutSize().width(
), *layoutView); | 664 return adjustLayoutUnitForAbsoluteZoom(view->layoutSize().width(
), *layoutView); |
| 665 } | 665 } |
| 666 } | 666 } |
| 667 } | 667 } |
| 668 | 668 |
| 669 if (LayoutBox* layoutObject = layoutBox()) | 669 if (LayoutBox* layoutObject = layoutBox()) |
| 670 return adjustLayoutUnitForAbsoluteZoom(layoutObject->pixelSnappedClientW
idth(), *layoutObject).round(); | 670 return adjustLayoutUnitForAbsoluteZoom(layoutObject->pixelSnappedClientW
idth(), *layoutObject).round(); |
| 671 return 0; | 671 return 0; |
| 672 } | 672 } |
| 673 | 673 |
| 674 int Element::clientHeight() | 674 int Element::clientHeight() |
| 675 { | 675 { |
| 676 document().updateLayoutIgnorePendingStylesheets(); | 676 document().updateLayoutIgnorePendingStylesheets(); |
| 677 | 677 |
| 678 // When in strict mode, clientHeight for the document element should return
the height of the containing frame. | 678 // When in strict mode, clientHeight for the document element should return
the height of the containing frame. |
| 679 // When in quirks mode, clientHeight for the body element should return the
height of the containing frame. | 679 // When in quirks mode, clientHeight for the body element should return the
height of the containing frame. |
| 680 bool inQuirksMode = document().inQuirksMode(); | 680 bool inQuirksMode = document().inQuirksMode(); |
| 681 | 681 |
| 682 if ((!inQuirksMode && document().documentElement() == this) | 682 if ((!inQuirksMode && document().documentElement() == this) |
| 683 || (inQuirksMode && isHTMLElement() && document().body() == this)) { | 683 || (inQuirksMode && isHTMLElement() && document().body() == this)) { |
| 684 if (FrameView* view = document().view()) { | 684 if (FrameView* view = document().view()) { |
| 685 if (LayoutView* layoutView = document().layoutView()) { | 685 if (LayoutView* layoutView = document().layoutView()) { |
| 686 if (document().page()->settings().forceZeroLayoutHeight()) | 686 if (document().page()->settings().forceZeroLayoutHeight()) |
| 687 return adjustLayoutUnitForAbsoluteZoom(view->unscaledVisible
ContentSize().height(), *layoutView); | 687 return adjustLayoutUnitForAbsoluteZoom(view->visibleContentS
ize().height(), *layoutView); |
| 688 return adjustLayoutUnitForAbsoluteZoom(view->layoutSize().height
(), *layoutView); | 688 return adjustLayoutUnitForAbsoluteZoom(view->layoutSize().height
(), *layoutView); |
| 689 } | 689 } |
| 690 } | 690 } |
| 691 } | 691 } |
| 692 | 692 |
| 693 if (LayoutBox* layoutObject = layoutBox()) | 693 if (LayoutBox* layoutObject = layoutBox()) |
| 694 return adjustLayoutUnitForAbsoluteZoom(layoutObject->pixelSnappedClientH
eight(), *layoutObject).round(); | 694 return adjustLayoutUnitForAbsoluteZoom(layoutObject->pixelSnappedClientH
eight(), *layoutObject).round(); |
| 695 return 0; | 695 return 0; |
| 696 } | 696 } |
| 697 | 697 |
| (...skipping 2772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3470 { | 3470 { |
| 3471 #if ENABLE(OILPAN) | 3471 #if ENABLE(OILPAN) |
| 3472 if (hasRareData()) | 3472 if (hasRareData()) |
| 3473 visitor->trace(elementRareData()); | 3473 visitor->trace(elementRareData()); |
| 3474 visitor->trace(m_elementData); | 3474 visitor->trace(m_elementData); |
| 3475 #endif | 3475 #endif |
| 3476 ContainerNode::trace(visitor); | 3476 ContainerNode::trace(visitor); |
| 3477 } | 3477 } |
| 3478 | 3478 |
| 3479 } // namespace blink | 3479 } // namespace blink |
| OLD | NEW |