Assertion in LegacyWebArchive::create() in editing tests
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-03-20  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Assertion in LegacyWebArchive::create() in editing tests
4         https://bugs.webkit.org/show_bug.cgi?id=112642
5
6         Reviewed by Enrica Casucci.
7
8         It's possible for clipboard to be overriden between the time we retrieve clipboard types and the time
9         we actually retrieve the Web archive buffer. Add a null check to take this into account.
10
11         Also extracted fragmentFromWebArchive for clarity.
12
13         * platform/mac/PasteboardMac.mm:
14         (WebCore::fragmentFromWebArchive): Extracted.
15         (WebCore::Pasteboard::documentFragment):
16
17 2013-03-20  Chris Fleizach  <cfleizach@apple.com>
18
19         WebSpeech: Crash in WebCore::PlatformSpeechSynthesisUtterance::client / WebCore::SpeechSynthesis::didResumeSpeaking
20         https://bugs.webkit.org/show_bug.cgi?id=112728
21
22         Reviewed by Tim Horton.
23
24         When cancel() is called, there was a delay in the platform returning and saying speech was finished, which caused
25         the m_currentSpeechUtterance variable to get deallocated but not cleared. 
26
27         This patch fixes up the management of the utterances in SpeechSynthesis and the Mac platform given that
28         we can't rely on the platform to return immediately on a stop speaking job.
29
30         Test: platform/mac/fast/speechsynthesis/speech-synthesis-cancel-crash.html
31
32         * Modules/speech/SpeechSynthesis.cpp:
33         (WebCore::SpeechSynthesis::cancel):
34         (WebCore::SpeechSynthesis::resume):
35         * platform/mac/PlatformSpeechSynthesizerMac.mm:
36         (-[WebSpeechSynthesisWrapper cancel]):
37         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
38         (-[WebSpeechSynthesisWrapper speechSynthesizer:willSpeakWord:ofString:]):
39
40 2013-03-20  Eric Carlson  <eric.carlson@apple.com>
41
42         Unreviewed, fix Mac release build.
43
44         * page/CaptionUserPreferencesMac.mm:
45         (WebCore::languageIdentifier):
46
47 2013-03-20  Eric Carlson  <eric.carlson@apple.com>
48
49         Allow ports specific text track menu
50         https://bugs.webkit.org/show_bug.cgi?id=112800
51
52         Reviewed by Dean Jackson.
53
54         No new tests, existing tests updated for changes.
55
56         * English.lproj/Localizable.strings: Add localizable strings for text track names.
57
58         * html/HTMLMediaElement.cpp:
59         (WebCore::HTMLMediaElement::HTMLMediaElement): userPrefersCaptions -> shouldShowCaptions.
60         (WebCore::HTMLMediaElement::setSelectedTextTrack): toggleTrackAtIndex -> setSelectedTextTrack.
61         (WebCore::HTMLMediaElement::userPrefersCaptions): userPrefersCaptions -> shouldShowCaptions.
62         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Get preferences from CaptionUserPreferences
63             instead of from Settings.
64         (WebCore::HTMLMediaElement::setSelectedTextTrack): Renamed from toggleTrackAtIndex. Now takes
65             a TextTrack* instead of an int.
66         (WebCore::HTMLMediaElement::captionPreferencesChanged): Don't force a recalculation unless 
67             captions are enabled/disabled to avoid unnecessary thrash.
68         * html/HTMLMediaElement.h:
69
70         * html/shadow/MediaControlElements.cpp:
71         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Use the menu to track
72             map instead of just the track index.
73         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Build and configure the
74             menu from the menu to track map.
75         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Start with a list
76             of tracks already sorted according to platform specific rules. Build a menu to track map
77             so tracks are retained while the menu is visible.
78         * html/shadow/MediaControlElements.h:
79
80         * html/shadow/MediaControls.cpp:
81         (WebCore::MediaControls::textTrackPreferencesChanged): Call closedCaptionTracksChanged so the
82             track menu will be rebuilt before it is shown again.
83
84         * html/track/InbandTextTrack.cpp:
85         (WebCore::InbandTextTrack::containsOnlyForcedSubtitles): New, passthrough to the private track.
86         (WebCore::InbandTextTrack::isMainProgramContent): Ditto.
87         (WebCore::InbandTextTrack::isEasyToRead): Ditto.
88         * html/track/InbandTextTrack.h:
89         * html/track/TextTrack.h:
90
91         * html/track/TextTrackList.cpp:
92         (WebCore::TextTrackList::contains): New.
93         * html/track/TextTrackList.h:
94
95         * page/CaptionUserPreferences.cpp:
96         (WebCore::CaptionUserPreferences::CaptionUserPreferences): Pull in from .h ditto.
97         (WebCore::CaptionUserPreferences::~CaptionUserPreferences): Ditto.
98         (WebCore::CaptionUserPreferences::shouldShowCaptions): Renamed from userPrefersCaptions. 
99         (WebCore::CaptionUserPreferences::setShouldShowCaptions): New.
100         (WebCore::CaptionUserPreferences::userPrefersCaptions): Ditto.
101         (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
102         (WebCore::CaptionUserPreferences::userPrefersSubtitles): Ditto.
103         (WebCore::CaptionUserPreferences::setUserPrefersSubtitles): Ditto.
104         (WebCore::CaptionUserPreferences::userPrefersTextDescriptions): Ditto.
105         (WebCore::CaptionUserPreferences::setUserPrefersTextDescriptions): Ditto.
106         (WebCore::CaptionUserPreferences::displayNameForTrack): Ditto.
107         (WebCore::CaptionUserPreferences::sortedTrackListForMenu): Ditto.
108         * page/CaptionUserPreferences.h:
109
110         * page/CaptionUserPreferencesMac.h:
111         * page/CaptionUserPreferencesMac.mm:
112         (WebCore::CaptionUserPreferencesMac::shouldShowCaptions): Renamed from userPrefersCaptions. 
113         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): New.
114         (WebCore::CaptionUserPreferences::userPrefersSubtitles): Ditto.
115         (WebCore::trackDisplayName): Update logic used to build track title.
116         (WebCore::CaptionUserPreferencesMac::displayNameForTrack): Call trackDisplayName.
117         (WebCore::textTrackCompare): Text track title sort comparison function.
118         (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): New. Sort the list of tracks
119             according to title, language, and user preferences.
120
121         * platform/Language.cpp:
122         (WebCore::displayNameForLanguageLocale): Don't leak the CFLocale.
123         
124         * platform/LocalizedStrings.cpp:
125         (WebCore::textTrackCountryAndLanguageMenuItemText): New.
126         (WebCore::textTrackLanguageMenuItemText): Ditto.
127         (WebCore::closedCaptionTrackMenuItemText): Ditto.
128         (WebCore::sdhTrackMenuItemText): Ditto.
129         (WebCore::easyReaderTrackMenuItemText): Ditto.
130         * platform/LocalizedStrings.h:
131
132         * platform/graphics/InbandTextTrackPrivate.h:
133         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
134         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
135         (WebCore::InbandTextTrackPrivateAVFObjC::containsOnlyForcedSubtitles): New, return AVFoundation property.
136         (WebCore::InbandTextTrackPrivateAVFObjC::isMainProgramContent): Ditto.
137         (WebCore::InbandTextTrackPrivateAVFObjC::isEasyToRead): Ditto.
138
139         * testing/InternalSettings.cpp:
140         (WebCore::InternalSettings::setShouldDisplayTrackKind): Set setting via CaptionUserPreferences
141             instead of from Settings.
142         (WebCore::InternalSettings::shouldDisplayTrackKind): Get setting from CaptionUserPreferences
143             instead of from Settings.
144
145 2013-03-20  Zan Dobersek  <zdobersek@igalia.com>
146
147         [GTK] Clean up TemporaryLinkStubs.cpp
148         https://bugs.webkit.org/show_bug.cgi?id=112820
149
150         Reviewed by Philippe Normand.
151
152         Clean up the TemporaryLinkStubs.cpp file, removing unnecessary includes and prettifying the code.
153
154         No new tests - no new functionality.
155
156         * platform/gtk/TemporaryLinkStubs.cpp:
157         (WebCore):
158         (WebCore::getSupportedKeySizes):
159         (WebCore::signedPublicKeyAndChallengeString):
160         (WebCore::userIdleTime):
161
162 2013-03-20  Yufeng Shen  <miletus@chromium.org>
163
164         Remove PlatformEvent::GestureDoubleTap
165         https://bugs.webkit.org/show_bug.cgi?id=93045
166
167         Reviewed by Antonio Gomes.
168
169         PlatformEvent::GestureDoubleTap is not currently
170         used in WebCore and replaced by GestureTap with
171         tap count 2, so remove it.
172
173         Test: We are removing something that is not used, so
174         no new test. All existing tests pass.
175
176         * dom/GestureEvent.cpp:
177         (WebCore::GestureEvent::create):
178         * page/EventHandler.cpp:
179         (WebCore::EventHandler::handleGestureEvent):
180         * platform/PlatformEvent.h:
181         * platform/chromium/PopupContainer.cpp:
182         (WebCore::PopupContainer::handleGestureEvent):
183
184 2013-03-20  Ojan Vafai  <ojan@chromium.org>
185
186         Move repaint methods from RenderObject to RenderBox
187         https://bugs.webkit.org/show_bug.cgi?id=112773
188
189         Reviewed by Julien Chaffraix.
190
191         repaintOverhangingFloats and repaintDuringLayoutIfMoved are only ever called
192         on RenderBoxes, so don't need to be on RenderObject. This also lets us
193         devirtualize repaintDuringLayoutIfMoved.
194
195         * rendering/RenderBox.h:
196         (WebCore::RenderBox::repaintOverhangingFloats):
197         * rendering/RenderObject.cpp:
198         * rendering/RenderObject.h:
199
200 2013-03-20  Christian Biesinger  <cbiesinger@chromium.org>
201
202         Add a feature observer for RenderDeprecatedFlexibleBox
203         https://bugs.webkit.org/show_bug.cgi?id=112740
204
205         Reviewed by Tony Chang.
206
207         No new tests - only adding measurements.
208
209         * page/FeatureObserver.h:
210         Add constants for RenderDeprecatedFlexibleBox, and add separate
211         constants for its use in the UI and in extensions.
212         * rendering/RenderDeprecatedFlexibleBox.cpp:
213         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
214         Call FeatureObserver. Check the document()->url() to see which
215         constant to use.
216
217 2013-03-20  Tim Horton  <timothy_horton@apple.com>
218
219         Autosize should use documentRect height instead of scrollHeight
220         https://bugs.webkit.org/show_bug.cgi?id=112770
221
222         Reviewed by David Levin.
223
224         Autosizing fails to compute the correct height if the root element is very
225         small but the document has significant overflow.
226
227         No new tests; autosizing is not currently exposed in a testable way on Mac.
228
229         * page/FrameView.cpp:
230         (WebCore::FrameView::autoSizeIfEnabled):
231
232 2013-03-20  Julien Chaffraix  <jchaffraix@webkit.org>
233
234         [CSS Grid Layout] Improper repainting when grid item change their position
235         https://bugs.webkit.org/show_bug.cgi?id=112749
236
237         Reviewed by Ojan Vafai.
238
239         Tests: fast/css-grid-layout/grid-element-change-columns-repaint.html
240                fast/css-grid-layout/grid-element-change-rows-repaint.html
241                fast/css-grid-layout/grid-item-change-column-repaint.html
242                fast/css-grid-layout/grid-item-change-row-repaint.html
243
244         * rendering/RenderGrid.cpp:
245         (WebCore::RenderGrid::layoutGridItems):
246         Added a call to repaintDuringLayoutIfMoved to repaint moving grid items.
247
248 2013-03-20  Arvid Nilsson  <anilsson@rim.com>
249
250         [BlackBerry] compositing/iframes/scroll-fixed-transformed-element.html fails in manual testing
251         https://bugs.webkit.org/show_bug.cgi?id=112806
252
253         Reviewed by Antonio Gomes.
254
255         PR 283363
256
257         When scrolling the iframe, the position: fixed element is correctly
258         positioned, that is, as if it was fixed with respect to the iframe's
259         viewport. When scrolling the main frame however, the fixed pos element
260         was positioned as if it was fixed with respect to the main frame's
261         viewport.
262
263         Fixed by falling back to using the WebKit-thread scroll position for
264         fixed positioning in LayerRenderer, if the override doesn't have a
265         position currently set, i.e. if we are not currently scrolling the
266         iframe.
267
268         The effects of the bug are only visual, i.e. not detectable by DRT.
269
270         Manually testable using compositing/iframes/scroll-fixed-transformed-element.html
271
272         * platform/graphics/blackberry/LayerRenderer.cpp:
273         (WebCore::LayerRenderer::updateLayersRecursive):
274
275 2013-03-20  Michael Pruett  <michael@68k.org>
276
277         [V8] Simplify implementation of EnforceRange conversions
278         https://bugs.webkit.org/show_bug.cgi?id=112758
279
280         Reviewed by Kentaro Hara.
281
282         Factor out EnforceRange conversion into a helper function.
283         Simplify calculation for truncation.
284
285         Tests: fast/js/webidl-type-mapping.html
286                storage/indexeddb/cursor-advance.html
287                storage/indexeddb/cursor-advance-workers.html
288                storage/indexeddb/intversion-bad-parameters.html
289
290         * bindings/v8/V8Binding.cpp:
291         (WebCore::enforceRange):
292         (WebCore):
293         (WebCore::toInt32):
294         (WebCore::toUInt32):
295         (WebCore::toInt64):
296         (WebCore::toUInt64):
297
298 2013-03-20  Harald Alvestrand  <hta@google.com>
299
300         Remove Local/Remote and RTCStatsElement from WebRTCStats API
301         https://bugs.webkit.org/show_bug.cgi?id=112678
302
303         Reviewed by Adam Barth.
304
305         Pure removal, remaining functionality covered by existing test.
306
307         * Modules/mediastream/RTCStatsReport.cpp:
308         * Modules/mediastream/RTCStatsReport.h:
309         (RTCStatsReport):
310         * Modules/mediastream/RTCStatsResponse.cpp:
311         * Modules/mediastream/RTCStatsResponse.h:
312         (RTCStatsResponse):
313         * platform/chromium/support/WebRTCStatsResponse.cpp:
314         * platform/mediastream/RTCStatsResponseBase.h:
315         (RTCStatsResponseBase):
316
317 2013-03-20  Xingnan Wang  <xingnan.wang@intel.com>
318
319         ASSERTION FAILED: !m_renderingAutomaticPullNodes.size()
320         https://bugs.webkit.org/show_bug.cgi?id=112777
321
322         Reviewed by Chris Rogers.
323
324         * Modules/webaudio/AudioContext.cpp:
325         (WebCore::AudioContext::~AudioContext):
326
327 2013-03-20  Rouslan Solomakhin  <rouslan@chromium.org>
328
329         Copy-paste should not spellcheck when continuous spellcheck is turned off
330         https://bugs.webkit.org/show_bug.cgi?id=112464
331
332         Reviewed by Ryosuke Niwa.
333
334         Test: editing/spelling/spellcheck-paste-continuous-disabled.html
335
336         * WebCore.exp.in: Export WebCore::Editor::isContinuousSpellCheckingEnabled() and WebCore::Editor::toggleContinuousSpellChecking() for use by internals.
337         * WebCore.order: Export WebCore::Editor::isContinuousSpellCheckingEnabled() and WebCore::Editor::toggleContinuousSpellChecking() for use by internals.
338         * editing/Editor.cpp:
339         (WebCore::Editor::replaceSelectionWithFragment): Do not spellcheck if continuous spellcheck is turned off.
340         * testing/Internals.cpp:
341         (WebCore::Internals::resetToConsistentState): Leave continuous spellcheck turned on after a test.
342         (WebCore::Internals::setContinuousSpellCheckingEnabled): Let tests enable and disable continuous spellcheck.
343         (WebCore):
344         * testing/Internals.h: Let tests enable and disable continuous spellcheck.
345         (Internals):
346         * testing/Internals.idl: Let tests enable and disable continuous spellcheck.
347
348 2013-03-20  Aaron Colwell  <acolwell@chromium.org>
349
350         Add support for MediaSource::isTypeSupported()
351         https://bugs.webkit.org/show_bug.cgi?id=112301
352
353         Reviewed by Darin Fisher.
354
355         Test: http/tests/media/media-source/video-media-source-is-type-supported.html
356
357         * Modules/mediasource/MediaSource.cpp:
358         (WebCore::MediaSource::addSourceBuffer): Added isTypeSupported() call to verify parameters
359                                                  pass into this method.
360         (WebCore::MediaSource::isTypeSupported):
361         (WebCore):
362         * Modules/mediasource/MediaSource.h:
363         (MediaSource):
364         * Modules/mediasource/MediaSource.idl: Added isTypeSupported().
365         * platform/MIMETypeRegistry.h:
366         (MIMETypeRegistry): Added isSupportedMediaSourceMIMEType().
367         * platform/chromium/MIMETypeRegistryChromium.cpp:
368         (WebCore):
369         (WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType): Implemented in terms of WebMimeRegistry::isSupportedMediaSourceMIMEType.
370
371 2013-03-20  Brent Fulgham  <bfulgham@webkit.org>
372
373         [WinCairo] Unreviewed VS2010 build correction.
374
375         * WebCore.vcxproj/WebCore.vcxproj: Enable build of NetworkStorageSessionStub.cpp
376         for WinCairo port.
377         * WebCore.vcxproj/WebCore.vcxproj.filters: Correct build type of
378         CookieJarCurl from 'custom' to 'C++ source file'
379
380 2013-03-20  Marja Hölttä  <marja@chromium.org>
381
382         [V8] Rename DOMDataStore::isMainWorldObject
383         https://bugs.webkit.org/show_bug.cgi?id=112817
384
385         Reviewed by Jochen Eisinger.
386
387         No new tests (no changes in functionality).
388
389         * bindings/v8/DOMDataStore.h:
390         (WebCore::DOMDataStore::getWrapperFast):
391         (WebCore::DOMDataStore::getWrapper):
392         (WebCore::DOMDataStore::getWrapperForMainWorld):
393         (WebCore::DOMDataStore::setWrapper):
394         (WebCore::DOMDataStore::canExistInWorker):
395
396 2013-03-20  Ilya Tikhonovsky  <loislo@chromium.org>
397
398         Web Inspector: Flame Chart. Provide Overview pane for better user expirience.
399         https://bugs.webkit.org/show_bug.cgi?id=112496
400
401         Reviewed by Yury Semikhatsky.
402
403         This patch implements basic part of Overview Pane in FlameChart.
404         The idea of the patch is to move everything into chart-container element.
405         And put OverviewGrid into new overview-container element.
406
407         Drive by change: fix the layout of the flame chart elements.
408         Drive by change: fix the drag window & drag resizer mechanics
409         for the case when the parent element has zero offsetLeft.
410
411         * inspector/front-end/FlameChart.js:
412         (WebInspector.FlameChart):
413         (WebInspector.FlameChart.OverviewCalculator):
414         (WebInspector.FlameChart.OverviewCalculator.prototype._updateBoundaries):
415         (WebInspector.FlameChart.OverviewCalculator.prototype.computePosition):
416         (WebInspector.FlameChart.OverviewCalculator.prototype.formatTime):
417         (WebInspector.FlameChart.OverviewCalculator.prototype.maximumBoundary):
418         (WebInspector.FlameChart.OverviewCalculator.prototype.minimumBoundary):
419         (WebInspector.FlameChart.OverviewCalculator.prototype.boundarySpan):
420         (WebInspector.FlameChart.prototype._onWindowChanged):
421         (WebInspector.FlameChart.prototype._adjustXScale):
422         (WebInspector.FlameChart.prototype.update):
423         * inspector/front-end/OverviewGrid.js:
424         (WebInspector.OverviewGrid.Window):
425         (WebInspector.OverviewGrid.Window.prototype._resizerElementStartDragging):
426         (WebInspector.OverviewGrid.Window.prototype._leftResizeElementDragging):
427         (WebInspector.OverviewGrid.Window.prototype._rightResizeElementDragging):
428         (WebInspector.OverviewGrid.Window.prototype._startWindowSelectorDragging):
429         (WebInspector.OverviewGrid.Window.prototype._windowSelectorDragging):
430         (WebInspector.OverviewGrid.Window.prototype._endWindowSelectorDragging):
431         (WebInspector.OverviewGrid.Window.prototype._setWindowPosition):
432         (WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
433         (WebInspector.OverviewGrid.WindowSelector):
434         * inspector/front-end/TimelineOverviewPane.js:
435         * inspector/front-end/flameChart.css:
436         (.chart-container .item-anchor):
437         (.overview-container):
438         (.chart-container):
439         (#flame-chart-overview-grid .resources-dividers-label-bar):
440         * inspector/front-end/inspectorCommon.css:
441         (.resources-divider-label):
442
443 2013-03-20  Sergey Ryazanov  <serya@chromium.org>
444
445         Web Inspector: Plumbing CSS warnings
446         https://bugs.webkit.org/show_bug.cgi?id=111334
447
448         Reviewed by Pavel Feldman.
449
450         Adding a framework for plumbing CSS warnings from CSSParser/grammar to the Inspector console.
451
452         * css/CSSParser.cpp:
453         (WebCore::CSSParser::CSSParser):
454         (WebCore::CSSParser::parseSheet):
455         (WebCore::CSSParser::syntaxError):
456         (WebCore):
457         (WebCore::CSSParser::isLoggingErrors):
458         (WebCore::CSSParser::logError):
459         * css/CSSParser.h:
460         (CSSParser):
461         (CSSParser::Location):
462         (WebCore):
463         * css/StyleSheetContents.cpp:
464         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
465         (WebCore::StyleSheetContents::parseString):
466         (WebCore::StyleSheetContents::parseStringAtLine):
467         * css/StyleSheetContents.h:
468         (StyleSheetContents):
469         * dom/StyleElement.cpp:
470         (WebCore::StyleElement::createSheet):
471         * page/PageConsole.cpp:
472         (WebCore::PageConsole::addMessage):
473
474 2013-03-20  Justin Novosad  <junov@google.com>
475
476         [Chromium] Code cleanup: removing support for non-deferred 2d canvas rendering
477         https://bugs.webkit.org/show_bug.cgi?id=112605
478
479         Reviewed by James Robinson.
480
481         Deleting all the code that was used for propagating and supporting
482         the Chromium setting for disabling deferred 2d canvas rendering.
483
484         No new tests: Affected code paths covered by existing tests.
485
486         * html/HTMLCanvasElement.cpp:
487         (WebCore::HTMLCanvasElement::createImageBuffer):
488         * html/HTMLCanvasElement.h:
489         * page/Settings.in:
490         * platform/graphics/ImageBuffer.h:
491         (WebCore::ImageBuffer::create):
492         (ImageBuffer):
493         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
494         (WebCore::ImageBuffer::ImageBuffer):
495         * platform/graphics/cairo/ImageBufferCairo.cpp:
496         (WebCore::ImageBuffer::ImageBuffer):
497         * platform/graphics/cg/ImageBufferCG.cpp:
498         (WebCore::ImageBuffer::ImageBuffer):
499         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
500         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
501         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
502         (WebCore::Canvas2DLayerBridge::prepareForDraw):
503         (WebCore::Canvas2DLayerBridge::storageAllocatedForRecordingChanged):
504         (WebCore::Canvas2DLayerBridge::storageAllocatedForRecording):
505         (WebCore::Canvas2DLayerBridge::freeMemoryIfPossible):
506         (WebCore::Canvas2DLayerBridge::flush):
507         (WebCore::Canvas2DLayerBridge::skCanvas):
508         (WebCore::Canvas2DLayerBridge::prepareTexture):
509         (WebCore::Canvas2DLayerBridge::contextAcquired):
510         * platform/graphics/chromium/Canvas2DLayerBridge.h:
511         (WebCore::Canvas2DLayerBridge::create):
512         (Canvas2DLayerBridge):
513         * platform/graphics/qt/ImageBufferQt.cpp:
514         (WebCore::ImageBuffer::ImageBuffer):
515         * platform/graphics/skia/ImageBufferSkia.cpp:
516         (WebCore::createAcceleratedCanvas):
517         (WebCore::ImageBuffer::ImageBuffer):
518         * platform/graphics/wince/ImageBufferWinCE.cpp:
519         (WebCore::ImageBuffer::ImageBuffer):
520         * platform/graphics/wx/ImageBufferWx.cpp:
521         (WebCore::ImageBuffer::ImageBuffer):
522
523 2013-03-20  Mike West  <mkwst@chromium.org>
524
525         Drop full URLs from cross-domain access errors caused by 'document.domain' mismatches.
526         https://bugs.webkit.org/show_bug.cgi?id=112813
527
528         Reviewed by Timothy Hatcher.
529
530         Following up on http://wkbug.com/112042, this patch brings 'document.domain'
531         mismatch error messages into line with the newly origin-only default
532         message. There will probably be two or three more patches in this series
533         just to keep the rebaselines down to something managably reviewable.
534
535         * page/DOMWindow.cpp:
536         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
537             Move the default message redefinition up out of the final 'return' so
538             that 'document.domain' mismatch errors grab the new text.
539
540 2013-03-20  Ken Kania  <kkania@chromium.org>
541
542         Web Inspector: Add promptText param to Page.handleJavaScriptDialog
543         https://bugs.webkit.org/show_bug.cgi?id=112706
544
545         Reviewed by Pavel Feldman.
546
547         * inspector/Inspector.json:
548         * inspector/InspectorClient.h:
549         (WebCore::InspectorClient::handleJavaScriptDialog):
550         * inspector/InspectorPageAgent.cpp:
551         (WebCore::InspectorPageAgent::handleJavaScriptDialog):
552         * inspector/InspectorPageAgent.h:
553
554 2013-03-20  Andrey Lushnikov  <lushnikov@chromium.org>
555
556         Web Inspector: fix SourceFrame.js compilation warning
557         https://bugs.webkit.org/show_bug.cgi?id=112804
558
559         Reviewed by Yury Semikhatsky.
560
561         No new tests: no change in behavior.
562
563         - Explicitly parse lineNumber from object property name.
564         - Add type annotations to ensure addMessageToSource is monomorphic.
565
566         * inspector/front-end/SourceFrame.js:
567         (WebInspector.SourceFrame.prototype.clearMessages):
568
569 2013-03-20  Dan Carney  <dcarney@google.com>
570
571         [v8] unsafe persistent access in V8LazyEventListener
572         https://bugs.webkit.org/show_bug.cgi?id=112807
573
574         Reviewed by Kentaro Hara.
575
576         No new tests.
577
578         * bindings/v8/V8LazyEventListener.cpp:
579         (WebCore::toObjectWrapper):
580
581 2013-03-20  Arvid Nilsson  <anilsson@rim.com>
582
583         [BlackBerry] Enable appropriate vertex attribute arrays in LayerRenderer::useProgram()
584         https://bugs.webkit.org/show_bug.cgi?id=112757
585
586         Reviewed by Rob Buis.
587
588         PR 306465
589
590         Make the LayerRenderer and associated code more bullet-proof when it
591         comes to enabling vertex attribute arrays, by enabling them already
592         when LayerRenderer::useProgram() is called. This fixes a bug where the
593         video hole punch rectangle wasn't punched when preceding rendering
594         caused the vertex attribute array at index 0 to be disabled, such as
595         when rendering the text selection overlay immediately before video.
596
597         A number of places where the position attribute index was hard-coded
598         to 0 were also fixed. This causes no change in behavior, the position
599         attribute was really at 0, but nonetheless that shouldn't be hardcoded.
600
601         The effects of this patch are only manually testable.
602
603         * platform/graphics/blackberry/LayerCompositingThread.cpp:
604         (WebCore::LayerCompositingThread::drawTextures):
605         (WebCore::LayerCompositingThread::drawSurface):
606         * platform/graphics/blackberry/LayerRenderer.cpp:
607         (WebCore::LayerRenderer::compositeBuffer):
608         (WebCore::LayerRenderer::drawColor):
609         (WebCore::LayerRenderer::drawDebugBorder):
610         (WebCore::LayerRenderer::drawHolePunchRect):
611         (WebCore::LayerRenderer::compositeLayersRecursive):
612         (WebCore::LayerRenderer::useProgram):
613
614 2013-03-20  Andrey Lushnikov  <lushnikov@chromium.org>
615
616         Web Inspector: [CodeMirror] implement highlightRange method
617         https://bugs.webkit.org/show_bug.cgi?id=112802
618
619         Reviewed by Vsevolod Vlasov.
620
621         - Implement highlightRange/removeHighlight methods in
622         CodeMirrorTextEditor.
623         - Update TextEditor interface closure annotations.
624
625         No new tests.
626
627         * inspector/front-end/CodeMirrorTextEditor.js:
628         (WebInspector.CodeMirrorTextEditor.prototype.removeHighlight):
629         (WebInspector.CodeMirrorTextEditor.prototype.highlightRange):
630         * inspector/front-end/DefaultTextEditor.js:
631         * inspector/front-end/TextEditor.js:
632
633 2013-03-20  Andrey Lushnikov  <lushnikov@chromium.org>
634
635         Web Inspector: [CodeMirror] show source location for codemirror text editor
636         https://bugs.webkit.org/show_bug.cgi?id=112798
637
638         Reviewed by Vsevolod Vlasov.
639
640         No new tests.
641
642         - Implement CodeMirrorTextEditor.copyRange method
643         - Fire "selectionChange" event for text editor delegate from
644         CodeMirrorTextEditor.
645
646         * inspector/front-end/CodeMirrorTextEditor.js:
647         (WebInspector.CodeMirrorTextEditor):
648         (WebInspector.CodeMirrorTextEditor.prototype.copyRange):
649         (WebInspector.CodeMirrorTextEditor.prototype._cursorActivity):
650
651 2013-03-20  Sheriff Bot  <webkit.review.bot@gmail.com>
652
653         Unreviewed, rolling out r146331.
654         http://trac.webkit.org/changeset/146331
655         https://bugs.webkit.org/show_bug.cgi?id=112795
656
657         Does not work as expected (Requested by carewolf on #webkit).
658
659         * platform/graphics/qt/FontQt.cpp:
660         (WebCore::Font::initFormatForTextLayout):
661
662 2013-03-20  Eugene Klyuchnikov  <eustas@chromium.org>
663
664         Web Inspector: [Resources] Local Storage: "Add item" row height doesn't match underlying grid.
665         https://bugs.webkit.org/show_bug.cgi?id=112433
666
667         Reviewed by Pavel Feldman.
668
669         Fixed cell height to correspond grid step.
670
671         * inspector/front-end/dataGrid.css:
672         (.data-grid td): Fixed cell height to correspond grid step.
673
674 2013-03-20  Allan Sandfeld Jensen  <allan.jensen@digia.com>
675
676         [Qt] New fast/text/word-space-with-kerning-3.html fails on Qt
677         https://bugs.webkit.org/show_bug.cgi?id=112668
678
679         Reviewed by Jocelyn Turcotte.
680
681         Kerning is on by default in Qt. This means we need to disable it
682         when WebCore does not request it.
683
684         * platform/graphics/qt/FontQt.cpp:
685         (WebCore::Font::initFormatForTextLayout):
686
687 2013-03-20  Ilya Tikhonovsky  <loislo@chromium.org>
688
689         Web Inspector: OverviewGrid rename classes according to names of js classes.
690         https://bugs.webkit.org/show_bug.cgi?id=112786
691
692         Reviewed by Yury Semikhatsky.
693
694         It is a part of meta bug 'extract OverviewGrid from TimelineOverviewPane'.
695         As the last step it renames timeline-...... classes to overview-grid-...... classes
696         and moves them to inspectorCommon.css
697
698         * inspector/front-end/OverviewGrid.js:
699         (WebInspector.OverviewGrid):
700         (WebInspector.OverviewGrid.Window):
701         (WebInspector.OverviewGrid.Window.prototype._startWindowSelectorDragging):
702         (WebInspector.OverviewGrid.WindowSelector):
703         (WebInspector.OverviewGrid.WindowSelector.prototype._createSelectorElement):
704         * inspector/front-end/inspectorCommon.css:
705         (.overview-grid-window-selector):
706         (.overview-grid-window):
707         (.overview-grid-dividers-background):
708         (.overview-grid-window-rulers):
709         (.overview-grid-window-resizer):
710         * inspector/front-end/timelinePanel.css:
711         (.timeline-frame-overview .overview-grid-window):
712         (.timeline-frame-overview .overview-grid-dividers-background):
713
714 2013-03-20  Dmitry Zvorygin  <zvorygin@chromium.org>
715
716         Web Inspector: Switch Drawer animation from JavaScript to CSS transitions.
717         https://bugs.webkit.org/show_bug.cgi?id=112586
718
719         This is prerequisite to make Drawer work in overlay mode.
720
721         Reviewed by Vsevolod Vlasov.
722
723         * inspector/front-end/Drawer.js:
724         (WebInspector.Drawer):
725         (WebInspector.Drawer.prototype.show):
726         (WebInspector.Drawer.prototype.hide.this.animationFinished):
727         (WebInspector.Drawer.prototype.hide):
728         (WebInspector.Drawer.prototype.immediatelyFinishAnimation):
729         (WebInspector.Drawer.prototype._getAnimationStyles):
730         * inspector/front-end/UIUtils.js:
731         * inspector/front-end/inspector.css:
732         (.animate-slow *):
733         (.animate #main):
734         (.animate #floating-status-bar-container):
735         (.animate #drawer):
736         (.animate #bottom-status-bar-container > *):
737
738 2013-03-19  Eugene Klyuchnikov  <eustas@chromium.org>
739
740         Web Inspector: [DataGrid] Refactorings.
741         https://bugs.webkit.org/show_bug.cgi?id=112690
742
743         Reviewed by Pavel Feldman.
744
745         1. Avoid using string literals;
746         2. Remove unused notifications; turn "populate" to method invocation;
747         3. Replace some getters with regular functions.
748
749         * inspector/front-end/DataGrid.js: Applied refactorings.
750         * inspector/front-end/ApplicationCacheItemsView.js: Adopted changes.
751         * inspector/front-end/BottomUpProfileDataGridTree.js: Ditto.
752         * inspector/front-end/CPUProfileView.js: Ditto.
753         * inspector/front-end/CSSSelectorProfileView.js: Ditto.
754         * inspector/front-end/CookiesTable.js: Ditto.
755         * inspector/front-end/DirectoryContentView.js: Ditto.
756         * inspector/front-end/HeapSnapshotDataGrids.js: Ditto.
757         * inspector/front-end/HeapSnapshotGridNodes.js: Ditto.
758         * inspector/front-end/NativeMemorySnapshotView.js: Ditto.
759         * inspector/front-end/NetworkPanel.js: Ditto.
760         * inspector/front-end/ProfileDataGridTree.js: Ditto.
761         * inspector/front-end/ResourceWebSocketFrameView.js: Ditto.
762         * inspector/front-end/TopDownProfileDataGridTree.js: Ditto.
763         * inspector/front-end/dataGrid.css: Ditto.
764
765 2013-03-19  Allan Sandfeld Jensen  <allan.jensen@digia.com>
766
767         [Qt] Support -webkit-font-smoothing
768         https://bugs.webkit.org/show_bug.cgi?id=106009
769
770         Reviewed by Jocelyn Turcotte.
771
772         Set QFont antialiasing settings based on the font smoothing settings in FontDescription.
773
774         * platform/graphics/qt/FontPlatformDataQt.cpp:
775         (WebCore::FontPlatformData::FontPlatformData):
776
777 2013-03-20  Alexei Filippov  <alph@chromium.org>
778
779         Web Inspector: Allow toolbar customization
780         https://bugs.webkit.org/show_bug.cgi?id=112440
781
782         Adds a tools menu item that allows the user to show/hide
783         inspector panels on the toolbar.
784
785         Reviewed by Yury Semikhatsky.
786
787         * inspector/front-end/InspectorView.js:
788         * inspector/front-end/Settings.js:
789         (WebInspector.Settings):
790         (WebInspector.ExperimentsSettings):
791         * inspector/front-end/Toolbar.js:
792         (WebInspector.Toolbar):
793         (WebInspector.Toolbar.prototype.addPanel):
794         (WebInspector.Toolbar.prototype._isPanelVisibleByDefault):
795         (WebInspector.Toolbar.prototype.set _hidePanel):
796         (WebInspector.Toolbar.prototype._showPanel):
797         (WebInspector.Toolbar.prototype._togglePanelsMenu):
798         * inspector/front-end/inspector.css:
799         (#toolbar-panels-menu):
800         (#toolbar-panels-menu:hover):
801         (#toolbar-panels-menu:active):
802         * inspector/front-end/inspector.html:
803
804 2013-03-20  Eugene Klyuchnikov  <eustas@chromium.org>
805
806         Web Inspector: [Settings] Add "storage" parameter to WebInspector.Setting
807         https://bugs.webkit.org/show_bug.cgi?id=112667
808
809         Reviewed by Pavel Feldman.
810
811         New parameter will allow more options on how long setting will persist.
812         Possible options are: localStorage, sessionStorage and no-storage.
813
814         Additional change: use delete instead of .removeItem to make it possible
815         use any object as storage.
816
817         * inspector/front-end/Settings.js:
818         Added "storage" parameter and used is instead of "window.localStorage".
819
820 2013-03-20  Pan Deng  <pan.deng@intel.com>
821
822         Web Inspector: [Network] Fix the bug of WebSocketFrameView crash.
823         https://bugs.webkit.org/show_bug.cgi?id=112771.
824
825         Reviewed by Pavel Feldman.
826
827         WebSocketFrameView crashes when websocket receives an error message, this
828         patch fixes this problem, and error message will be shown in dataGrid as expected.
829
830         No new tests.
831
832         * inspector/front-end/ResourceWebSocketFrameView.js:
833         (WebInspector.ResourceWebSocketFrameView): Handle the errorMessage case.
834
835 2013-03-20  Dmitry Zvorygin  <zvorygin@chromium.org>
836
837         Remove remainings of obsolete LogLevels and MessageSources from inspector JS part.
838         https://bugs.webkit.org/show_bug.cgi?id=112709
839
840         By the way tuned messagesources in ApplicationCacheGroup.
841
842         Reviewed by Pavel Feldman.
843
844         * inspector/front-end/ConsoleMessage.js:
845         (WebInspector.ConsoleMessageImpl.prototype.toMessageElement):
846         (WebInspector.ConsoleMessageImpl.prototype.toString):
847         * inspector/front-end/ConsoleModel.js:
848         * inspector/front-end/ExtensionAPI.js:
849         (defineCommonExtensionSymbols):
850         * inspector/front-end/ExtensionServer.js:
851         (WebInspector.ExtensionServer.prototype._onAddConsoleMessage):
852         (WebInspector.ExtensionServer.prototype._makeConsoleMessage):
853         * loader/appcache/ApplicationCacheGroup.cpp:
854         (WebCore::ApplicationCacheGroup::didReceiveResponse):
855         (WebCore::ApplicationCacheGroup::didFinishLoading):
856         (WebCore::ApplicationCacheGroup::didFail):
857
858 2013-03-20  Krzysztof Czech  <k.czech@samsung.com>
859
860         [GTK] accessibility/aria-scrollbar-role.html is failing
861         https://bugs.webkit.org/show_bug.cgi?id=98358
862
863         Reviewed by Martin Robinson.
864
865         Adds support for checking an orientation attribute of accessibility object.
866         AccessibilityObject that represents ScrollBar element should be ATK_VALUE type.
867         ScrollBar element can be considered as a Range Widget that is able to expose some
868         range values.
869
870         Test: accessibility/aria-scrollbar-role.html
871
872         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
873         (setAtkStateSetFromCoreObject):
874         (getInterfaceMaskFromObject):
875
876 2013-03-20  Zan Dobersek  <zdobersek@igalia.com>
877
878         Unreviewed. Fixing a typo in libLevelDB_la_CFLAGS assignment - cxflags -> cflags.
879
880         * GNUmakefile.am:
881
882 2013-03-20  Robert Hogan  <robert@webkit.org>
883
884         Absolute position div without width specified does not reflow its text when it is moved (and computed width changes)
885         https://bugs.webkit.org/show_bug.cgi?id=112052
886
887         Reviewed by Emil A Eklund.
888         
889         If a positioned block has auto width then any movement means the block needs to be resized.
890
891         Test: fast/block/positioned-block-auto-width-movement.html
892
893         * rendering/style/RenderStyle.cpp:
894         (WebCore::positionedObjectMoved):
895         (WebCore::RenderStyle::diff):
896
897 2013-03-19  Sheriff Bot  <webkit.review.bot@gmail.com>
898
899         Unreviewed, rolling out r146301.
900         http://trac.webkit.org/changeset/146301
901         https://bugs.webkit.org/show_bug.cgi?id=112776
902
903         Caused hundreds of tests to hit assertions on Windows debug
904         bots (Requested by rniwa on #webkit).
905
906         * CMakeLists.txt:
907         * GNUmakefile.list.am:
908         * Target.pri:
909         * WebCore.exp.in:
910         * WebCore.gypi:
911         * WebCore.vcproj/WebCore.vcproj:
912         * WebCore.vcxproj/WebCore.vcxproj:
913         * WebCore.vcxproj/WebCore.vcxproj.filters:
914         * WebCore.xcodeproj/project.pbxproj:
915         * loader/DocumentLoader.cpp:
916         (WebCore::DocumentLoader::DocumentLoader):
917         (WebCore::DocumentLoader::mainResourceLoader):
918         (WebCore::DocumentLoader::~DocumentLoader):
919         (WebCore::DocumentLoader::mainResourceData):
920         (WebCore::DocumentLoader::stopLoading):
921         (WebCore::DocumentLoader::finishedLoading):
922         (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
923         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
924         (WebCore::DocumentLoader::responseReceived):
925         (WebCore::DocumentLoader::continueAfterContentPolicy):
926         (WebCore::DocumentLoader::reportMemoryUsage):
927         (WebCore::DocumentLoader::receivedData):
928         (WebCore::DocumentLoader::clearMainResourceLoader):
929         (WebCore::DocumentLoader::setDefersLoading):
930         (WebCore::DocumentLoader::setMainResourceDataBufferingPolicy):
931         (WebCore::DocumentLoader::addSubresourceLoader):
932         (WebCore::DocumentLoader::isLoadingMainResource):
933         (WebCore):
934         (WebCore::DocumentLoader::maybeLoadEmpty):
935         (WebCore::DocumentLoader::startLoadingMainResource):
936         * loader/DocumentLoader.h:
937         (WebCore):
938         (DocumentLoader):
939         * loader/MainResourceLoader.cpp: Added.
940         (WebCore):
941         (WebCore::MainResourceLoader::MainResourceLoader):
942         (WebCore::MainResourceLoader::~MainResourceLoader):
943         (WebCore::MainResourceLoader::create):
944         (WebCore::MainResourceLoader::clearResource):
945         (WebCore::MainResourceLoader::frameLoader):
946         (WebCore::MainResourceLoader::request):
947         (WebCore::MainResourceLoader::resourceData):
948         (WebCore::MainResourceLoader::redirectReceived):
949         (WebCore::MainResourceLoader::responseReceived):
950         (WebCore::MainResourceLoader::dataReceived):
951         (WebCore::MainResourceLoader::notifyFinished):
952         (WebCore::MainResourceLoader::reportMemoryUsage):
953         (WebCore::MainResourceLoader::load):
954         (WebCore::MainResourceLoader::setDefersLoading):
955         (WebCore::MainResourceLoader::defersLoading):
956         (WebCore::MainResourceLoader::setDataBufferingPolicy):
957         (WebCore::MainResourceLoader::loader):
958         (WebCore::MainResourceLoader::identifier):
959         * loader/MainResourceLoader.h: Added.
960         (WebCore):
961         (MainResourceLoader):
962         (WebCore::MainResourceLoader::cachedMainResource):
963         (WebCore::MainResourceLoader::documentLoader):
964         * loader/mac/DocumentLoaderMac.cpp:
965         (WebCore::DocumentLoader::schedule):
966         (WebCore::DocumentLoader::unschedule):
967
968 2013-03-19  Mike West  <mkwst@chromium.org>
969
970         CSP 1.1: Stub out SecurityPolicyViolationEvent interface.
971         https://bugs.webkit.org/show_bug.cgi?id=112681
972
973         Reviewed by Adam Barth.
974
975         A first pass at a SecurityPolicyViolationEvent interface is defined in
976         CSP 1.1's editor's draft[1]. This patch puts the big components into
977         place so that we can start getting some implementation experience with
978         the new event interface as it's defined, and feed that back into the
979         working group.
980
981         Here, we're only defining the interface, and creating a listener on the
982         Document. Events aren't yet being fired when Content Security Policy
983         violations occur. I'll tackle that in a future patch; adding files is
984         a big enough annoyance to do it separately.
985
986         This patch has only two web-visible impacts:
987
988         - Document objects now have an 'onsecuritypolicyviolation' attribute.
989         - A SecurityPolicyViolationEvent constructor is accessible on the Window object.
990
991         Ports that have not enabled the CSP_NEXT flag should experience no change.
992
993         [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#securitypolicyviolationevent-events
994
995         Test: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-basics.html
996
997         * CMakeLists.txt:
998         * GNUmakefile.list.am:
999         * WebCore.gypi:
1000         * WebCore.vcproj/WebCore.vcproj:
1001         * WebCore.xcodeproj/project.pbxproj:
1002             Wow! A new file! This is so exciting! I'm going to tell ALL my build
1003             systems about this!
1004         * dom/Document.h:
1005         * dom/Document.idl:
1006             Define an 'onsecuritypolicyviolation' event handler on Document objects.
1007         * dom/EventNames.h:
1008         * dom/EventNames.in:
1009             Define a 'securitypolicyviolation' event type.
1010         * dom/SecurityPolicyViolationEvent.h: Added.
1011         (WebCore::SecurityPolicyViolationEventInit::SecurityPolicyViolationEventInit):
1012         (SecurityPolicyViolationEventInit):
1013         (SecurityPolicyViolationEvent):
1014         (WebCore::SecurityPolicyViolationEvent::create):
1015         (WebCore::SecurityPolicyViolationEvent::documentURI):
1016         (WebCore::SecurityPolicyViolationEvent::referrer):
1017         (WebCore::SecurityPolicyViolationEvent::blockedURI):
1018         (WebCore::SecurityPolicyViolationEvent::violatedDirective):
1019         (WebCore::SecurityPolicyViolationEvent::effectiveDirective):
1020         (WebCore::SecurityPolicyViolationEvent::originalPolicy):
1021         (WebCore::SecurityPolicyViolationEvent::sourceURL):
1022         (WebCore::SecurityPolicyViolationEvent::lineNumber):
1023         (WebCore::SecurityPolicyViolationEvent::interfaceName):
1024         (WebCore::SecurityPolicyViolationEvent::SecurityPolicyViolationEvent):
1025         * dom/SecurityPolicyViolationEvent.idl: Added.
1026             Define the SecurityPolicyViolationEvent's IDL, and then create all the
1027             boilerplate necessary to properly initialize a SecurityPolicyViolationEvent
1028             object with the relevant properties.
1029         * page/DOMWindow.idl:
1030             Add the new SecurityPolicyViolationEvent constructor to the Window object
1031             so it's available on a page.
1032
1033 2013-03-19  Eugene Klyuchnikov  <eustas@chromium.org>
1034
1035         Web Inspector: [Timeline] Tune status bar UI for limited-width window.
1036         https://bugs.webkit.org/show_bug.cgi?id=112702
1037
1038         Reviewed by Pavel Feldman.
1039
1040         Reduce filter titles when there is not enough space.
1041
1042         * inspector/front-end/TimelinePanel.js: Add classnames to elements.
1043         * inspector/front-end/timelinePanel.css: Specify "flex" behaviour.
1044
1045 2013-03-19  Nate Chapin  <japhet@chromium.org>
1046
1047         Merge MainResourceLoader into DocumentLoader
1048         https://bugs.webkit.org/show_bug.cgi?id=104969
1049
1050         Reviewed by Adam Barth.
1051
1052         No new tests, refactor only.
1053
1054         * CMakeLists.txt:
1055         * GNUmakefile.list.am:
1056         * Target.pri:
1057         * WebCore.exp.in:
1058         * WebCore.gypi:
1059         * WebCore.vcproj/WebCore.vcproj:
1060         * WebCore.vcxproj/WebCore.vcxproj:
1061         * WebCore.vcxproj/WebCore.vcxproj.filters:
1062         * WebCore.xcodeproj/project.pbxproj:
1063         * loader/DocumentLoader.cpp:
1064         (WebCore::DocumentLoader::DocumentLoader):
1065         (WebCore::DocumentLoader::mainResourceLoader):
1066         (WebCore::DocumentLoader::~DocumentLoader): Move main resource clearing from
1067             ~MainResourceLoader.
1068         (WebCore::DocumentLoader::mainResourceData):
1069         (WebCore::DocumentLoader::stopLoading):
1070         (WebCore::DocumentLoader::notifyFinished): Moved from MainResourceLoader::notifyFinished.
1071         (WebCore):
1072         (WebCore::DocumentLoader::finishedLoading):
1073         (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
1074         (WebCore::DocumentLoader::redirectReceived):
1075         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
1076         (WebCore::DocumentLoader::responseReceived):
1077         (WebCore::DocumentLoader::continueAfterContentPolicy):
1078         (WebCore::DocumentLoader::reportMemoryUsage):
1079         (WebCore::DocumentLoader::dataReceived):
1080         (WebCore::DocumentLoader::clearMainResourceLoader):
1081         (WebCore::DocumentLoader::setDefersLoading):
1082         (WebCore::DocumentLoader::setMainResourceDataBufferingPolicy):
1083         (WebCore::DocumentLoader::addSubresourceLoader):
1084         (WebCore::DocumentLoader::maybeLoadEmpty):
1085         (WebCore::DocumentLoader::startLoadingMainResource): Don't keep separate checks
1086              for normal and empty loads, just use a single boolean.
1087         * loader/DocumentLoader.h:
1088         (WebCore::DocumentLoader::isLoadingMainResource):
1089         * loader/MainResourceLoader.cpp: Removed.
1090         * loader/MainResourceLoader.h: Removed.
1091         * loader/mac/DocumentLoaderMac.cpp:
1092         (WebCore::DocumentLoader::schedule):
1093         (WebCore::DocumentLoader::unschedule):
1094
1095 2013-03-19  Ankur Taly  <ataly@google.com>
1096
1097         Cache a pointer to V8DOMActivityLogger in PerContextData.
1098         https://bugs.webkit.org/show_bug.cgi?id=112719
1099
1100         Reviewed by Kentaro Hara.
1101
1102         Adds a data member (and getter, setter methods) to V8PerContextData
1103         that holds a pointer to a V8DOMActivityLogger. This member is set while
1104         initializing the context for a V8DOMWindowShell. Ownership of the pointer
1105         is still retained by the HashMap in DOMWrapperWorld.
1106         As a result of this patch, subsequent patches that will implement logging
1107         for DOM API access (See bug 107207) will be able to obtain a reference to
1108         the logger directly from PerContextData. This will benefit performance as it
1109         will be faster than looking up the logger in the DOMActivityLoggerMap in
1110         DOMWrapperWorld.
1111
1112         There are no new tests as there is no change in behavior.
1113
1114         * bindings/v8/V8DOMWindowShell.cpp:
1115         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1116         * bindings/v8/V8PerContextData.h:
1117         (WebCore::V8PerContextData::activityLogger):
1118         (V8PerContextData):
1119         (WebCore::V8PerContextData::setActivityLogger):
1120
1121 2013-03-19  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1122
1123         do not use string reference for enum support in CodeGeneratorJS.pm
1124         https://bugs.webkit.org/show_bug.cgi?id=112760
1125
1126         Reviewed by Kentaro Hara.
1127
1128         Do use string references in generated JS bindings for enum values.
1129
1130         Test: bindings/scripts/test/TestObj.idl
1131
1132         * bindings/scripts/CodeGeneratorJS.pm:
1133         (GenerateImplementation):
1134         (GenerateParametersCheck):
1135         * bindings/scripts/test/JS/JSTestObj.cpp:
1136         (WebCore::setJSTestObjEnumAttr):
1137         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
1138
1139 2013-03-19  Simon Fraser  <simon.fraser@apple.com>
1140
1141         Make RLC::haveNonMainLayersWithTiledBacking() public and fix the name
1142         https://bugs.webkit.org/show_bug.cgi?id=112763
1143
1144         Reviewed by Tim Horton.
1145
1146         Downstream code needs to call hasNonMainLayersWithTiledBacking().
1147
1148         * rendering/RenderLayerCompositor.h:
1149         (WebCore::RenderLayerCompositor::hasNonMainLayersWithTiledBacking):
1150         (RenderLayerCompositor):
1151
1152 2013-03-19  David Levin  <levin@chromium.org>
1153
1154         FrameLoader::didChangeIcons isn't called when the favicon is changed.
1155         https://bugs.webkit.org/show_bug.cgi?id=112080
1156
1157         Reviewed by Dmitry Titov.
1158
1159         Test: fast/dom/icon-url-property.html
1160
1161         * dom/Document.cpp:
1162         (WebCore::Document::addIconURL): Made the callback for didChangeIcons
1163         happen whenever there are favicon changes instead of filtering it
1164         and have to be in sync about what hosts care about. As far as I could
1165         tell no hosts rely on this callback except for Chromium, so in general
1166         doing less work here may potentially help a small amount for other
1167         ports.
1168
1169 2013-03-19  Michael Pruett  <michael@68k.org>
1170
1171         Don't throw on infinity or NaN index in HTMLOptionsCollection.add()
1172         https://bugs.webkit.org/show_bug.cgi?id=112612
1173
1174         Reviewed by Kentaro Hara.
1175
1176         HTMLOptionsCollection.add() should not throw a type error when
1177         its optional index argument is infinity or NaN. Such values
1178         should instead be converted to 0 with no error.
1179
1180         Tests: fast/dom/non-numeric-values-numeric-parameters.html
1181                fast/js/select-options-add.html
1182
1183         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1184         (WebCore::JSHTMLOptionsCollection::add):
1185
1186 2013-03-19  Dominic Mazzoni  <dmazzoni@google.com>
1187
1188         Security: Heap-use-after-free in WebCore::AXObjectCache::getOrCreate
1189         https://bugs.webkit.org/show_bug.cgi?id=112044
1190
1191         Reviewed by Chris Fleizach.
1192
1193         Always call recalcSectionsIfNeeded before accessing
1194         table sections.
1195
1196         Test: accessibility/table-remove-cell-crash.html
1197
1198         * accessibility/AccessibilityTable.cpp:
1199         (WebCore::AccessibilityTable::addChildren):
1200
1201 2013-03-19  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1202
1203         [v8] add IDL 'enum' in DOM methods
1204         https://bugs.webkit.org/show_bug.cgi?id=112644
1205
1206         Reviewed by Kentaro Hara.
1207
1208         This adds V8 support for enumerations in method parameters.
1209
1210         Test: bindings/scripts/test/TestObj.idl
1211
1212         * bindings/scripts/CodeGeneratorV8.pm:
1213         (GenerateParametersCheck):
1214         * bindings/scripts/test/V8/V8TestObj.cpp:
1215         (WebCore::TestObjV8Internal::methodWithEnumArgMethod):
1216
1217 2013-03-19  Kenneth Russell  <kbr@google.com>
1218
1219         Unreviewed, rolling out r146277.
1220         http://trac.webkit.org/changeset/146277
1221         https://bugs.webkit.org/show_bug.cgi?id=111695
1222
1223         Broke Chromium Android build
1224
1225         * Modules/speech/SpeechSynthesis.cpp:
1226         (WebCore::SpeechSynthesis::boundaryEventOccurred):
1227         (WebCore::SpeechSynthesis::didStartSpeaking):
1228         (WebCore::SpeechSynthesis::didPauseSpeaking):
1229         (WebCore::SpeechSynthesis::didResumeSpeaking):
1230         (WebCore::SpeechSynthesis::didFinishSpeaking):
1231         (WebCore::SpeechSynthesis::speakingErrorOccurred):
1232         (WebCore):
1233         * Modules/speech/SpeechSynthesis.h:
1234         (SpeechSynthesis):
1235         * Modules/speech/SpeechSynthesisUtterance.cpp:
1236         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
1237         (WebCore::SpeechSynthesisUtterance::setVoice):
1238         * Modules/speech/SpeechSynthesisUtterance.h:
1239         (WebCore::SpeechSynthesisUtterance::text):
1240         (WebCore::SpeechSynthesisUtterance::setText):
1241         (WebCore::SpeechSynthesisUtterance::lang):
1242         (WebCore::SpeechSynthesisUtterance::setLang):
1243         (WebCore::SpeechSynthesisUtterance::volume):
1244         (WebCore::SpeechSynthesisUtterance::setVolume):
1245         (WebCore::SpeechSynthesisUtterance::rate):
1246         (WebCore::SpeechSynthesisUtterance::setRate):
1247         (WebCore::SpeechSynthesisUtterance::pitch):
1248         (WebCore::SpeechSynthesisUtterance::setPitch):
1249         (WebCore::SpeechSynthesisUtterance::startTime):
1250         (WebCore::SpeechSynthesisUtterance::setStartTime):
1251         (WebCore::SpeechSynthesisUtterance::platformUtterance):
1252         (SpeechSynthesisUtterance):
1253         * Modules/speech/SpeechSynthesisVoice.h:
1254         * WebCore.exp.in:
1255         * WebCore.gypi:
1256         * platform/PlatformSpeechSynthesis.h:
1257         (PlatformSpeechSynthesis):
1258         * platform/PlatformSpeechSynthesisUtterance.cpp:
1259         * platform/PlatformSpeechSynthesisUtterance.h:
1260         (PlatformSpeechSynthesisUtterance):
1261         * platform/PlatformSpeechSynthesisVoice.cpp:
1262         (WebCore::PlatformSpeechSynthesisVoice::create):
1263         * platform/PlatformSpeechSynthesisVoice.h:
1264         (PlatformSpeechSynthesisVoice):
1265         * platform/PlatformSpeechSynthesizer.cpp:
1266         (WebCore::PlatformSpeechSynthesizer::create):
1267         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
1268         (WebCore):
1269         * platform/PlatformSpeechSynthesizer.h:
1270         (PlatformSpeechSynthesizerClient):
1271         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
1272         (PlatformSpeechSynthesizer):
1273         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Removed.
1274         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Removed.
1275         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Removed.
1276         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Removed.
1277         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Removed.
1278         * platform/mac/PlatformSpeechSynthesizerMac.mm:
1279         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
1280         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
1281         (WebCore::PlatformSpeechSynthesizer::speak):
1282         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
1283         (WebCore::PlatformSpeechSynthesizerMock::create):
1284         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
1285         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
1286         (WebCore::PlatformSpeechSynthesizerMock::speak):
1287         * platform/mock/PlatformSpeechSynthesizerMock.h:
1288         (PlatformSpeechSynthesizerMock):
1289
1290 2013-03-19  Antti Koivisto  <antti@apple.com>
1291
1292         Don't compute background obscuration on every repaint
1293         https://bugs.webkit.org/show_bug.cgi?id=112457
1294
1295         Reviewed by Simon Fraser.
1296
1297         Test: fast/backgrounds/obscured-background-child-style-change.html
1298         
1299         It is generally enough to compute background obscuration status once per layout rather than doing it on every repaint.
1300         Since there are fewer layouts than repaints this will allow more expensive checks in the future.
1301         
1302         With this patch adds caching and invalidation of the obscuration status.
1303
1304         * rendering/RenderBlock.cpp:
1305         (WebCore::RenderBlock::layout):
1306         
1307             Invalidate the obscuration status on layout.
1308
1309         * rendering/RenderBox.cpp:
1310         (WebCore::RenderBox::styleDidChange):
1311         
1312             Invalidate the parent obscuration status if there is repaint-only style change (often background related). 
1313             Tested by the new fast/css/obscured-background-child-style-change.html.
1314
1315         (WebCore::RenderBox::layout):
1316         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
1317         * rendering/RenderBox.h:
1318         * rendering/RenderImage.cpp:
1319         (WebCore::RenderImage::imageChanged):
1320         (WebCore::RenderImage::notifyFinished):
1321         (WebCore::RenderImage::boxShadowShouldBeAppliedToBackground):
1322         (WebCore::RenderImage::computeBackgroundIsKnownToBeObscured):
1323         
1324             Use CachedImage::currentFrameKnownToBeOpaque which ensures that the frame is decoded and we get the real status.
1325             Tested by an additional case in fast/css/obscured-background-child-style-change.html.
1326
1327         * rendering/RenderImage.h:
1328         * rendering/RenderObject.cpp:
1329         (WebCore::RenderObject::styleWillChange):
1330         * rendering/RenderObject.h:
1331         (WebCore::RenderObject::hasBoxDecorations):
1332         (WebCore::RenderObject::computeBackgroundIsKnownToBeObscured):
1333         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
1334         (RenderObjectBitfields):
1335         (WebCore::RenderObject::RenderObjectBitfields::boxDecorationState):
1336         (WebCore::RenderObject::RenderObjectBitfields::setBoxDecorationState):
1337         
1338             Combine box decoration bit and the obscuration status so we only need one extra bit.
1339
1340         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
1341         (WebCore::RenderObject::setHasBoxDecorations):
1342         (WebCore::RenderObject::invalidateBackgroundObscurationStatus):
1343         (WebCore::RenderObject::backgroundIsKnownToBeObscured):
1344         * rendering/RenderReplaced.cpp:
1345         (WebCore::RenderReplaced::layout):
1346
1347 2013-03-19  Dominic Mazzoni  <dmazzoni@google.com>
1348
1349         Implement Web Speech Synthesis for Chromium
1350         https://bugs.webkit.org/show_bug.cgi?id=111695
1351
1352         Reviewed by Adam Barth.
1353
1354         Straightforward implementation of speech synthesis
1355         for Chromium by exposing interfaces for the platform
1356         to implement.
1357
1358         * Modules/speech/SpeechSynthesis.cpp:
1359         (WebCore::SpeechSynthesis::boundaryEventOccurred):
1360         (WebCore::SpeechSynthesis::didStartSpeaking):
1361         (WebCore::SpeechSynthesis::didPauseSpeaking):
1362         (WebCore::SpeechSynthesis::didResumeSpeaking):
1363         (WebCore::SpeechSynthesis::didFinishSpeaking):
1364         (WebCore::SpeechSynthesis::speakingErrorOccurred):
1365         (WebCore):
1366         * Modules/speech/SpeechSynthesis.h:
1367         (SpeechSynthesis):
1368         * Modules/speech/SpeechSynthesisUtterance.cpp:
1369         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
1370         (WebCore):
1371         (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
1372         (WebCore::SpeechSynthesisUtterance::setVoice):
1373         * Modules/speech/SpeechSynthesisUtterance.h:
1374         (SpeechSynthesisUtterance):
1375         (WebCore::SpeechSynthesisUtterance::text):
1376         (WebCore::SpeechSynthesisUtterance::setText):
1377         (WebCore::SpeechSynthesisUtterance::lang):
1378         (WebCore::SpeechSynthesisUtterance::setLang):
1379         (WebCore::SpeechSynthesisUtterance::volume):
1380         (WebCore::SpeechSynthesisUtterance::setVolume):
1381         (WebCore::SpeechSynthesisUtterance::rate):
1382         (WebCore::SpeechSynthesisUtterance::setRate):
1383         (WebCore::SpeechSynthesisUtterance::pitch):
1384         (WebCore::SpeechSynthesisUtterance::setPitch):
1385         (WebCore::SpeechSynthesisUtterance::startTime):
1386         (WebCore::SpeechSynthesisUtterance::setStartTime):
1387         (WebCore::SpeechSynthesisUtterance::platformUtterance):
1388         * Modules/speech/SpeechSynthesisVoice.h:
1389         (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
1390         * WebCore.exp.in:
1391         * WebCore.gypi:
1392         * platform/PlatformSpeechSynthesis.h:
1393         (PlatformSpeechSynthesis):
1394         * platform/PlatformSpeechSynthesisUtterance.cpp:
1395         (WebCore):
1396         (WebCore::PlatformSpeechSynthesisUtterance::create):
1397         * platform/PlatformSpeechSynthesisUtterance.h:
1398         (PlatformSpeechSynthesisUtterance):
1399         (WebCore::PlatformSpeechSynthesisUtterance::setClient):
1400         * platform/PlatformSpeechSynthesisVoice.cpp:
1401         (WebCore):
1402         (WebCore::PlatformSpeechSynthesisVoice::create):
1403         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
1404         * platform/PlatformSpeechSynthesisVoice.h:
1405         (PlatformSpeechSynthesisVoice):
1406         (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
1407         (WebCore::PlatformSpeechSynthesisVoice::setName):
1408         (WebCore::PlatformSpeechSynthesisVoice::setLang):
1409         (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
1410         (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
1411         * platform/PlatformSpeechSynthesizer.cpp:
1412         (WebCore::PlatformSpeechSynthesizer::create):
1413         (WebCore::PlatformSpeechSynthesizer::setVoiceList):
1414         (WebCore):
1415         * platform/PlatformSpeechSynthesizer.h:
1416         (WebKit):
1417         (PlatformSpeechSynthesizerClient):
1418         (PlatformSpeechSynthesizer):
1419         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
1420         (WebCore):
1421         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
1422         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
1423         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1424         (WebCore::PlatformSpeechSynthesizer::speak):
1425         (WebCore::PlatformSpeechSynthesizer::pause):
1426         (WebCore::PlatformSpeechSynthesizer::resume):
1427         (WebCore::PlatformSpeechSynthesizer::cancel):
1428         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
1429         (WebKit):
1430         (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
1431         (WebKit::WebSpeechSynthesisUtterance::operator=):
1432         (WebKit::WebSpeechSynthesisUtterance::assign):
1433         (WebKit::WebSpeechSynthesisUtterance::reset):
1434         (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
1435         (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
1436         (WebKit::WebSpeechSynthesisUtterance::text):
1437         (WebKit::WebSpeechSynthesisUtterance::lang):
1438         (WebKit::WebSpeechSynthesisUtterance::voice):
1439         (WebKit::WebSpeechSynthesisUtterance::volume):
1440         (WebKit::WebSpeechSynthesisUtterance::rate):
1441         (WebKit::WebSpeechSynthesisUtterance::pitch):
1442         (WebKit::WebSpeechSynthesisUtterance::startTime):
1443         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
1444         (WebKit):
1445         (WebKit::WebSpeechSynthesisVoice::assign):
1446         (WebKit::WebSpeechSynthesisVoice::reset):
1447         (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
1448         (WebKit::WebSpeechSynthesisVoice::setName):
1449         (WebKit::WebSpeechSynthesisVoice::setLanguage):
1450         (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
1451         (WebKit::WebSpeechSynthesisVoice::setIsDefault):
1452         (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
1453         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
1454         (WebCore):
1455         (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
1456         (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
1457         (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
1458         (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
1459         (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
1460         (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
1461         (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
1462         (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
1463         (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
1464         (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
1465         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
1466         (WebCore):
1467         (WebSpeechSynthesizerClientImpl):
1468         * platform/mac/PlatformSpeechSynthesizerMac.mm:
1469         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
1470         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
1471         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
1472         (WebCore):
1473         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
1474         (WebCore::PlatformSpeechSynthesizer::speak):
1475         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
1476         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
1477         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
1478         (WebCore::PlatformSpeechSynthesizerMock::speak):
1479         * platform/mock/PlatformSpeechSynthesizerMock.h:
1480         (PlatformSpeechSynthesizerMock):
1481
1482 2013-03-19  Ryosuke Niwa  <rniwa@webkit.org>
1483
1484         Another build fix after r146220.
1485
1486         * English.lproj/localizedStrings.js:
1487
1488 2013-03-19  Julien Chaffraix  <jchaffraix@webkit.org>
1489
1490         [CSS Grid Layout] Add parsing for grid-auto-{row|column}
1491         https://bugs.webkit.org/show_bug.cgi?id=112724
1492
1493         Reviewed by Tony Chang.
1494
1495         This change is a first step towards handling grid-auto-{row|column}.
1496         For now, only the parsing, storing and getComputedStyle bits are implemented.
1497         In order to do so without duplicating code, the functions handling <track-size>
1498         (named <track-minmax> in the code based on a previous version of the grammar)
1499         have been tweaked to be called in a standalone fashion. The code was also
1500         updated to match the grammar more closely:
1501         - <track-minmax> is now <track-size>.
1502         - <track-group> was renmoved, folded into <track-list>.
1503
1504         Test: fast/css-grid-layout/grid-auto-columns-rows-get-set.html
1505
1506         * css/CSSComputedStyleDeclaration.cpp:
1507         (WebCore::valueForGridTrackSize):
1508         Renamed from valueForGridTrackMinMax.
1509
1510         (WebCore::valueForGridTrackList):
1511         Folded valueForGridTrackGroup here.
1512
1513         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1514         * css/CSSParser.cpp:
1515         (WebCore::CSSParser::parseValue):
1516         Added the parsing for grid-auto-{rows|columns}.
1517
1518         (WebCore::CSSParser::parseGridTrackSize):
1519         Renamed from parseGridTrackMinMax. Changed to return the parsed value (or 0 in case of
1520         error). This enables us to reuse it in parseValue. Note that this function now moves
1521         the parser value list instead of the caller.
1522
1523         (WebCore::CSSParser::parseGridTrackList):
1524         Updated after parseGridTrackSize changes and parseGridTrackGroup removal.
1525
1526         * css/CSSParser.h: Updated the names.
1527         * css/CSSProperty.cpp:
1528         (WebCore::CSSProperty::isInheritedProperty):
1529         * css/CSSPropertyNames.in:
1530         Added the 2 new non-inherited properties.
1531
1532         * css/StyleResolver.cpp:
1533         (WebCore::createGridTrackSize):
1534         Renamed from createGridTrackMinMax. Also simplified to ensure code reuse (applyProperty hands
1535         down a CSSValue) and consistency (the state wasn't consistently the last argument).
1536
1537         (WebCore::createGridTrackList):
1538         Folded createGridTrackGroup into this function.
1539
1540         (WebCore::StyleResolver::applyProperty):
1541         Added the code for the new properties.
1542
1543         * rendering/style/RenderStyle.h:
1544         * rendering/style/StyleGridData.cpp:
1545         (WebCore::StyleGridData::StyleGridData):
1546         * rendering/style/StyleGridData.h:
1547         (WebCore::StyleGridData::operator==):
1548         Added the storage and boiler-plate code for the new properties.
1549
1550 2013-03-19  Geoffrey Garen  <ggaren@apple.com>
1551
1552         Removed a using declaration to avoid name conflicts
1553         https://bugs.webkit.org/show_bug.cgi?id=112752
1554
1555         Reviewed by Ryosuke Niwa.
1556
1557         * html/ClassList.cpp: Put the using declaration here instead.
1558
1559         * html/ClassList.h: Don't put a using declaration in this header because
1560         it can cause name conflicts with SVGNames.
1561
1562 2013-03-18  Ojan Vafai  <ojan@chromium.org>
1563
1564         Make intrinsic size keywords on flexboxes work
1565         https://bugs.webkit.org/show_bug.cgi?id=112652
1566
1567         Reviewed by Tony Chang.
1568
1569         Tests: fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items.html
1570                fast/css-intrinsic-dimensions/intrinsic-sized-flex-items.html
1571
1572         * platform/Length.h:
1573         (WebCore::Length::isSpecifiedOrIntrinsic):
1574         * rendering/RenderBox.cpp:
1575         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
1576         (WebCore::RenderBox::computeLogicalWidthInRegion):
1577         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1578         Pass in the Length so that RenderFlexibleBox can call this method and avoid
1579         doing a bunch of code duplication.
1580
1581         * rendering/RenderBox.h:
1582         * rendering/RenderFlexibleBox.cpp:
1583         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1584         Instead of just calling valueForLength, call computeLogicalWidthInRegionUsing so that
1585         we properly resolve intrinsic Length types. Incidentally, this should also make viewport
1586         percentage units work.
1587
1588         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1589         Resolve intrinsic min/max Lengths. Also, instead of calling minPreferredLogicalWidth for the
1590         min-width: auto case, call computeMainAxisExtentForChild to correctly compute the min intrinsic size.
1591
1592 2013-03-19  Geoffrey Garen  <ggaren@apple.com>
1593
1594         Try to fix the Windows build.
1595
1596         * svg/SVGAnimateMotionElement.cpp:
1597         (WebCore::SVGAnimateMotionElement::hasValidAttributeType): Qualify the
1598         namespace to avoid conflicts.
1599
1600 2013-03-19  Ryosuke Niwa  <rniwa@webkit.org>
1601
1602         Windows build fix after r146264.
1603
1604         * svg/SVGAnimateMotionElement.cpp:
1605         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
1606
1607 2013-03-19  Nate Chapin  <japhet@chromium.org>
1608
1609         REGRESSION(r146223): chromium asserts/crashes in DocumentLoader
1610         https://bugs.webkit.org/show_bug.cgi?id=112745
1611
1612         Reviewed by Kenneth Russell.
1613
1614         Fixes layout tests on chromium debug
1615
1616         * loader/DocumentLoader.cpp:
1617         (WebCore::DocumentLoader::mainReceivedError): Frame might be detached, get
1618             defersLoading() from mainResourceLoader().
1619         (WebCore::DocumentLoader::responseReceived): RefPtr got dropped, it's really needed.
1620         (WebCore::DocumentLoader::receivedData): Frame might be detached, get
1621             defersLoading() from mainResourceLoader().
1622         (WebCore::DocumentLoader::cancelMainResourceLoad): The ResourceError parameter
1623             can be null if coming from the WebKit layer, we should have a default just in case.
1624
1625 2013-03-19  Geoffrey Garen  <ggaren@apple.com>
1626
1627         Refactored script content removal in the fragment parser for clarity and speed
1628         https://bugs.webkit.org/show_bug.cgi?id=112734
1629
1630         Reviewed by Enrica Casucci.
1631
1632         * WebCore.exp.in: Export!
1633
1634         * dom/DocumentFragment.cpp:
1635         (WebCore::DocumentFragment::parseHTML):
1636         (WebCore::DocumentFragment::parseXML):
1637         * dom/DocumentFragment.h:
1638         (DocumentFragment): Updated for rename of FragmentScriptingPermission to
1639         ParserContentPolicy.
1640
1641         * dom/Element.cpp:
1642         (WebCore::isEventHandlerAttribute):
1643         (WebCore::Element::isJavaScriptURLAttribute):
1644         (WebCore::Element::isJavaScriptAttribute): Fixed a FIXME by factoring
1645         out some helper functions that reuse isURLAttribute(). This makes our
1646         attribute removal slightly more precise, as reflected in test changes.
1647
1648         (WebCore::Element::stripJavaScriptAttributes): Factored this function out
1649         of parserSetAttributes to clarify that the parser is responsible for
1650         fully removing scripts before inserting anything into the DOM.
1651
1652         Now that this is a helper function, we can avoid doing any work in the
1653         common case, where script content is allowed. Also, when we do have to
1654         strip attributes, we use "two finger compaction" to avoid copying the
1655         vector, and to avoid O(N) vector removal operations when there is
1656         something to remove.
1657
1658         (WebCore::Element::parserSetAttributes):
1659         * dom/Element.h:
1660
1661         * dom/FragmentScriptingPermission.h:
1662         (WebCore::scriptingContentIsAllowed):
1663         (WebCore::disallowScriptingContent):
1664         (WebCore::pluginContentIsAllowed):
1665         (WebCore::allowPluginContent): Renamed for clarity, and added some helper
1666         functions for reading values out of this enum.
1667
1668         * dom/ScriptableDocumentParser.cpp:
1669         (WebCore::ScriptableDocumentParser::ScriptableDocumentParser): Moved
1670         a settings check into the parser constructor so we're sure that all
1671         clients get the right behavior.
1672
1673         * dom/ScriptableDocumentParser.h:
1674         (WebCore::ScriptableDocumentParser::parserContentPolicy):
1675         (ScriptableDocumentParser):
1676         * editing/markup.cpp:
1677         (WebCore::createFragmentFromMarkup):
1678         (WebCore::createFragmentFromMarkupWithContext):
1679         (WebCore::createFragmentForInnerOuterHTML):
1680         (WebCore::createContextualFragment):
1681         * editing/markup.h: Updated for renames.
1682
1683         * html/HTMLAnchorElement.cpp:
1684         (WebCore::HTMLAnchorElement::isURLAttribute): Fixed a bug where
1685         isURLAttribute would ignore href attributes in other namespaces, like
1686         xlink:href.
1687
1688         * html/HTMLBaseElement.cpp:
1689         (WebCore::HTMLBaseElement::isURLAttribute): Same bug.
1690
1691         * html/HTMLElement.cpp:
1692         (WebCore::HTMLElement::isURLAttribute): Fixed a logic error where HTMLElement
1693         wouldn't call through to its base class.
1694
1695         * html/HTMLLinkElement.cpp:
1696         (WebCore::HTMLLinkElement::isURLAttribute): Same isURLAttribute namespace
1697         bug as above.
1698
1699         * html/parser/HTMLConstructionSite.cpp:
1700         (WebCore::setAttributes): Helper function for optionally stripping
1701         disallowed attributes before setting them on an element. This helps all
1702         clients get the right behavior without sprinkling checks everywhere.
1703
1704         (WebCore::HTMLConstructionSite::HTMLConstructionSite):
1705         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
1706
1707         (WebCore::HTMLConstructionSite::insertScriptElement): Don't schedule the
1708         element for insertion into the document if the element is forbidden. This
1709         is slightly clearer than leaving an empty forbidden element in the document.
1710
1711         (WebCore::HTMLConstructionSite::createElement):
1712         (WebCore::HTMLConstructionSite::createHTMLElement):
1713         * html/parser/HTMLConstructionSite.h:
1714         (HTMLConstructionSite):
1715         (WebCore::HTMLConstructionSite::parserContentPolicy):
1716         * html/parser/HTMLDocumentParser.cpp:
1717         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
1718         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
1719         (WebCore::HTMLDocumentParser::parseDocumentFragment):
1720         * html/parser/HTMLDocumentParser.h:
1721         (HTMLDocumentParser):
1722         (WebCore::HTMLDocumentParser::create):
1723         * html/parser/HTMLTreeBuilder.cpp:
1724         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1725         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
1726         Updated for renames and interface changes above.
1727
1728         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1729         (WebCore::HTMLTreeBuilder::processEndTag): Removed isParsingFragment()
1730         checks to make it possible to use ParserContentPolicy in more places.
1731
1732         Removed call to removeChildren() because, if an element is forbidden,
1733         we fully remove the element now. This brings behavior for <script>
1734         elements in line with behavior for plug-in elements. It also brings
1735         behavior of the HTML parser in line with behavior of the XML parser.
1736
1737         * html/parser/HTMLTreeBuilder.h:
1738         (WebCore::HTMLTreeBuilder::create):
1739         (FragmentParsingContext):
1740         (WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElement):
1741         * platform/blackberry/PasteboardBlackBerry.cpp:
1742         (WebCore::Pasteboard::documentFragment):
1743         * platform/chromium/DragDataChromium.cpp:
1744         (WebCore::DragData::asFragment):
1745         * platform/chromium/PasteboardChromium.cpp:
1746         (WebCore::Pasteboard::documentFragment):
1747         * platform/gtk/PasteboardGtk.cpp:
1748         (WebCore::Pasteboard::documentFragment):
1749         * platform/mac/PasteboardMac.mm:
1750         (WebCore::Pasteboard::documentFragment):
1751         * platform/qt/DragDataQt.cpp:
1752         (WebCore::DragData::asFragment):
1753         * platform/qt/PasteboardQt.cpp:
1754         (WebCore::Pasteboard::documentFragment):
1755         * platform/win/ClipboardUtilitiesWin.cpp:
1756         (WebCore::fragmentFromCFHTML):
1757         (WebCore::fragmentFromHTML):
1758         * platform/wx/PasteboardWx.cpp:
1759         (WebCore::Pasteboard::documentFragment): Updated for renames and interface
1760         changes.
1761
1762         * svg/SVGAElement.cpp:
1763         (WebCore::SVGAElement::isURLAttribute): Fixed a bug where SVG anchor
1764         elements didn't identify their URL attributes.
1765
1766         * svg/SVGAElement.h:
1767         (SVGAElement):
1768
1769         * xml/XMLErrors.cpp:
1770         (WebCore::createXHTMLParserErrorHeader):
1771         (WebCore::XMLErrors::insertErrorMessageBlock): No need to disallow
1772         scripting attributes here because we're creating the attributes 
1773         ourselves and we know they're not scripting attributes.
1774
1775         * xml/parser/XMLDocumentParser.cpp:
1776         (WebCore::XMLDocumentParser::parseDocumentFragment):
1777         * xml/parser/XMLDocumentParser.h:
1778         (WebCore::XMLDocumentParser::create):
1779         (XMLDocumentParser): Updated for renames and interface changes above.
1780
1781         Removed the 8 inline capacity in the attribute vector so we could share
1782         helper functions with the HTML parser, which didn't have it.
1783
1784         * xml/parser/XMLDocumentParserLibxml2.cpp:
1785         (WebCore::setAttributes):
1786         (WebCore):
1787         (WebCore::XMLDocumentParser::XMLDocumentParser):
1788         (WebCore::handleNamespaceAttributes):
1789         (WebCore::handleElementAttributes):
1790         (WebCore::XMLDocumentParser::startElementNs):
1791         (WebCore::XMLDocumentParser::endElementNs):
1792         * xml/parser/XMLDocumentParserQt.cpp:
1793         (WebCore::setAttributes):
1794         (WebCore):
1795         (WebCore::XMLDocumentParser::XMLDocumentParser):
1796         (WebCore::handleNamespaceAttributes):
1797         (WebCore::handleElementAttributes):
1798         (WebCore::XMLDocumentParser::parseStartElement):
1799         (WebCore::XMLDocumentParser::parseEndElement): Same changes as for the
1800         HTML parser.
1801
1802 2013-03-19  Philip Rogers  <pdr@google.com>
1803
1804         Clean up static_casts for SVG renderers
1805         https://bugs.webkit.org/show_bug.cgi?id=111651
1806
1807         Reviewed by Abhishek Arya.
1808
1809         toRenderSVGPath and toRenderSVGFilter are preferred over static_casts because bad casts can
1810         be caught on our testing infrastructure. This patch replaces all static_casts for
1811         RenderSVGPath and RenderSVGFilter with toRenderSVGPath and toRenderSVGFilter, respectively.
1812
1813         This patch also adds FIXME to the remaining toRenderSVG* instances that are missing.
1814
1815         No new tests as this is covered with existing tests.
1816
1817         * rendering/RenderLayer.cpp:
1818         (WebCore::RenderLayer::paintLayerContents):
1819
1820             This call is currently safe due to the element->hasTagName(SVGNames::clipPathTag) check.
1821
1822         * rendering/svg/RenderSVGPath.h:
1823         (WebCore):
1824         (WebCore::toRenderSVGPath):
1825         * rendering/svg/RenderSVGResourceFilter.h:
1826         (WebCore):
1827         (WebCore::toRenderSVGFilter):
1828         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
1829         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
1830         * rendering/svg/RenderSVGRoot.cpp:
1831         (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
1832         * rendering/svg/SVGRenderSupport.cpp:
1833         (WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow):
1834         (WebCore::SVGRenderSupport::rendererHasSVGShadow):
1835         (WebCore::SVGRenderSupport::setRendererHasSVGShadow):
1836         * rendering/svg/SVGRenderingContext.cpp:
1837         (WebCore::SVGRenderingContext::~SVGRenderingContext):
1838
1839             This cast was not correct! Thankfully it was not required anyway.
1840
1841         * svg/SVGCircleElement.cpp:
1842         (WebCore::SVGCircleElement::svgAttributeChanged):
1843
1844             This cast was not correct!
1845
1846         * svg/SVGEllipseElement.cpp:
1847         (WebCore::SVGEllipseElement::svgAttributeChanged):
1848
1849             This cast was not correct!
1850
1851         * svg/SVGLineElement.cpp:
1852         (WebCore::SVGLineElement::svgAttributeChanged):
1853         * svg/SVGPathElement.cpp:
1854         (WebCore::SVGPathElement::svgAttributeChanged):
1855         (WebCore::SVGPathElement::pathSegListChanged):
1856         (WebCore::SVGPathElement::getBBox):
1857         * svg/SVGPolyElement.cpp:
1858         (WebCore::SVGPolyElement::svgAttributeChanged):
1859         * svg/SVGRectElement.cpp:
1860         (WebCore::SVGRectElement::svgAttributeChanged):
1861
1862 2013-03-19  Beth Dakin  <bdakin@apple.com>
1863
1864         RenderLayer::scrollTo() should call FrameLoaderClient::didChangeScrollOffset()
1865         https://bugs.webkit.org/show_bug.cgi?id=110673
1866
1867         Reviewed by Simon Fraser.
1868
1869         FrameLoaderClient::didChangeScrollOffset() should be called whenever something is 
1870         actually being scrolled. 
1871
1872         * rendering/RenderLayer.cpp:
1873         (WebCore::RenderLayer::scrollTo):
1874
1875 2013-03-19  Marja Hölttä  <marja@chromium.org>
1876
1877         [V8] Add machinery for generating specialized bindings for the main world
1878         https://bugs.webkit.org/show_bug.cgi?id=111417
1879
1880         Reviewed by Jochen Eisinger.
1881
1882         The new specialized bindings will be faster, because they don't need to
1883         do the "main world, isolated world or a worker" check, but can right
1884         away assume that we're in the main world.
1885
1886         Added an IDL attribute (V8PerWorldBindings) to define which
1887         attribute getters / setters to specialize.
1888
1889         This patch generates main world bindings for getters and setters of Node
1890         and Element. (The possibility to generate bindings for callbacks will be
1891         added later.)
1892
1893         No new tests (updated existing bindings tests).
1894
1895         * bindings/scripts/CodeGeneratorV8.pm:
1896         (GenerateHeader):
1897         (GenerateNormalAttrGetterCallback):
1898         (GenerateNormalAttrGetter):
1899         (GenerateNormalAttrSetterCallback):
1900         (GenerateNormalAttrSetter):
1901         (GenerateNamedConstructor):
1902         (GenerateSingleBatchedAttribute):
1903         (GenerateImplementation):
1904         (GenerateCallbackImplementation):
1905         (GenerateFunctionCallString):
1906         (CreateCustomSignature):
1907         (NativeToJSValue):
1908         * bindings/scripts/IDLAttributes.txt:
1909         * bindings/scripts/test/V8/V8Float64Array.cpp:
1910         (WebCore::ConfigureV8Float64ArrayTemplate):
1911         (WebCore::V8Float64Array::GetTemplate):
1912         (WebCore::V8Float64Array::HasInstance):
1913         * bindings/scripts/test/V8/V8Float64Array.h:
1914         (WebCore::toV8ForMainWorld):
1915         (WebCore):
1916         (WebCore::toV8FastForMainWorld):
1917         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1918         (WebCore):
1919         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
1920         (WebCore::V8TestActiveDOMObject::GetTemplate):
1921         (WebCore::V8TestActiveDOMObject::HasInstance):
1922         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1923         (WebCore::toV8ForMainWorld):
1924         (WebCore):
1925         (WebCore::toV8FastForMainWorld):
1926         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1927         (WebCore::ConfigureV8TestCustomNamedGetterTemplate):
1928         (WebCore::V8TestCustomNamedGetter::GetTemplate):
1929         (WebCore::V8TestCustomNamedGetter::HasInstance):
1930         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1931         (WebCore::toV8ForMainWorld):
1932         (WebCore):
1933         (WebCore::toV8FastForMainWorld):
1934         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1935         (WebCore):
1936         (WebCore::ConfigureV8TestEventConstructorTemplate):
1937         (WebCore::V8TestEventConstructor::GetTemplate):
1938         (WebCore::V8TestEventConstructor::HasInstance):
1939         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1940         (WebCore::toV8ForMainWorld):
1941         (WebCore):
1942         (WebCore::toV8FastForMainWorld):
1943         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1944         (WebCore::ConfigureV8TestEventTargetTemplate):
1945         (WebCore::V8TestEventTarget::GetTemplate):
1946         (WebCore::V8TestEventTarget::HasInstance):
1947         * bindings/scripts/test/V8/V8TestEventTarget.h:
1948         (WebCore::toV8ForMainWorld):
1949         (WebCore):
1950         (WebCore::toV8FastForMainWorld):
1951         * bindings/scripts/test/V8/V8TestException.cpp:
1952         (WebCore):
1953         (WebCore::ConfigureV8TestExceptionTemplate):
1954         (WebCore::V8TestException::GetTemplate):
1955         (WebCore::V8TestException::HasInstance):
1956         * bindings/scripts/test/V8/V8TestException.h:
1957         (WebCore::toV8ForMainWorld):
1958         (WebCore):
1959         (WebCore::toV8FastForMainWorld):
1960         * bindings/scripts/test/V8/V8TestInterface.cpp:
1961         (WebCore):
1962         (WebCore::ConfigureV8TestInterfaceTemplate):
1963         (WebCore::V8TestInterface::GetTemplate):
1964         (WebCore::V8TestInterface::HasInstance):
1965         * bindings/scripts/test/V8/V8TestInterface.h:
1966         (WebCore::toV8ForMainWorld):
1967         (WebCore):
1968         (WebCore::toV8FastForMainWorld):
1969         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1970         (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
1971         (WebCore::V8TestMediaQueryListListener::GetTemplate):
1972         (WebCore::V8TestMediaQueryListListener::HasInstance):
1973         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1974         (WebCore::toV8ForMainWorld):
1975         (WebCore):
1976         (WebCore::toV8FastForMainWorld):
1977         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1978         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
1979         (WebCore::ConfigureV8TestNamedConstructorTemplate):
1980         (WebCore::V8TestNamedConstructor::GetTemplate):
1981         (WebCore::V8TestNamedConstructor::HasInstance):
1982         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1983         (WebCore::toV8ForMainWorld):
1984         (WebCore):
1985         (WebCore::toV8FastForMainWorld):
1986         * bindings/scripts/test/V8/V8TestNode.cpp:
1987         (WebCore::ConfigureV8TestNodeTemplate):
1988         (WebCore::V8TestNode::GetTemplate):
1989         (WebCore::V8TestNode::HasInstance):
1990         * bindings/scripts/test/V8/V8TestNode.h:
1991         (WebCore::toV8ForMainWorld):
1992         (WebCore):
1993         (WebCore::toV8FastForMainWorld):
1994         * bindings/scripts/test/V8/V8TestObj.cpp:
1995         (WebCore):
1996         (WebCore::ConfigureV8TestObjTemplate):
1997         (WebCore::V8TestObj::GetTemplate):
1998         (WebCore::V8TestObj::HasInstance):
1999         (WebCore::V8TestObj::installPerContextProperties):
2000         * bindings/scripts/test/V8/V8TestObj.h:
2001         (WebCore::toV8ForMainWorld):
2002         (WebCore):
2003         (WebCore::toV8FastForMainWorld):
2004         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2005         (WebCore::ConfigureV8TestOverloadedConstructorsTemplate):
2006         (WebCore::V8TestOverloadedConstructors::GetTemplate):
2007         (WebCore::V8TestOverloadedConstructors::HasInstance):
2008         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
2009         (WebCore::toV8ForMainWorld):
2010         (WebCore):
2011         (WebCore::toV8FastForMainWorld):
2012         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2013         (WebCore):
2014         (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
2015         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
2016         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
2017         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2018         (WebCore::toV8ForMainWorld):
2019         (WebCore):
2020         (WebCore::toV8FastForMainWorld):
2021         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
2022         (WebCore):
2023         (WebCore::ConfigureV8TestTypedefsTemplate):
2024         (WebCore::V8TestTypedefs::GetTemplate):
2025         (WebCore::V8TestTypedefs::HasInstance):
2026         * bindings/scripts/test/V8/V8TestTypedefs.h:
2027         (WebCore::toV8ForMainWorld):
2028         (WebCore):
2029         (WebCore::toV8FastForMainWorld):
2030         * bindings/v8/DOMDataStore.h:
2031         (WebCore::DOMDataStore::getWrapperForMainWorld):
2032         (DOMDataStore):
2033         * bindings/v8/V8DOMConfiguration.cpp:
2034         (WebCore::V8DOMConfiguration::batchConfigureAttributes):
2035         (WebCore::V8DOMConfiguration::configureTemplate):
2036         * bindings/v8/V8DOMConfiguration.h:
2037         (BatchedAttribute):
2038         (V8DOMConfiguration):
2039         (WebCore::V8DOMConfiguration::configureAttribute):
2040         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2041         (WebCore::toV8ForMainWorld):
2042         (WebCore):
2043         * bindings/v8/custom/V8EventTargetCustom.cpp:
2044         (WebCore::toV8ForMainWorld):
2045         (WebCore):
2046         * bindings/v8/custom/V8IDBAnyCustom.cpp:
2047         (WebCore::toV8ForMainWorld):
2048         (WebCore):
2049         * bindings/v8/custom/V8MicroDataItemValueCustom.cpp:
2050         (WebCore::toV8ForMainWorld):
2051         (WebCore):
2052         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2053         (WebCore::toV8ForMainWorld):
2054         (WebCore):
2055         * dom/Element.idl:
2056         * dom/Node.idl:
2057
2058 2013-03-19  Mike West  <mkwst@chromium.org>
2059
2060         FeatureObserver: Measure X-Frame-Options usage.
2061         https://bugs.webkit.org/show_bug.cgi?id=112670
2062
2063         Reviewed by Adam Barth.
2064
2065         This patch adds three FeatureObserver entries to gather information
2066         about 'X-Frame-Options' usage in general, and in particular usage
2067         and potential misunderstanding of the 'SAMEORIGIN' value.
2068
2069         Three entries are added:
2070
2071         - XFrameOptions measures the raw number of 'X-Frame-Options' headers.
2072
2073         - XFrameOptionsSameOrigin measures the number of those headers that
2074           set the value to 'SAMEORIGIN'.
2075
2076         - XFrameOptionsSameOriginWithBadAncestorChain measures the number of
2077           occasions in which the frame passed the "top-only" origin check we're
2078           currently performing, but would have failed a more strict check
2079           against poisoned ancestor chains (that is, an ancestor chain that
2080           looks like 'example.com' -> 'evil.com' -> 'example.com').
2081
2082         Mozilla is considering changing 'SAMEORIGIN's behavior to block the
2083         latter loophole[1], and the UI Safety spec is considering dropping
2084         'top-only' entirely[2]. This data will inform those decisions.
2085
2086         [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=725490
2087         [2]: http://lists.w3.org/Archives/Public/public-webappsec/2013Mar/0007.html
2088
2089         This doesn't change web-visible behavior; it only adds histograms
2090
2091         * loader/FrameLoader.cpp:
2092         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
2093             When processing an 'X-Frame-Options' header's value, call out to
2094             FeatureObserver when relevant to increment the correct histogram
2095             entries.
2096         * page/FeatureObserver.h:
2097             Added three entries to the FeatureObserver enum: XFrameOptions,
2098             XFrameOptionsSameOrigin, and XFrameOptionsSameOriginWithBadAncestorChain.
2099             Each is explained above.
2100
2101 2013-03-19  Adam Barth  <abarth@webkit.org>
2102
2103         GenerateHashValue should be usable outside CodeGeneratorJS.pm
2104         https://bugs.webkit.org/show_bug.cgi?id=112736
2105
2106         Reviewed by Benjamin Poulain.
2107
2108         GenerateHashValue is not specific to CodeGeneratorJS.pm. Instead, the
2109         function matches the StringHash used in WTF. This patch moves the
2110         function into a separate Perl module so that it can be used by other
2111         Perl scripts. For example, I plan to use this function to compute the
2112         hash value for HTMLNames at compile time rather than at startup.
2113
2114         * bindings/scripts/CodeGeneratorJS.pm:
2115         (GenerateHashTable):
2116         * bindings/scripts/Hash.pm: Added.
2117         (leftShift):
2118         (GenerateHashValue):
2119
2120 2013-03-19  Dean Jackson  <dino@apple.com>
2121
2122         Allow PlugIn Snapshotting to be tested
2123         https://bugs.webkit.org/show_bug.cgi?id=98696
2124
2125         Reviewed by Tim Horton.
2126
2127         Expose a new setting maximumPlugInSnapshotAttempts that can
2128         be set by testing scripts.
2129
2130         Tests: plugins/snapshotting/restart.html
2131                plugins/snapshotting/simple.html
2132
2133         * page/Settings.in:
2134
2135 2013-03-19  Dean Jackson  <dino@apple.com>
2136
2137         Restarting a snapshotted plugin should restart all plugins from the same domain on the page
2138         https://bugs.webkit.org/show_bug.cgi?id=112725
2139
2140         Reviewed by Tim Horton.
2141
2142         If the user restarts a snapshotted plugin, then typically they will
2143         want to restart all similar plugins on the page, where similarity
2144         is defined by the domain of the content. Or in other words, since clients
2145         will typically add a restarted plugin to the list of autostarting
2146         domain hashes, we should start the other plugins that would autostart
2147         on reload.
2148
2149         When a snapshotted plugin gets the user click telling it to restart, it iterates
2150         over every frame in the document looking for domain hashes similar to its own.
2151         It then manually restarts each of the paused plugins.
2152
2153         * html/HTMLPlugInImageElement.cpp:
2154         (WebCore::addPlugInsFromNodeListMatchingOriginHash): Static helper function
2155             that builds a list of plugins to restart.
2156         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): After restarting itself,
2157             the plugin looks for all other similar snapshotted plugins in the page.
2158         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn): Splits out the actual
2159             restart functionality, to make it separate from plugins that were manually
2160             restarted and thus probably want to forward a delayed click event.
2161         * html/HTMLPlugInImageElement.h:
2162         (HTMLPlugInImageElement): New method restartSnapshottedPlugIn.
2163
2164 2013-03-19  Nate Chapin  <japhet@chromium.org>
2165
2166         Merge MainResourceLoader's SubstituteData loading + others into DocumentLoader
2167         https://bugs.webkit.org/show_bug.cgi?id=112722
2168
2169         Part of the ongoing effort to merge MainResourceLoader entirely
2170         into DocumentLoader.
2171
2172         Reviewed by Antti Koivisto.
2173
2174         No new tests, refactor only.
2175
2176         * loader/DocumentLoader.cpp:
2177         (WebCore::DocumentLoader::mainReceivedError): Moved from MainResourceLoader::receivedError
2178             and the failure case in MainResourceLoader::notifyFinished.
2179         (WebCore::DocumentLoader::stopLoading):
2180         (WebCore::DocumentLoader::finishedLoading):
2181         (WebCore::DocumentLoader::handleSubstituteDataLoadNow): Moved from MainResourceLoader.
2182         (WebCore::DocumentLoader::startDataLoadTimer): Moved from MainResourceLoader.
2183         (WebCore::DocumentLoader::handleSubstituteDataLoadSoon): Moved from MainResourceLoader.
2184         (WebCore::DocumentLoader::willSendRequest):
2185         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
2186         (WebCore::DocumentLoader::responseReceived):
2187         (WebCore::DocumentLoader::receivedData):
2188         (WebCore::DocumentLoader::startLoadingMainResource): Most of MainResourceLoader::load
2189             moved here.
2190         (WebCore::DocumentLoader::cancelMainResourceLoad): MainResourceLoader::cancel
2191             moved here.
2192         * loader/DocumentLoader.h:
2193         * loader/MainResourceLoader.cpp:
2194         (WebCore::MainResourceLoader::notifyFinished):
2195         (WebCore::MainResourceLoader::reportMemoryUsage):
2196         (WebCore::MainResourceLoader::load):
2197         (WebCore::MainResourceLoader::identifier):
2198         * loader/MainResourceLoader.h:
2199
2200 2013-03-19  Ryosuke Niwa  <rniwa@webkit.org>
2201
2202         Unreviewed build fix after r146220. Add the missing ]'s.
2203
2204         * English.lproj/localizedStrings.js:
2205
2206 2013-03-19  Alpha Lam  <hclam@chromium.org>
2207
2208         GIFImageReader to count frames and decode in one pass
2209         https://bugs.webkit.org/show_bug.cgi?id=111144
2210
2211         Reviewed by Stephen White.
2212
2213         OBJECTIVE
2214
2215         This change has the objective of improving performance reading GIF
2216         files. This implementation can parse the entire GIF file in one pass
2217         and saves information about each frame, such that decoding in a later
2218         pass does not need to parse the file again.
2219
2220         This change fixes the performance problem of decoding GIF files when
2221         they are received very slowly. Existing implementation creates a new
2222         GIFImageReader for counting frames for every time it is notified that
2223         new data has been received, this has O(n^2) behavior when data is
2224         received very slowly.
2225
2226         ALGORITHM
2227
2228         This implementation divides the decoding process into two separate
2229         steps: parse and LZW decoding.
2230
2231         In the parse step, the state machine is similar to the existing
2232         implementation. However this algorithm does not perform any decoding
2233         while scanning through the file. Intead it creates a new data structure
2234         for caching all frame information and the corresponding LZW blocks.
2235
2236         If a full decode is requested then LZW decoding is performed. This
2237         implementation looks through all frame information saved and decodes
2238         each frame sequentially until the target frame is reached.
2239
2240         Because of the separation of parse and decode, each frame can be
2241         decoded separately. This paves the way to support seeking in GIF files.
2242
2243         TESTING
2244
2245         Added a new unit test to cover progressively decoding a GIF image.
2246         There are already GIF unit tests for functional testing.
2247         Exhaustive testing was done locally with a corpus of 60k images.
2248         I mixed the corpus with some generated bad data and truncated files.
2249         The results was bit-identical when compared to the previous
2250         implementation.
2251
2252         These was also no crashing when decoding the entire corpus.
2253
2254         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2255         (WebCore::GIFImageDecoder::GIFImageDecoder):
2256         (WebCore::GIFImageDecoder::setData):
2257         (WebCore::GIFImageDecoder::frameCount):
2258         (WebCore::GIFImageDecoder::repetitionCount):
2259         (WebCore::GIFImageDecoder::decode):
2260         * platform/image-decoders/gif/GIFImageDecoder.h:
2261         (GIFImageDecoder):
2262         * platform/image-decoders/gif/GIFImageReader.cpp:
2263         (GIFLZWContext::outputRow):
2264         (GIFLZWContext::doLZW):
2265         (GIFFrameContext::decode):
2266         (GIFImageReader::decode):
2267         (GIFImageReader::parse):
2268         (GIFImageReader::addFrameIfNecessary):
2269         (GIFLZWContext::prepareToDecode):
2270         * platform/image-decoders/gif/GIFImageReader.h:
2271         There is a lot of reshuffling in GIFLZWContext and GIFFrameContext.
2272         These changes has the goal of having GIFLZWContext be a pure decoding
2273         state machine. GIFFrameContext is mostly a read-only container for
2274         frame information. With all these changes we can decode each
2275         GIFFrameContext independently.
2276
2277         The ownership pattern is:
2278         GIFImageReader owns GIFFrameContext owns GIFLZWContext.
2279
2280         (GIFLZWContext::GIFLZWContext):
2281         (GIFLZWContext):
2282         (GIFLZWContext::hasRemainingRows):
2283         GIFLZWContext is moved to the top of file.
2284         (GIFLZWBlock):
2285         (GIFLZWBlock::GIFLZWBlock):
2286         New data structure to save block position and size.
2287         (GIFFrameContext):
2288         (GIFFrameContext::GIFFrameContext):
2289         (GIFFrameContext::~GIFFrameContext):
2290         (GIFFrameContext::addLzwBlock):
2291         (GIFFrameContext::isComplete):
2292         (GIFFrameContext::isHeaderDefined):
2293         (GIFFrameContext::isDataSizeDefined):
2294         (GIFFrameContext::setComplete):
2295         (GIFFrameContext::setHeaderDefined):
2296         (GIFFrameContext::setDataSize):
2297         Now owns GIFLZWContext for decoding.
2298         (GIFImageReader::GIFImageReader):
2299         (GIFImageReader::~GIFImageReader):
2300         (GIFImageReader::imagesCount):
2301         (GIFImageReader::frameContext):
2302         (GIFImageReader):
2303         (GIFImageReader::parseFailed):
2304         (GIFImageReader::isFirstFrame):
2305         Owns a list of GIFFrameContxt.
2306
2307 2013-03-19  Brent Fulgham  <bfulgham@webkit.org>
2308
2309         [WinCairo] Unreviewed build correction for WebCore library.
2310
2311         * WebCore.vcxproj/WebCore.vcxproj: Exclude CG-specific frame source
2312         from WinCairo build.
2313         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make: Pass correct
2314         parameter to build-generated-files.sh for WinCairo build.
2315
2316 2013-03-19  Leon Scroggins  <scroggo@chromium.org>
2317
2318         Implement onRefEncodedData for lazy pixel refs.
2319         This allows printToSkPicture to write the original
2320         encoded data to the stream.
2321         Add a method to ImageFrameGenerator to copy its
2322         data, which is used by onRefEncodedData.
2323         https://bugs.webkit.org/show_bug.cgi?id=110759
2324
2325         Reviewed by Stephen White.
2326
2327         No new tests. New functionality is for testing purposes
2328         (creating SKP files).
2329
2330         * platform/graphics/chromium/ImageFrameGenerator.cpp:
2331         (WebCore::ImageFrameGenerator::data):
2332         (WebCore):
2333         * platform/graphics/chromium/ImageFrameGenerator.h:
2334         (ImageFrameGenerator):
2335         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
2336         (WebCore::LazyDecodingPixelRef::isClipped):
2337         (WebCore):
2338         (WebCore::LazyDecodingPixelRef::onRefEncodedData):
2339         * platform/graphics/chromium/LazyDecodingPixelRef.h:
2340         (LazyDecodingPixelRef):
2341
2342 2013-03-19  Philip Rogers  <pdr@google.com>
2343
2344         Separate SVG image size and container size
2345         https://bugs.webkit.org/show_bug.cgi?id=112651
2346
2347         Reviewed by Stephen Chenney.
2348
2349         Previously, SVG images could retain their cached size between reloads due to a bug where an
2350         old container size would be re-used if the image's new container size was not available yet.
2351
2352         This patch changes SVGImage::size() to return the intrinsic size of the image before a
2353         container size has been set. SVGImageCache::imageSizeForRenderer will now return the
2354         image's intrinsic size instead of a cached value if the container size cannot be looked up.
2355         In javascript, querying [SVGImage].width will now return either the image's intrinsic size
2356         or the size of 'imageForContainer'.
2357
2358         Test: svg/as-image/svg-container-size-after-reload.html
2359
2360         * svg/graphics/SVGImage.cpp:
2361         (WebCore::SVGImage::setContainerSize):
2362         (WebCore::SVGImage::containerSize):
2363         (WebCore::SVGImage::draw):
2364         (WebCore::SVGImage::dataChanged):
2365         * svg/graphics/SVGImage.h:
2366
2367             The member variable 'm_intrinsicSize' has been added to track the image's intrinsic
2368             size. This term can be found in: http://www.w3.org/TR/css3-images/#default-sizing
2369
2370         * svg/graphics/SVGImageCache.cpp:
2371         (WebCore::SVGImageCache::imageSizeForRenderer):
2372         (WebCore::SVGImageCache::imageForRenderer):
2373
2374             In both of these functions, image has been renamed to imageForContainer here to clarify
2375             that the cached container size is being returned, not the image's intrinsic size.
2376
2377 2013-03-19  Joshua Bell  <jsbell@chromium.org>
2378
2379         IndexedDB: Use integer plumbing for deleteDatabase onVersionChange calls
2380         https://bugs.webkit.org/show_bug.cgi?id=112715
2381
2382         Reviewed by Tony Chang.
2383
2384         When deleteDatabase on the back-end needs to send the front-end an
2385         onVersionChange notification it does so using the string overload. That's
2386         the only remaining use of that overload and we'd like to delete it. Switch
2387         to using the integer overload, with an already defined special value.
2388         This will unblock http://wkbug.com/112712 to delete the dead code.
2389
2390         No new tests - no functional change.
2391
2392         * Modules/indexeddb/IDBDatabase.cpp:
2393         (WebCore::IDBDatabase::onVersionChange): Map NoIntVersion to null.
2394         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2395         (WebCore::IDBDatabaseBackendImpl::deleteDatabase): Call integer overload.
2396
2397 2013-03-19  Terry Anderson  <tdanderson@chromium.org>
2398
2399         Hover effects from a GestureTapDown are dismissed by a GestureTap on the hover element
2400         https://bugs.webkit.org/show_bug.cgi?id=103283
2401
2402         Reviewed by Antonio Gomes.
2403
2404         On a GestureTap event over an element that was made visible as a hover effect, the
2405         GestureTap should be applied to that element and the hover effects should not be dismissed. 
2406         A GestureTap or a mouse move to a location outside of the element should still dismiss the
2407         hover effects.
2408
2409         Tests: fast/events/touch/gesture/gesture-tap-hover-clear.html
2410                fast/events/touch/gesture/gesture-tap-on-hover-element.html
2411
2412         * page/EventHandler.cpp:
2413         (WebCore::EventHandler::handleGestureEvent):
2414
2415 2013-03-19  Alexei Filippov  <alph@chromium.org>
2416
2417         Web Inspector: Fix menu items capitalization.
2418         https://bugs.webkit.org/show_bug.cgi?id=112553
2419
2420         The context menu items should be correctly capitalized.
2421
2422         Reviewed by Pavel Feldman.
2423
2424         * English.lproj/localizedStrings.js:
2425         * inspector/front-end/BreakpointsSidebarPane.js:
2426         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._emptyElementContextMenu):
2427         (WebInspector.XHRBreakpointsSidebarPane.prototype._emptyElementContextMenu):
2428         (WebInspector.XHRBreakpointsSidebarPane.prototype._contextMenu):
2429         * inspector/front-end/CallStackSidebarPane.js:
2430         (WebInspector.CallStackSidebarPane.Placard.prototype._placardContextMenu):
2431         * inspector/front-end/ConsoleView.js:
2432         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.get var):
2433         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.set get contextMenu):
2434         * inspector/front-end/DOMBreakpointsSidebarPane.js:
2435         (WebInspector.DOMBreakpointsSidebarPane.prototype._contextMenu):
2436         * inspector/front-end/DataGrid.js:
2437         (WebInspector.DataGrid.prototype._contextMenuInDataTable):
2438         * inspector/front-end/ElementsPanel.js:
2439         (WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var):
2440         (WebInspector.ElementsPanel.prototype.appendApplicableItems):
2441         * inspector/front-end/ElementsTreeOutline.js:
2442         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
2443         (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
2444         * inspector/front-end/HeapSnapshotDataGrids.js:
2445         (WebInspector.HeapSnapshotSortableDataGrid.prototype.populateContextMenu):
2446         * inspector/front-end/NetworkPanel.js:
2447         (WebInspector.NetworkPanel.prototype.appendApplicableItems):
2448         * inspector/front-end/ProfilesPanel.js:
2449         (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
2450         (WebInspector.ProfilesPanel.prototype.appendApplicableItems):
2451         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
2452         * inspector/front-end/ResourcesPanel.js:
2453         (WebInspector.FileSystemListTreeElement.prototype._handleContextMenuEvent):
2454         * inspector/front-end/ScriptsPanel.js:
2455         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeMappingItems):
2456         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
2457         (WebInspector.ScriptsPanel.prototype._appendFunctionItems):
2458         * inspector/front-end/TabbedPane.js:
2459         (WebInspector.TabbedPaneTab.prototype._tabContextMenu):
2460         * inspector/front-end/TimelinePanel.js:
2461         (WebInspector.TimelinePanel.prototype._contextMenu):
2462         * inspector/front-end/WatchExpressionsSidebarPane.js:
2463         (WebInspector.WatchExpressionsSection.prototype._emptyElementContextMenu):
2464         (WebInspector.WatchExpressionTreeElement.prototype.populateContextMenu):
2465
2466 2013-03-19  Alec Flett  <alecflett@chromium.org>
2467
2468         Inspector: IndexedDB clear button and menu item
2469         https://bugs.webkit.org/show_bug.cgi?id=112066
2470
2471         Reviewed by Vsevolod Vlasov.
2472
2473         Adds a button that can clear the contents of an objectStore from
2474         the IDBDataView, and a context menu from the ResourcesPanel that
2475         can do the same.
2476
2477         This also disables the Refresh button from the IDBDataView, so there
2478         is at least some visual feedback that the refresh button is working.
2479
2480         Tests: http/tests/inspector/indexeddb/database-data.html
2481
2482         * inspector/Inspector.json: New API clearObjectStore.
2483         * inspector/InspectorIndexedDBAgent.cpp: Implementation of clearObjectStore
2484         (WebCore):
2485         (ClearObjectStoreListener): Calls the original closure after the objectStore is cleared.
2486         (ClearObjectStore): Initiates the clear operation after the DB opens.
2487         * inspector/front-end/IndexedDBModel.js: Exposes clearObjectStore to the Model API.
2488         (WebInspector.IDBDataView): Add clear button and enable/disable clear and refresh buttons appropriately.
2489         * inspector/front-end/ResourcesPanel.js: Add a menu item and refresh the displayed data after the clear.
2490         * inspector/front-end/inspector.css: Add a style to show the right button for clear.
2491
2492 2013-03-19  Nate Chapin  <japhet@chromium.org>
2493
2494         Merge MainResourceLoader::responseReceived into DocumentLoader
2495         https://bugs.webkit.org/show_bug.cgi?id=112593
2496
2497         Part of the ongoing effort to merge MainResourceLoader entirely
2498         into DocumentLoader.
2499
2500         Reviewed by Adam Barth.
2501
2502         No new tests, refactor only.
2503
2504         * loader/DocumentLoader.cpp:
2505         (WebCore::DocumentLoader::DocumentLoader):
2506         (WebCore::DocumentLoader::stopLoading):
2507         (WebCore::DocumentLoader::finishedLoading): The only thing left in
2508             MainResourceLoader related to this function was a RefPtr which indirectly
2509             protected DocumentLoader. Move the RefPtr here and protect DocumentLoader directly.
2510         (WebCore::DocumentLoader::responseReceived): Moved from MainResourceLoader.
2511         (WebCore::DocumentLoader::callContinueAfterContentPolicy): Moved from MainResourceLoader.
2512         (WebCore::DocumentLoader::continueAfterContentPolicy): Moved from MainResourceLoader.
2513         (WebCore::DocumentLoader::interruptedForPolicyChangeError): Moved from MainResourceLoader.
2514         (WebCore::DocumentLoader::stopLoadingForPolicyChange): Moved from MainResourceLoader.
2515         (WebCore::DocumentLoader::receivedData):
2516         (WebCore::DocumentLoader::cancelMainResourceLoad):
2517         * loader/DocumentLoader.h:
2518         (WebCore::DocumentLoader::isLoadingMultipartContent): Store multipart bit here.
2519         * loader/MainResourceLoader.cpp:
2520         (WebCore::MainResourceLoader::MainResourceLoader):
2521         (WebCore::MainResourceLoader::cancel):
2522         (WebCore::MainResourceLoader::responseReceived):
2523         (WebCore::MainResourceLoader::notifyFinished):
2524         * loader/MainResourceLoader.h:
2525
2526 2013-03-19  Tony Chang  <tony@chromium.org>
2527
2528         Cleanup defaultUnifiedTextCheckerEnabled type
2529         https://bugs.webkit.org/show_bug.cgi?id=112640
2530
2531         Reviewed by Adam Barth.
2532
2533         It's a bool setting. I accidentally declared the default value as a double
2534         in r139202.
2535
2536         No new tests, this is a refactor/code cleanup.
2537
2538         * page/Settings.cpp:
2539         (WebCore): Switch from double to a bool.
2540
2541 2013-03-19  Alexei Filippov  <alph@chromium.org>
2542
2543         Web Inspector: Increase DataGrid default font size.
2544         https://bugs.webkit.org/show_bug.cgi?id=112692
2545
2546         Reviewed by Pavel Feldman.
2547
2548         The default font of 10px is too small. Most instances of DataGrid set
2549         font to 11px.
2550
2551         * inspector/front-end/dataGrid.css:
2552         (.data-grid table):
2553
2554 2013-03-19  Max Vujovic  <mvujovic@adobe.com>
2555
2556         Refactor conditions for setCompositingLayersNeedRebuild in RenderLayer::styleChanged
2557         https://bugs.webkit.org/show_bug.cgi?id=112606
2558
2559         Reviewed by Simon Fraser.
2560
2561         To fix bug 109098 [1], we will need to add more conditions for calling
2562         RenderLayerCompositor::setCompositingLayersNeedRebuild in RenderLayer::styleChanged.
2563         Adding more non-trivial conditions will make this block of code even harder to follow.
2564         This patch refactors the current conditions into functions:
2565             needsCompositingLayersRebuiltForClip
2566             needsCompositingLayersRebuiltForOverflow
2567
2568         In bug 109098 [1], I'm planning to add:
2569             needsCompositingLayersRebuiltForFilters
2570
2571         [1]: https://bugs.webkit.org/show_bug.cgi?id=109098
2572
2573         No new tests. Just refactoring.
2574
2575         * rendering/RenderLayer.cpp:
2576         (WebCore):
2577         (WebCore::RenderLayer::needsCompositingLayersRebuiltForClip):
2578         (WebCore::RenderLayer::needsCompositingLayersRebuiltForOverflow):
2579             This is a method and not a file static function because it needs to look at the
2580             RenderLayer's stackingContainer(), which is a private method.
2581         (WebCore::RenderLayer::styleChanged):
2582         * rendering/RenderLayer.h:
2583         (RenderLayer):
2584
2585 2013-03-19  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2586
2587         [Qt] Support kerning in fast path font rendering
2588         https://bugs.webkit.org/show_bug.cgi?id=106013
2589
2590         Reviewed by Jocelyn Turcotte.
2591
2592         To support kerning in the fast font path we need to implement SimpleFontData::applyTransforms.
2593
2594         This patch changes the types used by the fast path GlyphBuffer to match those used by Qt,
2595         and implements SimpleFontData::applyTransforms using QRawFont::advancesForGlyphIndexes.
2596
2597         * platform/graphics/GlyphBuffer.h:
2598         (GlyphBufferAdvance):
2599         (WebCore::GlyphBufferAdvance::GlyphBufferAdvance):
2600         (WebCore::GlyphBufferAdvance::setWidth):
2601         (WebCore::GlyphBufferAdvance::width):
2602         (WebCore::GlyphBufferAdvance::height):
2603         (WebCore::GlyphBuffer::add):
2604         * platform/graphics/SimpleFontData.h:
2605         (WebCore::SimpleFontData::applyTransforms):
2606         * platform/graphics/WidthIterator.h:
2607         (WebCore::WidthIterator::supportsTypesettingFeatures):
2608
2609 2013-03-19  Sergey Ryazanov  <serya@chromium.org>
2610
2611         Web Inspector: split Console into two entities, a web-facing bound object and page console.
2612         https://bugs.webkit.org/show_bug.cgi?id=111578
2613
2614         Reviewed by Vsevolod Vlasov.
2615
2616         Otherwise, a lot of logging in WebCore needs to go through the DOMWindow which is unnecessary.
2617
2618         * CMakeLists.txt:
2619         * GNUmakefile.list.am:
2620         * Target.pri:
2621         * WebCore.exp.in:
2622         * WebCore.gypi:
2623         * WebCore.order:
2624         * WebCore.vcproj/WebCore.vcproj:
2625         * WebCore.vcxproj/WebCore.vcxproj:
2626         * WebCore.vcxproj/WebCore.vcxproj.filters:
2627         * WebCore.xcodeproj/project.pbxproj:
2628         * bindings/js/JSCustomXPathNSResolver.cpp:
2629         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2630         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
2631         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2632         * dom/Document.cpp:
2633         (WebCore::Document::addConsoleMessage):
2634         (WebCore::Document::addMessage):
2635         * inspector/PageDebuggerAgent.cpp:
2636         (WebCore::PageDebuggerAgent::muteConsole):
2637         (WebCore::PageDebuggerAgent::unmuteConsole):
2638         * inspector/PageRuntimeAgent.cpp:
2639         (WebCore::PageRuntimeAgent::muteConsole):
2640         (WebCore::PageRuntimeAgent::unmuteConsole):
2641         * page/Console.cpp:
2642         (WebCore::internalAddMessage):
2643         * page/Console.h:
2644         (WebCore):
2645         (Console):
2646         * page/DOMWindow.cpp:
2647         (WebCore::DOMWindow::pageConsole):
2648         (WebCore):
2649         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
2650         (WebCore::DOMWindow::printErrorMessage):
2651         * page/DOMWindow.h:
2652         (WebCore):
2653         (DOMWindow):
2654         * page/Page.cpp:
2655         (WebCore::Page::Page):
2656         * page/Page.h:
2657         (WebCore):
2658         (WebCore::Page::console):
2659         (Page):
2660         * page/PageConsole.cpp: Added.
2661         (WebCore::PageConsole::PageConsole):
2662         (WebCore):
2663         (WebCore::PageConsole::~PageConsole):
2664         (WebCore::PageConsole::printSourceURLAndLine):
2665         (WebCore::PageConsole::printMessageSourceAndLevelPrefix):
2666         (WebCore::PageConsole::addMessage):
2667         (WebCore::PageConsole::mute):
2668         (WebCore::PageConsole::unmute):
2669         (WebCore::PageConsole::shouldPrintExceptions):
2670         (WebCore::PageConsole::setShouldPrintExceptions):
2671         * page/PageConsole.h: Copied from Source/WebCore/page/Console.h.
2672         (WebCore):
2673         (PageConsole):
2674         (WebCore::PageConsole::create):
2675         (WebCore::PageConsole::page):
2676         * xml/XSLStyleSheetLibxslt.cpp:
2677         (WebCore::XSLStyleSheet::parseString):
2678         * xml/XSLTProcessorLibxslt.cpp:
2679         (WebCore::XSLTProcessor::parseErrorFunc):
2680         (WebCore::docLoaderFunc):
2681
2682 2013-03-19  Ilya Tikhonovsky  <loislo@chromium.org>
2683
2684         Web Inspector: move OverviewGrid and OverviewWindow into separate file.
2685         https://bugs.webkit.org/show_bug.cgi?id=112693
2686
2687         Reviewed by Yury Semikhatsky.
2688
2689         It is the third patch for the meta bug "Web Inspector: meta bug: extract OverviewGrid from TimelineOverviewPane"
2690         It just moves the OverviewGrid and the related classes into its own file.
2691
2692         * WebCore.gypi:
2693         * WebCore.vcproj/WebCore.vcproj:
2694         * WebCore.vcxproj/WebCore.vcxproj:
2695         * WebCore.vcxproj/WebCore.vcxproj.filters:
2696         * inspector/compile-front-end.py:
2697         * inspector/front-end/OverviewGrid.js: Added.
2698         (WebInspector.OverviewGrid):
2699         (WebInspector.OverviewGrid.prototype.itemsGraphsElement):
2700         (WebInspector.OverviewGrid.prototype.insertBeforeItemsGraphsElement):
2701         (WebInspector.OverviewGrid.prototype.clientWidth):
2702         (WebInspector.OverviewGrid.prototype.showItemsGraphsElement):
2703         (WebInspector.OverviewGrid.prototype.hideItemsGraphsElement):
2704         (WebInspector.OverviewGrid.prototype.updateDividers):
2705         (WebInspector.OverviewGrid.prototype.addEventDividers):
2706         (WebInspector.OverviewGrid.prototype.removeEventDividers):
2707         (WebInspector.OverviewGrid.prototype.setWindowPosition):
2708         (WebInspector.OverviewGrid.prototype.reset):
2709         (WebInspector.OverviewGrid.prototype.windowLeft):
2710         (WebInspector.OverviewGrid.prototype.windowRight):
2711         (WebInspector.OverviewGrid.prototype.setWindow):
2712         (WebInspector.OverviewGrid.prototype.addEventListener):
2713         (WebInspector.OverviewGrid.Window):
2714         (WebInspector.OverviewGrid.Window.prototype.reset):
2715         (WebInspector.OverviewGrid.Window.prototype._leftResizeElementDragging):
2716         (WebInspector.OverviewGrid.Window.prototype._rightResizeElementDragging):
2717         (WebInspector.OverviewGrid.Window.prototype._startWindowSelectorDragging):
2718         (WebInspector.OverviewGrid.Window.prototype._windowSelectorDragging):
2719         (WebInspector.OverviewGrid.Window.prototype._endWindowSelectorDragging):
2720         (WebInspector.OverviewGrid.Window.prototype._startWindowDragging):
2721         (WebInspector.OverviewGrid.Window.prototype._windowDragging):
2722         (WebInspector.OverviewGrid.Window.prototype._endWindowDragging):
2723         (WebInspector.OverviewGrid.Window.prototype._moveWindow):
2724         (WebInspector.OverviewGrid.Window.prototype._resizeWindowLeft):
2725         (WebInspector.OverviewGrid.Window.prototype._resizeWindowRight):
2726         (WebInspector.OverviewGrid.Window.prototype._resizeWindowMaximum):
2727         (WebInspector.OverviewGrid.Window.prototype._setWindow):
2728         (WebInspector.OverviewGrid.Window.prototype._setWindowPosition):
2729         (WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
2730         (WebInspector.OverviewGrid.Window.prototype._zoom):
2731         (WebInspector.OverviewGrid.WindowSelector):
2732         (WebInspector.OverviewGrid.WindowSelector.prototype._createSelectorElement):
2733         (WebInspector.OverviewGrid.WindowSelector.prototype._close):
2734         (WebInspector.OverviewGrid.WindowSelector.prototype._updatePosition):
2735         * inspector/front-end/TimelineOverviewPane.js:
2736         * inspector/front-end/WebKit.qrc:
2737         * inspector/front-end/inspector.html:
2738
2739 2013-03-19  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2740
2741         [Qt] Monospace font does not render in proper sizes
2742         https://bugs.webkit.org/show_bug.cgi?id=93263
2743
2744         Reviewed by Jocelyn Turcotte.
2745
2746         Do not force fonts to use integer metrics. This was necessary when the fast font path
2747         only worked in integer but is now hindering accurate metrics. This is also required to
2748         make kerning in the fast-path look acceptable
2749
2750         Only enabled for Qt 5.1+ to avoid changing all the baselines for 5.0.
2751
2752         * platform/graphics/qt/FontPlatformDataQt.cpp:
2753         (WebCore::FontPlatformData::FontPlatformData):
2754
2755 2013-03-19  John J. Barton  <johnjbarton@chromium.org>
2756
2757         Web Inspector: Add iframe option to inspectedWindow.eval() extension API
2758         https://bugs.webkit.org/show_bug.cgi?id=106811
2759
2760         Reviewed by Vsevolod Vlasov.
2761
2762         Add a new case to the options processing in inspectedWindow.eval(), look
2763         for option.frameURL <string> and/or option.scriptExecutionContext: <string>, find the
2764         matching JS context in the runtimeModel, and call evaluate() in that
2765         context; or error if the context is not found. 
2766
2767         Test: http/tests/inspector/extensions-iframe-eval.html
2768
2769         * inspector/front-end/ExtensionServer.js:
2770         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
2771         (WebInspector.ExtensionServer.prototype.):
2772         (WebInspector.ExtensionServer.prototype.evaluate):
2773         * inspector/front-end/ResourceTreeModel.js:
2774         (WebInspector.ResourceTreeModel.prototype.frames):
2775            Added read access to _frames
2776        * inspector/front-end/RuntimeModel.js:
2777         (WebInspector.RuntimeModel.prototype.contextListByFrame):
2778            Added access to a frame's contextList, removed contextByFrameAndSecurityOrigin()
2779         (WebInspector.FrameExecutionContextList.prototype.mainWorldContext):
2780            Added access to frame's mainWorldContext, rather than implicit first context.
2781            Now we can go from ResourceTreeModel -> frame -> contextList then either
2782            mainWorldContext() or contextBySecurityOrigin() to access contexts.
2783
2784         * inspector/front-end/ExtensionServer.js:
2785         (WebInspector.ExtensionServer.prototype.):
2786         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
2787         (WebInspector.ExtensionServer.prototype.evaluate):
2788         * inspector/front-end/ResourceTreeModel.js:
2789         * inspector/front-end/RuntimeModel.js:
2790         (WebInspector.RuntimeModel.prototype.contextListByFrame):
2791         (WebInspector.FrameExecutionContextList.prototype.mainWorldContext):
2792
2793         * inspector/front-end/ExtensionServer.js:
2794         (WebInspector.ExtensionServer.prototype._onReload):
2795         (WebInspector.ExtensionServer.prototype.resolveURLToFrame.hasMatchingURL):
2796         (WebInspector.ExtensionServer.prototype.):
2797         (WebInspector.ExtensionServer.prototype.evaluate):
2798         * inspector/front-end/ResourceTreeModel.js:
2799         (WebInspector.ResourceTreeModel.prototype.frames):
2800         * inspector/front-end/RuntimeModel.js:
2801         (WebInspector.RuntimeModel.prototype.contextListByFrame):
2802         (WebInspector.FrameExecutionContextList.prototype.mainWorldContext):
2803
2804         * inspector/front-end/ExtensionServer.js:
2805         (WebInspector.ExtensionServer.prototype.resolveURLToFrame.hasMatchingURL):
2806         (WebInspector.ExtensionServer.prototype.):
2807         (WebInspector.ExtensionServer.prototype.evaluate):
2808         * inspector/front-end/ResourceTreeModel.js:
2809         (WebInspector.ResourceTreeModel.prototype.frames):
2810         * inspector/front-end/RuntimeModel.js:
2811         (WebInspector.RuntimeModel.prototype.contextListByFrame):
2812         (WebInspector.FrameExecutionContextList.prototype.mainWorldContext):
2813
2814 2013-03-19  Ilya Tikhonovsky  <loislo@chromium.org>
2815
2816         Web Inspector: rename TimelineOverviewWindow to OverviewGrid.Window and fix names for constants.
2817         https://bugs.webkit.org/show_bug.cgi?id=112685
2818
2819         Reviewed by Yury Semikhatsky.
2820
2821         It is the second patch which extracts OverviewGrid from TimelineOverviewPane.
2822         It renames internal components of OverviewGrid.
2823         WebInspector.TimelineOverviewWindow -> WebInspector.OverviewGrid.Window
2824         WebInspector.TimelineOverviewWindow.WindowSelector -> WebInspector.OverviewGrid.WindowSelector
2825
2826         and moves constants from WebInspector.TimelineOverviewWindow namespace to WebInspector.OverviewGrid namespace
2827
2828         * inspector/front-end/TimelineOverviewPane.js:
2829         (WebInspector.TimelineOverviewPane):
2830         (WebInspector.OverviewGrid):
2831         (WebInspector.OverviewGrid.Window):
2832         (WebInspector.OverviewGrid.Window.prototype._startWindowSelectorDragging):
2833         (WebInspector.OverviewGrid.Window.prototype._endWindowSelectorDragging):
2834         (WebInspector.OverviewGrid.Window.prototype._startWindowDragging):
2835         (WebInspector.OverviewGrid.Window.prototype._windowDragging):
2836         (WebInspector.OverviewGrid.Window.prototype._moveWindow):
2837         (WebInspector.OverviewGrid.Window.prototype._resizeWindowRight):
2838         (WebInspector.OverviewGrid.Window.prototype._setWindowPosition):
2839         (WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
2840         (WebInspector.OverviewGrid.Window.prototype._zoom):
2841         (WebInspector.OverviewGrid.WindowSelector):
2842         (WebInspector.OverviewGrid.WindowSelector.prototype._createSelectorElement):
2843
2844 2013-03-19  Ilya Tikhonovsky  <loislo@chromium.org>
2845
2846         Web Inspector: move _timelineGrid && _timelineOverviewWindow from TimelineOverviewPane into a new class OverviewGrid.
2847         https://bugs.webkit.org/show_bug.cgi?id=112584
2848
2849         Reviewed by Pavel Feldman.
2850
2851         It is the first path in the set.
2852         The end goal is to extract OverviewGrid with window selectors
2853         into a separate class in separate file and reuse it in CPU FlameChart.
2854
2855         * inspector/front-end/TimelineOverviewPane.js:
2856         (WebInspector.TimelineOverviewPane):
2857         (WebInspector.OverviewGrid):
2858         (WebInspector.OverviewGrid.prototype.get grid):
2859         (WebInspector.OverviewGrid.prototype.get clientWidth):
2860         (WebInspector.OverviewGrid.prototype.showItemsGraphsElement):
2861         (WebInspector.OverviewGrid.prototype.hideItemsGraphsElement):
2862         (WebInspector.OverviewGrid.prototype.updateDividers):
2863         (WebInspector.OverviewGrid.prototype.addEventDividers):
2864         (WebInspector.OverviewGrid.prototype.removeEventDividers):
2865         (WebInspector.OverviewGrid.prototype.setWindowPosition):
2866         (WebInspector.OverviewGrid.prototype.reset):
2867         (WebInspector.OverviewGrid.prototype.get windowLeft):
2868         (WebInspector.OverviewGrid.prototype.get windowRight):
2869         (WebInspector.OverviewGrid.prototype.setWindow):
2870         (WebInspector.OverviewGrid.prototype.addEventListener):
2871         (WebInspector.TimelineOverviewPane.prototype.setMode):
2872         (WebInspector.TimelineOverviewPane.prototype._setFrameMode):
2873         (WebInspector.TimelineOverviewPane.prototype._update):
2874         (WebInspector.TimelineOverviewPane.prototype.sidebarResized):
2875         (WebInspector.TimelineOverviewPane.prototype.zoomToFrame):
2876         (WebInspector.TimelineOverviewPane.prototype._reset):
2877         (WebInspector.TimelineOverviewPane.prototype.windowLeft):
2878         (WebInspector.TimelineOverviewPane.prototype.windowRight):
2879         (WebInspector.TimelineOverviewPane.prototype._updateWindow):
2880
2881 2013-03-19  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2882
2883         Web Inspector: Add Inspector.targetCrashed event to Inspector protocol.
2884         https://bugs.webkit.org/show_bug.cgi?id=112669
2885
2886         Added Inspector.targetCrashed event and handled it on the front end.
2887         Showing a modal dialog similar to the one displayed when the remote
2888         debugging target is disconnected.
2889
2890         Reviewed by Pavel Feldman.
2891
2892         * English.lproj/localizedStrings.js:
2893         * inspector/Inspector.json:
2894         * inspector/front-end/HelpScreen.js:
2895         (WebInspector.HelpScreenUntilReload):
2896         (WebInspector.HelpScreenUntilReload.prototype.willHide):
2897         * inspector/front-end/inspector.js:
2898         (WebInspector.targetCrashed):
2899
2900 2013-03-19  Mario Sanchez Prada  <mario.prada@samsung.com>
2901
2902         [GTK] Wrong guard USE(GLX) in RedirectedXCompositeWindow
2903         https://bugs.webkit.org/show_bug.cgi?id=112600
2904
2905         Reviewed by Martin Robinson.
2906
2907         Replace USE(GLX) condition with USE(OPENGL) && PLATFORM(X11).
2908
2909         * platform/gtk/RedirectedXCompositeWindow.cpp: Updated guard.
2910         * platform/gtk/RedirectedXCompositeWindow.h: Ditto.
2911
2912 2013-03-19  Mihnea Ovidenie  <mihnea@adobe.com>
2913
2914         [CSSRegions] Crash reflowing content in variable width regions
2915         https://bugs.webkit.org/show_bug.cgi?id=112515
2916
2917         Reviewed by David Hyatt.
2918
2919         When removing floats during relayout of a line in a paginated context,
2920         we have to make sure that the floats collection actually has elements before
2921         accessing the last float from the collection.
2922         This situation arises when a block had floats in a previous layout and after
2923         they were removed, m_floatingObjects is not destroyed, only emptied.
2924
2925         Test: fast/regions/crash-reflow-inline-content-in-variable-width-regions.html
2926
2927         * rendering/RenderBlock.cpp:
2928         (WebCore::RenderBlock::removeFloatingObjectsBelow):
2929         * rendering/RenderBlockLineLayout.cpp:
2930         (WebCore::RenderBlock::layoutRunsAndFloats):
2931         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2932
2933 2013-03-18  Vsevolod Vlasov  <vsevik@chromium.org>
2934
2935         Web Inspector: Debugger scripts should visually differ from network/filesystem files in workspace.
2936         https://bugs.webkit.org/show_bug.cgi?id=112552
2937
2938         Reviewed by Pavel Feldman.
2939
2940         Extracted ContentProviderBasedProjectDelegate from SimpleProjectDelegate.
2941         Implemented DebuggerProjectDelegate for DefaultScriptMapping.
2942         Debugger scripts are now added to workspace with a name starting with [VM] and ending with scriptId.
2943         Added yellow background to debugger scripts editor.
2944
2945         * WebCore.gypi:
2946         * WebCore.vcproj/WebCore.vcproj:
2947         * inspector/compile-front-end.py:
2948         * inspector/front-end/ContentProviderBasedProjectDelegate.js: Added.
2949         * inspector/front-end/DefaultScriptMapping.js:
2950         (WebInspector.DefaultScriptMapping):
2951         (WebInspector.DefaultScriptMapping.prototype.addScript):
2952         (WebInspector.DefaultScriptMapping.prototype._debuggerReset):
2953         (WebInspector.DebuggerProjectDelegate):
2954         (WebInspector.DebuggerProjectDelegate.prototype.id):
2955         (WebInspector.DebuggerProjectDelegate.prototype.type):
2956         (WebInspector.DebuggerProjectDelegate.prototype.displayName):
2957         (WebInspector.DebuggerProjectDelegate.prototype.addScript):
2958         * inspector/front-end/JavaScriptSourceFrame.js:
2959         (WebInspector.JavaScriptSourceFrame):
2960         * inspector/front-end/ParsedURL.js:
2961         (WebInspector.ParsedURL.splitURL):
2962         * inspector/front-end/SimpleWorkspaceProvider.js:
2963         (WebInspector.SimpleProjectDelegate):
2964         (WebInspector.SimpleProjectDelegate.prototype.addFile):
2965         (WebInspector.SimpleProjectDelegate.prototype._ensureUniquePath):
2966         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2967         * inspector/front-end/WebKit.qrc:
2968         * inspector/front-end/Workspace.js:
2969         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
2970         * inspector/front-end/inspector.html:
2971         * inspector/front-end/javaScriptSourceFrame.css: Added.
2972         (.source-frame-debugger-script):
2973
2974 2013-03-19  Andrey Lushnikov  <lushnikov@chromium.org>
2975
2976         Web Inspector: [CodeMirror] add smart braces functionality
2977         https://bugs.webkit.org/show_bug.cgi?id=112138
2978
2979         Reviewed by Vsevolod Vlasov.
2980
2981         No new tests.
2982
2983         Add closebrackets add-on to codemirror which implements smart braces
2984         functionality and guard this setting with the "Text Editor smart
2985         braces" experiment.
2986
2987         * WebCore.gypi:
2988         * WebCore.vcproj/WebCore.vcproj:
2989         * WebCore.vcxproj/WebCore.vcxproj:
2990         * WebCore.vcxproj/WebCore.vcxproj.filters:
2991         * inspector/front-end/CodeMirrorTextEditor.js:
2992         * inspector/front-end/WebKit.qrc:
2993         * inspector/front-end/cm/closebrackets.js: Added.
2994         (.):
2995
2996 2013-03-19  Andrey Lushnikov  <lushnikov@chromium.org>
2997
2998         Web Inspector: Avoid forcing text editor resize
2999         https://bugs.webkit.org/show_bug.cgi?id=112581
3000
3001         Reviewed by Vsevolod Vlasov.
3002
3003         No new tests.
3004
3005         Avoid unnecessary text editor resizing by removing line decoration
3006         via removeDecoration method instead of DOM remove operation.
3007
3008         * inspector/front-end/SourceFrame.js:
3009         (WebInspector.SourceFrame.prototype.clearMessages):
3010         (WebInspector.SourceFrame.prototype._setTextEditorDecorations):
3011
3012 2013-03-19  Andrey Lushnikov  <lushnikov@chromium.org>
3013
3014         Web Inspector: [CodeMirror] fix cursor movements
3015         https://bugs.webkit.org/show_bug.cgi?id=112555
3016
3017         Reviewed by Vsevolod Vlasov.
3018
3019         No new tests.
3020
3021         - Update CodeMirror to ToT to include its improved cursor movement
3022         - Add a small keymap to force cursor stop on both line endings and line
3023         starts.
3024
3025         * inspector/front-end/CodeMirrorTextEditor.js:
3026         (WebInspector.CodeMirrorTextEditor):
3027         (WebInspector.CodeMirrorTextEditor.FixWordMovement):
3028         (WebInspector.CodeMirrorTextEditor.FixWordMovement.moveRight):
3029         * inspector/front-end/cm/codemirror.css:
3030         (.CodeMirror div.CodeMirror-cursor):
3031         (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor):
3032         (.CodeMirror):
3033         * inspector/front-end/cm/codemirror.js:
3034         (window.CodeMirror):
3035         (window.CodeMirror.):
3036
3037 2013-03-19  Adam Barth  <abarth@webkit.org>
3038
3039         [chromium] Regression(143825): select elements don't open when there is a marquee on the page
3040         https://bugs.webkit.org/show_bug.cgi?id=111278
3041
3042         Unreviewed.
3043
3044         This patch is a rollout of http://trac.webkit.org/changeset/143825. The
3045         original patch caused a regression in the Chromium port.
3046
3047         * rendering/RenderLayer.cpp:
3048         (WebCore::RenderLayer::scrollTo):
3049
3050 2013-03-19  Alexander Pavlov  <apavlov@chromium.org>
3051
3052         Web Inspector: [Styles] Matching @host rule children are not displayed
3053         https://bugs.webkit.org/show_bug.cgi?id=112664
3054
3055         Reviewed by Vsevolod Vlasov.
3056
3057         Process host rules' contents akin to media rules' when handling the CSS model and source data.
3058
3059         Test: platform/chromium/inspector/styles/host-rules.html
3060
3061         * inspector/InspectorStyleSheet.cpp:
3062         (flattenSourceData):
3063         (WebCore::asCSSRuleList):
3064
3065 2013-03-18  Alexander Pavlov  <apavlov@chromium.org>
3066
3067         Web Inspector: [Styles] The "inherit" property value should be suggested for all properties
3068         https://bugs.webkit.org/show_bug.cgi?id=112662
3069
3070         Reviewed by Vsevolod Vlasov.
3071
3072         * inspector/front-end/CSSMetadata.js:
3073         (WebInspector.CSSMetadata.keywordsForProperty):
3074
3075 2013-03-18  David Kilzer  <ddkilzer@apple.com>
3076
3077         BUILD FIX (r146088): ResourceRequest::cfURLRequest() is defined twice on iOS
3078         <http://webkit.org/b/112387>
3079
3080         * platform/network/mac/ResourceRequestMac.mm:
3081         (WebCore::ResourceRequest::cfURLRequest): Move method into
3082         !USE(CFNETWORK) section since it's also defined in
3083         cf/ResourceRequestCFNet.cpp on iOS.
3084
3085 2013-03-18  Alpha Lam  <hclam@chromium.org>
3086
3087         [chromium] More tracing in deferred image decoding
3088         https://bugs.webkit.org/show_bug.cgi?id=112648
3089
3090         Reviewed by James Robinson.
3091
3092         Adding more trace events for a couple things in deferred image decoding path:
3093         - Time span for each lock pixels of SkPixelRef.
3094         - Time spent on decoding, scaling and pruning. Also the stack trace for these events.
3095         - Memory usage and number of cached entries.
3096         - Number of decode & scale operations done per image.
3097
3098         No test as this just add tracing information and no behavior change.
3099
3100         * platform/graphics/chromium/ImageDecodingStore.cpp:
3101         (WebCore::ImageDecodingStore::prune):
3102         (WebCore::ImageDecodingStore::insertCacheInternal):
3103         (WebCore::ImageDecodingStore::removeFromCacheInternal):
3104         * platform/graphics/chromium/ImageFrameGenerator.cpp:
3105         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
3106         (WebCore::ImageFrameGenerator::decodeAndScale):
3107         (WebCore::ImageFrameGenerator::tryToScale):
3108         (WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale):
3109         (WebCore::ImageFrameGenerator::tryToDecodeAndScale):
3110         (WebCore::ImageFrameGenerator::decode):
3111         * platform/graphics/chromium/ImageFrameGenerator.h:
3112         (ImageFrameGenerator):
3113         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
3114         (WebCore::LazyDecodingPixelRef::onLockPixels):
3115         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
3116         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
3117
3118 2013-03-18  Kentaro Hara  <haraken@chromium.org>
3119
3120         Unreviewed. Rebaselined run-bindings-tests after r146161.
3121
3122         * bindings/scripts/test/JS/JSTestObj.cpp:
3123         (WebCore::setJSTestObjEnumAttr):
3124         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
3125         * bindings/scripts/test/V8/V8TestObj.cpp:
3126         (WebCore::ConfigureV8TestObjTemplate):
3127
3128 2013-03-18  Robert Flack  <flackr@chromium.org>
3129
3130         [chromium] Small pixel differences in scroll bars after r145844
3131         https://bugs.webkit.org/show_bug.cgi?id=112384
3132
3133         Reviewed by Kenneth Russell.
3134
3135         Tests: fast/forms/basic-textareas-quirks.html
3136                fast/forms/basic-textareas.html
3137                fast/overflow/overflow-x-y.html
3138                fast/parser/open-comment-in-textarea.html
3139                fast/replaced/width100percent-textarea.html
3140
3141         * platform/chromium/ScrollbarThemeChromium.cpp:
3142         (WebCore::ScrollbarThemeChromium::trackRect):
3143
3144 2013-03-18  Brent Fulgham  <bfulgham@webkit.org>
3145
3146         [WinCairo] Unreviewed build correction.
3147
3148         The "ImageDecoder.h" file was improperly tagged as a source file to
3149         build, causing a build failure on initial build attempts. Subsequent
3150         or incremental builds would work.
3151
3152         * WebCore.vcxproj/WebCore.vcxproj: Exclude CG-specific font files.
3153         Switch 'ImageDecoder.h' to proper source file type.
3154         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3155
3156 2013-03-18  James Robinson  <jamesr@chromium.org>
3157
3158         [chromium] Remove unused type WebTransformationMatrix
3159         https://bugs.webkit.org/show_bug.cgi?id=112634
3160
3161         Reviewed by Adam Barth.
3162
3163         * WebCore.gypi:
3164         * platform/chromium/support/WebTransformationMatrix.cpp: Removed.
3165
3166 2013-03-18  Arnaud Renevier  <a.renevier@sisa.samsung.com>
3167
3168         Add IDL 'enum' support to CodeGeneratorJS.pm
3169         https://bugs.webkit.org/show_bug.cgi?id=112475
3170
3171         Reviewed by Kentaro Hara.
3172
3173         This adds support for enumerations in JS, adding validation checking
3174         to setters.
3175         It also does validation checking to methods, and a new method
3176         methodWithEnumArg in TestObj.idl
3177
3178         Test: bindings/scripts/test/TestObj.idl
3179
3180         * bindings/scripts/CodeGeneratorJS.pm:
3181         (GenerateImplementation):
3182         (GenerateParametersCheck):
3183         (NativeToJSValue):
3184         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
3185         (WebDOMTestObj::methodWithEnumArg):
3186         * bindings/scripts/test/CPP/WebDOMTestObj.h:
3187         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3188         (webkit_dom_test_obj_method_with_enum_arg):
3189         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3190         * bindings/scripts/test/JS/JSTestObj.cpp:
3191         (WebCore):
3192         (WebCore::jsTestObjEnumAttr):
3193         (WebCore::setJSTestObjEnumAttr):
3194         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
3195         * bindings/scripts/test/JS/JSTestObj.h:
3196         (WebCore):
3197         * bindings/scripts/test/ObjC/DOMTestObj.h:
3198         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3199         (-[DOMTestObj methodWithEnumArg:]):
3200         * bindings/scripts/test/TestObj.idl:
3201         * bindings/scripts/test/V8/V8TestObj.cpp:
3202         (WebCore::TestObjV8Internal::methodWithEnumArgMethod):
3203         (TestObjV8Internal):
3204         (WebCore::TestObjV8Internal::methodWithEnumArgMethodCallback):
3205         (WebCore::ConfigureV8TestObjTemplate):
3206
3207 2013-03-18  Sam Weinig  <sam@webkit.org>
3208
3209         Need a bundle SPI to generate a snapshot of a specific DOM node (like [DOMNode renderedImage])
3210         <rdar://problem/13148631>
3211         https://bugs.webkit.org/show_bug.cgi?id=110034
3212
3213         Reviewed by Tim Horton.
3214
3215         * WebCore.exp.in:
3216         Add some necessary exports.
3217
3218 2013-03-18  Brent Fulgham  <bfulgham@webkit.org>
3219
3220         [WinCairo] Build WebCore under VS2010
3221         https://bugs.webkit.org/show_bug.cgi?id=112637
3222
3223         Reviewed by Tim Horton.
3224
3225         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Extend project
3226         with WinCairo-specific build targets.
3227         * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props: Added.
3228         * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props: Added.
3229         * WebCore.vcxproj/WebCore.vcxproj: Update to build WinCairo version
3230         of code.
3231         * WebCore.vcxproj/WebCoreCURL.props: Added.
3232         * WebCore.vcxproj/WebCoreCairo.props: Added.
3233         * WebCore.vcxproj/WebCoreDebugWinCairo.props: Added.
3234         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
3235         * WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props: Added.
3236         * WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props: Added.
3237         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make: Added.
3238         * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props: Added.
3239         * WebCore.vcxproj/WebCoreReleaseWinCairo.props: Added.
3240         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
3241         * WebCorePrefix.h: Update header to not include Apple-specific
3242         headers during WinCairo build.
3243
3244 2013-03-18  Joshua Bell <jsbell@chromium.org>
3245
3246         IDB Cursor continue moves one item at a time
3247         https://bugs.webkit.org/show_bug.cgi?id=109972
3248
3249         Reviewed by Tony Chang.
3250
3251         IndexedDB: Use seek on the underlying levelDB iterator to implement the continue operation
3252         on a cursor, instead of advancing one item at a time. On a simple test in Chrome - open a
3253         key cursor on an index w/ 100 items, then do continue(50), rinse and repeat - this cuts the
3254         time 50% (850c/s to 1700c/s). (Original patch c/o Pankaj Kakkar <pankaj@google.com>)
3255
3256         Covered by existing storage/indexeddb cursor tests; just a performance optimization.
3257
3258         * Modules/indexeddb/IDBBackingStore.cpp:
3259         (WebCore::IDBBackingStore::Cursor::continueFunction): Special case first iteration w/ key
3260         to use leveldb seek (forward cursors only, since reverse seek isn't exposed).
3261         (WebCore::ObjectStoreKeyCursorImpl::encodeKey): Helper for encoding key to seek to.
3262         (WebCore::ObjectStoreCursorImpl::encodeKey): Ditto.
3263         (WebCore::IndexKeyCursorImpl::encodeKey): Ditto.
3264         (WebCore::IndexCursorImpl::encodeKey): Ditto.
3265         (WebCore::objectStoreCursorOptions): Store IDs for encodeKey() to use.
3266         (WebCore::indexCursorOptions): Ditto.
3267         * Modules/indexeddb/IDBBackingStore.h:
3268         (CursorOptions): Storage for IDs.
3269         (Cursor): Add encodeKey() to interface.
3270
3271 2013-03-18  Alexey Proskuryakov  <ap@apple.com>
3272
3273         MessagePortChannel::EventData should not be exposed
3274         https://bugs.webkit.org/show_bug.cgi?id=112635
3275
3276         Reviewed by Geoff Garen.
3277
3278         MessagePortChannel::EventData is an implementation detail that's only needed to
3279         store events in MessageQueue. Other existing code already gets away without it,
3280         just passing message and ports separately.
3281
3282         * dom/MessagePort.cpp:
3283         (WebCore::MessagePort::postMessage):
3284         (WebCore::MessagePort::dispatchMessages):
3285         * dom/MessagePortChannel.cpp:
3286         * dom/MessagePortChannel.h:
3287         * dom/default/PlatformMessagePortChannel.cpp:
3288         (WebCore::PlatformMessagePortChannel::EventData::create):
3289         (WebCore::PlatformMessagePortChannel::EventData::EventData):
3290         (WebCore::MessagePortChannel::postMessageToRemote):
3291         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
3292         * dom/default/PlatformMessagePortChannel.h:
3293         (WebCore::PlatformMessagePortChannel::EventData::message):
3294         (WebCore::PlatformMessagePortChannel::EventData::channels):
3295         (PlatformMessagePortChannel):
3296         (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
3297         (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
3298         * dom/default/chromium/PlatformMessagePortChannelChromium.cpp:
3299         (WebCore::MessagePortChannel::postMessageToRemote):
3300         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
3301         (WebCore::PlatformMessagePortChannel::postMessageToRemote):
3302         (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
3303         * dom/default/chromium/PlatformMessagePortChannelChromium.h:
3304
3305 2013-03-18  Tom Sepez  <tsepez@chromium.org>
3306
3307         [v8] Suppress binding integrity check of HTMLContentElement.
3308         https://bugs.webkit.org/show_bug.cgi?id=112613
3309
3310         Reviewed by Adam Barth.
3311
3312         Patch is correct so long as fast/dom/shadow/content-element-user-agent-shadow.html
3313         continues to pass.
3314
3315         * html/shadow/HTMLContentElement.idl:
3316
3317 2013-03-18  Dominic Mazzoni  <dmazzoni@google.com>
3318
3319         Support Windows HTMLSelectElement keystrokes on Chromium win
3320         https://bugs.webkit.org/show_bug.cgi?id=112460
3321
3322         Reviewed by Kent Tamura.
3323
3324         Compile in the windows-specific variant of
3325         HTMLSelectElement::platformHandleKeydownEvent
3326         on Chromium win, in addition to PLATFORM(WIN).
3327
3328         * WebCore.gypi:
3329             Add html/HTMLSelectElementWin.cpp.
3330         * html/HTMLSelectElement.cpp:
3331             Don't compile generic platformHandleKeydownEvent on
3332             Chromium win.
3333         * html/HTMLSelectElementWin.cpp:
3334             Only compile platformHandleKeydownEvent on Windows.
3335             Fix compile error in assertion.
3336         (WebCore):
3337
3338 2013-03-18  Mike West  <mkwst@chromium.org>
3339
3340         CSP 1.1: Schemeless source expressions match HTTPS resources on HTTP sites.
3341         https://bugs.webkit.org/show_bug.cgi?id=112573
3342
3343         Reviewed by Adam Barth.
3344
3345         Currently, the directive 'script-src example.com' would match only
3346         scripts served from 'http://example.com' when served on an HTTP site,
3347         and only scripts served from 'https://example.com' when served on an
3348         HTTPS site. This patch changes the matching behavior for ports that
3349         have enabled CSP_NEXT in order to encourage use of HTTPS resources by
3350         allow schemeless source expressions to match HTTPS origins when on
3351         HTTP sites.
3352
3353         Thread: http://lists.w3.org/Archives/Public/public-webappsec/2013Mar/0013.html
3354         Spec change: https://dvcs.w3.org/hg/content-security-policy/rev/a7dc8820946e
3355
3356         Test: http/tests/security/contentSecurityPolicy/source-list-parsing-10.html
3357
3358         * page/ContentSecurityPolicy.cpp:
3359         (WebCore::CSPSource::CSPSource):
3360             Pass the current policy into CSPSource so that we can check the
3361             protected resource's scheme inside schemeMatches, rather than
3362             overwriting the source expression's scheme before creating the
3363             CSPSource.
3364         (WebCore::CSPSource::schemeMatches):
3365             If CSP_NEXT is enabled, ensure that HTTPS resources match the
3366             HTTP scheme when loaded on HTTP pages with schemaless source
3367             expressions.
3368         (WebCore::CSPSource::portMatches):
3369             Check the port against the URL's scheme: if m_scheme isn't
3370             empty, this will match it. If m_scheme is empty, we can't
3371             do a strict match against it, nor can we do a strict match
3372             against the protected resource's port. Checking the URL's
3373             port against the default port for its scheme solves this
3374             problem elegantly.
3375         (WebCore::CSPSourceList::parse):
3376         (WebCore::CSPSourceList::addSourceSelf):
3377             Pass in the policy when creating a CSPSource object.
3378
3379 2013-03-15  Jer Noble  <jer.noble@apple.com>
3380
3381         Text track cues do not update sizes when entering or exiting full screen.
3382         https://bugs.webkit.org/show_bug.cgi?id=112472
3383
3384         Reviewed by Eric Carlson.
3385
3386         The style properties of the TextCueBoxes were not being updated after the size of the video bounds changed.
3387         Because getDisplayTree() will not do it when the cue itself has not changed, explicitly call videoSizeDidChange()
3388         from updateSizes().
3389
3390         * html/shadow/MediaControlElements.cpp:
3391         (WebCore::MediaControlTextTrackContainerElement::updateSizes): call videoSizeDidChange() on every active cue.
3392         * html/track/TextTrackCue.h:
3393         (WebCore::TextTrackCue::hasDisplayTree): returns whether or not the cue has created a display tree without side effects.
3394         (WebCore::TextTrackCue::videoSizeDidChange): Overridable empty method.
3395         * html/track/TextTrackCueGeneric.cpp:
3396         (WebCore::TextTrackCueGeneric::videoSizeDidChange): Update the CSS height attribute of the cue box using the new video size.
3397         * html/track/TextTrackCueGeneric.h:
3398
3399 2013-03-18  Mike West  <mkwst@chromium.org>
3400
3401         CSP 1.1: Add 'effective-directive' to violation reports.
3402         https://bugs.webkit.org/show_bug.cgi?id=112568
3403
3404         Reviewed by Adam Barth.
3405
3406         https://dvcs.w3.org/hg/content-security-policy/rev/bc2bb0e5072a
3407         introduced an 'effective-directive' field on CSP violation reports,
3408         which allows developers to distinguish between resource types when
3409         'default-src' is the violated directive.
3410
3411         This patch implements the new field behind the CSP_NEXT flag.
3412
3413         Test: http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive.html
3414
3415         * page/ContentSecurityPolicy.cpp:
3416         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
3417         (WebCore::CSPDirectiveList::reportViolation):
3418             These methods now accept an additional parameter to pipe the
3419             effective directive from the initial callsite down into
3420             ContentSecurityPolicy::reportViolation.
3421         (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
3422         (WebCore::CSPDirectiveList::checkNonceAndReportViolation):
3423         (WebCore::CSPDirectiveList::checkMediaTypeAndReportViolation):
3424         (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
3425         (WebCore::CSPDirectiveList::allowScriptFromSource):
3426         (WebCore::CSPDirectiveList::allowObjectFromSource):
3427         (WebCore::CSPDirectiveList::allowChildFrameFromSource):
3428         (WebCore::CSPDirectiveList::allowImageFromSource):
3429         (WebCore::CSPDirectiveList::allowStyleFromSource):
3430         (WebCore::CSPDirectiveList::allowFontFromSource):
3431         (WebCore::CSPDirectiveList::allowMediaFromSource):
3432         (WebCore::CSPDirectiveList::allowConnectToSource):
3433         (WebCore::CSPDirectiveList::allowFormAction):
3434             These methods now pass the effective directive name down
3435             into checkSourceAndReportViolation or reportViolation.
3436         (WebCore::ContentSecurityPolicy::reportViolation):
3437         * page/ContentSecurityPolicy.h:
3438             This method now accepts a new parameter that carries
3439             the effective directive name. If CSP_NEXT is enabled,
3440             the field is added to the violation report before it's
3441             sent out into the world.
3442
3443 2013-03-18  W. James MacLean  <wjmaclean@chromium.org>
3444
3445         [chromium] Remove NCCH code that relies on boundsContainsPageScale().
3446         https://bugs.webkit.org/show_bug.cgi?id=112465
3447
3448         Reviewed by James Robinson.
3449
3450         The boundsContainsPageScale() API is going away, remove code that
3451         depends on it. Uses existing tests as no behaviour change.
3452
3453         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3454         (WebCore::GraphicsLayerChromium::setAppliesPageScale):
3455         (WebCore::GraphicsLayerChromium::appliesPageScale):
3456
3457 2013-03-18  Alec Flett  <alecflett@chromium.org>
3458
3459         IndexedDB: Protect against key prefix overflows
3460         https://bugs.webkit.org/show_bug.cgi?id=111138
3461
3462         Reviewed by Tony Chang.
3463