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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 5698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5709 m_taskRunner->postTask(AutofocusTask::create()); | 5709 m_taskRunner->postTask(AutofocusTask::create()); |
5710 } | 5710 } |
5711 | 5711 |
5712 Element* Document::activeElement() const | 5712 Element* Document::activeElement() const |
5713 { | 5713 { |
5714 if (Element* element = treeScope().adjustedFocusedElement()) | 5714 if (Element* element = treeScope().adjustedFocusedElement()) |
5715 return element; | 5715 return element; |
5716 return body(); | 5716 return body(); |
5717 } | 5717 } |
5718 | 5718 |
5719 void Document::hideTransitionElements(unsigned elementsToHide) | |
5720 { | |
5721 unsigned currentValidTransitionElementsTag = 0; | |
5722 for (HTMLMetaElement* metaElement = head() ? Traversal<HTMLMetaElement>::fir stChild(*head()) : 0; metaElement; metaElement = Traversal<HTMLMetaElement>::nex tSibling(*metaElement)) { | |
5723 if (metaElement->name() != "transition-elements") | |
5724 continue; | |
5725 | |
5726 Vector<String> tokens; | |
5727 metaElement->content().string().split(';', tokens); | |
5728 if (tokens.size() != 2) | |
5729 continue; | |
5730 | |
5731 TrackExceptionState exceptionState; | |
5732 RefPtr<NodeList> nodeList = querySelectorAll(AtomicString(tokens[0]), ex ceptionState); | |
5733 if (nodeList && !exceptionState.hadException()) { | |
5734 unsigned nodeListLength = nodeList->length(); | |
5735 if (!nodeListLength || elementsToHide != currentValidTransitionEleme ntsTag++) | |
5736 continue; | |
abarth-chromium
2014/06/21 05:38:36
What if the meta tag has changed since the caller
oystein (OOO til 10th of July)
2014/07/22 21:17:21
I've changed this to just pass around the CSS sele
| |
5737 | |
5738 for (unsigned nodeIdx = 0; nodeIdx < nodeListLength; ++nodeIdx) { | |
abarth-chromium
2014/06/21 05:38:36
nodeIndex
oystein (OOO til 10th of July)
2014/07/22 21:17:21
Done.
| |
5739 Node* node = nodeList->item(nodeIdx); | |
5740 toElement(node)->setInlineStyleProperty(CSSPropertyDisplay, CSSV alueNone); | |
abarth-chromium
2014/06/21 05:38:36
This all looks like something that could be better
| |
5741 } | |
5742 | |
5743 return; | |
5744 } | |
5745 } | |
5746 } | |
5747 | |
5719 bool Document::hasFocus() const | 5748 bool Document::hasFocus() const |
5720 { | 5749 { |
5721 Page* page = this->page(); | 5750 Page* page = this->page(); |
5722 if (!page) | 5751 if (!page) |
5723 return false; | 5752 return false; |
5724 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) | 5753 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) |
5725 return false; | 5754 return false; |
5726 Frame* focusedFrame = page->focusController().focusedFrame(); | 5755 Frame* focusedFrame = page->focusController().focusedFrame(); |
5727 if (focusedFrame && focusedFrame->isLocalFrame()) { | 5756 if (focusedFrame && focusedFrame->isLocalFrame()) { |
5728 if (toLocalFrame(focusedFrame)->tree().isDescendantOf(frame())) | 5757 if (toLocalFrame(focusedFrame)->tree().isDescendantOf(frame())) |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5855 visitor->trace(m_compositorPendingAnimations); | 5884 visitor->trace(m_compositorPendingAnimations); |
5856 visitor->trace(m_contextDocument); | 5885 visitor->trace(m_contextDocument); |
5857 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5886 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5858 DocumentSupplementable::trace(visitor); | 5887 DocumentSupplementable::trace(visitor); |
5859 TreeScope::trace(visitor); | 5888 TreeScope::trace(visitor); |
5860 ContainerNode::trace(visitor); | 5889 ContainerNode::trace(visitor); |
5861 ExecutionContext::trace(visitor); | 5890 ExecutionContext::trace(visitor); |
5862 } | 5891 } |
5863 | 5892 |
5864 } // namespace WebCore | 5893 } // namespace WebCore |
OLD | NEW |