Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: Source/WebCore/history/CachedFrame.cpp

Issue 14296003: Remove TOUCH_EVENTS and TOUCH_EVENT_TRACKING compile-time flags. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "CachedPage.h" 27 #include "CachedPage.h"
28 28
29 #include "CachedFramePlatformData.h" 29 #include "CachedFramePlatformData.h"
30 #include "Chrome.h"
31 #include "ChromeClient.h"
30 #include "DOMWindow.h" 32 #include "DOMWindow.h"
31 #include "Document.h" 33 #include "Document.h"
32 #include "DocumentLoader.h" 34 #include "DocumentLoader.h"
33 #include "ExceptionCode.h" 35 #include "ExceptionCode.h"
34 #include "EventNames.h" 36 #include "EventNames.h"
35 #include "FocusController.h" 37 #include "FocusController.h"
36 #include "Frame.h" 38 #include "Frame.h"
37 #include "FrameLoader.h" 39 #include "FrameLoader.h"
38 #include "FrameLoaderClient.h" 40 #include "FrameLoaderClient.h"
39 #include "FrameView.h" 41 #include "FrameView.h"
40 #include "HistoryItem.h" 42 #include "HistoryItem.h"
41 #include "Logging.h" 43 #include "Logging.h"
42 #include "Page.h" 44 #include "Page.h"
43 #include "PageCache.h" 45 #include "PageCache.h"
44 #include "PageTransitionEvent.h" 46 #include "PageTransitionEvent.h"
45 #include "SerializedScriptValue.h" 47 #include "SerializedScriptValue.h"
46 #include <wtf/text/CString.h> 48 #include <wtf/text/CString.h>
47 #include <wtf/RefCountedLeakCounter.h> 49 #include <wtf/RefCountedLeakCounter.h>
48 50
49 #if ENABLE(SVG) 51 #if ENABLE(SVG)
50 #include "SVGDocumentExtensions.h" 52 #include "SVGDocumentExtensions.h"
51 #endif 53 #endif
52 54
53 #if ENABLE(TOUCH_EVENTS)
54 #include "Chrome.h"
55 #include "ChromeClient.h"
56 #endif
57
58
59 namespace WebCore { 55 namespace WebCore {
60 56
61 #ifndef NDEBUG 57 #ifndef NDEBUG
62 static WTF::RefCountedLeakCounter& cachedFrameCounter() 58 static WTF::RefCountedLeakCounter& cachedFrameCounter()
63 { 59 {
64 DEFINE_STATIC_LOCAL(WTF::RefCountedLeakCounter, counter, ("CachedFrame")); 60 DEFINE_STATIC_LOCAL(WTF::RefCountedLeakCounter, counter, ("CachedFrame"));
65 return counter; 61 return counter;
66 } 62 }
67 #endif 63 #endif
68 64
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 112
117 // Open the child CachedFrames in their respective FrameLoaders. 113 // Open the child CachedFrames in their respective FrameLoaders.
118 for (unsigned i = 0; i < m_childFrames.size(); ++i) 114 for (unsigned i = 0; i < m_childFrames.size(); ++i)
119 m_childFrames[i]->open(); 115 m_childFrames[i]->open();
120 116
121 m_document->enqueuePageshowEvent(PageshowEventPersisted); 117 m_document->enqueuePageshowEvent(PageshowEventPersisted);
122 118
123 HistoryItem* historyItem = frame->loader()->history()->currentItem(); 119 HistoryItem* historyItem = frame->loader()->history()->currentItem();
124 m_document->enqueuePopstateEvent(historyItem && historyItem->stateObject() ? historyItem->stateObject() : SerializedScriptValue::nullValue()); 120 m_document->enqueuePopstateEvent(historyItem && historyItem->stateObject() ? historyItem->stateObject() : SerializedScriptValue::nullValue());
125 121
126 #if ENABLE(TOUCH_EVENTS)
127 if (m_document->hasTouchEventHandlers()) 122 if (m_document->hasTouchEventHandlers())
128 m_document->page()->chrome()->client()->needTouchEvents(true); 123 m_document->page()->chrome()->client()->needTouchEvents(true);
129 #endif
130 124
131 m_document->documentDidResumeFromPageCache(); 125 m_document->documentDidResumeFromPageCache();
132 } 126 }
133 127
134 CachedFrame::CachedFrame(Frame* frame) 128 CachedFrame::CachedFrame(Frame* frame)
135 : CachedFrameBase(frame) 129 : CachedFrameBase(frame)
136 { 130 {
137 #ifndef NDEBUG 131 #ifndef NDEBUG
138 cachedFrameCounter().increment(); 132 cachedFrameCounter().increment();
139 #endif 133 #endif
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 int CachedFrame::descendantFrameCount() const 265 int CachedFrame::descendantFrameCount() const
272 { 266 {
273 int count = m_childFrames.size(); 267 int count = m_childFrames.size();
274 for (size_t i = 0; i < m_childFrames.size(); ++i) 268 for (size_t i = 0; i < m_childFrames.size(); ++i)
275 count += m_childFrames[i]->descendantFrameCount(); 269 count += m_childFrames[i]->descendantFrameCount();
276 270
277 return count; 271 return count;
278 } 272 }
279 273
280 } // namespace WebCore 274 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698