29aac5445422fea0e42e2a27377d158835ea0e48
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-23  David Kilzer  <ddkilzer@apple.com>
2
3         BUILD FIX (r146687): setDefaultMIMEType() is unused in ResourceHandleCFNet.cpp on iOS
4
5         Fixes the following build failure:
6
7             Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:98:13: error: unused function 'setDefaultMIMEType' [-Werror,-Wunused-function]
8             static void setDefaultMIMEType(CFURLResponseRef response)
9                         ^
10             1 error generated.
11
12         * platform/network/cf/ResourceHandleCFNet.cpp:
13         (WebCore::setDefaultMIMEType): Add #if !PLATFORM(MAC)/#endif
14         guard.
15
16 2013-03-21  Kiran Muppala  <cmuppala@apple.com>
17
18         Add runtime setting for hidden page DOM timer throttling and CSS animation suspension
19         https://bugs.webkit.org/show_bug.cgi?id=112308
20
21         Reviewed by Gavin Barraclough.
22
23         No new tests.  Only adding settings to enable/disable existing features
24         and hence existing tests suffice.
25
26         * WebCore.exp.in:
27         * page/Page.cpp:
28         (WebCore::Page::setVisibilityState): Check if DOM timer throttling
29         and CSS animation suspension are enabled before turning them on.
30         (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged): Start or stop
31         DOM timer throttling based on page visibility and the new setting state.
32         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): Ditto
33         for CSS animation suspension.
34         * page/Page.h:
35         * page/Settings.cpp:
36         (WebCore::Settings::Settings): Initialize the flags for enabling hidden
37         page DOM timer throttling and CSS animation suspension to false.
38         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): Update flag
39         and notify page that the state of the setting has changed.
40         (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled): Ditto.
41         * page/Settings.h:
42         (WebCore::Settings::hiddenPageDOMTimerThrottlingEnabled):
43         (WebCore::Settings::hiddenPageCSSAnimationSuspensionEnabled):
44
45 2013-03-22  Benjamin Poulain  <bpoulain@apple.com>
46
47         Remove 2 bad branches from StringHash::equal() and CaseFoldingHash::equal()
48         https://bugs.webkit.org/show_bug.cgi?id=113003
49
50         Reviewed by Eric Seidel.
51
52         Fix two unfortunate use of StringHash and use the correct StringImpl function.
53
54         * html/parser/HTMLParserIdioms.cpp:
55         (WebCore::threadSafeEqual):
56         * html/parser/HTMLTreeBuilderSimulator.cpp:
57         (WebCore::tokenExitsSVG):
58
59 2013-03-22  Andy Estes  <aestes@apple.com>
60
61         Set the cache partition property on CFURLRequests
62         https://bugs.webkit.org/show_bug.cgi?id=113116
63
64         Patch by Jeffrey Pfau
65         Reviewed by David Kilzer.
66
67         * platform/network/cf/ResourceRequestCFNet.cpp:
68         (WebCore::ResourceRequest::doUpdatePlatformRequest):
69         (WebCore::ResourceRequest::doUpdateResourceRequest):
70
71 2013-03-22  Julien Chaffraix  <jchaffraix@webkit.org>
72
73         [CSS Grid Layout] content-sized row tracks with percentage logical height grid items don't resolve properly
74         https://bugs.webkit.org/show_bug.cgi?id=113085
75
76         Reviewed by Tony Chang.
77
78         The core issue is that because overrideContainingBlockLogicalHeight() is unset in
79         logicalContentHeightForChild, RenderBox::computePercentageLogicalHeight would try to
80         resolve percentage logical height against the grid element (wrong containing block
81         as a grid item's containing block is the grid area).
82
83         Tests: fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html
84                fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html
85
86         * rendering/RenderGrid.cpp:
87         (WebCore::RenderGrid::logicalContentHeightForChild):
88         Set our override logical height to -1, so that we don't try to constrain a grid item's logical height
89         based on resolving (badly) its percentage.
90
91 2013-03-19  Zhenyao Mo  <zmo@google.com>
92
93         Check WEBGL_draw_buffers requirements before exposing the extension
94         https://bugs.webkit.org/show_bug.cgi?id=112359
95
96         Reviewed by Kenneth Russell.
97
98         * html/canvas/EXTDrawBuffers.cpp:
99         (WebCore::EXTDrawBuffers::supported): call satisfies*().
100         (WebCore::EXTDrawBuffers::drawBuffersEXT):
101         (WebCore):
102         (WebCore::EXTDrawBuffers::satisfiesWebGLRequirements): check WebGL requirements.
103         * html/canvas/EXTDrawBuffers.h:
104         (EXTDrawBuffers):
105         * html/canvas/WebGLFramebuffer.cpp:
106         (WebCore::WebGLFramebuffer::getDrawBuffer):
107         (WebCore):
108         * html/canvas/WebGLFramebuffer.h:
109         (WebGLFramebuffer):
110         * html/canvas/WebGLRenderingContext.cpp:
111         (WebCore):
112         (WebCore::WebGLRenderingContext::initializeNewContext):
113         (WebCore::WebGLRenderingContext::getExtension):
114         (WebCore::WebGLRenderingContext::getParameter):
115         (WebCore::WebGLRenderingContext::getSupportedExtensions):
116         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
117         (WebCore::WebGLRenderingContext::getMaxDrawBuffers):
118         (WebCore::WebGLRenderingContext::getMaxColorAttachments):
119         (WebCore::WebGLRenderingContext::setBackDrawBuffer):
120         (WebCore::WebGLRenderingContext::restoreCurrentFramebuffer):
121         (WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
122         (WebCore::WebGLRenderingContext::supportsDrawBuffers): a cached version of EXTDrawBuffers::supports()
123         * html/canvas/WebGLRenderingContext.h:
124         (WebGLRenderingContext):
125
126 2013-03-22  Roger Fong  <roger_fong@apple.com>
127
128         Unreviewed. Fix AppleWin port following https://bugs.webkit.org/show_bug.cgi?id=113100.
129         Patch by Alexey Proskuryakov.
130
131         * platform/network/cf/ResourceHandleCFNet.cpp:
132         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
133
134 2013-03-22  Tony Chang  <tony@chromium.org>
135
136         REGRESSION (r146272): layout issues for flex boxes that have -webkit-flex-wrap: wrap
137         https://bugs.webkit.org/show_bug.cgi?id=113071
138
139         Reviewed by Ojan Vafai.
140
141         The refactor in r139535 introduced this bug, where a variable name wasn't updated properly.
142         In combination with r146272, this bug became more visible when nesting multiline flexboxen.
143
144         Test: css3/flexbox/multiline-min-preferred-width.html
145
146         * rendering/RenderFlexibleBox.cpp:
147         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths): We want the width of the widest
148         flexitem, the value in m_minPreferredWidth isn't relevant. Also update the comment for max
149         preferred width.
150
151 2013-03-22  Max Vujovic  <mvujovic@adobe.com>
152
153         [CSS Shaders] Clamp css_MixColor before the blending and compositing steps
154         https://bugs.webkit.org/show_bug.cgi?id=113088
155
156         Reviewed by Dean Jackson.
157
158         The blending and compositing operations from the spec [1] expect that they are operating on
159         valid color inputs, in the range [0.0, 1.0]. Thus, we should clamp the css_MixColor input to
160         this range to avoid implementation-dependent behavior for invalid color inputs.
161
162         [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending
163
164         Tests: css3/filters/custom/custom-filter-clamp-css-mix-color-negative.html
165                css3/filters/custom/custom-filter-clamp-css-mix-color.html
166
167         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
168         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader):
169             Clamp css_MixColor as clampedMixColor before using it in the blending and compositing
170             steps.
171
172 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
173
174         [GTK] Add WebCoreDOM to the gyp build
175         https://bugs.webkit.org/show_bug.cgi?id=112737
176
177         Reviewed by Nico Weber.
178
179         * WebCore.gyp/WebCoreGTK.gyp: Add WebCoreDOM to the gyp build.
180
181 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
182
183         [GTK] Add WebCoreHTML to the gyp build
184         https://bugs.webkit.org/show_bug.cgi?id=112727
185
186         Reviewed by Nico Weber.
187
188         * WebCore.gyp/WebCoreGTK.gyp: Add support for building all files under
189         the HTML directory. This includes splitting off common WebCore dependencies
190         into an aggregate target and adding a top-level WebCore target.
191
192 2013-03-22  Tim Horton  <timothy_horton@apple.com>
193
194         Plugin Snapshotting: Auto-start dominant plugins
195         https://bugs.webkit.org/show_bug.cgi?id=113111
196         <rdar://problem/13475726>
197
198         Reviewed by Dean Jackson.
199
200         * html/HTMLPlugInElement.cpp:
201         (WebCore::HTMLPlugInElement::defaultEventHandler):
202         Acknowledge the new "Restarting" DisplayState.
203         * html/HTMLPlugInElement.h:
204         Rename PlayingWithPendingMouseClick to RestartingWithPendingMouseClick for accuracy.
205         Add "Restarting" DisplayState, so we can be aware that the plugin is intentionally restarting and not re-snapshot it.
206         * html/HTMLPlugInImageElement.cpp:
207         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remove m_isPrimarySnapshottedPlugIn.
208         (WebCore::classNameForShadowRoot): Remove m_isPrimarySnapshottedPlugIn.
209         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Restart the plugin when it becomes primary.
210         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Remove m_isPrimarySnapshottedPlugIn.
211         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
212         Move the plugin to Restarting unless it's already marked as PendingMouseClick.
213         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired): Match the PlayingWithPendingMouseClick rename.
214         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Don't snapshot if we're restarting.
215         * html/HTMLPlugInImageElement.h: Remove m_isPrimarySnapshottedPlugIn.
216         * rendering/RenderSnapshottedPlugIn.cpp:
217         (WebCore::RenderSnapshottedPlugIn::paint): Acknowledge the new "Restarting" DisplayState.
218         (WebCore::RenderSnapshottedPlugIn::getCursor): Acknowledge the new "Restarting" DisplayState.
219         (WebCore::RenderSnapshottedPlugIn::handleEvent): Match the PlayingWithPendingMouseClick rename.
220
221 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
222
223         [GTK] Add support for building the WebCore bindings to the gyp build
224         https://bugs.webkit.org/show_bug.cgi?id=112638
225
226         Reviewed by Nico Weber.
227
228         Add targets, actions, and rules for building the WebCore bindings. This is
229         the first part of the WebCoreGTK build.
230
231         * WebCore.gyp/ConvertFileToHeaderWithCharacterArray.gypi: Added.
232         * WebCore.gyp/MakeNames.gypi: Added.
233         * WebCore.gyp/WebCoreGTK.gyp: Added WebCore bindings build. This has been adapted
234         from the Chromium build.
235         * WebCore.gypi: Updated list of derived sources files and added a parameter
236         for adjusting the location of the built files. We don't want to force the
237         Mac build to change, but we'd still like to reuse the scripts that the
238         Chromium build uses.
239
240 2013-03-22  Dane Wallinga  <dgwallinga@chromium.org>
241
242         Add client callbacks to notify of changes of associated from controls
243         https://bugs.webkit.org/show_bug.cgi?id=110375
244
245         Reviewed by Ryosuke Niwa.
246
247         Hook FormAssociatedElement, HTMLFormElement to notify EditorClient of form changes after a page has loaded.
248         Will be used to add autofill support for ajax-y webpages. e.g if while filling out a form, new fields
249         are dynamically created, autofill can know to re-query the autofill server and keep going.
250         https://bugs.webkit.org/show_bug.cgi?id=110375
251
252         * dom/Document.cpp:
253         (WebCore::Document::Document):
254         (WebCore::Document::didAssociateFormControl):
255         (WebCore):
256         (WebCore::Document::didAssociateFormControlsTimerFired):
257         * dom/Document.h:
258         (Document):
259         added method didAssociateFormControl, which batches form changes
260         and calls out to ChromeClient on a timer.
261         * html/FormAssociatedElement.cpp:
262         (WebCore::FormAssociatedElement::resetFormOwner):
263         (WebCore::FormAssociatedElement::formAttributeChanged):
264         (WebCore):
265         * html/FormAssociatedElement.h:
266         (FormAssociatedElement):
267         add calls to Document::didAssociateFormControl when form changes
268         * html/HTMLFormElement.cpp:
269         (WebCore::HTMLFormElement::insertedInto):
270         (WebCore):
271         * html/HTMLFormElement.h:
272         add call to Document::didAssociateFormControl
273         * loader/EmptyClients.h:
274         (EmptyChromeClient):
275         (WebCore::EmptyChromeClient::didAssociateFormControls):
276         (WebCore::EmptyChromeClient::shouldNotifyOnFormChanges):
277         * page/ChromeClient.h:
278         (ChromeClient):
279         add new method didAssociateFormControls
280
281 2013-03-22  Alexey Proskuryakov  <ap@apple.com>
282
283         Split ResourceHandleMac into multiple files
284         https://bugs.webkit.org/show_bug.cgi?id=113100
285
286         Reviewed by Geoff Garen.
287
288         It's grown too big to navigate, and I'm going to make WebCoreResourceHandleAsDelegate
289         substantially more complicated yet.
290
291         1. Mechanically moved WebCoreResourceHandleAsDelegate into separate files.
292         2. Refactored WebCoreSynchronousLoaderClient to be cross-platform, and moved it into
293         separate files.
294
295         * WebCore.vcproj/WebCore.vcproj:
296         * WebCore.vcxproj/WebCore.vcxproj:
297         * WebCore.vcxproj/WebCore.vcxproj.filters:
298         * WebCore.xcodeproj/project.pbxproj:
299         * platform/network/SynchronousLoaderClient.cpp: Added.
300         * platform/network/SynchronousLoaderClient.h: Added.
301         * platform/network/cf/ResourceHandleCFNet.cpp:
302         * platform/network/mac/SynchronousLoaderClient.mm: Added.
303         * platform/network/mac/WebCoreResourceHandleAsDelegate.h: Added.
304         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Added.
305
306 2013-03-21  Geoffrey Garen  <ggaren@apple.com>
307
308         Added a setting for whether JavaScript markup is enabled
309         https://bugs.webkit.org/show_bug.cgi?id=112999
310
311         Reviewed by Maciej Stachowiak.
312
313         This setting is useful for clients that want protection from script
314         injection attacks.
315
316         * page/Settings.h:
317         (Settings): Clarified which clients should call canExecuteScripts().
318
319         * page/Settings.in: Added the new setting.
320
321 2013-03-22  Roger Fong  <roger_fong@apple.com>
322
323         Unreviewed build fix.
324
325         * bindings/scripts/preprocessor.pm:
326         (applyPreprocessor):
327
328 2013-03-22  Roger Fong  <roger_fong@apple.com>
329
330         Unreviewed. Force kill gcc-3.exe during bindings generation tests to avoid process hangs.
331
332         This problem is occuring on the WinEWS bots where there are somehow multiple gcc-3 processes existing at the same time.
333         This is a speculative fix. There should only be 1 gcc-3.exe process running at a time ever.
334
335         * bindings/scripts/preprocessor.pm:
336         (applyPreprocessor):
337
338 2013-03-22  Eric Carlson  <eric.carlson@apple.com>
339
340         Cleanup text track selection logic
341         https://bugs.webkit.org/show_bug.cgi?id=113062
342
343         Reviewed by Jer Noble.
344
345         No new tests, covered by existing tests.
346
347         * html/HTMLMediaElement.cpp:
348         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Remove.
349         (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't look at track attributes directly,
350             use captionPreferences->textTrackSelectionScore to calculate track rank.
351         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Set m_processingPreferenceChange here
352             instead of in captionPreferencesChanged.
353         (WebCore::HTMLMediaElement::captionPreferencesChanged): Don't suppress calls to setClosedCaptionsVisible,
354             existing code already makes sure we don't do unnecessary work.
355         * html/HTMLMediaElement.h:
356
357         * html/shadow/MediaControlElements.cpp:
358         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Drive by cleanup, don't
359             process inactive cues.
360
361         * html/shadow/MediaControlsApple.cpp:
362         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility): Call resetTrackListMenu instead
363             of updateDisplay so we only mark the menu as needing a recalculation and do the work when
364             it is displayed.
365
366         * page/CaptionUserPreferences.cpp:
367         (WebCore::CaptionUserPreferences::shouldShowCaptions): When in testing mode, return true if
368             the caption or subtitle preference has been set.
369         (WebCore::CaptionUserPreferences::setShouldShowCaptions): In testing mode, clear the caption
370             and subtitle preference when passed false.
371         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Calculate the track score based on
372             track type preference and preferred language.
373         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Score a track according to
374             the language presence and position in the preferred languages list.
375         * page/CaptionUserPreferences.h:
376
377         * page/CaptionUserPreferencesMac.h:
378         * page/CaptionUserPreferencesMac.mm:
379         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate track language score 
380             according to user preferences.
381
382         * platform/Language.cpp:
383         (WebCore::indexOfBestMatchingLanguageInList): Repurposed the static bestMatchingLanguage
384             function to return the location of a language in a Vector.
385         (WebCore::preferredLanguageFromList): Removed.
386         * platform/Language.h:
387
388 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
389
390         Build fix for TransformationMatrix
391         https://bugs.webkit.org/show_bug.cgi?id=113087
392
393         Reviewed by Martin Robinson.
394
395         This is a trivial build fix for clutter ac backend. Clutter AC backend doesn't use
396         TextureMapper so there is nowhere including TransformationMatrix.h.
397         For the reason, we include it explicitly.
398
399         No new tests because of no functionality change.
400
401         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp:
402         * platform/graphics/clutter/GraphicsContext3DPrivate.h:
403         (WebCore):
404
405 2013-03-22  Steve Block  <steveblock@chromium.org>
406
407         Coordinates.idl lacks Conditional=GEOLOCATION
408         https://bugs.webkit.org/show_bug.cgi?id=112949
409
410         Reviewed by Steve Block.
411
412         No new tests, build optimization only.
413
414         * page/Coordinates.idl: Added GEOLOCATION conditional guard.
415
416 2013-03-22  Daniel Cheng  <dcheng@chromium.org>
417
418         Data store should be readable in dragstart/copy/cut events
419         https://bugs.webkit.org/show_bug.cgi?id=23695
420
421         Reviewed by Tony Chang.
422
423         There were several events where data could be written but not read back due to the fact that
424         different Clipboard method implementations checked permissions inconsistently. This patch
425         adds helper methods to check if an operation is permitted on a Clipboard and refactors all
426         direct comparisons against Clipboard::m_policy to use the new helpers instead. This fixes
427         several bugs where Clipboard::types and Clipboard::getData are not usable inside the
428         aforementioned events.
429
430         Tests: editing/pasteboard/can-read-in-copy-and-cut-events.html
431                editing/pasteboard/can-read-in-dragstart-event.html
432
433         * dom/Clipboard.cpp:
434         (WebCore::Clipboard::canReadTypes): Formerly restricted to ClipboardReadable and
435                                             ClipboardTypesReadable; now allows ClipboardWritable as
436                                             well.
437         (WebCore::Clipboard::canReadData): Formerly restricted to ClipboardReadable; now allows
438                                            ClipboardWritable as well.
439         (WebCore::Clipboard::canWriteData):
440         (WebCore::Clipboard::canSetDragImage):
441         (WebCore::Clipboard::hasFileOfType):
442         (WebCore::Clipboard::hasStringOfType):
443         (WebCore::Clipboard::setDropEffect):
444         (WebCore::Clipboard::setEffectAllowed):
445         * dom/Clipboard.h:
446         (Clipboard):
447         * platform/blackberry/ClipboardBlackBerry.cpp:
448         (WebCore::ClipboardBlackBerry::clearData):
449         (WebCore::ClipboardBlackBerry::clearAllData):
450         (WebCore::ClipboardBlackBerry::getData):
451         (WebCore::ClipboardBlackBerry::setData):
452         (WebCore::ClipboardBlackBerry::types):
453         * platform/chromium/ClipboardChromium.cpp:
454         (WebCore::DataTransferItemPolicyWrapper::kind):
455         (WebCore::DataTransferItemPolicyWrapper::type):
456         (WebCore::DataTransferItemPolicyWrapper::getAsString):
457         (WebCore::DataTransferItemPolicyWrapper::getAsFile):
458         (WebCore::ClipboardChromium::clearData):
459         (WebCore::ClipboardChromium::clearAllData):
460         (WebCore::ClipboardChromium::getData):
461         (WebCore::ClipboardChromium::setData):
462         (WebCore::ClipboardChromium::types):
463         (WebCore::ClipboardChromium::files):
464         (WebCore::ClipboardChromium::setDragImage):
465         * platform/gtk/ClipboardGtk.cpp:
466         (WebCore::ClipboardGtk::clearData):
467         (WebCore::ClipboardGtk::clearAllData):
468         (WebCore::ClipboardGtk::getData):
469         (WebCore::ClipboardGtk::setData):
470         (WebCore::ClipboardGtk::types):
471         (WebCore::ClipboardGtk::files):
472         (WebCore::ClipboardGtk::setDragImage):
473         * platform/mac/ClipboardMac.mm:
474         (WebCore::ClipboardMac::clearData):
475         (WebCore::ClipboardMac::clearAllData):
476         (WebCore::ClipboardMac::getData):
477         (WebCore::ClipboardMac::setData):
478         (WebCore::ClipboardMac::types):
479         (WebCore::ClipboardMac::files):
480         (WebCore::ClipboardMac::setDragImage):
481         * platform/qt/ClipboardQt.cpp:
482         (WebCore::ClipboardQt::clearData):
483         (WebCore::ClipboardQt::clearAllData):
484         (WebCore::ClipboardQt::getData):
485         (WebCore::ClipboardQt::setData):
486         (WebCore::ClipboardQt::types):
487         (WebCore::ClipboardQt::files):
488         (WebCore::ClipboardQt::setDragImage):
489         (WebCore::ClipboardQt::items):
490         * platform/qt/DataTransferItemListQt.cpp:
491         (WebCore::DataTransferItemListQt::length):
492         (WebCore::DataTransferItemListQt::item):
493         (WebCore::DataTransferItemListQt::deleteItem):
494         (WebCore::DataTransferItemListQt::clear):
495         (WebCore::DataTransferItemListQt::add):
496         * platform/qt/DataTransferItemQt.cpp:
497         (WebCore::DataTransferItemQt::getAsString):
498         * platform/win/ClipboardWin.cpp:
499         (WebCore::ClipboardWin::clearData):
500         (WebCore::ClipboardWin::clearAllData):
501         (WebCore::ClipboardWin::getData):
502         (WebCore::ClipboardWin::setData):
503         (WebCore::ClipboardWin::types):
504         (WebCore::ClipboardWin::files):
505         (WebCore::ClipboardWin::setDragImage):
506
507 2013-03-22  Andrei Bucur  <abucur@adobe.com>
508
509         [CSS Regions] Remove pushLayoutState(RenderFlowThread*) from RenderView
510         https://bugs.webkit.org/show_bug.cgi?id=113084
511
512         Reviewed by Dirk Schulze.
513
514         Remove void pushLayoutState(RenderFlowThread*, bool regionsChanged) from RenderView.h because it's not used.
515
516         Tests: Code cleanup. No tests needed.
517
518         * rendering/RenderView.h:
519         (RenderView):
520
521 2013-03-22  Kondapally Kalyan  <kalyan.kondapally@intel.com>
522
523         [EFL] Fix build issues to enable CSS Filter and Shaders support.
524         https://bugs.webkit.org/show_bug.cgi?id=111274
525
526         Reviewed by Noam Rosenthal.
527
528         This is in preperation to enable CSS Filter and Shaders support.
529         This patch fixes related build issues to enable the support.
530
531         * platform/graphics/surfaces/efl/GLTransportSurface.cpp:
532         * platform/graphics/texmap/TextureMapper.cpp:
533         * platform/graphics/texmap/TextureMapper.h:
534         (WebCore):
535         * platform/graphics/texmap/TextureMapperGL.cpp:
536         * platform/graphics/texmap/TextureMapperGL.h:
537         (WebCore):
538         * platform/graphics/texmap/TextureMapperShaderProgram.h:
539
540 2013-03-22  Matt Falkenhagen  <falken@chromium.org>
541
542         Implement isEnabledFormControl() for SliderThumbElement and SpinButtonElement in terms of disabled()
543         https://bugs.webkit.org/show_bug.cgi?id=112993
544
545         Reviewed by Kent Tamura.
546
547         This is an intermediate step for refactoring Node::disabled and
548         Element::isEnabledFormControl. All classes that override
549         isEnabledFormControl just return !disabled(), except for
550         SliderThumbElement and SpinButtonElement. This patch changes those two
551         classes to do so, which shows that the two functions are redundant and
552         easy to refactor into a single function in a subsequent patch.
553
554         No new tests, there should be no behavior change.
555
556         * html/shadow/SliderThumbElement.cpp:
557         (WebCore::SliderThumbElement::disabled):
558         (WebCore):
559         (WebCore::SliderThumbElement::isEnabledFormControl):
560         * html/shadow/SliderThumbElement.h:
561         (SliderThumbElement):
562         * html/shadow/SpinButtonElement.h: The check of shadowHost() is
563         necessary because it can be detached by JavaScript that runs during
564         event handling (see r76566)
565
566 2013-03-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
567
568         [Qt] New fast/text/word-space-with-kerning-3.html fails on Qt.
569         https://bugs.webkit.org/show_bug.cgi?id=112668
570
571         Reviewed by Jocelyn Turcotte.
572
573         Qt adds word-spacing to leading spaces, but WebCore only expects
574         us to add for trailing spaces. We only corrected for this in width
575         calculation but do need to also do it for drawing.
576
577         Instead of subtracting the extra word-spacing we now configure the
578         FormatRange not to apply to leading spaces. This means this behavior
579         will be applied everywhere reliably.
580
581         * platform/graphics/Font.h:
582         (Font):
583         * platform/graphics/qt/FontQt.cpp:
584         (WebCore::Font::drawComplexText):
585         (WebCore::Font::floatWidthForComplexText):
586         (WebCore::Font::offsetForPositionForComplexText):
587         (WebCore::Font::selectionRectForComplexText):
588         (WebCore::Font::initFormatForTextLayout):
589
590 2013-03-22  Joshua Bell  <jsbell@chromium.org>
591
592         REGRESSION (r146540?): Crashes in storage/indexeddb/factory-basics-workers.html, storage/indexeddb/transaction-error.html
593         https://bugs.webkit.org/show_bug.cgi?id=113019
594
595         Reviewed by Tony Chang.
596
597         Also manifesting flakily under Chromium's content_shell. It's an ASSERT being hit in
598         the IDBTransaction destructor. The cause was r146540 which allows a stopped context
599         to reclaim script wrappers. This allows the IDBTransaction to be deref'd at times where
600         it previously would have just leaked. Modulate the destructor assertions to account
601         for this case.
602
603         No new tests; failures already manifest as flaky crashes in some ports.
604
605         * Modules/indexeddb/IDBTransaction.cpp:
606         (WebCore::IDBTransaction::~IDBTransaction): If context is stopped, expected state
607         transitions/cleanup may not have occurred before destructor runs.
608
609 2013-03-22  David Grogan  <dgrogan@chromium.org>
610
611         IndexedDB: Histogram available disk space on attempt to open database
612         https://bugs.webkit.org/show_bug.cgi?id=112862
613
614         Reviewed by Tony Chang.
615
616         ChromeOS suspects they might be hitting disk corruption when the disks
617         are nearly full. This patch logs the available space to either the
618         "success" or the "fail" histogram as appropriate so that the
619         distributions can be compared.
620
621         No new tests - I don't know of a good way to test histograms. Local
622         printf testing didn't turn up any bugs.
623
624         * platform/leveldb/LevelDBDatabase.cpp:
625         (WebCore::HistogramFreeSpace):
626         (WebCore):
627         (WebCore::LevelDBDatabase::open):
628
629 2013-03-22  Nate Chapin  <japhet@chromium.org>
630
631         REGRESSION (r146239): Reproducible crash in WebCore::DocumentLoader::responseReceived.
632         https://bugs.webkit.org/show_bug.cgi?id=112811
633
634         Reviewed by Brady Eidson.
635
636         Test: http/tests/cache/x-frame-options-304.html
637
638         * loader/DocumentLoader.cpp:
639         (WebCore::DocumentLoader::responseReceived):
640         * loader/cache/CachedRawResource.cpp:
641         (WebCore::CachedRawResource::switchClientsToRevalidatedResource):
642         * loader/cache/CachedRawResource.h:
643
644 2013-03-22  Jer Noble  <jer.noble@apple.com>
645
646         REGRESSION: -webkit-box-reflect does not show on video elements
647         https://bugs.webkit.org/show_bug.cgi?id=112397
648
649         Reviewed by Eric Carlson.
650
651         Work around the ASSERTs generated when setting an AVPlayerLayer's player property
652         during a CA flush by setting the player property during the next runloop, outside
653         of a CA flush.
654
655         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
656         (PlatformCALayer::clone):
657
658 2013-03-22  peavo@outlook.com  <peavo@outlook.com>
659
660         [Curl] Performance fix, avoid loading cookie file on every request.
661         https://bugs.webkit.org/show_bug.cgi?id=113023
662
663         Reviewed by Brent Fulgham.
664
665         We currently load the cookie file on every request, and when setting cookies from JavaScript, by using the option CURLOPT_COOKIEFILE.
666         This is very inefficient as the cookie file can get quite large, and file I/O is slow.
667         It is sufficient to load the cookie file on startup, as we use a shared cookie database between the requests.
668
669         * platform/network/curl/CookieJarCurl.cpp:
670         (WebCore::setCookiesFromDOM): Avoid loading cookie file when setting cookies from JavaScript.
671         * platform/network/curl/ResourceHandleManager.cpp:
672         (WebCore::ResourceHandleManager::initializeHandle): Avoid loading cookie file on every request.
673         (WebCore::ResourceHandleManager::initCookieSession): Load the cookie file to shared database on startup.
674
675 2013-03-22  Tiancheng Jiang  <tijiang@rim.com>
676
677         [BlackBerry] Update Input field Background Color
678         https://bugs.webkit.org/show_bug.cgi?id=113063
679
680         Reviewed by George Staikos.
681
682         RIM PR 307463.
683         Internally reviewed by Ed Baker.
684
685         * platform/blackberry/RenderThemeBlackBerry.cpp:
686         (WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField):
687
688 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
689
690         Web Inspector: FlameChart. Draw function names over flame chart bar if they fit into the bar.
691         https://bugs.webkit.org/show_bug.cgi?id=113052
692
693         Reviewed by Vsevolod Vlasov.
694
695         The draw function will draw the bar title if the text is less than bar width.
696         Unfortunately almost all the projects which need to be profiled
697         use long function names with dots. So if the function name has dots and
698         doesn't fit into the space then prepareTitle will try to drop the prefix before dot.
699         If the title has no dots then the function will strip the tail of the title.
700
701         * inspector/front-end/FlameChart.js:
702         (WebInspector.FlameChart):
703         (WebInspector.FlameChart.prototype.draw):
704         (WebInspector.FlameChart.prototype._prepareTitle):
705
706 2013-03-22  Vladislav Kaznacheev  <kaznacheev@chromium.org>
707
708         Web Inspector: Add "hidden" attribute to the recently added APIs in Inspector.json
709         https://bugs.webkit.org/show_bug.cgi?id=113061
710
711         Added "hidden": true to the APIs introduced since version 1.0.
712
713         Reviewed by Pavel Feldman.
714
715         * inspector/Inspector.json:
716
717 2013-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
718
719         Web Inspector: Correctly implement scrollToLine, revealLine and setSelection on CodeMirror  editor.
720         https://bugs.webkit.org/show_bug.cgi?id=113028
721
722         Reviewed by Pavel Feldman.
723
724         Added focus event handler to CodeMirror editor view elememnt to support inspector's focus model.
725         Added selection and scroll listeners to correctly save editor scroll and selection in history.
726         Implemented revealLine, scrollToLine and setSelection.
727         Note: CodeMirror's coordsChar method does not work correctly in "local" mode, implemented as binary search
728         as a temporary workaround.
729
730         * inspector/front-end/CodeMirrorTextEditor.js:
731         (WebInspector.CodeMirrorTextEditor):
732         (WebInspector.CodeMirrorTextEditor.prototype.defaultFocusedElement):
733         (WebInspector.CodeMirrorTextEditor.prototype._handleElementFocus):
734         (WebInspector.CodeMirrorTextEditor.prototype.revealLine):
735         (WebInspector.CodeMirrorTextEditor.prototype._coordsChar):
736         (WebInspector.CodeMirrorTextEditor.prototype._topScrolledLine):
737         (WebInspector.CodeMirrorTextEditor.prototype._bottomScrolledLine):
738         (WebInspector.CodeMirrorTextEditor.prototype._scroll):
739         (WebInspector.CodeMirrorTextEditor.prototype._selectionChange):
740         (WebInspector.CodeMirrorTextEditor.prototype.scrollToLine):
741         (WebInspector.CodeMirrorTextEditor.prototype.setSelection):
742         (WebInspector.CodeMirrorTextEditor.prototype.copyRange):
743         * inspector/front-end/TextEditor.js:
744         (WebInspector.TextEditor.prototype.copyRange):
745
746 2013-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
747
748         Web Inspector: [Regression] Editor scroll is not restored after inspector reload.
749         https://bugs.webkit.org/show_bug.cgi?id=113027
750
751         Reviewed by Pavel Feldman.
752
753         * inspector/front-end/SourceFrame.js:
754         (WebInspector.SourceFrame.prototype.wasShown):
755         (WebInspector.SourceFrame.prototype._isEditorShowing):
756         (WebInspector.SourceFrame.prototype._innerHighlightLineIfNeeded):
757         (WebInspector.SourceFrame.prototype._innerRevealLineIfNeeded):
758         (WebInspector.SourceFrame.prototype._innerScrollToLineIfNeeded):
759         (WebInspector.SourceFrame.prototype._innerSetSelectionIfNeeded):
760
761 2013-03-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
762
763         [Qt] Fix build with OPENCL 1.2
764         https://bugs.webkit.org/show_bug.cgi?id=113056
765
766         Reviewed by Kenneth Rohde Christiansen.
767
768         Switch qmake checks to the modern style which means we can enable OpenCL with
769         WEBKIT_CONFIG+=opencl. 
770
771         Upgrade OpenCL 1.1 clCreateImage2D to OpenCL 1.2 clCreateImage calls.
772
773         * Target.pri:
774         * WebCore.pri:
775         * platform/graphics/filters/FilterEffect.cpp:
776         (WebCore::FilterEffect::createOpenCLImageResult):
777         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
778         (WebCore::FilterContextOpenCL::createOpenCLImage):
779
780 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
781
782         [GTK][AC] Opacity animation doesn't work with clutter backend
783         https://bugs.webkit.org/show_bug.cgi?id=110347
784
785         Reviewed by Gustavo Noronha Silva.
786
787         The static casting in ternary operator doesn't change actual inputted argument type.
788         So I replaced it with if-else statement.
789
790         Covered by existing animation tests.
791
792         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
793         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
794         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
795
796 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
797
798         [GTK][AC] Add removing animations procedure with clutter ac backend
799         https://bugs.webkit.org/show_bug.cgi?id=110607
800
801         Reviewed by Gustavo Noronha Silva.
802
803         This changes is based on mac port implementation. The only different thing is
804         that updateAnimations is called explicitly in destructor of GraphicsLayerClutter
805         to remove uncommitted animations. Because even though we call notifyFlushRequired
806         to remove existing animations in removeAnimation(), removeClutterAnimationFromLayer
807         has been never reached since the root layer is destroyed before. It means
808         that we haven't lost a change to remove actual animations from clutterActor.
809
810         Covered by existing animation tests.
811
812         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
813         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
814         (WebCore::GraphicsLayerClutter::removeAnimation):
815         (WebCore):
816         (WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer):
817         * platform/graphics/clutter/GraphicsLayerClutter.h:
818         (WebCore::GraphicsLayerClutter::animationIsRunning):
819         (GraphicsLayerClutter):
820
821 2013-03-22  Kondapally Kalyan  <kalyan.kondapally@intel.com>
822
823         [EFL][WebGL] Optimize AlphaOp for HTMLVideoElement input.
824         https://bugs.webkit.org/show_bug.cgi?id=113049
825
826         Reviewed by Kenneth Rohde Christiansen.
827
828         Covered by existing tests.
829
830         Changeset 137397 implemented optimisation to avoid any
831         unnecessary Unmultiply or Premultiply operation in unpack/pack
832         provided the Image source is from HTMLVideoElement. This patch
833         enables the same for EFL port.
834
835         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
836         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
837
838 2013-03-22  Tommy Widenflycht  <tommyw@google.com>
839
840         Clean up the speech recognintion API
841         https://bugs.webkit.org/show_bug.cgi?id=112916
842
843         Reviewed by Adam Barth.
844
845         This patch cleans away deprecated parts, fixes so that stop() can be called more than once and adds
846         the missing emma attribute on SpeechRecognitionEvent (which is always null).
847
848         Patch covered by existing tests.
849
850         * Modules/speech/SpeechRecognition.cpp:
851         (WebCore::SpeechRecognition::stopFunction):
852         (WebCore::SpeechRecognition::abort):
853         (WebCore::SpeechRecognition::didEnd):
854         (WebCore::SpeechRecognition::SpeechRecognition):
855         * Modules/speech/SpeechRecognition.h:
856         (SpeechRecognition):
857         * Modules/speech/SpeechRecognitionEvent.cpp:
858         (WebCore::SpeechRecognitionEvent::createResult):
859         (WebCore::SpeechRecognitionEvent::createNoMatch):
860         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
861         * Modules/speech/SpeechRecognitionEvent.h:
862         (WebCore):
863         (SpeechRecognitionEventInit):
864         (SpeechRecognitionEvent):
865         (WebCore::SpeechRecognitionEvent::emma):
866         * Modules/speech/SpeechRecognitionEvent.idl:
867
868 2013-03-22  Emil A Eklund  <eae@chromium.org>
869
870         Floor cell widths in AutoTableLayout::recalcColumn
871         https://bugs.webkit.org/show_bug.cgi?id=112922
872
873         Reviewed by Levi Weintraub.
874
875         Table cells widths are floored to ensure even distribution of available
876         space across columns. The code path that computes the width of the
877         _table_ failed to take this into account and thus can over report the
878         total width of the table.
879
880         Test: fast/sub-pixel/table-with-subpixel-cell-size.html
881
882         * rendering/AutoTableLayout.cpp:
883         (WebCore::AutoTableLayout::recalcColumn): Floor width to match column sizing logic.
884
885 2013-03-22  David Kilzer  <ddkilzer@apple.com>
886
887         BUILD FIX (r146208): Export shouldPrintExceptions methods for iOS
888
889         Fixes the following build failure:
890
891             Undefined symbols for architecture i386:
892               "__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb", referenced from:
893                     +[WebCoreStatistics setShouldPrintExceptions:] in WebCoreStatistics.o
894               "__ZN7WebCore11PageConsole21shouldPrintExceptionsEv", referenced from:
895                     +[WebCoreStatistics shouldPrintExceptions] in WebCoreStatistics.o
896             ld: symbol(s) not found for architecture i386
897             clang: error: linker command failed with exit code 1 (use -v to see invocation)
898
899         * WebCore.exp.in: Move symbols so they're exported for iOS as
900         well.
901
902 2013-03-22  Yury Semikhatsky  <yurys@chromium.org>
903
904         Unreviewed. Fix Chromium Win compilation after r146583.
905
906         * bindings/v8/CustomElementHelpers.cpp:
907         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
908
909 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
910
911         Web Inspector: Flame Chart. Chart has to be zoomed around the mouse pointer.
912         https://bugs.webkit.org/show_bug.cgi?id=113031
913
914         Reviewed by Yury Semikhatsky.
915
916         Overview grid is able to zoom around the mouse pointer.
917         So the simplest way is to translate x coordinate of the mouse pointer hovered over the chart
918         to x coordinate in term of overview window and pass it to the zoom function.
919
920         Minor unrelated fix: draw small border at bottom of the overview grid.
921
922         * inspector/front-end/FlameChart.js:
923         (WebInspector.FlameChart.prototype._onMouseWheel):
924         * inspector/front-end/OverviewGrid.js:
925         (WebInspector.OverviewGrid.prototype.zoom):
926         * inspector/front-end/flameChart.css:
927         (#flame-chart-overview-container):
928
929 2013-03-22  No'am Rosenthal  <noam@webkit.org>
930
931         [Texmap] TextureMapperImageBuffer should not use rendering code for filters.
932         https://bugs.webkit.org/show_bug.cgi?id=113040
933
934         Reviewed by Kenneth Rohde Christiansen.
935
936         Disable TextureMapperImageBuffer filters, until they can be done the right way.
937         This should only disrupt accelerated filters in fallback mode, which is a very rare
938         use case.
939
940         No new testable functionality.
941
942         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
943         (WebCore::BitmapTextureImageBuffer::applyFilters):
944
945 2013-03-22  Sergey Ryazanov  <serya@chromium.org>
946
947         Web Inspector: Report more CSS errors
948         https://bugs.webkit.org/show_bug.cgi?id=113022
949
950         Reviewed by Pavel Feldman.
951
952         Reporting next few CSS syntax errors in declaration_list.
953
954         * css/CSSGrammar.y.in:
955
956 2013-03-18  Yury Semikhatsky  <yurys@chromium.org>
957
958         Web Inspector: use individual samples to construct CPU profile flame chart
959         https://bugs.webkit.org/show_bug.cgi?id=112569
960
961         Reviewed by Pavel Feldman.
962
963         Added an optional array of samples to the CPU profile returned over the
964         protocol. Each sample is id of the profile node corresponding to the top frame
965         of the sample's stack trace. The array of samples if present is used to draw
966         the flame chart on the CPU profile panel, otherwise flame chart is drawn based
967         on the aggregated profile data.
968
969         * bindings/js/ScriptProfile.cpp:
970         (WebCore::ScriptProfile::buildInspectorObjectForSamples):
971         * bindings/js/ScriptProfile.h:
972         (ScriptProfile):
973         * bindings/v8/ScriptProfile.cpp:
974         (WebCore::buildInspectorObjectFor):
975         (WebCore):
976         (WebCore::ScriptProfile::buildInspectorObjectForSamples):
977         * bindings/v8/ScriptProfile.h:
978         (ScriptProfile):
979         * bindings/v8/ScriptProfiler.cpp:
980         (WebCore::ScriptProfiler::start):
981         * inspector/Inspector.json:
982         * inspector/InspectorProfilerAgent.cpp:
983         (WebCore::InspectorProfilerAgent::getCPUProfile):
984         * inspector/front-end/CPUProfileView.js:
985         (WebInspector.CPUProfileView.prototype._getCPUProfileCallback):
986         (WebInspector.CPUProfileView.prototype._buildIdToNodeMap):
987         * inspector/front-end/FlameChart.js:
988         (WebInspector.FlameChart.prototype._calculateTimelineData):
989
990 2013-03-22  Steve Block  <steveblock@chromium.org>
991
992         Use generated bindings for the Coordinates type used by Geolocation
993         https://bugs.webkit.org/show_bug.cgi?id=112975
994
995         Reviewed by Kentaro Hara.
996
997         No new tests, refactoring only.
998
999         * CMakeLists.txt:
1000         * GNUmakefile.list.am:
1001         * Modules/geolocation/Coordinates.cpp: Renamed from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp.
1002         (WebCore):
1003         (WebCore::Coordinates::altitude):
1004         (WebCore::Coordinates::altitudeAccuracy):
1005         (WebCore::Coordinates::heading):
1006         (WebCore::Coordinates::speed):
1007         * Modules/geolocation/Coordinates.h:
1008         (Coordinates):
1009         * Modules/geolocation/Coordinates.idl:
1010         * Target.pri:
1011         * UseJSC.cmake:
1012         * UseV8.cmake:
1013         * WebCore.gypi:
1014         * WebCore.vcproj/WebCore.vcproj:
1015         * WebCore.vcxproj/WebCore.vcxproj:
1016         * WebCore.vcxproj/WebCore.vcxproj.filters:
1017         * WebCore.xcodeproj/project.pbxproj:
1018         * bindings/js/JSBindingsAllInOne.cpp:
1019         * bindings/v8/custom/V8CoordinatesCustom.cpp: Removed.
1020
1021 2013-03-22  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1022
1023         INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default
1024         https://bugs.webkit.org/show_bug.cgi?id=113005
1025
1026         Reviewed by Kent Tamura.
1027
1028         Use fallback format when datetime format from locale is not complete.
1029
1030         Tests: fast/forms/date-multiple-fields/date-multiple-fields-fallback-format.html
1031                fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format.html
1032                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format.html
1033                fast/forms/month-multiple-fields/month-multiple-fields-fallback-format.html
1034                fast/forms/time-multiple-fields/time-multiple-fields-fallback-format.html
1035                fast/forms/week-multiple-fields/week-multiple-fields-fallback-format.html
1036
1037         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1038         (DateTimeFormatValidator): A helper class that parses datetime format and tests existence of fields.
1039         (WebCore::DateTimeFormatValidator::DateTimeFormatValidator):
1040         (WebCore::DateTimeFormatValidator::visitField):
1041         (WebCore::DateTimeFormatValidator::validateFormat): Parses datetime format and validates by calling BaseMultipleFieldsDateAndTimeInputType::isValidFormat.
1042         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Checks if dateTimeFormat is valid, and uses fallback format if not.
1043         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1044         (BaseMultipleFieldsDateAndTimeInputType): Declare isValidFormat.
1045         * html/DateInputType.cpp:
1046         (WebCore::DateInputType::isValidFormat): Added.
1047         * html/DateInputType.h:
1048         (DateInputType):
1049         * html/DateTimeInputType.cpp:
1050         (WebCore::DateTimeInputType::isValidFormat): Added.
1051         * html/DateTimeInputType.h:
1052         (DateTimeInputType):
1053         * html/DateTimeLocalInputType.cpp:
1054         (WebCore::DateTimeLocalInputType::isValidFormat): Added.
1055         * html/DateTimeLocalInputType.h:
1056         (DateTimeLocalInputType):
1057         * html/MonthInputType.cpp:
1058         (WebCore::MonthInputType::isValidFormat): Added.
1059         * html/MonthInputType.h:
1060         (MonthInputType):
1061         * html/TimeInputType.cpp:
1062         (WebCore::TimeInputType::isValidFormat): Added.
1063         * html/TimeInputType.h:
1064         (TimeInputType):
1065         * html/WeekInputType.cpp:
1066         (WebCore::WeekInputType::isValidFormat): Added.
1067         * html/WeekInputType.h:
1068         (WeekInputType):
1069
1070 2013-03-22  Hajime Morrita  <morrita@google.com>
1071
1072         Custom Elements: "readyCallback" lifecycle callback should be called.
1073         https://bugs.webkit.org/show_bug.cgi?id=112538
1074
1075         Reviewed by Elliott Sprehn.
1076
1077         This change allows each custom element definition to hook up its instantiation,
1078         namely "readyCallback" lifecycle callback.
1079
1080         The change has two parts:
1081         - 1. Tracking which Element objects to be created.
1082         - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
1083           before the Element object is visible from page script.
1084
1085         For 1, CustomElementRegistry maintains list of "callback
1086         invocaions".  Each list item ("invocation") tracks the element
1087         which has a lifecycle callback to be invoked. Each invocation is
1088         registered when - Any custom element C++ object is instantiated.
1089         See changes on CustomElementConstructor.cpp.
1090
1091         This also happens when @is attribute is set by the parser or node
1092         cloning routine, which can turn a non-custom element into a
1093         type-extended custom element. See changes on Element.cpp.
1094
1095         For 2, CustomElementRegistry basically follows what
1096         MutationObserver is doing, and introduces a method called
1097         deliverLifecycleCallbacks(). This function flushes all pending
1098         callback invocations. You can think it as a dual of
1099         MutationObserver::deliverAllMutations().
1100
1101         The delivery function is called places where MutationObserver's
1102         deliverAllMutations() is called. In addition, it is also called
1103         just before returning from a set of DOM APIs. For example, it is
1104         called just before createElement() returns, so that possibly
1105         created custom element becomes ready through its readyCallback().
1106         Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
1107         principle, APIs which can create new custom element instnaces are
1108         marked. See CustomElementRegistry::CallbackDeliveryScope and
1109         changes on CodeGeneratorV8.pm.
1110
1111         We need this extra work because the readyCallback() needs to give
1112         an illusion so that JavaScript programmers feel like the
1113         readyCallback() callback being called just after it is created,
1114         instead of called on arbitrary late timing like MutationObserver
1115         notifications.
1116
1117         Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
1118                fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
1119                fast/dom/custom/lifecycle-ready-creation-api.html
1120                fast/dom/custom/lifecycle-ready-innerHTML.html
1121                fast/dom/custom/lifecycle-ready-parser-only.html
1122                fast/dom/custom/lifecycle-ready-parser-script.html
1123                fast/dom/custom/lifecycle-ready-paste.html
1124
1125         * bindings/scripts/CodeGeneratorV8.pm:
1126         - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
1127         (GenerateCustomElementInvocationScopeIfNeeded):
1128         (GenerateNormalAttrSetter):
1129         (GenerateFunction):
1130         * bindings/scripts/IDLAttributes.txt:
1131         * bindings/v8/CustomElementHelpers.cpp:
1132         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
1133         (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
1134         * bindings/v8/CustomElementHelpers.h:
1135         (CustomElementHelpers):
1136         * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
1137         (WebCore::V8RecursionScope::didLeaveScriptContext):
1138         * dom/CustomElementConstructor.cpp:
1139         (WebCore::CustomElementConstructor::createElement):
1140         (WebCore::CustomElementConstructor::createElementInternal):
1141         * dom/CustomElementConstructor.h:
1142         (WebCore::CustomElementConstructor::isExtended):
1143         (CustomElementConstructor):
1144         * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
1145         (WebCore::CustomElementInvocation::CustomElementInvocation):
1146         (WebCore::CustomElementInvocation::~CustomElementInvocation):
1147         (WebCore::activeCustomElementRegistries):
1148         (WebCore::CustomElementRegistry::~CustomElementRegistry):
1149         (WebCore::CustomElementRegistry::didGiveTypeExtension):
1150         (WebCore::CustomElementRegistry::didCreateElement):
1151         (WebCore::CustomElementRegistry::activate):
1152         (WebCore::CustomElementRegistry::deactivate):
1153         (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
1154         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
1155         * dom/CustomElementRegistry.h:
1156         (CustomElementInvocation):
1157         (WebCore::CustomElementInvocation::element):
1158         (CallbackDeliveryScope):
1159         (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
1160         (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
1161         (CustomElementRegistry):
1162         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
1163         * dom/Document.cpp:
1164         (WebCore::Document::createElement):
1165         (WebCore::Document::didCreateCustomElement):
1166         * dom/Document.h:
1167         (Document):
1168         * dom/Document.idl:
1169         * dom/Element.cpp:
1170         (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
1171         (WebCore::Element::parserSetAttributes):
1172         (WebCore::Element::cloneAttributesFromElement):
1173         * dom/Element.h:
1174         * dom/Node.idl:
1175         * dom/ShadowRoot.idl:
1176         * html/HTMLElement.idl:
1177         * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
1178         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1179         (WebCore::HTMLScriptRunner::runScript):
1180
1181 2013-03-22  Tommy Widenflycht  <tommyw@google.com>
1182
1183         MediaStream API: Finalize the RTCPeerConnection states
1184         https://bugs.webkit.org/show_bug.cgi?id=112792
1185
1186         Reviewed by Adam Barth.
1187
1188         This patch finalized the RTCPeerConnection state and events. These changes
1189         have not yet pushed out to the editors draft; but they are uncontroversial
1190         and agreed upon.
1191
1192         readyState will be deleted; please use the replacement signalingState which is already available.
1193         onstatechange -> onsignalingstatechange
1194         onicechange -> oniceconnectionstatechange
1195         ongatheringchange will be deleted since oniceconnectionstatechange can be used for the same purpose.
1196         RTCIceConnectionState::"starting" -> RTCIceConnectionState::"new"
1197
1198         Patch covered by modified tests.
1199
1200         * Modules/mediastream/RTCPeerConnection.cpp:
1201         (WebCore::RTCPeerConnection::RTCPeerConnection):
1202         (WebCore::RTCPeerConnection::iceConnectionState):
1203         (WebCore::RTCPeerConnection::changeSignalingState):
1204         (WebCore::RTCPeerConnection::changeIceGatheringState):
1205         (WebCore::RTCPeerConnection::changeIceConnectionState):
1206         * Modules/mediastream/RTCPeerConnection.h:
1207         (RTCPeerConnection):
1208         * Modules/mediastream/RTCPeerConnection.idl:
1209         * dom/EventNames.h:
1210         (WebCore):
1211         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
1212
1213 2013-03-22  Mike West  <mkwst@chromium.org>
1214
1215         Prefer 'KURL(ParsedURLString, String)' when dealing with known-good data.
1216         https://bugs.webkit.org/show_bug.cgi?id=112965
1217
1218         Reviewed by Alexey Proskuryakov.
1219
1220         In https://bugs.webkit.org/show_bug.cgi?id=112783#c6, Adam noted that
1221         it would be possible to use 'KURL(ParsedURLString, [url])' rather than
1222         'KURL(KURL(), [url])', since we knew that the URL in question is a
1223         value and absolute URL. This patch fixes the obvious instances of this
1224         pattern; there are several more 'KURL(KURL(), String)' calls in
1225         WebCore but these were the only places I was reasonably sure that bad
1226         data couldn't creep in.
1227
1228         * dom/Document.cpp:
1229         (WebCore::Document::updateBaseURL):
1230             'documentURI' is pulled from 'url()->string()'. It's safe.
1231         * page/ContentSecurityPolicy.cpp:
1232         (WebCore::gatherSecurityPolicyViolationEventData):
1233         (WebCore::ContentSecurityPolicy::reportViolation):
1234             'CallFrame::sourceURL()' is a known valid/absolute URL.
1235         * page/SecurityOrigin.cpp:
1236         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
1237         (WebCore::SecurityOrigin::create):
1238             The strings constructed here are certainly valid.
1239
1240 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
1241
1242         Web Inspector: Flame Chart. move overview window when user scrolls the chart.
1243         https://bugs.webkit.org/show_bug.cgi?id=113014
1244
1245         Reviewed by Yury Semikhatsky.
1246
1247         I found that I could use scaling mechanics in OverviewGrid for scaling the chart.
1248         But the dragging part was not so simple due to the different approaches in
1249         OverviewGrid and FlameChart. OverviewGrid used _windowLeft and _windowRight
1250         when FlameChart used _xOffset and _xScaleFactor and width.
1251         It was not practical and I rewrote the FlameChart mechanics
1252         and now it also uses _windowLeft _windowRight.
1253
1254         * inspector/front-end/FlameChart.js:
1255         (WebInspector.FlameChart):
1256         (WebInspector.FlameChart.Calculator.prototype._updateBoundaries):
1257         (WebInspector.FlameChart.Calculator.prototype.computePosition):
1258         (WebInspector.FlameChart.prototype._onWindowChanged):
1259         (WebInspector.FlameChart.prototype._startCanvasDragging):
1260         (WebInspector.FlameChart.prototype._canvasDragging):
1261         (WebInspector.FlameChart.prototype._onMouseMove):
1262         (WebInspector.FlameChart.prototype._onMouseWheel):
1263         (WebInspector.FlameChart.prototype._coordinatesToNodeIndex):
1264         (WebInspector.FlameChart.prototype._drawOverviewCanvas):
1265         (WebInspector.FlameChart.prototype.draw):
1266         (WebInspector.FlameChart.prototype._updateBoundaries):
1267         (WebInspector.FlameChart.prototype.update):
1268         * inspector/front-end/OverviewGrid.js:
1269         (WebInspector.OverviewGrid.prototype.setWindowPosition):
1270         (WebInspector.OverviewGrid.prototype.setWindow):
1271         (WebInspector.OverviewGrid.prototype.addEventListener):
1272         (WebInspector.OverviewGrid.prototype.zoom):
1273         (WebInspector.OverviewGrid.Window.prototype._zoom):
1274         * inspector/front-end/inspectorCommon.css:
1275         (.overview-grid-window-rulers):
1276
1277 2013-03-22  Steve Block  <steveblock@chromium.org>
1278
1279         Move GeolocationClient.h to Modules/geolocation/
1280         https://bugs.webkit.org/show_bug.cgi?id=112997
1281
1282         Reviewed by Kentaro Hara.
1283
1284         No new tests, no functional change.
1285
1286         * GNUmakefile.list.am:
1287         * Modules/geolocation/GeolocationClient.h: Renamed from Source/WebCore/page/GeolocationClient.h.
1288         (WebCore):
1289         (GeolocationClient):
1290         (WebCore::GeolocationClient::~GeolocationClient):
1291         * WebCore.vcproj/WebCore.vcproj:
1292         * WebCore.vcxproj/WebCore.vcxproj:
1293         * WebCore.vcxproj/WebCore.vcxproj.filters:
1294         * WebCore.xcodeproj/project.pbxproj:
1295
1296 2013-03-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1297
1298         Unreviewed, rolling out r146534 and r146565.
1299         http://trac.webkit.org/changeset/146534
1300         http://trac.webkit.org/changeset/146565
1301         https://bugs.webkit.org/show_bug.cgi?id=113017
1302
1303         "r146534 caused perf regression on Chromium Linux x64"
1304         (Requested by yurys on #webkit).
1305
1306         * bindings/scripts/CodeGeneratorV8.pm:
1307         (GenerateNormalAttrSetter):
1308         (GenerateOverloadedFunction):
1309         (GenerateFunctionCallback):
1310         (GenerateFunction):
1311         (GenerateParametersCheck):
1312         (GenerateSingleConstructorCallback):
1313         (GenerateNonStandardFunction):
1314         (GenerateImplementation):
1315         (GenerateFunctionCallString):
1316         * bindings/scripts/IDLAttributes.txt:
1317         * bindings/scripts/test/V8/V8Float64Array.cpp:
1318         (WebCore):
1319         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1320         (WebCore):
1321         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1322         (WebCore):
1323         * bindings/scripts/test/V8/V8TestInterface.cpp:
1324         (WebCore):
1325         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1326         (WebCore):
1327         * bindings/scripts/test/V8/V8TestObj.cpp:
1328         (WebCore):
1329         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1330         (WebCore):
1331         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
1332         (WebCore):
1333         * bindings/v8/CustomElementHelpers.cpp:
1334         * bindings/v8/CustomElementHelpers.h:
1335         (WebCore):
1336         (CustomElementHelpers):
1337         * bindings/v8/V8DOMConfiguration.cpp:
1338         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
1339         (WebCore::V8DOMConfiguration::configureTemplate):
1340         * bindings/v8/V8DOMConfiguration.h:
1341         (BatchedMethod):
1342         (V8DOMConfiguration):
1343         * bindings/v8/V8RecursionScope.cpp:
1344         (WebCore::V8RecursionScope::didLeaveScriptContext):
1345         * dom/CustomElementConstructor.cpp:
1346         (WebCore::CustomElementConstructor::createElement):
1347         * dom/CustomElementConstructor.h:
1348         (CustomElementConstructor):
1349         * dom/CustomElementRegistry.cpp:
1350         (WebCore::CustomElementRegistry::~CustomElementRegistry):
1351         * dom/CustomElementRegistry.h:
1352         (WebCore):
1353         (CustomElementRegistry):
1354         * dom/Document.cpp:
1355         (WebCore::Document::createElement):
1356         (WebCore::Document::registerElement):
1357         * dom/Document.h:
1358         * dom/Document.idl:
1359         * dom/Element.cpp:
1360         (WebCore::Element::parserSetAttributes):
1361         (WebCore::Element::cloneAttributesFromElement):
1362         * dom/Element.h:
1363         * dom/Element.idl:
1364         * dom/Node.idl:
1365         * dom/ShadowRoot.idl:
1366         * html/HTMLElement.idl:
1367         * html/parser/HTMLScriptRunner.cpp:
1368         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1369         (WebCore::HTMLScriptRunner::runScript):
1370
1371 2013-03-22  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
1372
1373         [GStreamer] Memory leak in AudioFileReader::createBus()
1374         https://bugs.webkit.org/show_bug.cgi?id=112925
1375
1376         Reviewed by Martin Robinson.
1377
1378         Adopt the reference returned by g_timeout_source_new()
1379         to fix a memory leak.
1380
1381         No new tests. No change in behavior.
1382
1383         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1384         (WebCore::AudioFileReader::createBus):
1385
1386 2013-03-22  Steve Block  <steveblock@chromium.org>
1387
1388         Move page/Coordinates.[h|idl] to Modules/geolocation/
1389         https://bugs.webkit.org/show_bug.cgi?id=112945
1390
1391         Reviewed by Kentaro Hara.
1392
1393         No new tests, no functional change.
1394
1395         * CMakeLists.txt:
1396         * DerivedSources.make:
1397         * DerivedSources.pri:
1398         * GNUmakefile.list.am:
1399         * Modules/geolocation/Coordinates.h: Renamed from Source/WebCore/page/Coordinates.h.
1400         (WebCore):
1401         (Coordinates):
1402         (WebCore::Coordinates::create):
1403         (WebCore::Coordinates::isolatedCopy):
1404         (WebCore::Coordinates::latitude):
1405         (WebCore::Coordinates::longitude):
1406         (WebCore::Coordinates::altitude):
1407         (WebCore::Coordinates::accuracy):
1408         (WebCore::Coordinates::altitudeAccuracy):
1409         (WebCore::Coordinates::heading):
1410         (WebCore::Coordinates::speed):
1411         (WebCore::Coordinates::canProvideAltitude):
1412         (WebCore::Coordinates::canProvideAltitudeAccuracy):
1413         (WebCore::Coordinates::canProvideHeading):
1414         (WebCore::Coordinates::canProvideSpeed):
1415         (WebCore::Coordinates::Coordinates):
1416         * Modules/geolocation/Coordinates.idl: Renamed from Source/WebCore/page/Coordinates.idl.
1417         * Target.pri:
1418         * WebCore.gypi:
1419         * WebCore.vcproj/WebCore.vcproj:
1420         * WebCore.vcxproj/WebCore.vcxproj:
1421         * WebCore.vcxproj/WebCore.vcxproj.filters:
1422         * WebCore.xcodeproj/project.pbxproj:
1423
1424 2013-03-21  Hajime Morrita  <morrita@google.com>
1425
1426         Custom Elements: "readyCallback" lifecycle callback should be called.
1427         https://bugs.webkit.org/show_bug.cgi?id=112538
1428
1429         Reviewed by Elliott Sprehn.
1430
1431         This change allows each custom element definition to hook up its instantiation,
1432         namely "readyCallback" lifecycle callback.
1433
1434         The change has two parts:
1435         - 1. Tracking which Element objects to be created.
1436         - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
1437           before the Element object is visible from page script.
1438
1439         For 1, CustomElementRegistry maintains list of "callback
1440         invocaions".  Each list item ("invocation") tracks the element
1441         which has a lifecycle callback to be invoked. Each invocation is
1442         registered when - Any custom element C++ object is instantiated.
1443         See changes on CustomElementConstructor.cpp.
1444
1445         This also happens when @is attribute is set by the parser or node
1446         cloning routine, which can turn a non-custom element into a
1447         type-extended custom element. See changes on Element.cpp.
1448
1449         For 2, CustomElementRegistry basically follows what
1450         MutationObserver is doing, and introduces a method called
1451         deliverLifecycleCallbacks(). This function flushes all pending
1452         callback invocations. You can think it as a dual of
1453         MutationObserver::deliverAllMutations().
1454
1455         The delivery function is called places where MutationObserver's
1456         deliverAllMutations() is called. In addition, it is also called
1457         just before returning from a set of DOM APIs. For example, it is
1458         called just before createElement() returns, so that possibly
1459         created custom element becomes ready through its readyCallback().
1460         Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
1461         principle, APIs which can create new custom element instnaces are
1462         marked. See CustomElementRegistry::CallbackDeliveryScope and
1463         changes on CodeGeneratorV8.pm.
1464
1465         We need this extra work because the readyCallback() needs to give
1466         an illusion so that JavaScript programmers feel like the
1467         readyCallback() callback being called just after it is created,
1468         instead of called on arbitrary late timing like MutationObserver
1469         notifications.
1470
1471         Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
1472                fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
1473                fast/dom/custom/lifecycle-ready-creation-api.html
1474                fast/dom/custom/lifecycle-ready-innerHTML.html
1475                fast/dom/custom/lifecycle-ready-parser-only.html
1476                fast/dom/custom/lifecycle-ready-parser-script.html
1477                fast/dom/custom/lifecycle-ready-paste.html
1478
1479         * bindings/scripts/CodeGeneratorV8.pm:
1480         - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
1481         (GenerateCustomElementInvocationScopeIfNeeded):
1482         (GenerateNormalAttrSetter):
1483         (GenerateFunction):
1484         * bindings/scripts/IDLAttributes.txt:
1485         * bindings/v8/CustomElementHelpers.cpp:
1486         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
1487         (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
1488         * bindings/v8/CustomElementHelpers.h:
1489         (CustomElementHelpers):
1490         * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
1491         (WebCore::V8RecursionScope::didLeaveScriptContext):
1492         * dom/CustomElementConstructor.cpp:
1493         (WebCore::CustomElementConstructor::createElement):
1494         (WebCore::CustomElementConstructor::createElementInternal):
1495         * dom/CustomElementConstructor.h:
1496         (WebCore::CustomElementConstructor::isExtended):
1497         (CustomElementConstructor):
1498         * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
1499         (WebCore::CustomElementInvocation::CustomElementInvocation):
1500         (WebCore::CustomElementInvocation::~CustomElementInvocation):
1501         (WebCore::activeCustomElementRegistries):
1502         (WebCore::CustomElementRegistry::~CustomElementRegistry):
1503         (WebCore::CustomElementRegistry::didGiveTypeExtension):
1504         (WebCore::CustomElementRegistry::didCreateElement):
1505         (WebCore::CustomElementRegistry::activate):
1506         (WebCore::CustomElementRegistry::deactivate):
1507         (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
1508         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
1509         * dom/CustomElementRegistry.h:
1510         (CustomElementInvocation):
1511         (WebCore::CustomElementInvocation::element):
1512         (CallbackDeliveryScope):
1513         (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
1514         (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
1515         (CustomElementRegistry):
1516         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
1517         * dom/Document.cpp:
1518         (WebCore::Document::createElement):
1519         (WebCore::Document::didCreateCustomElement):
1520         * dom/Document.h:
1521         (Document):
1522         * dom/Document.idl:
1523         * dom/Element.cpp:
1524         (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
1525         (WebCore::Element::parserSetAttributes):
1526         (WebCore::Element::cloneAttributesFromElement):
1527         * dom/Element.h:
1528         * dom/Node.idl:
1529         * dom/ShadowRoot.idl:
1530         * html/HTMLElement.idl:
1531         * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
1532         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1533         (WebCore::HTMLScriptRunner::runScript):
1534
1535 2013-03-21  Jer Noble  <jer.noble@apple.com>
1536
1537         Crash in WebCore::MediaPlayer::cachedResourceLoader + 4
1538         https://bugs.webkit.org/show_bug.cgi?id=112977
1539
1540         Reviewed by Geoffrey Garen.
1541
1542         Speculative fix for a NULL-dereference crash. MediaPlayerPrivateAVFoundationObjC is the
1543         sole owner of a WebCoreAVFLoaderDelegate instance. It releases this instance in its destructor,
1544         but it is possible that, on another thread, the AVAssetResourceLoader has already begun
1545         using the delegate and in so doing has retained it. By the time the delegate method is fired
1546         on the main thread, the MediaPlayerPrivateAVFoundationObjC owner of the delegate has already
1547         been deleted, and the delegate's m_callback pointer is now pointing at freed memory.
1548
1549         In addition to calling -[AVAssetResourceLoader setDelegate:queue:] to avoid any not-yet-started
1550         delegate callbacks, MediaPlayerPrivateAVFoundationObjC should clear the WebCoreAVFLoaderDelegate
1551         m_callback ivar, to avoid calling into freed memory for already queued delegate callbacks.
1552
1553         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1554         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the m_loaderDelegate's callback pointer.
1555         (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): Check the value of m_callback before continuing.
1556         (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]): Ditto.
1557         (-[WebCoreAVFLoaderDelegate setCallback:]): Added simple setter.
1558
1559 2013-03-21  Takashi Sakamoto  <tasak@google.com>
1560
1561         XMLDocumentParser doesn't parse <template> correctly.
1562         https://bugs.webkit.org/show_bug.cgi?id=112328
1563
1564         Reviewed by Hajime Morrita.
1565
1566         XMLDocumentParser should check whether a parent node is attached or not
1567         when a new element is appended.
1568
1569         Test: fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash.xhtml
1570
1571         * xml/parser/XMLDocumentParserLibxml2.cpp:
1572         (WebCore::XMLDocumentParser::startElementNs):
1573         m_currentNode is a parent node of newElement, but it is updated by
1574         pushCurrentNode. So firstly stored copied m_curretNode's value into
1575         local currentNode and used the currentNode to check whether
1576         newElement's parent is attached or not.
1577
1578 2013-03-21  David Grogan  <dgrogan@chromium.org>
1579
1580         Unreviewed, rolling out r146560.
1581         http://trac.webkit.org/changeset/146560
1582         https://bugs.webkit.org/show_bug.cgi?id=112862
1583
1584         invalid parameter to histogram
1585
1586         * platform/leveldb/LevelDBDatabase.cpp:
1587         (WebCore::LevelDBDatabase::open):
1588
1589 2013-03-21  David Grogan  <dgrogan@chromium.org>
1590
1591         IndexedDB: Histogram available disk space on attempt to open database
1592         https://bugs.webkit.org/show_bug.cgi?id=112862
1593
1594         Reviewed by Adam Barth.
1595
1596         ChromeOS suspects they might be hitting disk corruption when the disks
1597         are nearly full. This patch logs the available space to either the
1598         "success" or the "fail" histogram as appropriate so that the
1599         distributions can be compared.
1600
1601         No new tests - I don't know of a good way to test histograms. Local
1602         printf testing didn't turn up any bugs.
1603
1604         * platform/leveldb/LevelDBDatabase.cpp:
1605         (WebCore::HistogramFreeSpace):
1606         (WebCore):
1607         (WebCore::LevelDBDatabase::open):
1608
1609 2013-03-21  Li Yin  <li.yin@intel.com>
1610
1611         FileAPI: Remove deprecation warning when ArrayBuffer is in Blob constructor.
1612         https://bugs.webkit.org/show_bug.cgi?id=88389
1613
1614         Reviewed by Kenneth Russell.
1615
1616         Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
1617         Both ArrayBuffer and ArrayBufferView should be supported for Blob constructor.
1618
1619         Test: fast/files/blob-constructor.html.
1620
1621         * bindings/js/JSBlobCustom.cpp:
1622         (WebCore::JSBlobConstructor::constructJSBlob):
1623         * bindings/v8/custom/V8BlobCustom.cpp:
1624         (WebCore::V8Blob::constructorCustom):
1625         * fileapi/WebKitBlobBuilder.cpp:
1626         (WebCore::BlobBuilder::append): Remove the deprecated warning.
1627         * fileapi/WebKitBlobBuilder.h:
1628         (WebCore):
1629         (BlobBuilder):
1630
1631 2013-03-21  Takashi Sakamoto  <tasak@google.com>
1632
1633         [Shadow]: @host styles are not applied dynamically
1634         https://bugs.webkit.org/show_bug.cgi?id=112869
1635
1636         Reviewed by Elliott Sprehn.
1637
1638         Need to add features of @host @-rules to rule feature set.
1639
1640         Test: fast/dom/shadow/athost-apply-dynamically.html
1641
1642         * css/StyleScopeResolver.cpp:
1643         (WebCore::StyleScopeResolver::collectFeaturesTo):
1644
1645 2013-03-21  Hayato Ito  <hayato@chromium.org>
1646
1647         [Shadow] Provide an api of insertionParent().
1648         https://bugs.webkit.org/show_bug.cgi?id=112866
1649
1650         Add insertinParent binding to Element and Text.
1651         It's prefixed (webkitInsertionParent) and guarded by SHADOW_DOM flag.
1652
1653         The bug in the Shadow DOM spec is here:
1654         https://www.w3.org/Bugs/Public/show_bug.cgi?id=21067
1655
1656         Reviewed by Dimitri Glazkov.
1657
1658         Test: fast/dom/shadow/insertion-parent.html
1659
1660         * dom/Element.idl:
1661         * dom/Node.cpp:
1662         (WebCore::Node::insertionParentForBinding):
1663         (WebCore):
1664         * dom/Node.h:
1665         (Node):
1666         * dom/Text.idl:
1667
1668 2013-03-21  Tom Sepez  <tsepez@chromium.org>
1669
1670         Bypass XSSAuditor for asp.net servers.
1671         https://bugs.webkit.org/show_bug.cgi?id=112235
1672
1673         Reviewed by Adam Barth.
1674
1675         Similar to https://bugs.webkit.org/show_bug.cgi?id=81283, but the 
1676         fix to that bug failed to cover this particular comma-splicing case.
1677         
1678         Test: http/tests/security/xssAuditor/img-tag-with-comma.html
1679
1680         * html/parser/XSSAuditor.cpp:
1681         (WebCore::isTerminatingCharacter):
1682         Beware of comma-splicing tricks by stopping at commas.
1683
1684 2013-03-21  Brady Eidson  <beidson@apple.com>
1685
1686         If a previously loaded resource is later stored to the disk cache, replace the buffer with MMAP'ed memory.
1687         <rdar://problem/13414154> and https://bugs.webkit.org/show_bug.cgi?id=112943
1688
1689         Reviewed by Geoff Garen.
1690
1691         No new tests (No change in behavior.)
1692
1693         Give SharedBuffer the ability to replace its contents from another SharedBuffer:
1694         * platform/SharedBuffer.h:
1695         * platform/cf/SharedBufferCF.cpp:
1696         (WebCore::SharedBuffer:: tryReplaceContentsWithPlatformBuffer):
1697
1698         Forward along SharedBuffer's new ability to ResourceBuffer:
1699         * loader/mac/ResourceBuffer.mm:
1700         (WebCore::ResourceBuffer:: tryReplaceSharedBufferContents):
1701         * loader/ResourceBuffer.h:
1702
1703         Give CachedResource the ability to replace its encoded data buffer if appropriate:
1704         * loader/cache/CachedResource.cpp:
1705         (WebCore::CachedResource:: tryReplaceEncodedData):
1706         * loader/cache/CachedResource.h:
1707
1708         * WebCore.exp.in:
1709
1710 2013-03-21  Joshua Bell  <jsbell@chromium.org>
1711
1712         IndexedDB: Ensure script wrappers can be collected after context is stopped
1713         https://bugs.webkit.org/show_bug.cgi?id=112976
1714
1715         Reviewed by Adam Barth.
1716
1717         ActiveDOMObject::hasPendingActivity is called to see if script wrappers
1718         can be disposed of. Once the script execution context has stopped they
1719         should be free to go - include this in the checks.
1720
1721         No new tests - suggestions welcome.
1722
1723         * Modules/indexeddb/IDBDatabase.cpp:
1724         (WebCore::IDBDatabase::hasPendingActivity): Return false if stopped.
1725         (WebCore::IDBDatabase::stop): Don't bother calling empty super impl.
1726         * Modules/indexeddb/IDBRequest.cpp:
1727         (WebCore::IDBRequest::hasPendingActivity): Return false if stopped.
1728         (WebCore::IDBRequest::stop): Don't bother calling empty super impl.
1729         * Modules/indexeddb/IDBTransaction.cpp:
1730         (WebCore::IDBTransaction::hasPendingActivity): Return false if stopped.
1731         (WebCore::IDBTransaction::stop): Don't bother calling empty super impl.
1732
1733 2013-03-21  Russell McClellan  <russell.mcclellan@gmail.com>
1734
1735         Remove upcastPointer from ActiveDOMObject constructor
1736         https://bugs.webkit.org/show_bug.cgi?id=112858
1737
1738         Reviewed by Alexey Proskuryakov.
1739
1740         Removed pesky argument to ActiveDOMObject constructor that is no longer
1741         used.
1742
1743         No new tests (no change in behavior).
1744
1745         * Modules/battery/BatteryManager.cpp:
1746         (WebCore::BatteryManager::BatteryManager):
1747         * Modules/filesystem/DOMFileSystem.cpp:
1748         (WebCore::DOMFileSystem::DOMFileSystem):
1749         * Modules/filesystem/FileWriter.cpp:
1750         (WebCore::FileWriter::FileWriter):
1751         * Modules/geolocation/Geolocation.cpp:
1752         (WebCore::Geolocation::Geolocation):
1753         * Modules/indexeddb/IDBDatabase.cpp:
1754         (WebCore::IDBDatabase::IDBDatabase):
1755         * Modules/indexeddb/IDBRequest.cpp:
1756         (WebCore::IDBRequest::IDBRequest):
1757         * Modules/indexeddb/IDBTransaction.cpp:
1758         (WebCore::IDBTransaction::IDBTransaction):
1759         * Modules/mediasource/MediaSource.cpp:
1760         (WebCore::MediaSource::MediaSource):
1761         * Modules/mediastream/MediaStreamTrack.cpp:
1762         (WebCore::MediaStreamTrack::MediaStreamTrack):
1763         * Modules/mediastream/RTCDTMFSender.cpp:
1764         (WebCore::RTCDTMFSender::RTCDTMFSender):
1765         * Modules/mediastream/RTCPeerConnection.cpp:
1766         (WebCore::RTCPeerConnection::RTCPeerConnection):
1767         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
1768         (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
1769         * Modules/mediastream/RTCStatsRequestImpl.cpp:
1770         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
1771         * Modules/mediastream/RTCVoidRequestImpl.cpp:
1772         (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
1773         * Modules/networkinfo/NetworkInfoConnection.cpp:
1774         (WebCore::NetworkInfoConnection::NetworkInfoConnection):
1775         * Modules/notifications/Notification.cpp:
1776         (WebCore::Notification::Notification):
1777         * Modules/notifications/NotificationCenter.cpp:
1778         (WebCore::NotificationCenter::NotificationCenter):
1779         * Modules/speech/SpeechRecognition.cpp:
1780         (WebCore::SpeechRecognition::SpeechRecognition):
1781         * Modules/webaudio/AudioContext.cpp:
1782         (WebCore::AudioContext::AudioContext):
1783         * Modules/webdatabase/DatabaseContext.cpp:
1784         (WebCore::DatabaseContext::DatabaseContext):
1785         * Modules/websockets/WebSocket.cpp:
1786         (WebCore::WebSocket::WebSocket):
1787         * css/FontLoader.cpp:
1788         (WebCore::FontLoader::FontLoader):
1789         * dom/ActiveDOMObject.cpp:
1790         (WebCore::ActiveDOMObject::ActiveDOMObject):
1791         * dom/ActiveDOMObject.h:
1792         (ActiveDOMObject):
1793         * dom/ScriptExecutionContext.cpp:
1794         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
1795         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
1796         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
1797         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
1798         (WebCore::ScriptExecutionContext::didCreateActiveDOMObject):
1799         * dom/ScriptExecutionContext.h:
1800         (ScriptExecutionContext):
1801         (WebCore::ScriptExecutionContext::activeDOMObjects):
1802         * fileapi/FileReader.cpp:
1803         (WebCore::FileReader::FileReader):
1804         * html/HTMLMarqueeElement.cpp:
1805         (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
1806         * html/HTMLMediaElement.cpp:
1807         (WebCore::HTMLMediaElement::HTMLMediaElement):
1808         * html/canvas/WebGLRenderingContext.cpp:
1809         (WebCore):
1810         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
1811         * loader/Prerenderer.cpp:
1812         (WebCore::Prerenderer::Prerenderer):
1813         * page/EventSource.cpp:
1814         (WebCore::EventSource::EventSource):
1815         * page/SuspendableTimer.cpp:
1816         (WebCore::SuspendableTimer::SuspendableTimer):
1817         * workers/AbstractWorker.cpp:
1818         (WebCore::AbstractWorker::AbstractWorker):
1819         * workers/WorkerContext.cpp:
1820         (WebCore::WorkerContext::hasPendingActivity):
1821         * xml/XMLHttpRequest.cpp:
1822         (WebCore::XMLHttpRequest::XMLHttpRequest):
1823
1824 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
1825
1826         [Mac] Move NSOperationQueue out of NetworkingContext
1827         https://bugs.webkit.org/show_bug.cgi?id=112970
1828
1829         Reviewed by Brady Eidson.
1830
1831         WebCore clients do not need explicit control over what queue ResourceHandle works on,
1832         they just want to avoid blocking main thread.
1833
1834         * platform/network/ResourceHandleClient.h:
1835         (WebCore::ResourceHandleClient::usesAsyncCallbacks): Added. The name doesn't quite
1836         match what ResourceHandleMac currently does, but it will very soon.
1837
1838         * platform/network/NetworkingContext.h:
1839         (WebCore::NetworkingContext::scheduledRunLoopPairs):
1840         * platform/network/mac/ResourceHandleMac.mm:
1841         (WebCore::operationQueueForAsyncClients):
1842         (WebCore::ResourceHandle::start):
1843
1844 2013-03-21  Marja Hölttä  <marja@chromium.org>
1845
1846         [V8] Generate specialized callbacks for the main world
1847         https://bugs.webkit.org/show_bug.cgi?id=112430
1848
1849         Reviewed by Jochen Eisinger.
1850
1851         The new specialized bindings will be faster, because they don't need to
1852         do the "main world, isolated world or a worker" check, but can right
1853         away assume that we're in the main world.
1854
1855         This patch generates main world bindings for getters and setters of Node,
1856         Element and Document.
1857
1858         No new tests (updated existing binding tests).
1859
1860         * bindings/scripts/CodeGeneratorV8.pm:
1861         (GenerateOverloadedFunction):
1862         (GenerateFunctionCallback):
1863         (GenerateFunction):
1864         (GenerateParametersCheck):
1865         (GenerateSingleConstructorCallback):
1866         (GenerateNonStandardFunction):
1867         (GenerateImplementation):
1868         (GenerateFunctionCallString):
1869         * bindings/scripts/test/V8/V8Float64Array.cpp:
1870         (WebCore):
1871         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1872         (WebCore):
1873         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1874         (WebCore):
1875         * bindings/scripts/test/V8/V8TestInterface.cpp:
1876         (WebCore):
1877         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1878         (WebCore):
1879         * bindings/scripts/test/V8/V8TestObj.cpp:
1880         (WebCore):
1881         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1882         (WebCore):
1883         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
1884         (WebCore):
1885         * bindings/v8/V8DOMConfiguration.cpp:
1886         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
1887         (WebCore::V8DOMConfiguration::configureTemplate):
1888         * bindings/v8/V8DOMConfiguration.h:
1889         (BatchedMethod):
1890         (V8DOMConfiguration):
1891         * dom/Document.idl:
1892         * dom/Element.idl:
1893         * dom/Node.idl:
1894
1895 2013-03-21  Elliott Sprehn  <esprehn@chromium.org>
1896
1897         Remove RenderObject::canHaveRegionStyle since nothing uses it
1898         https://bugs.webkit.org/show_bug.cgi?id=112973
1899
1900         Reviewed by Eric Seidel.
1901
1902         Nothing uses canHaveRegionStyle so we can remove it.
1903
1904         * rendering/RenderObject.h:
1905
1906 2013-03-21  Alok Priyadarshi  <alokp@chromium.org>
1907
1908         Mark GraphicsLayers as opaque when possible
1909         https://bugs.webkit.org/show_bug.cgi?id=70634
1910
1911         Reviewed by Simon Fraser.
1912
1913         Mark layers as opaque in a very simple case - any child renderer has an opaque background and covers the entire composited bounds. It is important to note that since we only consider the background, the only layer that can be marked opaque is the primary GraphicsLayer of a RenderLayer.
1914
1915         Tests: compositing/contents-opaque/background-clip.html
1916                compositing/contents-opaque/background-color.html
1917                compositing/contents-opaque/body-background-painted.html
1918                compositing/contents-opaque/body-background-skipped.html
1919                compositing/contents-opaque/layer-opacity.html
1920                compositing/contents-opaque/layer-transform.html
1921
1922         * rendering/RenderBox.cpp:
1923         (WebCore::skipBodyBackground):
1924         (WebCore):
1925         (WebCore::RenderBox::paintBackground):
1926         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
1927         * rendering/RenderBox.h:
1928         (RenderBox):
1929         * rendering/RenderLayer.cpp:
1930         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
1931         (WebCore):
1932         (WebCore::RenderLayer::listBackgroundIsKnownToBeOpaqueInRect):
1933         * rendering/RenderLayer.h:
1934         (RenderLayer):
1935         * rendering/RenderLayerBacking.cpp:
1936         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1937         * rendering/RenderLayerModelObject.h:
1938         (RenderLayerModelObject):
1939         (WebCore::RenderLayerModelObject::backgroundIsKnownToBeOpaqueInRect):
1940
1941 2013-03-21  Alexandru Chiculita  <achicu@adobe.com>
1942
1943         [CSS Shaders] Implement a StyleCustomFilterProgram cache
1944         https://bugs.webkit.org/show_bug.cgi?id=112602
1945
1946         Reviewed by Dean Jackson.
1947
1948         When the style is recalculated, the new computed RenderStyle is saved as the m_style of the
1949         RenderObject, even if the style was not different.
1950
1951         In the case of Custom Filters, a new StyleCustomFilterProgram was created at all times, but the
1952         actual equality check was done by comparing the pair of cached shaders from inside the StyleCustomFilterProgram.
1953
1954         Because of that the RenderLayer::styleChanged was not called when the new StyleCustomFilterProgram was created, so it
1955         will end up still knowing only about the previous StyleCustomFilterProgram.
1956
1957         The RenderLayer sets itself as a client of the StyleCustomFilterProgram, so that it can repaint itself
1958         when the program is loaded, but because RenderLayer::styleChanged is not called, it will not add itself as a client of the new
1959         StyleCustomFilterProgram.
1960
1961         StyleCustomFilterProgram waits until the first client to load the programs, so in this case it will just remain unloaded.
1962
1963         There was no crash, but just an assert in debug mode. Also, as a visible side-effect some frames were rendered using blank shaders, 
1964         resulting in a pass-through filter.
1965
1966         The fix would be to actually make the RenderStyle::diff detect the change of the StyleCustomFilterProgram
1967         using the pointer value and not the values. However, that will always invalidate the "filter" property because
1968         of the StyleCustomFilterProgram that always gets created during the recalculation time.
1969
1970         I've added StyleCustomFilterProgramCache to cache all the instances of the StyleCustomFilterPrograms that a
1971         StyleResolver allocates. This way, next time it will try to reuse previously allocated StyleCustomFilterPrograms. 
1972         The key of the cache is the CustomFilterProgramInfo, that combines the URLs to the shaders and a couple of other program settings.
1973
1974         StyleCustomFilterProgramCache is owned by the StyleResovler and StyleCustomFilterPrograms are responsible with
1975         removing themselves from the cache when the last reference goes away.
1976
1977         This change makes the previous "platform level" program cache obsolete and I will remove that in a future patch.
1978         https://bugs.webkit.org/show_bug.cgi?id=112844
1979
1980         Test: css3/filters/custom/custom-filter-reload.html
1981
1982         * GNUmakefile.list.am:
1983         * Target.pri:
1984         * WebCore.gypi:
1985         * WebCore.vcproj/WebCore.vcproj:
1986         * WebCore.xcodeproj/project.pbxproj:
1987         * css/StyleResolver.cpp:
1988         (WebCore::StyleResolver::lookupCustomFilterProgram): Lookup any similar programs in the cache. It will create a new pending 
1989         StyleCustomFilterProgram if there is no pre-cached version of the program.
1990         if no program is found. loadPendingShaders is responsible for adding the program in the cache if it is actually going to be used.
1991         (WebCore::StyleResolver::loadPendingShaders): At this point the program is final, so it's safe to add it to the cache.
1992         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
1993         * css/StyleResolver.h:
1994         (StyleResolver):
1995         * css/WebKitCSSShaderValue.cpp:
1996         (WebCore::WebKitCSSShaderValue::completeURL): Factored out the function to compute the complete URL of the resource.
1997         (WebCore::WebKitCSSShaderValue::cachedShader):
1998         * css/WebKitCSSShaderValue.h:
1999         (WebCore::toWebKitCSSShaderValue):
2000         (WebKitCSSShaderValue):
2001         * platform/graphics/filters/CustomFilterOperation.cpp:
2002         (WebCore::CustomFilterOperation::blend):
2003         * platform/graphics/filters/CustomFilterOperation.h:
2004         (WebCore::CustomFilterOperation::operator==): Removed. Programs should now compare by pointer. Kept it as
2005         private to catch any potential use of it.
2006         * rendering/style/StyleCustomFilterProgram.cpp: Copied from Source/WebCore/css/WebKitCSSShaderValue.h.
2007         (WebCore::StyleCustomFilterProgram::~StyleCustomFilterProgram): Destructor removes the program from the cache.
2008         * rendering/style/StyleCustomFilterProgram.h:
2009         (WebCore::StyleCustomFilterProgram::setVertexShader): Added an assert to check that the shader is not in the
2010         cache while the mutation happens. Otherwise the cache might have the wrong key.
2011         (WebCore::StyleCustomFilterProgram::setFragmentShader): Ditto.
2012         (WebCore::StyleCustomFilterProgram::isLoaded): Added more asserts to catch cases when the program is used with no clients.
2013         (StyleCustomFilterProgram):
2014         (WebCore::StyleCustomFilterProgram::hasPendingShaders):
2015         (WebCore::StyleCustomFilterProgram::inCache):
2016         (WebCore::StyleCustomFilterProgram::setCache): Function called when a program is added to / removed from the cache.
2017         (WebCore::StyleCustomFilterProgram::vertexShaderURL): Added methods to store the KURL that we used as keys in the cache.
2018         The same KURLs will be used to lookup and remove the filter at the end.
2019         (WebCore::StyleCustomFilterProgram::setVertexShaderURL):
2020         (WebCore::StyleCustomFilterProgram::fragmentShaderURL):
2021         (WebCore::StyleCustomFilterProgram::setFragmentShaderURL):
2022         (WebCore::StyleCustomFilterProgram::StyleCustomFilterProgram):
2023         * rendering/style/StyleCustomFilterProgramCache.cpp: Added.
2024         (WebCore::StyleCustomFilterProgramCache::programCacheKey):
2025         (WebCore::StyleCustomFilterProgramCache::StyleCustomFilterProgramCache):
2026         (WebCore::StyleCustomFilterProgramCache::~StyleCustomFilterProgramCache): Destructor removes itself from all the
2027         referenced StyleCustomFilterPrograms. This is to avoid issues with different destruction orders.
2028         (WebCore::StyleCustomFilterProgramCache::lookup):
2029         (WebCore::StyleCustomFilterProgramCache::add):
2030         (WebCore::StyleCustomFilterProgramCache::remove):
2031         * rendering/style/StyleCustomFilterProgramCache.h:
2032         (StyleCustomFilterProgramCache):
2033         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h:
2034         (WebCore::CoordinatedCustomFilterProgram::operator==: Removed. Programs should now compare by pointer.
2035
2036 2013-03-21  Joshua Bell  <jsbell@chromium.org>
2037
2038         IndexedDB: Ensure all API methods have IDB_TRACE macros
2039         https://bugs.webkit.org/show_bug.cgi?id=112963
2040
2041         Reviewed by Tony Chang.
2042
2043         Anntotate methods and callbacks that weren't already annotated
2044         with IDB_TRACE macros to assist in debugging, e.g. when using
2045         the chromium port's chrome://tracing visualization.
2046
2047         No new tests - just harmless diagnostic sprinkles.
2048
2049         * Modules/indexeddb/IDBDatabase.cpp:
2050         (WebCore::IDBDatabase::createObjectStore): Added IDB_TRACE macro call here.
2051         (WebCore::IDBDatabase::deleteObjectStore): ...and here.
2052         (WebCore::IDBDatabase::transaction): ...etc.
2053         (WebCore::IDBDatabase::close):
2054         (WebCore::IDBDatabase::onVersionChange):
2055         * Modules/indexeddb/IDBFactory.cpp:
2056         (WebCore::IDBFactory::getDatabaseNames):
2057         (WebCore::IDBFactory::open):
2058         (WebCore::IDBFactory::deleteDatabase):
2059         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2060         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
2061         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
2062         (WebCore::IDBFactoryBackendImpl::open):
2063         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2064         (WebCore::IDBOpenDBRequest::onBlocked):
2065
2066 2013-03-21  Christian Biesinger  <cbiesinger@chromium.org>
2067
2068         http://trac.webkit.org/changeset/146375 causing CrOS crashes
2069         https://bugs.webkit.org/show_bug.cgi?id=112958
2070
2071         Reviewed by Adam Barth.
2072
2073         Test: fast/flexbox/crash-anonymous-box.html
2074
2075         * rendering/RenderDeprecatedFlexibleBox.cpp:
2076         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
2077         Anonymous renderers don't have a node in their constructor, so
2078         don't get document() in there.
2079
2080 2013-03-21  Mike West  <mkwst@chromium.org>
2081
2082         CSP 1.1: Fire a SecurityPolicyViolationEvent when violations occur.
2083         https://bugs.webkit.org/show_bug.cgi?id=112783
2084
2085         Reviewed by Adam Barth.
2086
2087         A new event type for Content Security Policy violations landed in
2088         http://wkrev.com/146305; this patch takes that stub, and wires it up to
2089         ContentSecurityPolicy::reportViolation such that violation events fire
2090         when resources are blocked.
2091
2092         This should bring WebKit up to date with the current description of
2093         CSP's event model in sections 3.3[1] and 3.4.1.3[2] of the editor's
2094         draft.
2095
2096         [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#processing-model
2097         [2]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#firing-events-using-the-securitypolicyviolationevent-interface
2098
2099         Test: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image.html
2100
2101         * page/ContentSecurityPolicy.cpp:
2102         (WebCore::gatherSecurityPolicyViolationEventData):
2103             Populate a SecurityPolicyViolationEventInit object with the various
2104             bits of data that should be passed into the event constructor.
2105
2106             This static method is strictly an implementation detail; it's not
2107             part of ContentSecurityPolicy's public API.
2108         (WebCore::ContentSecurityPolicy::reportViolation):
2109             Regardless of whether the policy has set a 'report-uri' directive
2110             or not, gather together all the data we'll need to fire an event,
2111             create the event, and queue it up for dispatching on the Document.
2112
2113 2013-03-21  Terry Anderson  <tdanderson@chromium.org>
2114
2115         [chromium] Remove SK_SUPPORT_HINTING_SCALE_FACTOR flag and code
2116         https://bugs.webkit.org/show_bug.cgi?id=112928
2117
2118         Reviewed by Stephen White.
2119
2120         This flag was only for ChromeOS builds with HighDPI. It is no longer needed and can be removed. 
2121         See http://crbug.com/17550
2122
2123         No new tests needed since this is just removing unused code.
2124
2125         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
2126         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
2127         * platform/graphics/skia/PlatformContextSkia.cpp:
2128         (WebCore::PlatformContextSkia::PlatformContextSkia):
2129         (WebCore::PlatformContextSkia::setupPaintCommon):
2130         * platform/graphics/skia/PlatformContextSkia.h:
2131
2132 2013-03-21  Mike West  <mkwst@chromium.org>
2133
2134         Drop full URLs from cross-origin access errors caused by protocol mismatches.
2135         https://bugs.webkit.org/show_bug.cgi?id=112894
2136
2137         Reviewed by Timothy Hatcher.
2138
2139         Following up on http://wkbug.com/112813, this patch brings protocol
2140         mismatch errors into line with the new origin-only hotness. The message
2141         is also changed to display the URL's protocol rather than the origin's
2142         protocol: it makes a big difference for 'data:' URLs, for instance.
2143
2144         * page/DOMWindow.cpp:
2145         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
2146
2147 2013-03-21  Stephen Chenney  <schenney@chromium.org>
2148
2149         SVG text path referencing parent text infinite loops
2150         https://bugs.webkit.org/show_bug.cgi?id=112078
2151
2152         Reviewed by Philip Rogers.
2153
2154         We do not check the target type when adding a resource reference for
2155         SVG Text Path's URI. This goes horribly wrong when the target is the
2156         text path's parent text element. In this patch we check that the target
2157         element of the text path is indeed a path element, as the spec
2158         requires. No other element type is allowed.
2159
2160         Note that RenderSVGTextPath enforces this check in the renderer code
2161         also, so if we get past this check via pending resources, it doesn't
2162         matter. You can't get into this situation with a pending reference
2163         because, by definition, the parent must be defined before the text
2164         path child.
2165
2166         Test: svg/text/textpath-referencing-text-crash.svg
2167
2168         * svg/SVGTextPathElement.cpp:
2169         (WebCore::SVGTextPathElement::buildPendingResource):
2170
2171 2013-03-21  Joshua Bell  <jsbell@chromium.org>
2172
2173         IndexedDB: Remove onVersionChange(string) plumbing
2174         https://bugs.webkit.org/show_bug.cgi?id=112712
2175
2176         Reviewed by Adam Barth.
2177
2178         Delete unused onVersionChange(string) overload.
2179
2180         No new tests - just deleting dead code.
2181
2182         * Modules/indexeddb/IDBDatabase.cpp: Delete onVersionChange(string) overload.
2183         * Modules/indexeddb/IDBDatabase.h: Ditto.
2184         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Ditto.
2185         * Modules/indexeddb/IDBDatabaseCallbacks.h: Ditto.
2186         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp: Ditto.
2187         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h: Ditto.
2188
2189 2013-03-21  Philip Rogers  <pdr@google.com>
2190
2191         Correct bisector angle calculation for markers
2192         https://bugs.webkit.org/show_bug.cgi?id=112054
2193
2194         Reviewed by Stephen Chenney.
2195
2196         The SVG marker spec states that mid markers with orient=auto should be aligned with their
2197         x-axis along the bisector of the incoming (in) and outgoing (out) angles. Previously we
2198         calculated this bisector angle as:
2199             bisector = (in + out) / 2;
2200         Angles cannot be averaged this way! Consider in=90deg and out=-180deg: the bisector should
2201         be 135deg but a naive average gives -45deg. This patch corrects for the discontinuity in
2202         angle values with:
2203             bisector = (in + out + 360) / 2   // if |in - out| > 180
2204             bisector = (in + out) / 2         // otherwise
2205         This patch includes an exhaustive test of angle values.
2206
2207         Test: svg/custom/marker-orient-auto.html
2208
2209         * rendering/svg/SVGMarkerData.h:
2210         (WebCore::SVGMarkerData::currentAngle):
2211
2212 2013-03-21  Harald Alvestrand  <hta@google.com>
2213
2214         Expose the Type field of an RTCStatsReport
2215         https://bugs.webkit.org/show_bug.cgi?id=112951
2216
2217         Reviewed by Adam Barth.
2218
2219         Covered by an extension of an existing test.
2220
2221         * Modules/mediastream/RTCStatsReport.h:
2222         (WebCore::RTCStatsReport::type):
2223         * Modules/mediastream/RTCStatsReport.idl:
2224
2225 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
2226
2227         Move non-trivial virtual functions out of ResourceHandleClient.h
2228         https://bugs.webkit.org/show_bug.cgi?id=112950
2229
2230         Reviewed by Brady Eidson.
2231
2232         * CMakeLists.txt:
2233         * GNUmakefile.list.am:
2234         * Target.pri:
2235         * WebCore.exp.in:
2236         * WebCore.gypi:
2237         * WebCore.vcproj/WebCore.vcproj:
2238         * WebCore.vcxproj/WebCore.vcxproj:
2239         * WebCore.vcxproj/WebCore.vcxproj.filters:
2240         * WebCore.xcodeproj/project.pbxproj:
2241         * platform/network/ResourceHandleClient.cpp: Added.
2242         (WebCore::ResourceHandleClient::ResourceHandleClient):
2243         (WebCore::ResourceHandleClient::~ResourceHandleClient):
2244         (WebCore::ResourceHandleClient::didReceiveBuffer):
2245         (WebCore::ResourceHandleClient::getBuffer):
2246         * platform/network/ResourceHandleClient.h:
2247
2248 2013-03-21  Florin Malita  <fmalita@chromium.org>
2249
2250         [SVG] Remove explicit LightSource dispatchers
2251         https://bugs.webkit.org/show_bug.cgi?id=112827
2252
2253         Reviewed by Stephen Chenney.
2254
2255         Convert LightSource setters to dynamic dispatch. This allows us to remove LightSource.cpp
2256         altogether.
2257
2258         No new tests: refactoring only.
2259
2260         * CMakeLists.txt:
2261         * GNUmakefile.list.am:
2262         * Target.pri:
2263         * WebCore.gypi:
2264         * WebCore.vcproj/WebCore.vcproj:
2265         * WebCore.vcxproj/WebCore.vcxproj:
2266         * WebCore.vcxproj/WebCore.vcxproj.filters:
2267         * WebCore.xcodeproj/project.pbxproj:
2268         * platform/graphics/filters/DistantLightSource.h:
2269         (DistantLightSource):
2270         * platform/graphics/filters/LightSource.cpp: Removed.
2271         * platform/graphics/filters/LightSource.h:
2272         (WebCore::LightSource::setAzimuth):
2273         (WebCore::LightSource::setElevation):
2274         (WebCore::LightSource::setX):
2275         (WebCore::LightSource::setY):
2276         (WebCore::LightSource::setZ):
2277         (WebCore::LightSource::setPointsAtX):
2278         (WebCore::LightSource::setPointsAtY):
2279         (WebCore::LightSource::setPointsAtZ):
2280         (WebCore::LightSource::setSpecularExponent):
2281         (WebCore::LightSource::setLimitingConeAngle):
2282         * platform/graphics/filters/PointLightSource.h:
2283         (PointLightSource):
2284         * platform/graphics/filters/SpotLightSource.h:
2285         (SpotLightSource):
2286
2287 2013-03-21  Igor Oliveira  <igor.o@sisa.samsung.com>
2288
2289         [Texmap] Implement support for OpenGLES EXT_unpack_subimage extension
2290         https://bugs.webkit.org/show_bug.cgi?id=108716
2291
2292         If the extension GL_EXT_unpack_subimage is supported, it adds GL_UNPACK_ROW_LENGTH,
2293         GL_UNPACK_SKIP_ROWS and GL_UNPACK_SKIP_PIXELS as valid enums to PixelStore.
2294
2295         Reviewed by Noam Rosenthal.
2296
2297         * platform/graphics/texmap/TextureMapperGL.cpp:
2298         (WebCore::driverSupportsSubImage):
2299         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
2300         (WebCore::BitmapTextureGL::updateContents):
2301
2302 2013-03-21  Dmitry Zvorygin  <zvorygin@chromium.org>
2303
2304         Web Inspector: Regression: drawer resizes slowly with animation.
2305         https://bugs.webkit.org/show_bug.cgi?id=112920
2306
2307         Drawer status bar opacity wasn't set to zero on inialization, so no transition event 
2308         was fired on first time drawer appeared,thus animation styles wasn't removed properly.
2309
2310         Reviewed by Vsevolod Vlasov.
2311
2312         * inspector/front-end/Drawer.js:
2313         (WebInspector.Drawer):
2314
2315 2013-03-21  Alberto Garcia  <agarcia@igalia.com>
2316
2317         [BlackBerry] GraphicsLayer: fix code that was accidentally reverted
2318         https://bugs.webkit.org/show_bug.cgi?id=112143
2319
2320         Reviewed by Rob Buis.
2321
2322         Several changes were accidentally reverted in r144465 due to the
2323         upstreaming of some new code:
2324
2325         - clearBackgroundColor() and m_contentsLayerHasBackgroundColor had
2326           been removed in r137798.
2327
2328         - showDebugBorders() had been renamed to isShowingDebugBorder() in
2329           r133517.
2330
2331         - A new GraphicsLayer::create() overload had been introduced in
2332           r130185.
2333
2334         This patch fixes them all.
2335
2336         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
2337         (WebCore::GraphicsLayer::create):
2338         (WebCore):
2339         (WebCore::GraphicsLayerBlackBerry::GraphicsLayerBlackBerry):
2340         (WebCore::GraphicsLayerBlackBerry::setBackgroundColor):
2341         (WebCore::GraphicsLayerBlackBerry::updateLayerBackgroundColor):
2342         (WebCore::GraphicsLayerBlackBerry::setupContentsLayer):
2343         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
2344         (GraphicsLayerBlackBerry):
2345
2346 2013-03-21  Zan Dobersek  <zdobersek@igalia.com>
2347
2348         [GTK] Move libLevelDB.la setup into a separate GNUmakefile.am
2349         https://bugs.webkit.org/show_bug.cgi?id=112947
2350
2351         Reviewed by Martin Robinson.
2352
2353         No new tests - no new functionality.
2354
2355         * GNUmakefile.am: Move the libLevelDD.la setup into the new GNUmakefile.am that's placed in
2356         the third-party leveldb source directory.
2357         * GNUmakefile.list.am: Move the LevelDB sources listing there as well.
2358
2359 2013-03-21  Alberto Garcia  <agarcia@igalia.com>
2360
2361         [BlackBerry] DrawingBuffer: add clearPlatformLayer() implementation
2362         https://bugs.webkit.org/show_bug.cgi?id=112696
2363
2364         Reviewed by Rob Buis.
2365
2366         DrawingBuffer::clearPlatformLayer() was added in r139142.
2367
2368         This is not needed in the BlackBerry port, so this patch only
2369         contains a dummy implementation.
2370
2371         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
2372         (WebCore):
2373         (WebCore::DrawingBuffer::clearPlatformLayer):
2374
2375 2013-03-21  Florin Malita  <fmalita@chromium.org>
2376
2377         [SVG] Suppress painting when an empty viewBox is specified
2378         https://bugs.webkit.org/show_bug.cgi?id=112623
2379
2380         Reviewed by Philip Rogers.
2381
2382         Per spec, elements with an empty viewBox should not be rendered:
2383         http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute.
2384
2385         This patch adds the missing viewBox checks to RenderSVGRoot, RenderSVGViewPortContainer,
2386         RenderSVGResourceMarker and RenderSVGResourceMarker's paint methods.
2387
2388         In order to detect the case of "viewBox present but invalid", the patch also introduces
2389         SVGAnimatedProperty plumbing for tracking property validity: the baseVal setter now takes
2390         an additional optional 'validValue' boolean parameter, which can later be queried via a
2391         macroed getter (LowerProperty##IsValid()).
2392
2393         Test: svg/custom/viewBox-empty.html
2394
2395         * rendering/svg/RenderSVGResourceMarker.cpp:
2396         (WebCore::RenderSVGResourceMarker::draw):
2397         * rendering/svg/RenderSVGResourcePattern.cpp:
2398         (WebCore::RenderSVGResourcePattern::buildPattern):
2399         * rendering/svg/RenderSVGRoot.cpp:
2400         (WebCore::RenderSVGRoot::paintReplaced):
2401         * rendering/svg/RenderSVGViewportContainer.cpp:
2402         (WebCore::RenderSVGViewportContainer::paint):
2403         (WebCore):
2404         * rendering/svg/RenderSVGViewportContainer.h:
2405         (RenderSVGViewportContainer):
2406         * svg/SVGPatternElement.cpp:
2407         (WebCore::SVGPatternElement::collectPatternAttributes):
2408         * svg/SVGSVGElement.h:
2409         (WebCore::SVGSVGElement::hasEmptyViewBox):
2410         (SVGSVGElement):
2411         Suppress painting if a valid empty viewBox is found.
2412
2413         * svg/SVGFitToViewBox.h:
2414         (WebCore::SVGFitToViewBox::parseAttribute):
2415         Mark the viewBox property as invalid if not successfully parsed.
2416
2417         * svg/SVGExternalResourcesRequired.h:
2418         (SVGExternalResourcesRequired):
2419         * svg/SVGURIReference.h:
2420         (SVGURIReference):
2421         * svg/properties/SVGAnimatedPropertyMacros.h:
2422         (WebCore::SVGSynchronizableAnimatedProperty::SVGSynchronizableAnimatedProperty):
2423         (SVGSynchronizableAnimatedProperty):
2424         (WebCore):
2425         Plumbing for tracking property value validation.
2426
2427 2013-03-21  Alexei Filippov  <alph@chromium.org>
2428
2429         Web Inspector: Hide toolbar customization experimental setting
2430         https://bugs.webkit.org/show_bug.cgi?id=112942
2431
2432         Reviewed by Pavel Feldman.
2433
2434         * inspector/front-end/Settings.js:
2435         (WebInspector.ExperimentsSettings):
2436         * inspector/front-end/Toolbar.js:
2437         (WebInspector.Toolbar):
2438         (WebInspector.Toolbar.prototype._isToolbarCustomizable):
2439
2440 2013-03-21  Anton Muhin  <antonm@chromium.org>
2441
2442         Unreviewed, rolling out r146483.
2443         http://trac.webkit.org/changeset/146483
2444         https://bugs.webkit.org/show_bug.cgi?id=111695
2445
2446         Breaks
2447
2448         * Modules/speech/SpeechSynthesis.cpp:
2449         (WebCore::SpeechSynthesis::boundaryEventOccurred):
2450         (WebCore::SpeechSynthesis::didStartSpeaking):
2451         (WebCore::SpeechSynthesis::didPauseSpeaking):
2452         (WebCore::SpeechSynthesis::didResumeSpeaking):
2453         (WebCore::SpeechSynthesis::didFinishSpeaking):
2454         (WebCore::SpeechSynthesis::speakingErrorOccurred):
2455         (WebCore):
2456         * Modules/speech/SpeechSynthesis.h:
2457         (SpeechSynthesis):
2458         * Modules/speech/SpeechSynthesisUtterance.cpp:
2459         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
2460         (WebCore::SpeechSynthesisUtterance::setVoice):
2461         * Modules/speech/SpeechSynthesisUtterance.h:
2462         (WebCore::SpeechSynthesisUtterance::text):
2463         (WebCore::SpeechSynthesisUtterance::setText):
2464         (WebCore::SpeechSynthesisUtterance::lang):
2465         (WebCore::SpeechSynthesisUtterance::setLang):
2466         (WebCore::SpeechSynthesisUtterance::volume):
2467         (WebCore::SpeechSynthesisUtterance::setVolume):
2468         (WebCore::SpeechSynthesisUtterance::rate):
2469         (WebCore::SpeechSynthesisUtterance::setRate):
2470         (WebCore::SpeechSynthesisUtterance::pitch):
2471         (WebCore::SpeechSynthesisUtterance::setPitch):
2472         (WebCore::SpeechSynthesisUtterance::startTime):
2473         (WebCore::SpeechSynthesisUtterance::setStartTime):
2474         (WebCore::SpeechSynthesisUtterance::platformUtterance):
2475         (SpeechSynthesisUtterance):
2476         * Modules/speech/SpeechSynthesisVoice.h:
2477         (SpeechSynthesisVoice):
2478         * WebCore.exp.in:
2479         * WebCore.gypi:
2480         * platform/PlatformSpeechSynthesis.h:
2481         (PlatformSpeechSynthesis):
2482         * platform/PlatformSpeechSynthesisUtterance.cpp:
2483         * platform/PlatformSpeechSynthesisUtterance.h:
2484         (PlatformSpeechSynthesisUtterance):
2485         (WebCore::PlatformSpeechSynthesisUtterance::client):
2486         * platform/PlatformSpeechSynthesisVoice.cpp:
2487         (WebCore::PlatformSpeechSynthesisVoice::create):
2488         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
2489         * platform/PlatformSpeechSynthesisVoice.h:
2490         (PlatformSpeechSynthesisVoice):
2491         (WebCore::PlatformSpeechSynthesisVoice::voiceURI):
2492         (WebCore::PlatformSpeechSynthesisVoice::name):
2493         (WebCore::PlatformSpeechSynthesisVoice::lang):
2494         (WebCore::PlatformSpeechSynthesisVoice::localService):
2495         * platform/PlatformSpeechSynthesizer.cpp:
2496         (WebCore::PlatformSpeechSynthesizer::create):
2497         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2498         (WebCore):
2499         * platform/PlatformSpeechSynthesizer.h:
2500         (PlatformSpeechSynthesizerClient):
2501         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2502         (PlatformSpeechSynthesizer):
2503         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Removed.
2504         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Removed.
2505         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Removed.
2506         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Removed.
2507         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Removed.
2508         * platform/mac/PlatformSpeechSynthesizerMac.mm:
2509         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
2510         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
2511         (WebCore):
2512         (WebCore::PlatformSpeechSynthesizer::speak):
2513         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
2514         (WebCore::PlatformSpeechSynthesizerMock::create):
2515         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
2516         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
2517         (WebCore::PlatformSpeechSynthesizerMock::speak):
2518         * platform/mock/PlatformSpeechSynthesizerMock.h:
2519         (PlatformSpeechSynthesizerMock):
2520
2521 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
2522
2523         [Mac] Consolidate bits of willSendRequest implementation
2524         https://bugs.webkit.org/show_bug.cgi?id=112932
2525
2526         Reviewed by Brady Eidson.
2527
2528         Moved some logic from WebCoreResourceHandleAsDelegate to ResourceHandle for clarity.
2529
2530         * platform/network/mac/ResourceHandleMac.mm:
2531         (WebCore::ResourceHandle::willSendRequest):
2532         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
2533
2534 2013-03-21  Praveen R Jadhav  <praveen.j@samsung.com>
2535
2536         Remove AudioGain.idl from compilation.
2537         https://bugs.webkit.org/show_bug.cgi?id=112650
2538
2539         Reviewed by Chris Rogers.
2540
2541         Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNode
2542               https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBufferSourceNode
2543
2544         AudioParam serves the same purpose as AudioGain. Infact, AudioGain inherits
2545         AudioParam class and doesn't have its own member functions/parameters. Also,
2546         AudioGain is not part of WebAudio W3C specifications.
2547
2548         Test: webaudio/gain-basic.html
2549
2550         * CMakeLists.txt:
2551         * DerivedSources.make:
2552         * DerivedSources.pri:
2553         * GNUmakefile.list.am:
2554         * Modules/webaudio/AudioBufferSourceNode.cpp:
2555         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
2556         * Modules/webaudio/AudioBufferSourceNode.h:
2557         (AudioBufferSourceNode):
2558         (WebCore::AudioBufferSourceNode::gain):
2559         * Modules/webaudio/AudioBufferSourceNode.idl:
2560         * Modules/webaudio/AudioGain.h: Removed.
2561         * Modules/webaudio/AudioGain.idl: Removed.
2562         * Modules/webaudio/GainNode.cpp:
2563         (WebCore::GainNode::GainNode):
2564         * Modules/webaudio/GainNode.h:
2565         (WebCore):
2566         (WebCore::GainNode::create):
2567         (GainNode):
2568         (WebCore::GainNode::gain):
2569         * Modules/webaudio/GainNode.idl:
2570         * Modules/webaudio/PannerNode.cpp:
2571         (WebCore::PannerNode::PannerNode):
2572         * Modules/webaudio/PannerNode.h:
2573         (WebCore::PannerNode::distanceGain):
2574         (WebCore::PannerNode::coneGain):
2575         * Target.pri:
2576         * WebCore.gypi:
2577         * WebCore.xcodeproj/project.pbxproj:
2578
2579 2013-03-21  Dominic Mazzoni  <dmazzoni@google.com>
2580
2581         Implement Web Speech Synthesis for Chromium
2582         https://bugs.webkit.org/show_bug.cgi?id=111695
2583
2584         Reviewed by Adam Barth.
2585
2586         Straightforward implementation of speech synthesis
2587         for Chromium by exposing interfaces for the platform
2588         to implement.
2589
2590         * Modules/speech/SpeechSynthesis.cpp:
2591         (WebCore::SpeechSynthesis::boundaryEventOccurred):
2592         (WebCore::SpeechSynthesis::didStartSpeaking):
2593         (WebCore::SpeechSynthesis::didPauseSpeaking):
2594         (WebCore::SpeechSynthesis::didResumeSpeaking):
2595         (WebCore::SpeechSynthesis::didFinishSpeaking):
2596         (WebCore::SpeechSynthesis::speakingErrorOccurred):
2597         (WebCore):
2598         * Modules/speech/SpeechSynthesis.h:
2599         (SpeechSynthesis):
2600         * Modules/speech/SpeechSynthesisUtterance.cpp:
2601         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
2602         (WebCore):
2603         (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
2604         (WebCore::SpeechSynthesisUtterance::setVoice):
2605         * Modules/speech/SpeechSynthesisUtterance.h:
2606         (SpeechSynthesisUtterance):
2607         (WebCore::SpeechSynthesisUtterance::text):
2608         (WebCore::SpeechSynthesisUtterance::setText):
2609         (WebCore::SpeechSynthesisUtterance::lang):
2610         (WebCore::SpeechSynthesisUtterance::setLang):
2611         (WebCore::SpeechSynthesisUtterance::volume):
2612         (WebCore::SpeechSynthesisUtterance::setVolume):
2613         (WebCore::SpeechSynthesisUtterance::rate):
2614         (WebCore::SpeechSynthesisUtterance::setRate):
2615         (WebCore::SpeechSynthesisUtterance::pitch):
2616         (WebCore::SpeechSynthesisUtterance::setPitch):
2617         (WebCore::SpeechSynthesisUtterance::startTime):
2618         (WebCore::SpeechSynthesisUtterance::setStartTime):
2619         (WebCore::SpeechSynthesisUtterance::platformUtterance):
2620         * Modules/speech/SpeechSynthesisVoice.h:
2621         (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
2622         * WebCore.exp.in:
2623         * WebCore.gypi:
2624         * platform/PlatformSpeechSynthesis.h:
2625         (PlatformSpeechSynthesis):
2626         * platform/PlatformSpeechSynthesisUtterance.cpp:
2627         (WebCore):
2628         (WebCore::PlatformSpeechSynthesisUtterance::create):
2629         * platform/PlatformSpeechSynthesisUtterance.h:
2630         (PlatformSpeechSynthesisUtterance):
2631         (WebCore::PlatformSpeechSynthesisUtterance::setClient):
2632         * platform/PlatformSpeechSynthesisVoice.cpp:
2633         (WebCore):
2634         (WebCore::PlatformSpeechSynthesisVoice::create):
2635         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
2636         * platform/PlatformSpeechSynthesisVoice.h:
2637         (PlatformSpeechSynthesisVoice):
2638         (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
2639         (WebCore::PlatformSpeechSynthesisVoice::setName):
2640         (WebCore::PlatformSpeechSynthesisVoice::setLang):
2641         (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
2642         (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
2643         * platform/PlatformSpeechSynthesizer.cpp:
2644         (WebCore::PlatformSpeechSynthesizer::create):
2645         (WebCore::PlatformSpeechSynthesizer::setVoiceList):
2646         (WebCore):
2647         * platform/PlatformSpeechSynthesizer.h:
2648         (WebKit):
2649         (PlatformSpeechSynthesizerClient):
2650         (PlatformSpeechSynthesizer):
2651         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
2652         (WebCore):
2653         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2654         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2655         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
2656         (WebCore::PlatformSpeechSynthesizer::speak):
2657         (WebCore::PlatformSpeechSynthesizer::pause):
2658         (WebCore::PlatformSpeechSynthesizer::resume):
2659         (WebCore::PlatformSpeechSynthesizer::cancel):
2660         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
2661         (WebKit):
2662         (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
2663         (WebKit::WebSpeechSynthesisUtterance::operator=):
2664         (WebKit::WebSpeechSynthesisUtterance::assign):
2665         (WebKit::WebSpeechSynthesisUtterance::reset):
2666         (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
2667         (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
2668         (WebKit::WebSpeechSynthesisUtterance::text):
2669         (WebKit::WebSpeechSynthesisUtterance::lang):
2670         (WebKit::WebSpeechSynthesisUtterance::voice):
2671         (WebKit::WebSpeechSynthesisUtterance::volume):
2672         (WebKit::WebSpeechSynthesisUtterance::rate):
2673         (WebKit::WebSpeechSynthesisUtterance::pitch):
2674         (WebKit::WebSpeechSynthesisUtterance::startTime):
2675         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
2676         (WebKit):
2677         (WebKit::WebSpeechSynthesisVoice::assign):
2678         (WebKit::WebSpeechSynthesisVoice::reset):
2679         (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
2680         (WebKit::WebSpeechSynthesisVoice::setName):
2681         (WebKit::WebSpeechSynthesisVoice::setLanguage):
2682         (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
2683         (WebKit::WebSpeechSynthesisVoice::setIsDefault):
2684         (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
2685         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
2686         (WebCore):
2687         (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
2688         (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
2689         (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
2690         (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
2691         (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
2692         (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
2693         (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
2694         (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
2695         (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
2696         (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
2697         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
2698         (WebCore):
2699         (WebSpeechSynthesizerClientImpl):
2700         * platform/mac/PlatformSpeechSynthesizerMac.mm:
2701         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
2702         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
2703         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2704         (WebCore):
2705         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2706         (WebCore::PlatformSpeechSynthesizer::speak):
2707         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
2708         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
2709         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
2710         (WebCore::PlatformSpeechSynthesizerMock::speak):
2711         * platform/mock/PlatformSpeechSynthesizerMock.h:
2712         (PlatformSpeechSynthesizerMock):
2713
2714 2013-03-21  Julien Chaffraix  <jchaffraix@webkit.org>
2715
2716         [CSS Grid Layout] Properly layout spanning grid items with minmax grid tracks
2717         https://bugs.webkit.org/show_bug.cgi?id=112389
2718
2719         Reviewed by Tony Chang.
2720
2721         This change updates our core minmax resolution function to be spanning grid
2722         items aware. The new implementation of the algorithm doesn't totally match
2723         the specification but it is fairly close that it's a good first pass. The
2724         extra complexity in the specification needs to be carefully examinated
2725         first (not to mention the probable change in the core layout algorithm).
2726
2727         Tests: fast/css-grid-layout/minmax-spanning-resolution-columns.html
2728                fast/css-grid-layout/minmax-spanning-resolution-rows.html
2729
2730         * rendering/RenderGrid.cpp:
2731         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2732         Updated this function to account for spanning grid items by:
2733         - iterating over all spanned grid tracks.
2734         - removing any used breadth from all spanned grid tracks.
2735
2736 2013-03-21  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
2737
2738         [GStreamer] New reference returned by g_main_context_new() must be freed
2739         https://bugs.webkit.org/show_bug.cgi?id=112899
2740
2741         Reviewed by Kenneth Rohde Christiansen.
2742
2743         Fix a memory leak by adopting the new reference returned
2744         by g_main_context_new().
2745
2746         No new tests. No change in behavior.
2747
2748         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2749         (WebCore::AudioFileReader::createBus):
2750
2751 2013-03-21  Carlos Garcia Campos  <cargarcia@rim.com>
2752
2753         [BlackBerry] Add ScrollingCoordinatorBlackBerry implementation
2754         https://bugs.webkit.org/show_bug.cgi?id=112915
2755
2756         Reviewed by Rob Buis.
2757
2758         * PlatformBlackBerry.cmake: Add page/scrolling/blackberry to the
2759         indlude dir list.
2760         * page/scrolling/ScrollingCoordinator.cpp:
2761         (WebCore::ScrollingCoordinator::create): Create a
2762         ScrollingCoordinatorBlackBerry for the BlackBerry platform.
2763         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp: Added.
2764         (WebCore):
2765         (WebCore::ScrollingCoordinatorBlackBerry::ScrollingCoordinatorBlackBerry):
2766         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsContainerForFixedPositionLayers):
2767         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsFixedToContainerLayer):
2768         (WebCore::ScrollingCoordinatorBlackBerry::setLayerFixedToContainerLayerEdge):
2769         (WebCore::ScrollingCoordinatorBlackBerry::frameViewFrameRectDidChange):
2770         (WebCore::ScrollingCoordinatorBlackBerry::frameViewContentsSizeDidChange):
2771         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h: Added.
2772         (WebCore):
2773         (ScrollingCoordinatorBlackBerry):
2774         (WebCore::ScrollingCoordinatorBlackBerry::supportsFixedPositionLayers):
2775         * platform/graphics/PlatformLayer.h:
2776         (WebCore): Add PlatformLayer definition for BlackBerry.
2777
2778 2013-03-18  Andrey Kosyakov  <caseq@chromium.org>
2779
2780         Web Inspector: Paint rectangles shown on hover over Timeline's paint records occasionally have wrong offsets
2781         https://bugs.webkit.org/show_bug.cgi?id=112371
2782
2783         Reviewed by Pavel Feldman.
2784
2785         - pass frame to InspectorTimelineAgent::didPaint();
2786         - convert paint coordinates to root view.
2787
2788         * inspector/InspectorInstrumentation.cpp:
2789         (WebCore):
2790         (WebCore::InspectorInstrumentation::willPaintImpl):
2791         (WebCore::InspectorInstrumentation::didPaintImpl):
2792         * inspector/InspectorInstrumentation.h:
2793         (InspectorInstrumentation):
2794         (WebCore::InspectorInstrumentation::willPaint):
2795         (WebCore::InspectorInstrumentation::didPaint):
2796         * inspector/InspectorTimelineAgent.cpp:
2797         (WebCore::InspectorTimelineAgent::didPaint):
2798         * inspector/InspectorTimelineAgent.h:
2799         (InspectorTimelineAgent):
2800
2801 2013-03-20  Andrey Kosyakov  <caseq@chromium.org>
2802
2803         Web Inspector: do not use inspector cookie in InspectorInstrumentation::{will,did}Paint
2804         https://bugs.webkit.org/show_bug.cgi?id=112787
2805
2806         Reviewed by Pavel Feldman.
2807
2808         - pass frame, not inspector cookie to InspectorInstrumentation::didPaint;
2809         - use frame to determine timeline agent in InspectorInstrumentation::didPaint.
2810
2811         * inspector/InspectorInstrumentation.cpp:
2812         (WebCore):
2813         (WebCore::InspectorInstrumentation::willPaintImpl):
2814         (WebCore::InspectorInstrumentation::didPaintImpl):
2815         * inspector/InspectorInstrumentation.h:
2816         (InspectorInstrumentation):
2817         (WebCore::InspectorInstrumentation::willPaint):
2818         (WebCore::InspectorInstrumentation::didPaint):
2819         * page/FrameView.cpp:
2820         (WebCore::FrameView::paintContents):
2821         * rendering/RenderLayerBacking.cpp:
2822         (WebCore::RenderLayerBacking::paintContents):
2823
2824 2013-03-21  Julien Chaffraix  <jchaffraix@webkit.org>
2825
2826         [CSS Grid Layout] OOB access in RenderGrid with a grid item with negative position index
2827         https://bugs.webkit.org/show_bug.cgi?id=112853
2828
2829         Reviewed by Tony Chang.
2830
2831         This issue was caused by us casting a negative int to a size_t by mistake. This
2832         would make us not size the grid properly thus yielding to OOB access during the
2833         rest of the layout.
2834
2835         Test: fast/css-grid-layout/grid-item-negative-indexes.html
2836
2837         * rendering/RenderGrid.cpp:
2838         (WebCore::estimatedGridSizeForPosition):
2839         Added this helper function to do the proper estimation and checks that our
2840         position can be represented by a size_t.
2841
2842         (WebCore::RenderGrid::maximumIndexInDirection):
2843         Updated to use estimatedGridSizeForPosition.
2844
2845 2013-03-21  Stephen White  <senorblanco@chromium.org>
2846
2847         [skia] feConvolveMatrix should use accelerated path
2848         https://bugs.webkit.org/show_bug.cgi?id=112828
2849
2850         Reviewed by James Robinson.
2851
2852         Covered by layout tests css3/filters/effect-reference*.html.
2853
2854         * WebCore.gypi:
2855         Add FEConvolveMatrixSkia.cpp to the build.
2856         * platform/graphics/filters/FEConvolveMatrix.h:
2857         Enable the skia accelerated path for feConvolveMatrix.
2858         * platform/graphics/filters/skia/FEConvolveMatrixSkia.cpp:
2859         (WebCore::FEConvolveMatrix::createImageFilter):
2860         Implement building/conversion from FEConvolveMatrix to
2861         SkMatrixConvolutionImageFilter.
2862
2863 2013-03-21  Martin Robinson  <mrobinson@igalia.com>
2864
2865         Source/ThirdParty/leveldb/db/builder.cc does not build on systems without <endian.h>
2866         https://bugs.webkit.org/show_bug.cgi?id=111817
2867
2868         Reviewed by Gustavo Noronha Silva.
2869
2870         * GNUmakefile.am: Add the appropriate flags to the LevelDB build if we are on FreeBSD
2871         or OS X.
2872
2873 2013-03-21  Julien Chaffraix  <jchaffraix@webkit.org>
2874
2875         [CSS Grid Layout] Support default grid items sizing
2876         https://bugs.webkit.org/show_bug.cgi?id=103333
2877
2878         Reviewed by Tony Chang.
2879
2880         Tests: fast/css-grid-layout/grid-auto-columns-rows-auto-flow-resolution.html
2881                fast/css-grid-layout/grid-auto-columns-rows-resolution.html
2882                fast/css-grid-layout/grid-auto-columns-rows-update.html
2883
2884         * rendering/RenderGrid.cpp:
2885         (WebCore::RenderGrid::gridTrackSize):
2886         Core of the change: return the grid-auto-{rows|columns} instead of a pre-defined value.
2887
2888         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
2889         Fixed a latent bug: we need to iterate over the internal grid representation instead of the
2890         style's rows / columns as the latter doesn't account for implicit rows / columns.
2891
2892 2013-03-21  Adam Barth  <abarth@webkit.org>
2893
2894         HTMLNames should construct strings at compile time
2895         https://bugs.webkit.org/show_bug.cgi?id=112831
2896
2897         Reviewed by Darin Adler.
2898
2899         This patch teaches make_names how to construct strings at compile time,
2900         eliminating a large number of startup mallocs.
2901
2902         * WebCore.gyp/WebCore.gyp:
2903         * WebCore.gyp/scripts/action_makenames.py:
2904             - Teach the Chromium build how to deal with Perl modules.
2905         * bindings/scripts/StaticString.pm: Added.
2906             - A Perl module for constructing static strings.
2907         (GenerateStrings):
2908         (GenerateValidateStrings):
2909         * dom/QualifiedName.cpp:
2910         (WebCore::createQualifiedName):
2911             - createQualifiedName now takes an already-constructed StringImpl
2912               object.
2913         * dom/QualifiedName.h:
2914         * dom/make_names.pl:
2915         (valueForName):
2916         (namesToStrings):
2917         (printNamesCppFile):
2918         (printDefinitions):
2919             - Teach make_names how to use StaticString.pm.
2920
2921 2013-03-21  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2922
2923         [EFL][WebGL] Implement a common GraphicsSurface Implementation.
2924         https://bugs.webkit.org/show_bug.cgi?id=111759
2925
2926         Reviewed by Kenneth Rohde Christiansen.
2927
2928         Covered by existing WebGL tests.
2929
2930         This is in preparation to add transport surface support for GLES2.
2931         This patch makes it easy to share the core logic of using
2932         Transport Surface and client on GLX and GLES2 backends without
2933         any code duplication.
2934
2935         * PlatformEfl.cmake:
2936         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2937         (WebCore::GraphicsContext3DPrivate::initialize):
2938         (WebCore::GraphicsContext3DPrivate::releaseResources):
2939         (WebCore::GraphicsContext3DPrivate::prepareBuffer):
2940         (WebCore::GraphicsContext3DPrivate::createGraphicsSurface):
2941         (WebCore::GraphicsContext3DPrivate::didResizeCanvas):
2942         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
2943         * platform/graphics/efl/GraphicsContext3DPrivate.h:
2944         (GraphicsContext3DPrivate):
2945
2946         TransportSurface related code is moved to GraphicsSurfaceCommon.
2947         As GraphicsSurface is deleted on resize, added logic to ensure that
2948         current buffer is not deleted before having the shared buffer
2949         with correct size. This would avoid any flashing during resize.
2950
2951         * platform/graphics/opengl/GLPlatformSurface.cpp:
2952         (WebCore::GLPlatformSurface::createTransportSurface):
2953         * platform/graphics/opengl/GLPlatformSurface.h:
2954         * platform/graphics/surfaces/efl/GLTransportSurface.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp.
2955         (WebCore):
2956         (WebCore::GLTransportSurface::GLTransportSurface):
2957         (WebCore::GLTransportSurface::~GLTransportSurface):
2958         (WebCore::GLTransportSurface::updateContents):
2959         (WebCore::GLTransportSurface::setGeometry):
2960         (WebCore::GLTransportSurface::destroy):
2961         (WebCore::GLTransportSurface::draw):
2962         (WebCore::GLTransportSurface::bindArrayBuffer):
2963         (WebCore::GLTransportSurface::updateTransformationMatrix):
2964         (WebCore::GLTransportSurface::initializeShaderProgram):
2965         (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
2966         (WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
2967         (WebCore::GLTransportSurfaceClient::~GLTransportSurfaceClient):
2968         (WebCore::GLTransportSurfaceClient::destroy):
2969         (WebCore::GLTransportSurfaceClient::prepareTexture):
2970         (WebCore::GLTransportSurfaceClient::createTexture):
2971         * platform/graphics/surfaces/efl/GLTransportSurface.h: Renamed from Source/WebCore/platform/graphics/surfaces/GLTransportSurface.h.
2972         (WebCore):
2973         (GLTransportSurface):
2974         (GLTransportSurfaceClient):
2975         (WebCore::GLTransportSurfaceClient::texture):
2976         (WebCore::GLTransportSurfaceClient::hasAlpha):
2977
2978         Moved TransportSurface to EFL folder as this is being used by EFL port only.
2979         Added a base class for TransportSurfaceClient.
2980
2981         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: Added.
2982         (WebCore):
2983         (GraphicsSurfacePrivate):
2984         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2985         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
2986         (WebCore::GraphicsSurfacePrivate::destroy):
2987         (WebCore::GraphicsSurfacePrivate::initializeTransportSurface):
2988         (WebCore::GraphicsSurfacePrivate::makeContextCurrent):
2989         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
2990         (WebCore::GraphicsSurfacePrivate::handle):
2991         (WebCore::GraphicsSurfacePrivate::updateClientBuffer):
2992         (WebCore::GraphicsSurfacePrivate::flags):
2993         (WebCore::GraphicsSurfacePrivate::rect):
2994         (WebCore::GraphicsSurfacePrivate::size):
2995         (WebCore::GraphicsSurfacePrivate::textureId):
2996         (WebCore::GraphicsSurfacePrivate::initializeClient):
2997         (WebCore::GraphicsSurface::platformExport):
2998         (WebCore::GraphicsSurface::platformGetTextureID):
2999         (WebCore::GraphicsSurface::platformCopyToGLTexture):
3000         (WebCore::GraphicsSurface::platformCopyFromTexture):
3001         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
3002         (WebCore::GraphicsSurface::platformFrontBuffer):
3003         (WebCore::GraphicsSurface::platformSwapBuffers):
3004         (WebCore::GraphicsSurface::platformSize):
3005         (WebCore::GraphicsSurface::platformCreate):
3006         (WebCore::GraphicsSurface::platformImport):
3007         (WebCore::GraphicsSurface::platformLock):
3008         (WebCore::GraphicsSurface::platformUnlock):
3009         (WebCore::GraphicsSurface::platformDestroy):
3010         (WebCore::GraphicsSurface::platformBeginPaint):
3011         (WebCore::GraphicsSurface::createReadOnlyImage):
3012
3013         GraphicsSurface implementation to be shared by both GLX and GLES2.
3014
3015         * platform/graphics/surfaces/egl/EGLSurface.cpp:
3016         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
3017         * platform/graphics/surfaces/egl/EGLSurface.h:
3018         (EGLWindowTransportSurface):
3019         * platform/graphics/surfaces/glx/GLXSurface.cpp:
3020         (WebCore):
3021         (WebCore::resolveGLMethods):
3022         (WebCore::isMesaGLX):
3023         (WebCore::GLXTransportSurface::GLXTransportSurface):
3024         (WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
3025         (WebCore::GLXTransportSurfaceClient::~GLXTransportSurfaceClient):
3026         (WebCore::GLXTransportSurfaceClient::destroy):
3027         (WebCore::GLXTransportSurfaceClient::prepareTexture):
3028         * platform/graphics/surfaces/glx/GLXSurface.h:
3029         (GLXTransportSurface):
3030         (GLXTransportSurfaceClient):
3031         (WebCore):
3032         GLXTransportSurfaceClient implementation.
3033
3034 2013-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3035
3036         Unreviewed, rolling out r146454.
3037         http://trac.webkit.org/changeset/146454
3038         https://bugs.webkit.org/show_bug.cgi?id=112906
3039
3040         compile failures (Requested by antonm on #webkit).
3041
3042         * WebCore.gypi:
3043         * platform/graphics/filters/FEConvolveMatrix.h:
3044         (FEConvolveMatrix):
3045         * platform/graphics/filters/skia/FEConvolveMatrixSkia.cpp: Removed.
3046
3047 2013-03-21  Mike Reed  <reed@google.com>
3048
3049         Remove obsolete conditionals around calling SkTypeface::getUnitsPerEm()
3050         https://bugs.webkit.org/show_bug.cgi?id=112846
3051
3052         Reviewed by Stephen White.
3053
3054         Existing complex-text layouttests exercise this code.
3055
3056         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
3057         (WebCore::FontPlatformData::emSizeInFontUnits):
3058
3059 2013-03-21  Stephen White  <senorblanco@chromium.org>
3060
3061         [skia] feConvolveMatrix should use accelerated path
3062         https://bugs.webkit.org/show_bug.cgi?id=112828
3063
3064         Reviewed by James Robinson.
3065
3066         Covered by layout tests css3/filters/effect-reference*.html.
3067
3068         * WebCore.gypi:
3069         Add FEConvolveMatrixSkia.cpp to the build.
3070         * platform/graphics/filters/FEConvolveMatrix.h:
3071         Enable the skia accelerated path for feConvolveMatrix.
3072         * platform/graphics/filters/skia/FEConvolveMatrixSkia.cpp:
3073         (WebCore::FEConvolveMatrix::createImageFilter):
3074         Implement building/conversion from FEConvolveMatrix to
3075         SkMatrixConvolutionImageFilter.
3076
3077 2013-03-21  Kunihiko Sakamoto  <ksakamoto@chromium.org>
3078
3079         Refactoring: Reorganize datetime field element parameters
3080         https://bugs.webkit.org/show_bug.cgi?id=112877
3081
3082         Reviewed by Kent Tamura.
3083
3084         Before this patch, the field element constructors took minimum/maximum
3085         as a pair of integers, and step/stepbase as a DateTimeNumericFieldElement::Parameters.
3086         This patch makes these constructors to take a Range (for minimum/maximum)
3087         and a Step (for step/stepbase).
3088
3089         No new tests. Just refactoring.
3090
3091         * html/shadow/DateTimeEditElement.cpp:
3092         (DateTimeEditBuilder): Replaced min/max data members by Ranges.
3093         (WebCore::DateTimeEditBuilder::DateTimeEditBuilder):
3094         (WebCore::DateTimeEditBuilder::visitField):
3095         (WebCore::DateTimeEditBuilder::shouldAMPMFieldDisabled):
3096         (WebCore::DateTimeEditBuilder::shouldDayOfMonthFieldDisabled):
3097         (WebCore::DateTimeEditBuilder::shouldHourFieldDisabled):
3098         (WebCore::DateTimeEditBuilder::shouldMillisecondFieldDisabled):
3099         (WebCore::DateTimeEditBuilder::shouldMinuteFieldDisabled):
3100         (WebCore::DateTimeEditBuilder::shouldSecondFieldDisabled):
3101         (WebCore::DateTimeEditBuilder::createStep):
3102         * html/shadow/DateTimeFieldElements.cpp:
3103         (WebCore::DateTimeDayFieldElement::DateTimeDayFieldElement):
3104         (WebCore::DateTimeDayFieldElement::create):
3105         (WebCore::DateTimeHourFieldElementBase::DateTimeHourFieldElementBase):
3106         (WebCore::DateTimeHour11FieldElement::DateTimeHour11FieldElement):
3107         (WebCore::DateTimeHour11FieldElement::create):
3108         (WebCore::DateTimeHour12FieldElement::DateTimeHour12FieldElement):
3109         (WebCore::DateTimeHour12FieldElement::create):
3110         (WebCore::DateTimeHour23FieldElement::DateTimeHour23FieldElement):
3111         (WebCore::DateTimeHour23FieldElement::create):
3112         (WebCore::DateTimeHour24FieldElement::DateTimeHour24FieldElement):
3113         (WebCore::DateTimeHour24FieldElement::create):
3114         (WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement):
3115         (WebCore::DateTimeMillisecondFieldElement::create):
3116         (WebCore::DateTimeMinuteFieldElement::DateTimeMinuteFieldElement):
3117         (WebCore::DateTimeMinuteFieldElement::create):
3118         (WebCore::DateTimeMonthFieldElement::DateTimeMonthFieldElement):
3119         (WebCore::DateTimeMonthFieldElement::create):
3120         (WebCore::DateTimeSecondFieldElement::DateTimeSecondFieldElement):
3121         (WebCore::DateTimeSecondFieldElement::create):
3122         (WebCore::DateTimeWeekFieldElement::DateTimeWeekFieldElement):
3123         (WebCore::DateTimeWeekFieldElement::create):
3124         * html/shadow/DateTimeFieldElements.h:
3125         (DateTimeDayFieldElement):
3126         (DateTimeHourFieldElementBase):
3127         (DateTimeHour11FieldElement):
3128         (DateTimeHour12FieldElement):
3129         (DateTimeHour23FieldElement):
3130         (DateTimeHour24FieldElement):
3131         (DateTimeMillisecondFieldElement):
3132         (DateTimeMinuteFieldElement):
3133         (DateTimeMonthFieldElement):
3134         (DateTimeSecondFieldElement):
3135         (DateTimeWeekFieldElement):
3136         * html/shadow/DateTimeNumericFieldElement.cpp:
3137         (WebCore):
3138         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
3139         (WebCore::DateTimeNumericFieldElement::roundDown):
3140         (WebCore::DateTimeNumericFieldElement::roundUp):
3141         * html/shadow/DateTimeNumericFieldElement.h:
3142         (WebCore::DateTimeNumericFieldElement::Step::Step): Renamed from Parameters.
3143         (WebCore::DateTimeNumericFieldElement::Range::Range):
3144         (WebCore::DateTimeNumericFieldElement::Range::isSingleton): Returns true if the range is a singleton range (i.e. contains exactly one value).
3145         (Range): Now it's parameter type, hence public.
3146         (DateTimeNumericFieldElement): Replaced two int members (m_step and m_stepBase) by a Range.
3147
3148 2013-03-21  Sergey Ryazanov  <serya@chromium.org>
3149
3150         Web Inspector: Track CSS error location information.
3151         https://bugs.webkit.org/show_bug.cgi?id=111314
3152
3153         Added CSS syntax error reporting to some (other rules will be covered later) error recovery grammar rules.
3154         Added code to CSSParser to allow track error location information.
3155         Added empty rule to declaration_list. Needed to not report error about declarations like "body {}".
3156         Added helper grammar rule "errors: error | errors error". Handles the same grammar as "error" but simplifies error location tracking.
3157
3158         Reviewed by Pavel Feldman.
3159
3160         Test: inspector/console/console-css-warnings.html
3161
3162         * css/CSSGrammar.y.in:
3163         * css/CSSParser.cpp:
3164         (WebCore::CSSParser::CSSParser):
3165         (WebCore::CSSParser::currentLocation):
3166         (WebCore):
3167         (WebCore::CSSParser::realLex):
3168         * css/CSSParser.h:
3169         (CSSParser):
3170
3171 2013-03-21  Sergey Ryazanov  <serya@chromium.org>
3172
3173         Changing "#define YYDEBUG 0" to 1 causing compilation error
3174         https://bugs.webkit.org/show_bug.cgi?id=111178
3175
3176         Reviewed by Pavel Feldman.
3177
3178         Code that reference tokens can't be placed into CSSGrammar.yy.include because it's included before tokens defined.
3179         YYDEBUG can't be used in CSSGrammar.yy.in because the #define is only defined in CSSGrammar.yy.include. This
3180         change simplifies CSS debugging letting manipulate only #define YYDEBUG in CSSGrammar.yy.include and/or in CSSParser.cpp.
3181
3182         * css/CSSGrammar.y.in:
3183         * css/CSSGrammar.y.includes:
3184
3185 2013-03-21  Nate Chapin  <japhet@chromium.org>
3186
3187         Merge MainResourceLoader into DocumentLoader
3188         https://bugs.webkit.org/show_bug.cgi?id=104969
3189
3190         Reviewed by Adam Barth.
3191
3192         No new tests, refactor only.
3193
3194         * CMakeLists.txt:
3195         * GNUmakefile.list.am:
3196         * Target.pri:
3197         * WebCore.exp.in:
3198         * WebCore.gypi:
3199         * WebCore.vcproj/WebCore.vcproj:
3200         * WebCore.vcxproj/WebCore.vcxproj:
3201         * WebCore.vcxproj/WebCore.vcxproj.filters:
3202         * WebCore.xcodeproj/project.pbxproj:
3203         * loader/DocumentLoader.cpp:
3204         (WebCore::DocumentLoader::DocumentLoader):
3205         (WebCore::DocumentLoader::mainResourceLoader):
3206         (WebCore::DocumentLoader::~DocumentLoader): Move main resource clearing from
3207             ~MainResourceLoader.
3208         (WebCore::DocumentLoader::mainResourceData):
3209         (WebCore::DocumentLoader::stopLoading):
3210         (WebCore::DocumentLoader::notifyFinished): Moved from MainResourceLoader::notifyFinished.
3211         (WebCore):
3212         (WebCore::DocumentLoader::finishedLoading):
3213         (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
3214         (WebCore::DocumentLoader::redirectReceived):
3215         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
3216         (WebCore::DocumentLoader::responseReceived):
3217         (WebCore::DocumentLoader::continueAfterContentPolicy):
3218         (WebCore::DocumentLoader::reportMemoryUsage):
3219         (WebCore::DocumentLoader::dataReceived):
3220         (WebCore::DocumentLoader::clearMainResourceLoader):
3221         (WebCore::DocumentLoader::setDefersLoading):
3222         (WebCore::DocumentLoader::setMainResourceDataBufferingPolicy):
3223         (WebCore::DocumentLoader::addSubresourceLoader):
3224         (WebCore::DocumentLoader::maybeLoadEmpty):
3225         (WebCore::DocumentLoader::startLoadingMainResource): Don't keep separate checks
3226              for normal and empty loads, just use a single boolean.
3227         * loader/DocumentLoader.h:
3228         (WebCore::DocumentLoader::isLoadingMainResource):
3229         * loader/MainResourceLoader.cpp: Removed.
3230         * loader/MainResourceLoader.h: Removed.
3231         * loader/mac/DocumentLoaderMac.cpp:
3232         (WebCore::DocumentLoader::schedule):
3233         (WebCore::DocumentLoader::unschedule):
3234
3235 2013-03-20  Ilya Tikhonovsky  <loislo@chromium.org>
3236
3237         Web Inspector: Flame Chart. draw background for the FlameChart overview pane with the CPU aggregated data.
3238         https://bugs.webkit.org/show_bug.cgi?id=112823
3239
3240         Reviewed by Yury Semikhatsky.
3241
3242         The idea of the patch is to collect the data about stack depth for the each X
3243         and draw a line with help of this data.
3244
3245         * inspector/front-end/FlameChart.js:
3246         (WebInspector.FlameChart):
3247         (WebInspector.FlameChart.prototype.onResize):
3248         (WebInspector.FlameChart.prototype._drawOverviewCanvas):
3249         (WebInspector.FlameChart.prototype.update):
3250
3251 2013-03-21  Eugene Klyuchnikov  <eustas@chromium.org>
3252
3253         Web Inspector: [Settings] Fix JS compiler warnings.
3254         https://bugs.webkit.org/show_bug.cgi?id=112879
3255
3256         Reviewed by Pavel Feldman.
3257
3258         Removed erroneous JSDoc.
3259
3260         * inspector/front-end/Settings.js: Removed erroneous JSDoc.
3261
3262 2013-03-20  Simon Fraser  <simon.fraser@apple.com>
3263
3264         Make GraphicsLayerCA::backingStoreMemoryEstimate() give a better estimate for tiled layers
3265         https://bugs.webkit.org/show_bug.cgi?id=112864
3266
3267         Reviewed by Tim Horton.
3268         
3269         If a GraphicsLayerCA has TiledBacking, ask the TiledBacking how
3270         much memory it's using for tiles, rather than just using 
3271         height * width * 4.
3272         
3273         Implement retainedTileBackingStoreMemory() in the TileController,
3274         summing the memory used by parented tiles.
3275
3276         The original code was incorrectly multiplying by contentsScale
3277         only once rather than twice (2x contents scale uses 4x as much memory).
3278
3279         * platform/graphics/TiledBacking.h:
3280         * platform/graphics/ca/GraphicsLayerCA.cpp:
3281         (WebCore::GraphicsLayerCA::backingStoreMemoryEstimate):
3282         * platform/graphics/ca/mac/TileController.h:
3283         * platform/graphics/ca/mac/TileController.mm:
3284         (WebCore::TileController::retainedTileBackingStoreMemory):
3285
3286 2013-03-20  Sheriff Bot  <webkit.review.bot@gmail.com>
3287
3288         Unreviewed, rolling out r146419.
3289         http://trac.webkit.org/changeset/146419
3290         https://bugs.webkit.org/show_bug.cgi?id=112870
3291
3292         Broke many tests on debug builds (Requested by rniwa_ on
3293         #webkit).
3294
3295         * DerivedSources.make:
3296         * GNUmakefile.am:
3297         * WebCore.gyp/WebCore.gyp:
3298         * WebCore.gyp/scripts/action_makenames.py:
3299         (main):
3300         * bindings/scripts/StaticString.pm: Removed.
3301         * dom/QualifiedName.cpp:
3302         (WebCore::createQualifiedName):
3303         * dom/QualifiedName.h:
3304         (WebCore):
3305         * dom/make_names.pl:
3306         (printNamesCppFile):
3307         (printDefinitions):
3308
3309 2013-03-20  Michael Pruett  <michael@68k.org>
3310
3311         [JSC] Implement EnforceRange IDL attribute for integer conversions
3312         https://bugs.webkit.org/show_bug.cgi?id=112506
3313
3314         Reviewed by Kentaro Hara.
3315
3316         Implement the EnforceRange attribute for JSC bindings.
3317
3318         The EnforceRange attribute requires a type error to be thrown when
3319         converting an ECMAScript number which is beyond the representable
3320         range of the IDL integer type.
3321
3322         Tests: fast/js/webidl-type-mapping.html
3323                storage/indexeddb/cursor-advance-workers.html
3324                storage/indexeddb/cursor-advance.html
3325                storage/indexeddb/intversion-bad-parameters.html
3326
3327         * WebCore.exp.in:
3328         * bindings/js/JSDOMBinding.cpp:
3329         (WebCore):
3330         (WebCore::enforceRange):
3331         (WebCore::toInt32EnforceRange):
3332         (WebCore::toUInt32EnforceRange):
3333         (WebCore::toInt64):
3334         (WebCore::toUInt64):
3335         * bindings/js/JSDOMBinding.h:
3336         (WebCore::toInt32):
3337         (WebCore):
3338         (WebCore::toUInt32):
3339         * bindings/scripts/CodeGeneratorJS.pm:
3340         (JSValueToNative):
3341         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3342         (WebCore::jsTestEventTargetPrototypeFunctionItem):
3343         * bindings/scripts/test/JS/JSTestObj.cpp:
3344         (WebCore::setJSTestObjShortAttr):
3345         (WebCore::setJSTestObjUnsignedShortAttr):
3346         (WebCore::setJSTestObjLongAttr):
3347         (WebCore::setJSTestObjLongLongAttr):
3348         (WebCore::setJSTestObjUnsignedLongLongAttr):
3349         (WebCore::setJSTestObjReflectedIntegralAttr):
3350         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
3351         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
3352         (WebCore::setJSTestObjAttrWithGetterException):
3353         (WebCore::setJSTestObjAttrWithSetterException):
3354         (WebCore::setJSTestObjWithScriptStateAttribute):
3355         (WebCore::setJSTestObjConditionalAttr1):
3356         (WebCore::setJSTestObjConditionalAttr2):
3357         (WebCore::setJSTestObjConditionalAttr3):
3358         (WebCore::setJSTestObjStrawberry):
3359         (WebCore::setJSTestObjId):
3360         (WebCore::setJSTestObjNullableLongSettableAttribute):
3361         (WebCore::setJSTestObjNullableStringValue):
3362         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
3363         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
3364         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
3365         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
3366         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
3367         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
3368         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
3369         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
3370         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
3371         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
3372         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
3373         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
3374         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
3375         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3376         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
3377         (WebCore::setJSTestTypedefsAttrWithGetterException):
3378         (WebCore::setJSTestTypedefsAttrWithSetterException):
3379
3380 2013-03-20  Hayato Ito  <hayato@chromium.org>
3381
3382         Gesture events should include AllowShadowContent in hit testing
3383         https://bugs.webkit.org/show_bug.cgi?id=112073
3384
3385         Reviewed by Dimitri Glazkov.
3386
3387         Support gesture events for Shadow DOM.
3388         Now 'gesturetap' events can be correctly dispatched in shadow trees.
3389
3390         Test: fast/dom/shadow/gesture-tap.html
3391
3392         * page/EventHandler.cpp:
3393         (WebCore::EventHandler::handleGestureEvent):
3394
3395 2013-03-20  Adam Barth  <abarth@webkit.org>
3396
3397         HTMLNames should construct strings at compile time
3398         https://bugs.webkit.org/show_bug.cgi?id=112831
3399
3400         Reviewed by Darin Adler.
3401
3402         This patch teaches make_names how to construct strings at compile time,
3403         eliminating a large number of startup mallocs.
3404
3405         * WebCore.gyp/WebCore.gyp:
3406         * WebCore.gyp/scripts/action_makenames.py:
3407             - Teach the Chromium build how to deal with Perl modules.
3408         * bindings/scripts/StaticString.pm: Added.
3409             - A Perl module for constructing static strings.
3410         (GenerateStrings):
3411         (GenerateValidateStrings):
3412         * dom/QualifiedName.cpp:
3413         (WebCore::createQualifiedName):
3414             - createQualifiedName now takes an already-constructed StringImpl
3415               object.
3416         * dom/QualifiedName.h:
3417         * dom/make_names.pl:
3418         (valueForName):
3419         (namesToStrings):
3420         (printNamesCppFile):
3421         (printDefinitions):
3422             - Teach make_names how to use StaticString.pm.
3423
3424 2013-03-20  Matt Falkenhagen  <falken@chromium.org>
3425
3426         Remove unnecessary calls to Node::disabled for <meter>, <progress>, and <output>
3427         https://bugs.webkit.org/show_bug.cgi?id=112767
3428
3429         Reviewed by Kent Tamura.
3430
3431         This is part of a refactoring to move Node::disabled to HTMLFormControlElement::disabled.
3432         The concept of disabled is just a form control element one.
3433
3434         HTMLMeterElement, HTMLOutputElement, and HTMLProgressElement never
3435         have disabled() return true, so we can remove the call. In addition,
3436         HTMLMeterElement and HTMLProgressElement no longer inherit from
3437         HTMLFormControlElement, so we don't need to override supportsFocus.
3438
3439         No new tests because no behavior change.
3440
3441         * html/HTMLMeterElement.cpp:
3442         * html/HTMLMeterElement.h:
3443         * html/HTMLOutputElement.cpp:
3444         (WebCore::HTMLOutputElement::supportsFocus):
3445         * html/HTMLProgressElement.cpp:
3446         * html/HTMLProgressElement.h:
3447
3448 2013-03-20  Jaehun Lim  <ljaehun.lim@samsung.com>
3449
3450         [css3-text] Parsing -webkit-each-line value for text-indent from css3-text
3451         https://bugs.webkit.org/show_bug.cgi?id=109021
3452  
3453         Reviewed by Julien Chaffraix.
3454  
3455         "each-line" is added for text-indent in CSS3.
3456         http://dev.w3.org/csswg/css3-text/#each-line
3457  
3458         This patch is the parsing part to support each-line value for text-indent.
3459  
3460         "each-line" means "Indentation affects the first line of the block
3461         container as well as each line after a forced line break, but does
3462         not affect lines after a soft wrap break."
3463  
3464         It's prefixed and guarded by CSS3_TEXT flag.
3465  
3466         Tests: fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited.html
3467                fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent.html
3468
3469         * css/CSSComputedStyleDeclaration.cpp:
3470         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3471             style.getPropertyCSSValue(text-indent) returns CSSPrimitiveValue when text-indent has only <length>
3472             or <percentage> value, but returns CSSValueList when text-indent also has -webkit-each-line.
3473
3474         * css/CSSParser.cpp:
3475         (WebCore::isSimpleLengthPropertyID): Removed CSSPropertyTextIndent case.
3476         (WebCore::CSSParser::parseValue):
3477         (WebCore::CSSParser::parseTextIndent): Added.
3478         * css/CSSParser.h:
3479             Parsed <length> or <percentage> with -webkit-each-line for text-indent.
3480
3481         * css/CSSValueKeywords.in: Added new -webkit-each-line keyword.
3482         * css/StyleBuilder.cpp:
3483         (ApplyPropertyTextIndent): Added.
3484         (WebCore::ApplyPropertyTextIndent::applyInheritValue):
3485         (WebCore::ApplyPropertyTextIndent::applyInitialValue):
3486         (WebCore::ApplyPropertyTextIndent::applyValue):
3487         (WebCore::ApplyPropertyTextIndent::createHandler):
3488         (WebCore::StyleBuilder::StyleBuilder):
3489             Added codes to handle applying text-indent offset and -webkit-each-line option to our style.
3490
3491         * rendering/style/RenderStyle.cpp:
3492         (WebCore::RenderStyle::diff):
3493         * rendering/style/RenderStyle.h:
3494         * rendering/style/RenderStyleConstants.h: Added enum TextIndentLine.
3495         * rendering/style/StyleRareInheritedData.cpp:
3496         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3497         (WebCore::StyleRareInheritedData::operator==):
3498         * rendering/style/StyleRareInheritedData.h: Added m_textIndentLine.
3499         (StyleRareInheritedData):
3500             Added the usual getter / setter / initial methods for m_textIndentLine.
3501
3502 2013-03-20  Tien-Ren Chen  <trchen@chromium.org>
3503
3504         Correct coordinated scrolling for RTL iframe and overflow:scroll
3505         https://bugs.webkit.org/show_bug.cgi?id=112088
3506
3507         Reviewed by James Robinson.
3508
3509         This patch adds appropriate offset in ScrollingCoordinatorChromium to
3510         adjust impl-side scroll position to the range [0, maxPos - minPos].
3511
3512         This also corrects RenderLayer to return correct scroll position for RTL,
3513         explained below:
3514
3515         There are 2 commonly used scroll offset coordinate systems in WebCore.
3516
3517         1. The scroll offset is the amount that needs to be translated when painting
3518            child elements in a RenderBox. The value can be negative when there is
3519            negative overflow (for RTL). The range will be within
3520            [overflow_top_left_corner, overflow_bottom_right_corner - client_size].
3521            This system is mainly used for painting and layer positioning.
3522            
3523         2. The scroll offset will be always non-negative, and the range will be within
3524            [0, content_size - client_size]. This system is mainly used for scrollbars.
3525
3526         scrollOrigin is defined to convert between the two systems. scrollOrigin is always
3527         non-negative, and equivalent to -overflow_top_left_corner.
3528
3529         The first system is used for ScrollableArea::scrollPosition/minimumScrollPosition/
3530         maximumScrollPosition function family. So is it implemented in ScrollView/Frameview.
3531         RenderLayer errorneously implemented scrollPosition in the second system,
3532         and worse, returned minimumScrollPosition/maximumScrollPosition were totally non-sense.
3533         This patch corrects RenderLayer to use the first coordinate system.
3534
3535         Test: compositing/rtl/rtl-overflow-scrolling.html
3536               ScrollingCoordinatorChromiumTest.rtlIframe
3537
3538         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
3539         (WebCore::ScrollingCoordinatorChromium::scrollableAreaScrollLayerDidChange):
3540         * rendering/RenderLayer.cpp:
3541         (WebCore::RenderLayer::scrollPosition):
3542         (WebCore::RenderLayer::minimumScrollPosition):
3543         (WebCore::RenderLayer::maximumScrollPosition):
3544         * rendering/RenderLayerBacking.cpp:
3545         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3546
3547 2013-03-20  Jessie Berlin  <jberlin@apple.com>
3548
3549         REGRESSION(r145592): AutodrainedPool.h. RunLoopTimer.h, SchedulePair.h are being copied into
3550         the wrong location
3551         https://bugs.webkit.org/show_bug.cgi?id=112833
3552
3553         Reviewed by Darin Adler.
3554
3555         Fix an incorrect include path.
3556
3557         * loader/DocumentLoader.h:
3558         RunLoopTimer.h lives in wtf as of r145592.
3559
3560 2013-03-20  Kent Tamura  <tkent@chromium.org>
3561
3562         Crash in Document::setFocusedNode if the frame of new focused node is detached in 'change' event handler
3563         https://bugs.webkit.org/show_bug.cgi?id=112653
3564
3565         Reviewed by Dimitri Glazkov.
3566
3567         Test: fast/frames/detach-frame-during-focus.html
3568
3569         * page/FocusController.cpp:
3570         (WebCore::FocusController::setFocusedNode):
3571         A oldDocument->setFocusedNode call might dispatch a 'change' event for
3572         an old focused node, and an event handler code might detach the
3573         newFocusedFrame. So we should check it. Without the check, the following
3574         newDocument->setFocusedNode call would crash because of null
3575         Frame::page().
3576
3577 2013-03-20  Ryosuke Niwa  <rniwa@webkit.org>
3578
3579         Assertion in LegacyWebArchive::create() in editing tests
3580         https://bugs.webkit.org/show_bug.cgi?id=112642
3581
3582         Reviewed by Simon Fraser.
3583
3584         Address Simon's review comment. Don't convert String to MIMEType just to convert it back to String.
3585
3586         * platform/mac/PasteboardMac.mm:
3587         (WebCore::fragmentFromWebArchive):
3588
3589 2013-03-20  Zan Dobersek  <zdobersek@igalia.com>
3590
3591         [GTK] Build ANGLE sources into a separate library from libWebCore.la
3592         https://bugs.webkit.org/show_bug.cgi?id=112778
3593
3594         Reviewed by Martin Robinson.
3595
3596         No new tests - no change in functionality.
3597
3598         * GNUmakefile.list.am: Remove the ANGLE sources listing, it's now placed in the ANGLE-specific GNUmakefile.am.
3599
3600 2011-03-20  Ryosuke Niwa  <rniwa@webkit.org>
3601
3602         Assertion in LegacyWebArchive::create() in editing tests
3603         https://bugs.webkit.org/show_bug.cgi?id=112642
3604
3605         Reviewed by Enrica Casucci.
3606
3607         It's possible for clipboard to be overriden between the time we retrieve clipboard types and the time
3608         we actually retrieve the Web archive buffer. Add a null check to take this into account.
3609
3610         Also extracted fragmentFromWebArchive for clarity.
3611
3612         * platform/mac/PasteboardMac.mm:
3613         (WebCore::fragmentFromWebArchive): Extracted.
3614         (WebCore::Pasteboard::documentFragment):
3615
3616 2013-03-20  Chris Fleizach  <cfleizach@apple.com>
3617
3618         WebSpeech: Crash in WebCore::PlatformSpeechSynthesisUtterance::client / WebCore::SpeechSynthesis::didResumeSpeaking
3619         https://bugs.webkit.org/show_bug.cgi?id=112728
3620
3621         Reviewed by Tim Horton.
3622
3623         When cancel() is called, there was a delay in the platform returning and saying speech was finished, which caused
3624         the m_currentSpeechUtterance variable to get deallocated but not cleared. 
3625
3626         This patch fixes up the management of the utterances in SpeechSynthesis and the Mac platform given that
3627         we can't rely on the platform to return immediately on a stop speaking job.
3628
3629         Test: platform/mac/fast/speechsynthesis/speech-synthesis-cancel-crash.html
3630
3631         * Modules/speech/SpeechSynthesis.cpp:
3632         (WebCore::SpeechSynthesis::cancel):
3633         (WebCore::SpeechSynthesis::resume):
3634         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3635         (-[WebSpeechSynthesisWrapper cancel]):
3636         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
3637         (-[WebSpeechSynthesisWrapper speechSynthesizer:willSpeakWord:ofString:]):
3638
3639 2013-03-20  Eric Carlson  <eric.carlson@apple.com>
3640
3641         Unreviewed, fix Mac release build.
3642
3643         * page/CaptionUserPreferencesMac.mm:
3644         (WebCore::languageIdentifier):
3645
3646 2013-03-20  Eric Carlson  <eric.carlson@apple.com>
3647
3648         Allow ports specific text track menu
3649         https://bugs.webkit.org/show_bug.cgi?id=112800
3650
3651         Reviewed by Dean Jackson.
3652
3653         No new tests, existing tests updated for changes.
3654
3655         * English.lproj/Localizable.strings: Add localizable strings for text track names.
3656
3657         * html/HTMLMediaElement.cpp:
3658         (WebCore::HTMLMediaElement::HTMLMediaElement): userPrefersCaptions -> shouldShowCaptions.
3659         (WebCore::HTMLMediaElement::setSelectedTextTrack): toggleTrackAtIndex -> setSelectedTextTrack.
3660         (WebCore::HTMLMediaElement::userPrefersCaptions): userPrefersCaptions -> shouldShowCaptions.
3661         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Get preferences from CaptionUserPreferences
3662             instead of from Settings.
3663         (WebCore::HTMLMediaElement::setSelectedTextTrack): Renamed from toggleTrackAtIndex. Now takes
3664             a TextTrack* instead of an int.
3665         (WebCore::HTMLMediaElement::captionPreferencesChanged): Don't force a recalculation unless 
3666             captions are enabled/disabled to avoid unnecessary thrash.
3667         * html/HTMLMediaElement.h:
3668
3669         * html/shadow/MediaControlElements.cpp:
3670         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Use the menu to track
3671             map instead of just the track index.
3672         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Build and configure the
3673             menu from the menu to track map.
3674         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Start with a list
3675             of tracks already sorted according to platform specific rules. Build a menu to track map
3676             so tracks are retained while the menu is visible.
3677         * html/shadow/MediaControlElements.h:
3678
3679         * html/shadow/MediaControls.cpp:
3680         (WebCore::MediaControls::textTrackPreferencesChanged): Call closedCaptionTracksChanged so the
3681             track menu will be rebuilt before it is shown again.
3682
3683         * html/track/InbandTextTrack.cpp:
3684         (WebCore::InbandTextTrack::containsOnlyForcedSubtitles): New, passthrough to the private track.
3685         (WebCore::InbandTextTrack::isMainProgramContent): Ditto.
3686         (WebCore::InbandTextTrack::isEasyToRead): Ditto.
3687         * html/track/InbandTextTrack.h:
3688         * html/track/TextTrack.h:
3689
3690         * html/track/TextTrackList.cpp:
3691         (WebCore::TextTrackList::contains): New.
3692         * html/track/TextTrackList.h:
3693
3694         * page/CaptionUserPreferences.cpp:
3695         (WebCore::CaptionUserPreferences::CaptionUserPreferences): Pull in from .h ditto.
3696         (WebCore::CaptionUserPreferences::~CaptionUserPreferences): Ditto.
3697         (WebCore::CaptionUserPreferences::shouldShowCaptions): Renamed from userPrefersCaptions. 
3698         (WebCore::CaptionUserPreferences::setShouldShowCaptions): New.
3699         (WebCore::CaptionUserPreferences::userPrefersCaptions): Ditto.
3700         (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
3701         (WebCore::CaptionUserPreferences::userPrefersSubtitles): Ditto.
3702         (WebCore::CaptionUserPreferences::setUserPrefersSubtitles): Ditto.
3703         (WebCore::CaptionUserPreferences::userPrefersTextDescriptions): Ditto.
3704         (WebCore::CaptionUserPreferences::setUserPrefersTextDescriptions): Ditto.
3705         (WebCore::CaptionUserPreferences::displayNameForTrack): Ditto.
3706         (WebCore::CaptionUserPreferences::sortedTrackListForMenu): Ditto.
3707         * page/CaptionUserPreferences.h:
3708
3709         * page/CaptionUserPreferencesMac.h:
3710         * page/CaptionUserPreferencesMac.mm:
3711         (WebCore::CaptionUserPreferencesMac::shouldShowCaptions): Renamed from userPrefersCaptions. 
3712         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): New.
3713         (WebCore::CaptionUserPreferences::userPrefersSubtitles): Ditto.
3714         (WebCore::trackDisplayName): Update logic used to build track title.
3715         (WebCore::CaptionUserPreferencesMac::displayNameForTrack): Call trackDisplayName.
3716         (WebCore::textTrackCompare): Text track title sort comparison function.
3717         (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): New. Sort the list of tracks
3718             according to title, language, and user preferences.
3719
3720         * platform/Language.cpp:
3721         (WebCore::displayNameForLanguageLocale): Don't leak the CFLocale.
3722         
3723         * platform/LocalizedStrings.cpp:
3724         (WebCore::textTrackCountryAndLanguageMenuItemText): New.
3725         (WebCore::textTrackLanguageMenuItemText): Ditto.
3726         (WebCore::closedCaptionTrackMenuItemText): Ditto.
3727         (WebCore::sdhTrackMenuItemText): Ditto.
3728         (WebCore::easyReaderTrackMenuItemText): Ditto.
3729         * platform/LocalizedStrings.h:
3730
3731         * platform/graphics/InbandTextTrackPrivate.h:
3732         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
3733         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
3734         (WebCore::InbandTextTrackPrivateAVFObjC::containsOnlyForcedSubtitles): New, return AVFoundation property.
3735         (WebCore::InbandTextTrackPrivateAVFObjC::isMainProgramContent): Ditto.
3736         (WebCore::InbandTextTrackPrivateAVFObjC::isEasyToRead): Ditto.
3737
3738         * testing/InternalSettings.cpp:
3739         (WebCore::InternalSettings::setShouldDisplayTrackKind): Set setting via CaptionUserPreferences
3740             instead of from Settings.
3741         (WebCore::InternalSettings::shouldDisplayTrackKind): Get setting from CaptionUserPreferences
3742             instead of from Settings.
3743
3744 2013-03-20  Zan Dobersek  <zdobersek@igalia.com>
3745
3746         [GTK] Clean up TemporaryLinkStubs.cpp
3747         https://bugs.webkit.org/show_bug.cgi?id=112820
3748
3749         Reviewed by Philippe Normand.
3750
3751         Clean up the TemporaryLinkStubs.cpp file, removing unnecessary includes and prettifying the code.
3752
3753         No new tests - no new functionality.
3754
3755         * platform/gtk/TemporaryLinkStubs.cpp:
3756         (WebCore):
3757         (WebCore::getSupportedKeySizes):
3758         (WebCore::signedPublicKeyAndChallengeString):
3759         (WebCore::userIdleTime):
3760
3761 2013-03-20  Yufeng Shen  <miletus@chromium.org>
3762
3763         Remove PlatformEvent::GestureDoubleTap
3764         https://bugs.webkit.org/show_bug.cgi?id=93045
3765
3766         Reviewed by Antonio Gomes.
3767
3768         PlatformEvent::GestureDoubleTap is not currently
3769         used in WebCore and replaced by GestureTap with
3770         tap count 2, so remove it.
3771
3772         Test: We are removing something that is not used, so
3773         no new test. All existing tests pass.
3774
3775         * dom/GestureEvent.cpp:
3776         (WebCore::GestureEvent::create):
3777         * page/EventHandler.cpp:
3778         (WebCore::EventHandler::handleGestureEvent):
3779         * platform/PlatformEvent.h:
3780         * platform/chromium/PopupContainer.cpp:
3781         (WebCore::PopupContainer::handleGestureEvent):
3782
3783 2013-03-20  Ojan Vafai  <ojan@chromium.org>
3784
3785         Move repaint methods from RenderObject to RenderBox
3786         https://bugs.webkit.org/show_bug.cgi?id=112773
3787
3788         Reviewed by Julien Chaffraix.
3789
3790         repaintOverhangingFloats and repaintDuringLayoutIfMoved are only ever called
3791         on RenderBoxes, so don't need to be on RenderObject. This also lets us
3792         devirtualize repaintDuringLayoutIfMoved.
3793
3794         * rendering/RenderBox.h:
3795         (WebCore::RenderBox::repaintOverhangingFloats):
3796         * rendering/RenderObject.cpp:
3797         * rendering/RenderObject.h:
3798
3799 2013-03-20  Christian Biesinger  <cbiesinger@chromium.org>
3800
3801         Add a feature observer for RenderDeprecatedFlexibleBox
3802         https://bugs.webkit.org/show_bug.cgi?id=112740
3803
3804         Reviewed by Tony Chang.
3805
3806         No new tests - only adding measurements.
3807
3808         * page/FeatureObserver.h:
3809         Add constants for RenderDeprecatedFlexibleBox, and add separate
3810         constants for its use in the UI and in extensions.
3811         * rendering/RenderDeprecatedFlexibleBox.cpp:
3812         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
3813         Call FeatureObserver. Check the document()->url() to see which
3814         constant to use.
3815
3816 2013-03-20  Tim Horton  <timothy_horton@apple.com>
3817
3818         Autosize should use documentRect height instead of scrollHeight
3819         https://bugs.webkit.org/show_bug.cgi?id=112770
3820
3821         Reviewed by David Levin.
3822
3823         Autosizing fails to compute the correct height if the root element is very
3824         small but the document has significant overflow.
3825
3826         No new tests; autosizing is not currently exposed in a testable way on Mac.
3827
3828         * page/FrameView.cpp:
3829         (WebCore::FrameView::autoSizeIfEnabled):
3830
3831 2013-03-20  Julien Chaffraix  <jchaffraix@webkit.org>
3832
3833         [CSS Grid Layout] Improper repainting when grid item change their position
3834         https://bugs.webkit.org/show_bug.cgi?id=112749
3835
3836         Reviewed by Ojan Vafai.
3837
3838         Tests: fast/css-grid-layout/grid-element-change-columns-repaint.html
3839                fast/css-grid-layout/grid-element-change-rows-repaint.html
3840                fast/css-grid-layout/grid-item-change-column-repaint.html
3841                fast/css-grid-layout/grid-item-change-row-repaint.html
3842
3843         * rendering/RenderGrid.cpp:
3844         (WebCore::RenderGrid::layoutGridItems):
3845         Added a call to repaintDuringLayoutIfMoved to repaint moving grid items.
3846
3847 2013-03-20  Arvid Nilsson  <anilsson@rim.com>
3848
3849         [BlackBerry] compositing/iframes/scroll-fixed-transformed-element.html fails in manual testing
3850         https://bugs.webkit.org/show_bug.cgi?id=112806
3851
3852         Reviewed by Antonio Gomes.
3853
3854         PR 283363
3855
3856         When scrolling the iframe, the position: fixed element is correctly
3857         positioned, that is, as if it was fixed with respect to the iframe's
3858         viewport. When scrolling the main frame however, the fixed pos element
3859         was positioned as if it was fixed with respect to the main frame's
3860         viewport.
3861
3862         Fixed by falling back to using the WebKit-thread scroll position for
3863         fixed positioning in LayerRenderer, if the override doesn't have a
3864         position currently set, i.e. if we are not currently scrolling the
3865         iframe.
3866
3867         The effects of the bug are only visual, i.e. not detectable by DRT.
3868
3869         Manually testable using compositing/iframes/scroll-fixed-transformed-element.html
3870
3871         * platform/graphics/blackberry/LayerRenderer.cpp:
3872         (WebCore::LayerRenderer::updateLayersRecursive):
3873
3874 2013-03-20  Michael Pruett  <michael@68k.org>
3875
3876         [V8] Simplify implementation of EnforceRange conversions
3877         https://bugs.webkit.org/show_bug.cgi?id=112758
3878
3879         Reviewed by Kentaro Hara.
3880
3881         Factor out EnforceRange conversion into a helper function.
3882         Simplify calculation for truncation.
3883
3884         Tests: fast/js/webidl-type-mapping.html
3885                storage/indexeddb/cursor-advance.html
3886                storage/indexeddb/cursor-advance-workers.html
3887                storage/indexeddb/intversion-bad-parameters.html
3888
3889         * bindings/v8/V8Binding.cpp:
3890         (WebCore::enforceRange):
3891         (WebCore):
3892         (WebCore::toInt32):
3893         (WebCore::toUInt32):
3894         (WebCore::toInt64):
3895         (WebCore::toUInt64):
3896
3897 2013-03-20  Harald Alvestrand  <hta@google.com>
3898
3899         Remove Local/Remote and RTCStatsElement from WebRTCStats API
3900         https://bugs.webkit.org/show_bug.cgi?id=112678
3901
3902         Reviewed by Adam Barth.
3903
3904         Pure removal, remaining functionality covered by existing test.
3905
3906         * Modules/mediastream/RTCStatsReport.cpp:
3907         * Modules/mediastream/RTCStatsReport.h:
3908         (RTCStatsReport):
3909         * Modules/mediastream/RTCStatsResponse.cpp:
3910         * Modules/mediastream/RTCStatsResponse.h:
3911         (RTCStatsResponse):
3912         * platform/chromium/support/WebRTCStatsResponse.cpp:
3913         * platform/mediastream/RTCStatsResponseBase.h:
3914         (RTCStatsResponseBase):
3915
3916 2013-03-20  Xingnan Wang  <xingnan.wang@intel.com>
3917
3918         ASSERTION FAILED: !m_renderingAutomaticPullNodes.size()
3919         https://bugs.webkit.org/show_bug.cgi?id=112777
3920
3921         Reviewed by Chris Rogers.
3922
3923         * Modules/webaudio/AudioContext.cpp:
3924         (WebCore::AudioContext::~AudioContext):
3925
3926 2013-03-20  Rouslan Solomakhin  <rouslan@chromium.org>
3927
3928         Copy-paste should not spellcheck when continuous spellcheck is turned off
3929         https://bugs.webkit.org/show_bug.cgi?id=112464
3930
3931         Reviewed by Ryosuke Niwa.
3932
3933         Test: editing/spelling/spellcheck-paste-continuous-disabled.html
3934
3935         * WebCore.exp.in: Export WebCore::Editor::isContinuousSpellCheckingEnabled() and WebCore::Editor::toggleContinuousSpellChecking() for use by internals.
3936         * WebCore.order: Export WebCore::Editor::isContinuousSpellCheckingEnabled() and WebCore::Editor::toggleContinuousSpellChecking() for use by internals.
3937         * editing/Editor.cpp:
3938         (WebCore::Editor::replaceSelectionWithFragment): Do not spellcheck if continuous spellcheck is turned off.
3939         * testing/Internals.cpp:
3940         (WebCore::Internals::resetToConsistentState): Leave continuous spellcheck turned on after a test.
3941         (WebCore::Internals::setContinuousSpellCheckingEnabled): Let tests enable and disable continuous spellcheck.
3942         (WebCore):
3943         * testing/Internals.h: Let tests enable and disable continuous spellcheck.
3944         (Internals):
3945         * testing/Internals.idl: Let tests enable and disable continuous spellcheck.
3946
3947 2013-03-20  Aaron Colwell  <acolwell@chromium.org>
3948
3949         Add support for MediaSource::isTypeSupported()
3950         https://bugs.webkit.org/show_bug.cgi?id=112301
3951
3952         Reviewed by Darin Fisher.
3953
3954         Test: http/tests/media/media-source/video-media-source-is-type-supported.html
3955
3956         * Modules/mediasource/MediaSource.cpp:
3957         (WebCore::MediaSource::addSourceBuffer): Added isTypeSupported() call to verify parameters
3958                                                  pass into this method.
3959         (WebCore::MediaSource::isTypeSupported):
3960         (WebCore):
3961         * Modules/mediasource/MediaSource.h:
3962         (MediaSource):
3963         * Modules/mediasource/MediaSource.idl: Added isTypeSupported().
3964         * platform/MIMETypeRegistry.h:
3965         (MIMETypeRegistry): Added isSupportedMediaSourceMIMEType().
3966         * platform/chromium/MIMETypeRegistryChromium.cpp:
3967         (WebCore):
3968         (WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType): Implemented in terms of WebMimeRegistry::isSupportedMediaSourceMIMEType.
3969
3970 2013-03-20  Brent Fulgham  <bfulgham@webkit.org>
3971
3972         [WinCairo] Unreviewed VS2010 build correction.
3973
3974         * WebCore.vcxproj/WebCore.vcxproj: Enable build of NetworkStorageSessionStub.cpp
3975         for WinCairo port.
3976         * WebCore.vcxproj/WebCore.vcxproj.filters: Correct build type of
3977         CookieJarCurl from 'custom' to 'C++ source file'
3978
3979 2013-03-20  Marja Hölttä  <marja@chromium.org>
3980
3981         [V8] Rename DOMDataStore::isMainWorldObject
3982         https://bugs.webkit.org/show_bug.cgi?id=112817
3983
3984         Reviewed by Jochen Eisinger.
3985
3986         No new tests (no changes in functionality).
3987
3988         * bindings/v8/DOMDataStore.h:
3989         (WebCore::DOMDataStore::getWrapperFast):
3990         (WebCore::DOMDataStore::getWrapper):
3991         (WebCore::DOMDataStore::getWrapperForMainWorld):
3992         (WebCore::DOMDataStore::setWrapper):
3993         (WebCore::DOMDataStore::canExistInWorker):
3994
3995 2013-03-20  Ilya Tikhonovsky  <loislo@chromium.org>
3996
3997         Web Inspector: Flame Chart. Provide Overview pane for better user expirience.
3998         https://bugs.webkit.org/show_bug.cgi?id=112496
3999
4000         Reviewed by Yury Semikhatsky.
4001
4002         This patch implements basic part of Overview Pane in FlameChart.
4003         The idea of the patch is to move everything into chart-container element.
4004         And put OverviewGrid into new overview-container element.
4005
4006         Drive by change: fix the layout of the flame chart elements.
4007         Drive by change: fix the drag window & drag resizer mechanics
4008         for the case when the parent element has zero offsetLeft.
4009
4010         * inspector/front-end/FlameChart.js:
4011         (WebInspector.FlameChart):
4012         (WebInspector.FlameChart.OverviewCalculator):
4013         (WebInspector.FlameChart.OverviewCalculator.prototype._updateBoundaries):
4014         (WebInspector.FlameChart.OverviewCalculator.prototype.computePosition):
4015         (WebInspector.FlameChart.OverviewCalculator.prototype.formatTime):
4016         (WebInspector.FlameChart.OverviewCalculator.prototype.maximumBoundary):
4017         (WebInspector.FlameChart.OverviewCalculator.prototype.minimumBoundary):
4018         (WebInspector.FlameChart.OverviewCalculator.prototype.boundarySpan):
4019         (WebInspector.FlameChart.prototype._onWindowChanged):
4020         (WebInspector.FlameChart.prototype._adjustXScale):
4021         (WebInspector.FlameChart.prototype.update):
4022         * inspector/front-end/OverviewGrid.js:
4023         (WebInspector.OverviewGrid.Window):
4024         (WebInspector.OverviewGrid.Window.prototype._resizerElementStartDragging):
4025         (WebInspector.OverviewGrid.Window.prototype._leftResizeElementDragging):
4026         (WebInspector.OverviewGrid.Window.prototype._rightResizeElementDragging):
4027         (WebInspector.OverviewGrid.Window.prototype._startWindowSelectorDragging):
4028         (WebInspector.OverviewGrid.Window.prototype._windowSelectorDragging):
4029         (WebInspector.OverviewGrid.Window.prototype._endWindowSelectorDragging):
4030         (WebInspector.OverviewGrid.Window.prototype._setWindowPosition):
4031         (WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
4032         (WebInspector.OverviewGrid.WindowSelector):
4033         * inspector/front-end/TimelineOverviewPane.js:
4034         * inspector/front-end/flameChart.css:
4035         (.chart-container .item-anchor):
4036         (.overview-container):
4037         (.chart-container):
4038         (#flame-chart-overview-grid .resources-dividers-label-bar):