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