Skip to content
Permalink
Browse files
Rename ShadowRoot::hostElement to shadowRoot::host to match the lates…
…t spec

https://bugs.webkit.org/show_bug.cgi?id=148694

Address the review comments by Chris.

* dom/Element.cpp:
(WebCore::Element::removeShadowRoot):
* dom/Node.cpp:
(WebCore::Node::shadowHost):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
* dom/ShadowRoot.h:


Canonical link: https://commits.webkit.org/166821@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rniwa committed Sep 2, 2015
1 parent 10ad5a1 commit 9fb4f0870b6d0fc38eb2aff93ace74f542e7e017
Showing 5 changed files with 23 additions and 8 deletions.
@@ -1,3 +1,18 @@
2015-09-01 Ryosuke Niwa <rniwa@webkit.org>

Rename ShadowRoot::hostElement to shadowRoot::host to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=148694

Address the review comments by Chris.

* dom/Element.cpp:
(WebCore::Element::removeShadowRoot):
* dom/Node.cpp:
(WebCore::Node::shadowHost):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
* dom/ShadowRoot.h:

2015-09-01 Zalan Bujtas <zalan@apple.com>

Recompute maximum outline size only when outline changes.
@@ -1660,7 +1660,7 @@ void Element::removeShadowRoot()

elementRareData()->clearShadowRoot();

oldRoot->setHost(0);
oldRoot->setHost(nullptr);
oldRoot->setParentTreeScope(&document());

ChildNodeRemovalNotifier(*this).notify(*oldRoot);
@@ -1035,7 +1035,7 @@ Element* Node::shadowHost() const
{
if (ShadowRoot* root = containingShadowRoot())
return root->host();
return 0;
return nullptr;
}

Node* Node::deprecatedShadowAncestorNode() const
@@ -55,7 +55,7 @@ ShadowRoot::ShadowRoot(Document& document, ShadowRootType type)
, TreeScope(*this, document)
, m_resetStyleInheritance(false)
, m_type(type)
, m_hostElement(0)
, m_host(0)
{
}

@@ -53,8 +53,8 @@ class ShadowRoot final : public DocumentFragment, public TreeScope {
bool resetStyleInheritance() const { return m_resetStyleInheritance; }
void setResetStyleInheritance(bool);

Element* host() const { return m_hostElement; }
void setHost(Element* hostElement) { m_hostElement = hostElement; }
Element* host() const { return m_host; }
void setHost(Element* host) { m_host = host; }

String innerHTML() const;
void setInnerHTML(const String&, ExceptionCode&);
@@ -66,7 +66,7 @@ class ShadowRoot final : public DocumentFragment, public TreeScope {
PassRefPtr<Node> cloneNode(bool, ExceptionCode&);

ContentDistributor& distributor() { return m_distributor; }
void invalidateDistribution() { m_distributor.invalidateDistribution(m_hostElement); }
void invalidateDistribution() { m_distributor.invalidateDistribution(m_host); }

virtual void removeAllEventListeners() override;

@@ -79,12 +79,12 @@ class ShadowRoot final : public DocumentFragment, public TreeScope {
virtual RefPtr<Node> cloneNodeInternal(Document&, CloningOperation) override;

// FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=88834
bool isOrphan() const { return !m_hostElement; }
bool isOrphan() const { return !m_host; }

unsigned m_resetStyleInheritance : 1;
unsigned m_type : 1;

Element* m_hostElement;
Element* m_host;

ContentDistributor m_distributor;
};

0 comments on commit 9fb4f08

Please sign in to comment.