Chromium Code Reviews| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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/HTMLCanvasElement.h" | 71 #include "sky/engine/core/html/HTMLCanvasElement.h" |
| 72 #include "sky/engine/core/html/HTMLElement.h" | 72 #include "sky/engine/core/html/HTMLElement.h" |
| 73 #include "sky/engine/core/html/HTMLTemplateElement.h" | 73 #include "sky/engine/core/html/HTMLTemplateElement.h" |
| 74 #include "sky/engine/core/html/parser/HTMLDocumentParser.h" | 74 #include "sky/engine/core/html/parser/HTMLDocumentParser.h" |
| 75 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" | 75 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" |
| 76 #include "sky/engine/core/layout/LayoutCallback.h" | |
| 76 #include "sky/engine/core/page/ChromeClient.h" | 77 #include "sky/engine/core/page/ChromeClient.h" |
| 77 #include "sky/engine/core/page/FocusController.h" | 78 #include "sky/engine/core/page/FocusController.h" |
| 78 #include "sky/engine/core/page/Page.h" | 79 #include "sky/engine/core/page/Page.h" |
| 79 #include "sky/engine/core/painting/PaintingCallback.h" | 80 #include "sky/engine/core/painting/PaintingCallback.h" |
| 80 #include "sky/engine/core/painting/PaintingTasks.h" | 81 #include "sky/engine/core/painting/PaintingTasks.h" |
| 82 #include "sky/engine/core/rendering/RenderCustomLayout.h" | |
| 81 #include "sky/engine/core/rendering/RenderLayer.h" | 83 #include "sky/engine/core/rendering/RenderLayer.h" |
| 82 #include "sky/engine/core/rendering/RenderView.h" | 84 #include "sky/engine/core/rendering/RenderView.h" |
| 83 #include "sky/engine/platform/EventDispatchForbiddenScope.h" | 85 #include "sky/engine/platform/EventDispatchForbiddenScope.h" |
| 84 #include "sky/engine/tonic/dart_state.h" | 86 #include "sky/engine/tonic/dart_state.h" |
| 85 #include "sky/engine/wtf/BitVector.h" | 87 #include "sky/engine/wtf/BitVector.h" |
| 86 #include "sky/engine/wtf/HashFunctions.h" | 88 #include "sky/engine/wtf/HashFunctions.h" |
| 87 #include "sky/engine/wtf/text/CString.h" | 89 #include "sky/engine/wtf/text/CString.h" |
| 88 #include "sky/engine/wtf/text/StringBuilder.h" | 90 #include "sky/engine/wtf/text/StringBuilder.h" |
| 89 #include "sky/engine/wtf/text/TextPosition.h" | 91 #include "sky/engine/wtf/text/TextPosition.h" |
| 90 | 92 |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 625 return m_tagName.localName(); | 627 return m_tagName.localName(); |
| 626 } | 628 } |
| 627 | 629 |
| 628 const AtomicString Element::imageSourceURL() const | 630 const AtomicString Element::imageSourceURL() const |
| 629 { | 631 { |
| 630 return getAttribute(HTMLNames::srcAttr); | 632 return getAttribute(HTMLNames::srcAttr); |
| 631 } | 633 } |
| 632 | 634 |
| 633 RenderObject* Element::createRenderer(RenderStyle* style) | 635 RenderObject* Element::createRenderer(RenderStyle* style) |
| 634 { | 636 { |
| 637 if (m_layoutManager) | |
| 638 return new RenderCustomLayout(this); | |
| 635 return RenderObject::createObject(this, style); | 639 return RenderObject::createObject(this, style); |
| 636 } | 640 } |
| 637 | 641 |
| 638 void Element::insertedInto(ContainerNode* insertionPoint) | 642 void Element::insertedInto(ContainerNode* insertionPoint) |
| 639 { | 643 { |
| 640 // need to do superclass processing first so inDocument() is true | 644 // need to do superclass processing first so inDocument() is true |
| 641 // by the time we reach updateId | 645 // by the time we reach updateId |
| 642 ContainerNode::insertedInto(insertionPoint); | 646 ContainerNode::insertedInto(insertionPoint); |
| 643 | 647 |
| 644 if (!insertionPoint->isInTreeScope()) | 648 if (!insertionPoint->isInTreeScope()) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 884 } | 888 } |
| 885 | 889 |
| 886 ShadowRoot* Element::shadowRoot() const | 890 ShadowRoot* Element::shadowRoot() const |
| 887 { | 891 { |
| 888 ElementShadow* elementShadow = shadow(); | 892 ElementShadow* elementShadow = shadow(); |
| 889 if (!elementShadow) | 893 if (!elementShadow) |
| 890 return 0; | 894 return 0; |
| 891 return elementShadow->shadowRoot(); | 895 return elementShadow->shadowRoot(); |
| 892 } | 896 } |
| 893 | 897 |
| 898 double Element::x() const | |
| 899 { | |
| 900 if (RenderBox* box = renderBox()) | |
| 901 return box->x(); | |
| 902 return 0; | |
| 903 } | |
| 904 | |
| 905 void Element::setX(double x) | |
| 906 { | |
| 907 if (RenderBox* box = renderBox()) | |
| 908 return box->setX(x); | |
| 909 } | |
| 910 | |
| 911 double Element::y() const | |
| 912 { | |
| 913 if (RenderBox* box = renderBox()) | |
| 914 return box->y(); | |
| 915 return 0; | |
| 916 } | |
| 917 | |
| 918 void Element::setY(double y) | |
| 919 { | |
| 920 if (RenderBox* box = renderBox()) | |
| 921 return box->setY(y); | |
| 922 } | |
| 923 | |
| 924 double Element::width() const | |
| 925 { | |
| 926 if (RenderBox* box = renderBox()) | |
| 927 return box->width(); | |
| 928 return 0; | |
| 929 } | |
| 930 | |
| 931 void Element::setWidth(double width) | |
| 932 { | |
| 933 if (RenderBox* box = renderBox()) | |
| 934 return box->setWidth(width); | |
| 935 } | |
| 936 | |
| 937 double Element::height() const | |
| 938 { | |
| 939 if (RenderBox* box = renderBox()) | |
| 940 return box->height(); | |
| 941 return 0; | |
| 942 } | |
| 943 | |
| 944 void Element::setHeight(double height) | |
| 945 { | |
| 946 if (RenderBox* box = renderBox()) | |
| 947 return box->setHeight(height); | |
| 948 } | |
| 949 | |
| 950 LayoutCallback* Element::layoutManager() const | |
| 951 { | |
| 952 return m_layoutManager.get(); | |
| 953 } | |
| 954 | |
| 955 void Element::setLayoutManager(PassOwnPtr<LayoutCallback> callback) | |
| 956 { | |
| 957 m_layoutManager = callback; | |
|
abarth-chromium
2015/03/25 00:18:51
Do we need to dirty ourselves somehow so that Elem
ojan
2015/04/02 00:02:29
Yes! Will fix in followup patch. There's a number
| |
| 958 } | |
| 959 | |
| 894 void Element::childrenChanged(const ChildrenChange& change) | 960 void Element::childrenChanged(const ChildrenChange& change) |
| 895 { | 961 { |
| 896 ContainerNode::childrenChanged(change); | 962 ContainerNode::childrenChanged(change); |
| 897 | 963 |
| 898 if (ElementShadow* shadow = this->shadow()) | 964 if (ElementShadow* shadow = this->shadow()) |
| 899 shadow->setNeedsDistributionRecalc(); | 965 shadow->setNeedsDistributionRecalc(); |
| 900 } | 966 } |
| 901 | 967 |
| 902 #ifndef NDEBUG | 968 #ifndef NDEBUG |
| 903 void Element::formatForDebugger(char* buffer, unsigned length) const | 969 void Element::formatForDebugger(char* buffer, unsigned length) const |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1565 return false; | 1631 return false; |
| 1566 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) | 1632 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) |
| 1567 return true; | 1633 return true; |
| 1568 // Host rules could also have effects. | 1634 // Host rules could also have effects. |
| 1569 if (ShadowRoot* shadowRoot = this->shadowRoot()) | 1635 if (ShadowRoot* shadowRoot = this->shadowRoot()) |
| 1570 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); | 1636 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); |
| 1571 return false; | 1637 return false; |
| 1572 } | 1638 } |
| 1573 | 1639 |
| 1574 } // namespace blink | 1640 } // namespace blink |
| OLD | NEW |