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