Shard html5lib/runner.html into many separate tests
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-12-21  Darin Adler  <darin@apple.com>
2
3         Make ~CSSParserSelector use Vector<OwnPtr>
4         https://bugs.webkit.org/show_bug.cgi?id=73782
5
6         Reviewed by Alexey Proskuryakov.
7
8         * css/CSSParserValues.cpp:
9         (WebCore::CSSParserSelector::~CSSParserSelector): Use Vector<OwnPtr>
10         so we don't have to call leakPtr or deleteAllValues.
11
12 2011-12-21  Yosifumi Inoue  <yosin@chromium.org>
13
14         [Forms] Selection change by type-ahead doesn't fire 'change' event
15         https://bugs.webkit.org/show_bug.cgi?id=74590
16
17         Reviewed by Kent Tamura.
18
19         This patch changes when onchange event fired in select element for:
20         1 Fire onchange event for type ahead selection.
21         2 Don't fire onchange event for Enter key. We've already fired onchange event for cursor key
22           and type ahead selection. So, onchange for Enter key is redundant. This behavior is 
23           compatible to IE(9.0.8112.16421) and Opera(9.80) on Windows. FF(8.01) doesn't fire onchange
24           by cursor key selection change and type ahead. FF requires Enter key press to fire onchange
25           event.
26
27         Test: fast/forms/select/menulist-type-ahead-find.html
28
29         * html/HTMLSelectElement.cpp:
30         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Don't fire onchange event for Entry key.
31         (WebCore::HTMLSelectElement::typeAheadFind): Add DispatchChangeEvent when
32         calling selectOption method.
33
34 2011-12-21  Darin Adler  <darin@apple.com>
35
36         Tweak and comment some transform-related code
37         https://bugs.webkit.org/show_bug.cgi?id=68670
38
39         Reviewed by Daniel Bates.
40
41         * platform/mac/ScrollbarThemeMac.mm:
42         (WebCore::ScrollbarThemeMac::paint): Added a FIXME about additional overhead paid here
43         when the scale factor is 2x.
44         * rendering/RenderBoxModelObject.cpp:
45         (WebCore::RenderBoxModelObject::paintBoxShadow): Added a FIXME about this check possibly
46         being wrong, and also changed the local vairable name so the check need not stretch over
47         multiple lines.
48
49 2011-12-21  Kent Tamura  <tkent@chromium.org>
50
51         Change the item type of Document::m_formElementsWithState from Element*
52         to HTMLFormControlElementWithState*.
53         https://bugs.webkit.org/show_bug.cgi?id=74998
54
55         Reviewed by Andreas Kling.
56
57         No new tests. Just refactoring.
58
59         * dom/Document.cpp:
60         (WebCore::Document::formElementsState): Use HTMLFormControlElementWithState*.
61         * dom/Document.h:
62         (WebCore::Document::registerFormElementWithState): Change the argument type.
63         (WebCore::Document::unregisterFormElementWithState): ditto.
64         (WebCore::Document::formElements): Renamed from getFormElements().
65         * dom/Element.h:
66         Removed shouldSaveAndRestoreFormControlState(), saveFormControlState(),
67         and restoreFormControlState() because they are not called for Element
68         anymore.
69         * html/HTMLFormControlElement.h:
70         - Make formControlName() and formControlType() public.
71          They are called from Document class.
72         - Make shouldSaveAndRestoreFormControlState() public, and non-virtual.
73          This is called from Document class, and no other classes override this.
74         (WebCore::HTMLFormControlElementWithState::saveFormControlState):
75         Moved from Element.
76         (WebCore::HTMLFormControlElementWithState::restoreFormControlState): ditto.
77         * html/HTMLInputElement.cpp:
78         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
79         Use HTMLFormControlElementWithState* instead of Element*.
80
81 2011-12-21  Alexandre Elias  <aelias@google.com>
82
83         [chromium] Always use border texels on platforms using pageScaleDelta
84         https://bugs.webkit.org/show_bug.cgi?id=74226
85
86         Reviewed by James Robinson.
87
88         On platforms where the root layer can be zoomed in at draw time
89         (pageScaleDelta), we want to turn on border texels in order for
90         scaling to use GL_LINEAR instead of GL_NEAREST.
91
92         No new tests. (Flag flip.)
93
94         * platform/graphics/chromium/TiledLayerChromium.cpp:
95         (WebCore::TiledLayerChromium::prepareToUpdate):
96
97 2011-12-21  Dale Curtis  <dalecurtis@chromium.org>
98
99         [chromium] Scale audio, video tags in MediaDocument to fit in window.
100         https://bugs.webkit.org/show_bug.cgi?id=73948
101
102         Add CSS max-height: 100%, max-width: 100% settings to the audio and
103         video tags when in MediaDocuments.
104
105         Reviewed by Eric Seidel.
106
107         Test: media/video-scales-in-media-document.html
108
109         * css/mediaControlsChromium.css:
110         (audio:-webkit-full-page-media, video:-webkit-full-page-media):
111
112 2011-12-21  Konrad Piascik  <kpiascik@rim.com>
113
114         Implement the JavaScriptCore bindings for eventListenerHandlerLocation
115         https://bugs.webkit.org/show_bug.cgi?id=74313
116
117         Reviewed by Eric Seidel.
118
119         Implemented the JavaScriptCore binding to allow Web Inspector to
120         show the function name and line number for an event listener in
121         the Elements panel.
122
123         Tested by opening up a page which has a registered event listener in Safari
124         and checking if the Elements panel script name and line number are present
125         and clickable.
126
127         * ForwardingHeaders/runtime/Executable.h: Added.
128         * ForwardingHeaders/wtf/SegmentedVector.h: Added.
129         * bindings/js/ScriptEventListener.cpp:
130         (WebCore::eventListenerHandlerLocation):
131
132 2011-12-21  Chris Guan  <chris.guan@torchmobile.com.cn>
133
134         Upstream the Multipart feature in Blackberry port
135         https://bugs.webkit.org/show_bug.cgi?id=73533
136
137         Reviewed by Rob Buis.
138
139         I refactored Multipart code of Blackberry port. Moved Multipart into
140         Blackerry network layer and removed the dependence of std::string.
141
142         Initial upstream, no new test cases.
143
144         * platform/network/blackberry/DeferredData.cpp:
145         (WebCore::DeferredData::deferMultipartHeaderReceived):
146         (WebCore::DeferredData::processHeaders):
147         (WebCore::DeferredData::processDeferredData):
148         * platform/network/blackberry/DeferredData.h:
149         (WebCore::DeferredData::hasDeferredData):
150         * platform/network/blackberry/NetworkJob.cpp:
151         (WebCore::NetworkJob::notifyMultipartHeaderReceived):
152         (WebCore::NetworkJob::handleNotifyMultipartHeaderReceived):
153         (WebCore::NetworkJob::handleNotifyDataReceived):
154         (WebCore::NetworkJob::handleNotifyClose):
155         (WebCore::NetworkJob::startNewJobWithRequest):
156         (WebCore::NetworkJob::sendResponseIfNeeded):
157         (WebCore::NetworkJob::sendMultipartResponseIfNeeded):
158         * platform/network/blackberry/NetworkJob.h:
159
160 2011-12-21  Eric Carlson  <eric.carlson@apple.com>
161
162         Fix text track cue font size and colors
163         https://bugs.webkit.org/show_bug.cgi?id=75051
164
165         Reviewed by Darin Adler.
166
167         No new tests, updated media/track/track-cue-rendering.html for the changes.
168
169         * css/mediaControls.css:
170         (video::-webkit-media-text-track-container): Match WebVTT spec.
171         (video::-webkit-media-text-track-display): Ditto.
172
173         * html/shadow/MediaControlElements.cpp:
174         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Change font size from  4% of the
175             video height to 5% as per the spec. Don't enforce a minimum size.
176
177 2011-12-21  Andreas Kling  <kling@webkit.org>
178
179         Unreviewed, rolling out r103473.
180         http://trac.webkit.org/changeset/103473
181         https://bugs.webkit.org/show_bug.cgi?id=74991
182
183         Overestimated my superpowers a bit here.
184
185         * dom/Element.cpp:
186         (WebCore::Element::attributeChanged):
187         (WebCore::Element::insertedIntoDocument):
188         (WebCore::Element::removedFromDocument):
189         * dom/Element.h:
190         (WebCore::Element::updateId):
191         (WebCore::Element::willModifyAttribute):
192         * dom/NamedNodeMap.cpp:
193         (WebCore::NamedNodeMap::setAttributes):
194         * dom/Node.h:
195         * html/HTMLAppletElement.cpp:
196         (WebCore::HTMLAppletElement::parseMappedAttribute):
197         (WebCore::HTMLAppletElement::insertedIntoDocument):
198         (WebCore::HTMLAppletElement::removedFromDocument):
199         * html/HTMLAppletElement.h:
200         * html/HTMLEmbedElement.cpp:
201         (WebCore::HTMLEmbedElement::parseMappedAttribute):
202         (WebCore::HTMLEmbedElement::insertedIntoDocument):
203         (WebCore::HTMLEmbedElement::removedFromDocument):
204         * html/HTMLEmbedElement.h:
205         * html/HTMLFormElement.cpp:
206         (WebCore::HTMLFormElement::insertedIntoDocument):
207         (WebCore::HTMLFormElement::removedFromDocument):
208         (WebCore::HTMLFormElement::parseMappedAttribute):
209         * html/HTMLFormElement.h:
210         * html/HTMLImageElement.cpp:
211         (WebCore::HTMLImageElement::parseMappedAttribute):
212         (WebCore::HTMLImageElement::insertedIntoDocument):
213         (WebCore::HTMLImageElement::removedFromDocument):
214         * html/HTMLImageElement.h:
215         * html/HTMLObjectElement.cpp:
216         (WebCore::HTMLObjectElement::parseMappedAttribute):
217         (WebCore::HTMLObjectElement::insertedIntoDocument):
218         (WebCore::HTMLObjectElement::removedFromDocument):
219         (WebCore::HTMLObjectElement::updateDocNamedItem):
220         (WebCore::HTMLObjectElement::formControlName):
221         * html/HTMLObjectElement.h:
222         * html/HTMLPlugInElement.h:
223
224 2011-12-21  Simon Fraser  <simon.fraser@apple.com>
225
226         Clean up RenderLayer code that applies filters and transforms
227         https://bugs.webkit.org/show_bug.cgi?id=75032
228         
229         This also fixes:
230             Nested filters not working as expected
231             https://bugs.webkit.org/show_bug.cgi?id=75029
232             
233             Filter region is computed incorrectly
234             https://bugs.webkit.org/show_bug.cgi?id=74889
235
236         Reviewed by James Robinson.
237
238         RenderLayer::paintLayer() had this confusing behavior where,
239         for transforms, it would change the CTM and then re-enter
240         the method with a bit set. This was partially, but incorrectly
241         copied for filters, so things like nested filters didn't work,
242         and the case of a filter + transform was confused.
243         
244         Clean up by making RenderLayer::paintLayer() be a fairly simple
245         method that handles the re-entering with bit set, for both
246         transforms and filters. The bulk of the code in RenderLayer::paintLayer()
247         is now in RenderLayer::paintLayerContents(). There is no
248         behavior change for transforms.
249         
250         There are two fixes for filters. First, instead of just using
251         the layer size to compute the bounds of the filtered region,
252         use transparencyClipBox() which already takes descendents, box
253         decorations etc into account (it's what we use for opacity).
254         Some cleanup of the coordinate math, and separation from transforms
255         code was also achieved.
256         
257         Second, make sure we toggle off the PaintLayerAppliedFilters bit
258         (which was renamed for clarity) for sublayers, so that sublayers
259         paint their filters correctly.
260
261         Tests: css3/filters/filter-region.html
262                css3/filters/nested-filters.html
263
264         * rendering/RenderLayer.cpp:
265         (WebCore::RenderLayer::paintLayer):
266         (WebCore::RenderLayer::paintLayerContents):
267         (WebCore::RenderLayer::updateFilterBackingStore):
268         * rendering/RenderLayer.h:
269
270 2011-12-21  Per-Erik Brodin  <per-erik.brodin@ericsson.com>
271
272         Discard event data not followed by an empty line before eof when parsing an event-stream
273         https://bugs.webkit.org/show_bug.cgi?id=68833
274
275         Reviewed by Alexey Proskuryakov.
276
277         Test: http/tests/eventsource/eventsource-eof.html
278
279         * page/EventSource.cpp:
280         (WebCore::EventSource::didFinishLoading):
281         (WebCore::EventSource::parseEventStreamLine):
282         * page/EventSource.h:
283
284 2011-12-21  Andreas Kling  <kling@webkit.org>
285
286         Automate elements' registration as document namedItem/extraNamedItem.
287         <http://webkit.org/b/74991>
288
289         Reviewed by Antti Koivisto.
290
291         Remove caching of the "id" and "name" attributes on applet, embed, form,
292         image and object elements. We were caching them to keep the document's
293         map of named and "extra named" (named by id) item counts in sync.
294
295         Instead, add a hook to Element::willModifyAttribute() that detects when
296         the attributes are being changed and handle the registration/unregistration
297         automatically if the element returns true for shouldRegisterAsNamedItem()
298         or shouldRegisterAsExtraNamedItem() respectively.
299
300         This shrinks the elements by two AtomicStrings (8 or 16 bytes) each.
301
302         IFrame elements retain the old mechanism for now, as there are some subtle
303         differences to how that's handled.
304
305         * dom/Node.h:
306         (WebCore::Node::hasName):
307         (WebCore::Node::setHasName):
308
309             Cache whether we have a "name" attribute or not (1 bit on Node.)
310             This is done in order to minimize the overhead added to Element's
311             insertedIntoDocument() and removeFromDocument().
312
313         * dom/Element.cpp:
314         (WebCore::Element::updateNamedItemRegistration):
315         (WebCore::Element::updateExtraNamedItemRegistration):
316
317             Added. Called when the "name" and "id" attributes are changed.
318             Updates the document's named item maps accordingly.
319
320         (WebCore::Element::insertedIntoDocument):
321         (WebCore::Element::removedFromDocument):
322
323             Make sure updateName() is called in addition to updateId() when applicable.
324
325         (WebCore::Element::attributeChanged):
326
327             Update the Node's has-name flag as appropriate.
328
329         * dom/Element.h:
330         (WebCore::Element::shouldRegisterAsNamedItem):
331         (WebCore::Element::shouldRegisterAsExtraNamedItem):
332
333             Added. If an element returns true for these, it will be automatically
334             registered with the document when the name/id attribute changes.
335
336         (WebCore::Element::updateId):
337         (WebCore::Element::updateName):
338
339             Register/unregister from the document's named item maps as appropriate.
340
341         (WebCore::Element::willModifyAttribute):
342
343             Add updateName() hook in addition to the existing updateId() hook.
344
345         * dom/NamedNodeMap.cpp:
346         (WebCore::NamedNodeMap::setAttributes):
347
348             Make sure updateName() is called when we're cloning the attributes
349             from another element.
350
351         * html/HTMLAppletElement.cpp:
352         (WebCore::HTMLAppletElement::parseMappedAttribute):
353         * html/HTMLAppletElement.h:
354         * html/HTMLEmbedElement.cpp:
355         (WebCore::HTMLEmbedElement::parseMappedAttribute):
356         (WebCore::HTMLEmbedElement::insertedIntoDocument):
357         * html/HTMLEmbedElement.h:
358         * html/HTMLFormElement.cpp:
359         (WebCore::HTMLFormElement::insertedIntoDocument):
360         (WebCore::HTMLFormElement::removedFromDocument):
361         (WebCore::HTMLFormElement::parseMappedAttribute):
362         * html/HTMLFormElement.h:
363         * html/HTMLImageElement.cpp:
364         (WebCore::HTMLImageElement::parseMappedAttribute):
365         (WebCore::HTMLImageElement::insertedIntoDocument):
366         * html/HTMLImageElement.h:
367         * html/HTMLObjectElement.cpp:
368         (WebCore::HTMLObjectElement::parseMappedAttribute):
369         (WebCore::HTMLObjectElement::insertedIntoDocument):
370         (WebCore::HTMLObjectElement::removedFromDocument):
371         * html/HTMLObjectElement.h:
372         * html/HTMLPlugInElement.h:
373
374             Remove duplicated code that is now handled by Element.
375
376         * html/HTMLObjectElement.cpp:
377         (WebCore::HTMLObjectElement::updateDocNamedItem):
378         (WebCore::HTMLObjectElement::formControlName):
379
380             Use fastGetAttribute() since we no longer cache the name.
381
382 2011-12-21  Wyatt Carss  <wcarss@chromium.org>
383
384         Reviewed by Ryosuke Niwa.
385
386         strong and b should be font-weight: bold, not bolder
387         https://bugs.webkit.org/show_bug.cgi?id=56400
388
389         Test: fast/html/font-weight-bold-for-b-and-strong.html
390
391         * css/html.css:
392         (strong, b):
393
394 2011-12-21  Florin Malita  <fmalita@google.com>
395
396         Improper handling of foreignobjects nested in svg groups
397         https://bugs.webkit.org/show_bug.cgi?id=69762
398
399         Reviewed by Nikolas Zimmermann.
400
401         Tests: svg/foreignObject/repaint-rect-coordinates-expected.html
402                svg/foreignObject/repaint-rect-coordinates.html
403
404         * rendering/svg/RenderSVGForeignObject.h:
405         (WebCore::RenderSVGForeignObject::objectBoundingBox):
406         (WebCore::RenderSVGForeignObject::strokeBoundingBox):
407         (WebCore::RenderSVGForeignObject::repaintRectInLocalCoordinates):
408         Return local coordinates.
409
410 2011-12-21  Anders Carlsson  <andersca@apple.com>
411
412         Make it possible to use contents layers in scrollbars
413         https://bugs.webkit.org/show_bug.cgi?id=75044
414
415         Reviewed by Simon Fraser.
416
417         * page/ScrollingCoordinator.h:
418         * page/mac/ScrollingCoordinatorMac.mm:
419         (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
420         (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
421         Don't pass const GraphicsLayers to these member functions; we need to be able to mutate them.
422
423         * platform/ScrollView.cpp:
424         (positionScrollbarLayer):
425         If the scrollbar layer has a contents layer, just update its contents rect. Otherwise,
426         invalidate the scrollbar layer.
427
428 2011-12-21  Anders Carlsson  <andersca@apple.com>
429
430         Always reposition the scrollbar layers when the frame view size changes
431         https://bugs.webkit.org/show_bug.cgi?id=75035
432
433         Reviewed by Darin Adler.
434
435         * rendering/RenderLayerCompositor.cpp:
436         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
437         Remove the layersChanged check and unconditionally call positionScrollbarLayers(). This only
438         worked by accident before because we were recreating horizontal and vertical scrollbars on every call.
439
440 2011-12-21  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
441
442         [EFL] Add 'Select All' option to context menus in WebKit-EFL.
443         https://bugs.webkit.org/show_bug.cgi?id=74920
444
445         Reviewed by Eric Seidel.
446
447         Enable 'Select All' option to context menus called on input fields in WebKit-EFL
448         as it is enabled in GTK and QT ports.
449
450         * page/ContextMenuController.cpp:
451         (WebCore::ContextMenuController::contextMenuItemSelected): Add 'Select All' option.
452         (WebCore::ContextMenuController::populate): Append 'Select All' item.
453         (WebCore::ContextMenuController::checkOrEnableIfNeeded): Enable 'Select All' option.
454         * platform/ContextMenuItem.h: Add 'Select All' option.
455         * platform/LocalizationStrategy.h: Add constructor for 'Select All' option.
456         * platform/LocalizedStrings.h: Add constructor for 'Select All' option.
457
458 2011-12-20  Adam Klein  <adamk@chromium.org>
459
460         Make calls to willModifyAttribute and attributeChanged symmetrical
461         https://bugs.webkit.org/show_bug.cgi?id=74987
462
463         Reviewed by Ryosuke Niwa.
464
465         Previously, calls to Element::willModifyAttribute sometimes happened
466         in one method while calls to Element::attributeChanged happened in
467         another. This change makes them symmetrical for all the cases I know
468         about: setAttribute, removeAttribute, setNamedItem, removeNamedItem.
469
470         To accomplish this, NamedNodeMap::addAttribute, removeAttribute, and
471         replaceAttribute have been reduced to their pure functionality of
472         manipulating m_attributes, and their callers are left responsible for
473         properly notifying the Element of the underlying changes.
474
475         One other bit of refactoring was done: to simplify
476         Element::setAttribute, it now dispatches to
477         Element::removeAttributeInternal if the incoming value is null.
478
479         No new tests, no change in behavior.
480
481         * dom/Attribute.h:
482         * dom/Element.cpp:
483         (WebCore::Element::removeAttribute):
484         (WebCore::Element::removeAttributeInternal): Added, sharing code
485         between the two removeAttribute overloads.
486         (WebCore::Element::setAttributeInternal):
487         * dom/Element.h:
488         * dom/NamedNodeMap.cpp:
489         (WebCore::NamedNodeMap::setNamedItem):
490         (WebCore::NamedNodeMap::removeNamedItem):
491         (WebCore::NamedNodeMap::addAttribute):
492         (WebCore::NamedNodeMap::removeAttribute):
493         (WebCore::NamedNodeMap::replaceAttribute):
494         * svg/properties/SVGAnimatedPropertySynchronizer.h:
495         Call Element::setAttribute unless the attribute is already present,
496         and add a comment explaining why the code looks the way it does.
497
498 2011-12-21  Adrienne Walker  <enne@google.com>
499
500         Unreviewed, rolling out r103408.
501         http://trac.webkit.org/changeset/103408
502         https://bugs.webkit.org/show_bug.cgi?id=75017
503
504         WorkerDevToolsSanityTest.InspectSharedWorker is failing
505         (Requested by loislo_ on #webkit).
506
507         * inspector/front-end/CompilerSourceMapping.js:
508         (WebInspector.ClosureCompilerSourceMapping):
509         (WebInspector.ClosureCompilerSourceMapping.prototype.sources):
510         (WebInspector.ClosureCompilerSourceMapping.prototype._parseMap):
511         * inspector/front-end/DebuggerPresentationModel.js:
512         (WebInspector.DebuggerPresentationModel.prototype.setCompilerSourceMapping):
513         * inspector/front-end/utilities.js:
514         (String.prototype.asParsedURL):
515
516 2011-12-21  Stephen White  <senorblanco@chromium.org>
517
518         Fix CSS filters crash on zero-sized elements.
519         https://bugs.webkit.org/show_bug.cgi?id=75020
520
521         Reviewed by Dean Jackson.
522
523         Test: css3/filters/filter-empty-element-crash.html
524
525         * rendering/FilterEffectRenderer.cpp:
526         (WebCore::FilterEffectRenderer::inputContext):
527         Protect against null ImageBuffer.
528         * rendering/RenderLayer.cpp:
529         (WebCore::RenderLayer::paintLayer):
530         Protect against null GraphicsContext.
531
532 2011-12-21  Anders Carlsson  <andersca@apple.com>
533
534         Inform the scrolling coordinator when scrollbar layers come and go
535         https://bugs.webkit.org/show_bug.cgi?id=75028
536
537         Reviewed by Andreas Kling and Simon Fraser.
538
539         * page/ScrollingCoordinator.h:
540         * page/mac/ScrollingCoordinatorMac.mm:
541         (WebCore::ScrollingCoordinator::setFrameViewHorizontalScrollbarLayer):
542         (WebCore::ScrollingCoordinator::setFrameViewVerticalScrollbarLayer):
543         * rendering/RenderLayerCompositor.cpp:
544         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
545
546 2011-12-20  Dmitry Lomov  <dslomov@google.com>
547
548         [Chromium] DatabaseTrackerChromium: iterating DatabaseSet races with Database disposal on worker thread 
549         https://bugs.webkit.org/show_bug.cgi?id=74554
550
551         Reviewed by David Levin.
552
553         Covered by existing tests in fast/workers/storage.
554
555         * storage/chromium/DatabaseTrackerChromium.cpp:
556         (WebCore::NotifyDatabaseObserverOnCloseTask::create):
557         (WebCore::NotifyDatabaseObserverOnCloseTask::performTask):
558         (WebCore::NotifyDatabaseObserverOnCloseTask::isCleanupTask):
559         (WebCore::NotifyDatabaseObserverOnCloseTask::NotifyDatabaseObserverOnCloseTask):
560         (WebCore::DatabaseTracker::removeOpenDatabase):
561
562 2011-12-21  Eric Carlson  <eric.carlson@apple.com>
563
564         HTMLMediaElement::configureTextTrackDisplay is unnecessary
565         https://bugs.webkit.org/show_bug.cgi?id=74945
566
567         Reviewed by Darin Adler.
568
569         Nothing to test, just removing redundant code. Correct behavior tested by 
570         media/track/track-cue-rendering.html and media/track/track-cue-nothing-to-render.html.
571
572         * html/HTMLMediaElement.cpp:
573         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Don't show and hide track, just call
574             updateTextTrackDisplay and it will do the right thing.
575
576 2011-12-21  Anders Carlsson  <andersca@apple.com>
577
578         ScrollingCoordinator functions should take FrameView objects
579         https://bugs.webkit.org/show_bug.cgi?id=75023
580
581         Reviewed by Sam Weinig.
582
583         * page/ScrollingCoordinator.cpp:
584         (WebCore::ScrollingCoordinator::syncFrameViewGeometry):
585         * page/ScrollingCoordinator.h:
586         * page/mac/ScrollingCoordinatorMac.mm:
587         (WebCore::ScrollingCoordinator::setFrameViewScrollLayer):
588         * rendering/RenderLayerCompositor.cpp:
589         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
590         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
591         (WebCore::RenderLayerCompositor::ensureRootLayer):
592
593 2011-12-21  Anders Carlsson  <andersca@apple.com>
594
595         Get rid of ScrollableAreaClient
596         https://bugs.webkit.org/show_bug.cgi?id=75021
597
598         Reviewed by Sam Weinig.
599
600         The ScrollableAreaClient interface will just add an extra level of indirection between ScrollableArea and
601         ScrollAnimator, which is unnecessary. Eventually I'd like to rename ScrollAnimator to something that better reflects
602         all the different responsibilities it currently has.
603
604         * WebCore.exp.in:
605         * page/FrameView.cpp:
606         (WebCore::FrameView::FrameView):
607         * page/ScrollingCoordinator.cpp:
608         * page/ScrollingCoordinator.h:
609         * platform/ScrollView.cpp:
610         (WebCore::ScrollView::ScrollView):
611         * platform/ScrollView.h:
612         * platform/ScrollableArea.cpp:
613         (WebCore::ScrollableArea::ScrollableArea):
614         * platform/ScrollableArea.h:
615         * platform/ScrollableAreaClient.h: Removed.
616
617 2011-12-21  Anders Carlsson  <andersca@apple.com>
618
619         Don't recreate scrollbar layers whenever the frame view size changes
620         https://bugs.webkit.org/show_bug.cgi?id=75018
621
622         Reviewed by Darin Adler and Simon Fraser.
623
624         * rendering/RenderLayerCompositor.cpp:
625         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
626
627 2011-12-20  Andrey Kosyakov  <caseq@chromium.org>
628
629         Web Inspector: [Extension API] refactor extension API build code, expose experimental APIs conditionally in chromium
630         https://bugs.webkit.org/show_bug.cgi?id=74941
631
632         Reviewed by Pavel Feldman.
633
634         * WebCore.gypi:
635         * inspector/front-end/ExtensionAPI.js:
636         (buildPlatformExtensionAPI.platformExtensionAPI):
637         (buildPlatformExtensionAPI):
638         (buildExtensionAPIInjectedScript):
639         * inspector/front-end/ExtensionServer.js:
640         (WebInspector.ExtensionServer.prototype._addExtensions):
641         (WebInspector.ExtensionServer.prototype._addExtension):
642         (window.addExtension):
643
644 2011-12-12  Pavel Podivilov  <podivilov@chromium.org>
645
646         Web Inspector: fix source map url resolving.
647         https://bugs.webkit.org/show_bug.cgi?id=74305
648
649         Reviewed by Pavel Feldman.
650
651         Also fix the bug with repeated source urls in mapping sections.
652
653         * inspector/front-end/CompilerSourceMapping.js:
654         (WebInspector.ClosureCompilerSourceMapping):
655         (WebInspector.ClosureCompilerSourceMapping.prototype.sources):
656         (WebInspector.ClosureCompilerSourceMapping.prototype._parseMap):
657         (WebInspector.ClosureCompilerSourceMapping.prototype._resolveSourceMapURL):
658         * inspector/front-end/DebuggerPresentationModel.js:
659         (WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping):
660         * inspector/front-end/utilities.js:
661         (String.prototype.asParsedURL):
662
663 2011-12-21  Renata Hodovan  <reni@webkit.org>
664
665         New renderer for SVGRectElement
666         https://bugs.webkit.org/show_bug.cgi?id=65769
667
668         Rubber-stamped by Zoltan Herczeg.
669
670         Change the return value of RenderSVGRect::renderName() from RenderSVGPath to RenderSVGRect.
671         This is a follow-up patch of r101517 to correct the DRT output.
672
673         * rendering/svg/RenderSVGRect.h:
674         (WebCore::RenderSVGRect::renderName):
675
676 2011-12-21  Vsevolod Vlasov  <vsevik@chromium.org>
677
678         Web Inspector: TabbedPane should use tabElement width measuring to layout tab elements when width is too small to fit them.
679         https://bugs.webkit.org/show_bug.cgi?id=75005
680
681         Reviewed by Pavel Feldman.
682
683         Test: inspector/tabbed-pane-max-tab-width-calculation.html
684
685         * inspector/front-end/NetworkItemView.js:
686         (WebInspector.NetworkItemView.prototype.wasShown):
687         * inspector/front-end/TabbedPane.js:
688         (WebInspector.TabbedPane):
689         (WebInspector.TabbedPane.prototype.appendTab):
690         (WebInspector.TabbedPane.prototype._createTabElement):
691         (WebInspector.TabbedPane.prototype.onResize):
692         (WebInspector.TabbedPane.prototype._maybeMeasureAndUpdate):
693         (WebInspector.TabbedPane.prototype._measureTab):
694         (WebInspector.TabbedPane.prototype._updateWidths):
695         (WebInspector.TabbedPane.prototype._calculateMaxWidth):
696         (WebInspector.TabbedPaneTab):
697         * inspector/front-end/inspector.css:
698         (.tabbed-pane-header):
699         (.tabbed-pane-header-tabs):
700         (.tabbed-pane-header-tab):
701         (.tabbed-pane-header-tab.measuring):
702         (.tabbed-pane-header-tab.selected):
703         * inspector/front-end/scriptsPanel.css:
704         (#scripts-navigator-tabbed-pane .tabbed-pane-header-tabs):
705
706 2011-12-09  Pavel Podivilov  <podivilov@chromium.org>
707
708         Web Inspector: auto detect source map url.
709         https://bugs.webkit.org/show_bug.cgi?id=74088
710
711         Reviewed by Pavel Feldman.
712
713         Check to see if "X-SourceMap" HTTP response header was sent with script resource.
714         Header value will be used as auto suggestion for source map url in UI.
715
716         * inspector/Inspector.json:
717         * inspector/InspectorDebuggerAgent.cpp:
718         (WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
719         (WebCore::InspectorDebuggerAgent::didParseSource):
720         * inspector/InspectorDebuggerAgent.h:
721         * inspector/front-end/DebuggerModel.js:
722         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
723         (WebInspector.DebuggerDispatcher.prototype.scriptParsed):
724         * inspector/front-end/RawSourceCode.js:
725         (WebInspector.RawSourceCode):
726         * inspector/front-end/Script.js:
727         (WebInspector.Script):
728
729 2011-12-21  Pierre Rossi  <pierre.rossi@gmail.com>
730
731         [Qt] Mobile theme refinements
732         https://bugs.webkit.org/show_bug.cgi?id=74727
733
734         Mostly to replace most of the rounded-rect-shaped
735         controls with squircle-shaped ones.
736
737         Reviewed by Kenneth Rohde Christiansen.
738
739         No new tests needed.
740
741         * platform/qt/RenderThemeQtMobile.cpp:
742         (WebCore::drawControlBackground):
743         (WebCore::painterScale):
744         (WebCore::borderPen):
745         (WebCore::StylePainterMobile::drawCheckableBackground): Toned down the gradient a bit.
746         (WebCore::StylePainterMobile::findCheckBox):
747         (WebCore::StylePainterMobile::drawRadio):
748         (WebCore::StylePainterMobile::findRadio):
749         (WebCore::StylePainterMobile::drawMultipleComboButton): increase spacing between the dots.
750         (WebCore::StylePainterMobile::drawSimpleComboButton): attempt to improve readability.
751         (WebCore::StylePainterMobile::getButtonImageSize):
752         (WebCore::StylePainterMobile::findComboButton):
753         (WebCore::StylePainterMobile::drawLineEdit):
754         (WebCore::StylePainterMobile::findLineEdit):
755         (WebCore::StylePainterMobile::drawPushButton):
756         (WebCore::StylePainterMobile::findPushButton):
757         (WebCore::StylePainterMobile::drawComboBox):
758         (WebCore::StylePainterMobile::drawProgress):
759         (WebCore::StylePainterMobile::drawSliderThumb):
760         (WebCore::RenderThemeQtMobile::computeSizeBasedOnStyle):
761         (WebCore::RenderThemeQtMobile::paintTextField):
762         * platform/qt/RenderThemeQtMobile.h:
763
764 2011-12-21  Alexander Pavlov  <apavlov@chromium.org>
765
766         Web Inspector: CSSStyleSheet::cssRules can return 0 and InspectorStyleSheet dosen't check
767         https://bugs.webkit.org/show_bug.cgi?id=74938
768
769         Prevent security checks when retrieving a just-added CSS rule from the "inspector stylesheet".
770
771         Reviewed by Pavel Feldman.
772
773         * inspector/InspectorStyleSheet.cpp:
774         (WebCore::InspectorStyleSheet::addRule):
775
776 2011-12-21  Renata Hodovan  <reni@webkit.org>
777
778         Fulfill FIXME in  HTMLLinkElement.h.
779         https://bugs.webkit.org/show_bug.cgi?id=74278
780
781         Rename isStyleSheetLoading() method to styleSheetIsLoading().
782         This new one has the correct grammar.
783
784         Reviewed by Darin Adler.
785
786         No new tests because the functionality remains the same.
787
788         * dom/Document.cpp:
789         (WebCore::Document::recalcStyleSelector):
790         * html/HTMLLinkElement.cpp:
791         (WebCore::HTMLLinkElement::setDisabledState):
792         (WebCore::HTMLLinkElement::styleSheetIsLoading):
793         (WebCore::HTMLLinkElement::sheetLoaded):
794         * html/HTMLLinkElement.h:
795
796 2011-12-21  Yosifumi Inoue  <yosin@chromium.org>
797
798         [Forms] Add OVERRIDE to WebCore/html/*InputType.h
799         https://bugs.webkit.org/show_bug.cgi?id=74996
800
801         Reviewed by Kent Tamura.
802
803         No new tests. Changes are just for compilation.
804
805         * html/BaseButtonInputType.h: Add OVERRIDE.
806         * html/BaseCheckableInputType.h: Add OVERRIDE.
807         * html/BaseDateAndTimeInputType.h: Add OVERRIDE.
808         * html/BaseTextInputType.h: Add OVERRIDE.
809         * html/ButtonInputType.h: Add OVERRIDE.
810         * html/CheckboxInputType.h: Add OVERRIDE.
811         * html/ColorInputType.h: Add OVERRIDE.
812         * html/DateInputType.h: Add OVERRIDE.
813         * html/DateTimeInputType.h: Add OVERRIDE.
814         * html/DateTimeLocalInputType.h: Add OVERRIDE.
815         * html/EmailInputType.h: Add OVERRIDE.
816         * html/FileInputType.h: Add OVERRIDE.
817         * html/HiddenInputType.h: Add OVERRIDE.
818         * html/ImageInputType.h: Add OVERRIDE.
819         * html/IsIndexInputType.h: Add OVERRIDE.
820         * html/MonthInputType.h: Add OVERRIDE.
821         * html/NumberInputType.h: Add OVERRIDE.
822         * html/PasswordInputType.h: Add OVERRIDE.
823         * html/RadioInputType.h: Add OVERRIDE.
824         * html/RangeInputType.h: Add OVERRIDE.
825         * html/ResetInputType.h: Add OVERRIDE.
826         * html/SearchInputType.h: Add OVERRIDE.
827         * html/SubmitInputType.h: Add OVERRIDE.
828         * html/TelephoneInputType.h: Add OVERRIDE.
829         * html/TextFieldInputType.h: Add OVERRIDE.
830         * html/TextInputType.h: Add OVERRIDE.
831         * html/TimeInputType.h: Add OVERRIDE.
832         * html/URLInputType.h: Add OVERRIDE.
833         * html/WeekInputType.h: Add OVERRIDE.
834
835 2011-12-21  Matt Falkenhagen  <falken@chromium.org>
836
837         Add all ICU languages to LocaleToScriptMappingDefault.cpp
838         https://bugs.webkit.org/show_bug.cgi?id=67274
839
840         Reviewed by Kent Tamura.
841
842         This better mimics the behavior of LocaleToScriptMappingICU.cpp. ICU
843         languages from ICU 3.6 are added. Also, script suffix in locale is
844         handled, so for example "fa_Latn" is mapped to Latin while "fa" is mapped to
845         Arabic.
846
847         No new tests, there is no visible effect until default per-script fonts
848         are added to non-ICU ports (alternatively, we could extend DumpRenderTree 
849         to support overridePreference for per-script fonts as in bug 71110).
850
851         * platform/text/LocaleToScriptMappingDefault.cpp:
852         (WebCore::getScriptCode): add script name to script code mapping
853         (WebCore::localeToScriptCodeForFontSelection): add ICU languages to map 
854
855 2011-12-20  Mary Wu  <mary.wu@torchmobile.com.cn>
856
857         Upstream PageClientBlackBerry.h into WebCore/platform/blackberry
858         https://bugs.webkit.org/show_bug.cgi?id=74169
859
860         Reviewed by Daniel Bates.
861
862         Initial upstream, no new tests.
863
864         * platform/blackberry/PageClientBlackBerry.h: Added.
865
866 2011-12-20  Mary Wu  <mary.wu@torchmobile.com.cn>
867
868         Upstream PlatformMouseEvent and LocalizedStrings into WebCore/platform/blackberry
869         https://bugs.webkit.org/show_bug.cgi?id=74383
870
871         Reviewed by Daniel Bates.
872
873         Other Main Contributors:
874         Rob Buis <rbuis@rim.com>
875         Mike Fenton <mifenton@rim.com> 
876
877         Initial upstream, no new tests.
878
879         * PlatformBlackBerry.cmake: Modified to rename Localizations.cpp to LocalizedStringsBlackBerry.cpp
880         * platform/blackberry/LocalizedStringsBlackBerry.cpp: Added.
881         * platform/blackberry/PlatformMouseEventBlackBerry.cpp: Added.
882
883 2011-12-20  Peter Rybin  <peter.rybin@gmail.com>
884
885         Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type.
886         https://bugs.webkit.org/show_bug.cgi?id=69366
887
888         Reviewed by Pavel Feldman.
889
890         Generator fixed and all usages are changed manually.
891
892         * inspector/CodeGeneratorInspector.py:
893         (RawTypes.BaseType):
894         (RawTypes.BaseType.get_output_argument_prefix):
895         (RawTypes.Object.get_output_argument_prefix):
896         (RawTypes.Array.get_output_argument_prefix):
897         (RawTypes):
898         (Generator.process_command):
899         * inspector/InspectorApplicationCacheAgent.cpp:
900         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
901         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
902         * inspector/InspectorApplicationCacheAgent.h:
903         * inspector/InspectorCSSAgent.cpp:
904         (WebCore::InspectorCSSAgent::clearFrontend):
905         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
906         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
907         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
908         (WebCore::InspectorCSSAgent::getAllStyleSheets):
909         (WebCore::InspectorCSSAgent::getStyleSheet):
910         (WebCore::InspectorCSSAgent::setPropertyText):
911         (WebCore::InspectorCSSAgent::toggleProperty):
912         (WebCore::InspectorCSSAgent::setRuleSelector):
913         (WebCore::InspectorCSSAgent::addRule):
914         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
915         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
916         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
917         * inspector/InspectorCSSAgent.h:
918         * inspector/InspectorDOMAgent.cpp:
919         (WebCore::InspectorDOMAgent::getDocument):
920         (WebCore::InspectorDOMAgent::querySelectorAll):
921         (WebCore::InspectorDOMAgent::getEventListenersForNode):
922         (WebCore::InspectorDOMAgent::getSearchResults):
923         (WebCore::InspectorDOMAgent::resolveNode):
924         (WebCore::InspectorDOMAgent::getAttributes):
925         * inspector/InspectorDOMAgent.h:
926         * inspector/InspectorDOMStorageAgent.cpp:
927         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
928         * inspector/InspectorDOMStorageAgent.h:
929         * inspector/InspectorDatabaseAgent.cpp:
930         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
931         * inspector/InspectorDatabaseAgent.h:
932         * inspector/InspectorDebuggerAgent.cpp:
933         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
934         (WebCore::InspectorDebuggerAgent::setBreakpoint):
935         (WebCore::InspectorDebuggerAgent::searchInContent):
936         (WebCore::InspectorDebuggerAgent::setScriptSource):
937         (WebCore::InspectorDebuggerAgent::getFunctionLocation):
938         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
939         * inspector/InspectorDebuggerAgent.h:
940         * inspector/InspectorMemoryAgent.cpp:
941         (WebCore::InspectorMemoryAgent::getDOMNodeCount):
942         * inspector/InspectorMemoryAgent.h:
943         * inspector/InspectorPageAgent.cpp:
944         (WebCore::InspectorPageAgent::getCookies):
945         (WebCore::InspectorPageAgent::getResourceTree):
946         (WebCore::InspectorPageAgent::searchInResource):
947         (WebCore::InspectorPageAgent::searchInResources):
948         * inspector/InspectorPageAgent.h:
949         * inspector/InspectorProfilerAgent.cpp:
950         (WebCore::InspectorProfilerAgent::getProfileHeaders):
951         (WebCore::InspectorProfilerAgent::getProfile):
952         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
953         * inspector/InspectorProfilerAgent.h:
954         * inspector/InspectorRuntimeAgent.cpp:
955         (WebCore::InspectorRuntimeAgent::evaluate):
956         (WebCore::InspectorRuntimeAgent::callFunctionOn):
957         (WebCore::InspectorRuntimeAgent::getProperties):
958         * inspector/InspectorRuntimeAgent.h:
959
960 2011-12-20  Eric Penner  <epenner@google.com>
961
962         [chromium] m_triggerIdlePaints not reset after a compositeAndReadback
963         https://bugs.webkit.org/show_bug.cgi?id=74974
964
965         Reviewed by James Robinson.
966
967         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
968         (WebCore::CCLayerTreeHost::compositeAndReadback):
969
970 2011-12-20  David Levin  <levin@chromium.org>
971
972         Move misplaced assert in SQLiteStatement.cpp
973         https://bugs.webkit.org/show_bug.cgi?id=74975
974
975         Reviewed by Dmitry Titov.
976
977         The test is coming with bug 74666.
978
979         * platform/sql/SQLiteStatement.cpp:
980         (WebCore::SQLiteStatement::step): If a database was interrupted
981         before the prepare method was called, then m_isPrepared will be
982         false, so I moved the assert to be after the check for interrupted.
983
984 2011-12-20  Eric Carlson  <eric.carlson@apple.com>
985
986         WebVTT cues sometimes render when they should not
987         https://bugs.webkit.org/show_bug.cgi?id=74873
988
989         Not reviewed: update Chromium to pass new test added in r103371.
990
991         * html/shadow/MediaControlRootElementChromium.cpp:
992         (WebCore::MediaControlRootElementChromium::updateTextTrackDisplay):
993
994 2011-12-20  Andreas Kling  <kling@webkit.org>
995
996         HTMLOptionsCollection: Remove incorrect FIXME about having a base class.
997         <http://webkit.org/b/74973>
998
999         Reviewed by Alexey Proskuryakov.
1000
1001         HTMLOptionsCollection should indeed inherit from HTMLCollection according to
1002         current HTML5, so remove the comment saying we should change that.
1003
1004         Spec: http://www.whatwg.org/specs/web-apps/current-work/#htmloptionscollection
1005
1006         * html/HTMLOptionsCollection.idl:
1007
1008 2011-12-20  Florin Malita  <fmalita@google.com>
1009
1010         td element ignores zero width/height input element
1011         https://bugs.webkit.org/show_bug.cgi?id=74636
1012
1013         Reviewed by Kent Tamura.
1014
1015         Test: fast/forms/input-zero-width.html
1016
1017         * rendering/RenderTextControl.cpp:
1018         (WebCore::RenderTextControl::computePreferredLogicalWidths):
1019         Relax the attribute test to allow setting widths == 0.
1020
1021 2011-12-20  Adam Klein  <adamk@chromium.org>
1022
1023         Avoid unnecessary work when removing attributes from an element
1024         https://bugs.webkit.org/show_bug.cgi?id=74953
1025
1026         Reviewed by Ryosuke Niwa.
1027
1028         Various codepaths in Element and NamedNodeMap repeatedly search
1029         through the list of attributes during a single operation. To avoid
1030         this, I've added new getters to NamedNodeMap that return indices
1031         rather than Attribute*s (they return WTF::notFound if no match is
1032         found). These new methods are now used during removeAttribute
1033         operations, as well as setAttribute and NamedNodeMap::setNamedItem
1034         (along with a new replaceAttribute helper method).
1035
1036         The other optimization here involves the creation/destruction
1037         of never-references Attr nodes. This is now avoided by calling
1038         NamedNodeMap::removeAttribute directly instead of going through
1039         NamedNodeMap::removeNamedItem.
1040
1041         As a cleanup after the above changes, the ExceptionCode argument is
1042         gone from Element::removeAttribute and friends (it was never set
1043         previously). The bulk of the files mentioned below are simply updating
1044         callers to these methods.
1045
1046         No new tests, no change in behavior expected.
1047
1048         * dom/DatasetDOMStringMap.cpp:
1049         (WebCore::DatasetDOMStringMap::deleteItem):
1050         * dom/Element.cpp:
1051         (WebCore::Element::removeAttribute):
1052         (WebCore::Element::setBooleanAttribute):
1053         (WebCore::Element::removeAttributeNS):
1054         (WebCore::Element::setAttribute):
1055         (WebCore::Element::setAttributeInternal):
1056         * dom/Element.h:
1057         * dom/Element.idl:
1058         * dom/NamedNodeMap.cpp:
1059         (WebCore::NamedNodeMap::setNamedItem):
1060         (WebCore::NamedNodeMap::removeNamedItem):
1061         (WebCore::NamedNodeMap::getAttributeItemIndexSlowCase):
1062         (WebCore::NamedNodeMap::replaceAttribute):
1063         (WebCore::NamedNodeMap::removeAttribute):
1064         * dom/NamedNodeMap.h:
1065         (WebCore::NamedNodeMap::getAttributeItem):
1066         (WebCore::NamedNodeMap::getAttributeItemIndex):
1067         (WebCore::NamedNodeMap::removeAttribute):
1068         * editing/ApplyStyleCommand.cpp:
1069         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1070         * editing/InsertParagraphSeparatorCommand.cpp:
1071         (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
1072         * editing/SplitElementCommand.cpp:
1073         (WebCore::SplitElementCommand::executeApply):
1074         * html/HTMLElement.cpp:
1075         (WebCore::HTMLElement::setContentEditable):
1076         * html/HTMLInputElement.cpp:
1077         (WebCore::HTMLInputElement::setType):
1078         * inspector/InspectorDOMAgent.cpp:
1079         (WebCore::InspectorDOMAgent::setAttributesAsText):
1080         (WebCore::InspectorDOMAgent::removeAttribute):
1081         * svg/SVGUseElement.cpp:
1082         (WebCore::SVGUseElement::transferUseAttributesToReplacedElement):
1083
1084 2011-12-20  Eric Carlson  <eric.carlson@apple.com>
1085
1086         WebVTT cues sometimes render when they should not
1087         https://bugs.webkit.org/show_bug.cgi?id=74873
1088
1089         Reviewed by Darin Adler.
1090
1091         Test: media/track/track-cue-nothing-to-render.html
1092
1093         * html/shadow/MediaControlRootElement.cpp:
1094         (WebCore::MediaControlRootElement::updateTextTrackDisplay): Don't return early if the current
1095             cue is empty so the previous cue is removed.
1096
1097 2011-12-20  Ami Fischman  <fischman@chromium.org>
1098
1099         Don't crash on the second time VideoLayerChromium::createCCVideoLayer() is called
1100         https://bugs.webkit.org/show_bug.cgi?id=74963
1101
1102         Reviewed by James Robinson.
1103
1104         Manually tested by force-dropping the layer tree in CCLayerTreeHost::didBecomeInvisibleOnImplThread().
1105         Crashed before the fix, doesn't crash after.
1106
1107         * platform/graphics/chromium/VideoLayerChromium.cpp:
1108         (WebCore::VideoLayerChromium::VideoLayerChromium):
1109         (WebCore::VideoLayerChromium::~VideoLayerChromium):
1110         (WebCore::VideoLayerChromium::createCCLayerImpl):
1111         * platform/graphics/chromium/VideoLayerChromium.h:
1112
1113 2011-12-20  Scott Graham  <scottmg@chromium.org>
1114
1115         wouldTaintOrigin m_cleanURLs cache grows very large when data urls used
1116         https://bugs.webkit.org/show_bug.cgi?id=74957
1117
1118         Reviewed by Kenneth Russell.
1119
1120         No new tests, but memory usage of CanvasRenderingContext::m_cleanURLs
1121         is reduced.
1122
1123         * html/canvas/CanvasRenderingContext.cpp:
1124         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
1125
1126 2011-12-20  Greg Billock  <gbillock@google.com>
1127
1128         Change adoptPtr(new ...) to ...::create in Page.cpp
1129         https://bugs.webkit.org/show_bug.cgi?id=74457
1130
1131         Reviewed by Darin Adler.
1132
1133         * dom/DeviceMotionController.cpp:
1134         (WebCore::DeviceMotionController::create):
1135         * dom/DeviceMotionController.h:
1136         * dom/DeviceOrientationController.cpp:
1137         (WebCore::DeviceOrientationController::create):
1138         * dom/DeviceOrientationController.h:
1139         * editing/FrameSelection.cpp:
1140         (WebCore::DragCaretController::create):
1141         * editing/FrameSelection.h:
1142         * history/BackForwardController.cpp:
1143         (WebCore::BackForwardController::create):
1144         * history/BackForwardController.h:
1145         * inspector/InspectorController.cpp:
1146         (WebCore::InspectorController::create):
1147         * inspector/InspectorController.h:
1148         * loader/ProgressTracker.cpp:
1149         (WebCore::ProgressTracker::create):
1150         * loader/ProgressTracker.h:
1151         * notifications/NotificationController.cpp:
1152         (WebCore::NotificationController::create):
1153         * notifications/NotificationController.h:
1154         * page/Chrome.cpp:
1155         (WebCore::Chrome::create):
1156         * page/Chrome.h:
1157         * page/ContextMenuController.cpp:
1158         (WebCore::ContextMenuController::create):
1159         * page/ContextMenuController.h:
1160         * page/DragController.cpp:
1161         (WebCore::DragController::create):
1162         * page/DragController.h:
1163         * page/FocusController.cpp:
1164         (WebCore::FocusController::create):
1165         * page/FocusController.h:
1166         * page/GeolocationController.cpp:
1167         (WebCore::GeolocationController::create):
1168         * page/GeolocationController.h:
1169         * page/Page.cpp:
1170         (WebCore::Page::Page):
1171         (WebCore::Page::initGroup):
1172         (WebCore::Page::speechInput):
1173         * page/PageGroup.cpp:
1174         (WebCore::PageGroup::create):
1175         * page/PageGroup.h:
1176         * page/Settings.cpp:
1177         (WebCore::Settings::create):
1178         * page/Settings.h:
1179         * page/SpeechInput.cpp:
1180         (WebCore::SpeechInput::create):
1181         * page/SpeechInput.h:
1182
1183 2011-12-20  Ryosuke Niwa  <rniwa@webkit.org>
1184
1185         Mac build fix after r103354.
1186
1187         * platform/mac/ScrollAnimatorMac.mm:
1188         (systemUptime):
1189
1190 2011-12-20  Anders Carlsson  <andersca@apple.com>
1191
1192         Add ScrollableArea::contentsResized and have it call the scroll animator
1193         https://bugs.webkit.org/show_bug.cgi?id=74966
1194
1195         Reviewed by Sam Weinig.
1196
1197         * WebCore.exp.in:
1198         * page/FrameView.cpp:
1199         (WebCore::FrameView::setContentsSize):
1200         (WebCore::FrameView::contentsResized):
1201         * page/FrameView.h:
1202         * platform/ScrollView.h:
1203         * platform/ScrollableArea.cpp:
1204         (WebCore::ScrollableArea::contentsResized):
1205         * platform/ScrollableArea.h:
1206
1207 2011-12-20  Simon Fraser  <simon.fraser@apple.com>
1208
1209         requestAnimationFrame on Mac fires at 60fps even when drawing is much slower
1210         https://bugs.webkit.org/show_bug.cgi?id=74964
1211
1212         Reviewed by Chris Marrin.
1213         
1214         On Mac requestAnimationFrame uses a CVDisplayLink, sending notifications
1215         from the display link thread to the main thread that the display link fired.
1216         However, there was no throttling on these notifications; if processing an event
1217         took a long time, notifications would pile up, and then get handled after
1218         the slow event completed.
1219         
1220         This would cause JS animations which animate by changing style to report
1221         60fps when their display framerate was much lower.
1222         
1223         Fix by throttling notifications from the display link thread to the web
1224         thread; if the previous event hasn't completed yet, don't send any new ones.
1225
1226         No new tests, since testing this runtime behavior is hard.
1227
1228         * platform/graphics/DisplayRefreshMonitor.cpp:
1229         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
1230         (WebCore::DisplayRefreshMonitor::refreshDisplayOnMainThread):
1231         (WebCore::DisplayRefreshMonitor::notifyClients): Factored out of the
1232         static refreshDisplayOnMainThread method so we can use 'this'.
1233         * platform/graphics/DisplayRefreshMonitor.h:
1234         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1235         (WebCore::DisplayRefreshMonitor::displayLinkFired):
1236
1237 2011-12-20  Greg Billock  <gbillock@google.com>
1238
1239         [Coverity] Fix leak in V8HTMLDocument
1240         https://bugs.webkit.org/show_bug.cgi?id=74943
1241
1242         Reviewed by Adam Barth.
1243
1244         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1245         (WebCore::V8HTMLDocument::openCallback):
1246
1247 2011-12-20  Sailesh Agrawal <sail@chromium.org>
1248
1249         Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac
1250         https://bugs.webkit.org/show_bug.cgi?id=61144
1251
1252         Reviewed by Beth Dakin.
1253
1254         At a high level the main changes are:
1255             - replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks
1256             - delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff.
1257             - delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing
1258             - delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing
1259
1260         No new tests. Just refactoring.
1261
1262         * WebCore.gyp/WebCore.gyp:
1263         * WebCore.gypi:
1264         * WebCore.xcodeproj/project.pbxproj:
1265         * platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
1266         * platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
1267         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed.
1268         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed.
1269         * platform/chromium/ScrollbarThemeChromiumMac.h:
1270         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1271         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
1272         (WebCore::scrollbarPainterPaintTrack):
1273         (WebCore::ScrollbarThemeChromiumMac::paint):
1274         * platform/mac/EmptyProtocolDefinitions.h:
1275         * platform/mac/NSScrollerImpDetails.h:
1276         (WebCore::isScrollbarOverlayAPIAvailable):
1277         * platform/mac/NSScrollerImpDetails.mm: Added.
1278         (WebCore::isScrollbarOverlayAPIAvailable):
1279         (WebCore::recommendedScrollerStyle):
1280         * platform/mac/ScrollAnimatorMac.h:
1281         * platform/mac/ScrollAnimatorMac.mm:
1282         (scrollbarPainterForScrollbar):
1283         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1284         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
1285         (WebCore::ScrollAnimatorMac::notifyPositionChanged):
1286         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
1287         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
1288         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
1289         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
1290         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
1291         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
1292         (WebCore::ScrollAnimatorMac::willStartLiveResize):
1293         (WebCore::ScrollAnimatorMac::contentsResized):
1294         (WebCore::ScrollAnimatorMac::willEndLiveResize):
1295         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
1296         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
1297         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
1298         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
1299         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
1300         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
1301         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
1302         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
1303         (WebCore::ScrollAnimatorMac::cancelAnimations):
1304         (WebCore::ScrollAnimatorMac::setIsActive):
1305         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1306         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
1307         * platform/mac/ScrollElasticityController.h:
1308         * platform/mac/ScrollbarThemeMac.h:
1309         * platform/mac/ScrollbarThemeMac.mm:
1310         (+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
1311         (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
1312         (WebCore::updateArrowPlacement):
1313         (WebCore::ScrollbarThemeMac::registerScrollbar):
1314         (WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer):
1315         (WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
1316         (WebCore::ScrollbarThemeMac::scrollbarThickness):
1317         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
1318         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
1319         (WebCore::ScrollbarThemeMac::hasButtons):
1320         (WebCore::ScrollbarThemeMac::hasThumb):
1321         (WebCore::ScrollbarThemeMac::minimumThumbLength):
1322         (WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState):
1323         (WebCore::ScrollbarThemeMac::updateEnabledState):
1324         (WebCore::scrollbarPainterPaint):
1325         (WebCore::ScrollbarThemeMac::paint):
1326
1327 2011-12-20  Tony Chang  <tony@chromium.org>
1328
1329         sizeof(RenderStyle) is 64 instead of 56 on Windows (x86)
1330         https://bugs.webkit.org/show_bug.cgi?id=74876
1331
1332         Reviewed by Ryosuke Niwa.
1333
1334         Move bit fields into a new class and use unsigned for all types so we
1335         align at 4 byte bounds. Also move the initializers into the header
1336         file (has the side benefit of not needing to duplicate the initializers
1337         in 3 places).
1338
1339         Enable the compile assert on Windows.
1340
1341         * rendering/style/RenderStyle.cpp:
1342         (WebCore::RenderStyle::RenderStyle):
1343         * rendering/style/RenderStyle.h:
1344         (WebCore::RenderStyleBitfields::affectedByUncommonAttributeSelectors):
1345         (WebCore::RenderStyleBitfields::setAffectedByUncommonAttributeSelectors):
1346         (WebCore::RenderStyleBitfields::unique):
1347         (WebCore::RenderStyleBitfields::setUnique):
1348         (WebCore::RenderStyleBitfields::affectedByEmpty):
1349         (WebCore::RenderStyleBitfields::emptyState):
1350         (WebCore::RenderStyleBitfields::setEmptyState):
1351         (WebCore::RenderStyleBitfields::childrenAffectedByFirstChildRules):
1352         (WebCore::RenderStyleBitfields::setChildrenAffectedByFirstChildRules):
1353         (WebCore::RenderStyleBitfields::childrenAffectedByLastChildRules):
1354         (WebCore::RenderStyleBitfields::setChildrenAffectedByLastChildRules):
1355         (WebCore::RenderStyleBitfields::childrenAffectedByDirectAdjacentRules):
1356         (WebCore::RenderStyleBitfields::setChildrenAffectedByDirectAdjacentRules):
1357         (WebCore::RenderStyleBitfields::childrenAffectedByForwardPositionalRules):
1358         (WebCore::RenderStyleBitfields::setChildrenAffectedByForwardPositionalRules):
1359         (WebCore::RenderStyleBitfields::childrenAffectedByBackwardPositionalRules):
1360         (WebCore::RenderStyleBitfields::setChildrenAffectedByBackwardPositionalRules):
1361         (WebCore::RenderStyleBitfields::firstChildState):
1362         (WebCore::RenderStyleBitfields::setFirstChildState):
1363         (WebCore::RenderStyleBitfields::lastChildState):
1364         (WebCore::RenderStyleBitfields::setLastChildState):
1365         (WebCore::RenderStyleBitfields::childIndex):
1366         (WebCore::RenderStyleBitfields::setChildIndex):
1367         (WebCore::RenderStyleBitfields::setHasExplicitlyInheritedProperties):
1368         (WebCore::RenderStyleBitfields::hasExplicitlyInheritedProperties):
1369
1370 2011-12-20  Tony Chang  <tony@chromium.org>
1371
1372         [chromium] enable WPO for WebCore libs in official builds
1373         https://bugs.webkit.org/show_bug.cgi?id=74947
1374
1375         Reviewed by James Robinson.
1376
1377         Also move enable_wexit_time_destructors to the top level variables
1378         so we don't have to add it to all targets.
1379
1380         * WebCore.gyp/WebCore.gyp:
1381
1382 2011-12-20  Anders Carlsson  <andersca@apple.com>
1383
1384         Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions
1385         https://bugs.webkit.org/show_bug.cgi?id=74951
1386
1387         Reviewed by Sam Weinig.
1388
1389         * WebCore.exp.in:
1390         * page/EventHandler.cpp:
1391         (WebCore::EventHandler::mouseMoved):
1392         (WebCore::EventHandler::updateMouseEventTargetNode):
1393         * page/FocusController.cpp:
1394         (WebCore::FocusController::setActive):
1395         * page/FrameView.cpp:
1396         (WebCore::FrameView::didMoveOnscreen):
1397         (WebCore::FrameView::willMoveOffscreen):
1398         (WebCore::FrameView::notifyPageThatContentAreaWillPaint):
1399         * platform/ScrollableArea.cpp:
1400         (WebCore::ScrollableArea::contentAreaWillPaint):
1401         (WebCore::ScrollableArea::mouseEnteredContentArea):
1402         (WebCore::ScrollableArea::mouseExitedContentArea):
1403         (WebCore::ScrollableArea::mouseMovedInContentArea):
1404         (WebCore::ScrollableArea::mouseEnteredScrollbar):
1405         (WebCore::ScrollableArea::mouseExitedScrollbar):
1406         (WebCore::ScrollableArea::contentAreaDidShow):
1407         (WebCore::ScrollableArea::contentAreaDidHide):
1408         * platform/ScrollableArea.h:
1409         * platform/ScrollableAreaClient.h:
1410         * platform/Scrollbar.cpp:
1411         (WebCore::Scrollbar::mouseEntered):
1412         (WebCore::Scrollbar::mouseExited):
1413         (WebCore::Scrollbar::mouseUp):
1414
1415 2011-12-20  Jarred Nicholls  <jarred@sencha.com>
1416
1417         Perform case insensitive matching on MIME types in XHR
1418         https://bugs.webkit.org/show_bug.cgi?id=74800
1419
1420         Perform case insensitive matching on responseMIMEType() in didReceiveData().
1421         Workaround case sensitive matching by DOMImplementation::isXMLMIMEType() in responseIsXML().
1422
1423         Reviewed by Darin Adler.
1424
1425         Tests: http/tests/xmlhttprequest/xmlhttprequest-mimetype-mixed-case.html
1426                http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-mixed-case.html
1427
1428         * xml/XMLHttpRequest.cpp:
1429         (WebCore::XMLHttpRequest::didReceiveData):
1430         (WebCore::XMLHttpRequest::responseIsXML):
1431
1432 2011-12-20  Adam Klein  <adamk@chromium.org>
1433
1434         Remove no-op DOMAttr* event dispatch methods from Element
1435         https://bugs.webkit.org/show_bug.cgi?id=74946
1436
1437         Reviewed by Darin Adler.
1438
1439         The removed methods had their bodies #if 0'd out, so this should have
1440         no effect on anything.
1441
1442         * dom/Element.cpp:
1443         * dom/Element.h:
1444         * dom/NamedNodeMap.cpp:
1445         (WebCore::NamedNodeMap::addAttribute):
1446         (WebCore::NamedNodeMap::removeAttribute):
1447
1448 2011-12-20  Anders Carlsson  <andersca@apple.com>
1449
1450         ScrollableArea should have an optional ScrollableAreaClient
1451         https://bugs.webkit.org/show_bug.cgi?id=74949
1452
1453         Reviewed by Sam Weinig.
1454
1455         * WebCore.exp.in:
1456         * WebCore.xcodeproj/project.pbxproj:
1457         * page/FrameView.cpp:
1458         (WebCore::scrollableAreaClient):
1459         (WebCore::FrameView::FrameView):
1460         * page/ScrollingCoordinator.cpp:
1461         (WebCore::ScrollingCoordinator::scrollableAreaClientForFrame):
1462         * page/ScrollingCoordinator.h:
1463         * platform/ScrollView.cpp:
1464         (WebCore::ScrollView::ScrollView):
1465         * platform/ScrollView.h:
1466         * platform/ScrollableArea.cpp:
1467         (WebCore::ScrollableArea::ScrollableArea):
1468         * platform/ScrollableArea.h:
1469         * platform/ScrollableAreaClient.h: Added.
1470         (WebCore::ScrollableAreaClient::~ScrollableAreaClient):
1471         (WebCore::ScrollableAreaClient::ScrollableAreaClient):
1472
1473 2011-12-19  Adam Klein  <adamk@chromium.org>
1474
1475         Rename Element::setAttributeMap to parserSetAttributeMap and limit its use to the parser
1476         https://bugs.webkit.org/show_bug.cgi?id=74885
1477
1478         Reviewed by Ryosuke Niwa.
1479
1480         Element::setAttributeMap is currently used by the parser in cases
1481         where a NamedNodeMap of attributes has already been allocated and
1482         transfers ownership to the Element. Other uses in WebCore don't have
1483         this ownership-transfer requirement, and so are more clearly expressed
1484         with normal setAttribute calls.
1485
1486         Eliminating non-parser callers allows the code to make safe
1487         assumptions about the state of the Element it's called on: no need to
1488         worry about, e.g., updating the id in the document's cache or
1489         enqueueing mutation records.
1490
1491         No new tests, no change in behavior expected.
1492
1493         * dom/Element.cpp:
1494         (WebCore::Element::parserSetAttributeMap): Renamed, added assertions
1495         to make sure it's not called unexpectedly, update comments.
1496         * dom/Element.h:
1497         * html/HTMLViewSourceDocument.cpp: Use setAttribute instead of setAttributeMap.
1498         (WebCore::HTMLViewSourceDocument::createContainingTable):
1499         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1500         (WebCore::HTMLViewSourceDocument::addLine):
1501         (WebCore::HTMLViewSourceDocument::addBase):
1502         (WebCore::HTMLViewSourceDocument::addLink):
1503         * html/parser/HTMLConstructionSite.cpp: Reference new name.
1504         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
1505         (WebCore::HTMLConstructionSite::insertScriptElement):
1506         (WebCore::HTMLConstructionSite::createElement):
1507         (WebCore::HTMLConstructionSite::createHTMLElement):
1508         * html/track/WebVTTParser.cpp:
1509         (WebCore::WebVTTParser::constructTreeFromToken): Use setAttribute instead of setAttributeMap.
1510         Also get rid of an unnecessary String -> AtomicString conversion.
1511
1512 2011-12-20  Iain Merrick  <husky@google.com>
1513
1514         Remove unused parameter from RenderLayerCompositor::rebuildCompositingLayerTree
1515         https://bugs.webkit.org/show_bug.cgi?id=74936
1516
1517         Reviewed by Simon Fraser.
1518
1519         Pure refactoring, no change in functionality.
1520
1521         * rendering/RenderLayerCompositor.cpp:
1522         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1523         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1524         * rendering/RenderLayerCompositor.h:
1525
1526 2011-12-20  Tony Chang  <tony@chromium.org>
1527
1528         RenderStyle::InheritedFlags and RenderStyle::NonInheritedFlags members should be 4 byte aligned
1529         https://bugs.webkit.org/show_bug.cgi?id=74880
1530
1531         Reviewed by Ryosuke Niwa.
1532
1533         Use unsigned for all types so we get 4 byte boundaries (unsigned char
1534         means we try to align to 1 byte boundaries) and add setters and
1535         getters for bool members.
1536
1537         Move some members around to make sure we're aligned to 4 byte boundaries.
1538
1539         * rendering/style/RenderStyle.cpp:
1540         (WebCore::RenderStyle::copyNonInheritedFrom):
1541         * rendering/style/RenderStyle.h:
1542         (WebCore::InheritedFlags::NonInheritedFlags::affectedByHover):
1543         (WebCore::InheritedFlags::NonInheritedFlags::setAffectedByHover):
1544         (WebCore::InheritedFlags::NonInheritedFlags::affectedByActive):
1545         (WebCore::InheritedFlags::NonInheritedFlags::setAffectedByActive):
1546         (WebCore::InheritedFlags::NonInheritedFlags::affectedByDrag):
1547         (WebCore::InheritedFlags::NonInheritedFlags::setAffectedByDrag):
1548         (WebCore::InheritedFlags::NonInheritedFlags::isLink):
1549         (WebCore::InheritedFlags::NonInheritedFlags::setIsLink):
1550         (WebCore::InheritedFlags::setBitDefaults):
1551         (WebCore::InheritedFlags::affectedByHoverRules):
1552         (WebCore::InheritedFlags::affectedByActiveRules):
1553         (WebCore::InheritedFlags::affectedByDragRules):
1554         (WebCore::InheritedFlags::setAffectedByHoverRules):
1555         (WebCore::InheritedFlags::setAffectedByActiveRules):
1556         (WebCore::InheritedFlags::setAffectedByDragRules):
1557         (WebCore::InheritedFlags::isLink):
1558         (WebCore::InheritedFlags::setIsLink):
1559
1560 2011-12-20  Julien Chaffraix  <jchaffraix@webkit.org>
1561
1562         Regression(99212): table rows get incorrect height after changing some cells' height
1563         https://bugs.webkit.org/show_bug.cgi?id=74303
1564
1565         Reviewed by Darin Adler.
1566
1567         Tests: fast/table/resize-table-binding-cell.html
1568                fast/table/resize-table-cell.html
1569                fast/table/resize-table-row.html
1570
1571         r99212 wrongly implemented the row's logicalHeight recalculation.
1572         The original code would use recalcCells which would properly recalculate a
1573         row logicalHeight by iterating over the table's cells but throwing out the
1574         existing result.
1575
1576         Our approach is just to recompute our row's logicalHeight and leave the
1577         rest of the section untouched.
1578
1579         * rendering/RenderTableSection.cpp:
1580         (WebCore::updateLogicalHeightForCell):
1581         Added this new helper function to update the RowStruct logicalHeight during
1582         |addCell| and |rowLogicalHeightChanged|.
1583
1584         (WebCore::RenderTableSection::addCell):
1585         Replaced the old code with a call to updateLogicalHeightForCell.
1586         (WebCore::RenderTableSection::rowLogicalHeightChanged):
1587         Added a call to updateLogicalHeightForCell for each cells.
1588
1589 2011-12-20  Sheriff Bot  <webkit.review.bot@gmail.com>
1590
1591         Unreviewed, rolling out r103322.
1592         http://trac.webkit.org/changeset/103322
1593         https://bugs.webkit.org/show_bug.cgi?id=74927
1594
1595         seven inspector's tests are crashing on qt (Requested by
1596         loislo on #webkit).
1597
1598         * inspector/CodeGeneratorInspector.py:
1599         (RawTypes.BaseType.is_event_param_check_optional):
1600         (RawTypes.Object.is_event_param_check_optional):
1601         (RawTypes.Array.is_event_param_check_optional):
1602         (RawTypes):
1603         (Generator.process_command):
1604         * inspector/InspectorApplicationCacheAgent.cpp:
1605         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
1606         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
1607         * inspector/InspectorApplicationCacheAgent.h:
1608         * inspector/InspectorCSSAgent.cpp:
1609         (WebCore::InspectorCSSAgent::clearFrontend):
1610         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1611         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
1612         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
1613         (WebCore::InspectorCSSAgent::getAllStyleSheets):
1614         (WebCore::InspectorCSSAgent::getStyleSheet):
1615         (WebCore::InspectorCSSAgent::setPropertyText):
1616         (WebCore::InspectorCSSAgent::toggleProperty):
1617         (WebCore::InspectorCSSAgent::setRuleSelector):
1618         (WebCore::InspectorCSSAgent::addRule):
1619         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1620         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
1621         * inspector/InspectorCSSAgent.h:
1622         * inspector/InspectorDOMAgent.cpp:
1623         (WebCore::InspectorDOMAgent::getDocument):
1624         (WebCore::InspectorDOMAgent::querySelectorAll):
1625         (WebCore::InspectorDOMAgent::getEventListenersForNode):
1626         (WebCore::InspectorDOMAgent::getSearchResults):
1627         (WebCore::InspectorDOMAgent::resolveNode):
1628         (WebCore::InspectorDOMAgent::getAttributes):
1629         * inspector/InspectorDOMAgent.h:
1630         * inspector/InspectorDOMStorageAgent.cpp:
1631         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
1632         * inspector/InspectorDOMStorageAgent.h:
1633         * inspector/InspectorDatabaseAgent.cpp:
1634         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
1635         * inspector/InspectorDatabaseAgent.h:
1636         * inspector/InspectorDebuggerAgent.cpp:
1637         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1638         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1639         (WebCore::InspectorDebuggerAgent::searchInContent):
1640         (WebCore::InspectorDebuggerAgent::setScriptSource):
1641         (WebCore::InspectorDebuggerAgent::getFunctionLocation):
1642         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
1643         * inspector/InspectorDebuggerAgent.h:
1644         * inspector/InspectorMemoryAgent.cpp:
1645         (WebCore::InspectorMemoryAgent::getDOMNodeCount):
1646         * inspector/InspectorMemoryAgent.h:
1647         * inspector/InspectorPageAgent.cpp:
1648         (WebCore::InspectorPageAgent::getCookies):
1649         (WebCore::InspectorPageAgent::getResourceTree):
1650         (WebCore::InspectorPageAgent::searchInResource):
1651         (WebCore::InspectorPageAgent::searchInResources):
1652         * inspector/InspectorPageAgent.h:
1653         * inspector/InspectorProfilerAgent.cpp:
1654         (WebCore::InspectorProfilerAgent::getProfileHeaders):
1655         (WebCore::InspectorProfilerAgent::getProfile):
1656         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
1657         * inspector/InspectorProfilerAgent.h:
1658         * inspector/InspectorRuntimeAgent.cpp:
1659         (WebCore::InspectorRuntimeAgent::evaluate):
1660         (WebCore::InspectorRuntimeAgent::callFunctionOn):
1661         (WebCore::InspectorRuntimeAgent::getProperties):
1662         * inspector/InspectorRuntimeAgent.h:
1663
1664 2011-12-19  Andrey Kosyakov  <caseq@chromium.org>
1665
1666         Web Inspector: [Extensions API] allow setting extension API per extension security origin
1667         https://bugs.webkit.org/show_bug.cgi?id=74868
1668
1669         Reviewed by Pavel Feldman.
1670
1671         This replaces InspectorExtensionAPI string within InspectorFrontendHost with a map by extension
1672         security origin, so that we can have APIs customized by extension (in particular, this is needed
1673         to expose experimental APIs only to certain extensions).
1674
1675         * inspector/InspectorAgent.cpp:
1676         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
1677         (WebCore::InspectorAgent::setInjectedScriptForOrigin):
1678         * inspector/InspectorAgent.h:
1679         * inspector/InspectorController.cpp:
1680         (WebCore::InspectorController::setInjectedScriptForOrigin):
1681         * inspector/InspectorController.h:
1682         * inspector/InspectorFrontendHost.cpp:
1683         (WebCore::InspectorFrontendHost::setInjectedScriptForOrigin):
1684         * inspector/InspectorFrontendHost.h:
1685         * inspector/InspectorFrontendHost.idl:
1686         * inspector/front-end/ExtensionServer.js:
1687         (WebInspector.ExtensionServer.prototype._addExtensions):
1688         (WebInspector.ExtensionServer.prototype._addExtension):
1689
1690 2011-12-20  Peter Rybin  <peter.rybin@gmail.com>
1691
1692         Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type.
1693         https://bugs.webkit.org/show_bug.cgi?id=69366
1694
1695         Reviewed by Pavel Feldman.
1696
1697         Generator fixed and all usages are changed manually.
1698
1699         * inspector/CodeGeneratorInspector.py:
1700         (RawTypes.BaseType.is_event_param_check_optional):
1701         (RawTypes.BaseType):
1702         (RawTypes.BaseType.get_output_argument_prefix):
1703         (RawTypes.Object.get_output_argument_prefix):
1704         (RawTypes.Array.get_output_argument_prefix):
1705         (RawTypes):
1706         (Generator.process_command):
1707         * inspector/InspectorApplicationCacheAgent.cpp:
1708         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
1709         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
1710         * inspector/InspectorApplicationCacheAgent.h:
1711         * inspector/InspectorCSSAgent.cpp:
1712         (WebCore::InspectorCSSAgent::clearFrontend):
1713         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1714         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
1715         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
1716         (WebCore::InspectorCSSAgent::getAllStyleSheets):
1717         (WebCore::InspectorCSSAgent::getStyleSheet):
1718         (WebCore::InspectorCSSAgent::setPropertyText):
1719         (WebCore::InspectorCSSAgent::toggleProperty):
1720         (WebCore::InspectorCSSAgent::setRuleSelector):
1721         (WebCore::InspectorCSSAgent::addRule):
1722         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1723         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
1724         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
1725         * inspector/InspectorCSSAgent.h:
1726         * inspector/InspectorDOMAgent.cpp:
1727         (WebCore::InspectorDOMAgent::getDocument):
1728         (WebCore::InspectorDOMAgent::querySelectorAll):
1729         (WebCore::InspectorDOMAgent::getEventListenersForNode):
1730         (WebCore::InspectorDOMAgent::getSearchResults):
1731         (WebCore::InspectorDOMAgent::resolveNode):
1732         (WebCore::InspectorDOMAgent::getAttributes):
1733         * inspector/InspectorDOMAgent.h:
1734         * inspector/InspectorDOMStorageAgent.cpp:
1735         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
1736         * inspector/InspectorDOMStorageAgent.h:
1737         * inspector/InspectorDatabaseAgent.cpp:
1738         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
1739         * inspector/InspectorDatabaseAgent.h:
1740         * inspector/InspectorDebuggerAgent.cpp:
1741         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1742         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1743         (WebCore::InspectorDebuggerAgent::searchInContent):
1744         (WebCore::InspectorDebuggerAgent::setScriptSource):
1745         (WebCore::InspectorDebuggerAgent::getFunctionLocation):
1746         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
1747         * inspector/InspectorDebuggerAgent.h:
1748         * inspector/InspectorMemoryAgent.cpp:
1749         (WebCore::InspectorMemoryAgent::getDOMNodeCount):
1750         * inspector/InspectorMemoryAgent.h:
1751         * inspector/InspectorPageAgent.cpp:
1752         (WebCore::InspectorPageAgent::getCookies):
1753         (WebCore::InspectorPageAgent::getResourceTree):
1754         (WebCore::InspectorPageAgent::searchInResource):
1755         (WebCore::InspectorPageAgent::searchInResources):
1756         * inspector/InspectorPageAgent.h:
1757         * inspector/InspectorProfilerAgent.cpp:
1758         (WebCore::InspectorProfilerAgent::getProfileHeaders):
1759         (WebCore::InspectorProfilerAgent::getProfile):
1760         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
1761         * inspector/InspectorProfilerAgent.h:
1762         * inspector/InspectorRuntimeAgent.cpp:
1763         (WebCore::InspectorRuntimeAgent::evaluate):
1764         (WebCore::InspectorRuntimeAgent::callFunctionOn):
1765         (WebCore::InspectorRuntimeAgent::getProperties):
1766         * inspector/InspectorRuntimeAgent.h:
1767
1768 2011-12-20  Julien Chaffraix  <jchaffraix@webkit.org>
1769
1770         Crash in RenderTable::outerBorderAfter
1771         http://webkit.org/b/74026
1772         <rdar://problem/10552313>
1773
1774         Reviewed by Eric Seidel.
1775
1776         Test: fast/table/computeLogicalWidth-table-needsSectionRecalc.html
1777
1778         RenderBlock can call computeLogicalWidth() before calling layout(). The code in
1779         RenderTable::computeLogicalWidth would make the assumption that layout() was called
1780         as layout() is responsible for recomputing our sections.
1781
1782         To prevent the issue, let's just recompute the section if it's needed as this situation
1783         shouldn't be an error. Also adding more knowledge of table in RenderBlock seems bad.
1784
1785         * rendering/RenderTable.cpp:
1786         (WebCore::RenderTable::computeLogicalWidth):
1787         Make sure we recalculate our section if it's needed.
1788
1789 2011-12-20  Kentaro Hara  <haraken@chromium.org>
1790
1791         [Refactoring] Replace imp with impl in CodeGeneratorJS.pm
1792         https://bugs.webkit.org/show_bug.cgi?id=74901
1793
1794         Reviewed by Adam Barth.
1795
1796         As pointed out in bug 74837, the generated code by CodeGeneratorJS.pm includes
1797         both 'imp' and 'impl'. This patch unifies them into 'impl'.
1798         I confirmed that "perl -lne 'print if /imp[^a-z]/' CodeGeneratorJS.pm" outputs nothing.
1799
1800         No new tests. No change in behavior.
1801
1802         * bindings/scripts/CodeGeneratorJS.pm:
1803         (GenerateAttributeEventListenerCall):
1804         (GenerateEventListenerCall):
1805         (GenerateImplementation):
1806         (GenerateParametersCheck):
1807         (GenerateImplementationFunctionCall):
1808         (NativeToJSValue):
1809
1810         * bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests results.
1811         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
1812         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1813         (WebCore::jsTestEventConstructorAttr1):
1814         (WebCore::jsTestEventConstructorAttr2):
1815         * bindings/scripts/test/JS/JSTestInterface.cpp:
1816         (WebCore::jsTestInterfaceStr1):
1817         (WebCore::jsTestInterfaceStr2):
1818         (WebCore::jsTestInterfaceStr3):
1819         (WebCore::setJSTestInterfaceStr2):
1820         (WebCore::setJSTestInterfaceStr3):
1821         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1822         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
1823         * bindings/scripts/test/JS/JSTestObj.cpp:
1824         (WebCore::jsTestObjReadOnlyIntAttr):
1825         (WebCore::jsTestObjReadOnlyStringAttr):
1826         (WebCore::jsTestObjReadOnlyTestObjAttr):
1827         (WebCore::jsTestObjShortAttr):
1828         (WebCore::jsTestObjUnsignedShortAttr):
1829         (WebCore::jsTestObjIntAttr):
1830         (WebCore::jsTestObjLongLongAttr):
1831         (WebCore::jsTestObjUnsignedLongLongAttr):
1832         (WebCore::jsTestObjStringAttr):
1833         (WebCore::jsTestObjTestObjAttr):
1834         (WebCore::jsTestObjXMLObjAttr):
1835         (WebCore::jsTestObjCreate):
1836         (WebCore::jsTestObjReflectedStringAttr):
1837         (WebCore::jsTestObjReflectedIntegralAttr):
1838         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
1839         (WebCore::jsTestObjReflectedBooleanAttr):
1840         (WebCore::jsTestObjReflectedURLAttr):
1841         (WebCore::jsTestObjReflectedNonEmptyURLAttr):
1842         (WebCore::jsTestObjReflectedCustomIntegralAttr):
1843         (WebCore::jsTestObjReflectedCustomBooleanAttr):
1844         (WebCore::jsTestObjReflectedCustomURLAttr):
1845         (WebCore::jsTestObjReflectedCustomNonEmptyURLAttr):
1846         (WebCore::jsTestObjAttrWithGetterException):
1847         (WebCore::jsTestObjAttrWithSetterException):
1848         (WebCore::jsTestObjStringAttrWithGetterException):
1849         (WebCore::jsTestObjStringAttrWithSetterException):
1850         (WebCore::jsTestObjScriptStringAttr):
1851         (WebCore::jsTestObjConditionalAttr1):
1852         (WebCore::jsTestObjConditionalAttr2):
1853         (WebCore::jsTestObjConditionalAttr3):
1854         (WebCore::jsTestObjCachedAttribute1):
1855         (WebCore::jsTestObjCachedAttribute2):
1856         (WebCore::jsTestObjDescription):
1857         (WebCore::jsTestObjId):
1858         (WebCore::jsTestObjHash):
1859         (WebCore::setJSTestObjShortAttr):
1860         (WebCore::setJSTestObjUnsignedShortAttr):
1861         (WebCore::setJSTestObjIntAttr):
1862         (WebCore::setJSTestObjLongLongAttr):
1863         (WebCore::setJSTestObjUnsignedLongLongAttr):
1864         (WebCore::setJSTestObjStringAttr):
1865         (WebCore::setJSTestObjTestObjAttr):
1866         (WebCore::setJSTestObjXMLObjAttr):
1867         (WebCore::setJSTestObjCreate):
1868         (WebCore::setJSTestObjReflectedStringAttr):
1869         (WebCore::setJSTestObjReflectedIntegralAttr):
1870         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
1871         (WebCore::setJSTestObjReflectedBooleanAttr):
1872         (WebCore::setJSTestObjReflectedURLAttr):
1873         (WebCore::setJSTestObjReflectedNonEmptyURLAttr):
1874         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
1875         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
1876         (WebCore::setJSTestObjReflectedCustomURLAttr):
1877         (WebCore::setJSTestObjReflectedCustomNonEmptyURLAttr):
1878         (WebCore::setJSTestObjAttrWithGetterException):
1879         (WebCore::setJSTestObjAttrWithSetterException):
1880         (WebCore::setJSTestObjStringAttrWithGetterException):
1881         (WebCore::setJSTestObjStringAttrWithSetterException):
1882         (WebCore::setJSTestObjConditionalAttr1):
1883         (WebCore::setJSTestObjConditionalAttr2):
1884         (WebCore::setJSTestObjConditionalAttr3):
1885         (WebCore::setJSTestObjId):
1886         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
1887         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1888         (WebCore::jsTestObjPrototypeFunctionIntMethod):
1889         (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
1890         (WebCore::jsTestObjPrototypeFunctionObjMethod):
1891         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1892         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1893         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
1894         (WebCore::jsTestObjPrototypeFunctionIdbKey):
1895         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
1896         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
1897         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
1898         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
1899         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
1900         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame):
1901         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg):
1902         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
1903         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
1904         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
1905         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
1906         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
1907         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
1908         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
1909         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
1910         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
1911         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
1912         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
1913         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
1914         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1915         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
1916         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
1917         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
1918         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
1919         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1920         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1921         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1922         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1923         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1924         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
1925         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1926         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1927         (WebCore::jsTestSerializedScriptValueInterfaceValue):
1928
1929 2011-12-20  Alok Priyadarshi  <alokp@chromium.org>
1930
1931         [chromium] compositing/shadows tests fail with accelerated painting
1932         https://bugs.webkit.org/show_bug.cgi?id=74871
1933
1934         Reviewed by James Robinson.
1935         
1936         Switched over to new API for creating accelerated canvas GrContext::createPlatformTexture.
1937         It correctly binds the stencil buffer to the FBO.
1938
1939         Test: compositing/shadows/shadow-drawing.html (existing)
1940
1941         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
1942         (WebCore::createAcceleratedCanvas):
1943         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
1944         * platform/graphics/chromium/ManagedTexture.cpp:
1945         (WebCore::ManagedTexture::allocate):
1946         (WebCore::ManagedTexture::bindTexture):
1947         (WebCore::ManagedTexture::framebufferTexture2D):
1948         * platform/graphics/chromium/ManagedTexture.h:
1949
1950 2011-12-20  Sheriff Bot  <webkit.review.bot@gmail.com>
1951
1952         Unreviewed, rolling out r103291.
1953         http://trac.webkit.org/changeset/103291
1954         https://bugs.webkit.org/show_bug.cgi?id=74915
1955
1956         Looks like it broke fast/events/touch and
1957         fast/events/touch/gesture/gesture-scroll.html
1958         http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Mac10.5/builds/7010
1959         (Requested by loislo on #webkit).
1960
1961         * WebCore.gyp/WebCore.gyp:
1962         * WebCore.gypi:
1963         * WebCore.xcodeproj/project.pbxproj:
1964         * platform/chromium/ScrollAnimatorChromiumMac.h: Copied from Source/WebCore/platform/mac/ScrollAnimatorMac.h.
1965         (WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer):
1966         (WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer):
1967         (WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad):
1968         (WebCore::ScrollAnimatorChromiumMac::setNeedsScrollerStyleUpdate):
1969         (WebCore::ScrollAnimatorChromiumMac::needsScrollerStyleUpdate):
1970         * platform/chromium/ScrollAnimatorChromiumMac.mm: Added.
1971         (-[NSProcessInfo systemUptime]):
1972         (abs):
1973         (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
1974         (-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]):
1975         (-[ScrollAnimationHelperDelegate bounds]):
1976         (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
1977         (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
1978         (-[ScrollAnimationHelperDelegate convertSizeToBase:]):
1979         (-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
1980         (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
1981         (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
1982         (-[ScrollAnimationHelperDelegate superview]):
1983         (-[ScrollAnimationHelperDelegate documentView]):
1984         (-[ScrollAnimationHelperDelegate window]):
1985         (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
1986         (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
1987         (-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]):
1988         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
1989         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
1990         (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
1991         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
1992         (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
1993         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
1994         (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
1995         (-[ScrollbarPartAnimation setCurrentProgress:]):
1996         (-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
1997         (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
1998         (-[ScrollbarPainterDelegate cancelAnimations]):
1999         (-[ScrollbarPainterDelegate convertRectToBacking:]):
2000         (-[ScrollbarPainterDelegate convertRectFromBacking:]):
2001         (-[ScrollbarPainterDelegate layer]):
2002         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
2003         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2004         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
2005         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
2006         (-[ScrollbarPainterDelegate scrollAnimatorDestroyed]):
2007         (WebCore::ScrollAnimator::create):
2008         (WebCore::chromiumScrollbarTheme):
2009         (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac):
2010         (WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac):
2011         (WebCore::ScrollAnimatorChromiumMac::scroll):
2012         (WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation):
2013         (WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary):
2014         (WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary):
2015         (WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary):
2016         (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
2017         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
2018         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
2019         (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPointForScrollAnimation):
2020         (WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged):
2021         (WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint):
2022         (WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea):
2023         (WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea):
2024         (WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea):
2025         (WebCore::ScrollAnimatorChromiumMac::willStartLiveResize):
2026         (WebCore::ScrollAnimatorChromiumMac::contentsResized):
2027         (WebCore::ScrollAnimatorChromiumMac::willEndLiveResize):
2028         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow):
2029         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide):
2030         (WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture):
2031         (WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture):
2032         (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar):
2033         (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar):
2034         (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar):
2035         (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar):
2036         (WebCore::ScrollAnimatorChromiumMac::cancelAnimations):
2037         (WebCore::elasticDeltaForTimeDelta):
2038         (WebCore::elasticDeltaForReboundDelta):
2039         (WebCore::reboundDeltaForElasticDelta):
2040         (WebCore::scrollWheelMultiplier):
2041         (WebCore::isScrollingLeftAndShouldNotRubberBand):
2042         (WebCore::isScrollingRightAndShouldNotRubberBand):
2043         (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent):
2044         (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
2045         (WebCore::ScrollAnimatorChromiumMac::pinnedInDirection):
2046         (WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching):
2047         (WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching):
2048         (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent):
2049         (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture):
2050         (WebCore::ScrollAnimatorChromiumMac::endScrollGesture):
2051         (WebCore::ScrollAnimatorChromiumMac::snapRubberBand):
2052         (WebCore::roundTowardZero):
2053         (WebCore::roundToDevicePixelTowardZero):
2054         (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired):
2055         (WebCore::ScrollAnimatorChromiumMac::setIsActive):
2056         (WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle):
2057         (WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer):
2058         (WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive):
2059         (WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer):
2060         (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
2061         (WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect):
2062         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Added.
2063         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Added.
2064         (lookUpNSScrollerImpClass):
2065         (lookUpNSScrollerImpPairClass):
2066         (scrollbarControlSizeToNSControlSize):
2067         (preferredScrollerStyle):
2068         (wkScrollbarPainterUsesOverlayScrollers):
2069         (wkScrollbarPainterIsHorizontal):
2070         (wkScrollbarPainterKnobAlpha):
2071         (wkScrollbarPainterSetOverlayState):
2072         (wkScrollbarPainterPaint):
2073         (wkScrollbarPainterPaintTrack):
2074         (wkScrollbarPainterPaintKnob):
2075         (wkScrollbarMinimumThumbLength):
2076         (wkScrollbarPainterSetDelegate):
2077         (wkScrollbarPainterSetEnabled):
2078         (wkScrollbarPainterTrackAlpha):
2079         (wkMakeScrollbarPainter):
2080         (wkScrollbarThickness):
2081         (wkScrollbarMinimumTotalLengthNeededForThumb):
2082         (wkVerticalScrollbarPainterForController):
2083         (wkHorizontalScrollbarPainterForController):
2084         (wkScrollbarPainterControllerStyle):
2085         (wkMakeScrollbarReplacementPainter):
2086         (wkSetPainterForPainterController):
2087         (wkSetScrollbarPainterControllerStyle):
2088         (wkScrollbarPainterKnobRect):
2089         (wkSetScrollbarPainterKnobAlpha):
2090         (wkSetScrollbarPainterTrackAlpha):
2091         (wkSetScrollbarPainterKnobStyle):
2092         (wkMakeScrollbarPainterController):
2093         (wkContentAreaScrolled):
2094         (wkContentAreaWillPaint):
2095         (wkMouseEnteredContentArea):
2096         (wkMouseExitedContentArea):
2097         (wkMouseMovedInContentArea):
2098         (wkWillStartLiveResize):
2099         (wkContentAreaResized):
2100         (wkWillEndLiveResize):
2101         (wkContentAreaDidShow):
2102         (wkContentAreaDidHide):
2103         (wkDidBeginScrollGesture):
2104         (wkDidEndScrollGesture):
2105         (wkScrollbarPainterForceFlashScrollers):
2106         (isScrollbarOverlayAPIAvailable):
2107         * platform/chromium/ScrollbarThemeChromiumMac.h:
2108         (WebCore::ScrollbarThemeChromiumMac::supportsControlTints):
2109         (WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages):
2110         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2111         (WebCore::scrollbarMap):
2112         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
2113         (+[ScrollbarPrefsObserver behaviorPrefsChanged:]):
2114         (+[ScrollbarPrefsObserver registerAsObserver]):
2115         (WebCore::updateArrowPlacement):
2116         (WebCore::ScrollbarThemeChromiumMac::registerScrollbar):
2117         (WebCore::ScrollbarThemeChromiumMac::unregisterScrollbar):
2118         (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar):
2119         (WebCore::ScrollbarThemeChromiumMac::painterForScrollbar):
2120         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
2121         (WebCore::ScrollbarThemeChromiumMac::preferencesChanged):
2122         (WebCore::ScrollbarThemeChromiumMac::scrollbarThickness):
2123         (WebCore::ScrollbarThemeChromiumMac::usesOverlayScrollbars):
2124         (WebCore::toScrollbarPainterKnobStyle):
2125         (WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle):
2126         (WebCore::ScrollbarThemeChromiumMac::initialAutoscrollTimerDelay):
2127         (WebCore::ScrollbarThemeChromiumMac::autoscrollTimerDelay):
2128         (WebCore::ScrollbarThemeChromiumMac::buttonsPlacement):
2129         (WebCore::ScrollbarThemeChromiumMac::hasButtons):
2130         (WebCore::ScrollbarThemeChromiumMac::hasThumb):
2131         (WebCore::buttonRepaintRect):
2132         (WebCore::ScrollbarThemeChromiumMac::backButtonRect):
2133         (WebCore::ScrollbarThemeChromiumMac::forwardButtonRect):
2134         (WebCore::ScrollbarThemeChromiumMac::trackRect):
2135         (WebCore::ScrollbarThemeChromiumMac::minimumThumbLength):
2136         (WebCore::ScrollbarThemeChromiumMac::shouldCenterOnThumb):
2137         (WebCore::ScrollbarThemeChromiumMac::shouldDragDocumentInsteadOfThumb):
2138         (WebCore::scrollbarPartToHIPressedState):
2139         (WebCore::ScrollbarThemeChromiumMac::updateEnabledState):
2140         (WebCore::ScrollbarThemeChromiumMac::paint):
2141         * platform/mac/EmptyProtocolDefinitions.h:
2142         * platform/mac/NSScrollerImpDetails.h:
2143         * platform/mac/NSScrollerImpDetails.mm: Removed.
2144         * platform/mac/ScrollAnimatorMac.h:
2145         * platform/mac/ScrollAnimatorMac.mm:
2146         (-[WebScrollbarPainterDelegate layer]):
2147         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2148         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2149         (WebCore::ScrollAnimatorMac::notifyPositionChanged):
2150         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
2151         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
2152         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
2153         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
2154         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
2155         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
2156         (WebCore::ScrollAnimatorMac::willStartLiveResize):
2157         (WebCore::ScrollAnimatorMac::contentsResized):
2158         (WebCore::ScrollAnimatorMac::willEndLiveResize):
2159         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
2160         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
2161         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
2162         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
2163         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2164         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2165         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2166         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2167         (WebCore::ScrollAnimatorMac::cancelAnimations):
2168         (WebCore::ScrollAnimatorMac::setIsActive):
2169         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2170         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
2171         * platform/mac/ScrollElasticityController.h:
2172         * platform/mac/ScrollbarThemeMac.h:
2173         * platform/mac/ScrollbarThemeMac.mm:
2174         (+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
2175         (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
2176         (WebCore::ScrollbarTheme::nativeTheme):
2177         (WebCore::updateArrowPlacement):
2178         (WebCore::ScrollbarThemeMac::registerScrollbar):
2179         (WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
2180         (WebCore::ScrollbarThemeMac::scrollbarThickness):
2181         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
2182         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
2183         (WebCore::ScrollbarThemeMac::hasButtons):
2184         (WebCore::ScrollbarThemeMac::hasThumb):
2185         (WebCore::ScrollbarThemeMac::minimumThumbLength):
2186         (WebCore::scrollbarPartToHIPressedState):
2187         (WebCore::ScrollbarThemeMac::updateEnabledState):
2188         (WebCore::ScrollbarThemeMac::paint):
2189
2190 2011-12-19  Adam Klein  <adamk@chromium.org>
2191
2192         Make all calls to NamedNodeMap::setAttributes go through Element
2193         https://bugs.webkit.org/show_bug.cgi?id=74895
2194
2195         Reviewed by Ryosuke Niwa.
2196
2197         There are two reasons for this change. One is an optimization: some
2198         callers were previously always creating a NamedNodeMap even if the
2199         source didn't have any attributes.
2200
2201         The other reason is forward-looking: setAttributes' behavior is subtly
2202         wrong in the presence of MutationObservers. This doesn't matter
2203         for most callers since the element on which setAttributesFromElement
2204         is called is newly-created. In the editing case, however, it could
2205         make a difference in behavior, which I hope to fix in a future change
2206         without sacrificing the performance of cloneNode() on an Element
2207         (which is what NamedNodeMap::setAttributes is designed for).
2208
2209         No new tests, no change in behavior.
2210
2211         * dom/Element.cpp:
2212         (WebCore::Element::cloneElementWithoutChildren): Call setAttributesFromElement.
2213         * dom/Element.h:
2214         (WebCore::Element::setAttributesFromElement): Create new inline helper method
2215         which conditionally forwards to NamedNodeMap::setAttribute.
2216         * dom/NamedNodeMap.h: Make setAttributes private (Element is already a friend).
2217         * editing/ReplaceNodeWithSpanCommand.cpp:
2218         (WebCore::swapInNodePreservingAttributesAndChildren): Call setAttributesFromElement.
2219         * inspector/InspectorDOMAgent.cpp:
2220         (WebCore::InspectorDOMAgent::setNodeName): Call setAttributesFromElement.
2221         * svg/SVGUseElement.cpp:
2222         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Call setAttributesFromElement.
2223         (WebCore::SVGUseElement::transferUseAttributesToReplacedElement): Call setAttributesFromElement
2224         and make use of ASSERT_NO_EXCEPTION to make code easier to read.
2225
2226 2011-12-19  Leo Yang  <leo.yang@torchmobile.com.cn>
2227
2228         [BlackBerry] Upstream the BlackBerry change to ResourceRequestBase.cpp
2229         https://bugs.webkit.org/show_bug.cgi?id=74910
2230
2231         Reviewed by Daniel Bates.
2232
2233         No functionality change to the existing code, no new tests.
2234
2235         * platform/network/ResourceRequestBase.cpp: The BlackBerry porting has its own
2236         initializeMaximumHTTPConnectionCountPerHost(). Exclude the default implementation.
2237
2238 2011-12-19  Leo Yang  <leo.yang@torchmobile.com.cn>
2239
2240         [BlackBerry] Upstream the BlackBerry change to NetworkStateNotifier.h
2241         https://bugs.webkit.org/show_bug.cgi?id=74904
2242
2243         Reviewed by Daniel Bates.
2244
2245         No functionality change to existing code, no new tests.
2246
2247         * platform/network/NetworkStateNotifier.h:
2248
2249 2011-12-19  Yael Aharon  <yael.aharon@nokia.com>
2250
2251         Update dropzone implementation per spec update
2252         https://bugs.webkit.org/show_bug.cgi?id=74834
2253
2254         Reviewed by Tony Chang.
2255
2256         Update support for dropzone attribute to use file: and string: instead of f: and s:. 
2257         http://www.whatwg.org/specs/web-apps/current-work/#the-dropzone-attribute
2258
2259         No new tests. Existing tests cover this and were updated.
2260
2261         * dom/Clipboard.cpp:
2262         (WebCore::Clipboard::hasDropZoneType):
2263
2264 2011-12-19  Sam Weinig  <sam@webkit.org>
2265
2266         Add support for scrollLineDown: and scrollLineUp: NSResponder selectors
2267         https://bugs.webkit.org/show_bug.cgi?id=74907
2268
2269         Reviewed by Dan Bernstein.
2270
2271         Added API test: WebKit2.ScrollByLineCommands
2272
2273         * editing/EditorCommand.cpp:
2274         (WebCore::executeScrollLineUp):
2275         (WebCore::executeScrollLineDown):
2276         (WebCore::createCommandMap):
2277         Add implementations for scrollLineUp/Down. Do not expose
2278         these to execCommand
2279
2280 2011-12-19  Huang Dongsung  <luxtella@company100.net>
2281
2282         [QT] WebGL can not make the frame buffer with the stencil buffer.
2283         https://bugs.webkit.org/show_bug.cgi?id=74783
2284
2285         When initializing a framebuffer in OpenGL ES 2, we need to initialize the depth
2286         and stencil buffers separately, as opposed to the combined depth-stencil buffer
2287         we initialize for desktop GL.
2288
2289         This makes fast/canvas/webgl/context-attributes-depth-stencil-combination.html
2290         work in OpenGL ES 2.
2291
2292         Reviewed by Noam Rosenthal.
2293
2294         * platform/graphics/GraphicsContext3D.h:
2295         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2296         (WebCore::GraphicsContext3D::GraphicsContext3D):
2297         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2298         (WebCore::GraphicsContext3D::reshape):
2299
2300 2011-12-19  Ami Fischman  <fischman@chromium.org>
2301
2302         Teach VideoLayerChromium how to render native texture (to support HW video decode).
2303         https://bugs.webkit.org/show_bug.cgi?id=73043
2304
2305         Reviewed by James Robinson.
2306         
2307         Fix the life-cycle of video frames handled by VideoLayerChromium/CCVideoLayerImpl.
2308         VideoFrameProvider::{get,put}CurrentFrame provide lease semantics.  Previously
2309         VideoLayerChromium would acquire the lease for the duration of copying the frame,
2310         even if that was only a texture ID, and immediately return the lease, while
2311         CCVideoLayerImpl::draw() would come along later and use the (no-longer locked)
2312         texture optimistically.  This change makes it so that CCVideoLayerImpl holds
2313         the frame's lease for the duration of draw(), guaranteeing the frame is valid to read.
2314
2315         Existing test coverage (compositing/video/, LayoutTests).  HW render of
2316         HW-decoded textures is not yet tested explicitly.
2317
2318         * platform/graphics/chromium/VideoLayerChromium.cpp:
2319         (WebCore::VideoLayerChromium::VideoLayerChromium):
2320         (WebCore::VideoLayerChromium::~VideoLayerChromium):
2321         (WebCore::VideoLayerChromium::createCCLayerImpl):
2322         (WebCore::VideoLayerChromium::releaseProvider):
2323         * platform/graphics/chromium/VideoLayerChromium.h:
2324         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2325         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
2326         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
2327         (WebCore::CCVideoLayerImpl::setProvider):
2328         (WebCore::convertVFCFormatToGC3DFormat):
2329         (WebCore::CCVideoLayerImpl::draw):
2330         (WebCore::CCVideoLayerImpl::copyFrameToTextures):
2331         (WebCore::CCVideoLayerImpl::copyPlaneToTexture):
2332         (WebCore::computeVisibleSize):
2333         (WebCore::CCVideoLayerImpl::reserveTextures):
2334         (WebCore::CCVideoLayerImpl::drawYUV):
2335         (WebCore::CCVideoLayerImpl::drawCommon):
2336         (WebCore::CCVideoLayerImpl::drawRGBA):
2337         (WebCore::CCVideoLayerImpl::drawNativeTexture):
2338         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2339
2340 2011-12-19  Sam Weinig  <sam@webkit.org>
2341
2342         More PlatformEvent cleanup
2343         https://bugs.webkit.org/show_bug.cgi?id=74831
2344
2345         Reviewed by Dan Bernstein.
2346
2347         * platform/PlatformMouseEvent.h:
2348         (WebCore::PlatformMouseEvent::position):
2349         Rename pos -> position(). Remove x() and y() accessors.
2350
2351         (WebCore::PlatformMouseEvent::globalPosition):
2352         Added. Replaces globalX() and globalY() accessors.
2353
2354         (WebCore::PlatformMouseEvent::movementDelta):
2355         Added. Replaces movementX() and movementY() accessors.
2356
2357         * platform/PlatformWheelEvent.h:
2358         (WebCore::PlatformWheelEvent::position):
2359         Renamed pos -> position().
2360
2361         (WebCore::PlatformWheelEvent::globalPosition):
2362         Renamed globalPos -> globalPosition().
2363
2364         * dom/MouseEvent.cpp:
2365         (WebCore::MouseEvent::create):
2366         * dom/WheelEvent.cpp:
2367         (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
2368         * page/DragController.cpp:
2369         (WebCore::DragController::startDrag):
2370         * page/EventHandler.cpp:
2371         (WebCore::EventHandler::handleMousePressEventSingleClick):
2372         (WebCore::EventHandler::handleMousePressEvent):
2373         (WebCore::EventHandler::eventMayStartDrag):
2374         (WebCore::EventHandler::handleMouseReleaseEvent):
2375         (WebCore::EventHandler::selectCursor):
2376         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2377         (WebCore::EventHandler::handleMouseMoveEvent):
2378         (WebCore::EventHandler::dispatchDragEvent):
2379         (WebCore::EventHandler::prepareMouseEvent):
2380         (WebCore::EventHandler::dispatchMouseEvent):
2381         (WebCore::EventHandler::handleWheelEvent):
2382         (WebCore::EventHandler::sendContextMenuEvent):
2383         (WebCore::EventHandler::handleDrag):
2384         (WebCore::EventHandler::handleTouchEvent):
2385         * page/chromium/EventHandlerChromium.cpp:
2386         (WebCore::EventHandler::passMousePressEventToSubframe):
2387         * platform/Scrollbar.cpp:
2388         (WebCore::Scrollbar::mouseMoved):
2389         (WebCore::Scrollbar::mouseDown):
2390         * platform/ScrollbarThemeComposite.cpp:
2391         (WebCore::ScrollbarThemeComposite::hitTest):
2392         * platform/chromium/PopupContainer.cpp:
2393         (WebCore::constructRelativeMouseEvent):
2394         (WebCore::constructRelativeWheelEvent):
2395         * platform/chromium/PopupListBox.cpp:
2396         (WebCore::PopupListBox::handleMouseDownEvent):
2397         (WebCore::PopupListBox::handleMouseMoveEvent):
2398         (WebCore::PopupListBox::handleMouseReleaseEvent):
2399         (WebCore::PopupListBox::handleWheelEvent):
2400         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
2401         (WebCore::ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin):
2402         * platform/qt/ScrollbarQt.cpp:
2403         (WebCore::Scrollbar::contextMenu):
2404         * platform/qt/ScrollbarThemeQt.cpp:
2405         (WebCore::ScrollbarThemeQt::hitTest):
2406         * platform/win/ScrollbarThemeWin.cpp:
2407         (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
2408         * rendering/RenderLayer.cpp:
2409         (WebCore::RenderLayer::resize):
2410         Update to use new names, access style.
2411
2412 2011-12-19  Adam Klein  <adamk@chromium.org>
2413
2414         Remove unused ExceptionCode& argument from Element::setAttribute(QualifiedName)
2415         https://bugs.webkit.org/show_bug.cgi?id=74740
2416
2417         Reviewed by Ryosuke Niwa.
2418
2419         Updated lots of callers to remove third argument. The list of changes
2420         below only lists things other than updating callers.
2421
2422         * dom/Document.cpp:
2423         (WebCore::Document::importNode):
2424         * dom/Element.cpp:
2425         (WebCore::Element::setAttribute):
2426         (WebCore::Element::setAttributeNS):
2427         (WebCore::Element::setIntegralAttribute):
2428         (WebCore::Element::setUnsignedIntegralAttribute):
2429         * dom/Element.h: Removed third arg from method, removed old two-arg
2430         overload which now has an identical signature.
2431         * editing/mac/EditorMac.mm: Updated caller and used
2432         ASSERT_NO_EXCEPTION for nearby code.
2433         (WebCore::styleForSelectionStart):
2434         * html/HTMLElement.cpp:
2435         (WebCore::HTMLElement::setContentEditable):
2436         * inspector/InspectorDOMAgent.cpp:
2437         (WebCore::InspectorDOMAgent::setAttributesAsText):
2438         * svg/SVGAnimationElement.cpp:
2439         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
2440         * svg/SVGElement.idl: Removed 'setter raises(DOMException)'
2441         * svg/SVGGlyphRefElement.idl: ditto.
2442         * svg/SVGStyleElement.cpp:
2443         (WebCore::SVGStyleElement::setType):
2444         (WebCore::SVGStyleElement::setMedia):
2445         (WebCore::SVGStyleElement::setTitle):
2446         * xml/parser/XMLTreeBuilder.cpp:
2447         (WebCore::XMLTreeBuilder::processAttributes):
2448
2449 2011-12-19  Kentaro Hara  <haraken@chromium.org>
2450
2451         Unreviewed. Rebaselined run-bindings-tests results.
2452
2453         * bindings/scripts/test/JS/JSFloat64Array.h:
2454         (WebCore::JSFloat64Array::create):
2455         (WebCore::JSFloat64ArrayPrototype::create):
2456         (WebCore::JSFloat64ArrayConstructor::create):
2457         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2458         (WebCore::JSTestEventConstructor::create):
2459         (WebCore::JSTestEventConstructorPrototype::create):
2460         (WebCore::JSTestEventConstructorConstructor::create):
2461         * bindings/scripts/test/JS/JSTestInterface.h:
2462         (WebCore::JSTestInterface::create):
2463         (WebCore::JSTestInterfacePrototype::create):
2464         (WebCore::JSTestInterfaceConstructor::create):
2465         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2466         (WebCore::JSTestMediaQueryListListener::create):
2467         (WebCore::JSTestMediaQueryListListenerPrototype::create):
2468         (WebCore::JSTestMediaQueryListListenerConstructor::create):
2469         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2470         (WebCore::JSTestNamedConstructor::create):
2471         (WebCore::JSTestNamedConstructorPrototype::create):
2472         (WebCore::JSTestNamedConstructorConstructor::create):
2473         (WebCore::JSTestNamedConstructorNamedConstructor::create):
2474         * bindings/scripts/test/JS/JSTestObj.h:
2475         (WebCore::JSTestObj::create):
2476         (WebCore::JSTestObjPrototype::create):
2477         (WebCore::JSTestObjConstructor::create):
2478         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2479         (WebCore::JSTestSerializedScriptValueInterface::create):
2480         (WebCore::JSTestSerializedScriptValueInterfacePrototype::create):
2481         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
2482
2483 2011-12-19  James Robinson  <jamesr@chromium.org>
2484
2485         [chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired
2486         https://bugs.webkit.org/show_bug.cgi?id=74376
2487
2488         Reviewed by Kenneth Russell.
2489
2490         CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the
2491         CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new
2492         frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all
2493         implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper
2494         scheduling decision.
2495
2496         This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to
2497         CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic.
2498
2499         There is a large amount of unit test coverage for this change, largely in LayerChromiumTest
2500
2501         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2502         * platform/graphics/chromium/GraphicsLayerChromium.h:
2503         * platform/graphics/chromium/LayerChromium.cpp:
2504         (WebCore::LayerChromium::setNeedsCommit):
2505         (WebCore::LayerChromium::insertChild):
2506         * platform/graphics/chromium/LayerChromium.h:
2507         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2508         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
2509         (WebCore::CCLayerTreeHost::setRootLayer):
2510         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2511         * platform/graphics/chromium/cc/CCScopedThreadProxy.h:
2512         (WebCore::CCScopedThreadProxy::runTaskIfNotShutdown):
2513
2514 2011-12-19  Sailesh Agrawal <sail@chromium.org>
2515
2516         Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac
2517         https://bugs.webkit.org/show_bug.cgi?id=61144
2518
2519         Reviewed by Beth Dakin.
2520
2521         At a high level the main changes are:
2522             - replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks
2523             - delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff.
2524             - delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing
2525             - delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing
2526
2527         No new tests. Just refactoring.
2528
2529         * WebCore.gyp/WebCore.gyp:
2530         * WebCore.gypi:
2531         * WebCore.xcodeproj/project.pbxproj:
2532         * platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
2533         * platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
2534         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed.
2535         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed.
2536         * platform/chromium/ScrollbarThemeChromiumMac.h:
2537         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2538         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
2539         (WebCore::scrollbarPainterPaintTrack):
2540         (WebCore::ScrollbarThemeChromiumMac::paint):
2541         * platform/mac/EmptyProtocolDefinitions.h:
2542         * platform/mac/NSScrollerImpDetails.h:
2543         (WebCore::isScrollbarOverlayAPIAvailable):
2544         * platform/mac/NSScrollerImpDetails.mm: Added.
2545         (WebCore::isScrollbarOverlayAPIAvailable):
2546         (WebCore::recommendedScrollerStyle):
2547         * platform/mac/ScrollAnimatorMac.h:
2548         * platform/mac/ScrollAnimatorMac.mm:
2549         (scrollbarPainterForScrollbar):
2550         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2551         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2552         (WebCore::ScrollAnimatorMac::notifyPositionChanged):
2553         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
2554         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
2555         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
2556         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
2557         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
2558         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
2559         (WebCore::ScrollAnimatorMac::willStartLiveResize):
2560         (WebCore::ScrollAnimatorMac::contentsResized):
2561         (WebCore::ScrollAnimatorMac::willEndLiveResize):
2562         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
2563         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
2564         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
2565         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
2566         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2567         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2568         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2569         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2570         (WebCore::ScrollAnimatorMac::cancelAnimations):
2571         (WebCore::ScrollAnimatorMac::setIsActive):
2572         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2573         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
2574         * platform/mac/ScrollElasticityController.h:
2575         * platform/mac/ScrollbarThemeMac.h:
2576         * platform/mac/ScrollbarThemeMac.mm:
2577         (+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
2578         (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
2579         (WebCore::updateArrowPlacement):
2580         (WebCore::ScrollbarThemeMac::registerScrollbar):
2581         (WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer):
2582         (WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
2583         (WebCore::ScrollbarThemeMac::scrollbarThickness):
2584         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
2585         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
2586         (WebCore::ScrollbarThemeMac::hasButtons):
2587         (WebCore::ScrollbarThemeMac::hasThumb):
2588         (WebCore::ScrollbarThemeMac::minimumThumbLength):
2589         (WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState):
2590         (WebCore::ScrollbarThemeMac::updateEnabledState):
2591         (WebCore::scrollbarPainterPaint):
2592         (WebCore::ScrollbarThemeMac::paint):
2593
2594 2011-12-19  James Robinson  <jamesr@chromium.org>
2595
2596         [chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly
2597         https://bugs.webkit.org/show_bug.cgi?id=74477
2598
2599         Reviewed by Kenneth Russell.
2600
2601         This enforces that the m_layerTreeHost pointer on LayerChromium instances is always up to date, instead of
2602         lazily setting it in the paintContents loop. There are two invariants:
2603         1.) If a LayerChromium is the root layer of a CCLayerTreeHost, or is reachable via the children, mask, or
2604         replica pointers from the root layer of a CCLayerTreeHost, then that LayerChromium's m_layerTreeHost pointer
2605         refers to that CCLayerTreeHost
2606         2.) If a LayerChromium is not a root layer or reachable from a root layer of any CCLayerTreeHost, its
2607         CCLayerTreeHost pointer is nil.
2608
2609         Covered by several new layout tests in LayerChromiumTest
2610
2611         * platform/graphics/chromium/LayerChromium.cpp:
2612         (WebCore::LayerChromium::setLayerTreeHost):
2613         (WebCore::LayerChromium::setParent):
2614         (WebCore::LayerChromium::setMaskLayer):
2615         (WebCore::LayerChromium::setReplicaLayer):
2616         * platform/graphics/chromium/LayerChromium.h:
2617         * platform/graphics/chromium/TiledLayerChromium.cpp:
2618         (WebCore::TiledLayerChromium::createTile):
2619         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2620         (WebCore::CCLayerTreeHost::setRootLayer):
2621         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
2622         (WebCore::CCLayerTreeHost::paintLayerContents):
2623         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2624
2625 2011-12-19  Joshua Bell  <jsbell@chromium.org>
2626
2627         IndexedDB multiple calls to transaction.objectStore(name) should return the same instance
2628         https://bugs.webkit.org/show_bug.cgi?id=60208
2629
2630         Reviewed by Tony Chang.
2631
2632         Ditto for calls to IDBObjectStore.index(). Calling these methods after the
2633         enclosing transaction has finished now consistently throws an error, which
2634         allows us to break reference cycles.
2635
2636         Test: storage/indexeddb/mozilla/object-identity.html
2637
2638         * storage/IDBDatabase.cpp:
2639         (WebCore::IDBDatabase::createObjectStore):
2640         * storage/IDBObjectStore.cpp:
2641         (WebCore::IDBObjectStore::createIndex):
2642         (WebCore::IDBObjectStore::index):
2643         (WebCore::IDBObjectStore::transactionFinished):
2644         * storage/IDBObjectStore.h:
2645         * storage/IDBTransaction.cpp:
2646         (WebCore::IDBTransaction::objectStore):
2647         (WebCore::IDBTransaction::objectStoreCreated):
2648         (WebCore::IDBTransaction::dispatchEvent):
2649         * storage/IDBTransaction.h:
2650
2651 2011-12-19  Anders Carlsson  <andersca@apple.com>
2652
2653         Send gesture events through the event dispatcher and scrolling coordinator
2654         https://bugs.webkit.org/show_bug.cgi?id=74879
2655
2656         Reviewed by Andreas Kling.
2657
2658         * WebCore.exp.in:
2659         Export ScrollingCoordinator::handleGestureEvent.
2660
2661         * page/ScrollingCoordinator.cpp:
2662         (WebCore::ScrollingCoordinator::handleGestureEvent):
2663         * page/ScrollingCoordinator.h:
2664         Add handleGestureEvent stub.
2665
2666 2011-12-19  Kentaro Hara  <haraken@chromium.org>
2667
2668         Move WebAudio and WebSocket getters from JSDOMWindowCustom.cpp
2669         to JSDOMWindow{WebAudio,WebSocket}Custom.cpp
2670         https://bugs.webkit.org/show_bug.cgi?id=74841
2671
2672         Reviewed by Adam Barth.
2673
2674         This is the second step for bug 74599. We are planning to enable the [Supplemental]
2675         IDL and modularize WebAudio and WebSocket on AppleWebKit. This patch moves
2676         webkitAudioContext() and webSocket() from JSDOMWindowCustom.cpp to JSDOMWindowWebAudioCustom.cpp
2677         and JSDOMWindowWebSocketCustom.cpp, for modularization.
2678
2679         Tests: Confirm that build succeeds.
2680                http/tests/websocket/tests/*
2681
2682         * GNUmakefile.list.am: Added JSDOMWindowWebAudioCustom.cpp and JSDOMWindowWebSocketCustom.cpp.
2683         * Target.pri: Ditto.
2684         * UseJSC.cmake: Ditto.
2685         * WebCore.gypi: Ditto.
2686         * WebCore.vcproj/WebCore.vcproj: Ditto.
2687         * WebCore.xcodeproj/project.pbxproj: Ditto.
2688         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
2689
2690         * bindings/js/JSDOMWindowCustom.cpp: For now we do not remove settingsForWindow(),
2691         webkitAudioContext() and webSocket(), since other build systems are still using them.
2692         We will remove them after all build systems implement the [Supplemental] IDL.
2693         * bindings/js/JSDOMWindowWebAudioCustom.cpp: Added.
2694         (WebCore::settingsForWindowWebAudio):
2695         (WebCore::JSDOMWindow::webkitAudioContext):
2696         * bindings/js/JSDOMWindowWebSocketCustom.cpp: Added.
2697         (WebCore::settingsForWindowWebSocket):
2698         (WebCore::JSDOMWindow::webSocket):
2699
2700         * bindings/scripts/CodeGeneratorJS.pm: Until we implement the [Supplemental] IDL
2701         on all build systems, we need to temporarily allow two kinds of webkitAudioContext()
2702         and webSocket().
2703         (GenerateHeader):
2704
2705 2011-12-16  Zhenyao Mo  <zmo@google.com>
2706
2707         Postpone deleteRenderbuffer/deleteTexture until all framebuffer attachment points are removed.
2708         https://bugs.webkit.org/show_bug.cgi?id=74741
2709
2710         Reviewed by Kenneth Russell.
2711
2712         Use WebGLObject's attachment count mechanism to track if a renderbuffer/texture
2713         is still attached to framebuffers, and if its deletion should be delated or not.
2714
2715         * html/canvas/WebGLFramebuffer.cpp:
2716         (WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer):
2717         (WebCore::WebGLFramebuffer::getAttachment):
2718         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
2719         (WebCore::WebGLFramebuffer::deleteObjectImpl):
2720         (WebCore::WebGLFramebuffer::isBound):
2721         * html/canvas/WebGLFramebuffer.h:
2722
2723 2011-12-19  Iain Merrick  <husky@google.com>
2724
2725         [chromium] Accelerated canvas broken in threaded compositing mode
2726         https://bugs.webkit.org/show_bug.cgi?id=72738
2727
2728         We were flushing the Skia canvas in updateCompositorResources, which
2729         is illegal as it runs on the wrong thread. Moved to paintContentsIfDirty
2730         instead. For correct rendering on the compositor thread, we make a copy
2731         of the canvas texture in updateCompositorResources.
2732
2733         Removed m_textureId and pushPropertiesTo from CanvasLayerChromium, as
2734         it's no longer common between Canvas2DLayerChromium and
2735         WebGLLayerChromium. WebGL changes do not change functionality.
2736
2737         Reviewed by James Robinson.
2738
2739         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2740         (WebCore::Canvas2DLayerChromium::create):
2741         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
2742         (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
2743         (WebCore::Canvas2DLayerChromium::setTextureId):
2744         (WebCore::Canvas2DLayerChromium::contentChanged):
2745         (WebCore::Canvas2DLayerChromium::drawsContent):
2746         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
2747         (WebCore::Canvas2DLayerChromium::setLayerTreeHost):
2748         (WebCore::Canvas2DLayerChromium::setTextureManager):
2749         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
2750         (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
2751         (WebCore::Canvas2DLayerChromium::unreserveContentsTexture):
2752         (WebCore::Canvas2DLayerChromium::cleanupResources):
2753         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2754         * platform/graphics/chromium/CanvasLayerChromium.cpp:
2755         (WebCore::CanvasLayerChromium::CanvasLayerChromium):
2756         * platform/graphics/chromium/CanvasLayerChromium.h:
2757         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2758         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
2759         (WebCore::WebGLLayerChromium::pushPropertiesTo):
2760         * platform/graphics/chromium/WebGLLayerChromium.h:
2761         (WebCore::WebGLLayerChromium::textureId):
2762         (WebCore::WebGLLayerChromium::setTextureId):
2763         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
2764         (WebCore::CCCanvasLayerImpl::textureId):
2765         * platform/graphics/skia/ImageBufferSkia.cpp:
2766         (WebCore::createAcceleratedCanvas):
2767
2768 2011-12-19  Mike Reed  <reed@google.com>
2769
2770         [skia] cache typeface in FontPlatformData
2771         https://bugs.webkit.org/show_bug.cgi?id=74415
2772
2773         Reviewed by Stephen White.
2774
2775         No new tests. optimization only, existing tests in play
2776
2777         * platform/graphics/chromium/FontChromiumWin.cpp:
2778         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
2779         (WebCore::Font::drawGlyphs):
2780         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
2781         (WebCore::CreateTypefaceFromHFont):
2782         (WebCore::FontPlatformData::FontPlatformData):
2783         (WebCore::FontPlatformData::operator=):
2784         (WebCore::FontPlatformData::~FontPlatformData):
2785         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
2786         (WebCore::FontPlatformData::typeface):
2787         (WebCore::FontPlatformData::lfQuality):
2788         (WebCore::FontPlatformData::hash):
2789         * platform/graphics/skia/SkiaFontWin.cpp:
2790         (WebCore::setupPaintForFont):
2791         (WebCore::paintSkiaText):
2792         * platform/graphics/skia/SkiaFontWin.h:
2793
2794 2011-12-04  Robert Hogan  <robert@webkit.org>
2795
2796         CSS 2.1 failure: border-conflict-element-*
2797         https://bugs.webkit.org/show_bug.cgi?id=71244
2798
2799         Reviewed by Darin Adler.
2800
2801         From http://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution :
2802          "When two adjacent cells have the same border-width and the same border-style in a 
2803           'border-collapse: collapse' table, then the color of the border from the leftmost cell wins
2804           (if the table's 'direction' is 'ltr'; right, if it is 'rtl') and the color of the border
2805           from the topmost cell wins."
2806
2807         RenderTable manages collapsed borders by first creating a list of unique border values sorted in ascending
2808         priority. A unique border value is determined by style, width and color and cell-type precedence. For each 
2809         entry in this list RenderTableSection paints each cell in its section starting at the top-left. If a cell 
2810         is using the border RenderTable is currently iterating for, the cell will paint that border. 
2811
2812         The problems with this approach are:
2813           1. Painting cells from the top-left to the bottom-right means that borders further to the right and to the bottom
2814              of the table will paint over those further to the left and the top, breaking the precedence due to cell position.
2815           2. It creates more unique borders in the list than necessary. Borders that differ only on color do not need to be painted in 
2816              a separate iteration. Precedence in such cases is determined by cell position.
2817
2818         So in order to respect cell position when painting collapsed borders:
2819           1. RenderTableCell now treats borders with the same style, width and precedence as equal. This results in a performance
2820              improvement on tables where collapsed borders differ only in color, since RenderTable is no longer painting every cell in the table
2821              for each unique collapsed border color. It also allows color to be a function of cell position rather than border type.
2822           2. RenderTableSection now paints collapsed borders separately from cells and from the bottom-right to the top-left instead of top-left
2823              to bottom-right. If a collapsed border has precedence due to style, width or cell-group-type it will still be respected but precedence 
2824              due to color is enforced by painting cells nearer to the top and left *after* cells nearer to the bottom and right.
2825
2826         The order in which collapsed borders paint over each other in the same cell has not changed. Unlike Firefox,
2827         WebKit does not attempt render them as diagonals or attempt to give borders on the edge of the table precedence
2828         so that grooved and ridged styles have a smooth edge all round the table.
2829
2830         This fixes the following failing tests from the border-conflict-element-* set
2831         in the CSS 2.1 test suite:
2832           border-conflict-element-001d.htm
2833           border-conflict-element-0037.htm
2834           border-conflict-element-0038.htm
2835
2836         One test in the suite is known to be wrong, so a corrected version has been landed outside the 
2837         css2.1 folder:
2838           border-conflict-element-002.htm
2839
2840         This change entails rebaselining quite a few tests, see the LayoutTests ChangeLog for a full
2841         explanation of the rebaselines.
2842
2843         * rendering/RenderTableCell.cpp:
2844         (WebCore::RenderTableCell::paint):
2845         (WebCore::addBorderStyle):
2846         (WebCore::compareBorderValuesForQSort):
2847         (WebCore::RenderTableCell::paintCollapsedBorders):
2848         * rendering/RenderTableCell.h:
2849         * rendering/RenderTableSection.cpp:
2850         (WebCore::RenderTableSection::paintCell):
2851         (WebCore::RenderTableSection::paintObject):
2852         * rendering/style/CollapsedBorderValue.h:
2853         (WebCore::CollapsedBorderValue::isSameIgnoringColor):
2854
2855 2011-12-19  Jer Noble  <jer.noble@apple.com>
2856
2857         MediaController: cannot scrub while playing.
2858         https://bugs.webkit.org/show_bug.cgi?id=74870
2859         rdar://problem/10602037
2860
2861         Reviewed by Eric Carlson.
2862
2863         Updated media/media-controller-playback.html test.
2864
2865         * html/HTMLMediaElement.cpp:
2866         (WebCore::HTMLMediaElement::setController): Change order of operations; set the controllers media
2867             element before passing controller to the controls.
2868         * html/MediaController.cpp:
2869         (MediaController::updatePlaybackState): Stop the playback clock when WAITING or ENDED.
2870         (MediaController::beginScrubbing): Stop the playback clock.
2871         (MediaController::endScrubbing): Restart (if necessary) the playback clock.
2872         (MediaController::canPlay): Return true if paused.
2873         * platform/mac/PlatformClockCA.cpp:
2874         (PlatformClockCA::setCurrentTime): Stop the CAClock before changing the current time.
2875
2876 2011-12-19  Adam Barth  <abarth@webkit.org>
2877
2878         We don't pass all of the html5lib unsafe-text.dat tests
2879         https://bugs.webkit.org/show_bug.cgi?id=74825
2880
2881         Reviewed by Eric Seidel.
2882
2883         This patch is actually three (tiny) related patches.  Together these
2884         changes cause use to pass the plain-text-unsafe.dat tests from html5lib.
2885
2886         Tests: html5lib/runner.html
2887
2888         * html/parser/HTMLTokenizer.cpp:
2889         (WebCore::::shouldSkipNullCharacters):
2890             - We're not supposed to skip null characters in the PLAINTEXTState.
2891               This might cause compatibility problems with text/plain documents
2892               that contains NUL characters because we use the PLAINTEXTState
2893               to parse them.  If we run into any trouble, it's easy to fix in
2894               TextDocumentParser.
2895         * html/parser/HTMLTreeBuilder.cpp:
2896         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
2897             - Fix typo.
2898         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
2899             - We're supposed to replace NUL characters if the next character
2900               token if we're in foreign content.  The previous check didn't
2901               quite get this case correctly.
2902         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
2903             - Now that we replace NUL characters with the replacement
2904               character, we need to be more careful about the fact that
2905               replacement characters don't flip m_framesetOk to false.  Note:
2906               This new check matches the check for non-foreign content.
2907
2908 2011-12-19  Adam Barth  <abarth@webkit.org>
2909
2910         WebKit should support HTML entities that expand to more than one character
2911         https://bugs.webkit.org/show_bug.cgi?id=74826
2912
2913         Reviewed by Darin Adler.
2914
2915         Tests: html5lib/runner.html
2916
2917         * html/parser/HTMLEntityNames.in:
2918             - Add missing HTML entities from HTML5 spec.  I'll sort this file
2919               in a followup patch.  (It's not quite sorted perfectly and
2920               sorting in this patch would introduce noise into the patch.)
2921         * html/parser/HTMLEntityParser.cpp:
2922         (WebCore::decodeNamedEntity):
2923             - convertToUTF16 always returns true, so make it return void instead.
2924             - Teach the entity parse that some entities expand to two characters.
2925         * html/parser/HTMLEntityParser.h:
2926             - Add a warning that decodeNamedEntity is really a broken API.
2927             - This patch doesn't actually change any behavior of this API, but
2928               it does illustrate that the two callers of this API (the two XML
2929               parsers) really need to move a more sensible API.
2930         * html/parser/HTMLEntitySearch.cpp:
2931         (WebCore::HTMLEntitySearch::HTMLEntitySearch):
2932         (WebCore::HTMLEntitySearch::advance):
2933         * html/parser/HTMLEntitySearch.h:
2934         (WebCore::HTMLEntitySearch::fail):
2935             - Remove the concept of currentValue.  This isn't really used for
2936               anything and conflicts with the idea that entities can expand
2937               to more than one character.
2938         * html/parser/HTMLEntityTable.h:
2939             - Add storage for two UChar32 values per entity.
2940         * html/parser/create-html-entity-table:
2941         (convert_value_to_int):
2942             - Teach this script to handle entities that expand to multiple
2943               Unicode characters.
2944         * xml/parser/CharacterReferenceParserInlineMethods.h:
2945         (WebCore::consumeCharacterReference):
2946             - Update this function now that convertToUTF16 returns void.
2947         * xml/parser/XMLCharacterReferenceParser.cpp:
2948             - The XML version of convertToUTF16 also needs to return void to
2949               match the HTML signature.  (It used to return true all the time
2950               as well.)
2951         * xml/parser/XMLTreeBuilder.cpp:
2952         (WebCore::XMLTreeBuilder::processHTMLEntity):
2953             - Update this caller use leftValue instead of value.  My sense is
2954               that this code is moderately broken today because it's using HTML
2955               entities in parsing XML.  I've added a FIXME.  This code is
2956               disabled in all builds, so I don't feel a big need to fix this
2957               issue in this patch.  We should either finish this project or
2958               delete this complexity from the project.
2959
2960 2011-12-19  Andreas Kling  <kling@webkit.org>
2961
2962         Avoid instantiating ScrollAnimators when possible.
2963         <http://webkit.org/b/74830>
2964
2965         Reviewed by Beth Dakin.
2966
2967         Have RenderLayer::scrollToOffset() check if we're scrolling to the already
2968         current offset. In that case, don't call down to scrollToOffsetWithoutAnimation(),
2969         avoiding the instantiation of a ScrollAnimator.
2970
2971         This reduces memory consumption by 400 kB (on 32-bit) when viewing the full HTML5
2972         spec on <http://whatwg.org/c>, since we were creating a ScrollAnimator for every
2973         single RenderLayer.
2974
2975         * rendering/RenderLayer.cpp:
2976         (WebCore::RenderLayer::scrollToOffset):
2977
2978 2011-12-19  Chris Guan  <chris.guan@torchmobile.com.cn>
2979
2980         [BlackBerry] remove one file related to multipart from the BlackBerry build system
2981         https://bugs.webkit.org/show_bug.cgi?id=74839
2982
2983         Reviewed by Daniel Bates.
2984
2985         After refactored multipart, the code of MultipartResponseDelegate have been moved 
2986         out of WebCore, we do not need to upstream MultipartResponseDelegate any more. 
2987         So remove it from PlatformBlackBerry.cmake to update build system. 
2988         
2989         * PlatformBlackBerry.cmake:
2990
2991 2011-12-15  Geoffrey Garen  <ggaren@apple.com>
2992
2993         Placement new does an unnecessary NULL check
2994         https://bugs.webkit.org/show_bug.cgi?id=74676
2995
2996         Reviewed by Sam Weinig.
2997
2998         * bindings/js/JSImageConstructor.h:
2999         (WebCore::JSImageConstructor::create):
3000         * bindings/scripts/CodeGeneratorJS.pm:
3001         (GenerateHeader):
3002         (GenerateConstructorDeclaration):
3003         * bridge/c/CRuntimeObject.h:
3004         (JSC::Bindings::CRuntimeObject::create):
3005         * bridge/c/c_instance.cpp:
3006         (JSC::Bindings::CRuntimeMethod::create):
3007         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3008         (JavaRuntimeMethod::create):
3009         * bridge/jni/jsc/JavaRuntimeObject.h:
3010         (JSC::Bindings::JavaRuntimeObject::create):
3011         * bridge/objc/ObjCRuntimeObject.h:
3012         (JSC::Bindings::ObjCRuntimeObject::create):
3013         * bridge/objc/objc_instance.mm:
3014         (ObjCRuntimeMethod::create):
3015         * bridge/objc/objc_runtime.h:
3016         (JSC::Bindings::ObjcFallbackObjectImp::create):
3017         * bridge/runtime_array.h:
3018         (JSC::RuntimeArray::create):
3019         * bridge/runtime_method.h:
3020         (JSC::RuntimeMethod::create):
3021         * bridge/runtime_object.h:
3022         (JSC::Bindings::RuntimeObject::create):
3023         * dom/Document.h:
3024         (WebCore::FormElementKeyHashTraits::constructDeletedValue): Use NotNull
3025         placement new, as in JavaScriptCore.
3026
3027         * platform/PODArena.h:
3028         (WebCore::PODArena::allocateObject): No need to check for NULL explicitly,
3029         since that's the built-in behavior of placement new.
3030
3031         * platform/graphics/FontCache.cpp:
3032         (WebCore::FontDataCacheKeyTraits::constructDeletedValue):
3033         * platform/graphics/IntRectHash.h:
3034         * platform/graphics/IntSizeHash.h: More NotNull.
3035
3036         * rendering/RenderObject.h: Declaring that we throw is the C++ way to say
3037         that operator new will not return NULL.
3038
3039 2011-12-19  Eric Carlson  <eric.carlson@apple.com>
3040
3041         Render text tracks
3042         https://bugs.webkit.org/show_bug.cgi?id=62886
3043
3044         Reviewed by Sam Weinig.
3045
3046         Test: media/track/track-cue-rendering.html
3047
3048         * css/mediaControls.css:
3049         (video::-webkit-media-text-track-container):
3050         (video::-webkit-media-text-track-display):
3051
3052         * html/HTMLMediaElement.cpp:
3053         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_haveVisibleTextTrack.
3054         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Trigger an update of the text
3055             track display.
3056         (WebCore::HTMLMediaElement::textTrackModeChanged): call configureTextTrackDisplay() so 
3057             the text track display is hidden or shown when necessary.
3058         (WebCore::HTMLMediaElement::userIsInterestedInThisTrack): Minor cleanup.
3059         (WebCore::HTMLMediaElement::createMediaControls): configureMediaControls() always called
3060             reset after creating the controls, do it here instead.
3061         (WebCore::HTMLMediaElement::configureMediaControls): Simplify and cleanup.
3062         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Show and hide text track display.
3063         * html/HTMLMediaElement.h:
3064         (WebCore::HTMLMediaElement::currentlyVisibleCues):
3065
3066         * html/shadow/MediaControlElements.cpp:
3067         (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): New.
3068         (WebCore::RenderTextTrackContainerElement::layout): New. Call the display element so it can
3069             update the position and font size.
3070         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): New.
3071         (WebCore::MediaControlTextTrackContainerElement::create): Ditto.
3072         (WebCore::MediaControlTextTrackContainerElement::createRenderer): Ditto.
3073         (WebCore::MediaControlTextTrackContainerElement::shadowPseudoId): Ditto.
3074         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Keep the cue display element
3075             positioned above the bottom of the video box, and size the font according to the video height.
3076         (WebCore::MediaControlTextTrackDisplayElement::MediaControlTextTrackDisplayElement): New.
3077         (WebCore::MediaControlTextTrackDisplayElement::create): Ditto.
3078         (WebCore::MediaControlTextTrackDisplayElement::shadowPseudoId): Ditto.
3079         * html/shadow/MediaControlElements.h:
3080         (WebCore::MediaControlTextTrackContainerElement::displayType):
3081         (WebCore::MediaControlTextTrackDisplayElement::displayType):
3082
3083         * html/shadow/MediaControlRootElement.cpp:
3084         (WebCore::MediaControlRootElement::MediaControlRootElement): New.
3085         (WebCore::MediaControlRootElement::setMediaController): Ditto.
3086         (WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto.
3087         (WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto.
3088         (WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto.
3089         (WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto.
3090         * html/shadow/MediaControlRootElement.h:
3091
3092         * html/shadow/MediaControlRootElementChromium.cpp:
3093         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): New.
3094         (WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto.
3095         (WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto.
3096         (WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto.
3097         (WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto.
3098         * html/shadow/MediaControlRootElementChromium.h:
3099         * html/shadow/MediaControls.h:
3100
3101 2011-12-19  Eric Carlson  <eric.carlson@apple.com>
3102
3103         Enable <track> for Mac build
3104         https://bugs.webkit.org/show_bug.cgi?id=74838
3105
3106         Reviewed by Darin Adler.
3107
3108         * Configurations/FeatureDefines.xcconfig:
3109         * bindings/generic/RuntimeEnabledFeatures.cpp:
3110
3111 2011-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3112
3113         Make the Editor::setIgnoreCompositionSelectionChange public as it is needed by Qt
3114
3115         Reviewed by Simon Hausmann.
3116
3117         * editing/Editor.h:
3118
3119 2011-12-19  Alexander Pavlov  <apavlov@chromium.org>
3120
3121         Web Inspector: Implement CSS selector profiler backend
3122         https://bugs.webkit.org/show_bug.cgi?id=74603
3123
3124         Reviewed by Pavel Feldman.
3125
3126         No new tests, as the changed code does not result in visible effects yet.
3127
3128         * inspector/Inspector.json:
3129         * inspector/InspectorCSSAgent.cpp:
3130         (WebCore::RuleMatchingStats::RuleMatchingStats):
3131         (WebCore::SelectorProfile::SelectorProfile):
3132         (WebCore::SelectorProfile::~SelectorProfile):
3133         (WebCore::SelectorProfile::totalMatchingTimeMs):
3134         (WebCore::SelectorProfile::startSelector):
3135         (WebCore::SelectorProfile::commitSelector):
3136         (WebCore::SelectorProfile::commitSelectorTime):
3137         (WebCore::SelectorProfile::toInspectorObject):
3138         (WebCore::InspectorCSSAgent::clearFrontend):
3139         (WebCore::InspectorCSSAgent::restore):
3140         (WebCore::InspectorCSSAgent::startSelectorProfiler):
3141         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
3142         (WebCore::InspectorCSSAgent::willMatchRule):
3143         (WebCore::InspectorCSSAgent::didMatchRule):
3144         (WebCore::InspectorCSSAgent::willProcessRule):
3145         (WebCore::InspectorCSSAgent::didProcessRule):
3146         * inspector/InspectorCSSAgent.h:
3147
3148 2011-12-19  Alexander Pavlov  <apavlov@chromium.org>
3149
3150         Web Inspector: Status bar button glyph for the "Record" buttons broken
3151         https://bugs.webkit.org/show_bug.cgi?id=74861
3152
3153         Reviewed by Pavel Feldman.
3154
3155         * inspector/front-end/inspector.css:
3156         (.record-cpu-profile-status-bar-item .glyph, .record-profile-status-bar-item .glyph):
3157         (.record-cpu-profile-status-bar-item.toggled-on .glyph, .record-profile-status-bar-item.toggled-on .glyph):
3158
3159 2011-12-19  Pavel Feldman  <pavel.feldman@gmail.com>
3160
3161         Web Inspector: only the first @rule is highlighted in CSS
3162         https://bugs.webkit.org/show_bug.cgi?id=74568
3163
3164         Reviewed by Timothy Hatcher.
3165
3166         * inspector/front-end/SourceCSSTokenizer.js:
3167         (WebInspector.SourceCSSTokenizer.prototype.nextToken):
3168         * inspector/front-end/SourceCSSTokenizer.re2js:
3169
3170 2011-12-19  Ilya Tikhonovsky  <loislo@chromium.org>
3171
3172         Web Inspector: Feature Request: Able to remove all breakpoints.
3173         https://bugs.webkit.org/show_bug.cgi?id=63055
3174
3175         Reviewed by Pavel Feldman.
3176
3177         * English.lproj/localizedStrings.js:
3178         * inspector/front-end/BreakpointManager.js:
3179         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
3180         * inspector/front-end/BreakpointsSidebarPane.js:
3181         (WebInspector.JavaScriptBreakpointsSidebarPane):
3182         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
3183         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu):
3184         * inspector/front-end/DebuggerPresentationModel.js:
3185         (WebInspector.DebuggerPresentationModel.prototype.removeAllBreakpoints):
3186
3187 2011-12-19  Benjamin Poulain  <benjamin@webkit.org>
3188
3189         Build fix for ScrollingCoordinatorMac.mm when building on a case sensitive system
3190
3191         Unreviewed build fix for r103180. StdlibExtras.h->StdLibExtras.h to compile on case sensitive system.
3192
3193         * page/mac/ScrollingCoordinatorMac.mm:
3194
3195 2011-12-19  Kentaro Hara  <haraken@chromium.org>
3196
3197         Remove unnecessary [JSCCustomGetter] IDLs from DOMWindow.idl
3198         https://bugs.webkit.org/show_bug.cgi?id=74829
3199
3200         Reviewed by Adam Barth.
3201
3202         Now JSC has implemented the [Constructor] IDL and it generates
3203         getDOMConstructor() automatically. This patch removes hand-written
3204         unnecessary getDOMConstructor()s from JSDOMWindowCustom.cpp.
3205
3206         No new tests. No change in behavior.
3207
3208         * bindings/js/JSDOMWindowCustom.cpp:
3209         * page/DOMWindow.idl:
3210
3211 2011-12-19  Adam Barth  <abarth@webkit.org>
3212
3213         The HTML parser doesn't enforce the "Noah's Ark condition" from the HTML5 spec
3214         https://bugs.webkit.org/show_bug.cgi?id=74828
3215
3216         Reviewed by Darin Adler.
3217
3218         This patch implement the "Noah's Ark condition" from the HTML5
3219         specification.  This condition limits the number of identitical
3220         elements that can be in the list of active formatting elements.  I'm not
3221         entirely sure that enforcing this condition is worth the complexity,
3222         but given that we've come this far in support of the HTML5 parsing
3223         algorithm, we might as well finish it.
3224
3225         After this patch, we pass all but one of the html5lib parsing tests!
3226
3227         Tests: html5lib/runner.html
3228
3229         * html/parser/HTMLFormattingElementList.cpp:
3230         (WebCore::attributeCount):
3231         (WebCore::HTMLFormattingElementList::append):
3232         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
3233         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
3234         * html/parser/HTMLFormattingElementList.h:
3235
3236 2011-12-19  Benjamin Poulain  <bpoulain@apple.com>
3237
3238         Add support for 8 bits strings to Document::isValidName()
3239         https://bugs.webkit.org/show_bug.cgi?id=74784
3240
3241         Reviewed by Darin Adler.
3242
3243         Avoid the conversion to 16bits when we are in the ASCII fast path,
3244         otherwise fallback to the Unicode testing in 16bits.
3245
3246         * dom/Document.cpp:
3247         (WebCore::isValidNameASCII):
3248         (WebCore::Document::isValidName):
3249
3250 2011-12-18  Kentaro Hara  <haraken@chromium.org>
3251
3252         REGRESSION(r101445): [JSC] Generated code for custom getters and setters
3253         with the [Supplemental] IDL is wrong
3254         https://bugs.webkit.org/show_bug.cgi?id=74837
3255
3256         Reviewed by Darin Adler.
3257
3258         In bug 73162, we implemented the [Supplemental] IDL, but the generated code
3259         for custom getters and setters was wrong in JSC. This patch fixes CodeGeneratorJS.pm
3260         so that the result of WebCore/bindings/scripts/test/TestInterface.idl becomes as follows:
3261
3262         Wrong:
3263             JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&)
3264             {
3265                 JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
3266                 return JSTestSupplemental::str3(castedThis, exec);
3267             }
3268
3269         Correct:
3270             JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&)
3271             {
3272                 JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
3273                 TestInterface* imp = static_cast<TestInterface*>(castedThis->impl());
3274                 return castedThis->str3(imp, exec);
3275             }
3276
3277         Tests: bindings/scripts/test/JS/TestInterface.idl
3278
3279         * bindings/scripts/CodeGeneratorJS.pm:
3280         (GenerateHeader):
3281         (GenerateImplementation):
3282         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests result.
3283         (WebCore::jsTestInterfaceStr3):
3284         (WebCore::setJSTestInterfaceStr3):
3285         * bindings/scripts/test/JS/JSTestInterface.h: Ditto.
3286
3287 2011-12-18  Adam Barth  <abarth@webkit.org>
3288
3289         Fix typo in comment.
3290
3291         * html/parser/HTMLTreeBuilder.cpp:
3292         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3293
3294 2011-12-18  Keishi Hattori  <keishi@webkit.org>
3295
3296         Implement <input type=color> UI WebKit chromium part
3297         https://bugs.webkit.org/show_bug.cgi?id=65897
3298
3299         Reviewed by Darin Fisher.
3300
3301         * GNUmakefile.list.am: Removed ColorChooser.cpp and added ColorChooserClient.h
3302         * WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h
3303         * WebCore.xcodeproj/project.pbxproj: Removed ColorChooser.cpp and added ColorChooserClient.h
3304
3305 2011-12-18  David Barton  <dbarton@mathscribe.com>
3306
3307         <msup>, <munder>, <mover>, and <munderover> baseline positions are wrong
3308         https://bugs.webkit.org/show_bug.cgi?id=72821
3309
3310         Reviewed by Darin Adler.
3311
3312         Tested by rebaselining 8 existing tests. (Pardon the pun.)
3313
3314         * rendering/mathml/RenderMathMLSubSup.cpp:
3315         (WebCore::RenderMathMLSubSup::baselinePosition):
3316         Just using the base's (these puns are not my fault) baseline did not leave room for the exponent.
3317         * rendering/mathml/RenderMathMLUnderOver.cpp:
3318         (WebCore::RenderMathMLUnderOver::baselinePosition):
3319         Added a guard condition, and removed some bad lines apparently mistakenly copied from RenderMathMLSubSup.cpp.
3320
3321 2011-12-18  Luke Macpherson   <macpherson@chromium.org>
3322
3323         Implement CSS line-height property in CSSStyleApplyProperty.
3324         https://bugs.webkit.org/show_bug.cgi?id=74561
3325
3326         Reviewed by Andreas Kling.
3327
3328         No new tests / refactoring only.
3329
3330         * css/CSSPrimitiveValue.h:
3331         (WebCore::CSSPrimitiveValue::isNumber):
3332         * css/CSSStyleApplyProperty.cpp:
3333         (WebCore::ApplyPropertyLineHeight::applyValue):
3334         (WebCore::ApplyPropertyLineHeight::createHandler):
3335         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3336         * css/CSSStyleSelector.cpp:
3337         (WebCore::CSSStyleSelector::applyProperty):
3338
3339 2011-12-18  Luke Macpherson   <macpherson@chromium.org>
3340
3341         Implement CSS outline shorthand property in CSSStyleApplyProperty.
3342         https://bugs.webkit.org/show_bug.cgi?id=74467
3343
3344         Reviewed by Andreas Kling.
3345
3346         No new tests / refactoring only.
3347
3348         RenderStyle::resetOutline was removed in favor of explicity expanding to the
3349         initial values of the shorthand expansion. This improves consistency because
3350         the initial values to use are more clearly (and singularly) defined.
3351
3352         * css/CSSStyleApplyProperty.cpp:
3353         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3354         * css/CSSStyleSelector.cpp:
3355         (WebCore::CSSStyleSelector::applyProperty):
3356         * rendering/style/RenderStyle.h:
3357
3358 2011-12-18  Sheriff Bot  <webkit.review.bot@gmail.com>
3359
3360         Unreviewed, rolling out r103205.
3361         http://trac.webkit.org/changeset/103205
3362         https://bugs.webkit.org/show_bug.cgi?id=74833
3363
3364         There are valid characters above 0x80 when the  string is
3365         8bits (Requested by benjaminp on #webkit).
3366
3367         * dom/Document.cpp:
3368         (WebCore::isValidNameASCII):
3369         (WebCore::Document::isValidName):
3370
3371 2011-12-18  Luke Macpherson   <macpherson@chromium.org>
3372
3373         Separate box alignment and box pack values into separate enums.
3374         https://bugs.webkit.org/show_bug.cgi?id=74580
3375
3376         Reviewed by Andreas Kling.
3377
3378         No new tests / refactoring only.
3379
3380         Separating these types cleans up the code by removing several assertions that
3381         values are in the correct ranges, as this is ensured by the type system.
3382
3383         * css/CSSComputedStyleDeclaration.cpp:
3384         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3385         * css/CSSPrimitiveValueMappings.h:
3386         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3387         (WebCore::CSSPrimitiveValue::operator EBoxPack):
3388         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
3389         * css/CSSStyleSelector.cpp:
3390         (WebCore::CSSStyleSelector::applyProperty):
3391         * rendering/RenderDeprecatedFlexibleBox.cpp:
3392         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3393         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3394         * rendering/RenderFullScreen.cpp:
3395         (createFullScreenStyle):
3396         * rendering/style/RenderStyle.h:
3397         (WebCore::InheritedFlags::boxPack):
3398         (WebCore::InheritedFlags::setBoxAlign):
3399         (WebCore::InheritedFlags::setBoxPack):
3400         (WebCore::InheritedFlags::initialBoxPack):
3401         * rendering/style/RenderStyleConstants.h:
3402         * rendering/style/StyleDeprecatedFlexibleBoxData.h:
3403
3404 2011-12-18  Luke Macpherson   <macpherson@chromium.org>
3405
3406         Implement CSS font-size property in CSSStyleApplyProperty.
3407         https://bugs.webkit.org/show_bug.cgi?id=74368
3408
3409         Reviewed by Andreas Kling.
3410
3411         No new tests / refactoring only.
3412
3413         * css/CSSStyleApplyProperty.cpp:
3414         (WebCore::ApplyPropertyFontSize::largerFontSize):
3415         (WebCore::ApplyPropertyFontSize::smallerFontSize):
3416         (WebCore::ApplyPropertyFontSize::applyInheritValue):
3417         (WebCore::ApplyPropertyFontSize::applyInitialValue):
3418         (WebCore::ApplyPropertyFontSize::applyValue):
3419         (WebCore::ApplyPropertyFontSize::createHandler):
3420         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3421         * css/CSSStyleSelector.cpp:
3422         (WebCore::CSSStyleSelector::applyProperty):
3423         * css/CSSStyleSelector.h:
3424         (WebCore::CSSStyleSelector::hasParentNode):
3425
3426 2011-12-18  Sheriff Bot  <webkit.review.bot@gmail.com>
3427
3428         Unreviewed, rolling out r103199.
3429         http://trac.webkit.org/changeset/103199
3430         https://bugs.webkit.org/show_bug.cgi?id=74832
3431
3432         Caused a bot crashiness extravaganza! (Requested by kling on
3433         #webkit).
3434
3435         * platform/KURL.cpp:
3436         (WebCore::isLetterMatchIgnoringCase):
3437         (WebCore::protocolIs):
3438
3439 2011-12-18  Dan Bernstein  <mitz@apple.com>
3440
3441         Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout-after-image-load.html
3442         https://bugs.webkit.org/show_bug.cgi?id=67759
3443
3444         Reviewed by Darin Adler.