| 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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 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 27 matching lines...) Expand all Loading... |
| 38 #include "sky/engine/core/fetch/ResourceLoader.h" | 38 #include "sky/engine/core/fetch/ResourceLoader.h" |
| 39 #include "sky/engine/core/frame/FrameView.h" | 39 #include "sky/engine/core/frame/FrameView.h" |
| 40 #include "sky/engine/core/frame/LocalFrame.h" | 40 #include "sky/engine/core/frame/LocalFrame.h" |
| 41 #include "sky/engine/core/frame/Settings.h" | 41 #include "sky/engine/core/frame/Settings.h" |
| 42 #include "sky/engine/core/html/HTMLElement.h" | 42 #include "sky/engine/core/html/HTMLElement.h" |
| 43 #include "sky/engine/core/page/EventHandler.h" | 43 #include "sky/engine/core/page/EventHandler.h" |
| 44 #include "sky/engine/core/page/Page.h" | 44 #include "sky/engine/core/page/Page.h" |
| 45 #include "sky/engine/core/rendering/HitTestResult.h" | 45 #include "sky/engine/core/rendering/HitTestResult.h" |
| 46 #include "sky/engine/core/rendering/RenderFlexibleBox.h" | 46 #include "sky/engine/core/rendering/RenderFlexibleBox.h" |
| 47 #include "sky/engine/core/rendering/RenderGeometryMap.h" | 47 #include "sky/engine/core/rendering/RenderGeometryMap.h" |
| 48 #include "sky/engine/core/rendering/RenderImage.h" | |
| 49 #include "sky/engine/core/rendering/RenderImageResourceStyleImage.h" | |
| 50 #include "sky/engine/core/rendering/RenderInline.h" | 48 #include "sky/engine/core/rendering/RenderInline.h" |
| 51 #include "sky/engine/core/rendering/RenderLayer.h" | 49 #include "sky/engine/core/rendering/RenderLayer.h" |
| 52 #include "sky/engine/core/rendering/RenderObjectInlines.h" | 50 #include "sky/engine/core/rendering/RenderObjectInlines.h" |
| 53 #include "sky/engine/core/rendering/RenderParagraph.h" | 51 #include "sky/engine/core/rendering/RenderParagraph.h" |
| 54 #include "sky/engine/core/rendering/RenderText.h" | 52 #include "sky/engine/core/rendering/RenderText.h" |
| 55 #include "sky/engine/core/rendering/RenderTheme.h" | 53 #include "sky/engine/core/rendering/RenderTheme.h" |
| 56 #include "sky/engine/core/rendering/RenderView.h" | 54 #include "sky/engine/core/rendering/RenderView.h" |
| 57 #include "sky/engine/core/rendering/style/ShadowList.h" | 55 #include "sky/engine/core/rendering/style/ShadowList.h" |
| 58 #include "sky/engine/platform/JSONValues.h" | 56 #include "sky/engine/platform/JSONValues.h" |
| 59 #include "sky/engine/platform/Partitions.h" | 57 #include "sky/engine/platform/Partitions.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 return new RenderFlexibleBox(element); | 128 return new RenderFlexibleBox(element); |
| 131 } | 129 } |
| 132 | 130 |
| 133 return 0; | 131 return 0; |
| 134 } | 132 } |
| 135 | 133 |
| 136 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, renderObjectCounter, ("Rend
erObject")); | 134 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, renderObjectCounter, ("Rend
erObject")); |
| 137 unsigned RenderObject::s_instanceCount = 0; | 135 unsigned RenderObject::s_instanceCount = 0; |
| 138 | 136 |
| 139 RenderObject::RenderObject(Node* node) | 137 RenderObject::RenderObject(Node* node) |
| 140 : ImageResourceClient() | 138 : m_style(nullptr) |
| 141 , m_style(nullptr) | |
| 142 , m_node(node) | 139 , m_node(node) |
| 143 , m_parent(nullptr) | 140 , m_parent(nullptr) |
| 144 , m_previous(nullptr) | 141 , m_previous(nullptr) |
| 145 , m_next(nullptr) | 142 , m_next(nullptr) |
| 146 #if ENABLE(ASSERT) | 143 #if ENABLE(ASSERT) |
| 147 , m_setNeedsLayoutForbidden(false) | 144 , m_setNeedsLayoutForbidden(false) |
| 148 #if ENABLE(OILPAN) | 145 #if ENABLE(OILPAN) |
| 149 , m_didCallDestroy(false) | 146 , m_didCallDestroy(false) |
| 150 #endif | 147 #endif |
| 151 #endif | 148 #endif |
| (...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 overline.color = resultColor; | 1713 overline.color = resultColor; |
| 1717 overline.style = resultStyle; | 1714 overline.style = resultStyle; |
| 1718 } | 1715 } |
| 1719 if (decorations & TextDecorationLineThrough) { | 1716 if (decorations & TextDecorationLineThrough) { |
| 1720 linethrough.color = resultColor; | 1717 linethrough.color = resultColor; |
| 1721 linethrough.style = resultStyle; | 1718 linethrough.style = resultStyle; |
| 1722 } | 1719 } |
| 1723 } | 1720 } |
| 1724 } | 1721 } |
| 1725 | 1722 |
| 1726 bool RenderObject::willRenderImage(ImageResource*) | |
| 1727 { | |
| 1728 // FIXME(sky): Do we want to keep this? | |
| 1729 // We will not render a new image when Active DOM is suspended | |
| 1730 return !document().activeDOMObjectsAreSuspended(); | |
| 1731 } | |
| 1732 | |
| 1733 int RenderObject::caretMinOffset() const | 1723 int RenderObject::caretMinOffset() const |
| 1734 { | 1724 { |
| 1735 return 0; | 1725 return 0; |
| 1736 } | 1726 } |
| 1737 | 1727 |
| 1738 int RenderObject::caretMaxOffset() const | 1728 int RenderObject::caretMaxOffset() const |
| 1739 { | 1729 { |
| 1740 if (isReplaced()) | 1730 if (isReplaced()) |
| 1741 return node() ? std::max(1U, node()->countChildren()) : 1; | 1731 return node() ? std::max(1U, node()->countChildren()) : 1; |
| 1742 return 0; | 1732 return 0; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1761 // According to the CSS Box Model Spec (http://dev.w3.org/csswg/css-box/#the-wid
th-and-height-properties) | 1751 // According to the CSS Box Model Spec (http://dev.w3.org/csswg/css-box/#the-wid
th-and-height-properties) |
| 1762 // width applies to all elements but non-replaced inline elements, table rows, a
nd row groups and | 1752 // width applies to all elements but non-replaced inline elements, table rows, a
nd row groups and |
| 1763 // height applies to all elements but non-replaced inline elements, table column
s, and column groups. | 1753 // height applies to all elements but non-replaced inline elements, table column
s, and column groups. |
| 1764 bool RenderObject::supportsTouchAction() const | 1754 bool RenderObject::supportsTouchAction() const |
| 1765 { | 1755 { |
| 1766 if (isInline() && !isReplaced()) | 1756 if (isInline() && !isReplaced()) |
| 1767 return false; | 1757 return false; |
| 1768 return true; | 1758 return true; |
| 1769 } | 1759 } |
| 1770 | 1760 |
| 1771 void RenderObject::imageChanged(ImageResource* image, const IntRect* rect) | |
| 1772 { | |
| 1773 imageChanged(static_cast<WrappedImagePtr>(image), rect); | |
| 1774 } | |
| 1775 | |
| 1776 void RenderObject::imageChanged(WrappedImagePtr, const IntRect*) | |
| 1777 { | |
| 1778 if (parent()) | |
| 1779 document().scheduleVisualUpdate(); | |
| 1780 } | |
| 1781 | |
| 1782 Element* RenderObject::offsetParent() const | 1761 Element* RenderObject::offsetParent() const |
| 1783 { | 1762 { |
| 1784 Node* node = 0; | 1763 Node* node = 0; |
| 1785 for (RenderObject* ancestor = parent(); ancestor; ancestor = ancestor->paren
t()) { | 1764 for (RenderObject* ancestor = parent(); ancestor; ancestor = ancestor->paren
t()) { |
| 1786 // Spec: http://www.w3.org/TR/cssom-view/#offset-attributes | 1765 // Spec: http://www.w3.org/TR/cssom-view/#offset-attributes |
| 1787 node = ancestor->node(); | 1766 node = ancestor->node(); |
| 1788 if (!node) | 1767 if (!node) |
| 1789 continue; | 1768 continue; |
| 1790 | 1769 |
| 1791 if (ancestor->isPositioned()) | 1770 if (ancestor->isPositioned()) |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1901 { | 1880 { |
| 1902 if (object1) { | 1881 if (object1) { |
| 1903 const blink::RenderObject* root = object1; | 1882 const blink::RenderObject* root = object1; |
| 1904 while (root->parent()) | 1883 while (root->parent()) |
| 1905 root = root->parent(); | 1884 root = root->parent(); |
| 1906 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 1885 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 1907 } | 1886 } |
| 1908 } | 1887 } |
| 1909 | 1888 |
| 1910 #endif | 1889 #endif |
| OLD | NEW |