2010-05-24 Jer Noble <jer.noble@apple.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2010-05-24  Jer Noble  <jer.noble@apple.com>
2
3         Reviewed by Eric Carlson.
4
5         HTML5 <video> tag performance worse than Flash
6         https://bugs.webkit.org/show_bug.cgi?id=39577
7         rdar://problem/7982458
8         
9         Added attachments() back to QTPixelBuffer, as they are necessary for CAImageQueue.
10         
11         WKCACFLayer contents()/setContents() now return/take a CFTypeRef instead of a CGImageRef, which allows
12         a CAImageQueueRef to be set as a layer's contents.
13         
14         WKCAImageQueue is a simple C++ wrapper around the WebKitSystemInterface CAImageQueue functions.
15         
16         MediaPlayerPrivateQuickTimeVisualContext will now use a CAImageQueue to display movie frames if 
17         certain prerequisites are met (QuartzCore.dll and CoreVideo.dll version numbers must meet a certain
18         threshold defined in MediaPlayerPrivateQuickTimeVisualContext.cpp).
19         
20         * WebCore.vcproj/WebCore.vcproj:
21         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
22         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
23         * platform/graphics/win/QTPixelBuffer.cpp:
24         * platform/graphics/win/QTPixelBuffer.h:
25         * platform/graphics/win/WKCACFLayer.cpp:
26         * platform/graphics/win/WKCACFLayer.h:
27         * platform/graphics/win/WKCAImageQueue.cpp: Added.
28         * platform/graphics/win/WKCAImageQueue.h: Added.
29
30 2010-05-24  Adam Barth  <abarth@webkit.org>
31
32         Reviewed by Eric Seidel.
33
34         Teach the HTML5 parser how to lex escaped script data
35         https://bugs.webkit.org/show_bug.cgi?id=39630
36
37         * html/HTML5Lexer.cpp:
38         (WebCore::HTMLNames::vectorEqualsString):
39         (WebCore::HTML5Lexer::nextToken):
40         (WebCore::HTML5Lexer::temporaryBufferIs):
41         (WebCore::HTML5Lexer::isAppropriateEndTag):
42         (WebCore::HTML5Lexer::maybeFlushBufferedEndTag):
43         (WebCore::HTML5Lexer::flushBufferedEndTag):
44         * html/HTML5Lexer.h:
45
46 2010-05-24  Eric Seidel  <eric@webkit.org>
47
48         Unreviewed.  Trick MSVC into ignoring our unused code for the moment.
49
50         Prepare HTML5TreeBuilder for addition of new HTML5 parser code
51         https://bugs.webkit.org/show_bug.cgi?id=39623
52
53         * html/HTML5TreeBuilder.cpp:
54         (WebCore::HTML5TreeBuilder::constructTreeFromToken):
55
56 2010-05-24  Darin Adler  <darin@apple.com>
57
58         Fix build on platforms with touch code enabled.
59
60         * page/EventHandler.cpp:
61         (WebCore::pageZoomFactor): Added.
62         (WebCore::EventHandler::handleTouchEvent): Use pageZoomFactor.
63
64 2010-05-24  Darin Adler  <darin@apple.com>
65
66         Reviewed by Eric Seidel.
67
68         Move view-related functions from Frame to FrameView
69         https://bugs.webkit.org/show_bug.cgi?id=39366
70
71         Refactoring only so adds no new tests.
72
73         * WebCore.base.exp: Updated.
74
75         * css/CSSStyleSelector.cpp:
76         (WebCore::CSSStyleSelector::styleForDocument): Call zoom factor function
77         on FrameView.
78         (WebCore::CSSStyleSelector::applyProperty): Ditto.
79         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Ditto.
80         * dom/Document.cpp:
81         (WebCore::Document::elementFromPoint): Ditto.
82         (WebCore::Document::caretRangeFromPoint): Ditto.
83         * dom/MouseRelatedEvent.cpp:
84         (WebCore::contentsX): Ditto.
85         (WebCore::contentsY): Ditto.
86         (WebCore::pageZoomFactor): Added helper function.
87         (WebCore::MouseRelatedEvent::computePageLocation): Use helper.
88         (WebCore::MouseRelatedEvent::receivedTarget): Ditto.
89         * dom/Node.cpp:
90         (WebCore::Node::dispatchMouseEvent): Call zoom factor function on FrameView.
91         (WebCore::Node::dispatchWheelEvent): Ditto.
92         * dom/Touch.cpp:
93         (WebCore::contentsX): Call zoom factor function on FrameView.
94         (WebCore::contentsY): Ditto.
95         * html/HTMLBodyElement.cpp:
96         (WebCore::adjustForZoom): Ditto.
97         (WebCore::HTMLBodyElement::setScrollLeft): Ditto.
98         (WebCore::HTMLBodyElement::setScrollTop): Ditto.
99         * html/HTMLImageElement.cpp:
100         (WebCore::HTMLImageElement::width): Ditto.
101         (WebCore::HTMLImageElement::height): Ditto.
102         * loader/ImageDocument.cpp:
103         (WebCore::pageZoomFactor): Added helper function.
104         (WebCore::ImageTokenizer::finish): Use helper function
105         (WebCore::ImageDocument::scale): Ditto.
106         (WebCore::ImageDocument::resizeImageToFit): Ditto.
107         (WebCore::ImageDocument::imageChanged): Ditto.
108         (WebCore::ImageDocument::restoreImageSize): Ditto.
109         (WebCore::ImageDocument::imageFitsInWindow): Ditto.
110         * page/DOMWindow.cpp:
111         (WebCore::DOMWindow::innerHeight): Ditto.
112         (WebCore::DOMWindow::innerWidth): Ditto.
113         (WebCore::DOMWindow::scrollX): Ditto.
114         (WebCore::DOMWindow::scrollY): Ditto.
115         (WebCore::DOMWindow::scrollTo): Ditto.
116         * page/DragController.cpp:
117         (WebCore::elementUnderMouse): Ditto.
118
119         * page/Frame.cpp:
120         (WebCore::Frame::Frame): Removed code to initialize m_zoomFactor.
121         * page/Frame.h: Moved functions to FrameView. Moved all #if to the left
122         margin to make the style consistent. Removed empty function
123         removeEditingStyleFromBodyElement.
124
125         * page/FrameView.cpp:
126         (WebCore::parentZoomFactor): Added helper function for constructor.
127         (WebCore::FrameView::FrameView): Added initialization of m_zoomFactor.
128         (WebCore::FrameView::shouldApplyTextZoom): Moved this here from Frame.
129         (WebCore::FrameView::shouldApplyPageZoom): Ditto.
130         (WebCore::FrameView::setZoomFactor): Ditto.
131
132         * page/FrameView.h: Added members moved here from Frame.
133
134         * rendering/RenderView.cpp:
135         (WebCore::RenderView::zoomFactor): Call FrameView instead of Frame.
136         * svg/SVGSVGElement.cpp:
137         (WebCore::SVGSVGElement::currentScale): Ditto.
138         (WebCore::SVGSVGElement::setCurrentScale): Ditto.
139
140 2010-05-24  Jer Noble  <jer.noble@apple.com>
141
142         No review; build fix only.
143
144         Roll-out changes r60094, 60096-60097.
145         
146         * WebCore.vcproj/WebCore.vcproj:
147         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
148         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
149         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
150         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::destroyLayerForMovie):
151         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
152         * platform/graphics/win/QTPixelBuffer.cpp:
153         * platform/graphics/win/QTPixelBuffer.h:
154         * platform/graphics/win/WKCACFLayer.cpp:
155         (WebCore::WKCACFLayer::printLayer):
156         * platform/graphics/win/WKCACFLayer.h:
157         (WebCore::WKCACFLayer::setContents):
158         (WebCore::WKCACFLayer::contents):
159         (WebCore::WKCACFLayer::speed):
160         (WebCore::WKCACFLayer::timeOffset):
161         * platform/graphics/win/WKCAImageQueue.cpp: Removed.
162         * platform/graphics/win/WKCAImageQueue.h: Removed.
163
164 2010-05-24  Eric Seidel  <eric@webkit.org>
165
166         Unreviewed.  Add wtf/UnusedParam.h include to make Chromium happy.
167
168         Chromium does not use a prefix header in order to support
169         distcc3.  Other ports all do.  The real fix is to remove
170         wtf/UnusedParam.h from the prefix header.
171
172         * html/HTML5TreeBuilder.cpp:
173
174 2010-05-24  Jer Noble  <jer.noble@apple.com>
175
176         No review; build fix only.
177
178         Second half of previous build fix, in which I add the include in the correct place.
179
180         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
181
182 2010-05-24  Jer Noble  <jer.noble@apple.com>
183
184         No review; build fix only.
185
186         Include WKCAImageQueue.h outside the ACCELERATED_COMPOSITING check.
187
188         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
189
190 2010-05-24  Eric Seidel  <eric@webkit.org>
191
192         Reviewed by Adam Barth.
193
194         Prepare HTML5TreeBuilder for addition of new HTML5 parser code
195         https://bugs.webkit.org/show_bug.cgi?id=39623
196
197         Before we start transcribing the parser, we need a place to put it.
198
199         This also cleans up HTML5 token to not convert comment and character
200         data into AtomicStrings (which makes no sense).
201
202         No functionality change, so no new tests.
203
204         * html/HTML5Token.h:
205         (WebCore::HTML5Token::beginStartTag):
206         (WebCore::HTML5Token::beginEndTag):
207         (WebCore::HTML5Token::beginCharacter):
208         (WebCore::HTML5Token::beginComment):
209         (WebCore::HTML5Token::name):
210         (WebCore::HTML5Token::adoptDataAsStringImpl):
211         (WebCore::HTML5Token::characters):
212         (WebCore::HTML5Token::commentData):
213         (WebCore::HTML5Token::clearData):
214         * html/HTML5TreeBuilder.cpp:
215         (WebCore::convertToOldStyle):
216         (WebCore::HTML5TreeBuilder::constructTreeFromToken):
217         (WebCore::HTML5TreeBuilder::processToken):
218         * html/HTML5TreeBuilder.h:
219
220 2010-05-23  Jer Noble  <jer.noble@apple.com>
221
222         Reviewed by Eric Carlson.
223
224         HTML5 <video> tag performance worse than Flash
225         https://bugs.webkit.org/show_bug.cgi?id=39577
226         rdar://problem/7982458
227         
228         Added attachments() back to QTPixelBuffer, as they are necessary for CAImageQueue.
229         
230         WKCACFLayer contents()/setContents() now return/take a CFTypeRef instead of a CGImageRef, which allows
231         a CAImageQueueRef to be set as a layer's contents.
232         
233         WKCAImageQueue is a simple C++ wrapper around the WebKitSystemInterface CAImageQueue functions.
234         
235         MediaPlayerPrivateQuickTimeVisualContext will now use a CAImageQueue to display movie frames if 
236         certain prerequisites are met (QuartzCore.dll and CoreVideo.dll version numbers must meet a certain
237         threshold defined in MediaPlayerPrivateQuickTimeVisualContext.cpp).
238         
239         * WebCore.vcproj/WebCore.vcproj:
240         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
241         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
242         * platform/graphics/win/QTPixelBuffer.cpp:
243         * platform/graphics/win/QTPixelBuffer.h:
244         * platform/graphics/win/WKCACFLayer.cpp:
245         * platform/graphics/win/WKCACFLayer.h:
246         * platform/graphics/win/WKCAImageQueue.cpp: Added.
247         * platform/graphics/win/WKCAImageQueue.h: Added.
248
249 2010-05-24  Brady Eidson  <beidson@apple.com>
250
251         Reviewed by Darin Adler.
252
253         Database origins aren't populated at launch (missing db in prefs sheet, possible other symptoms)
254         <rdar://problem/8013233> and https://bugs.webkit.org/show_bug.cgi?id=39486
255
256         Currently, a Tracker needs to know it's path before origins are populated. Testing databases and 
257         related features is made very difficult with this regression, so instead of changing things in a
258         complicated way to make this not the case, I've added an "initialize Tracker with this path" function
259         that calls the DatabaseTracker constructor with the initial path.
260
261         I checked the other platforms besides Mac and Win, and none of them seem to perform the 
262         "initialize databases if necessary" step in their init routines, so this change shouldn't effect them.
263
264         No new tests. (API specific layout test in DRT is forthcoming)
265
266         * WebCore.base.exp:
267
268         * storage/DatabaseTracker.cpp:
269         (WebCore::DatabaseTracker::initializeTracker): Added to create the tracker with its initial path.
270         (WebCore::DatabaseTracker::tracker): Move the static tracker out so tracker() and initializeTracker()
271           can share it. Add a fallback to not change behavior of platforms that don't call the new 
272           "initializeTracker()" method.
273         (WebCore::DatabaseTracker::DatabaseTracker): Changed to take the initial path as an argument.
274         * storage/DatabaseTracker.h:
275
276         * storage/chromium/DatabaseTrackerChromium.cpp:
277         (WebCore::DatabaseTracker::tracker): Adapt to new c'tor.
278         (WebCore::DatabaseTracker::DatabaseTracker): Ditto.
279
280 2010-05-24  Adam Barth  <abarth@webkit.org>
281
282         Reviewed by Eric Seidel.
283
284         Teach the HTML5 parser to lex DOCTYPEs
285         https://bugs.webkit.org/show_bug.cgi?id=39571
286
287         * html/HTML5Lexer.cpp:
288         (WebCore::HTML5Lexer::nextToken):
289         * html/HTML5Lexer.h:
290         * html/HTML5Token.h:
291         (WebCore::HTML5Token::beginDOCTYPE):
292         (WebCore::HTML5Token::publicIdentifier):
293         (WebCore::HTML5Token::systemIdentifier):
294         (WebCore::HTML5Token::setPublicIdentifierToEmptyString):
295         (WebCore::HTML5Token::setSystemIdentifierToEmptyString):
296         (WebCore::HTML5Token::appendToPublicIdentifier):
297         (WebCore::HTML5Token::appendToSystemIdentifier):
298         (WebCore::HTML5Token::DoctypeData::DoctypeData):
299         * html/HTML5TreeBuilder.cpp:
300         (WebCore::convertToOldStyle):
301         (WebCore::HTML5TreeBuilder::passTokenToLegacyParser):
302         * platform/text/SegmentedString.h:
303         (WebCore::SegmentedString::lookAheadIgnoringCase):
304         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
305
306 == Rolled over to ChangeLog-2010-05-24 ==