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 5674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5685 if (metaElement->name() != "transition-elements") | 5685 if (metaElement->name() != "transition-elements") |
5686 continue; | 5686 continue; |
5687 | 5687 |
5688 const String& metaElementContents = metaElement->content().string(); | 5688 const String& metaElementContents = metaElement->content().string(); |
5689 size_t firstSemicolon = metaElementContents.find(';'); | 5689 size_t firstSemicolon = metaElementContents.find(';'); |
5690 if (firstSemicolon == kNotFound) | 5690 if (firstSemicolon == kNotFound) |
5691 continue; | 5691 continue; |
5692 | 5692 |
5693 TrackExceptionState exceptionState; | 5693 TrackExceptionState exceptionState; |
5694 AtomicString selector(metaElementContents.substring(0, firstSemicolon)); | 5694 AtomicString selector(metaElementContents.substring(0, firstSemicolon)); |
5695 RefPtrWillBeRawPtr<StaticNodeList> nodeList = querySelectorAll(selector,
exceptionState); | 5695 RefPtrWillBeRawPtr<StaticElementList> elementList = querySelectorAll(sel
ector, exceptionState); |
5696 if (!nodeList || exceptionState.hadException()) | 5696 if (!elementList || exceptionState.hadException()) |
5697 continue; | 5697 continue; |
5698 | 5698 |
5699 unsigned nodeListLength = nodeList->length(); | 5699 unsigned nodeListLength = elementList->length(); |
5700 if (!nodeListLength) | 5700 if (!nodeListLength) |
5701 continue; | 5701 continue; |
5702 | 5702 |
5703 StringBuilder markup; | 5703 StringBuilder markup; |
5704 for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) { | 5704 for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) { |
5705 Node* node = nodeList->item(nodeIndex); | 5705 Element* element = elementList->item(nodeIndex); |
5706 markup.append(createStyledMarkupForNavigationTransition(node)); | 5706 markup.append(createStyledMarkupForNavigationTransition(element)); |
5707 } | 5707 } |
5708 | 5708 |
5709 TransitionElementData newElements; | 5709 TransitionElementData newElements; |
5710 newElements.scope = metaElementContents.substring(firstSemicolon + 1).st
ripWhiteSpace(); | 5710 newElements.scope = metaElementContents.substring(firstSemicolon + 1).st
ripWhiteSpace(); |
5711 newElements.selector = selector; | 5711 newElements.selector = selector; |
5712 newElements.markup = markup.toString(); | 5712 newElements.markup = markup.toString(); |
5713 elementData.append(newElements); | 5713 elementData.append(newElements); |
5714 } | 5714 } |
5715 } | 5715 } |
5716 | 5716 |
5717 void Document::hideTransitionElements(const AtomicString& cssSelector) | 5717 void Document::hideTransitionElements(const AtomicString& cssSelector) |
5718 { | 5718 { |
5719 TrackExceptionState exceptionState; | 5719 TrackExceptionState exceptionState; |
5720 RefPtrWillBeRawPtr<StaticNodeList> nodeList = querySelectorAll(cssSelector,
exceptionState); | 5720 RefPtrWillBeRawPtr<StaticElementList> elementList = querySelectorAll(cssSele
ctor, exceptionState); |
5721 if (nodeList && !exceptionState.hadException()) { | 5721 if (elementList && !exceptionState.hadException()) { |
5722 unsigned nodeListLength = nodeList->length(); | 5722 unsigned nodeListLength = elementList->length(); |
5723 | 5723 |
5724 for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) { | 5724 for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) { |
5725 Node* node = nodeList->item(nodeIndex); | 5725 Element* element = elementList->item(nodeIndex); |
5726 toElement(node)->setInlineStyleProperty(CSSPropertyDisplay, CSSValue
None); | 5726 element->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); |
5727 } | 5727 } |
5728 } | 5728 } |
5729 } | 5729 } |
5730 | 5730 |
5731 bool Document::hasFocus() const | 5731 bool Document::hasFocus() const |
5732 { | 5732 { |
5733 Page* page = this->page(); | 5733 Page* page = this->page(); |
5734 if (!page) | 5734 if (!page) |
5735 return false; | 5735 return false; |
5736 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) | 5736 if (!page->focusController().isActive() || !page->focusController().isFocuse
d()) |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5883 using namespace blink; | 5883 using namespace blink; |
5884 void showLiveDocumentInstances() | 5884 void showLiveDocumentInstances() |
5885 { | 5885 { |
5886 WeakDocumentSet& set = liveDocumentSet(); | 5886 WeakDocumentSet& set = liveDocumentSet(); |
5887 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5887 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5888 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 5888 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
5889 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 5889 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
5890 } | 5890 } |
5891 } | 5891 } |
5892 #endif | 5892 #endif |
OLD | NEW |