b03a7482f311d015ab1b5cbc76aee5d5570dfb7e
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-08  Antonio Gomes  <agomes@rim.com>
2
3         EventHandler shouldn't schedule the fake mousemove event timer when scrolling on devices that don't have a mouse
4         https://bugs.webkit.org/show_bug.cgi?id=88379
5
6         Reviewed by James Robinson.
7
8         Paraphrasing Andy Estes:
9         "In <http://trac.webkit.org/changeset/119465> we stopped dispatching fake
10         mousemove events when scrolling on devices that don't support mice. This event
11         is dispatched on a timer, so one better would be to not even schedule the
12         timer (rather than scheduling the timer but making it a no-op).
13
14         No new tests, as no functionality has changed. We basically do not
15         start a timer under a given circumstance instead of fire it, it times out,
16         and we make the callback no-op when under the given circumstance.
17
18         It is still possible though that we have the following scenario:
19         - Setting::deviceSupportsMouse set as true;
20         - we fire the timer;
21         - before its callback gets executed (timed out) the setting gets toggled.
22         So for sakeness, lets keep the check in both places.
23
24         * page/EventHandler.cpp:
25         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
26         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
27
28 2012-06-08  James Robinson  <jamesr@chromium.org>
29
30         [chromium] Clean up some unnecessary LayerChromium.h includes
31         https://bugs.webkit.org/show_bug.cgi?id=88599
32
33         Reviewed by Adam Barth.
34
35         Reworks test code slightly to use WebCore interfaces.
36
37         * testing/Internals.cpp:
38         (WebCore::Internals::setBackgroundBlurOnNode):
39
40 2012-06-08  Erik Arvidsson  <arv@chromium.org>
41
42         [V8] Keep TextTrackList alive as long as its owner is alive
43         https://bugs.webkit.org/show_bug.cgi?id=88541
44
45         Reviewed by Adam Barth.
46
47         Add a hidden reference from the owner to the text track list.
48
49         Covered by existing tests.
50
51         * Target.pri: Add V8TextTrackListCustom.cpp.
52         * UseV8.cmake: Ditto.
53         * WebCore.gypi: Ditto.
54         * bindings/v8/V8HiddenPropertyName.h:
55         (WebCore):
56         * bindings/v8/custom/V8TextTrackListCustom.cpp: Copied from Source/WebCore/bindings/v8/V8HiddenPropertyName.h.
57         (WebCore):
58         (WebCore::toV8): When the wrapper is created add a reference to the owner of the TextTrackList to the TextTrackList.
59         * html/track/TextTrackList.idl:
60
61 2012-06-08  Ian Vollick  <vollick@chromium.org>
62
63         [chromium] Accelerated animations should use WebTransformOperations
64         https://bugs.webkit.org/show_bug.cgi?id=87686
65
66         Reviewed by James Robinson.
67
68         CCTransformKeyframe new owns a WebTransformOperations rather than a
69         TransformOperations. LayerChromium's API has been changed so that
70         LayerChromium::addAnimation should take only a CCActiveAnimation.
71         GraphicsLayerChromium is new responsible for translating to
72         WebTransformOperations and creating CCActiveAnimations. Tests that use
73         the public API (that is, they call addAnimation with KeyframeValueList
74         and Animation arguments) have been moved to GraphicsLayerChromiumTest.
75
76          Unit tests:
77             GraphicsLayerChromiumTest.createOpacityAnimation
78             GraphicsLayerChromiumTest.createTransformAnimation
79             GraphicsLayerChromiumTest.createTransformAnimationWithBigRotation
80             GraphicsLayerChromiumTest.createTransformAnimationWithSingularMatrix
81             GraphicsLayerChromiumTest.createReversedAnimation
82             GraphicsLayerChromiumTest.createAlternatingAnimation
83             GraphicsLayerChromiumTest.createReversedAlternatingAnimation
84
85         * WebCore.gypi:
86         * platform/graphics/chromium/AnimationTranslationUtil.cpp: Added.
87         (WebCore):
88         (WebCore::toWebTransformOperations):
89         (WebCore::appendKeyframe):
90         (WebCore::CCKeyframedTransformAnimationCurve):
91         (WebCore::createActiveAnimation):
92         * platform/graphics/chromium/AnimationTranslationUtil.h: Added.
93         (WebCore):
94         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
95         (WebCore::GraphicsLayerChromium::addAnimation):
96         * platform/graphics/chromium/LayerChromium.cpp:
97         (WebCore::LayerChromium::addAnimation):
98         * platform/graphics/chromium/LayerChromium.h:
99         (WebCore):
100         (WebCore::LayerChromium::bounds):
101         (LayerChromium):
102         * platform/graphics/chromium/LinkHighlight.cpp:
103         (WebCore::LinkHighlight::LinkHighlight):
104         * platform/graphics/chromium/cc/CCAnimationCurve.h:
105         (CCTransformAnimationCurve):
106         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp:
107         (WebCore::CCTransformKeyframe::create):
108         (WebCore::CCTransformKeyframe::CCTransformKeyframe):
109         (WebCore::CCTransformKeyframe::value):
110         (WebCore::CCTransformKeyframe::clone):
111         (WebCore::CCKeyframedTransformAnimationCurve::getValue):
112         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h:
113         (CCTransformKeyframe):
114         (CCKeyframedTransformAnimationCurve):
115         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
116         (WebCore::CCLayerAnimationController::removeAnimation):
117         (WebCore):
118         (WebCore::CCLayerAnimationController::addAnimation):
119         (WebCore::CCLayerAnimationController::getActiveAnimation):
120         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
121         (WebCore::CCLayerAnimationController::replaceImplThreadAnimations):
122         (WebCore::CCLayerAnimationController::tickAnimations):
123         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
124         (CCLayerAnimationControllerClient):
125         (CCLayerAnimationController):
126         * platform/graphics/chromium/cc/CCLayerImpl.h:
127         (WebCore::CCLayerImpl::bounds):
128
129 2012-06-08  No'am Rosenthal  <noam.rosenthal@nokia.com>
130
131         [Texmap] Accelerated versions of drop-shadow and blur filters
132         https://bugs.webkit.org/show_bug.cgi?id=87695
133
134         Reviewed by Kenneth Rohde Christiansen.
135
136         Added shaders for blur and drop-shadow effects.
137         The shaders use sampling of multiple coordinates and averaging them with normal-
138         distribution to create a fast gaussian blur effect.
139
140         Covered by existing tests in css3/filters.
141
142         * platform/graphics/texmap/TextureMapperGL.cpp:
143         (WebCore::TextureMapperGL::drawFiltered):
144             Call the prepare function explicitly, with a size argument that's used to calculate
145             some of the uniform values.
146
147         * platform/graphics/texmap/TextureMapperLayer.cpp:
148         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
149             The outsets of the effect have to be considered when calculating the intermediate rect.
150             Otherwise the resulting image is scaled instead of outsetted.
151
152         (WebCore::applyFilters):
153         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
154         (WebCore::StandardFilterProgram::StandardFilterProgram):
155             Added the new shaders.
156
157         (WebCore::StandardFilterProgram::prepare):
158         (WebCore::TextureMapperShaderManager::getShaderForFilter):
159         * platform/graphics/texmap/TextureMapperShaderManager.h:
160         (StandardFilterProgram):
161
162 2012-06-08  Dan Bernstein  <mitz@apple.com>
163
164         Tried to fix the build after r119844.
165
166         * bindings/js/GCController.cpp:
167         (WebCore::GCController::discardAllCompiledCode):
168
169 2012-06-08  Mike West  <mkwst@chromium.org>
170
171         Add COMPILE_ASSERT to StyledElement to ensure it doesn't accidentally grow larger.
172         https://bugs.webkit.org/show_bug.cgi?id=88627
173
174         Reviewed by Adam Barth.
175
176         No change in user-facing behavior.
177
178         * dom/StyledElement.cpp:
179         (WebCore):
180
181 2012-06-08  Vsevolod Vlasov  <vsevik@chromium.org>
182
183         Web Inspector: Fix several compiler warnings and errors.
184         https://bugs.webkit.org/show_bug.cgi?id=88660
185
186         Reviewed by Pavel Feldman.
187
188         Fixed several compiler warnings and errors.
189         Removed isEmpty method from Object.prototype and made it static method on Object.
190
191         * inspector/InjectedScriptExterns.js:
192         * inspector/front-end/FileSystemModel.js:
193         (WebInspector.FileSystemModel.prototype._detachFrame):
194         * inspector/front-end/HeapSnapshot.js:
195         (WebInspector.HeapSnapshot.prototype._buildDominatorTree):
196         * inspector/front-end/utilities.js:
197         (Object.isEmpty):
198
199 2012-06-08  Max Feil  <mfeil@rim.com>
200
201         [BlackBerry] Fix assertion failure introduced by bug 87551
202         https://bugs.webkit.org/show_bug.cgi?id=88659
203
204         Reviewed by Antonio Gomes.
205
206         The determineRenderSlider() convenience function added in bug
207         87551 made an assumption that wasn't always true. This didn't
208         cause a functional error but it caused an assertion failure,
209         which indicates a problem with the code. PR164142.
210
211         No new tests because this case is already covered by ASSERT's.
212
213         * platform/blackberry/RenderThemeBlackBerry.cpp:
214         (WebCore::determineRenderSlider):
215
216 2012-06-08  Ion Rosca  <rosca@adobe.com>
217
218         Some overlay scrollbar API calls in ScrollAnimatorMac can lead to an assertion in RenderBox::mapAbsoluteToLocalPoint
219         https://bugs.webkit.org/show_bug.cgi?id=74111
220
221         Reviewed by Simon Fraser.
222
223         Added zero-delay timer for AppKit scroll notification that can be called during layout.
224         Manual test: ManualTests/scrollbar-crash-on-hide-scrolled-area.html
225         This assertion does not fire when running layout tests. It can be easly reproduced using a debug build by loading the manual test page.
226
227         * platform/mac/ScrollAnimatorMac.h:
228         (ScrollAnimatorMac):
229         * platform/mac/ScrollAnimatorMac.mm:
230         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
231         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
232         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon):
233         (WebCore):
234         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
235
236 2012-06-08  Renata Hodovan  <reni@webkit.org>
237
238         Adding few already supported features to the FeatureSet in DOMImplementation
239         https://bugs.webkit.org/show_bug.cgi?id=86482
240
241         Text, Filter and View features are already implemented but they
242         are not added to the SVG11 feature set. This is corrected in this patch.
243
244         Reviewed by Nikolas Zimmermann.
245
246         No new testcase is needed because we already have one what checks the svg features via
247         DOMImplementation (svg/custom/svg-features.html).
248
249         * dom/DOMImplementation.cpp:
250         (WebCore::isSVG11Feature):
251
252 2012-06-08  Stephen Chenney  <schenney@chromium.org>
253
254         WebCore::ImageBuffer.cpp has broken color table code
255         https://bugs.webkit.org/show_bug.cgi?id=80321
256
257         Reviewed by Dirk Schulze.
258
259         The code in ImageBuffer::transformColorSpace had two problems that are
260         fixed by this patch.
261
262         First, it was using member variables for data
263         that is static constant. This is incredibly wasteful, as every
264         ImageBuffer that is created (and we make a lot of them) gets its own
265         copy of the LUT and the table is initialized again and again. The
266         patch replaces this with a static local, with lazy evaluation, in
267         the method that uses the tables.
268
269         Second, the code for filling the table was mapping 255 to 254, thus
270         reducing the intensity and alpha of every image it pushed through a
271         color transform.
272
273         Test: svg/filters/color-space-conversion.svg
274
275         * platform/graphics/ImageBuffer.cpp:
276         (WebCore::ImageBuffer::transformColorSpace):
277         * platform/graphics/ImageBuffer.h:
278         (ImageBuffer):
279
280 2012-06-08  Alexei Filippov  <alexeif@chromium.org>
281
282         Web Inspector: Better labels positioning on the memory pie chart
283         https://bugs.webkit.org/show_bug.cgi?id=88652
284
285         Reviewed by Vsevolod Vlasov.
286
287         * inspector/front-end/NativeMemorySnapshotView.js:
288         (WebInspector.NativeMemoryPieChart.prototype._paint.paintPercentAndLabel):
289         (WebInspector.NativeMemoryPieChart.prototype._paint):
290
291 2012-06-08  Bryan McQuade  <bmcquade@google.com>
292
293         Web Inspector: Annotate timeline records with a frame identifier
294         https://bugs.webkit.org/show_bug.cgi?id=86406
295
296         Reviewed by Vsevolod Vlasov.
297
298         Tests: Updated existing layout tests.
299
300         * inspector/InspectorController.cpp:
301         (WebCore::InspectorController::InspectorController):
302         * inspector/InspectorInstrumentation.cpp:
303         (WebCore::frameForScriptExecutionContext):
304         (WebCore):
305         (WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl):
306         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
307         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
308         (WebCore::InspectorInstrumentation::willCallFunctionImpl):
309         (WebCore::InspectorInstrumentation::willChangeXHRReadyStateImpl):
310         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
311         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
312         (WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
313         (WebCore::InspectorInstrumentation::willFireTimerImpl):
314         (WebCore::InspectorInstrumentation::willLayoutImpl):
315         (WebCore::InspectorInstrumentation::willLoadXHRImpl):
316         (WebCore::InspectorInstrumentation::willPaintImpl):
317         (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
318         (WebCore::InspectorInstrumentation::willSendRequestImpl):
319         (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
320         (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
321         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
322         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
323         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
324         (WebCore::InspectorInstrumentation::loadEventFiredImpl):
325         (WebCore::InspectorInstrumentation::willWriteHTMLImpl):
326         (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
327         (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
328         (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
329         * inspector/InspectorInstrumentation.h:
330         (InspectorInstrumentation):
331         (WebCore::InspectorInstrumentation::didScheduleResourceRequest):
332         (WebCore::InspectorInstrumentation::didInstallTimer):
333         (WebCore::InspectorInstrumentation::didRemoveTimer):
334         (WebCore::InspectorInstrumentation::willCallFunction):
335         (WebCore::InspectorInstrumentation::willChangeXHRReadyState):
336         (WebCore::InspectorInstrumentation::willDispatchEvent):
337         (WebCore::InspectorInstrumentation::willEvaluateScript):
338         (WebCore::InspectorInstrumentation::willFireTimer):
339         (WebCore::InspectorInstrumentation::willLayout):
340         (WebCore::InspectorInstrumentation::willLoadXHR):
341         (WebCore::InspectorInstrumentation::willPaint):
342         (WebCore::InspectorInstrumentation::willRecalculateStyle):
343         (WebCore::InspectorInstrumentation::willReceiveResourceData):
344         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
345         (WebCore::InspectorInstrumentation::willWriteHTML):
346         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
347         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
348         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
349         * inspector/InspectorTimelineAgent.cpp:
350         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
351         (WebCore::InspectorTimelineAgent::didBeginFrame):
352         (WebCore::InspectorTimelineAgent::willCallFunction):
353         (WebCore::InspectorTimelineAgent::willDispatchEvent):
354         (WebCore::InspectorTimelineAgent::willLayout):
355         (WebCore::InspectorTimelineAgent::willRecalculateStyle):
356         (WebCore::InspectorTimelineAgent::willPaint):
357         (WebCore::InspectorTimelineAgent::willComposite):
358         (WebCore::InspectorTimelineAgent::willWriteHTML):
359         (WebCore::InspectorTimelineAgent::didInstallTimer):
360         (WebCore::InspectorTimelineAgent::didRemoveTimer):
361         (WebCore::InspectorTimelineAgent::willFireTimer):
362         (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
363         (WebCore::InspectorTimelineAgent::willLoadXHR):
364         (WebCore::InspectorTimelineAgent::willEvaluateScript):
365         (WebCore::InspectorTimelineAgent::didScheduleResourceRequest):
366         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
367         (WebCore::InspectorTimelineAgent::willReceiveResourceData):
368         (WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
369         (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
370         (WebCore::InspectorTimelineAgent::didTimeStamp):
371         (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent):
372         (WebCore::InspectorTimelineAgent::didMarkLoadEvent):
373         (WebCore::InspectorTimelineAgent::didRequestAnimationFrame):
374         (WebCore::InspectorTimelineAgent::didCancelAnimationFrame):
375         (WebCore::InspectorTimelineAgent::willFireAnimationFrame):
376         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
377         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
378         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
379         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
380         (WebCore::InspectorTimelineAgent::appendRecord):
381         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
382         (WebCore::InspectorTimelineAgent::pushCancelableRecord):
383         (WebCore::InspectorTimelineAgent::commitCancelableRecords):
384         * inspector/InspectorTimelineAgent.h:
385         (WebCore):
386         (WebCore::InspectorTimelineAgent::create):
387         (InspectorTimelineAgent):
388         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
389         (TimelineRecordEntry):
390         * inspector/WorkerInspectorController.cpp:
391         (WebCore::WorkerInspectorController::WorkerInspectorController):
392         * inspector/front-end/TimelinePresentationModel.js:
393         (WebInspector.TimelinePresentationModel.isEventDivider):
394         (WebInspector.TimelinePresentationModel.Record):
395
396 2012-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
397
398         Unreviewed, rolling out r119821.
399         http://trac.webkit.org/changeset/119821
400         https://bugs.webkit.org/show_bug.cgi?id=88648
401
402         Seems to have regression on Mac (Requested by kinuko on
403         #webkit).
404
405         * fileapi/File.cpp:
406         (WebCore::File::File):
407         (WebCore::File::lastModifiedDate):
408         (WebCore::File::lastModifiedDateForBinding):
409         (WebCore):
410         (WebCore::File::captureSnapshot):
411         * fileapi/File.h:
412         (File):
413         * fileapi/File.idl:
414         * platform/FileMetadata.h:
415         (WebCore::FileMetadata::FileMetadata):
416         * platform/FileSystem.h:
417         * platform/chromium/support/WebHTTPBody.cpp:
418         (WebKit::WebHTTPBody::elementAt):
419         * platform/network/BlobData.cpp:
420         (WebCore):
421         * platform/network/BlobData.h:
422         (BlobDataItem):
423         (WebCore::BlobDataItem::BlobDataItem):
424         * platform/network/FormData.cpp:
425         (WebCore::FormData::appendFile):
426         * platform/network/cf/FormDataStreamCFNet.cpp:
427         (WebCore::advanceCurrentStream):
428         * platform/network/soup/ResourceHandleSoup.cpp:
429         (WebCore::blobIsOutOfDate):
430
431 2012-06-08  Kinuko Yasuda  <kinuko@chromium.org>
432
433         Unreviewed, removing duplicated entries in gyp.
434
435         * WebCore.gypi:
436
437 2012-06-08  Arko Saha  <arko@motorola.com>
438
439         Microdata: An element with an empty itemprop='' should not get listed in the .properties list.
440         https://bugs.webkit.org/show_bug.cgi?id=88235
441
442         Reviewed by Ryosuke Niwa.
443
444         As per the specification change http://html5.org/r/6854, an element should be listed in .properties
445         if the elelement has an attribute itemprop specified and the element has one or more property names.
446
447         Test: fast/dom/MicroData/element-with-empty-itemprop.html
448
449         * html/HTMLPropertiesCollection.cpp:
450         (WebCore::HTMLPropertiesCollection::itemAfter):
451
452 2012-06-07  Kinuko Yasuda  <kinuko@chromium.org>
453
454         File::lastModifiedDate should use NaN or separate boolean flag for null Date value
455         https://bugs.webkit.org/show_bug.cgi?id=87826
456
457         Reviewed by Kent Tamura.
458
459         Test: http/tests/local/fileapi/file-last-modified-after-delete.html
460
461         * fileapi/File.cpp:
462         (WebCore::File::File):
463         (WebCore::File::captureSnapshot):
464         (WebCore::File::lastModifiedDate):
465         (WebCore::File::lastModifiedDateForBinding): Removed.
466         * fileapi/File.h:
467         (File):
468         * fileapi/File.idl:
469         * platform/FileMetadata.h:
470         (WebCore::FileMetadata::FileMetadata):
471         * platform/FileSystem.h:
472         * platform/chromium/support/WebHTTPBody.cpp:
473         (WebKit::WebHTTPBody::elementAt):
474         * platform/network/BlobData.h:
475         (WebCore::BlobDataItem::doNotCheckFileChange): Removed.
476         * platform/network/BlobData.cpp:
477         * platform/network/cf/FormDataStreamCFNet.cpp:
478         (WebCore::advanceCurrentStream):
479         * platform/network/soup/ResourceHandleSoup.cpp:
480         (WebCore::blobIsOutOfDate):
481
482 2012-06-08  Kent Tamura  <tkent@chromium.org>
483
484         Move form-related functions of Document to FormController
485         https://bugs.webkit.org/show_bug.cgi?id=88497
486
487         Reviewed by Hajime Morita.
488
489         A lot of files depend on Document.h. We had to build many files when we
490         touched form-related features in Document.h or
491         CheckedRadioButtons.h. This patch reduces such pain.
492
493         No new tests. Just a refactoring.
494
495         * CMakeLists.txt: Add FormController.cpp and/or FormController.h.
496         * GNUmakefile.list.am: ditto.
497         * Target.pri: ditto.
498         * WebCore.gypi: ditto.
499         * WebCore.vcproj/WebCore.vcproj: ditto.
500         * WebCore.xcodeproj/project.pbxproj: ditto.
501
502         * dom/Document.cpp: Removed form-releated features except the followings.
503         (WebCore::Document::formController): Accessor for a FormController.
504         (WebCore::Document::formElementsState):
505         Just returns FormController::formElementsState().
506         We don't create new FormController.
507         (WebCore::Document::setStateForNewFormElements):
508         Just returns FormController::setStateForNewFormElements().
509         We don't create new FormController if the specified vector is empty.
510         * dom/Document.h:
511         Moved form-related functions to FormController.
512
513         * html/FormController.cpp: Added. Moved from Document.cpp.
514         * html/FormController.h: Added. Moved from Document.h
515
516         * html/FormAssociatedElement.cpp: Use Document::formController().
517         (WebCore::FormAssociatedElement::didMoveToNewDocument):
518         (WebCore::FormAssociatedElement::insertedInto):
519         (WebCore::FormAssociatedElement::removedFrom):
520         (WebCore::FormAssociatedElement::formAttributeChanged):
521         * html/HTMLFormControlElementWithState.cpp: Use Document::formController().
522         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
523         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
524         (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
525         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
526         * html/HTMLFormElement.cpp: Use Document::formController().
527         (WebCore::HTMLFormElement::didNotifyDescendantInsertions):
528         (WebCore::HTMLFormElement::removedFrom):
529         * html/HTMLInputElement.cpp: Use Document::formController().
530         (WebCore::HTMLInputElement::~HTMLInputElement):
531         (WebCore::HTMLInputElement::didMoveToNewDocument):
532         (WebCore::HTMLInputElement::checkedRadioButtons):
533         * html/HTMLInputElement.h:
534         Declare CheckedRadioButtons. It was provided by Document.h.
535         * html/parser/HTMLConstructionSite.h:
536         Declare HTMLFormElement. It was provided by Document.h
537
538 2012-06-08  Taiju Tsuiki  <tzik@chromium.org>
539
540         Add FileSystem item to storage tree.
541         https://bugs.webkit.org/show_bug.cgi?id=72691
542
543         Reviewed by Vsevolod Vlasov.
544
545         * WebCore.gypi:
546         * WebCore.vcproj/WebCore.vcproj:
547         * inspector/compile-front-end.py:
548         * inspector/front-end/FileSystemModel.js: Added.
549         * inspector/front-end/Images/fileSystem.png: Added.
550         * inspector/front-end/ResourcesPanel.js:
551         (WebInspector.FileSystemListTreeElement):
552         (WebInspector.FileSystemListTreeElement.prototype.onexpand):
553         (WebInspector.FileSystemListTreeElement.prototype.onattach):
554         (WebInspector.FileSystemListTreeElement.prototype._handleContextMenuEvent):
555         (WebInspector.FileSystemListTreeElement.prototype._fileSystemAdded):
556         (WebInspector.FileSystemListTreeElement.prototype._fileSystemRemoved):
557         (WebInspector.FileSystemListTreeElement.prototype._fileSystemTreeElementByName):
558         (WebInspector.FileSystemListTreeElement.prototype._refreshFileSystem):
559         (WebInspector.FileSystemTreeElement):
560         (WebInspector.FileSystemTreeElement.prototype.get fileSystemName):
561         (WebInspector.FileSystemTreeElement.prototype.get itemURL):
562         * inspector/front-end/Settings.js:
563         (WebInspector.ExperimentsSettings):
564         * inspector/front-end/WebKit.qrc:
565         * inspector/front-end/inspector.html:
566         * inspector/front-end/resourcesPanel.css:
567         (.file-system-storage-tree-item .icon):
568         * inspector/front-end/utilities.js:
569
570 2012-06-08  Kentaro Hara  <haraken@chromium.org>
571
572         REGRESSION r119802: Remove unnecessary ASSERT(!m_deletionHasBegun) from Document.h
573         https://bugs.webkit.org/show_bug.cgi?id=88528
574
575         Reviewed by Ryosuke Niwa.
576
577         m_deletionHasBegun should become true just before 'delete this'.
578
579         No tests. No change in behavior.
580
581         * dom/Document.h:
582         (WebCore::Document::guardRef):
583         (WebCore::Document::guardDeref):
584
585 2012-06-08  Adam Barth  <abarth@webkit.org>
586
587         HTTP 204 No Content responses shouldn't trigger MIME type warnings in the web inspector
588         https://bugs.webkit.org/show_bug.cgi?id=88603
589
590         Reviewed by Pavel Feldman.
591
592         A 204 response doesn't have an entity body, so its MIME type is kind of
593         meaningless.  We shouldn't spam the console with a warning about MIME
594         types.
595
596         * inspector/front-end/NetworkManager.js:
597         (WebInspector.NetworkDispatcher.prototype._mimeTypeIsConsistentWithType):
598
599 2012-06-08  Yoshifumi Inoue  <yosin@chromium.org>
600
601         [Forms] Drop StepRange::NumberWithDecimalPlacesOrMissing
602         https://bugs.webkit.org/show_bug.cgi?id=88621
603
604         Reviewed by Kent Tamura.
605
606         This patch changes NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces.
607         We use NaN as indication of having value or not.
608
609         No new tests, because this patch doesn't change behavior.
610
611         * html/DateInputType.cpp:
612         (WebCore::DateInputType::createStepRange): Replace NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces.
613         * html/DateTimeInputType.cpp:
614         (WebCore::DateTimeInputType::createStepRange): ditto.
615         * html/DateTimeLocalInputType.cpp:
616         (WebCore::DateTimeLocalInputType::createStepRange): ditto.
617         * html/MonthInputType.cpp:
618         (WebCore::MonthInputType::createStepRange): ditto.
619         * html/NumberInputType.cpp:
620         (WebCore::NumberInputType::createStepRange): ditto.
621         * html/RangeInputType.cpp:
622         (WebCore::RangeInputType::createStepRange): ditto.
623         * html/StepRange.cpp:
624         (WebCore::StepRange::StepRange): Checks value is finite or not.
625         (WebCore::StepRange::parseStep): Replace NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces.
626         * html/StepRange.h:
627         (StepRange): Removed NumberWithDecimalPlacesOrMissing.
628         * html/TimeInputType.cpp:
629         (WebCore::TimeInputType::createStepRange):  NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces.
630         * html/WeekInputType.cpp:
631         (WebCore::WeekInputType::createStepRange): ditto.
632
633 2012-06-08  Kentaro Hara  <haraken@chromium.org>
634
635         Unreviewed. Fixed a comment, pointed out by ap@.
636
637         * platform/TreeShared.h:
638         (WebCore):
639
640 2012-06-08  Noel Gordon  <noel.gordon@gmail.com>
641
642         [chromium] WEBP image blue and red color channels reversed on Android
643         https://bugs.webkit.org/show_bug.cgi?id=88613
644
645         Reviewed by Kent Tamura.
646
647         No new tests. Covered by test fast/images/webp-image-decoding.html though I'm
648         not sure where/how the Androids run their layout tests.
649
650         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
651         (outputMode): Detect little-endian Skia with a blue pixel shift (aka Android)
652         which seems to be the way for them per bug 75861.
653
654 2012-06-08  Ryosuke Niwa  <rniwa@webkit.org>
655
656         Remove the assertion that has been moved to TreeScope after r119802.
657
658         * dom/Document.cpp:
659         (WebCore::Document::removedLastRef):
660
661 2012-06-07  Kentaro Hara  <haraken@chromium.org>
662
663         Reduce Node object size from 72 byte to 64 byte
664         https://bugs.webkit.org/show_bug.cgi?id=88528
665
666         Reviewed by Ryosuke Niwa.
667
668         This patch removes all virtual methods from TreeShared.h,
669         by which we can remove a virtual method table pointer (8 byte
670         in a 64bit architechture) from each Node object. Consequently,
671         this patch reduces the Node object size from 72 byte to 64 byte.
672
673         e.g. The HTML spec (http://www.whatwg.org/specs/web-apps/current-work/)
674         contains 325640 Node objects. Thus this patch saves 325640 * 8 byte = 2.6 MB.
675
676         e.g. sizeof(Element) is reduced from 104 byte to 96 byte.
677
678         - In multiple inheritance, a virtual method table pointer is allocated
679         for each base class that has virtual methods. For example, for
680         'class A : public B, C {};' where B and C have virtual methods,
681         two virtual method table pointers are allocated for each A object.
682         In this patch, A = Node, B = EventTarget, and C = TreeShared.
683         By removing the virtual methods from TreeShared, we can save the virtual
684         method table pointer for TreeShared. 8 byte saving.
685
686         - Node and SVGElementInstance are the only classes that inherit TreeShared.
687
688         - This patch removes virtual TreeShared::removeLastRef() and implements
689         virtual Node::removeLastRef() and virtual SVGElementInstance::removeLastRef().
690         Node::removeLastRef() calls 'delete this' for 'this' of type Node*,
691         and SVGElementInstance::removeLastRef() calls 'delete this' for 'this' of type
692         SVGElementInstance*.
693
694         - This patch removes the virtual destructor of TreeShared. This removal is safe
695         because (1) no one calls 'delete this' for 'this' of type TreeShared*,
696         and (2) both Node and SVGElementInstance have virtual destructor.
697
698         No change in behavior. Confirm no regression in existing tests.
699
700         * dom/ContainerNode.cpp:
701         (WebCore::callRemovedLastRef):
702         (WebCore):
703         * dom/Node.h:
704         (WebCore::Node::removedLastRef):
705         * platform/TreeShared.h:
706         (WebCore):
707         (TreeShared):
708         (WebCore::TreeShared::deref):
709         * svg/SVGElementInstance.cpp:
710         (WebCore::callRemovedLastRef):
711         (WebCore):
712         * svg/SVGElementInstance.h:
713         (WebCore::SVGElementInstance::removedLastRef):
714
715         * WebCore.order: Added a symbol for callRemovedLastRef().
716         * WebCore.exp.in: Ditto.
717
718 2012-06-07  Takashi Sakamoto  <tasak@google.com>
719
720         ShadowRoot needs resetStyleInheritance
721         https://bugs.webkit.org/show_bug.cgi?id=84048
722
723         Added resetStyleInheritance API to ShadowRoot. The spec URL is
724         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-root-attributes
725         To implement the API, modified StyleResolver to use empty style
726         instead of parent style if resetStyleInheritance is true,
727         and a node and its parent node are placed in different shadow trees.
728
729         Reviewed by Hajime Morita.
730
731         Test: fast/dom/shadow/shadow-root-resetStyleInheritance.html
732               fast/dom/shadow/shadow-root-resetStyleInheritance-expected.html
733
734         * css/StyleResolver.cpp:
735         (WebCore::StyleResolver::initForStyleResolve):
736         Set m_parentStyle to NULL when resetStyleInheritance.
737         (WebCore::StyleResolver::documentSettings):
738         Added a new method to obtain current document's settings.
739         (WebCore::StyleResolver::initializeFontStyle):
740         Initialize m_style by using document settings. Its code was move
741         from the code initializing font style in applyProperty.
742         (WebCore::StyleResolver::styleForElement):
743         Initialize font style if m_parentStyle is NULL. The old code just
744         used style() and don't touch font style. The new code uses the above
745         initializeFontStyle.
746         (WebCore::StyleResolver::applyProperty):
747         Moved a code for initializing font style as "initial" to
748         a new method: initializeFontStyle and modified to use the method.
749         Modified to use documentSettings().
750         (WebCore::StyleResolver::checkForGenericFamilyChange):
751         Modified to use documentSettings().
752         * css/StyleResolver.h:
753         (WebCore::StyleResolver::documentSettings):
754         (WebCore::StyleResolver::initializeFontStyle):
755         Added two new methods to class StyleResolver.
756         * dom/NodeRenderingContext.cpp:
757         (WebCore::NodeRenderingContext::NodeRenderingContext):
758         Modified to calculate m_resetStyleInheritance in its constructor.
759         * dom/NodeRenderingContext.h:
760         (WebCore::NodeRenderingContext::resetStyleInheritance):
761         Implemented a new method, just returning m_resetStyleInheritance.
762         * dom/ShadowRoot.cpp:
763         (WebCore::ShadowRoot::setResetStyleInheritance):
764         Modified to force to recalculate children's styles if
765         resetStyleInheritance is changed.
766         * dom/ShadowRoot.h:
767         (ShadowRoot):
768         Added resetStyleInheritance getter and setter.
769         * dom/ShadowRoot.idl:
770         Added an attribute, resetStyleInheritance.
771         * dom/TreeScope.cpp:
772         (WebCore::TreeScope::resetStyleInheritance):
773         * dom/TreeScope.h:
774         (TreeScope):
775         Added resetStyleInheritance's default getter.
776         The getter will be overrided by class ShadowRoot's getter.
777
778 2012-06-07  Victor Carbune  <victor@rosedu.org>
779
780         addTextTrack should set track mode to HIDDEN
781         https://bugs.webkit.org/show_bug.cgi?id=88317
782
783         Reviewed by Eric Carlson.
784
785         Updated existing test.
786
787         * html/HTMLMediaElement.cpp:
788         (WebCore::HTMLMediaElement::addTextTrack): Set the default parameters
789         for the newly created TextTrack.
790         * html/track/TextTrack.cpp:
791         (WebCore::TextTrack::TextTrack):
792
793 2012-06-07  Li Yin  <li.yin@intel.com>
794
795         FileAPI: Blob should support ArrayBufferView instead of ArrayBuffer for Constructor Parameters
796         https://bugs.webkit.org/show_bug.cgi?id=88294
797
798         Reviewed by Jian Li.
799
800         From Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
801         Currently we add the support for ArrayBufferView, while still keeping ArrayBuffer for
802         backward compatibility. We will remove it in the near future.
803
804         Test: fast/files/blob-constructor.html
805
806         * bindings/js/JSBlobCustom.cpp:
807         (WebCore::JSBlobConstructor::constructJSBlob):
808         * bindings/v8/custom/V8BlobCustom.cpp:
809         (WebCore::V8Blob::constructorCallback):
810         * fileapi/WebKitBlobBuilder.cpp:
811         (WebCore::WebKitBlobBuilder::append):
812         (WebCore):
813         * fileapi/WebKitBlobBuilder.h:
814         (WebCore):
815         (WebKitBlobBuilder):
816         * fileapi/WebKitBlobBuilder.idl: Add support for ArrayBufferView in append method
817
818 2012-06-07  MORITA Hajime  <morrita@google.com>
819
820         A style in an older shadow subtree causes assert when composing with <shadow>
821         https://bugs.webkit.org/show_bug.cgi?id=88299
822
823         Reviewed by Dimitri Glazkov.
824
825         InsertionPoint::attach() assumes its distributed content not being attach()-ed.
826         But this assumption can break. This change added a guard for that.
827         This can happen for shadow boundaries in general. But ShadowRoot already handles that case.
828
829         Test: fast/dom/shadow/insertion-point-shadow-crash.html
830
831         * html/shadow/InsertionPoint.cpp:
832         (WebCore::InsertionPoint::attach):
833
834 2012-06-07  Max Feil  <mfeil@rim.com>
835
836         [BlackBerry] Show correct fullscreen button image (media controls)
837         https://bugs.webkit.org/show_bug.cgi?id=88563
838
839         Reviewed by Antonio Gomes.
840
841         PR159306: Show "exit" fullscreen button image instead of "enter"
842         fullscreen button image when in fullscreen mode (HTML5 media
843         controls).
844
845         I am not providing a test due to the simplicity of this patch
846         and the relative difficulty and maintainability issues associated
847         with testing how an image is rendered.
848
849         * platform/blackberry/RenderThemeBlackBerry.cpp:
850         (WebCore::RenderThemeBlackBerry::paintMediaFullscreenButton):
851
852 2012-06-07  Noel Gordon  <noel.gordon@gmail.com>
853
854         [chromium] Use WEBPImportPictureRGBX|BGRX to import picture data
855         https://bugs.webkit.org/show_bug.cgi?id=88218
856
857         Reviewed by Kent Tamura.
858
859         Stop using the RGBA and RGBA variants of the picture import routines (since
860         these will import alpha channel data in a future libwebp). Use the RGBX and
861         BGRX variants to import picture data for encoding to make it clear that the
862         alpha channel is (and must be) ignored.
863
864         Test: fast/canvas/canvas-toDataURL-webp.html
865
866         * platform/image-encoders/skia/WEBPImageEncoder.cpp:
867         (WebCore::rgbPictureImport):
868         (WebCore::importPictureBGRX): Use WEBPImportPictureBGRX for picture imports
869         that must ignore the alpha channel. Change the template parameter to be the
870         premultiplied alpha state of the input image data.
871         (WebCore::importPictureRGBX): Use WEBPImportPictureRGBX, ditto.
872         (WebCore::encodePixels): Invert the sense of the template parameter to make
873         it now indicate the premultiplied alpha state of the input image data.
874
875 2012-06-07  Takashi Sakamoto  <tasak@google.com>
876
877         Improve the performance of pushScope in StyleResolver
878         https://bugs.webkit.org/show_bug.cgi?id=88222
879
880         Reviewed by Hajime Morita.
881
882         As setupScopeStack always sets m_scopeStackParent to be NULL,
883         m_scopeStack is never reused. m_scopeStackParent should be the last
884         element of m_scopeStack.
885
886         No new tests, because fast/css/style-scoped/ uses pushScope,
887         popScope and setupScopeStack and checks whether there exists
888         any crash bug or not. And this patch doesn't change any behavior
889         of scoped author syltes.
890
891         * css/StyleResolver.cpp:
892         (WebCore::StyleResolver::setupScopeStack):
893         Modified to set m_scopeSackParent to be the last element of
894         m_scopeStack.
895         (WebCore::StyleResolver::popScope):
896         Modified to remove the last element if m_scopeStack is not empty and
897         the last element of m_scopeStack has the same scope as the scoping
898         element given by the argument.
899
900 2012-06-07  Mark Pilgrim  <pilgrim@chromium.org>
901
902         [Chromium] Move didStartWorkerRunLoop to Platform.h
903         https://bugs.webkit.org/show_bug.cgi?id=88562
904
905         Reviewed by Adam Barth.
906
907         Part of a refactoring series. See tracking bug 82948.
908
909         * WebCore.gyp/WebCore.gyp:
910         * bindings/v8/WorkerScriptController.cpp:
911         (WebCore::WorkerScriptController::~WorkerScriptController):
912         * platform/chromium/PlatformSupport.h:
913         (WebCore):
914         * workers/WorkerThread.cpp:
915         (WebCore::WorkerThread::workerThread):
916
917 2012-06-07  Mike West  <mkwst@chromium.org>
918
919         Dropping m_startingLineNumber property from StyledElement.
920         https://bugs.webkit.org/show_bug.cgi?id=86848
921
922         Reviewed by Adam Barth.
923
924         We can have the same effect by moving the line-number calculation
925         directly into StyledElement::styleAttributeChanged. This means that
926         subsequent changes to the style attribute (via script) won't generate
927         error messages with line numbers, but that's an acceptable tradeoff.
928
929         Behavior is covered by existing CSP tests.
930
931         * dom/StyledElement.cpp:
932         (WebCore::StyledElement::StyledElement):
933         (WebCore::StyledElement::styleAttributeChanged):
934         * dom/StyledElement.h:
935         (WebCore::StyledElement::destroyInlineStyle):
936
937 2012-06-07  Peter Beverloo  <peter@chromium.org>
938
939         Initialize m_document in AXObjectCache's constructor for !HAVE(ACCESSIBILITY) builds
940         https://bugs.webkit.org/show_bug.cgi?id=88527
941
942         Reviewed by Adam Barth.
943
944         Initialize the m_document member with the passed on document in the stubbed
945         AXObjectCache constructor. No behavioral changes.
946
947         * accessibility/AXObjectCache.h:
948         (WebCore::AXObjectCache::AXObjectCache):
949
950 2012-06-05  James Robinson  <jamesr@chromium.org>
951
952         [chromium] Move deferral-related logic out of Canvas2DLayerChromium
953         https://bugs.webkit.org/show_bug.cgi?id=86050
954
955         Reviewed by Stephen White.
956
957         This removes Canvas2DLayerChromium and puts the deferral and double-buffering related logic in a new class,
958         Canvas2DLayerBridge, that uses TextureLayerChromium for compositing.  The bridge is responsible for managing the
959         front texture when double buffering is active, inserting the correct makeContextCurrent() and flush() calls on
960         the GraphicsContext3D and SkCanvas when appropriate, and owning the lifetime of the layer.
961
962         * WebCore.gypi:
963         * platform/graphics/chromium/Canvas2DLayerBridge.cpp: Added.
964         (WebCore):
965         (AcceleratedDeviceContext):
966         (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext):
967         (WebCore::AcceleratedDeviceContext::prepareForDraw):
968         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
969         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
970         (WebCore::Canvas2DLayerBridge::skCanvas):
971         (WebCore::Canvas2DLayerBridge::prepareTexture):
972         (WebCore::Canvas2DLayerBridge::context):
973         (WebCore::Canvas2DLayerBridge::layer):
974         (WebCore::Canvas2DLayerBridge::contextAcquired):
975         * platform/graphics/chromium/Canvas2DLayerBridge.h: Added.
976         (WebCore):
977         (Canvas2DLayerBridge):
978         (WebCore::Canvas2DLayerBridge::create):
979         * platform/graphics/chromium/Canvas2DLayerChromium.cpp: Removed.
980         * platform/graphics/chromium/Canvas2DLayerChromium.h: Removed.
981         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
982         * platform/graphics/chromium/ImageBufferDataSkia.h:
983         (WebCore):
984         (ImageBufferData):
985         * platform/graphics/chromium/TextureLayerChromium.cpp:
986         (WebCore::TextureLayerChromium::willModifyTexture):
987             willModifyTexture() is called whenever the texture currently owned by the TextureLayerChromium will be
988             modified by a system out of the compositor's control. It makes sure that the compositor does not attempt to
989             draw with the potentially-modified texture until the next commit. For canvas, this is used when threading is
990             enabled and a non-deferrable drawing command is invoked from JS.
991         (WebCore):
992         * platform/graphics/chromium/TextureLayerChromium.h:
993         (TextureLayerChromium):
994         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
995         (WebCore::CCTextureUpdater::hasMoreUpdates):
996         (WebCore::CCTextureUpdater::update):
997         (WebCore::CCTextureUpdater::clear):
998         * platform/graphics/chromium/cc/CCTextureUpdater.h:
999         (CCTextureUpdater):
1000         * platform/graphics/skia/ImageBufferSkia.cpp:
1001         (WebCore::createAcceleratedCanvas):
1002         (WebCore::ImageBuffer::~ImageBuffer):
1003         (WebCore::ImageBuffer::context):
1004         (WebCore::ImageBuffer::platformLayer):
1005
1006 2012-06-07  Patrick Gansterer  <paroga@webkit.org>
1007
1008         Remove HAVE(PATH_BASED_BORDER_RADIUS_DRAWING)
1009         https://bugs.webkit.org/show_bug.cgi?id=87931
1010
1011         Reviewed by Beth Dakin.
1012
1013         r62035 added HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) until all ports implement
1014         GraphicsContext::clipConvexPolygon(). All major ports define HAVE_PATH_BASED_BORDER_RADIUS_DRAWING in the
1015         meantime and the alternative path has unnecessary maintainace costs and even don't compile at the moment.
1016
1017         * rendering/RenderBoxModelObject.cpp:
1018         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
1019         * rendering/RenderObject.cpp:
1020         (WebCore::RenderObject::paintFocusRing):
1021         * rendering/RenderObject.h:
1022         (RenderObject):
1023
1024 2012-06-06  Vincent Scheib  <scheib@chromium.org>
1025
1026         Add new Pointer Lock spec events webkitpointerlockchange and webkitpointerlockerror
1027         https://bugs.webkit.org/show_bug.cgi?id=88377
1028
1029         Reviewed by Dimitri Glazkov.
1030
1031         Part of a series of refactoring changes to update pointer lock API to
1032         the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402
1033
1034         New change and error events added. Follow up patches will remove
1035         the previous callbacks and pointerlocklost event. Tests updated
1036         to include the new events, and a new test added specifically for
1037         the new events, pointerlockchange-pointerlockerror-events.html.
1038
1039         Test: pointer-lock/pointerlockchange-pointerlockerror-events.html
1040
1041         * dom/Document.h:
1042         (Document):
1043         * dom/Document.idl:
1044         * dom/EventNames.h:
1045         (WebCore):
1046         * page/PointerLockController.cpp:
1047         (WebCore::PointerLockController::requestPointerLock):
1048         (WebCore::PointerLockController::didAcquirePointerLock):
1049         (WebCore::PointerLockController::didNotAcquirePointerLock):
1050         (WebCore::PointerLockController::didLosePointerLock):
1051         (WebCore::PointerLockController::enqueueEvent):
1052         (WebCore):
1053         * page/PointerLockController.h:
1054         (PointerLockController):
1055
1056 2012-06-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1057
1058         Unreviewed, rolling out r119744.
1059         http://trac.webkit.org/changeset/119744
1060         https://bugs.webkit.org/show_bug.cgi?id=88584
1061
1062         Fails assertions in debug builds (Requested by jamesr_ on
1063         #webkit).
1064
1065         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
1066         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
1067         (WebCore::CCIOSurfaceLayerImpl::willDraw):
1068
1069 2012-06-07  Julien Chaffraix  <jchaffraix@webkit.org>
1070
1071         Cache RenderLayer::isRootLayer for better performance
1072         https://bugs.webkit.org/show_bug.cgi?id=88570
1073
1074         Reviewed by Ojan Vafai.
1075
1076         Caching covered by existing tests.
1077
1078         RenderLayer::isRootLayer()'s answer will be the same during the RenderLayer's
1079         lifetime as a RenderLayer is tied to a RenderBoxModelObject. This change caches
1080         isRootLayer value in the constructor.
1081
1082         On http://dglazkov.github.com/performance-tests/biggrid.html with a 100,000 rows
1083         by 100 columns table, it saves about 10% on the paint time during scrolling on
1084         my machine (going from 50ms to 45ms). It would expect all code paths to see some
1085         improvement as checking renderer()->isRenderView() was pretty common.
1086
1087         * rendering/RenderLayer.cpp:
1088         (WebCore::RenderLayer::RenderLayer):
1089         Added code to cache the result of renderer()->isRenderView() here.
1090
1091         (WebCore::RenderLayer::stackingContext):
1092         (WebCore::isPositionedContainer):
1093         (WebCore::isFixedPositionedContainer):
1094         (WebCore::RenderLayer::enclosingTransformedAncestor):
1095         (WebCore::RenderLayer::clippingRootForPainting):
1096         (WebCore::shouldSuppressPaintingLayer):
1097         (WebCore::RenderLayer::hitTest):
1098         (WebCore::RenderLayer::intersectsDamageRect):
1099         * rendering/RenderLayer.h:
1100         (WebCore::RenderLayer::isStackingContext):
1101         Updated all the call sites to use isRootLayer() instead of renderer()->isRenderView()
1102         as it is faster.
1103
1104         (WebCore::RenderLayer::isRootLayer):
1105         Added our caching here. Also made m_canSkipRepaintRectsUpdateOnScroll to follow
1106         m_isRootLayer example.
1107
1108 2012-06-07  Takashi Sakamoto  <tasak@google.com>
1109
1110         Incorrect border rendering when border radius is above 2px.
1111         https://bugs.webkit.org/show_bug.cgi?id=88046
1112
1113         Fixing findInnerVertex's logic to decide which is the better line
1114         to find an inner vertex, x=center point's x of a rendering box or
1115         y=center point's y of a rendering box.
1116
1117         Reviewed by Simon Fraser.
1118
1119         Test: fast/borders/border-radius-valid-border-clipping.html
1120
1121         * rendering/RenderBoxModelObject.cpp:
1122         (WebCore::findInnerVertex):
1123
1124 2012-06-07  Edaena Salinas Jasso  <edaena@apple.com>
1125
1126         Should fire error event for empty 404 script
1127         https://bugs.webkit.org/show_bug.cgi?id=50589
1128         
1129         Reviewed by Brady Eidson.
1130
1131         Tests: 
1132         http/tests/loading/fire-error-event-empty-404-script.html
1133         http/tests/loading/fire-error-script-no-content-type.html
1134
1135         * loader/SubresourceLoader.cpp:
1136         (WebCore::SubresourceLoader::didReceiveResponse): We should check for http status 
1137         codes here to stop depending on the response being non-empty.
1138         (WebCore::SubresourceLoader::didReceiveData): Moved the http status check but
1139         avoid messing with multipart responses.
1140         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError): Renamed from 
1141         errorLoadingResource for clarity.
1142
1143         * loader/SubresourceLoader.h:
1144         * loader/cf/SubresourceLoaderCF.cpp:
1145         (WebCore::SubresourceLoader::didReceiveDataArray):
1146         Updated for errorLoadingResource renaming.
1147
1148 2012-06-07  Konrad Piascik  <kpiascik@rim.com>
1149
1150         [BlackBerry] Update PlayBook's User Agent String for Web Inspector
1151         https://bugs.webkit.org/show_bug.cgi?id=88543
1152
1153         Reviewed by Antonio Gomes.
1154
1155         We expect users to upgrade their devices so developers only need the latest UA String.
1156
1157         No tests needed.
1158
1159         * inspector/front-end/SettingsScreen.js:
1160         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
1161
1162 2012-06-07  Shawn Singh  <shawnsingh@chromium.org>
1163
1164         [chromium] Remove obsolete FIXME comment about a layer sorting bug.
1165         https://bugs.webkit.org/show_bug.cgi?id=88546
1166
1167         Reviewed by James Robinson.
1168
1169         No tests needed, only comment changed. The comment referred to a
1170         potential bug that actually will not occur. The W3C spec on CSS 3d
1171         transforms indicates that layers that do not share the same "3d
1172         rendering context" do not sort together, and our existing code
1173         sorts this way already.
1174
1175         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1176         (WebCore::subtreeShouldRenderToSeparateSurface):
1177
1178 2012-06-07  Adam Barth  <abarth@webkit.org>
1179
1180         Settings::defaultDeviceScaleFactor is redundant with Page::deviceScaleFactor
1181         https://bugs.webkit.org/show_bug.cgi?id=88375
1182
1183         Reviewed by James Robinson.
1184
1185         This patch removes Settings::defaultDeviceScaleFactor because it is
1186         redundant with Page::deviceScaleFactor now that we no longer support
1187         target-densitydpi.  Page::deviceScaleFactor is the canonical place to
1188         store the device scale factor.
1189
1190         * WebCore.exp.in:
1191         * page/Settings.cpp:
1192         (WebCore::Settings::Settings):
1193         (WebCore):
1194         * page/Settings.h:
1195         (Settings):
1196         * testing/InternalSettings.cpp:
1197         (WebCore::InternalSettings::setDeviceScaleFactor):
1198
1199 2012-06-07  Alec Flett  <alecflett@chromium.org>
1200
1201         IndexedDB: Error codes, phase one
1202         https://bugs.webkit.org/show_bug.cgi?id=88459
1203
1204         Reviewed by Tony Chang.
1205
1206         This phase gets rid of the now-deprecated NOT_ALLOWED_ERR and
1207         NON_TRANSIENT_ERR from earlier versions of the spec, and
1208         normalizes the place where TypeError should be thrown so that it's
1209         easier to update when the bindings change.
1210
1211         No new tests: existing tests cover these changes and have been updated.
1212
1213         * Modules/indexeddb/IDBCursor.cpp:
1214         (WebCore::IDBCursor::advance):
1215         (WebCore::IDBCursor::continueFunction):
1216         (WebCore::IDBCursor::stringToDirection):
1217         (WebCore::IDBCursor::directionToString):
1218         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1219         (WebCore::IDBCursorBackendImpl::update):
1220         (WebCore::IDBCursorBackendImpl::deleteFunction):
1221         * Modules/indexeddb/IDBDatabase.cpp:
1222         (WebCore::IDBDatabase::createObjectStore):
1223         (WebCore::IDBDatabase::deleteObjectStore):
1224         (WebCore::IDBDatabase::setVersion):
1225         (WebCore::IDBDatabase::transaction):
1226         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1227         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1228         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
1229         (WebCore::IDBDatabaseBackendImpl::setVersion):
1230         * Modules/indexeddb/IDBDatabaseException.cpp:
1231         (WebCore):
1232         * Modules/indexeddb/IDBDatabaseException.h:
1233         * Modules/indexeddb/IDBDatabaseException.idl:
1234         * Modules/indexeddb/IDBFactory.cpp:
1235         (WebCore::IDBFactory::open):
1236         (WebCore::IDBFactory::deleteDatabase):
1237         * Modules/indexeddb/IDBObjectStore.cpp:
1238         (WebCore::IDBObjectStore::index):
1239         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1240         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1241         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
1242         * Modules/indexeddb/IDBRequest.cpp:
1243         (WebCore::IDBRequest::result):
1244         (WebCore::IDBRequest::errorCode):
1245         (WebCore::IDBRequest::webkitErrorMessage):
1246         * Modules/indexeddb/IDBTransaction.cpp:
1247         (WebCore::IDBTransaction::objectStore):
1248         (WebCore::IDBTransaction::stringToMode):
1249         (WebCore::IDBTransaction::modeToString):
1250         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1251         (WebCore::IDBTransactionBackendImpl::objectStore):
1252
1253 2012-06-07  Dana Jansens  <danakj@chromium.org>
1254
1255         [chromium] Free texture from CCIOSurfaceLayerImpl when it is destroyed
1256         https://bugs.webkit.org/show_bug.cgi?id=88371
1257
1258         Reviewed by James Robinson.
1259
1260         Unit test: CCLayerTreeHostImplTest.layersFreeTextures
1261
1262         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
1263         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
1264         (WebCore::CCIOSurfaceLayerImpl::willDraw):
1265
1266 2012-06-07  Peter Beverloo  <peter@chromium.org>
1267
1268         Buildfix for ENABLE_OVERFLOW_SCROLLING=0 (though defined)
1269         https://bugs.webkit.org/show_bug.cgi?id=88564
1270
1271         Reviewed by Adam Barth.
1272
1273         Where ENABLE(X) mandates that X both has to be defined and evaluates to
1274         true as a lone preprocessor statement, there were two places in the CSS
1275         property and value input files where only was checked whether is has
1276         been defined. This also goes against other #ifdefs in those files.
1277
1278         * css/CSSPropertyNames.in:
1279         * css/CSSValueKeywords.in:
1280
1281 2012-06-07  Ami Fischman  <fischman@chromium.org>
1282
1283         Plumb CORS attribute information from HTMLMediaElement to media players so it can be used
1284         https://bugs.webkit.org/show_bug.cgi?id=88349
1285
1286         Reviewed by Adam Barth.
1287
1288         Test: http/tests/security/video-cross-origin-readback.html
1289
1290         * html/HTMLMediaElement.cpp:
1291         (WebCore::HTMLMediaElement::mediaPlayerCORSMode):
1292         (WebCore):
1293         * html/HTMLMediaElement.h:
1294         (HTMLMediaElement):
1295         * html/canvas/CanvasRenderingContext.cpp:
1296         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
1297         * platform/graphics/MediaPlayer.cpp:
1298         (WebCore::MediaPlayer::didPassCORSAccessCheck):
1299         (WebCore):
1300         * platform/graphics/MediaPlayer.h:
1301         (WebCore::MediaPlayerClient::mediaPlayerCORSMode):
1302         (MediaPlayer):
1303         * platform/graphics/MediaPlayerPrivate.h:
1304         (WebCore::MediaPlayerPrivateInterface::didPassCORSAccessCheck):
1305         (MediaPlayerPrivateInterface):
1306
1307 2012-06-07  Mark Hahnenberg  <mhahnenberg@apple.com>
1308
1309         Worker tear-down can re-enter JSC during GC finalization
1310         https://bugs.webkit.org/show_bug.cgi?id=88449
1311
1312         Reviewed by Geoffrey Garen.
1313
1314         No new tests. 
1315
1316         This is the first of two patches to fix this issue with Workers.
1317
1318         * workers/AbstractWorker.cpp:
1319         (WebCore::AbstractWorker::~AbstractWorker): We don't need to call onDestroyWorker() here, it 
1320         will be called elsewhere in contextDestroyed().
1321
1322 2012-06-07  Jer Noble  <jer.noble@apple.com>
1323
1324         sometimes all slaved videos don't start playing
1325         https://bugs.webkit.org/show_bug.cgi?id=88553
1326
1327         Reviewed by Darin Adler.
1328
1329         Test: media/media-controller-time-clamp.html
1330
1331         Some PlatformClock classes will occasionally return times < 0 and will
1332         always return times slightly > duration() when playback has ended.  Clamp
1333         the value of currentTime() to the specified [0..duration] range.
1334
1335         * html/MediaController.cpp:
1336         (MediaController::currentTime):
1337
1338 2012-06-07  Simon Fraser  <simon.fraser@apple.com>
1339
1340         Optimize FrameView::scrollXForFixedPosition() / scrollYForFixedPosition()
1341         https://bugs.webkit.org/show_bug.cgi?id=88475
1342
1343         Reviewed by Sam Weinig.
1344         
1345         FrameView's scrollXForFixedPosition() and scrollYForFixedPosition()
1346         methods were often called together, but they do duplicate work,
1347         including calling into platform widget code which might be slow.
1348         
1349         Fix by converting scrollOffsetForFixedPosition() from being a wrapper
1350         that just calls scrollXForFixedPosition() and scrollYForFixedPosition()
1351         to the method that does all the work, calling just once into platform
1352         widget code.
1353         
1354         Changed callers to use scrollOffsetForFixedPosition() rather than make
1355         two separate method calls.
1356         
1357         Added ScrollView::layoutSize() and visibleSize() methods for
1358         convenience.
1359         
1360         Removed FrameView::scrollXForFixedPosition and FrameView::scrollYForFixedPosition
1361         to avoid inefficient callers in future.
1362
1363         No new tests; refactoring only.
1364
1365         * page/FrameView.cpp:
1366         (WebCore::fixedPositionScrollOffset):
1367         (WebCore::FrameView::scrollOffsetForFixedPosition):
1368         * page/FrameView.h: Removed scrollXForFixedPosition and scrollYForFixedPosition.
1369         * platform/ScrollView.cpp:
1370         (WebCore::ScrollView::layoutSize):
1371         * platform/ScrollView.h:
1372         (WebCore::ScrollView::visibleSize):
1373         * rendering/RenderLayer.cpp:
1374         (WebCore::RenderLayer::backgroundClipRect):
1375         * rendering/RenderLayer.h:
1376         (WebCore::ClipRect::move):
1377         * rendering/RenderLayerCompositor.cpp:
1378         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1379         * rendering/RenderView.cpp:
1380         (WebCore::RenderView::computeRectForRepaint):
1381
1382 2012-06-07  Raymes Khoury  <raymes@chromium.org>
1383
1384         Incorrect rect-based hit-test result for culled-inline elements
1385         https://bugs.webkit.org/show_bug.cgi?id=85849
1386
1387         Reviewed by Levi Weintraub.
1388
1389         Modified code which blindly adds culled inlines to rect-based hit-test
1390         results so that it only does so if the child node does not fully cover
1391         the hit-test region.
1392
1393         Test: fast/dom/nodesFromRect-culled-inline.html
1394
1395         * rendering/HitTestResult.cpp:
1396         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1397
1398 2012-06-07  Daniel Erat  <derat@chromium.org>
1399
1400         Make Skia backend honor requests for subpixel-positioned text.
1401         https://bugs.webkit.org/show_bug.cgi?id=88263
1402
1403         Reviewed by Tony Chang.
1404
1405         Add subpixel positioning field to FontRenderStyle and rename
1406         subpixel rendering field.
1407
1408         Pass setting to SkPaint in FontPlatformDataHarfBuzz and remove
1409         round() call when computing glyph widths in SimpleFontDataSkia.
1410
1411         Test: platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html
1412
1413         * platform/graphics/blackberry/skia/PlatformSupport.cpp:
1414         (WebCore::setFontRenderStyleDefaults):
1415         (WebCore::PlatformSupport::getRenderStyleForStrike):
1416         * platform/graphics/chromium/FontRenderStyle.h:
1417         (WebCore::FontRenderStyle::FontRenderStyle):
1418         (WebCore::FontRenderStyle::operator==):
1419         (FontRenderStyle):
1420         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1421         (WebCore):
1422         (WebCore::FontPlatformData::setSubpixelRendering):
1423         (WebCore::FontPlatformData::setSubpixelPositioning):
1424         (WebCore::FontPlatformData::setupPaint):
1425         (WebCore::FontPlatformData::querySystemForRenderStyle):
1426         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1427         (FontPlatformData):
1428         * platform/graphics/skia/SimpleFontDataSkia.cpp:
1429         (WebCore::SimpleFontData::platformWidthForGlyph):
1430
1431 2012-06-06  Dana Jansens  <danakj@chromium.org>
1432
1433         [chromium] In each composited frame, didDraw() should only be called on layers for which willDraw() was called
1434         https://bugs.webkit.org/show_bug.cgi?id=88469
1435
1436         Reviewed by James Robinson.
1437
1438         Unit test: CCLayerTreeHostImplTest.didDrawNotCalledOnScissoredLayer
1439
1440         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1441         (WebCore::shouldDrawLayer):
1442         (WebCore):
1443         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1444         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
1445
1446 2012-06-07  Alexei Filippov  <alexeif@chromium.org>
1447
1448         Web Inspector: sorting of object fields is broken in heap profiler
1449         https://bugs.webkit.org/show_bug.cgi?id=88532
1450
1451         A recent change to heap profiler has replaced getters with functions.
1452         Function calls were missing in couple places after that change.
1453
1454         Reviewed by Vsevolod Vlasov.
1455
1456         Tests: inspector/profiler/heap-snapshot-summary-sorting-fields.html
1457                inspector/profiler/heap-snapshot-summary-sorting-instances.html
1458
1459         * inspector/front-end/HeapSnapshot.js:
1460         (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareNodeField):
1461
1462 2012-06-07  Alexander Pavlov  <apavlov@chromium.org>
1463
1464         Web Inspector: Consider Ctrl+Shift+key as valid zoom change combinations
1465         https://bugs.webkit.org/show_bug.cgi?id=88520
1466
1467         Reviewed by Vsevolod Vlasov.
1468
1469         * inspector/front-end/inspector.js:
1470         (WebInspector.documentKeyDown):
1471
1472 2012-06-07  Arvid Nilsson  <anilsson@rim.com>
1473
1474         [BlackBerry] Allow WebPageCompositor to blend a transparent web page
1475         https://bugs.webkit.org/show_bug.cgi?id=88233
1476
1477         Reviewed by Rob Buis.
1478
1479         RIM PR #159998
1480
1481         Add a parameter to LayerRenderer::compositeBuffer() indicating whether
1482         the buffer contents are opaque, and set the GL blend mode accordingly.
1483
1484         This is not currently testable using BlackBerry testing infrastructure.
1485
1486         Reviewed internally by Jakob Petsovits.
1487
1488         * platform/graphics/blackberry/LayerRenderer.cpp:
1489         (WebCore::LayerRenderer::compositeBuffer):
1490         * platform/graphics/blackberry/LayerRenderer.h:
1491         (LayerRenderer):
1492
1493 2012-06-07  Alexei Filippov  <alexeif@chromium.org>
1494
1495         Web Inspector: reuse edge_count field of heap snapshot to store retained size
1496         https://bugs.webkit.org/show_bug.cgi?id=88416
1497
1498         The edge_count field is unused after node first edge indexes have been built.
1499         Store node retained size in there instead of allocating an extra array for it.
1500
1501         Reviewed by Vsevolod Vlasov.
1502
1503         * inspector/front-end/HeapSnapshot.js:
1504         (WebInspector.HeapSnapshotNode.prototype.retainedSize):
1505         (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes):
1506
1507 2012-06-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1508
1509         Unreviewed, rolling out r119694.
1510         http://trac.webkit.org/changeset/119694
1511         https://bugs.webkit.org/show_bug.cgi?id=88529
1512
1513         it broke PrerenderBrowserTest.PrerenderHTML5VideoNetwork
1514         (Requested by loislo on #webkit).
1515
1516         * html/HTMLMediaElement.cpp:
1517         * html/HTMLMediaElement.h:
1518         (HTMLMediaElement):
1519         * html/canvas/CanvasRenderingContext.cpp:
1520         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
1521         * platform/graphics/MediaPlayer.cpp:
1522         * platform/graphics/MediaPlayer.h:
1523         (MediaPlayer):
1524         * platform/graphics/MediaPlayerPrivate.h:
1525
1526 2012-06-07  Shinya Kawanaka  <shinyak@chromium.org>
1527
1528         Delete a contenteditable element having a Shadow DOM causes a crash.
1529         https://bugs.webkit.org/show_bug.cgi?id=86345
1530
1531         Reviewed by Ryosuke Niwa.
1532
1533         In VisibleSelection::validate(), m_start.downstream() or m_end.upstream() might cross
1534         editing boundaries. So we adjust selection after calling them again.
1535
1536         Test: editing/shadow/select-contenteditable-shadowhost.html
1537
1538         * editing/VisibleSelection.cpp:
1539         (WebCore::VisibleSelection::validate):
1540
1541 2012-06-07  Vivek Galatage  <vivekgalatage@gmail.com>
1542
1543         No new line at the end for SVGCSSPropertyNames.in causes compilation warning
1544         https://bugs.webkit.org/show_bug.cgi?id=88503
1545
1546         Reviewed by Ryosuke Niwa.
1547
1548         Added new line at the end of the file.
1549
1550         No new tests required.
1551
1552         * css/SVGCSSPropertyNames.in:
1553
1554 2012-06-07  Csaba Osztrogonác  <ossy@webkit.org>
1555
1556         [Qt][Win] Use OS(WINDOWS) instead of Q_WS_WIN in WebCore/platform/graphics/GraphicsContext.h
1557         https://bugs.webkit.org/show_bug.cgi?id=88305
1558
1559         Reviewed by Simon Hausmann.
1560
1561         * platform/graphics/GraphicsContext.h: Buildfix.
1562         (GraphicsContext):
1563
1564 2012-06-07  Shinya Kawanaka  <shinyak@chromium.org>
1565
1566         Incorrect data retrieved in calls to get selection data in client->textWillBeReplaced from CharacterData::setDataAndUpdate
1567         https://bugs.webkit.org/show_bug.cgi?id=66120
1568
1569         Reviewed by Ryosuke Niwa.
1570
1571         Since FrameSelection::textWillBeReplaced was called before replacing text, updated Selection became
1572         temporarily invalid. The invalid selection was set to updateSelection(), so client will have
1573         invalid selection.
1574
1575         This patch makes calling updateSelection() after updating selection.
1576
1577         No new tests, it's too hard to create a correct test cases in DRT.
1578
1579         * dom/CharacterData.cpp:
1580         (WebCore::CharacterData::setDataAndUpdate):
1581         * editing/FrameSelection.cpp:
1582         (WebCore::updatePositionAfterAdoptingTextReplacement):
1583         (WebCore::FrameSelection::textWasReplaced):
1584         * editing/FrameSelection.h:
1585         (FrameSelection):
1586
1587 2012-06-07  Li Yin  <li.yin@intel.com>
1588
1589         FileAPI: If type consists of non-ASCII characters in Blob constructor, it should throw a SyntaxError.
1590         https://bugs.webkit.org/show_bug.cgi?id=88411
1591
1592         Reviewed by Kentaro Hara.
1593
1594         From spec: http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob
1595         If type consists of any non-ASCII characters, throw a SyntaxError and
1596         return from this algorithm.
1597         This patch checks the String is ASCii or not, if not, throw SyntaxError.
1598
1599         Test: fast/files/blob-constructor.html
1600
1601         * bindings/js/JSBlobCustom.cpp:
1602         (WebCore::JSBlobConstructor::constructJSBlob):
1603         * bindings/v8/custom/V8BlobCustom.cpp:
1604         (WebCore::V8Blob::constructorCallback):
1605
1606 2012-06-07  Arpita Bahuguna  <arpitabahuguna@gmail.com>
1607
1608         InsertUnorderedList and InsertOrderedList (execCommand) do not remove bullets
1609         https://bugs.webkit.org/show_bug.cgi?id=84597
1610
1611         Reviewed by Ryosuke Niwa.
1612
1613         Comparison between start and end VisiblePositions will fail when a position inside
1614         a paragraph is compared with one at the start of the paragraph.
1615         
1616         This fix thus converts the end VisiblePosition (which could be inside the paragraph)
1617         to the start of the paragraph thereby enabling a proper comparison of start and end
1618         positions.
1619
1620         Test: editing/execCommand/remove-list-from-multi-list-items.html
1621
1622         * editing/InsertListCommand.cpp:
1623         (WebCore::InsertListCommand::selectionHasListOfType):
1624
1625 2012-06-07  Li Yin  <li.yin@intel.com>
1626
1627         [FileAPI] FileReader should throw an InvalidStateError exception when readyState is LOADING
1628         https://bugs.webkit.org/show_bug.cgi?id=88212
1629
1630         Reviewed by Jian Li.
1631
1632         From Spec: http://www.w3.org/TR/FileAPI/#readAsBinaryString
1633         FileReader should throw an InvalidStateError exception instead of NOT_ALLOWED_ERR
1634         when the readyState is LOADING.
1635         Also delete OperationNotAllowedException related code, because it is not longer needed.
1636
1637         Tests: fast/files/read-file-async.html
1638                fast/files/workers/worker-read-file-async.html
1639
1640         * CMakeLists.txt:
1641         * DerivedSources.cpp:
1642         * DerivedSources.make:
1643         * DerivedSources.pri:
1644         * GNUmakefile.list.am:
1645         * Target.pri:
1646         * WebCore.gypi:
1647         * WebCore.vcproj/WebCore.vcproj:
1648         * WebCore.xcodeproj/project.pbxproj:
1649         * dom/DOMExceptions.in:
1650         * fileapi/FileReader.cpp:
1651         (WebCore::FileReader::readInternal): Changed it to throw INVALID_STATE_ERR.
1652         * fileapi/FileReader.idl: Changed it to raise DOMException for all read methods.
1653         * fileapi/OperationNotAllowedException.cpp: Removed.
1654         * fileapi/OperationNotAllowedException.h: Removed.
1655         * fileapi/OperationNotAllowedException.idl: Removed.
1656
1657 2012-06-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1658
1659         Unreviewed, rolling out r119689.
1660         http://trac.webkit.org/changeset/119689
1661         https://bugs.webkit.org/show_bug.cgi?id=88516
1662
1663         it broke didDrawNotCalledOnScissoredLayer webkit_unit_test
1664         (Requested by loislo on #webkit).
1665
1666         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1667         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1668         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
1669
1670 2012-06-07  Ami Fischman  <fischman@chromium.org>
1671
1672         Plumb CORS attribute information from HTMLMediaElement to media players so it can be used
1673         https://bugs.webkit.org/show_bug.cgi?id=88349
1674
1675         Reviewed by Adam Barth.
1676
1677         Test: http/tests/security/video-cross-origin-readback.html
1678
1679         * html/HTMLMediaElement.cpp:
1680         (WebCore::HTMLMediaElement::mediaPlayerCORSMode):
1681         (WebCore):
1682         * html/HTMLMediaElement.h:
1683         (HTMLMediaElement):
1684         * platform/graphics/MediaPlayer.h:
1685         (WebCore::MediaPlayerClient::mediaPlayerCORSMode):
1686
1687 2012-06-07  Hironori Bono  <hbono@chromium.org>
1688
1689         Use light gray for grammar markers on Windows and Linux
1690         https://bugs.webkit.org/show_bug.cgi?id=88398
1691
1692         Reviewed by Ryosuke Niwa.
1693
1694         This change changes the color of grammar markers from dark gray to light gray
1695         and rebaselines a couple of pixel tests affected by this change.
1696
1697         No new tests because it changes the marker color of an existing test 'grammar-markers.html'.
1698
1699         * platform/graphics/skia/GraphicsContextSkia.cpp: Change dark gray to light gray.
1700
1701 2012-06-07  Yoshifumi Inoue  <yosin@chromium.org>
1702
1703         [Platform] Introduce conversion from/to Deciaml to/from double
1704         https://bugs.webkit.org/show_bug.cgi?id=88480
1705
1706         Reviewed by Kent Tamura.
1707
1708         This patch added functions for Decimal/Double conversion and isInfinity
1709         for reducing patch size of introducing Decimal arithmetic, bug 88383.
1710
1711         Tests: WebKit/chromium/tests/DecimalTest.cpp
1712
1713         * platform/Decimal.cpp:
1714         (WebCore::Decimal::fromDouble): Added.
1715         (WebCore::Decimal::toDouble): Added.
1716         * platform/Decimal.h:
1717         (WebCore::Decimal::EncodedData::isInfinity): Added for isinf()
1718         (WebCore::Decimal::isInfinity): Added.
1719
1720 2012-06-06  Xianzhu Wang  <wangxianzhu@chromium.org>
1721
1722         Element.getBoundingClientRect() and Element.getClientRects() return incorrect values in frames in a scaled page
1723         https://bugs.webkit.org/show_bug.cgi?id=88430
1724
1725         Element.getBoudingClientRect() and Element.getClientRects() should not scale back the rects
1726         if the element is in a frame because page scale only apply to elements in the main frame.
1727
1728         Reviewed by James Robinson.
1729
1730         Tests: fast/dom/Element/scale-page-bounding-client-rect-in-frame.html
1731                fast/dom/Element/scale-page-client-rects-in-frame.html
1732
1733         * dom/Document.cpp:
1734         (WebCore):
1735         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale): Extracted from Element.cpp and Range.cpp and fixed issue of pageScale in frames.
1736         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale): Extracted from Element.cpp and fixed issue of pageScale in frames.
1737         * dom/Document.h:
1738         (WebCore):
1739         (Document):
1740         * dom/Element.cpp:
1741         (WebCore::Element::getClientRects):
1742         (WebCore::Element::getBoundingClientRect):
1743         * dom/Range.cpp:
1744         (WebCore):
1745         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale): Moved into Document and fixed issue of pageScale in frames.
1746         (WebCore::Range::getBorderAndTextQuads):
1747         * rendering/RenderObject.h: Removed adjustFloatQuadForPageScale and adjustFloatRectForPageScale because they seem unrelated to RenderObject.
1748         (WebCore):
1749
1750 2012-06-06  Dana Jansens  <danakj@chromium.org>
1751
1752         [chromium] In each composited frame, didDraw() should only be called on layers for which willDraw() was called
1753         https://bugs.webkit.org/show_bug.cgi?id=88469
1754
1755         Reviewed by James Robinson.
1756
1757         Unit test: CCLayerTreeHostImplTest.didDrawNotCalledOnScissoredLayer
1758
1759         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1760         (WebCore::shouldDrawLayer):
1761         (WebCore):
1762         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1763         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
1764
1765 2012-06-06  Andy Estes  <aestes@apple.com>
1766
1767         Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT)
1768         https://bugs.webkit.org/show_bug.cgi?id=88504
1769
1770         Reviewed by Dan Bernstein.
1771
1772         uppercaseWord, lowercaseWord, and capitalizeWord are methods declared
1773         by NSResponder that subclasses are expected to implement. WebKit should
1774         only support these implementations on platforms that use AppKit.
1775
1776         * WebCore.exp.in:
1777         * editing/Editor.cpp:
1778         * editing/Editor.h:
1779         * loader/EmptyClients.h:
1780         * page/ContextMenuController.cpp:
1781         * page/EditorClient.h:
1782
1783 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1784
1785         Unreviewed, rolling out r119683.
1786         http://trac.webkit.org/changeset/119683
1787         https://bugs.webkit.org/show_bug.cgi?id=88505
1788
1789         it broke webkit-unit-test
1790         WebLayerTreeViewThreadedTest.InstrumentationCallbacks on mac
1791         (Requested by loislo on #webkit).
1792
1793         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1794         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
1795         (WebCore::CCLayerTreeHost::setVisible):
1796
1797 2012-06-06  Robert Kroeger  <rjkroege@chromium.org>
1798
1799         [Chromium] Re-enable handling of smooth scrolling on Chromium Linux/Windows
1800         https://bugs.webkit.org/show_bug.cgi?id=87535 by adding support for
1801         m_hasPreciseScrollingDelta on all Chromium platforms and adjusting ScrollAnimator
1802         and ScrollAnimatorNone accordingly to let m_hasPreciseScrollingDelta == true
1803         force exact (non-animated) scrolling.
1804
1805         Reviewed by James Robinson.
1806
1807         Updated WebKit unit tests to validate change.
1808
1809         * platform/PlatformWheelEvent.h:
1810         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Adjusted #ifdefs to
1811         make m_hasPreciseScrollingDelta available on all Chromium platforms.
1812         (PlatformWheelEvent):
1813         * platform/ScrollAnimator.cpp:
1814         (WebCore::ScrollAnimator::handleWheelEvent): Default scroll type is set based on 
1815         m_hasPreciseScrollingDelta value.
1816         * platform/ScrollAnimatorNone.cpp:
1817         (WebCore::ScrollAnimatorNone::scroll): Scroll precisely when necessary.
1818         * platform/ScrollTypes.h: Added additional pixel scrolling subtype.
1819         * platform/ScrollableArea.cpp:
1820         (WebCore::ScrollableArea::scroll): Updated for additional pixel scroll subtype.
1821
1822 2012-06-06  Michal Mocny  <mmocny@google.com>
1823
1824         [chromium] Stop dropping texture limits when the layer tree host becomes invisible, and initialize with 0 allocation.
1825         https://bugs.webkit.org/show_bug.cgi?id=87747
1826
1827         Reviewed by Adrienne Walker.
1828
1829         GpuMemoryManager manages texture memory allocation limits. It will send a 0 allocation when a renderer becomes
1830         invisible, and an appropriate allocation after a renderer is initialized.  These numbers will change
1831         depending on the state of memory across devices and other renderers, so we would like to remove all explicit
1832         management by the renderers themselves.
1833
1834         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1835         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
1836         (WebCore::CCLayerTreeHost::setVisible):
1837
1838 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1839
1840         Unreviewed, rolling out r119680.
1841         http://trac.webkit.org/changeset/119680
1842         https://bugs.webkit.org/show_bug.cgi?id=88498
1843
1844         It broke mac build (Requested by kinuko on #webkit).
1845
1846         * fileapi/File.cpp:
1847         (WebCore::File::File):
1848         (WebCore::File::lastModifiedDate):
1849         (WebCore::File::lastModifiedDateForBinding):
1850         (WebCore):
1851         (WebCore::File::captureSnapshot):
1852         * fileapi/File.h:
1853         (File):
1854         * fileapi/File.idl:
1855         * platform/FileMetadata.h:
1856         (WebCore::FileMetadata::FileMetadata):
1857         * platform/FileSystem.h:
1858         * platform/chromium/support/WebHTTPBody.cpp:
1859         (WebKit::WebHTTPBody::elementAt):
1860         * platform/network/BlobData.cpp:
1861         (WebCore):
1862
1863 2012-06-06  Kinuko Yasuda  <kinuko@chromium.org>
1864
1865         File::lastModifiedDate should use NaN or separate boolean flag for null Date value
1866         https://bugs.webkit.org/show_bug.cgi?id=87826
1867
1868         Reviewed by Kent Tamura.
1869
1870         Test: http/tests/local/fileapi/file-last-modified-after-delete.html
1871
1872         * fileapi/File.cpp:
1873         (WebCore::File::File):
1874         (WebCore::File::captureSnapshot):
1875         (WebCore::File::lastModifiedDate):
1876         (WebCore::File::lastModifiedDateForBinding): Removed.
1877         * fileapi/File.h:
1878         (File):
1879         * fileapi/File.idl:
1880         * platform/FileMetadata.h:
1881         (WebCore::FileMetadata::FileMetadata):
1882         * platform/FileSystem.h:
1883         * platform/chromium/support/WebHTTPBody.cpp:
1884         (WebKit::WebHTTPBody::elementAt):
1885         * platform/network/BlobData.cpp:
1886         (WebCore):
1887
1888 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1889
1890         Unreviewed, rolling out r119668.
1891         http://trac.webkit.org/changeset/119668
1892         https://bugs.webkit.org/show_bug.cgi?id=88493
1893
1894         Hitting assertions in debug builds (Requested by rniwa on
1895         #webkit).
1896
1897         * rendering/RenderBlock.cpp:
1898         (WebCore::RenderBlock::localCaretRect):
1899         * rendering/RenderBoxModelObject.cpp:
1900         * rendering/RenderBoxModelObject.h:
1901         (RenderBoxModelObject):
1902         * rendering/RenderInline.cpp:
1903         * rendering/RenderInline.h:
1904         (RenderInline):
1905
1906 2012-06-06  Julien Chaffraix  <jchaffraix@webkit.org>
1907
1908         Cache isSelfPaintingLayer() for better performance
1909         https://bugs.webkit.org/show_bug.cgi?id=88464
1910
1911         Reviewed by Simon Fraser.
1912
1913         Covered by existing tests (repaint tests among them).
1914
1915         isSelfPaintingLayer() has shown up several times on some scrolling benchmarks due
1916         to the function being called several time per paint phase. This change caches the
1917         boolean at style change time.
1918         
1919         On http://dglazkov.github.com/performance-tests/biggrid.html, this nearly speed-up
1920         painting by 2 (lowering the time taken to paint the newly exposed area when scrolling
1921         on a 10,000 * 100 table from 95ms to 50ms).
1922
1923         * rendering/RenderLayer.cpp:
1924         (WebCore::RenderLayer::RenderLayer):
1925         Initialized m_isSelfPaintingLayer here.
1926
1927         (WebCore::RenderLayer::paintLayer):
1928         Changed the order of the checks to get the more likely check first.
1929
1930         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
1931         Renamed from isSelfPaintingLayer to make m_isNormalFlowOnly.
1932
1933         (WebCore::RenderLayer::styleChanged):
1934         Added code to update our cached m_isSelfPaintingLayer.
1935
1936         * rendering/RenderLayer.h:
1937         (WebCore::RenderLayer::isSelfPaintingLayer):
1938         Changed to return m_isSelfPaintingLayer.
1939
1940 2012-06-06  Yoshifumi Inoue  <yosin@chromium.org>
1941
1942         REGRESSION(r109729) [Form] Rendering of select/optgroup/option combination is too slow.
1943         https://bugs.webkit.org/show_bug.cgi?id=88059
1944
1945         Reviewed by Kent Tamura.
1946
1947         This patch changes not to share RenderStyle object for option and
1948         optgroup element regardless attributes.
1949
1950         When we tried to shared RenderStyle object, rendering performance was
1951         good but we had issue in selected option and text transform, see
1952         https://bugs.webkit.org/show_bug.cgi?id=88405 for details.
1953
1954         No new tests. This patch doesn't change behavior but rendering performance.
1955
1956         * css/StyleResolver.cpp:
1957         (WebCore::StyleResolver::canShareStyleWithElement): Changed to always
1958         return false for option and optgroup.
1959
1960 2012-06-06  Alec Flett  <alecflett@chromium.org>
1961
1962         IndexedDB: Optimize single-key get()
1963         https://bugs.webkit.org/show_bug.cgi?id=85288
1964
1965         Reviewed by Tony Chang.
1966
1967         No new tests, this is just an optimization.
1968
1969         After a recent refactoring, we started creating
1970         an internal cursor with every call to get(). The
1971         most common use of get() is with a single key,
1972         so provide a fast-path to avoid creating the cursor.
1973
1974         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
1975         (WebCore::IDBIndexBackendImpl::getByRangeInternal):
1976         * Modules/indexeddb/IDBKeyRange.h:
1977         (WebCore::IDBKeyRange::isOnlyKey):
1978         (IDBKeyRange):
1979         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1980         (WebCore::IDBObjectStoreBackendImpl::getByRangeInternal):
1981
1982 2012-06-06  Shezan Baig  <shezbaig.wk@gmail.com>
1983
1984         Caret is not rendered in empty inline contenteditable elements
1985         https://bugs.webkit.org/show_bug.cgi?id=85793
1986
1987         Reviewed by Ryosuke Niwa.
1988
1989         Override localCaretRect in RenderInline. The implementation was almost
1990         identical to localCaretRect in RenderBlock for empty block elements, so
1991         I refactored RenderBlock::localCaretRect and moved the logic to a new
1992         method 'localCaretRectForEmptyElement' in RenderBoxModelObject. The
1993         implementation of 'localCaretRect' in RenderBlock and RenderInline both
1994         use this helper method in RenderBoxModelObject.
1995
1996         Tests: editing/selection/caret-in-empty-inline-1.html
1997                editing/selection/caret-in-empty-inline-2.html
1998
1999         * rendering/RenderBlock.cpp:
2000         (WebCore::RenderBlock::localCaretRect):
2001         Modified to use RenderBoxModelObject::localCaretRectForEmptyElement.
2002         * rendering/RenderBoxModelObject.cpp:
2003         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
2004         (WebCore):
2005         * rendering/RenderBoxModelObject.h:
2006         (RenderBoxModelObject):
2007         Add localCaretRectForEmptyElement helper method.
2008         * rendering/RenderInline.cpp:
2009         (WebCore::RenderInline::localCaretRect):
2010         (WebCore):
2011         * rendering/RenderInline.h:
2012         (RenderInline):
2013         Override localCaretRect using localCaretRectForEmptyElement.
2014
2015 2012-06-06  Alexis Menard  <alexis.menard@openbossa.org>
2016
2017         Fix border-image-slice failures on http://css3test.com.
2018         https://bugs.webkit.org/show_bug.cgi?id=88328
2019
2020         Reviewed by Tony Chang.
2021
2022         The old parsing code was assuming that the fill keyword comes after the
2023         numbers or the percentage values. http://www.w3.org/TR/css3-background/#the-border-image-slice
2024         defines the property like this : [<number> | <percentage>]{1,4} && fill? where the fill
2025         keyword is not mandatory. But according to http://www.w3.org/TR/CSS2/about.html "&&" 
2026         separates two or more components, all of which must occur, in any order. So the previous
2027         code was wrong the fill can come first following by the percentages or the numbers. http://css3test.com
2028         was covering this particular case. I took the opportunity to extend our coverage 
2029         by adding tests on many different values the boder-image-slice property could take. I
2030         also did a small cleanup by removing unused functions in BorderImageSliceParseContext.
2031
2032         Test: fast/css/getComputedStyle/getComputedStyle-border-image-slice.html
2033
2034         * css/CSSParser.cpp:
2035         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
2036         (WebCore::BorderImageSliceParseContext::commitNumber):
2037         (WebCore::BorderImageSliceParseContext::commitFill):
2038
2039 2012-06-06  Levi Weintraub  <leviw@chromium.org>
2040
2041         Use enclosingIntRect instead of pixelSnappedIntRect in RenderFileUploadControl
2042         https://bugs.webkit.org/show_bug.cgi?id=88454
2043
2044         Reviewed by Kent Tamura.
2045
2046         Properly clipping the file upload control to avoid clipping out the top of the file upload button
2047         when the control is positioned at a sub-pixel offset that rounds up.
2048
2049         Test: fast/sub-pixel/file-upload-control-at-fractional-offset.html
2050
2051         * rendering/RenderFileUploadControl.cpp:
2052         (WebCore::RenderFileUploadControl::paintObject):
2053
2054 2012-06-06  Filip Pizlo  <fpizlo@apple.com>
2055
2056         Global object variable accesses should not require an extra load
2057         https://bugs.webkit.org/show_bug.cgi?id=88385
2058
2059         Reviewed by Gavin Barraclough and Geoffrey Garen.
2060
2061         Updated JSDOMWindowBase.cpp to use the new symbol table API. this->symbolTableFoo(...)
2062         becomes symbolTableFoo(this, ...).
2063                 
2064         No new tests because no change in behavior.
2065
2066         * bindings/js/JSDOMWindowBase.cpp:
2067         (WebCore::JSDOMWindowBase::updateDocument):
2068
2069 2012-06-06  James Robinson  <jamesr@chromium.org>
2070
2071         [chromium] Move implementation of WebCore::GraphicsContext3D and related from WebKit/chromium/src to WebCore/platform/chromium/support
2072         https://bugs.webkit.org/show_bug.cgi?id=86257
2073
2074         Reviewed by Kenneth Russell.
2075
2076         The WebCore platform interfaces GraphicsContext3D and Extensions3DChromium are implemented in chromium
2077         on top of the Platform interface WebGraphicsContext3D. This moves the implementation support code from
2078         WebKit/chromium/src to WebCore/platform/chromium/support, which avoids having code in WebKit/ implementing WebCore
2079         interfaces and allows code in WebCore/platform to use this support code directly where appropriate.
2080
2081         Refactor only, no new functionality or tests.
2082
2083         * WebCore.gypi:
2084         * platform/chromium/support/Extensions3DChromium.cpp: Renamed from Source/WebKit/chromium/src/Extensions3DChromium.cpp.
2085         (WebCore):
2086         (WebCore::Extensions3DChromium::Extensions3DChromium):
2087         (WebCore::Extensions3DChromium::~Extensions3DChromium):
2088         (WebCore::Extensions3DChromium::supports):
2089         (WebCore::Extensions3DChromium::ensureEnabled):
2090         (WebCore::Extensions3DChromium::isEnabled):
2091         (WebCore::Extensions3DChromium::getGraphicsResetStatusARB):
2092         (WebCore::Extensions3DChromium::blitFramebuffer):
2093         (WebCore::Extensions3DChromium::renderbufferStorageMultisample):
2094         (WebCore::Extensions3DChromium::postSubBufferCHROMIUM):
2095         (WebCore::Extensions3DChromium::mapBufferSubDataCHROMIUM):
2096         (WebCore::Extensions3DChromium::unmapBufferSubDataCHROMIUM):
2097         (WebCore::Extensions3DChromium::mapTexSubImage2DCHROMIUM):
2098         (WebCore::Extensions3DChromium::unmapTexSubImage2DCHROMIUM):
2099         (WebCore::Extensions3DChromium::setVisibilityCHROMIUM):
2100         (WebCore::Extensions3DChromium::discardFramebufferEXT):
2101         (WebCore::Extensions3DChromium::ensureFramebufferCHROMIUM):
2102         (WebCore::Extensions3DChromium::setGpuMemoryAllocationChangedCallbackCHROMIUM):
2103         (WebCore::Extensions3DChromium::createVertexArrayOES):
2104         (WebCore::Extensions3DChromium::deleteVertexArrayOES):
2105         (WebCore::Extensions3DChromium::isVertexArrayOES):
2106         (WebCore::Extensions3DChromium::bindVertexArrayOES):
2107         (WebCore::Extensions3DChromium::getTranslatedShaderSourceANGLE):
2108         (WebCore::Extensions3DChromium::setSwapBuffersCompleteCallbackCHROMIUM):
2109         (WebCore::Extensions3DChromium::rateLimitOffscreenContextCHROMIUM):
2110         (WebCore::Extensions3DChromium::paintFramebufferToCanvas):
2111         (WebCore::Extensions3DChromium::texImageIOSurface2DCHROMIUM):
2112         (WebCore::Extensions3DChromium::texStorage2DEXT):
2113         (WebCore::Extensions3DChromium::createQueryEXT):
2114         (WebCore::Extensions3DChromium::deleteQueryEXT):
2115         (WebCore::Extensions3DChromium::isQueryEXT):
2116         (WebCore::Extensions3DChromium::beginQueryEXT):
2117         (WebCore::Extensions3DChromium::endQueryEXT):
2118         (WebCore::Extensions3DChromium::getQueryivEXT):
2119         (WebCore::Extensions3DChromium::getQueryObjectuivEXT):
2120         * platform/chromium/support/GraphicsContext3DChromium.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp.
2121         (WebCore):
2122         (WebCore::GraphicsContext3D::GraphicsContext3D):
2123         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2124         (WebCore::GraphicsContext3D::setContextLostCallback):
2125         (WebCore::GraphicsContext3D::setErrorMessageCallback):
2126         (WebCore::GraphicsContext3D::create):
2127         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
2128         (WebCore::GraphicsContext3D::platformTexture):
2129         (WebCore::GraphicsContext3D::grContext):
2130         (WebCore::GraphicsContext3D::platformLayer):
2131         (WebCore::GraphicsContext3D::isGLES2Compliant):
2132         (WebCore::GraphicsContext3D::isResourceSafe):
2133         (WebCore::GraphicsContext3D::bindAttribLocation):
2134         (WebCore::GraphicsContext3D::bufferData):
2135         (WebCore::GraphicsContext3D::getActiveAttrib):
2136         (WebCore::GraphicsContext3D::getActiveUniform):
2137         (WebCore::GraphicsContext3D::getAttribLocation):
2138         (WebCore::GraphicsContext3D::getContextAttributes):
2139         (WebCore::GraphicsContext3D::getProgramInfoLog):
2140         (WebCore::GraphicsContext3D::getShaderInfoLog):
2141         (WebCore::GraphicsContext3D::getShaderSource):
2142         (WebCore::GraphicsContext3D::getString):
2143         (WebCore::GraphicsContext3D::getUniformLocation):
2144         (WebCore::GraphicsContext3D::shaderSource):
2145         (WebCore::GraphicsContext3D::texImage2D):
2146         (WebCore::GraphicsContext3D::texSubImage2D):
2147         (WebCore::GraphicsContext3D::reshape):
2148         (WebCore::GraphicsContext3D::markContextChanged):
2149         (WebCore::GraphicsContext3D::layerComposited):
2150         (WebCore::GraphicsContext3D::markLayerComposited):
2151         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2152         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
2153         (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
2154         (WebCore::GraphicsContext3D::getExtensions):
2155         (WebCore::GraphicsContext3D::getInternalFramebufferSize):
2156         * platform/chromium/support/GraphicsContext3DPrivate.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.cpp.
2157         (WebCore):
2158         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2159         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2160         (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext):
2161         (WebCore::GraphicsContext3DPrivate::extractWebGraphicsContext3D):
2162         (GrMemoryAllocationChangedCallback):
2163         (WebCore::GrMemoryAllocationChangedCallback::GrMemoryAllocationChangedCallback):
2164         (WebCore::GrMemoryAllocationChangedCallback::onGpuMemoryAllocationChanged):
2165         (WebCore::GraphicsContext3DPrivate::grContext):
2166         (WebCore::GraphicsContext3DPrivate::markContextChanged):
2167         (WebCore::GraphicsContext3DPrivate::layerComposited):
2168         (WebCore::GraphicsContext3DPrivate::markLayerComposited):
2169         (WebCore::GraphicsContext3DPrivate::paintFramebufferToCanvas):
2170         (GraphicsContext3DContextLostCallbackAdapter):
2171         (WebCore::GraphicsContext3DContextLostCallbackAdapter::GraphicsContext3DContextLostCallbackAdapter):
2172         (WebCore::GraphicsContext3DContextLostCallbackAdapter::~GraphicsContext3DContextLostCallbackAdapter):
2173         (WebCore::GraphicsContext3DContextLostCallbackAdapter::onContextLost):
2174         (WebCore::GraphicsContext3DPrivate::setContextLostCallback):
2175         (GraphicsContext3DErrorMessageCallbackAdapter):
2176         (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::GraphicsContext3DErrorMessageCallbackAdapter):
2177         (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::~GraphicsContext3DErrorMessageCallbackAdapter):
2178         (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::onErrorMessage):
2179         (WebCore::GraphicsContext3DPrivate::setErrorMessageCallback):
2180         (WebCore::GraphicsContext3DPrivate::getExtensions):
2181         (WebCore::GraphicsContext3DPrivate::initializeExtensions):
2182         (WebCore::GraphicsContext3DPrivate::supportsExtension):
2183         (WebCore::GraphicsContext3DPrivate::ensureExtensionEnabled):
2184         (WebCore::GraphicsContext3DPrivate::isExtensionEnabled):
2185         (WebCore::GraphicsContext3DPrivate::isResourceSafe):
2186         (GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
2187         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
2188         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::~GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
2189         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::onMemoryAllocationChanged):
2190         (WebCore::GraphicsContext3DPrivate::setGpuMemoryAllocationChangedCallbackCHROMIUM):
2191         (GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
2192         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
2193         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::~GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
2194         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::onSwapBuffersComplete):
2195         (WebCore::GraphicsContext3DPrivate::setSwapBuffersCompleteCallbackCHROMIUM):
2196         * platform/chromium/support/GraphicsContext3DPrivate.h: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.h.
2197         (WebKit):
2198         (WebCore):
2199         (GraphicsContext3DPrivate):
2200         (WebCore::GraphicsContext3DPrivate::webContext):
2201         (WebCore::GraphicsContext3DPrivate::preserveDrawingBuffer):
2202
2203 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2204
2205         Unreviewed, rolling out r119624.
2206         http://trac.webkit.org/changeset/119624
2207         https://bugs.webkit.org/show_bug.cgi?id=88472
2208
2209         Caused worker tests to become flaky (Requested by mhahnenberg
2210         on #webkit).
2211
2212         * workers/AbstractWorker.cpp:
2213         (WebCore::AbstractWorker::~AbstractWorker):
2214         * workers/WorkerMessagingProxy.cpp:
2215         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
2216
2217 2012-06-06  Brady Eidson  <beidson@apple.com>
2218
2219         <rdar://problem/11575112> and https://bugs.webkit.org/show_bug.cgi?id=88428
2220         REGRESSION (r115654): Opening many non-English WebArchives shows obvious encoding issues
2221
2222         Reviewed by Nate Chapin.
2223
2224         Test: fast/loader/webarchive-encoding-respected.html
2225
2226         * loader/DocumentLoader.cpp:
2227         (WebCore::DocumentLoader::commitData): Properly set the main resource encoding from the webarchive.
2228
2229 2012-06-06  Mark Hahnenberg  <mhahnenberg@apple.com>
2230
2231         Worker tear-down can re-enter JSC during GC finalization
2232         https://bugs.webkit.org/show_bug.cgi?id=88449
2233
2234         Reviewed by Geoffrey Garen.
2235
2236         No new tests. Current regression tests cover these changes.
2237
2238         * workers/AbstractWorker.cpp: 
2239         (WebCore::AbstractWorker::~AbstractWorker): We don't need to call onDestroyWorker() here, it 
2240         will be called elsewhere in contextDestroyed().
2241         * workers/WorkerMessagingProxy.cpp:
2242         (WebCore::WorkerMessagingProxy::workerObjectDestroyed): We make the call to terminateWorkerContext()
2243         and workerContextDestroyed() asynchronous to avoid entering JSC during GC finalization.
2244
2245 2012-06-06  Tony Chang  <tony@chromium.org>
2246
2247         webkit crashes on debug builds when running IETC flexbox-ordinal-group-001.htm
2248         https://bugs.webkit.org/show_bug.cgi?id=85832
2249
2250         Reviewed by Ojan Vafai.
2251
2252         We were using a HashSet<unsigned>, which can't hold the value of 0.
2253         According to the spec, 0 isn't a valid value, so at CSS parse time,
2254         reject the value 0. This lets us pass the test, although that's kind
2255         of by accident.
2256
2257         We could allow 0 for box-ordinal-group, but there are some perf implications
2258         to having allowing a value below the initial value (1 in this case).
2259
2260         We still allow 0 for box-flex-group, because that's what the existing code
2261         does and there are tests expecting this behavior.
2262
2263         No new tests, covered by ietestcenter/css3/flexbox/flexbox-ordinal-group-001.htm
2264         which was crashing.
2265
2266         * css/CSSParser.cpp:
2267         (WebCore::CSSParser::parseValue): Reject 0 for -webkit-box-ordinal-group.
2268
2269 2012-06-06  Ojan Vafai  <ojan@chromium.org>
2270
2271         Remove some magic from the -webkit-flex shorthand parsing to match the changes in the spec
2272         https://bugs.webkit.org/show_bug.cgi?id=88444
2273
2274         Reviewed by Tony Chang.
2275
2276         -Unset positive flex defaults to 0.
2277         -Unset negative flex defaults to 1. No magic of doing something different if positive flex was set.
2278
2279         * css/CSSParser.cpp:
2280         (WebCore::CSSParser::parseFlex):
2281
2282 2012-06-06  Ryosuke Niwa  <rniwa@webkit.org>
2283
2284         Revert r119440 now that I have a time to rebaseline them all!
2285
2286         * platform/ScrollbarThemeComposite.cpp:
2287         (WebCore::ScrollbarThemeComposite::thumbLength):
2288
2289 2012-06-06  Joshua Bell  <jsbell@chromium.org>
2290
2291         IndexedDB: Infinite recursion in IDBObjectStore.openCursor(key, legacy_constant)
2292         https://bugs.webkit.org/show_bug.cgi?id=88431
2293
2294         Reviewed by Tony Chang.
2295
2296         Function was calling itself, rather than delegating to the correct (IDBKeyRange) overload.
2297
2298         Test: storage/indexeddb/legacy-constants.html
2299
2300         * Modules/indexeddb/IDBObjectStore.cpp:
2301         (WebCore::IDBObjectStore::openCursor):
2302
2303 2012-06-06  Joshua Bell  <jsbell@chromium.org>
2304
2305         IndexedDB: Rename IDBFactory.getDatabaseNames() to webkitGetDatabaseNames()
2306         https://bugs.webkit.org/show_bug.cgi?id=86874
2307
2308         Reviewed by Ojan Vafai.
2309
2310         The function is non-standard, and should be prefixed.
2311
2312         Test: storage/indexeddb/factory-basics.html
2313
2314         * Modules/indexeddb/IDBFactory.idl:
2315
2316 2012-06-06  Julien Chaffraix  <jchaffraix@webkit.org>
2317
2318         Add support for direction on table row group with collapsing borders
2319         https://bugs.webkit.org/show_bug.cgi?id=87900
2320
2321         Reviewed by Ojan Vafai.
2322
2323         Tests: fast/table/border-collapsing/first-cell-left-border-hidden-table-ltr-section-rtl.html
2324                fast/table/border-collapsing/last-cell-left-border-hidden-table-ltr-section-rtl.html
2325                fast/table/border-collapsing/left-border-table-ltr-section-rtl.html
2326                fast/table/border-collapsing/left-border-table-rtl-section-ltr.html
2327                fast/table/border-collapsing/left-border-table-rtl-section-rtl.html
2328                fast/table/border-collapsing/left-border-vertical-lr-table-ltr-section-rtl.html
2329                fast/table/border-collapsing/left-border-vertical-lr-table-rtl-section-ltr.html
2330                fast/table/border-collapsing/left-border-vertical-lr-table-rtl-section-rtl.html
2331                fast/table/border-collapsing/rtl-table-left-border-hidden.html
2332                fast/table/border-collapsing/top-border-vertical-rl-table-ltr-section-rtl.html
2333                fast/table/border-collapsing/top-border-vertical-rl-table-rtl-section-ltr.html
2334                fast/table/border-collapsing/top-border-vertical-rl-table-rtl-section-rtl.html
2335                fast/table/table-ltr-section-rtl.html
2336                fast/table/table-rtl-section-ltr.html
2337                fast/table/table-rtl-section-rtl.html
2338
2339         This change enables proper support for direction on table row group.
2340         The current code would allow people to set direction on the row group but would still
2341         use the table's code for directionality checks (with surprising consequences).
2342
2343         The main change involve swapping end / start borders in case of mixed directionality
2344         as those 2 are not in sync.
2345         
2346         Example: <table dir="ltr"><tbody dir="rtl"><td id="cell0"></td><td id="cell1"></td></tbody></table>
2347
2348         Visually:
2349         Table: Start ---------------------> End
2350         Tbody: End <---------------------- Start
2351         Cell:  | #cell0        |           #cell1 |
2352
2353         In this example, the end table border should be compared with the tbody's start border
2354         and the last cell's (in DOM order) start border.
2355
2356         * rendering/RenderTable.cpp:
2357         (WebCore::RenderTable::tableStartBorderAdjoiningCell):
2358         (WebCore::RenderTable::tableEndBorderAdjoiningCell):
2359         Same as the other adjoining functions.
2360
2361         * rendering/RenderTable.h:
2362         (WebCore::RenderTable::lastColumnIndex):
2363         Helper function to get the last column index.
2364
2365         * rendering/RenderTableCell.cpp:
2366         (WebCore::RenderTableCell::computeCollapsedStartBorder):
2367         (WebCore::RenderTableCell::computeCollapsedEndBorder):
2368         Updated to call the table's adjoining border helpers.
2369
2370         * rendering/RenderTableCell.h:
2371         (WebCore::RenderTableCell::styleForCellFlow):
2372         Updated to use the table row group's style now that we properly support it.
2373
2374         (WebCore::RenderTableCell::isFirstOrLastCellInRow):
2375         Debug only helper to make sure we don't call the border adjoining function
2376         on non-terminal cells.
2377
2378         (WebCore::RenderTableCell::borderAdjoiningTableStart):
2379         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
2380         * rendering/RenderTableRow.h:
2381         (WebCore::RenderTableRow::borderAdjoiningTableStart):
2382         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
2383         * rendering/RenderTableSection.cpp:
2384         (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart):
2385         (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd):
2386         Updated the previous function to account for mixed directionality.
2387
2388         (WebCore::RenderTableSection::layoutRows):
2389         Move some of the code to setLogicalPositionForCell to match RenderBlock.
2390
2391         (WebCore::RenderTableSection::setLogicalPositionForCell):
2392         Switched direction checks to styleForCellFlow (this doesn't change anything as we
2393         were already properly flipping already but ensure better).
2394
2395         * rendering/RenderTableSection.h:
2396         (WebCore::RenderTableSection::hasSameDirectionAsTable):
2397         Added this helper to know if we have a mixed direction.
2398
2399         (WebCore::RenderTableSection::borderAdjoiningTableStart):
2400         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
2401         Updated to account for mixed directionality.
2402
2403 2012-06-06  Keyar Hood  <keyar@chromium.org>
2404
2405         [Chromium] imageSmoothingEnabled should apply to patterns
2406         https://bugs.webkit.org/show_bug.cgi?id=88103
2407
2408         Reviewed by Stephen White.
2409
2410         Test: fast/canvas/canvas-imageSmoothingEnabled-patterns.html
2411
2412         When drawing patterns on a Canvas, the imageSmoothingEnabled flag is
2413         respected.
2414         * platform/graphics/skia/PlatformContextSkia.cpp:
2415         (WebCore::PlatformContextSkia::setupShader):
2416
2417 2012-06-06  Andrey Adaikin  <aandrey@chromium.org>
2418
2419         Web Inspector: [JSC] Add WebGL instrumentation support
2420         https://bugs.webkit.org/show_bug.cgi?id=87975
2421
2422         Reviewed by Vsevolod Vlasov.
2423
2424         * bindings/js/JSInjectedScriptManager.cpp:
2425         (WebCore::injectAndExecuteFunction):
2426         (WebCore::InjectedScriptManager::createInjectedScript):
2427         (WebCore):
2428         (WebCore::InjectedScriptManager::injectWebGLScript):
2429         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2430         (WebCore::InjectedScriptManager::injectWebGLScript):
2431         * inspector/InjectedScriptManager.cpp:
2432         (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation):
2433         * inspector/InjectedScriptManager.h:
2434         (InjectedScriptManager):
2435         * inspector/InspectorInstrumentation.h:
2436         (InspectorInstrumentation):
2437         * inspector/InspectorWebGLAgent.cpp:
2438         (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation):
2439         * inspector/InspectorWebGLAgent.h:
2440         (InspectorWebGLAgent):
2441         * inspector/InspectorWebGLInstrumentation.h:
2442         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
2443
2444 2012-06-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2445
2446         Fix a few spelling mistakes in IconDatabase logging
2447
2448         Makes debugging harder if the logging is confusing.
2449
2450         Reviewed by Jocelyn Turcotte.
2451
2452         * loader/icon/IconDatabase.cpp:
2453         (WebCore::IconDatabase::notifyPendingLoadDecisions):
2454         (WebCore::IconDatabase::readFromDatabase):
2455
2456 2012-05-25  Vsevolod Vlasov  <vsevik@chromium.org>
2457
2458         Web Inspector: [Compiler] Remove compile-front-end.sh and fix InjectedScriptSource errors.
2459         https://bugs.webkit.org/show_bug.cgi?id=87512
2460
2461         Reviewed by Yury Semikhatsky.
2462
2463         Removed compile-front-end.sh, compile-front-end.py should be used instead now.
2464         Made generate_protocol_externs a python module to call it from compile-front-end.py.
2465         Temporary copy of InjectedScriptSource.js is created and modified to
2466         avoid "This code lacks side effects" warning.
2467
2468         * inspector/compile-front-end.py:
2469         * inspector/compile-front-end.sh: Removed.
2470         * inspector/generate-protocol-externs: Removed.
2471         * inspector/generate_protocol_externs.py: Added.
2472         (full_qualified_type_id):
2473         (param_type):
2474         (generate_protocol_externs):
2475
2476 2012-06-06  Zoltan Herczeg  <zherczeg@webkit.org>
2477
2478         [Qt] REGRESSION(r118616): It made all tests crash in debug mode
2479         https://bugs.webkit.org/show_bug.cgi?id=87701
2480
2481         Reviewed by Csaba Osztrogonác.
2482
2483         Replace WriteBarrier<JSObject> to Weak<JSObject> by introducing a new
2484         QtWeakObjectReference sub class. Rewrite all affected type definitions.
2485
2486         All existing test in debug mode cover this issue.
2487
2488         * bridge/qt/qt_class.cpp:
2489         (JSC::Bindings::QtClass::fallbackObject):
2490         * bridge/qt/qt_instance.cpp:
2491         (QtRuntimeObject):
2492         (JSC::Bindings::QtInstance::removeUnusedMethods):
2493         * bridge/qt/qt_instance.h:
2494         (QtInstance):
2495         (QtWeakObjectReference):
2496         (JSC::Bindings::QtInstance::QtWeakObjectReference::QtWeakObjectReference):
2497         (JSC::Bindings::QtInstance::QtWeakObjectReference::operator=):
2498         (JSC::Bindings::QtInstance::QtWeakObjectReference::get):
2499         * bridge/qt/qt_runtime.cpp:
2500         (JSC::Bindings::QtRuntimeMethodData::finalize):
2501         * bridge/qt/qt_runtime_qt4.cpp:
2502         (JSC::Bindings::QtRuntimeMethodData::finalize):
2503
2504 2012-06-06  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2505
2506         Web Inspector: help/settings screen does not overlay console in split screen mode
2507         https://bugs.webkit.org/show_bug.cgi?id=88352
2508
2509         Reviewed by Pavel Feldman.
2510
2511         * inspector/front-end/HelpScreen.js:
2512         (WebInspector.HelpScreen): Mark view as root.
2513         (WebInspector.HelpScreen.prototype.showModal): Change view parent.
2514         * inspector/front-end/helpScreen.css:
2515         (.help-window-outer): Add panel and status bar indent.
2516         (body.compact .help-window-outer): Ditto.
2517
2518 2012-06-06  Yoshifumi Inoue  <yosin@chromium.org>
2519
2520         [Form] Changes for InputNumber type
2521         https://bugs.webkit.org/show_bug.cgi?id=88394
2522
2523         Reviewed by Kent Tamura.
2524
2525         This patch changes codes for consitency of InputNumber usage for
2526         reducing size of patch when we change InputNumber type alias from
2527         double to Decimal.
2528
2529         No new tests. This patch doesn't change behavior.
2530
2531         * html/BaseDateAndTimeInputType.cpp:
2532         (WebCore::BaseDateAndTimeInputType::serializeWithComponents): Fixed parameter type for getAllowedValueStep.
2533         * html/InputType.cpp:
2534         (WebCore::InputType::minimum): Fixed return value type to InputNumber.
2535         (WebCore::InputType::maximum): ditto.
2536         * html/MonthInputType.cpp:
2537         (WebCore::MonthInputType::defaultValueForStepUp): Fix return value type to InputNumber.
2538         (WebCore::MonthInputType::parseToNumber): ditto.
2539         * html/NumberInputType.cpp:
2540         (WebCore::NumberInputType::setValueAsDouble): Removed extra convertDoubleToInputNumber.
2541         * html/StepRange.cpp:
2542         (WebCore::StepRange::alignValueForStep): Use roundByStep for code sharing.
2543         (WebCore::StepRange::clampValue): ditto.
2544         (WebCore::StepRange::roundByStep): Added.
2545         * html/StepRange.h:
2546         (StepRange): Added a declaration of roundByStep.
2547
2548 2012-06-06  Michael Brüning  <michael.bruning@nokia.com>
2549
2550         [Qt] Fix harmattan builds broken by r119247.
2551         https://bugs.webkit.org/show_bug.cgi?id=88330
2552
2553         Reviewed by Jocelyn Turcotte.
2554
2555         Fix Harmattan build break caused by undefined constant
2556         GL_TEXTURE_RECTANGLE_ARB by adding defined(GL_ARB_texture_rectangle)
2557         guards around TextureMapperGL::drawTextureRectangleARB.
2558
2559         * platform/graphics/texmap/TextureMapperGL.cpp: Added defined(GL_ARB_texture_rectangle) guards around drawTextureRectangleARB.
2560         (WebCore):
2561         * platform/graphics/texmap/TextureMapperGL.h: Added definded(GL_ARB_texture_rectangle) guards around drawTextureRectangleARB.
2562
2563 2012-06-06  Shinya Kawanaka  <shinyak@chromium.org>
2564
2565         PositionIterator:;setOffsetInLeafNode() is not used anywhere.
2566         https://bugs.webkit.org/show_bug.cgi?id=88397
2567
2568         Reviewed by Ryosuke Niwa.
2569
2570         It's not used anywhere. We can remove it safely.
2571
2572         No new tests, no change in behavior.
2573
2574         * WebCore.order:
2575         * dom/PositionIterator.cpp:
2576         * dom/PositionIterator.h:
2577
2578 2012-06-06  Andrey Adaikin  <aandrey@chromium.org>
2579
2580         Web Inspector: [WebGL] Add WebGL instrumentation support on the backend
2581         https://bugs.webkit.org/show_bug.cgi?id=87960
2582
2583         Adds a WebGLAgent, injects a WebGL script upon calling the getContext
2584         method of a HTMLCanvasElement that will wrap the WebGL rendering context
2585         for instrumentation purposes.
2586
2587         Reviewed by Yury Semikhatsky.
2588
2589         * CMakeLists.txt:
2590         * DerivedSources.make:
2591         * DerivedSources.pri:
2592         * GNUmakefile.am:
2593         * GNUmakefile.list.am:
2594         * Target.pri:
2595         * WebCore.gyp/WebCore.gyp:
2596         * WebCore.gypi:
2597         * WebCore.vcproj/WebCore.vcproj:
2598         * WebCore.xcodeproj/project.pbxproj:
2599         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2600         (WebCore::JSHTMLCanvasElement::getContext):
2601         (WebCore::JSHTMLCanvasElement::toDataURL):
2602         * bindings/js/JSInjectedScriptManager.cpp:
2603         (WebCore):
2604         (WebCore::InjectedScriptManager::injectWebGLScript):
2605         * bindings/v8/ScriptState.cpp:
2606         (WebCore::ScriptState::forContext):
2607         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2608         (WebCore::V8HTMLCanvasElement::getContextCallback):
2609         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2610         (WebCore::InjectedScriptManager::createInjectedScript):
2611         (WebCore):
2612         (WebCore::InjectedScriptManager::injectWebGLScript):
2613         (WebCore::InjectedScriptManager::discardInjectedScript):
2614         (WebCore::InjectedScriptManager::injectedScriptFor):
2615         * inspector/CodeGeneratorInspector.py:
2616         * inspector/InjectedScriptManager.cpp:
2617         (WebCore):
2618         (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation):
2619         (WebCore::InjectedScriptManager::injectedWebGLScriptSource):
2620         * inspector/InjectedScriptManager.h:
2621         (InjectedScriptManager):
2622         * inspector/InjectedWebGLScriptSource.js: Added.
2623         * inspector/Inspector.json:
2624         * inspector/InspectorAllInOne.cpp:
2625         * inspector/InspectorController.cpp:
2626         (WebCore::InspectorController::InspectorController):
2627         * inspector/InspectorInstrumentation.h:
2628         (WebCore):
2629         (InspectorInstrumentation):
2630         (WebCore::InspectorInstrumentation::markResourceAsCached):
2631         * inspector/InspectorWebGLAgent.cpp: Added.
2632         (WebCore):
2633         (WebGLAgentState):
2634         (WebCore::InspectorWebGLAgent::InspectorWebGLAgent):
2635         (WebCore::InspectorWebGLAgent::~InspectorWebGLAgent):
2636         (WebCore::InspectorWebGLAgent::setFrontend):
2637         (WebCore::InspectorWebGLAgent::clearFrontend):
2638         (WebCore::InspectorWebGLAgent::restore):
2639         (WebCore::InspectorWebGLAgent::enable):
2640         (WebCore::InspectorWebGLAgent::disable):
2641         (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation):
2642         * inspector/InspectorWebGLAgent.h: Added.
2643         (WebCore):
2644         (InspectorWebGLAgent):
2645         (WebCore::InspectorWebGLAgent::create):
2646         (WebCore::InspectorWebGLAgent::enabled):
2647         * inspector/InspectorWebGLInstrumentation.h: Added.
2648         (WebCore):
2649         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
2650         * inspector/InstrumentingAgents.h:
2651         (WebCore):
2652         (WebCore::InstrumentingAgents::InstrumentingAgents):
2653         (InstrumentingAgents):
2654         (WebCore::InstrumentingAgents::inspectorWebGLAgent):
2655         (WebCore::InstrumentingAgents::setInspectorWebGLAgent):
2656
2657 2012-06-06  Joone Hur  <joone.hur@intel.com>
2658
2659         [GTK] Build fix for Accelerated Compositing with OpenGL
2660         https://bugs.webkit.org/show_bug.cgi?id=88292
2661
2662         Reviewed by Martin Robinson.
2663
2664         Build fix after r119247.
2665         Do not include GraphicsSurface.h when not building
2666         with GRAPHICS_SURFACE.
2667
2668         No new tests. This is only a build fix.
2669
2670         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
2671         * platform/graphics/texmap/TextureMapperBackingStore.h:
2672         * platform/graphics/texmap/TextureMapperGL.cpp:
2673
2674 2012-06-05  Joe Thomas  <joethomas@motorola.com>
2675
2676         ASSERTION FAILED: ASSERT(!isPercentageIntrinsicSize) in RenderReplaced::computeIntrinsicRatioInformationForRenderBox
2677         https://bugs.webkit.org/show_bug.cgi?id=88197
2678
2679         Reviewed by Daniel Bates.
2680
2681         RenderSVGRoot extends RenderReplaced and it overrides the computeIntrinsicRatioInformation() 
2682         method of RenderReplaced. RenderSVGRoot::computeIntrinsicRatioInformation
2683         sets isPercentageIntrinsicSize to true while it handles width and height of percentage types.
2684         So this assertion should be fired only if intrinsicRatio is non-zero.
2685
2686         Test: svg/in-html/svg-assert-failure-percentage.html
2687
2688         * rendering/RenderReplaced.cpp:
2689         (WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox):
2690
2691 2012-06-05  Tony Chang  <tony@chromium.org>
2692
2693         Changing flexbox justify/alignment doesn't update their positioning
2694         https://bugs.webkit.org/show_bug.cgi?id=88366
2695
2696         Reviewed by Ojan Vafai.
2697
2698         Test: css3/flexbox/style-change.html
2699
2700         * rendering/style/RenderStyle.cpp:
2701         (WebCore::RenderStyle::diff): Since these member variables were moved
2702         out of StyleFlexibleBoxData, we have to compare them in RenderStyle::diff.
2703
2704 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
2705
2706         JSC implementation of SerializedScriptValue for IndexedDB
2707         https://bugs.webkit.org/show_bug.cgi?id=88048
2708
2709         Reviewed by George Staikos.
2710
2711         No new tests. All the current indexeddb test cases apply when indexeddb works for JSC.
2712
2713         * bindings/js/SerializedScriptValue.cpp:
2714         (WebCore::CloneSerializer::serializeNumber):
2715         (CloneSerializer):
2716         (WebCore::CloneDeserializer::toWireString):
2717         (CloneDeserializer):
2718         (WebCore::SerializedScriptValue::create):
2719         (WebCore::SerializedScriptValue::toWireString):
2720         (WebCore):
2721         (WebCore::SerializedScriptValue::createFromWire):
2722         (WebCore::SerializedScriptValue::numberValue):
2723         (WebCore::SerializedScriptValue::deserialize):
2724
2725 2012-06-05  Ojan Vafai  <ojan@chromium.org>
2726
2727         Nested CSS flexbox renders incorrectly
2728         https://bugs.webkit.org/show_bug.cgi?id=87679
2729
2730         Reviewed by Julien Chaffraix.
2731
2732         If the containing block with a perpendicular writing mode has an overrideHeight,
2733         then its logical height should be based off that instead of its RenderStyle.
2734
2735         Test: css3/flexbox/perpendicular-writing-modes-inside-flex-item.html
2736
2737         * rendering/RenderBox.cpp:
2738         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
2739
2740 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
2741
2742         Need special-case toJS(IDBAny) for IDBCursorWithValue
2743         https://bugs.webkit.org/show_bug.cgi?id=87963
2744
2745         Reviewed by George Staikos.
2746
2747         No new tests, this is for indexedDB, which is not working for JSC binding.
2748         When indexedDB working for JSC, all the indexdb test cases should apply.
2749
2750         * bindings/js/JSIDBAnyCustom.cpp:
2751         (WebCore::toJS):
2752
2753 2012-06-05  Michal Mocny  <mmocny@google.com>
2754
2755         [chromium] Set default memory allocation limit bytes when GL_CHROMIUM_gpu_memory_manager is not supported by graphics context.
2756         https://bugs.webkit.org/show_bug.cgi?id=87996
2757
2758         Reviewed by James Robinson.
2759
2760         Soon we hope to have renderers not manage there own memory allocation limits, and rely exclusively on the
2761         allocation given by GpuMemoryManager.  However, when the graphics context does not support the
2762         GL_CHROMIUM_gpu_memory_manager extension, such as the one used by DumpRenderTree, we must default the
2763         memory allocation limit to some non-0 value.
2764
2765         * platform/graphics/chromium/LayerRendererChromium.cpp:
2766         (WebCore::LayerRendererChromium::initialize):
2767         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2768         (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
2769         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2770         (WebCore):
2771         (DebugScopedSetMainThreadFromEither):
2772         (WebCore::DebugScopedSetMainThreadFromEither::DebugScopedSetMainThreadFromEither):
2773         (WebCore::DebugScopedSetMainThreadFromEither::~DebugScopedSetMainThreadFromEither):
2774
2775 2012-06-05  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
2776
2777         [Qt] Use GraphicsContext3DOpenGLES.cpp when using OpenGL ES
2778         https://bugs.webkit.org/show_bug.cgi?id=78720
2779
2780         Reviewed by Noam Rosenthal.
2781
2782         Functions are removed from GraphicsContext3DQt that already implemented
2783         in GraphicsContext3DCommon. Macros that not supported at GLES have been
2784         changed to their appropriate pair that found in GraphicsContext3D
2785         (e.g. GL_FRAMEBUFFER_EXT to GraphicsContext3D::FRAMEBUFFER).
2786         It was needed because OpenGLES does not support these macros.
2787         Extensions3DQt is removed beceause it has never been used.
2788         Some functions have been moved fron GraphicsContext3DCommon to *OpenGL
2789         and *OpenGLES to provide specialization.
2790         The "m_depthStencilBuffer" member is added to Qt port because it uses
2791         "m_depthStencilBuffer" like the other platforms.
2792
2793         * Target.pri:
2794         * platform/graphics/GraphicsContext3D.h:
2795         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2796         (WebCore::GraphicsContext3D::depthRange):
2797         (WebCore):
2798         (WebCore::GraphicsContext3D::clearDepth):
2799         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2800         (WebCore::GraphicsContext3D::prepareTexture):
2801         (WebCore::GraphicsContext3D::readRenderingResults):
2802         (WebCore::GraphicsContext3D::reshape):
2803         (WebCore::GraphicsContext3D::copyTexImage2D):
2804         (WebCore::GraphicsContext3D::copyTexSubImage2D):
2805         (WebCore::GraphicsContext3D::readPixels):
2806         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2807         (WebCore::GraphicsContext3D::reshapeFBOs):
2808         (WebCore::GraphicsContext3D::depthRange):
2809         (WebCore):
2810         (WebCore::GraphicsContext3D::clearDepth):
2811         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2812         (WebCore::GraphicsContext3D::isGLES2Compliant):
2813         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebuffer):
2814         (WebCore::GraphicsContext3D::GraphicsContext3D):
2815         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2816         (WebCore):
2817
2818 2012-06-05  Vitaly Buka  <vitalybuka@chromium.org>
2819
2820         Special layout handler should be done on top frame being printed.
2821         https://bugs.webkit.org/show_bug.cgi?id=88201
2822
2823         Reviewed by Brady Eidson.
2824
2825         No new tests. Root case is already covered by tests.
2826         Case described in the issue can be reproduced only by direct call
2827         to Frame::setPrinting of subframe. Probably it's not possible with
2828         layout tests.
2829
2830         * page/Frame.cpp:
2831         (WebCore::Frame::setPrinting):
2832         Use shouldUsePrintingLayout to choose proper version of forceLayout().
2833         (WebCore::Frame::shouldUsePrintingLayout):
2834         Checks if current frame is the top frame being printed.
2835         * rendering/RenderView.cpp:
2836         (WebCore::RenderView::shouldUsePrintingLayout): Forward to Frame.
2837
2838 2012-06-05  Max Feil  <mfeil@rim.com>
2839
2840         [BlackBerry] Conditionally enlarge HTML5 video controls in fullscreen mode
2841         https://bugs.webkit.org/show_bug.cgi?id=87551
2842
2843         Reviewed by Antonio Gomes.
2844
2845         Changes to make media controls larger in fullscreen mode. The
2846         BlackBerry media controls used to be sized by a combination
2847         of CSS styles specified in mediaControlsBlackBerry.css and
2848         hard coded constants in RenderThemeBlackBerry.cpp. This patch
2849         moves all the dimensional sizes to a common location, i.e.
2850         RenderThemeBlackBerry.cpp. Having all the logic in C++ code allows
2851         more complex decision making for when and how much to enlarge the
2852         media controls. Currently the controls are enlarged by a factor
2853         of 2 if the document is in fullscreen mode, the video element
2854         is the current fullscreen element, and the deviceScaleFactor of
2855         the page is less than 2.0. This avoids overly large controls
2856         on pages which are already at least doubling the size of the
2857         controls via viewport meta tag device-width settings. In other
2858         words, if the CSS pixels are already enlarged compared to device
2859         pixels by a factor of at least 2 in length and width.
2860
2861         In order to accomplish this, I had to add a new Element* parameter
2862         to RenderTheme::adjustSliderThumbSize(). This is needed so
2863         that fullscreen mode can be checked and the deviceScaleFactor
2864         retrieved. I feel that this does not have a big impact on the
2865         code and the other ports, for which I will simply be adding the
2866         additional parameter in their platform code.
2867
2868         Tests:
2869         video-controls-enlarged-fullscreen-meta.html
2870         video-controls-enlarged-fullscreen-nometa.html
2871
2872         * css/mediaControlsBlackBerry.css:
2873         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2874         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2875         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
2876         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2877         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
2878         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
2879         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
2880         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2881         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
2882         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2883         * html/shadow/SliderThumbElement.cpp:
2884         (WebCore::RenderSliderThumb::updateAppearance):
2885         * platform/blackberry/RenderThemeBlackBerry.cpp:
2886         (WebCore):
2887         (WebCore::determineRenderSlider):
2888         (WebCore::determineFullScreenMultiplier):
2889         (WebCore::RenderThemeBlackBerry::adjustSliderThumbSize):
2890         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
2891         (WebCore::RenderThemeBlackBerry::adjustSliderTrackStyle):
2892         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
2893         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
2894         * platform/blackberry/RenderThemeBlackBerry.h:
2895         (RenderThemeBlackBerry):
2896         * platform/efl/RenderThemeEfl.cpp:
2897         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
2898         * platform/efl/RenderThemeEfl.h:
2899         (RenderThemeEfl):
2900         * platform/gtk/RenderThemeGtk.h:
2901         * platform/gtk/RenderThemeGtk2.cpp:
2902         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2903         * platform/gtk/RenderThemeGtk3.cpp:
2904         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2905         * platform/qt/RenderThemeQt.cpp:
2906         (WebCore::RenderThemeQt::adjustSliderThumbSize):
2907         * platform/qt/RenderThemeQt.h:
2908         (RenderThemeQt):
2909         * platform/qt/RenderThemeQtMobile.cpp:
2910         (WebCore::RenderThemeQtMobile::adjustSliderThumbSize):
2911         * platform/qt/RenderThemeQtMobile.h:
2912         (RenderThemeQtMobile):
2913         * rendering/RenderThemeChromiumLinux.cpp:
2914         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
2915         * rendering/RenderThemeChromiumLinux.h:
2916         (RenderThemeChromiumLinux):
2917         * rendering/RenderThemeChromiumSkia.cpp:
2918         (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
2919         * rendering/RenderThemeChromiumSkia.h:
2920         (RenderThemeChromiumSkia):
2921         * rendering/RenderThemeChromiumWin.cpp:
2922         (WebCore):
2923         (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
2924         * rendering/RenderThemeChromiumWin.h:
2925         (RenderThemeChromiumWin):
2926         * rendering/RenderThemeMac.h:
2927         (RenderThemeMac):
2928         * rendering/RenderThemeSafari.cpp:
2929         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
2930         * rendering/RenderThemeSafari.h:
2931         (RenderThemeSafari):
2932         * rendering/RenderThemeWin.cpp:
2933         (WebCore::RenderThemeWin::adjustSliderThumbSize):
2934         * rendering/RenderThemeWin.h:
2935         (RenderThemeWin):
2936         * rendering/RenderThemeWinCE.cpp:
2937         (WebCore::RenderThemeWinCE::adjustSliderThumbSize):
2938         * rendering/RenderThemeWinCE.h:
2939         (RenderThemeWinCE):
2940         * rendering/RenderTheme.cpp:
2941         (WebCore::RenderTheme::adjustStyle):
2942         (WebCore::RenderTheme::adjustMediaControlStyle):
2943         (WebCore):
2944         (WebCore::RenderTheme::adjustSliderThumbStyle):
2945         (WebCore::RenderTheme::adjustSliderThumbSize):
2946         * rendering/RenderTheme.h:
2947         (RenderTheme):
2948
2949 2012-06-05  Stephanie Lewis  <slewis@apple.com>
2950
2951         https://bugs.webkit.org/show_bug.cgi?id=88370
2952         Memory sampler should trigger low memory signal
2953
2954         Reviewed by Geoff Garen.
2955
2956         No new tests. Verify by running stress test which crashes 
2957         in a few minutes without the fix.
2958
2959         Fix assumption in block code.  We could get in a state where timer_event_source
2960         had already been released before the block ran.
2961
2962         * platform/mac/MemoryPressureHandlerMac.mm:
2963         (WebCore::MemoryPressureHandler::holdOff):
2964
2965 2012-06-05  Yoshifumi Inoue  <yosin@chromium.org>
2966
2967         [Forms] Introduce InputNumber type as an alias of double for replacing it to Decimal
2968         https://bugs.webkit.org/show_bug.cgi?id=88275
2969
2970         Reviewed by Kent Tamura.
2971
2972         This patch introduced InputNumber type as alias of double to be
2973         replaced to Decimal and convertDoubleToInputNumber and 
2974         convertToInputNumberToDouble for reducing size of patch when we
2975         introduce Decimal type.
2976
2977         This patch added new vairables to use const variable to reduce
2978         copy operation when introducing Decimal type.
2979
2980         In the implementation, we use InputNumber, will be Decimal, however some methods in IDL
2981         use double. To clarify internal usage of value and external usage, thit patch renamed
2982         following functions:
2983
2984         - parseToDouble => parseNumber
2985         - setValueAsNumber => setValueAsDouble and setValueAsInputNumber
2986         - valueAsNumber => valueAsDouble
2987
2988         This patch is a part of introducing Decimal, https://bugs.webkit.org/show_bug.cgi?id=80009
2989
2990         No new tests. This patch doesn't change behavior.
2991
2992         * html/BaseDateAndTimeInputType.cpp:
2993         (WebCore::BaseDateAndTimeInputType::valueAsDate): Replaced parseToNumber() to valueAsDouble()
2994         (WebCore::BaseDateAndTimeInputType::setValueAsDate): Inserted convertDoubleToInputNumber.
2995         (WebCore::BaseDateAndTimeInputType::valueAsDouble): Use new function parseToDouble().
2996         (WebCore::BaseDateAndTimeInputType::setValueAsInputNumber): Added.
2997         (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp): Changed return type to InputNumber.
2998         (WebCore::BaseDateAndTimeInputType::parseToNumber): This is replacement of parseToDouble().
2999         (WebCore::BaseDateAndTimeInputType::parseToDouble): Added for valueAsDate and valueAsDouble.
3000         (WebCore::BaseDateAndTimeInputType::serialize): Changed parameter type to InputNumber.
3001         (WebCore::BaseDateAndTimeInputType::serializeWithComponents): Replace double to InputNumber for getAllowdStep.
3002         * html/BaseDateAndTimeInputType.h:
3003         (BaseDateAndTimeInputType):
3004         * html/DateInputType.cpp:
3005         (WebCore::DateInputType::createStepRange): Replaced double to InputNumber.
3006         * html/DateInputType.h:
3007         (DateInputType):
3008         * html/DateTimeInputType.cpp:
3009         (WebCore::DateTimeInputType::defaultValueForStepUp): Changed return type to InputNumber.
3010         (WebCore::DateTimeInputType::createStepRange): Replaced double to InputNumber.
3011         * html/DateTimeInputType.h:
3012         (DateTimeInputType):
3013         * html/DateTimeLocalInputType.cpp:
3014         (WebCore::DateTimeLocalInputType::createStepRange): Replaced double to InputNumber.
3015         * html/DateTimeLocalInputType.h:
3016         (DateTimeLocalInputType):
3017         * html/HTMLInputElement.cpp:
3018         (WebCore::HTMLInputElement::getAllowedValueStep): Changed parameter type to InputNumber.
3019         (WebCore::HTMLInputElement::valueAsNumber): Use InputType::valueAsDouble.
3020         (WebCore::HTMLInputElement::setValueAsNumber): Use InputType::valueAsDouble.
3021         * html/HTMLInputElement.h:
3022         (HTMLInputElement):
3023         * html/InputType.cpp:
3024         (WebCore::InputType::valueAsDouble): Replacement of valueAsNumber.
3025         (WebCore::InputType::setValueAsDouble): Replacement of valueAsNumber.
3026         (WebCore::InputType::setValueAsInputNumber): Replacement of valueAsNumber.
3027         (WebCore::InputType::rangeUnderflow): Replaced double to InputNumber.
3028         (WebCore::InputType::rangeOverflow): Replaced double to InputNumber.
3029         (WebCore::InputType::defaultValueForStepUp): Changed return type to InputNumber.
3030         (WebCore::InputType::isInRange): Replaced double to InputNumber.
3031         (WebCore::InputType::isOutOfRange): Replaced double to InputNumber.
3032         (WebCore::InputType::stepMismatch): Replaced double to InputNumber.
3033         (WebCore::InputType::validationMessage): Replaced double to InputNumber.
3034         (WebCore::InputType::parseToNumber): Replacement of parseToDouble.
3035         (WebCore::InputType::parseToNumberOrNaN): Added for reducing number of std::numeric_limits<double>::quiet_NaN().
3036         (WebCore::InputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber.
3037         (WebCore::InputType::serialize): Changed parameter type to InputNumber.
3038         (WebCore::InputType::applyStep): Replaced double to InputNumber.
3039         (WebCore::InputType::getAllowedValueStep): Changed parameter type to InputNumber.
3040         (WebCore::InputType::stepUpFromRenderer): Replaced double to InputNumber.
3041         * html/InputType.h:
3042         (InputType):
3043         * html/MonthInputType.cpp:
3044         (WebCore::MonthInputType::defaultValueForStepUp): Changed return type to InputNumber.
3045         (WebCore::MonthInputType::createStepRange): Replaced double to InputNumber.
3046         (WebCore::MonthInputType::parseToNumber): Replacement of parseToDouble.
3047         * html/MonthInputType.h:
3048         (MonthInputType):
3049         * html/NumberInputType.cpp:
3050         (WebCore::NumberInputType::valueAsDouble): Replacement of valueAsNumber. Changed to use parseToDoubleForNumberType.
3051         (WebCore::NumberInputType::setValueAsDouble):  Replacement of setValueAsNumber.  Changed to use serializeForNumberType.
3052         (WebCore::NumberInputType::setValueAsInputNumber): Replacement of setValueAsNumber.
3053         (WebCore::NumberInputType::createStepRange): Replaced double to InputNumber.
3054         (WebCore::NumberInputType::parseToNumber): Replacement of parseToDouble.
3055         (WebCore::NumberInputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber.
3056         (WebCore::NumberInputType::serialize):
3057         * html/NumberInputType.h:
3058         (NumberInputType):
3059         * html/RangeInputType.cpp:
3060         (WebCore::ensureMaximum): Replaced double to InputNumber.
3061         (WebCore::RangeInputType::valueAsDouble): Replacement of valueAsNumber.
3062         (WebCore::RangeInputType::setValueAsInputNumber):  Replacement of setValueAsNumber.
3063         (WebCore::RangeInputType::createStepRange): Replaced double to InputNumber.
3064         (WebCore::RangeInputType::handleKeydownEvent): Replaced double to InputNumber.
3065         (WebCore::RangeInputType::parseToNumber): Replacement of parseToDouble.
3066         (WebCore::RangeInputType::serialize): Changed parameter type to InputNumber.
3067         (WebCore::RangeInputType::sanitizeValue): Replaced double to InputNumber.
3068         * html/RangeInputType.h:
3069         (RangeInputType):
3070         * html/StepRange.cpp:
3071         (WebCore::StepRange::StepRange): Replaced double to InputNumber.
3072         (WebCore::StepRange::acceptableError): Replaced double to InputNumber.
3073         (WebCore::StepRange::alignValueForStep): Replaced double to InputNumber.
3074         (WebCore):
3075         (WebCore::StepRange::clampValue): Replaced double to InputNumber.
3076         (WebCore::StepRange::stepMismatch): Replaced double to InputNumber.
3077         * html/StepRange.h:
3078         (WebCore::convertDoubleToInputNumber): Added.
3079         (WebCore::convertInputNumberToDouble): Added.
3080         (WebCore::StepRange::NumberWithDecimalPlaces::NumberWithDecimalPlaces): Replaced double to InputNumber.
3081         (WebCore::StepRange::StepDescription::defaultValue): Replaced double to InputNumber.
3082         (StepRange):
3083         (WebCore::StepRange::maximum): Replaced double to InputNumber.
3084         (WebCore::StepRange::minimum): Replaced double to InputNumber.
3085         (WebCore::StepRange::step): Replaced double to InputNumber.
3086         (WebCore::StepRange::stepBase): Replaced double to InputNumber.
3087         (WebCore::StepRange::defaultValue): Replaced double to InputNumber.
3088         (WebCore::StepRange::proportionFromValue): Replaced double to InputNumber.
3089         (WebCore::StepRange::valueFromProportion): Replaced double to InputNumber.
3090         * html/TimeInputType.cpp:
3091         (WebCore::TimeInputType::defaultValueForStepUp): Replaced double to InputNumber.
3092         (WebCore::TimeInputType::createStepRange): Replaced double to InputNumber.
3093         * html/TimeInputType.h:
3094         (TimeInputType):
3095         * html/WeekInputType.cpp:
3096         (WebCore::WeekInputType::createStepRange): Replaced double to InputNumber.
3097         * html/WeekInputType.h:
3098         (WeekInputType):
3099         * html/shadow/CalendarPickerElement.cpp:
3100         (WebCore::CalendarPickerElement::writeDocument): Replaced double to InputNumber.
3101         * html/shadow/SliderThumbElement.cpp:
3102         (WebCore::sliderPosition): Replaced double to InputNumber.
3103         (WebCore::RenderSliderThumb::layout): Replaced double to InputNumber.
3104         (WebCore::SliderThumbElement::setPositionFromPoint): Replaced double to InputNumber.
3105
3106 2012-06-05  Ryosuke Niwa  <rniwa@webkit.org>
3107
3108         Build fix after r119527.
3109
3110         * dom/ViewportArguments.cpp:
3111         (WebCore::computeViewportAttributes):
3112
3113 2012-06-05  Martin Robinson  <mrobinson@igalia.com>
3114
3115         [Cairo] [OpenGL] Enable GL_OES_standard_derivatives
3116         https://bugs.webkit.org/show_bug.cgi?id=87583
3117
3118         Reviewed by Alejandro G. Castro.
3119
3120         No new tests. This is covered by oes-standard-derivatives.html
3121         in the Khronos WebGL conformance tests, which may one day be part
3122         of the WebKit test suite.
3123
3124         Activate the GL_OES_standard_derivatives on Cairo along with
3125         Qt and Mac.
3126
3127         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3128         (WebCore::Extensions3DOpenGL::ensureEnabled):
3129         (WebCore::Extensions3DOpenGL::isEnabled):
3130
3131 2012-06-05  Simon Fraser  <simon.fraser@apple.com>
3132
3133         Avoid creating compositing layers for preserve-3d without transformed descendants
3134         https://bugs.webkit.org/show_bug.cgi?id=88115
3135
3136         Reviewed by Antti Koivisto.
3137         
3138         Avoid creating compositing layers, and therefore using excess backing store,
3139         for elements that have -webkit-transform-style: preserve-3d, but no 3D-transformed
3140         descendants that would be affected by that preserve-3d.
3141         
3142         Test: compositing/layer-creation/no-compositing-for-preserve-3d.html
3143
3144         * rendering/RenderLayer.h: Replace the "mustOverlap" flag with a enum
3145         that describes the different reasons for indirect compositing, so that
3146         we can use that information to decide whether to allocate backing store.
3147         (WebCore::RenderLayer::setIndirectCompositingReason):
3148         (WebCore::RenderLayer::indirectCompositingReason):
3149         (WebCore::RenderLayer::mustCompositeForIndirectReasons):
3150         * rendering/RenderLayer.cpp:
3151         (WebCore::RenderLayer::RenderLayer): Initialize m_indirectCompositingReason
3152
3153         * rendering/RenderLayerCompositor.h: New out param for computeCompositingRequirements()
3154         that is uses to indicate that a 3d-transformed descendant has been encountered.
3155         Rename requiresCompositingWhenDescendantsAreCompositing() to requiresCompositingForIndirectReason(),
3156         and return the reason as an out param.
3157         
3158         * rendering/RenderLayerCompositor.cpp:
3159         (WebCore::RenderLayerCompositor::updateCompositingLayers): Pass in the saw3DTransform
3160         param to computeCompositingRequirements().
3161         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Return a flag
3162         from computeCompositingRequirements() that is set to true if we've seen descendants
3163         that have 3d transforms. This is later used to decide whether to composite for
3164         perspective or preserve-3d.
3165         Change the "mustOverlapCompositedLayers" code to use the new "indirect compositing"
3166         enum flags.
3167         After enumerating children, call requiresCompositingForIndirectReason() and 
3168         record the reason in the layer.
3169         (WebCore::RenderLayerCompositor::needsToBeComposited): Use mustCompositeForIndirectReasons() now.
3170         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Consult the indirect compositing
3171         reason rather than just looking for the overlap flag.
3172         (WebCore::RenderLayerCompositor::reasonForCompositing): Now that we have more information
3173         about indirect compositing reasons, the logging can be more detailed.
3174         (WebCore::RenderLayerCompositor::requiresCompositingForTransform): This now only looks
3175         for 3d transforms. We now treat perspective and perserve-3d as "indirect" reasons, because
3176         whether they composite depends on descendants having non-affine transforms.
3177         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): Includes the logic
3178         previously in requiresCompositingWhenDescendantsAreCompositing(), and now determines
3179         whether to composite for preserve-3d and perspective, based on whether we have transformed descendants.
3180
3181 2012-06-05  Levi Weintraub  <leviw@chromium.org>
3182
3183         Block selection gaps painted not properly pixel snapped
3184         https://bugs.webkit.org/show_bug.cgi?id=88000
3185
3186         Reviewed by Ryosuke Niwa.
3187
3188         Fixes for selection painting in both inline line heights and block gaps. We were unintentionally
3189         flooring inline and block offsets in RenderBlock, but actually need to intentionally floor the
3190         logical left and right values in logical(Left|Right)SelectionGap to properly align our block
3191         selection gaps. This is to properly mirror the behavior in pixelSnappedLogicalRightOffsetForLine.
3192
3193         We were also unintentionally upcasting LayoutUnits to floats in InlineTextBox's selection painting
3194         routine. Now we're properly rounding.
3195
3196         Test: fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
3197
3198         * rendering/InlineTextBox.cpp:
3199         (WebCore::InlineTextBox::paintSelection): Move paint values to integers and do proper rounding.
3200         * rendering/RenderBlock.cpp:
3201         (WebCore::blockDirectionOffset): Fix incorrect flooring in return value.
3202         (WebCore::inlineDirectionOffset): Ditto.
3203         (WebCore): Removing previous attempt to properly mirror inline box selection pixel alignment. This
3204         implementation rounded the final x value instead of properly rounding our block offset then flooring
3205         the offset that corresponds to the behavior in InlineTextBox. It also didn't properly pixel snap
3206         the y offset and height.
3207         (WebCore::RenderBlock::blockSelectionGap): Properly pixel snapping the gap rect before painting.
3208         (WebCore::RenderBlock::logicalLeftSelectionGap): Correctly match InlineTextBox's selection pixel
3209         alignment by flooring the logicalLeft and pixel snapping the subsequent rect. We do this in order
3210         to maintain proper render tree pixel snapping while simultaneously mirroring the flooring in the
3211         inline direction that occurs in InlineTextBox.cpp's alignSelectionRectToDevicePixels method.
3212         (WebCore::RenderBlock::logicalRightSelectionGap): Ditto with the right.
3213
3214 2012-06-05  Adam Barth  <abarth@webkit.org>
3215
3216         Remove support for target-densitydpi in the viewport meta tag
3217         https://bugs.webkit.org/show_bug.cgi?id=88047
3218
3219         Reviewed by Kenneth Rohde Christiansen.
3220
3221         The target-densitydpi parameter was originally implemented on Android,
3222         but it does not appear to be widely used and introduces significant
3223         implementation complexity because it forces us to track three scale
3224         factors (defaultDeviceScaleFactor, deviceScaleFactor, and
3225         pageScaleFactor) rather than just two (deviceScaleFactor and
3226         pageScaleFactor).
3227
3228         There don't appear to be many web sites that use target-densitydpi
3229         because it is not supported on iOS.  There are also concerns from the
3230         standards community about the design of the feature.  It seems our best
3231         course of action is to remove target-densitydpi and address these use
3232         cases via other mechanisms, such as responsive images and device units
3233         in CSS because those approaches are likely to be implemented broadly.
3234
3235         * dom/ViewportArguments.cpp:
3236         (WebCore::computeViewportAttributes):
3237         (WebCore):
3238         (WebCore::setViewportFeature):
3239         (WebCore::viewportErrorMessageTemplate):
3240         (WebCore::viewportErrorMessageLevel):
3241         * dom/ViewportArguments.h:
3242         (WebCore::ViewportArguments::ViewportArguments):
3243         (ViewportArguments):
3244         (WebCore::ViewportArguments::operator==):
3245
3246 2012-06-05  Erik Arvidsson  <arv@chromium.org>
3247
3248         [V8] Improve variable resolution order on window
3249         https://bugs.webkit.org/show_bug.cgi?id=84247
3250
3251         Reviewed by Ojan Vafai.
3252
3253         This changes the V8 flag to turn on es52_globals and updates the layout tests to reflect the fixed behavior.
3254
3255         Test: fast/dom/Window/window-property-shadowing-onclick.html
3256
3257         * bindings/v8/V8DOMWindowShell.cpp:
3258         (WebCore::V8DOMWindowShell::initContextIfNeeded): Set the flag as we initialize V8.
3259         * bindings/v8/WorkerContextExecutionProxy.cpp:
3260         (WebCore::WorkerContextExecutionProxy::initIsolate): Ditto.
3261
3262 2012-06-05  Ojan Vafai  <ojan@chromium.org>
3263
3264         Delete dead code from RenderBox::computeLogicalWidthInRegion
3265         https://bugs.webkit.org/show_bug.cgi?id=88353
3266
3267         Reviewed by Tony Chang.
3268
3269         No new tests obviously since this is dead code.
3270
3271         * rendering/RenderBox.cpp:
3272         (WebCore::RenderBox::computeLogicalWidthInRegion):
3273
3274 2012-06-05  Greg Billock  <gbillock@google.com>
3275
3276         New constructor for WebIntent to be used for delivery
3277         https://bugs.webkit.org/show_bug.cgi?id=87143
3278
3279         Reviewed by Darin Fisher.
3280
3281         * Modules/intents/Intent.cpp:
3282         (WebCore::Intent::setExtras):
3283         (WebCore):
3284         * Modules/intents/Intent.h:
3285         (Intent):
3286
3287 2012-06-01  Ojan Vafai  <ojan@chromium.org>
3288
3289         Change overrideSizes to be content-box instead of border-box
3290         https://bugs.webkit.org/show_bug.cgi?id=88116
3291
3292         Reviewed by Tony Chang.
3293
3294         Previously, the code used border-box everywhere except for one place
3295         where it used content-box when setting the override size. Conversely,
3296         it subtracted the borderAndPaddingSize everywhere it grabbed the override
3297         size except for one.
3298
3299         Instead, make the override size override the content-box size.
3300         Converging on using the border-box size would be tricky given RenderTableCell's
3301         tricky management of intrinsic padding.
3302
3303         There is no behavior change except in RenderBox::availableLogicalHeightUsing,
3304         which fixes a table test.
3305
3306         * rendering/RenderBox.cpp:
3307         (WebCore::RenderBox::setOverrideLogicalContentHeight):
3308         (WebCore::RenderBox::setOverrideLogicalContentWidth):
3309         (WebCore::RenderBox::overrideLogicalContentWidth):
3310         (WebCore::RenderBox::overrideLogicalContentHeight):
3311         (WebCore::RenderBox::computeLogicalWidthInRegion):
3312         (WebCore::RenderBox::computeLogicalHeight):
3313         (WebCore::RenderBox::computePercentageLogicalHeight):
3314         (WebCore::RenderBox::availableLogicalHeightUsing):
3315         We were incorrectly subtracting the borderAndPaddingLogicalWidth instead
3316         of the borderAndPaddingLogicalHeight.
3317
3318         * rendering/RenderBox.h:
3319         (RenderBox):
3320         * rendering/RenderDeprecatedFlexibleBox.cpp:
3321         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3322         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3323         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3324         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
3325         * rendering/RenderFlexibleBox.cpp:
3326         (WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
3327         (WebCore::RenderFlexibleBox::setLogicalOverrideSize):
3328         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
3329         * rendering/RenderTableCell.cpp:
3330         (WebCore::RenderTableCell::setOverrideHeightFromRowHeight):
3331
3332 2012-06-05  Andy Estes  <aestes@apple.com>
3333
3334         REGRESSION (r118197): PluginStrategy should be used even if ENABLE(NETSCAPE_PLUGIN_API) is false
3335         https://bugs.webkit.org/show_bug.cgi?id=88296
3336
3337         Reviewed by Dan Bernstein.
3338
3339         refresh() and initPlugins() should call into PluginStrategy even if
3340         ENABLE(NETSCAPE_PLUGIN_API) is false. Some ports support non-Netscape
3341         plug-ins, so PluginStrategy should be consulted even if Netscape
3342         plug-ins specifically are disabled.
3343
3344         Ports that support platform strategies but not Netscape plug-ins should
3345         handle this inside their PluginStrategy rather than modifying generic
3346         plug-in code.
3347
3348         * plugins/PluginData.cpp:
3349         (WebCore::PluginData::refresh):
3350         (WebCore::PluginData::initPlugins):
3351
3352 2012-06-05  Douglas Stockwell  <dstockwell@chromium.org>
3353
3354         Crash when modifying fixed-position elements in a detached frame
3355         https://bugs.webkit.org/show_bug.cgi?id=88288
3356
3357         Reviewed by James Robinson.
3358
3359         Test: fast/block/positioning/fixed-position-detached-frame.html
3360
3361         * css/StyleResolver.cpp:
3362         (WebCore::StyleResolver::collectMatchingRulesForList):
3363
3364 2012-06-05  Andrey Kosyakov  <caseq@chromium.org>
3365
3366         Web Inspector: render timeline paint category dark green
3367         https://bugs.webkit.org/show_bug.cgi?id=88333
3368
3369         Reviewed by Pavel Feldman.
3370
3371         - Added a new, dark-green color for timeline events.
3372
3373         * WebCore.gypi: Added timelineBarDarkGreen.png
3374         * inspector/front-end/Images/timelineBarDarkGreen.png: Added.
3375         * inspector/front-end/Images/timelineCheckmarks.png: Added a dark-green checkbox.
3376         * inspector/front-end/Images/timelineDots.png: Added a dark-green dot.
3377         * inspector/front-end/TimelinePresentationModel.js:
3378         (WebInspector.TimelinePresentationModel.categories):
3379         * inspector/front-end/WebKit.qrc: Added timelineBarDarkGreen.png.
3380         * inspector/front-end/timelinePanel.css:
3381         (.timeline-category-statusbar-item.timeline-category-painting .timeline-category-checkbox):
3382         (.timeline-category-painting .timeline-graph-bar):
3383         (.popover .timeline-painting):
3384         (.timeline-category-painting .timeline-tree-icon):
3385
3386 2012-06-05  Alexei Filippov  <alexeif@chromium.org>
3387
3388         Web Inspector: serialize edge counts instead of indexes in heap snapshot
3389         https://bugs.webkit.org/show_bug.cgi?id=88324
3390
3391         The serialized node structure currently holds an index
3392         of its first containment edge in the edges array.
3393         The index can be quite big (up to 7 digits for large snapshots).
3394         The patch changes the serialization format to pass
3395         node containment edge count instead. For most nodes the count
3396         is just a single digit number.
3397         This reduces serialized snapshot size and therefore its transfer time.
3398
3399         Reviewed by Yury Semikhatsky.
3400
3401         * inspector/front-end/HeapSnapshot.js:
3402         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart):
3403         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd):
3404         (WebInspector.HeapSnapshotNode.prototype._ordinal):
3405         (WebInspector.HeapSnapshotNodeIterator):
3406         (WebInspector.HeapSnapshot.prototype._init):
3407         (WebInspector.HeapSnapshot.prototype._buildEdgeIndexes):
3408         (WebInspector.HeapSnapshot.prototype._buildRetainers):
3409         (WebInspector.HeapSnapshot.prototype._bfs):
3410         (WebInspector.HeapSnapshot.prototype._buildAggregates):
3411         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
3412         (WebInspector.HeapSnapshot.prototype._buildDominatorTree):
3413         (WebInspector.HeapSnapshot.prototype._markPageOwnedNodes):
3414         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
3415
3416 2012-06-05  Arpita Bahuguna  <arpitabahuguna@gmail.com>
3417
3418         CSS 2.1 failure: border-conflict-element-021a
3419         https://bugs.webkit.org/show_bug.cgi?id=86885
3420
3421         Reviewed by Julien Chaffraix.
3422
3423         When two adjacent table row groups (thead, tbody, tfoot) have the same border-width
3424         and the same border-style in a 'border-collapse: collapse' table the color of the border
3425         from the top-most table row wins.
3426
3427         Tests: fast/table/border-collapsing/adjacent-row-groups-multi.html
3428                fast/table/border-collapsing/adjacent-row-groups.html
3429
3430         * rendering/RenderTable.cpp:
3431         (WebCore::RenderTable::paintObject):
3432         Currently each row group is sent for paint from top (firstChild) to bottom thereby causing
3433         the borders of the bottom-most row group (which is painted last) to overlap over the
3434         previous row-group. This breaks the precedence for collapsed borders between adjacent cells.
3435
3436         This fix thus reverses the order in which the row-groups/sections are passed for painting.
3437         Additional change has been done to iterate over the RenderTableSections directly.
3438
3439         (WebCore):
3440         (WebCore::RenderTable::bottomSection):
3441         * rendering/RenderTable.h:
3442         New function has been added to obtain the last section of the table.
3443
3444         (RenderTable):
3445         * rendering/RenderTableSection.h:
3446         (RenderTableSection):
3447         RenderTableSection's paint() method has now been made public so as to make it accessible
3448         from RenderTable.
3449
3450 2012-06-05  Csaba Osztrogonác  <ossy@webkit.org>
3451
3452         [Qt][Win] Fix IDL dependency generation
3453         https://bugs.webkit.org/show_bug.cgi?id=88304
3454
3455         Reviewed by Tor Arne Vestbø.
3456
3457         * DerivedSources.pri:
3458
3459 2012-06-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3460
3461         Unreviewed, rolling out r119467, r119471, and r119476.
3462         http://trac.webkit.org/changeset/119467
3463         http://trac.webkit.org/changeset/119471
3464         http://trac.webkit.org/changeset/119476
3465         https://bugs.webkit.org/show_bug.cgi?id=88332
3466
3467         it broke chromium-mac static initializers test.\ (Requested by
3468         loislo on #webkit).
3469
3470         * WebCore.gyp/WebCore.gyp:
3471         * WebCore.gypi:
3472         * platform/graphics/FontPlatformData.h:
3473         (FontPlatformData):
3474         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3475         (WebCore::FontPlatformData::platformDataInit):
3476         (WebCore::FontPlatformData::platformDataAssign):
3477         * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Removed.
3478         * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Removed.
3479         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Removed.
3480         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Removed.
3481         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Removed.
3482         * platform/graphics/mac/FontComplexTextMac.cpp:
3483         (WebCore::Font::selectionRectForComplexText):
3484         (WebCore::Font::drawComplexText):
3485         (WebCore::Font::floatWidthForComplexText):
3486         (WebCore::Font::offsetForPositionForComplexText):
3487
3488 2012-06-05  Alexander Pavlov  <apavlov@chromium.org>
3489
3490         Web Inspector: SHIFT key as helper to color adjustment in color picker
3491         https://bugs.webkit.org/show_bug.cgi?id=88319
3492
3493         Reviewed by Pavel Feldman.
3494
3495         With Shift depressed, the dragger in the color picker will snap to the horizontal
3496         or vertical axis while dragging, depending on which axis offset is greater.
3497
3498         * inspector/front-end/Spectrum.js:
3499         (WebInspector.Spectrum.colorDragStart):
3500         (WebInspector.Spectrum.colorDrag):
3501         (WebInspector.Spectrum.draggable.move):
3502         (WebInspector.Spectrum.draggable.start):
3503
3504 2012-06-05  Andrey Kosyakov  <caseq@chromium.org>
3505
3506         Web Inspector: aggregate all events before first frame into a fake frame
3507         https://bugs.webkit.org/show_bug.cgi?id=88229
3508
3509         - in Timeline's frame mode, start aggregating events by frame even before we get first frame marker.
3510
3511         * inspector/front-end/TimelineFrameController.js:
3512         (WebInspector.TimelineFrameController.prototype._addRecord):
3513         (WebInspector.TimelineFrameController.prototype._flushFrame):
3514         (WebInspector.TimelineFrameController.prototype._createFrame):
3515
3516 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
3517
3518         JSC:need to implement Dictionary::getWithUndefinedOrNullCheck for IDB
3519         https://bugs.webkit.org/show_bug.cgi?id=88283
3520
3521         Reviewed by Kentaro Hara.
3522
3523         No new tests, idb not working for JSC yet.
3524
3525         * bindings/js/Dictionary.cpp:
3526         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
3527         * bindings/js/Dictionary.h:
3528         (Dictionary):
3529         * bindings/js/JSDictionary.cpp:
3530         (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
3531         (WebCore):
3532         * bindings/js/JSDictionary.h:
3533         (JSDictionary):
3534
3535 2012-06-05  Dongwoo Im  <dw.im@samsung.com>
3536
3537         Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'.
3538         https://bugs.webkit.org/show_bug.cgi?id=73176
3539
3540         Reviewed by Adam Barth.
3541
3542         Two more APIs are added in Custom Scheme Handler specification.
3543         http://dev.w3.org/html5/spec/Overview.html#custom-handlers
3544         One is 'isProtocolHandlerRegistered' to query whether the specific URL
3545         is registered or not.
3546         The other is 'unregisterProtocolHandler' to remove the registered URL.
3547
3548         Test: fast/dom/unregister-protocol-handler.html
3549
3550         * Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.
3551         * loader/EmptyClients.h: Add prototypes.
3552         (EmptyChromeClient):
3553         (WebCore::EmptyChromeClient::isProtocolHandlerRegistered):
3554         (WebCore::EmptyChromeClient::unregisterProtocolHandler):
3555         * page/ChromeClient.h:
3556         (ChromeClient):
3557         * page/NavigatorRegisterProtocolHandler.cpp:
3558         (WebCore):
3559         (WebCore::customHandlersStateString):
3560         (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered): Query if the handler is registered.
3561         (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler): Unregister the registered handler.
3562         * page/NavigatorRegisterProtocolHandler.h:
3563         (NavigatorRegisterProtocolHandler):
3564         * page/NavigatorRegisterProtocolHandler.idl:
3565
3566 2012-06-04  Kinuko Yasuda  <kinuko@chromium.org>
3567
3568         Chromium tests: "Add support for the Blob constructor" [r115582] regressed blob layout tests
3569         https://bugs.webkit.org/show_bug.cgi?id=85174
3570
3571         Reviewed by Kentaro Hara.
3572
3573         This fixes a crash problem which could happen when the constructor is
3574         given an array which contains String-type item(s).
3575
3576         There're still some Text mismatches between v8 results and
3577         JSC results, most of them are v8 not throwing exception
3578         when it is given an object whose toString() method throws
3579         exception.  (The issue will be addresse in a separate patch.)
3580
3581         Test: fast/files/blob-constructor.html
3582
3583         * bindings/v8/custom/V8BlobCustom.cpp:
3584         (WebCore::V8Blob::constructorCallback):
3585
3586 2012-06-05  Kentaro Hara  <haraken@chromium.org>
3587
3588         Remove unnecessary constructor of SelectorQueryCache
3589         https://bugs.webkit.org/show_bug.cgi?id=87942
3590
3591         Reviewed by Ryosuke Niwa.
3592
3593         Per the comment from darin@ (https://bugs.webkit.org/show_bug.cgi?id=87942#c27),
3594         this patch removes an inline constructor that has no arguments.
3595         To have the compiler generate the constructor,
3596         this patch also removes WTF_MAKE_NONCOPYABLE().
3597
3598         No tests. No change in behavior.
3599
3600         * dom/SelectorQuery.h:
3601         (SelectorQueryCache):
3602
3603 2012-06-05  Kentaro Hara  <haraken@chromium.org>
3604
3605         Remove unused methods from SelectorQuery.h
3606         https://bugs.webkit.org/show_bug.cgi?id=88289
3607
3608         Reviewed by Antti Koivisto.
3609
3610         This patch removes SelectorDataList::size() and
3611         SelectorDataList::SelectorDataList().
3612         SelectorDataList::size() is not used by anybody.
3613         SelectorDataList::SelectorDataList() can be auto-generated
3614         by a compiler.
3615
3616         No tests. No change in behavior.
3617
3618         * dom/SelectorQuery.cpp:
3619         * dom/SelectorQuery.h:
3620         (SelectorDataList):
3621
3622 2012-06-05  Kent Tamura  <tkent@chromium.org>
3623
3624         Build fix for r119470.
3625
3626         * loader/EmptyClients.cpp: Add #include "IntentRequest.h".
3627
3628 2012-06-05  Kent Tamura  <tkent@chromium.org>
3629
3630         Remove unused function: Document::formElements
3631         https://bugs.webkit.org/show_bug.cgi?id=88272
3632
3633         Reviewed by Kentaro Hara.
3634
3635         No new tests. No behavior change.
3636
3637         * dom/Document.h:
3638         (Document): remove formElements(). It was used for radio group
3639         validation, but the current code doesn't use it any more.
3640
3641 2012-06-05  Kenichi Ishibashi  <bashi@chromium.org>
3642
3643         Unreviewed build fix on Chromium mac
3644
3645         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3646         (WebCore::isAATFont):
3647
3648 2012-06-05  Kent Tamura  <tkent@chromium.org>
3649
3650         Move some function definitions in EmptyClients.h to EmptyClients.cpp
3651         https://bugs.webkit.org/show_bug.cgi?id=88285
3652
3653         Reviewed by Ryosuke Niwa.
3654
3655         If we have definitions of functions with RefPtr<> in EmptyClients.h like
3656
3657             virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) { }
3658
3659         and a source file includes EmptyClient.h, the source file needs to
3660         include FileChooser.h though the source file doesn't use FileChooser
3661         class explicitly because the definition of runOpenPanel() needs to call
3662         FileChooser::deref().
3663         To avoid this, we had better move such functions to EmptyClients.cpp.
3664
3665         No new tests. No behavior changes.
3666
3667         * loader/EmptyClients.cpp: Move such functions from EmptyClients.h to
3668         here, and move EmptyPopupMenu and EmptySearchPopupMenu too because
3669         they're used only by EmptyChromeClient.
3670         (WebCore):
3671         (EmptyPopupMenu):
3672         (WebCore::EmptyPopupMenu::show):
3673         (WebCore::EmptyPopupMenu::hide):
3674         (WebCore::EmptyPopupMenu::updateFromElement):
3675         (WebCore::EmptyPopupMenu::disconnectClient):
3676         (EmptySearchPopupMenu):
3677         (WebCore::EmptySearchPopupMenu::popupMenu):
3678         (WebCore::EmptySearchPopupMenu::saveRecentSearches):
3679         (WebCore::EmptySearchPopupMenu::loadRecentSearches):
3680         (WebCore::EmptySearchPopupMenu::enabled):
3681         (WebCore::EmptyChromeClient::createPopupMenu):
3682         (WebCore::EmptyChromeClient::createSearchPopupMenu):
3683         (WebCore::EmptyChromeClient::createColorChooser):
3684         (WebCore::EmptyChromeClient::runOpenPanel):
3685         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3686         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3687         (WebCore::EmptyFrameLoaderClient::dispatchWillSendSubmitEvent):
3688         (WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):
3689         (WebCore::EmptyFrameLoaderClient::createDocumentLoader):
3690         (WebCore::EmptyFrameLoaderClient::createFrame):
3691         (WebCore::EmptyFrameLoaderClient::createPlugin):
3692         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
3693         (WebCore::EmptyFrameLoaderClient::createMediaPlayerProxyPlugin):
3694         (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
3695         (WebCore::EmptyFrameLoaderClient::dispatchIntent):
3696         (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
3697         (WebCore::EmptyEditorClient::registerUndoStep):
3698         (WebCore::EmptyEditorClient::registerRedoStep):
3699         (WebCore::EmptyContextMenuClient::customizeMenu):
3700         * loader/EmptyClients.h: Move such function definitions to
3701         EmptyClient.cpp, and append OVERRIDE.
3702         (EmptyChromeClient):
3703         (EmptyFrameLoaderClient):
3704         (EmptyTextCheckerClient):
3705         (EmptyEditorClient):
3706         (EmptyContextMenuClient):
3707         * svg/graphics/SVGImage.cpp: Remove unnecessary #includes.
3708
3709 2012-06-05  Alexander Pavlov  <apavlov@chromium.org>
3710
3711         Web Inspector: "-webkit"-prefixed properties are considered inherited in the Computed Style pane
3712         https://bugs.webkit.org/show_bug.cgi?id=88257
3713
3714         Reviewed by Pavel Feldman.
3715
3716         Canonical names for properties should be used when checking if they are inherited (since only canonical names
3717         are put into the usedProperties set).
3718
3719         * inspector/front-end/StylesSidebarPane.js:
3720         (WebInspector.ComputedStylePropertiesSection.prototype._isPropertyInherited):
3721
3722 2012-06-05  Kenichi Ishibashi  <bashi@chromium.org>
3723
3724         [Chromium] Implement font shaping with font-feature-settings on Mac
3725         https://bugs.webkit.org/show_bug.cgi?id=69826
3726
3727         Reviewed by Tony Chang.
3728
3729         Add HarfBuzz-ng text shaper.
3730         Chromium mac port uses it as secondary text shaper to support OpenType features.
3731         HarfBuzz-ng is only used when -webkit-font-feature-settings is specified and
3732         corresponding font is not an AAT font.
3733
3734         No new tests. css3/font-feature-settings-rendering.html should pass on Chromium mac port.
3735
3736         * WebCore.gyp/WebCore.gyp: Added harfbuzz-ng dependencies.
3737         * WebCore.gypi: Added harfbuzz-ng files.
3738         * platform/graphics/FontPlatformData.h:
3739         (FontPlatformData): Added m_harfbuzzFace.
3740         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3741         (WebCore::FontPlatformData::platformDataInit): Copy m_harfbuzzFace.
3742         (WebCore::FontPlatformData::platformDataAssign): Ditto.
3743         (WebCore):
3744         (WebCore::isAATFont):
3745         (WebCore::FontPlatformData::harfbuzzFace):
3746         * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Added.
3747         (WebCore):
3748         (WebCore::harfbuzzFaceCache):
3749         (WebCore::HarfBuzzFace::HarfBuzzFace):
3750         (WebCore::HarfBuzzFace::~HarfBuzzFace):
3751         * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Added.
3752         (WebCore):
3753         (HarfBuzzFace):
3754         (WebCore::HarfBuzzFace::create):
3755         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Added.
3756         (WebCore):
3757         (WebCore::floatToHarfBuzzPosition):
3758         (WebCore::getGlyph):
3759         (WebCore::getGlyphHorizontalAdvance):
3760         (WebCore::getGlyphHorizontalOrigin):
3761         (WebCore::getGlyphExtents):
3762         (WebCore::harfbuzzCoreTextGetFontFuncs):
3763         (WebCore::releaseTableData):
3764         (WebCore::harfbuzzCoreTextGetTable):
3765         (WebCore::HarfBuzzFace::createFace):
3766         (WebCore::HarfBuzzFace::createFont):
3767         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
3768         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Added.
3769         (WebCore):
3770         (WebCore::harfbuzzPositionToFloat):
3771         (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
3772         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions):
3773         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
3774         (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset):
3775         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
3776         (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
3777         (WebCore::HarfBuzzShaper::setFontFeatures):
3778         (WebCore::HarfBuzzShaper::shape):
3779         (WebCore::HarfBuzzShaper::setupHarfBuzzRun):
3780         (WebCore::HarfBuzzShaper::shapeHarfBuzzRun):
3781         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun):
3782         (WebCore::HarfBuzzShaper::offsetForPosition):
3783         (WebCore::HarfBuzzShaper::selectionRect):
3784         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Added.
3785         (WebCore):
3786         (HarfBuzzShaper):
3787         (WebCore::HarfBuzzShaper::totalWidth):
3788         (HarfBuzzRun):
3789         (WebCore::HarfBuzzShaper::HarfBuzzRun::create):
3790         (WebCore::HarfBuzzShaper::HarfBuzzRun::setWidth):
3791         (WebCore::HarfBuzzShaper::HarfBuzzRun::numCharacters):
3792         (WebCore::HarfBuzzShaper::HarfBuzzRun::numGlyphs):
3793         (WebCore::HarfBuzzShaper::HarfBuzzRun::width):
3794         (WebCore::HarfBuzzShaper::HarfBuzzRun::rtl):
3795         * platform/graphics/mac/FontComplexTextMac.cpp:
3796         (WebCore):
3797         (WebCore::preferHarfBuzz): Added.
3798         (WebCore::Font::selectionRectForComplexText): Use HarfBuzzShaper if font-feature-settings exists.
3799         (WebCore::Font::drawComplexText): Ditto.
3800         (WebCore::Font::floatWidthForComplexText): Ditto.
3801         (WebCore::Font::offsetForPositionForComplexText): Ditto.
3802
3803 2012-06-05  Li Yin  <li.yin@intel.com>
3804
3805         IETC: FileList.item(-1) should return null instead of raising
3806         https://bugs.webkit.org/show_bug.cgi?id=77899
3807
3808         Reviewed by Kentaro Hara.
3809
3810         IETC: http://samples.msdn.microsoft.com/ietestcenter/fileapi/filelist.htm
3811         Accroding to http://es5.github.com/#x9.6
3812         When the index is negative, it should not raise exception.
3813         Firefox and IE returns null when there is not indexth File object.
3814
3815         Test: fast/files/file-list-test.html
3816
3817         * fileapi/FileList.idl:
3818
3819 2012-06-05  Adam Barth  <abarth@webkit.org>
3820
3821         EventHandler shouldn't dispatch fake mousemove events when scrolling on devices that don't have a mouse
3822         https://bugs.webkit.org/show_bug.cgi?id=88270
3823
3824         Reviewed by James Robinson.
3825
3826         This patch adds a setting analogous to deviceSupportsTouch to determine
3827         whether the device supports mouse. We then don't dispatch fake mouse
3828         events on devices that don't have a mouse in the first place.
3829
3830         Test: fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
3831
3832         * page/EventHandler.cpp:
3833         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
3834         * page/Settings.cpp:
3835         (WebCore::Settings::Settings):
3836         * page/Settings.h:
3837         (WebCore::Settings::setDeviceSupportsMouse):
3838         (WebCore::Settings::deviceSupportsMouse):
3839         (Settings):
3840         * testing/InternalSettings.cpp:
3841         (WebCore::InternalSettings::InternalSettings):
3842         (WebCore::InternalSettings::restoreTo):
3843         (WebCore::InternalSettings::setDeviceSupportsMouse):
3844         (WebCore):
3845         * testing/InternalSettings.h:
3846         (InternalSettings):
3847         * testing/InternalSettings.idl:
3848
3849 2012-06-04  Simon Fraser  <simon.fraser@apple.com>
3850
3851         Leaking ClipRects
3852         https://bugs.webkit.org/show_bug.cgi?id=88282
3853
3854         Reviewed by Dan Bernstein.
3855
3856         In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects
3857         was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also,
3858         there was a manual ref() in RenderLayer::updateClipRects() which this patch removes.
3859
3860         * rendering/RenderLayer.cpp:
3861         (WebCore::RenderLayer::updateClipRects):
3862         * rendering/RenderLayer.h:
3863         (WebCore::ClipRects::ClipRects):
3864
3865 2012-06-04  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
3866
3867         Add missing FractionalLayoutUnit += operator and move LineWidth to use all floats
3868         https://bugs.webkit.org/show_bug.cgi?id=88259
3869
3870         Reviewed by Ryosuke Niwa.
3871
3872         Fix two rounding bugs in LineLayout and RenderBlock that caused inlines
3873         and floats to wrap incorrectly.
3874
3875         Tests: fast/sub-pixel/float-containing-block-with-margin.html
3876                fast/sub-pixel/float-with-right-margin-zoom.html
3877                fast/sub-pixel/inline-block-with-padding.html
3878
3879         * platform/FractionalLayoutUnit.h:
3880         (WebCore::operator+=):
3881         Add missing float version of += operator thus avoiding a silent cast to
3882         int loosing precision.
3883         
3884         * rendering/RenderBlockLineLayout.cpp:
3885         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
3886         (WebCore::LineWidth::updateAvailableWidth):
3887         Change LineWidth left/right to floating point and instead of rounding the
3888         left and right edge separately.
3889         
3890         * rendering/RenderFlexibleBox.cpp:
3891         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
3892         Use explicit cast to avoid compiler ambiguity warning.
3893
3894 2012-06-04  Tony Chang  <tony@chromium.org>
3895
3896         CSS property 'order' should be a number rather than an int
3897         https://bugs.webkit.org/show_bug.cgi?id=88111
3898
3899         Reviewed by Ojan Vafai.
3900
3901         This changed in the spec:
3902         http://dev.w3.org/csswg/css3-flexbox/#order
3903
3904         I also fixed the compile with CSS3_FLEXBOX disabled.
3905
3906         No new tests, covered by existing tests.
3907
3908         * css/CSSComputedStyleDeclaration.cpp:
3909         (WebCore):
3910         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3911         * css/CSSParser.cpp:
3912         (WebCore::CSSParser::parseValue):
3913         * css/CSSProperty.cpp: Parse as float, remove clamping for HashMap<int>.
3914         (WebCore::CSSProperty::isInheritedProperty):
3915         * css/StyleBuilder.cpp:
3916         (WebCore::StyleBuilder::StyleBuilder):
3917         * css/StyleResolver.cpp:
3918         (WebCore::StyleResolver::collectMatchingRulesForList):
3919         * rendering/RenderFlexibleBox.cpp: Remove traits for HashMap<int>.
3920         (RenderFlexibleBox::OrderIterator):
3921         * rendering/RenderFlexibleBox.h:
3922         * rendering/style/RenderStyle.h:
3923         * rendering/style/StyleRareNonInheritedData.h:
3924         (StyleRareNonInheritedData):
3925
3926 2012-06-04  Hugo Parente Lima  <hugo.lima@openbossa.org>
3927
3928         Turn LEGACY_VIEWPORT_ADAPTION USE flag into an ENABLE flag.
3929         https://bugs.webkit.org/show_bug.cgi?id=88243
3930
3931         Reviewed by Adam Barth.
3932
3933         No new tests needed, this just rename a compiler flag.
3934
3935         * dom/Document.cpp:
3936         (WebCore::Document::setDocType):
3937         * dom/ViewportArguments.h:
3938         * html/HTMLMetaElement.cpp:
3939         (WebCore::HTMLMetaElement::process):
3940
3941 2012-06-04  Dana Jansens  <danakj@chromium.org>
3942
3943         [chromium] Remove redundant setNeedsCommit when prepareToDraw fails
3944         https://bugs.webkit.org/show_bug.cgi?id=88246
3945
3946         Reviewed by James Robinson.
3947
3948         When prepareToDraw fails it explicitly calls setNeedsCommit, but the
3949         scheduler already takes care of this for it. When a frame is not
3950         successfully drawn, the scheduler state machine sets the needsCommit
3951         bit itself.
3952
3953         This behaviour is covered by CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain
3954
3955         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3956         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3957
3958 2012-06-04  Takashi Toyoshima  <toyoshim@chromium.org>
3959
3960         [WebSocket] Send requires super linear time against data size
3961         https://bugs.webkit.org/show_bug.cgi?id=87383
3962
3963         Reviewed by Kent Tamura.
3964
3965         WebSocket send operation requires super linear time to send data
3966         against data size. This is because removing sent data in Vector<char>
3967         always requires data copy.
3968         Introduced wtf/StreamBuffer realizes O(n) buffer operations.
3969         This patch is only for optimization. No new tests are needed.
3970
3971         * platform/network/SocketStreamHandleBase.cpp:
3972         (WebCore::SocketStreamHandleBase::sendPendingData):
3973         * platform/network/SocketStreamHandleBase.h:
3974         (SocketStreamHandleBase):
3975
3976 2012-06-04  Tim Horton  <timothy_horton@apple.com>
3977
3978         Mock scrollbars differ by 1px in DRT vs. WKTR
3979         https://bugs.webkit.org/show_bug.cgi?id=80879
3980
3981         Rubber-stamped by Ryosuke Niwa.
3982
3983         Disable r119431 except for Apple Mac port.
3984
3985         * platform/ScrollbarThemeComposite.cpp:
3986         (WebCore::ScrollbarThemeComposite::thumbLength):
3987
3988 2012-06-04  Jeffrey Pfau  <jpfau@apple.com>
3989
3990         Document cleanup can get confused if parser still exists
3991         https://bugs.webkit.org/show_bug.cgi?id=88250
3992
3993         Reviewed by Geoffrey Garen.
3994
3995         No new tests; no behavior changes.
3996
3997         * dom/Document.cpp:
3998         (WebCore::Document::removedLastRef): Detach parser earlier
3999
4000 2012-06-04  Andrew Lo  <anlo@rim.com>
4001
4002         [BlackBerry] Split AnimationFrameRateController into its own file
4003         https://bugs.webkit.org/show_bug.cgi?id=88242
4004
4005         Reviewed by Antonio Gomes.
4006
4007         Include new header file to reflect re-organization of platform animation
4008         header files.
4009
4010         * platform/graphics/DisplayRefreshMonitor.h:
4011
4012 2012-06-04  Dana Jansens  <danakj@chromium.org>
4013
4014         [chromium] Allow CCLayerImpl to find its layer tree host, and use this for CCVideoLayerImpl instead of always-null pointer.
4015         https://bugs.webkit.org/show_bug.cgi?id=88252
4016
4017         Reviewed by James Robinson.
4018
4019         CCVideoLayerImpl has a pointer to its CCLayerTreeHostImpl which is never
4020         set to be non-null currently. Instead of making this a special case, we
4021         move the CCLayerTreeHostImpl* up to the CCLayerImpl base class, and set
4022         the pointer on every layer during commit via the TreeSynchronizer's walk
4023         through the layer tree.
4024
4025         Unit tests: Tested by TreeSynchronizer tests.
4026
4027         * platform/graphics/chromium/TreeSynchronizer.cpp:
4028         (WebCore::TreeSynchronizer::synchronizeTrees):
4029         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
4030         * platform/graphics/chromium/TreeSynchronizer.h:
4031         (WebCore):
4032         (TreeSynchronizer):
4033         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
4034         (WebCore::CCLayerImpl::CCLayerImpl):
4035         * platform/graphics/chromium/cc/CCLayerImpl.h:
4036         (WebCore):
4037         (WebCore::CCLayerImpl::layerTreeHostImpl):
4038         (WebCore::CCLayerImpl::setLayerTreeHostImpl):
4039         (CCLayerImpl):
4040         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
4041         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
4042         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
4043         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
4044         (WebCore::CCVideoLayerImpl::setNeedsRedraw):
4045         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
4046
4047 2012-06-04  Tim Horton  <timothy_horton@apple.com>
4048
4049         Mock scrollbars differ by 1px in DRT vs. WKTR
4050         https://bugs.webkit.org/show_bug.cgi?id=80879
4051
4052         Reviewed by Simon Fraser.
4053
4054         Round the length of the scrollbar thumb instead of truncating it.
4055
4056         No new tests, fixes a mismatch between pixel results from DRT and WKTR.
4057         Change is covered by all existing tests with scrollbars run with low tolerance.
4058
4059         * platform/ScrollbarThemeComposite.cpp:
4060         (WebCore::ScrollbarThemeComposite::thumbLength):
4061
4062 2012-06-04  Anders Carlsson  <andersca@apple.com>