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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 #include "core/css/StyleSheetContents.h" | 53 #include "core/css/StyleSheetContents.h" |
54 #include "core/css/StyleSheetList.h" | 54 #include "core/css/StyleSheetList.h" |
55 #include "core/css/invalidation/StyleInvalidator.h" | 55 #include "core/css/invalidation/StyleInvalidator.h" |
56 #include "core/css/parser/CSSParser.h" | 56 #include "core/css/parser/CSSParser.h" |
57 #include "core/css/resolver/FontBuilder.h" | 57 #include "core/css/resolver/FontBuilder.h" |
58 #include "core/css/resolver/StyleResolver.h" | 58 #include "core/css/resolver/StyleResolver.h" |
59 #include "core/css/resolver/StyleResolverStats.h" | 59 #include "core/css/resolver/StyleResolverStats.h" |
60 #include "core/dom/AddConsoleMessageTask.h" | 60 #include "core/dom/AddConsoleMessageTask.h" |
61 #include "core/dom/Attr.h" | 61 #include "core/dom/Attr.h" |
62 #include "core/dom/CDATASection.h" | 62 #include "core/dom/CDATASection.h" |
63 #include "core/dom/ClientRect.h" | |
63 #include "core/dom/Comment.h" | 64 #include "core/dom/Comment.h" |
64 #include "core/dom/ContextFeatures.h" | 65 #include "core/dom/ContextFeatures.h" |
65 #include "core/dom/DOMImplementation.h" | 66 #include "core/dom/DOMImplementation.h" |
66 #include "core/dom/DocumentFragment.h" | 67 #include "core/dom/DocumentFragment.h" |
67 #include "core/dom/DocumentLifecycleNotifier.h" | 68 #include "core/dom/DocumentLifecycleNotifier.h" |
68 #include "core/dom/DocumentLifecycleObserver.h" | 69 #include "core/dom/DocumentLifecycleObserver.h" |
69 #include "core/dom/DocumentMarkerController.h" | 70 #include "core/dom/DocumentMarkerController.h" |
70 #include "core/dom/DocumentType.h" | 71 #include "core/dom/DocumentType.h" |
71 #include "core/dom/Element.h" | 72 #include "core/dom/Element.h" |
72 #include "core/dom/ElementDataCache.h" | 73 #include "core/dom/ElementDataCache.h" |
(...skipping 5536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5609 TrackExceptionState exceptionState; | 5610 TrackExceptionState exceptionState; |
5610 AtomicString selector(metaElementContents.substring(0, firstSemicolon)); | 5611 AtomicString selector(metaElementContents.substring(0, firstSemicolon)); |
5611 RefPtrWillBeRawPtr<StaticElementList> elementList = querySelectorAll(sel ector, exceptionState); | 5612 RefPtrWillBeRawPtr<StaticElementList> elementList = querySelectorAll(sel ector, exceptionState); |
5612 if (!elementList || exceptionState.hadException()) | 5613 if (!elementList || exceptionState.hadException()) |
5613 continue; | 5614 continue; |
5614 | 5615 |
5615 unsigned nodeListLength = elementList->length(); | 5616 unsigned nodeListLength = elementList->length(); |
5616 if (!nodeListLength) | 5617 if (!nodeListLength) |
5617 continue; | 5618 continue; |
5618 | 5619 |
5620 TransitionElementData newElements; | |
5619 StringBuilder markup; | 5621 StringBuilder markup; |
5620 for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) { | 5622 for (unsigned nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex) { |
5621 Element* element = elementList->item(nodeIndex); | 5623 Element* element = elementList->item(nodeIndex); |
5622 markup.append(createStyledMarkupForNavigationTransition(element)); | 5624 markup.append(createStyledMarkupForNavigationTransition(element)); |
5625 newElements.rects.append(element->boundsInRootViewSpace()); | |
5626 newElements.names.append(element->getIdAttribute().string()); | |
esprehn
2014/10/24 21:59:11
Using querySelector doesn't mean that these have i
Zhen Wang
2014/10/27 14:14:45
Checking if the element has ID now. Using empty st
| |
5623 } | 5627 } |
5624 | 5628 |
5625 TransitionElementData newElements; | |
5626 newElements.scope = metaElementContents.substring(firstSemicolon + 1).st ripWhiteSpace(); | 5629 newElements.scope = metaElementContents.substring(firstSemicolon + 1).st ripWhiteSpace(); |
5627 newElements.selector = selector; | 5630 newElements.selector = selector; |
5628 newElements.markup = markup.toString(); | 5631 newElements.markup = markup.toString(); |
5629 elementData.append(newElements); | 5632 elementData.append(newElements); |
5630 } | 5633 } |
5631 } | 5634 } |
5632 | 5635 |
5633 void Document::hideTransitionElements(const AtomicString& cssSelector) | 5636 void Document::hideTransitionElements(const AtomicString& cssSelector) |
5634 { | 5637 { |
5635 TrackExceptionState exceptionState; | 5638 TrackExceptionState exceptionState; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5823 #ifndef NDEBUG | 5826 #ifndef NDEBUG |
5824 using namespace blink; | 5827 using namespace blink; |
5825 void showLiveDocumentInstances() | 5828 void showLiveDocumentInstances() |
5826 { | 5829 { |
5827 WeakDocumentSet& set = liveDocumentSet(); | 5830 WeakDocumentSet& set = liveDocumentSet(); |
5828 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5831 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5829 for (Document* document : set) | 5832 for (Document* document : set) |
5830 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); | 5833 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); |
5831 } | 5834 } |
5832 #endif | 5835 #endif |
OLD | NEW |