| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 #include "sky/engine/core/editing/htmlediting.h" | 65 #include "sky/engine/core/editing/htmlediting.h" |
| 66 #include "sky/engine/core/events/EventDispatcher.h" | 66 #include "sky/engine/core/events/EventDispatcher.h" |
| 67 #include "sky/engine/core/events/FocusEvent.h" | 67 #include "sky/engine/core/events/FocusEvent.h" |
| 68 #include "sky/engine/core/frame/FrameView.h" | 68 #include "sky/engine/core/frame/FrameView.h" |
| 69 #include "sky/engine/core/frame/LocalFrame.h" | 69 #include "sky/engine/core/frame/LocalFrame.h" |
| 70 #include "sky/engine/core/frame/Settings.h" | 70 #include "sky/engine/core/frame/Settings.h" |
| 71 #include "sky/engine/core/html/HTMLElement.h" | 71 #include "sky/engine/core/html/HTMLElement.h" |
| 72 #include "sky/engine/core/html/HTMLTemplateElement.h" | 72 #include "sky/engine/core/html/HTMLTemplateElement.h" |
| 73 #include "sky/engine/core/html/parser/HTMLDocumentParser.h" | 73 #include "sky/engine/core/html/parser/HTMLDocumentParser.h" |
| 74 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" | 74 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" |
| 75 #include "sky/engine/core/layout/LayoutCallback.h" |
| 75 #include "sky/engine/core/page/ChromeClient.h" | 76 #include "sky/engine/core/page/ChromeClient.h" |
| 76 #include "sky/engine/core/page/FocusController.h" | 77 #include "sky/engine/core/page/FocusController.h" |
| 77 #include "sky/engine/core/page/Page.h" | 78 #include "sky/engine/core/page/Page.h" |
| 78 #include "sky/engine/core/painting/PaintingCallback.h" | 79 #include "sky/engine/core/painting/PaintingCallback.h" |
| 79 #include "sky/engine/core/painting/PaintingTasks.h" | 80 #include "sky/engine/core/painting/PaintingTasks.h" |
| 81 #include "sky/engine/core/rendering/RenderCustomLayout.h" |
| 80 #include "sky/engine/core/rendering/RenderLayer.h" | 82 #include "sky/engine/core/rendering/RenderLayer.h" |
| 81 #include "sky/engine/core/rendering/RenderView.h" | 83 #include "sky/engine/core/rendering/RenderView.h" |
| 82 #include "sky/engine/platform/EventDispatchForbiddenScope.h" | 84 #include "sky/engine/platform/EventDispatchForbiddenScope.h" |
| 83 #include "sky/engine/tonic/dart_state.h" | 85 #include "sky/engine/tonic/dart_state.h" |
| 84 #include "sky/engine/wtf/BitVector.h" | 86 #include "sky/engine/wtf/BitVector.h" |
| 85 #include "sky/engine/wtf/HashFunctions.h" | 87 #include "sky/engine/wtf/HashFunctions.h" |
| 86 #include "sky/engine/wtf/text/CString.h" | 88 #include "sky/engine/wtf/text/CString.h" |
| 87 #include "sky/engine/wtf/text/StringBuilder.h" | 89 #include "sky/engine/wtf/text/StringBuilder.h" |
| 88 #include "sky/engine/wtf/text/TextPosition.h" | 90 #include "sky/engine/wtf/text/TextPosition.h" |
| 89 | 91 |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 return m_tagName.localName(); | 622 return m_tagName.localName(); |
| 621 } | 623 } |
| 622 | 624 |
| 623 const AtomicString Element::imageSourceURL() const | 625 const AtomicString Element::imageSourceURL() const |
| 624 { | 626 { |
| 625 return getAttribute(HTMLNames::srcAttr); | 627 return getAttribute(HTMLNames::srcAttr); |
| 626 } | 628 } |
| 627 | 629 |
| 628 RenderObject* Element::createRenderer(RenderStyle* style) | 630 RenderObject* Element::createRenderer(RenderStyle* style) |
| 629 { | 631 { |
| 632 if (m_layoutManager) |
| 633 return new RenderCustomLayout(this); |
| 630 return RenderObject::createObject(this, style); | 634 return RenderObject::createObject(this, style); |
| 631 } | 635 } |
| 632 | 636 |
| 633 void Element::insertedInto(ContainerNode* insertionPoint) | 637 void Element::insertedInto(ContainerNode* insertionPoint) |
| 634 { | 638 { |
| 635 // need to do superclass processing first so inDocument() is true | 639 // need to do superclass processing first so inDocument() is true |
| 636 // by the time we reach updateId | 640 // by the time we reach updateId |
| 637 ContainerNode::insertedInto(insertionPoint); | 641 ContainerNode::insertedInto(insertionPoint); |
| 638 | 642 |
| 639 if (!insertionPoint->isInTreeScope()) | 643 if (!insertionPoint->isInTreeScope()) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 } | 883 } |
| 880 | 884 |
| 881 ShadowRoot* Element::shadowRoot() const | 885 ShadowRoot* Element::shadowRoot() const |
| 882 { | 886 { |
| 883 ElementShadow* elementShadow = shadow(); | 887 ElementShadow* elementShadow = shadow(); |
| 884 if (!elementShadow) | 888 if (!elementShadow) |
| 885 return 0; | 889 return 0; |
| 886 return elementShadow->shadowRoot(); | 890 return elementShadow->shadowRoot(); |
| 887 } | 891 } |
| 888 | 892 |
| 893 double Element::x() const |
| 894 { |
| 895 if (RenderBox* box = renderBox()) |
| 896 return box->x(); |
| 897 return 0; |
| 898 } |
| 899 |
| 900 void Element::setX(double x) |
| 901 { |
| 902 if (RenderBox* box = renderBox()) |
| 903 return box->setX(x); |
| 904 } |
| 905 |
| 906 double Element::y() const |
| 907 { |
| 908 if (RenderBox* box = renderBox()) |
| 909 return box->y(); |
| 910 return 0; |
| 911 } |
| 912 |
| 913 void Element::setY(double y) |
| 914 { |
| 915 if (RenderBox* box = renderBox()) |
| 916 return box->setY(y); |
| 917 } |
| 918 |
| 919 double Element::width() const |
| 920 { |
| 921 if (RenderBox* box = renderBox()) |
| 922 return box->width(); |
| 923 return 0; |
| 924 } |
| 925 |
| 926 void Element::setWidth(double width) |
| 927 { |
| 928 if (RenderBox* box = renderBox()) |
| 929 return box->setWidth(width); |
| 930 } |
| 931 |
| 932 double Element::height() const |
| 933 { |
| 934 if (RenderBox* box = renderBox()) |
| 935 return box->height(); |
| 936 return 0; |
| 937 } |
| 938 |
| 939 void Element::setHeight(double height) |
| 940 { |
| 941 if (RenderBox* box = renderBox()) |
| 942 return box->setHeight(height); |
| 943 } |
| 944 |
| 945 LayoutCallback* Element::layoutManager() const |
| 946 { |
| 947 return m_layoutManager.get(); |
| 948 } |
| 949 |
| 950 void Element::setLayoutManager(PassOwnPtr<LayoutCallback> callback) |
| 951 { |
| 952 m_layoutManager = callback; |
| 953 } |
| 954 |
| 889 void Element::childrenChanged(const ChildrenChange& change) | 955 void Element::childrenChanged(const ChildrenChange& change) |
| 890 { | 956 { |
| 891 ContainerNode::childrenChanged(change); | 957 ContainerNode::childrenChanged(change); |
| 892 | 958 |
| 893 if (ElementShadow* shadow = this->shadow()) | 959 if (ElementShadow* shadow = this->shadow()) |
| 894 shadow->setNeedsDistributionRecalc(); | 960 shadow->setNeedsDistributionRecalc(); |
| 895 } | 961 } |
| 896 | 962 |
| 897 #ifndef NDEBUG | 963 #ifndef NDEBUG |
| 898 void Element::formatForDebugger(char* buffer, unsigned length) const | 964 void Element::formatForDebugger(char* buffer, unsigned length) const |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 return false; | 1621 return false; |
| 1556 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) | 1622 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) |
| 1557 return true; | 1623 return true; |
| 1558 // Host rules could also have effects. | 1624 // Host rules could also have effects. |
| 1559 if (ShadowRoot* shadowRoot = this->shadowRoot()) | 1625 if (ShadowRoot* shadowRoot = this->shadowRoot()) |
| 1560 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); | 1626 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); |
| 1561 return false; | 1627 return false; |
| 1562 } | 1628 } |
| 1563 | 1629 |
| 1564 } // namespace blink | 1630 } // namespace blink |
| OLD | NEW |