2011-01-29 Dan Winship <danw@gnome.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-01-29  Dan Winship  <danw@gnome.org>
2
3         Reviewed by Xan Lopez.
4
5         [GTK] Remove HAVE_LIBSOUP_2_29_90 conditionals; we depend on
6         libsoup 2.33.1 now.
7         https://bugs.webkit.org/show_bug.cgi?id=50675
8
9         * platform/network/soup/CookieJarSoup.cpp:
10         (WebCore::defaultCookieJar):
11         (WebCore::setCookies):
12         * platform/network/soup/ResourceHandleSoup.cpp:
13         (WebCore::ResourceHandle::prepareForURL):
14         (WebCore::restartedCallback):
15         (WebCore::startHttp):
16         * platform/network/soup/ResourceRequestSoup.cpp:
17         (WebCore::ResourceRequest::updateSoupMessage):
18         (WebCore::ResourceRequest::toSoupMessage):
19         (WebCore::ResourceRequest::updateFromSoupMessage):
20
21 2011-01-29  Adam Barth  <abarth@webkit.org>
22
23         Reviewed by Daniel Bates.
24
25         XSSFilter should replace URLs with about:blank instead of the empty string
26         https://bugs.webkit.org/show_bug.cgi?id=53370
27
28         Using the empty string will make the URL complete to the current
29         document's URL, which isn't really what we want.  Instead, we want to
30         use about:blank, which is safe.
31
32         * html/parser/XSSFilter.cpp:
33         (WebCore::XSSFilter::filterObjectToken):
34         (WebCore::XSSFilter::filterEmbedToken):
35
36 2011-01-29  Adam Barth  <abarth@webkit.org>
37
38         Reviewed by Daniel Bates.
39
40         XSSFilter should pass xssAuditor/script-tag-addslashes*
41         https://bugs.webkit.org/show_bug.cgi?id=53365
42
43         We need to canonicalize strings to avoid being tricked by addslashes.
44
45         * html/parser/XSSFilter.cpp:
46         (WebCore::HTMLNames::isNonCanonicalCharacter):
47             - This function is copied from the XSSAuditor (with some tweaks).
48               We'll eventually remove the XSSAuditor once we've got XSSFilter
49               working properly.
50         (WebCore::HTMLNames::canonicalize):
51         (WebCore::HTMLNames::decodeURL):
52         (WebCore::XSSFilter::isContainedInRequest):
53
54 2011-01-29  Adam Barth  <abarth@webkit.org>
55
56         Reviewed by Daniel Bates.
57
58         XSSFilter should pass xssAuditor/script-tag-with-source-same-host.html
59         and xssAuditor/script-tag-post-*
60         https://bugs.webkit.org/show_bug.cgi?id=53364
61
62         We're supposed to allow loading same-origin resources even if they
63         appear as part of the request.
64
65         Also, we're supposed to look at the POST data too.  :)
66
67         * html/parser/XSSFilter.cpp:
68         (WebCore::XSSFilter::eraseAttributeIfInjected):
69         (WebCore::XSSFilter::isSameOriginResource):
70             - Copy/paste from XSSAuditor::isSameOriginResource.  We'll
71               eventually remove the XSSAuditor version when XSSFilter is done.
72         * html/parser/XSSFilter.h:
73
74 2011-01-29  Adam Barth  <abarth@webkit.org>
75
76         Reviewed by Daniel Bates.
77
78         XSSFilter should pass 16 of the xssAuditor/script-tag* tests
79         https://bugs.webkit.org/show_bug.cgi?id=53362
80
81         Turns out we need to replace the src attribute of script tags with
82         about:blank to avoid loading the main document URL as a script.  Also,
83         move misplaced return statement that was triggering the console message
84         too often.
85
86         * html/parser/HTMLToken.h:
87         (WebCore::HTMLToken::appendToAttributeValue):
88         * html/parser/XSSFilter.cpp:
89         (WebCore::XSSFilter::filterScriptToken):
90         (WebCore::XSSFilter::eraseAttributeIfInjected):
91         * html/parser/XSSFilter.h:
92
93 2011-01-28  Jon Honeycutt  <jhoneycutt@apple.com>
94
95         Downloads in WK2 on Windows should write resume data to bundle
96         https://bugs.webkit.org/show_bug.cgi?id=53282
97         <rdar://problem/8753077>
98
99         Reviewed by Alice Liu.
100
101         * WebCore.vcproj/WebCore.vcproj:
102         Added new files to project.
103
104         * platform/network/cf/DownloadBundle.h: Added.
105         * platform/network/win/DownloadBundleWin.cpp: Added.
106         (WebCore::DownloadBundle::magicNumber):
107         Moved from WebKit's WebDownload so that WebKit and WebKit2 can share
108         it.
109         (WebCore::DownloadBundle::fileExtension):
110         Ditto.
111         (WebCore::DownloadBundle::appendResumeData):
112         Ditto - but modified to return bool rather than HRESULT and to clean up
113         whitespace.
114         (WebCore::DownloadBundle::extractResumeData):
115         Ditto - modified to clean up whitespace.
116
117 2011-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
118
119         Unreviewed, rolling out r77050.
120         http://trac.webkit.org/changeset/77050
121         https://bugs.webkit.org/show_bug.cgi?id=53371
122
123         Caused a crash in Chromium's test_shell_tests (Requested by
124         rniwa on #webkit).
125
126         * html/parser/HTMLTreeBuilder.cpp:
127         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
128         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
129         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
130         * html/parser/HTMLTreeBuilder.h:
131
132 2011-01-28  Eric Seidel  <eric@webkit.org>
133
134         Reviewed by Darin Adler.
135
136         HTML5 TreeBuilder regressed a Peacekeeper DOM test by 40%
137         https://bugs.webkit.org/show_bug.cgi?id=48719
138
139         It's unclear exactly what the Peacekeeper benchmark is testing,
140         because I haven't found a way to run it myself.
141
142         However, I constructed a benchmark which shows at least one possible slow point.
143         The HTML5 spec talks about creating a new document for every time we use
144         the fragment parsing algorithm.  Document() it turns out, it a huge bloated
145         mess, and the constructor and destructor do a huge amount of work.
146         To avoid constructing (or destructing) documents for each innerHTML call,
147         this patch adds a shared dummy document used by all innerHTML calls.
148
149         This patch brings us from 7x slower than Safari 5 on tiny-innerHTML
150         to only 1.5x slower than Safari 5.  I'm sure there is more work to do here.
151
152         Saving a shared Document like this is error prone.  Currently
153         DummyDocumentFactory::releaseDocument() calls removeAllChildren()
154         in an attempt to clear the Document's state. However it's possible
155         that that call is not sufficient and we'll have future bugs here.
156
157         * html/parser/HTMLTreeBuilder.cpp:
158         (WebCore::DummyDocumentFactory::createDummyDocument):
159         (WebCore::DummyDocumentFactory::releaseDocument):
160         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
161         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
162         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
163         * html/parser/HTMLTreeBuilder.h:
164
165 2011-01-28  Johnny Ding  <jnd@chromium.org>
166
167         Reviewed by Adam Barth.
168
169         Gesture API: Don't use current gesture status to set "forceUserGesture" parameter when calling ScriptController::executeScript.
170         The "forceUserGesture" parameter should be only set when you are definitely sure that the running script is from a hyper-link.
171         https://bugs.webkit.org/show_bug.cgi?id=53244
172
173         Test: fast/events/popup-blocked-from-iframe-src.html
174
175         * bindings/ScriptControllerBase.cpp:
176         (WebCore::ScriptController::executeIfJavaScriptURL):
177
178 2011-01-28  Simon Fraser  <simon.fraser@apple.com>
179
180         Reviewed by Gavin Barraclough.
181
182         Add various clampToInt() methods to MathExtras.h
183         https://bugs.webkit.org/show_bug.cgi?id=52910
184
185         Use clampToInteger() from MathExtras.h
186
187         * css/CSSParser.cpp:
188         (WebCore::CSSParser::parseCounter):
189
190 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
191
192         Unreviewed, rolling out r77006 and r77020.
193         http://trac.webkit.org/changeset/77006
194         http://trac.webkit.org/changeset/77020
195         https://bugs.webkit.org/show_bug.cgi?id=53360
196
197         "Broke Windows tests" (Requested by rniwa on #webkit).
198
199         * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
200         * WebCore.exp.in:
201         * bindings/js/DOMWrapperWorld.h:
202         * bindings/js/JSAudioConstructor.cpp:
203         (WebCore::JSAudioConstructor::JSAudioConstructor):
204         * bindings/js/JSDOMBinding.cpp:
205         (WebCore::markDOMNodesForDocument):
206         (WebCore::markDOMObjectWrapper):
207         (WebCore::markDOMNodeWrapper):
208         * bindings/js/JSDOMGlobalObject.cpp:
209         (WebCore::JSDOMGlobalObject::markChildren):
210         (WebCore::JSDOMGlobalObject::setInjectedScript):
211         (WebCore::JSDOMGlobalObject::injectedScript):
212         * bindings/js/JSDOMGlobalObject.h:
213         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
214         (WebCore::getDOMConstructor):
215         * bindings/js/JSDOMWindowCustom.cpp:
216         (WebCore::JSDOMWindow::setLocation):
217         (WebCore::DialogHandler::dialogCreated):
218         * bindings/js/JSDOMWindowShell.cpp:
219         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
220         (WebCore::JSDOMWindowShell::setWindow):
221         (WebCore::JSDOMWindowShell::markChildren):
222         (WebCore::JSDOMWindowShell::unwrappedObject):
223         * bindings/js/JSDOMWindowShell.h:
224         (WebCore::JSDOMWindowShell::window):
225         (WebCore::JSDOMWindowShell::setWindow):
226         * bindings/js/JSDeviceMotionEventCustom.cpp:
227         (WebCore::createAccelerationObject):
228         (WebCore::createRotationRateObject):
229         * bindings/js/JSEventListener.cpp:
230         (WebCore::JSEventListener::JSEventListener):
231         (WebCore::JSEventListener::markJSFunction):
232         * bindings/js/JSEventListener.h:
233         (WebCore::JSEventListener::jsFunction):
234         * bindings/js/JSHTMLDocumentCustom.cpp:
235         (WebCore::JSHTMLDocument::setAll):
236         * bindings/js/JSImageConstructor.cpp:
237         (WebCore::JSImageConstructor::JSImageConstructor):
238         * bindings/js/JSImageDataCustom.cpp:
239         (WebCore::toJS):
240         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
241         (WebCore::JSJavaScriptCallFrame::scopeChain):
242         (WebCore::JSJavaScriptCallFrame::scopeType):
243         * bindings/js/JSNodeFilterCondition.cpp:
244         (WebCore::JSNodeFilterCondition::markAggregate):
245         (WebCore::JSNodeFilterCondition::acceptNode):
246         * bindings/js/JSNodeFilterCondition.h:
247         * bindings/js/JSNodeFilterCustom.cpp:
248         * bindings/js/JSOptionConstructor.cpp:
249         (WebCore::JSOptionConstructor::JSOptionConstructor):
250         * bindings/js/JSSQLResultSetRowListCustom.cpp:
251         (WebCore::JSSQLResultSetRowList::item):
252         * bindings/js/ScriptCachedFrameData.cpp:
253         (WebCore::ScriptCachedFrameData::restore):
254         * bindings/js/ScriptObject.cpp:
255         (WebCore::ScriptGlobalObject::set):
256         * bindings/js/SerializedScriptValue.cpp:
257         (WebCore::CloneDeserializer::putProperty):
258         * bindings/scripts/CodeGeneratorJS.pm:
259         * bridge/qt/qt_runtime.cpp:
260         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
261         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
262         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
263         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
264         * bridge/qt/qt_runtime.h:
265         * bridge/runtime_root.cpp:
266         (JSC::Bindings::RootObject::invalidate):
267         * bridge/runtime_root.h:
268         * dom/Document.h:
269
270 2011-01-28  Adam Barth  <abarth@webkit.org>
271
272         Reviewed by Eric Seidel.
273
274         XSSFilter should log to the console when it blocks something
275         https://bugs.webkit.org/show_bug.cgi?id=53354
276
277         This patch refactors a bunch of methods in XSSFilter to return a bool
278         indicating whether they blocked anything.  Using this bool, we decide
279         whether to log to the console.  We're using the same log message as the
280         XSSAuditor, but it seems likely we can improve this message in the
281         future (especially by piping in the correct line number, which is now
282         accessible via the parser).
283
284         * html/parser/XSSFilter.cpp:
285         (WebCore::HTMLNames::isNameOfInlineEventHandler):
286         (WebCore::XSSFilter::filterToken):
287         (WebCore::XSSFilter::filterTokenInitial):
288         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
289         (WebCore::XSSFilter::filterScriptToken):
290         (WebCore::XSSFilter::filterObjectToken):
291         (WebCore::XSSFilter::filterEmbedToken):
292         (WebCore::XSSFilter::filterAppletToken):
293         (WebCore::XSSFilter::filterMetaToken):
294         (WebCore::XSSFilter::filterBaseToken):
295         (WebCore::XSSFilter::eraseInlineEventHandlersIfInjected):
296         * html/parser/XSSFilter.h:
297
298 2011-01-28  Adam Barth  <abarth@webkit.org>
299
300         Reviewed by Daniel Bates.
301
302         Wire up settings->xssAuditorEnabled to XSSFilter
303         https://bugs.webkit.org/show_bug.cgi?id=53345
304
305         * html/parser/XSSFilter.cpp:
306         (WebCore::XSSFilter::XSSFilter):
307         (WebCore::XSSFilter::filterToken):
308         * html/parser/XSSFilter.h:
309
310 2011-01-28  Adam Barth  <abarth@webkit.org>
311
312         Reviewed by Daniel Bates.
313
314         Teach XSSFilter about <meta> and <base> tags
315         https://bugs.webkit.org/show_bug.cgi?id=53339
316
317         I'm not 100% sure we need to block <meta http-equiv>, but it seems
318         prudent given how powerful that attribute is.  We definitely need to
319         block injection of <base href> because that can redirect script tags
320         that use relative URLs.
321
322         * html/parser/XSSFilter.cpp:
323         (WebCore::XSSFilter::filterToken):
324         (WebCore::XSSFilter::filterMetaToken):
325         (WebCore::XSSFilter::filterBaseToken):
326         * html/parser/XSSFilter.h:
327
328 2011-01-28  Adam Barth  <abarth@webkit.org>
329
330         Reviewed by Daniel Bates.
331
332         Teach XSSFilter about <applet>
333         https://bugs.webkit.org/show_bug.cgi?id=53338
334
335         HTML5 is pretty light on information about how the <applet> tag works.
336         According to this site:
337
338         http://download.oracle.com/javase/1.4.2/docs/guide/misc/applet.html
339
340         The "code" and "object" attributes are the essential attributes for
341         determining which piece of Java to run.  We might need to expand to the
342         codebase and archive attributes at some point, but hopefully code and
343         object will be sufficient.
344
345         * html/parser/XSSFilter.cpp:
346         (WebCore::XSSFilter::filterToken):
347         (WebCore::XSSFilter::filterAppletToken):
348         * html/parser/XSSFilter.h:
349
350 2011-01-28  Adam Barth  <abarth@webkit.org>
351
352         Reviewed by Daniel Bates.
353
354         Teach the XSSFilter about object and embed tags
355         https://bugs.webkit.org/show_bug.cgi?id=53336
356
357         For <object> and <embed>, we filter out attribute values that either
358         indicate which piece of media to load or which plugin to load.  In a
359         perfect world, we'd only need to filter out the URLs of the media, but
360         some plug-ins (like Flash) have lots of fun places you can hide the
361         URL (e.g., the "movie" <param>).
362
363         * html/parser/XSSFilter.cpp:
364         (WebCore::XSSFilter::filterToken):
365         (WebCore::XSSFilter::filterScriptToken):
366         (WebCore::XSSFilter::filterObjectToken):
367         (WebCore::XSSFilter::filterEmbedToken):
368         (WebCore::XSSFilter::eraseAttributeIfInjected):
369         * html/parser/XSSFilter.h:
370
371 2011-01-28  Oliver Hunt  <oliver@apple.com>
372
373         Fix Qt build.
374
375         * bridge/qt/qt_runtime.cpp:
376         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
377         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
378         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
379         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
380         * bridge/qt/qt_runtime.h:
381
382 2011-01-28  Antti Koivisto  <antti@apple.com>
383
384         Reviewed by Simon Fraser.
385
386         CSS styles are shared based on uninitialized property values
387         https://bugs.webkit.org/show_bug.cgi?id=53285
388         
389         Null test.
390
391         * dom/NamedNodeMap.cpp:
392         (WebCore::NamedNodeMap::mappedMapsEquivalent):
393
394 2011-01-27  Oliver Hunt  <oliver@apple.com>
395
396         Reviewed by Geoffrey Garen.
397
398         Convert markstack to a slot visitor API
399         https://bugs.webkit.org/show_bug.cgi?id=53219
400
401         Update WebCore to the new marking apis, correct bindings
402         codegen. 
403
404         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
405         * WebCore.exp.in:
406         * bindings/js/DOMWrapperWorld.h:
407         (WebCore::DOMWrapperWorld::globalData):
408         * bindings/js/JSAudioConstructor.cpp:
409         (WebCore::JSAudioConstructor::JSAudioConstructor):
410         * bindings/js/JSDOMBinding.cpp:
411         (WebCore::markDOMNodesForDocument):
412         (WebCore::markDOMObjectWrapper):
413         (WebCore::markDOMNodeWrapper):
414         * bindings/js/JSDOMGlobalObject.cpp:
415         (WebCore::JSDOMGlobalObject::markChildren):
416         (WebCore::JSDOMGlobalObject::setInjectedScript):
417         (WebCore::JSDOMGlobalObject::injectedScript):
418         * bindings/js/JSDOMGlobalObject.h:
419         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
420         (WebCore::getDOMConstructor):
421         * bindings/js/JSDOMWindowCustom.cpp:
422         (WebCore::JSDOMWindow::setLocation):
423         (WebCore::DialogHandler::dialogCreated):
424         * bindings/js/JSDOMWindowShell.cpp:
425         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
426         (WebCore::JSDOMWindowShell::setWindow):
427         (WebCore::JSDOMWindowShell::markChildren):
428         (WebCore::JSDOMWindowShell::unwrappedObject):
429         * bindings/js/JSDOMWindowShell.h:
430         (WebCore::JSDOMWindowShell::window):
431         (WebCore::JSDOMWindowShell::setWindow):
432         * bindings/js/JSEventListener.cpp:
433         (WebCore::JSEventListener::JSEventListener):
434         (WebCore::JSEventListener::markJSFunction):
435         * bindings/js/JSEventListener.h:
436         (WebCore::JSEventListener::jsFunction):
437         * bindings/js/JSHTMLDocumentCustom.cpp:
438         (WebCore::JSHTMLDocument::setAll):
439         * bindings/js/JSImageConstructor.cpp:
440         (WebCore::JSImageConstructor::JSImageConstructor):
441         * bindings/js/JSImageDataCustom.cpp:
442         (WebCore::toJS):
443         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
444         (WebCore::JSJavaScriptCallFrame::scopeChain):
445         (WebCore::JSJavaScriptCallFrame::scopeType):
446         * bindings/js/JSNodeFilterCondition.cpp:
447         (WebCore::JSNodeFilterCondition::markAggregate):
448         (WebCore::JSNodeFilterCondition::acceptNode):
449         * bindings/js/JSNodeFilterCondition.h:
450         * bindings/js/JSNodeFilterCustom.cpp:
451         * bindings/js/JSOptionConstructor.cpp:
452         (WebCore::JSOptionConstructor::JSOptionConstructor):
453         * bindings/js/JSSQLResultSetRowListCustom.cpp:
454         (WebCore::JSSQLResultSetRowList::item):
455         * bindings/js/ScriptCachedFrameData.cpp:
456         (WebCore::ScriptCachedFrameData::restore):
457         * bindings/js/ScriptObject.cpp:
458         (WebCore::ScriptGlobalObject::set):
459         * bindings/js/SerializedScriptValue.cpp:
460         (WebCore::CloneDeserializer::putProperty):
461         * bindings/scripts/CodeGeneratorJS.pm:
462         * dom/Document.h:
463
464 2011-01-28  Sam Weinig  <sam@webkit.org>
465
466         Reviewed by Anders Carlsson.
467
468         Keyboard scrolling doesn’t work in WebKit2
469         <rdar://problem/8909672>
470
471         * platform/mac/ScrollAnimatorMac.mm:
472         (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
473         (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
474         Add additional necessary delegate methods.
475
476 2011-01-29  Darin Adler  <darin@apple.com>
477
478         Reviewed by Dan Bernstein.
479
480         Re-land this patch with the missing null check that caused crashes in layout tests.
481
482         Changing cursor style has no effect until the mouse moves
483         https://bugs.webkit.org/show_bug.cgi?id=14344
484         rdar://problem/7563712
485
486         No tests added because we don't have infrastructure for testing actual cursor
487         changes (as opposed to cursor style computation) at this time. We might add it later.
488
489         * page/EventHandler.cpp:
490         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
491         * page/EventHandler.h: Ditto.
492
493         * rendering/RenderObject.cpp:
494         (WebCore::areNonIdenticalCursorListsEqual): Added.
495         (WebCore::areCursorsEqual): Added.
496         (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
497         cursor styles changed.
498
499 2011-01-28  Justin Schuh  <jschuh@chromium.org>
500
501         Reviewed by Eric Seidel.
502
503         We should hold RefPtrs to SVG font faces
504         https://bugs.webkit.org/show_bug.cgi?id=53270
505
506         Test: svg/custom/use-multiple-on-nested-disallowed-font.html
507
508         * css/CSSFontFaceSource.cpp:
509         (WebCore::CSSFontFaceSource::getFontData):
510         * css/CSSFontFaceSource.h:
511         * svg/SVGFontFaceElement.cpp:
512         (WebCore::SVGFontFaceElement::associatedFontElement):
513         * svg/SVGFontFaceElement.h:
514
515 2011-01-28  Zhenyao Mo  <zmo@google.com>
516
517         Reviewed by Kenneth Russell.
518
519         uniformN*v should generate INVALID_VALUE of the array size is not a multiple of N
520         https://bugs.webkit.org/show_bug.cgi?id=53306
521
522         * html/canvas/WebGLRenderingContext.cpp:
523         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
524
525 2011-01-28  Tom Sepez  <tsepez@chromium.org>
526
527         Reviewed by Eric Seidel.
528
529         NULL pointer crash in TextIterator::handleTextBox()
530         https://bugs.webkit.org/show_bug.cgi?id=53267
531
532         Test: fast/css/rtl-nth-child-first-letter-crash.html
533
534         * editing/TextIterator.cpp:
535         (WebCore::TextIterator::handleTextBox):
536
537 2011-01-28  Adrienne Walker  <enne@google.com>
538
539         Reviewed by Kenneth Russell.
540
541         [chromium] Remove a spurious diagnostic CRASH check.
542         https://bugs.webkit.org/show_bug.cgi?id=52379
543
544         * platform/graphics/chromium/LayerTilerChromium.cpp:
545         (WebCore::LayerTilerChromium::invalidateRect):
546
547 2011-01-28  Dan Bernstein  <mitz@apple.com>
548
549         Reviewed by Sam Weinig.
550
551         <rdar://problem/4761512> <select> can't display right-to-left (rtl) languages
552         https://bugs.webkit.org/show_bug.cgi?id=19785
553
554         Changed <select> pop-up menus on Mac OS X Snow Leopard and later to have their items aligned in the
555         direction corresponding to the writing direction of the <select> element, with the checkmarks
556         on the "start" side, and use the <option>'s writing direction rather than "natural". Made the
557         pop-up button match the menu by adding a Chrome boolean function, selectItemAlignmentFollowsMenuWritingDirection(),
558         which returns true for this pop-up behavior.
559
560         * loader/EmptyClients.h:
561         (WebCore::EmptyChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
562         * manual-tests/pop-up-alignment-and-direction.html: Added.
563         * page/Chrome.cpp:
564         (WebCore::Chrome::selectItemAlignmentFollowsMenuWritingDirection): Added. Calls through to the
565         client.
566         * page/Chrome.h:
567         * page/ChromeClient.h:
568         * platform/PopupMenuStyle.h:
569         (WebCore::PopupMenuStyle::PopupMenuStyle): Added hasTextDirectionOverride parameter and member
570         variable initialization.
571         (WebCore::PopupMenuStyle::hasTextDirectionOverride): Added this accessor.
572         * platform/mac/PopupMenuMac.mm:
573         (WebCore::PopupMenuMac::populate): Set the pop-up's layout direction and items' text alignment
574         to match the menu's writing direction. Set items' writing direction and direction override
575         according to their styles.
576         * rendering/RenderMenuList.cpp:
577         (WebCore::RenderMenuList::RenderMenuList): Removed unncesaary initialization of a smart pointer.
578         (WebCore::RenderMenuList::adjustInnerStyle): If the alignment of items in the menu follows the
579         menu's writing direction, use that alignment for the button as well. Also in this mode, use the
580         item's writing direction and override setting.
581         (WebCore::RenderMenuList::setTextFromOption): Store the option element's style.
582         (WebCore::RenderMenuList::itemStyle): Pass the text direction override value.
583         (WebCore::RenderMenuList::menuStyle): Ditto. Also use the button's direction, not the inner text's.
584         * rendering/RenderMenuList.h:
585         * rendering/RenderTextControlSingleLine.cpp:
586         (WebCore::RenderTextControlSingleLine::menuStyle): Pass the text direction override value.
587
588 2011-01-28  Adam Barth  <abarth@webkit.org>
589
590         Reviewed by Daniel Bates.
591
592         Teach XSSFilter how to filter <script> elements
593         https://bugs.webkit.org/show_bug.cgi?id=53279
594
595         This patch adds the ability for the XSSFilter to block injected
596         <script> elements.  Handling script elements is slightly subtle because
597         these elements act very differently depending on whether they have a
598         src attribute.
599         
600         In the "src case", which check whether the src attribute was present in
601         the request.  In the "non-src case", we check whether the start tag and
602         the body of the script element was included in the request.  Checking
603         for the whole start tag means we miss out on some attribute splitting
604         attacks inside of script tags, but that doesn't seem like that big a
605         deal.
606
607         This patch also introduces some amount of state into the XSSFilter
608         because inline script elements span multiple tokens.  There's a lot of
609         tuning and optimization left in these cases, some of which I've noted
610         with FIXMEs.
611
612         To test this patch, I played around with some of the existing
613         XSSAuditor tests.  Hopefully I'll be able to run the test suite more
614         systematically in the future.
615
616         * html/parser/HTMLToken.h:
617         (WebCore::HTMLToken::eraseCharacters):
618         (WebCore::HTMLToken::eraseValueOfAttribute):
619         * html/parser/XSSFilter.cpp:
620         (WebCore::HTMLNames::hasName):
621         (WebCore::HTMLNames::findAttributeWithName):
622         (WebCore::HTMLNames::isNameOfScriptCarryingAttribute):
623         (WebCore::XSSFilter::XSSFilter):
624         (WebCore::XSSFilter::filterToken):
625         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
626         (WebCore::XSSFilter::filterScriptToken):
627         (WebCore::XSSFilter::snippetForRange):
628         (WebCore::XSSFilter::snippetForAttribute):
629         * html/parser/XSSFilter.h:
630
631 2011-01-28  Adam Barth  <abarth@webkit.org>
632
633         Reviewed by Daniel Bates.
634
635         Sketch out new XSS filter design (disabled by default)
636         https://bugs.webkit.org/show_bug.cgi?id=53205
637
638         This patch adds a basic sketch of the new XSS filter design.  Rather
639         than watching scripts as they execute, in this design, we watch tokens
640         emitted by the tokenizer.  We then map the tokens directly back into
641         input characters, which lets us skip all the complicated logic related
642         to HTML entities and double-decoding of JavaScript URLs.
643
644         This patch contains only the bare essentially machinery.  I'll add more
645         in future patches and eventually remove the previous code once this
646         code is up and running correctly.
647
648         * Android.mk:
649         * CMakeLists.txt:
650         * GNUmakefile.am:
651         * WebCore.gypi:
652         * WebCore.pro:
653         * WebCore.vcproj/WebCore.vcproj:
654         * WebCore.xcodeproj/project.pbxproj:
655         * html/parser/HTMLDocumentParser.cpp:
656         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
657         (WebCore::HTMLDocumentParser::pumpTokenizer):
658         (WebCore::HTMLDocumentParser::sourceForToken):
659         * html/parser/HTMLDocumentParser.h:
660         * html/parser/XSSFilter.cpp: Added.
661         * html/parser/XSSFilter.h: Added.
662
663 2011-01-28  Michael Saboff  <msaboff@apple.com>
664
665         Reviewed by Geoffrey Garen.
666
667         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
668         https://bugs.webkit.org/show_bug.cgi?id=53271
669
670         Reapplying this patch with the change that the second ASSERT in 
671         RootObject::removeRuntimeObject was changed to use
672         .uncheckedGet() instead of the failing .get().  The object in question
673         could be in the process of being GC'ed.  The get() call will not return
674         such an object while the uncheckedGet() call will return the (unsafe) 
675         object.  This is the behavior we want.
676
677         Precautionary change.
678         Changed RootObject to use WeakGCMap instead of HashSet.
679         Found will looking for another issue, but can't produce a test case
680         that is problematic.  THerefore there aren't any new tests.
681
682         * bridge/runtime_root.cpp:
683         (JSC::Bindings::RootObject::invalidate):
684         (JSC::Bindings::RootObject::addRuntimeObject):
685         (JSC::Bindings::RootObject::removeRuntimeObject):
686         * bridge/runtime_root.h:
687
688 2011-01-28  Adam Roben  <aroben@apple.com>
689
690         Notify CACFLayerTreeHost when the context is flushed
691
692         LegacyCACFLayerTreeHost was keeping this a secret, which meant that WebCore's animation
693         timers were never starting.
694
695         Fixes <http://webkit.org/b/53302> [Windows 7 Release Tests] changesets 76853, 76856, and
696         76858 broke ~36 animations, compositing, and transitions tests
697
698         Reviewed by Sam Weinig.
699
700         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
701         (WebCore::LegacyCACFLayerTreeHost::contextDidChange): Call up to the base class after we
702         start our render timer.
703
704 2011-01-28  Antti Koivisto  <antti@apple.com>
705
706         Reviewed by Dan Bernstein.
707
708         Remove dead code that tried to map from CSS values to parser values
709         https://bugs.webkit.org/show_bug.cgi?id=53318
710
711         * css/CSSFunctionValue.cpp:
712         * css/CSSFunctionValue.h:
713         * css/CSSPrimitiveValue.cpp:
714         * css/CSSPrimitiveValue.h:
715         * css/CSSValue.h:
716         * css/CSSValueList.cpp:
717         * css/CSSValueList.h:
718
719 2011-01-28  Enrica Casucci  <enrica@apple.com>
720
721         Reviewed by Adam Roben.
722
723         Some drag and drop tests fail since r76824
724         https://bugs.webkit.org/show_bug.cgi?id=53304
725
726         There were '||' instead of '&&' in the checks for valid
727         clipboard content.
728         
729         * platform/win/ClipboardWin.cpp:
730         (WebCore::ClipboardWin::getData):
731         (WebCore::ClipboardWin::types):
732         (WebCore::ClipboardWin::files):
733
734 2011-01-28  Martin Robinson  <mrobinson@igalia.com>
735
736         [GTK] AudioProcessingEvent.h and JSJavaScriptAudioNode.h: No such file or directory
737         https://bugs.webkit.org/show_bug.cgi?id=52889
738
739         Build fix for WebAudio. Include WebAudio source files on the source
740         list when WebAudio is enabled.
741
742         * GNUmakefile.am: Include missing source files.
743
744 2011-01-28  Sam Weinig  <sam@webkit.org>
745
746         Reviewed by Maciej Stachowiak.
747
748         Add basic rubber banding support
749         <rdar://problem/8219429>
750         https://bugs.webkit.org/show_bug.cgi?id=53277
751
752         * page/EventHandler.cpp:
753         (WebCore::EventHandler::handleGestureEvent):
754         Pass gesture events to the FrameView.
755
756         * platform/ScrollAnimator.cpp:
757         (WebCore::ScrollAnimator::handleGestureEvent):
758         * platform/ScrollAnimator.h:
759         Add stubbed out implementation.
760
761         * platform/ScrollView.cpp:
762         (WebCore::ScrollView::ScrollView):
763         (WebCore::ScrollView::overhangAmount):
764         (WebCore::ScrollView::wheelEvent):
765         * platform/ScrollView.h:
766         * platform/ScrollableArea.cpp:
767         (WebCore::ScrollableArea::ScrollableArea):
768         (WebCore::ScrollableArea::handleGestureEvent):
769         * platform/ScrollableArea.h:
770         (WebCore::ScrollableArea::constrainsScrollingToContentEdge):
771         (WebCore::ScrollableArea::setConstrainsScrollingToContentEdge):
772         Move constrains scrolling bit to ScrollableArea from ScrollView.
773
774         (WebCore::ScrollableArea::contentsSize):
775         (WebCore::ScrollableArea::overhangAmount):
776         Add additional virtual functions for information needed by the animator.
777
778         * platform/mac/ScrollAnimatorMac.h:
779         * platform/mac/ScrollAnimatorMac.mm:
780         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
781         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
782         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
783         (WebCore::elasticDeltaForTimeDelta):
784         (WebCore::elasticDeltaForReboundDelta):
785         (WebCore::reboundDeltaForElasticDelta):
786         (WebCore::scrollWheelMultiplier):
787         (WebCore::ScrollAnimatorMac::handleWheelEvent):
788         (WebCore::ScrollAnimatorMac::handleGestureEvent):
789         (WebCore::ScrollAnimatorMac::pinnedInDirection):
790         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
791         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
792         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
793         (WebCore::ScrollAnimatorMac::beginScrollGesture):
794         (WebCore::ScrollAnimatorMac::endScrollGesture):
795         (WebCore::ScrollAnimatorMac::snapRubberBand):
796         (WebCore::roundTowardZero):
797         (WebCore::roundToDevicePixelTowardZero):
798         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
799         Implement basic rubber banding.
800
801 2011-01-28  Dan Bernstein  <mitz@apple.com>
802
803         Reviewed by Anders Carlsson.
804
805         Changing unicode-bidi doesn’t force layout
806         https://bugs.webkit.org/show_bug.cgi?id=53311
807
808         Test: fast/dynamic/unicode-bidi.html
809
810         * rendering/style/RenderStyle.cpp:
811         (WebCore::RenderStyle::diff): Return a layout difference if unicode-bidi values differ.
812
813 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
814
815         Reviewed by Kent Tamura.
816
817         Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
818         https://bugs.webkit.org/show_bug.cgi?id=53122
819
820         This is the first step in converting HTMLMediaElement to the new shadow DOM.
821
822         Should not regress any existing tests. No observable change in behavior.
823
824         * css/CSSSelector.cpp:
825         (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
826         (WebCore::nameToPseudoTypeMap): Ditto.
827         (WebCore::CSSSelector::extractPseudoType): Ditto.
828         * css/CSSSelector.h: Ditto.
829         * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
830         * rendering/MediaControlElements.cpp:
831         (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
832             which is now replaced with virtual shadowPseudoId on each corresponding class.
833         (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
834         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
835             display type in constructor.
836         (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
837             constructor argument.
838         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
839         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
840             to disambiguate from the MediaControlMuteButtonElement.
841         (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
842         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
843         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
844             constructor argument.
845         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
846         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
847             constructor argument.
848         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
849         (WebCore::MediaControlSeekForwardButtonElement::create): Added.
850         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
851         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
852         (WebCore::MediaControlSeekBackButtonElement::create): Added.
853         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
854         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
855         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
856         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
857             constructor argument.
858         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
859         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
860             constructor argument.
861         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
862         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
863             constructor argument.
864         (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
865         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
866             constructor argument.
867         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
868         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
869             constructor argument.
870         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
871         * rendering/MediaControlElements.h:
872         (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
873         (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.
874         * rendering/RenderMedia.cpp:
875         (WebCore::RenderMedia::createMuteButton): Changed to use new constructor.
876         (WebCore::RenderMedia::createSeekBackButton): Ditto.
877         (WebCore::RenderMedia::createSeekForwardButton): Ditto.
878         (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto.
879         * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used.
880
881 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
882
883         Reviewed by Eric Carlson.
884
885         Split MediaControls out of RenderMedia.
886         https://bugs.webkit.org/show_bug.cgi?id=53252
887
888         Near-mechanical moving of stuff, no change in behavior, thus no new tests.
889
890         * Android.mk: Added MediaControls to build system.
891         * CMakeLists.txt: Ditto.
892         * GNUmakefile.am: Ditto.
893         * WebCore.gypi: Ditto.
894         * WebCore.pro: Ditto.
895         * WebCore.vcproj/WebCore.vcproj: Ditto.
896         * WebCore.xcodeproj/project.pbxproj: Ditto.
897         * html/HTMLMediaElement.cpp:
898         (WebCore::HTMLMediaElement::defaultEventHandler): Changed to forward events to MediaControls.
899         * html/shadow/MediaControls.cpp: Copied all controls-related methods from
900             Source/WebCore/rendering/RenderMedia.cpp, pulled them into their own class called MediaControls. 
901         * html/shadow/MediaControls.h: Ditto from Source/WebCore/rendering/RenderMedia.h.
902         * rendering/MediaControlElements.cpp:
903         (WebCore::MediaControlTimelineElement::defaultEventHandler): Changed to use MediaControls.
904         * rendering/RenderMedia.cpp:
905         (WebCore::RenderMedia::RenderMedia): Moved relevant constructor initializers out to MediaControls.
906         (WebCore::RenderMedia::destroy): Changed to use MediaControls.
907         (WebCore::RenderMedia::styleDidChange): Ditto.
908         (WebCore::RenderMedia::layout): Ditto.
909         (WebCore::RenderMedia::updateFromElement): Ditto.
910         * rendering/RenderMedia.h: Updated defs accordingly and removed player() accessor, which
911             is only used by sub-class RenderVideo.
912         (WebCore::RenderMedia::controls): Added.
913         * rendering/RenderVideo.cpp:
914         (WebCore::RenderVideo::~RenderVideo): Changed to access MediaPlayer* directly from mediaElement().
915         (WebCore::RenderVideo::calculateIntrinsicSize): Ditto.
916         (WebCore::RenderVideo::paintReplaced): Ditto.
917         (WebCore::RenderVideo::updatePlayer): Ditto.
918         (WebCore::RenderVideo::supportsAcceleratedRendering): Ditto.
919         (WebCore::RenderVideo::acceleratedRenderingStateChanged): Ditto.
920
921 2011-01-28  Pavel Feldman  <pfeldman@chromium.org>
922
923         Reviewed by Yury Semikhatsky.
924
925         Web Inspector: allow remote debugging with front-end
926         served from the cloud.
927         https://bugs.webkit.org/show_bug.cgi?id=53303
928
929         * inspector/front-end/inspector.js:
930
931 2011-01-28  Aparna Nandyal  <aparna.nand@wipro.com>
932
933         Reviewed by Andreas Kling.
934
935         Setting value of m_PressedPos to make scrolling smooth
936
937         Page scroll popup menu "Scroll here" option not working when cliking above scroll slider/handler.
938         https://bugs.webkit.org/show_bug.cgi?id=51349
939
940         The value of m_PressedPos was getting set before moveThumb() call
941         in all other scenarios except when "Scroll Here" option is used.
942         Hence scrolling with this option was not as expected even in cases
943         where scrolling was happening. The thumb would move in unexpected
944         direction. m_PressedPos is now set to pressed position so delta is
945         calculated.
946         Unable to write a test case as the test needs to click on "Scroll
947         Here" option of context sensitive menu and QTest is unable to do it.
948         Besides no new functionality introduced.
949
950         * platform/qt/ScrollbarQt.cpp:
951         (WebCore::Scrollbar::contextMenu):
952
953 2011-01-28  Andrey Kosyakov  <caseq@chromium.org>
954
955         Reviewed by Pavel Feldman.
956
957         Web Inspector: [Extensions API] add JSON schema for extensions API
958         https://bugs.webkit.org/show_bug.cgi?id=53236
959
960         * inspector/front-end/ExtensionAPISchema.json: Added.
961
962 2011-01-27  Zhenyao Mo  <zmo@google.com>
963
964         Reviewed by Kenneth Russell.
965
966         Remove _LENGTH enumerants
967         https://bugs.webkit.org/show_bug.cgi?id=53259
968
969         * html/canvas/WebGLRenderingContext.cpp: Remove queries for *LENGTH.
970         (WebCore::WebGLRenderingContext::getProgramParameter):
971         (WebCore::WebGLRenderingContext::getShaderParameter):
972         * html/canvas/WebGLRenderingContext.idl: Remove *LENGTH.
973
974 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
975
976         Reviewed by Yury Semikhatsky.
977
978         Web Inspector: syntax highlight inline JS and CSS in HTML resources
979         https://bugs.webkit.org/show_bug.cgi?id=30831
980
981         * inspector/front-end/SourceHTMLTokenizer.js:
982         (WebInspector.SourceHTMLTokenizer):
983         (WebInspector.SourceHTMLTokenizer.prototype.set line):
984         (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
985         * inspector/front-end/SourceHTMLTokenizer.re2js:
986
987 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
988
989         Reviewed by Yury Semikhatsky.
990
991         Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword
992         https://bugs.webkit.org/show_bug.cgi?id=53295
993
994         Select the current word suffix before switching to the next suggestion.
995
996         * inspector/front-end/StylesSidebarPane.js:
997         ():
998
999 2011-01-28  Alejandro G. Castro  <alex@igalia.com>
1000
1001         Reviewed by Xan Lopez.
1002
1003         [GTK] Fix dist compilation for the release
1004         https://bugs.webkit.org/show_bug.cgi?id=53290
1005
1006         * GNUmakefile.am: Added inspector files to the extra dist.
1007
1008 2011-01-28  Ilya Sherman  <isherman@chromium.org>
1009
1010         Reviewed by Andreas Kling.
1011
1012         Const-correct HTMLSelectElement and WebSelectElement
1013         https://bugs.webkit.org/show_bug.cgi?id=53293
1014
1015         * html/HTMLSelectElement.cpp:
1016         (WebCore::HTMLSelectElement::value): const.
1017         * html/HTMLSelectElement.h:
1018
1019 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1020
1021         Unreviewed, rolling out r76893.
1022         http://trac.webkit.org/changeset/76893
1023         https://bugs.webkit.org/show_bug.cgi?id=53287
1024
1025         It made some tests crash on GTK and Qt debug bots (Requested
1026         by Ossy on #webkit).
1027
1028         * bridge/runtime_root.cpp:
1029         (JSC::Bindings::RootObject::invalidate):
1030         (JSC::Bindings::RootObject::addRuntimeObject):
1031         (JSC::Bindings::RootObject::removeRuntimeObject):
1032         * bridge/runtime_root.h:
1033
1034 2011-01-27  Greg Coletta  <greg.coletta@nokia.com>
1035
1036         Reviewed by Laszlo Gombos.
1037
1038         Get rid of prefix header dependency for WebKit2 build system
1039         https://bugs.webkit.org/show_bug.cgi?id=50174
1040
1041         Guard EmptyProtocalDefinitions.h to make sure it's not included twice.
1042
1043         * platform/mac/EmptyProtocolDefinitions.h:
1044
1045 2011-01-27  Abhishek Arya  <inferno@chromium.org>
1046
1047         Reviewed by Dan Bernstein.
1048
1049         Recalc table sections if needed before calculating the first line
1050         box baseline.
1051         https://bugs.webkit.org/show_bug.cgi?id=53265
1052
1053         When we try to calculate the baseline position of a table cell,
1054         we recurse through all the child sibling boxes (when children are
1055         non inline) and add their first linebox baseline values. If one of
1056         the children is a table with pending section recalc, we will access
1057         wrong table section values. We recalc table sections if it is needed.
1058
1059         Test: fast/table/recalc-section-first-body-crash-main.html
1060
1061         * rendering/RenderTable.cpp:
1062         (WebCore::RenderTable::firstLineBoxBaseline):
1063
1064 2011-01-27  Adrienne Walker  <enne@google.com>
1065
1066         Reviewed by Kenneth Russell.
1067
1068         [chromium] Add CRASH calls to further debug tiled compositor memcpy crash.
1069         https://bugs.webkit.org/show_bug.cgi?id=52379
1070
1071         Test: LayoutTests/compositing (to verify these weren't triggered)
1072
1073         * platform/graphics/chromium/LayerTilerChromium.cpp:
1074         (WebCore::LayerTilerChromium::invalidateRect):
1075         (WebCore::LayerTilerChromium::update):
1076
1077 2011-01-27  Alexander Pavlov  <apavlov@chromium.org>
1078
1079         Reviewed by Pavel Feldman.
1080
1081         Web Inspector: [STYLES] Cancelled suggestion of a property name results in a visual artifact
1082         https://bugs.webkit.org/show_bug.cgi?id=53242
1083
1084         * inspector/front-end/StylesSidebarPane.js:
1085         (WebInspector.StylePropertyTreeElement.prototype):
1086
1087 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1088
1089         Unreviewed, rolling out r76891.
1090         http://trac.webkit.org/changeset/76891
1091         https://bugs.webkit.org/show_bug.cgi?id=53280
1092
1093         Makes every layout test crash (Requested by othermaciej on
1094         #webkit).
1095
1096         * page/EventHandler.cpp:
1097         * page/EventHandler.h:
1098         * rendering/RenderObject.cpp:
1099         (WebCore::RenderObject::styleDidChange):
1100
1101 2011-01-27  Ryosuke Niwa  <rniwa@webkit.org>
1102
1103         Unreviewed, rolling out r76839.
1104         http://trac.webkit.org/changeset/76839
1105         https://bugs.webkit.org/show_bug.cgi?id=49744
1106
1107         broke pixel tests
1108
1109         * rendering/RenderBox.cpp:
1110         (WebCore::RenderBox::localCaretRect):
1111
1112 2011-01-27  Emil A Eklund  <eae@chromium.org>
1113
1114         Reviewed by Darin Adler.
1115
1116         contentEditable formatBlock crashes on divs with contenteditable="false"
1117         https://bugs.webkit.org/show_bug.cgi?id=53263
1118
1119         Check if editableRootForPosition returns null for position.
1120
1121         Test: editing/execCommand/format-block-contenteditable-false.html
1122
1123         * editing/FormatBlockCommand.cpp:
1124         (WebCore::FormatBlockCommand::formatRange):
1125
1126 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
1127
1128         Reviewed by Darin Adler.
1129
1130         Remove RenderMedia members that aren't used.
1131         https://bugs.webkit.org/show_bug.cgi?id=53245
1132
1133         Refactoring, no change in behavior, so no new tests.
1134
1135         * rendering/RenderMedia.h: Removed unused member variables.
1136
1137 2011-01-27  Michael Saboff  <msaboff@apple.com>
1138
1139         Reviewed by Darin Adler.
1140
1141         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
1142         https://bugs.webkit.org/show_bug.cgi?id=53271
1143
1144         Precautionary change.
1145         Changed RootObject to use WeakGCMap instead of HashSet.
1146         Found will looking for another issue, but can't produce a test case
1147         that is problematic.  THerefore there aren't any new tests.
1148
1149         * bridge/runtime_root.cpp:
1150         (JSC::Bindings::RootObject::invalidate):
1151         (JSC::Bindings::RootObject::addRuntimeObject):
1152         (JSC::Bindings::RootObject::removeRuntimeObject):
1153         * bridge/runtime_root.h:
1154
1155 2011-01-27  Kenneth Russell  <kbr@google.com>
1156
1157         Reviewed by James Robinson.
1158
1159         Rename Typed Array slice() to subset()
1160         https://bugs.webkit.org/show_bug.cgi?id=53273
1161
1162         * bindings/js/JSArrayBufferViewHelper.h:
1163         (WebCore::constructArrayBufferView):
1164         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1165         (WebCore::constructWebGLArray):
1166         * html/canvas/Float32Array.cpp:
1167         (WebCore::Float32Array::subset):
1168         * html/canvas/Float32Array.h:
1169         * html/canvas/Float32Array.idl:
1170         * html/canvas/Int16Array.cpp:
1171         (WebCore::Int16Array::subset):
1172         * html/canvas/Int16Array.h:
1173         * html/canvas/Int16Array.idl:
1174         * html/canvas/Int32Array.cpp:
1175         (WebCore::Int32Array::subset):
1176         * html/canvas/Int32Array.h:
1177         * html/canvas/Int32Array.idl:
1178         * html/canvas/Int8Array.cpp:
1179         (WebCore::Int8Array::subset):
1180         * html/canvas/Int8Array.h:
1181         * html/canvas/Int8Array.idl:
1182         * html/canvas/TypedArrayBase.h:
1183         (WebCore::TypedArrayBase::subsetImpl):
1184         * html/canvas/Uint16Array.cpp:
1185         (WebCore::Uint16Array::subset):
1186         * html/canvas/Uint16Array.h:
1187         * html/canvas/Uint16Array.idl:
1188         * html/canvas/Uint32Array.cpp:
1189         (WebCore::Uint32Array::subset):
1190         * html/canvas/Uint32Array.h:
1191         * html/canvas/Uint32Array.idl:
1192         * html/canvas/Uint8Array.cpp:
1193         (WebCore::Uint8Array::subset):
1194         * html/canvas/Uint8Array.h:
1195         * html/canvas/Uint8Array.idl:
1196
1197 2011-01-27  Darin Adler  <darin@apple.com>
1198
1199         Reviewed by Dan Bernstein.
1200
1201         Changing cursor style has no effect until the mouse moves
1202         https://bugs.webkit.org/show_bug.cgi?id=14344
1203         rdar://problem/7563712
1204
1205         No tests added because we don't have infrastructure for testing actual cursor
1206         changes (as opposed to cursor style computation) at this time. We might add it later.
1207
1208         * page/EventHandler.cpp:
1209         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
1210         * page/EventHandler.h: Ditto.
1211
1212         * rendering/RenderObject.cpp:
1213         (WebCore::areNonIdenticalCursorListsEqual): Added.
1214         (WebCore::areCursorsEqual): Added.
1215         (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
1216         cursor styles changed.
1217
1218 2011-01-27  Leo Yang  <leo.yang@torchmobile.com.cn>
1219
1220         Reviewed by Dirk Schulze.
1221
1222         SVG Use Cycle is not detected
1223         https://bugs.webkit.org/show_bug.cgi?id=52544
1224
1225         We should check if SVGUseElement::buildInstanceTree finds problem
1226         for every child node. If it finds problem for any children we must
1227         return immediately because otherwise the foundProblem variable may
1228         be rewritten to false.
1229
1230         Test: svg/custom/recursive-use2.svg
1231
1232         * svg/SVGUseElement.cpp:
1233         (WebCore::SVGUseElement::buildInstanceTree):
1234
1235 2011-01-27  Zhenyao Mo  <zmo@google.com>
1236
1237         Reviewed by Kenneth Russell.
1238
1239         texSubImage2D's format/type needs to match the internalformat/type from the previous texImage2D call
1240         https://bugs.webkit.org/show_bug.cgi?id=53054
1241
1242         Test: fast/canvas/webgl/tex-sub-image-2d-bad-args.html
1243
1244         * html/canvas/WebGLRenderingContext.cpp:
1245         (WebCore::WebGLRenderingContext::texSubImage2DBase): Check format/type match.
1246
1247 2011-01-27  Yi Shen  <yi.4.shen@nokia.com>, Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
1248
1249         Reviewed by Andreas Kling.
1250
1251         [Qt] Add fullscreen media control button for html video
1252         https://bugs.webkit.org/show_bug.cgi?id=51543
1253
1254         Implement media control fullscreen button for QtWebKit html5 video.
1255
1256         * css/mediaControlsQt.css:
1257         (video::-webkit-media-controls-fullscreen-button):
1258         * platform/qt/RenderThemeQt.cpp:
1259         (WebCore::RenderThemeQt::paintMediaFullscreenButton):
1260
1261 2011-01-27  Nate Chapin  <japhet@chromium.org>
1262
1263         Reviewed by Adam Barth.
1264
1265         Remove FrameLoader::url() and update callers to use
1266         Document::url().
1267         https://bugs.webkit.org/show_bug.cgi?id=41165
1268
1269         Refactor, no new tests.
1270
1271         * WebCore.exp.in:
1272         * dom/Document.cpp:
1273         (WebCore::Document::processHttpEquiv):
1274         (WebCore::Document::removePendingSheet):
1275         * history/CachedFrame.cpp:
1276         (WebCore::CachedFrameBase::CachedFrameBase):
1277         * history/PageCache.cpp:
1278         (WebCore::logCanCacheFrameDecision):
1279         (WebCore::PageCache::canCachePageContainingThisFrame):
1280         * html/HTMLFrameElementBase.cpp:
1281         (WebCore::HTMLFrameElementBase::isURLAllowed):
1282         * html/HTMLPlugInImageElement.cpp:
1283         (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
1284         * inspector/InspectorAgent.cpp:
1285         (WebCore::InspectorAgent::inspectedURL):
1286         * inspector/InspectorResourceAgent.cpp:
1287         (WebCore::buildObjectForFrame):
1288         * loader/DocumentWriter.cpp:
1289         (WebCore::DocumentWriter::replaceDocument):
1290         (WebCore::DocumentWriter::deprecatedFrameEncoding):
1291         * loader/FrameLoader.cpp:
1292         * loader/FrameLoader.h:
1293         * loader/HistoryController.cpp:
1294         (WebCore::HistoryController::updateForStandardLoad):
1295         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
1296         (WebCore::HistoryController::updateForSameDocumentNavigation):
1297         * loader/NavigationScheduler.cpp:
1298         (WebCore::ScheduledHistoryNavigation::fire):
1299         (WebCore::NavigationScheduler::scheduleLocationChange):
1300         (WebCore::NavigationScheduler::scheduleRefresh):
1301         * page/FrameView.cpp:
1302         (WebCore::FrameView::updateControlTints):
1303         * page/Location.cpp:
1304         (WebCore::Location::url):
1305         (WebCore::Location::setProtocol):
1306         (WebCore::Location::setHost):
1307         (WebCore::Location::setHostname):
1308         (WebCore::Location::setPort):
1309         (WebCore::Location::setPathname):
1310         (WebCore::Location::setSearch):
1311         (WebCore::Location::setHash):
1312         (WebCore::Location::reload):
1313         * page/Page.cpp:
1314         (WebCore::Page::goToItem):
1315
1316 2011-01-27  Stephen White  <senorblanco@chromium.org>
1317
1318         Reviewed by Darin Adler.
1319
1320         Fix performance regression in ImageQualityController::objectDestroyed().
1321         https://bugs.webkit.org/show_bug.cgi?id=52645
1322
1323         In r72282, I inadvertently introduced this regression by using a
1324         linear search through the hash map on object destruction.  This was
1325         because the hash key consisted of both object pointer and layer id,
1326         but on object destruction we only know the object pointer, requiring
1327         a search to find all the layers. 
1328         By replacing the hash map with two nested hash maps, where the outer key
1329         is the object and the inner key is the layer, we can find all the
1330         relevant data for an object in one hash lookup.
1331
1332         * rendering/RenderBoxModelObject.cpp:
1333         Replace the (object,layer)->size HashMap with object->layer and
1334         layer->size HashMaps.
1335         (WebCore::ImageQualityController::isEmpty):
1336         Implement isEmpty() for the outer HashMap.
1337         (WebCore::ImageQualityController::removeLayer):
1338         When a layer is removed, remove it from the inner hash map.
1339         (WebCore::ImageQualityController::set):
1340         Implement set():  if the inner map exists, set the layer->size tuple
1341         directly.  If not, create a new inner map, set the tuple, and insert
1342         it in the outer map.
1343         (WebCore::ImageQualityController::objectDestroyed):
1344         Look up the object in the outer map only.
1345         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
1346         Cosmetic changes for the renamed now-outer hash map.
1347         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1348         Do both outer and inner hash map lookups.  Call set() to add/update
1349         entries to the hash maps.  keyDestroyed() is now removeLayer().
1350         (WebCore::imageQualityController):
1351         Make the ImageQualityController a file-static global, so it can be
1352         created and destroyed on the fly.
1353         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
1354         If there is no ImageQualityController, don't call objectDestroyed().
1355         If it's empty, delete it.
1356         * rendering/RenderImage.cpp:
1357         (WebCore::RenderImage::paintIntoRect):
1358         Also pass the Image* as the (void*) layer, since 0 is not a valid
1359         HashMap key.
1360
1361 2011-01-27  Adrienne Walker  <enne@google.com>
1362
1363         Reviewed by James Robinson.
1364
1365         [chromium] Tiled compositor crashes if compositing turned off mid-paint
1366         https://bugs.webkit.org/show_bug.cgi?id=53198
1367
1368         * platform/graphics/chromium/LayerRendererChromium.cpp:
1369         (WebCore::LayerRendererChromium::drawLayers):
1370         * platform/graphics/chromium/LayerTilerChromium.cpp:
1371         (WebCore::LayerTilerChromium::update):
1372         (WebCore::LayerTilerChromium::draw):
1373
1374 2011-01-27  Carol Szabo <carol.szabo@nokia.com>
1375
1376         Reviewed by David Hyatt.
1377
1378         A corrupted counter tree is created when renderers are added to the
1379         tree bypassing RenderObject::addChild
1380         https://bugs.webkit.org/show_bug.cgi?id=51270
1381
1382         No new tests. This patch reimplements the fix for bugs 43812 and
1383         51637 and hence all tests are already there as part of the original
1384         fixes for those bugs.
1385
1386         * rendering/RenderCounter.cpp:
1387         (WebCore::findPlaceForCounter):
1388         Removed old workaround as this patch hopefully fixes the real
1389         problem.
1390         * rendering/RenderObject.cpp:
1391         (WebCore::RenderObject::addChild):
1392         Removed call to counter updater as it was moved to a lower level.
1393         (WebCore::RenderObject::destroy):
1394         Moved attached counter nodes destruction to after the node is
1395         removed from the tree.
1396         * rendering/RenderObjectChildList.cpp:
1397         (WebCore::RenderObjectChildList::removeChildNode):
1398         (WebCore::RenderObjectChildList::appendChildNode):
1399         (WebCore::RenderObjectChildList::insertChildNode):
1400         Added notifications to the Counter system such that the
1401         CounterForest reflects the changes to the RendererTree.
1402         * rendering/RenderWidget.cpp:
1403         (WebCore::RenderWidget::destroy):
1404         Applied the same changes as for RenderObject::destroy()
1405         since RenderObject::destroy() is not called from here.
1406
1407 2011-01-27  Adam Roben  <aroben@apple.com>
1408
1409         Add WKCACFViewLayerTreeHost
1410
1411         This is a class that derives from CACFLayerTreeHost and uses a WKCACFView to render.
1412
1413         Fixes <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost should use
1414         WKCACFView for rendering
1415
1416         * WebCore.vcproj/WebCore.vcproj: Added WKCACFViewLayerTreeHost.{cpp,h}.
1417
1418         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1419         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Make the test window have a
1420         non-zero size. WKCACFView will always say it can't render if you pass it a 0-sized window,
1421         so we need a non-empty window to perform a valid test.
1422         (WebCore::CACFLayerTreeHost::create): First try to create a WKCACFViewLayerTreeHost, then
1423         fall back to a LegacyCACFLayerTreeHost.
1424         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Moved code to react to the
1425         context flush from here...
1426         (WebCore::CACFLayerTreeHost::contextDidChange): ...to here. Derived classes are required to
1427         call this function whenever changes are flushed to the context.
1428
1429         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added contextDidChange.
1430
1431         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
1432         (WebCore::LegacyCACFLayerTreeHost::createRenderer):
1433         (WebCore::LegacyCACFLayerTreeHost::resize):
1434         Changed to use flushContext instead of flushing the context manually so that we will always
1435         notify the base class when the context gets flushed.
1436
1437         (WebCore::LegacyCACFLayerTreeHost::flushContext): Added a call to contextDidChange so the
1438         base class will know what happened. Moved code to schedule a render from here...
1439         (WebCore::LegacyCACFLayerTreeHost::contextDidChange): ...to here.
1440
1441         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Added contextDidChange.
1442
1443         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Added.
1444         (WebCore::WKCACFViewLayerTreeHost::create): If WebKitQuartzCoreAdditions, which provides
1445         WKCACFView, isn't present, bail. Otherwise allocate and return a new host.
1446         (WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost): Initialize members.
1447         (WebCore::WKCACFViewLayerTreeHost::updateViewIfNeeded): Update the view if we previously
1448         marked that we needed to do so, and flush the context if our layer's bounds have changed.
1449         (WebCore::WKCACFViewLayerTreeHost::contextDidChangeCallback): Call through to
1450         contextDidChange.
1451         (WebCore::WKCACFViewLayerTreeHost::contextDidChange): Tell the WKCACFView to start rendering
1452         (if we didn't already), then call up to the base class.
1453         (WebCore::WKCACFViewLayerTreeHost::initializeContext): Set the context's user data, the
1454         view's layer, and hook up our "context did change" callback.
1455         (WebCore::WKCACFViewLayerTreeHost::resize): Mark that the view needs to be updated the next
1456         time we paint.
1457         (WebCore::WKCACFViewLayerTreeHost::createRenderer): Update our view and return whether it is
1458         able to render or not.
1459         (WebCore::WKCACFViewLayerTreeHost::destroyRenderer): Clear out all the info we passed down
1460         to the view.
1461         (WebCore::WKCACFViewLayerTreeHost::lastCommitTime): Call through to the view.
1462         (WebCore::WKCACFViewLayerTreeHost::flushContext): Ditto.
1463         (WebCore::WKCACFViewLayerTreeHost::paint): Update the view so it will draw at the right
1464         size, then call up to the base class.
1465         (WebCore::WKCACFViewLayerTreeHost::render): Invalidate the view using the passed-in dirty
1466         rects, then ask it to draw.
1467
1468         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/ca/win/LegacyCACFLayerTreeHost.h.
1469
1470 2011-01-27  Adam Roben  <aroben@apple.com>
1471
1472         Move LegacyCACFLayerTreeHost into its own files
1473
1474         More preparation for <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost
1475         should use WKCACFView for rendering
1476
1477         Reviewed by Simon Fraser.
1478
1479         * WebCore.vcproj/WebCore.vcproj: Added LegacyCACFLayerTreeHost.{cpp,h}.
1480
1481         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Moved code from here to new files.
1482
1483         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: Added.
1484         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Added.
1485
1486 2011-01-27  Patrick Gansterer  <paroga@webkit.org>
1487
1488         Unreviewed WinCE build fix for r76824.
1489
1490         * platform/wince/DragDataWinCE.cpp:
1491         (WebCore::DragData::dragDataMap):
1492
1493 2011-01-27  Adam Roben  <aroben@apple.com>
1494
1495         Split CACFLayerTreeHost into base and derived classes
1496
1497         The derived class, LegacyCACFLayerTreeHost, contains all the D3D-related code. A later patch
1498         will add a new derived class that replaces the D3D code with a different rendering API.
1499
1500         For now, LegacyCACFLayerTreeHost lives in CACFLayerTreeHost.cpp. This keeps the diff a
1501         little smaller. A later patch will move it to its own source files.
1502
1503         Preparation for <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost
1504         should use WKCACFView for rendering
1505
1506         Reviewed by Simon Fraser.
1507
1508         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1509         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Clear the window before
1510         destroying the host, as that is now the API contract that clients must fulfill.
1511         (WebCore::LegacyCACFLayerTreeHost::create): Added. Simple creator.
1512         (WebCore::CACFLayerTreeHost::create): Now instantiates a LegacyCACFLayerTreeHost. Calls the
1513         new initialize function to perform initialization that has to happen after the vtable has
1514         been set up.
1515
1516         (WebCore::LegacyCACFLayerTreeHost::LegacyCACFLayerTreeHost):
1517         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost):
1518         (WebCore::LegacyCACFLayerTreeHost::initializeContext):
1519         (WebCore::CACFLayerTreeHost::initialize):
1520         Moved some initialization code from the CACFLayerTreeHost constructor into these new
1521         functions.
1522
1523         (WebCore::LegacyCACFLayerTreeHost::~LegacyCACFLayerTreeHost): Added. Moved code here from
1524         ~CACFLayerTreeHost.
1525         (WebCore::CACFLayerTreeHost::~CACFLayerTreeHost): Rather than clearing the window at this
1526         point (which would be too late, since we won't be able to call into the derived class's
1527         virtual functions), just assert that it has already been cleared (or was never set in the
1528         first place).
1529         (WebCore::LegacyCACFLayerTreeHost::createRenderer): Renamed from
1530         CACFLayerTreeHost::createRenderer, and changed to use getters instead of accessing
1531         CACFLayerTreeHost's data members directly.
1532
1533         (WebCore::LegacyCACFLayerTreeHost::destroyRenderer):
1534         (WebCore::CACFLayerTreeHost::destroyRenderer):
1535         Moved some code to the new LegacyCACFLayerTreeHost function.
1536
1537         (WebCore::LegacyCACFLayerTreeHost::resize):
1538         (WebCore::LegacyCACFLayerTreeHost::renderTimerFired):
1539         Moved these functions to LegacyCACFLayerTreeHost.
1540
1541         (WebCore::LegacyCACFLayerTreeHost::paint):
1542         (WebCore::CACFLayerTreeHost::paint):
1543         Moved some code to the new LegacyCACFLayerTreeHost function.
1544
1545         (WebCore::LegacyCACFLayerTreeHost::render):
1546         (WebCore::LegacyCACFLayerTreeHost::renderSoon):
1547         Moved these functions to LegacyCACFLayerTreeHost.
1548
1549         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Moved code to flush the context
1550         from here...
1551         (WebCore::LegacyCACFLayerTreeHost::flushContext): ...to this new function.
1552
1553         (WebCore::LegacyCACFLayerTreeHost::lastCommitTime): Moved code to get the last commit time
1554         to this new function...
1555         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted): ...from here.
1556
1557         (WebCore::LegacyCACFLayerTreeHost::initD3DGeometry):
1558         (WebCore::LegacyCACFLayerTreeHost::resetDevice):
1559         Moved these functions to LegacyCACFLayerTreeHost.
1560
1561         * platform/graphics/ca/win/CACFLayerTreeHost.h: Made some functions virtual, removed some
1562         members that have moved to LegacyCACFLayerTreeHost, grouped remaining members more
1563         logically, and added some getters used by LegacyCACFLayerTreeHost.
1564
1565 2011-01-27  Adam Roben  <aroben@apple.com>
1566
1567         Move CACFLayerTreeHostClient to its own header file
1568
1569         Rubber-stamped by Steve Falkenburg.
1570
1571         * WebCore.vcproj/WebCore.vcproj: Added CACFLayerTreeHostClient.h. Also let VS have its way
1572         with the file.
1573
1574         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Added new #include.
1575
1576         * platform/graphics/ca/win/CACFLayerTreeHost.h: Removed CACFLayerTreeHostClient.
1577
1578         * platform/graphics/ca/win/CACFLayerTreeHostClient.h: Added.
1579
1580         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: Moved some #includes here
1581         from the header file.
1582
1583         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Replaced broader #includes
1584         with more specific ones, plus a forward-declaration.
1585
1586 2011-01-27  James Simonsen  <simonjam@chromium.org>
1587
1588         Reviewed by Tony Chang.
1589
1590         [Chromium] Simplify small caps logic in complex text on linux
1591         https://bugs.webkit.org/show_bug.cgi?id=53207
1592
1593         Test: fast/text/atsui-multiple-renderers.html
1594               fast/text/atsui-small-caps-punctuation-size.html
1595
1596         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
1597         (WebCore::ComplexTextController::nextScriptRun): Remove redundant logic. Case changes in a text run imply FontData changes.
1598         (WebCore::ComplexTextController::setupFontForScriptRun): Update comment to reflect above.
1599
1600 2011-01-27  Adam Barth  <abarth@webkit.org>
1601
1602         In which I attempt to fix the EFL build.
1603
1604         * CMakeLists.txt:
1605
1606 2011-01-25  Levi Weintraub  <leviw@chromium.org>
1607
1608         Reviewed by Darin Adler.
1609
1610         Adding border and padding to the calculation of the local caret rect for RenderBoxes.
1611         Corrected for mistake in r76625
1612
1613         Undo moves caret to invalid position
1614         https://bugs.webkit.org/show_bug.cgi?id=49744
1615
1616         Tests: editing/selection/caret-painting-after-paste-undo-rtl.html
1617                editing/selection/caret-painting-after-paste-undo.html
1618
1619         * rendering/RenderBox.cpp:
1620         (WebCore::RenderBox::localCaretRect):
1621
1622 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1623
1624         Unreviewed, rolling out r76825.
1625         http://trac.webkit.org/changeset/76825
1626         https://bugs.webkit.org/show_bug.cgi?id=53256
1627
1628         "caused crashes on GTK and chromium" (Requested by rniwa on
1629         #webkit).
1630
1631         * rendering/RenderBoxModelObject.cpp:
1632         (WebCore::ImageQualityController::keyDestroyed):
1633         (WebCore::ImageQualityController::objectDestroyed):
1634         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
1635         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1636         (WebCore::imageQualityController):
1637         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
1638
1639 2011-01-27  Adam Barth  <abarth@webkit.org>
1640
1641         Reviewed by Eric Seidel.
1642
1643         Generalize the mechanism view-source uses to remember the source for an HTMLToken
1644         https://bugs.webkit.org/show_bug.cgi?id=53200
1645
1646         Currently view-source tracks the source associated with each HTMLToken.
1647         We want to re-use this mechanism for the new XSS auditor.  This patch
1648         moves this code into its own class so it can be shared between the
1649         view-source parser and the general HTML parser.  This patch also add
1650         support for tracking the source of tokens that span document.write
1651         boundaries.
1652
1653         No functional change.  This code change is somewhat tested by our
1654         view-source layout tests.
1655
1656         * Android.mk:
1657         * GNUmakefile.am:
1658         * WebCore.gypi:
1659         * WebCore.pro:
1660         * WebCore.vcproj/WebCore.vcproj:
1661         * WebCore.xcodeproj/project.pbxproj:
1662             - Fun with updating build files.
1663         * html/parser/HTMLDocumentParser.cpp:
1664         (WebCore::HTMLDocumentParser::pumpTokenizer):
1665             - Teach HTMLDocumentParser to track the source for HTMLTokens.
1666               Currently, this information isn't used, but it will be shortly.
1667               I ran the HTML parser benchmark and this change didn't have a
1668               measurable effect.
1669         * html/parser/HTMLDocumentParser.h:
1670             - Composite in the HTMLSourceTracker.
1671         * html/parser/HTMLSourceTracker.cpp: Added.
1672         (WebCore::HTMLSourceTracker::HTMLSourceTracker):
1673         (WebCore::HTMLSourceTracker::start):
1674         (WebCore::HTMLSourceTracker::end):
1675             - This function should eventualy be folded into HTMLTokenizer.
1676         (WebCore::HTMLSourceTracker::sourceForToken):
1677         * html/parser/HTMLSourceTracker.h: Added.
1678         * html/parser/HTMLToken.h:
1679             - Now HTMLTokens always have a start index of zero.  To do the job
1680               of the old start index, this patch introduces the notion of a
1681               baseOffset.  Unlike the start index (which was used as the base
1682               offset for all the other indicies), the baseOffset can change
1683               over the lifetime of the token.  We need the flexibility to
1684               change the offset for tokens that span document.write boundaries.
1685               Values are now normalized to zero-offset when stored.
1686         (WebCore::HTMLToken::clear):
1687         (WebCore::HTMLToken::setBaseOffset):
1688         (WebCore::HTMLToken::end):
1689         (WebCore::HTMLToken::beginAttributeName):
1690         (WebCore::HTMLToken::endAttributeName):
1691         (WebCore::HTMLToken::beginAttributeValue):
1692         (WebCore::HTMLToken::endAttributeValue):
1693         * html/parser/HTMLViewSourceParser.cpp:
1694             - Updates the HTMLViewSourceParser to use the new
1695               HTMLSourceTracker.
1696         (WebCore::HTMLViewSourceParser::pumpTokenizer):
1697         (WebCore::HTMLViewSourceParser::append):
1698         (WebCore::HTMLViewSourceParser::sourceForToken):
1699             - This function now just calls through to HTMLSourceTracker.
1700         * html/parser/HTMLViewSourceParser.h:
1701         * platform/text/SegmentedString.cpp:
1702         (WebCore::SegmentedString::currentColumn):
1703         (WebCore::SegmentedString::setCurrentPosition):
1704         * platform/text/SegmentedString.h:
1705         (WebCore::SegmentedString::numberOfCharactersConsumed):
1706             - We need to handle the general case now.  The "slow" version
1707               doesn't turn out to be any slower in practice anyway.
1708
1709 2011-01-27  Sam Weinig  <sam@webkit.org>
1710
1711         Fix all the builds.
1712
1713         * platform/ScrollView.cpp:
1714         (WebCore::ScrollView::paintOverhangAreas): Add parameters.
1715
1716 2011-01-27  Sam Weinig  <sam@webkit.org>
1717
1718         Reviewed by Dave Hyatt.
1719
1720         Add ability to do an unconstrained scroll on a ScrollView
1721         https://bugs.webkit.org/show_bug.cgi?id=53249
1722
1723         * platform/ScrollView.cpp:
1724         (WebCore::ScrollView::ScrollView):
1725         Initialize m_constrainsScrollingToContentEdge to true.
1726
1727         (WebCore::ScrollView::setScrollOffset):
1728         Only constrain the offset if the m_constrainsScrollingToContentEdge is set.
1729
1730         (WebCore::ScrollView::updateScrollbars):
1731         Simplify expression converting an IntSize to an IntPoint.
1732         
1733         (WebCore::ScrollView::paint):
1734         Paint the overhang if there is any.
1735         
1736         (WebCore::ScrollView::calculateOverhangAreasForPainting):
1737         Calculate the overhang in viewport coordinates for painting.
1738
1739         * platform/ScrollView.h:
1740         (WebCore::ScrollView::constrainsScrollingToContentEdge):
1741         (WebCore::ScrollView::setConstrainsScrollingToContentEdge):
1742         Add bit to control whether the scroll position should be constrained
1743         to the content edge when set.
1744
1745         * platform/ScrollbarThemeComposite.cpp:
1746         (WebCore::usedTotalSize):
1747         (WebCore::ScrollbarThemeComposite::thumbPosition):
1748         (WebCore::ScrollbarThemeComposite::thumbLength):
1749         * platform/mac/ScrollbarThemeMac.mm:
1750         (WebCore::ScrollbarThemeMac::paint):
1751         Improve calculations of thumb size and position to take overhang into account.
1752
1753 2011-01-27  Dirk Schulze  <krit@webkit.org>
1754
1755         Reviewed by Nikolas Zimmermann.
1756
1757         SVG animation of Paths with segments of different coordinate modes on begin and end
1758         https://bugs.webkit.org/show_bug.cgi?id=52984
1759
1760         At the moment we just support SVG path animations, if the number of segments on the given start path
1761         is the same as the number of segments on the given end path. But a segment on a given position must be identical
1762         on both paths as well. Not only the segment type, also the coordinate mode of the segments must be identical.
1763         If MoveToRel is on the second position on the start path a MoveToRel must be on the second position
1764         of the end path too. According to the SVG spec, at least the coordinate mode can differ. Means, if we have MoveToRel
1765         in the start path, we can use MoveToAbs on the same position in the end path.
1766
1767         This patch fixes the blending code to follow the spec here. It was necessary to track the current position of
1768         both paths, transform coordinates to the same coordinate mode and transform the resulting animation coordinate back
1769         to the coordinate mode of either the start or the end path. Which mode is taken depends on the progress of the
1770         animation.
1771
1772         Tests: svg/animations/animate-path-animation-Cc-Ss.html
1773                svg/animations/animate-path-animation-Ll-Vv-Hh.html
1774                svg/animations/animate-path-animation-Qq-Tt.html
1775                svg/animations/animate-path-animation-cC-sS-inverse.html
1776                svg/animations/animate-path-animation-lL-vV-hH-inverse.html
1777                svg/animations/animate-path-animation-qQ-tT-inverse.html
1778
1779         * svg/SVGPathBlender.cpp:
1780         (WebCore::blendFloatPoint):
1781         (WebCore::blendAnimatedFloat):
1782         (WebCore::SVGPathBlender::blendAnimatedDimensionalFloat):
1783         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
1784         (WebCore::SVGPathBlender::blendMoveToSegment):
1785         (WebCore::SVGPathBlender::blendLineToSegment):
1786         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
1787         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
1788         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
1789         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
1790         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
1791         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
1792         (WebCore::SVGPathBlender::blendArcToSegment):
1793         (WebCore::coordinateModeOfCommand):
1794         (WebCore::isSegmentEqual):
1795         (WebCore::SVGPathBlender::blendAnimatedPath):
1796         (WebCore::SVGPathBlender::cleanup):
1797         * svg/SVGPathBlender.h:
1798
1799 2011-01-27  Cris Neckar  <cdn@chromium.org>
1800
1801         Reviewed by Dimitri Glazkov.
1802
1803         Clear the parent on a css keyframe's m_style when removing it from the stylesheet.
1804         https://bugs.webkit.org/show_bug.cgi?id=52320
1805
1806         Test: fast/css/css-keyframe-style-crash.html
1807
1808         * css/CSSRuleList.cpp:
1809         (WebCore::CSSRuleList::deleteRule):
1810         * css/WebKitCSSKeyframesRule.cpp:
1811         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
1812
1813 2011-01-27  Rob Buis  <rwlbuis@gmail.com>
1814
1815         Reviewed by Kent Tamura.
1816
1817         Color changes to option elements in a select multiple aren't drawn immediately
1818         https://bugs.webkit.org/show_bug.cgi?id=49790
1819
1820         Redirect style changes on <option> element to the owner <select> element.
1821
1822         Test: fast/repaint/select-option-background-color.html
1823
1824         * html/HTMLOptionElement.cpp:
1825         (WebCore::HTMLOptionElement::setRenderStyle):
1826
1827 2011-01-19  Stephen White  <senorblanco@chromium.org>
1828
1829         Reviewed by Darin Adler.
1830
1831         Fix performance regression in ImageQualityController::objectDestroyed().
1832         https://bugs.webkit.org/show_bug.cgi?id=52645
1833
1834         In r72282, I inadvertently introduced this regression by using a
1835         linear search through the hash map on object destruction.  This was
1836         because the hash key consisted of both object pointer and layer id,
1837         but on object destruction we only know the object pointer, requiring
1838         a search to find all the layers. 
1839         By replacing the hash map with two nested hash maps, where the outer key
1840         is the object and the inner key is the layer, we can find all the
1841         relevant data for an object in one hash lookup.
1842
1843         * rendering/RenderBoxModelObject.cpp:
1844         Replace the (object,layer)->size HashMap with object->layer and
1845         layer->size HashMaps.
1846         (WebCore::ImageQualityController::isEmpty):
1847         Implement isEmpty() for the outer HashMap.
1848         (WebCore::ImageQualityController::removeLayer):
1849         When a layer is removed, remove it from the inner hash map.
1850         (WebCore::ImageQualityController::set):
1851         Implement set():  if the inner map exists, set the layer->size tuple
1852         directly.  If not, create a new inner map, set the tuple, and insert
1853         it in the outer map.
1854         (WebCore::ImageQualityController::objectDestroyed):
1855         Look up the object in the outer map only.
1856         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
1857         Cosmetic changes for the renamed now-outer hash map.
1858         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1859         Do both outer and inner hash map lookups.  Call set() to add/update
1860         entries to the hash maps.  keyDestroyed() is now removeLayer().
1861         (WebCore::imageQualityController):
1862         Make the ImageQualityController a file-static global, so it can be
1863         created and destroyed on the fly.
1864         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
1865         If there is no ImageQualityController, don't call objectDestroyed().
1866         If it's empty, delete it.
1867
1868
1869 2011-01-26  Enrica Casucci  <enrica@apple.com>
1870
1871         Reviewed by Darin Adler and Adam Roben.
1872
1873         WebKit2: add support for drag and drop on Windows
1874         https://bugs.webkit.org/show_bug.cgi?id=52775
1875         <rdar://problem/8514409>
1876         
1877         On Windows the access to the content being dragged is
1878         provided via the IDataObject interface that is made available
1879         to the window that registers itself as drop target.
1880         Since this interface cannot be accessed from the WebProcess,
1881         in every call to one of the methods of the IDropTarget interface
1882         we serialize the content of the drag clipboard and send it over to
1883         the WebProcess.
1884         The bulk of this patch consists in the refactoring needed in DragData
1885         and ClipboardWin classes to extract the data from the serialized object.
1886         
1887         * platform/DragData.cpp:
1888         * platform/DragData.h:
1889         * platform/win/ClipboardUtilitiesWin.cpp:
1890         (WebCore::getWebLocData):
1891         (WebCore::getURL):
1892         (WebCore::getPlainText):
1893         (WebCore::getTextHTML):
1894         (WebCore::getCFHTML):
1895         (WebCore::fragmentFromFilenames):
1896         (WebCore::containsFilenames):
1897         (WebCore::fragmentFromHTML):
1898         (WebCore::containsHTML):
1899         (WebCore::getClipboardData):
1900         * platform/win/ClipboardUtilitiesWin.h:
1901         * platform/win/ClipboardWin.cpp:
1902         (WebCore::Clipboard::create):
1903         (WebCore::ClipboardWin::ClipboardWin):
1904         (WebCore::ClipboardWin::getData):
1905         (WebCore::ClipboardWin::types):
1906         (WebCore::ClipboardWin::files):
1907         (WebCore::ClipboardWin::hasData):
1908         * platform/win/ClipboardWin.h:
1909         (WebCore::ClipboardWin::create):
1910         * platform/win/DragDataWin.cpp:
1911         (WebCore::DragData::DragData):
1912         (WebCore::DragData::containsURL):
1913         (WebCore::DragData::dragDataMap):
1914         (WebCore::DragData::asURL):
1915         (WebCore::DragData::containsFiles):
1916         (WebCore::DragData::asFilenames):
1917         (WebCore::DragData::containsPlainText):
1918         (WebCore::DragData::asPlainText):
1919         (WebCore::DragData::canSmartReplace):
1920         (WebCore::DragData::containsCompatibleContent):
1921         (WebCore::DragData::asFragment):
1922
1923 2011-01-27  Mario Sanchez Prada  <msanchez@igalia.com>
1924
1925         Reviewed by Martin Robinson.
1926
1927         [GTK] Space characters in source document interfere with reported caret offset
1928         https://bugs.webkit.org/show_bug.cgi?id=53033
1929
1930         Calculate caret offset from rendered text instead of from node contents.
1931
1932         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1933         (objectAndOffsetUnignored): Calculate the caret offset based only
1934         on positions and ranges, instead of using the computed offset in
1935         the container node.
1936
1937 2011-01-26  Alexey Proskuryakov  <ap@apple.com>
1938
1939         Reviewed by Darin Adler.
1940
1941         https://bugs.webkit.org/show_bug.cgi?id=53197
1942         <rdar://problem/8895682> Make WebKit2 printing asynchronous
1943
1944         * WebCore.exp.in: Export more PrintContext methods that we didn't use on Mac before.
1945
1946         * page/PrintContext.cpp: (WebCore::PrintContext::spoolRect): Changed to make the same
1947         transformation as spoolPages does for consistency.
1948
1949 2011-01-27  David Grogan  <dgrogan@google.com>
1950
1951         Reviewed by Jeremy Orlow.
1952
1953         initial support for close() in indexeddb backend
1954         https://bugs.webkit.org/show_bug.cgi?id=53150
1955
1956         Test: storage/indexeddb/transaction-after-close.html
1957
1958         * storage/IDBDatabase.cpp:
1959         (WebCore::IDBDatabase::IDBDatabase):
1960         (WebCore::IDBDatabase::transaction):
1961         (WebCore::IDBDatabase::close):
1962         * storage/IDBDatabase.h:
1963         * storage/IDBDatabase.idl:
1964         * storage/IDBDatabaseBackendImpl.cpp:
1965         (WebCore::IDBDatabaseBackendImpl::transaction):
1966         (WebCore::IDBDatabaseBackendImpl::close):
1967
1968 2011-01-27  Dirk Schulze  <krit@webkit.org>
1969
1970         Reviewed by Nikolas Zimmermann.
1971
1972         SVG animation doesn't support calcMode discrete for number and color values.
1973         https://bugs.webkit.org/show_bug.cgi?id=53189
1974
1975         Add support for calcMode discrete on number and color animation.
1976
1977         Tests: svg/animations/animate-color-calcMode-discrete.html
1978                svg/animations/animate-number-calcMode-discrete.html
1979
1980         * svg/SVGAnimateElement.cpp:
1981         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1982
1983 2011-01-26  Zhenyao Mo  <zmo@google.com>
1984
1985         Reviewed by Kenneth Russell.
1986
1987         shaderSource needs to preserve original source
1988         https://bugs.webkit.org/show_bug.cgi?id=52833
1989
1990         Test: fast/canvas/webgl/gl-getshadersource.html
1991
1992         * html/canvas/WebGLRenderingContext.cpp:
1993         (WebCore::WebGLRenderingContext::getShaderParameter): Intercept SHADER_SOURCE_LENGTH.
1994         (WebCore::WebGLRenderingContext::getShaderSource): Intercept the call.
1995         (WebCore::WebGLRenderingContext::shaderSource): Cache the source.
1996         * html/canvas/WebGLShader.cpp: Cache shader source.
1997         (WebCore::WebGLShader::WebGLShader):
1998         * html/canvas/WebGLShader.h: Ditto.
1999         (WebCore::WebGLShader::getSource):
2000         (WebCore::WebGLShader::setSource):
2001
2002 2011-01-27  Patrick Gansterer  <paroga@webkit.org>
2003
2004         Unreviewed WinCE build fix for r76743.
2005
2006         * platform/graphics/wince/FontWinCE.cpp:
2007         (WebCore::TextRunComponent::TextRunComponent):
2008
2009 2011-01-27  Pavel Podivilov  <podivilov@chromium.org>
2010
2011         Reviewed by Pavel Feldman.
2012
2013         Web Inspector: Closure and Global variable details automatically collapsing on each step through JavaScript code.
2014         https://bugs.webkit.org/show_bug.cgi?id=53234
2015
2016         * inspector/front-end/ScopeChainSidebarPane.js:
2017         (WebInspector.ScopeChainSidebarPane):
2018         (WebInspector.ScopeChainSidebarPane.prototype.update):
2019
2020 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2021
2022         Unreviewed, rolling out r76789.
2023         http://trac.webkit.org/changeset/76789
2024         https://bugs.webkit.org/show_bug.cgi?id=53238
2025
2026         Broke GTK layout tests (Requested by podivilov on #webkit).
2027
2028         * inspector/front-end/ScopeChainSidebarPane.js:
2029         (WebInspector.ScopeChainSidebarPane):
2030         (WebInspector.ScopeChainSidebarPane.prototype.update):
2031
2032 2011-01-27  Yury Semikhatsky  <yurys@chromium.org>
2033
2034         Reviewed by Pavel Feldman.
2035
2036         Web Inspector: store all settings related to the agents on the frontend side
2037         https://bugs.webkit.org/show_bug.cgi?id=53174
2038
2039         * CMakeLists.txt:
2040         * GNUmakefile.am:
2041         * WebCore.exp.in:
2042         * WebCore.gypi:
2043         * WebCore.pro:
2044         * WebCore.vcproj/WebCore.vcproj:
2045         * WebCore.xcodeproj/project.pbxproj:
2046         * bindings/js/ScriptDebugServer.cpp:
2047         * bindings/js/ScriptDebugServer.h:
2048         * bindings/js/ScriptProfiler.cpp:
2049         * bindings/js/ScriptProfiler.h:
2050         * bindings/v8/ScriptDebugServer.cpp:
2051         * bindings/v8/ScriptDebugServer.h:
2052         * bindings/v8/ScriptProfiler.cpp:
2053         * bindings/v8/ScriptProfiler.h:
2054         * inspector/Inspector.idl:
2055         * inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored
2056         on the front-end side and will be pushed to the backend when the frontend is loaded.
2057         (WebCore::InspectorAgent::InspectorAgent):
2058         (WebCore::InspectorAgent::disconnectFrontend):
2059         (WebCore::InspectorAgent::restoreDebugger):
2060         (WebCore::InspectorAgent::restoreProfiler):
2061         (WebCore::InspectorAgent::enableProfiler):
2062         (WebCore::InspectorAgent::disableProfiler):
2063         (WebCore::InspectorAgent::showAndEnableDebugger):
2064         (WebCore::InspectorAgent::enableDebugger):
2065         (WebCore::InspectorAgent::disableDebugger):
2066         * inspector/InspectorAgent.h:
2067         * inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only
2068         if the front-end was opened during current browser session and XHR logging is turned on
2069         there.
2070         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
2071         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
2072         * inspector/InspectorDebuggerAgent.cpp:
2073         * inspector/InspectorDebuggerAgent.h:
2074         * inspector/InspectorInstrumentation.cpp:
2075         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
2076         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
2077         * inspector/InspectorProfilerAgent.cpp:
2078         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2079         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
2080         * inspector/InspectorSettings.cpp: Removed.
2081         * inspector/InspectorSettings.h: Removed.
2082         * inspector/InspectorState.cpp:
2083         (WebCore::InspectorState::InspectorState):
2084         * inspector/InspectorState.h:
2085         * inspector/front-end/ConsoleView.js:
2086         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
2087         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2088         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
2089         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
2090         * inspector/front-end/ProfilesPanel.js:
2091         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
2092         * inspector/front-end/ScriptsPanel.js:
2093         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
2094         * inspector/front-end/Settings.js:
2095         (WebInspector.Settings):
2096         * inspector/front-end/inspector.js:
2097
2098 2011-01-27  Pavel Podivilov  <podivilov@chromium.org>
2099
2100         Reviewed by Pavel Feldman.
2101
2102         Web Inspector: Closure and Global variable details automatically collapsing on each step through JavaScript code.
2103         https://bugs.webkit.org/show_bug.cgi?id=53234
2104
2105         * inspector/front-end/ScopeChainSidebarPane.js:
2106         (WebInspector.ScopeChainSidebarPane):
2107         (WebInspector.ScopeChainSidebarPane.prototype.update):
2108
2109 2011-01-27  Alexander Pavlov  <apavlov@chromium.org>
2110
2111         Reviewed by Pavel Feldman.
2112
2113         Web Inspector: [Elements panel] Tooltip for relative links incorrectly identifies current URL
2114         https://bugs.webkit.org/show_bug.cgi?id=53171
2115
2116         * inspector/front-end/inspector.js:
2117         (WebInspector.completeURL): Taught to understand partial href's that start with "?" (contain GET parameters only)
2118
2119 2011-01-27  Yury Semikhatsky  <yurys@chromium.org>
2120
2121         Reviewed by Pavel Feldman.
2122
2123         [V8] Crash in WebCore::addMessageToConsole
2124         https://bugs.webkit.org/show_bug.cgi?id=53227
2125
2126         * bindings/v8/V8Proxy.cpp: check that the Frame where the error
2127         occured still has a page before getting a console object from it.
2128         (WebCore::V8Proxy::reportUnsafeAccessTo):
2129
2130 2011-01-27  Hans Wennborg  <hans@chromium.org>
2131
2132         Reviewed by Jeremy Orlow.
2133
2134         IndexedDB: Remove IDBCallbacks::onSuccess() used for null values.
2135         https://bugs.webkit.org/show_bug.cgi?id=53178
2136
2137         Remove the IDBCallbacks::onSuccess() function that was used for
2138         null values, and replace such calls with calls to
2139         IDBCallBacks::onSuccess(SerializedScriptValue::nullValue())
2140         instead.
2141
2142         No new functionality, so no new tests.
2143
2144         * storage/IDBCallbacks.h:
2145         * storage/IDBCursorBackendImpl.cpp:
2146         (WebCore::IDBCursorBackendImpl::updateInternal):
2147         (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
2148         * storage/IDBIndexBackendImpl.cpp:
2149         (WebCore::IDBIndexBackendImpl::openCursorInternal):
2150         * storage/IDBObjectStoreBackendImpl.cpp:
2151         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
2152         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
2153         * storage/IDBRequest.cpp:
2154         * storage/IDBRequest.h:
2155
2156 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2157
2158         Unreviewed, rolling out r76773.
2159         http://trac.webkit.org/changeset/76773
2160         https://bugs.webkit.org/show_bug.cgi?id=53230
2161
2162         breaks multiple GTK media tests (Requested by philn-tp on
2163         #webkit).
2164
2165         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2166         (WebCore::mimeTypeCache):
2167
2168 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2169
2170         Unreviewed, rolling out r76770.
2171         http://trac.webkit.org/changeset/76770
2172         https://bugs.webkit.org/show_bug.cgi?id=53229
2173
2174         Some inspector tests fail (Requested by yurys on #webkit).
2175
2176         * CMakeLists.txt:
2177         * GNUmakefile.am:
2178         * WebCore.exp.in:
2179         * WebCore.gypi:
2180         * WebCore.pro:
2181         * WebCore.vcproj/WebCore.vcproj:
2182         * WebCore.xcodeproj/project.pbxproj:
2183         * bindings/js/ScriptDebugServer.cpp:
2184         (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
2185         * bindings/js/ScriptDebugServer.h:
2186         * bindings/js/ScriptProfiler.cpp:
2187         (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
2188         * bindings/js/ScriptProfiler.h:
2189         * bindings/v8/ScriptDebugServer.cpp:
2190         (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
2191         * bindings/v8/ScriptDebugServer.h:
2192         * bindings/v8/ScriptProfiler.cpp:
2193         (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
2194         * bindings/v8/ScriptProfiler.h:
2195         * inspector/Inspector.idl:
2196         * inspector/InspectorAgent.cpp:
2197         (WebCore::InspectorAgent::InspectorAgent):
2198         (WebCore::InspectorAgent::disconnectFrontend):
2199         (WebCore::InspectorAgent::restoreDebugger):
2200         (WebCore::InspectorAgent::restoreProfiler):
2201         (WebCore::InspectorAgent::ensureSettingsLoaded):
2202         (WebCore::InspectorAgent::enableProfiler):
2203         (WebCore::InspectorAgent::disableProfiler):
2204         (WebCore::InspectorAgent::showAndEnableDebugger):
2205         (WebCore::InspectorAgent::enableDebugger):
2206         (WebCore::InspectorAgent::disableDebugger):
2207         * inspector/InspectorAgent.h:
2208         (WebCore::InspectorAgent::settings):
2209         * inspector/InspectorConsoleAgent.cpp:
2210         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
2211         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
2212         * inspector/InspectorDebuggerAgent.cpp:
2213         (WebCore::InspectorDebuggerAgent::isDebuggerAlwaysEnabled):
2214         * inspector/InspectorDebuggerAgent.h:
2215         * inspector/InspectorInstrumentation.cpp:
2216         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
2217         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
2218         * inspector/InspectorProfilerAgent.cpp:
2219         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2220         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
2221         * inspector/InspectorSettings.cpp: Added.
2222         (WebCore::InspectorSettings::InspectorSettings):
2223         (WebCore::InspectorSettings::getBoolean):
2224         (WebCore::InspectorSettings::setBoolean):
2225         (WebCore::InspectorSettings::getLong):
2226         (WebCore::InspectorSettings::setLong):
2227         (WebCore::InspectorSettings::registerBoolean):
2228         (WebCore::InspectorSettings::registerLong):
2229         * inspector/InspectorSettings.h: Copied from Source/WebCore/bindings/v8/ScriptProfiler.h.
2230         * inspector/InspectorState.cpp:
2231         (WebCore::InspectorState::InspectorState):
2232         * inspector/InspectorState.h:
2233         * inspector/front-end/ConsoleView.js:
2234         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.monitoringXHRStateChanged):
2235         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2236         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
2237         * inspector/front-end/ProfilesPanel.js:
2238         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
2239         * inspector/front-end/ScriptsPanel.js:
2240         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
2241         * inspector/front-end/Settings.js:
2242         (WebInspector.Settings):
2243         * inspector/front-end/inspector.js:
2244
2245 2011-01-26  Philippe Normand  <pnormand@igalia.com>
2246
2247         Reviewed by Martin Robinson.
2248
2249         [GTK] LayoutTests/media/audio-mpeg4-supported.html fails
2250         https://bugs.webkit.org/show_bug.cgi?id=53125
2251
2252         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2253         (WebCore::mimeTypeCache): Add audio/x-m4a mimetype in the cache.
2254
2255 2011-01-26  Yury Semikhatsky  <yurys@chromium.org>
2256
2257         Reviewed by Pavel Feldman.
2258
2259         Web Inspector: store all settings related to the agents on the frontend side
2260         https://bugs.webkit.org/show_bug.cgi?id=53174
2261
2262         * CMakeLists.txt:
2263         * GNUmakefile.am:
2264         * WebCore.exp.in:
2265         * WebCore.gypi:
2266         * WebCore.pro:
2267         * WebCore.vcproj/WebCore.vcproj:
2268         * WebCore.xcodeproj/project.pbxproj:
2269         * inspector/Inspector.idl:
2270         * inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored
2271         on the front-end side and will be pushed to the backend when the frontend is loaded.
2272         (WebCore::InspectorAgent::InspectorAgent):
2273         (WebCore::InspectorAgent::disconnectFrontend):
2274         (WebCore::InspectorAgent::restoreDebugger):
2275         (WebCore::InspectorAgent::restoreProfiler):
2276         (WebCore::InspectorAgent::enableProfiler):
2277         (WebCore::InspectorAgent::disableProfiler):
2278         (WebCore::InspectorAgent::showAndEnableDebugger):
2279         (WebCore::InspectorAgent::enableDebugger):
2280         (WebCore::InspectorAgent::disableDebugger):
2281         * inspector/InspectorAgent.h:
2282         * inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only
2283         if the front-end was opened during current browser session and XHR logging is turned on
2284         there.
2285         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
2286         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
2287         * inspector/InspectorInstrumentation.cpp:
2288         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
2289         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
2290         * inspector/InspectorProfilerAgent.cpp:
2291         (WebCore::InspectorProfilerAgent::enable):
2292         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
2293         * inspector/InspectorProfilerAgent.h:
2294         * inspector/InspectorSettings.cpp: Removed.
2295         * inspector/InspectorSettings.h: Removed.
2296         * inspector/InspectorState.cpp:
2297         (WebCore::InspectorState::InspectorState):
2298         * inspector/InspectorState.h:
2299         * inspector/front-end/ConsoleView.js:
2300         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
2301         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2302         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
2303         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
2304         * inspector/front-end/ProfilesPanel.js:
2305         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
2306         * inspector/front-end/ScriptsPanel.js:
2307         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
2308         * inspector/front-end/Settings.js:
2309         (WebInspector.Settings):
2310         * inspector/front-end/inspector.js:
2311
2312 2011-01-27  Dan Bernstein  <mitz@apple.com>
2313
2314         Reviewed by Sam Weinig.
2315
2316         REGRESSION (r76743): Uneven spacing in right-to-left justified text
2317         https://bugs.webkit.org/show_bug.cgi?id=53225
2318
2319         Fixes failure in fast/text/atsui-spacing-features.html
2320
2321         There was an inconsistency between rendering code and font code in the interpretation of
2322         'after expansion' and 'trailing expansion'. Changed all code to interpret these in terms of
2323         visual order rather than logical.
2324
2325         * platform/graphics/Font.cpp:
2326         (WebCore::Font::expansionOpportunityCount): Added a text direction parameter and changed to
2327         iterate in visual order accordingly.
2328         * platform/graphics/Font.h:
2329         * platform/graphics/WidthIterator.cpp:
2330         (WebCore::WidthIterator::WidthIterator): Pass the run direction to expansionOpportunityCount().
2331         (WebCore::WidthIterator::advance): For right-to-left runs, evaluate the trailing expansion
2332         condition with respect to the first character, which is the trailing character in visual order.
2333         * platform/graphics/mac/ComplexTextController.cpp:
2334         (WebCore::ComplexTextController::ComplexTextController): Pass the run direction to
2335         expansionOpportunityCount().
2336         * rendering/RenderBlockLineLayout.cpp:
2337         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Ditto.
2338
2339 2011-01-26  Adam Roben  <aroben@apple.com>
2340
2341         Don't create the Direct3D device before it's first needed
2342
2343         We only need the device once we decide to render. There's no point in creating it before
2344         then.
2345
2346         Reviewed by Sam Weinig.
2347
2348         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2349         (WebCore::CACFLayerTreeHost::setWindow): Removed the call to createRenderer() from here.
2350         We already have code to create it when we first try to draw.
2351         (WebCore::CACFLayerTreeHost::createRenderer): Flush the context after we set our layer's
2352         bounds so that the bounds will take effect the next time we render (which could be just
2353         after this function returns).
2354
2355 2011-01-26  Adam Roben  <aroben@apple.com>
2356
2357         Add assertions that CACFLayerTreeHost gains and loses an HWND only once
2358
2359         CACFLayerTreeHost doesn't support any other use pattern.
2360
2361         Reviewed by Sam Weinig.
2362
2363         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2364         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost): Initialize new member.
2365         (WebCore::CACFLayerTreeHost::setWindow): Assert that we transition from not having a window,
2366         to having a window, to not having a window just once over the lifetime of this object.
2367
2368         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added m_state.
2369
2370 2011-01-26  Adam Roben  <aroben@apple.com>
2371
2372         Notify layers that their animations have started when we flush the context, not when we
2373         render
2374
2375         r76372 separated context flushing from rendering, but this bit of code got left behind.
2376
2377         Reviewed by Sam Weinig.
2378
2379         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2380         (WebCore::CACFLayerTreeHost::render): Moved code to notify the layers from here to
2381         notifyAnimationsStarted.
2382         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Added a call to
2383         notifyAnimationsStarted after we flush the context.
2384         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted): Added. Code came from render. Changed
2385         to call PlatformCALayer::animationStarted rather than calling through to the client
2386         directly.
2387
2388         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added notifyAniamtionsStarted.
2389
2390 2011-01-26  Adam Roben  <aroben@apple.com>
2391
2392         Small cleanup in MediaPlayerPrivateFullscreenWindow
2393
2394         Reviewed by Sam Weinig.
2395
2396         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
2397         (WebCore::MediaPlayerPrivateFullscreenWindow::~MediaPlayerPrivateFullscreenWindow): Moved
2398         code here from close(), since this was the only place that called it after the following
2399         change to createWindow.
2400         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Replaced code that handled the
2401         case where we had already created the window with an assertion that we have not already done
2402         so. Our single caller (FullscreenVideoController) did not require this behavior.
2403
2404         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Removed layerView.
2405
2406 2011-01-26  Sam Weinig  <sam@webkit.org>
2407
2408         Reviewed by Adam Roben.
2409
2410         Move ScrollView scroll wheel code to ScrollAnimator.
2411
2412         * platform/ScrollAnimator.cpp:
2413         (WebCore::ScrollAnimator::handleWheelEvent):
2414         * platform/ScrollAnimator.h:
2415         Moved implementation of handleWheelEvent from ScrollView::wheelEvent.
2416
2417         * platform/ScrollView.cpp:
2418         (WebCore::ScrollView::wheelEvent):
2419         Call down to the ScrollableArea.
2420
2421         * platform/ScrollableArea.cpp:
2422         (WebCore::ScrollableArea::handleWheelEvent):
2423         Call down to the ScrollAnimator.
2424
2425         * platform/ScrollableArea.h:
2426         (WebCore::ScrollableArea::scrollPosition):
2427         (WebCore::ScrollableArea::minimumScrollPosition):
2428         (WebCore::ScrollableArea::maximumScrollPosition):
2429         (WebCore::ScrollableArea::visibleContentRect):
2430         (WebCore::ScrollableArea::visibleHeight):
2431         (WebCore::ScrollableArea::visibleWidth):
2432         Add functions needed to implement wheel event in the animator.
2433
2434 2011-01-26  David Kilzer  <ddkilzer@apple.com>
2435
2436         <http://webkit.org/b/53192> Add experimental support for HTTP pipelining in CFNetwork
2437         <rdar://problem/8821760>
2438
2439         Reviewed by Antti Koivisto.
2440
2441         This adds support for HTTP pipelining in CFNetwork, but does not
2442         enable it.  To enable it post-SnowLeopard, use this command:
2443
2444             defaults write BUNDLE.ID WebKitEnableHTTPPipelining -bool YES
2445
2446         Once enabled, it is possible to force the same load priority
2447         (high) to be sent to CFNetwork to allow WebCore to handle the
2448         scheduling:
2449
2450             defaults write BUNDLE.ID WebKitForceHTTPPipeliningPriorityHigh -bool YES
2451
2452         * WebCore.exp.in: Export _wkGetHTTPPipeliningPriority and
2453         _wkSetHTTPPipeliningPriority.
2454
2455         * loader/DocumentThreadableLoader.cpp:
2456         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
2457         Copy the priority to preflightRequest.
2458
2459         * loader/ResourceLoadScheduler.cpp:
2460         (WebCore::ResourceLoadScheduler::scheduleLoad): Refactored code
2461         at the end of the method to use an early return.
2462
2463         * loader/cache/CachedResourceRequest.cpp:
2464         (WebCore::CachedResourceRequest::load): Set the priority on the
2465         ResourceRequest object based on the priority of the
2466         CachedResourceRequest before calling
2467         ResourceLoadScheduler::scheduleSubresourceLoad().
2468
2469         * loader/icon/IconLoader.cpp:
2470         (WebCore::IconLoader::startLoading): Create a ResourceRequest
2471         object and set its priority to ResourceLoadPriorityLow before
2472         passing it to ResourceLoadScheduler::scheduleSubresourceLoad().
2473
2474         * platform/mac/WebCoreSystemInterface.h:
2475         (wkGetHTTPPipeliningPriority): Added.
2476         (wkSetHTTPPipeliningPriority): Added.
2477         * platform/mac/WebCoreSystemInterface.mm:
2478         (wkGetHTTPPipeliningPriority): Added.
2479         (wkSetHTTPPipeliningPriority): Added.
2480
2481         * platform/network/ResourceRequestBase.cpp:
2482         (WebCore::ResourceRequestBase::adopt): Set m_priority when
2483         adopting a CrossThreadResourceRequestData.
2484         (WebCore::ResourceRequestBase::copyData): Set m_priority when
2485         creating a CrossThreadResourceRequestData.
2486         (WebCore::ResourceRequestBase::priority): Added.
2487         (WebCore::ResourceRequestBase::setPriority): Added.
2488         (WebCore::equalIgnoringHeaderFields): Priorities must match when
2489         comparing two ResourceRequest objects.
2490
2491         * platform/network/ResourceRequestBase.h:
2492         (WebCore::ResourceRequestBase::ResourceRequestBase): Set default
2493         priority of new objects to ResourceLoadPriorityLow.
2494         (WebCore::ResourceRequestBase::priority): Added declaration.
2495         (WebCore::ResourceRequestBase::setPriority): Added declaration.
2496         (WebCore::isHTTPPipeliningEnabled): Added.
2497         (WebCore::shouldUseHTTPPipeliningPriority): Added.
2498
2499         * platform/network/cf/ResourceRequestCFNet.cpp: Updated so that
2500         Mac OS X and Windows share code.
2501         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Always
2502         set the HTTP connection count per host, but return an
2503         'unlimited' value when using HTTP pipelining.  This method used
2504         to be defined in ResourceRequestMac.mm for Mac OS X.
2505         (WebCore::readBooleanPreference): Added.  Helper method for
2506         reading boolean user defaults.
2507         (WebCore::isHTTPPipeliningEnabled): Returns value of user
2508         default key WebKitEnableHTTPPipelining, or false if not set.
2509         (WebCore::shouldUseHTTPPipeliningPriority): Returns value of
2510         user default key WebKitForceHTTPPipeliningPriorityHigh, or false
2511         if not set.
2512         * platform/network/cf/ResourceRequestCFNet.h: Updated so that
2513         Mac OS X and Windows share code.  Fixed indentation.
2514         (WebCore::mapHTTPPipeliningPriorityToResourceLoadPriority): Added.
2515         (WebCore::mapResourceLoadPriorityToHTTPPipeliningPriority): Added.
2516
2517         * platform/network/mac/ResourceRequestMac.mm:
2518         (WebCore::ResourceRequest::doUpdatePlatformRequest): Update
2519         HTTP pipelining priority on NSMutableFURLRequest object.
2520         (WebCore::ResourceRequest::doUpdateResourceRequest): Update
2521         m_priority from the NSURLRequest object.
2522         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Removed.
2523         Code is now shared with Windows in ResourceRequestCFNet.cpp.
2524
2525 2011-01-26  Beth Dakin  <bdakin@apple.com>
2526
2527         Reviewed by Darin Adler.
2528
2529         Fix for <rdar://problem/8895140> Adopt WKScrollbar metrics 
2530         when using WKScrollbars.
2531
2532         New WebKitSystemInterface Functionality.
2533         * WebCore.exp.in:
2534         * platform/mac/WebCoreSystemInterface.h:
2535         * platform/mac/WebCoreSystemInterface.mm:
2536
2537         Some of the terrible static arrays are now only needed in the 
2538         old non-WK code, so they are if-def'd now.
2539         * platform/mac/ScrollbarThemeMac.mm:
2540         
2541         Just patching this function in a better way than I did
2542         before.
2543         (WebCore::updateArrowPlacement):
2544         
2545         Call into WK for the right values.
2546         (WebCore::ScrollbarThemeMac::scrollbarThickness):
2547         (WebCore::ScrollbarThemeMac::hasThumb):
2548         (WebCore::ScrollbarThemeMac::minimumThumbLength):
2549         
2550         Return false if there are no buttons.
2551         (WebCore::ScrollbarThemeMac::hasButtons):
2552
2553         Return an empty IntRect if there are not buttons.
2554         (WebCore::buttonRepaintRect):
2555
2556 2011-01-26  Sam Weinig  <sam@webkit.org>
2557
2558         Reviewed by Maciej Stachowiak.
2559
2560         Add events to represent the start/end of a gesture scroll
2561         https://bugs.webkit.org/show_bug.cgi?id=53215
2562
2563         * WebCore.exp.in: 
2564         Add new file.
2565
2566         * WebCore.xcodeproj/project.pbxproj:
2567         Add new file.
2568
2569         * page/EventHandler.cpp:
2570         (WebCore::EventHandler::handleGestureEvent):
2571         * page/EventHandler.h:
2572         Add entry point for handling gesture events.
2573
2574         * platform/PlatformGestureEvent.h: Added.
2575         (WebCore::PlatformGestureEvent::PlatformGestureEvent):
2576         (WebCore::PlatformGestureEvent::type):
2577         (WebCore::PlatformGestureEvent::position):
2578         (WebCore::PlatformGestureEvent::globalPosition):
2579         (WebCore::PlatformGestureEvent::timestamp):
2580         Add platform agnostic representation of a gesture event.
2581
2582 2011-01-26  Dan Bernstein  <mitz@apple.com>
2583
2584         Reviewed by Dave Hyatt.
2585
2586         <rdar://problem/8446709> Allow inter-ideograph justification for CJK
2587         https://bugs.webkit.org/show_bug.cgi?id=53184
2588
2589         Tests: fast/text/justify-ideograph-complex.html
2590                fast/text/justify-ideograph-simple.html
2591                fast/text/justify-ideograph-vertical.html
2592
2593         * html/canvas/CanvasRenderingContext2D.cpp:
2594         (WebCore::CanvasRenderingContext2D::drawTextInternal): Corrected the type of the third parameter
2595         passed to the TextRun constructor and added the trailingExpansionBehavior parameter.
2596         * platform/graphics/Font.cpp:
2597         (WebCore::Font::expansionOpportunityCount): Added. Returns the number of expansion opportunities
2598         for text justification. On entry, isAfterExpansion says whether an expansion opportunity exists
2599         before the first character. On return, isAfterExpansion says whether an expansion opportunity
2600         exists after the last character.
2601         * platform/graphics/Font.h: 
2602         * platform/graphics/GlyphBuffer.h:
2603         (WebCore::GlyphBuffer::expandLastAdvance): Added.
2604         * platform/graphics/TextRun.h:
2605         (WebCore::TextRun::TextRun): Added a TrailingExpansionBehavior parameter to the constructors.
2606         Renamed padding to expansion.
2607         (WebCore::TextRun::expansion): Renamed padding() to this.
2608         (WebCore::TextRun::allowsTrailingExpansion): Added this accessor.
2609         * platform/graphics/WidthIterator.cpp:
2610         (WebCore::WidthIterator::WidthIterator): Initialize m_isAfterExpansion. Use Font::expansionOpportunityCount()
2611         and adjust the count if it includes a trailing expansion opportunity but the run disallows trailing
2612         expansion.
2613         (WebCore::WidthIterator::advance): Apply expansion before and after CJK ideographs.
2614         (WebCore::WidthIterator::advanceOneCharacter): Changed to not clear the GlyphBuffer so that advance()
2615         can expand the last advance if it is followed by a CJK ideograph.
2616         * platform/graphics/WidthIterator.h: Renamed m_padding to m_expansion and m_padPerSpace
2617         to m_expansionPerOpportunity.
2618         * platform/graphics/chromium/FontChromiumWin.cpp:
2619         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2620         * platform/graphics/chromium/FontLinux.cpp:
2621         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2622         * platform/graphics/efl/FontEfl.cpp:
2623         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2624         * platform/graphics/gtk/FontGtk.cpp:
2625         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2626         * platform/graphics/haiku/FontHaiku.cpp:
2627         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2628         * platform/graphics/mac/ComplexTextController.cpp:
2629         (WebCore::ComplexTextController::ComplexTextController): Initialize m_isAfterExpansion. Use
2630         Font::expansionOpportunityCount() and adjust the count if it includes a trailing expansion
2631         opportunity but the run disallows trailing expansion.
2632         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Moved the definition and initialization
2633         of hasExtraSpacing outside the loop. Apply expansion before and after CJK ideographs.
2634         * platform/graphics/mac/ComplexTextController.h: Renamed m_padding to m_expansion and m_padPerSpace
2635         to m_expansionPerOpportunity.
2636         * platform/graphics/mac/FontMac.mm:
2637         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2638         * platform/graphics/qt/FontQt.cpp:
2639         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2640         * platform/graphics/win/FontWin.cpp:
2641         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2642         * platform/graphics/win/UniscribeController.cpp:
2643         (WebCore::UniscribeController::UniscribeController): Updated for rename.
2644         * platform/graphics/wince/FontWinCE.cpp:
2645         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2646         * platform/graphics/wx/FontWx.cpp:
2647         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
2648         * rendering/EllipsisBox.cpp:
2649         (WebCore::EllipsisBox::paint): Pass a TrailingExpansionBehavior to the TextRun constructor.
2650         (WebCore::EllipsisBox::selectionRect): Ditto.
2651         (WebCore::EllipsisBox::paintSelection): Ditto.
2652         * rendering/InlineBox.h:
2653         (WebCore::InlineBox::InlineBox): Renamed m_toAdd to m_expansion.
2654         (WebCore::InlineBox::expansion): Renamed toAdd() to this.
2655         * rendering/InlineTextBox.cpp:
2656         (WebCore::InlineTextBox::selectionRect): Pass a TrailingExpansionBehavior to the TextRun constructor.
2657         (WebCore::InlineTextBox::paint): Ditto.
2658         (WebCore::InlineTextBox::paintSelection): Ditto.
2659         (WebCore::InlineTextBox::paintCompositionBackground): Ditto.
2660         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
2661         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
2662         (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
2663         (WebCore::InlineTextBox::offsetForPosition): Ditto.
2664         (WebCore::InlineTextBox::positionForOffset): Ditto.
2665         * rendering/InlineTextBox.h:
2666         (WebCore::InlineTextBox::setExpansion): Renamed setSpaceAdd() to this.
2667         (WebCore::InlineTextBox::trailingExpansionBehavior): Added. Trailing expansion is allowed if this
2668         is not the last leaf box on the line.
2669         * rendering/RenderBlockLineLayout.cpp:
2670         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Keep expansion opportunity counts
2671         in a vector instead of computing them twice. Discard the trailing expansion opportunity in the
2672         last text box.
2673         * rendering/RenderFileUploadControl.cpp:
2674         (WebCore::RenderFileUploadControl::paintObject): Pass a TrailingExpansionBehavior to the TextRun constructor.
2675         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths): Ditto.
2676         * rendering/RenderListBox.cpp:
2677         (WebCore::RenderListBox::updateFromElement): Ditto.
2678         (WebCore::RenderListBox::paintItemForeground): Ditto. Also corrected the type of the second parameter.
2679         * rendering/RenderTextControl.cpp:
2680         (WebCore::RenderTextControl::getAvgCharWidth): Ditto.
2681         (WebCore::RenderTextControl::paintPlaceholder): Ditto.
2682         * rendering/svg/SVGInlineTextBox.cpp:
2683         (WebCore::SVGInlineTextBox::constructTextRun): Ditto.
2684
2685 2011-01-26  Andy Estes  <aestes@apple.com>
2686
2687         Rubber-stamped by Darin Adler.
2688
2689         Inline HTMLObjectElement::hasValidClassId().
2690
2691         * html/HTMLObjectElement.cpp:
2692         (WebCore::HTMLObjectElement::hasValidClassId):
2693
2694 2011-01-26  Evan Martin  <evan@chromium.org>
2695
2696         Reviewed by Tony Chang.
2697
2698         [chromium] crash on getBoundingClientRect in complex text
2699         https://bugs.webkit.org/show_bug.cgi?id=53199
2700
2701         Use the correct array bound; we want the number of characters processed by
2702         the shaper, not the longest continuous script run length.
2703
2704         Test: platform/chromium-linux/fast/text/international/complex-text-rectangle.html
2705
2706         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
2707         (WebCore::ComplexTextController::nextScriptRun):
2708         * platform/graphics/chromium/ComplexTextControllerLinux.h:
2709         (WebCore::ComplexTextController::numCodePoints):
2710
2711 2011-01-26  Emil A Eklund  <eae@chromium.org>
2712
2713         Reviewed by Alexey Proskuryakov.
2714
2715         Remove cached document reference from CSSStyleSheet and XSLStyleSheet.
2716         https://bugs.webkit.org/show_bug.cgi?id=52084
2717
2718         Test: fast/dom/css-delete-doc.html
2719
2720         * css/CSSMediaRule.cpp:
2721         (WebCore::CSSMediaRule::insertRule):
2722         (WebCore::CSSMediaRule::deleteRule):
2723         * css/CSSStyleSheet.cpp:
2724         (WebCore::CSSStyleSheet::CSSStyleSheet):
2725         (WebCore::CSSStyleSheet::document):
2726         * css/CSSStyleSheet.h:
2727         * xml/XSLStyleSheet.h:
2728         (WebCore::XSLStyleSheet::parentStyleSheet):
2729         * xml/XSLStyleSheetLibxslt.cpp:
2730         (WebCore::XSLStyleSheet::XSLStyleSheet):
2731         (WebCore::XSLStyleSheet::cachedResourceLoader):
2732         (WebCore::XSLStyleSheet::setParentStyleSheet):
2733         (WebCore::XSLStyleSheet::ownerDocument):
2734         * xml/XSLStyleSheetQt.cpp:
2735         (WebCore::XSLStyleSheet::XSLStyleSheet):
2736         (WebCore::XSLStyleSheet::cachedResourceLoader):
2737         (WebCore::XSLStyleSheet::ownerDocument):
2738
2739 2011-01-25  Dimitri Glazkov  <dglazkov@chromium.org>
2740
2741         Reviewed by Kent Tamura.
2742
2743         Reduce ref-count churn in shadowPseudoId.
2744         https://bugs.webkit.org/show_bug.cgi?id=53136
2745
2746         Refactoring, so no new tests.
2747
2748         * dom/Element.h:
2749         (WebCore::Element::shadowPseudoId): Changed signature to use const AtomicString&
2750         * html/ValidationMessage.cpp:
2751         (WebCore::ElementWithPseudoId::shadowPseudoId): Ditto.
2752         * html/shadow/SliderThumbElement.cpp:
2753         (WebCore::SliderThumbElement::shadowPseudoId): Ditto, plus moved from the header file.
2754         * html/shadow/SliderThumbElement.h: Ditto.
2755         * rendering/MediaControlElements.cpp:
2756         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Ditto.
2757         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Ditto.
2758         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Ditto.
2759         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Ditto.
2760         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Ditto.
2761         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Ditto.
2762         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Ditto.
2763         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Ditto.
2764         (WebCore::MediaControlTimelineElement::shadowPseudoId): Ditto.
2765         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Ditto.
2766         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Ditto.
2767         * rendering/MediaControlElements.h: Ditto.
2768
2769 2011-01-26  Dave Hyatt  <hyatt@apple.com>
2770
2771         Reviewed by Dan Bernstein.
2772
2773         https://bugs.webkit.org/show_bug.cgi?id=46421, make multi-column layout work with vertical text.
2774
2775         Added new tests in fast/multicol/vertical-lr and fast/multicol/vertical-rl.
2776
2777         * css/html.css:
2778         Update p, blockquote and h1-h6 to respect directionality so that column layout tests that use those
2779         elements work properly.
2780
2781         * rendering/InlineFlowBox.cpp:
2782         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2783         Fix a flipping bug with the computation of lineTopIncludingMargins where it could be incorrectly shrunk
2784         in some cases (causing lines to all stack on top of one another).
2785
2786         * rendering/InlineTextBox.h:
2787         (WebCore::InlineTextBox::calculateBoundaries):
2788         Fix calculateBoundaries to be physical rather than logical.
2789
2790         * rendering/LayoutState.cpp:
2791         (WebCore::LayoutState::addForcedColumnBreak):
2792         * rendering/LayoutState.h:
2793         Rename childY to childLogicalOffset.
2794
2795         * rendering/RenderBlock.cpp:
2796         (WebCore::RenderBlock::layoutBlock):
2797         (WebCore::RenderBlock::addOverflowFromChildren):
2798         (WebCore::RenderBlock::addOverflowFromFloats):
2799         (WebCore::RenderBlock::collapseMargins):
2800         (WebCore::RenderBlock::estimateLogicalTopPosition):
2801         (WebCore::RenderBlock::layoutBlockChild):
2802         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
2803         (WebCore::RenderBlock::paintColumnRules):
2804         (WebCore::RenderBlock::paintColumnContents):
2805         (WebCore::RenderBlock::paintFloats):
2806         (WebCore::RenderBlock::selectionGaps):
2807         (WebCore::RenderBlock::removeFloatingObjectsBelow):
2808         (WebCore::RenderBlock::addOverhangingFloats):
2809         (WebCore::RenderBlock::hitTestFloats):
2810         (WebCore::RenderBlock::hitTestColumns):
2811         (WebCore::RenderBlock::calcColumnWidth):
2812         (WebCore::RenderBlock::desiredColumnWidth):
2813         (WebCore::RenderBlock::columnRectAt):
2814         (WebCore::RenderBlock::layoutColumns):
2815         (WebCore::RenderBlock::adjustPointToColumnContents):
2816         (WebCore::RenderBlock::adjustRectForColumns):
2817         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
2818         (WebCore::RenderBlock::adjustForColumns):
2819         (WebCore::RenderBlock::adjustForBorderFit):
2820         (WebCore::RenderBlock::nextPageLogicalTop):
2821         (WebCore::RenderBlock::applyBeforeBreak):
2822         (WebCore::RenderBlock::applyAfterBreak):
2823         (WebCore::RenderBlock::adjustForUnsplittableChild):
2824         (WebCore::RenderBlock::adjustLinePositionForPagination):
2825         * rendering/RenderBlock.h:
2826         (WebCore::RenderBlock::logicalRightOffsetForContent):
2827         (WebCore::RenderBlock::logicalLeftOffsetForContent):
2828         (WebCore::RenderBlock::leftForFloatIncludingMargin):
2829         (WebCore::RenderBlock::topForFloatIncludingMargin):
2830         * rendering/RenderBlockLineLayout.cpp:
2831         (WebCore::RenderBlock::layoutInlineChildren):
2832         (WebCore::RenderBlock::determineStartPosition):
2833         Reworking of all the RenderBlock column functions to support flipping and vertical modes.
2834
2835         * rendering/RenderBox.cpp:
2836         (WebCore::RenderBox::offsetFromContainer):
2837         (WebCore::RenderBox::flipForWritingModeIncludingColumns):
2838         Patch offsetFromContainer to be aware of flipped block writing modes when dealing with column layouts.
2839
2840         * rendering/RenderBox.h:
2841         (WebCore::RenderBox::clientLogicalBottom):
2842         Fix a bug in clientLogicalBottom where it didn't add in the right border/padding.
2843         
2844         * rendering/RenderFlexibleBox.cpp:
2845         (WebCore::RenderFlexibleBox::layoutBlock):
2846         Better terminology for pagination.
2847
2848         * rendering/RenderInline.cpp:
2849         (WebCore::RenderInline::offsetFromContainer):
2850         (WebCore::RenderInline::mapLocalToContainer):
2851         * rendering/RenderLayer.cpp:
2852         (WebCore::RenderLayer::paintChildLayerIntoColumns):
2853         (WebCore::RenderLayer::hitTestChildLayerColumns):
2854         (WebCore::RenderLayer::localBoundingBox):
2855         (WebCore::RenderLayer::boundingBox):
2856         Patch painting in RenderLayers to be vertical-text-aware.
2857     
2858         * rendering/RenderObject.cpp:
2859         (WebCore::RenderObject::mapLocalToContainer):
2860         Add code to be flipped block-aware with columns.
2861
2862         * rendering/RenderTable.cpp:
2863         (WebCore::RenderTable::layout):
2864         * rendering/RenderTableRow.cpp:
2865         (WebCore::RenderTableRow::layout):
2866         * rendering/RenderTableSection.cpp:
2867         (WebCore::RenderTableSection::layoutRows):
2868         Fix pagination to use better terminology.
2869         
2870         * rendering/RenderText.cpp:
2871         (WebCore::RenderText::absoluteQuads):
2872         (WebCore::RenderText::absoluteQuadsForRange):
2873         Fix a bug where vertical text wasn't taken into account.
2874
2875 2011-01-26  Dimitri Glazkov  <dglazkov@chromium.org>
2876
2877         Unreviewed, rolling out r76719.
2878         http://trac.webkit.org/changeset/76719
2879         https://bugs.webkit.org/show_bug.cgi?id=53122
2880
2881         Broke a bunch of media tests in Chromium/Qt/GTK.
2882
2883 2011-01-26  Tony Chang  <tony@chromium.org>
2884
2885         Reviewed by Ryosuke Niwa.
2886
2887         [gtk] strip NUL characters when copying text/html on GTK+
2888         https://bugs.webkit.org/show_bug.cgi?id=52508
2889
2890         Putting NUL characters in the text/html clipboard doesn't work in
2891         WebKit GTK+ (the pasted value is truncated at the NUL).  Since we're
2892         already stripping this character for plain text (for Windows), strip
2893         it in text/html too.
2894
2895         * editing/MarkupAccumulator.h: mark function as virtual
2896         * editing/markup.cpp:
2897         (WebCore::StyledMarkupAccumulator::appendString):
2898         (WebCore::StyledMarkupAccumulator::takeResults): strip nulls
2899
2900 2011-01-26  Mario Sanchez Prada  <msanchez@igalia.com>
2901
2902         Reviewed by Martin Robinson.
2903
2904         [GTK] Reliable crash with getTextAtOffset()
2905         https://bugs.webkit.org/show_bug.cgi?id=53131
2906
2907         Properly calculate length in bytes for a UTF8 substring.
2908
2909         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2910         (utf8Substr): Use character instead of bytes as units to
2911         calculate the length in bytes for the UTF8 string.
2912
2913 2011-01-25  Dimitri Glazkov  <dglazkov@chromium.org>
2914
2915         Reviewed by Kent Tamura.
2916
2917         Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
2918         https://bugs.webkit.org/show_bug.cgi?id=53122
2919
2920         This is the first step in converting HTMLMediaElement to the new shadow DOM.
2921
2922         Should not regress any existing tests. No observable change in behavior.
2923
2924         * css/CSSSelector.cpp:
2925         (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
2926         (WebCore::nameToPseudoTypeMap): Ditto.
2927         (WebCore::CSSSelector::extractPseudoType): Ditto.
2928         * css/CSSSelector.h: Ditto.
2929         * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
2930         * rendering/MediaControlElements.cpp:
2931         (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
2932             which is now replaced with virtual shadowPseudoId on each corresponding class.
2933         (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
2934         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
2935             display type in constructor.
2936         (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
2937             constructor argument.
2938         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
2939         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
2940             to disambiguate from the MediaControlMuteButtonElement.
2941         (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
2942         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
2943         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
2944             constructor argument.
2945         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
2946         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
2947             constructor argument.
2948         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
2949         (WebCore::MediaControlSeekForwardButtonElement::create): Added.
2950         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
2951         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
2952         (WebCore::MediaControlSeekBackButtonElement::create): Added.
2953         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
2954         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
2955         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
2956         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
2957             constructor argument.
2958         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
2959         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
2960             constructor argument.
2961         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
2962         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
2963             constructor argument.
2964         (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
2965         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
2966             constructor argument.
2967         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
2968         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
2969             constructor argument.
2970         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
2971         * rendering/MediaControlElements.h:
2972         (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
2973         (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.
2974         * rendering/RenderMedia.cpp:
2975         (WebCore::RenderMedia::createMuteButton): Changed to use new constructor.
2976         (WebCore::RenderMedia::createSeekBackButton): Ditto.
2977         (WebCore::RenderMedia::createSeekForwardButton): Ditto.
2978         (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto.
2979         * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used.
2980
2981 2011-01-26  Kenneth Russell  <kbr@google.com>
2982
2983         Reviewed by James Robinson.
2984
2985         Fix multisampling support in DrawingBuffer
2986         https://bugs.webkit.org/show_bug.cgi?id=53154
2987
2988         In DrawingBuffer's multisampling code path, fixed enum usage and a
2989         bug where it would incorrectly redefine the depth and stencil
2990         buffers. Hooked up multisampling code path in Chromium port.
2991
2992         Tested manually with some accelerated 2D canvas content.
2993         Multisampling isn't being switched on for the accelerated 2D
2994         canvas at the current time because it will increase fill rate
2995         requirements and cause a large number of rebaselines.
2996
2997         * platform/graphics/Extensions3D.h:
2998         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2999         (WebCore::DrawingBuffer::publishToPlatformLayer):
3000         * platform/graphics/chromium/Extensions3DChromium.h:
3001         * platform/graphics/gpu/DrawingBuffer.cpp:
3002         (WebCore::DrawingBuffer::create):
3003         (WebCore::DrawingBuffer::reset):
3004         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3005         (WebCore::Extensions3DOpenGL::supports):
3006
3007 2011-01-26  Tony Chang  <tony@chromium.org>
3008
3009         Unreviewed.
3010
3011         [chromium] revert r68310 because of race conditions detected by tsans
3012         https://bugs.webkit.org/show_bug.cgi?id=53185
3013
3014         Causes stability problems for Chromium, http://crbug.com/70589
3015
3016         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
3017         (WebCore::SQLiteFileSystem::registerSQLiteVFS):
3018
3019 2011-01-26  Justin Schuh  <jschuh@chromium.org>
3020
3021         Reviewed by Adam Barth.
3022
3023         Make fireEventsAndUpdateStyle use stack local vectors. 
3024         https://bugs.webkit.org/show_bug.cgi?id=46760
3025
3026         Test: animations/animation-add-events-in-handler.html
3027
3028         * page/animation/AnimationController.cpp:
3029         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
3030
3031 2011-01-26  Nate Chapin  <japhet@chromium.org>
3032
3033         Reviewed by Adam Barth.
3034
3035         Remove m_URL from FrameLoader and depend on Document::url()
3036         instead. FrameLoader::url() will be removed in a followup patch.
3037         https://bugs.webkit.org/show_bug.cgi?id=41165
3038
3039         Refactor only, no new tests.
3040
3041         * WebCore.exp.in:
3042         * dom/Document.cpp:
3043         (WebCore::Document::Document):
3044         (WebCore::Document::updateURLForPushOrReplaceState):
3045         * loader/DocumentWriter.cpp:
3046         (WebCore::DocumentWriter::begin):
3047         * loader/FrameLoader.cpp:
3048         (WebCore::FrameLoader::iconURL):
3049         (WebCore::FrameLoader::didOpenURL):
3050         (WebCore::FrameLoader::didExplicitOpen):
3051         (WebCore::FrameLoader::receivedFirstData):
3052         (WebCore::FrameLoader::url):
3053         (WebCore::FrameLoader::setOutgoingReferrer):
3054         (WebCore::FrameLoader::startIconLoader):
3055         (WebCore::FrameLoader::commitIconURLToIconDatabase):
3056         (WebCore::FrameLoader::finishedParsing):
3057         (WebCore::FrameLoader::checkIfDisplayInsecureContent):
3058         (WebCore::FrameLoader::checkIfRunInsecureContent):
3059         (WebCore::FrameLoader::updateFirstPartyForCookies):
3060         (WebCore::FrameLoader::loadInSameDocument):
3061         (WebCore::FrameLoader::commitProvisionalLoad):
3062         (WebCore::FrameLoader::open):
3063         (WebCore::FrameLoader::shouldScrollToAnchor):
3064         * loader/FrameLoader.h: Rename setURL() to setOutgoingReferrer().
3065
3066 2011-01-25  Brian Weinstein  <bweinstein@apple.com>
3067
3068         Reviewed by Antti Koivisto.
3069
3070         Crashes loading pages when cancelling subresource loads through WebKit
3071         https://bugs.webkit.org/show_bug.cgi?id=53123
3072         <rdar://problem/8914361>
3073         
3074         Fix a crash that happened when cancelling subresource loads through WebKit.
3075         
3076         When a load is cancelled synchronously (via the WebKit client), CachedResourceLoader::requestResource 
3077         can be called recursively on the same function, either leading to infinite recursion, or deleting 
3078         an object when it is not done being used.
3079         
3080         The fix for this was to call checkForPendingPreloads and servePendingRequests asynchronously when 
3081         CachedResourceLoader::loadDone was called synchronously (due to the load being cancelled synchronously).
3082
3083         Test: fast/loader/willSendRequest-null-for-preload.html
3084
3085         * loader/DocumentLoader.cpp:
3086         (WebCore::DocumentLoader::setRequest): Only dispatch didReceiveServerRedirectForProvisionalLoadForFrame 
3087             if our new URL is non-null.
3088         * loader/cache/CachedResourceLoader.cpp:
3089         (WebCore::CachedResourceLoader::CachedResourceLoader): Initialize our timer.
3090         (WebCore::CachedResourceLoader::loadDone): If the CachedResource we were passed in was 0, that means this 
3091             function was called synchronously
3092             from CachedResourceRequest::load, and we don't want to call into checkForPendingPreloads synchronously, 
3093             so put it on a 0-delay timer to make the calls to checkForPendingPreloads and servePendingRequests asynchronous.
3094         (WebCore::CachedResourceLoader::loadDonePendingActionTimerFired): Call checkForPendingPreloads and servePendingRequests.
3095         (WebCore::CachedResourceLoader::checkForPendingPreloads): m_pendingPreloads is now a Deque instead of a Vector, 
3096             so use Deque methods.
3097         * loader/cache/CachedResourceLoader.h: Add the timer, the timer callback function, and make m_pendingPreloads a Deque.
3098
3099 2011-01-25  Pavel Podivilov  <podivilov@chromium.org>
3100
3101         Reviewed by Pavel Feldman.
3102
3103         Web Inspector: evaluate in console may not work when window.console is substituted or deleted.
3104         https://bugs.webkit.org/show_bug.cgi?id=53072
3105
3106         Test: inspector/console-substituted.html
3107
3108         * inspector/InjectedScriptSource.js:
3109         (.):
3110
3111 2011-01-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3112
3113         Reviewed by Martin Robinson.
3114
3115         [cairo] Use CAIRO_OPERATOR_DARKEN when available
3116         https://bugs.webkit.org/show_bug.cgi?id=53084
3117
3118         Use CAIRO_OPERATOR_DARKEN for CompositePlusDarker instead of
3119         CAIRO_OPERATOR_SATURATE when building with cairo version >= 1.10.
3120
3121         * platform/graphics/cairo/CairoUtilities.cpp:
3122         (WebCore::toCairoOperator):
3123
3124 2011-01-26  Pavel Feldman  <pfeldman@chromium.org>
3125
3126         Reviewed by Yury Semikhatsky.
3127
3128         Web Inspector: visualize \n in strings as unicode cr
3129         symbol in stack variables sidebar.
3130         https://bugs.webkit.org/show_bug.cgi?id=53162
3131
3132         * inspector/front-end/ObjectPropertiesSection.js:
3133         (WebInspector.ObjectPropertyTreeElement.prototype.update):
3134
3135 2011-01-26  Andrey Kosyakov  <caseq@chromium.org>
3136
3137         Reviewed by Pavel Feldman.
3138
3139         Web Inspector: size is wrong for cached resources in Network panel
3140         - Set the size for 304/not modified resources from cached resource.
3141         - Add response headers size to resource transfer size.
3142         https://bugs.webkit.org/show_bug.cgi?id=52886
3143
3144         * inspector/InspectorResourceAgent.cpp:
3145         (WebCore::InspectorResourceAgent::didReceiveResponse):
3146         * inspector/front-end/Resource.js:
3147         (WebInspector.Resource):
3148         (WebInspector.Resource.prototype.get transferSize):
3149         (WebInspector.Resource.prototype.set responseHeaders):
3150         (WebInspector.Resource.prototype._headersSize):
3151         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
3152
3153 2011-01-26  Carol Szabo  <carol.szabo@nokia.com>
3154
3155         Reviewed by Simon Hausmann.
3156
3157         Fixed TiledBacking store to take into account new dirty regions caused by
3158         paint time layouts.
3159
3160         Flawed rendering design for QtWebKit resulting in artifacts being displayed
3161         https://bugs.webkit.org/show_bug.cgi?id=49184
3162
3163         There are no new tests as this patch aims at fixing flicker that
3164         happen randomly, mostly on slow hardware, thus are hard to reproduce
3165         consistently in an automated test.
3166
3167         This patch does not fully address the said bug but it is a step in the
3168         right direction. A full solution to the bug, as currently perceived,
3169         requires either a Qt GUI API change, a performance hit for QtWebKit,
3170         or a hack, until a full solution is provided this patch is progress.
3171
3172         * platform/graphics/TiledBackingStore.cpp:
3173         (WebCore::TiledBackingStore::updateTileBuffers):
3174         Changed to take into account newly dirtied areas created during
3175         tile update initiated layouts during the same update.
3176
3177 2011-01-26  Patrick Gansterer  <paroga@webkit.org>
3178
3179         Reviewed by Andreas Kling.
3180
3181         [SKIA] Remove "current path" of GraphicsContext
3182         https://bugs.webkit.org/show_bug.cgi?id=53124
3183
3184         * platform/graphics/GraphicsContext.h:
3185         * platform/graphics/skia/GraphicsContextSkia.cpp:
3186         (WebCore::GraphicsContext::clipPath):
3187         (WebCore::GraphicsContext::fillPath):
3188         (WebCore::GraphicsContext::strokePath):
3189         * platform/graphics/skia/PathSkia.cpp:
3190         (WebCore::Path::strokeBoundingRect):
3191         * platform/graphics/skia/PlatformContextSkia.cpp:
3192         * platform/graphics/skia/PlatformContextSkia.h:
3193
3194 2011-01-26  Zalan Bujtas <zbujtas@gmail.com>
3195
3196         Reviewed by Andreas Kling.
3197
3198         [Qt] Path::normalAngleAtLength() returns incorrect value on ACID3.
3199
3200         QPainterPath returns angle values with the origo being at the top left corner,
3201         we need to account for this in normalAngleAtLength().
3202         This Regressed with r66979.
3203
3204         No new tests as this is already covered by ACID3.
3205
3206         * platform/graphics/qt/PathQt.cpp:
3207         (WebCore::Path::normalAngleAtLength):
3208
3209 2011-01-26  Pavel Feldman  <pfeldman@chromium.org>
3210
3211         Reviewed by Yury Semikhatsky.
3212
3213         Web Inspector: live edit does not update source snippet.
3214         https://bugs.webkit.org/show_bug.cgi?id=53097
3215
3216         * inspector/front-end/ScriptsPanel.js:
3217         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
3218
3219 2011-01-26  Pavel Feldman  <pfeldman@chromium.org>
3220
3221         Reviewed by Yury Semikhatsky.
3222
3223         Web Inspector: Incorrect on-hover evaluation of a variable named 'profile'.
3224         https://bugs.webkit.org/show_bug.cgi?id=53018
3225
3226         * inspector/InjectedScript.cpp:
3227         (WebCore::InjectedScript::evaluate):
3228         (WebCore::InjectedScript::evaluateOnCallFrame):
3229         (WebCore::InjectedScript::getCompletions):
3230         (WebCore::InjectedScript::getCompletionsOnCallFrame):
3231         * inspector/InjectedScript.h:
3232         * inspector/InjectedScriptSource.js:
3233         (.):
3234         * inspector/Inspector.idl:
3235         * inspector/InspectorDebuggerAgent.cpp:
3236         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
3237         (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
3238         * inspector/InspectorDebuggerAgent.h:
3239         * inspector/InspectorRuntimeAgent.cpp:
3240         (WebCore::InspectorRuntimeAgent::evaluate):
3241         (WebCore::InspectorRuntimeAgent::getCompletions):
3242         * inspector/InspectorRuntimeAgent.h:
3243         * inspector/front-end/ConsoleView.js:
3244         (WebInspector.ConsoleView.prototype.completions):
3245         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
3246         (WebInspector.ConsoleView.prototype._enterKeyPressed):
3247         * inspector/front-end/ScriptsPanel.js:
3248         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame.updatingCallbackWrapper):
3249         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
3250         * inspector/front-end/SourceFrame.js:
3251         (WebInspector.SourceFrame.prototype._showPopup):
3252         * inspector/front-end/WatchExpressionsSidebarPane.js:
3253         (WebInspector.WatchExpressionsSection.prototype.update):
3254
3255 2011-01-26  Hironori Bono  <hbono@chromium.org>
3256
3257         Reviewed by Kent Tamura.
3258
3259         A speculative fix for Bug 52422 - [chromium] More crash in
3260         FontFallbackList::determinePitch(const Font* font)
3261         https://bugs.webkit.org/show_bug.cgi?id=52422
3262
3263         My previous change may not work on non-US Windows whose system fonts
3264         have localized aliases matching to the system locale because of a
3265         font-name mismatch in createFontIndirectAndGetWinName(). This change
3266         tries all the fonts installed in a PC and returns the first font that we
3267         can create without errors.
3268
3269         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3270         (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData):
3271         Added a struct used for getLastResortFallbackFontProc().
3272         (WebCore::getLastResortFallbackFontProc): Added a callback for EnumFontFamilies().
3273         (WebCore::FontCache::getLastResortFallbackFont): Use EnumFontFamilies() to find a last-resort font.
3274
3275 2011-01-26  James Robinson  <jamesr@chromium.org>
3276
3277         Reviewed by Nate Chapin.
3278
3279         Add a DOMTimeStamp parameter to the requestAnimationFrame callback
3280         https://bugs.webkit.org/show_bug.cgi?id=53142
3281
3282         This adds a DOMTimeStamp parameter to the requestAnimationFrame callback to more
3283         closely match mozilla's proposal.  This is useful if the page has multiple imperative animations
3284         and wants to ensure that they all remain synchronized.  If each callback used Date.now() to
3285         update its animation state, they would potentially be out of sync with each other.  If they use
3286         the timestamp then all callbacks for the same "frame" will update to the same state.
3287
3288         Test: fast/animation/request-animation-frame-timestamps.html
3289
3290         * bindings/scripts/CodeGeneratorV8.pm:
3291         * bindings/scripts/test/V8/V8TestCallback.cpp:
3292         (WebCore::V8TestCallback::callbackWithClass2Param):
3293         * dom/Document.cpp:
3294         (WebCore::Document::serviceScriptedAnimations):
3295         * dom/Document.h:
3296         * dom/RequestAnimationFrameCallback.h:
3297         * dom/RequestAnimationFrameCallback.idl:
3298         * page/FrameView.cpp:
3299         (WebCore::FrameView::serviceScriptedAnimations):
3300         * page/FrameView.h:
3301
3302 2011-01-25  Yuzo Fujishima  <yuzo@google.com>
3303
3304         Unreviewed attempt to fix compilation error for Chromium Clang.
3305
3306         * platform/graphics/mac/ComplexTextController.cpp:
3307         (WebCore::ComplexTextController::advance):
3308
3309 2011-01-25  Ned Holbrook  <nholbrook@apple.com>
3310
3311         Reviewed by Dan Bernstein.
3312
3313         ComplexTextController incorrectly conflates string length and range of indexes
3314         https://bugs.webkit.org/show_bug.cgi?id=52760
3315
3316         Test: fast/text/offsetForPosition-complex-fallback.html
3317
3318         * platform/graphics/mac/ComplexTextController.cpp:
3319         (WebCore::ComplexTextController::offsetForPosition):
3320         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
3321         (WebCore::ComplexTextController::ComplexTextRun::setIsNonMonotonic):
3322         (WebCore::ComplexTextController::advance):
3323         * platform/graphics/mac/ComplexTextController.h:
3324         (WebCore::ComplexTextController::ComplexTextRun::create):
3325         (WebCore::ComplexTextController::ComplexTextRun::indexEnd):
3326         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
3327         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
3328         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
3329         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
3330         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
3331
3332 2011-01-25  Sam Weinig  <sam@webkit.org>
3333
3334         Reviewed by David Hyatt.
3335
3336         Scrollbars don't work correctly for top-to-bottom text in an overflow: scroll area
3337         https://bugs.webkit.org/show_bug.cgi?id=53048
3338
3339         Test: fast/overflow/overflow-rtl-vertical-origin.html
3340
3341         * rendering/RenderLayer.cpp:
3342         (WebCore::RenderLayer::scrollPosition):
3343         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
3344         Take the scroll origin into account when calculating scrollbars in more places.
3345
3346 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
3347
3348         Windows production build fix.
3349         Use correct configuration-specific path in makefile.
3350
3351         * WebCore.vcproj/WebCore.make:
3352
3353 2011-01-25  Kent Tamura  <tkent@chromium.org>
3354
3355         Reviewed by Dimitri Glazkov.
3356
3357         Radio button group state is not restored correctly
3358         https://bugs.webkit.org/show_bug.cgi?id=50442
3359
3360         Fixes a bug that radio button states are not restored correctly in
3361         a case that non-first radio button in a group is checked.
3362
3363         If "checked" attribute is present, the radio button is checked and
3364         other radio buttons in the group are unchecked. This behavior
3365         disturbs form state restoring. This patch changes this behavior so
3366         that the "checked" attribute handling is delayed after form state
3367         restoring.
3368
3369         Test: fast/forms/state-restore-radio-group.html
3370
3371         * html/HTMLFormControlElement.h:
3372          Make finishParsingChildren() protected so that HTMLInpuElement can call it.
3373         * html/HTMLInputElement.cpp:
3374         (WebCore::HTMLInputElement::HTMLInputElement):
3375          - Add createdByParser parameter.
3376          - Initialize m_stateRestored and m_parsingInProgress.
3377         (WebCore::HTMLInputElement::create): Sync with the constructor.
3378         (WebCore::HTMLInputElement::restoreFormControlState):
3379          Set m_stateRestored in order to refer it in finishParsingChildren().
3380         (WebCore::HTMLInputElement::parseMappedAttribute):
3381          Don't call setChecked() during parsing. Move setNeedsValidityCheck()
3382          to setChecked().
3383         (WebCore::HTMLInputElement::finishParsingChildren):
3384          Call setChecked() if form state is not restored.
3385         (WebCore::HTMLInputElement::setChecked):
3386          Move setNeedsValidityCheck() from parseMappedAttribute() because
3387          finishParsingChildren() also needs to call setNeedsValidityCheck().
3388         * html/HTMLInputElement.h:
3389          - Remove the default value of HTMLFormElement* of the HTMLInputElement
3390            constructor, and add createdByParser parameter.
3391          - Introduce m_parsingInProgress and m_stateRestored.
3392         * html/HTMLIsIndexElement.cpp:
3393         (WebCore::HTMLIsIndexElement::HTMLIsIndexElement):
3394          Sync with the HTMLInputElement constructor change.
3395         * html/HTMLTagNames.in: Add constructorNeedsCreatedByParser flag.
3396         * rendering/MediaControlElements.cpp:
3397         (WebCore::MediaControlInputElement::MediaControlInputElement):
3398          Sync with the HTMLInputElement constructor change.
3399         * rendering/ShadowElement.cpp:
3400         (WebCore::ShadowInputElement::ShadowInputElement): ditto.
3401         * rendering/ShadowElement.h:
3402         (WebCore::ShadowElement::ShadowElement): ditto.
3403
3404 2011-01-25  Kent Tamura  <tkent@chromium.org>
3405
3406         Reviewed by Dimitri Glazkov.
3407
3408         HTMLFormElement::checkValidity() returns incorrect result if 'invalid' events are canceled.
3409         https://bugs.webkit.org/show_bug.cgi?id=52565
3410
3411         * html/HTMLFormElement.cpp:
3412         (WebCore::HTMLFormElement::validateInteractively):
3413           Check checkInvalidControlsAndCollectUnhandled() result instead of
3414           checking emptiness of unhandled invalid controls list.
3415         (WebCore::HTMLFormElement::checkValidity): ditto.
3416         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
3417           Renamed from collectUnhandledInvalidControls().
3418           Returns true if there is any invalid control regardless of event canceling.
3419         * html/HTMLFormElement.h: Rename collectUnhandledInvalidControls() to
3420           checkInvalidControlsAndCollectUnhandled().
3421
3422 2011-01-25  Kent Tamura  <tkent@chromium.org>
3423
3424         Reviewed by Dimitri Glazkov.
3425
3426         Range and number inputs should reject increment and decrement by
3427         keyboard or mouse wheel if they are disabled or read-only
3428         https://bugs.webkit.org/show_bug.cgi?id=53151
3429
3430         * html/RangeInputType.cpp:
3431         (WebCore::RangeInputType::handleKeydownEvent): Check disabled() and readOnly().
3432         * html/TextFieldInputType.cpp:
3433         (WebCore::TextFieldInputType::handleKeydownEventForSpinButton): ditto.
3434         (WebCore::TextFieldInputType::handleWheelEventForSpinButton): ditto.
3435
3436 2011-01-25  Kent Tamura  <tkent@chromium.org>
3437
3438         Reviewed by Dimitri Glazkov.
3439
3440         API to support localized numbers for <input type=number>
3441         https://bugs.webkit.org/show_bug.cgi?id=45730
3442
3443         Introduce platform/text/LocalizedNumber.h, and
3444         LocalizedNumberNone.cpp, which is an empty implementation of the
3445         functions in LocalizedNumber.h.  We use LocalizedNumberNone.cpp in
3446         all platforms for now.
3447
3448         A string in a type=number field is parsed as a localized number