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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 { | 645 { |
646 document().updateLayoutIgnorePendingStylesheets(); | 646 document().updateLayoutIgnorePendingStylesheets(); |
647 | 647 |
648 // When in strict mode, clientWidth for the document element should return t
he width of the containing frame. | 648 // When in strict mode, clientWidth for the document element should return t
he width of the containing frame. |
649 // When in quirks mode, clientWidth for the body element should return the w
idth of the containing frame. | 649 // When in quirks mode, clientWidth for the body element should return the w
idth of the containing frame. |
650 bool inQuirksMode = document().inQuirksMode(); | 650 bool inQuirksMode = document().inQuirksMode(); |
651 if ((!inQuirksMode && document().documentElement() == this) | 651 if ((!inQuirksMode && document().documentElement() == this) |
652 || (inQuirksMode && isHTMLElement() && document().body() == this)) { | 652 || (inQuirksMode && isHTMLElement() && document().body() == this)) { |
653 if (FrameView* view = document().view()) { | 653 if (FrameView* view = document().view()) { |
654 if (RenderView* renderView = document().renderView()) | 654 if (RenderView* renderView = document().renderView()) |
655 return adjustForAbsoluteZoom(view->layoutWidth(), renderView); | 655 return adjustForAbsoluteZoom(view->layoutSize().width(), renderV
iew); |
656 } | 656 } |
657 } | 657 } |
658 | 658 |
659 if (RenderBox* renderer = renderBox()) | 659 if (RenderBox* renderer = renderBox()) |
660 return adjustLayoutUnitForAbsoluteZoom(renderer->pixelSnappedClientWidth
(), renderer).round(); | 660 return adjustLayoutUnitForAbsoluteZoom(renderer->pixelSnappedClientWidth
(), renderer).round(); |
661 return 0; | 661 return 0; |
662 } | 662 } |
663 | 663 |
664 int Element::clientHeight() | 664 int Element::clientHeight() |
665 { | 665 { |
666 document().updateLayoutIgnorePendingStylesheets(); | 666 document().updateLayoutIgnorePendingStylesheets(); |
667 | 667 |
668 // When in strict mode, clientHeight for the document element should return
the height of the containing frame. | 668 // When in strict mode, clientHeight for the document element should return
the height of the containing frame. |
669 // When in quirks mode, clientHeight for the body element should return the
height of the containing frame. | 669 // When in quirks mode, clientHeight for the body element should return the
height of the containing frame. |
670 bool inQuirksMode = document().inQuirksMode(); | 670 bool inQuirksMode = document().inQuirksMode(); |
671 | 671 |
672 if ((!inQuirksMode && document().documentElement() == this) | 672 if ((!inQuirksMode && document().documentElement() == this) |
673 || (inQuirksMode && isHTMLElement() && document().body() == this)) { | 673 || (inQuirksMode && isHTMLElement() && document().body() == this)) { |
674 if (FrameView* view = document().view()) { | 674 if (FrameView* view = document().view()) { |
675 if (RenderView* renderView = document().renderView()) | 675 if (RenderView* renderView = document().renderView()) |
676 return adjustForAbsoluteZoom(view->layoutHeight(), renderView); | 676 return adjustForAbsoluteZoom(view->layoutSize().height(), render
View); |
677 } | 677 } |
678 } | 678 } |
679 | 679 |
680 if (RenderBox* renderer = renderBox()) | 680 if (RenderBox* renderer = renderBox()) |
681 return adjustLayoutUnitForAbsoluteZoom(renderer->pixelSnappedClientHeigh
t(), renderer).round(); | 681 return adjustLayoutUnitForAbsoluteZoom(renderer->pixelSnappedClientHeigh
t(), renderer).round(); |
682 return 0; | 682 return 0; |
683 } | 683 } |
684 | 684 |
685 int Element::scrollLeft() | 685 int Element::scrollLeft() |
686 { | 686 { |
(...skipping 2955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3642 return 0; | 3642 return 0; |
3643 } | 3643 } |
3644 | 3644 |
3645 Attribute* UniqueElementData::attributeItem(unsigned index) | 3645 Attribute* UniqueElementData::attributeItem(unsigned index) |
3646 { | 3646 { |
3647 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); | 3647 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); |
3648 return &m_attributeVector.at(index); | 3648 return &m_attributeVector.at(index); |
3649 } | 3649 } |
3650 | 3650 |
3651 } // namespace WebCore | 3651 } // namespace WebCore |
OLD | NEW |