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