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