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