Web Inspector: home button behaviour is wrong in DTE
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
2
3         Web Inspector: home button behaviour is wrong in DTE
4         https://bugs.webkit.org/show_bug.cgi?id=109154
5
6         Reviewed by Vsevolod Vlasov.
7
8         Handle home key shortcut explicitly in TextEditorMainPanel.
9
10         New test: inspector/editor/text-editor-home-button.html
11
12         * inspector/front-end/DefaultTextEditor.js:
13         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
14         (WebInspector.TextEditorMainPanel.prototype._handleHomeKey):
15
16 2013-02-11  Abhishek Arya  <inferno@chromium.org>
17
18         Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
19         https://bugs.webkit.org/show_bug.cgi?id=108981
20
21         Reviewed by Eric Seidel.
22
23         * Modules/mediastream/RTCStatsResponse.cpp:
24         (WebCore::RTCStatsResponse::addElement):
25         (WebCore::RTCStatsResponse::addStatistic):
26         * Modules/websockets/WebSocketChannel.cpp:
27         (WebCore::WebSocketChannel::skipBuffer):
28         * css/CSSCalculationValue.cpp:
29         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
30         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
31         * css/WebKitCSSTransformValue.cpp:
32         (WebCore::transformValueToCssString):
33         * editing/TextIterator.cpp:
34         (WebCore::SearchBuffer::search):
35         * html/HTMLElement.cpp:
36         (WebCore::parseColorStringWithCrazyLegacyRules):
37         * html/ImageData.cpp:
38         (WebCore::ImageData::ImageData):
39         * html/shadow/DateTimeSymbolicFieldElement.cpp:
40         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
41         * html/track/TextTrackCueList.cpp:
42         (WebCore::TextTrackCueList::add):
43         * platform/SharedBuffer.cpp:
44         (WebCore::SharedBuffer::getSomeData):
45         * platform/SharedBufferChunkReader.cpp:
46         (WebCore::SharedBufferChunkReader::nextChunk):
47         * platform/audio/HRTFDatabase.cpp:
48         (WebCore::HRTFDatabase::getKernelsFromAzimuthElevation):
49         * platform/graphics/GlyphPageTreeNode.cpp:
50         (WebCore::GlyphPageTreeNode::initializePage):
51         * platform/graphics/Region.cpp:
52         (WebCore::Region::Shape::segments_end):
53         * platform/graphics/filters/FEComponentTransfer.cpp:
54         (WebCore::FEComponentTransfer::getValues):
55         * platform/graphics/filters/FilterEffect.cpp:
56         (WebCore::FilterEffect::inputEffect):
57         * platform/text/TextCodecUTF8.cpp:
58         (WebCore::TextCodecUTF8::decode):
59         * platform/text/mac/TextCodecMac.cpp:
60         (WebCore::TextCodecMac::decode):
61         * rendering/RenderBlockLineLayout.cpp:
62         (WebCore::RenderBlock::checkFloatsInCleanLine):
63         * svg/SVGAnimatedTypeAnimator.h:
64         (WebCore::SVGAnimatedTypeAnimator::executeAction):
65         * svg/SVGAnimationElement.cpp:
66         (WebCore::SVGAnimationElement::calculatePercentForSpline):
67         * svg/animation/SVGSMILElement.cpp:
68         (WebCore::SVGSMILElement::findInstanceTime):
69
70 2013-02-10  Chris Fleizach  <cfleizach@apple.com>
71
72         WebSpeech: Implement basic speaking/finished speaking behavior
73         https://bugs.webkit.org/show_bug.cgi?id=107135
74
75         Reviewed by Sam Weinig.
76
77         Implements the basic functionality of speaking utterances.
78
79         In the WebCore side, it manages the speech queue the way the spec defines
80         (that is, new jobs are appended to a queue and wait for other jobs to finish).
81
82         On the Mac side, it instantiates a synthesizer and handles the callbacks for when
83         jobs are finished. It sends those jobs back to WebCore to dispatch the right events.
84
85         Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak.html
86
87         * Modules/speech/SpeechSynthesis.cpp:
88         (WebCore::SpeechSynthesis::SpeechSynthesis):
89         (WebCore::SpeechSynthesis::paused):
90         (WebCore::SpeechSynthesis::startSpeakingImmediately):
91         (WebCore::SpeechSynthesis::speak):
92         (WebCore):
93         (WebCore::SpeechSynthesis::fireEvent):
94         (WebCore::SpeechSynthesis::handleSpeakingCompleted):
95         (WebCore::SpeechSynthesis::didStartSpeaking):
96         (WebCore::SpeechSynthesis::didFinishSpeaking):
97         (WebCore::SpeechSynthesis::speakingErrorOccurred):
98         * Modules/speech/SpeechSynthesis.h:
99         (WebCore):
100         (WebCore::SpeechSynthesis::speaking):
101         (SpeechSynthesis):
102         * Modules/speech/SpeechSynthesisEvent.cpp:
103         (WebCore::SpeechSynthesisEvent::create):
104         (WebCore):
105         (WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent):
106         * Modules/speech/SpeechSynthesisEvent.h:
107         (SpeechSynthesisEvent):
108         (WebCore::SpeechSynthesisEvent::interfaceName):
109         * Modules/speech/SpeechSynthesisUtterance.h:
110         (WebCore::SpeechSynthesisUtterance::startTime):
111         (WebCore::SpeechSynthesisUtterance::setStartTime):
112         (SpeechSynthesisUtterance):
113         * platform/PlatformSpeechSynthesisUtterance.cpp:
114         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
115         * platform/PlatformSpeechSynthesisUtterance.h:
116         (PlatformSpeechSynthesisUtterance):
117         (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
118         (WebCore::PlatformSpeechSynthesisUtterance::setRate):
119         (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
120         (WebCore::PlatformSpeechSynthesisUtterance::startTime):
121         (WebCore::PlatformSpeechSynthesisUtterance::setStartTime):
122         (WebCore::PlatformSpeechSynthesisUtterance::client):
123         * platform/PlatformSpeechSynthesizer.cpp:
124         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
125         * platform/PlatformSpeechSynthesizer.h:
126         (PlatformSpeechSynthesizerClient):
127         (WebCore::PlatformSpeechSynthesizer::client):
128         (PlatformSpeechSynthesizer):
129         * platform/mac/PlatformSpeechSynthesizerMac.mm:
130         (-[WebSpeechSynthesisWrapper initWithSpeechSynthesizer:WebCore::]):
131         (-[WebSpeechSynthesisWrapper dealloc]):
132         (-[WebSpeechSynthesisWrapper convertRateToWPM:]):
133         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
134         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
135         (WebCore::PlatformSpeechSynthesizer::speak):
136
137 2013-02-10  Eric Seidel  <eric@webkit.org>
138
139         Make the existing HTMLPreloadScanner threading-aware
140         https://bugs.webkit.org/show_bug.cgi?id=107807
141
142         Reviewed by Adam Barth.
143
144         The HTMLPreloadScanner and CSSPreloadScanner do a number of things.
145         CSSPreloadScanner is mostly just a helper class for HTMLPreloadScanner.
146         HTMLPreloadScanner runs its own copy of the HTMLTokenizer and uses
147         HTMLTokenizer::updateStateFor to emulate enough of the TreeBuilder
148         to get a realistic stream of tokens.  It does some additional TreeBuilder
149         emulation, including tracking template tags and base tags, but mostly
150         just scans the token stream for start-tags and looks for URLs in them.
151         It tracks when it has seen a <style> tag and starts sending all character tokens
152         to the CSSPreloadScanner until a </style> tag is seen.
153         It also (unfortunately) knows some about the loader guts and how to construct
154         a proper CachedResourcRequest and issue a preload.
155
156         This patch changes the model so that the preload scanners only know how to produce
157         PreloadRequest objects and append them to a passed-in vector.
158
159         This changes the preload-scanner behavior so that preloads are now all issued in one large
160         batch at the end of scanning, instead of as we hit each resource.  It's possible that
161         we'll wait to instead check for preload requests more often, at a possible tradeoff
162         to tokenizing speed.
163
164         An alternate approach might be to pass in a preload-delegate of sorts which knew how
165         to either build a vector, or send requests immediately.  For now the build-a-vector-always
166         approach seems clean, and does not seem to slow down our PerformanceTest microbenchmarks at least.
167
168         This patch has 2 main pieces:
169         - Remove Document and (and loader) dependencies from HTMLPreloadScanner/CSSPreloadScanner
170           This is done through introduction of a new HTMLResourcePreloader class which holds
171           a Document* and knows how to talk to the CachedResourceLoader.
172         - Clean-up HTMLPreloadScanners token-loop to not be tied to having a Tokenizer.
173           (On a background thead, the HTMLPreloadScanner won't own the tokenizer, it will just
174            be passed in tokens and expected to issue loads if necessary.)
175
176         This passes all of the LayoutTests using the main thread parser.
177
178         This patch does not make the HTMLPreloadScanner 100% ready for threading
179         (it still uses AtomicString which is currently not-OK on the parser thread)
180         but it's very close.  Two further (already written) patches will complete this.
181
182         * CMakeLists.txt:
183         * GNUmakefile.list.am:
184         * Target.pri:
185         * WebCore.gypi:
186         * WebCore.vcproj/WebCore.vcproj:
187         * WebCore.vcxproj/WebCore.vcxproj:
188         * WebCore.xcodeproj/project.pbxproj:
189         * html/parser/CSSPreloadScanner.cpp:
190         (WebCore::CSSPreloadScanner::CSSPreloadScanner):
191         (WebCore::CSSPreloadScanner::scan):
192         (WebCore::CSSPreloadScanner::emitRule):
193         * html/parser/CSSPreloadScanner.h:
194         (CSSPreloadScanner):
195         * html/parser/HTMLDocumentParser.cpp:
196         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
197         (WebCore::HTMLDocumentParser::pumpTokenizer):
198         (WebCore::HTMLDocumentParser::insert):
199         (WebCore::HTMLDocumentParser::append):
200         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
201         * html/parser/HTMLDocumentParser.h:
202         (HTMLDocumentParser):
203         * html/parser/HTMLPreloadScanner.cpp:
204         (WebCore::isStartTag):
205         (WebCore):
206         (WebCore::isStartOrEndTag):
207         (WebCore::PreloadTask::processAttributes):
208         (WebCore::PreloadTask::charset):
209         (PreloadTask):
210         (WebCore::PreloadTask::resourceType):
211         (WebCore::PreloadTask::shouldPreload):
212         (WebCore::PreloadTask::createPreloadRequest):
213         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
214         (WebCore::HTMLPreloadScanner::scan):
215         (WebCore::HTMLPreloadScanner::processPossibleTemplateTag):
216         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
217         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
218         (WebCore::HTMLPreloadScanner::processToken):
219         * html/parser/HTMLPreloadScanner.h:
220         (HTMLPreloadScanner):
221         * html/parser/HTMLResourcePreloader.cpp: Added.
222         (WebCore):
223         (WebCore::isStringSafeToSendToAnotherThread):
224         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
225         (WebCore::PreloadRequest::completeURL):
226         (WebCore::PreloadRequest::resourceRequest):
227         (WebCore::HTMLResourcePreloader::preload):
228         * html/parser/HTMLResourcePreloader.h: Added.
229         (WebCore):
230         (PreloadRequest):
231         (WebCore::PreloadRequest::create):
232         (WebCore::PreloadRequest::PreloadRequest):
233         (HTMLResourcePreloader):
234         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
235         (WebCore::HTMLResourcePreloader::createWeakPtr):
236         * loader/cache/CachedResourceRequest.h:
237
238 2013-02-06  Kentaro Hara  <haraken@chromium.org>
239
240         [V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext()
241         https://bugs.webkit.org/show_bug.cgi?id=109039
242
243         Reviewed by Adam Barth.
244
245         This is a follow-up patch for r141983.
246         Rename methods for consistency.
247
248         No tests. No change in behavior.
249
250         * bindings/v8/DOMDataStore.cpp:
251         (WebCore::DOMDataStore::current):
252         * bindings/v8/DOMWrapperWorld.h:
253         (WebCore::DOMWrapperWorld::getWorld):
254         * bindings/v8/ScriptController.cpp:
255         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
256         (WebCore::ScriptController::currentWorldContext):
257         * bindings/v8/V8Binding.h:
258         (WebCore::worldForEnteredContext):
259         * bindings/v8/WorldContextHandle.cpp:
260         (WebCore::WorldContextHandle::WorldContextHandle):
261         * bindings/v8/custom/V8DocumentCustom.cpp:
262         (WebCore::wrap):
263         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
264         (WebCore::wrap):
265         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
266         (WebCore::wrap):
267         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
268         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
269
270 2013-02-10  Alexandre Elias  <aelias@chromium.org>
271
272         [chromium] Fix Android scrollbar size
273         https://bugs.webkit.org/show_bug.cgi?id=109374
274
275         Reviewed by James Robinson.
276
277         This shrinks scrollbars to 3 device-independent pixels (usually 6
278         physical pixels) and deletes the edge fade. Although the Android
279         system theme does have an edge fade, it's a much sharper cliff
280         than we had (against black, the colors go 64 -> 64 -> 52 -> 21 -> 0)
281         and I can't perceive any difference compared with no fade at all.
282
283         No new tests (due for rewrite in a week anyway).
284
285         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
286         (WebCore):
287         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
288
289 2013-02-04  Kentaro Hara  <haraken@chromium.org>
290
291         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
292         https://bugs.webkit.org/show_bug.cgi?id=108579
293
294         Reviewed by Adam Barth.
295
296         Currently V8GCController::m_edenNodes stores a list of nodes whose
297         wrappers have been created since the latest GC. The reason why we
298         needed m_edenNodes is that there was no way to know a list of wrappers
299         in the new space of V8. By using m_edenNodes, we had been approximating
300         'wrappers in the new space' by 'wrappers that have been created since
301         the latest GC'.
302
303         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
304         can know a list of wrappers in the new space. By using the API, we can
305         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
306         need to keep m_edenNodes and that (2) it enables more precise minor
307         DOM GC (Remember that m_edenNodes was just an approximation).
308
309         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
310         The benchmark runs 300 iterations, each of which creates 100000 elements.
311         The benchmark measures average, min, median, max and stdev of execution times
312         of the 300 iterations. This will tell us the worst-case overhead of this change.
313
314         Before:
315           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
316
317         After:
318           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
319
320         As shown above, I couldn't observe any performance regression.
321
322         No tests. No change in behavior.
323
324         * bindings/v8/DOMDataStore.h:
325         (WebCore::DOMDataStore::setWrapperInObject):
326         * bindings/v8/DOMWrapperWorld.h:
327         (DOMWrapperWorld):
328         (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
329         * bindings/v8/V8Binding.h:
330         (WebCore):
331         (WebCore::worldForEnteredContextIfIsolated):
332         (WebCore::worldForEnteredContextWithoutContextCheck):
333         * bindings/v8/V8DOMWindowShell.cpp:
334         (WebCore::V8DOMWindowShell::initializeIfNeeded):
335         * bindings/v8/V8GCController.cpp:
336         (WebCore::gcTree):
337         (WebCore):
338         (MinorGCWrapperVisitor):
339         (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
340         (WebCore::MinorGCWrapperVisitor::notifyFinished):
341         (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
342         (WebCore::V8GCController::gcPrologue):
343         (WebCore::V8GCController::minorGCPrologue):
344         (WebCore::V8GCController::majorGCPrologue):
345         * bindings/v8/V8GCController.h:
346         (V8GCController):
347
348 2013-02-10  Tim Horton  <timothy_horton@apple.com>
349
350         REGRESSION (r132422): Page content and scrollbars are incorrectly offset after restoring a page from the page cache
351         https://bugs.webkit.org/show_bug.cgi?id=109317
352         <rdar://problem/12649131>
353
354         Reviewed by Simon Fraser.
355
356         Mark all scrolling that occurs beneath FrameView::layout as programmatic.
357
358         Test: platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
359
360         * page/FrameView.cpp:
361         (WebCore::FrameView::layout):
362
363 2013-02-10  Kent Tamura  <tkent@chromium.org>
364
365         [Mac] Fix release build failure by recent reverts
366
367         * WebCore.exp.in:
368
369 2013-02-10  Philippe Normand  <pnormand@igalia.com>
370
371         [GStreamer] media/video-controls-fullscreen-volume.html crashes
372         https://bugs.webkit.org/show_bug.cgi?id=108682
373
374         Reviewed by Martin Robinson.
375
376         Clean up various signal handlers and avoid bad interaction between
377         the FullscreenVideoControllerGStreamer and its subclasses,
378         especially when the platform video window is created.
379
380         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
381         (WebCore::FullscreenVideoControllerGStreamer::enterFullscreen):
382         Initialize the window before connecting to the volume/mute
383         signals. This ensures that the signals won't ever interfere with
384         an inexisting window.
385         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
386         (WebCore::GStreamerGWorld::~GStreamerGWorld): Remove GstBus
387         synchronous handler function.
388         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
389         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
390         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
391         Disconnect from volume/mute signals.
392         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
393         Keep a trace of volume/mute signal handlers.
394         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
395         Various forward type declarations to avoid un-necessary header includes.
396         (MediaPlayerPrivateGStreamerBase):
397         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
398         (WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk):
399         (WebCore::FullscreenVideoControllerGtk::volumeChanged): Bail out
400         if volume button hasn't been created yet.
401         (WebCore::FullscreenVideoControllerGtk::muteChanged): Ditto.
402
403 2013-02-10  Andreas Kling  <akling@apple.com>
404
405         RenderStyle should use copy-on-write inheritance for NinePieceImage.
406         <http://webkit.org/b/109366>
407
408         Reviewed by Antti Koivisto.
409
410         Refactor NinePieceImage to hold a copy-on-write DataRef like other RenderStyle substructures.
411         This allows us to avoids copying the NinePieceImageData when one RenderStyle inherits from another
412         but modifies something in the substructure holding the NinePieceImage (typically StyleSurroundData.)
413
414         Also made RenderStyle not copy-on-write its StyleSurroundData prematurely when doing a no-op write
415         to a border-image related value.
416
417         1.23 MB progression on Membuster3.
418
419         * rendering/style/NinePieceImage.cpp:
420         (WebCore::defaultData):
421         (WebCore::NinePieceImage::NinePieceImage):
422         (WebCore::NinePieceImageData::NinePieceImageData):
423         (WebCore::NinePieceImageData::operator==):
424         * rendering/style/NinePieceImage.h:
425         (WebCore::NinePieceImageData::create):
426         (WebCore::NinePieceImageData::copy):
427         (NinePieceImageData):
428         (NinePieceImage):
429         (WebCore::NinePieceImage::operator==):
430         (WebCore::NinePieceImage::operator!=):
431         (WebCore::NinePieceImage::hasImage):
432         (WebCore::NinePieceImage::image):
433         (WebCore::NinePieceImage::setImage):
434         (WebCore::NinePieceImage::imageSlices):
435         (WebCore::NinePieceImage::setImageSlices):
436         (WebCore::NinePieceImage::fill):
437         (WebCore::NinePieceImage::setFill):
438         (WebCore::NinePieceImage::borderSlices):
439         (WebCore::NinePieceImage::setBorderSlices):
440         (WebCore::NinePieceImage::outset):
441         (WebCore::NinePieceImage::setOutset):
442         (WebCore::NinePieceImage::horizontalRule):
443         (WebCore::NinePieceImage::setHorizontalRule):
444         (WebCore::NinePieceImage::verticalRule):
445         (WebCore::NinePieceImage::setVerticalRule):
446         (WebCore::NinePieceImage::copyImageSlicesFrom):
447         (WebCore::NinePieceImage::copyBorderSlicesFrom):
448         (WebCore::NinePieceImage::copyOutsetFrom):
449         (WebCore::NinePieceImage::copyRepeatFrom):
450         (WebCore::NinePieceImage::setMaskDefaults):
451         (WebCore::NinePieceImage::computeOutset):
452         * rendering/style/RenderStyle.cpp:
453         (WebCore::RenderStyle::setBorderImageSource):
454         (WebCore::RenderStyle::setBorderImageSlices):
455         (WebCore::RenderStyle::setBorderImageWidth):
456         (WebCore::RenderStyle::setBorderImageOutset):
457         * rendering/style/RenderStyle.h:
458
459 2013-02-10  Kent Tamura  <tkent@chromium.org>
460
461         Unreviewed, rolling out r142343.
462         http://trac.webkit.org/changeset/142343
463         https://bugs.webkit.org/show_bug.cgi?id=108284
464
465         It might make inspector/profiler/selector-profiler-url.html
466         crashy.
467
468         * WebCore.exp.in:
469         * css/plugIns.css:
470         (p):
471         * html/HTMLPlugInElement.cpp:
472         (WebCore::HTMLPlugInElement::defaultEventHandler):
473         * html/HTMLPlugInImageElement.cpp:
474         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
475         (WebCore::HTMLPlugInImageElement::createRenderer):
476         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
477         (WebCore::HTMLPlugInImageElement::updateSnapshot):
478         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
479         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
480         * html/HTMLPlugInImageElement.h:
481         (WebCore):
482         (HTMLPlugInImageElement):
483         * page/ChromeClient.h:
484         (WebCore::ChromeClient::plugInStartLabelImage):
485         * platform/LocalizedStrings.cpp:
486         * platform/LocalizedStrings.h:
487         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
488         * platform/chromium/LocalizedStringsChromium.cpp:
489         * platform/efl/LocalizedStringsEfl.cpp:
490         (WebCore):
491         * platform/gtk/LocalizedStringsGtk.cpp:
492         (WebCore):
493         * platform/qt/LocalizedStringsQt.cpp:
494         * rendering/RenderSnapshottedPlugIn.cpp:
495         (WebCore):
496         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
497         (WebCore::RenderSnapshottedPlugIn::paint):
498         (WebCore::RenderSnapshottedPlugIn::paintReplaced):
499         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
500         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot):
501         (WebCore::RenderSnapshottedPlugIn::startLabelImage):
502         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel):
503         (WebCore::RenderSnapshottedPlugIn::getCursor):
504         (WebCore::RenderSnapshottedPlugIn::handleEvent):
505         (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel):
506         * rendering/RenderSnapshottedPlugIn.h:
507
508 2013-02-10  Andreas Kling  <akling@apple.com>
509
510         RenderText: Access characters through m_text instead of caching data pointers separately.
511         <http://webkit.org/b/109357>
512
513         Reviewed by Antti Koivisto.
514
515         Go through RenderText::m_text.impl() instead of caching the character data pointer.
516         RenderText should never have a null String in m_text so it's safe to access impl() directly.
517         We have assertions for this since before.
518
519         Removing this pointer shrinks RenderText by 8 bytes, allowing it to fit into a snugger size class.
520         749 KB progression on Membuster3.
521
522         * rendering/RenderText.cpp:
523         (SameSizeAsRenderText):
524         (WebCore::RenderText::RenderText):
525         (WebCore::RenderText::setTextInternal):
526         * rendering/RenderText.h:
527         (WebCore::RenderText::is8Bit):
528         (WebCore::RenderText::characters8):
529         (WebCore::RenderText::characters16):
530         (WebCore::RenderText::characterAt):
531         (WebCore::RenderText::operator[]):
532         (RenderText):
533
534 2013-02-10  Jae Hyun Park  <jae.park08@gmail.com>
535
536         Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
537         https://bugs.webkit.org/show_bug.cgi?id=104266
538
539         Reviewed by Philippe Normand.
540
541         Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
542         the existing macro naming conventions.
543
544         From Platform.h
545         USE() - use a particular third-party library or optional OS service
546         ENABLE() - turn on a specific feature of WebKit
547
548         No new tests, no new functionality.
549
550         * WebCore.pri:
551
552 2013-02-10  Zan Dobersek  <zdobersek@igalia.com>
553
554         [GTK] Build errors in TextureMapperShaderProgram.cpp when compiling with Clang
555         https://bugs.webkit.org/show_bug.cgi?id=109321
556
557         Reviewed by Noam Rosenthal.
558
559         Clang is reporting errors due to non-constant expressions that cannot be narrowed
560         from double to float type in initializer list when constructing a matrix of GC3Dfloat
561         numbers. To avoid this every parameter is passed through an explicit GC3Dfloat constructor.
562
563         No new tests - no new functionality.
564
565         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
566         (WebCore::TextureMapperShaderProgram::setMatrix):
567
568 2013-02-10  Philippe Normand  <pnormand@igalia.com>
569
570         [GStreamer] audio is muted when playback rate is between 0.8 and 2.0
571         https://bugs.webkit.org/show_bug.cgi?id=109362
572
573         Reviewed by Martin Robinson.
574
575         Don't mute sound if the audio pitch is preserved. If this is not
576         the case mute it if it's too extreme, as the HTML5 spec recommends.
577
578         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
579         (WebCore::MediaPlayerPrivateGStreamer::setRate):
580
581 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
582
583         fast/encoding/parser-tests-*.html tests sometimes crash
584         https://bugs.webkit.org/show_bug.cgi?id=108058
585
586         Reviewed by Chris Fleizach.
587
588         To avoid calling accessibilityIsIgnored while the render
589         tree is unstable, call accessibilityIsIgnored in the
590         notification timer handler, only for childrenChanged
591         notifications.
592
593         This exposed a problem where notifications queued on
594         objects can fire after the object has been deleted; fix that
595         by checking the object's id, which is always set to 0 when
596         removed from the tree.
597
598         Covered by existing tests.
599
600         * accessibility/AXObjectCache.cpp:
601         (WebCore::AXObjectCache::childrenChanged):
602         (WebCore::AXObjectCache::notificationPostTimerFired):
603
604 2013-02-09  Eric Carlson  <eric.carlson@apple.com>
605
606         [Mac] Do not assume MediaAccessibility framework is installed
607         https://bugs.webkit.org/show_bug.cgi?id=109365
608
609         Reviewed by Sam Weinig.
610
611         * page/CaptionUserPreferencesMac.h:
612         * page/CaptionUserPreferencesMac.mm:
613         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Call the base class if the framework
614             is not available.
615         (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
616         (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
617         (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Ditto.
618         (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
619         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Ditto.
620         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
621         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
622         (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto.
623
624 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
625
626         AX: move isIgnored caching to AXObject
627         https://bugs.webkit.org/show_bug.cgi?id=109322
628
629         Reviewed by Chris Fleizach.
630
631         There's some benefit to caching accessibilityIsIgnored
632         (using AXComputedObjectAttributeCache) for more than just
633         AXRenderObject, so move the caching code to AXObject.
634
635         AXObject now has a protected virtual method
636         computeAccessibilityIsIgnored, and all subclasses
637         override that instead.
638
639         No new tests.
640
641         * accessibility/AccessibilityImageMapLink.h:
642         (AccessibilityImageMapLink):
643         (WebCore::AccessibilityImageMapLink::computeAccessibilityIsIgnored):
644         * accessibility/AccessibilityList.cpp:
645         (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
646         * accessibility/AccessibilityList.h:
647         (AccessibilityList):
648         * accessibility/AccessibilityListBox.cpp:
649         (WebCore::AccessibilityListBox::computeAccessibilityIsIgnored):
650         * accessibility/AccessibilityListBox.h:
651         (AccessibilityListBox):
652         * accessibility/AccessibilityListBoxOption.cpp:
653         (WebCore::AccessibilityListBoxOption::computeAccessibilityIsIgnored):
654         * accessibility/AccessibilityListBoxOption.h:
655         (AccessibilityListBoxOption):
656         * accessibility/AccessibilityMediaControls.cpp:
657         (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored):
658         (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored):
659         * accessibility/AccessibilityMediaControls.h:
660         (AccessibilityMediaControl):
661         (WebCore::AccessibilityMediaControlsContainer::computeAccessibilityIsIgnored):
662         (AccessibilityMediaTimeDisplay):
663         * accessibility/AccessibilityMenuList.h:
664         (WebCore::AccessibilityMenuList::computeAccessibilityIsIgnored):
665         * accessibility/AccessibilityMenuListOption.cpp:
666         (WebCore::AccessibilityMenuListOption::computeAccessibilityIsIgnored):
667         * accessibility/AccessibilityMenuListOption.h:
668         (AccessibilityMenuListOption):
669         * accessibility/AccessibilityMenuListPopup.cpp:
670         (WebCore::AccessibilityMenuListPopup::computeAccessibilityIsIgnored):
671         * accessibility/AccessibilityMenuListPopup.h:
672         (AccessibilityMenuListPopup):
673         * accessibility/AccessibilityNodeObject.cpp:
674         (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
675         * accessibility/AccessibilityNodeObject.h:
676         (AccessibilityNodeObject):
677         * accessibility/AccessibilityObject.cpp:
678         (WebCore::AccessibilityObject::accessibilityIsIgnored):
679         (WebCore):
680         * accessibility/AccessibilityObject.h:
681         (AccessibilityObject):
682         (WebCore::AccessibilityObject::computeAccessibilityIsIgnored):
683         * accessibility/AccessibilityProgressIndicator.cpp:
684         (WebCore::AccessibilityProgressIndicator::computeAccessibilityIsIgnored):
685         * accessibility/AccessibilityProgressIndicator.h:
686         (AccessibilityProgressIndicator):
687         * accessibility/AccessibilityRenderObject.cpp:
688         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
689         * accessibility/AccessibilityRenderObject.h:
690         (AccessibilityRenderObject):
691         * accessibility/AccessibilityScrollView.cpp:
692         (WebCore::AccessibilityScrollView::computeAccessibilityIsIgnored):
693         * accessibility/AccessibilityScrollView.h:
694         (AccessibilityScrollView):
695         * accessibility/AccessibilityScrollbar.h:
696         (WebCore::AccessibilityScrollbar::computeAccessibilityIsIgnored):
697         * accessibility/AccessibilitySlider.cpp:
698         (WebCore::AccessibilitySlider::computeAccessibilityIsIgnored):
699         (WebCore::AccessibilitySliderThumb::computeAccessibilityIsIgnored):
700         * accessibility/AccessibilitySlider.h:
701         (AccessibilitySlider):
702         (AccessibilitySliderThumb):
703         * accessibility/AccessibilitySpinButton.h:
704         (WebCore::AccessibilitySpinButton::computeAccessibilityIsIgnored):
705         (WebCore::AccessibilitySpinButtonPart::computeAccessibilityIsIgnored):
706         * accessibility/AccessibilityTable.cpp:
707         (WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
708         * accessibility/AccessibilityTable.h:
709         (AccessibilityTable):
710         * accessibility/AccessibilityTableCell.cpp:
711         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
712         * accessibility/AccessibilityTableCell.h:
713         (AccessibilityTableCell):
714         * accessibility/AccessibilityTableColumn.cpp:
715         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
716         * accessibility/AccessibilityTableColumn.h:
717         (AccessibilityTableColumn):
718         * accessibility/AccessibilityTableHeaderContainer.cpp:
719         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
720         * accessibility/AccessibilityTableHeaderContainer.h:
721         (AccessibilityTableHeaderContainer):
722         * accessibility/AccessibilityTableRow.cpp:
723         (WebCore::AccessibilityTableRow::computeAccessibilityIsIgnored):
724         * accessibility/AccessibilityTableRow.h:
725         (AccessibilityTableRow):
726
727 2013-02-09  David Farler  <dfarler@apple.com>
728
729         Make TestWebKitAPI work for iOS
730         https://bugs.webkit.org/show_bug.cgi?id=108978
731
732         Reviewed by David Kilzer.
733
734         Tests already exist - refactor only.
735
736         * WebCore.exp.in: Lumped __ZNK7WebCore4KURL7hasPathEv with related methods.
737         * platform/KURL.cpp: Inlined hasPath() into the header
738         * platform/KURL.h: Inlined hasPath() into the header
739
740 2013-02-09  Adam Barth  <abarth@webkit.org>
741
742         Load event fires too early with threaded HTML parser
743         https://bugs.webkit.org/show_bug.cgi?id=108984
744
745         Reviewed by Eric Seidel.
746
747         Previously, the DocumentLoader would always be on the stack when the
748         HTMLDocumentParser was processing data from the network.  The
749         DocumentLoader would then tell isLoadingInAPISense not to fire the load
750         event.  Now that we process data asynchronously with the threaded
751         parser, the DocumentLoader is not always on the stack, which means we
752         need to delay the load event using the clause that asks the parser
753         whether it is processing data.
754
755         Unfortunately, that clause is fragile because we can check for load
756         completion while we're switching parsers between the network-created
757         parser and a script-created parser. To avoid accidentially triggerin
758         the load event during these "gaps," this patch introduces a counter on
759         document to record how many parsers are active on the stack.  While
760         that numer is non-zero, we'll delay the load event. When that number
761         reaches zero, we'll check for load complete.
762
763         That last step is required because the DocumentLoader::finishLoading
764         method is no longer guarunteed to check for load complete after calling
765         finish on the parser because the finish operation might complete
766         asynchronously.
767
768         After this patch, the threaded parser passes all but four fast/parser
769         tests.
770
771         * dom/Document.cpp:
772         (WebCore::Document::Document):
773         (WebCore::Document::hasActiveParser):
774         (WebCore):
775         (WebCore::Document::decrementActiveParserCount):
776         * dom/Document.h:
777         (Document):
778         (WebCore::Document::incrementActiveParserCount):
779         * html/parser/HTMLDocumentParser.cpp:
780         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
781         (WebCore::HTMLDocumentParser::pumpTokenizer):
782         * html/parser/HTMLParserScheduler.cpp:
783         (WebCore::ActiveParserSession::ActiveParserSession):
784         (WebCore):
785         (WebCore::ActiveParserSession::~ActiveParserSession):
786         (WebCore::PumpSession::PumpSession):
787         (WebCore::PumpSession::~PumpSession):
788         * html/parser/HTMLParserScheduler.h:
789         (WebCore):
790         (ActiveParserSession):
791         (PumpSession):
792         * loader/DocumentLoader.cpp:
793         (WebCore::DocumentLoader::isLoadingInAPISense):
794
795 2013-02-09  Mike West  <mkwst@chromium.org>
796
797         Use IGNORE_EXCEPTION for initialized, but unused, ExceptionCodes.
798         https://bugs.webkit.org/show_bug.cgi?id=109295
799
800         Reviewed by Darin Adler.
801
802         The monster patch in http://wkbug.com/108771 missed an entire class of
803         ignored exceptions. It only dealt with call sites that never initialized
804         the ExceptionCode variable, on the assumption that only such call sites
805         would ignore the variable's value.
806
807         That was a flawed assumption: a large number of sites that initialize the
808         ExceptionCode to 0 ignore it regardless. This patch deals with the
809         almost-as-large set of callsites that initialize the variable, pass it to
810         a function, and then never touch it again.
811
812         * Modules/indexeddb/IDBDatabase.cpp:
813         (WebCore::IDBDatabase::forceClose):
814         * accessibility/AccessibilityRenderObject.cpp:
815         (WebCore::AccessibilityRenderObject::ariaSelectedTextRange):
816         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
817         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
818         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
819         (getSelectionOffsetsForObject):
820         * accessibility/atk/WebKitAccessibleUtil.cpp:
821         (selectionBelongsToObject):
822         * dom/Node.cpp:
823         (WebCore::Node::textRects):
824         * editing/DeleteButtonController.cpp:
825         (WebCore::DeleteButtonController::hide):
826         * editing/EditingStyle.cpp:
827         (WebCore::EditingStyle::styleAtSelectionStart):
828         * editing/Editor.cpp:
829         (WebCore::Editor::canDeleteRange):
830         (WebCore::Editor::pasteAsPlainText):
831         (WebCore::Editor::pasteAsFragment):
832         (WebCore::Editor::shouldDeleteRange):
833         (WebCore::Editor::dispatchCPPEvent):
834         (WebCore::Editor::setComposition):
835         (WebCore::Editor::advanceToNextMisspelling):
836         (WebCore::isFrameInRange):
837         * editing/EditorCommand.cpp:
838         (WebCore::expandSelectionToGranularity):
839         * editing/MergeIdenticalElementsCommand.cpp:
840         (WebCore::MergeIdenticalElementsCommand::doApply):
841         * editing/SplitElementCommand.cpp:
842         (WebCore::SplitElementCommand::doUnapply):
843         * editing/SplitTextNodeCommand.cpp:
844         (WebCore::SplitTextNodeCommand::doApply):
845         * editing/TextCheckingHelper.cpp:
846         (WebCore::expandToParagraphBoundary):
847         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
848         (WebCore::TextCheckingHelper::isUngrammatical):
849         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
850         * editing/TextInsertionBaseCommand.cpp:
851         (WebCore::dispatchBeforeTextInsertedEvent):
852         (WebCore::canAppendNewLineFeedToSelection):
853         * editing/TextIterator.cpp:
854         (WebCore::findPlainText):
855         * editing/htmlediting.cpp:
856         (WebCore::extendRangeToWrappingNodes):
857         (WebCore::isNodeVisiblyContainedWithin):
858         * editing/visible_units.cpp:
859         (WebCore::nextBoundary):
860         * html/FileInputType.cpp:
861         (WebCore::FileInputType::createShadowSubtree):
862         * html/HTMLKeygenElement.cpp:
863         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
864         * html/HTMLScriptElement.cpp:
865         (WebCore::HTMLScriptElement::setText):
866         * html/HTMLTitleElement.cpp:
867         (WebCore::HTMLTitleElement::setText):
868         * html/HTMLTrackElement.cpp:
869         (WebCore::HTMLTrackElement::didCompleteLoad):
870         * html/RangeInputType.cpp:
871         (WebCore::RangeInputType::createShadowSubtree):
872         * html/SearchInputType.cpp:
873         (WebCore::SearchInputType::createShadowSubtree):
874         * html/TextFieldInputType.cpp:
875         (WebCore::TextFieldInputType::createShadowSubtree):
876         * html/track/TextTrackList.cpp:
877         (TextTrackList::asyncEventTimerFired):
878         * inspector/DOMPatchSupport.cpp:
879         (WebCore::DOMPatchSupport::patchDocument):
880         * inspector/InspectorDatabaseAgent.cpp:
881         (WebCore):
882         * inspector/InspectorFileSystemAgent.cpp:
883         (WebCore):
884         * page/DOMSelection.cpp:
885         (WebCore::DOMSelection::addRange):
886         * page/DragController.cpp:
887         (WebCore::DragController::dispatchTextInputEventFor):
888         * page/EventHandler.cpp:
889         (WebCore::EventHandler::dispatchMouseEvent):
890         (WebCore::EventHandler::handleTouchEvent):
891         * page/FrameActionScheduler.cpp:
892         (WebCore::EventFrameAction::fire):
893         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
894         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
895         * svg/SVGDocument.cpp:
896         (WebCore::SVGDocument::dispatchZoomEvent):
897         (WebCore::SVGDocument::dispatchScrollEvent):
898         * svg/SVGLength.cpp:
899         (WebCore::SVGLength::SVGLength):
900         (WebCore::SVGLength::value):
901         * xml/parser/XMLDocumentParser.cpp:
902         (WebCore::XMLDocumentParser::exitText):
903         * xml/parser/XMLDocumentParserQt.cpp:
904         (WebCore::XMLDocumentParser::parse):
905         (WebCore::XMLDocumentParser::startDocument):
906         (WebCore::XMLDocumentParser::parseCharacters):
907
908 2013-02-09  Stephen White  <senorblanco@chromium.org>
909
910         [skia] Fix memory management in SkiaImageFilterBuilder and friends.
911         https://bugs.webkit.org/show_bug.cgi?id=109326
912
913         Sadly, skia has no official ref-counted pointers, so we must make do
914         with SkAutoTUnref.
915
916         Reviewed by James Robinson.
917
918         Correctness covered by existing tests in css3/filters.
919
920         * platform/graphics/filters/skia/FEBlendSkia.cpp:
921         (WebCore::FEBlend::createImageFilter):
922         * platform/graphics/filters/skia/FEComponentTransferSkia.cpp:
923         (WebCore::FEComponentTransfer::createImageFilter):
924         * platform/graphics/filters/skia/FELightingSkia.cpp:
925         (WebCore::FELighting::createImageFilter):
926         Adopt refs produced by the build() pass with SkAutoTUnref.
927         * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp:
928         (WebCore::SkiaImageFilterBuilder::~SkiaImageFilterBuilder):
929         Unref the builder's hashmap effect pointers.
930         (WebCore::SkiaImageFilterBuilder::build):
931         Ref the pointer returned to the caller, and use SkAutoTUnref
932         internally while building the tree.
933         * platform/graphics/filters/skia/SkiaImageFilterBuilder.h:
934         (SkiaImageFilterBuilder):
935         Add a destructor to SkiaImageFilterBuilder.
936
937
938 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
939
940         AX: Rename AXObject::cachedIsIgnoredValue to lastKnownIsIgnoredValue
941         https://bugs.webkit.org/show_bug.cgi?id=108238
942
943         Reviewed by Chris Fleizach.
944
945         Simple refactoring, no new tests.
946
947         * accessibility/AXObjectCache.cpp:
948         (WebCore::AXObjectCache::getOrCreate):
949         (WebCore::AXObjectCache::childrenChanged):
950         * accessibility/AccessibilityObject.cpp:
951         (WebCore::AccessibilityObject::AccessibilityObject):
952         (WebCore::AccessibilityObject::lastKnownIsIgnoredValue):
953         (WebCore::AccessibilityObject::setLastKnownIsIgnoredValue):
954         (WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
955         * accessibility/AccessibilityObject.h:
956         (AccessibilityObject):
957
958 2013-02-09  Anton Vayvod  <avayvod@chromium.org>
959  
960         [Text Autosizing] Cleanup change: converter the pointer argument to be a reference since
961         non-null pointer is always expected.
962         https://bugs.webkit.org/show_bug.cgi?id=109079
963  
964         Reviewed by Kenneth Rohde Christiansen.
965  
966         Cleanup change, no need to add new tests or modify the existing ones.
967  
968         * rendering/TextAutosizer.cpp:
969  
970         Changed parameter from a pointer to a reference in the methods below.
971  
972         (WebCore::TextAutosizer::processSubtree):
973         (WebCore::TextAutosizer::processCluster):
974         (WebCore::TextAutosizer::processContainer):
975         (WebCore::TextAutosizer::isNarrowDescendant):
976         (WebCore::TextAutosizer::isWiderDescendant):
977         (WebCore::TextAutosizer::isAutosizingCluster):
978         (WebCore::TextAutosizer::clusterShouldBeAutosized):
979         (WebCore::TextAutosizer::measureDescendantTextWidth):
980  
981         * rendering/TextAutosizer.h: updated method prototypes.
982
983 2013-02-09  Rafael Brandao  <rafael.lobo@openbossa.org>
984
985         [TexMap] Separate classes per file in TextureMapperBackingStore.h
986         https://bugs.webkit.org/show_bug.cgi?id=109333
987
988         Reviewed by Noam Rosenthal.
989
990         TextureMapperBackingStore.h had the classes TextureMapperBackingStore,
991         TextureMapperTiledBackingStore, TextureMapperSurfaceBackingStore and
992         TextureMapperTile which was quite confusing. Now each one has its
993         own header and its own source file.
994
995         No new tests needed, refactoring only.
996
997         * CMakeLists.txt:
998         * GNUmakefile.list.am:
999         * Target.pri:
1000         * WebCore.gypi:
1001         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1002         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
1003         * platform/graphics/texmap/TextureMapperBackingStore.h:
1004         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Added.
1005         (WebCore):
1006         (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
1007         (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
1008         (WebCore::TextureMapperSurfaceBackingStore::texture):
1009         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
1010         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Added.
1011         (WebCore):
1012         (TextureMapperSurfaceBackingStore):
1013         (WebCore::TextureMapperSurfaceBackingStore::create):
1014         (WebCore::TextureMapperSurfaceBackingStore::~TextureMapperSurfaceBackingStore):
1015         (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore):
1016         * platform/graphics/texmap/TextureMapperTile.cpp: Added.
1017         (WebCore):
1018         (WebCore::TextureMapperTile::updateContents):
1019         (WebCore::TextureMapperTile::paint):
1020         * platform/graphics/texmap/TextureMapperTile.h: Added.
1021         (WebCore):
1022         (TextureMapperTile):
1023         (WebCore::TextureMapperTile::texture):
1024         (WebCore::TextureMapperTile::rect):
1025         (WebCore::TextureMapperTile::setTexture):
1026         (WebCore::TextureMapperTile::setRect):
1027         (WebCore::TextureMapperTile::~TextureMapperTile):
1028         (WebCore::TextureMapperTile::TextureMapperTile):
1029         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp: Copied from Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp.
1030         (WebCore):
1031         (WebCore::TextureMapperTiledBackingStore::TextureMapperTiledBackingStore):
1032         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
1033         (WebCore::TextureMapperTiledBackingStore::adjustedTransformForRect):
1034         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
1035         (WebCore::TextureMapperTiledBackingStore::drawBorder):
1036         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
1037         (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
1038         (WebCore::TextureMapperTiledBackingStore::updateContents):
1039         (WebCore::TextureMapperTiledBackingStore::texture):
1040         * platform/graphics/texmap/TextureMapperTiledBackingStore.h: Added.
1041         (WebCore):
1042         (TextureMapperTiledBackingStore):
1043         (WebCore::TextureMapperTiledBackingStore::create):
1044         (WebCore::TextureMapperTiledBackingStore::~TextureMapperTiledBackingStore):
1045         (WebCore::TextureMapperTiledBackingStore::setContentsToImage):
1046         (WebCore::TextureMapperTiledBackingStore::rect):
1047         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
1048         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1049
1050 2013-02-09  Philip Rogers  <pdr@google.com>
1051
1052         Sanitize m_keyTimes for paced value animations
1053         https://bugs.webkit.org/show_bug.cgi?id=108828
1054
1055         Reviewed by Dirk Schulze.
1056
1057         SVG animations with calcMode=paced calculate new m_keyTimes in
1058         SVGAnimationElement::calculateKeyTimesForCalcModePaced() because paced animations do not
1059         specify keyTimes. If an error occurs while calculating m_keyTimes, and there exists
1060         user-specified values, a crash could occur because the user-specified values were not
1061         sanitized.
1062
1063         This change clears user-specified keyTimes before calculating new ones.
1064
1065         Test: svg/animations/animate-keytimes-crash.html
1066
1067         * svg/SVGAnimationElement.cpp:
1068         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
1069
1070 2013-02-09  Eric Seidel  <eric@webkit.org>
1071
1072         Fix TextDocumentParser to play nice with threading
1073         https://bugs.webkit.org/show_bug.cgi?id=109240
1074
1075         Reviewed by Adam Barth.
1076
1077         Before the HTML5 parser re-write the text document parser
1078         was completely custom.  With the HTML5 parser, we just made
1079         the TextDocumentParser use the HTMLDocumentParser with an
1080         artificial script tag.
1081
1082         However, our solution was slightly over-engineered to avoid
1083         lying about the column numbers of the first line of the text document
1084         during parsing. :)
1085
1086         This change makes us use a simpler (and threading-compatible)
1087         solution by just inserting a real "<pre>" tag into the
1088         input stream instead of hacking one together with the treebuilder
1089         and manually setting the Tokenizer state.
1090
1091         fast/parser/empty-text-resource.html covers this case.
1092
1093         * html/parser/TextDocumentParser.cpp:
1094         (WebCore::TextDocumentParser::TextDocumentParser):
1095         (WebCore::TextDocumentParser::insertFakePreElement):
1096
1097 2013-02-09  Kent Tamura  <tkent@chromium.org>
1098
1099         Add missing copyright header
1100         https://bugs.webkit.org/show_bug.cgi?id=107507
1101
1102         * Resources/pagepopups/chromium/calendarPickerChromium.css:
1103         * Resources/pagepopups/chromium/pickerCommonChromium.css:
1104
1105 2013-02-09  Kent Tamura  <tkent@chromium.org>
1106
1107         Fix crash by img[ismap] with content property
1108         https://bugs.webkit.org/show_bug.cgi?id=108702
1109
1110         Reviewed by Adam Barth.
1111
1112         Test: fast/dom/HTMLAnchorElement/anchor-ismap-crash.html
1113
1114         * html/HTMLAnchorElement.cpp:
1115         (WebCore::appendServerMapMousePosition):
1116         Check if the renderer of an img element is RenderImage.
1117
1118 2013-02-09  Mike West  <mkwst@chromium.org>
1119
1120         Drop ExceptionCode from IDB's directionToString and modeToString.
1121         https://bugs.webkit.org/show_bug.cgi?id=109143
1122
1123         Reviewed by Jochen Eisinger.
1124
1125         No caller of either IDBCursor::directionToString or
1126         IDBTransaction::modeToString makes use of the ExceptionCode these
1127         methods require. This patch removes the 'ExceptionCode&' parameter from
1128         both methods and their callsites.
1129
1130         * Modules/indexeddb/IDBCursor.cpp:
1131         (WebCore::IDBCursor::direction):
1132         (WebCore::IDBCursor::directionToString):
1133             Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
1134             exception previously generated with ASSERT_NOT_REACHED.
1135         * Modules/indexeddb/IDBCursor.h:
1136         * Modules/indexeddb/IDBTransaction.cpp:
1137         (WebCore::IDBTransaction::mode):
1138         (WebCore::IDBTransaction::modeToString):
1139             Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
1140             exception previously generated with ASSERT_NOT_REACHED.
1141         * Modules/indexeddb/IDBTransaction.h:
1142
1143 2013-02-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1144
1145         [EFL][Qt][WebGL] Share the common code between GraphicsSurfaceGLX and X11WindowResources.
1146         https://bugs.webkit.org/show_bug.cgi?id=106666
1147
1148         Reviewed by Kenneth Rohde Christiansen.
1149
1150         Covered by existing WebGL tests.
1151
1152         This patch removes any duplicate code in X11WindowResources and
1153         GraphicsSurfaceGLX. No new functionality is added.
1154
1155         * PlatformEfl.cmake:
1156         * Target.pri:
1157         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
1158         (WebCore::EGLConfigSelector::pixmapContextConfig):
1159         * platform/graphics/surfaces/egl/EGLConfigSelector.h:
1160         (EGLConfigSelector):
1161         * platform/graphics/surfaces/egl/EGLSurface.cpp:
1162         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
1163         (WebCore::EGLWindowTransportSurface::destroy):
1164         (WebCore::EGLWindowTransportSurface::setGeometry):
1165         * platform/graphics/surfaces/egl/EGLSurface.h:
1166         (WebCore):
1167         (EGLWindowTransportSurface):
1168         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
1169         (WebCore::GLXConfigSelector::GLXConfigSelector):
1170         (WebCore::GLXConfigSelector::visualInfo):
1171         (WebCore::GLXConfigSelector::pBufferContextConfig):
1172         (WebCore::GLXConfigSelector::createSurfaceConfig):
1173         (GLXConfigSelector):
1174         * platform/graphics/surfaces/glx/GLXContext.cpp:
1175         (WebCore::initializeARBExtensions):
1176         (WebCore::GLXOffScreenContext::GLXOffScreenContext):
1177         (WebCore::GLXOffScreenContext::initialize):
1178         (WebCore::GLXOffScreenContext::platformReleaseCurrent):
1179         (WebCore::GLXOffScreenContext::freeResources):
1180         * platform/graphics/surfaces/glx/GLXContext.h:
1181         (GLXOffScreenContext):
1182         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1183         (WebCore::GLXTransportSurface::GLXTransportSurface):
1184         (WebCore::GLXTransportSurface::setGeometry):
1185         (WebCore::GLXTransportSurface::destroy):
1186         (WebCore::GLXPBuffer::initialize):
1187         * platform/graphics/surfaces/glx/GLXSurface.h:
1188         (GLXTransportSurface):
1189         (GLXPBuffer):
1190         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1191         (WebCore):
1192         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1193         (WebCore::GraphicsSurfacePrivate::initialize):
1194         (GraphicsSurfacePrivate):
1195         (WebCore::GraphicsSurfacePrivate::createSurface):
1196         (WebCore::GraphicsSurfacePrivate::createPixmap):
1197         (WebCore::GraphicsSurfacePrivate::display):
1198         (WebCore::GraphicsSurfacePrivate::flags):
1199         (WebCore::GraphicsSurfacePrivate::clear):
1200         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1201         No new functionality added. Made changes to take the common code into use.
1202
1203         * platform/graphics/surfaces/glx/X11WindowResources.h: Removed.
1204         * platform/graphics/surfaces/glx/X11Helper.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.cpp.
1205         (WebCore):
1206         (WebCore::DisplayConnection::DisplayConnection):
1207         (DisplayConnection):
1208         (WebCore::DisplayConnection::~DisplayConnection):
1209         (WebCore::DisplayConnection::display):
1210         (OffScreenRootWindow):
1211         (WebCore::OffScreenRootWindow::OffScreenRootWindow):
1212         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
1213         (WebCore::OffScreenRootWindow::rootWindow):
1214         (WebCore::X11Helper::resizeWindow):
1215         (WebCore::X11Helper::createOffScreenWindow):
1216         (WebCore::X11Helper::destroyWindow):
1217         (WebCore::X11Helper::isXRenderExtensionSupported):
1218         (WebCore::X11Helper::nativeDisplay):
1219         (WebCore::X11Helper::offscreenRootWindow):
1220         * platform/graphics/surfaces/glx/X11Helper.h: Added.
1221         (WebCore):
1222         (WebCore::handleXPixmapCreationError):
1223         (X11Helper):
1224         (ScopedXPixmapCreationErrorHandler):
1225         (WebCore::ScopedXPixmapCreationErrorHandler::ScopedXPixmapCreationErrorHandler):
1226         (WebCore::ScopedXPixmapCreationErrorHandler::~ScopedXPixmapCreationErrorHandler):
1227         (WebCore::ScopedXPixmapCreationErrorHandler::isValidOperation):
1228         Moved common code from GraphicsSurfaceGLX to X11Helper.
1229
1230 2013-02-09  Andrey Lushnikov  <lushnikov@chromium.org>
1231
1232         Web Inspector: show whitespace characters in DTE
1233         https://bugs.webkit.org/show_bug.cgi?id=108947
1234
1235         Reviewed by Pavel Feldman.
1236
1237         New test: inspector/editor/text-editor-show-whitespaces.html
1238
1239         Split consecutive whitespace characters into groups of 16, 8, 4, 2 and 1 and
1240         add ::before pseudoclass for this groups which contains necessary
1241         amount of "dots" (u+00b7). Add a setting "Show whitespace" for this
1242         option in "Sources" section of "General" tab.
1243
1244         * English.lproj/localizedStrings.js:
1245         * inspector/front-end/DefaultTextEditor.js:
1246         (WebInspector.TextEditorMainPanel.prototype.wasShown):
1247         (WebInspector.TextEditorMainPanel.prototype.willHide):
1248         (WebInspector.TextEditorMainPanel.prototype._renderRanges):
1249         (WebInspector.TextEditorMainPanel.prototype._renderWhitespaceCharsWithFixedSizeSpans):
1250         (WebInspector.TextEditorMainPanel.prototype._paintLine):
1251         * inspector/front-end/Settings.js:
1252         * inspector/front-end/SettingsScreen.js:
1253         (WebInspector.GenericSettingsTab):
1254         * inspector/front-end/inspectorSyntaxHighlight.css:
1255         (.webkit-whitespace-1::before):
1256         (.webkit-whitespace-2::before):
1257         (.webkit-whitespace-4::before):
1258         (.webkit-whitespace-8::before):
1259         (.webkit-whitespace-16::before):
1260         (.webkit-whitespace::before):
1261
1262 2013-02-08  Eric Carlson  <eric.carlson@apple.com>
1263
1264         [Mac] respect in-band caption color
1265         https://bugs.webkit.org/show_bug.cgi?id=109203
1266
1267         Reviewed by Dean Jackson.
1268
1269         Test: media/track/track-in-band-style.html
1270
1271         * WebCore.xcodeproj/project.pbxproj: Add HTMLDivElement.h to private headers because it is 
1272             included by HTMLTextElement, which is included by HTMLMediaElement.h, which is included 
1273             by files in WebKit/WebKit2.
1274         * html/track/InbandTextTrack.cpp:
1275         (WebCore::InbandTextTrack::addGenericCue): Set cue colors if necessary.
1276
1277         * html/track/TextTrackCue.h:
1278         (WebCore::TextTrackCue::element): New, accessor for the cue element so it can be styled.
1279
1280         * html/track/TextTrackCueGeneric.cpp:
1281         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set container and cue background 
1282             color if necessary.
1283         (WebCore::TextTrackCueGeneric::operator==): Compare cue colors.
1284         * html/track/TextTrackCueGeneric.h:
1285         (WebCore::TextTrackCueGeneric::foregroundColor): Add color accessors.
1286         (WebCore::TextTrackCueGeneric::setForegroundColor):
1287         (WebCore::TextTrackCueGeneric::backgroundColor):
1288         (WebCore::TextTrackCueGeneric::setBackgroundColor):
1289
1290         * page/CaptionUserPreferencesMac.mm:
1291         (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Always
1292             regenerate override CSS when an element registers for callbacks.
1293         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Drive by fix of "window color" padding.
1294         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Log the stylesheet generated
1295             for easier debugging.
1296
1297         * platform/graphics/InbandTextTrackPrivateClient.h:
1298         (WebCore::GenericCueData::foregroundColor): Add color getters/setters.
1299         (WebCore::GenericCueData::setForegroundColor):
1300         (WebCore::GenericCueData::backgroundColor):
1301         (WebCore::GenericCueData::setBackgroundColor):
1302
1303         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1304         (WebCore::makeRGBA32FromARGBCFArray): Initialize a RGBA32 from a CFArray of color values.
1305         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process cue colors.
1306
1307 2013-02-08  Benjamin Poulain  <bpoulain@apple.com>
1308
1309         Move workerThreadCount from TestRunner to WebCore Internals
1310         https://bugs.webkit.org/show_bug.cgi?id=109239
1311
1312         Reviewed by Darin Adler.
1313
1314         Add the new read-only property workerThreadCount.
1315
1316         * testing/Internals.cpp:
1317         (WebCore::Internals::workerThreadCount):
1318         (WebCore):
1319         * testing/Internals.h:
1320         (Internals):
1321         * testing/Internals.idl:
1322
1323 2013-02-08  Dean Jackson  <dino@apple.com>
1324
1325         Snapshotted plug-in should use shadow root
1326         https://bugs.webkit.org/show_bug.cgi?id=108284
1327
1328         Reviewed by Simon Fraser.
1329
1330         Take two! This time with updated exports file.
1331
1332         A snapshotted plugin needs to indicate to the user that it can be clicked
1333         to be restarted. Previously this was done with an image that had embedded
1334         text. Instead, we now use an internal shadow root to embed some markup that
1335         will display instructions that can be localised.
1336
1337         The UA stylesheet for plug-ins provides a default styling for the label, which
1338         can be overridden by ports.
1339
1340         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
1341         since it is only responsible for drawing a paused plug-in. The snapshot creation
1342         can work with the default renderer, but a shadow root requires something like
1343         RenderBlock in order to draw its children. We swap from one renderer to another when
1344         necessary either by creating the shadow root or by explicitly detaching and attaching
1345         the plugin element.
1346
1347         Unfortunately this is difficult to test, because the snapshotting requires
1348         time to execute, and also a PluginView to be instantiated.
1349
1350         * WebCore.exp.in: Export the InlineBox interface.
1351
1352         * css/plugIns.css:
1353         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
1354
1355         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
1356         * platform/LocalizedStrings.h:
1357         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1358         * platform/chromium/LocalizedStringsChromium.cpp:
1359         * platform/efl/LocalizedStringsEfl.cpp:
1360         * platform/gtk/LocalizedStringsGtk.cpp:
1361         * platform/qt/LocalizedStringsQt.cpp:
1362
1363         * html/HTMLPlugInElement.cpp:
1364         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
1365         that RenderSnapshottedPlugIn no longer is an embedded object.
1366
1367         * html/HTMLPlugInImageElement.cpp:
1368         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
1369         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
1370         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
1371         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
1372             a renderer, otherwise use the typical plug-in path.
1373         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
1374             need to give it to the renderer.
1375         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
1376         * html/HTMLPlugInImageElement.h:
1377         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
1378             should show immediately.
1379         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
1380             to swap to the Shadow Root.
1381         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
1382             in being recreated. Make sure we reattach so that a plugin renderer will be created.
1383         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
1384             displayState for snapshots.
1385         * html/HTMLPlugInImageElement.h:
1386         (HTMLPlugInImageElement): The new methods listed above.
1387         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
1388             a snapshot should be immediately labeled.
1389
1390         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
1391
1392         * rendering/RenderSnapshottedPlugIn.cpp:
1393         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
1394         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
1395         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
1396         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
1397         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
1398         (WebCore::RenderSnapshottedPlugIn::getCursor):
1399         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
1400         * rendering/RenderSnapshottedPlugIn.h:
1401         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
1402
1403 2013-02-08  Dean Jackson  <dino@apple.com>
1404
1405         Rolling out r142333 and r142337 which broke Mac Release builds.
1406
1407 2013-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1408
1409         Unreviewed, rolling out r142337.
1410         http://trac.webkit.org/changeset/142337
1411         https://bugs.webkit.org/show_bug.cgi?id=109339
1412
1413         Breaking Mac release builds (Requested by dino_ on #webkit).
1414
1415         * rendering/RenderSnapshottedPlugIn.h:
1416
1417 2013-02-08  Dean Jackson  <dino@apple.com>
1418
1419         Attempted Mac and GTK build fix after r142333.
1420
1421         * rendering/RenderSnapshottedPlugIn.h: Include InlineBox.h.
1422
1423 2013-02-08  Andy Estes  <aestes@apple.com>
1424
1425         Restore pre-r118852 behavior for EllipsisBox::nodeAtPoint()
1426         https://bugs.webkit.org/show_bug.cgi?id=109277
1427
1428         Reviewed by Simon Fraser.
1429
1430         Test: fast/flexbox/line-clamp-link-after-ellipsis.html
1431
1432         Roll out r118852. Enough time has passed that this can't be done
1433         mechanically, so transcribe the old method definition to current
1434         WebCore interfaces.
1435
1436         * rendering/EllipsisBox.cpp:
1437         (WebCore::EllipsisBox::markupBox): EllipsisBox no longer has
1438         m_markupBox, so break the logic for finding the markup box from
1439         paintMarkupBox() into its own function.
1440         (WebCore::EllipsisBox::paintMarkupBox): Call markupBox().
1441         (WebCore::EllipsisBox::nodeAtPoint): Transcribe the pre-r118852 implementation.
1442         * rendering/EllipsisBox.h:
1443         (EllipsisBox): Declare markupBox().
1444
1445 2013-02-08  Eric Carlson  <eric.carlson@apple.com>
1446
1447         [Mac] In-band closed caption tracks are not always initialized correctly
1448         https://bugs.webkit.org/show_bug.cgi?id=109323
1449
1450         Reviewed by Dean Jackson.
1451
1452         No new tests, this fix makes existing tests less flakey.
1453
1454         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1455         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Create and configure legible output
1456             here instad of in tracksChanged.
1457         (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Do nothing in a build with
1458             in-band track support.
1459         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Move legible output creation to 
1460             createAVPlayerItem, don't set look at track media type to see if the movie has captions 
1461             when we have support for in-band captions.
1462
1463 2013-02-08  Dean Jackson  <dino@apple.com>
1464
1465         Snapshotted plug-in should use shadow root
1466         https://bugs.webkit.org/show_bug.cgi?id=108284
1467
1468         Reviewed by Simon Fraser.
1469
1470         A snapshotted plugin needs to indicate to the user that it can be clicked
1471         to be restarted. Previously this was done with an image that had embedded
1472         text. Instead, we now use an internal shadow root to embed some markup that
1473         will display instructions that can be localised.
1474
1475         The UA stylesheet for plug-ins provides a default styling for the label, which
1476         can be overridden by ports.
1477
1478         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
1479         since it is only responsible for drawing a paused plug-in. The snapshot creation
1480         can work with the default renderer, but a shadow root requires something like
1481         RenderBlock in order to draw its children. We swap from one renderer to another when
1482         necessary either by creating the shadow root or by explicitly detaching and attaching
1483         the plugin element.
1484
1485         Unfortunately this is difficult to test, because the snapshotting requires
1486         time to execute, and also a PluginView to be instantiated.
1487
1488         * css/plugIns.css:
1489         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
1490
1491         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
1492         * platform/LocalizedStrings.h:
1493         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1494         * platform/chromium/LocalizedStringsChromium.cpp:
1495         * platform/efl/LocalizedStringsEfl.cpp:
1496         * platform/gtk/LocalizedStringsGtk.cpp:
1497         * platform/qt/LocalizedStringsQt.cpp:
1498
1499         * html/HTMLPlugInElement.cpp:
1500         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
1501         that RenderSnapshottedPlugIn no longer is an embedded object.
1502
1503         * html/HTMLPlugInImageElement.cpp:
1504         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
1505         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
1506         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
1507         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
1508             a renderer, otherwise use the typical plug-in path.
1509         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
1510             need to give it to the renderer.
1511         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
1512         * html/HTMLPlugInImageElement.h:
1513         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
1514             should show immediately.
1515         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
1516             to swap to the Shadow Root.
1517         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
1518             in being recreated. Make sure we reattach so that a plugin renderer will be created.
1519         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
1520             displayState for snapshots.
1521         * html/HTMLPlugInImageElement.h:
1522         (HTMLPlugInImageElement): The new methods listed above.
1523         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
1524             a snapshot should be immediately labeled.
1525
1526         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
1527
1528         * rendering/RenderSnapshottedPlugIn.cpp:
1529         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
1530         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
1531         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
1532         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
1533         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
1534         (WebCore::RenderSnapshottedPlugIn::getCursor):
1535         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
1536         * rendering/RenderSnapshottedPlugIn.h:
1537         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
1538
1539 2013-02-08  Kentaro Hara  <haraken@chromium.org>
1540
1541         {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator should be in FocusEvent.cpp
1542         https://bugs.webkit.org/show_bug.cgi?id=109265
1543
1544         Reviewed by Dimitri Glazkov.
1545
1546         Conventionally we put XXXEventDispatchMediator to XXXEvent.cpp.
1547         We should move {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator to FocusEvent.cpp.
1548
1549         No tests. No change in behavior.
1550
1551         * dom/EventDispatchMediator.cpp:
1552         * dom/EventDispatchMediator.h:
1553         * dom/FocusEvent.cpp:
1554         (WebCore::FocusEventDispatchMediator::create):
1555         (WebCore):
1556         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
1557         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1558         (WebCore::BlurEventDispatchMediator::create):
1559         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
1560         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1561         (WebCore::FocusInEventDispatchMediator::create):
1562         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
1563         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1564         (WebCore::FocusOutEventDispatchMediator::create):
1565         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
1566         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1567         * dom/FocusEvent.h:
1568         (WebCore):
1569         (FocusEventDispatchMediator):
1570         (BlurEventDispatchMediator):
1571         (FocusInEventDispatchMediator):
1572         (FocusOutEventDispatchMediator):
1573         * dom/UIEvent.cpp:
1574         * dom/UIEvent.h:
1575
1576 2013-02-08  Jer Noble  <jer.noble@apple.com>
1577
1578         Unreviewed build fix. MSVC (and other compilers) need a default: case in switch statement.
1579
1580         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1581         (WebCore::notificationName):
1582
1583 2013-02-08  Jer Noble  <jer.noble@apple.com>
1584
1585         Bring WebKit up to speed with latest Encrypted Media spec.
1586         https://bugs.webkit.org/show_bug.cgi?id=97037
1587
1588         Reviewed by Eric Carlson.
1589
1590         The most recent version of the Encrypted Media Extensions spec breaks functionality out of the
1591         HTMLMediaElement and into new MediaKeys and MediaKeySession classes. Since the CDM functionality
1592         has been pulled out of the media element, we create a proxy CDM class and factory system for
1593         creating specific CDM key system implementations. The spec also breaks out MediaKeyEvent
1594         into distinct event classes, MediaKeyNeededEvent and MediaKeyMessageEvent, for needkey and
1595         keymessage events, respectively.
1596
1597         Tests: media/encrypted-media/encrypted-media-v2-events.html
1598                media/encrypted-media/encrypted-media-v2-syntax.html
1599
1600         CDM is a proxy class (a la MediaPlayer) for a specific CDMPrivateInterface implementation. A CDM
1601         implementation is registered with the CDMFactory and will be created if that implementation supports
1602         the key system passed into the MediaKeys constructor. CDMSession is a pure-virtual interface exposed
1603         by concrete CDMPrivate subclasses.  Its lifetime is owned by MediaKeySession.
1604         * Modules/encryptedmedia/CDM.cpp: Added.
1605         (WebCore::installedCDMFactories): Initialize all the known CDM subtypes. Ports will add CDM implementations here.
1606         (WebCore::CDM::registerCDMFactory): Registers a new CDMFactory using the passed in function pointers.
1607         (WebCore::CDMFactoryForKeySystem): Return the first CDM factory which supports the requested key system.
1608         (WebCore::CDM::supportsKeySystem): Walk the installed CDMs and ask if the given key system is supported.
1609         (WebCore::CDM::supportsKeySystemMIMETypeAndCodec): Ditto, with an additional MIME type and codec string.
1610         (WebCore::CDM::create): Simple constructor wrapper.
1611         (WebCore::CDM::CDM): Simple constructor; calls bestCDMForKeySystem() to create it's private implementation.
1612         (WebCore::CDM::~CDM): Simple destructor.
1613         (WebCore::CDM::createSession): Creates a new CDMSession.
1614         * Modules/encryptedmedia/CDM.h: Added.
1615         (WebCore::CDM::keySystem): Simple accessor for m_keySystem.
1616         (WebCore::CDMSession::CDMSession): Simple constructor.
1617         (WebCore::CDMSession::~CDMSession): Simple destructor.
1618         * Modules/encryptedmedia/CDMPrivate.h: Added.
1619         (WebCore::CDMPrivateInterface::CDMPrivateInterface): Simple constructor.
1620         (WebCore::CDMPrivateInterface::~CDMPrivateInterface): Simple destructor.
1621
1622         The new classes, MediaKeyMessageEvent and MediaKeyNeededEvent, take distinct subsets of the initializers of
1623         the original MediaKeyMessageEvent.
1624         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.cpp.
1625         (WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit): Initializer now only takes message and destinationURL
1626             parameters.
1627         (WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent): Simple constructor.
1628         (WebCore::MediaKeyMessageEvent::~MediaKeyMessageEvent): Simple destructor.
1629         (WebCore::MediaKeyMessageEvent::interfaceName): Standard interfaceName.
1630         * Modules/encryptedmedia/MediaKeyMessageEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
1631         (WebCore::MediaKeyMessageEvent::create): Simple construction wrapper.
1632         (WebCore::MediaKeyMessageEvent::message): Simple accessor for m_message.
1633         (WebCore::MediaKeyMessageEvent::destinationURL): Simple accessor for m_destinationURL.
1634         * Modules/encryptedmedia/MediaKeyMessageEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
1635         * Modules/encryptedmedia/MediaKeyNeededEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.h.
1636         (WebCore::MediaKeyNeededEventInit::MediaKeyNeededEventInit): Initializer now only takes initData parameter.
1637         (WebCore::MediaKeyNeededEvent::MediaKeyNeededEvent): Simple constructor.
1638         (WebCore::MediaKeyNeededEvent::~MediaKeyNeededEvent): Simple destructor.
1639         (WebCore::MediaKeyNeededEvent::interfaceName): Standard interfaceName.
1640         * Modules/encryptedmedia/MediaKeyNeededEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
1641         (WebCore::MediaKeyNeededEvent::create): Simple construction wrapper.
1642         (WebCore::MediaKeyNeededEvent::initData): Simple accessor for m_initData.
1643         * Modules/encryptedmedia/MediaKeyNeededEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
1644
1645         MediaKeySession is a new class that maps keys and key requests to a given session ID:
1646         * Modules/encryptedmedia/MediaKeySession.cpp: Added.
1647         (WebCore::MediaKeySession::create): Simple construction wrapper.
1648         (WebCore::MediaKeySession::MediaKeySession): Simple constructor.
1649         (WebCore::MediaKeySession::~MediaKeySession): Simple destructor; calls close().
1650         (WebCore::MediaKeySession::setError): Simple setter for m_error;
1651         (WebCore::MediaKeySession::close): Tell the CDM to clear any saved session keys.
1652         (WebCore::MediaKeySession::generateKeyRequest): Start a one-shot timer, handled in keyRequestTimerFired.
1653         (WebCore::MediaKeySession::keyRequestTimerFired): Follow the steps in the spec; ask the CDM to generate a key request.
1654         (WebCore::MediaKeySession::addKey): Start a one-shot timer, handled in addKeyTimerFired.
1655         (WebCore::MediaKeySession::addKeyTimerFired): Follow the steps in the spec; provide the key data to the CDM.
1656         * Modules/encryptedmedia/MediaKeySession.h: Added.
1657         (WebCore::MediaKeySession::keySystem): Simple accessor for m_keySystem.
1658         (WebCore::MediaKeySession::sessionId): Simple accessor for m_sessionId.
1659         (WebCore::MediaKeySession::error): Simple accessor for m_error;
1660         * Modules/encryptedmedia/MediaKeySession.idl:
1661
1662         MediaKeySession inherits from EventTarget, and must override the pure virtual functions in that class:
1663         * Modules/encryptedmedia/MediaKeySession.cpp: Added.
1664         (WebCore::MediaKeySession::interfaceName):
1665         * Modules/encryptedmedia/MediaKeySession.h: Added.
1666         (WebCore::MediaKeySession::refEventTarget):
1667         (WebCore::MediaKeySession::derefEventTarget):
1668         (WebCore::MediaKeySession::eventTargetData):
1669         (WebCore::MediaKeySession::ensureEventTargetData):
1670         (WebCore::MediaKeySession::scriptExecutionContext):
1671
1672         MediaKeys is a new class that encapsulates a CDM and a number of key sessions:
1673         * Modules/encryptedmedia/MediaKeys.cpp: Added.
1674         (WebCore::MediaKeys::create): Throw an exception if the key system parameter is unsupported; create a CDM object
1675             and a new MediaKeys session.
1676         (WebCore::MediaKeys::MediaKeys): Simple constructor.
1677         (WebCore::MediaKeys::~MediaKeys): Simple destructor.
1678         (WebCore::MediaKeys::createSession): Follow the spec and create a new key session.
1679         * Modules/encryptedmedia/MediaKeys.h: Added.
1680         * Modules/encryptedmedia/MediaKeys.idl: Copied from Source/WebCore/html/MediaError.idl.
1681
1682         Provide a new interface to HTMLMediaElement for MediaPlayer which does not require a sessionId or a key system:
1683         * html/HTMLMediaElement.cpp:
1684         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
1685         * platform/graphics/MediaPlayer.cpp:
1686         (WebCore::MediaPlayer::keyNeeded):
1687
1688         MediaKeyError now has a systemCode parameter and member variable.
1689         * html/MediaKeyError.h:
1690         (WebCore::MediaKeyError::create): Take a systemCode parameter with a default (0) value.
1691         (WebCore::MediaKeyError::MediaKeyError): Ditto.
1692         (WebCore::MediaKeyError::systemCode): Simple accessor for m_systemCode.
1693         * html/MediaKeyError.idl:
1694
1695         Add new methods to HTMLMediaElement to support MediaKeys. Support different initializer
1696         for the MediaKeyNeededEvent.
1697         * html/HTMLMediaElement.cpp:
1698         (WebCore::HTMLMediaElement::setMediaKeys): Simple setter for m_mediaKeys.
1699         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): This version takes fewer parameters
1700             than the deprecated version.
1701         * html/HTMLMediaElement.h:
1702         (WebCore::HTMLMediaElement::mediaKeys): Simple accessor for m_mediaKeys.
1703         * html/HTMLMediaElement.idl: Add the mediaKeys attribute.
1704
1705         Add an ENABLE(ENCRYPTED_MEDIA_V2) check to the existing ENABLE(ENCRYPTED_MEDIA) one:
1706         * html/MediaError.h:
1707         * html/MediaError.idl:
1708         * platform/graphics/MediaPlayer.cpp:
1709         (WebCore::bestMediaEngineForTypeAndCodecs):
1710         (WebCore::MediaPlayer::supportsType):
1711         * platform/graphics/MediaPlayer.h:
1712         (WebCore::MediaPlayer::keyNeeded): This version takes fewer parameters than the
1713             deprecated version.
1714
1715         Support the new version of canPlayType which takes an extra parameter:
1716         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1717         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1718         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
1719         (WebCore::MediaPlayerPrivateAVFoundationObjC::extendedSupportsType):
1720         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1721         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1722         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
1723         (WebCore::MediaPlayerPrivateQTKit::extendedSupportsType):
1724
1725         Add a mock CDM for use within DRT and WKTR to test the MediaKeys and MediaKeySession
1726         APIs and events:
1727         * testing/Internals.cpp:
1728         (WebCore::Internals::initializeMockCDM): Add the MockCDM class to the CDM factories.
1729         * testing/Internals.h:
1730         * testing/Internals.idl: Add the initializeMockCDM() method.
1731         * testing/MockCDM.cpp: Added.
1732         (WebCore::MockCDM::supportsKeySystem): Only supports the 'com.webcore.mock' key system.
1733         (WebCore::MockCDM::supportsMIMEType): Only supports the 'video/mock' mime type.
1734         (WebCore::initDataPrefix): Static method which returns a Uint8Array containing 'mock'.
1735         (WebCore::keyPrefix): Static method which returns a Uint8Array containing 'key'.
1736         (WebCore::keyRequest): Static method which returns a Uint8Array containing 'request'.
1737         (WebCore::generateSessionId): Return a monotonically increasing number.
1738         (WebCore::MockCDMSession::MockCDMSession): Simple constructor.
1739         (WebCore::MockCDMSession::generateKeyRequest): Ignores the parameters and returns a keyRequest() array.
1740         (WebCore::MockCDMSession::releaseKeys): No-op.
1741         (WebCore::MockCDMSession::addKey): Checks that the key starts with the keyPrefix() array.
1742         * testing/MockCDM.h: Added.
1743         (WebCore::MockCDM::create):
1744         (WebCore::MockCDM::~MockCDM): Simple destructor.
1745         (WebCore::MockCDM::MockCDM): Simple constructor.
1746
1747         Add the new classes to the built system:
1748         * Configurations/FeatureDefines.xcconfig:
1749         * DerivedSources.make:
1750         * WebCore.exp.in:
1751         * WebCore.xcodeproj/project.pbxproj:
1752
1753         Miscelaneous changes:
1754         * dom/EventNames.in: Add the two new event types, MediaKeyMessageEvent and MediaKeyNeededEvent.
1755         * dom/EventTargetFactory.in: Add the new EventTarget, MediaKeySession.
1756         * page/DOMWindow.idl: Add constructors for the new classes to the window object.
1757
1758 2013-02-08  Chris Fleizach  <cfleizach@apple.com>
1759
1760         Refactor platform-specific code in SpeechSynthesis
1761         https://bugs.webkit.org/show_bug.cgi?id=107414
1762
1763         Reviewed by Sam Weinig.
1764
1765         Refactor WebSpeech code to use a platform mechanism to provide access to platform resources.
1766
1767         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
1768         (WebCore::DOMWindowSpeechSynthesis::from):
1769         * Modules/speech/SpeechSynthesis.cpp:
1770         (WebCore::SpeechSynthesis::SpeechSynthesis):
1771         (WebCore):
1772         (WebCore::SpeechSynthesis::voicesDidChange):
1773         (WebCore::SpeechSynthesis::getVoices):
1774         (WebCore::SpeechSynthesis::pending):
1775         (WebCore::SpeechSynthesis::speaking):
1776         (WebCore::SpeechSynthesis::paused):
1777         (WebCore::SpeechSynthesis::speak):
1778         (WebCore::SpeechSynthesis::cancel):
1779         (WebCore::SpeechSynthesis::pause):
1780         (WebCore::SpeechSynthesis::resume):
1781         * Modules/speech/SpeechSynthesis.h:
1782         (WebCore):
1783         (SpeechSynthesis):
1784         (WebCore::SpeechSynthesis::didStartSpeaking):
1785         (WebCore::SpeechSynthesis::didFinishSpeaking):
1786         (WebCore::SpeechSynthesis::speakingErrorOccurred):
1787         * Modules/speech/SpeechSynthesisUtterance.cpp:
1788         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
1789         * Modules/speech/SpeechSynthesisUtterance.h:
1790         (WebCore::SpeechSynthesisUtterance::text):
1791         (WebCore::SpeechSynthesisUtterance::setText):
1792         (WebCore::SpeechSynthesisUtterance::lang):
1793         (WebCore::SpeechSynthesisUtterance::setLang):
1794         (WebCore::SpeechSynthesisUtterance::voiceURI):
1795         (WebCore::SpeechSynthesisUtterance::setVoiceURI):
1796         (WebCore::SpeechSynthesisUtterance::volume):
1797         (WebCore::SpeechSynthesisUtterance::setVolume):
1798         (WebCore::SpeechSynthesisUtterance::rate):
1799         (WebCore::SpeechSynthesisUtterance::setRate):
1800         (WebCore::SpeechSynthesisUtterance::pitch):
1801         (WebCore::SpeechSynthesisUtterance::setPitch):
1802         (SpeechSynthesisUtterance):
1803         (WebCore::SpeechSynthesisUtterance::platformUtterance):
1804         * Modules/speech/SpeechSynthesisVoice.cpp:
1805         (WebCore::SpeechSynthesisVoice::create):
1806         (WebCore::SpeechSynthesisVoice::SpeechSynthesisVoice):
1807         * Modules/speech/SpeechSynthesisVoice.h:
1808         (SpeechSynthesisVoice):
1809         (WebCore::SpeechSynthesisVoice::voiceURI):
1810         (WebCore::SpeechSynthesisVoice::name):
1811         (WebCore::SpeechSynthesisVoice::lang):
1812         (WebCore::SpeechSynthesisVoice::localService):
1813         (WebCore::SpeechSynthesisVoice::isDefault):
1814         * Modules/speech/mac/SpeechSynthesisMac.mm:
1815         * WebCore.xcodeproj/project.pbxproj:
1816         * platform/PlatformSpeechSynthesis.h: Added.
1817         (WebCore):
1818         (PlatformSpeechSynthesis):
1819         * platform/PlatformSpeechSynthesisUtterance.cpp: Added.
1820         (WebCore):
1821         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
1822         * platform/PlatformSpeechSynthesisUtterance.h: Added.
1823         (WebCore):
1824         (PlatformSpeechSynthesisUtteranceClient):
1825         (WebCore::PlatformSpeechSynthesisUtteranceClient::~PlatformSpeechSynthesisUtteranceClient):
1826         (PlatformSpeechSynthesisUtterance):
1827         (WebCore::PlatformSpeechSynthesisUtterance::text):
1828         (WebCore::PlatformSpeechSynthesisUtterance::setText):
1829         (WebCore::PlatformSpeechSynthesisUtterance::lang):
1830         (WebCore::PlatformSpeechSynthesisUtterance::setLang):
1831         (WebCore::PlatformSpeechSynthesisUtterance::voiceURI):
1832         (WebCore::PlatformSpeechSynthesisUtterance::setVoiceURI):
1833         (WebCore::PlatformSpeechSynthesisUtterance::volume):
1834         (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
1835         (WebCore::PlatformSpeechSynthesisUtterance::rate):
1836         (WebCore::PlatformSpeechSynthesisUtterance::setRate):
1837         (WebCore::PlatformSpeechSynthesisUtterance::pitch):
1838         (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
1839         * platform/PlatformSpeechSynthesisVoice.cpp: Added.
1840         (WebCore):
1841         (WebCore::PlatformSpeechSynthesisVoice::create):
1842         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
1843         * platform/PlatformSpeechSynthesisVoice.h: Added.
1844         (WebCore):
1845         (PlatformSpeechSynthesisVoice):
1846         (WebCore::PlatformSpeechSynthesisVoice::voiceURI):
1847         (WebCore::PlatformSpeechSynthesisVoice::name):
1848         (WebCore::PlatformSpeechSynthesisVoice::lang):
1849         (WebCore::PlatformSpeechSynthesisVoice::localService):
1850         (WebCore::PlatformSpeechSynthesisVoice::isDefault):
1851         * platform/PlatformSpeechSynthesizer.cpp: Added.
1852         (WebCore):
1853         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
1854         * platform/PlatformSpeechSynthesizer.h: Added.
1855         (WebCore):
1856         (PlatformSpeechSynthesizerClient):
1857         (WebCore::PlatformSpeechSynthesizerClient::~PlatformSpeechSynthesizerClient):
1858         (PlatformSpeechSynthesizer):
1859         (WebCore::PlatformSpeechSynthesizer::voiceList):
1860         * platform/mac/PlatformSpeechSynthesisMac.mm: Added.
1861         (WebCore):
1862         (WebCore::PlatformSpeechSynthesis::create):
1863         (WebCore::PlatformSpeechSynthesis::PlatformSpeechSynthesis):
1864         (WebCore::PlatformSpeechSynthesis::platformSpeak):
1865         * platform/mac/PlatformSpeechSynthesizerMac.mm: Added.
1866         (WebCore):
1867         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1868         (WebCore::PlatformSpeechSynthesizer::speak):
1869
1870 2013-02-08  Dean Jackson  <dino@apple.com>
1871
1872         Put snapshotting label text into localizable strings
1873         https://bugs.webkit.org/show_bug.cgi?id=108268
1874
1875         Reviewed by Simon Fraser.
1876
1877         In preparation for a snapshotted plug-in using a ShadowRoot, allow
1878         its label to be localized.
1879
1880         * English.lproj/Localizable.strings:
1881         * platform/LocalizedStrings.cpp:
1882         (WebCore::snapshottedPlugInLabelTitle): New method for returning title.
1883         (WebCore::snapshottedPlugInLabelSubtitle): New method for returning subtitle.
1884         * platform/LocalizedStrings.h:
1885
1886 2013-02-08  Dean Jackson  <dino@apple.com>
1887
1888         Do not register autostart for plugins from file:// (or nowhere)
1889         https://bugs.webkit.org/show_bug.cgi?id=108271
1890
1891         Reviewed by Tim Horton.
1892
1893         If the page url origin is treated as a local URL, don't attempt
1894         to add it to the auto-start list.
1895
1896         * html/HTMLPlugInImageElement.cpp:
1897         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
1898
1899 2013-02-08  Adam Barth  <abarth@webkit.org>
1900
1901         Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
1902         https://bugs.webkit.org/show_bug.cgi?id=107190
1903
1904         Reviewed by Eric Seidel.
1905
1906         This patch replaces the parser map with WeakPtr. We now use WeakPtrs to
1907         communicate from the main thread to the background thread. (We were
1908         already using WeakPtrs to communicate from the background thread to the
1909         main thread.) This change lets us remove a bunch of boilerplate code.
1910
1911         * html/parser/BackgroundHTMLParser.cpp:
1912         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1913         (WebCore::BackgroundHTMLParser::stop):
1914         (WebCore):
1915         * html/parser/BackgroundHTMLParser.h:
1916         (WebCore::BackgroundHTMLParser::create):
1917         (BackgroundHTMLParser):
1918         * html/parser/HTMLDocumentParser.cpp:
1919         (WebCore::HTMLDocumentParser::didFailSpeculation):
1920         (WebCore::HTMLDocumentParser::startBackgroundParser):
1921         (WebCore::HTMLDocumentParser::stopBackgroundParser):
1922         (WebCore::HTMLDocumentParser::append):
1923         (WebCore::HTMLDocumentParser::finish):
1924         * html/parser/HTMLDocumentParser.h:
1925         (WebCore):
1926         (HTMLDocumentParser):
1927
1928 2013-02-07  Roger Fong  <roger_fong@apple.com>
1929
1930         VS2010 WebCore TestSupport project.
1931         https://bugs.webkit.org/show_bug.cgi?id=107034.
1932
1933         Reviewed by Brent Fulgham.
1934
1935         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Added.
1936         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Added.
1937
1938 2013-02-08  ChangSeok Oh  <shivamidow@gmail.com>
1939
1940         [GTK][AC] GraphicsLayerActor code clean up after clutter version up.
1941         https://bugs.webkit.org/show_bug.cgi?id=109304
1942
1943         Reviewed by Gustavo Noronha Silva.
1944
1945         This patch cleans up GraphicsLayerActor functions by using new clutter apis
1946         and makes existing functions simple & readable.
1947
1948         No new tests since no change in functionality
1949
1950         * platform/graphics/clutter/GraphicsLayerActor.cpp:
1951         (_GraphicsLayerActorPrivate):
1952         (graphicsLayerActorApplyTransform):
1953         (graphicsLayerActorPaint):
1954         (graphicsLayerActorDraw):
1955         (graphicsLayerActorUpdateTexture):
1956         (drawLayerContents):
1957         (graphicsLayerActorNew):
1958         (graphicsLayerActorInvalidateRectangle):
1959         (graphicsLayerActorSetTransform):
1960         (graphicsLayerActorSetAnchorPoint):
1961         (graphicsLayerActorGetAnchorPoint):
1962         (graphicsLayerActorSetScrollPosition):
1963         * platform/graphics/clutter/PlatformClutterAnimation.h:
1964
1965 2013-02-08  Harald Alvestrand  <hta@google.com>
1966
1967         Fix and test for missing return statement
1968
1969         RTCPeerConnection.getStats() failed when remote stats were instantiated.
1970         https://bugs.webkit.org/show_bug.cgi?id=109292
1971
1972         Reviewed by Adam Barth.
1973
1974         Tested by extending the existing mock's behaviour.
1975
1976         * Modules/mediastream/RTCStatsReport.cpp:
1977         (WebCore::RTCStatsReport::addElement):
1978
1979 2013-02-08  Anton Vayvod  <avayvod@chromium.org>
1980
1981         [Text Autosizing] Split isAutosizingCluster into three independent checks
1982         https://bugs.webkit.org/show_bug.cgi?id=109093
1983
1984         Refactoring to create more flexible version of isAutosizingCluster since there're more types
1985         of autosizing cluster now: narrower than the parent cluster, wider than the parent cluster
1986         and the one that doesn't depend on the parent cluster.
1987
1988         Reviewed by Kenneth Rohde Christiansen.
1989
1990         Refactoring, no test changes.
1991
1992         * rendering/TextAutosizer.cpp:
1993
1994         (WebCore::TextAutosizer::isNarrowDescendant):
1995
1996             Separate check for the container to be of the narrow-descendant type. Was a part of
1997             isAutosizingCluster().
1998
1999         (WebCore::TextAutosizer::isWiderDescendant):
2000
2001             Separate check for the container to be of the wider-descendant type. Was a part of
2002             isAutosizingCluster().
2003
2004         (WebCore::TextAutosizer::isIndependentDescendant):
2005
2006             Separate check for the container to be autosized separately from the ancestor cluster.
2007             Checks for conditions independent of the aforementioned cluster.
2008
2009         (WebCore::TextAutosizer::isAutosizingCluster):
2010
2011             Handy method to check all separate conditions together.
2012
2013         (WebCore::TextAutosizer::processSubtree):
2014         (WebCore::TextAutosizer::processCluster):
2015         (WebCore::TextAutosizer::processContainer):
2016         (WebCore::TextAutosizer::clusterShouldBeAutosized):
2017         (WebCore::TextAutosizer::measureDescendantTextWidth):
2018         (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
2019
2020             The methods above were updated to use new functions/arguments.
2021
2022         * rendering/TextAutosizer.h:
2023
2024             Updated/added method definitions.
2025
2026 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
2027
2028         Web Inspector: Extension sever should use Workspace.projectForType() instead of Workspace.project()
2029         https://bugs.webkit.org/show_bug.cgi?id=109301
2030
2031         Reviewed by Alexander Pavlov.
2032
2033         * inspector/front-end/ExtensionServer.js:
2034         (WebInspector.ExtensionServer.prototype._onGetPageResources):
2035
2036 2013-02-04  Yury Semikhatsky  <yurys@chromium.org>
2037
2038         Web Inspector: simplify Memory.getDOMNodeCount implementation
2039         https://bugs.webkit.org/show_bug.cgi?id=108821
2040
2041         Reviewed by Alexander Pavlov.
2042
2043         Removed Memory.getDOMNodeCount command from the protocol. Memory.getDOMCounters
2044         should be used instead.
2045
2046         * inspector/Inspector.json:
2047         * inspector/InspectorMemoryAgent.cpp:
2048         * inspector/InspectorMemoryAgent.h:
2049         (InspectorMemoryAgent):
2050
2051 2013-02-08  Yury Semikhatsky  <yurys@chromium.org>
2052
2053         Web Inspector: refactor MemoryStatistics.js
2054         https://bugs.webkit.org/show_bug.cgi?id=109299
2055
2056         Reviewed by Vsevolod Vlasov.
2057
2058         Extracted functionality specific to DOM counter graphs drawing into
2059         separate methods on MemoryStatistics class.
2060         Introduced CounterUIBase base class for DOMCounterUI that contains
2061         functionality which can be shared with native memory graph.
2062
2063         * inspector/front-end/MemoryStatistics.js:
2064         (WebInspector.MemoryStatistics):
2065         (WebInspector.CounterUIBase):
2066         (WebInspector.CounterUIBase.prototype.updateCurrentValue):
2067         (WebInspector.CounterUIBase.prototype.clearCurrentValueAndMarker):
2068         (WebInspector.CounterUIBase.prototype.get visible):
2069         (WebInspector.DOMCounterUI):
2070         (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
2071         (WebInspector.MemoryStatistics.prototype._onMouseOut):
2072         (WebInspector.MemoryStatistics.prototype._clearCurrentValueAndMarker):
2073         (WebInspector.MemoryStatistics.prototype._refreshCurrentValues):
2074         (WebInspector.MemoryStatistics.prototype._updateCurrentValue):
2075         (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
2076         (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
2077         (WebInspector.MemoryStatistics.prototype._saveImageUnderMarker):
2078         (WebInspector.MemoryStatistics.prototype._drawMarker):
2079         (WebInspector.MemoryStatistics.prototype._clear):
2080         (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
2081
2082 2013-02-08  Mike West  <mkwst@chromium.org>
2083
2084         Add a new IGNORE_EXCEPTION helper to ignore ExceptionCodes when they are expected but uninteresting
2085         https://bugs.webkit.org/show_bug.cgi?id=108771
2086
2087         Reviewed by Eric Seidel.
2088
2089         In cases where the ExceptionCode passed into a function is completely
2090         ignored, this patch replaces it with a new IGNORE_EXCEPTION macro. This
2091         makes our expectations about possible exceptions (or lack thereof)
2092         explicit, rather than relying on implicit assumptions about whether a
2093         variable is intentionally uninitialized or not. It also removes
2094         knowledge about the internals of ExceptionCodes (that they're currently
2095         ints, for instance) from code that shouldn't care, which will help with
2096         future refactorings.
2097
2098         The implementation is entirely based upon ASSERT_NO_EXCEPTION, and
2099         shouldn't have any visible effect on the web. As long as all the
2100         current tests pass, we're good.
2101
2102         * Modules/indexeddb/IDBRequest.cpp:
2103         (WebCore::IDBRequest::dispatchEvent):
2104         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
2105         * Modules/indexeddb/IDBTransaction.cpp:
2106         (WebCore::IDBTransaction::stop):
2107         * Modules/websockets/WebSocketChannel.cpp:
2108         (WebCore::WebSocketChannel::processBuffer):
2109         * dom/Document.cpp:
2110         (WebCore::Document::processHttpEquiv):
2111         * dom/ExceptionCodePlaceholder.h:
2112         (WebCore):
2113         * dom/Node.cpp:
2114         (WebCore::Node::normalize):
2115         * dom/Text.cpp:
2116         (WebCore::Text::replaceWholeText):
2117         * editing/AlternativeTextController.cpp:
2118         (WebCore::AlternativeTextController::insertDictatedText):
2119         * editing/AppendNodeCommand.cpp:
2120         (WebCore::AppendNodeCommand::doApply):
2121         (WebCore::AppendNodeCommand::doUnapply):
2122         * editing/CompositeEditCommand.cpp:
2123         (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
2124         * editing/DeleteFromTextNodeCommand.cpp:
2125         (WebCore::DeleteFromTextNodeCommand::doUnapply):
2126         * editing/Editor.cpp:
2127         (WebCore::dispatchEditableContentChangedEvents):
2128         (WebCore::Editor::applyEditingStyleToElement):
2129         * editing/EditorCommand.cpp:
2130         (WebCore::executeFormatBlock):
2131         * editing/FormatBlockCommand.cpp:
2132         (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
2133         * editing/InsertIntoTextNodeCommand.cpp:
2134         (WebCore::InsertIntoTextNodeCommand::doApply):
2135         (WebCore::InsertIntoTextNodeCommand::doUnapply):
2136         * editing/InsertListCommand.cpp:
2137         (WebCore::InsertListCommand::doApplyForSingleParagraph):
2138         * editing/InsertNodeBeforeCommand.cpp:
2139         (WebCore::InsertNodeBeforeCommand::doApply):
2140         (WebCore::InsertNodeBeforeCommand::doUnapply):
2141         * editing/RemoveCSSPropertyCommand.cpp:
2142         (WebCore::RemoveCSSPropertyCommand::doApply):
2143         (WebCore::RemoveCSSPropertyCommand::doUnapply):
2144         * editing/RemoveNodeCommand.cpp:
2145         (WebCore::RemoveNodeCommand::doApply):
2146         (WebCore::RemoveNodeCommand::doUnapply):
2147         * editing/ReplaceSelectionCommand.cpp:
2148         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2149         * editing/TextIterator.cpp:
2150         (WebCore::TextIterator::getLocationAndLengthFromRange):
2151         * editing/WrapContentsInDummySpanCommand.cpp:
2152         (WebCore::WrapContentsInDummySpanCommand::executeApply):
2153         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
2154         * editing/htmlediting.cpp:
2155         (WebCore::comparePositions):
2156         * editing/markup.cpp:
2157         (WebCore::highestAncestorToWrapMarkup):
2158         * html/FTPDirectoryDocument.cpp:
2159         (WebCore::FTPDirectoryDocumentParser::appendEntry):
2160         (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
2161         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
2162         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
2163         * html/HTMLMediaElement.cpp:
2164         (WebCore::HTMLMediaElement::rewind):
2165         (WebCore::HTMLMediaElement::returnToRealtime):
2166         (WebCore::HTMLMediaElement::playInternal):
2167         (WebCore::HTMLMediaElement::percentLoaded):
2168         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2169         (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
2170         (WebCore::HTMLMediaElement::applyMediaFragmentURI):
2171         * html/HTMLOutputElement.cpp:
2172         (WebCore::HTMLOutputElement::setTextContentInternal):
2173         * html/HTMLSelectElement.cpp:
2174         (WebCore::HTMLSelectElement::remove):
2175         * html/HTMLTableElement.cpp:
2176         (WebCore::HTMLTableElement::createTHead):
2177         (WebCore::HTMLTableElement::deleteTHead):
2178         (WebCore::HTMLTableElement::createTFoot):
2179         (WebCore::HTMLTableElement::deleteTFoot):
2180         (WebCore::HTMLTableElement::createCaption):
2181         (WebCore::HTMLTableElement::deleteCaption):
2182         * html/HTMLTextAreaElement.cpp:
2183         (WebCore::HTMLTextAreaElement::setDefaultValue):
2184         * html/ImageDocument.cpp:
2185         (WebCore::ImageDocument::createDocumentStructure):
2186         * html/InputType.cpp:
2187         (WebCore::InputType::stepUpFromRenderer):
2188         * html/MediaController.cpp:
2189         (MediaController::bringElementUpToSpeed):
2190         (MediaController::asyncEventTimerFired):
2191         * html/MediaDocument.cpp:
2192         (WebCore::MediaDocumentParser::createDocumentStructure):
2193         (WebCore::MediaDocument::replaceMediaElementTimerFired):
2194         * html/PluginDocument.cpp:
2195         (WebCore::PluginDocumentParser::createDocumentStructure):
2196         * html/RangeInputType.cpp:
2197         (WebCore::RangeInputType::handleKeydownEvent):
2198         * html/TimeRanges.cpp:
2199         (TimeRanges::contain):
2200         (TimeRanges::nearest):
2201         * html/canvas/CanvasRenderingContext2D.cpp:
2202         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
2203         * html/shadow/MediaControlElementTypes.cpp:
2204         (WebCore::MediaControlSeekButtonElement::seekTimerFired):
2205         * html/shadow/MediaControlElements.cpp:
2206         (WebCore::MediaControlPanelElement::setPosition):
2207         (WebCore::MediaControlPanelElement::resetPosition):
2208         (WebCore::MediaControlStatusDisplayElement::update):
2209         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
2210         (WebCore::MediaControlTimelineElement::defaultEventHandler):
2211         * html/shadow/MediaControls.cpp:
2212         (WebCore::MediaControls::updateCurrentTimeDisplay):
2213         (WebCore::MediaControls::createTextTrackDisplay):
2214         * html/shadow/MediaControlsApple.cpp:
2215         (WebCore::MediaControlsApple::updateCurrentTimeDisplay):
2216         * html/shadow/MediaControlsBlackBerry.cpp:
2217         (WebCore::MediaControlEmbeddedPanelElement::setPosition):
2218         (WebCore::MediaControlEmbeddedPanelElement::resetPosition):
2219         (WebCore::MediaControlFullscreenTimelineElement::defaultEventHandler):
2220         (WebCore::MediaControlsBlackBerry::updateCurrentTimeDisplay):
2221         * html/shadow/MediaControlsChromium.cpp:
2222         (WebCore::MediaControlsChromium::updateCurrentTimeDisplay):
2223         * html/track/InbandTextTrack.cpp:
2224         (WebCore::InbandTextTrack::addGenericCue):
2225         * inspector/InspectorCSSAgent.cpp:
2226         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2227         * inspector/InspectorHistory.cpp:
2228         (WebCore::InspectorHistory::markUndoableState):
2229         * inspector/InspectorResourceAgent.cpp:
2230         (WebCore::InspectorResourceAgent::replayXHR):
2231         * page/ContextMenuController.cpp:
2232         (WebCore::ContextMenuController::contextMenuItemSelected):
2233         * page/DOMWindow.cpp:
2234         (WebCore::didAddStorageEventListener):
2235         * page/DragController.cpp:
2236         (WebCore::documentFragmentFromDragData):
2237         * page/EventHandler.cpp:
2238         (WebCore::EventHandler::dispatchDragEvent):
2239         (WebCore::EventHandler::keyEvent):
2240         (WebCore::EventHandler::handleTextInputEvent):
2241         * page/Page.cpp:
2242         (WebCore::Page::findStringMatchingRanges):
2243         * platform/efl/RenderThemeEfl.cpp:
2244         (WebCore::RenderThemeEfl::paintMediaSliderTrack):
2245         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2246         (WebCore::MediaPlayerPrivate::percentLoaded):
2247         * platform/gtk/RenderThemeGtk.cpp:
2248         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
2249         * platform/mac/PasteboardMac.mm:
2250         (WebCore::Pasteboard::getDataSelection):
2251         (WebCore::documentFragmentWithImageResource):
2252         (WebCore::Pasteboard::documentFragment):
2253         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2254         (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
2255         (-[WebVideoFullscreenHUDWindowController setVolume:]):
2256         * platform/qt/RenderThemeQt.cpp:
2257         (WebCore::RenderThemeQt::paintMediaSliderTrack):
2258         * rendering/RenderNamedFlowThread.cpp:
2259         (WebCore::RenderNamedFlowThread::getRanges):
2260         * rendering/RenderThemeMac.mm:
2261         (WebCore::RenderThemeMac::paintMediaSliderTrack):
2262         * svg/SVGTRefElement.cpp:
2263         (WebCore::SVGTRefElement::detachTarget):
2264         * xml/XMLTreeViewer.cpp:
2265         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
2266         * xml/parser/XMLDocumentParserLibxml2.cpp:
2267         (WebCore::XMLDocumentParser::endElementNs):
2268         * xml/parser/XMLDocumentParserQt.cpp:
2269         (WebCore::XMLDocumentParser::parseEndElement):
2270
2271 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
2272
2273         Web Inspector: Introduce workspace provider/project type, encapsulate uri creation in SimpleWorkspaceProvider.
2274         https://bugs.webkit.org/show_bug.cgi?id=109282
2275
2276         Reviewed by Alexander Pavlov.
2277
2278         SimpleWorkspaceProvider now fully takes care of creating uri based on project/workspace provider type.
2279         This is the first step on the way to project-per-domain mode for non file system project types.
2280         Workspace is now partly aware of the possibility that several projects with the same type exist.
2281         Drive-by: ScriptsPanel now uses FileMapping to show anchor location properly.
2282
2283         * inspector/front-end/DefaultScriptMapping.js:
2284         (WebInspector.DefaultScriptMapping):
2285         (WebInspector.DefaultScriptMapping.prototype.addScript):
2286         * inspector/front-end/ExtensionServer.js:
2287         (WebInspector.ExtensionServer.prototype._onGetPageResources):
2288         * inspector/front-end/FileMapping.js:
2289         (WebInspector.FileMapping.prototype.uriForURL):
2290         * inspector/front-end/FileSystemWorkspaceProvider.js:
2291         (WebInspector.FileSystemWorkspaceProvider.prototype.type):
2292         * inspector/front-end/JavaScriptSourceFrame.js:
2293         (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
2294         * inspector/front-end/LiveEditSupport.js:
2295         (WebInspector.LiveEditSupport):
2296         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
2297         * inspector/front-end/ScriptSnippetModel.js:
2298         (WebInspector.ScriptSnippetModel):
2299         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2300         * inspector/front-end/ScriptsNavigator.js:
2301         (WebInspector.ScriptsNavigator.prototype._navigatorViewForUISourceCode):
2302         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
2303         (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
2304         (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet):
2305         * inspector/front-end/ScriptsPanel.js:
2306         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
2307         (WebInspector.ScriptsPanel.prototype._projectWillReset):
2308         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
2309         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2310         (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
2311         * inspector/front-end/SimpleWorkspaceProvider.js:
2312         (WebInspector.SimpleWorkspaceProvider):
2313         (WebInspector.SimpleWorkspaceProvider.uriForURL):
2314         (WebInspector.SimpleWorkspaceProvider.prototype.type):
2315         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
2316         (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
2317         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2318         (WebInspector.SimpleWorkspaceProvider.prototype._uniqueURI):
2319         * inspector/front-end/Workspace.js:
2320         (WebInspector.WorkspaceProvider.prototype.type):
2321         (WebInspector.Project.prototype.type):
2322         (WebInspector.Project.prototype.isServiceProject):
2323         (WebInspector.Workspace.prototype.uiSourceCodeForOriginURL):
2324         (WebInspector.Workspace.prototype.uiSourceCodesForProjectType):
2325         (WebInspector.Workspace.prototype.projectsForType):
2326         * inspector/front-end/inspector.js:
2327
2328 2013-02-08  ChangSeok Oh  <shivamidow@gmail.com>
2329
2330         [GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changing anchor position.
2331         https://bugs.webkit.org/show_bug.cgi?id=109226
2332
2333         Reviewed by Gustavo Noronha Silva.
2334
2335         Clutter has a different coordinate system from mac port's, so we don't need to
2336         recalulate GraphicsLayer position after changing its anchor position.
2337
2338         Covered by existing ac tests.
2339
2340         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2341         (WebCore::GraphicsLayerClutter::updateGeometry):
2342
2343 2013-02-08  Mike West  <mkwst@chromium.org>
2344
2345         Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
2346         https://bugs.webkit.org/show_bug.cgi?id=109266
2347
2348         Reviewed by Jochen Eisinger.
2349
2350         The pattern:
2351
2352             ExceptionCode ec = 0;
2353             methodThatGeneratesException(ec);
2354             ASSERT(!ec);
2355
2356         is more clearly and succinctly written as:
2357
2358             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
2359
2360         This patch replaces the occurances of the former in IDB code that never
2361         touch 'ec' again with the latter. No change in behavior should result
2362         from this refactoring.
2363
2364         * Modules/indexeddb/IDBCursor.cpp:
2365         (WebCore::IDBCursor::advance):
2366         (WebCore::IDBCursor::continueFunction):
2367         (WebCore::IDBCursor::deleteFunction):
2368             These methods checked the value of the ExceptionCode without first
2369             initializing it to 0. Now the ExceptionCode is explicitly set to 0
2370             before doing potentially exception-generating work.
2371         (WebCore::IDBCursor::direction):
2372         * Modules/indexeddb/IDBObjectStore.cpp:
2373         (WebCore):
2374         * Modules/indexeddb/IDBTransaction.cpp:
2375         (WebCore::IDBTransaction::mode):
2376             Replace the above pattern with ASSERT_NO_EXCEPTION.
2377
2378 2013-02-08  Mike West  <mkwst@chromium.org>
2379
2380         Migrate ExceptionCode ASSERTs in SVG to ASSERT_NO_EXCEPTION.
2381         https://bugs.webkit.org/show_bug.cgi?id=109267
2382
2383         Reviewed by Jochen Eisinger.
2384
2385         The pattern:
2386
2387             ExceptionCode ec = 0;
2388             methodThatGeneratesException(ec);
2389             ASSERT(!ec);
2390
2391         is more clearly and succinctly written as:
2392
2393             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
2394
2395         This patch replaces the occurances of the former in SVG code that never
2396         touch 'ec' again with the latter. No change in behavior should result
2397         from this refactoring.
2398
2399         * svg/SVGLength.cpp:
2400         (WebCore::SVGLength::SVGLength):
2401         (WebCore::SVGLength::setValue):
2402             This method checked the value of the ExceptionCode without first
2403             initializing it to 0. Now it initializes before doing potentially
2404             exception-generating work.
2405         * rendering/style/SVGRenderStyle.h:
2406         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
2407         (WebCore::SVGRenderStyle::initialKerning):
2408         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
2409         (WebCore::SVGRenderStyle::initialStrokeWidth):
2410         * svg/SVGAnimatedLength.cpp:
2411         (WebCore::sharedSVGLength):
2412         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
2413         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
2414         * svg/SVGAnimatedLengthList.cpp:
2415         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
2416         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
2417         * svg/SVGTextContentElement.cpp:
2418         (WebCore::SVGTextContentElement::textLengthAnimated):
2419         * svg/animation/SVGSMILElement.cpp:
2420         (WebCore::constructQualifiedName):
2421             Replace the above pattern with ASSERT_NO_EXCEPTION.
2422
2423 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
2424
2425         Web Inspector: Replace workspace with project in UISourceCode constructor.
2426         https://bugs.webkit.org/show_bug.cgi?id=109256
2427
2428         Reviewed by Alexander Pavlov.
2429
2430         Replaced workspace with project in UISourceCode constructor since every UISourceCode
2431         operation is delegated to project anyway.
2432
2433         * inspector/front-end/UISourceCode.js:
2434         (WebInspector.UISourceCode):
2435         (WebInspector.UISourceCode.prototype.project):
2436         (WebInspector.UISourceCode.prototype.requestContent):
2437         (WebInspector.UISourceCode.prototype.requestOriginalContent):
2438         (WebInspector.UISourceCode.prototype._commitContent):
2439         (WebInspector.UISourceCode.prototype.searchInContent):
2440         * inspector/front-end/Workspace.js:
2441         (WebInspector.Project.prototype._fileAdded):
2442         (WebInspector.Project.prototype.requestFileContent):
2443         (WebInspector.Project.prototype.setFileContent):
2444         (WebInspector.Project.prototype.searchInFileContent):
2445
2446 2013-02-08  Patrick Gansterer  <paroga@webkit.org>
2447
2448         Build fix for Windows after r141981.
2449
2450         * platform/network/win/ResourceHandleWin.cpp:
2451         (WebCore::ResourceHandle::loadResourceSynchronously):
2452
2453 2013-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2454
2455         Unreviewed, rolling out r141695 and r141697.
2456         http://trac.webkit.org/changeset/141695
2457         http://trac.webkit.org/changeset/141697
2458         https://bugs.webkit.org/show_bug.cgi?id=109279
2459
2460         broke on-disk buffering for http(s) media (Requested by philn
2461         on #webkit).
2462
2463         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2464         (WebCore::MediaPlayerPrivateGStreamer::load):
2465         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2466         (MediaPlayerPrivateGStreamer):
2467         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2468         (webKitWebSrcGetProtocols):
2469         (webKitWebSrcSetUri):
2470
2471 2013-02-08  Dan Carney  <dcarney@google.com>
2472
2473         [v8] isolate parameter added to all v8::peristent calls
2474         https://bugs.webkit.org/show_bug.cgi?id=109268
2475
2476         Reviewed by Kentaro Hara.
2477
2478         No new tests. No change in functionality.
2479
2480         * bindings/scripts/CodeGeneratorV8.pm:
2481         (GenerateDomainSafeFunctionGetter):
2482         (GenerateNamedConstructorCallback):
2483         (GenerateImplementation):
2484         * bindings/scripts/test/V8/V8Float64Array.cpp:
2485         (WebCore::V8Float64Array::GetRawTemplate):
2486         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2487         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
2488         (WebCore::V8TestActiveDOMObject::GetRawTemplate):
2489         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2490         (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
2491         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2492         (WebCore::V8TestEventConstructor::GetRawTemplate):
2493         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2494         (WebCore::V8TestEventTarget::GetRawTemplate):
2495         * bindings/scripts/test/V8/V8TestException.cpp:
2496         (WebCore::V8TestException::GetRawTemplate):
2497         * bindings/scripts/test/V8/V8TestInterface.cpp:
2498         (WebCore::V8TestInterface::GetRawTemplate):
2499         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2500         (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
2501         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2502         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
2503         (WebCore::V8TestNamedConstructor::GetRawTemplate):
2504         * bindings/scripts/test/V8/V8TestNode.cpp:
2505         (WebCore::V8TestNode::GetRawTemplate):
2506         * bindings/scripts/test/V8/V8TestObj.cpp:
2507         (WebCore::V8TestObj::GetRawTemplate):
2508         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2509         (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
2510         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2511         (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
2512         * bindings/v8/DOMWrapperMap.h:
2513         (WebCore::DOMWrapperMap::clear):
2514         * bindings/v8/DOMWrapperWorld.cpp:
2515         (WebCore::isolatedWorldWeakCallback):
2516         (WebCore::DOMWrapperWorld::makeContextWeak):
2517         * bindings/v8/NPV8Object.cpp:
2518         (WebCore::freeV8NPObject):
2519         (WebCore::npCreateV8ScriptObject):
2520         * bindings/v8/ScheduledAction.cpp:
2521         (WebCore::ScheduledAction::ScheduledAction):
2522         (WebCore::ScheduledAction::~ScheduledAction):
2523         * bindings/v8/ScopedPersistent.h:
2524         (WebCore::ScopedPersistent::ScopedPersistent):
2525         (WebCore::ScopedPersistent::set):
2526         (WebCore::ScopedPersistent::clear):
2527         * bindings/v8/ScriptWrappable.h:
2528         (WebCore::ScriptWrappable::setWrapper):
2529         (WebCore::ScriptWrappable::disposeWrapper):
2530         (WebCore::ScriptWrappable::weakCallback):
2531         * bindings/v8/V8Binding.cpp:
2532         (WebCore::createRawTemplate):
2533         * bindings/v8/V8Binding.h:
2534         (WebCore):
2535         * bindings/v8/V8GCController.cpp:
2536         (WebCore::gcTree):
2537         (WebCore::V8GCController::gcPrologue):
2538         (WebCore::V8GCController::minorGCPrologue):
2539         * bindings/v8/V8GCController.h:
2540         (V8GCController):
2541         * bindings/v8/V8HiddenPropertyName.cpp:
2542         (WebCore::V8HiddenPropertyName::createString):
2543         * bindings/v8/V8LazyEventListener.cpp:
2544         (WebCore::V8LazyEventListener::prepareListenerObject):
2545         * bindings/v8/V8NPObject.cpp:
2546         (WebCore::V8NPTemplateMap::dispose):
2547         (WebCore::npObjectGetProperty):
2548         (WebCore::createV8ObjectForNPObject):
2549         * bindings/v8/V8PerContextData.cpp:
2550         (WebCore::V8PerContextData::dispose):
2551         (WebCore::V8PerContextData::createWrapperFromCacheSlowCase):
2552         (WebCore::V8PerContextData::constructorForTypeSlowCase):
2553         * bindings/v8/V8ValueCache.cpp:
2554         (WebCore::makeExternalString):
2555         * bindings/v8/WrapperTypeInfo.h:
2556         (WebCore::WrapperConfiguration::configureWrapper):
2557         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2558         (WebCore::V8HTMLDocument::wrapInShadowObject):
2559         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2560         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
2561         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2562         (WebCore::WeakReferenceCallback):
2563         (WebCore::createInjectedScriptHostV8Wrapper):
2564         * bindings/v8/custom/V8LocationCustom.cpp:
2565         (WebCore::V8Location::reloadAccessorGetter):
2566         (WebCore::V8Location::replaceAccessorGetter):
2567         (WebCore::V8Location::assignAccessorGetter):
2568
2569 2013-02-08  Kent Tamura  <tkent@chromium.org>
2570
2571         Adjust usage of ENABLE flags to enable whole content
2572         https://bugs.webkit.org/show_bug.cgi?id=109270
2573
2574         Reviewed by Eric Seidel.
2575
2576         Our common usage of ENABLE flags to enable whole content of files is:
2577
2578         For .cpp files:
2579           #include "config.h"
2580           #if ENABLE(FOOBAR)
2581           #include "FooBar.h"
2582
2583         For .h files:
2584           #ifndef FooBar_h
2585           #define FooBar_h
2586           #if ENABLE(FOOBAR)
2587
2588         Fix files which have uncommon usage, and fix CodeGeneratorV8.pm so that
2589         it generates the common pattern. Note that CodeGeneratorJS.pm already
2590         generates code in this order.
2591
2592         * bindings/scripts/CodeGeneratorV8.pm:
2593         (GenerateHeaderContentHeader):
2594         (GenerateImplementationContentHeader):
2595         * bindings/scripts/test/V8/V8TestCallback.cpp:
2596         * bindings/scripts/test/V8/V8TestCallback.h:
2597         * bindings/scripts/test/V8/V8TestInterface.cpp:
2598         * bindings/scripts/test/V8/V8TestInterface.h:
2599         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2600         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2601         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2602         * html/ColorInputType.cpp:
2603         * html/ColorInputType.h:
2604         * html/DateInputType.cpp:
2605         * html/DateTimeInputType.cpp:
2606         * html/DateTimeInputType.h:
2607         * html/DateTimeLocalInputType.cpp:
2608         * html/HTMLAudioElement.cpp:
2609         * html/HTMLAudioElement.h:
2610         * html/HTMLDataListElement.cpp:
2611         * html/HTMLDialogElement.cpp:
2612         * html/HTMLDialogElement.h:
2613         * html/HTMLMediaElement.cpp:
2614         * html/HTMLMediaElement.h:
2615         * html/HTMLMeterElement.cpp:
2616         * html/HTMLProgressElement.cpp:
2617         * html/HTMLSourceElement.cpp:
2618         * html/HTMLSourceElement.h:
2619         * html/HTMLTrackElement.cpp:
2620         * html/HTMLTrackElement.h:
2621         * html/HTMLVideoElement.cpp:
2622         * html/HTMLVideoElement.h:
2623         * html/MonthInputType.cpp:
2624         * html/TimeInputType.cpp:
2625         * html/WeekInputType.cpp:
2626         * html/shadow/DateTimeFieldElement.h:
2627         * html/shadow/DetailsMarkerControl.cpp:
2628         * html/shadow/MeterShadowElement.cpp:
2629         * html/shadow/ProgressShadowElement.cpp:
2630         * rendering/RenderDetailsMarker.cpp:
2631         * rendering/RenderInputSpeech.cpp:
2632         * rendering/RenderMeter.cpp:
2633         * rendering/RenderProgress.cpp:
2634
2635 2013-02-08  Mike West  <mkwst@chromium.org>
2636
2637         Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro.
2638         https://bugs.webkit.org/show_bug.cgi?id=109044
2639
2640         Reviewed by Darin Adler.
2641
2642         The pattern:
2643
2644             ExceptionCode ec = 0;
2645             methodThatGeneratesException(ec);
2646             ASSERT(!ec);
2647
2648         is more clearly and succinctly written as:
2649
2650             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
2651
2652         This patch replaces the occurances of the former that never touch 'ec'
2653         again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
2654         a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
2655         where it does indeed matter that 'ec' get set properly.
2656
2657         No change in behavior should result from this refactoring.
2658
2659         * dom/ContainerNode.cpp:
2660         (WebCore::ContainerNode::takeAllChildrenFrom):
2661         * dom/Document.cpp:
2662         (WebCore::Document::setTitle):
2663         * dom/MessagePort.cpp:
2664         (WebCore::MessagePort::dispatchMessages):
2665         (WebCore::MessagePort::disentanglePorts):
2666         * editing/DeleteButtonController.cpp:
2667         (WebCore::enclosingDeletableElement):
2668         (WebCore::DeleteButtonController::createDeletionUI):
2669             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
2670         (WebCore::DeleteButtonController::show):
2671             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
2672         * editing/EditorCommand.cpp:
2673         (WebCore::unionDOMRanges):
2674         * editing/ReplaceNodeWithSpanCommand.cpp:
2675         (WebCore::swapInNodePreservingAttributesAndChildren):
2676         * editing/ReplaceSelectionCommand.cpp:
2677         (WebCore::ReplacementFragment::ReplacementFragment):
2678         (WebCore::ReplacementFragment::removeNode):
2679         (WebCore::ReplacementFragment::insertNodeBefore):
2680         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
2681         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
2682         (WebCore::ReplaceSelectionCommand::insertAsListItems):
2683         * editing/SplitTextNodeCommand.cpp:
2684         (WebCore::SplitTextNodeCommand::doUnapply):
2685         * editing/TextIterator.cpp:
2686         (WebCore::CharacterIterator::range):
2687         (WebCore::BackwardsCharacterIterator::range):
2688         (WebCore::TextIterator::rangeFromLocationAndLength):
2689         (WebCore::collapsedToBoundary):
2690         * editing/htmlediting.cpp:
2691         (WebCore::createTabSpanElement):
2692         * editing/mac/EditorMac.mm:
2693         (WebCore::Editor::fontForSelection):
2694         (WebCore::Editor::fontAttributesForSelectionStart):
2695         * editing/markup.cpp:
2696         (WebCore::createMarkup):
2697         (WebCore::trimFragment):
2698         (WebCore::createFragmentFromMarkupWithContext):
2699         (WebCore::fillContainerFromString):
2700         (WebCore::createFragmentFromText):
2701         (WebCore::createFragmentFromNodes):
2702         * html/ColorInputType.cpp:
2703         (WebCore::ColorInputType::createShadowSubtree):
2704             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
2705         * html/HTMLOptionsCollection.cpp:
2706         (WebCore::HTMLOptionsCollection::add):
2707             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
2708         * html/HTMLTextAreaElement.cpp:
2709         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
2710         * html/HTMLTextFormControlElement.cpp:
2711         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
2712         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2713         * html/TextFieldInputType.cpp:
2714         (WebCore::TextFieldInputType::updatePlaceholderText):
2715         * html/ValidationMessage.cpp:
2716         (WebCore::ValidationMessage::buildBubbleTree):
2717         * html/shadow/MediaControlElementTypes.cpp:
2718         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
2719         * inspector/InspectorPageAgent.cpp:
2720         (WebCore::InspectorPageAgent::getCookies):
2721         * inspector/InspectorStyleSheet.cpp:
2722         (WebCore::InspectorStyleSheet::addRule):
2723         * loader/appcache/ApplicationCacheHost.cpp:
2724         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
2725         * page/DOMSelection.cpp:
2726         (WebCore::DOMSelection::deleteFromDocument):
2727         * page/DragController.cpp:
2728         (WebCore::prepareClipboardForImageDrag):
2729         * rendering/RenderTextControl.cpp:
2730         (WebCore::RenderTextControl::visiblePositionForIndex):
2731             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
2732
2733 2013-02-08  Alexei Filippov  <alph@chromium.org>
2734
2735         Web Inspector: disable profile type switching while profile in progress
2736         https://bugs.webkit.org/show_bug.cgi?id=109178
2737
2738         Reviewed by Yury Semikhatsky.
2739
2740         Disables profile type selection controls when a profiling session
2741         is in progress.
2742
2743         * inspector/front-end/HeapSnapshotView.js:
2744         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
2745         * inspector/front-end/ProfileLauncherView.js:
2746         (WebInspector.ProfileLauncherView.prototype._updateControls):
2747         * inspector/front-end/ProfilesPanel.js:
2748         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
2749
2750 2013-02-08  Ilya Tikhonovsky  <loislo@chromium.org>
2751
2752         Web Inspector: Native Memory Instrumentation: adjust chunk transfer size for better speed.
2753         https://bugs.webkit.org/show_bug.cgi?id=109263
2754
2755         Reviewed by Yury Semikhatsky.
2756
2757         The chunk size is changed from 100 to 10000.
2758         addString counts only first 256 symbols of the string.o
2759
2760         * inspector/HeapGraphSerializer.cpp:
2761         (WebCore::HeapGraphSerializer::pushUpdateIfNeeded):
2762         (WebCore::HeapGraphSerializer::addString):
2763         * inspector/front-end/NativeMemorySnapshotView.js:
2764
2765 2013-02-08  Kentaro Hara  <haraken@chromium.org>
2766
2767         Support a relatedTarget attribute on focus/blur events
2768         https://bugs.webkit.org/show_bug.cgi?id=109176
2769
2770         Reviewed by Ojan Vafai.
2771
2772         In bug 76216, we supported a relatedTarget attribute on
2773         focusin/focusout events. We should also support it on focus/blur events.
2774
2775         See http://lists.w3.org/Archives/Public/www-dom/2012OctDec/0061.html
2776         for the www-dom discussion.
2777
2778         Test: fast/dom/shadow/shadow-boundary-events.html
2779               fast/events/related-target-focusevent.html
2780
2781         * dom/EventDispatchMediator.cpp:
2782         (WebCore::FocusEventDispatchMediator::create):
2783         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
2784         (WebCore::BlurEventDispatchMediator::create):
2785         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
2786         * dom/EventDispatchMediator.h:
2787         (FocusEventDispatchMediator):
2788         (BlurEventDispatchMediator):
2789         * dom/Node.cpp:
2790         (WebCore::Node::dispatchFocusInEvent):
2791         (WebCore::Node::dispatchFocusOutEvent):
2792         (WebCore::Node::dispatchFocusEvent):
2793         (WebCore::Node::dispatchBlurEvent):
2794
2795 2013-02-07  Yury Semikhatsky  <yurys@chromium.org>
2796
2797         Web Inspector: reduce number of native memory instrumentation categories
2798         https://bugs.webkit.org/show_bug.cgi?id=109146
2799
2800         Reviewed by Pavel Feldman.
2801
2802         Merged some of memory instrumentation categories.
2803
2804         * dom/WebCoreMemoryInstrumentation.cpp:
2805         (WebCore):
2806         * inspector/front-end/NativeMemorySnapshotView.js:
2807         (WebInspector.MemoryBlockViewProperties._initialize):
2808         * platform/PlatformMemoryInstrumentation.cpp:
2809         (WebCore):
2810
2811 2013-02-07  Mike West  <mkwst@chromium.org>
2812
2813         <iframe seamless> should avoid vertical scrollbars during the initial layout passes.
2814         https://bugs.webkit.org/show_bug.cgi?id=87707
2815
2816         Reviewed by Eric Seidel.
2817
2818         Seamless documents currently render incorrectly when their content fills
2819         the width of the container into which they're placed. Because FrameView
2820         assumes that the container's size is properly set before the first pass
2821         of layout, vertical scrollbars are incorrectly forced onto seamless
2822         content, because seamless sets the container's height to 0 before
2823         handing it off to FrameView for layout. The scrollbars make the
2824         available width for the seamless document ~15px smaller than it should
2825         be, resulting in content getting bumped to the next line.
2826
2827         This patch special-cases FrameView::calculateScrollbarModesForLayout in
2828         order to force scrollbars off for seamless documents with a full visible
2829         height of 0px. Once the layout pass has grabbed the content height and
2830         applied it to the visible height, scrollbars will again be applicable.
2831
2832         The change should be covered by rebaselines for the newly-passing
2833         results in fast/frame/seamless-{float,inline}.html
2834
2835         * page/FrameView.cpp:
2836         (WebCore::FrameView::calculateScrollbarModesForLayout):
2837             If we're rendering a seamless document, and the full visible height
2838             is 0, and the vertical scrollbar would otherwise be ScrollbarAuto,
2839             then force ScrollbarAlwaysOff.
2840
2841 2013-02-07  Kent Tamura  <tkent@chromium.org>
2842
2843         document.activeElement should not return a non-focusable element
2844         https://bugs.webkit.org/show_bug.cgi?id=86707
2845
2846         Reviewed by Hajime Morita.
2847
2848         This is based on a patch by Arpita Bahuguna.
2849
2850         Test: fast/dom/HTMLDocument/set-focus-on-valid-element.html
2851
2852         * dom/Document.cpp:
2853         (WebCore::Document::setFocusedNode):
2854         Added check for verifying that the node to be focused is
2855         focusable. However, this check should be skipped for HTMLPlugInElement
2856         because it has special behavior.
2857
2858 2013-02-07  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2859
2860         Web Inspector: Fix front-end compilation warnings related to WebInspector.SidebarPane
2861         https://bugs.webkit.org/show_bug.cgi?id=109259
2862
2863         Reviewed by Vsevolod Vlasov.
2864
2865         * inspector/front-end/DOMBreakpointsSidebarPane.js:
2866         (WebInspector.DOMBreakpointsSidebarPane.Proxy):
2867         * inspector/front-end/SidebarPane.js:
2868
2869 2013-02-07  Kentaro Hara  <haraken@chromium.org>
2870
2871         [V8] enum V8HiddenPropertyCreationType is not used
2872         https://bugs.webkit.org/show_bug.cgi?id=109250
2873
2874         Reviewed by Adam Barth.
2875
2876         V8HiddenPropertyCreationType is always NewSymbol. We can remove the enum.
2877
2878         No tests. No change in behavior.
2879
2880         * bindings/v8/V8HiddenPropertyName.cpp:
2881         (WebCore::hiddenReferenceName):
2882         * bindings/v8/V8HiddenPropertyName.h:
2883         (WebCore):
2884
2885 2013-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2886
2887         Unreviewed, rolling out r142212.
2888         http://trac.webkit.org/changeset/142212
2889         https://bugs.webkit.org/show_bug.cgi?id=109255
2890
2891         Causes ASSERT(!m_installed) on launch (Requested by smfr on
2892         #webkit).
2893
2894         * WebCore.exp.in:
2895         * platform/MemoryPressureHandler.cpp:
2896         (WebCore):
2897         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2898         * platform/MemoryPressureHandler.h:
2899         (MemoryPressureHandler):
2900         * platform/mac/MemoryPressureHandlerMac.mm:
2901         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2902
2903 2013-02-07  Hanyee Kim  <choco@company100.net>
2904
2905         NamedFlowCollection should be a ContextDestructionObserver
2906         https://bugs.webkit.org/show_bug.cgi?id=99239
2907
2908         Reviewed by Adam Barth
2909
2910         This patch removes the raw pointer of Document in NamedFlowCollection.
2911         It could be replaced with ContextDestructionObserver.
2912         ContextDestructionObserver has the pointer and clears the pointer
2913         automatically when the document is destroyed. 
2914
2915         * dom/Document.cpp:
2916         (WebCore::Document::~Document):
2917         * dom/NamedFlowCollection.cpp:
2918         (WebCore::NamedFlowCollection::NamedFlowCollection):
2919         (WebCore::NamedFlowCollection::ensureFlowWithName):
2920         (WebCore::NamedFlowCollection::discardNamedFlow):
2921         (WebCore::NamedFlowCollection::document):
2922         (WebCore):
2923         * dom/NamedFlowCollection.h:
2924         (NamedFlowCollection):
2925
2926 2013-02-07  Dean Jackson  <dino@apple.com>
2927
2928         Followup review suggestions from Alexey Proskuryakov on
2929         https://bugs.webkit.org/show_bug.cgi?id=109215
2930
2931         Don't provide a charset on embedded SVG, especially
2932         with incorrect syntax :)
2933
2934         * css/mediaControlsQuickTime.css:
2935         (video::-webkit-media-controls-toggle-closed-captions-button):
2936         (video::-webkit-media-controls-closed-captions-track-list li.selected):
2937         (video::-webkit-media-controls-closed-captions-track-list li.selected:hover):
2938
2939 2013-02-07  Seulgi Kim  <seulgikim@company100.net>
2940
2941         [Gtk] RunLoop::run shuold run current thread's run loop.
2942         https://bugs.webkit.org/show_bug.cgi?id=107887
2943
2944         Reviewed by Martin Robinson.
2945
2946         Currently, RunLoop in Gtk can use just main thread's event loop.
2947         But the other ports are implemented to use RunLoop in sub threads.
2948
2949         This patch makes RunLoop constructor create new context, not use default
2950         context.
2951         But in the main thread still uses default context to use main event loop
2952         since there is some codes using glib directly (e.g. in
2953         LayerTreeHostGtk::scheduleLayerFlush).
2954
2955         No new tests. There is no case that uses RunLoop in off the main thread
2956         yet.
2957
2958         * platform/gtk/RunLoopGtk.cpp:
2959         (WebCore::RunLoop::RunLoop):
2960         (WebCore::RunLoop::run):
2961
2962 2013-02-07  Kentaro Hara  <haraken@chromium.org>
2963
2964         [V8] Move V8DOMWrapper::setNamedHiddenReference() to V8HiddenPropertyName.h
2965         https://bugs.webkit.org/show_bug.cgi?id=109186
2966
2967         Reviewed by Adam Barth.
2968
2969         V8HiddenPropertyName.h is a right place for setNamedHiddenReference().
2970
2971         No tests. No change in behavior.
2972
2973         * bindings/scripts/CodeGeneratorV8.pm:
2974         (GenerateNormalAttrGetter):
2975         * bindings/scripts/test/V8/V8TestObj.cpp:
2976         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
2977         * bindings/v8/V8DOMWrapper.cpp:
2978         * bindings/v8/V8DOMWrapper.h:
2979         (V8DOMWrapper):
2980         * bindings/v8/V8HiddenPropertyName.cpp:
2981         (WebCore::V8HiddenPropertyName::hiddenReferenceName):
2982         (WebCore::V8HiddenPropertyName::setNamedHiddenReference):
2983         (WebCore):
2984         * bindings/v8/V8HiddenPropertyName.h:
2985         (V8HiddenPropertyName):
2986         (WebCore::V8HiddenPropertyName::V8HiddenPropertyName):
2987         * bindings/v8/custom/V8MessageChannelCustom.cpp:
2988         (WebCore::V8MessageChannel::constructorCallbackCustom):
2989         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2990         (WebCore::toV8Object):
2991
2992 2013-02-07  Elliott Sprehn  <esprehn@chromium.org>
2993
2994         getComputedStyle() doesn't report intermediate values during a transition of a pseudo element
2995         https://bugs.webkit.org/show_bug.cgi?id=106535
2996
2997         Reviewed by Ojan Vafai.
2998
2999         Element::computedStyle and CSSComputedStyleDeclaration::getPropertyCSSValue
3000         should use the PseudoElement and it's renderer if they exist so that
3001         querying the computed style while an animation is running returns
3002         the intermediate values.
3003
3004         No new tests, updated existing tests.
3005
3006         * css/CSSComputedStyleDeclaration.cpp:
3007         (WebCore::CSSComputedStyleDeclaration::styledNode): Added, returns either the PseudoElement or the Node.
3008         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated to use styledNode.
3009         * css/CSSComputedStyleDeclaration.h:
3010         (CSSComputedStyleDeclaration):
3011         * dom/Element.cpp:
3012         (WebCore::Element::computedStyle): Check the PseudoElement, not just the cached pseudo style.
3013         * dom/ElementRareData.h:
3014         (WebCore::ElementRareData::pseudoElement): Remove ASSERT_NOT_REACHED so passing other pseudos returns 0.
3015
3016 2013-02-07  Mark Lam  <mark.lam@apple.com>
3017
3018         Add a comment about how the SQLTransaction state machine works.
3019         https://bugs.webkit.org/show_bug.cgi?id=109243.
3020
3021         Rubber stamped by Anders Carlsson.
3022
3023         No new tests.
3024
3025         * Modules/webdatabase/SQLTransactionBackend.cpp:
3026
3027 2013-02-06  Gavin Barraclough  <barraclough@apple.com>
3028
3029         PluginProcess should quit immediately if idle in response to low-memory notifications
3030         https://bugs.webkit.org/show_bug.cgi?id=109103
3031         <rdar://problem/12679827>
3032
3033         Reviewed by Darin Adler.
3034
3035         This patch allows a process to set a custom callback for low memory warnings
3036         (defaulting to the current behaviour, as implemented in releaseMemory).
3037
3038         MemoryPressureHandler::install is currently used for two purposes - it is
3039         called when first initializing a low memory handler for a process, and also
3040         used to reinstall the handler (on a delay) after the notification has occured.
3041         Since reinstallation doesn't change the callback, split these behaviours out -
3042         MemoryPressureHandler::initialize is added to initialization, and accepts a
3043         custom callback, install in made private.
3044
3045         * WebCore.exp.in:
3046             - Added export for releaseMemory.
3047         * platform/MemoryPressureHandler.cpp:
3048         (WebCore::MemoryPressureHandler::releaseMemory):
3049             - Added null implementation for non-Mac builds.
3050         * platform/MemoryPressureHandler.h:
3051         (WebCore::MemoryPressureHandler::initialize):
3052             - distinguish initialization from reinstallations, allow handler to be set.
3053         (MemoryPressureHandler):
3054             - Added m_lowMemoryHandler function pointer member variable.
3055         * platform/mac/MemoryPressureHandlerMac.mm:
3056         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
3057             - Call m_lowMemoryHandler instead of releaseMemory.
3058
3059 2013-02-07  Kentaro Hara  <haraken@chromium.org>
3060
3061         [V8] #ifndef NDEBUG is redundant for assertContextHasCorrectPrototype()
3062         https://bugs.webkit.org/show_bug.cgi?id=109167
3063
3064         Reviewed by Andreas Kling.
3065
3066         Given that assertContextHasCorrectPrototype() is anyway empty in a release
3067         build, we don't need to surround it with #ifndef NDEBUG.
3068
3069         No tests. No change in behavior.
3070
3071         * bindings/v8/DOMWrapperWorld.cpp:
3072         (WebCore::DOMWrapperWorld::assertContextHasCorrectPrototype):
3073         * bindings/v8/DOMWrapperWorld.h:
3074         (DOMWrapperWorld):
3075         (WebCore::DOMWrapperWorld::isolated):
3076
3077 2013-02-07  Alexei Svitkine  <asvitkine@chromium.org>
3078
3079         Chromium: Hang parsing bidi control chars on Mac OS X 10.6
3080         https://bugs.webkit.org/show_bug.cgi?id=108877
3081
3082         This was broken a while ago by:
3083             https://bugs.webkit.org/show_bug.cgi?id=83045
3084
3085         On 10.6, CoreText will not produce any runs covering the
3086         Unicode BiDi RTL mark control char, which causes an infinite
3087         loop in ComplexTextController::indexOfCurrentRun() due to no
3088         run covering the character at offset 0.
3089
3090         This patch fixes that issue by finding the earliest run
3091         explicitly via the minimum stringBegin() index instead of
3092         relying on a run existing that covers offset 0.
3093
3094         Fixes hang on many BiDi wikipedia pages on Chromium/Mac10.6.
3095         Chromium bug: http://crbug.com/167844
3096
3097         New test in the same style as the harfbuzz-buffer-overrun.html
3098         test (in the same folder).
3099
3100         Reviewed by Eric Seidel.
3101
3102         Test: fast/text/international/rtl-mark.html
3103
3104         * platform/graphics/mac/ComplexTextController.cpp:
3105         (WebCore::ComplexTextController::indexOfCurrentRun):
3106
3107 2013-02-07  Kentaro Hara  <haraken@chromium.org>
3108
3109         Implement FocusEvent constructor
3110         https://bugs.webkit.org/show_bug.cgi?id=109170
3111
3112         Reviewed by Adam Barth.
3113
3114         Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
3115
3116         FocusEvent constructor should be implemented under a DOM4_EVENTS_CONSTRUCTOR
3117         flag, which is enabled on Chromium and Safari.
3118
3119         Test: fast/events/constructors/focus-event-constructor.html
3120
3121         * dom/FocusEvent.cpp:
3122         (WebCore::FocusEventInit::FocusEventInit):
3123         (WebCore):
3124         (WebCore::FocusEvent::FocusEvent):
3125         * dom/FocusEvent.h:
3126         (FocusEventInit):
3127         (WebCore):
3128         (WebCore::FocusEvent::create):
3129         (FocusEvent):
3130         * dom/FocusEvent.idl:
3131         * page/DOMWindow.idl:
3132
3133 2013-02-07  Elliott Sprehn  <esprehn@chromium.org>
3134
3135         HTML parser should queue MutationRecords for its operations
3136         https://bugs.webkit.org/show_bug.cgi?id=89351
3137
3138         Reviewed by Eric Seidel.
3139
3140         Generate mutation records inside the parser. This is done by using a
3141         ChildListMutationScope in the ContainerNode::parser* methods and then
3142         adding delivery before each <script> element would be processed by
3143         the parser.
3144
3145         Test: fast/dom/MutationObserver/parser-mutations.html
3146
3147         * dom/ContainerNode.cpp:
3148         (WebCore::ContainerNode::takeAllChildrenFrom):
3149         (WebCore::ContainerNode::parserInsertBefore):
3150         (WebCore::ContainerNode::parserRemoveChild):
3151         (WebCore::ContainerNode::parserAppendChild):
3152         * html/parser/HTMLScriptRunner.cpp:
3153         (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
3154         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
3155         (WebCore::HTMLScriptRunner::execute):
3156         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
3157         (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
3158         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
3159         (WebCore::HTMLScriptRunner::runScript):
3160
3161 2013-02-07  Kentaro Hara  <haraken@chromium.org>
3162
3163         Fix FIXMEs in WindowFeatures.h
3164         https://bugs.webkit.org/show_bug.cgi?id=109151
3165
3166         Reviewed by Adam Barth.
3167
3168         1. // FIXME: We can delete this constructor once V8 showModalDialog is
3169            // changed to use DOMWindow.
3170
3171         This FIXME is not right. The WindowFeatures() constructor is used by
3172         other ports too (e.g. WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp).
3173         So we should remove the FIXME.
3174
3175         2. // FIXME: We can make these functions private non-member functions
3176            // once V8 showModalDialog is changed to use DOMWindow.
3177
3178         Given that V8 now uses DOMWindow in showModalDialog(), we can make the
3179         methods private.
3180
3181         No tests. No change in behavior.
3182
3183         * page/WindowFeatures.h:
3184         (WebCore):
3185         (WebCore::WindowFeatures::WindowFeatures):
3186         (WindowFeatures):
3187
3188 2013-02-07  Adam Barth  <abarth@webkit.org>
3189
3190         fast/parser/document-write-noscript.html fails for threaded HTML parser
3191         https://bugs.webkit.org/show_bug.cgi?id=109237
3192
3193         Reviewed by Eric Seidel.
3194
3195         If there are multiple calls to document.write in an external script, we
3196         need to wait for them all to complete before invalidating the
3197         speculative tokens. Instead of doing this when we unwind the
3198         document.write call stack, we do this when we're about to resume
3199         parsing after script execution.
3200
3201         Test: fast/parser/document-write-basic.html
3202
3203         * html/parser/HTMLDocumentParser.cpp:
3204         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
3205         (WebCore::HTMLDocumentParser::insert):
3206         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
3207
3208 2013-02-07  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
3209
3210         Fix build when compiling with css3-text and css3-conditional-rules feature flags enabled.
3211         https://bugs.webkit.org/show_bug.cgi?id=109217
3212
3213         Reviewed by Benjamin Poulain.
3214
3215         * css/InspectorCSSOMWrappers.cpp:
3216         (WebCore::InspectorCSSOMWrappers::collect):
3217
3218 2013-02-07  Keishi Hattori  <keishi@webkit.org>
3219
3220         REGRESSION (r140778): Calendar Picker doesn't open when the element has the required attribute
3221         https://bugs.webkit.org/show_bug.cgi?id=109136
3222
3223         Reviewed by Kent Tamura.
3224
3225         Calendar picker was using the "Clear" button to calculate the window width.
3226         Since it doesn't exist when the input element has a required attribute,
3227         it was throwing an error. This patch fixes the width calculating logic.
3228
3229         Tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html
3230                platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required.html
3231
3232         * Resources/pagepopups/calendarPicker.css:
3233         (.today-clear-area):
3234         * Resources/pagepopups/calendarPicker.js:
3235         (CalendarPicker.prototype.fixWindowSize): Fixing the logic to calculate
3236         the width. We don't want to use clear button because it doesn't exist
3237         when a value is required.
3238
3239 2013-02-07  Terry Anderson  <tdanderson@chromium.org>
3240
3241         Non-scrollable divs and non-scrollable iframes can scroll with touch
3242         https://bugs.webkit.org/show_bug.cgi?id=109087
3243
3244         Reviewed by Eric Seidel.
3245
3246         Tests: fast/events/touch/gesture/touch-gesture-noscroll-div.html
3247                fast/events/touch/gesture/touch-gesture-noscroll-iframe.html
3248
3249         When finding a candidate for a scrollable node in
3250         EventHandler::handleGestureScrollUpdate(), select the document node
3251         if it is reached before any scrollable element when walking up the DOM
3252         tree. Also ensure that calling RenderLayer::scrollBy() for a document
3253         node does not result in scrolling if the element is not scrollable.
3254
3255         * page/EventHandler.cpp:
3256         (WebCore::closestScrollableNodeCandidate):
3257         (WebCore::EventHandler::handleGestureScrollUpdate):
3258         * rendering/RenderLayer.cpp:
3259         (WebCore::RenderLayer::scrollBy):
3260
3261 2013-02-07  Mark Lam  <mark.lam@apple.com>
3262
3263         Introduce SQLTransactionBackend and SQLTransactionBackendSync [Part 2].
3264         https://bugs.webkit.org/show_bug.cgi?id=109109.
3265
3266         Reviewed by Anders Carlsson.
3267
3268         Adding back the new SQLTransaction and SQLTransactionSync files.
3269
3270         No new tests.
3271
3272         * Modules/webdatabase/SQLTransaction.cpp: Added.
3273         (WebCore::SQLTransaction::create):
3274         (WebCore::SQLTransaction::SQLTransaction):
3275         (WebCore::SQLTransaction::from):
3276         * Modules/webdatabase/SQLTransaction.h: Added.
3277         (SQLTransaction):
3278         * Modules/webdatabase/SQLTransactionSync.cpp: Added.
3279         (WebCore::SQLTransactionSync::create):
3280         (WebCore::SQLTransactionSync::SQLTransactionSync):
3281         (WebCore::SQLTransactionSync::from):
3282         * Modules/webdatabase/SQLTransactionSync.h: Added.
3283         (SQLTransactionSync):
3284
3285 2013-02-07  Mark Lam  <mark.lam@apple.com>
3286
3287         Introduce SQLTransactionBackend and SQLTransactionBackendSync.
3288         https://bugs.webkit.org/show_bug.cgi?id=109109.
3289
3290         Reviewed by Anders Carlsson.
3291
3292         - Renamed SQLTransaction and SQLTransactionSync to SQLTransactionBackend
3293           and SQLTransactionBackendSync respectively.
3294         - Added back SQLTransaction and SQLTransactionSync as new files, and have
3295           their classes extends their respective backends. This is a stop gap
3296           measure to keep things working until the front-end and back-end can be
3297           properly split.
3298           Note: these files will be committed in a subsequent commit to ensure
3299           that the patching goes smoothly.
3300         - Where needed, I made use of new SQLTransaction::from() and
3301           SQLTransactionSync::from() static methods that "get" the front-end
3302           transactions from the back-ends. This is also a stop gap measure to
3303           keep things working until the proper refactoring is complete.
3304         - Fixed up pre-existing style checker violations that are now detected
3305           on code that were touched during my renaming.
3306         - Added the back-end files to all the build files.
3307
3308         No new tests.
3309
3310         * CMakeLists.txt:
3311         * GNUmakefile.list.am:
3312         * Modules/webdatabase/Database.cpp:
3313         (WebCore::Database::scheduleTransactionStep):
3314         * Modules/webdatabase/Database.h:
3315         (Database):
3316         * Modules/webdatabase/DatabaseBackend.h:
3317         (DatabaseBackend):
3318         * Modules/webdatabase/DatabaseTask.cpp:
3319         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
3320         * Modules/webdatabase/DatabaseTask.h:
3321         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::create):
3322         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::transaction):
3323         (DatabaseBackendAsync::DatabaseTransactionTask):
3324         * Modules/webdatabase/SQLTransaction.cpp: Removed.
3325         * Modules/webdatabase/SQLTransaction.h: Removed.
3326         * Modules/webdatabase/SQLTransactionBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLTransaction.cpp.
3327         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
3328         (WebCore::SQLTransactionBackend::~SQLTransactionBackend):
3329         (WebCore::SQLTransactionBackend::executeSQL):
3330         (WebCore::SQLTransactionBackend::enqueueStatement):
3331         (WebCore::SQLTransactionBackend::debugStepName):
3332         (WebCore::SQLTransactionBackend::checkAndHandleClosedOrInterruptedDatabase):
3333         (WebCore::SQLTransactionBackend::performNextStep):
3334         (WebCore::SQLTransactionBackend::performPendingCallback):
3335         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
3336         (WebCore::SQLTransactionBackend::acquireLock):
3337         (WebCore::SQLTransactionBackend::lockAcquired):
3338         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
3339         (WebCore::SQLTransactionBackend::deliverTransactionCallback):
3340         (WebCore::SQLTransactionBackend::scheduleToRunStatements):
3341         (WebCore::SQLTransactionBackend::runStatements):
3342         (WebCore::SQLTransactionBackend::getNextStatement):
3343         (WebCore::SQLTransactionBackend::runCurrentStatement):
3344         (WebCore::SQLTransactionBackend::handleCurrentStatementError):
3345         (WebCore::SQLTransactionBackend::deliverStatementCallback):
3346         (WebCore::SQLTransactionBackend::deliverQuotaIncreaseCallback):
3347         (WebCore::SQLTransactionBackend::postflightAndCommit):
3348         (WebCore::SQLTransactionBackend::deliverSuccessCallback):
3349         (WebCore::SQLTransactionBackend::cleanupAfterSuccessCallback):
3350         (WebCore::SQLTransactionBackend::handleTransactionError):
3351         (WebCore::SQLTransactionBackend::deliverTransactionErrorCallback):
3352         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
3353         * Modules/webdatabase/SQLTransactionBackend.h: Copied from Source/WebCore/Modules/webdatabase/SQLTransaction.h.
3354         (SQLTransactionBackend):
3355         * Modules/webdatabase/SQLTransactionBackendSync.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLTransactionSync.cpp.
3356         (WebCore::SQLTransactionBackendSync::SQLTransactionBackendSync):
3357         (WebCore::SQLTransactionBackendSync::~SQLTransactionBackendSync):
3358         (WebCore::SQLTransactionBackendSync::executeSQL):
3359         (WebCore::SQLTransactionBackendSync::begin):
3360         (WebCore::SQLTransactionBackendSync::execute):
3361         (WebCore::SQLTransactionBackendSync::commit):
3362         (WebCore::SQLTransactionBackendSync::rollback):
3363         * Modules/webdatabase/SQLTransactionBackendSync.h: Copied from Source/WebCore/Modules/webdatabase/SQLTransactionSync.h.
3364         (SQLTransactionBackendSync):
3365         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
3366         (WebCore::getDatabaseIdentifier):
3367         (WebCore::SQLTransactionCoordinator::processPendingTransactions):
3368         (WebCore::SQLTransactionCoordinator::acquireLock):
3369         (WebCore::SQLTransactionCoordinator::releaseLock):
3370         (WebCore::SQLTransactionCoordinator::shutdown):
3371         * Modules/webdatabase/SQLTransactionCoordinator.h:
3372         (SQLTransactionCoordinator):
3373         (WebCore::SQLTransactionCoordinator::SQLTransactionCoordinator):
3374         (CoordinationInfo):
3375         * Modules/webdatabase/SQLTransactionSync.cpp: Removed.
3376         * Modules/webdatabase/SQLTransactionSync.h: Removed.
3377         * Target.pri:
3378         * WebCore.gypi:
3379         * WebCore.vcproj/WebCore.vcproj:
3380         * WebCore.vcxproj/WebCore.vcxproj:
3381         * WebCore.vcxproj/WebCore.vcxproj.filters:
3382         * WebCore.xcodeproj/project.pbxproj:
3383
3384 2013-02-07  Dean Jackson  <dino@apple.com>
3385
3386         Use new speech bubble artwork for captions menu button
3387         https://bugs.webkit.org/show_bug.cgi?id=109215
3388
3389         Reviewed by Eric Carlson.
3390
3391         Rather than call into RenderTheme to display this button, embed artwork
3392         into the CSS. This means we can remove some uncalled methods in
3393         RenderTheme.
3394
3395         * css/mediaControlsQuickTime.css:
3396         (video::-webkit-media-controls-toggle-closed-captions-button): New background image using SVG.
3397         * rendering/RenderTheme.cpp:
3398         (WebCore::RenderTheme::paint): Don't call the specific painter for the CC button.
3399         * rendering/RenderTheme.h: Remove unused function.
3400         * rendering/RenderThemeMac.h: Ditto.
3401         * rendering/RenderThemeMac.mm: Ditto.
3402
3403 2013-02-07  Michelangelo De Simone  <michelangelo@webkit.org>
3404
3405         [CSS Shaders] Add the last blending step
3406         https://bugs.webkit.org/show_bug.cgi?id=104012
3407
3408         The resulting blended color in mix() is now weighted according to
3409         the original element's backdrop alpha value.
3410
3411         Reviewed by Dean Jackson.
3412
3413         Test: css3/filters/custom/custom-filter-blend-fractional-destination-alpha.html
3414
3415         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
3416         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader):
3417
3418 2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
3419
3420         Fix two exports of WebCore symbols on iOS
3421         https://bugs.webkit.org/show_bug.cgi?id=109238
3422
3423         Reviewed by David Kilzer.
3424
3425         * WebCore.exp.in: Export wkCTFontTransformGlyphs but not
3426         wkCGContextDrawsWithCorrectShado