3c3c65dfed3b63a0be538b0b6a8af4441d976b5d
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-11  Kenneth Russell  <kbr@google.com>
2
3         Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
4         https://bugs.webkit.org/show_bug.cgi?id=109127
5
6         Reviewed by Dean Jackson.
7
8         No new tests. Built and tested WebKit and Chromium with this change.
9
10         * platform/graphics/ANGLEWebKitBridge.cpp:
11         (WebCore):
12             Define temporary typedef spanning int -> size_t change.
13         (WebCore::getValidationResultValue):
14         (WebCore::getSymbolInfo):
15             Use temporary typedef.
16
17 2013-02-11  Kentaro Hara  <haraken@chromium.org>
18
19         [V8] ScheduledAction::m_context can be empty, so we shouldn't
20         retrieve an Isolate by using m_context->GetIsolate()
21         https://bugs.webkit.org/show_bug.cgi?id=109523
22
23         Reviewed by Adam Barth.
24
25         Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges
26
27         Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate().
28         This can crash because ScheduledAction::m_context can be empty. Specifically,
29         ScheduledAction::m_context is set to ScriptController::currentWorldContext(),
30         which can return an empty handle when a frame does not exist. In addition,
31         'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.
32
33         Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.
34
35         No tests. The Chromium crash report doesn't provide enough information
36         to reproduce the bug.
37
38         * bindings/v8/ScheduledAction.cpp:
39         (WebCore::ScheduledAction::ScheduledAction):
40         (WebCore):
41         (WebCore::ScheduledAction::~ScheduledAction):
42         * bindings/v8/ScheduledAction.h:
43         (ScheduledAction):
44         * bindings/v8/custom/V8DOMWindowCustom.cpp:
45         (WebCore::WindowSetTimeoutImpl):
46         * bindings/v8/custom/V8WorkerContextCustom.cpp:
47         (WebCore::SetTimeoutOrInterval):
48
49 2013-02-11  Adenilson Cavalcanti  <cavalcantii@gmail.com>
50
51         Build fix: r142549 broke EFL build
52         https://bugs.webkit.org/show_bug.cgi?id=109527
53
54         Reviewed by Kentaro Hara.
55
56         No new tests, no change on behavior.
57
58         * CMakeLists.txt:
59
60 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
61
62         REGRESSION (r142520?): Space no longer scrolls the page
63         https://bugs.webkit.org/show_bug.cgi?id=109526
64
65         Reviewed by Tim Horton.
66
67         ScrollingTree::updateTreeFromStateNode() used to bail early when it had
68         no children (no fixed or sticky elements), but that left updateAfterChildren()
69         uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
70         position.
71
72         * page/scrolling/ScrollingTree.cpp:
73         (WebCore::ScrollingTree::updateTreeFromStateNode):
74
75 2013-02-11  Tim Horton  <timothy_horton@apple.com>
76
77         Remove extra early-return in FrameView::setScrollPosition
78
79         Rubber-stamped by Simon Fraser.
80
81         * page/FrameView.cpp:
82         (WebCore::FrameView::setScrollPosition):
83
84 2013-02-11  Arko Saha  <arko@motorola.com>
85
86         [Microdata] Fix crash after r141034 in chromuim port
87         https://bugs.webkit.org/show_bug.cgi?id=109514
88
89         Reviewed by Ryosuke Niwa.
90
91         Added V8SkipVTableValidation extended attribute to skip
92         VTable validation check for DOMSettableTokenList interface.
93
94         This patch fixes below test failures:
95         Tests: fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html
96                fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html
97                fast/dom/MicroData/element-with-empty-itemprop.html
98                fast/dom/MicroData/itemprop-add-remove-tokens.html
99                fast/dom/MicroData/itemprop-for-an-element-must-be-correct.html
100                fast/dom/MicroData/itemprop-must-be-read-only.html
101                fast/dom/MicroData/itemprop-reflected-by-itemProp-property.html
102                fast/dom/MicroData/itemref-add-remove-tokens.html
103                fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property.html
104                fast/dom/MicroData/itemref-for-an-element-must-be-correct.html
105                fast/dom/MicroData/itemref-must-be-read-only.html
106                fast/dom/MicroData/itemtype-add-remove-tokens.html
107                fast/dom/MicroData/itemtype-attribute-test.html
108                fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html
109                fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
110                fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html
111                fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html
112
113         * html/DOMSettableTokenList.idl:
114
115 2013-02-11  Adam Barth  <abarth@webkit.org>
116
117         Load event fires too early with threaded HTML parser (take 2)
118         https://bugs.webkit.org/show_bug.cgi?id=109485
119
120         Reviewed by Eric Seidel.
121
122         This patch restores the code that was removed in
123         http://trac.webkit.org/changeset/142492 and adds code to
124         DocumentLoader.cpp to avoid the regression.
125
126         * dom/Document.cpp:
127         (WebCore::Document::hasActiveParser):
128         (WebCore::Document::decrementActiveParserCount):
129         * loader/DocumentLoader.cpp:
130         (WebCore::DocumentLoader::isLoadingInAPISense):
131
132 2013-02-11  Eric Seidel  <eric@webkit.org>
133
134         Fold HTMLTokenizerState back into HTMLTokenizer now that MarkupTokenizerBase is RFG
135         https://bugs.webkit.org/show_bug.cgi?id=109502
136
137         Reviewed by Tony Gentilcore.
138
139         Just a search replace of HTMLTokenizerState with HTMLTokenizer and moving the enum.
140         This restores us to the peacefull world pre-NEW_XML.
141
142         * html/parser/BackgroundHTMLParser.cpp:
143         (WebCore::BackgroundHTMLParser::forcePlaintextForTextDocument):
144         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
145         * html/parser/HTMLDocumentParser.cpp:
146         (WebCore::tokenizerStateForContextElement):
147         (WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
148         (WebCore::HTMLDocumentParser::pumpTokenizer):
149         * html/parser/HTMLTokenizer.cpp:
150         (WebCore::isEndTagBufferingState):
151         (WebCore):
152         (WebCore::HTMLTokenizer::reset):
153         (WebCore::HTMLTokenizer::flushEmitAndResumeIn):
154         (WebCore::HTMLTokenizer::nextToken):
155         (WebCore::HTMLTokenizer::updateStateFor):
156         * html/parser/HTMLTokenizer.h:
157         (HTMLTokenizer):
158         (WebCore::HTMLTokenizer::create):
159         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
160         (WebCore::HTMLTokenizer::emitEndOfFile):
161         * html/parser/HTMLTreeBuilder.cpp:
162         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
163         (WebCore::HTMLTreeBuilder::processEndTag):
164         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
165         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
166         (WebCore::HTMLTreeBuilder::processScriptStartTag):
167         * html/parser/TextViewSourceParser.cpp:
168         (WebCore::TextViewSourceParser::TextViewSourceParser):
169
170 2013-02-11  Kentaro Hara  <haraken@chromium.org>
171
172         Build fix after r142528
173         https://bugs.webkit.org/show_bug.cgi?id=109520
174
175         Reviewed by Eric Seidel.
176
177         r142528 changed GIFImageReader from a struct to a class.
178         We also need to fix a forward declaration.
179
180         No tests.
181
182         * platform/image-decoders/gif/GIFImageDecoder.h:
183
184 2013-02-11  Nico Weber  <thakis@chromium.org>
185
186         Remove web intents code
187         https://bugs.webkit.org/show_bug.cgi?id=109501
188
189         Reviewed by Eric Seidel.
190
191         See thread "Removing ENABLE(WEB_INTENTS) code" on webkit-dev.
192
193         * DerivedSources.make:
194         * Modules/intents/DOMWindowIntents.cpp: Removed.
195         * Modules/intents/DOMWindowIntents.h: Removed.
196         * Modules/intents/DOMWindowIntents.idl: Removed.
197         * Modules/intents/DeliveredIntent.cpp: Removed.
198         * Modules/intents/DeliveredIntent.h: Removed.
199         * Modules/intents/DeliveredIntent.idl: Removed.
200         * Modules/intents/Intent.cpp: Removed.
201         * Modules/intents/Intent.h: Removed.
202         * Modules/intents/Intent.idl: Removed.
203         * Modules/intents/IntentRequest.cpp: Removed.
204         * Modules/intents/IntentRequest.h: Removed.
205         * Modules/intents/IntentResultCallback.h: Removed.
206         * Modules/intents/IntentResultCallback.idl: Removed.
207         * Modules/intents/NavigatorIntents.cpp: Removed.
208         * Modules/intents/NavigatorIntents.h: Removed.
209         * Modules/intents/NavigatorIntents.idl: Removed.
210         * WebCore.gyp/WebCore.gyp:
211         * WebCore.gypi:
212         * bindings/generic/RuntimeEnabledFeatures.cpp:
213         (WebCore):
214         * bindings/generic/RuntimeEnabledFeatures.h:
215         (RuntimeEnabledFeatures):
216         * bindings/v8/custom/V8IntentCustom.cpp: Removed.
217         * html/HTMLElementsAllInOne.cpp:
218         * html/HTMLIntentElement.cpp: Removed.
219         * html/HTMLIntentElement.h: Removed.
220         * html/HTMLIntentElement.idl: Removed.
221         * loader/EmptyClients.cpp:
222         * loader/EmptyClients.h:
223         (EmptyFrameLoaderClient):
224         * loader/FrameLoaderClient.h:
225         (WebCore):
226         * page/DOMWindow.idl:
227
228 2013-02-11  Eric Seidel  <eric@webkit.org>
229
230         Fix Mac build after http://trac.webkit.org/changeset/142535.
231
232         Unreviewed build fix.
233
234         * html/parser/HTMLTokenizer.h:
235         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
236
237 2013-02-11  David Farler  <dfarler@apple.com>
238
239         Make WebCore Derived Sources work with SDK identifiers too
240         https://bugs.webkit.org/show_bug.cgi?id=109324
241
242         Reviewed by Sam Weinig.
243
244         * WebCore.xcodeproj/project.pbxproj: Pass SDKROOT to make for DerivedSources.make
245
246 2013-02-11  Zhenyao Mo  <zmo@google.com>
247
248         WEBGL_compressed_texture_s3tc extension can be enabled even when not supported
249         https://bugs.webkit.org/show_bug.cgi?id=109508
250
251         Reviewed by Kenneth Russell.
252
253         * html/canvas/WebGLRenderingContext.cpp:
254         (WebCore):
255         (WebCore::WebGLRenderingContext::getExtension): Check whether the extension support is there before returning the extension pointer.
256
257 2013-02-11  Emil A Eklund  <eae@chromium.org>
258
259         Change RenderFrameSet::paint to use m-rows/m_cols directly.
260         https://bugs.webkit.org/show_bug.cgi?id=108503
261
262         Reviewed by Eric Seidel.
263
264         Test: fast/frames/invalid-frameset.html
265
266         * rendering/RenderFrameSet.cpp:
267         (WebCore::RenderFrameSet::paint):
268
269 2013-02-11  Yong Li  <yoli@rim.com>
270
271         XMLHttpRequestProgressEventThrottle::resume() always schedules timer even when unnecessary
272         https://bugs.webkit.org/show_bug.cgi?id=105348
273
274         Reviewed by Alexey Proskuryakov.
275
276         Let resume() clear the defer flag and return if there is deferred events to dispatch.
277
278         No new tests as this should not affect existing cross-platform behavior. It should be
279         OK as long as it doesn't break anything.
280
281         * xml/XMLHttpRequestProgressEventThrottle.cpp:
282         (WebCore::XMLHttpRequestProgressEventThrottle::resume):
283
284 2013-02-11  Eric Seidel  <eric@webkit.org>
285
286         Fold MarkupTokenizerBase into HTMLTokenizer now that it is the only subclass
287         https://bugs.webkit.org/show_bug.cgi?id=109499
288
289         Reviewed by Adam Barth.
290
291         For great justice.  And sanity.
292         Epic amount of template code deleted.
293
294         * GNUmakefile.list.am:
295         * Target.pri:
296         * WebCore.gypi:
297         * WebCore.vcproj/WebCore.vcproj:
298         * WebCore.vcxproj/WebCore.vcxproj:
299         * WebCore.vcxproj/WebCore.vcxproj.filters:
300         * WebCore.xcodeproj/project.pbxproj:
301         * html/parser/HTMLTokenizer.cpp:
302         (WebCore::HTMLTokenizer::HTMLTokenizer):
303         * html/parser/HTMLTokenizer.h:
304         (HTMLTokenizer):
305         (Checkpoint):
306         (WebCore::HTMLTokenizer::state):
307         (WebCore::HTMLTokenizer::setState):
308         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
309         (WebCore::HTMLTokenizer::bufferCharacter):
310         (WebCore::HTMLTokenizer::emitAndResumeIn):
311         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
312         (WebCore::HTMLTokenizer::emitEndOfFile):
313         (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
314         * xml/parser/MarkupTokenizerBase.h: Removed.
315
316 2013-02-11  Anton Vayvod  <avayvod@chromium.org>
317
318         [Text Autosizing] Collect narrow descendants and process them separately. Refactoring for
319         a change to follow.
320         https://bugs.webkit.org/show_bug.cgi?id=109054
321
322         Preparational change to combine narrow descendants of the same autosizing cluster into
323         groups by the width difference between the descendant and the block containing all text of
324         the parent autosizing cluster. The groups will be autosized with the same multiplier.
325
326         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
327         a large margin individually applied (via a CSS selector), causing them all to individually
328         appear narrower than their enclosing blockContainingAllText. Rather than making each of
329         these paragraphs into a separate cluster, we eventually want to be able to merge them back
330         together into one (or a few) descendant clusters.
331
332         Reviewed by Julien Chaffraix.
333
334         No behavioral changes thus no new tests or test changes.
335
336         * rendering/TextAutosizer.cpp:
337         (TextAutosizingClusterInfo): Vector of narrow descendants.
338         (WebCore::TextAutosizer::processCluster): Process narrow descendants separately.
339         (WebCore::TextAutosizer::processContainer):
340
341             Remember narrow descendants of the parent cluster for later processing.
342
343 2013-02-11  Enrica Casucci  <enrica@apple.com>
344
345         Add ENABLE_DELETION_UI to control the use of the deletion UI.
346         https://bugs.webkit.org/show_bug.cgi?id=109463.
347
348         Reviewed by Ryosuke Niwa.
349         
350         This patch adds #if ENABLE(DELETION_UI) in every spot where
351         DeleteButtonController is used. This class is now only instantiated
352         if the feature is enabled. I've also done some cleanup in the
353         DeleteButtonController class, removing unused methods and making
354         private some methods only used internally to the class.
355         Both DeleteButtonController and DeleteButton classes are now excluded
356         from the compilation if the feature is not enabled.
357
358         No new tests, no change of functionality.
359
360         * dom/ContainerNode.cpp:
361         (WebCore::ContainerNode::cloneChildNodes):
362         * editing/CompositeEditCommand.cpp:
363         (WebCore::EditCommandComposition::unapply):
364         (WebCore::EditCommandComposition::reapply):
365         (WebCore::CompositeEditCommand::apply):
366         * editing/DeleteButton.cpp:
367         * editing/DeleteButtonController.cpp:
368         * editing/DeleteButtonController.h: Some cleanup.
369         (WebCore::DeleteButtonController::enabled): Made private.
370         * editing/EditCommand.cpp:
371         (WebCore::EditCommand::EditCommand):
372         * editing/Editor.cpp:
373         (WebCore::Editor::notifyComponentsOnChangedSelection):
374         (WebCore::Editor::Editor):
375         (WebCore::Editor::rangeForPoint):
376         (WebCore::Editor::deviceScaleFactorChanged):
377         * editing/Editor.h:
378         * editing/htmlediting.cpp: avoidIntersectionWithNode is
379         used only if the feature is enabled.
380         * editing/htmlediting.h:
381         * editing/markup.cpp:
382         (WebCore::createMarkup):
383         (WebCore::createFragmentFromNodes):
384         * rendering/RenderTable.cpp: Removed unnecessary include
385         fo DeleteButtonController.h
386
387 2013-02-11  Rafael Weinstein  <rafaelw@chromium.org>
388
389         [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
390         https://bugs.webkit.org/show_bug.cgi?id=109338
391
392         Reviewed by Adam Barth.
393
394         This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
395         is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
396
397         Tests added to html5lib.
398
399         * html/parser/HTMLTreeBuilder.cpp:
400         (WebCore):
401         (WebCore::HTMLTreeBuilder::popAllTemplates):
402         (WebCore::HTMLTreeBuilder::processEndTag):
403         (WebCore::HTMLTreeBuilder::processEndOfFile):
404         * html/parser/HTMLTreeBuilder.h:
405         (HTMLTreeBuilder):
406
407 2013-02-11  Andreas Kling  <akling@apple.com>
408
409         RenderText::isAllCollapsibleWhitespace() shouldn't upconvert string to 16-bit.
410         <http://webkit.org/b/109354>
411
412         Reviewed by Eric Seidel.
413
414         254 KB progression on Membuster3.
415
416         * rendering/RenderText.cpp:
417         (WebCore::RenderText::isAllCollapsibleWhitespace):
418
419 2013-02-11  Alpha Lam  <hclam@chromium.org>
420
421         Fix code style violations in GIFImageReader.{cc|h}
422         https://bugs.webkit.org/show_bug.cgi?id=109007
423
424         Reviewed by Stephen White.
425
426         This is just a style clean up for GIFImageReader.{cc|h}.
427
428         There's going to be a lot changes in these two files and style check
429         will add a lot of noise in later reviews. Fix style problems first.
430
431         There is no change in logic at all. Just style fixes.
432
433         No new tests.
434
435         * platform/image-decoders/gif/GIFImageDecoder.cpp:
436         (WebCore::GIFImageDecoder::frameCount):
437         (WebCore::GIFImageDecoder::repetitionCount):
438         (WebCore::GIFImageDecoder::haveDecodedRow):
439         (WebCore::GIFImageDecoder::initFrameBuffer):
440         * platform/image-decoders/gif/GIFImageReader.cpp:
441         (GIFImageReader::outputRow):
442         (GIFImageReader::doLZW):
443         (GIFImageReader::read):
444         * platform/image-decoders/gif/GIFImageReader.h:
445         (GIFFrameContext):
446         (GIFFrameContext::GIFFrameContext):
447         (GIFFrameContext::~GIFFrameContext):
448         (GIFImageReader::GIFImageReader):
449         (GIFImageReader::~GIFImageReader):
450         (GIFImageReader):
451         (GIFImageReader::imagesCount):
452         (GIFImageReader::loopCount):
453         (GIFImageReader::globalColormap):
454         (GIFImageReader::globalColormapSize):
455         (GIFImageReader::frameContext):
456
457 2013-02-11  Bem Jones-Bey  <bjonesbe@adobe.com>
458
459         [CSS Exclusions] Handle shape-outside changing a float's overhang behavior
460         https://bugs.webkit.org/show_bug.cgi?id=106927
461
462         Reviewed by Julien Chaffraix.
463
464         When the position on a shape outside causes a float to spill out into
465         another block than it's container, it was not being drawn correctly. It
466         became apparent that in order to fix this properly, the approach to
467         positioning shape outsides and floats needed to be changed. The new
468         approach also fixes some other outstanding issues, like hit detection.
469
470         When a float has a shape outside, inline and float layout happens
471         using the exclusion shape bounds instead of the float's box.  The
472         effect of this is that the float itself no longer has any effect on
473         layout, both with respect to positioning of the float's siblings as
474         well as positioning the float's box. This means that when the float is
475         positioned, it is the shape's box that must obey the positioning rules
476         for floats. When the shape is given a position relative to the float's
477         box, the rules for float positioning determine where the shape sits
478         in the parent, causing the float's box to be offset by the position of
479         the shape. Since the float's box does not affect layout (due to the
480         shape), this is similar to relative positioning in that the offset is
481         a paint time occurrence.
482
483         So the new approach is to implement positioning of shape outside on
484         floats similar to how relative positioning is implemented, using a
485         RenderLayer.
486
487         This is also tested by the existing tests for shape outside on floats positioning.
488
489         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overhang.html
490
491         * rendering/ExclusionShapeOutsideInfo.h:
492         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Utility method to create a LayoutSize for computing the layer offset.
493         (ExclusionShapeOutsideInfo):
494         * rendering/LayoutState.cpp:
495         (WebCore::LayoutState::LayoutState): Check for floats with shape outside as well as in flow positioning.
496         * rendering/RenderBlock.cpp:
497         (WebCore::RenderBlock::flipFloatForWritingModeForChild): Remove old positioning implementation.
498         (WebCore::RenderBlock::paintFloats): Remove old positioning implementation.
499         (WebCore::RenderBlock::blockSelectionGaps): Check for floats with shape outside as well as in flow positioning.
500         (WebCore::RenderBlock::positionNewFloats): Remove old positioning implementation.
501         (WebCore::RenderBlock::addOverhangingFloats): Remove FIXME.
502         (WebCore::positionForPointRespectingEditingBoundaries): Check for floats with shape outside as well as in flow positioning.
503         * rendering/RenderBlock.h:
504         (RenderBlock): Remove old positioning implementation.
505         (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Remove old positioning implementation.
506         (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Remove old positioning implementation.
507         * rendering/RenderBox.cpp:
508         (WebCore::RenderBox::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
509         (WebCore::RenderBox::offsetFromContainer): Check for floats with shape outside as well as in flow positioning.
510         (WebCore::RenderBox::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
511         (WebCore::RenderBox::layoutOverflowRectForPropagation): Check for floats with shape outside as well as in flow positioning.
512         * rendering/RenderBox.h: Make floats with shape outside get a layer.
513         * rendering/RenderBoxModelObject.cpp:
514         (WebCore::RenderBoxModelObject::paintOffset): Method to return in flow
515             positioning offset + offset from shape outside on floats.
516         * rendering/RenderBoxModelObject.h:
517         (RenderBoxModelObject): Add paintOffset method.
518         * rendering/RenderInline.cpp:
519         (WebCore::RenderInline::clippedOverflowRectForRepaint): Check for floats with shape outside as well as in flow positioning.
520         (WebCore::RenderInline::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
521         (WebCore::RenderInline::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
522         * rendering/RenderLayer.cpp:
523         (WebCore::RenderLayer::updateLayerPosition): Check for floats with shape outside as well as in flow positioning.
524         (WebCore::RenderLayer::calculateClipRects): Check for floats with shape outside as well as in flow positioning.
525         * rendering/RenderLayer.h:
526         (WebCore::RenderLayer::paintOffset): Rename offsetForInFlowPosition to reflect that it's not just for
527             in flow positioning, it also reflects shape outside position on floats.
528         (RenderLayer):
529         * rendering/RenderObject.h:
530         (WebCore::RenderObject::hasPaintOffset): Determines if this object is in flow positioined or is a float with shape outside.
531         * rendering/style/RenderStyle.h: Add hasPaintOffset method, analagous to method with same name on RenderObject.
532
533 2013-02-11  Tim Horton  <timothy_horton@apple.com>
534
535         FrameView::setScrollPosition should clamp scroll position before handing it to
536         ScrollingCoordinator instead of depending on ScrollView to do this
537         https://bugs.webkit.org/show_bug.cgi?id=109497
538         <rdar://problem/12631789>
539
540         Reviewed by Simon Fraser.
541
542         Clamp scroll position before handing it to ScrollingCoordinator. Also, like ScrollView does,
543         bail out if we've already scrolled to the clamped scroll position.
544
545         Test: platform/mac-wk2/tiled-drawing/clamp-out-of-bounds-scrolls.html
546
547         * page/FrameView.cpp:
548         (WebCore::FrameView::setScrollPosition):
549
550 2013-02-11  Adam Barth  <abarth@webkit.org>
551
552         The threaded HTML parser should pass all the fast/parser tests
553         https://bugs.webkit.org/show_bug.cgi?id=109486
554
555         Reviewed by Tony Gentilcore.
556
557         This patch fixes the last two test failures in fast/parser, which were
558         crashes caused by not having a tokenizer when document.close() was
559         called. (The tokenizer is created lazily by calls to document.write,
560         which might not happen before document.close).
561
562         fast/parser/document-close-iframe-load.html
563         fast/parser/document-close-nested-iframe-load.html
564
565         In addition, I've added a new test to make sure we flush the tokenizer
566         properly in these cases.
567
568         Test: fast/parser/document-close-iframe-load-partial-entity.html
569
570         * html/parser/HTMLDocumentParser.cpp:
571         (WebCore::HTMLDocumentParser::prepareToStopParsing):
572         (WebCore::HTMLDocumentParser::pumpTokenizer):
573
574 2013-02-11  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
575
576         [texmap] Implement frames-per-second debug counter
577         https://bugs.webkit.org/show_bug.cgi?id=107942
578
579         Reviewed by Noam Rosenthal.
580
581         Adds FPS counter via WEBKIT_SHOW_FPS=<interval> environment variable,
582         where <interval> is the period in seconds (i.e. =1.5) between FPS
583         updates on screen. It is measured by counting
584         CoordinatedGraphicsScene::paintTo* calls and is painted using
585         drawRepaintCounter() after TextureMapperLayer has finished painting its
586         contents.
587
588         Visual debugging feature, no need for new tests.
589
590         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
591         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
592         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
593         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
594         (WebCore::CoordinatedGraphicsScene::updateFPS):
595         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
596
597 2013-02-11  Eric Seidel  <eric@webkit.org>
598
599         Fold MarkupTokenBase into HTMLToken now that it has no other subclasses
600         https://bugs.webkit.org/show_bug.cgi?id=109483
601
602         Reviewed by Adam Barth.
603
604         This deletes an epic amount of template yuck, as well as removes
605         a vtable !?! from HTMLToken.
606
607         This paves the way for further cleanup of HTMLToken now that we
608         can see the whole object at once.
609         We'll also probably re-create an HTMLToken.cpp again, now that we're
610         free from the chains of template nonsense.
611
612         * GNUmakefile.list.am:
613         * Target.pri:
614         * WebCore.gypi:
615         * WebCore.vcproj/WebCore.vcproj:
616         * WebCore.vcxproj/WebCore.vcxproj:
617         * WebCore.vcxproj/WebCore.vcxproj.filters:
618         * WebCore.xcodeproj/project.pbxproj:
619         * html/parser/HTMLToken.h:
620         (WebCore::findAttributeInVector):
621         (WebCore):
622         (HTMLToken):
623         (Attribute):
624         (Range):
625         (WebCore::HTMLToken::HTMLToken):
626         (WebCore::HTMLToken::clear):
627         (WebCore::HTMLToken::isUninitialized):
628         (WebCore::HTMLToken::type):
629         (WebCore::HTMLToken::makeEndOfFile):
630         (WebCore::HTMLToken::startIndex):
631         (WebCore::HTMLToken::endIndex):
632         (WebCore::HTMLToken::setBaseOffset):
633         (WebCore::HTMLToken::end):
634         (WebCore::HTMLToken::data):
635         (WebCore::HTMLToken::isAll8BitData):
636         (WebCore::HTMLToken::name):
637         (WebCore::HTMLToken::appendToName):
638         (WebCore::HTMLToken::nameString):
639         (WebCore::HTMLToken::selfClosing):
640         (WebCore::HTMLToken::setSelfClosing):
641         (WebCore::HTMLToken::beginStartTag):
642         (WebCore::HTMLToken::beginEndTag):
643         (WebCore::HTMLToken::addNewAttribute):
644         (WebCore::HTMLToken::beginAttributeName):
645         (WebCore::HTMLToken::endAttributeName):
646         (WebCore::HTMLToken::beginAttributeValue):
647         (WebCore::HTMLToken::endAttributeValue):
648         (WebCore::HTMLToken::appendToAttributeName):
649         (WebCore::HTMLToken::appendToAttributeValue):
650         (WebCore::HTMLToken::attributes):
651         (WebCore::HTMLToken::eraseValueOfAttribute):
652         (WebCore::HTMLToken::ensureIsCharacterToken):
653         (WebCore::HTMLToken::characters):
654         (WebCore::HTMLToken::appendToCharacter):
655         (WebCore::HTMLToken::comment):
656         (WebCore::HTMLToken::beginComment):
657         (WebCore::HTMLToken::appendToComment):
658         (WebCore::HTMLToken::eraseCharacters):
659         * html/parser/HTMLTokenTypes.h:
660         * html/parser/XSSAuditor.h:
661         * xml/parser/MarkupTokenBase.h: Removed.
662
663 2013-02-11  Gavin Barraclough  <barraclough@apple.com>
664
665         PluginProcess should quit immediately if idle in response to low-memory notifications
666         https://bugs.webkit.org/show_bug.cgi?id=109103
667         <rdar://problem/12679827>
668
669         Reviewed by Brady Eidson.
670
671         This patch allows a process to set a custom callback for low memory warnings
672         (defaulting to the current behaviour, as implemented in releaseMemory).
673
674         * platform/MemoryPressureHandler.cpp:
675         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
676             - Initialize m_lowMemoryHandler to releaseMemory.
677         (WebCore::MemoryPressureHandler::install):
678         (WebCore::MemoryPressureHandler::uninstall):
679         (WebCore::MemoryPressureHandler::holdOff):
680             - Cleaned up spacing.
681         (WebCore::MemoryPressureHandler::releaseMemory):
682             - Added null implementation for non-Mac builds.
683         * platform/MemoryPressureHandler.h:
684         (WebCore::MemoryPressureHandler::setLowMemoryHandler):
685             - Added method to set m_lowMemoryHandler.
686         * platform/mac/MemoryPressureHandlerMac.mm:
687         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
688             - Changed to call releaseMemory via m_lowMemoryHandler.
689
690 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
691
692         REGRESSION (r133807): Sticky-position review bar on bugzilla review page is jumpy
693         https://bugs.webkit.org/show_bug.cgi?id=104276
694         <rdar://problem/12827187>
695
696         Reviewed by Tim Horton.
697
698         When committing new scrolling tree state, if the root node has a scroll
699         position update, we would handle that before updating the state of child
700         nodes (with possibly new viewport constraints). That would cause incorrect
701         child layer updates.
702         
703         Fix by adding a second 'update' phase that happens after child nodes,
704         and moving the scroll position update into that.
705
706         Scrolling tests only dump the state tree, so cannot test the bug.
707
708         * page/FrameView.cpp:
709         (WebCore::FrameView::setScrollPosition): If the scroll position didn't
710         actually change, don't request a scroll position update from the ScrollingCoordinator.
711         * page/scrolling/ScrollingTree.cpp:
712         (WebCore::ScrollingTree::updateTreeFromStateNode): Keep track of the scrolling node so
713         that we can call updateAfterChildren() on it.
714         * page/scrolling/ScrollingTreeNode.h:
715         (ScrollingTreeNode):
716         (WebCore::ScrollingTreeNode::updateAfterChildren):
717         * page/scrolling/ScrollingTreeScrollingNode.cpp:
718         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
719         * page/scrolling/ScrollingTreeScrollingNode.h:
720         (ScrollingTreeScrollingNode):
721         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
722         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
723         In the current bug the scrolling tree was scheduled for commit because of a
724         scroll position request, but if only the viewport constraints change, we also need
725         to commit the tree.
726         * page/scrolling/mac/ScrollingTreeFixedNode.h:
727         (ScrollingTreeFixedNode):
728         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
729         (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
730         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
731         (ScrollingTreeScrollingNodeMac):
732         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
733         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
734         (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren): Move code here
735         that updates things that have to happen after children.
736         * page/scrolling/mac/ScrollingTreeStickyNode.h:
737         (ScrollingTreeStickyNode):
738         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
739         (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
740
741 2013-02-11  Roger Fong  <roger_fong@apple.com>
742
743         Unreviewed. Build fix for Win7 Release.
744         Because of InspectorAllInOne.cpp static globals must be named differently in files included by InspectorAllInOne.
745         This was the case for UserInitiatedProfileName. Also removed the repeated HeapProfileType definition in
746         InspectorHeapProfilerAgent.cpp since it wasn't being used anyways.
747
748         * inspector/InspectorHeapProfilerAgent.cpp:
749         (WebCore):
750         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
751
752 2013-02-11  Tony Gentilcore  <tonyg@chromium.org>
753
754         SegmentedString's copy ctor should copy all fields
755         https://bugs.webkit.org/show_bug.cgi?id=109477
756
757         Reviewed by Adam Barth.
758
759         This fixes http/tests/inspector-enabled/document-write.html (and likely others) for the threaded HTML parser.
760
761         No new tests because covered by existing tests.
762
763         * platform/text/SegmentedString.cpp:
764         (WebCore::SegmentedString::SegmentedString):
765
766 2013-02-11  Joshua Bell  <jsbell@chromium.org>
767
768         IndexedDB: database connections don't close after versionchange transaction aborts
769         https://bugs.webkit.org/show_bug.cgi?id=102298
770
771         Reviewed by Tony Chang.
772
773         Per spec, close the database if the "versionchange" transaction aborts.
774
775         Tests: storage/indexeddb/aborted-versionchange-closes.html
776                storage/indexeddb/lazy-index-population.html
777                storage/objectstore-basics.html
778
779         * Modules/indexeddb/IDBTransaction.cpp:
780         (WebCore::IDBTransaction::onAbort): Tell the IDBDatabase (connection) to close if
781         this was a "versionchange" transaction.
782
783 2013-02-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
784
785         [EFL] fast/forms/number/number-l10n-input.html is failing
786         https://bugs.webkit.org/show_bug.cgi?id=109440
787
788         Reviewed by Laszlo Gombos.
789
790         Use LocaleICU instead of LocaleNone on EFL port. The EFL
791         port already depends on ICU library and we get additional
792         functionality this way.
793
794         No new tests, already covered by existing tests.
795
796         * CMakeLists.txt:
797         * PlatformBlackBerry.cmake:
798         * PlatformEfl.cmake:
799         * PlatformWinCE.cmake:
800
801 2013-02-11  Benjamin Poulain  <benjamin@webkit.org>
802
803         Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
804         https://bugs.webkit.org/show_bug.cgi?id=109349
805
806         Reviewed by Sam Weinig.
807
808         Expose setMinimumTimerInterval() and implement the backup/restore to keep
809         a consistent state between tests.
810
811         * testing/InternalSettings.cpp:
812         (WebCore::InternalSettings::Backup::Backup):
813         (WebCore::InternalSettings::Backup::restoreTo):
814         (WebCore::InternalSettings::setMinimumTimerInterval):
815         (WebCore):
816         * testing/InternalSettings.h:
817         (Backup):
818         (InternalSettings):
819         * testing/InternalSettings.idl:
820
821 2013-02-11  Dean Jackson  <dino@apple.com>
822
823         Source/WebCore: Snapshotted plug-in should use shadow root
824         https://bugs.webkit.org/show_bug.cgi?id=108284
825
826         Reviewed by Simon Fraser.
827
828         Take three - relanding after rollout in r142400 that was caused by a global
829         selector interfering with CSS Instrumentation in the Inspector.
830
831         A snapshotted plugin needs to indicate to the user that it can be clicked
832         to be restarted. Previously this was done with an image that had embedded
833         text. Instead, we now use an internal shadow root to embed some markup that
834         will display instructions that can be localised.
835
836         The UA stylesheet for plug-ins provides a default styling for the label, which
837         can be overridden by ports.
838
839         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
840         since it is only responsible for drawing a paused plug-in. The snapshot creation
841         can work with the default renderer, but a shadow root requires something like
842         RenderBlock in order to draw its children. We swap from one renderer to another when
843         necessary either by creating the shadow root or by explicitly detaching and attaching
844         the plugin element.
845
846         Unfortunately this is difficult to test, because the snapshotting requires
847         time to execute, and also a PluginView to be instantiated.
848
849         * css/plugIns.css:
850         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
851
852         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
853         * platform/LocalizedStrings.h:
854         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
855         * platform/chromium/LocalizedStringsChromium.cpp:
856         * platform/efl/LocalizedStringsEfl.cpp:
857         * platform/gtk/LocalizedStringsGtk.cpp:
858         * platform/qt/LocalizedStringsQt.cpp:
859
860         * html/HTMLPlugInElement.cpp:
861         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
862         that RenderSnapshottedPlugIn no longer is an embedded object.
863
864         * html/HTMLPlugInImageElement.cpp:
865         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
866         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
867         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
868         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
869             a renderer, otherwise use the typical plug-in path.
870         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
871             need to give it to the renderer.
872         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
873         * html/HTMLPlugInImageElement.h:
874         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
875             should show immediately.
876         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
877             to swap to the Shadow Root.
878         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
879             in being recreated. Make sure we reattach so that a plugin renderer will be created.
880         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
881             displayState for snapshots.
882         * html/HTMLPlugInImageElement.h:
883         (HTMLPlugInImageElement): The new methods listed above.
884         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
885             a snapshot should be immediately labeled.
886
887         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
888
889         * rendering/RenderSnapshottedPlugIn.cpp:
890         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
891         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
892         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
893         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
894         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
895         (WebCore::RenderSnapshottedPlugIn::getCursor):
896         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
897         * rendering/RenderSnapshottedPlugIn.h:
898         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
899
900 2013-02-11  Mike West  <mkwst@chromium.org>
901
902         CSP reports for blocked 'data:' URLs should report the scheme only.
903         https://bugs.webkit.org/show_bug.cgi?id=109429
904
905         Reviewed by Adam Barth.
906
907         https://dvcs.w3.org/hg/content-security-policy/rev/001dc8e8bcc3 changed
908         the CSP 1.1 spec to require that blocked URLs that don't refer to
909         generally resolvable schemes (e.g. 'data:', 'javascript:', etc.) be
910         stripped down to their scheme in violation reports.
911
912         Test: http/tests/security/contentSecurityPolicy/report-blocked-data-uri.html
913
914         * page/ContentSecurityPolicy.cpp:
915         (WebCore::ContentSecurityPolicy::reportViolation):
916             If the blocked URL is a web-resolvable scheme, apply the current
917             stripping logic to it, otherwise, strip it to the scheme only.
918         * platform/KURL.h:
919         (KURL):
920             Move KURL::isHierarchical() out into KURL's public API.
921
922 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
923
924         ScrollingTree node maps keep getting larger
925         https://bugs.webkit.org/show_bug.cgi?id=109348
926
927         Reviewed by Sam Weinig.
928
929         When navigating between pages, nodes would get left in the ScrollingTree's
930         node map, and the ScrollingStateTree's node map, so these would get larger
931         and larger as you browse.
932         
933         Simplify map maintenance by clearing the map when setting a new root node
934         (which happens on the first commit of a new page). Also, don't keep root nodes
935         around, but create them afresh for each page, which simplifies their ID
936         management.
937         
938         This is closer to the original behavior; keeping the root nodes around was
939         a fix for bug 99668, but we avoid regressing that fix by bailing early
940         from frameViewLayoutUpdated() if there is no root state node (we'll get
941         called again anyway).
942         
943         This now allows state nodeIDs to be purely read-only.
944
945         * page/scrolling/ScrollingStateNode.h:
946         * page/scrolling/ScrollingStateTree.cpp:
947         (WebCore::ScrollingStateTree::ScrollingStateTree):
948         (WebCore::ScrollingStateTree::attachNode):
949         (WebCore::ScrollingStateTree::clear):
950         (WebCore::ScrollingStateTree::removeNode):
951         * page/scrolling/ScrollingTree.cpp:
952         (WebCore::ScrollingTree::updateTreeFromStateNode):
953         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
954         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
955
956 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
957
958         Move m_stateNodeMap from ScrollingCoordinatorMac to ScrollingStateTree
959         https://bugs.webkit.org/show_bug.cgi?id=109361
960
961         Reviewed by Sam Weinig.
962         
963         The map of scrolling node IDs to ScollingStateNodes was maintained by
964         ScrollingCoordinatorMac, rather than ScrollingStateTree. This is different
965         from the ScrollingTree (which owns its node map), and added some amount
966         of to-and-fro between ScrollingStateTree and ScrollingCoordinatorMac.
967         
968         Having ScrollingCoordinatorMac maintain the map of IDs to state nodes
969         simplifies things.
970
971         No behavior change.
972
973         * page/scrolling/ScrollingStateTree.cpp:
974         (WebCore::ScrollingStateTree::attachNode):
975         (WebCore::ScrollingStateTree::detachNode):
976         (WebCore::ScrollingStateTree::clear):
977         (WebCore::ScrollingStateTree::removeNode):
978         (WebCore::ScrollingStateTree::stateNodeForID):
979         * page/scrolling/ScrollingStateTree.h:
980         (ScrollingStateTree): Remove some stale comments.
981         (WebCore::ScrollingStateTree::removedNodes):
982         * page/scrolling/mac/ScrollingCoordinatorMac.h:
983         (ScrollingCoordinatorMac):
984         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
985         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
986         (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
987         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
988         (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
989         (WebCore::ScrollingCoordinatorMac::attachToStateTree):
990         (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
991         (WebCore::ScrollingCoordinatorMac::clearStateTree):
992         (WebCore::ScrollingCoordinatorMac::updateScrollingNode):
993         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
994
995 2013-02-11  Mark Rowe  <mrowe@apple.com>
996
997         Build fix.
998
999         * platform/mac/PlatformSpeechSynthesizerMac.mm: Fix the case in the include.
1000
1001 2013-02-11  Julien Chaffraix  <jchaffraix@webkit.org>
1002
1003         Regression(r131539): Heap-use-after-free in WebCore::RenderBlock::willBeDestroyed
1004         https://bugs.webkit.org/show_bug.cgi?id=107189
1005
1006         Reviewed by Abhishek Arya.
1007
1008         Test: fast/dynamic/continuation-detach-crash.html
1009
1010         This patch reverts r131539 and the following changes (r132591 and r139664).
1011         This means we redo detaching from the bottom-up which solves the regression.
1012         It fixes the attached test case as we re-attach child nodes before detaching
1013         the parent. It seems wrong to do but this avoid a stale continuation.
1014
1015         * dom/ContainerNode.cpp:
1016         (WebCore::ContainerNode::detach): Detach the children first, then ourself.
1017         * dom/Node.cpp:
1018         (WebCore::Node::detach): Clear the renderer instead of ASSERT'ing.
1019         * rendering/RenderObject.cpp:
1020         (WebCore::RenderObject::willBeDestroyed): Removed the code to clear the associated node's renderer.
1021         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
1022         * rendering/RenderObjectChildList.cpp:
1023         (WebCore::RenderObjectChildList::removeChildNode):
1024         Moved the repainting logic back into removeChildNode from destroyAndCleanupAnonymousWrappers.
1025         (WebCore::RenderObjectChildList::destroyLeftoverChildren): Re-added the code to clear the associated node's
1026         renderer.
1027         * rendering/RenderTextFragment.cpp:
1028         (WebCore::RenderTextFragment::setText): Re-added the code to set the associated node's renderer.
1029
1030         * dom/ContainerNode.cpp:
1031         (WebCore::ContainerNode::detach):
1032         * dom/Node.cpp:
1033         (WebCore::Node::detach):
1034         * rendering/RenderObject.cpp:
1035         (WebCore::RenderObject::willBeDestroyed):
1036         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
1037         * rendering/RenderObjectChildList.cpp:
1038         (WebCore::RenderObjectChildList::destroyLeftoverChildren):
1039         (WebCore::RenderObjectChildList::removeChildNode):
1040         * rendering/RenderTextFragment.cpp:
1041         (WebCore::RenderTextFragment::setText):
1042
1043 2013-02-11  Eric Seidel  <eric@webkit.org>
1044
1045         Make WebVTTTokenizer stop inheriting from MarkupTokenizerBase
1046         https://bugs.webkit.org/show_bug.cgi?id=109411
1047
1048         Reviewed by Adam Barth.
1049
1050         Moved InputStreamPreprocessor into its own header file so it can be
1051         used by both WebVTTTokenizer and HTMLTokenizer.
1052
1053         Also split out kEndOfFileMarker from InputStreamPreprocessor<T> so that
1054         it can be used w/o a specific instantiation of the template class.
1055         This also made it possible to fix three old fixmes about wanting to share
1056         that constant.
1057
1058         Again, separating WebVTT code from Markup* base classes made it simpler
1059         at the cost of a little copy/paste code.  WebVTT tokenization is remarkably
1060         simple compared to HTML.
1061
1062         This will make it immediately possible to pull MarkupTokenizerBase up into
1063         HTMLTokenizer and further simplify the code.
1064
1065         * GNUmakefile.list.am:
1066         * Target.pri:
1067         * WebCore.gypi:
1068         * WebCore.vcproj/WebCore.vcproj:
1069         * WebCore.vcxproj/WebCore.vcxproj:
1070         * WebCore.vcxproj/WebCore.vcxproj.filters:
1071         * WebCore.xcodeproj/project.pbxproj:
1072         * html/parser/BackgroundHTMLParser.cpp:
1073         (WebCore::BackgroundHTMLParser::markEndOfFile):
1074         * html/parser/HTMLInputStream.h:
1075         (WebCore::HTMLInputStream::markEndOfFile):
1076         * html/parser/HTMLTokenizer.cpp:
1077         (WebCore::HTMLTokenizer::nextToken):
1078         * html/parser/InputStreamPreprocessor.h: Added.
1079         (WebCore):
1080         (InputStreamPreprocessor):
1081         (WebCore::InputStreamPreprocessor::InputStreamPreprocessor):
1082         (WebCore::InputStreamPreprocessor::nextInputCharacter):
1083         (WebCore::InputStreamPreprocessor::peek):
1084         (WebCore::InputStreamPreprocessor::advance):
1085         (WebCore::InputStreamPreprocessor::skipNextNewLine):
1086         (WebCore::InputStreamPreprocessor::reset):
1087         (WebCore::InputStreamPreprocessor::shouldTreatNullAsEndOfFileMarker):
1088         * html/track/WebVTTTokenizer.cpp:
1089         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
1090         (WebCore::WebVTTTokenizer::nextToken):
1091         * html/track/WebVTTTokenizer.h:
1092         (WebVTTTokenizer):
1093         (WebCore::WebVTTTokenizer::haveBufferedCharacterToken):
1094         (WebCore::WebVTTTokenizer::bufferCharacter):
1095         (WebCore::WebVTTTokenizer::emitAndResumeIn):
1096         (WebCore::WebVTTTokenizer::emitEndOfFile):
1097         (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
1098         * xml/parser/MarkupTokenizerBase.h:
1099         (MarkupTokenizerBase):
1100         (WebCore::MarkupTokenizerBase::bufferCharacter):
1101
1102 2013-02-11  Adam Barth  <abarth@webkit.org>
1103
1104         document.write during window.onload can trigger DumpRenderTree to dump the render tree
1105         https://bugs.webkit.org/show_bug.cgi?id=109465
1106
1107         Reviewed by Eric Seidel.
1108
1109         This patch is a partial revert of
1110         http://trac.webkit.org/changeset/142378. It's not safe to call
1111         checkComplete during the load event. We'll need to find another way of
1112         calling checkComplete at the right time.
1113
1114         Test: fast/parser/document-write-during-load.html
1115
1116         * dom/Document.cpp:
1117         (WebCore::Document::decrementActiveParserCount):
1118
1119 2013-02-11  Andrey Kosyakov  <caseq@chromium.org>
1120
1121         Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton
1122         https://bugs.webkit.org/show_bug.cgi?id=109294
1123
1124         Reviewed by Pavel Feldman.
1125
1126         Use the stack that caused style recalculation as a cause for relayout performed due to
1127         layout invalidation caused by style recalculation.
1128
1129         * inspector/front-end/TimelinePresentationModel.js:
1130         (WebInspector.TimelinePresentationModel.prototype.reset):
1131         (WebInspector.TimelinePresentationModel.Record):
1132
1133 2013-02-01  Andrey Kosyakov  <caseq@chromium.org>
1134
1135         Web Inspector: [Extension API] adjust inspectedWindow.eval() callback parameters to expose non-exceptional error
1136         https://bugs.webkit.org/show_bug.cgi?id=108640
1137
1138         Reviewed by Vsevolod Vlasov.
1139
1140         - only set first parameter to eval() callback iff expression successfully evaluates;
1141         - use object, not bool as second parameter;
1142         - pass exceptions and extension errors as second parameter if evaluate failed;
1143         - minor drive-by changes in ExtensionAPI utilities.
1144
1145         * inspector/front-end/ExtensionAPI.js:
1146         (injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
1147         (injectedExtensionAPI.InspectedWindow.prototype.):
1148         (injectedExtensionAPI.InspectedWindow.prototype.eval):
1149         (injectedExtensionAPI.extractCallbackArgument):
1150         * inspector/front-end/ExtensionServer.js:
1151         (WebInspector.ExtensionServer.prototype.):
1152         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
1153         (WebInspector.ExtensionStatus):
1154
1155 2013-02-11  Andrey Kosyakov  <caseq@chromium.org>
1156
1157         Web Inspector: [Extensions API] expose ExtensionServerClient to tests so tests use same port as extensions API
1158         https://bugs.webkit.org/show_bug.cgi?id=109443
1159
1160         Reviewed by Vsevolod Vlasov.
1161
1162         Promote extensionServer var to the outer closure, so it may be accessed by platform-specific (or test) code.
1163
1164         * inspector/front-end/ExtensionAPI.js:
1165         (buildExtensionAPIInjectedScript):
1166
1167 2013-02-11  Eric Seidel  <eric@webkit.org>
1168
1169         Move WebVTTToken off of MarkupTokenBase
1170         https://bugs.webkit.org/show_bug.cgi?id=109410
1171
1172         Reviewed by Tony Gentilcore.
1173
1174         This introduces a small amount of "copy/paste" code
1175         but actually makes WebVTTToken much smaller and simpler!
1176         This also frees the HTMLParser to have its Token class
1177         back to itself so we can tune it to make HTML faster.
1178
1179         * html/track/WebVTTToken.h:
1180         (WebVTTToken):
1181         (WebCore::WebVTTToken::WebVTTToken):
1182         (WebCore::WebVTTToken::appendToName):
1183         (WebCore::WebVTTToken::type):
1184         (WebCore::WebVTTToken::name):
1185         (WebCore::WebVTTToken::ensureIsCharacterToken):
1186         (WebCore::WebVTTToken::appendToCharacter):
1187         (WebCore::WebVTTToken::beginEmptyStartTag):
1188         (WebCore::WebVTTToken::beginStartTag):
1189         (WebCore::WebVTTToken::beginEndTag):
1190         (WebCore::WebVTTToken::beginTimestampTag):
1191         (WebCore::WebVTTToken::makeEndOfFile):
1192         (WebCore::WebVTTToken::clear):
1193
1194 2013-02-11  Joshua Bell  <jsbell@chromium.org>
1195
1196         [V8] IndexedDB: Minor GC can collect IDBDatabase wrapper with versionchange handler
1197         https://bugs.webkit.org/show_bug.cgi?id=108670
1198
1199         Reviewed by Kentaro Hara.
1200
1201         Prevent IDBDatabase's wrapper from being GC'd while the database is open if it has
1202         listeners, as those listeners may close the database in response to events.
1203
1204         Also, removed extraneous super-calls from hasPendingActivity() overrides.
1205
1206         Test: storage/indexeddb/database-wrapper.html
1207
1208         * Modules/indexeddb/IDBDatabase.cpp:
1209         (WebCore::IDBDatabase::hasPendingActivity): Implemented.
1210         * Modules/indexeddb/IDBDatabase.h: Declared.
1211         * Modules/indexeddb/IDBRequest.cpp:
1212         (WebCore::IDBRequest::hasPendingActivity): Simplified.
1213         * Modules/indexeddb/IDBTransaction.cpp:
1214         (WebCore::IDBTransaction::hasPendingActivity): Simplified.
1215
1216 2013-02-11  Eric Seidel  <eric@webkit.org>
1217
1218         Remove AttributeBase now that NEW_XML is gone
1219         https://bugs.webkit.org/show_bug.cgi?id=109408
1220
1221         Reviewed by Adam Barth.
1222
1223         Just deleting code.  HTMLToken::Attribute is now just
1224         the real class and not a typedef.
1225
1226         * html/parser/CompactHTMLToken.cpp:
1227         (WebCore::CompactHTMLToken::CompactHTMLToken):
1228         * html/parser/HTMLTokenizer.cpp:
1229         (WebCore::AtomicHTMLToken::nameForAttribute):
1230         * xml/parser/MarkupTokenBase.h:
1231         (WebCore):
1232         (MarkupTokenBase):
1233         (Attribute):
1234         (Range):
1235
1236 2013-02-11  Eric Seidel  <eric@webkit.org>
1237
1238         Rename PreloadTask to StartTagScanner to match its purpose
1239         https://bugs.webkit.org/show_bug.cgi?id=109406
1240
1241         Reviewed by Sam Weinig.
1242
1243         As discussed in bug 107807.
1244
1245         * html/parser/HTMLPreloadScanner.cpp:
1246         (WebCore::StartTagScanner::StartTagScanner):
1247         (WebCore::StartTagScanner::processAttributes):
1248         (WebCore::HTMLPreloadScanner::processToken):
1249
1250 2013-02-11  Vsevolod Vlasov  <vsevik@chromium.org>
1251
1252         Web Inspector: WebInspector.Project refactorings.
1253         https://bugs.webkit.org/show_bug.cgi?id=109433
1254
1255         Reviewed by Alexander Pavlov.
1256
1257         This change prepares Workspace and Project to migration to project-per-domain mode for network based projects.
1258         Renamed WebInspector.WorkspaceProvider to WebInspector.ProjectDelegate.
1259         Renamed Project.name() to Project.id() and delegated it to project delegate.
1260         Added Project.displayName() method that is delegated to project delegate.
1261         SimpleWorkspaceProvider is now responsible for creation of SimpleWorkspaceDelegates and
1262         isolates various mappings from Project/ProjectDelegate concept.
1263         UISourceCode is now created based on path in the project.
1264         UISourceCode uri is now calculated based on project and path (right now uri is equal to path).
1265
1266         * WebCore.gypi:
1267         * WebCore.vcproj/WebCore.vcproj:
1268         * inspector/compile-front-end.py:
1269         * inspector/front-end/FileSystemProjectDelegate.js: Renamed from Source/WebCore/inspector/front-end/FileSystemWorkspaceProvider.js.
1270         (WebInspector.FileSystemProjectDelegate):
1271         (WebInspector.FileSystemProjectDelegate.prototype.id):
1272         (WebInspector.FileSystemProjectDelegate.prototype.type):
1273         (WebInspector.FileSystemProjectDelegate.prototype.displayName):
1274         (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
1275         (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
1276         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
1277         (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
1278         (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
1279         (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
1280         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
1281         (WebInspector.FileSystemProjectDelegate.prototype._populate):
1282         (WebInspector.FileSystemProjectDelegate.prototype._addFile):
1283         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
1284         (WebInspector.FileSystemProjectDelegate.prototype.reset):
1285         (WebInspector.FileSystemUtils):
1286         (WebInspector.FileSystemUtils.errorHandler):
1287         (WebInspector.FileSystemUtils.requestFileSystem):
1288         (.fileSystemLoaded):
1289         (.innerCallback):
1290         (WebInspector.FileSystemUtils.requestFilesRecursive):
1291         (.fileEntryLoaded):
1292         (.fileLoaded):
1293         (.readerLoadEnd):
1294         (WebInspector.FileSystemUtils.requestFileContent):
1295         (.fileWriterCreated.fileTruncated):
1296         (.fileWriterCreated):
1297         (.writerEnd):
1298         (WebInspector.FileSystemUtils.setFileContent):
1299         (WebInspector.FileSystemUtils._getDirectory):
1300         (.toArray):
1301         (WebInspector.FileSystemUtils._readDirectory):
1302         (WebInspector.FileSystemUtils._requestEntries):
1303         * inspector/front-end/IsolatedFileSystemModel.js:
1304         (WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem):
1305         * inspector/front-end/SimpleWorkspaceProvider.js:
1306         (WebInspector.SimpleProjectDelegate):
1307         (WebInspector.SimpleProjectDelegate.prototype.id):
1308         (WebInspector.SimpleProjectDelegate.prototype.displayName):
1309         (WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
1310         (WebInspector.SimpleProjectDelegate.prototype.setFileContent):
1311         (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
1312         (WebInspector.SimpleProjectDelegate.prototype.addFile):
1313         (WebInspector.SimpleProjectDelegate.prototype._uniquePath):
1314         (WebInspector.SimpleProjectDelegate.prototype.removeFile):
1315         (WebInspector.SimpleProjectDelegate.prototype.reset):
1316         (WebInspector.SimpleWorkspaceProvider):
1317         (WebInspector.SimpleWorkspaceProvider.uriForURL):
1318         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
1319         (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
1320         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
1321         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
1322         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
1323         * inspector/front-end/UISourceCode.js:
1324         (WebInspector.UISourceCode):
1325         (WebInspector.UISourceCode.prototype.path):
1326         (WebInspector.UISourceCode.prototype.uri):
1327         * inspector/front-end/WebKit.qrc:
1328         * inspector/front-end/Workspace.js:
1329         (WebInspector.FileDescriptor):
1330         (WebInspector.ProjectDelegate):
1331         (WebInspector.ProjectDelegate.prototype.id):
1332         (WebInspector.ProjectDelegate.prototype.displayName):
1333         (WebInspector.ProjectDelegate.prototype.requestFileContent):
1334         (WebInspector.ProjectDelegate.prototype.setFileContent):
1335         (WebInspector.ProjectDelegate.prototype.searchInFileContent):
1336         (WebInspector.Project):
1337         (WebInspector.Project.prototype.id):
1338         (WebInspector.Project.prototype.type):
1339         (WebInspector.Project.prototype.displayName):
1340         (WebInspector.Project.prototype.isServiceProject):
1341         (WebInspector.Project.prototype._fileAdded):
1342         (WebInspector.Project.prototype._fileRemoved):
1343         (WebInspector.Project.prototype._reset):
1344         (WebInspector.Project.prototype.uiSourceCode):
1345         (WebInspector.Project.prototype.uiSourceCodeForOriginURL):
1346         (WebInspector.Project.prototype.uiSourceCodeForURI):
1347         (WebInspector.Project.prototype.uiSourceCodes):
1348         (WebInspector.Project.prototype.requestFileContent):
1349         (WebInspector.Project.prototype.setFileContent):
1350         (WebInspector.Project.prototype.searchInFileContent):
1351         (WebInspector.Project.prototype.dispose):
1352         (WebInspector.Workspace.prototype.uiSourceCode):
1353         (WebInspector.Workspace.prototype.uiSourceCodeForURI):
1354         (WebInspector.Workspace.prototype.addProject):
1355         (WebInspector.Workspace.prototype.removeProject):
1356         (WebInspector.Workspace.prototype.project):
1357         (WebInspector.Workspace.prototype.uiSourceCodes):
1358         (WebInspector.Workspace.prototype.projectForUISourceCode):
1359         * inspector/front-end/inspector.html:
1360
1361 2013-02-11  Yury Semikhatsky  <yurys@chromium.org>
1362
1363         Web Inspector: fix closure compiler warnings in the profiler code
1364         https://bugs.webkit.org/show_bug.cgi?id=109432
1365
1366         Reviewed by Pavel Feldman.
1367
1368         Updated type annotations to match the code.
1369
1370         * inspector/front-end/NativeMemorySnapshotView.js:
1371         * inspector/front-end/ProfilesPanel.js:
1372
1373 2013-02-11  Alexander Shalamov  <alexander.shalamov@intel.com>
1374
1375         [QT] Regression (r142444): Broke qt linux minimal build
1376         https://bugs.webkit.org/show_bug.cgi?id=109423
1377
1378         Reviewed by Kenneth Rohde Christiansen.
1379
1380         Test: cssom/cssvalue-comparison.html
1381
1382         * css/CSSValue.cpp:
1383         (WebCore::CSSValue::equals):
1384
1385 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
1386
1387         Web Inspector: introduce WebInspector.TextUtils
1388         https://bugs.webkit.org/show_bug.cgi?id=109289
1389
1390         Reviewed by Pavel Feldman.
1391
1392         Add new WebInspector.TextUtils file and extract commonly used
1393         text-operation subroutines from DefaultTextEditor into it.
1394
1395         No new tests: no change in behaviour.
1396
1397         * WebCore.gypi:
1398         * WebCore.vcproj/WebCore.vcproj:
1399         * inspector/compile-front-end.py:
1400         * inspector/front-end/DefaultTextEditor.js:
1401         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
1402         (WebInspector.DefaultTextEditor.WordMovementController.prototype._rangeForCtrlArrowMove):
1403         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
1404         * inspector/front-end/TextUtils.js: Added.
1405         (WebInspector.TextUtils.isStopChar):
1406         (WebInspector.TextUtils.isWordChar):
1407         (WebInspector.TextUtils.isSpaceChar):
1408         (WebInspector.TextUtils.isWord):
1409         (WebInspector.TextUtils.isBraceChar):
1410         * inspector/front-end/WebKit.qrc:
1411         * inspector/front-end/inspector.html:
1412
1413 2013-02-11  Zan Dobersek  <zdobersek@igalia.com>
1414
1415         [GTK][Clang] Build errors in LocalizedStringsGtk.cpp
1416         https://bugs.webkit.org/show_bug.cgi?id=109418
1417
1418         Reviewed by Philippe Normand.
1419
1420         Use the C++ isfinite(float) and abs(float) (instead of fabsf(float))
1421         methods by including the WTF MathExtras.h header. Use a static cast to
1422         an integer type on the float return value of the abs(float) method call
1423         instead of the C-style cast.
1424
1425         No new tests - no new functiolnality.
1426
1427         * platform/gtk/LocalizedStringsGtk.cpp:
1428         (WebCore::localizedMediaTimeDescription):
1429
1430 2013-02-11  Zan Dobersek  <zdobersek@igalia.com>
1431
1432         Unreviewed build fix for the WTFURL backend of KURL.
1433
1434         * platform/KURL.cpp:
1435         (WebCore::KURL::isSafeToSendToAnotherThread): m_urlImpl is of RefPtr type so use
1436         the appropriate operator on it when calling the isSafeToSendToAnotherThread method.
1437
1438 2013-02-11  Mike West  <mkwst@chromium.org>
1439
1440         Range::collapsed callers should explicitly ASSERT_NO_EXCEPTION.
1441         https://bugs.webkit.org/show_bug.cgi?id=108921
1442
1443         Reviewed by Jochen Eisinger.
1444
1445         For clarity and consistency, this patch adjusts Range::collapsed() to
1446         drop the default value of the ExceptionCode parameter it accepts. The
1447         three call sites that called the method with no arguments (all part of
1448         Editor::rangeOfString) will now explicitly ASSERT_NO_EXCEPTION.
1449
1450         * dom/Range.h:
1451         (Range):
1452         * editing/Editor.cpp:
1453         (WebCore::Editor::rangeOfString):
1454
1455 2013-02-11  Alexei Filippov  <alph@chromium.org>
1456
1457         Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler
1458         https://bugs.webkit.org/show_bug.cgi?id=108653
1459
1460         Reviewed by Yury Semikhatsky.
1461
1462         Currently CPU and heap profilers share the same domain 'Profiler' in the protocol.
1463         In fact these two profile types have not too much in common. So put each into its own domain.
1464         It should also help when Profiles panel gets split into several tools.
1465         This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't
1466         change the original InspectorProfilerAgent.
1467
1468         * CMakeLists.txt:
1469         * GNUmakefile.list.am:
1470         * Target.pri:
1471         * WebCore.gypi:
1472         * WebCore.vcproj/WebCore.vcproj:
1473         * WebCore.vcxproj/WebCore.vcxproj:
1474         * WebCore.vcxproj/WebCore.vcxproj.filters:
1475         * WebCore.xcodeproj/project.pbxproj:
1476         * inspector/Inspector.json:
1477         * inspector/InspectorAllInOne.cpp:
1478         * inspector/InspectorController.cpp:
1479         (WebCore::InspectorController::InspectorController):
1480         * inspector/InspectorHeapProfilerAgent.cpp: Added.
1481         (WebCore):
1482         (WebCore::InspectorHeapProfilerAgent::create):
1483         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
1484         (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
1485         (WebCore::InspectorHeapProfilerAgent::resetState):
1486         (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
1487         (WebCore::InspectorHeapProfilerAgent::setFrontend):
1488         (WebCore::InspectorHeapProfilerAgent::clearFrontend):
1489         (WebCore::InspectorHeapProfilerAgent::restore):
1490         (WebCore::InspectorHeapProfilerAgent::collectGarbage):
1491         (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
1492         (WebCore::InspectorHeapProfilerAgent::hasHeapProfiler):
1493         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
1494         (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
1495         (WebCore::InspectorHeapProfilerAgent::removeProfile):
1496         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
1497         (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
1498         (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
1499         (WebCore::InspectorHeapProfilerAgent::reportMemoryUsage):
1500         * inspector/InspectorHeapProfilerAgent.h: Added.
1501         (WebCore):
1502         (InspectorHeapProfilerAgent):
1503         (WebCore::InspectorHeapProfilerAgent::clearProfiles):
1504         * inspector/InspectorInstrumentation.cpp:
1505         (WebCore):
1506         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1507         * inspector/InstrumentingAgents.h:
1508         (WebCore):
1509         (InstrumentingAgents):
1510         (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent):
1511         (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent):
1512         * inspector/WorkerInspectorController.cpp:
1513         (WebCore::WorkerInspectorController::WorkerInspectorController):
1514         * inspector/front-end/HeapSnapshotDataGrids.js:
1515         * inspector/front-end/HeapSnapshotGridNodes.js:
1516         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
1517         * inspector/front-end/HeapSnapshotView.js:
1518         (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer):
1519         (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
1520         (WebInspector.HeapProfileHeader.prototype.saveToFile):
1521         * inspector/front-end/ProfilesPanel.js:
1522         (WebInspector.ProfilesPanel):
1523         (WebInspector.ProfilesPanel.prototype._clearProfiles):
1524         (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked):
1525         (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
1526         (WebInspector.ProfilesPanel.prototype._populateProfiles.var):
1527         (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback):
1528         (WebInspector.ProfilesPanel.prototype._populateProfiles):
1529         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
1530         (WebInspector.ProfilesPanel.prototype.revealInView):
1531         (WebInspector.HeapProfilerDispatcher):
1532         (WebInspector.HeapProfilerDispatcher.prototype.addProfileHeader):
1533         (WebInspector.HeapProfilerDispatcher.prototype.addHeapSnapshotChunk):
1534         (WebInspector.HeapProfilerDispatcher.prototype.finishHeapSnapshot):
1535         (WebInspector.HeapProfilerDispatcher.prototype.resetProfiles):
1536         (WebInspector.HeapProfilerDispatcher.prototype.reportHeapSnapshotProgress):
1537         * inspector/front-end/TimelinePanel.js:
1538         (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
1539         * inspector/front-end/inspector.js:
1540         (WebInspector.doLoadedDone):
1541
1542 2013-02-11  Mike West  <mkwst@chromium.org>
1543
1544         Use IGNORE_EXCEPTION for Editor::countMatchesForText's ignored exceptions.
1545         https://bugs.webkit.org/show_bug.cgi?id=109372
1546
1547         Reviewed by Jochen Eisinger.
1548
1549         Rather than implicitly ignoring exceptions, we should use the
1550         IGNORE_EXCEPTION macro for clarity.
1551
1552         * editing/Editor.cpp:
1553         (WebCore::Editor::countMatchesForText):
1554
1555 2013-02-11  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1556
1557         [Qt] Unreviewed. Fix minimal build after r142444.
1558
1559         * css/CSSValue.cpp:
1560         (WebCore::CSSValue::equals):
1561
1562 2013-02-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1563
1564         [EFL] Stop using smart pointers for Ecore_Timer
1565         https://bugs.webkit.org/show_bug.cgi?id=109409
1566
1567         Reviewed by Kenneth Rohde Christiansen.
1568
1569         Stop using a smart pointer for Ecore_Timer in RunLoop::TimerBase. This
1570         is a bad idea because the timer handle becomes invalid as soon as the
1571         timer callback returns ECORE_CALLBACK_CANCEL. This may lead to crashes
1572         on destruction because OwnPtr calls ecore_timer_del() on an invalid
1573         handle.
1574
1575         No new tests, already covered by exiting tests.
1576
1577         * platform/RunLoop.h:
1578         (TimerBase):
1579         * platform/efl/RunLoopEfl.cpp:
1580         (WebCore::RunLoop::TimerBase::timerFired):
1581         (WebCore::RunLoop::TimerBase::start):
1582         (WebCore::RunLoop::TimerBase::stop):
1583
1584 2013-02-11  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1585
1586         Web Inspector: Allow SplitView to keep the sidebar size as a fraction of the container size
1587         https://bugs.webkit.org/show_bug.cgi?id=109414
1588
1589         Reviewed by Vsevolod Vlasov.
1590
1591         SplitView now interprets defaultSidebarWidth and defaultSidebarHeight values between 0 and 1 as
1592         fractions of the total container size. The sidebar then will grow or shrink along with the container.
1593         When the sidebar is resized manually the updated ratio is stored in the settings.
1594
1595         * inspector/front-end/SplitView.js:
1596         (WebInspector.SplitView):
1597         (WebInspector.SplitView.prototype._removeAllLayoutProperties):
1598         (WebInspector.SplitView.prototype._updateTotalSize):
1599         (WebInspector.SplitView.prototype._innerSetSidebarSize):
1600         (WebInspector.SplitView.prototype._saveSidebarSize):
1601
1602 2013-02-11  Pavel Feldman  <pfeldman@chromium.org>
1603
1604         Web Inspector: highlight DOM nodes on hover while debugging
1605         https://bugs.webkit.org/show_bug.cgi?id=109355
1606
1607         Reviewed by Vsevolod Vlasov.
1608
1609         Along with showing the popover, highlight the remote object as node.
1610
1611         * inspector/front-end/ObjectPopoverHelper.js:
1612         (WebInspector.ObjectPopoverHelper.prototype.):
1613         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
1614         (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover):
1615
1616 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
1617
1618         Web Inspector: displaying whitespace characters is broken
1619         https://bugs.webkit.org/show_bug.cgi?id=109412
1620
1621         Reviewed by Vsevolod Vlasov.
1622
1623         Add "pointer-events: none" rule for pseudo-class "before", which
1624         maintains rendering of whitespace characters.
1625
1626         No new tests.
1627
1628         * inspector/front-end/inspectorSyntaxHighlight.css:
1629         (.webkit-whitespace::before):
1630
1631 2013-02-11  Alexander Pavlov  <apavlov@chromium.org>
1632
1633         Web Inspector: Implement position-based sourcemapping for stylesheets
1634         https://bugs.webkit.org/show_bug.cgi?id=109168
1635
1636         Reviewed by Vsevolod Vlasov.
1637
1638         This change introduces support for position-based source maps for CSS stylesheets.
1639         Sourcemaps and originating resources (sass, scss, etc.) are loaded synchronously
1640         upon the CSS UISourceCode addition. RangeBasedSourceMap is removed as it is not used.
1641
1642         Test: http/tests/inspector/stylesheet-source-mapping.html
1643
1644         * inspector/front-end/CSSStyleModel.js:
1645         (WebInspector.CSSStyleModel):
1646         (WebInspector.CSSStyleModel.prototype.setSourceMapping):
1647         (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation):
1648         (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation):
1649         (WebInspector.CSSLocation):
1650         (WebInspector.CSSProperty):
1651         (WebInspector.CSSProperty.parsePayload):
1652         * inspector/front-end/CompilerScriptMapping.js:
1653         (WebInspector.CompilerScriptMapping):
1654         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
1655         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
1656         * inspector/front-end/SASSSourceMapping.js:
1657         (WebInspector.SASSSourceMapping):
1658         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
1659         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
1660         (WebInspector.SASSSourceMapping.prototype._reloadCSS):
1661         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
1662         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
1663         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
1664         (WebInspector.SASSSourceMapping.prototype.loadSourceMapForStyleSheet):
1665         (WebInspector.SASSSourceMapping.prototype._bindUISourceCode):
1666         (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation):
1667         (WebInspector.SASSSourceMapping.prototype.uiLocationToRawLocation):
1668         (WebInspector.SASSSourceMapping.prototype._reset):
1669         * inspector/front-end/SourceMap.js:
1670         (WebInspector.SourceMap):
1671         (WebInspector.SourceMap.load):
1672         (WebInspector.SourceMap.prototype.findEntry):
1673         (WebInspector.SourceMap.prototype.findEntryReversed):
1674         (WebInspector.SourceMap.prototype._parseMap):
1675         * inspector/front-end/StylesSourceMapping.js:
1676         (WebInspector.StylesSourceMapping):
1677         (WebInspector.StylesSourceMapping.prototype._bindUISourceCode):
1678         * inspector/front-end/inspector.js:
1679
1680 2013-02-11  Alexander Shalamov  <alexander.shalamov@intel.com>
1681
1682         Implement CSSValue::equals(const CSSValue&) to optimise CSSValue comparison
1683         https://bugs.webkit.org/show_bug.cgi?id=102901
1684
1685         Reviewed by Antti Koivisto.
1686
1687         Added comparison method to CSSValue and its children, so that the
1688         css values could be compared efficiently. Before this patch, CSSValue
1689         objects were compared using strings that were generated by the cssText() method.
1690
1691         Test: cssom/cssvalue-comparison.html
1692
1693         * css/CSSAspectRatioValue.cpp:
1694         (WebCore::CSSAspectRatioValue::equals):
1695         (WebCore):
1696         * css/CSSAspectRatioValue.h:
1697         (CSSAspectRatioValue):
1698         * css/CSSBasicShapes.cpp:
1699         (WebCore::CSSBasicShapeRectangle::equals):
1700         (WebCore):
1701         (WebCore::CSSBasicShapeCircle::equals):
1702         (WebCore::CSSBasicShapeEllipse::equals):
1703         (WebCore::CSSBasicShapePolygon::equals):
1704         * css/CSSBasicShapes.h:
1705         (CSSBasicShapeRectangle):
1706         (CSSBasicShapeCircle):
1707         (CSSBasicShapeEllipse):
1708         (CSSBasicShapePolygon):
1709         * css/CSSBorderImageSliceValue.cpp:
1710         (WebCore::CSSBorderImageSliceValue::equals):
1711         (WebCore):
1712         * css/CSSBorderImageSliceValue.h:
1713         (CSSBorderImageSliceValue):
1714         * css/CSSCalculationValue.cpp:
1715         (WebCore::CSSCalcValue::equals):
1716         (WebCore):
1717         (WebCore::CSSCalcPrimitiveValue::equals):
1718         (CSSCalcPrimitiveValue):
1719         (WebCore::CSSCalcPrimitiveValue::type):
1720         (WebCore::CSSCalcBinaryOperation::equals):
1721         (CSSCalcBinaryOperation):
1722         (WebCore::CSSCalcBinaryOperation::type):
1723         * css/CSSCalculationValue.h:
1724         (WebCore::CSSCalcExpressionNode::equals):
1725         (CSSCalcExpressionNode):
1726         (CSSCalcValue):
1727         * css/CSSCanvasValue.cpp:
1728         (WebCore::CSSCanvasValue::equals):
1729         (WebCore):
1730         * css/CSSCanvasValue.h:
1731         (CSSCanvasValue):
1732         * css/CSSComputedStyleDeclaration.cpp:
1733         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1734         (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
1735         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
1736         * css/CSSCrossfadeValue.cpp:
1737         (WebCore::CSSCrossfadeValue::equals):
1738         (WebCore):
1739         * css/CSSCrossfadeValue.h:
1740         (CSSCrossfadeValue):
1741         * css/CSSCursorImageValue.cpp:
1742         (WebCore::CSSCursorImageValue::equals):
1743         (WebCore):
1744         * css/CSSCursorImageValue.h:
1745         (CSSCursorImageValue):
1746         * css/CSSFontFaceSrcValue.cpp:
1747         (WebCore::CSSFontFaceSrcValue::equals):
1748         (WebCore):
1749         * css/CSSFontFaceSrcValue.h:
1750         (CSSFontFaceSrcValue):
1751         * css/CSSFunctionValue.cpp:
1752         (WebCore::CSSFunctionValue::equals):
1753         (WebCore):
1754         * css/CSSFunctionValue.h:
1755         (CSSFunctionValue):
1756         * css/CSSGradientValue.cpp:
1757         (WebCore::CSSLinearGradientValue::equals):
1758         (WebCore):
1759         (WebCore::CSSRadialGradientValue::equals):
1760         * css/CSSGradientValue.h:
1761         (WebCore::CSSGradientColorStop::operator==):
1762         (CSSLinearGradientValue):
1763         (CSSRadialGradientValue):
1764         * css/CSSImageValue.cpp:
1765         (WebCore::CSSImageValue::equals):
1766         (WebCore):
1767         * css/CSSImageValue.h:
1768         (CSSImageValue):
1769         * css/CSSInheritedValue.h:
1770         (WebCore::CSSInheritedValue::equals):
1771         (CSSInheritedValue):
1772         * css/CSSInitialValue.h:
1773         (WebCore::CSSInitialValue::equals):
1774         (CSSInitialValue):
1775         * css/CSSLineBoxContainValue.h:
1776         (WebCore::CSSLineBoxContainValue::equals):
1777         * css/CSSPrimitiveValue.cpp:
1778         (WebCore::CSSPrimitiveValue::equals):
1779         (WebCore):
1780         * css/CSSPrimitiveValue.h:
1781         (CSSPrimitiveValue):
1782         * css/CSSReflectValue.cpp:
1783         (WebCore::CSSReflectValue::equals):
1784         (WebCore):
1785         * css/CSSReflectValue.h:
1786         (CSSReflectValue):
1787         * css/CSSTimingFunctionValue.cpp:
1788         (WebCore::CSSCubicBezierTimingFunctionValue::equals):
1789         (WebCore):
1790         (WebCore::CSSStepsTimingFunctionValue::equals):
1791         * css/CSSTimingFunctionValue.h:
1792         (WebCore::CSSLinearTimingFunctionValue::equals):
1793         (CSSLinearTimingFunctionValue):
1794         (CSSCubicBezierTimingFunctionValue):
1795         (CSSStepsTimingFunctionValue):
1796         * css/CSSUnicodeRangeValue.cpp:
1797         (WebCore::CSSUnicodeRangeValue::equals):
1798         (WebCore):
1799         * css/CSSUnicodeRangeValue.h:
1800         (CSSUnicodeRangeValue):
1801         * css/CSSValue.cpp:
1802         (WebCore):
1803         (WebCore::compareCSSValues):
1804         (WebCore::CSSValue::equals):
1805         * css/CSSValue.h:
1806         (CSSValue):
1807         (WebCore):
1808         (WebCore::compareCSSValueVector):
1809         (WebCore::compareCSSValuePtr):
1810         * css/CSSValueList.cpp:
1811         (WebCore::CSSValueList::removeAll):
1812         (WebCore::CSSValueList::hasValue):
1813         (WebCore::CSSValueList::equals):
1814         (WebCore):
1815         * css/CSSValueList.h:
1816         (CSSValueList):
1817         * css/CSSVariableValue.h:
1818         (WebCore::CSSVariableValue::equals):
1819         (CSSVariableValue):
1820         * css/Counter.h:
1821         (Counter):
1822         (WebCore::Counter::equals):
1823         * css/DashboardRegion.h:
1824         (WebCore::DashboardRegion::equals):
1825         * css/FontFeatureValue.cpp:
1826         (WebCore::FontFeatureValue::equals):
1827         (WebCore):
1828         * css/FontFeatureValue.h:
1829         (FontFeatureValue):
1830         * css/FontValue.cpp:
1831         (WebCore::FontValue::equals):
1832         (WebCore):
1833         * css/FontValue.h:
1834         (FontValue):
1835         * css/MediaQueryExp.h:
1836         (WebCore::MediaQueryExp::operator==):
1837         * css/Pair.h:
1838         (WebCore::Pair::equals):
1839         (Pair):
1840         * css/Rect.h:
1841         (WebCore::RectBase::equals):
1842         (RectBase):
1843         * css/ShadowValue.cpp:
1844         (WebCore::ShadowValue::equals):
1845         (WebCore):
1846         * css/ShadowValue.h:
1847         (ShadowValue):
1848         * css/StylePropertySet.cpp:
1849         (WebCore::StylePropertySet::get4Values):
1850         (WebCore::StylePropertySet::propertyMatches):
1851         * css/WebKitCSSArrayFunctionValue.cpp:
1852         (WebCore::WebKitCSSArrayFunctionValue::equals):
1853         (WebCore):
1854         * css/WebKitCSSArrayFunctionValue.h:
1855         (WebKitCSSArrayFunctionValue):
1856         * css/WebKitCSSFilterValue.cpp:
1857         (WebCore::WebKitCSSFilterValue::equals):
1858         (WebCore):
1859         * css/WebKitCSSFilterValue.h:
1860         (WebKitCSSFilterValue):
1861         * css/WebKitCSSMixFunctionValue.cpp:
1862         (WebCore::WebKitCSSMixFunctionValue::equals):
1863         (WebCore):
1864         * css/WebKitCSSMixFunctionValue.h:
1865         (WebKitCSSMixFunctionValue):
1866         * css/WebKitCSSSVGDocumentValue.cpp:
1867         (WebCore::WebKitCSSSVGDocumentValue::equals):
1868         (WebCore):
1869         * css/WebKitCSSSVGDocumentValue.h:
1870         (WebKitCSSSVGDocumentValue):
1871         * css/WebKitCSSShaderValue.cpp:
1872         (WebCore::WebKitCSSShaderValue::equals):
1873         (WebCore):
1874         * css/WebKitCSSShaderValue.h:
1875         (WebKitCSSShaderValue):
1876         * css/WebKitCSSTransformValue.h:
1877         (WebCore::WebKitCSSTransformValue::equals):
1878         * editing/EditingStyle.cpp:
1879         (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
1880         * svg/SVGColor.cpp:
1881         (WebCore::SVGColor::equals):
1882         (WebCore):
1883         * svg/SVGColor.h:
1884         (SVGColor):
1885         * svg/SVGPaint.cpp:
1886         (WebCore::SVGPaint::equals):
1887         (WebCore):
1888         * svg/SVGPaint.h:
1889         (SVGPaint):
1890
1891 2013-02-11  Pan Deng  <pan.deng@intel.com>
1892
1893         [Web Inspector] Network panel, sort by "transferSize" instead of "resourceSize".
1894         https://bugs.webkit.org/show_bug.cgi?id=109142.
1895
1896         Reviewed by Vsevolod Vlasov.
1897
1898         Sort by "transferSize" as it is the primary rather than "resoureSize".
1899
1900         No new tests.
1901
1902         * inspector/front-end/NetworkPanel.js:
1903         (WebInspector.NetworkDataGridNode.SizeComparator):
1904
1905 2013-02-11  Eugene Klyuchnikov  <eustas@chromium.org>
1906
1907         Web Inspector: [Resources] Prefactorings in DataGrid and CookieTable
1908         https://bugs.webkit.org/show_bug.cgi?id=109141
1909
1910         Reviewed by Vsevolod Vlasov.
1911
1912         1) Make deleteCookie method static and move to WebInspector.Cookie
1913         2) Replace resfreshCallback getter/setter in DataGrid with
1914         constructor parameter
1915
1916         * inspector/front-end/CookieItemsView.js: Adopt changes.
1917         * inspector/front-end/CookieParser.js:
1918         (WebInspector.Cookie.prototype.remove): Moved from CookiesTable.
1919         * inspector/front-end/CookiesTable.js: Adopt changes.
1920         * inspector/front-end/DataGrid.js:
1921         Replace setter with constructor parameter.
1922
1923 2013-02-11  John J. Barton  <johnjbarton@chromium.org>
1924
1925         Web Inspector: Don't throw exceptions in WebInspector.Color
1926         https://bugs.webkit.org/show_bug.cgi?id=104835
1927
1928         Reviewed by Vsevolod Vlasov.
1929
1930         WebInspector.Color.parse() returns a Color from a string, or null;
1931         Ctor calls now call parse();
1932         In the StylesSideBarPane, test null rather than catch(e).
1933
1934         Added case to inspector/styles/styles-invalid-color-values.html
1935
1936         * inspector/front-end/Color.js:
1937         (WebInspector.Color):
1938         (WebInspector.Color.parse):
1939         (WebInspector.Color.fromRGBA):
1940         (WebInspector.Color.fromRGB):
1941         (WebInspector.Color.prototype.toString):
1942         (WebInspector.Color.prototype._parse.this.alpha.set 0):
1943         (WebInspector.Color.prototype._parse.this.nickname.set 2):
1944         (WebInspector.Color.prototype._parse.this.hsla.set 1):
1945         (WebInspector.Color.prototype._parse.this.rgba.set 0):
1946         (WebInspector.Color.prototype._parse.set WebInspector):
1947         (WebInspector.Color.prototype._parse):
1948         * inspector/front-end/Spectrum.js:
1949         (WebInspector.Spectrum.prototype.get color):
1950         * inspector/front-end/StylesSidebarPane.js:
1951
1952 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
1953
1954         Web Inspector: home button behaviour is wrong in DTE
1955         https://bugs.webkit.org/show_bug.cgi?id=109154
1956
1957         Reviewed by Vsevolod Vlasov.
1958
1959         Handle home key shortcut explicitly in TextEditorMainPanel.
1960
1961         New test: inspector/editor/text-editor-home-button.html
1962
1963         * inspector/front-end/DefaultTextEditor.js:
1964         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
1965         (WebInspector.TextEditorMainPanel.prototype._handleHomeKey):
1966
1967 2013-02-11  Abhishek Arya  <inferno@chromium.org>
1968
1969         Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
1970         https://bugs.webkit.org/show_bug.cgi?id=108981
1971
1972         Reviewed by Eric Seidel.
1973
1974         * Modules/mediastream/RTCStatsResponse.cpp:
1975         (WebCore::RTCStatsResponse::addElement):
1976         (WebCore::RTCStatsResponse::addStatistic):
1977         * Modules/websockets/WebSocketChannel.cpp:
1978         (WebCore::WebSocketChannel::skipBuffer):
1979         * css/CSSCalculationValue.cpp:
1980         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
1981         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
1982         * css/WebKitCSSTransformValue.cpp:
1983         (WebCore::transformValueToCssString):
1984         * editing/TextIterator.cpp:
1985         (WebCore::SearchBuffer::search):
1986         * html/HTMLElement.cpp:
1987         (WebCore::parseColorStringWithCrazyLegacyRules):
1988         * html/ImageData.cpp:
1989         (WebCore::ImageData::ImageData):
1990         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1991         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
1992         * html/track/TextTrackCueList.cpp:
1993         (WebCore::TextTrackCueList::add):
1994         * platform/SharedBuffer.cpp:
1995         (WebCore::SharedBuffer::getSomeData):
1996         * platform/SharedBufferChunkReader.cpp:
1997         (WebCore::SharedBufferChunkReader::nextChunk):
1998         * platform/audio/HRTFDatabase.cpp:
1999         (WebCore::HRTFDatabase::getKernelsFromAzimuthElevation):
2000         * platform/graphics/GlyphPageTreeNode.cpp:
2001         (WebCore::GlyphPageTreeNode::initializePage):
2002         * platform/graphics/Region.cpp:
2003         (WebCore::Region::Shape::segments_end):
2004         * platform/graphics/filters/FEComponentTransfer.cpp:
2005         (WebCore::FEComponentTransfer::getValues):
2006         * platform/graphics/filters/FilterEffect.cpp:
2007         (WebCore::FilterEffect::inputEffect):
2008         * platform/text/TextCodecUTF8.cpp:
2009         (WebCore::TextCodecUTF8::decode):
2010         * platform/text/mac/TextCodecMac.cpp:
2011         (WebCore::TextCodecMac::decode):
2012         * rendering/RenderBlockLineLayout.cpp:
2013         (WebCore::RenderBlock::checkFloatsInCleanLine):
2014         * svg/SVGAnimatedTypeAnimator.h:
2015         (WebCore::SVGAnimatedTypeAnimator::executeAction):
2016         * svg/SVGAnimationElement.cpp:
2017         (WebCore::SVGAnimationElement::calculatePercentForSpline):
2018         * svg/animation/SVGSMILElement.cpp:
2019         (WebCore::SVGSMILElement::findInstanceTime):
2020
2021 2013-02-10  Chris Fleizach  <cfleizach@apple.com>
2022
2023         WebSpeech: Implement basic speaking/finished speaking behavior
2024         https://bugs.webkit.org/show_bug.cgi?id=107135
2025
2026         Reviewed by Sam Weinig.
2027
2028         Implements the basic functionality of speaking utterances.
2029
2030         In the WebCore side, it manages the speech queue the way the spec defines
2031         (that is, new jobs are appended to a queue and wait for other jobs to finish).
2032
2033         On the Mac side, it instantiates a synthesizer and handles the callbacks for when
2034         jobs are finished. It sends those jobs back to WebCore to dispatch the right events.
2035
2036         Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak.html
2037
2038         * Modules/speech/SpeechSynthesis.cpp:
2039         (WebCore::SpeechSynthesis::SpeechSynthesis):
2040         (WebCore::SpeechSynthesis::paused):
2041         (WebCore::SpeechSynthesis::startSpeakingImmediately):
2042         (WebCore::SpeechSynthesis::speak):
2043         (WebCore):
2044         (WebCore::SpeechSynthesis::fireEvent):
2045         (WebCore::SpeechSynthesis::handleSpeakingCompleted):
2046         (WebCore::SpeechSynthesis::didStartSpeaking):
2047         (WebCore::SpeechSynthesis::didFinishSpeaking):
2048         (WebCore::SpeechSynthesis::speakingErrorOccurred):
2049         * Modules/speech/SpeechSynthesis.h:
2050         (WebCore):
2051         (WebCore::SpeechSynthesis::speaking):
2052         (SpeechSynthesis):
2053         * Modules/speech/SpeechSynthesisEvent.cpp:
2054         (WebCore::SpeechSynthesisEvent::create):
2055         (WebCore):
2056         (WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent):
2057         * Modules/speech/SpeechSynthesisEvent.h:
2058         (SpeechSynthesisEvent):
2059         (WebCore::SpeechSynthesisEvent::interfaceName):
2060         * Modules/speech/SpeechSynthesisUtterance.h:
2061         (WebCore::SpeechSynthesisUtterance::startTime):
2062         (WebCore::SpeechSynthesisUtterance::setStartTime):
2063         (SpeechSynthesisUtterance):
2064         * platform/PlatformSpeechSynthesisUtterance.cpp:
2065         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
2066         * platform/PlatformSpeechSynthesisUtterance.h:
2067         (PlatformSpeechSynthesisUtterance):
2068         (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
2069         (WebCore::PlatformSpeechSynthesisUtterance::setRate):
2070         (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
2071         (WebCore::PlatformSpeechSynthesisUtterance::startTime):
2072         (WebCore::PlatformSpeechSynthesisUtterance::setStartTime):
2073         (WebCore::PlatformSpeechSynthesisUtterance::client):
2074         * platform/PlatformSpeechSynthesizer.cpp:
2075         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2076         * platform/PlatformSpeechSynthesizer.h:
2077         (PlatformSpeechSynthesizerClient):
2078         (WebCore::PlatformSpeechSynthesizer::client):
2079         (PlatformSpeechSynthesizer):
2080         * platform/mac/PlatformSpeechSynthesizerMac.mm:
2081         (-[WebSpeechSynthesisWrapper initWithSpeechSynthesizer:WebCore::]):
2082         (-[WebSpeechSynthesisWrapper dealloc]):
2083         (-[WebSpeechSynthesisWrapper convertRateToWPM:]):
2084         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
2085         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
2086         (WebCore::PlatformSpeechSynthesizer::speak):
2087
2088 2013-02-10  Eric Seidel  <eric@webkit.org>
2089
2090         Make the existing HTMLPreloadScanner threading-aware
2091         https://bugs.webkit.org/show_bug.cgi?id=107807
2092
2093         Reviewed by Adam Barth.
2094
2095         The HTMLPreloadScanner and CSSPreloadScanner do a number of things.
2096         CSSPreloadScanner is mostly just a helper class for HTMLPreloadScanner.
2097         HTMLPreloadScanner runs its own copy of the HTMLTokenizer and uses
2098         HTMLTokenizer::updateStateFor to emulate enough of the TreeBuilder
2099         to get a realistic stream of tokens.  It does some additional TreeBuilder
2100         emulation, including tracking template tags and base tags, but mostly
2101         just scans the token stream for start-tags and looks for URLs in them.
2102         It tracks when it has seen a <style> tag and starts sending all character tokens
2103         to the CSSPreloadScanner until a </style> tag is seen.
2104         It also (unfortunately) knows some about the loader guts and how to construct
2105         a proper CachedResourcRequest and issue a preload.
2106
2107         This patch changes the model so that the preload scanners only know how to produce
2108         PreloadRequest objects and append them to a passed-in vector.
2109
2110         This changes the preload-scanner behavior so that preloads are now all issued in one large
2111         batch at the end of scanning, instead of as we hit each resource.  It's possible that
2112         we'll wait to instead check for preload requests more often, at a possible tradeoff
2113         to tokenizing speed.
2114
2115         An alternate approach might be to pass in a preload-delegate of sorts which knew how
2116         to either build a vector, or send requests immediately.  For now the build-a-vector-always
2117         approach seems clean, and does not seem to slow down our PerformanceTest microbenchmarks at least.
2118
2119         This patch has 2 main pieces:
2120         - Remove Document and (and loader) dependencies from HTMLPreloadScanner/CSSPreloadScanner
2121           This is done through introduction of a new HTMLResourcePreloader class which holds
2122           a Document* and knows how to talk to the CachedResourceLoader.
2123         - Clean-up HTMLPreloadScanners token-loop to not be tied to having a Tokenizer.
2124           (On a background thead, the HTMLPreloadScanner won't own the tokenizer, it will just
2125            be passed in tokens and expected to issue loads if necessary.)
2126
2127         This passes all of the LayoutTests using the main thread parser.
2128
2129         This patch does not make the HTMLPreloadScanner 100% ready for threading
2130         (it still uses AtomicString which is currently not-OK on the parser thread)
2131         but it's very close.  Two further (already written) patches will complete this.
2132
2133         * CMakeLists.txt:
2134         * GNUmakefile.list.am:
2135         * Target.pri:
2136         * WebCore.gypi:
2137         * WebCore.vcproj/WebCore.vcproj:
2138         * WebCore.vcxproj/WebCore.vcxproj:
2139         * WebCore.xcodeproj/project.pbxproj:
2140         * html/parser/CSSPreloadScanner.cpp:
2141         (WebCore::CSSPreloadScanner::CSSPreloadScanner):
2142         (WebCore::CSSPreloadScanner::scan):
2143         (WebCore::CSSPreloadScanner::emitRule):
2144         * html/parser/CSSPreloadScanner.h:
2145         (CSSPreloadScanner):
2146         * html/parser/HTMLDocumentParser.cpp:
2147         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2148         (WebCore::HTMLDocumentParser::pumpTokenizer):
2149         (WebCore::HTMLDocumentParser::insert):
2150         (WebCore::HTMLDocumentParser::append):
2151         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
2152         * html/parser/HTMLDocumentParser.h:
2153         (HTMLDocumentParser):
2154         * html/parser/HTMLPreloadScanner.cpp:
2155         (WebCore::isStartTag):
2156         (WebCore):
2157         (WebCore::isStartOrEndTag):
2158         (WebCore::PreloadTask::processAttributes):
2159         (WebCore::PreloadTask::charset):
2160         (PreloadTask):
2161         (WebCore::PreloadTask::resourceType):
2162         (WebCore::PreloadTask::shouldPreload):
2163         (WebCore::PreloadTask::createPreloadRequest):
2164         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2165         (WebCore::HTMLPreloadScanner::scan):
2166         (WebCore::HTMLPreloadScanner::processPossibleTemplateTag):
2167         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
2168         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
2169         (WebCore::HTMLPreloadScanner::processToken):
2170         * html/parser/HTMLPreloadScanner.h:
2171         (HTMLPreloadScanner):
2172         * html/parser/HTMLResourcePreloader.cpp: Added.
2173         (WebCore):
2174         (WebCore::isStringSafeToSendToAnotherThread):
2175         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
2176         (WebCore::PreloadRequest::completeURL):
2177         (WebCore::PreloadRequest::resourceRequest):
2178         (WebCore::HTMLResourcePreloader::preload):
2179         * html/parser/HTMLResourcePreloader.h: Added.
2180         (WebCore):
2181         (PreloadRequest):
2182         (WebCore::PreloadRequest::create):
2183         (WebCore::PreloadRequest::PreloadRequest):
2184         (HTMLResourcePreloader):
2185         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
2186         (WebCore::HTMLResourcePreloader::createWeakPtr):
2187         * loader/cache/CachedResourceRequest.h:
2188
2189 2013-02-06  Kentaro Hara  <haraken@chromium.org>
2190
2191         [V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext()
2192         https://bugs.webkit.org/show_bug.cgi?id=109039
2193
2194         Reviewed by Adam Barth.
2195
2196         This is a follow-up patch for r141983.
2197         Rename methods for consistency.
2198
2199         No tests. No change in behavior.
2200
2201         * bindings/v8/DOMDataStore.cpp:
2202         (WebCore::DOMDataStore::current):
2203         * bindings/v8/DOMWrapperWorld.h:
2204         (WebCore::DOMWrapperWorld::getWorld):
2205         * bindings/v8/ScriptController.cpp:
2206         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
2207         (WebCore::ScriptController::currentWorldContext):
2208         * bindings/v8/V8Binding.h:
2209         (WebCore::worldForEnteredContext):
2210         * bindings/v8/WorldContextHandle.cpp:
2211         (WebCore::WorldContextHandle::WorldContextHandle):
2212         * bindings/v8/custom/V8DocumentCustom.cpp:
2213         (WebCore::wrap):
2214         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2215         (WebCore::wrap):
2216         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
2217         (WebCore::wrap):
2218         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2219         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
2220
2221 2013-02-10  Alexandre Elias  <aelias@chromium.org>
2222
2223         [chromium] Fix Android scrollbar size
2224         https://bugs.webkit.org/show_bug.cgi?id=109374
2225
2226         Reviewed by James Robinson.
2227
2228         This shrinks scrollbars to 3 device-independent pixels (usually 6
2229         physical pixels) and deletes the edge fade. Although the Android
2230         system theme does have an edge fade, it's a much sharper cliff
2231         than we had (against black, the colors go 64 -> 64 -> 52 -> 21 -> 0)
2232         and I can't perceive any difference compared with no fade at all.
2233
2234         No new tests (due for rewrite in a week anyway).
2235
2236         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2237         (WebCore):
2238         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
2239
2240 2013-02-04  Kentaro Hara  <haraken@chromium.org>
2241
2242         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
2243         https://bugs.webkit.org/show_bug.cgi?id=108579
2244
2245         Reviewed by Adam Barth.
2246
2247         Currently V8GCController::m_edenNodes stores a list of nodes whose
2248         wrappers have been created since the latest GC. The reason why we
2249         needed m_edenNodes is that there was no way to know a list of wrappers
2250         in the new space of V8. By using m_edenNodes, we had been approximating
2251         'wrappers in the new space' by 'wrappers that have been created since
2252         the latest GC'.
2253
2254         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
2255         can know a list of wrappers in the new space. By using the API, we can
2256         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
2257         need to keep m_edenNodes and that (2) it enables more precise minor
2258         DOM GC (Remember that m_edenNodes was just an approximation).
2259
2260         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
2261         The benchmark runs 300 iterations, each of which creates 100000 elements.
2262         The benchmark measures average, min, median, max and stdev of execution times
2263         of the 300 iterations. This will tell us the worst-case overhead of this change.
2264
2265         Before:
2266           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
2267
2268         After:
2269           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
2270
2271         As shown above, I couldn't observe any performance regression.
2272
2273         No tests. No change in behavior.
2274
2275         * bindings/v8/DOMDataStore.h:
2276         (WebCore::DOMDataStore::setWrapperInObject):
2277         * bindings/v8/DOMWrapperWorld.h:
2278         (DOMWrapperWorld):
2279         (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
2280         * bindings/v8/V8Binding.h:
2281         (WebCore):
2282         (WebCore::worldForEnteredContextIfIsolated):
2283         (WebCore::worldForEnteredContextWithoutContextCheck):
2284         * bindings/v8/V8DOMWindowShell.cpp:
2285         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2286         * bindings/v8/V8GCController.cpp:
2287         (WebCore::gcTree):
2288         (WebCore):
2289         (MinorGCWrapperVisitor):
2290         (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
2291         (WebCore::MinorGCWrapperVisitor::notifyFinished):
2292         (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
2293         (WebCore::V8GCController::gcPrologue):
2294         (WebCore::V8GCController::minorGCPrologue):
2295         (WebCore::V8GCController::majorGCPrologue):
2296         * bindings/v8/V8GCController.h:
2297         (V8GCController):
2298
2299 2013-02-10  Tim Horton  <timothy_horton@apple.com>
2300
2301         REGRESSION (r132422): Page content and scrollbars are incorrectly offset after restoring a page from the page cache
2302         https://bugs.webkit.org/show_bug.cgi?id=109317
2303         <rdar://problem/12649131>
2304
2305         Reviewed by Simon Fraser.
2306
2307         Mark all scrolling that occurs beneath FrameView::layout as programmatic.
2308
2309         Test: platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
2310
2311         * page/FrameView.cpp:
2312         (WebCore::FrameView::layout):
2313
2314 2013-02-10  Kent Tamura  <tkent@chromium.org>
2315
2316         [Mac] Fix release build failure by recent reverts
2317
2318         * WebCore.exp.in:
2319
2320 2013-02-10  Philippe Normand  <pnormand@igalia.com>
2321
2322         [GStreamer] media/video-controls-fullscreen-volume.html crashes
2323         https://bugs.webkit.org/show_bug.cgi?id=108682
2324
2325         Reviewed by Martin Robinson.
2326
2327         Clean up various signal handlers and avoid bad interaction between
2328         the FullscreenVideoControllerGStreamer and its subclasses,
2329         especially when the platform video window is created.
2330
2331         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
2332         (WebCore::FullscreenVideoControllerGStreamer::enterFullscreen):
2333         Initialize the window before connecting to the volume/mute
2334         signals. This ensures that the signals won't ever interfere with
2335         an inexisting window.
2336         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
2337         (WebCore::GStreamerGWorld::~GStreamerGWorld): Remove GstBus
2338         synchronous handler function.
2339         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2340         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2341         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2342         Disconnect from volume/mute signals.
2343         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
2344         Keep a trace of volume/mute signal handlers.
2345         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2346         Various forward type declarations to avoid un-necessary header includes.
2347         (MediaPlayerPrivateGStreamerBase):
2348         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
2349         (WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk):
2350         (WebCore::FullscreenVideoControllerGtk::volumeChanged): Bail out
2351         if volume button hasn't been created yet.
2352         (WebCore::FullscreenVideoControllerGtk::muteChanged): Ditto.
2353
2354 2013-02-10  Andreas Kling  <akling@apple.com>
2355
2356         RenderStyle should use copy-on-write inheritance for NinePieceImage.
2357         <http://webkit.org/b/109366>
2358
2359         Reviewed by Antti Koivisto.
2360
2361         Refactor NinePieceImage to hold a copy-on-write DataRef like other RenderStyle substructures.
2362         This allows us to avoids copying the NinePieceImageData when one RenderStyle inherits from another
2363         but modifies something in the substructure holding the NinePieceImage (typically StyleSurroundData.)
2364
2365         Also made RenderStyle not copy-on-write its StyleSurroundData prematurely when doing a no-op write
2366         to a border-image related value.
2367
2368         1.23 MB progression on Membuster3.
2369
2370         * rendering/style/NinePieceImage.cpp:
2371         (WebCore::defaultData):
2372         (WebCore::NinePieceImage::NinePieceImage):
2373         (WebCore::NinePieceImageData::NinePieceImageData):
2374         (WebCore::NinePieceImageData::operator==):
2375         * rendering/style/NinePieceImage.h:
2376         (WebCore::NinePieceImageData::create):
2377         (WebCore::NinePieceImageData::copy):
2378         (NinePieceImageData):
2379         (NinePieceImage):
2380         (WebCore::NinePieceImage::operator==):
2381         (WebCore::NinePieceImage::operator!=):
2382         (WebCore::NinePieceImage::hasImage):
2383         (WebCore::NinePieceImage::image):
2384         (WebCore::NinePieceImage::setImage):
2385         (WebCore::NinePieceImage::imageSlices):
2386         (WebCore::NinePieceImage::setImageSlices):
2387         (WebCore::NinePieceImage::fill):
2388         (WebCore::NinePieceImage::setFill):
2389         (WebCore::NinePieceImage::borderSlices):
2390         (WebCore::NinePieceImage::setBorderSlices):
2391         (WebCore::NinePieceImage::outset):
2392         (WebCore::NinePieceImage::setOutset):
2393         (WebCore::NinePieceImage::horizontalRule):
2394         (WebCore::NinePieceImage::setHorizontalRule):
2395         (WebCore::NinePieceImage::verticalRule):
2396         (WebCore::NinePieceImage::setVerticalRule):
2397         (WebCore::NinePieceImage::copyImageSlicesFrom):
2398         (WebCore::NinePieceImage::copyBorderSlicesFrom):
2399         (WebCore::NinePieceImage::copyOutsetFrom):
2400         (WebCore::NinePieceImage::copyRepeatFrom):
2401         (WebCore::NinePieceImage::setMaskDefaults):
2402         (WebCore::NinePieceImage::computeOutset):
2403         * rendering/style/RenderStyle.cpp:
2404         (WebCore::RenderStyle::setBorderImageSource):
2405         (WebCore::RenderStyle::setBorderImageSlices):
2406         (WebCore::RenderStyle::setBorderImageWidth):
2407         (WebCore::RenderStyle::setBorderImageOutset):
2408         * rendering/style/RenderStyle.h:
2409
2410 2013-02-10  Kent Tamura  <tkent@chromium.org>
2411
2412         Unreviewed, rolling out r142343.
2413         http://trac.webkit.org/changeset/142343
2414         https://bugs.webkit.org/show_bug.cgi?id=108284
2415
2416         It might make inspector/profiler/selector-profiler-url.html
2417         crashy.
2418
2419         * WebCore.exp.in:
2420         * css/plugIns.css:
2421         (p):
2422         * html/HTMLPlugInElement.cpp:
2423         (WebCore::HTMLPlugInElement::defaultEventHandler):
2424         * html/HTMLPlugInImageElement.cpp:
2425         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2426         (WebCore::HTMLPlugInImageElement::createRenderer):
2427         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
2428         (WebCore::HTMLPlugInImageElement::updateSnapshot):
2429         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
2430         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
2431         * html/HTMLPlugInImageElement.h:
2432         (WebCore):
2433         (HTMLPlugInImageElement):
2434         * page/ChromeClient.h:
2435         (WebCore::ChromeClient::plugInStartLabelImage):
2436         * platform/LocalizedStrings.cpp:
2437         * platform/LocalizedStrings.h:
2438         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2439         * platform/chromium/LocalizedStringsChromium.cpp:
2440         * platform/efl/LocalizedStringsEfl.cpp:
2441         (WebCore):
2442         * platform/gtk/LocalizedStringsGtk.cpp:
2443         (WebCore):
2444         * platform/qt/LocalizedStringsQt.cpp:
2445         * rendering/RenderSnapshottedPlugIn.cpp:
2446         (WebCore):
2447         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
2448         (WebCore::RenderSnapshottedPlugIn::paint):
2449         (WebCore::RenderSnapshottedPlugIn::paintReplaced):
2450         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2451         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot):
2452         (WebCore::RenderSnapshottedPlugIn::startLabelImage):
2453         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel):
2454         (WebCore::RenderSnapshottedPlugIn::getCursor):
2455         (WebCore::RenderSnapshottedPlugIn::handleEvent):
2456         (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel):
2457         * rendering/RenderSnapshottedPlugIn.h:
2458
2459 2013-02-10  Andreas Kling  <akling@apple.com>
2460
2461         RenderText: Access characters through m_text instead of caching data pointers separately.
2462         <http://webkit.org/b/109357>
2463
2464         Reviewed by Antti Koivisto.
2465
2466         Go through RenderText::m_text.impl() instead of caching the character data pointer.
2467         RenderText should never have a null String in m_text so it's safe to access impl() directly.
2468         We have assertions for this since before.
2469
2470         Removing this pointer shrinks RenderText by 8 bytes, allowing it to fit into a snugger size class.
2471         749 KB progression on Membuster3.
2472
2473         * rendering/RenderText.cpp:
2474         (SameSizeAsRenderText):
2475         (WebCore::RenderText::RenderText):
2476         (WebCore::RenderText::setTextInternal):
2477         * rendering/RenderText.h:
2478         (WebCore::RenderText::is8Bit):
2479         (WebCore::RenderText::characters8):
2480         (WebCore::RenderText::characters16):
2481         (WebCore::RenderText::characterAt):
2482         (WebCore::RenderText::operator[]):
2483         (RenderText):
2484
2485 2013-02-10  Jae Hyun Park  <jae.park08@gmail.com>
2486
2487         Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
2488         https://bugs.webkit.org/show_bug.cgi?id=104266
2489
2490         Reviewed by Philippe Normand.
2491
2492         Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
2493         the existing macro naming conventions.
2494
2495         From Platform.h
2496         USE() - use a particular third-party library or optional OS service
2497         ENABLE() - turn on a specific feature of WebKit
2498
2499         No new tests, no new functionality.
2500
2501         * WebCore.pri:
2502
2503 2013-02-10  Zan Dobersek  <zdobersek@igalia.com>
2504
2505         [GTK] Build errors in TextureMapperShaderProgram.cpp when compiling with Clang
2506         https://bugs.webkit.org/show_bug.cgi?id=109321
2507
2508         Reviewed by Noam Rosenthal.
2509
2510         Clang is reporting errors due to non-constant expressions that cannot be narrowed
2511         from double to float type in initializer list when constructing a matrix of GC3Dfloat
2512         numbers. To avoid this every parameter is passed through an explicit GC3Dfloat constructor.
2513
2514         No new tests - no new functionality.
2515
2516         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
2517         (WebCore::TextureMapperShaderProgram::setMatrix):
2518
2519 2013-02-10  Philippe Normand  <pnormand@igalia.com>
2520
2521         [GStreamer] audio is muted when playback rate is between 0.8 and 2.0
2522         https://bugs.webkit.org/show_bug.cgi?id=109362
2523
2524         Reviewed by Martin Robinson.
2525
2526         Don't mute sound if the audio pitch is preserved. If this is not
2527         the case mute it if it's too extreme, as the HTML5 spec recommends.
2528
2529         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2530         (WebCore::MediaPlayerPrivateGStreamer::setRate):
2531
2532 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
2533
2534         fast/encoding/parser-tests-*.html tests sometimes crash
2535         https://bugs.webkit.org/show_bug.cgi?id=108058
2536
2537         Reviewed by Chris Fleizach.
2538
2539         To avoid calling accessibilityIsIgnored while the render
2540         tree is unstable, call accessibilityIsIgnored in the
2541         notification timer handler, only for childrenChanged
2542         notifications.
2543
2544         This exposed a problem where notifications queued on
2545         objects can fire after the object has been deleted; fix that
2546         by checking the object's id, which is always set to 0 when
2547         removed from the tree.
2548
2549         Covered by existing tests.
2550
2551         * accessibility/AXObjectCache.cpp:
2552         (WebCore::AXObjectCache::childrenChanged):
2553         (WebCore::AXObjectCache::notificationPostTimerFired):
2554
2555 2013-02-09  Eric Carlson  <eric.carlson@apple.com>
2556
2557         [Mac] Do not assume MediaAccessibility framework is installed
2558         https://bugs.webkit.org/show_bug.cgi?id=109365
2559
2560         Reviewed by Sam Weinig.
2561
2562         * page/CaptionUserPreferencesMac.h:
2563         * page/CaptionUserPreferencesMac.mm:
2564         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Call the base class if the framework
2565             is not available.
2566         (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
2567         (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
2568         (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Ditto.
2569         (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
2570         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Ditto.
2571         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
2572         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
2573         (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto.
2574
2575 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
2576
2577         AX: move isIgnored caching to AXObject
2578         https://bugs.webkit.org/show_bug.cgi?id=109322
2579
2580         Reviewed by Chris Fleizach.
2581
2582         There's some benefit to caching accessibilityIsIgnored
2583         (using AXComputedObjectAttributeCache) for more than just
2584         AXRenderObject, so move the caching code to AXObject.
2585
2586         AXObject now has a protected virtual method
2587         computeAccessibilityIsIgnored, and all subclasses
2588         override that instead.
2589
2590         No new tests.
2591
2592         * accessibility/AccessibilityImageMapLink.h:
2593         (AccessibilityImageMapLink):
2594         (WebCore::AccessibilityImageMapLink::computeAccessibilityIsIgnored):
2595         * accessibility/AccessibilityList.cpp:
2596         (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
2597         * accessibility/AccessibilityList.h:
2598         (AccessibilityList):
2599         * accessibility/AccessibilityListBox.cpp:
2600         (WebCore::AccessibilityListBox::computeAccessibilityIsIgnored):
2601         * accessibility/AccessibilityListBox.h:
2602         (AccessibilityListBox):
2603         * accessibility/AccessibilityListBoxOption.cpp:
2604         (WebCore::AccessibilityListBoxOption::computeAccessibilityIsIgnored):
2605         * accessibility/AccessibilityListBoxOption.h:
2606         (AccessibilityListBoxOption):
2607         * accessibility/AccessibilityMediaControls.cpp:
2608         (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored):
2609         (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored):
2610         * accessibility/AccessibilityMediaControls.h:
2611         (AccessibilityMediaControl):
2612         (WebCore::AccessibilityMediaControlsContainer::computeAccessibilityIsIgnored):
2613         (AccessibilityMediaTimeDisplay):
2614         * accessibility/AccessibilityMenuList.h:
2615         (WebCore::AccessibilityMenuList::computeAccessibilityIsIgnored):
2616         * accessibility/AccessibilityMenuListOption.cpp:
2617         (WebCore::AccessibilityMenuListOption::computeAccessibilityIsIgnored):
2618         * accessibility/AccessibilityMenuListOption.h:
2619         (AccessibilityMenuListOption):
2620         * accessibility/AccessibilityMenuListPopup.cpp:
2621         (WebCore::AccessibilityMenuListPopup::computeAccessibilityIsIgnored):
2622         * accessibility/AccessibilityMenuListPopup.h:
2623         (AccessibilityMenuListPopup):
2624         * accessibility/AccessibilityNodeObject.cpp:
2625         (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
2626         * accessibility/AccessibilityNodeObject.h:
2627         (AccessibilityNodeObject):
2628         * accessibility/AccessibilityObject.cpp:
2629         (WebCore::AccessibilityObject::accessibilityIsIgnored):
2630         (WebCore):
2631         * accessibility/AccessibilityObject.h:
2632         (AccessibilityObject):
2633         (WebCore::AccessibilityObject::computeAccessibilityIsIgnored):
2634         * accessibility/AccessibilityProgressIndicator.cpp:
2635         (WebCore::AccessibilityProgressIndicator::computeAccessibilityIsIgnored):
2636         * accessibility/AccessibilityProgressIndicator.h:
2637         (AccessibilityProgressIndicator):
2638         * accessibility/AccessibilityRenderObject.cpp:
2639         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2640         * accessibility/AccessibilityRenderObject.h:
2641         (AccessibilityRenderObject):
2642         * accessibility/AccessibilityScrollView.cpp:
2643         (WebCore::AccessibilityScrollView::computeAccessibilityIsIgnored):
2644         * accessibility/AccessibilityScrollView.h:
2645         (AccessibilityScrollView):
2646         * accessibility/AccessibilityScrollbar.h:
2647         (WebCore::AccessibilityScrollbar::computeAccessibilityIsIgnored):
2648         * accessibility/AccessibilitySlider.cpp:
2649         (WebCore::AccessibilitySlider::computeAccessibilityIsIgnored):
2650         (WebCore::AccessibilitySliderThumb::computeAccessibilityIsIgnored):
2651         * accessibility/AccessibilitySlider.h:
2652         (AccessibilitySlider):
2653         (AccessibilitySliderThumb):
2654         * accessibility/AccessibilitySpinButton.h:
2655         (WebCore::AccessibilitySpinButton::computeAccessibilityIsIgnored):
2656         (WebCore::AccessibilitySpinButtonPart::computeAccessibilityIsIgnored):
2657         * accessibility/AccessibilityTable.cpp:
2658         (WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
2659         * accessibility/AccessibilityTable.h:
2660         (AccessibilityTable):
2661         * accessibility/AccessibilityTableCell.cpp:
2662         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
2663         * accessibility/AccessibilityTableCell.h:
2664         (AccessibilityTableCell):
2665         * accessibility/AccessibilityTableColumn.cpp:
2666         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
2667         * accessibility/AccessibilityTableColumn.h:
2668         (AccessibilityTableColumn):
2669         * accessibility/AccessibilityTableHeaderContainer.cpp:
2670         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
2671         * accessibility/AccessibilityTableHeaderContainer.h:
2672         (AccessibilityTableHeaderContainer):
2673         * accessibility/AccessibilityTableRow.cpp:
2674         (WebCore::AccessibilityTableRow::computeAccessibilityIsIgnored):
2675         * accessibility/AccessibilityTableRow.h:
2676         (AccessibilityTableRow):
2677
2678 2013-02-09  David Farler  <dfarler@apple.com>
2679
2680         Make TestWebKitAPI work for iOS
2681         https://bugs.webkit.org/show_bug.cgi?id=108978
2682
2683         Reviewed by David Kilzer.
2684
2685         Tests already exist - refactor only.
2686
2687         * WebCore.exp.in: Lumped __ZNK7WebCore4KURL7hasPathEv with related methods.
2688         * platform/KURL.cpp: Inlined hasPath() into the header
2689         * platform/KURL.h: Inlined hasPath() into the header
2690
2691 2013-02-09  Adam Barth  <abarth@webkit.org>
2692
2693         Load event fires too early with threaded HTML parser
2694         https://bugs.webkit.org/show_bug.cgi?id=108984
2695
2696         Reviewed by Eric Seidel.
2697
2698         Previously, the DocumentLoader would always be on the stack when the
2699         HTMLDocumentParser was processing data from the network.  The
2700         DocumentLoader would then tell isLoadingInAPISense not to fire the load
2701         event.  Now that we process data asynchronously with the threaded
2702         parser, the DocumentLoader is not always on the stack, which means we
2703         need to delay the load event using the clause that asks the parser
2704         whether it is processing data.
2705
2706         Unfortunately, that clause is fragile because we can check for load
2707         completion while we're switching parsers between the network-created
2708         parser and a script-created parser. To avoid accidentially triggerin
2709         the load event during these "gaps," this patch introduces a counter on
2710         document to record how many parsers are active on the stack.  While
2711         that numer is non-zero, we'll delay the load event. When that number
2712         reaches zero, we'll check for load complete.
2713
2714         That last step is required because the DocumentLoader::finishLoading
2715         method is no longer guarunteed to check for load complete after calling
2716         finish on the parser because the finish operation might complete
2717         asynchronously.
2718
2719         After this patch, the threaded parser passes all but four fast/parser
2720         tests.
2721
2722         * dom/Document.cpp:
2723         (WebCore::Document::Document):
2724         (WebCore::Document::hasActiveParser):
2725         (WebCore):
2726         (WebCore::Document::decrementActiveParserCount):
2727         * dom/Document.h:
2728         (Document):
2729         (WebCore::Document::incrementActiveParserCount):
2730         * html/parser/HTMLDocumentParser.cpp:
2731         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
2732         (WebCore::HTMLDocumentParser::pumpTokenizer):
2733         * html/parser/HTMLParserScheduler.cpp:
2734         (WebCore::ActiveParserSession::ActiveParserSession):
2735         (WebCore):
2736         (WebCore::ActiveParserSession::~ActiveParserSession):
2737         (WebCore::PumpSession::PumpSession):
2738         (WebCore::PumpSession::~PumpSession):
2739         * html/parser/HTMLParserScheduler.h:
2740         (WebCore):
2741         (ActiveParserSession):
2742         (PumpSession):
2743         * loader/DocumentLoader.cpp:
2744         (WebCore::DocumentLoader::isLoadingInAPISense):
2745
2746 2013-02-09  Mike West  <mkwst@chromium.org>
2747
2748         Use IGNORE_EXCEPTION for initialized, but unused, ExceptionCodes.
2749         https://bugs.webkit.org/show_bug.cgi?id=109295
2750
2751         Reviewed by Darin Adler.
2752
2753         The monster patch in http://wkbug.com/108771 missed an entire class of
2754         ignored exceptions. It only dealt with call sites that never initialized
2755         the ExceptionCode variable, on the assumption that only such call sites
2756         would ignore the variable's value.
2757
2758         That was a flawed assumption: a large number of sites that initialize the
2759         ExceptionCode to 0 ignore it regardless. This patch deals with the
2760         almost-as-large set of callsites that initialize the variable, pass it to
2761         a function, and then never touch it again.
2762
2763         * Modules/indexeddb/IDBDatabase.cpp:
2764         (WebCore::IDBDatabase::forceClose):
2765         * accessibility/AccessibilityRenderObject.cpp:
2766         (WebCore::AccessibilityRenderObject::ariaSelectedTextRange):
2767         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
2768         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
2769         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2770         (getSelectionOffsetsForObject):
2771         * accessibility/atk/WebKitAccessibleUtil.cpp:
2772         (selectionBelongsToObject):
2773         * dom/Node.cpp:
2774         (WebCore::Node::textRects):
2775         * editing/DeleteButtonController.cpp:
2776         (WebCore::DeleteButtonController::hide):
2777         * editing/EditingStyle.cpp:
2778         (WebCore::EditingStyle::styleAtSelectionStart):
2779         * editing/Editor.cpp:
2780         (WebCore::Editor::canDeleteRange):
2781         (WebCore::Editor::pasteAsPlainText):
2782         (WebCore::Editor::pasteAsFragment):
2783         (WebCore::Editor::shouldDeleteRange):
2784         (WebCore::Editor::dispatchCPPEvent):
2785         (WebCore::Editor::setComposition):
2786         (WebCore::Editor::advanceToNextMisspelling):
2787         (WebCore::isFrameInRange):
2788         * editing/EditorCommand.cpp:
2789         (WebCore::expandSelectionToGranularity):
2790         * editing/MergeIdenticalElementsCommand.cpp:
2791         (WebCore::MergeIdenticalElementsCommand::doApply):
2792         * editing/SplitElementCommand.cpp:
2793         (WebCore::SplitElementCommand::doUnapply):
2794         * editing/SplitTextNodeCommand.cpp:
2795         (WebCore::SplitTextNodeCommand::doApply):
2796         * editing/TextCheckingHelper.cpp:
2797         (WebCore::expandToParagraphBoundary):
2798         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
2799         (WebCore::TextCheckingHelper::isUngrammatical):
2800         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
2801         * editing/TextInsertionBaseCommand.cpp:
2802         (WebCore::dispatchBeforeTextInsertedEvent):
2803         (WebCore::canAppendNewLineFeedToSelection):
2804         * editing/TextIterator.cpp:
2805         (WebCore::findPlainText):
2806         * editing/htmlediting.cpp:
2807         (WebCore::extendRangeToWrappingNodes):
2808         (WebCore::isNodeVisiblyContainedWithin):
2809         * editing/visible_units.cpp:
2810         (WebCore::nextBoundary):
2811         * html/FileInputType.cpp:
2812         (WebCore::FileInputType::createShadowSubtree):
2813         * html/HTMLKeygenElement.cpp:
2814         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
2815         * html/HTMLScriptElement.cpp:
2816         (WebCore::HTMLScriptElement::setText):
2817         * html/HTMLTitleElement.cpp:
2818         (WebCore::HTMLTitleElement::setText):
2819         * html/HTMLTrackElement.cpp:
2820         (WebCore::HTMLTrackElement::didCompleteLoad):
2821         * html/RangeInputType.cpp:
2822         (WebCore::RangeInputType::createShadowSubtree):
2823         * html/SearchInputType.cpp:
2824         (WebCore::SearchInputType::createShadowSubtree):
2825         * html/TextFieldInputType.cpp:
2826         (WebCore::TextFieldInputType::createShadowSubtree):
2827         * html/track/TextTrackList.cpp:
2828         (TextTrackList::asyncEventTimerFired):
2829         * inspector/DOMPatchSupport.cpp:
2830         (WebCore::DOMPatchSupport::patchDocument):
2831         * inspector/InspectorDatabaseAgent.cpp:
2832         (WebCore):
2833         * inspector/InspectorFileSystemAgent.cpp:
2834         (WebCore):
2835         * page/DOMSelection.cpp:
2836         (WebCore::DOMSelection::addRange):
2837         * page/DragController.cpp:
2838         (WebCore::DragController::dispatchTextInputEventFor):
2839         * page/EventHandler.cpp:
2840         (WebCore::EventHandler::dispatchMouseEvent):
2841         (WebCore::EventHandler::handleTouchEvent):
2842         * page/FrameActionScheduler.cpp:
2843         (WebCore::EventFrameAction::fire):
2844         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2845         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2846         * svg/SVGDocument.cpp:
2847         (WebCore::SVGDocument::dispatchZoomEvent):
2848         (WebCore::SVGDocument::dispatchScrollEvent):
2849         * svg/SVGLength.cpp:
2850         (WebCore::SVGLength::SVGLength):
2851         (WebCore::SVGLength::value):
2852         * xml/parser/XMLDocumentParser.cpp:
2853         (WebCore::XMLDocumentParser::exitText):
2854         * xml/parser/XMLDocumentParserQt.cpp:
2855         (WebCore::XMLDocumentParser::parse):
2856         (WebCore::XMLDocumentParser::startDocument):
2857         (WebCore::XMLDocumentParser::parseCharacters):
2858
2859 2013-02-09  Stephen White  <senorblanco@chromium.org>
2860
2861         [skia] Fix memory management in SkiaImageFilterBuilder and friends.
2862         https://bugs.webkit.org/show_bug.cgi?id=109326
2863
2864         Sadly, skia has no official ref-counted pointers, so we must make do
2865         with SkAutoTUnref.
2866
2867         Reviewed by James Robinson.
2868
2869         Correctness covered by existing tests in css3/filters.
2870
2871         * platform/graphics/filters/skia/FEBlendSkia.cpp:
2872         (WebCore::FEBlend::createImageFilter):
2873         * platform/graphics/filters/skia/FEComponentTransferSkia.cpp:
2874         (WebCore::FEComponentTransfer::createImageFilter):
2875         * platform/graphics/filters/skia/FELightingSkia.cpp:
2876         (WebCore::FELighting::createImageFilter):
2877         Adopt refs produced by the build() pass with SkAutoTUnref.
2878         * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp:
2879         (WebCore::SkiaImageFilterBuilder::~SkiaImageFilterBuilder):
2880         Unref the builder's hashmap effect pointers.
2881         (WebCore::SkiaImageFilterBuilder::build):
2882         Ref the pointer returned to the caller, and use SkAutoTUnref
2883         internally while building the tree.
2884         * platform/graphics/filters/skia/SkiaImageFilterBuilder.h:
2885         (SkiaImageFilterBuilder):
2886         Add a destructor to SkiaImageFilterBuilder.
2887
2888
2889 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
2890
2891         AX: Rename AXObject::cachedIsIgnoredValue to lastKnownIsIgnoredValue
2892         https://bugs.webkit.org/show_bug.cgi?id=108238
2893
2894         Reviewed by Chris Fleizach.
2895
2896         Simple refactoring, no new tests.
2897
2898         * accessibility/AXObjectCache.cpp:
2899         (WebCore::AXObjectCache::getOrCreate):
2900         (WebCore::AXObjectCache::childrenChanged):
2901         * accessibility/AccessibilityObject.cpp:
2902         (WebCore::AccessibilityObject::AccessibilityObject):
2903         (WebCore::AccessibilityObject::lastKnownIsIgnoredValue):
2904         (WebCore::AccessibilityObject::setLastKnownIsIgnoredValue):
2905         (WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
2906         * accessibility/AccessibilityObject.h:
2907         (AccessibilityObject):
2908
2909 2013-02-09  Anton Vayvod  <avayvod@chromium.org>
2910  
2911         [Text Autosizing] Cleanup change: converter the pointer argument to be a reference since
2912         non-null pointer is always expected.
2913         https://bugs.webkit.org/show_bug.cgi?id=109079
2914  
2915         Reviewed by Kenneth Rohde Christiansen.
2916  
2917         Cleanup change, no need to add new tests or modify the existing ones.
2918  
2919         * rendering/TextAutosizer.cpp:
2920  
2921         Changed parameter from a pointer to a reference in the methods below.
2922  
2923         (WebCore::TextAutosizer::processSubtree):
2924         (WebCore::TextAutosizer::processCluster):
2925         (WebCore::TextAutosizer::processContainer):
2926         (WebCore::TextAutosizer::isNarrowDescendant):
2927         (WebCore::TextAutosizer::isWiderDescendant):
2928         (WebCore::TextAutosizer::isAutosizingCluster):
2929         (WebCore::TextAutosizer::clusterShouldBeAutosized):
2930         (WebCore::TextAutosizer::measureDescendantTextWidth):
2931  
2932         * rendering/TextAutosizer.h: updated method prototypes.
2933
2934 2013-02-09  Rafael Brandao  <rafael.lobo@openbossa.org>
2935
2936         [TexMap] Separate classes per file in TextureMapperBackingStore.h
2937         https://bugs.webkit.org/show_bug.cgi?id=109333
2938
2939         Reviewed by Noam Rosenthal.
2940
2941         TextureMapperBackingStore.h had the classes TextureMapperBackingStore,
2942         TextureMapperTiledBackingStore, TextureMapperSurfaceBackingStore and
2943         TextureMapperTile which was quite confusing. Now each one has its
2944         own header and its own source file.
2945
2946         No new tests needed, refactoring only.
2947
2948         * CMakeLists.txt:
2949         * GNUmakefile.list.am:
2950         * Target.pri:
2951         * WebCore.gypi:
2952         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2953         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
2954         * platform/graphics/texmap/TextureMapperBackingStore.h:
2955         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Added.
2956         (WebCore):
2957         (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
2958         (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
2959         (WebCore::TextureMapperSurfaceBackingStore::texture):
2960         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
2961         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Added.
2962         (WebCore):
2963         (TextureMapperSurfaceBackingStore):
2964         (WebCore::TextureMapperSurfaceBackingStore::create):
2965         (WebCore::TextureMapperSurfaceBackingStore::~TextureMapperSurfaceBackingStore):
2966         (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore):
2967         * platform/graphics/texmap/TextureMapperTile.cpp: Added.
2968         (WebCore):
2969         (WebCore::TextureMapperTile::updateContents):
2970         (WebCore::TextureMapperTile::paint):
2971         * platform/graphics/texmap/TextureMapperTile.h: Added.
2972         (WebCore):
2973         (TextureMapperTile):
2974         (WebCore::TextureMapperTile::texture):
2975         (WebCore::TextureMapperTile::rect):
2976         (WebCore::TextureMapperTile::setTexture):
2977         (WebCore::TextureMapperTile::setRect):
2978         (WebCore::TextureMapperTile::~TextureMapperTile):
2979         (WebCore::TextureMapperTile::TextureMapperTile):
2980         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp: Copied from Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp.
2981         (WebCore):
2982         (WebCore::TextureMapperTiledBackingStore::TextureMapperTiledBackingStore):
2983         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
2984         (WebCore::TextureMapperTiledBackingStore::adjustedTransformForRect):
2985         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
2986         (WebCore::TextureMapperTiledBackingStore::drawBorder):
2987         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
2988         (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
2989         (WebCore::TextureMapperTiledBackingStore::updateContents):
2990         (WebCore::TextureMapperTiledBackingStore::texture):
2991         * platform/graphics/texmap/TextureMapperTiledBackingStore.h: Added.
2992         (WebCore):
2993         (TextureMapperTiledBackingStore):
2994         (WebCore::TextureMapperTiledBackingStore::create):
2995         (WebCore::TextureMapperTiledBackingStore::~TextureMapperTiledBackingStore):
2996         (WebCore::TextureMapperTiledBackingStore::setContentsToImage):
2997         (WebCore::TextureMapperTiledBackingStore::rect):
2998         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
2999         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
3000
3001 2013-02-09  Philip Rogers  <pdr@google.com>
3002
3003         Sanitize m_keyTimes for paced value animations
3004         https://bugs.webkit.org/show_bug.cgi?id=108828
3005
3006         Reviewed by Dirk Schulze.
3007
3008         SVG animations with calcMode=paced calculate new m_keyTimes in
3009         SVGAnimationElement::calculateKeyTimesForCalcModePaced() because paced animations do not
3010         specify keyTimes. If an error occurs while calculating m_keyTimes, and there exists
3011         user-specified values, a crash could occur because the user-specified values were not
3012         sanitized.
3013
3014         This change clears user-specified keyTimes before calculating new ones.
3015
3016         Test: svg/animations/animate-keytimes-crash.html
3017
3018         * svg/SVGAnimationElement.cpp:
3019         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
3020
3021 2013-02-09  Eric Seidel  <eric@webkit.org>
3022
3023         Fix TextDocumentParser to play nice with threading
3024         https://bugs.webkit.org/show_bug.cgi?id=109240
3025
3026         Reviewed by Adam Barth.
3027
3028         Before the HTML5 parser re-write the text document parser
3029         was completely custom.  With the HTML5 parser, we just made
3030         the TextDocumentParser use the HTMLDocumentParser with an
3031         artificial script tag.
3032
3033         However, our solution was slightly over-engineered to avoid
3034         lying about the column numbers of the first line of the text document
3035         during parsing. :)
3036
3037         This change makes us use a simpler (and threading-compatible)
3038         solution by just inserting a real "<pre>" tag into the
3039         input stream instead of hacking one together with the treebuilder
3040         and manually setting the Tokenizer state.
3041
3042         fast/parser/empty-text-resource.html covers this case.
3043
3044         * html/parser/TextDocumentParser.cpp:
3045         (WebCore::TextDocumentParser::TextDocumentParser):
3046         (WebCore::TextDocumentParser::insertFakePreElement):
3047
3048 2013-02-09  Kent Tamura  <tkent@chromium.org>
3049
3050         Add missing copyright header
3051         https://bugs.webkit.org/show_bug.cgi?id=107507
3052
3053         * Resources/pagepopups/chromium/calendarPickerChromium.css:
3054         * Resources/pagepopups/chromium/pickerCommonChromium.css:
3055
3056 2013-02-09  Kent Tamura  <tkent@chromium.org>
3057
3058         Fix crash by img[ismap] with content property
3059         https://bugs.webkit.org/show_bug.cgi?id=108702
3060
3061         Reviewed by Adam Barth.
3062
3063         Test: fast/dom/HTMLAnchorElement/anchor-ismap-crash.html
3064
3065         * html/HTMLAnchorElement.cpp:
3066         (WebCore::appendServerMapMousePosition):
3067         Check if the renderer of an img element is RenderImage.
3068
3069 2013-02-09  Mike West  <mkwst@chromium.org>
3070
3071         Drop ExceptionCode from IDB's directionToString and modeToString.
3072         https://bugs.webkit.org/show_bug.cgi?id=109143
3073
3074         Reviewed by Jochen Eisinger.
3075
3076         No caller of either IDBCursor::directionToString or
3077         IDBTransaction::modeToString makes use of the ExceptionCode these
3078         methods require. This patch removes the 'ExceptionCode&' parameter from
3079         both methods and their callsites.
3080
3081         * Modules/indexeddb/IDBCursor.cpp:
3082         (WebCore::IDBCursor::direction):
3083         (WebCore::IDBCursor::directionToString):
3084             Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
3085             exception previously generated with ASSERT_NOT_REACHED.
3086         * Modules/indexeddb/IDBCursor.h:
3087         * Modules/indexeddb/IDBTransaction.cpp:
3088         (WebCore::IDBTransaction::mode):
3089         (WebCore::IDBTransaction::modeToString):
3090             Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
3091             exception previously generated with ASSERT_NOT_REACHED.
3092         * Modules/indexeddb/IDBTransaction.h:
3093
3094 2013-02-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3095
3096         [EFL][Qt][WebGL] Share the common code between GraphicsSurfaceGLX and X11WindowResources.
3097         https://bugs.webkit.org/show_bug.cgi?id=106666
3098
3099         Reviewed by Kenneth Rohde Christiansen.
3100
3101         Covered by existing WebGL tests.
3102
3103         This patch removes any duplicate code in X11WindowResources and
3104         GraphicsSurfaceGLX. No new functionality is added.
3105
3106         * PlatformEfl.cmake:
3107         * Target.pri:
3108         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
3109         (WebCore::EGLConfigSelector::pixmapContextConfig):
3110         * platform/graphics/surfaces/egl/EGLConfigSelector.h:
3111         (EGLConfigSelector):
3112         * platform/graphics/surfaces/egl/EGLSurface.cpp:
3113         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
3114         (WebCore::EGLWindowTransportSurface::destroy):
3115         (WebCore::EGLWindowTransportSurface::setGeometry):
3116         * platform/graphics/surfaces/egl/EGLSurface.h:
3117         (WebCore):
3118         (EGLWindowTransportSurface):
3119         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
3120         (WebCore::GLXConfigSelector::GLXConfigSelector):
3121         (WebCore::GLXConfigSelector::visualInfo):
3122         (WebCore::GLXConfigSelector::pBufferContextConfig):
3123         (WebCore::GLXConfigSelector::createSurfaceConfig):
3124         (GLXConfigSelector):
3125         * platform/graphics/surfaces/glx/GLXContext.cpp:
3126         (WebCore::initializeARBExtensions):
3127         (WebCore::GLXOffScreenContext::GLXOffScreenContext):
3128         (WebCore::GLXOffScreenContext::initialize):
3129         (WebCore::GLXOffScreenContext::platformReleaseCurrent):
3130         (WebCore::GLXOffScreenContext::freeResources):
3131         * platform/graphics/surfaces/glx/GLXContext.h:
3132         (GLXOffScreenContext):
3133         * platform/graphics/surfaces/glx/GLXSurface.cpp:
3134         (WebCore::GLXTransportSurface::GLXTransportSurface):
3135         (WebCore::GLXTransportSurface::setGeometry):
3136         (WebCore::GLXTransportSurface::destroy):
3137         (WebCore::GLXPBuffer::initialize):
3138         * platform/graphics/surfaces/glx/GLXSurface.h:
3139         (GLXTransportSurface):
3140         (GLXPBuffer):
3141         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
3142         (WebCore):
3143         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
3144         (WebCore::GraphicsSurfacePrivate::initialize):
3145         (GraphicsSurfacePrivate):
3146         (WebCore::GraphicsSurfacePrivate::createSurface):
3147         (WebCore::GraphicsSurfacePrivate::createPixmap):
3148         (WebCore::GraphicsSurfacePrivate::display):
3149         (WebCore::GraphicsSurfacePrivate::flags):
3150         (WebCore::GraphicsSurfacePrivate::clear):
3151         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
3152         No new functionality added. Made changes to take the common code into use.
3153
3154         * platform/graphics/surfaces/glx/X11WindowResources.h: Removed.
3155         * platform/graphics/surfaces/glx/X11Helper.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.cpp.
3156         (WebCore):
3157         (WebCore::DisplayConnection::DisplayConnection):
3158         (DisplayConnection):
3159         (WebCore::DisplayConnection::~DisplayConnection):
3160         (WebCore::DisplayConnection::display):
3161         (OffScreenRootWindow):
3162         (WebCore::OffScreenRootWindow::OffScreenRootWindow):
3163         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
3164         (WebCore::OffScreenRootWindow::rootWindow):
3165         (WebCore::X11Helper::resizeWindow):
3166         (WebCore::X11Helper::createOffScreenWindow):
3167         (WebCore::X11Helper::destroyWindow):
3168         (WebCore::X11Helper::isXRenderExtensionSupported):
3169         (WebCore::X11Helper::nativeDisplay):
3170         (WebCore::X11Helper::offscreenRootWindow):
3171         * platform/graphics/surfaces/glx/X11Helper.h: Added.
3172         (WebCore):
3173         (WebCore::handleXPixmapCreationError):
3174         (X11Helper):
3175         (ScopedXPixmapCreationErrorHandler):
3176         (WebCore::ScopedXPixmapCreationErrorHandler::ScopedXPixmapCreationErrorHandler):
3177         (WebCore::ScopedXPixmapCreationErrorHandler::~ScopedXPixmapCreationErrorHandler):
3178         (WebCore::ScopedXPixmapCreationErrorHandler::isValidOperation):
3179         Moved common code from GraphicsSurfaceGLX to X11Helper.
3180
3181 2013-02-09  Andrey Lushnikov  <lushnikov@chromium.org>
3182
3183         Web Inspector: show whitespace characters in DTE
3184         https://bugs.webkit.org/show_bug.cgi?id=108947
3185
3186         Reviewed by Pavel Feldman.
3187
3188         New test: inspector/editor/text-editor-show-whitespaces.html
3189
3190         Split consecutive whitespace characters into groups of 16, 8, 4, 2 and 1 and
3191         add ::before pseudoclass for this groups which contains necessary
3192         amount of "dots" (u+00b7). Add a setting "Show whitespace" for this
3193         option in "Sources" section of "General" tab.
3194
3195         * English.lproj/localizedStrings.js:
3196         * inspector/front-end/DefaultTextEditor.js:
3197         (WebInspector.TextEditorMainPanel.prototype.wasShown):
3198         (WebInspector.TextEditorMainPanel.prototype.willHide):
3199         (WebInspector.TextEditorMainPanel.prototype._renderRanges):
3200         (WebInspector.TextEditorMainPanel.prototype._renderWhitespaceCharsWithFixedSizeSpans):
3201         (WebInspector.TextEditorMainPanel.prototype._paintLine):
3202         * inspector/front-end/Settings.js:
3203         * inspector/front-end/SettingsScreen.js:
3204         (WebInspector.GenericSettingsTab):
3205         * inspector/front-end/inspectorSyntaxHighlight.css:
3206         (.webkit-whitespace-1::before):
3207         (.webkit-whitespace-2::before):
3208         (.webkit-whitespace-4::before):
3209         (.webkit-whitespace-8::before):
3210         (.webkit-whitespace-16::before):
3211         (.webkit-whitespace::before):
3212
3213 2013-02-08  Eric Carlson  <eric.carlson@apple.com>
3214
3215         [Mac] respect in-band caption color
3216         https://bugs.webkit.org/show_bug.cgi?id=109203
3217
3218         Reviewed by Dean Jackson.
3219
3220         Test: media/track/track-in-band-style.html
3221
3222         * WebCore.xcodeproj/project.pbxproj: Add HTMLDivElement.h to private headers because it is 
3223             included by HTMLTextElement, which is included by HTMLMediaElement.h, which is included 
3224             by files in WebKit/WebKit2.
3225         * html/track/InbandTextTrack.cpp:
3226         (WebCore::InbandTextTrack::addGenericCue): Set cue colors if necessary.
3227
3228         * html/track/TextTrackCue.h:
3229         (WebCore::TextTrackCue::element): New, accessor for the cue element so it can be styled.
3230
3231         * html/track/TextTrackCueGeneric.cpp:
3232         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set container and cue background 
3233             color if necessary.
3234         (WebCore::TextTrackCueGeneric::operator==): Compare cue colors.
3235         * html/track/TextTrackCueGeneric.h:
3236         (WebCore::TextTrackCueGeneric::foregroundColor): Add color accessors.
3237         (WebCore::TextTrackCueGeneric::setForegroundColor):
3238         (WebCore::TextTrackCueGeneric::backgroundColor):
3239         (WebCore::TextTrackCueGeneric::setBackgroundColor):
3240
3241         * page/CaptionUserPreferencesMac.mm:
3242         (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Always
3243             regenerate override CSS when an element registers for callbacks.
3244         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Drive by fix of "window color" padding.
3245         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Log the stylesheet generated
3246             for easier debugging.
3247
3248         * platform/graphics/InbandTextTrackPrivateClient.h:
3249         (WebCore::GenericCueData::foregroundColor): Add color getters/setters.
3250         (WebCore::GenericCueData::setForegroundColor):
3251         (WebCore::GenericCueData::backgroundColor):
3252         (WebCore::GenericCueData::setBackgroundColor):
3253
3254         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3255         (WebCore::makeRGBA32FromARGBCFArray): Initialize a RGBA32 from a CFArray of color values.
3256         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process cue colors.
3257
3258 2013-02-08  Benjamin Poulain  <bpoulain@apple.com>
3259
3260         Move workerThreadCount from TestRunner to WebCore Internals
3261         https://bugs.webkit.org/show_bug.cgi?id=109239
3262
3263         Reviewed by Darin Adler.
3264
3265         Add the new read-only property workerThreadCount.
3266
3267         * testing/Internals.cpp:
3268         (WebCore::Internals::workerThreadCount):
3269         (WebCore):
3270         * testing/Internals.h:
3271         (Internals):
3272         * testing/Internals.idl:
3273
3274 2013-02-08  Dean Jackson  <dino@apple.com>
3275
3276         Snapshotted plug-in should use shadow root
3277         https://bugs.webkit.org/show_bug.cgi?id=108284
3278
3279         Reviewed by Simon Fraser.
3280
3281         Take two! This time with updated exports file.
3282
3283         A snapshotted plugin needs to indicate to the user that it can be clicked
3284         to be restarted. Previously this was done with an image that had embedded
3285         text. Instead, we now use an internal shadow root to embed some markup that
3286         will display instructions that can be localised.
3287
3288         The UA stylesheet for plug-ins provides a default styling for the label, which
3289         can be overridden by ports.
3290
3291         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
3292         since it is only responsible for drawing a paused plug-in. The snapshot creation
3293         can work with the default renderer, but a shadow root requires something like
3294         RenderBlock in order to draw its children. We swap from one renderer to another when
3295         necessary either by creating the shadow root or by explicitly detaching and attaching
3296         the plugin element.
3297
3298         Unfortunately this is difficult to test, because the snapshotting requires
3299         time to execute, and also a PluginView to be instantiated.
3300
3301         * WebCore.exp.in: Export the InlineBox interface.
3302
3303         * css/plugIns.css:
3304         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
3305
3306         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
3307         * platform/LocalizedStrings.h:
3308         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
3309         * platform/chromium/LocalizedStringsChromium.cpp:
3310         * platform/efl/LocalizedStringsEfl.cpp:
3311         * platform/gtk/LocalizedStringsGtk.cpp:
3312         * platform/qt/LocalizedStringsQt.cpp:
3313
3314         * html/HTMLPlugInElement.cpp:
3315         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
3316         that RenderSnapshottedPlugIn no longer is an embedded object.
3317
3318         * html/HTMLPlugInImageElement.cpp:
3319         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
3320         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
3321         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
3322         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
3323             a renderer, otherwise use the typical plug-in path.
3324         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
3325             need to give it to the renderer.
3326         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
3327         * html/HTMLPlugInImageElement.h:
3328         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
3329             should show immediately.
3330         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
3331             to swap to the Shadow Root.
3332         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
3333             in being recreated. Make sure we reattach so that a plugin renderer will be created.
3334         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
3335             displayState for snapshots.
3336         * html/HTMLPlugInImageElement.h:
3337         (HTMLPlugInImageElement): The new methods listed above.
3338         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
3339             a snapshot should be immediately labeled.
3340
3341         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
3342
3343         * rendering/RenderSnapshottedPlugIn.cpp:
3344         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
3345         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
3346         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
3347         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
3348         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
3349         (WebCore::RenderSnapshottedPlugIn::getCursor):
3350         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
3351         * rendering/RenderSnapshottedPlugIn.h:
3352         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
3353
3354 2013-02-08  Dean Jackson  <dino@apple.com>
3355
3356         Rolling out r142333 and r142337 which broke Mac Release builds.
3357
3358 2013-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3359
3360         Unreviewed, rolling out r142337.
3361         http://trac.webkit.org/changeset/142337
3362         https://bugs.webkit.org/show_bug.cgi?id=109339
3363
3364         Breaking Mac release builds (Requested by dino_ on #webkit).
3365
3366         * rendering/RenderSnapshottedPlugIn.h:
3367
3368 2013-02-08  Dean Jackson  <dino@apple.com>
3369
3370         Attempted Mac and GTK build fix after r142333.
3371
3372         * rendering/RenderSnapshottedPlugIn.h: Include InlineBox.h.
3373
3374 2013-02-08  Andy Estes  <aestes@apple.com>
3375
3376         Restore pre-r118852 behavior for EllipsisBox::nodeAtPoint()
3377         https://bugs.webkit.org/show_bug.cgi?id=109277
3378
3379         Reviewed by Simon Fraser.
3380
3381         Test: fast/flexbox/line-clamp-link-after-ellipsis.html
3382
3383         Roll out r118852. Enough time has passed that this can't be done
3384         mechanically, so transcribe the old method definition to current
3385         WebCore interfaces.
3386
3387         * rendering/EllipsisBox.cpp:
3388         (WebCore::EllipsisBox::markupBox): EllipsisBox no longer has
3389         m_markupBox, so break the logic for finding the markup box from
3390         paintMarkupBox() into its own function.
3391         (WebCore::EllipsisBox::paintMarkupBox): Call markupBox().
3392         (WebCore::EllipsisBox::nodeAtPoint): Transcribe the pre-r118852 implementation.
3393         * rendering/EllipsisBox.h:
3394         (EllipsisBox): Declare markupBox().
3395
3396 2013-02-08  Eric Carlson  <eric.carlson@apple.com>
3397
3398         [Mac] In-band closed caption tracks are not always initialized correctly
3399         https://bugs.webkit.org/show_bug.cgi?id=109323
3400
3401         Reviewed by Dean Jackson.
3402
3403         No new tests, this fix makes existing tests less flakey.
3404
3405         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3406         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Create and configure legible output
3407             here instad of in tracksChanged.
3408         (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Do nothing in a build with
3409             in-band track support.
3410         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Move legible output creation to 
3411             createAVPlayerItem, don't set look at track media type to see if the movie has captions 
3412             when we have support for in-band captions.
3413
3414 2013-02-08  Dean Jackson  <dino@apple.com>
3415
3416         Snapshotted plug-in should use shadow root
3417         https://bugs.webkit.org/show_bug.cgi?id=108284
3418
3419         Reviewed by Simon Fraser.
3420
3421         A snapshotted plugin needs to indicate to the user that it can be clicked
3422         to be restarted. Previously this was done with an image that had embedded
3423         text. Instead, we now use an internal shadow root to embed some markup that
3424         will display instructions that can be localised.
3425
3426         The UA stylesheet for plug-ins provides a default styling for the label, which
3427         can be overridden by ports.
3428
3429         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
3430         since it is only responsible for drawing a paused plug-in. The snapshot creation
3431         can work with the default renderer, but a shadow root requires something like
3432         RenderBlock in order to draw its children. We swap from one renderer to another when
3433         necessary either by creating the shadow root or by explicitly detaching and attaching
3434         the plugin element.
3435
3436         Unfortunately this is difficult to test, because the snapshotting requires
3437         time to execute, and also a PluginView to be instantiated.
3438
3439         * css/plugIns.css:
3440         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
3441
3442         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
3443         * platform/LocalizedStrings.h:
3444         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
3445         * platform/chromium/LocalizedStringsChromium.cpp:
3446         * platform/efl/LocalizedStringsEfl.cpp:
3447         * platform/gtk/LocalizedStringsGtk.cpp:
3448         * platform/qt/LocalizedStringsQt.cpp:
3449
3450         * html/HTMLPlugInElement.cpp:
3451         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
3452         that RenderSnapshottedPlugIn no longer is an embedded object.
3453
3454         * html/HTMLPlugInImageElement.cpp:
3455         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
3456         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
3457         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
3458         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
3459             a renderer, otherwise use the typical plug-in path.
3460         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
3461             need to give it to the renderer.
3462         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
3463         * html/HTMLPlugInImageElement.h:
3464         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
3465             should show immediately.
3466         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
3467             to swap to the Shadow Root.
3468         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
3469             in being recreated. Make sure we reattach so that a plugin renderer will be created.
3470         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
3471             displayState for snapshots.
3472         * html/HTMLPlugInImageElement.h:
3473         (HTMLPlugInImageElement): The new methods listed above.
3474         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
3475             a snapshot should be immediately labeled.
3476
3477         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
3478
3479         * rendering/RenderSnapshottedPlugIn.cpp:
3480         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
3481         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
3482         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
3483         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
3484         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
3485         (WebCore::RenderSnapshottedPlugIn::getCursor):
3486         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
3487         * rendering/RenderSnapshottedPlugIn.h:
3488         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
3489
3490 2013-02-08  Kentaro Hara  <haraken@chromium.org>
3491
3492         {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator should be in FocusEvent.cpp
3493         https://bugs.webkit.org/show_bug.cgi?id=109265
3494
3495         Reviewed by Dimitri Glazkov.
3496
3497         Conventionally we put XXXEventDispatchMediator to XXXEvent.cpp.
3498         We should move {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator to FocusEvent.cpp.
3499
3500         No tests. No change in behavior.
3501
3502         * dom/EventDispatchMediator.cpp:
3503         * dom/EventDispatchMediator.h:
3504         * dom/FocusEvent.cpp:
3505         (WebCore::FocusEventDispatchMediator::create):
3506         (WebCore):
3507         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
3508         (WebCore::FocusEventDispatchMediator::dispatchEvent):
3509         (WebCore::BlurEventDispatchMediator::create):
3510         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
3511         (WebCore::BlurEventDispatchMediator::dispatchEvent):
3512         (WebCore::FocusInEventDispatchMediator::create):
3513         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
3514         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
3515         (WebCore::FocusOutEventDispatchMediator::create):
3516         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
3517         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
3518         * dom/FocusEvent.h:
3519         (WebCore):
3520         (FocusEventDispatchMediator):
3521         (BlurEventDispatchMediator):
3522         (FocusInEventDispatchMediator):
3523         (FocusOutEventDispatchMediator):
3524         * dom/UIEvent.cpp:
3525         * dom/UIEvent.h:
3526
3527 2013-02-08  Jer Noble  <jer.noble@apple.com>
3528
3529         Unreviewed build fix. MSVC (and other compilers) need a default: case in switch statement.
3530
3531         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3532         (WebCore::notificationName):
3533
3534 2013-02-08  Jer Noble  <jer.noble@apple.com>
3535
3536         Bring WebKit up to speed with latest Encrypted Media spec.
3537         https://bugs.webkit.org/show_bug.cgi?id=97037
3538
3539         Reviewed by Eric Carlson.
3540
3541         The most recent version of the Encrypted Media Extensions spec breaks functionality out of the
3542         HTMLMediaElement and into new MediaKeys and MediaKeySession classes. Since the CDM functionality
3543         has been pulled out of the media element, we create a proxy CDM class and factory system for
3544         creating specific CDM key system implementations. The spec also breaks out MediaKeyEvent
3545         into distinct event classes, MediaKeyNeededEvent and MediaKeyMessageEvent, for needkey and
3546         keymessage events, respectively.
3547
3548         Tests: media/encrypted-media/encrypted-media-v2-events.html
3549                media/encrypted-media/encrypted-media-v2-syntax.html
3550
3551         CDM is a proxy class (a la MediaPlayer) for a specific CDMPrivateInterface implementation. A CDM
3552         implementation is registered with the CDMFactory and will be created if that implementation supports
3553         the key system passed into the MediaKeys constructor. CDMSession is a pure-virtual interface exposed
3554         by concrete CDMPrivate subclasses.  Its lifetime is owned by MediaKeySession.
3555         * Modules/encryptedmedia/CDM.cpp: Added.
3556         (WebCore::installedCDMFactories): Initialize all the known CDM subtypes. Ports will add CDM implementations here.
3557         (WebCore::CDM::registerCDMFactory): Registers a new CDMFactory using the passed in function pointers.
3558         (WebCore::CDMFactoryForKeySystem): Return the first CDM factory which supports the requested key system.
3559         (WebCore::CDM::supportsKeySystem): Walk the installed CDMs and ask if the given key system is supported.
3560         (WebCore::CDM::supportsKeySystemMIMETypeAndCodec): Ditto, with an additional MIME type and codec string.
3561         (WebCore::CDM::create): Simple constructor wrapper.
3562         (WebCore::CDM::CDM): Simple constructor; calls bestCDMForKeySystem() to create it's private implementation.
3563         (WebCore::CDM::~CDM): Simple destructor.
3564         (WebCore::CDM::createSession): Creates a new CDMSession.
3565         * Modules/encryptedmedia/CDM.h: Added.
3566         (WebCore::CDM::keySystem): Simple accessor for m_keySystem.
3567         (WebCore::CDMSession::CDMSession): Simple constructor.
3568         (WebCore::CDMSession::~CDMSession): Simple destructor.
3569         * Modules/encryptedmedia/CDMPrivate.h: Added.
3570         (WebCore::CDMPrivateInterface::CDMPrivateInterface): Simple constructor.
3571         (WebCore::CDMPrivateInterface::~CDMPrivateInterface): Simple destructor.
3572
3573         The new classes, MediaKeyMessageEvent and MediaKeyNeededEvent, take distinct subsets of the initializers of
3574         the original MediaKeyMessageEvent.
3575         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.cpp.
3576         (WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit): Initializer now only takes message and destinationURL
3577             parameters.
3578         (WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent): Simple constructor.
3579         (WebCore::MediaKeyMessageEvent::~MediaKeyMessageEvent): Simple destructor.
3580         (WebCore::MediaKeyMessageEvent::interfaceName): Standard interfaceName.
3581         * Modules/encryptedmedia/MediaKeyMessageEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
3582         (WebCore::MediaKeyMessageEvent::create): Simple construction wrapper.
3583         (WebCore::MediaKeyMessageEvent::message): Simple accessor for m_message.
3584         (WebCore::MediaKeyMessageEvent::destinationURL): Simple accessor for m_destinationURL.
3585         * Modules/encryptedmedia/MediaKeyMessageEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
3586         * Modules/encryptedmedia/MediaKeyNeededEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.h.
3587         (WebCore::MediaKeyNeededEventInit::MediaKeyNeededEventInit): Initializer now only takes initData parameter.
3588         (WebCore::MediaKeyNeededEvent::MediaKeyNeededEvent): Simple constructor.
3589         (WebCore::MediaKeyNeededEvent::~MediaKeyNeededEvent): Simple destructor.
3590         (WebCore::MediaKeyNeededEvent::interfaceName): Standard interfaceName.
3591         * Modules/encryptedmedia/MediaKeyNeededEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
3592         (WebCore::MediaKeyNeededEvent::create): Simple construction wrapper.
3593         (WebCore::MediaKeyNeededEvent::initData): Simple accessor for m_initData.
3594         * Modules/encryptedmedia/MediaKeyNeededEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
3595
3596         MediaKeySession is a new class that maps keys and key requests to a given session ID:
3597         * Modules/encryptedmedia/MediaKeySession.cpp: Added.
3598         (WebCore::MediaKeySession::create): Simple construction wrapper.
3599         (WebCore::MediaKeySession::MediaKeySession): Simple constructor.
3600         (WebCore::MediaKeySession::~MediaKeySession): Simple destructor; calls close().
3601         (WebCore::MediaKeySession::setError): Simple setter for m_error;
3602         (WebCore::MediaKeySession::close): Tell the CDM to clear any saved session keys.
3603         (WebCore::MediaKeySession::generateKeyRequest): Start a one-shot timer, handled in keyRequestTimerFired.
3604         (WebCore::MediaKeySession::keyRequestTimerFired): Follow the steps in the spec; ask the CDM to generate a key request.
3605         (WebCore::MediaKeySession::addKey): Start a one-shot timer, handled in addKeyTimerFired.
3606         (WebCore::MediaKeySession::addKeyTimerFired): Follow the steps in the spec; provide the key data to the CDM.
3607         * Modules/encryptedmedia/MediaKeySession.h: Added.
3608         (WebCore::MediaKeySession::keySystem): Simple accessor for m_keySystem.
3609         (WebCore::MediaKeySession::sessionId): Simple accessor for m_sessionId.
3610         (WebCore::MediaKeySession::error): Simple accessor for m_error;
3611         * Modules/encryptedmedia/MediaKeySession.idl:
3612
3613         MediaKeySession inherits from EventTarget, and must override the pure virtual functions in that class:
3614         * Modules/encryptedmedia/MediaKeySession.cpp: Added.
3615         (WebCore::MediaKeySession::interfaceName):
3616         * Modules/encryptedmedia/MediaKeySession.h: Added.
3617         (WebCore::MediaKeySession::refEventTarget):
3618         (WebCore::MediaKeySession::derefEventTarget):
3619         (WebCore::MediaKeySession::eventTargetData):
3620         (WebCore::MediaKeySession::ensureEventTargetData):
3621         (WebCore::MediaKeySession::scriptExecutionContext):
3622
3623         MediaKeys is a new class that encapsulates a CDM and a number of key sessions:
3624         * Modules/encryptedmedia/MediaKeys.cpp: Added.
3625         (WebCore::MediaKeys::create): Throw an exception if the key system parameter is unsupported; create a CDM object
3626             and a new MediaKeys session.
3627         (WebCore::MediaKeys::MediaKeys): Simple constructor.
3628         (WebCore::MediaKeys::~MediaKeys): Simple destructor.
3629         (WebCore::MediaKeys::createSession): Follow the spec and create a new key session.
3630         * Modules/encryptedmedia/MediaKeys.h: Added.
3631         * Modules/encryptedmedia/MediaKeys.idl: Copied from Source/WebCore/html/MediaError.idl.
3632
3633         Provide a new interface to HTMLMediaElement for MediaPlayer which does not require a sessionId or a key system:
3634         * html/HTMLMediaElement.cpp:
3635         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
3636         * platform/graphics/MediaPlayer.cpp:
3637         (WebCore::MediaPlayer::keyNeeded):
3638
3639         MediaKeyError now has a systemCode parameter and member variable.
3640         * html/MediaKeyError.h:
3641         (WebCore::MediaKeyError::create): Take a systemCode parameter with a default (0) value.
3642         (WebCore::MediaKeyError::MediaKeyError): Ditto.
3643         (WebCore::MediaKeyError::systemCode): Simple accessor for m_systemCode.
3644         * html/MediaKeyError.idl:
3645
3646         Add new methods to HTMLMediaElement to support MediaKeys. Support different initializer
3647         for the MediaKeyNeededEvent.
3648         * html/HTMLMediaElement.cpp:
3649         (WebCore::HTMLMediaElement::setMediaKeys): Simple setter for m_mediaKeys.
3650         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): This version takes fewer parameters
3651             than the deprecated version.
3652         * html/HTMLMediaElement.h:
3653         (WebCore::HTMLMediaElement::mediaKeys): Simple accessor for m_mediaKeys.
3654         * html/HTMLMediaElement.idl: Add the mediaKeys attribute.
3655
3656         Add an ENABLE(ENCRYPTED_MEDIA_V2) check to the existing ENABLE(ENCRYPTED_MEDIA) one:
3657         * html/MediaError.h:
3658         * html/MediaError.idl:
3659         * platform/graphics/MediaPlayer.cpp:
3660         (WebCore::bestMediaEngineForTypeAndCodecs):
3661         (WebCore::MediaPlayer::supportsType):
3662         * platform/graphics/MediaPlayer.h:
3663         (WebCore::MediaPlayer::keyNeeded): This version takes fewer parameters than the
3664             deprecated version.
3665
3666         Support the new version of canPlayType which takes an extra parameter:
3667         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3668         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3669         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
3670         (WebCore::MediaPlayerPrivateAVFoundationObjC::extendedSupportsType):
3671         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3672         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3673         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
3674         (WebCore::MediaPlayerPrivateQTKit::extendedSupportsType):
3675
3676         Add a mock CDM for use within DRT and WKTR to test the MediaKeys and MediaKeySession
3677         APIs and events:
3678         * testing/Internals.cpp:
3679         (WebCore::Internals::initializeMockCDM): Add the MockCDM class to the CDM factories.
3680         * testing/Internals.h:
3681         * testing/Internals.idl: Add the initializeMockCDM() method.
3682         * testing/MockCDM.cpp: Added.
3683         (WebCore::MockCDM::supportsKeySystem): Only supports the 'com.webcore.mock' key system.
3684         (WebCore::MockCDM::supportsMIMEType): Only supports the 'video/mock' mime type.
3685         (WebCore::initDataPrefix): Static method which returns a Uint8Array containing 'mock'.
3686         (WebCore::keyPrefix): Static method which returns a Uint8Array containing 'key'.
3687         (WebCore::keyRequest): Static method which returns a Uint8Array containing 'request'.
3688         (WebCore::generateSessionId): Return a monotonically increasing number.
3689         (WebCore::MockCDMSession::MockCDMSession): Simple constructor.
3690         (WebCore::MockCDMSession::generateKeyRequest): Ignores the parameters and returns a keyRequest() array.
3691         (WebCore::MockCDMSession::releaseKeys): No-op.
3692         (WebCore::MockCDMSession::addKey): Checks that the key starts with the keyPrefix() array.
3693         * testing/MockCDM.h: Added.
3694         (WebCore::MockCDM::create):
3695         (WebCore::MockCDM::~MockCDM): Simple destructor.
3696         (WebCore::MockCDM::MockCDM): Simple constructor.
3697
3698         Add the new classes to the built system:
3699         * Configurations/FeatureDefines.xcconfig:
3700         * DerivedSources.make:
3701         * WebCore.exp.in:
3702         * WebCore.xcodeproj/project.pbxproj:
3703
3704         Miscelaneous changes:
3705         * dom/EventNames.in: Add the two new event types, MediaKeyMessageEvent and MediaKeyNeededEvent.
3706         * dom/EventTargetFactory.in: Add the new EventTarget, MediaKeySession.
3707         * page/DOMWindow.idl: Add constructors for the new classes to the window object.
3708
3709 2013-02-08  Chris Fleizach  <cfleizach@apple.com>
3710
3711         Refactor platform-specific code in SpeechSynthesis
3712         https://bugs.webkit.org/show_bug.cgi?id=107414
3713
3714         Reviewed by Sam Weinig.
3715
3716         Refactor WebSpeech code to use a platform mechanism to provide access to platform resources.
3717
3718         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
3719         (WebCore::DOMWindowSpeechSynthesis::from):
3720         * Modules/speech/SpeechSynthesis.cpp:
3721         (WebCore::SpeechSynthesis::SpeechSynthesis):
3722         (WebCore):
3723         (WebCore::SpeechSynthesis::voicesDidChange):
3724         (WebCore::SpeechSynthesis::getVoices):
3725         (WebCore::SpeechSynthesis::pending):
3726         (WebCore::SpeechSynthesis::speaking):
3727         (WebCore::SpeechSynthesis::paused):
3728         (WebCore::SpeechSynthesis::speak):
3729         (WebCore::SpeechSynthesis::cancel):
3730         (WebCore::SpeechSynthesis::pause):
3731         (WebCore::SpeechSynthesis::resume):
3732         * Modules/speech/SpeechSynthesis.h:
3733         (WebCore):
3734         (SpeechSynthesis):
3735         (WebCore::SpeechSynthesis::didStartSpeaking):
3736         (WebCore::SpeechSynthesis::didFinishSpeaking):
3737         (WebCore::SpeechSynthesis::speakingErrorOccurred):
3738         * Modules/speech/SpeechSynthesisUtterance.cpp:
3739         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
3740         * Modules/speech/SpeechSynthesisUtterance.h:
3741         (WebCore::SpeechSynthesisUtterance::text):
3742         (WebCore::SpeechSynthesisUtterance::setText):
3743         (WebCore::SpeechSynthesisUtterance::lang):
3744         (WebCore::SpeechSynthesisUtterance::setLang):
3745         (WebCore::SpeechSynthesisUtterance::voiceURI):
3746         (WebCore::SpeechSynthesisUtterance::setVoiceURI):
3747         (WebCore::SpeechSynthesisUtterance::volume):
3748         (WebCore::SpeechSynthesisUtterance::setVolume):
3749         (WebCore::SpeechSynthesisUtterance::rate):
3750         (WebCore::SpeechSynthesisUtterance::setRate):
3751         (WebCore::SpeechSynthesisUtterance::pitch):
3752         (WebCore::SpeechSynthesisUtterance::setPitch):
3753         (SpeechSynthesisUtterance):
3754         (WebCore::SpeechSynthesisUtterance::platformUtterance):
3755         * Modules/speech/SpeechSynthesisVoice.cpp:
3756         (WebCore::SpeechSynthesisVoice::create):
3757         (WebCore::SpeechSynthesisVoice::SpeechSynthesisVoice):
3758         * Modules/speech/SpeechSynthesisVoice.h:
3759         (SpeechSynthesisVoice):
3760         (WebCore::SpeechSynthesisVoice::voiceURI):
3761         (WebCore::SpeechSynthesisVoice::name):
3762         (WebCore::SpeechSynthesisVoice::lang):
3763         (WebCore::SpeechSynthesisVoice::localService):
3764         (WebCore::SpeechSynthesisVoice::isDefault):
3765         * Modules/speech/mac/SpeechSynthesisMac.mm:
3766         * WebCore.xcodeproj/project.pbxproj:
3767         * platform/PlatformSpeechSynthesis.h: Added.
3768         (WebCore):
3769         (PlatformSpeechSynthesis):
3770         * platform/PlatformSpeechSynthesisUtterance.cpp: Added.
3771         (WebCore):
3772         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
3773         * platform/PlatformSpeechSynthesisUtterance.h: Added.
3774         (WebCore):
3775         (PlatformSpeechSynthesisUtteranceClient):
3776         (WebCore::PlatformSpeechSynthesisUtteranceClient::~PlatformSpeechSynthesisUtteranceClient):
3777         (PlatformSpeechSynthesisUtterance):
3778         (WebCore::PlatformSpeechSynthesisUtterance::text):
3779         (WebCore::PlatformSpeechSynthesisUtterance::setText):
3780         (WebCore::PlatformSpeechSynthesisUtterance::lang):
3781         (WebCore::PlatformSpeechSynthesisUtterance::setLang):
3782         (WebCore::PlatformSpeechSynthesisUtterance::voiceURI):
3783         (WebCore::PlatformSpeechSynthesisUtterance::setVoiceURI):
3784         (WebCore::PlatformSpeechSynthesisUtterance::volume):
3785         (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
3786         (WebCore::PlatformSpeechSynthesisUtterance::rate):
3787         (WebCore::PlatformSpeechSynthesisUtterance::setRate):
3788         (WebCore::PlatformSpeechSynthesisUtterance::pitch):
3789         (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
3790         * platform/PlatformSpeechSynthesisVoice.cpp: Added.
3791         (WebCore):
3792         (WebCore::PlatformSpeechSynthesisVoice::create):
3793         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
3794         * platform/PlatformSpeechSynthesisVoice.h: Added.
3795         (WebCore):
3796         (PlatformSpeechSynthesisVoice):
3797         (WebCore::PlatformSpeechSynthesisVoice::voiceURI):
3798         (WebCore::PlatformSpeechSynthesisVoice::name):
3799         (WebCore::PlatformSpeechSynthesisVoice::lang):
3800         (WebCore::PlatformSpeechSynthesisVoice::localService):
3801         (WebCore::PlatformSpeechSynthesisVoice::isDefault):
3802         * platform/PlatformSpeechSynthesizer.cpp: Added.
3803         (WebCore):
3804         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3805         * platform/PlatformSpeechSynthesizer.h: Added.
3806         (WebCore):
3807         (PlatformSpeechSynthesizerClient):
3808         (WebCore::PlatformSpeechSynthesizerClient::~PlatformSpeechSynthesizerClient):
3809         (PlatformSpeechSynthesizer):
3810         (WebCore::PlatformSpeechSynthesizer::voiceList):
3811         * platform/mac/PlatformSpeechSynthesisMac.mm: Added.
3812         (WebCore):
3813         (WebCore::PlatformSpeechSynthesis::create):
3814         (WebCore::PlatformSpeechSynthesis::PlatformSpeechSynthesis):
3815         (WebCore::PlatformSpeechSynthesis::platformSpeak):
3816         * platform/mac/PlatformSpeechSynthesizerMac.mm: Added.
3817         (WebCore):
3818         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
3819         (WebCore::PlatformSpeechSynthesizer::speak):
3820
3821 2013-02-08  Dean Jackson  <dino@apple.com>
3822
3823         Put snapshotting label text into localizable strings
3824         https://bugs.webkit.org/show_bug.cgi?id=108268
3825
3826         Reviewed by Simon Fraser.
3827
3828         In preparation for a snapshotted plug-in using a ShadowRoot, allow
3829         its label to be localized.
3830
3831         * English.lproj/Localizable.strings:
3832         * platform/LocalizedStrings.cpp:
3833         (WebCore::snapshottedPlugInLabelTitle): New method for returning title.
3834         (WebCore::snapshottedPlugInLabelSubtitle): New method for returning subtitle.
3835         * platform/LocalizedStrings.h:
3836
3837 2013-02-08  Dean Jackson  <dino@apple.com>
3838
3839         Do not register autostart for plugins from file:// (or nowhere)
3840         https://bugs.webkit.org/show_bug.cgi?id=108271
3841
3842         Reviewed by Tim Horton.
3843
3844         If the page url origin is treated as a local URL, don't attempt
3845         to add it to the auto-start list.
3846
3847         * html/HTMLPlugInImageElement.cpp:
3848         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
3849
3850 2013-02-08  Adam Barth  <abarth@webkit.org>
3851
3852         Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
3853         https://bugs.webkit.org/show_bug.cgi?id=107190
3854
3855         Reviewed by Eric Seidel.
3856
3857         This patch replaces the parser map with WeakPtr. We now use WeakPtrs to
3858         communicate from the main thread to the background thread. (We were
3859         already using WeakPtrs to communicate from the background thread to the
3860         main thread.) This change lets us remove a bunch of boilerplate code.
3861
3862         * html/parser/BackgroundHTMLParser.cpp:
3863         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
3864         (WebCore::BackgroundHTMLParser::stop):
3865         (WebCore):
3866         * html/parser/BackgroundHTMLParser.h:
3867         (WebCore::BackgroundHTMLParser::create):
3868         (BackgroundHTMLParser):
3869         * html/parser/HTMLDocumentParser.cpp:
3870         (WebCore::HTMLDocumentParser::didFailSpeculation):
3871         (WebCore::HTMLDocumentParser::startBackgroundParser):
3872         (WebCore::HTMLDocumentParser::stopBackgroundParser):
3873         (WebCore::HTMLDocumentParser::append):
3874         (WebCore::HTMLDocumentParser::finish):
3875         * html/parser/HTMLDocumentParser.h:
3876         (WebCore):
3877         (HTMLDocumentParser):
3878
3879 2013-02-07  Roger Fong  <roger_fong@apple.com>
3880
3881         VS2010 WebCore TestSupport project.
3882         https://bugs.webkit.org/show_bug.cgi?id=107034.
3883
3884         Reviewed by Brent Fulgham.
3885
3886         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Added.
3887         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Added.
3888
3889 2013-02-08  ChangSeok Oh  <shivamidow@gmail.com>
3890
3891         [GTK][AC] GraphicsLayerActor code clean up after clutter version up.
3892         https://bugs.webkit.org/show_bug.cgi?id=109304
3893
3894         Reviewed by Gustavo Noronha Silva.
3895
3896         This patch cleans up GraphicsLayerActor functions by using new clutter apis
3897         and makes existing functions simple & readable.
3898
3899         No new tests since no change in functionality
3900
3901         * platform/graphics/clutter/GraphicsLayerActor.cpp:
3902         (_GraphicsLayerActorPrivate):
3903         (graphicsLayerActorApplyTransform):
3904         (graphicsLayerActorPaint):
3905         (graphicsLayerActorDraw):
3906         (graphicsLayerActorUpdateTexture):
3907         (drawLayerContents):
3908         (graphicsLayerActorNew):
3909         (graphicsLayerActorInvalidateRectangle):
3910         (graphicsLayerActorSetTransform):
3911         (graphicsLayerActorSetAnchorPoint):
3912         (graphicsLayerActorGetAnchorPoint):
3913         (graphicsLayerActorSetScrollPosition):
3914         * platform/graphics/clutter/PlatformClutterAnimation.h:
3915
3916 2013-02-08  Harald Alvestrand  <hta@google.com>
3917
3918         Fix and test for missing return statement
3919
3920         RTCPeerConnection.getStats() failed when remote stats were instantiated.
3921         https://bugs.webkit.org/show_bug.cgi?id=109292
3922
3923         Reviewed by Adam Barth.
3924
3925         Tested by extending the existing mock's behaviour.
3926
3927         * Modules/mediastream/RTCStatsReport.cpp:
3928         (WebCore::RTCStatsReport::addElement):
3929
3930 2013-02-08  Anton Vayvod  <avayvod@chromium.org>
3931
3932         [Text Autosizing] Split isAutosizingCluster into three independent checks
3933         https://bugs.webkit.org/show_bug.cgi?id=109093
3934
3935         Refactoring to create more flexible version of isAutosizingCluster since there're more types
3936         of autosizing cluster now: narrower than the parent cluster, wider than the parent cluster
3937         and the one that doesn't depend on the parent cluster.
3938
3939         Reviewed by Kenneth Rohde Christiansen.
3940
3941         Refactoring, no test changes.
3942
3943         * rendering/TextAutosizer.cpp:
3944
3945         (WebCore::TextAutosizer::isNarrowDescendant):
3946
3947             Separate check for the container to be of the narrow-descendant type. Was a part of
3948             isAutosizingCluster().
3949
3950         (WebCore::TextAutosizer::isWiderDescendant):
3951
3952             Separate check for the container to be of the wider-descendant type. Was a part of
3953             isAutosizingCluster().
3954
3955         (WebCore::TextAutosizer::isIndependentDescendant):
3956
3957             Separate check for the container to be autosized separately from the ancestor cluster.
3958             Checks for conditions independent of the aforementioned cluster.
3959
3960         (WebCore::TextAutosizer::isAutosizingCluster):
3961
3962             Handy method to check all separate conditions together.
3963
3964         (WebCore::TextAutosizer::processSubtree):
3965         (WebCore::TextAutosizer::processCluster):
3966         (WebCore::TextAutosizer::processContainer):
3967         (WebCore::TextAutosizer::clusterShouldBeAutosized):
3968         (WebCore::TextAutosizer::measureDescendantTextWidth):
3969         (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
3970
3971             The methods above were updated to use new functions/arguments.
3972
3973         * rendering/TextAutosizer.h:
3974
3975             Updated/added method definitions.
3976
3977 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
3978
3979         Web Inspector: Extension sever should use Workspace.projectForType() instead of Workspace.project()
3980         https://bugs.webkit.org/show_bug.cgi?id=109301
3981
3982         Reviewed by Alexander Pavlov.
3983
3984         * inspector/front-end/ExtensionServer.js:
3985         (WebInspector.ExtensionServer.prototype._onGetPageResources):
3986
3987 2013-02-04  Yury Semikhatsky  <yurys@chromium.org>
3988
3989         Web Inspector: simplify Memory.getDOMNodeCount implementation
3990         https://bugs.webkit.org/show_bug.cgi?id=108821
3991
3992         Reviewed by Alexander Pavlov.
3993
3994         Removed Memory.getDOMNodeCount command from the protocol. Memory.getDOMCounters
3995         should be used instead.
3996
3997         * inspector/Inspector.json:
3998         * inspector/InspectorMemoryAgent.cpp:
3999         * inspector/InspectorMemoryAgent.h:
4000         (InspectorMemoryAgent):
4001
4002 2013-02-08  Yury Semikhatsky  <yurys@chromium.org>
4003
4004         Web Inspector: refactor MemoryStatistics.js
4005         https://bugs.webkit.org/show_bug.cgi?id=109299
4006
4007         Reviewed by Vsevolod Vlasov.
4008
4009         Extracted functionality specific to DOM counter graphs drawing into
4010         separate met