| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 } | 591 } |
| 592 | 592 |
| 593 PassRefPtr<CSSStyleDeclaration> LocalDOMWindow::getComputedStyle(Element* elt, c
onst String& pseudoElt) const | 593 PassRefPtr<CSSStyleDeclaration> LocalDOMWindow::getComputedStyle(Element* elt, c
onst String& pseudoElt) const |
| 594 { | 594 { |
| 595 if (!elt) | 595 if (!elt) |
| 596 return nullptr; | 596 return nullptr; |
| 597 | 597 |
| 598 return CSSComputedStyleDeclaration::create(elt, false, pseudoElt); | 598 return CSSComputedStyleDeclaration::create(elt, false, pseudoElt); |
| 599 } | 599 } |
| 600 | 600 |
| 601 PassRefPtr<CSSRuleList> LocalDOMWindow::getMatchedCSSRules(Element* element, con
st String& pseudoElement) const | |
| 602 { | |
| 603 if (!element) | |
| 604 return nullptr; | |
| 605 | |
| 606 unsigned colonStart = pseudoElement[0] == ':' ? (pseudoElement[1] == ':' ? 2
: 1) : 0; | |
| 607 CSSSelector::PseudoType pseudoType = CSSSelector::parsePseudoType(AtomicStri
ng(pseudoElement.substring(colonStart))); | |
| 608 if (pseudoType == CSSSelector::PseudoUnknown && !pseudoElement.isEmpty()) | |
| 609 return nullptr; | |
| 610 | |
| 611 unsigned rulesToInclude = StyleResolver::AuthorCSSRules; | |
| 612 PseudoId pseudoId = CSSSelector::pseudoId(pseudoType); | |
| 613 return m_frame->document()->ensureStyleResolver().pseudoCSSRulesForElement(e
lement, pseudoId, rulesToInclude); | |
| 614 } | |
| 615 | |
| 616 double LocalDOMWindow::devicePixelRatio() const | 601 double LocalDOMWindow::devicePixelRatio() const |
| 617 { | 602 { |
| 618 if (!m_frame) | 603 if (!m_frame) |
| 619 return 0.0; | 604 return 0.0; |
| 620 | 605 |
| 621 return m_frame->devicePixelRatio(); | 606 return m_frame->devicePixelRatio(); |
| 622 } | 607 } |
| 623 | 608 |
| 624 void LocalDOMWindow::moveBy(float x, float y) const | 609 void LocalDOMWindow::moveBy(float x, float y) const |
| 625 { | 610 { |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 { | 782 { |
| 798 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin
dow>::lifecycleNotifier()); | 783 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin
dow>::lifecycleNotifier()); |
| 799 } | 784 } |
| 800 | 785 |
| 801 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo
tifier() | 786 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo
tifier() |
| 802 { | 787 { |
| 803 return DOMWindowLifecycleNotifier::create(this); | 788 return DOMWindowLifecycleNotifier::create(this); |
| 804 } | 789 } |
| 805 | 790 |
| 806 } // namespace blink | 791 } // namespace blink |
| OLD | NEW |