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