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