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