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