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