Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Minor cleans up in custom elements' code per Darin's comments
https://bugs.webkit.org/show_bug.cgi?id=155081

Reviewed by Darin Adler.

Cleanup per Darin's comments.

* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::findInterface): Use get instead of explicitly checking against end().
* dom/LifecycleCallbackQueue.h: Remove unecessary header includes.


Canonical link: https://commits.webkit.org/173164@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rniwa committed Mar 6, 2016
1 parent 6ddcd9e commit 21f572e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
13 changes: 13 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
2016-03-05 Ryosuke Niwa <rniwa@webkit.org>

Minor cleans up in custom elements' code per Darin's comments
https://bugs.webkit.org/show_bug.cgi?id=155081

Reviewed by Darin Adler.

Cleanup per Darin's comments.

* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::findInterface): Use get instead of explicitly checking against end().
* dom/LifecycleCallbackQueue.h: Remove unecessary header includes.

2016-03-05 Sam Weinig <sam@webkit.org>

Fix two minor typos from http://trac.webkit.org/changeset/197626 that were causing some test failures.
Expand Down
6 changes: 2 additions & 4 deletions Source/WebCore/dom/CustomElementDefinitions.cpp
Expand Up @@ -85,14 +85,12 @@ JSCustomElementInterface* CustomElementDefinitions::findInterface(const Qualifie

JSCustomElementInterface* CustomElementDefinitions::findInterface(const AtomicString& name) const
{
auto it = m_nameMap.find(name);
return it == m_nameMap.end() ? nullptr : it->value.get();
return m_nameMap.get(name);
}

JSCustomElementInterface* CustomElementDefinitions::findInterface(const JSC::JSObject* constructor) const
{
auto it = m_constructorMap.find(constructor);
return it == m_constructorMap.end() ? nullptr : it->value;
return m_constructorMap.get(constructor);
}

bool CustomElementDefinitions::containsConstructor(const JSC::JSObject* constructor) const
Expand Down
5 changes: 2 additions & 3 deletions Source/WebCore/dom/LifecycleCallbackQueue.h
Expand Up @@ -28,18 +28,17 @@

#if ENABLE(CUSTOM_ELEMENTS)

#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include <wtf/text/AtomicString.h>

namespace WebCore {

class JSCustomElementInterface;
class Document;
class Element;
class QualifiedName;
class LifecycleQueueItem;
class QualifiedName;

class LifecycleCallbackQueue {
WTF_MAKE_NONCOPYABLE(LifecycleCallbackQueue);
Expand Down

0 comments on commit 21f572e

Please sign in to comment.