[Qt] Poor rounding in GraphicsContext::drawLineForText
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2
3         [Qt] Poor rounding in GraphicsContext::drawLineForText
4         https://bugs.webkit.org/show_bug.cgi?id=113301
5
6         Reviewed by Jocelyn Turcotte.
7
8         Round the position of the line decoration, so lines on subpixel
9         coordinates are not always rounded up.
10
11         * platform/graphics/qt/GraphicsContextQt.cpp:
12         (WebCore::GraphicsContext::drawLineForText):
13
14 2013-03-26  Vsevolod Vlasov  <vsevik@chromium.org>
15
16         Web Inspector: Decorations in several consecutive lines are not moved correctly in DTE.
17         https://bugs.webkit.org/show_bug.cgi?id=113296
18
19         Reviewed by Pavel Feldman.
20
21         Separated removing and adding decorations so that moved decorations are not removed when next line is processed.
22
23         * inspector/front-end/DefaultTextEditor.js:
24         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
25
26 2013-03-26  Yury Semikhatsky  <yurys@chromium.org>
27
28         Remove references to non-chromium entries from WebCore.gypi (part 2)
29         https://bugs.webkit.org/show_bug.cgi?id=103124
30
31         Reviewed by Pavel Feldman.
32
33         * WebCore.gypi: removed unused references to gtk, cf, win and mac
34
35 2013-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
36
37         Unreviewed, rolling out r146767.
38         http://trac.webkit.org/changeset/146767
39         https://bugs.webkit.org/show_bug.cgi?id=113295
40
41         Rolling out until nicer fonts / sizes are chosen (Requested by
42         pfeldman on #webkit).
43
44         * inspector/front-end/dataGrid.css:
45         (.data-grid table):
46         (.data-grid td):
47         * inspector/front-end/inspector.css:
48         (.toolbar-label):
49         (body.show-toolbar-icons .toolbar-label):
50         (.console-message .bubble):
51         (li .status .bubble):
52         (.source-frame-breakpoint-message):
53         (.soft-context-menu):
54         (.drawer-header-close-button):
55         * inspector/front-end/inspectorCommon.css:
56         (body):
57         * inspector/front-end/networkLogView.css:
58         (.network-log-grid.data-grid td):
59         (.network-log-grid.data-grid.small td):
60         * inspector/front-end/tabbedPane.css:
61         (.tabbed-pane-header-tab):
62         (.tabbed-pane-header-tab-close-button):
63         * inspector/front-end/timelinePanel.css:
64         (.timeline-tree-item .count):
65         (.timeline-records-stats, .storage-application-cache-status, .storage-application-cache-connectivity):
66         (.memory-counter-sidebar-info):
67         (.memory-counter-value):
68
69 2013-03-26  Arpita Bahuguna  <a.bah@samsung.com>
70
71         Unable to insert a paragraph in between some text whose previous sibling is a non-editable block.
72         https://bugs.webkit.org/show_bug.cgi?id=113007
73
74         Reviewed by Ryosuke Niwa.
75
76         Unable to insert a line break in between a text that follows a
77         non-editable block but is itself contained within an editable
78         block.
79
80         While comparing the positions from the start block till the
81         insertion position, we should ignore the nodes that do not
82         generate a visiblePosition for the position before the node.
83         This ultimately results in an assert within comparePositions().
84
85         For this case, the firstChild of the start block is a text
86         node with no renderer which would thus not generate a candidate
87         position for itself.
88         There is also no candidate previous to it, and since
89         the position after it lies within a different editable element (root),
90         no candidate after it as well.
91         Such a point will thus return a null visiblePosition.
92
93         Test: editing/inserting/insert-paragraph-between-text.html
94
95         * editing/InsertParagraphSeparatorCommand.cpp:
96         (WebCore::InsertParagraphSeparatorCommand::doApply):
97         Added a check to verify the generated visiblePosition (for the
98         position before the node) prior to carrying out a comparison with
99         the insertion point.
100
101 2013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
102
103         Web Inspector: OverviewGrid. Dragged window may change its width due to accumulating rounding error.
104         https://bugs.webkit.org/show_bug.cgi?id=113138
105
106         Reviewed by Pavel Feldman.
107
108         The old version had problem with rounding because it recalculates the window size on each event.
109         The new version just calculates the dragging delta and moves the window
110         to the new position based on the initial values and the delta.
111
112         * inspector/front-end/OverviewGrid.js:
113         (WebInspector.OverviewGrid.Window.prototype._startWindowDragging):
114         (WebInspector.OverviewGrid.Window.prototype._windowDragging):
115         (WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
116
117 2013-03-26  Kent Tamura  <tkent@chromium.org>
118
119         Rename HTMLInputElement::isIndeterminate to Element::shouldAppearIndeterminate
120         https://bugs.webkit.org/show_bug.cgi?id=113264
121
122         Reviewed by Kentaro Hara.
123
124         HTMLInputElement had indeterminate() and isIndeterminate(). It's very
125         confusing.
126
127         Because indeterminate is a public DOM function and isIndeterminate is
128         for CSS and rendering, we rename isIndetermiante to
129         shouldAppearIndeterminate. Also, HTMLProgressElement, which support
130         :indeterminate pseudo class, should follow it. We add
131         shouldAppearIndeterminate to Element.
132
133         No new tests. Just a refactoring.
134
135         * dom/Element.cpp:
136         (WebCore::Element::shouldAppearIndeterminate): Added. Returns false.
137         * dom/Element.h:
138         (Element): Declare shouldAppearIndeterminate.
139         * html/HTMLInputElement.cpp:
140         (WebCore::HTMLInputElement::shouldAppearIndeterminate):
141         Renamed from isIndeterminate.
142         * html/HTMLInputElement.h:
143         (HTMLInputElement): Rename isIndeterminate to shouldAppearIndeterminate,
144         and overrides Element::shouldAppearIndeterminate.
145         * html/HTMLProgressElement.cpp:
146         (WebCore::HTMLProgressElement::shouldAppearIndeterminate): Added.
147         * html/HTMLProgressElement.h: Add shouldAppearIndeterminate.
148
149         * accessibility/AccessibilityNodeObject.cpp:
150         (WebCore::AccessibilityNodeObject::isIndeterminate):
151         Use shouldAppearIndeterminate.
152         * css/SelectorChecker.cpp:
153         (WebCore::SelectorChecker::checkOne): Ditto.
154         * css/StyleResolver.cpp:
155         (WebCore::StyleResolver::canShareStyleWithControl): Ditto.
156         * rendering/RenderTheme.cpp:
157         (WebCore::RenderTheme::isIndeterminate): Ditto.
158
159 2013-03-26  Pan Deng  <pan.deng@intel.com>
160
161         Web Inspector: [FlameChart] Make function bar highlighted consistent with cursor.
162         https://bugs.webkit.org/show_bug.cgi?id=113266.
163
164         Reviewed by Vsevolod Vlasov.
165
166         In Flamechart, the highlighted function bar is not consistent with cursor sometimes, 
167         reason is that time range that converted from cursor position is truncated by floor. 
168         Actually float value is expected to compare with function startTime and duration.
169
170         No new tests.
171
172         * inspector/front-end/FlameChart.js:
173         (WebInspector.FlameChart.prototype._coordinatesToNodeIndex): Remove floor
174
175 2013-03-26  Mihnea Ovidenie  <mihnea@adobe.com>
176
177         [CSSRegions]: Crash accessing offsetParent for contentNodes inside a flow thread
178         https://bugs.webkit.org/show_bug.cgi?id=112730
179
180         Reviewed by Levi Weintraub.
181
182         When computing the offsetParent for an element inside a flow thread, do not
183         let the algorithm process past the flow thread boundaries, until we figure out
184         the proper behavior. When reaching the flow thread, offsetParent will return 0,
185         thus preventing the assert while calling toElement inside Element::offsetParent.
186
187         The attached test sets the ground work and will be changed to match the right behavior.
188         For now, it makes sure we do not crash or return HTMLDocument as offsetParent for
189         elements inside the flow thread.
190
191         Test: fast/regions/offsetParent-in-flow-thread.html
192
193         * rendering/RenderObject.cpp:
194         (WebCore::RenderObject::offsetParent):
195
196 2013-03-26  Dominik Röttsches  <dominik.rottsches@intel.com>
197
198         Remove HarfBuzzShaperBase
199         https://bugs.webkit.org/show_bug.cgi?id=112087
200
201         Reviewed by Martin Robinson.
202
203         Folding HarfBuzzShaperBase into HarfBuzzShaper since
204         there is no harfbuzz-old vs. harfbuzz-ng distinction anymore.
205
206         No new tests, no change in behavior.
207
208         * GNUmakefile.list.am: Removing HarfBuzzShaperBase.*
209         * PlatformEfl.cmake: Removing HarfBuzzShaperBase.*
210         * WebCore.gypi: Removing HarfBuzzShaperBase.*
211         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Folding base class members and methods into HarfBuzzShaper.
212         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
213         (WebCore::normalizeSpacesAndMirrorChars):
214         (WebCore):
215         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
216         (WebCore::HarfBuzzShaper::isWordEnd):
217         (WebCore::HarfBuzzShaper::determineWordBreakSpacing):
218         (WebCore::HarfBuzzShaper::setPadding):
219         * platform/graphics/harfbuzz/HarfBuzzShaper.h: Folding base class members and methods into HarfBuzzShaper.
220         (HarfBuzzShaper):
221         (WebCore::HarfBuzzShaper::isCodepointSpace):
222         * platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp: Removed.
223         * platform/graphics/harfbuzz/HarfBuzzShaperBase.h: Removed.
224
225 2013-03-22  Hajime Morrita  <morrita@google.com>
226
227         Listening touch events on ShadowRoot can crash.
228         https://bugs.webkit.org/show_bug.cgi?id=113035
229
230         Reviewed by Kentaro Hara.
231
232         TreeScope destructor clears a document reference on ShadowRoot but
233         destructors of ContainerNode and Node assumed it being available
234         and tried to access it for some cleanup purposes.
235
236         This change extracts such cleanup to Node::willBeDeletedFrom() and
237         calls it from ShadowRoot dtor before the document reference gets cleared.
238
239         Test: fast/dom/shadow/shadow-root-touch-listener-crash.html
240
241         * dom/ContainerNode.cpp:
242         (WebCore::ContainerNode::~ContainerNode): Adopted willBeDeletedFrom()
243         * dom/Node.cpp:
244         (WebCore::Node::~Node): Adopted willBeDeletedFrom()
245         (WebCore::Node::willBeDeletedFrom): Extracted from Node and ContainerNode
246         (WebCore):
247         * dom/Node.h:
248         * dom/ShadowRoot.cpp:
249         (WebCore::ShadowRoot::~ShadowRoot): Adopted willBeDeletedFrom()
250
251 2013-03-25  Hajime Morrita  <morrita@google.com>
252
253         Custom Elements Refactoring: The name V8CustomElement is confusing.
254         https://bugs.webkit.org/show_bug.cgi?id=113165
255
256         Reviewed by Kent Tamura.
257
258         This change moves functions from V8CustomElement to CustomElementHelpers and
259         removes V8CustomElement. V8CustomElement is just a heritage of old design
260         and no longer makes sense.
261
262         No new tests. No behavior change.
263
264         * WebCore.gypi:
265         * bindings/v8/CustomElementHelpers.cpp:
266         (WebCore::CustomElementHelpers::createWrapper):
267         (WebCore):
268         * bindings/v8/CustomElementHelpers.h:
269         (CustomElementHelpers):
270         (WebCore::CustomElementHelpers::wrap):
271         (WebCore):
272         (WebCore::CustomElementHelpers::constructorOf):
273         * bindings/v8/V8CustomElement.cpp: Removed.
274         * bindings/v8/V8CustomElement.h: Removed.
275         * bindings/v8/custom/V8CustomElementConstructorCustom.cpp:
276         (WebCore::V8CustomElementConstructor::callAsFunctionCallback):
277         * dom/make_names.pl:
278         (printWrapperFactoryCppFile):
279
280 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
281
282         Web Inspector: [Timeline] Records sidebar is clipped.
283         https://bugs.webkit.org/show_bug.cgi?id=113177
284
285         Reviewed by Pavel Feldman.
286
287         Analysis: depending on CSS injection order sidebar rule that overwrites
288         "bottom" property may win.
289
290         Fix: make timeline-specific rule "important".
291
292         * inspector/front-end/timelinePanel.css:
293         (.timeline .sidebar): Make "bottom" value "important".
294
295 2013-03-25  Kent Tamura  <tkent@chromium.org>
296
297         Rename ENABLE_INPUT_TYPE_DATETIME
298         https://bugs.webkit.org/show_bug.cgi?id=113254
299
300         Reviewed by Kentaro Hara.
301
302         Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
303         Actually I'd like to remove the code, but we shouldn't remove it yet
304         because we shipped products with it on some platforms.
305
306         * Configurations/FeatureDefines.xcconfig:
307         * bindings/generic/RuntimeEnabledFeatures.cpp:
308         (WebCore):
309         * bindings/generic/RuntimeEnabledFeatures.h:
310         (RuntimeEnabledFeatures):
311         * css/html.css:
312         * html/DateTimeInputType.cpp:
313         * html/DateTimeInputType.h:
314         * html/InputType.cpp:
315         (WebCore::createInputTypeFactoryMap):
316
317 2013-03-25  Timothy Hatcher  <timothy@apple.com>
318
319         Make the Web Inspector console work in strict mode with JavaScriptCore.
320
321         https://webkit.org/b/65829
322         rdar://problem/11271238
323
324         Reviewed by Oliver Hunt.
325
326         * bindings/js/JSInjectedScriptHostCustom.cpp:
327         (WebCore::JSInjectedScriptHost::evaluate):
328         Return the evalFunction directly.
329
330         * inspector/InjectedScriptHost.h:
331         (WebCore::InjectedScriptHost::evaluateReturnsEvalFunction):
332         Added. Return true on JSC and false on V8.
333
334         * inspector/InjectedScriptHost.idl:
335         Added evaluateReturnsEvalFunction and change evaluate to an attribute on JSC.
336
337         * inspector/InjectedScriptSource.js:
338         (InjectedScript.prototype._evaluateOn): Change from using 'with' statements to creating
339         a closure that evaluates the expression. The command line APIs are passed as parameters
340         to the closure so they are in scope but not injected. This allows the code evaluated in
341         the console to stay in strict mode (if is was already set), or to get strict mode by
342         prefixing expressions with 'use strict';.
343
344 2013-03-25  Tony Chang  <tony@chromium.org>
345
346         Image alt text not included in plain-text version when copying
347         https://bugs.webkit.org/show_bug.cgi?id=11200
348
349         Reviewed by Ryosuke Niwa.
350
351         Add a setting to enable copying image alt text to the clipboard and drag and drop pasteboard.
352         This setting is disabled by default, so each port can enable if they want to match IE10 and
353         Firefox's behavior.
354
355         Test: editing/pasteboard/copy-image-with-alt-text.html
356
357         * editing/Editor.cpp:
358         (WebCore::Editor::cut): Explicitly ask that the selection on the pasteboard as being for the clipboard.
359         (WebCore::Editor::copy): Explicitly ask that the selection on the pasteboard as being for the clipboard.
360         (WebCore::Editor::selectedText): Add a private version of selectedText() that can choose between having image alt text or not.
361         (WebCore::Editor::selectedTextForClipboard): Ask for image alt text if the setting is enabled.
362         * editing/Editor.h:
363         * editing/TextIterator.cpp:
364         (WebCore::TextIterator::TextIterator): Add a bool to keep track of whether or not to emit image alt text.
365         (WebCore::TextIterator::handleReplacedElement): If there's alt text, point the iterator to it.
366         * editing/TextIterator.h:
367         (TextIterator):
368         * editing/mac/EditorMac.mm:
369         (WebCore::Editor::takeFindStringFromSelection): Use the same text as on the clipboard.
370         (WebCore::Editor::writeSelectionToPasteboard): Don't include image alt text since this is
371         used by Services.
372         (WebCore::Editor::stringSelectionForPasteboard): Don't include image alt text since this is
373         used by Services.
374         * page/DragController.cpp:
375         (WebCore::DragController::startDrag): Use image alt text (matches Firefox).
376         * page/Settings.in: Add a setting that disables image alt text by default.
377         * platform/Pasteboard.h:
378         * platform/blackberry/PasteboardBlackBerry.cpp:
379         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
380         * platform/chromium/ClipboardChromium.cpp:
381         (WebCore::ClipboardChromium::writeRange): Use clipboard text when writing ranges (used by d&d).
382         * platform/chromium/PasteboardChromium.cpp:
383         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
384         * platform/efl/PasteboardEfl.cpp:
385         (WebCore::Pasteboard::writeSelection): Update function param.
386         * platform/gtk/ClipboardGtk.cpp:
387         (WebCore::ClipboardGtk::writeRange): Use clipboard text when writing ranges (used by d&d).
388         * platform/gtk/PasteboardGtk.cpp:
389         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
390         * platform/mac/ClipboardMac.mm:
391         (WebCore::ClipboardMac::writeRange): Use clipboard text when writing ranges (used by d&d).
392         * platform/mac/PasteboardMac.mm:
393         (WebCore::Pasteboard::getStringSelection): Use ShouldSerializeSelectedTextForClipboard to determine whether the selected
394         text is for the clipboard or not.
395         (WebCore::Pasteboard::writeSelectionForTypes): Pass ShouldSerializeSelectedTextForClipboard through.
396         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
397         * platform/qt/ClipboardQt.cpp:
398         (WebCore::ClipboardQt::writeRange): Use clipboard text when writing ranges (used by d&d).
399         * platform/qt/PasteboardQt.cpp:
400         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
401         * platform/win/ClipboardWin.cpp:
402         (WebCore::ClipboardWin::writeRange): Use clipboard text when writing ranges (used by d&d).
403         * platform/win/PasteboardWin.cpp:
404         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
405         * platform/wince/PasteboardWinCE.cpp:
406         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
407         * platform/wx/PasteboardWx.cpp:
408         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
409         * rendering/RenderImage.h:
410         (WebCore::RenderImage::altText): Add a getter for the alt text.
411
412 2013-03-25  Dean Jackson  <dino@apple.com>
413
414         Remove autostart hashing code from WebCore
415         https://bugs.webkit.org/show_bug.cgi?id=113242
416
417         Reviewed by Tim Horton.
418
419         Remove PlugInOriginHash and all the related build entries.
420
421         * CMakeLists.txt:
422         * GNUmakefile.list.am:
423         * Target.pri:
424         * WebCore.gypi:
425         * WebCore.vcproj/WebCore.vcproj:
426         * WebCore.vcxproj/WebCore.vcxproj:
427         * WebCore.vcxproj/WebCore.vcxproj.filters:
428         * WebCore.xcodeproj/project.pbxproj:
429         * html/HTMLPlugInImageElement.cpp:
430         * plugins/PlugInOriginHash.cpp: Removed.
431         * plugins/PlugInOriginHash.h: Removed.
432
433 2013-03-25  Roger Fong  <roger_fong@apple.com>
434
435         Unreviewed. Wrong place to enable RuntimeEnabledFeature for Windows.
436
437         * bindings/generic/RuntimeEnabledFeatures.cpp:
438         (WebCore):
439
440 2013-03-25  James Robinson  <jamesr@chromium.org>
441
442         [chromium] Support GraphicsLayer::setContentsToSolidColor
443         https://bugs.webkit.org/show_bug.cgi?id=104396
444
445         Reviewed by Adrienne Walker.
446
447         This enables and implements the GraphicsLayer::setContentsToSolidColor
448         path for Chromium.
449
450         Tested by reftests in compositing/background-color/ and several other
451         compositing/ tests.
452
453         * platform/graphics/GraphicsLayer.h:
454         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
455         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
456         (WebCore::GraphicsLayerChromium::setContentsToSolidColor):
457         (WebCore):
458         * platform/graphics/chromium/GraphicsLayerChromium.h:
459         (WebKit):
460         (GraphicsLayerChromium):
461
462 2013-03-25  Victor Carbune  <vcarbune@chromium.org>
463
464         TextTrack Extension for WebVTT Regions
465         https://bugs.webkit.org/show_bug.cgi?id=109820
466
467         Reviewed by Eric Carlson.
468
469         Implemented the TextTrackRegionList and extended TextTrack with
470         methods required for proper interaction with TextTrackRegion objects.
471
472         Test: media/track/regions-webvtt/text-track-region-list.html
473
474         * WebCore.gypi: Added files for proper building of TextTrackRegionList.
475         * html/track/TextTrack.cpp:
476         (WebCore::TextTrack::TextTrack):
477         (WebCore):
478         (WebCore::TextTrack::ensureTextTrackRegionList): Method for creating a
479         TextTrackRegionList associated with the current track, if it does exist
480         already.
481         (WebCore::TextTrack::regions): Getter for the regions object.
482         (WebCore::TextTrack::addRegion): Method for adding a region.
483         (WebCore::TextTrack::removeRegion): Method for removing a region.
484         * html/track/TextTrack.h:
485         (WebCore):
486         (TextTrack):
487         * html/track/TextTrack.idl: Added methods specific for region handling.
488         * html/track/TextTrackRegion.cpp:
489         (WebCore::TextTrackRegion::TextTrackRegion): Initialized the track member variable.
490         (WebCore::TextTrackRegion::setTrack): Added internal setter for the track attribute.
491         (WebCore):
492         (WebCore::TextTrackRegion::updateParametersFromRegion): Method to copy the parameters
493         from a different region object.
494         * html/track/TextTrackRegion.h: Added track member variable and copy method.
495         (WebCore::TextTrackRegion::track): Getter retrieves now the member variable.
496         (TextTrackRegion):
497         * html/track/TextTrackRegionList.cpp: Implemented methods required by the IDL.
498         (WebCore):
499         (WebCore::TextTrackRegionList::TextTrackRegionList):
500         (WebCore::TextTrackRegionList::length):
501         (WebCore::TextTrackRegionList::item):
502         (WebCore::TextTrackRegionList::getRegionById):
503         (WebCore::TextTrackRegionList::add):
504         (WebCore::TextTrackRegionList::remove):
505         (WebCore::TextTrackRegionList::clear):
506         * html/track/TextTrackRegionList.h:
507         (WebCore):
508         (TextTrackRegionList):
509         (WebCore::TextTrackRegionList::create):
510         (WebCore::TextTrackRegionList::~TextTrackRegionList):
511         * html/track/TextTrackRegionList.idl: IDL defined by the specification.
512
513 2013-03-25  Dean Jackson  <dino@apple.com>
514
515         Cleanup plugin snapshotting autostart decision making
516         https://bugs.webkit.org/show_bug.cgi?id=113231
517
518         Reviewed by Tim Horton.
519
520         Move the code that creates a hash of plugin origin info
521         out of WebCore. All WebCore needs to do now is simply ask its
522         host layer whether or not a tuple of (pluginOrigin, pageOrigin, mimeType)
523         should autostart or not.
524
525         As a drive-by, the code in subframeLoaderWillCreatePlugIn was not quite
526         restarting properly when the displayState was Restarting or
527         RestartingWithPendingMouseClick. It still worked most of the time, but usually
528         because the code ran soon after a mouse click. Now it should be explicit and
529         also allowed us to be more clear about snapshotting at the end of the method.
530
531         * html/HTMLPlugInElement.h: No more pluginOriginHash().
532         * html/HTMLPlugInImageElement.cpp:
533         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin): Change signature to accept the tuple
534             described above, and compare strings rather than hashes.
535         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Tell host layer the origin
536             info rather than hash info.
537         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Remember the url that
538             the plugin was loaded from. Make some of the logging messages more clear. Test for
539             plugin and page origin rather than hash.
540         * html/HTMLPlugInImageElement.h:
541         (WebCore::HTMLPlugInImageElement::loadedUrl): New loadedURL member function.
542         * page/PlugInClient.h:
543         (PlugInClient): Change signature of virtual class to accept origin and mimeType info
544             rather than hash.
545
546 2013-03-25  Sheriff Bot  <webkit.review.bot@gmail.com>
547
548         Unreviewed, rolling out r146793.
549         http://trac.webkit.org/changeset/146793
550         https://bugs.webkit.org/show_bug.cgi?id=113248
551
552         Fix did not work (Requested by rfong on #webkit).
553
554         * bindings/scripts/preprocessor.pm:
555         (applyPreprocessor):
556
557 2013-03-25  Brandon Jones  <bajones@google.com>
558
559         WEBGL_compressed_texture_pvrtc needs implementation
560         https://bugs.webkit.org/show_bug.cgi?id=110497
561
562         Reviewed by Kenneth Russell.
563
564         Test: webgl/conformance/extensions/webgl-compressed-texture-pvrtc.html
565
566         Exposes the WEBGL_compressed_texture_pvrtc extension, but is unverified since no desktop hardware supports
567         the format that I am aware of. Should enable mobile ports to expose the format, however.
568
569         * CMakeLists.txt:
570         * DerivedSources.make:
571         * DerivedSources.pri:
572         * GNUmakefile.list.am:
573         * Target.pri:
574         * WebCore.gypi:
575         * WebCore.xcodeproj/project.pbxproj:
576         * bindings/js/JSWebGLRenderingContextCustom.cpp:
577         (WebCore::toJS):
578         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
579         (WebCore::toV8Object):
580         * html/canvas/WebGLCompressedTexturePVRTC.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
581         (WebCore):
582         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
583         (WebCore::WebGLCompressedTexturePVRTC::~WebGLCompressedTexturePVRTC):
584         (WebCore::WebGLCompressedTexturePVRTC::getName):
585         (WebCore::WebGLCompressedTexturePVRTC::create):
586         (WebCore::WebGLCompressedTexturePVRTC::supported):
587         * html/canvas/WebGLCompressedTexturePVRTC.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
588         (WebCore):
589         (WebGLCompressedTexturePVRTC):
590         * html/canvas/WebGLCompressedTexturePVRTC.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
591         * html/canvas/WebGLExtension.h:
592         * html/canvas/WebGLRenderingContext.cpp:
593         (WebCore):
594         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
595         (WebCore::WebGLRenderingContext::getExtension):
596         (WebCore::WebGLRenderingContext::getSupportedExtensions):
597         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
598         * html/canvas/WebGLRenderingContext.h:
599         (WebCore):
600         (WebGLRenderingContext):
601
602 2013-03-25  Roger Fong  <roger_fong@apple.com>
603
604         Enable CSS_REGIONS and CSS_EXCLUSIONS.
605         https://bugs.webkit.org/show_bug.cgi?id=87519
606
607         Reviewed by Timothy Horton.
608
609         * bindings/generic/RuntimeEnabledFeatures.cpp:
610         (WebCore):
611
612 2013-03-25  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
613
614         Remove unused code from Frame class destructor
615         https://bugs.webkit.org/show_bug.cgi?id=113181
616
617         Reviewed by Alexey Proskuryakov.
618
619         No new tests. No new functionality.
620
621         * page/Frame.cpp:
622         (WebCore::Frame::~Frame):
623
624             Removed the code which could never have been executed
625             as m_view had been set to '0'.
626
627 2013-03-25  Eric Seidel  <eric@webkit.org>
628
629         Incorrect parsing due to hash collision
630         https://bugs.webkit.org/show_bug.cgi?id=113235
631
632         Reviewed by Adam Barth.
633
634         Test: fast/parser/tag-hash-collision.html
635
636         * html/parser/HTMLIdentifier.cpp:
637         (WebCore::HTMLIdentifier::findIndex):
638
639 2013-03-25  Adenilson Cavalcanti  <cavalcantii@gmail.com>
640
641         Compile without SVG will fail
642         https://bugs.webkit.org/show_bug.cgi?id=113234
643
644         Reviewed by Timothy Hatcher.
645
646         Only make the cast to SVGStyleElement if we have SVG support built.
647
648         * inspector/InspectorCSSAgent.cpp:
649         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
650
651 2013-03-25  Patrick Gansterer  <paroga@webkit.org>
652
653         Enable STORE_FONT_CUSTOM_PLATFORM_DATA for all platforms
654         https://bugs.webkit.org/show_bug.cgi?id=108438
655
656         Reviewed by Andreas Kling.
657
658         Remove the conditional code so it is turned on for all platforms.
659
660         * loader/cache/CachedFont.cpp:
661         (WebCore::CachedFont::~CachedFont):
662         (WebCore::CachedFont::ensureCustomFontData):
663         (WebCore::CachedFont::platformDataFromCustomData):
664         (WebCore::CachedFont::allClientsRemoved):
665         (WebCore::CachedFont::reportMemoryUsage):
666
667 2013-03-25  Eric Carlson  <eric.carlson@apple.com>
668
669         REGRESSION(r146380): media/track/track-user-preferences.html
670         https://bugs.webkit.org/show_bug.cgi?id=113083
671
672         Reviewed by Jer Noble.
673
674         Ignore track change notifications triggered by automatic track selection so the 
675         configuration is not changed.
676
677         No new tests, this fixes an existing test.
678
679         * html/HTMLMediaElement.cpp:
680         (WebCore::HTMLMediaElement::configureTextTrackGroup): Clear m_processingPreferenceChange after all
681             track configuration is finished.
682         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Do nothing if m_processingPreferenceChange
683             is true.
684
685 2013-03-25  Martin Robinson  <mrobinson@igalia.com>
686
687         [GTK] [gyp] Build the final piece of WebCore
688         https://bugs.webkit.org/show_bug.cgi?id=113216
689
690         Reviewed by Nico Weber.
691
692         * WebCore.gyp/WebCoreGTK.gyp: Add the rest of the WebCore source files to the WebCore build target.
693
694 2013-03-25  Martin Robinson  <mrobinson@igalia.com>
695
696         [GTK] [gyp] Adding support for building WebCore rendering
697         https://bugs.webkit.org/show_bug.cgi?id=113213
698
699         Reviewed by Gustavo Noronha Silva.
700
701         * WebCore.gyp/WebCoreGTK.gyp: Build the rendering directory into a shared library.
702
703 2013-03-25  Tony Chang  <tony@chromium.org>
704
705         Remove TextIterator argumentless constructor
706         https://bugs.webkit.org/show_bug.cgi?id=113226
707
708         Reviewed by Ryosuke Niwa.
709
710         The TextIterator argumentless constructors are never used and wouldn't be useful
711         since you can't specify a range.
712
713         No new tests, removing dead code. There should be no behavior change.
714
715         * editing/TextIterator.cpp: Remove constructors.
716         * editing/TextIterator.h:
717         (TextIterator):
718         (SimplifiedBackwardsTextIterator):
719         (CharacterIterator):
720         (BackwardsCharacterIterator):
721         (WordAwareIterator):
722
723 2013-03-25  Brandon Jones  <bajones@chromium.org>
724
725         Enabled canvas.getContext("webgl") on Desktop Chrome
726         https://bugs.webkit.org/show_bug.cgi?id=113079
727
728         Reviewed by Dean Jackson.
729
730         Test: fast/canvas/webgl/webgl-unprefixed-context-id.html
731
732         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
733         (WebCore::V8HTMLCanvasElement::getContextMethodCustom):
734         * html/HTMLCanvasElement.cpp:
735         (WebCore::HTMLCanvasElement::getContext):
736
737 2013-03-25  Roger Fong  <roger_fong@apple.com>
738
739         Unreviewed. Remove some suspicious looking code in an attempt to fix EWS bots.
740
741         * bindings/scripts/preprocessor.pm:
742         (applyPreprocessor):
743
744 2013-03-25  Martin Robinson  <mrobinson@igalia.com>
745
746         [GTK] [gyp] Add support for building the platform directory
747         https://bugs.webkit.org/show_bug.cgi?id=113212
748
749         Reviewed by Nico Weber.
750
751         * WebCore.gyp/WebCoreGTK.gyp: Add support for building the platform directory including
752         two libraries, one for platform and one for geometry files. This follows the approach
753         of Chromium.
754
755 2013-03-25  Jochen Eisinger  <jochen@chromium.org>
756
757         Swap both the error and change event queue before processing fullscreen events
758         https://bugs.webkit.org/show_bug.cgi?id=113194
759
760         Reviewed by Jer Noble.
761
762         While processing the change events, not only new change events but
763         also new error events might get generated. However, for the timer, we
764         should only process preexisting events.
765
766         This is covered by fullscreen/full-screen-restrictions.html which times
767         out depending on the delay between requesting fullscreen and granting
768         fullscreen.
769
770         * dom/Document.cpp:
771         (WebCore::Document::fullScreenChangeDelayTimerFired):
772
773 2013-03-25  Marja Hölttä  <marja@chromium.org>
774
775         [V8] Generate specialized callbacks for the main world
776         https://bugs.webkit.org/show_bug.cgi?id=112430
777
778         Reviewed by Kentaro Hara.
779
780         The new specialized bindings will be faster, because they don't need to
781         do the "main world, isolated world or a worker" check, but can right
782         away assume that we're in the main world.
783
784         This patch generates main world bindings for getters and setters for a
785         small amount of frequently used functions / functions used by Dromaeo.
786
787         Added tests to TestObj.idl and updated bindings tests.
788
789         * bindings/scripts/CodeGeneratorV8.pm:
790         (GenerateOverloadedFunction):
791         (GenerateFunctionCallback):
792         (GenerateFunction):
793         (GenerateParametersCheck):
794         (GenerateSingleConstructorCallback):
795         (GenerateNonStandardFunction):
796         (GenerateImplementation):
797         (GenerateFunctionCallString):
798         * bindings/scripts/test/TestObj.idl:
799         * bindings/scripts/test/V8/V8Float64Array.cpp:
800         (WebCore):
801         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
802         (WebCore):
803         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
804         (WebCore):
805         * bindings/scripts/test/V8/V8TestInterface.cpp:
806         (WebCore):
807         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
808         (WebCore):
809         * bindings/scripts/test/V8/V8TestObj.cpp:
810         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetter):
811         (TestObjV8Internal):
812         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterCallback):
813         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterForMainWorld):
814         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterCallbackForMainWorld):
815         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetter):
816         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetterCallback):
817         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetterForMainWorld):
818         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetterCallbackForMainWorld):
819         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetter):
820         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterCallback):
821         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterForMainWorld):
822         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterCallbackForMainWorld):
823         (WebCore::TestObjV8Internal::perWorldMethodMethod):
824         (WebCore::TestObjV8Internal::perWorldMethodMethodForMainWorld):
825         (WebCore::TestObjV8Internal::perWorldMethodMethodCallback):
826         (WebCore::TestObjV8Internal::perWorldMethodMethodCallbackForMainWorld):
827         (WebCore::TestObjV8Internal::overloadedPerWorldMethod1Method):
828         (WebCore::TestObjV8Internal::overloadedPerWorldMethod1MethodForMainWorld):
829         (WebCore::TestObjV8Internal::overloadedPerWorldMethod2Method):
830         (WebCore::TestObjV8Internal::overloadedPerWorldMethod2MethodForMainWorld):
831         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethod):
832         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld):
833         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethodCallback):
834         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorld):
835         (WebCore):
836         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
837         (WebCore):
838         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
839         (WebCore):
840         * bindings/v8/V8DOMConfiguration.cpp:
841         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
842         (WebCore::V8DOMConfiguration::configureTemplate):
843         * bindings/v8/V8DOMConfiguration.h:
844         (BatchedMethod):
845         (V8DOMConfiguration):
846         * dom/Document.idl:
847         * dom/Element.idl:
848         * dom/Node.idl:
849         * page/DOMWindow.idl:
850
851 2013-03-25  Daniel Cheng  <dcheng@chromium.org>
852
853         Don't allow drags to start after a mouse press that creates a context menu
854         https://bugs.webkit.org/show_bug.cgi?id=112079
855
856         Reviewed by Tony Chang.
857
858         This appears to be the intent of the original code anyway (the comments in the corresponding
859         context menu handlers indicate that they set m_mousePressed to false in order to suppress
860         drags from starting). Since exact platform behavior differs quite a bit in this area, this
861         will also make the behavior more consistent across different WebKit implementations.
862
863         Manually testable using context-menu-during-drag-selection.html.
864
865         * page/EventHandler.cpp:
866         (WebCore::EventHandler::handleMouseDraggedEvent):
867
868 2013-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
869
870         Web Inspector: [Regression] Provisional breakpoints are not shown on reload.
871         https://bugs.webkit.org/show_bug.cgi?id=113210
872
873         Reviewed by Pavel Feldman.
874
875         * inspector/front-end/BreakpointManager.js:
876         (WebInspector.BreakpointManager.prototype._restoreBreakpoints):
877         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
878         (WebInspector.BreakpointManager.prototype._projectWillReset):
879         (WebInspector.BreakpointManager.prototype._breakpointResolved):
880         * inspector/front-end/utilities.js:
881
882 2013-03-25  Sergey Ryazanov  <serya@chromium.org>
883
884         Web Inspector: Remove console warnings for *_ prefixed CSS styles
885         https://bugs.webkit.org/show_bug.cgi?id=113175
886
887         Reviewed by Pavel Feldman.
888
889         Added separate error message for syntax CSS error in declaration list when no property detected.
890         Added filter for messages starting with '*'.
891
892         * css/CSSGrammar.y.in:
893
894 2013-03-25  Alexis Hetu  <sugoi@chromium.org>
895
896         Integration of the Skia displacement mapping into WebKit
897         https://bugs.webkit.org/show_bug.cgi?id=112927
898
899         Reviewed by Stephen White.
900
901         Added displacement mapping to effect-reference.html and
902         effect-reference-hw.html
903
904         * WebCore.gypi:
905         * platform/graphics/filters/FEDisplacementMap.h:
906         (FEDisplacementMap):
907         Adding Skia specific declarations
908         * platform/graphics/filters/skia/FEDisplacementMapSkia.cpp: Added.
909         (WebCore):
910         (WebCore::toSkiaMode):
911         Provides conversion between the WebKit displacement mapping mode and
912         the Skia displacement mapping mode
913         (WebCore::FEDisplacementMap::platformApplySkia):
914         Displacement through the Skia API. (Accelerated only for now)
915         (WebCore::FEDisplacementMap::createImageFilter):
916         Displacement image filter creation through the Skia API.
917
918 2013-03-25  Vladislav Kaznacheev  <kaznacheev@chromium.org>
919
920         Web Inspector: Graduate some new Inspector APIs to public
921         https://bugs.webkit.org/show_bug.cgi?id=113176
922
923         Reviewed by Pavel Feldman.
924
925         Summary of changes:
926             DOM.highlightNode.nodeId: required parameter is now optional
927             Input: domain has been added
928             Runtime.enable: command has been added
929             Runtime.executionContextCreated: event has been added
930             Page.clearGeolocationOverride: command has been added
931             Page.setGeolocationOverride: command has been added
932             Page.captureScreenshot: command has been added
933             Debugger.setBreakpointByUrl.locations: optional response parameter is now required
934
935
936         * inspector/Inspector.json:
937
938 2013-03-25  Andrey Kosyakov  <caseq@chromium.org>
939
940         Web Inspector: [Timeline] set glue records mode off by default
941         https://bugs.webkit.org/show_bug.cgi?id=113189
942
943         Reviewed by Pavel Feldman.
944
945         * inspector/front-end/TimelinePanel.js: /glueRecordsSetting/s/true/false/
946
947 2013-03-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
948
949         [EFL] Fix build break when media source is enabled
950         https://bugs.webkit.org/show_bug.cgi?id=113143
951
952         Unreviewed. Build error needs to be fixed in order to start to implement
953         media source functionality.
954
955         * CMakeLists.txt:
956         * platform/efl/MIMETypeRegistryEfl.cpp:
957         (WebCore):
958         (WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType):
959         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
960         (WebCore):
961         (WebCore::MediaPlayerPrivateGStreamer::load):
962         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
963         (MediaPlayerPrivateGStreamer):
964
965 2013-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
966
967         Web Inspector: Toggling breakpoint with shortcut should be freezed as well while editing.
968         https://bugs.webkit.org/show_bug.cgi?id=113188
969
970         Reviewed by Pavel Feldman.
971
972         * inspector/front-end/JavaScriptSourceFrame.js:
973         (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine):
974
975 2013-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
976
977         Web Inspector: Remove unneeded code from JavaScriptSourceFrame.
978         https://bugs.webkit.org/show_bug.cgi?id=113182
979
980         Reviewed by Pavel Feldman.
981
982         * inspector/front-end/JavaScriptSourceFrame.js:
983         (WebInspector.JavaScriptSourceFrame):
984
985 2013-03-25  Alexei Filippov  <alph@chromium.org>
986
987         Web Inspector: Fonts refactoring
988         https://bugs.webkit.org/show_bug.cgi?id=113047
989
990         Reviewed by Pavel Feldman.
991
992         Unify fonts usage across inspector.
993         Make inspector default font depend on platform.
994
995         * inspector/front-end/dataGrid.css:
996         (.data-grid table):
997         (.data-grid td):
998         * inspector/front-end/inspector.css:
999         (.toolbar-label):
1000         (body.show-toolbar-icons .toolbar-label):
1001         (.console-message .bubble):
1002         (li .status .bubble):
1003         (.source-frame-breakpoint-message):
1004         (.soft-context-menu):
1005         * inspector/front-end/inspectorCommon.css:
1006         (body):
1007         * inspector/front-end/networkLogView.css:
1008         (.network-log-grid.data-grid td):
1009         (.network-log-grid.data-grid.small td):
1010         * inspector/front-end/tabbedPane.css:
1011         (.tabbed-pane-header-tab):
1012         (select.tabbed-pane-header-tabs-drop-down-select):
1013         * inspector/front-end/timelinePanel.css:
1014         (.memory-counter-value):
1015
1016 2013-03-25  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1017
1018         Web Inspector: Use generate-inspector-protocol-version to list valid public API changes
1019         https://bugs.webkit.org/show_bug.cgi?id=113148
1020
1021         Added --show-changes command line option.
1022         Used existing compare_schemas method to do a reverse compare.
1023         Fixed a number of small problems (missing domain name in the message,
1024         incorrect error messages for command parameters).
1025
1026         Reviewed by Pavel Feldman.
1027
1028         * inspector/generate-inspector-protocol-version:
1029         (named_list_to_map):
1030         (removed):
1031         (required):
1032         (compare_schemas):
1033         (compare_domains):
1034         (compare_commands):
1035         (compare_events):
1036         (compare_params_list):
1037         (compare_types):
1038         (self_test):
1039         (self_test.create_test_schema_1):
1040         (self_test.create_test_schema_2):
1041         (self_test.is_subset):
1042         (self_test.errors_match):
1043         (main):
1044
1045 2013-03-25  Alec Flett  <alecflett@chromium.org>
1046
1047         Support Quota API in Workers
1048         https://bugs.webkit.org/show_bug.cgi?id=112972
1049
1050         Reviewed by Adam Barth.
1051
1052         Tests: fast/workers/shared-worker-storagequota-query-usage.html
1053                fast/workers/worker-storagequota-query-usage.html
1054
1055         * Modules/quota/WorkerNavigatorStorageQuota.cpp: Added.
1056         * Modules/quota/WorkerNavigatorStorageQuota.h: Added.
1057         * Modules/quota/WorkerNavigatorStorageQuota.idl: Added.
1058         * WebCore.gypi: Add entries for WorkerNavigatorStorageQuota.
1059         * page/WorkerNavigator.h: Add a Navigator supplement that extends the worker navigator.
1060
1061 2013-03-25  Mike West  <mkwst@chromium.org>
1062
1063         CSP 1.1: Rename SecurityPolicyViolationEvent::sourceURL to ::sourceFile.
1064         https://bugs.webkit.org/show_bug.cgi?id=113033
1065
1066         Reviewed by Jochen Eisinger.
1067
1068         Bringing our experimental implementation into line with the spec, which
1069         has landed on the de facto standard name Gecko has been sending out for
1070         years and years.
1071
1072         Spec: https://dvcs.w3.org/hg/content-security-policy/rev/e44f4003e158
1073         Thread: http://lists.w3.org/Archives/Public/public-webappsec/2013Mar/0087.html
1074
1075         * dom/SecurityPolicyViolationEvent.h:
1076         (SecurityPolicyViolationEventInit):
1077         (WebCore::SecurityPolicyViolationEvent::sourceFile):
1078         (WebCore::SecurityPolicyViolationEvent::SecurityPolicyViolationEvent):
1079         (SecurityPolicyViolationEvent):
1080         * dom/SecurityPolicyViolationEvent.idl:
1081         * page/ContentSecurityPolicy.cpp:
1082         (WebCore::gatherSecurityPolicyViolationEventData):
1083             s/sourceURL/sourceFile/
1084
1085 2013-03-25  Michelangelo De Simone  <michelangelo@webkit.org>
1086
1087         [CSS Filters] Using negative drop-shadow radius values has slow performance
1088         https://bugs.webkit.org/show_bug.cgi?id=107848
1089
1090         Setting negative blur radius values in drop-shadow() and box-shadow() led to
1091         significant rendering performance loss. The invalid value overflowed and the
1092         embedder became unresponsive for few seconds.
1093         This impacted SVG too (SVGFEDropShadow and SVGFEGaussianBlur).
1094
1095         Reviewed by Dirk Schulze.
1096
1097         Tests: css3/filters/effect-drop-shadow-negative-radius.html
1098                fast/box-shadow/box-shadow-parsing-invalid.html
1099                svg/filters/feDropShadow-negative-deviation-expected.svg
1100                svg/filters/feDropShadow-negative-deviation.svg
1101                svg/filters/feDropShadow-zero-deviation.svg
1102                svg/filters/feGaussianBlur-negative-deviation-expected.svg
1103                svg/filters/feGaussianBlur-negative-deviation.svg
1104                svg/filters/feGaussianBlur-zero-deviation.svg
1105
1106         * css/CSSParser.cpp:
1107         (WebCore::CSSParser::parseShadow): Negative values are skipped during parsing: as per
1108         CSS Background and Borders specs, negative values shall not be allowed.
1109         * platform/graphics/filters/FEGaussianBlur.cpp:
1110         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): Added "non-negative" assertion for
1111         negative deviations.
1112         * svg/SVGFEDropShadowElement.cpp:
1113         (WebCore::SVGFEDropShadowElement::build): If a negative standard deviation is encountered, don't
1114         build the filter and returns earlier, this avoids unnecessary calls: FEGaussianBlur is not being
1115         created with wrong and potentially overflowing values.
1116         * svg/SVGFEGaussianBlurElement.cpp:
1117         (WebCore::SVGFEGaussianBlurElement::build): Ditto.
1118
1119 2013-03-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1120
1121         [Qt] REGRESSION(r146630): 8 text related test asserts on debug builds
1122         https://bugs.webkit.org/show_bug.cgi?id=113179
1123
1124         Reviewed by Jocelyn Turcotte.
1125
1126         Test if range.start is within the valid range before testing the value at that point.
1127
1128         * platform/graphics/qt/FontQt.cpp:
1129         (WebCore::Font::initFormatForTextLayout):
1130
1131 2013-03-25  Alexander Pavlov  <apavlov@chromium.org>
1132
1133         Web Inspector: Properly handle the rule addition to an XML or SVG document.
1134         https://bugs.webkit.org/show_bug.cgi?id=113185
1135
1136         Reviewed by Pavel Feldman.
1137
1138         * inspector/InspectorCSSAgent.cpp:
1139         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1140
1141 2013-03-25  Peter Rybin  <prybin@chromium.org>
1142
1143         Web Inspector: support changing local variables in frontend
1144         https://bugs.webkit.org/show_bug.cgi?id=112470
1145
1146         Reviewed by Yury Semikhatsky.
1147
1148         ScopeRef type is added to RemoteObject and setPropertyValue is patched accordingly.
1149
1150         Test: inspector/debugger/debugger-change-variable.html
1151
1152         * inspector/front-end/DebuggerModel.js:
1153         (WebInspector.DebuggerModel.CallFrame.prototype.get id):
1154         * inspector/front-end/ObjectPropertiesSection.js:
1155         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
1156         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
1157         * inspector/front-end/RemoteObject.js:
1158         (WebInspector.RemoteObject):
1159         (WebInspector.RemoteObject.fromScopePayload):
1160         (WebInspector.RemoteObject.prototype.):
1161         (WebInspector.RemoteObject.prototype.setPropertyValue):
1162         (WebInspector.RemoteObject.prototype.setVariableValueCallback):
1163         (WebInspector.RemoteObject.prototype._setDeclarativeVariableValue):
1164         (WebInspector.ScopeRef):
1165         * inspector/front-end/ScopeChainSidebarPane.js:
1166         (WebInspector.ScopeChainSidebarPane.prototype.update):
1167
1168 2013-03-25  Mike West  <mkwst@chromium.org>
1169
1170         CSP 1.1: Strip URLs in SecurityPolicyViolationEvents, just as we do for POSTed violation reports.
1171         https://bugs.webkit.org/show_bug.cgi?id=113039
1172
1173         Reviewed by Jochen Eisinger.
1174
1175         I'd originally assumed that we didn't need to be quite so careful when
1176         handing URLs to JavaScript via SecurityPolicyViolationEvents. This was
1177         a mistake. Cross-origin URLs aren't accessible to JavaScript currently
1178         and there's no reason that we should begin exposing them via an event.
1179
1180         This patch extracts the stripping logic from the existing reports into
1181         stripURLForUseInReport(), and uses that new method when populating the
1182         event and report objects.
1183
1184         Relatedly, we were doing the wrong thing with 'file:' URLs, which this
1185         patch made clear. Now they're treated the same as 'data:' et al.
1186
1187         Spec: https://dvcs.w3.org/hg/content-security-policy/rev/45f6ccaba0ef
1188
1189         Tests: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script.html
1190                http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image.html
1191                http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script.html
1192                http/tests/security/contentSecurityPolicy/report-blocked-file-uri.html
1193
1194         * page/ContentSecurityPolicy.cpp:
1195         (WebCore::stripURLForUseInReport):
1196             Extract the logic from blockedURI out into a reusable method:
1197             cross-origin URLs are stripped down to the ASCII serialization of
1198             their origin, and non-heirarchical (and 'file:') URLs are stripped
1199             down to the ASCII serialization of their protocol.
1200         (WebCore::gatherSecurityPolicyViolationEventData):
1201         (WebCore::ContentSecurityPolicy::reportViolation):
1202             Use ::stripURLForUseInReport for blockedURL and sourceFile
1203             attributes in these two methods.
1204
1205 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
1206
1207         Web Inspector: Fix JSDocs.
1208         https://bugs.webkit.org/show_bug.cgi?id=113025
1209
1210         Reviewed by Pavel Feldman.
1211
1212         Next version of JS compiler finds more inconsistencies
1213         and ambiguous declarations.
1214         Some of them are resolved in this patch.
1215
1216         * inspector/InjectedScriptSource.js: Fix JSDocs.
1217         * inspector/front-end/ConsoleModel.js: Ditto.
1218         * inspector/front-end/CookieParser.js: Ditto.
1219         * inspector/front-end/FileContentView.js: Ditto.
1220         * inspector/front-end/HeapSnapshotView.js: Ditto.
1221         * inspector/front-end/IndexedDBModel.js: Ditto.
1222         * inspector/front-end/ProfilesPanelDescriptor.js: Ditto.
1223         * inspector/front-end/utilities.js: Ditto.
1224
1225 2013-03-25  Mike West  <mkwst@chromium.org>
1226
1227         Cleanup: Tiny nits in ContentSecurityPolicy::reportViolation.
1228         https://bugs.webkit.org/show_bug.cgi?id=112784
1229
1230         Reviewed by Jochen Eisinger.
1231
1232         Just cleanup of three tiny nits I ran across in
1233         ContentSecurityPolicy::reportViolation while doing other work.
1234
1235         - 'directiveText' and 'effectiveDirective' can't be empty; we pass in
1236           values at every callsite. We can safely remove the 'isEmpty()' checks.
1237           Moreover, even if they could possibly somehow be empty, we should
1238           still include those empty strings in the report, rather than
1239           dropping the values entirely.
1240
1241         - We don't need to hold 'document->referrer()' in a temp variable.
1242
1243         * page/ContentSecurityPolicy.cpp:
1244         (WebCore::ContentSecurityPolicy::reportViolation):
1245
1246 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
1247
1248         Web Inspector: [Overview] Make "drag-to-move" feature more discoverable.
1249         https://bugs.webkit.org/show_bug.cgi?id=113032
1250
1251         Reviewed by Pavel Feldman.
1252
1253         To move overview window user could drag-n-drop over
1254         time "ribbon" on OverviewGrid.
1255
1256         This feature is hard to discover.
1257
1258         Setting "move" cursor will make this feature more discoverable.
1259
1260         * inspector/front-end/inspectorCommon.css:
1261         Set "move" cursor to draggable area.
1262         * inspector/front-end/OverviewGrid.js: Ditto.
1263
1264 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
1265
1266         Web Inspector: [Profiles] Remove unused private member.
1267         https://bugs.webkit.org/show_bug.cgi?id=113015
1268
1269         Reviewed by Pavel Feldman.
1270
1271         _profileGroupsForLinks is not used anymore.
1272
1273         * inspector/front-end/ProfilesPanel.js:
1274         (WebInspector.ProfilesPanel.prototype._reset): Removed unused member.
1275
1276 2013-03-25  PhistucK  <phistuck@chromium.org>
1277
1278         Web Inspector: Exception when turning on pretty print without any displayed source in the editor
1279         https://bugs.webkit.org/show_bug.cgi?id=113136
1280
1281         Reviewed by Vsevolod Vlasov.
1282
1283         No new tests.
1284         Added a check for the existence of currently edited document.
1285
1286         * inspector/ScriptsPanel.js:
1287         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
1288
1289 2013-03-25  Mihnea Ovidenie  <mihnea@adobe.com>
1290
1291         [CSSRegions] Remove RenderRegion::printRegionObjectsStyles
1292         https://bugs.webkit.org/show_bug.cgi?id=113081
1293
1294         Reviewed by Tony Chang.
1295
1296         No change in functionality, remove unused function..
1297
1298         * rendering/RenderRegion.h:
1299
1300 2013-03-25  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
1301
1302         [Texmap] Memory leak when closing a tab
1303         https://bugs.webkit.org/show_bug.cgi?id=112127
1304
1305         Reviewed by Noam Rosenthal.
1306
1307         When closing a tab, if there are any updates pending in CoordinatedGraphicsScene's
1308         render queue, the scene is not freed because reference count of m_scene is not zero.
1309
1310         No new tests.
1311
1312         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1313         (WebCore::CoordinatedGraphicsScene::detach): When bind updates in CoordinatedGraphicsScene,
1314         the reference count of m_scene is increasing, if m_renderQueue is not empty
1315         before closing tab, then m_scene is never freed.
1316         Hence, when closing tab, need to clear m_renderQueue explicitly in order to
1317         destroy m_scene.
1318
1319 2013-03-25  Keishi Hattori  <keishi@webkit.org>
1320
1321         Clear button visibility is not updated when restoring form state
1322         https://bugs.webkit.org/show_bug.cgi?id=113172
1323
1324         Clear button wasn't showing up when restoring form state.
1325
1326         Reviewed by Kent Tamura.
1327
1328         Tests: fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-visibility-after-restore.html
1329                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-visibility-after-restore.html
1330                fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-visibility-after-restore.html
1331                fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-visibility-after-restore.html
1332                fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-visibility-after-restore.html
1333
1334         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1335         (WebCore::BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState):
1336
1337 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
1338
1339         Web Inspector: [Settings] Use registry to track settings objects.
1340         https://bugs.webkit.org/show_bug.cgi?id=113008
1341
1342         Reviewed by Pavel Feldman.
1343
1344         Currently .createSetting creates new instance any time it is invoked.
1345         When one instance saves value, the other instance do not know about it.
1346
1347         To resolve this issue we can use registry to make .createSetting return
1348         same object for specific key.
1349
1350         * inspector/front-end/Settings.js:
1351         (WebInspector.Settings.prototype.createSetting): Use registry.
1352
1353 2013-03-24  Matt Falkenhagen  <falken@chromium.org>
1354
1355         Refactoring: Pull Node::disabled() and Node::isInert() down to Element.
1356         https://bugs.webkit.org/show_bug.cgi?id=112085
1357
1358         Reviewed by Hajime Morrita.
1359
1360         Node is too low a level for these methods. The plan is to rename
1361         Element::disabled to isDisabledFormControl and to remove
1362         Element::isEnabledFormControl.
1363
1364         No new tests, just refactoring.
1365
1366         * dom/Element.cpp:
1367         (WebCore::Element::disabled):
1368         (WebCore):
1369         (WebCore::Element::isInert):
1370         * dom/Element.h:
1371         (Element):
1372         * dom/EventDispatcher.cpp:
1373         (WebCore::EventDispatcher::dispatchSimulatedClick):
1374         * dom/GestureEvent.cpp:
1375         (WebCore::GestureEventDispatchMediator::dispatchEvent):
1376         * dom/MouseEvent.cpp:
1377         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1378         * dom/Node.cpp:
1379         (WebCore::Node::handleLocalEvents):
1380         (WebCore::Node::willRespondToMouseMoveEvents):
1381         (WebCore::Node::willRespondToMouseClickEvents):
1382         (WebCore::Node::willRespondToTouchEvents):
1383         * dom/Node.h:
1384         (Node):
1385
1386 2013-03-24  Alpha Lam  <hclam@chromium.org>
1387
1388         GIFImageReader should reports parsing error to client
1389         https://bugs.webkit.org/show_bug.cgi?id=113141
1390
1391         Reviewed by Stephen White.
1392
1393         GIFImageReader nows reports parsing error to client (GIFImageDecoder) such that errors can be handled.
1394         In the case of corrupted GIF images GIFImageReader will be deleted and decoding will fail.
1395
1396         Unit test is updated to reflect change in behavior.
1397         Tested with a local corpus which showed better handling of corrupted GIF images.
1398
1399         * platform/image-decoders/gif/GIFImageReader.cpp:
1400         (GIFImageReader::decode):
1401
1402 2013-03-24  KondapallyKalyan  <kalyan.kondapally@intel.com>
1403
1404         [EFL] Add support to check for current Drawable.
1405         https://bugs.webkit.org/show_bug.cgi?id=113103
1406
1407         Reviewed by Kenneth Rohde Christiansen.
1408
1409         Covered by existing WebGL tests.
1410
1411         In MakeCurrent we do an early return if it is
1412         the current GL context but ignore Surface. This
1413         patch fixes the issue, we now check for both
1414         context and surface before doing an early return
1415         in MakeCurrent.
1416
1417         * platform/graphics/opengl/GLPlatformContext.cpp:
1418         (WebCore::GLPlatformContext::makeCurrent):
1419         (WebCore::GLPlatformContext::releaseCurrent):
1420         (WebCore::GLPlatformContext::destroy):
1421         * platform/graphics/opengl/GLPlatformSurface.cpp:
1422         (WebCore):
1423         (WebCore::GLPlatformSurface::isCurrentDrawable):
1424         (WebCore::GLPlatformSurface::onMakeCurrent):
1425         * platform/graphics/opengl/GLPlatformSurface.h:
1426
1427 2013-03-24  David Kilzer  <ddkilzer@apple.com>
1428
1429         BUILD FIX (r146704): Settings::setHiddenPageDOMTimerThrottlingEnabled() isn't always built
1430         <http://webkit.org/b/112308>
1431
1432         * WebCore.exp.in: Export
1433         Settings::setHiddenPageDOMTimerThrottlingEnabled()
1434         conditionally based on ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING).
1435
1436 2013-03-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1437
1438         [EFL] NetworkStateNotifier::updateState() is called too often
1439         https://bugs.webkit.org/show_bug.cgi?id=113152
1440
1441         Reviewed by Kenneth Rohde Christiansen.
1442
1443         Wait until we have read all the data on the Netlink socket before
1444         reporting a possible network interface change. This way, we make
1445         sure we don't call NetworkStateNotifier::updateState() several
1446         times in a row for no reason.
1447
1448         We also call NetworkStateNotifier::updateState() only if we get a
1449         RTM_NEWADDR event and we are currently offline, or if we get a
1450         RTM_DELADDR and we are currently online. This avoids calling
1451         NetworkStateNotifier::updateState() uselessly as there is no way
1452         the online state can change otherwise.
1453
1454         No new tests, no behavior change for layout tests.
1455
1456         * platform/network/efl/NetworkStateNotifierEfl.cpp:
1457         (WebCore::NetworkStateNotifier::readSocketCallback):
1458
1459 2013-03-24  Chris Fleizach  <cfleizach@apple.com>
1460
1461         AX: Crash in WebCore::AccessibilitySpinButton::incrementButton()
1462         https://bugs.webkit.org/show_bug.cgi?id=111582
1463
1464         Reviewed by Tim Horton.
1465
1466         There are two ways to create a spin button: from a textfield counter or from ARIA.
1467         If an ARIA spin button is created, it was returning true for isSpinButton, so we were 
1468         casting to the other kind of spin button, leading to a crash.
1469
1470         We need to be more specific about our class types.
1471
1472         Test: platform/mac/accessibility/aria-spinbutton-crash.html
1473
1474         * accessibility/AccessibilityObject.h:
1475         (WebCore::AccessibilityObject::isNativeSpinButton):
1476         * accessibility/AccessibilitySpinButton.h:
1477         (WebCore::AccessibilitySpinButton::isNativeSpinButton):
1478         (WebCore::toAccessibilitySpinButton):
1479         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1480         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1481
1482 2013-03-24  Chris Fleizach  <cfleizach@apple.com>
1483
1484         AXObjectCache gets recreated during document tear-down.
1485         https://bugs.webkit.org/show_bug.cgi?id=112525
1486
1487         Reviewed by Simon Fraser.
1488
1489         In many cases, a document's AXObjectCache was being created after the
1490         document had detached, which is wasteful and could potentially lead to
1491         crashes because the AXObjectCache has a timer and relies on its document
1492         to exist.
1493
1494         This patch provides a way to get the existing AX object cache, instead of
1495         always creating a new one.
1496         It moves the accessibilityEnabled() checks into the axObjectCache retrieval
1497         for easier readability.
1498         It adds a number of ASSERTs to vieryf that only the correct (top) document is used
1499         for cache manipulation.
1500
1501         * accessibility/AXObjectCache.cpp:
1502         (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
1503         * dom/ContainerNode.cpp:
1504         (WebCore::ContainerNode::~ContainerNode):
1505         * dom/Document.cpp:
1506         (WebCore::Document::~Document):
1507         (WebCore::Document::clearAXObjectCache):
1508         (WebCore::Document::existingAXObjectCache):
1509         (WebCore::Document::axObjectCache):
1510         (WebCore::Document::setFocusedNode):
1511         * dom/Document.h:
1512         (Document):
1513         * dom/Element.cpp:
1514         (WebCore::Element::attributeChanged):
1515         * dom/Node.cpp:
1516         (WebCore::Node::~Node):
1517         (WebCore::Node::isEditableToAccessibility):
1518         (WebCore::Node::attach):
1519         (WebCore::Node::rootEditableElement):
1520         (WebCore::Node::didMoveToNewDocument):
1521         * editing/AppendNodeCommand.cpp:
1522         (WebCore::sendAXTextChangedIgnoringLineBreaks):
1523         * editing/DeleteFromTextNodeCommand.cpp:
1524         (WebCore::DeleteFromTextNodeCommand::doApply):
1525         (WebCore::DeleteFromTextNodeCommand::doUnapply):
1526         * editing/Editor.cpp:
1527         (WebCore::Editor::respondToChangedContents):
1528         (WebCore::Editor::markAndReplaceFor):
1529         * editing/InsertIntoTextNodeCommand.cpp:
1530         (WebCore::InsertIntoTextNodeCommand::doApply):
1531         (WebCore::InsertIntoTextNodeCommand::doUnapply):
1532         * editing/InsertNodeBeforeCommand.cpp:
1533         (WebCore::InsertNodeBeforeCommand::doApply):
1534         (WebCore::InsertNodeBeforeCommand::doUnapply):
1535         * editing/atk/FrameSelectionAtk.cpp:
1536         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1537         * editing/chromium/FrameSelectionChromium.cpp:
1538         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1539         * editing/mac/FrameSelectionMac.mm:
1540         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1541         * html/HTMLInputElement.cpp:
1542         (WebCore::HTMLInputElement::setChecked):
1543         * html/HTMLSelectElement.cpp:
1544         (WebCore::HTMLSelectElement::optionElementChildrenChanged):
1545         (WebCore::HTMLSelectElement::setRecalcListItems):
1546         * html/HTMLTextFormControlElement.cpp:
1547         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
1548         * html/InputType.cpp:
1549         (WebCore::InputType::applyStep):
1550         * html/RangeInputType.cpp:
1551         (WebCore::RangeInputType::handleKeydownEvent):
1552         * loader/FrameLoader.cpp:
1553         (WebCore::FrameLoader::prepareForLoadStart):
1554         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1555         * page/FocusController.cpp:
1556         (WebCore::FocusController::setInitialFocus):
1557         * page/Frame.cpp:
1558         (WebCore::Frame::disconnectOwnerElement):
1559         * page/FrameView.cpp:
1560         (WebCore::FrameView::removeFromAXObjectCache):
1561         (WebCore::FrameView::layout):
1562         (WebCore::FrameView::scrollToAnchor):
1563         (WebCore::FrameView::axObjectCache):
1564         * platform/ScrollView.cpp:
1565         (WebCore::ScrollView::setHasHorizontalScrollbar):
1566         (WebCore::ScrollView::setHasVerticalScrollbar):
1567         * platform/Scrollbar.cpp:
1568         (WebCore::Scrollbar::~Scrollbar):
1569         (WebCore):
1570         (WebCore::Scrollbar::existingAXObjectCache):
1571         * platform/Scrollbar.h:
1572         (Scrollbar):
1573         * rendering/RenderBlock.cpp:
1574         (WebCore::RenderBlock::deleteLineBoxTree):
1575         (WebCore::RenderBlock::createRootInlineBox):
1576         (WebCore::RenderBlock::createAndAppendRootInlineBox):
1577         * rendering/RenderListBox.cpp:
1578         (WebCore::RenderListBox::selectionChanged):
1579         * rendering/RenderMenuList.cpp:
1580         (WebCore::RenderMenuList::addChild):
1581         (WebCore::RenderMenuList::didUpdateActiveOption):
1582         * rendering/RenderObject.cpp:
1583         (WebCore::RenderObject::styleWillChange):
1584         (WebCore::RenderObject::willBeDestroyed):
1585         * rendering/RenderObjectChildList.cpp:
1586         (WebCore::RenderObjectChildList::removeChildNode):
1587         (WebCore::RenderObjectChildList::insertChildNode):
1588         * rendering/RenderText.cpp:
1589         (WebCore::RenderText::setText):
1590         * rendering/RenderWidget.cpp:
1591         (WebCore::RenderWidget::willBeDestroyed):
1592
1593 2013-03-23  Mike West  <mkwst@chromium.org>
1594
1595         Drop full URLs from cross-origin access errors caused by sandboxing.
1596         https://bugs.webkit.org/show_bug.cgi?id=113029
1597
1598         Reviewed by Timothy Hatcher.
1599
1600         Following up on http://wkbug.com/112042, this patch brings cross-origin
1601         access error messages into line with the newly origin-only default
1602         message, and changes the error message text to explicitly refer to the
1603         missing 'allow-same-origin' sandbox flag that's the root cause of the
1604         error.
1605
1606         * page/DOMWindow.cpp:
1607         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
1608             Note that we're using the origin of the frames' URLs rather than
1609             their actual origin in these messages. This seems like a reasonable
1610             thing to do, since we know that at least one of the two origins will
1611             be "null" in this scenario.
1612
1613 2013-03-23  Dominic Mazzoni  <dmazzoni@google.com>
1614
1615         Implement Web Speech Synthesis for Chromium
1616         https://bugs.webkit.org/show_bug.cgi?id=111695
1617
1618         Reviewed by Adam Barth.
1619
1620         Straightforward implementation of speech synthesis
1621         for Chromium by exposing interfaces for the platform
1622         to implement.
1623
1624         * Modules/speech/SpeechSynthesis.cpp:
1625         (WebCore::SpeechSynthesis::boundaryEventOccurred):
1626         (WebCore::SpeechSynthesis::didStartSpeaking):
1627         (WebCore::SpeechSynthesis::didPauseSpeaking):
1628         (WebCore::SpeechSynthesis::didResumeSpeaking):
1629         (WebCore::SpeechSynthesis::didFinishSpeaking):
1630         (WebCore::SpeechSynthesis::speakingErrorOccurred):
1631         (WebCore):
1632         * Modules/speech/SpeechSynthesis.h:
1633         (SpeechSynthesis):
1634         * Modules/speech/SpeechSynthesisUtterance.cpp:
1635         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
1636         (WebCore):
1637         (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
1638         (WebCore::SpeechSynthesisUtterance::setVoice):
1639         * Modules/speech/SpeechSynthesisUtterance.h:
1640         (SpeechSynthesisUtterance):
1641         (WebCore::SpeechSynthesisUtterance::text):
1642         (WebCore::SpeechSynthesisUtterance::setText):
1643         (WebCore::SpeechSynthesisUtterance::lang):
1644         (WebCore::SpeechSynthesisUtterance::setLang):
1645         (WebCore::SpeechSynthesisUtterance::volume):
1646         (WebCore::SpeechSynthesisUtterance::setVolume):
1647         (WebCore::SpeechSynthesisUtterance::rate):
1648         (WebCore::SpeechSynthesisUtterance::setRate):
1649         (WebCore::SpeechSynthesisUtterance::pitch):
1650         (WebCore::SpeechSynthesisUtterance::setPitch):
1651         (WebCore::SpeechSynthesisUtterance::startTime):
1652         (WebCore::SpeechSynthesisUtterance::setStartTime):
1653         (WebCore::SpeechSynthesisUtterance::platformUtterance):
1654         * Modules/speech/SpeechSynthesisVoice.h:
1655         (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
1656         * WebCore.exp.in:
1657         * WebCore.gypi:
1658         * platform/PlatformSpeechSynthesis.h:
1659         (PlatformSpeechSynthesis):
1660         * platform/PlatformSpeechSynthesisUtterance.cpp:
1661         (WebCore):
1662         (WebCore::PlatformSpeechSynthesisUtterance::create):
1663         * platform/PlatformSpeechSynthesisUtterance.h:
1664         (PlatformSpeechSynthesisUtterance):
1665         (WebCore::PlatformSpeechSynthesisUtterance::setClient):
1666         * platform/PlatformSpeechSynthesisVoice.cpp:
1667         (WebCore):
1668         (WebCore::PlatformSpeechSynthesisVoice::create):
1669         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
1670         * platform/PlatformSpeechSynthesisVoice.h:
1671         (PlatformSpeechSynthesisVoice):
1672         (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
1673         (WebCore::PlatformSpeechSynthesisVoice::setName):
1674         (WebCore::PlatformSpeechSynthesisVoice::setLang):
1675         (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
1676         (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
1677         * platform/PlatformSpeechSynthesizer.cpp:
1678         (WebCore::PlatformSpeechSynthesizer::create):
1679         (WebCore::PlatformSpeechSynthesizer::setVoiceList):
1680         (WebCore):
1681         * platform/PlatformSpeechSynthesizer.h:
1682         (WebKit):
1683         (PlatformSpeechSynthesizerClient):
1684         (PlatformSpeechSynthesizer):
1685         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
1686         (WebCore):
1687         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
1688         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
1689         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1690         (WebCore::PlatformSpeechSynthesizer::speak):
1691         (WebCore::PlatformSpeechSynthesizer::pause):
1692         (WebCore::PlatformSpeechSynthesizer::resume):
1693         (WebCore::PlatformSpeechSynthesizer::cancel):
1694         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
1695         (WebKit):
1696         (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
1697         (WebKit::WebSpeechSynthesisUtterance::operator=):
1698         (WebKit::WebSpeechSynthesisUtterance::assign):
1699         (WebKit::WebSpeechSynthesisUtterance::reset):
1700         (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
1701         (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
1702         (WebKit::WebSpeechSynthesisUtterance::text):
1703         (WebKit::WebSpeechSynthesisUtterance::lang):
1704         (WebKit::WebSpeechSynthesisUtterance::voice):
1705         (WebKit::WebSpeechSynthesisUtterance::volume):
1706         (WebKit::WebSpeechSynthesisUtterance::rate):
1707         (WebKit::WebSpeechSynthesisUtterance::pitch):
1708         (WebKit::WebSpeechSynthesisUtterance::startTime):
1709         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
1710         (WebKit):
1711         (WebKit::WebSpeechSynthesisVoice::assign):
1712         (WebKit::WebSpeechSynthesisVoice::reset):
1713         (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
1714         (WebKit::WebSpeechSynthesisVoice::setName):
1715         (WebKit::WebSpeechSynthesisVoice::setLanguage):
1716         (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
1717         (WebKit::WebSpeechSynthesisVoice::setIsDefault):
1718         (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
1719         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
1720         (WebCore):
1721         (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
1722         (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
1723         (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
1724         (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
1725         (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
1726         (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
1727         (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
1728         (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
1729         (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
1730         (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
1731         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
1732         (WebCore):
1733         (WebSpeechSynthesizerClientImpl):
1734         * platform/mac/PlatformSpeechSynthesizerMac.mm:
1735         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
1736         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
1737         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
1738         (WebCore):
1739         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
1740         (WebCore::PlatformSpeechSynthesizer::speak):
1741         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
1742         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
1743         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
1744         (WebCore::PlatformSpeechSynthesizerMock::speak):
1745         * platform/mock/PlatformSpeechSynthesizerMock.h:
1746         (PlatformSpeechSynthesizerMock):
1747
1748 2013-03-23  Daniel Cheng  <dcheng@chromium.org>
1749
1750         [Qt] editing/pasteboard/can-read-in-dragstart-event.html and /can-read-in-copy-and-cut-events.html are crashing
1751         https://bugs.webkit.org/show_bug.cgi?id=113126
1752
1753         Reviewed by Ryosuke Niwa.
1754
1755         The ClipboardQt implementation only allows reading or writing, not both. Attempting to read
1756         when the clipboard is only writable will lead to a crash since the corresponding member will
1757         be null. To prevent crashes, change the asserts to early returns. In the long term, the
1758         correct fix is to unify the m_readableData and m_writableData members.
1759
1760         No new tests since no functionality in Qt port should change.
1761
1762         * platform/qt/ClipboardQt.cpp:
1763         (WebCore::ClipboardQt::getData):
1764         (WebCore::ClipboardQt::types):
1765         (WebCore::ClipboardQt::files):
1766
1767 2013-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1768
1769         [GTK][Regression] webkit_dom_html_table_element_insert_row returns value that doesn't pass WEBKIT_DOM_IS_HTML_TABLE_ROW_ELEMENT macro
1770         https://bugs.webkit.org/show_bug.cgi?id=111714
1771
1772         Reviewed by Martin Robinson.
1773
1774         Add custom kit implementation for HTMLElements so that the HTML
1775         wrappers are used in that case instead of wrapHTMLElement.
1776
1777         * bindings/gobject/WebKitDOMBinding.cpp:
1778         (WebKit::kit):
1779         (WebKit):
1780         * bindings/gobject/WebKitDOMBinding.h:
1781         (WebCore):
1782         (WebKit):
1783         * bindings/scripts/CodeGeneratorGObject.pm:
1784         (UsesManualKitImplementation):
1785
1786 2013-03-23  David Kilzer  <ddkilzer@apple.com>
1787
1788         Revert "BUILD FIX (r146667): ResourceRequest constructor in SynchronousLoaderClient.cpp is ambiguous on iOS"
1789
1790         This is platform-agnositic code, so the previous solution won't work.
1791
1792         * platform/network/SynchronousLoaderClient.cpp:
1793         (WebCore::SynchronousLoaderClient::willSendRequest):
1794
1795 2013-03-23  David Kilzer  <ddkilzer@apple.com>
1796
1797         BUILD FIX (r146667): ResourceRequest constructor in SynchronousLoaderClient.cpp is ambiguous on iOS
1798
1799         Fixes the following build failure:
1800
1801             Source/WebCore/platform/network/SynchronousLoaderClient.cpp:52:15: error: conversion from 'int' to 'const WebCore::ResourceRequest' is ambiguous
1802                 request = 0;
1803                           ^
1804             In file included from Source/WebCore/platform/network/SynchronousLoaderClient.cpp:30:
1805             In file included from Source/WebCore/platform/network/ResourceHandle.h:37:
1806             In file included from Source/WebCore/platform/network/ios/QuickLook.h:13:
1807             Source/WebCore/platform/network/cf/ResourceRequest.h:79:9: note: candidate constructor
1808                     ResourceRequest(NSURLRequest *);
1809                     ^
1810             Source/WebCore/platform/network/cf/ResourceRequest.h:83:9: note: candidate constructor
1811                     ResourceRequest(CFURLRequestRef cfRequest)
1812                     ^
1813             1 error generated.
1814
1815         * platform/network/SynchronousLoaderClient.cpp:
1816         (WebCore::SynchronousLoaderClient::willSendRequest): If
1817         USE(CFNETWORK) is defined, use static_cast<CFURLRequestRef>(0),
1818         otherwise use static_cast<NSURLRequest *>(0).
1819
1820 2013-03-23  David Kilzer  <ddkilzer@apple.com>
1821
1822         BUILD FIX (r146687): setDefaultMIMEType() is unused in ResourceHandleCFNet.cpp on iOS
1823
1824         Fixes the following build failure:
1825
1826             Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:98:13: error: unused function 'setDefaultMIMEType' [-Werror,-Wunused-function]
1827             static void setDefaultMIMEType(CFURLResponseRef response)
1828                         ^
1829             1 error generated.
1830
1831         * platform/network/cf/ResourceHandleCFNet.cpp:
1832         (WebCore::setDefaultMIMEType): Add #if !PLATFORM(MAC)/#endif
1833         guard.
1834
1835 2013-03-21  Kiran Muppala  <cmuppala@apple.com>
1836
1837         Add runtime setting for hidden page DOM timer throttling and CSS animation suspension
1838         https://bugs.webkit.org/show_bug.cgi?id=112308
1839
1840         Reviewed by Gavin Barraclough.
1841
1842         No new tests.  Only adding settings to enable/disable existing features
1843         and hence existing tests suffice.
1844
1845         * WebCore.exp.in:
1846         * page/Page.cpp:
1847         (WebCore::Page::setVisibilityState): Check if DOM timer throttling
1848         and CSS animation suspension are enabled before turning them on.
1849         (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged): Start or stop
1850         DOM timer throttling based on page visibility and the new setting state.
1851         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): Ditto
1852         for CSS animation suspension.
1853         * page/Page.h:
1854         * page/Settings.cpp:
1855         (WebCore::Settings::Settings): Initialize the flags for enabling hidden
1856         page DOM timer throttling and CSS animation suspension to false.
1857         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): Update flag
1858         and notify page that the state of the setting has changed.
1859         (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled): Ditto.
1860         * page/Settings.h:
1861         (WebCore::Settings::hiddenPageDOMTimerThrottlingEnabled):
1862         (WebCore::Settings::hiddenPageCSSAnimationSuspensionEnabled):
1863
1864 2013-03-22  Benjamin Poulain  <bpoulain@apple.com>
1865
1866         Remove 2 bad branches from StringHash::equal() and CaseFoldingHash::equal()
1867         https://bugs.webkit.org/show_bug.cgi?id=113003
1868
1869         Reviewed by Eric Seidel.
1870
1871         Fix two unfortunate use of StringHash and use the correct StringImpl function.
1872
1873         * html/parser/HTMLParserIdioms.cpp:
1874         (WebCore::threadSafeEqual):
1875         * html/parser/HTMLTreeBuilderSimulator.cpp:
1876         (WebCore::tokenExitsSVG):
1877
1878 2013-03-22  Andy Estes  <aestes@apple.com>
1879
1880         Set the cache partition property on CFURLRequests
1881         https://bugs.webkit.org/show_bug.cgi?id=113116
1882
1883         Patch by Jeffrey Pfau
1884         Reviewed by David Kilzer.
1885
1886         * platform/network/cf/ResourceRequestCFNet.cpp:
1887         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1888         (WebCore::ResourceRequest::doUpdateResourceRequest):
1889
1890 2013-03-22  Julien Chaffraix  <jchaffraix@webkit.org>
1891
1892         [CSS Grid Layout] content-sized row tracks with percentage logical height grid items don't resolve properly
1893         https://bugs.webkit.org/show_bug.cgi?id=113085
1894
1895         Reviewed by Tony Chang.
1896
1897         The core issue is that because overrideContainingBlockLogicalHeight() is unset in
1898         logicalContentHeightForChild, RenderBox::computePercentageLogicalHeight would try to
1899         resolve percentage logical height against the grid element (wrong containing block
1900         as a grid item's containing block is the grid area).
1901
1902         Tests: fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html
1903                fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html
1904
1905         * rendering/RenderGrid.cpp:
1906         (WebCore::RenderGrid::logicalContentHeightForChild):
1907         Set our override logical height to -1, so that we don't try to constrain a grid item's logical height
1908         based on resolving (badly) its percentage.
1909
1910 2013-03-19  Zhenyao Mo  <zmo@google.com>
1911
1912         Check WEBGL_draw_buffers requirements before exposing the extension
1913         https://bugs.webkit.org/show_bug.cgi?id=112359
1914
1915         Reviewed by Kenneth Russell.
1916
1917         * html/canvas/EXTDrawBuffers.cpp:
1918         (WebCore::EXTDrawBuffers::supported): call satisfies*().
1919         (WebCore::EXTDrawBuffers::drawBuffersEXT):
1920         (WebCore):
1921         (WebCore::EXTDrawBuffers::satisfiesWebGLRequirements): check WebGL requirements.
1922         * html/canvas/EXTDrawBuffers.h:
1923         (EXTDrawBuffers):
1924         * html/canvas/WebGLFramebuffer.cpp:
1925         (WebCore::WebGLFramebuffer::getDrawBuffer):
1926         (WebCore):
1927         * html/canvas/WebGLFramebuffer.h:
1928         (WebGLFramebuffer):
1929         * html/canvas/WebGLRenderingContext.cpp:
1930         (WebCore):
1931         (WebCore::WebGLRenderingContext::initializeNewContext):
1932         (WebCore::WebGLRenderingContext::getExtension):
1933         (WebCore::WebGLRenderingContext::getParameter):
1934         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1935         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
1936         (WebCore::WebGLRenderingContext::getMaxDrawBuffers):
1937         (WebCore::WebGLRenderingContext::getMaxColorAttachments):
1938         (WebCore::WebGLRenderingContext::setBackDrawBuffer):
1939         (WebCore::WebGLRenderingContext::restoreCurrentFramebuffer):
1940         (WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
1941         (WebCore::WebGLRenderingContext::supportsDrawBuffers): a cached version of EXTDrawBuffers::supports()
1942         * html/canvas/WebGLRenderingContext.h:
1943         (WebGLRenderingContext):
1944
1945 2013-03-22  Roger Fong  <roger_fong@apple.com>
1946
1947         Unreviewed. Fix AppleWin port following https://bugs.webkit.org/show_bug.cgi?id=113100.
1948         Patch by Alexey Proskuryakov.
1949
1950         * platform/network/cf/ResourceHandleCFNet.cpp:
1951         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
1952
1953 2013-03-22  Tony Chang  <tony@chromium.org>
1954
1955         REGRESSION (r146272): layout issues for flex boxes that have -webkit-flex-wrap: wrap
1956         https://bugs.webkit.org/show_bug.cgi?id=113071
1957
1958         Reviewed by Ojan Vafai.
1959
1960         The refactor in r139535 introduced this bug, where a variable name wasn't updated properly.
1961         In combination with r146272, this bug became more visible when nesting multiline flexboxen.
1962
1963         Test: css3/flexbox/multiline-min-preferred-width.html
1964
1965         * rendering/RenderFlexibleBox.cpp:
1966         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths): We want the width of the widest
1967         flexitem, the value in m_minPreferredWidth isn't relevant. Also update the comment for max
1968         preferred width.
1969
1970 2013-03-22  Max Vujovic  <mvujovic@adobe.com>
1971
1972         [CSS Shaders] Clamp css_MixColor before the blending and compositing steps
1973         https://bugs.webkit.org/show_bug.cgi?id=113088
1974
1975         Reviewed by Dean Jackson.
1976
1977         The blending and compositing operations from the spec [1] expect that they are operating on
1978         valid color inputs, in the range [0.0, 1.0]. Thus, we should clamp the css_MixColor input to
1979         this range to avoid implementation-dependent behavior for invalid color inputs.
1980
1981         [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending
1982
1983         Tests: css3/filters/custom/custom-filter-clamp-css-mix-color-negative.html
1984                css3/filters/custom/custom-filter-clamp-css-mix-color.html
1985
1986         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1987         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader):
1988             Clamp css_MixColor as clampedMixColor before using it in the blending and compositing
1989             steps.
1990
1991 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
1992
1993         [GTK] Add WebCoreDOM to the gyp build
1994         https://bugs.webkit.org/show_bug.cgi?id=112737
1995
1996         Reviewed by Nico Weber.
1997
1998         * WebCore.gyp/WebCoreGTK.gyp: Add WebCoreDOM to the gyp build.
1999
2000 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
2001
2002         [GTK] Add WebCoreHTML to the gyp build
2003         https://bugs.webkit.org/show_bug.cgi?id=112727
2004
2005         Reviewed by Nico Weber.
2006
2007         * WebCore.gyp/WebCoreGTK.gyp: Add support for building all files under
2008         the HTML directory. This includes splitting off common WebCore dependencies
2009         into an aggregate target and adding a top-level WebCore target.
2010
2011 2013-03-22  Tim Horton  <timothy_horton@apple.com>
2012
2013         Plugin Snapshotting: Auto-start dominant plugins
2014         https://bugs.webkit.org/show_bug.cgi?id=113111
2015         <rdar://problem/13475726>
2016
2017         Reviewed by Dean Jackson.
2018
2019         * html/HTMLPlugInElement.cpp:
2020         (WebCore::HTMLPlugInElement::defaultEventHandler):
2021         Acknowledge the new "Restarting" DisplayState.
2022         * html/HTMLPlugInElement.h:
2023         Rename PlayingWithPendingMouseClick to RestartingWithPendingMouseClick for accuracy.
2024         Add "Restarting" DisplayState, so we can be aware that the plugin is intentionally restarting and not re-snapshot it.
2025         * html/HTMLPlugInImageElement.cpp:
2026         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remove m_isPrimarySnapshottedPlugIn.
2027         (WebCore::classNameForShadowRoot): Remove m_isPrimarySnapshottedPlugIn.
2028         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Restart the plugin when it becomes primary.
2029         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Remove m_isPrimarySnapshottedPlugIn.
2030         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
2031         Move the plugin to Restarting unless it's already marked as PendingMouseClick.
2032         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired): Match the PlayingWithPendingMouseClick rename.
2033         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Don't snapshot if we're restarting.
2034         * html/HTMLPlugInImageElement.h: Remove m_isPrimarySnapshottedPlugIn.
2035         * rendering/RenderSnapshottedPlugIn.cpp:
2036         (WebCore::RenderSnapshottedPlugIn::paint): Acknowledge the new "Restarting" DisplayState.
2037         (WebCore::RenderSnapshottedPlugIn::getCursor): Acknowledge the new "Restarting" DisplayState.
2038         (WebCore::RenderSnapshottedPlugIn::handleEvent): Match the PlayingWithPendingMouseClick rename.
2039
2040 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
2041
2042         [GTK] Add support for building the WebCore bindings to the gyp build
2043         https://bugs.webkit.org/show_bug.cgi?id=112638
2044
2045         Reviewed by Nico Weber.
2046
2047         Add targets, actions, and rules for building the WebCore bindings. This is
2048         the first part of the WebCoreGTK build.
2049
2050         * WebCore.gyp/ConvertFileToHeaderWithCharacterArray.gypi: Added.
2051         * WebCore.gyp/MakeNames.gypi: Added.
2052         * WebCore.gyp/WebCoreGTK.gyp: Added WebCore bindings build. This has been adapted
2053         from the Chromium build.
2054         * WebCore.gypi: Updated list of derived sources files and added a parameter
2055         for adjusting the location of the built files. We don't want to force the
2056         Mac build to change, but we'd still like to reuse the scripts that the
2057         Chromium build uses.
2058
2059 2013-03-22  Dane Wallinga  <dgwallinga@chromium.org>
2060
2061         Add client callbacks to notify of changes of associated from controls
2062         https://bugs.webkit.org/show_bug.cgi?id=110375
2063
2064         Reviewed by Ryosuke Niwa.
2065
2066         Hook FormAssociatedElement, HTMLFormElement to notify EditorClient of form changes after a page has loaded.
2067         Will be used to add autofill support for ajax-y webpages. e.g if while filling out a form, new fields
2068         are dynamically created, autofill can know to re-query the autofill server and keep going.
2069         https://bugs.webkit.org/show_bug.cgi?id=110375
2070
2071         * dom/Document.cpp:
2072         (WebCore::Document::Document):
2073         (WebCore::Document::didAssociateFormControl):
2074         (WebCore):
2075         (WebCore::Document::didAssociateFormControlsTimerFired):
2076         * dom/Document.h:
2077         (Document):
2078         added method didAssociateFormControl, which batches form changes
2079         and calls out to ChromeClient on a timer.
2080         * html/FormAssociatedElement.cpp:
2081         (WebCore::FormAssociatedElement::resetFormOwner):
2082         (WebCore::FormAssociatedElement::formAttributeChanged):
2083         (WebCore):
2084         * html/FormAssociatedElement.h:
2085         (FormAssociatedElement):
2086         add calls to Document::didAssociateFormControl when form changes
2087         * html/HTMLFormElement.cpp:
2088         (WebCore::HTMLFormElement::insertedInto):
2089         (WebCore):
2090         * html/HTMLFormElement.h:
2091         add call to Document::didAssociateFormControl
2092         * loader/EmptyClients.h:
2093         (EmptyChromeClient):
2094         (WebCore::EmptyChromeClient::didAssociateFormControls):
2095         (WebCore::EmptyChromeClient::shouldNotifyOnFormChanges):
2096         * page/ChromeClient.h:
2097         (ChromeClient):
2098         add new method didAssociateFormControls
2099
2100 2013-03-22  Alexey Proskuryakov  <ap@apple.com>
2101
2102         Split ResourceHandleMac into multiple files
2103         https://bugs.webkit.org/show_bug.cgi?id=113100
2104
2105         Reviewed by Geoff Garen.
2106
2107         It's grown too big to navigate, and I'm going to make WebCoreResourceHandleAsDelegate
2108         substantially more complicated yet.
2109
2110         1. Mechanically moved WebCoreResourceHandleAsDelegate into separate files.
2111         2. Refactored WebCoreSynchronousLoaderClient to be cross-platform, and moved it into
2112         separate files.
2113
2114         * WebCore.vcproj/WebCore.vcproj:
2115         * WebCore.vcxproj/WebCore.vcxproj:
2116         * WebCore.vcxproj/WebCore.vcxproj.filters:
2117         * WebCore.xcodeproj/project.pbxproj:
2118         * platform/network/SynchronousLoaderClient.cpp: Added.
2119         * platform/network/SynchronousLoaderClient.h: Added.
2120         * platform/network/cf/ResourceHandleCFNet.cpp:
2121         * platform/network/mac/SynchronousLoaderClient.mm: Added.
2122         * platform/network/mac/WebCoreResourceHandleAsDelegate.h: Added.
2123         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Added.
2124
2125 2013-03-21  Geoffrey Garen  <ggaren@apple.com>
2126
2127         Added a setting for whether JavaScript markup is enabled
2128         https://bugs.webkit.org/show_bug.cgi?id=112999
2129
2130         Reviewed by Maciej Stachowiak.
2131
2132         This setting is useful for clients that want protection from script
2133         injection attacks.
2134
2135         * page/Settings.h:
2136         (Settings): Clarified which clients should call canExecuteScripts().
2137
2138         * page/Settings.in: Added the new setting.
2139
2140 2013-03-22  Roger Fong  <roger_fong@apple.com>
2141
2142         Unreviewed build fix.
2143
2144         * bindings/scripts/preprocessor.pm:
2145         (applyPreprocessor):
2146
2147 2013-03-22  Roger Fong  <roger_fong@apple.com>
2148
2149         Unreviewed. Force kill gcc-3.exe during bindings generation tests to avoid process hangs.
2150
2151         This problem is occuring on the WinEWS bots where there are somehow multiple gcc-3 processes existing at the same time.
2152         This is a speculative fix. There should only be 1 gcc-3.exe process running at a time ever.
2153
2154         * bindings/scripts/preprocessor.pm:
2155         (applyPreprocessor):
2156
2157 2013-03-22  Eric Carlson  <eric.carlson@apple.com>
2158
2159         Cleanup text track selection logic
2160         https://bugs.webkit.org/show_bug.cgi?id=113062
2161
2162         Reviewed by Jer Noble.
2163
2164         No new tests, covered by existing tests.
2165
2166         * html/HTMLMediaElement.cpp:
2167         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Remove.
2168         (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't look at track attributes directly,
2169             use captionPreferences->textTrackSelectionScore to calculate track rank.
2170         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Set m_processingPreferenceChange here
2171             instead of in captionPreferencesChanged.
2172         (WebCore::HTMLMediaElement::captionPreferencesChanged): Don't suppress calls to setClosedCaptionsVisible,
2173             existing code already makes sure we don't do unnecessary work.
2174         * html/HTMLMediaElement.h:
2175
2176         * html/shadow/MediaControlElements.cpp:
2177         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Drive by cleanup, don't
2178             process inactive cues.
2179
2180         * html/shadow/MediaControlsApple.cpp:
2181         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility): Call resetTrackListMenu instead
2182             of updateDisplay so we only mark the menu as needing a recalculation and do the work when
2183             it is displayed.
2184
2185         * page/CaptionUserPreferences.cpp:
2186         (WebCore::CaptionUserPreferences::shouldShowCaptions): When in testing mode, return true if
2187             the caption or subtitle preference has been set.
2188         (WebCore::CaptionUserPreferences::setShouldShowCaptions): In testing mode, clear the caption
2189             and subtitle preference when passed false.
2190         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Calculate the track score based on
2191             track type preference and preferred language.
2192         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Score a track according to
2193             the language presence and position in the preferred languages list.
2194         * page/CaptionUserPreferences.h:
2195
2196         * page/CaptionUserPreferencesMac.h:
2197         * page/CaptionUserPreferencesMac.mm:
2198         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate track language score 
2199             according to user preferences.
2200
2201         * platform/Language.cpp:
2202         (WebCore::indexOfBestMatchingLanguageInList): Repurposed the static bestMatchingLanguage
2203             function to return the location of a language in a Vector.
2204         (WebCore::preferredLanguageFromList): Removed.
2205         * platform/Language.h:
2206
2207 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
2208
2209         Build fix for TransformationMatrix
2210         https://bugs.webkit.org/show_bug.cgi?id=113087
2211
2212         Reviewed by Martin Robinson.
2213
2214         This is a trivial build fix for clutter ac backend. Clutter AC backend doesn't use
2215         TextureMapper so there is nowhere including TransformationMatrix.h.
2216         For the reason, we include it explicitly.
2217
2218         No new tests because of no functionality change.
2219
2220         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp:
2221         * platform/graphics/clutter/GraphicsContext3DPrivate.h:
2222         (WebCore):
2223
2224 2013-03-22  Steve Block  <steveblock@chromium.org>
2225
2226         Coordinates.idl lacks Conditional=GEOLOCATION
2227         https://bugs.webkit.org/show_bug.cgi?id=112949
2228
2229         Reviewed by Steve Block.
2230
2231         No new tests, build optimization only.
2232
2233         * page/Coordinates.idl: Added GEOLOCATION conditional guard.
2234
2235 2013-03-22  Daniel Cheng  <dcheng@chromium.org>
2236
2237         Data store should be readable in dragstart/copy/cut events
2238         https://bugs.webkit.org/show_bug.cgi?id=23695
2239
2240         Reviewed by Tony Chang.
2241
2242         There were several events where data could be written but not read back due to the fact that
2243         different Clipboard method implementations checked permissions inconsistently. This patch
2244         adds helper methods to check if an operation is permitted on a Clipboard and refactors all
2245         direct comparisons against Clipboard::m_policy to use the new helpers instead. This fixes
2246         several bugs where Clipboard::types and Clipboard::getData are not usable inside the
2247         aforementioned events.
2248
2249         Tests: editing/pasteboard/can-read-in-copy-and-cut-events.html
2250                editing/pasteboard/can-read-in-dragstart-event.html
2251
2252         * dom/Clipboard.cpp:
2253         (WebCore::Clipboard::canReadTypes): Formerly restricted to ClipboardReadable and
2254                                             ClipboardTypesReadable; now allows ClipboardWritable as
2255                                             well.
2256         (WebCore::Clipboard::canReadData): Formerly restricted to ClipboardReadable; now allows
2257                                            ClipboardWritable as well.
2258         (WebCore::Clipboard::canWriteData):
2259         (WebCore::Clipboard::canSetDragImage):
2260         (WebCore::Clipboard::hasFileOfType):
2261         (WebCore::Clipboard::hasStringOfType):
2262         (WebCore::Clipboard::setDropEffect):
2263         (WebCore::Clipboard::setEffectAllowed):
2264         * dom/Clipboard.h:
2265         (Clipboard):
2266         * platform/blackberry/ClipboardBlackBerry.cpp:
2267         (WebCore::ClipboardBlackBerry::clearData):
2268         (WebCore::ClipboardBlackBerry::clearAllData):
2269         (WebCore::ClipboardBlackBerry::getData):
2270         (WebCore::ClipboardBlackBerry::setData):
2271         (WebCore::ClipboardBlackBerry::types):
2272         * platform/chromium/ClipboardChromium.cpp:
2273         (WebCore::DataTransferItemPolicyWrapper::kind):
2274         (WebCore::DataTransferItemPolicyWrapper::type):
2275         (WebCore::DataTransferItemPolicyWrapper::getAsString):
2276         (WebCore::DataTransferItemPolicyWrapper::getAsFile):
2277         (WebCore::ClipboardChromium::clearData):
2278         (WebCore::ClipboardChromium::clearAllData):
2279         (WebCore::ClipboardChromium::getData):
2280         (WebCore::ClipboardChromium::setData):
2281         (WebCore::ClipboardChromium::types):
2282         (WebCore::ClipboardChromium::files):
2283         (WebCore::ClipboardChromium::setDragImage):
2284         * platform/gtk/ClipboardGtk.cpp:
2285         (WebCore::ClipboardGtk::clearData):
2286         (WebCore::ClipboardGtk::clearAllData):
2287         (WebCore::ClipboardGtk::getData):
2288         (WebCore::ClipboardGtk::setData):
2289         (WebCore::ClipboardGtk::types):
2290         (WebCore::ClipboardGtk::files):
2291         (WebCore::ClipboardGtk::setDragImage):
2292         * platform/mac/ClipboardMac.mm:
2293         (WebCore::ClipboardMac::clearData):
2294         (WebCore::ClipboardMac::clearAllData):
2295         (WebCore::ClipboardMac::getData):
2296         (WebCore::ClipboardMac::setData):
2297         (WebCore::ClipboardMac::types):
2298         (WebCore::ClipboardMac::files):
2299         (WebCore::ClipboardMac::setDragImage):
2300         * platform/qt/ClipboardQt.cpp:
2301         (WebCore::ClipboardQt::clearData):
2302         (WebCore::ClipboardQt::clearAllData):
2303         (WebCore::ClipboardQt::getData):
2304         (WebCore::ClipboardQt::setData):
2305         (WebCore::ClipboardQt::types):
2306         (WebCore::ClipboardQt::files):
2307         (WebCore::ClipboardQt::setDragImage):
2308         (WebCore::ClipboardQt::items):
2309         * platform/qt/DataTransferItemListQt.cpp:
2310         (WebCore::DataTransferItemListQt::length):
2311         (WebCore::DataTransferItemListQt::item):
2312         (WebCore::DataTransferItemListQt::deleteItem):
2313         (WebCore::DataTransferItemListQt::clear):
2314         (WebCore::DataTransferItemListQt::add):
2315         * platform/qt/DataTransferItemQt.cpp:
2316         (WebCore::DataTransferItemQt::getAsString):
2317         * platform/win/ClipboardWin.cpp:
2318         (WebCore::ClipboardWin::clearData):
2319         (WebCore::ClipboardWin::clearAllData):
2320         (WebCore::ClipboardWin::getData):
2321         (WebCore::ClipboardWin::setData):
2322         (WebCore::ClipboardWin::types):
2323         (WebCore::ClipboardWin::files):
2324         (WebCore::ClipboardWin::setDragImage):
2325
2326 2013-03-22  Andrei Bucur  <abucur@adobe.com>
2327
2328         [CSS Regions] Remove pushLayoutState(RenderFlowThread*) from RenderView
2329         https://bugs.webkit.org/show_bug.cgi?id=113084
2330
2331         Reviewed by Dirk Schulze.
2332
2333         Remove void pushLayoutState(RenderFlowThread*, bool regionsChanged) from RenderView.h because it's not used.
2334
2335         Tests: Code cleanup. No tests needed.
2336
2337         * rendering/RenderView.h:
2338         (RenderView):
2339
2340 2013-03-22  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2341
2342         [EFL] Fix build issues to enable CSS Filter and Shaders support.
2343         https://bugs.webkit.org/show_bug.cgi?id=111274
2344
2345         Reviewed by Noam Rosenthal.
2346
2347         This is in preperation to enable CSS Filter and Shaders support.
2348         This patch fixes related build issues to enable the support.
2349
2350         * platform/graphics/surfaces/efl/GLTransportSurface.cpp:
2351         * platform/graphics/texmap/TextureMapper.cpp:
2352         * platform/graphics/texmap/TextureMapper.h:
2353         (WebCore):
2354         * platform/graphics/texmap/TextureMapperGL.cpp:
2355         * platform/graphics/texmap/TextureMapperGL.h:
2356         (WebCore):
2357         * platform/graphics/texmap/TextureMapperShaderProgram.h:
2358
2359 2013-03-22  Matt Falkenhagen  <falken@chromium.org>
2360
2361         Implement isEnabledFormControl() for SliderThumbElement and SpinButtonElement in terms of disabled()
2362         https://bugs.webkit.org/show_bug.cgi?id=112993
2363
2364         Reviewed by Kent Tamura.
2365
2366         This is an intermediate step for refactoring Node::disabled and
2367         Element::isEnabledFormControl. All classes that override
2368         isEnabledFormControl just return !disabled(), except for
2369         SliderThumbElement and SpinButtonElement. This patch changes those two
2370         classes to do so, which shows that the two functions are redundant and
2371         easy to refactor into a single function in a subsequent patch.
2372
2373         No new tests, there should be no behavior change.
2374
2375         * html/shadow/SliderThumbElement.cpp:
2376         (WebCore::SliderThumbElement::disabled):
2377         (WebCore):
2378         (WebCore::SliderThumbElement::isEnabledFormControl):
2379         * html/shadow/SliderThumbElement.h:
2380         (SliderThumbElement):
2381         * html/shadow/SpinButtonElement.h: The check of shadowHost() is
2382         necessary because it can be detached by JavaScript that runs during
2383         event handling (see r76566)
2384
2385 2013-03-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2386
2387         [Qt] New fast/text/word-space-with-kerning-3.html fails on Qt.
2388         https://bugs.webkit.org/show_bug.cgi?id=112668
2389
2390         Reviewed by Jocelyn Turcotte.
2391
2392         Qt adds word-spacing to leading spaces, but WebCore only expects
2393         us to add for trailing spaces. We only corrected for this in width
2394         calculation but do need to also do it for drawing.
2395
2396         Instead of subtracting the extra word-spacing we now configure the
2397         FormatRange not to apply to leading spaces. This means this behavior
2398         will be applied everywhere reliably.
2399
2400         * platform/graphics/Font.h:
2401         (Font):
2402         * platform/graphics/qt/FontQt.cpp:
2403         (WebCore::Font::drawComplexText):
2404         (WebCore::Font::floatWidthForComplexText):
2405         (WebCore::Font::offsetForPositionForComplexText):
2406         (WebCore::Font::selectionRectForComplexText):
2407         (WebCore::Font::initFormatForTextLayout):
2408
2409 2013-03-22  Joshua Bell  <jsbell@chromium.org>
2410
2411         REGRESSION (r146540?): Crashes in storage/indexeddb/factory-basics-workers.html, storage/indexeddb/transaction-error.html
2412         https://bugs.webkit.org/show_bug.cgi?id=113019
2413
2414         Reviewed by Tony Chang.
2415
2416         Also manifesting flakily under Chromium's content_shell. It's an ASSERT being hit in
2417         the IDBTransaction destructor. The cause was r146540 which allows a stopped context
2418         to reclaim script wrappers. This allows the IDBTransaction to be deref'd at times where
2419         it previously would have just leaked. Modulate the destructor assertions to account
2420         for this case.
2421
2422         No new tests; failures already manifest as flaky crashes in some ports.
2423
2424         * Modules/indexeddb/IDBTransaction.cpp:
2425         (WebCore::IDBTransaction::~IDBTransaction): If context is stopped, expected state
2426         transitions/cleanup may not have occurred before destructor runs.
2427
2428 2013-03-22  David Grogan  <dgrogan@chromium.org>
2429
2430         IndexedDB: Histogram available disk space on attempt to open database
2431         https://bugs.webkit.org/show_bug.cgi?id=112862
2432
2433         Reviewed by Tony Chang.
2434
2435         ChromeOS suspects they might be hitting disk corruption when the disks
2436         are nearly full. This patch logs the available space to either the
2437         "success" or the "fail" histogram as appropriate so that the
2438         distributions can be compared.
2439
2440         No new tests - I don't know of a good way to test histograms. Local
2441         printf testing didn't turn up any bugs.
2442
2443         * platform/leveldb/LevelDBDatabase.cpp:
2444         (WebCore::HistogramFreeSpace):
2445         (WebCore):
2446         (WebCore::LevelDBDatabase::open):
2447
2448 2013-03-22  Nate Chapin  <japhet@chromium.org>
2449
2450         REGRESSION (r146239): Reproducible crash in WebCore::DocumentLoader::responseReceived.
2451         https://bugs.webkit.org/show_bug.cgi?id=112811
2452
2453         Reviewed by Brady Eidson.
2454
2455         Test: http/tests/cache/x-frame-options-304.html
2456
2457         * loader/DocumentLoader.cpp:
2458         (WebCore::DocumentLoader::responseReceived):
2459         * loader/cache/CachedRawResource.cpp:
2460         (WebCore::CachedRawResource::switchClientsToRevalidatedResource):
2461         * loader/cache/CachedRawResource.h:
2462
2463 2013-03-22  Jer Noble  <jer.noble@apple.com>
2464
2465         REGRESSION: -webkit-box-reflect does not show on video elements
2466         https://bugs.webkit.org/show_bug.cgi?id=112397
2467
2468         Reviewed by Eric Carlson.
2469
2470         Work around the ASSERTs generated when setting an AVPlayerLayer's player property
2471         during a CA flush by setting the player property during the next runloop, outside
2472         of a CA flush.
2473
2474         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2475         (PlatformCALayer::clone):
2476
2477 2013-03-22  peavo@outlook.com  <peavo@outlook.com>
2478
2479         [Curl] Performance fix, avoid loading cookie file on every request.
2480         https://bugs.webkit.org/show_bug.cgi?id=113023
2481
2482         Reviewed by Brent Fulgham.
2483
2484         We currently load the cookie file on every request, and when setting cookies from JavaScript, by using the option CURLOPT_COOKIEFILE.
2485         This is very inefficient as the cookie file can get quite large, and file I/O is slow.
2486         It is sufficient to load the cookie file on startup, as we use a shared cookie database between the requests.
2487
2488         * platform/network/curl/CookieJarCurl.cpp:
2489         (WebCore::setCookiesFromDOM): Avoid loading cookie file when setting cookies from JavaScript.
2490         * platform/network/curl/ResourceHandleManager.cpp:
2491         (WebCore::ResourceHandleManager::initializeHandle): Avoid loading cookie file on every request.
2492         (WebCore::ResourceHandleManager::initCookieSession): Load the cookie file to shared database on startup.
2493
2494 2013-03-22  Tiancheng Jiang  <tijiang@rim.com>
2495
2496         [BlackBerry] Update Input field Background Color
2497         https://bugs.webkit.org/show_bug.cgi?id=113063
2498
2499         Reviewed by George Staikos.
2500
2501         RIM PR 307463.
2502         Internally reviewed by Ed Baker.
2503
2504         * platform/blackberry/RenderThemeBlackBerry.cpp:
2505         (WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField):
2506
2507 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
2508
2509         Web Inspector: FlameChart. Draw function names over flame chart bar if they fit into the bar.
2510         https://bugs.webkit.org/show_bug.cgi?id=113052
2511
2512         Reviewed by Vsevolod Vlasov.
2513
2514         The draw function will draw the bar title if the text is less than bar width.
2515         Unfortunately almost all the projects which need to be profiled
2516         use long function names with dots. So if the function name has dots and
2517         doesn't fit into the space then prepareTitle will try to drop the prefix before dot.
2518         If the title has no dots then the function will strip the tail of the title.
2519
2520         * inspector/front-end/FlameChart.js:
2521         (WebInspector.FlameChart):
2522         (WebInspector.FlameChart.prototype.draw):
2523         (WebInspector.FlameChart.prototype._prepareTitle):
2524
2525 2013-03-22  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2526
2527         Web Inspector: Add "hidden" attribute to the recently added APIs in Inspector.json
2528         https://bugs.webkit.org/show_bug.cgi?id=113061
2529
2530         Added "hidden": true to the APIs introduced since version 1.0.
2531
2532         Reviewed by Pavel Feldman.
2533
2534         * inspector/Inspector.json:
2535
2536 2013-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
2537
2538         Web Inspector: Correctly implement scrollToLine, revealLine and setSelection on CodeMirror  editor.
2539         https://bugs.webkit.org/show_bug.cgi?id=113028
2540
2541         Reviewed by Pavel Feldman.
2542
2543         Added focus event handler to CodeMirror editor view elememnt to support inspector's focus model.
2544         Added selection and scroll listeners to correctly save editor scroll and selection in history.
2545         Implemented revealLine, scrollToLine and setSelection.
2546         Note: CodeMirror's coordsChar method does not work correctly in "local" mode, implemented as binary search
2547         as a temporary workaround.
2548
2549         * inspector/front-end/CodeMirrorTextEditor.js:
2550         (WebInspector.CodeMirrorTextEditor):
2551         (WebInspector.CodeMirrorTextEditor.prototype.defaultFocusedElement):
2552         (WebInspector.CodeMirrorTextEditor.prototype._handleElementFocus):
2553         (WebInspector.CodeMirrorTextEditor.prototype.revealLine):
2554         (WebInspector.CodeMirrorTextEditor.prototype._coordsChar):
2555         (WebInspector.CodeMirrorTextEditor.prototype._topScrolledLine):
2556         (WebInspector.CodeMirrorTextEditor.prototype._bottomScrolledLine):
2557         (WebInspector.CodeMirrorTextEditor.prototype._scroll):
2558         (WebInspector.CodeMirrorTextEditor.prototype._selectionChange):
2559         (WebInspector.CodeMirrorTextEditor.prototype.scrollToLine):
2560         (WebInspector.CodeMirrorTextEditor.prototype.setSelection):
2561         (WebInspector.CodeMirrorTextEditor.prototype.copyRange):
2562         * inspector/front-end/TextEditor.js:
2563         (WebInspector.TextEditor.prototype.copyRange):
2564
2565 2013-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
2566
2567         Web Inspector: [Regression] Editor scroll is not restored after inspector reload.
2568         https://bugs.webkit.org/show_bug.cgi?id=113027
2569
2570         Reviewed by Pavel Feldman.
2571
2572         * inspector/front-end/SourceFrame.js:
2573         (WebInspector.SourceFrame.prototype.wasShown):
2574         (WebInspector.SourceFrame.prototype._isEditorShowing):
2575         (WebInspector.SourceFrame.prototype._innerHighlightLineIfNeeded):
2576         (WebInspector.SourceFrame.prototype._innerRevealLineIfNeeded):
2577         (WebInspector.SourceFrame.prototype._innerScrollToLineIfNeeded):
2578         (WebInspector.SourceFrame.prototype._innerSetSelectionIfNeeded):
2579
2580 2013-03-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2581
2582         [Qt] Fix build with OPENCL 1.2
2583         https://bugs.webkit.org/show_bug.cgi?id=113056
2584
2585         Reviewed by Kenneth Rohde Christiansen.
2586
2587         Switch qmake checks to the modern style which means we can enable OpenCL with
2588         WEBKIT_CONFIG+=opencl. 
2589
2590         Upgrade OpenCL 1.1 clCreateImage2D to OpenCL 1.2 clCreateImage calls.
2591
2592         * Target.pri:
2593         * WebCore.pri:
2594         * platform/graphics/filters/FilterEffect.cpp:
2595         (WebCore::FilterEffect::createOpenCLImageResult):
2596         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
2597         (WebCore::FilterContextOpenCL::createOpenCLImage):
2598
2599 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
2600
2601         [GTK][AC] Opacity animation doesn't work with clutter backend
2602         https://bugs.webkit.org/show_bug.cgi?id=110347
2603
2604         Reviewed by Gustavo Noronha Silva.
2605
2606         The static casting in ternary operator doesn't change actual inputted argument type.
2607         So I replaced it with if-else statement.
2608
2609         Covered by existing animation tests.
2610
2611         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
2612         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
2613         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
2614
2615 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
2616
2617         [GTK][AC] Add removing animations procedure with clutter ac backend
2618         https://bugs.webkit.org/show_bug.cgi?id=110607
2619
2620         Reviewed by Gustavo Noronha Silva.
2621
2622         This changes is based on mac port implementation. The only different thing is
2623         that updateAnimations is called explicitly in destructor of GraphicsLayerClutter
2624         to remove uncommitted animations. Because even though we call notifyFlushRequired
2625         to remove existing animations in removeAnimation(), removeClutterAnimationFromLayer
2626         has been never reached since the root layer is destroyed before. It means
2627         that we haven't lost a change to remove actual animations from clutterActor.
2628
2629         Covered by existing animation tests.
2630
2631         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2632         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
2633         (WebCore::GraphicsLayerClutter::removeAnimation):
2634         (WebCore):
2635         (WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer):
2636         * platform/graphics/clutter/GraphicsLayerClutter.h:
2637         (WebCore::GraphicsLayerClutter::animationIsRunning):
2638         (GraphicsLayerClutter):
2639
2640 2013-03-22  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2641
2642         [EFL][WebGL] Optimize AlphaOp for HTMLVideoElement input.
2643         https://bugs.webkit.org/show_bug.cgi?id=113049
2644
2645         Reviewed by Kenneth Rohde Christiansen.
2646
2647         Covered by existing tests.
2648
2649         Changeset 137397 implemented optimisation to avoid any
2650         unnecessary Unmultiply or Premultiply operation in unpack/pack
2651         provided the Image source is from HTMLVideoElement. This patch
2652         enables the same for EFL port.
2653
2654         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2655         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2656
2657 2013-03-22  Tommy Widenflycht  <tommyw@google.com>
2658
2659         Clean up the speech recognintion API
2660         https://bugs.webkit.org/show_bug.cgi?id=112916
2661
2662         Reviewed by Adam Barth.
2663
2664         This patch cleans away deprecated parts, fixes so that stop() can be called more than once and adds
2665         the missing emma attribute on SpeechRecognitionEvent (which is always null).
2666
2667         Patch covered by existing tests.
2668
2669         * Modules/speech/SpeechRecognition.cpp:
2670         (WebCore::SpeechRecognition::stopFunction):
2671         (WebCore::SpeechRecognition::abort):
2672         (WebCore::SpeechRecognition::didEnd):
2673         (WebCore::SpeechRecognition::SpeechRecognition):
2674         * Modules/speech/SpeechRecognition.h:
2675         (SpeechRecognition):
2676         * Modules/speech/SpeechRecognitionEvent.cpp:
2677         (WebCore::SpeechRecognitionEvent::createResult):
2678         (WebCore::SpeechRecognitionEvent::createNoMatch):
2679         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
2680         * Modules/speech/SpeechRecognitionEvent.h:
2681         (WebCore):
2682         (SpeechRecognitionEventInit):
2683         (SpeechRecognitionEvent):
2684         (WebCore::SpeechRecognitionEvent::emma):
2685         * Modules/speech/SpeechRecognitionEvent.idl:
2686
2687 2013-03-22  Emil A Eklund  <eae@chromium.org>
2688
2689         Floor cell widths in AutoTableLayout::recalcColumn
2690         https://bugs.webkit.org/show_bug.cgi?id=112922
2691
2692         Reviewed by Levi Weintraub.
2693
2694         Table cells widths are floored to ensure even distribution of available
2695         space across columns. The code path that computes the width of the
2696         _table_ failed to take this into account and thus can over report the
2697         total width of the table.
2698
2699         Test: fast/sub-pixel/table-with-subpixel-cell-size.html
2700
2701         * rendering/AutoTableLayout.cpp:
2702         (WebCore::AutoTableLayout::recalcColumn): Floor width to match column sizing logic.
2703
2704 2013-03-22  David Kilzer  <ddkilzer@apple.com>
2705
2706         BUILD FIX (r146208): Export shouldPrintExceptions methods for iOS
2707
2708         Fixes the following build failure:
2709
2710             Undefined symbols for architecture i386:
2711               "__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb", referenced from:
2712                     +[WebCoreStatistics setShouldPrintExceptions:] in WebCoreStatistics.o
2713               "__ZN7WebCore11PageConsole21shouldPrintExceptionsEv", referenced from:
2714                     +[WebCoreStatistics shouldPrintExceptions] in WebCoreStatistics.o
2715             ld: symbol(s) not found for architecture i386
2716             clang: error: linker command failed with exit code 1 (use -v to see invocation)
2717
2718         * WebCore.exp.in: Move symbols so they're exported for iOS as
2719         well.
2720
2721 2013-03-22  Yury Semikhatsky  <yurys@chromium.org>
2722
2723         Unreviewed. Fix Chromium Win compilation after r146583.
2724
2725         * bindings/v8/CustomElementHelpers.cpp:
2726         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
2727
2728 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
2729
2730         Web Inspector: Flame Chart. Chart has to be zoomed around the mouse pointer.
2731         https://bugs.webkit.org/show_bug.cgi?id=113031
2732
2733         Reviewed by Yury Semikhatsky.
2734
2735         Overview grid is able to zoom around the mouse pointer.
2736         So the simplest way is to translate x coordinate of the mouse pointer hovered over the chart
2737         to x coordinate in term of overview window and pass it to the zoom function.
2738
2739         Minor unrelated fix: draw small border at bottom of the overview grid.
2740
2741         * inspector/front-end/FlameChart.js:
2742         (WebInspector.FlameChart.prototype._onMouseWheel):
2743         * inspector/front-end/OverviewGrid.js:
2744         (WebInspector.OverviewGrid.prototype.zoom):
2745         * inspector/front-end/flameChart.css:
2746         (#flame-chart-overview-container):
2747
2748 2013-03-22  No'am Rosenthal  <noam@webkit.org>
2749
2750         [Texmap] TextureMapperImageBuffer should not use rendering code for filters.
2751         https://bugs.webkit.org/show_bug.cgi?id=113040
2752
2753         Reviewed by Kenneth Rohde Christiansen.
2754
2755         Disable TextureMapperImageBuffer filters, until they can be done the right way.
2756         This should only disrupt accelerated filters in fallback mode, which is a very rare
2757         use case.
2758
2759         No new testable functionality.
2760
2761         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2762         (WebCore::BitmapTextureImageBuffer::applyFilters):
2763
2764 2013-03-22  Sergey Ryazanov  <serya@chromium.org>
2765
2766         Web Inspector: Report more CSS errors
2767         https://bugs.webkit.org/show_bug.cgi?id=113022
2768
2769         Reviewed by Pavel Feldman.
2770
2771         Reporting next few CSS syntax errors in declaration_list.
2772
2773         * css/CSSGrammar.y.in:
2774
2775 2013-03-18  Yury Semikhatsky  <yurys@chromium.org>
2776
2777         Web Inspector: use individual samples to construct CPU profile flame chart
2778         https://bugs.webkit.org/show_bug.cgi?id=112569
2779
2780         Reviewed by Pavel Feldman.
2781
2782         Added an optional array of samples to the CPU profile returned over the
2783         protocol. Each sample is id of the profile node corresponding to the top frame
2784         of the sample's stack trace. The array of samples if present is used to draw
2785         the flame chart on the CPU profile panel, otherwise flame chart is drawn based
2786         on the aggregated profile data.
2787
2788         * bindings/js/ScriptProfile.cpp:
2789         (WebCore::ScriptProfile::buildInspectorObjectForSamples):
2790         * bindings/js/ScriptProfile.h:
2791         (ScriptProfile):
2792         * bindings/v8/ScriptProfile.cpp:
2793         (WebCore::buildInspectorObjectFor):
2794         (WebCore):
2795         (WebCore::ScriptProfile::buildInspectorObjectForSamples):
2796         * bindings/v8/ScriptProfile.h:
2797         (ScriptProfile):
2798         * bindings/v8/ScriptProfiler.cpp:
2799         (WebCore::ScriptProfiler::start):
2800         * inspector/Inspector.json:
2801         * inspector/InspectorProfilerAgent.cpp:
2802         (WebCore::InspectorProfilerAgent::getCPUProfile):
2803         * inspector/front-end/CPUProfileView.js:
2804         (WebInspector.CPUProfileView.prototype._getCPUProfileCallback):
2805         (WebInspector.CPUProfileView.prototype._buildIdToNodeMap):
2806         * inspector/front-end/FlameChart.js:
2807         (WebInspector.FlameChart.prototype._calculateTimelineData):
2808
2809 2013-03-22  Steve Block  <steveblock@chromium.org>
2810
2811         Use generated bindings for the Coordinates type used by Geolocation
2812         https://bugs.webkit.org/show_bug.cgi?id=112975
2813
2814         Reviewed by Kentaro Hara.
2815
2816         No new tests, refactoring only.
2817
2818         * CMakeLists.txt:
2819         * GNUmakefile.list.am:
2820         * Modules/geolocation/Coordinates.cpp: Renamed from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp.
2821         (WebCore):
2822         (WebCore::Coordinates::altitude):
2823         (WebCore::Coordinates::altitudeAccuracy):
2824         (WebCore::Coordinates::heading):
2825         (WebCore::Coordinates::speed):
2826         * Modules/geolocation/Coordinates.h:
2827         (Coordinates):
2828         * Modules/geolocation/Coordinates.idl:
2829         * Target.pri:
2830         * UseJSC.cmake:
2831         * UseV8.cmake:
2832         * WebCore.gypi:
2833         * WebCore.vcproj/WebCore.vcproj:
2834         * WebCore.vcxproj/WebCore.vcxproj:
2835         * WebCore.vcxproj/WebCore.vcxproj.filters:
2836         * WebCore.xcodeproj/project.pbxproj:
2837         * bindings/js/JSBindingsAllInOne.cpp:
2838         * bindings/v8/custom/V8CoordinatesCustom.cpp: Removed.
2839
2840 2013-03-22  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2841
2842         INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default
2843         https://bugs.webkit.org/show_bug.cgi?id=113005
2844
2845         Reviewed by Kent Tamura.
2846
2847         Use fallback format when datetime format from locale is not complete.
2848
2849         Tests: fast/forms/date-multiple-fields/date-multiple-fields-fallback-format.html
2850                fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format.html
2851                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format.html
2852                fast/forms/month-multiple-fields/month-multiple-fields-fallback-format.html
2853                fast/forms/time-multiple-fields/time-multiple-fields-fallback-format.html
2854                fast/forms/week-multiple-fields/week-multiple-fields-fallback-format.html
2855
2856         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2857         (DateTimeFormatValidator): A helper class that parses datetime format and tests existence of fields.
2858         (WebCore::DateTimeFormatValidator::DateTimeFormatValidator):
2859         (WebCore::DateTimeFormatValidator::visitField):
2860         (WebCore::DateTimeFormatValidator::validateFormat): Parses datetime format and validates by calling BaseMultipleFieldsDateAndTimeInputType::isValidFormat.
2861         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Checks if dateTimeFormat is valid, and uses fallback format if not.
2862         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2863         (BaseMultipleFieldsDateAndTimeInputType): Declare isValidFormat.
2864         * html/DateInputType.cpp:
2865         (WebCore::DateInputType::isValidFormat): Added.
2866         * html/DateInputType.h:
2867         (DateInputType):
2868         * html/DateTimeInputType.cpp:
2869         (WebCore::DateTimeInputType::isValidFormat): Added.
2870         * html/DateTimeInputType.h:
2871         (DateTimeInputType):
2872         * html/DateTimeLocalInputType.cpp:
2873         (WebCore::DateTimeLocalInputType::isValidFormat): Added.
2874         * html/DateTimeLocalInputType.h:
2875         (DateTimeLocalInputType):
2876         * html/MonthInputType.cpp:
2877         (WebCore::MonthInputType::isValidFormat): Added.
2878         * html/MonthInputType.h:
2879         (MonthInputType):
2880         * html/TimeInputType.cpp:
2881         (WebCore::TimeInputType::isValidFormat): Added.
2882         * html/TimeInputType.h:
2883         (TimeInputType):
2884         * html/WeekInputType.cpp:
2885         (WebCore::WeekInputType::isValidFormat): Added.
2886         * html/WeekInputType.h:
2887         (WeekInputType):
2888
2889 2013-03-22  Hajime Morrita  <morrita@google.com>
2890
2891         Custom Elements: "readyCallback" lifecycle callback should be called.
2892         https://bugs.webkit.org/show_bug.cgi?id=112538
2893
2894         Reviewed by Elliott Sprehn.
2895
2896         This change allows each custom element definition to hook up its instantiation,
2897         namely "readyCallback" lifecycle callback.
2898
2899         The change has two parts:
2900         - 1. Tracking which Element objects to be created.
2901         - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
2902           before the Element object is visible from page script.
2903
2904         For 1, CustomElementRegistry maintains list of "callback
2905         invocaions".  Each list item ("invocation") tracks the element
2906         which has a lifecycle callback to be invoked. Each invocation is
2907         registered when - Any custom element C++ object is instantiated.
2908         See changes on CustomElementConstructor.cpp.
2909
2910         This also happens when @is attribute is set by the parser or node
2911         cloning routine, which can turn a non-custom element into a
2912         type-extended custom element. See changes on Element.cpp.
2913
2914         For 2, CustomElementRegistry basically follows what
2915         MutationObserver is doing, and introduces a method called
2916         deliverLifecycleCallbacks(). This function flushes all pending
2917         callback invocations. You can think it as a dual of
2918         MutationObserver::deliverAllMutations().
2919
2920         The delivery function is called places where MutationObserver's
2921         deliverAllMutations() is called. In addition, it is also called
2922         just before returning from a set of DOM APIs. For example, it is
2923         called just before createElement() returns, so that possibly
2924         created custom element becomes ready through its readyCallback().
2925         Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
2926         principle, APIs which can create new custom element instnaces are
2927         marked. See CustomElementRegistry::CallbackDeliveryScope and
2928         changes on CodeGeneratorV8.pm.
2929
2930         We need this extra work because the readyCallback() needs to give
2931         an illusion so that JavaScript programmers feel like the
2932         readyCallback() callback being called just after it is created,
2933         instead of called on arbitrary late timing like MutationObserver
2934         notifications.
2935
2936         Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
2937                fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
2938                fast/dom/custom/lifecycle-ready-creation-api.html
2939                fast/dom/custom/lifecycle-ready-innerHTML.html
2940                fast/dom/custom/lifecycle-ready-parser-only.html
2941                fast/dom/custom/lifecycle-ready-parser-script.html
2942                fast/dom/custom/lifecycle-ready-paste.html
2943
2944         * bindings/scripts/CodeGeneratorV8.pm:
2945         - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
2946         (GenerateCustomElementInvocationScopeIfNeeded):
2947         (GenerateNormalAttrSetter):
2948         (GenerateFunction):
2949         * bindings/scripts/IDLAttributes.txt:
2950         * bindings/v8/CustomElementHelpers.cpp:
2951         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
2952         (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
2953         * bindings/v8/CustomElementHelpers.h:
2954         (CustomElementHelpers):
2955         * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
2956         (WebCore::V8RecursionScope::didLeaveScriptContext):
2957         * dom/CustomElementConstructor.cpp:
2958         (WebCore::CustomElementConstructor::createElement):
2959         (WebCore::CustomElementConstructor::createElementInternal):
2960         * dom/CustomElementConstructor.h:
2961         (WebCore::CustomElementConstructor::isExtended):
2962         (CustomElementConstructor):
2963         * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
2964         (WebCore::CustomElementInvocation::CustomElementInvocation):
2965         (WebCore::CustomElementInvocation::~CustomElementInvocation):
2966         (WebCore::activeCustomElementRegistries):
2967         (WebCore::CustomElementRegistry::~CustomElementRegistry):
2968         (WebCore::CustomElementRegistry::didGiveTypeExtension):
2969         (WebCore::CustomElementRegistry::didCreateElement):
2970         (WebCore::CustomElementRegistry::activate):
2971         (WebCore::CustomElementRegistry::deactivate):
2972         (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
2973         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
2974         * dom/CustomElementRegistry.h:
2975         (CustomElementInvocation):
2976         (WebCore::CustomElementInvocation::element):
2977         (CallbackDeliveryScope):
2978         (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
2979         (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
2980         (CustomElementRegistry):
2981         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
2982         * dom/Document.cpp:
2983         (WebCore::Document::createElement):
2984         (WebCore::Document::didCreateCustomElement):
2985         * dom/Document.h:
2986         (Document):
2987         * dom/Document.idl:
2988         * dom/Element.cpp:
2989         (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
2990         (WebCore::Element::parserSetAttributes):
2991         (WebCore::Element::cloneAttributesFromElement):
2992         * dom/Element.h:
2993         * dom/Node.idl:
2994         * dom/ShadowRoot.idl:
2995         * html/HTMLElement.idl:
2996         * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
2997         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
2998         (WebCore::HTMLScriptRunner::runScript):
2999
3000 2013-03-22  Tommy Widenflycht  <tommyw@google.com>
3001
3002         MediaStream API: Finalize the RTCPeerConnection states
3003         https://bugs.webkit.org/show_bug.cgi?id=112792
3004
3005         Reviewed by Adam Barth.
3006
3007         This patch finalized the RTCPeerConnection state and events. These changes
3008         have not yet pushed out to the editors draft; but they are uncontroversial
3009         and agreed upon.
3010
3011         readyState will be deleted; please use the replacement signalingState which is already available.
3012         onstatechange -> onsignalingstatechange
3013         onicechange -> oniceconnectionstatechange
3014         ongatheringchange will be deleted since oniceconnectionstatechange can be used for the same purpose.
3015         RTCIceConnectionState::"starting" -> RTCIceConnectionState::"new"
3016
3017         Patch covered by modified tests.
3018
3019         * Modules/mediastream/RTCPeerConnection.cpp:
3020         (WebCore::RTCPeerConnection::RTCPeerConnection):
3021         (WebCore::RTCPeerConnection::iceConnectionState):
3022         (WebCore::RTCPeerConnection::changeSignalingState):
3023         (WebCore::RTCPeerConnection::changeIceGatheringState):
3024         (WebCore::RTCPeerConnection::changeIceConnectionState):
3025         * Modules/mediastream/RTCPeerConnection.h:
3026         (RTCPeerConnection):
3027         * Modules/mediastream/RTCPeerConnection.idl:
3028         * dom/EventNames.h:
3029         (WebCore):
3030         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
3031
3032 2013-03-22  Mike West  <mkwst@chromium.org>
3033
3034         Prefer 'KURL(ParsedURLString, String)' when dealing with known-good data.
3035         https://bugs.webkit.org/show_bug.cgi?id=112965
3036
3037         Reviewed by Alexey Proskuryakov.
3038
3039         In https://bugs.webkit.org/show_bug.cgi?id=112783#c6, Adam noted that
3040         it would be possible to use 'KURL(ParsedURLString, [url])' rather than
3041         'KURL(KURL(), [url])', since we knew that the URL in question is a
3042         value and absolute URL. This patch fixes the obvious instances of this
3043         pattern; there are several more 'KURL(KURL(), String)' calls in
3044         WebCore but these were the only places I was reasonably sure that bad
3045         data couldn't creep in.
3046
3047         * dom/Document.cpp:
3048         (WebCore::Document::updateBaseURL):
3049             'documentURI' is pulled from 'url()->string()'. It's safe.
3050         * page/ContentSecurityPolicy.cpp:
3051         (WebCore::gatherSecurityPolicyViolationEventData):
3052         (WebCore::ContentSecurityPolicy::reportViolation):
3053             'CallFrame::sourceURL()' is a known valid/absolute URL.
3054         * page/SecurityOrigin.cpp:
3055         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
3056         (WebCore::SecurityOrigin::create):
3057             The strings constructed here are certainly valid.
3058
3059 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
3060
3061         Web Inspector: Flame Chart. move overview window when user scrolls the chart.
3062         https://bugs.webkit.org/show_bug.cgi?id=113014
3063
3064         Reviewed by Yury Semikhatsky.
3065
3066         I found that I could use scaling mechanics in OverviewGrid for scaling the chart.
3067         But the dragging part was not so simple due to the different approaches in
3068         OverviewGrid and FlameChart. OverviewGrid used _windowLeft and _windowRight
3069         when FlameChart used _xOffset and _xScaleFactor and width.
3070         It was not practical and I rewrote the FlameChart mechanics
3071         and now it also uses _windowLeft _windowRight.
3072
3073         * inspector/front-end/FlameChart.js:
3074         (WebInspector.FlameChart):
3075         (WebInspector.FlameChart.Calculator.prototype._updateBoundaries):
3076         (WebInspector.FlameChart.Calculator.prototype.computePosition):
3077         (WebInspector.FlameChart.prototype._onWindowChanged):
3078         (WebInspector.FlameChart.prototype._startCanvasDragging):
3079         (WebInspector.FlameChart.prototype._canvasDragging):
3080         (WebInspector.FlameChart.prototype._onMouseMove):
3081         (WebInspector.FlameChart.prototype._onMouseWheel):
3082         (WebInspector.FlameChart.prototype._coordinatesToNodeIndex):
3083         (WebInspector.FlameChart.prototype._drawOverviewCanvas):
3084         (WebInspector.FlameChart.prototype.draw):
3085         (WebInspector.FlameChart.prototype._updateBoundaries):
3086         (WebInspector.FlameChart.prototype.update):
3087         * inspector/front-end/OverviewGrid.js:
3088         (WebInspector.OverviewGrid.prototype.setWindowPosition):
3089         (WebInspector.OverviewGrid.prototype.setWindow):
3090         (WebInspector.OverviewGrid.prototype.addEventListener):
3091         (WebInspector.OverviewGrid.prototype.zoom):
3092         (WebInspector.OverviewGrid.Window.prototype._zoom):
3093         * inspector/front-end/inspectorCommon.css:
3094         (.overview-grid-window-rulers):
3095
3096 2013-03-22  Steve Block  <steveblock@chromium.org>
3097
3098         Move GeolocationClient.h to Modules/geolocation/
3099         https://bugs.webkit.org/show_bug.cgi?id=112997
3100
3101         Reviewed by Kentaro Hara.
3102
3103         No new tests, no functional change.
3104
3105         * GNUmakefile.list.am:
3106         * Modules/geolocation/GeolocationClient.h: Renamed from Source/WebCore/page/GeolocationClient.h.
3107         (WebCore):
3108         (GeolocationClient):
3109         (WebCore::GeolocationClient::~GeolocationClient):
3110         * WebCore.vcproj/WebCore.vcproj:
3111         * WebCore.vcxproj/WebCore.vcxproj:
3112         * WebCore.vcxproj/WebCore.vcxproj.filters:
3113         * WebCore.xcodeproj/project.pbxproj:
3114
3115 2013-03-22  Sheriff Bot  <webkit.review.bot@gmail.com>
3116
3117         Unreviewed, rolling out r146534 and r146565.
3118         http://trac.webkit.org/changeset/146534
3119         http://trac.webkit.org/changeset/146565
3120         https://bugs.webkit.org/show_bug.cgi?id=113017
3121
3122         "r146534 caused perf regression on Chromium Linux x64"
3123         (Requested by yurys on #webkit).
3124
3125         * bindings/scripts/CodeGeneratorV8.pm:
3126         (GenerateNormalAttrSetter):
3127         (GenerateOverloadedFunction):
3128         (GenerateFunctionCallback):
3129         (GenerateFunction):
3130         (GenerateParametersCheck):
3131         (GenerateSingleConstructorCallback):
3132         (GenerateNonStandardFunction):
3133         (GenerateImplementation):
3134         (GenerateFunctionCallString):
3135         * bindings/scripts/IDLAttributes.txt:
3136         * bindings/scripts/test/V8/V8Float64Array.cpp:
3137         (WebCore):
3138         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3139         (WebCore):
3140         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3141         (WebCore):
3142         * bindings/scripts/test/V8/V8TestInterface.cpp:
3143         (WebCore):
3144         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3145         (WebCore):
3146         * bindings/scripts/test/V8/V8TestObj.cpp:
3147         (WebCore):
3148         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3149         (WebCore):
3150         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
3151         (WebCore):
3152         * bindings/v8/CustomElementHelpers.cpp:
3153         * bindings/v8/CustomElementHelpers.h:
3154         (WebCore):
3155         (CustomElementHelpers):
3156         * bindings/v8/V8DOMConfiguration.cpp:
3157         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
3158         (WebCore::V8DOMConfiguration::configureTemplate):
3159         * bindings/v8/V8DOMConfiguration.h:
3160         (BatchedMethod):
3161         (V8DOMConfiguration):
3162         * bindings/v8/V8RecursionScope.cpp:
3163         (WebCore::V8RecursionScope::didLeaveScriptContext):
3164         * dom/CustomElementConstructor.cpp:
3165         (WebCore::CustomElementConstructor::createElement):
3166         * dom/CustomElementConstructor.h:
3167         (CustomElementConstructor):
3168         * dom/CustomElementRegistry.cpp:
3169         (WebCore::CustomElementRegistry::~CustomElementRegistry):
3170         * dom/CustomElementRegistry.h:
3171         (WebCore):
3172         (CustomElementRegistry):
3173         * dom/Document.cpp:
3174         (WebCore::Document::createElement):
3175         (WebCore::Document::registerElement):
3176         * dom/Document.h:
3177         * dom/Document.idl:
3178         * dom/Element.cpp:
3179         (WebCore::Element::parserSetAttributes):
3180         (WebCore::Element::cloneAttributesFromElement):
3181         * dom/Element.h:
3182         * dom/Element.idl:
3183         * dom/Node.idl:
3184         * dom/ShadowRoot.idl:
3185         * html/HTMLElement.idl:
3186         * html/parser/HTMLScriptRunner.cpp:
3187         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
3188         (WebCore::HTMLScriptRunner::runScript):
3189
3190 2013-03-22  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
3191
3192         [GStreamer] Memory leak in AudioFileReader::createBus()
3193         https://bugs.webkit.org/show_bug.cgi?id=112925
3194
3195         Reviewed by Martin Robinson.
3196
3197         Adopt the reference returned by g_timeout_source_new()
3198         to fix a memory leak.
3199
3200         No new tests. No change in behavior.
3201
3202         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3203         (WebCore::AudioFileReader::createBus):
3204
3205 2013-03-22  Steve Block  <steveblock@chromium.org>
3206
3207         Move page/Coordinates.[h|idl] to Modules/geolocation/
3208         https://bugs.webkit.org/show_bug.cgi?id=112945
3209
3210         Reviewed by Kentaro Hara.
3211
3212         No new tests, no functional change.
3213
3214         * CMakeLists.txt:
3215         * DerivedSources.make:
3216         * DerivedSources.pri:
3217         * GNUmakefile.list.am:
3218         * Modules/geolocation/Coordinates.h: Renamed from Source/WebCore/page/Coordinates.h.
3219         (WebCore):
3220         (Coordinates):
3221         (WebCore::Coordinates::create):
3222         (WebCore::Coordinates::isolatedCopy):
3223         (WebCore::Coordinates::latitude):
3224         (WebCore::Coordinates::longitude):
3225         (WebCore::Coordinates::altitude):
3226         (WebCore::Coordinates::accuracy):
3227         (WebCore::Coordinates::altitudeAccuracy):
3228         (WebCore::Coordinates::heading):
3229         (WebCore::Coordinates::speed):
3230         (WebCore::Coordinates::canProvideAltitude):
3231         (WebCore::Coordinates::canProvideAltitudeAccuracy):
3232         (WebCore::Coordinates::canProvideHeading):
3233         (WebCore::Coordinates::canProvideSpeed):
3234         (WebCore::Coordinates::Coordinates):
3235         * Modules/geolocation/Coordinates.idl: Renamed from Source/WebCore/page/Coordinates.idl.
3236         * Target.pri:
3237         * WebCore.gypi:
3238         * WebCore.vcproj/WebCore.vcproj:
3239         * WebCore.vcxproj/WebCore.vcxproj:
3240         * WebCore.vcxproj/WebCore.vcxproj.filters:
3241         * WebCore.xcodeproj/project.pbxproj:
3242
3243 2013-03-21  Hajime Morrita  <morrita@google.com>
3244
3245         Custom Elements: "readyCallback" lifecycle callback should be called.
3246         https://bugs.webkit.org/show_bug.cgi?id=112538
3247
3248         Reviewed by Elliott Sprehn.
3249
3250         This change allows each custom element definition to hook up its instantiation,
3251         namely "readyCallback" lifecycle callback.
3252
3253         The change has two parts:
3254         - 1. Tracking which Element objects to be created.
3255         - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
3256           before the Element object is visible from page script.
3257
3258         For 1, CustomElementRegistry maintains list of "callback
3259         invocaions".  Each list item ("invocation") tracks the element
3260         which has a lifecycle callback to be invoked. Each invocation is
3261         registered when - Any custom element C++ object is instantiated.
3262         See changes on CustomElementConstructor.cpp.
3263
3264         This also happens when @is attribute is set by the parser or node
3265         cloning routine, which can turn a non-custom element into a
3266         type-extended custom element. See changes on Element.cpp.
3267
3268         For 2, CustomElementRegistry basically follows what
3269         MutationObserver is doing, and introduces a method called
3270         deliverLifecycleCallbacks(). This function flushes all pending
3271         callback invocations. You can think it as a dual of
3272         MutationObserver::deliverAllMutations().
3273
3274         The delivery function is called places where MutationObserver's
3275         deliverAllMutations() is called. In addition, it is also called
3276         just before returning from a set of DOM APIs. For example, it is
3277         called just before createElement() returns, so that possibly
3278         created custom element becomes ready through its readyCallback().
3279         Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
3280         principle, APIs which can create new custom element instnaces are
3281         marked. See CustomElementRegistry::CallbackDeliveryScope and
3282         changes on CodeGeneratorV8.pm.
3283
3284         We need this extra work because the readyCallback() needs to give
3285         an illusion so that JavaScript programmers feel like the
3286         readyCallback() callback being called just after it is created,
3287         instead of called on arbitrary late timing like MutationObserver
3288         notifications.
3289
3290         Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
3291                fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
3292                fast/dom/custom/lifecycle-ready-creation-api.html
3293                fast/dom/custom/lifecycle-ready-innerHTML.html
3294                fast/dom/custom/lifecycle-ready-parser-only.html
3295                fast/dom/custom/lifecycle-ready-parser-script.html
3296                fast/dom/custom/lifecycle-ready-paste.html
3297
3298         * bindings/scripts/CodeGeneratorV8.pm:
3299         - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
3300         (GenerateCustomElementInvocationScopeIfNeeded):
3301         (GenerateNormalAttrSetter):
3302         (GenerateFunction):
3303         * bindings/scripts/IDLAttributes.txt:
3304         * bindings/v8/CustomElementHelpers.cpp:
3305         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
3306         (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
3307         * bindings/v8/CustomElementHelpers.h:
3308         (CustomElementHelpers):
3309         * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
3310         (WebCore::V8RecursionScope::didLeaveScriptContext):
3311         * dom/CustomElementConstructor.cpp:
3312         (WebCore::CustomElementConstructor::createElement):
3313         (WebCore::CustomElementConstructor::createElementInternal):
3314         * dom/CustomElementConstructor.h:
3315         (WebCore::CustomElementConstructor::isExtended):
3316         (CustomElementConstructor):
3317         * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
3318         (WebCore::CustomElementInvocation::CustomElementInvocation):
3319         (WebCore::CustomElementInvocation::~CustomElementInvocation):
3320         (WebCore::activeCustomElementRegistries):
3321         (WebCore::CustomElementRegistry::~CustomElementRegistry):
3322         (WebCore::CustomElementRegistry::didGiveTypeExtension):
3323         (WebCore::CustomElementRegistry::didCreateElement):
3324         (WebCore::CustomElementRegistry::activate):
3325         (WebCore::CustomElementRegistry::deactivate):
3326         (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
3327         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
3328         * dom/CustomElementRegistry.h:
3329         (CustomElementInvocation):
3330         (WebCore::CustomElementInvocation::element):
3331         (CallbackDeliveryScope):
3332         (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
3333         (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
3334         (CustomElementRegistry):
3335         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
3336         * dom/Document.cpp:
3337         (WebCore::Document::createElement):
3338         (WebCore::Document::didCreateCustomElement):
3339         * dom/Document.h:
3340         (Document):
3341         * dom/Document.idl:
3342         * dom/Element.cpp:
3343         (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
3344         (WebCore::Element::parserSetAttributes):
3345         (WebCore::Element::cloneAttributesFromElement):
3346         * dom/Element.h:
3347         * dom/Node.idl:
3348         * dom/ShadowRoot.idl:
3349         * html/HTMLElement.idl:
3350         * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
3351         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
3352         (WebCore::HTMLScriptRunner::runScript):
3353
3354 2013-03-21  Jer Noble  <jer.noble@apple.com>
3355
3356         Crash in WebCore::MediaPlayer::cachedResourceLoader + 4
3357         https://bugs.webkit.org/show_bug.cgi?id=112977
3358
3359         Reviewed by Geoffrey Garen.
3360
3361         Speculative fix for a NULL-dereference crash. MediaPlayerPrivateAVFoundationObjC is the
3362         sole owner of a WebCoreAVFLoaderDelegate instance. It releases this instance in its destructor,
3363         but it is possible that, on another thread, the AVAssetResourceLoader has already begun
3364         using the delegate and in so doing has retained it. By the time the delegate method is fired
3365         on the main thread, the MediaPlayerPrivateAVFoundationObjC owner of the delegate has already
3366         been deleted, and the delegate's m_callback pointer is now pointing at freed memory.
3367
3368         In addition to calling -[AVAssetResourceLoader setDelegate:queue:] to avoid any not-yet-started
3369         delegate callbacks, MediaPlayerPrivateAVFoundationObjC should clear the WebCoreAVFLoaderDelegate
3370         m_callback ivar, to avoid calling into freed memory for already queued delegate callbacks.
3371
3372         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3373         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the m_loaderDelegate's callback pointer.
3374         (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): Check the value of m_callback before continuing.
3375         (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]): Ditto.
3376         (-[WebCoreAVFLoaderDelegate setCallback:]): Added simple setter.
3377
3378 2013-03-21  Takashi Sakamoto  <tasak@google.com>
3379
3380         XMLDocumentParser doesn't parse <template> correctly.
3381         https://bugs.webkit.org/show_bug.cgi?id=112328
3382
3383         Reviewed by Hajime Morrita.
3384
3385         XMLDocumentParser should check whether a parent node is attached or not
3386         when a new element is appended.
3387
3388         Test: fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash.xhtml
3389
3390         * xml/parser/XMLDocumentParserLibxml2.cpp:
3391         (WebCore::XMLDocumentParser::startElementNs):
3392         m_currentNode is a parent node of newElement, but it is updated by
3393         pushCurrentNode. So firstly stored copied m_curretNode's value into
3394         local currentNode and used the currentNode to check whether
3395         newElement's parent is attached or not.
3396
3397 2013-03-21  David Grogan  <dgrogan@chromium.org>
3398
3399         Unreviewed, rolling out r146560.
3400         http://trac.webkit.org/changeset/146560
3401         https://bugs.webkit.org/show_bug.cgi?id=112862
3402
3403         invalid parameter to histogram
3404
3405         * platform/leveldb/LevelDBDatabase.cpp:
3406         (WebCore::LevelDBDatabase::open):
3407
3408 2013-03-21  David Grogan  <dgrogan@chromium.org>
3409
3410         IndexedDB: Histogram available disk space on attempt to open database
3411         https://bugs.webkit.org/show_bug.cgi?id=112862
3412
3413         Reviewed by Adam Barth.
3414
3415         ChromeOS suspects they might be hitting disk corruption when the disks
3416         are nearly full. This patch logs the available space to either the
3417         "success" or the "fail" histogram as appropriate so that the
3418         distributions can be compared.
3419
3420         No new tests - I don't know of a good way to test histograms. Local
3421         printf testing didn't turn up any bugs.
3422
3423         * platform/leveldb/LevelDBDatabase.cpp:
3424         (WebCore::HistogramFreeSpace):
3425         (WebCore):
3426         (WebCore::LevelDBDatabase::open):
3427
3428 2013-03-21  Li Yin  <li.yin@intel.com>
3429
3430         FileAPI: Remove deprecation warning when ArrayBuffer is in Blob constructor.
3431         https://bugs.webkit.org/show_bug.cgi?id=88389
3432
3433         Reviewed by Kenneth Russell.
3434
3435         Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
3436         Both ArrayBuffer and ArrayBufferView should be supported for Blob constructor.
3437
3438         Test: fast/files/blob-constructor.html.
3439
3440         * bindings/js/JSBlobCustom.cpp:
3441         (WebCore::JSBlobConstructor::constructJSBlob):
3442         * bindings/v8/custom/V8BlobCustom.cpp:
3443         (WebCore::V8Blob::constructorCustom):
3444         * fileapi/WebKitBlobBuilder.cpp:
3445         (WebCore::BlobBuilder::append): Remove the deprecated warning.
3446         * fileapi/WebKitBlobBuilder.h:
3447         (WebCore):
3448         (BlobBuilder):
3449
3450 2013-03-21  Takashi Sakamoto  <tasak@google.com>
3451
3452         [Shadow]: @host styles are not applied dynamically
3453         https://bugs.webkit.org/show_bug.cgi?id=112869
3454
3455         Reviewed by Elliott Sprehn.
3456
3457         Need to add features of @host @-rules