b582f72095b5dc5a74885df50da707cae9989039
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-12  Geoffrey Garen  <ggaren@apple.com>
2
3         Moved RunLoopTimer and SchedulePair to WTF
4         https://bugs.webkit.org/show_bug.cgi?id=112171
5
6         Reviewed by Oliver Hunt.
7
8         This will allow us to use timers in lower level primitives without
9         duplicating all the code.
10
11         * WebCore.exp.in:
12         * WebCore.xcodeproj/project.pbxproj:
13         * loader/DocumentLoader.h:
14         (WTF):
15         (WebCore):
16         (DocumentLoader):
17         * loader/MainResourceLoader.h:
18         * page/Page.h:
19         * platform/AutodrainedPool.h: Removed.
20         * platform/cf/RunLoopTimerCF.cpp: Removed.
21         * platform/cf/SchedulePair.cpp: Removed.
22         * platform/cf/SchedulePair.h: Removed.
23         * platform/mac/AutodrainedPool.mm: Removed.
24         * platform/mac/SchedulePairMac.mm: Removed.
25         * platform/network/NetworkingContext.h:
26         * platform/network/ResourceHandle.h:
27         (WTF):
28         (WebCore):
29         (ResourceHandle):
30         * platform/network/cf/FormDataStreamCFNet.cpp:
31         * platform/network/mac/ResourceHandleMac.mm:
32
33 2013-03-12  Christian Biesinger  <cbiesinger@chromium.org>
34
35         Mac: Incorrect rendering of <audio> controls
36         https://bugs.webkit.org/show_bug.cgi?id=110913
37
38         Reviewed by Tony Chang.
39
40         Covered by existing tests under media/.
41
42         * css/mediaControls.css:
43         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
44         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
45         The timeline container and the timeline need min-width: 0 so that they can shrink if needed.
46         * css/mediaControlsQuickTime.css:
47         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
48         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
49         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
50         The timeline container also needs flex-start to ensure that it never overlaps
51         the play/rewind buttons. The current-time and remaining-time displays need min-width: 0 so that the hack
52         in RenderMediaControls.cpp works correctly - otherwise, RenderFlexibleBox tries to use the preferred width
53         of the time displays, which is wrong when they try to hide themselves.
54
55 2013-03-12  Alexey Proskuryakov  <ap@apple.com>
56
57         Improve logging in ResourceHandleMac.mm
58         https://bugs.webkit.org/show_bug.cgi?id=112185
59
60         Reviewed by Brady Eidson.
61
62         * platform/network/mac/ResourceHandleMac.mm:
63         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Removed an obsolete #if.
64         (WebCore::ResourceHandle::receivedCredential):
65         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
66         (WebCore::ResourceHandle::receivedCancellation):
67         (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]): Added a FIXME.
68         (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
69
70         * platform/network/mac/ResourceResponseMac.mm: Removed an unneeded include.
71
72 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
73
74         Unreviewed, rolling out r145554.
75         http://trac.webkit.org/changeset/145554
76         https://bugs.webkit.org/show_bug.cgi?id=112182
77
78         Breaks several extension browser tests (see bug for details)
79         (Requested by jamesr on #webkit).
80
81         * bindings/scripts/CodeGeneratorV8.pm:
82         (GenerateHeader):
83         (GenerateDomainSafeFunctionGetter):
84         (GenerateImplementation):
85         (CreateCustomSignature):
86         * bindings/scripts/test/V8/V8Float64Array.cpp:
87         (WebCore::ConfigureV8Float64ArrayTemplate):
88         (WebCore::V8Float64Array::GetTemplate):
89         (WebCore::V8Float64Array::HasInstance):
90         * bindings/scripts/test/V8/V8Float64Array.h:
91         (V8Float64Array):
92         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
93         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
94         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
95         (WebCore::V8TestActiveDOMObject::GetTemplate):
96         (WebCore::V8TestActiveDOMObject::HasInstance):
97         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
98         (V8TestActiveDOMObject):
99         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
100         (WebCore::V8TestCustomNamedGetter::GetTemplate):
101         (WebCore::V8TestCustomNamedGetter::HasInstance):
102         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
103         (V8TestCustomNamedGetter):
104         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
105         (WebCore::V8TestEventConstructor::GetTemplate):
106         (WebCore::V8TestEventConstructor::HasInstance):
107         * bindings/scripts/test/V8/V8TestEventConstructor.h:
108         (V8TestEventConstructor):
109         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
110         (WebCore::ConfigureV8TestEventTargetTemplate):
111         (WebCore::V8TestEventTarget::GetTemplate):
112         (WebCore::V8TestEventTarget::HasInstance):
113         * bindings/scripts/test/V8/V8TestEventTarget.h:
114         (V8TestEventTarget):
115         * bindings/scripts/test/V8/V8TestException.cpp:
116         (WebCore::V8TestException::GetTemplate):
117         (WebCore::V8TestException::HasInstance):
118         * bindings/scripts/test/V8/V8TestException.h:
119         (V8TestException):
120         * bindings/scripts/test/V8/V8TestInterface.cpp:
121         (WebCore::ConfigureV8TestInterfaceTemplate):
122         (WebCore::V8TestInterface::GetTemplate):
123         (WebCore::V8TestInterface::HasInstance):
124         * bindings/scripts/test/V8/V8TestInterface.h:
125         (V8TestInterface):
126         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
127         (WebCore::V8TestMediaQueryListListener::GetTemplate):
128         (WebCore::V8TestMediaQueryListListener::HasInstance):
129         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
130         (V8TestMediaQueryListListener):
131         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
132         (WebCore::V8TestNamedConstructor::GetTemplate):
133         (WebCore::V8TestNamedConstructor::HasInstance):
134         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
135         (V8TestNamedConstructor):
136         * bindings/scripts/test/V8/V8TestNode.cpp:
137         (WebCore::V8TestNode::GetTemplate):
138         (WebCore::V8TestNode::HasInstance):
139         * bindings/scripts/test/V8/V8TestNode.h:
140         (V8TestNode):
141         * bindings/scripts/test/V8/V8TestObj.cpp:
142         (WebCore::ConfigureV8TestObjTemplate):
143         (WebCore::V8TestObj::GetTemplate):
144         (WebCore::V8TestObj::HasInstance):
145         * bindings/scripts/test/V8/V8TestObj.h:
146         (V8TestObj):
147         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
148         (WebCore::V8TestOverloadedConstructors::GetTemplate):
149         (WebCore::V8TestOverloadedConstructors::HasInstance):
150         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
151         (V8TestOverloadedConstructors):
152         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
153         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
154         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
155         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
156         (V8TestSerializedScriptValueInterface):
157         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
158         (WebCore::ConfigureV8TestTypedefsTemplate):
159         (WebCore::V8TestTypedefs::GetTemplate):
160         (WebCore::V8TestTypedefs::HasInstance):
161         * bindings/scripts/test/V8/V8TestTypedefs.h:
162         (V8TestTypedefs):
163         * bindings/v8/V8AdaptorFunction.cpp:
164         (WebCore::V8AdaptorFunction::getTemplate):
165         * bindings/v8/V8GCController.cpp:
166         * bindings/v8/V8PerIsolateData.cpp:
167         (WebCore::V8PerIsolateData::reportMemoryUsage):
168         (WebCore::V8PerIsolateData::privateTemplate):
169         (WebCore::V8PerIsolateData::rawTemplate):
170         (WebCore::V8PerIsolateData::hasInstance):
171         * bindings/v8/V8PerIsolateData.h:
172         (WebCore::V8PerIsolateData::rawTemplateMap):
173         (WebCore::V8PerIsolateData::templateMap):
174         (V8PerIsolateData):
175         * bindings/v8/WrapperTypeInfo.h:
176         * bindings/v8/custom/V8LocationCustom.cpp:
177         (WebCore::V8Location::reloadAttrGetterCustom):
178         (WebCore::V8Location::replaceAttrGetterCustom):
179         (WebCore::V8Location::assignAttrGetterCustom):
180         * bindings/v8/custom/V8NodeListCustom.cpp:
181         (WebCore::V8NodeList::opaqueRootForGC):
182
183 2013-03-12  Gavin Peters  <gavinp@chromium.org>
184
185         [chromium] Use lipo(1) rather than file(1) to list library architectures.
186         https://bugs.webkit.org/show_bug.cgi?id=111147
187
188         Parsing file(1) output can be fragile; this patch replaces a use of file(1) to get
189         the architecture list of a library with an invocation of lipo(1), which should be more
190         stable.
191
192         Reviewed by Nico Weber.
193
194         No new tests, since adjust_visibility.sh doesn't have a test.
195
196         * WebCore.gyp/mac/adjust_visibility.sh:
197
198 2013-03-12  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
199
200         Webkit unable to show gifs with applcation extension string shorter than 11 bytes
201         https://bugs.webkit.org/show_bug.cgi?id=110620
202
203         Reviewed by Laszlo Gombos.
204
205         Use actual block size for gifs application extension string even if it is below 11 bytes 
206         to be able to decode this kind of gifs.
207
208         Test: fast/images/gif-short-app-extension-string.html
209
210         * platform/image-decoders/gif/GIFImageReader.cpp:
211         (GIFImageReader::decodeInternal):
212
213 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
214
215         Unreviewed, rolling out r145277.
216         http://trac.webkit.org/changeset/145277
217         https://bugs.webkit.org/show_bug.cgi?id=112170
218
219         chromium-gpu and android testers are seeing failures/crashes
220         relating to this code (Requested by eseidel on #webkit).
221
222         * html/parser/BackgroundHTMLInputStream.cpp:
223         (WebCore::BackgroundHTMLInputStream::rewindTo):
224         * html/parser/BackgroundHTMLInputStream.h:
225         (BackgroundHTMLInputStream):
226         (Checkpoint):
227         * html/parser/BackgroundHTMLParser.cpp:
228         * html/parser/BackgroundHTMLParser.h:
229         (BackgroundHTMLParser):
230         * html/parser/HTMLDocumentParser.cpp:
231         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
232
233 2013-03-12  Simon Fraser  <simon.fraser@apple.com>
234
235         Keep track of the number of GraphicsLayers with tiled backing in RenderLayerCompositor
236         https://bugs.webkit.org/show_bug.cgi?id=112083
237
238         Reviewed by Dean Jackson.
239
240         Have RenderLayerCompositor keep track of how many of its GraphicsLayers use TiledBacking.
241         This is useful for platforms to decide whether it's necessary to force GraphicsLayer flushes
242         to update the visibleRect of those TiledBackings.
243         
244         GraphicsLayers are always created without TiledBacking. There are two
245         ways the count can change:
246         1. A GraphicsLayerCA toggles into or out of tiled mode. It notifies its
247            client via a new tiledBackingUsageChanged() callback on GraphicsLayerClient.
248         2. A tiled GraphicsLayerCA is destroyed. Added a new bottleneck function to
249            RenderLayerBacking::willDestroyLayer() that is called everywhere we destroy layers.
250            
251         The main page TiledBacking is not counted as part of this.
252         
253         Also renamed uses of "tiledLayer" to "tiledBacking" in GraphicsLayer[CA].
254     
255         * platform/graphics/GraphicsLayer.cpp:
256         (WebCore::GraphicsLayer::GraphicsLayer):
257         (WebCore::GraphicsLayer::getDebugBorderInfo):
258         (WebCore::GraphicsLayer::dumpProperties):
259         * platform/graphics/GraphicsLayer.h:
260         (WebCore::GraphicsLayer::usingTiledBacking):
261         * platform/graphics/GraphicsLayerClient.h:
262         (WebCore::GraphicsLayerClient::tiledBackingUsageChanged):
263         * platform/graphics/ca/GraphicsLayerCA.cpp:
264         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
265         (WebCore::GraphicsLayerCA::updateGeometry):
266         (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
267         (WebCore::GraphicsLayerCA::updateContentsScale):
268         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
269         * rendering/RenderLayerBacking.cpp:
270         (WebCore::RenderLayerBacking::willDestroyLayer):
271         (WebCore::RenderLayerBacking::tiledBackingUsageChanged):
272         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
273         (WebCore::RenderLayerBacking::updateClippingLayers):
274         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
275         (WebCore::RenderLayerBacking::updateForegroundLayer):
276         (WebCore::RenderLayerBacking::updateBackgroundLayer):
277         (WebCore::RenderLayerBacking::updateMaskLayer):
278         (WebCore::RenderLayerBacking::updateScrollingLayers):
279         (WebCore::RenderLayerBacking::compositingLayerType):
280         * rendering/RenderLayerBacking.h:
281         * rendering/RenderLayerCompositor.cpp:
282         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
283         (WebCore::RenderLayerCompositor::layerTiledBackingUsageChanged):
284         * rendering/RenderLayerCompositor.h:
285         (WebCore::RenderLayerCompositor::haveNonMainLayersWithTiledBacking):
286
287 2013-03-12  Abhishek Arya  <inferno@chromium.org>
288
289         Replace static_casts with to* functions.
290         https://bugs.webkit.org/show_bug.cgi?id=112072
291
292         Reviewed by Philip Rogers.
293
294         to* functions are preferred over static_cast calls since they
295         help to catch bad casts easily on the testing infrastructure.
296
297         * accessibility/AccessibilityMenuList.cpp:
298         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
299         * bindings/objc/DOM.mm:
300         (kitClass):
301         * bindings/v8/V8LazyEventListener.cpp:
302         (WebCore::V8LazyEventListener::prepareListenerObject):
303         * css/SelectorChecker.cpp:
304         (WebCore::SelectorChecker::checkOne):
305         * editing/ApplyStyleCommand.cpp:
306         (WebCore::isLegacyAppleStyleSpan):
307         (WebCore::isEmptyFontTag):
308         (WebCore::ApplyStyleCommand::applyBlockStyle):
309         * editing/FormatBlockCommand.cpp:
310         (WebCore::isElementForFormatBlock):
311         * editing/ReplaceSelectionCommand.cpp:
312         (WebCore::isMailPasteAsQuotationNode):
313         (WebCore::haveSameTagName):
314         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
315         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
316         * history/CachedPage.cpp:
317         (WebCore::CachedPage::restore):
318         * html/ColorInputType.cpp:
319         (WebCore::ColorInputType::suggestions):
320         * html/HTMLTableRowsCollection.cpp:
321         (WebCore::isInHead):
322         (WebCore::isInBody):
323         (WebCore::isInFoot):
324         * inspector/DOMPatchSupport.cpp:
325         (WebCore::DOMPatchSupport::innerPatchNode):
326         * page/PageSerializer.cpp:
327         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
328         * plugins/PluginView.cpp:
329         (WebCore::PluginView::getValue):
330         * rendering/RenderEmbeddedObject.cpp:
331         (WebCore::RenderEmbeddedObject::paintContents):
332         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
333         * rendering/RenderLayer.cpp:
334         (WebCore::RenderLayer::name):
335         * rendering/RenderMedia.cpp:
336         (WebCore::RenderMedia::mediaElement):
337         * rendering/RenderSearchField.cpp:
338         (WebCore::RenderSearchField::autosaveName):
339         * rendering/RenderTextControl.cpp:
340         (WebCore::RenderTextControl::textFormControlElement):
341         (WebCore::updateUserModifyProperty):
342         * rendering/mathml/RenderMathMLFenced.cpp:
343         (WebCore::RenderMathMLFenced::updateFromElement):
344         * rendering/mathml/RenderMathMLFraction.cpp:
345         (WebCore::RenderMathMLFraction::updateFromElement):
346         * xml/parser/XMLDocumentParserLibxml2.cpp:
347         (WebCore::XMLDocumentParser::XMLDocumentParser):
348         (WebCore::XMLDocumentParser::endElementNs):
349
350 2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
351
352         [GTK] Remove HILDON_CPPFLAGS and HILDON_CFLAGS references from GNUmakefiles
353         https://bugs.webkit.org/show_bug.cgi?id=112163
354
355         Reviewed by Martin Robinson.
356
357         No new tests - no new functionality, merely a cleanup.
358
359         * GNUmakefile.am: The Hildon dependency doesn't exist anymore so there's no need for
360         references to HILDON_CPPFLAGS and HILDON_CFLAGS.
361
362 2013-03-12  Pavel Feldman  <pfeldman@chromium.org>
363
364         Not reviewed: removing GtkVersioning from chromium targets.
365
366         * WebCore.gypi:
367
368 2013-03-12  Marja Hölttä  <marja@chromium.org>
369
370         [V8] Store main world and non-main world templates separately.
371         https://bugs.webkit.org/show_bug.cgi?id=111724
372
373         Reviewed by Jochen Eisinger.
374
375         This is needed for generating specialized bindings for the main
376         world (bug 110874).
377
378         No new tests (updated existing bindings tests).
379
380         * bindings/scripts/CodeGeneratorV8.pm:
381         (GenerateHeader):
382         (GenerateDomainSafeFunctionGetter):
383         (GenerateImplementation):
384         (CreateCustomSignature):
385         * bindings/scripts/test/V8/V8Float64Array.cpp:
386         (WebCore::ConfigureV8Float64ArrayTemplate):
387         (WebCore::V8Float64Array::GetTemplate):
388         (WebCore::V8Float64Array::HasInstance):
389         * bindings/scripts/test/V8/V8Float64Array.h:
390         (V8Float64Array):
391         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
392         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
393         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
394         (WebCore::V8TestActiveDOMObject::GetTemplate):
395         (WebCore::V8TestActiveDOMObject::HasInstance):
396         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
397         (V8TestActiveDOMObject):
398         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
399         (WebCore::V8TestCustomNamedGetter::GetTemplate):
400         (WebCore::V8TestCustomNamedGetter::HasInstance):
401         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
402         (V8TestCustomNamedGetter):
403         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
404         (WebCore::V8TestEventConstructor::GetTemplate):
405         (WebCore::V8TestEventConstructor::HasInstance):
406         * bindings/scripts/test/V8/V8TestEventConstructor.h:
407         (V8TestEventConstructor):
408         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
409         (WebCore::ConfigureV8TestEventTargetTemplate):
410         (WebCore::V8TestEventTarget::GetTemplate):
411         (WebCore::V8TestEventTarget::HasInstance):
412         * bindings/scripts/test/V8/V8TestEventTarget.h:
413         (V8TestEventTarget):
414         * bindings/scripts/test/V8/V8TestException.cpp:
415         (WebCore::V8TestException::GetTemplate):
416         (WebCore::V8TestException::HasInstance):
417         * bindings/scripts/test/V8/V8TestException.h:
418         (V8TestException):
419         * bindings/scripts/test/V8/V8TestInterface.cpp:
420         (WebCore::ConfigureV8TestInterfaceTemplate):
421         (WebCore::V8TestInterface::GetTemplate):
422         (WebCore::V8TestInterface::HasInstance):
423         * bindings/scripts/test/V8/V8TestInterface.h:
424         (V8TestInterface):
425         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
426         (WebCore::V8TestMediaQueryListListener::GetTemplate):
427         (WebCore::V8TestMediaQueryListListener::HasInstance):
428         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
429         (V8TestMediaQueryListListener):
430         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
431         (WebCore::V8TestNamedConstructor::GetTemplate):
432         (WebCore::V8TestNamedConstructor::HasInstance):
433         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
434         (V8TestNamedConstructor):
435         * bindings/scripts/test/V8/V8TestNode.cpp:
436         (WebCore::V8TestNode::GetTemplate):
437         (WebCore::V8TestNode::HasInstance):
438         * bindings/scripts/test/V8/V8TestNode.h:
439         (V8TestNode):
440         * bindings/scripts/test/V8/V8TestObj.cpp:
441         (WebCore::ConfigureV8TestObjTemplate):
442         (WebCore::V8TestObj::GetTemplate):
443         (WebCore::V8TestObj::HasInstance):
444         * bindings/scripts/test/V8/V8TestObj.h:
445         (V8TestObj):
446         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
447         (WebCore::V8TestOverloadedConstructors::GetTemplate):
448         (WebCore::V8TestOverloadedConstructors::HasInstance):
449         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
450         (V8TestOverloadedConstructors):
451         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
452         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
453         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
454         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
455         (V8TestSerializedScriptValueInterface):
456         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
457         (WebCore::ConfigureV8TestTypedefsTemplate):
458         (WebCore::V8TestTypedefs::GetTemplate):
459         (WebCore::V8TestTypedefs::HasInstance):
460         * bindings/scripts/test/V8/V8TestTypedefs.h:
461         (V8TestTypedefs):
462         * bindings/v8/V8AdaptorFunction.cpp:
463         (WebCore::V8AdaptorFunction::getTemplate):
464         * bindings/v8/V8GCController.cpp:
465         * bindings/v8/V8PerIsolateData.cpp:
466         (WebCore::V8PerIsolateData::reportMemoryUsage):
467         (WebCore::V8PerIsolateData::privateTemplate):
468         (WebCore::V8PerIsolateData::rawTemplate):
469         (WebCore::V8PerIsolateData::hasInstance):
470         * bindings/v8/V8PerIsolateData.h:
471         (WebCore::V8PerIsolateData::rawTemplateMap):
472         (V8PerIsolateData):
473         (WebCore::V8PerIsolateData::templateMap):
474         * bindings/v8/WrapperTypeInfo.h:
475         * bindings/v8/custom/V8LocationCustom.cpp:
476         (WebCore::V8Location::reloadAttrGetterCustom):
477         (WebCore::V8Location::replaceAttrGetterCustom):
478         (WebCore::V8Location::assignAttrGetterCustom):
479
480 2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
481
482         [GTK] Set up the libPlatformGtk.la library
483         https://bugs.webkit.org/show_bug.cgi?id=111738
484
485         Reviewed by Martin Robinson.
486
487         No new tests - no new functionality.
488
489         * GNUmakefile.am: Reference platformgtk_cppflags, platformgtk_sources variables along with webcoregtk_cppflags, webcoregtk_sources variables.
490         * GNUmakefile.list.am: Removing GtkVersioning.c and GtkVersioning.h from the sources list, these files have been moved under Source/Platform.
491         * bindings/gobject/GNUmakefile.am: Ditto on the platformgtk_* variables.
492
493 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
494
495         [BlackBerry] Image,ImageBuffer: add missing parameters to methods
496         https://bugs.webkit.org/show_bug.cgi?id=112148
497
498         Reviewed by Rob Buis.
499
500         BitmapImage::draw(), Image::drawPattern() and ImageBuffer::draw()
501         have a BlendMode parameter since r137011.
502
503         ImageBuffer::copyImage() has a ScaleBehavior parameter since r134100.
504
505         * platform/graphics/blackberry/ImageBlackBerry.cpp:
506         (WebCore::BitmapImage::draw):
507         (WebCore::Image::drawPattern):
508         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
509         (WebCore::ImageBuffer::copyImage):
510         (WebCore::ImageBuffer::draw):
511
512 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
513
514         [BlackBerry] MediaPlayerPrivate: fix call to MediaStreamDescriptor::label()
515         https://bugs.webkit.org/show_bug.cgi?id=112140
516
517         Reviewed by Rob Buis.
518
519         MediaStreamDescriptor::id() was renamed to MediaStreamDescriptor::label() in r139352.
520
521         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
522         (WebCore::toWebMediaStreamDescriptor):
523
524 2013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
525
526         Web Inspector: [REGRESSION] StepInto (F11) and StepOut (Shift-F11) shortcuts toggle Inspector window full-screen state
527         https://bugs.webkit.org/show_bug.cgi?id=112113
528
529         Reviewed by Alexander Pavlov.
530
531         Updated handlers missed in first patch. Added JSDocs to all handlers.
532
533         * inspector/front-end/Panel.js: Fixed JSDocs.
534         * inspector/front-end/CallStackSidebarPane.js:
535         Added return values. Added JSDocs.
536         * inspector/front-end/ScriptsPanel.js: Ditto.
537         * inspector/front-end/GoToLineDialog.js: Added JSDocs.
538         * inspector/front-end/TimelinePanel.js: Ditto.
539
540 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
541
542         [BlackBerry] DisplayRefreshMonitor: rename m_timestamp back to m_monotonicAnimationStartTime
543         https://bugs.webkit.org/show_bug.cgi?id=112139
544
545         Reviewed by Rob Buis.
546
547         This changed in r131131, but it was accidentally renamed back in r144465.
548
549         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
550         (WebCore::DisplayRefreshMonitor::displayLinkFired):
551
552 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
553
554         [BlackBerry] FontPlatformData: HarfBuzz renaming
555         https://bugs.webkit.org/show_bug.cgi?id=112142
556
557         Reviewed by Rob Buis.
558
559         When the old HarfBuzz code was removed in r141291,
560         HarfBuzzNGFace.h was renamed to HarfBuzzFace.h and m_harfbuzzFace
561         was renamed to m_harfBuzzFace.
562
563         These changes need to be reflected in the BlackBerry port.
564
565         * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp:
566         (WebCore::FontPlatformData::FontPlatformData):
567         (WebCore::FontPlatformData::platformDataInit):
568         (WebCore::FontPlatformData::platformDataAssign):
569         (WebCore::FontPlatformData::harfBuzzFace):
570
571 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
572
573         [BlackBerry] FontCacheBlackBerry: return PassRefPtr<SimpleFontData>
574         https://bugs.webkit.org/show_bug.cgi?id=112022
575
576         Reviewed by Rob Buis.
577
578         FontData functions return PassRefPtr since r130160.
579
580         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
581         (WebCore::FontCache::getFontDataForCharacters):
582         (WebCore::FontCache::getSimilarFontPlatformData):
583         (WebCore::FontCache::getLastResortFallbackFont):
584         * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
585         (WebCore::SimpleFontData::createScaledFontData):
586
587 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
588
589         Web Inspector: Fix checkContentUpdated behavior in UISourceCode.
590         https://bugs.webkit.org/show_bug.cgi?id=112037
591
592         Reviewed by Alexander Pavlov.
593
594         UISourceCode.checkContentUpdated now saves last updated content that was loaded and rejected
595         by user on the per-file basis (only the last one was saved currently).
596
597         * inspector/front-end/FileSystemProjectDelegate.js:
598         (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
599         (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
600         (WebInspector.FileSystemProjectDelegate.prototype.canSetFileContent):
601         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
602         * inspector/front-end/SimpleWorkspaceProvider.js:
603         (WebInspector.SimpleProjectDelegate.prototype.canSetFileContent):
604         * inspector/front-end/UISourceCode.js:
605         (WebInspector.UISourceCode.prototype.checkContentUpdated.contentLoaded):
606         (WebInspector.UISourceCode.prototype.checkContentUpdated):
607         (WebInspector.UISourceCode.prototype._commitContent):
608         (WebInspector.UISourceCode.prototype.addRevision):
609         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
610         * inspector/front-end/Workspace.js:
611         (WebInspector.ProjectDelegate.prototype.canSetFileContent):
612         (WebInspector.Project.prototype.canSetFileContent):
613
614 2013-03-12  Tomas Popela  <tpopela@redhat.com>
615
616         [Gtk] NBSP are not replaced when using X clipboard
617         https://bugs.webkit.org/show_bug.cgi?id=112118
618
619         Reviewed by Martin Robinson.
620
621         We're not replacing nbsp with spaces when using X clipboard
622         (Shift+Insert or middle mouse button).
623
624         * platform/gtk/DataObjectGtk.cpp:
625         (WebCore::DataObjectGtk::text):
626
627 2013-03-12  Florin Malita  <fmalita@chromium.org>
628
629         SVG Pattern pixelated on inline SVG with CSS transforms
630         https://bugs.webkit.org/show_bug.cgi?id=111587
631
632         Reviewed by Dirk Schulze.
633
634         When calculating the resolution for resource image buffers, we need to also consider CSS
635         transforms. This patch updates calculateTransformationToOutermostSVGCoordinateSystem()
636         (renamed to calculateTransformationToOutermostCoordinateSystem) to include the affine
637         component from CSS transforms by walking the parent layer tree.        
638
639         Test: svg/custom/resources-css-scaled.html
640
641         * rendering/svg/RenderSVGResourceClipper.cpp:
642         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
643         * rendering/svg/RenderSVGResourceFilter.cpp:
644         (WebCore::RenderSVGResourceFilter::applyResource):
645         * rendering/svg/RenderSVGResourceGradient.cpp:
646         (WebCore::createMaskAndSwapContextForTextGradient):
647         (WebCore::clipToTextMask):
648         * rendering/svg/RenderSVGResourceMasker.cpp:
649         (WebCore::RenderSVGResourceMasker::applyResource):
650         * rendering/svg/RenderSVGResourcePattern.cpp:
651         (WebCore::RenderSVGResourcePattern::buildPattern):
652         * rendering/svg/SVGRenderingContext.cpp:
653         (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
654         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
655         * rendering/svg/SVGRenderingContext.h:
656         (SVGRenderingContext):
657
658 2013-03-12  Yury Semikhatsky  <yurys@chromium.org>
659
660         Web Inspector: add html canvas memory details to the native memory overview
661         https://bugs.webkit.org/show_bug.cgi?id=112123
662
663         Reviewed by Alexander Pavlov.
664
665         Show memory occupied vby HTMLCanvasElements under Image category
666         in the native memory overview.
667
668         * inspector/front-end/NativeHeapSnapshot.js:
669         (WebInspector.NativeHeapSnapshot.prototype.images.getImageName):
670         (WebInspector.NativeHeapSnapshot.prototype.images.getCanvasName):
671         (WebInspector.NativeHeapSnapshot.prototype.images):
672         (WebInspector.NativeHeapSnapshot.prototype._addNodes):
673
674 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
675
676         Web Inspector: ResourceScriptFile diverged state should be correctly reset after debugger reset.
677         https://bugs.webkit.org/show_bug.cgi?id=112036
678
679         Reviewed by Alexander Pavlov.
680
681         * inspector/front-end/ResourceScriptMapping.js:
682         (WebInspector.ResourceScriptFile):
683         (WebInspector.ResourceScriptFile.prototype._workingCopyChanged):
684         (WebInspector.ResourceScriptFile.prototype._maybeDirtyChanged):
685
686 2013-03-12  Marja Hölttä  <marja@chromium.org>
687
688         [V8] Move the GetRawTemplate and HasInstance logic from generated bindings to V8PerIsolateData
689         https://bugs.webkit.org/show_bug.cgi?id=112136
690
691         Reviewed by Kentaro Hara.
692
693         When templates for main world and non-main worlds will be separated (bug
694         111724), HasInstance logic will be a bit ugly: We cannot determine the
695         world type on the fly, because during GC there is no entered context,
696         and HasInstance is called during GC. So we need to check against
697         templates from all the worlds. It's cleaner if that logic is in
698         V8PerIsolateData.
699
700         No new tests (Updated existing bindings tests).
701
702         * bindings/scripts/CodeGeneratorV8.pm:
703         (GenerateHeader):
704         (GenerateDomainSafeFunctionGetter):
705         (GenerateImplementation):
706         (CreateCustomSignature):
707         * bindings/scripts/test/V8/V8Float64Array.cpp:
708         (WebCore::ConfigureV8Float64ArrayTemplate):
709         (WebCore::V8Float64Array::GetTemplate):
710         (WebCore::V8Float64Array::HasInstance):
711         * bindings/scripts/test/V8/V8Float64Array.h:
712         (V8Float64Array):
713         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
714         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
715         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
716         (WebCore::V8TestActiveDOMObject::GetTemplate):
717         (WebCore::V8TestActiveDOMObject::HasInstance):
718         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
719         (V8TestActiveDOMObject):
720         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
721         (WebCore::V8TestCustomNamedGetter::GetTemplate):
722         (WebCore::V8TestCustomNamedGetter::HasInstance):
723         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
724         (V8TestCustomNamedGetter):
725         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
726         (WebCore::V8TestEventConstructor::GetTemplate):
727         (WebCore::V8TestEventConstructor::HasInstance):
728         * bindings/scripts/test/V8/V8TestEventConstructor.h:
729         (V8TestEventConstructor):
730         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
731         (WebCore::ConfigureV8TestEventTargetTemplate):
732         (WebCore::V8TestEventTarget::GetTemplate):
733         (WebCore::V8TestEventTarget::HasInstance):
734         * bindings/scripts/test/V8/V8TestEventTarget.h:
735         (V8TestEventTarget):
736         * bindings/scripts/test/V8/V8TestException.cpp:
737         (WebCore::V8TestException::GetTemplate):
738         (WebCore::V8TestException::HasInstance):
739         * bindings/scripts/test/V8/V8TestException.h:
740         (V8TestException):
741         * bindings/scripts/test/V8/V8TestInterface.cpp:
742         (WebCore::ConfigureV8TestInterfaceTemplate):
743         (WebCore::V8TestInterface::GetTemplate):
744         (WebCore::V8TestInterface::HasInstance):
745         * bindings/scripts/test/V8/V8TestInterface.h:
746         (V8TestInterface):
747         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
748         (WebCore::V8TestMediaQueryListListener::GetTemplate):
749         (WebCore::V8TestMediaQueryListListener::HasInstance):
750         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
751         (V8TestMediaQueryListListener):
752         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
753         (WebCore::V8TestNamedConstructor::GetTemplate):
754         (WebCore::V8TestNamedConstructor::HasInstance):
755         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
756         (V8TestNamedConstructor):
757         * bindings/scripts/test/V8/V8TestNode.cpp:
758         (WebCore::V8TestNode::GetTemplate):
759         (WebCore::V8TestNode::HasInstance):
760         * bindings/scripts/test/V8/V8TestNode.h:
761         (V8TestNode):
762         * bindings/scripts/test/V8/V8TestObj.cpp:
763         (WebCore::ConfigureV8TestObjTemplate):
764         (WebCore::V8TestObj::GetTemplate):
765         (WebCore::V8TestObj::HasInstance):
766         * bindings/scripts/test/V8/V8TestObj.h:
767         (V8TestObj):
768         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
769         (WebCore::V8TestOverloadedConstructors::GetTemplate):
770         (WebCore::V8TestOverloadedConstructors::HasInstance):
771         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
772         (V8TestOverloadedConstructors):
773         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
774         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
775         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
776         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
777         (V8TestSerializedScriptValueInterface):
778         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
779         (WebCore::ConfigureV8TestTypedefsTemplate):
780         (WebCore::V8TestTypedefs::GetTemplate):
781         (WebCore::V8TestTypedefs::HasInstance):
782         * bindings/scripts/test/V8/V8TestTypedefs.h:
783         (V8TestTypedefs):
784         * bindings/v8/V8PerIsolateData.cpp:
785         (WebCore::V8PerIsolateData::rawTemplate):
786         (WebCore):
787         (WebCore::V8PerIsolateData::hasInstance):
788         * bindings/v8/V8PerIsolateData.h:
789         (V8PerIsolateData):
790         * bindings/v8/custom/V8LocationCustom.cpp:
791         (WebCore::V8Location::reloadAttrGetterCustom):
792         (WebCore::V8Location::replaceAttrGetterCustom):
793         (WebCore::V8Location::assignAttrGetterCustom):
794
795 2013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
796
797         Web Inspector: Fix JSDocs in TimelinePanel.js
798         https://bugs.webkit.org/show_bug.cgi?id=112137
799
800         Reviewed by Vsevolod Vlasov.
801
802         Fix parameter type annotation of _loadFromFile.
803
804         * inspector/front-end/TimelinePanel.js: Fixed JSDoc.
805
806 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
807
808         Web Inspector: Add a test for Workspace add/removeMapping methods.
809         https://bugs.webkit.org/show_bug.cgi?id=112035
810
811         Reviewed by Alexander Pavlov.
812
813         Test: inspector/debugger/file-system-project-mapping.html
814
815         * inspector/front-end/ScriptsPanel.js:
816         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork.mapFileSystemToNetwork):
817         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork):
818         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem.mapNetworkToFileSystem):
819         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem):
820         * inspector/front-end/Workspace.js:
821         (WebInspector.Project.prototype._fileAdded):
822         (WebInspector.Workspace.prototype.addMapping):
823
824 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
825
826         Web Inspector: SourceFrames are leaking on reload.
827         https://bugs.webkit.org/show_bug.cgi?id=111961
828
829         Reviewed by Alexander Pavlov.
830
831         Added dispose method on UISourceCodeFrame.
832         Scripts panel now calls dispose when SourceFrame is removed and JavaScriptSourceFrame
833         could remove breakpoint manager listeners in it.
834         TabbedEditorContainer does not call viewForFile other than in appendFileTab methods to 
835         avoid recreating SourceFrame for uiSourceCode when it was already removed.
836
837         Test: inspector/debugger/breakpoint-manager-listeners-count.html
838
839         * inspector/front-end/JavaScriptSourceFrame.js:
840         (WebInspector.JavaScriptSourceFrame.prototype.dispose):
841         * inspector/front-end/ScriptsPanel.js:
842         * inspector/front-end/TabbedEditorContainer.js:
843         (WebInspector.TabbedEditorContainer.prototype._addScrollAndSelectionListeners):
844         (WebInspector.TabbedEditorContainer.prototype._removeScrollAndSelectionListeners):
845         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
846         * inspector/front-end/UISourceCodeFrame.js:
847         (WebInspector.UISourceCodeFrame.prototype.dispose):
848
849 2013-03-12  Alexander Pavlov  <apavlov@chromium.org>
850
851         Web Inspector: [Elements] Unable to undo "Edit as HTML" changes in the editor
852         https://bugs.webkit.org/show_bug.cgi?id=112119
853
854         Reviewed by Vsevolod Vlasov.
855
856         No new tests, a UI change.
857
858         * inspector/front-end/ElementsPanel.js:
859         (WebInspector.ElementsPanel.prototype.handleShortcut): Do not undo/redo DOM/CSS changes if editing DOM text.
860         * inspector/front-end/ElementsTreeOutline.js:
861         (WebInspector.ElementsTreeOutline.prototype.editing): Added.
862
863 2013-03-12  Andrey Lushnikov  <lushnikov@chromium.org>
864
865         Web Inspector: [CodeMirror] there are bugs in TokenHighlight feature
866         https://bugs.webkit.org/show_bug.cgi?id=112039
867
868         Reviewed by Vsevolod Vlasov.
869
870         Fix token highlight in codeMirror experiment
871         - rewrite token highlight overlay mode to highlight words, not
872         substrings
873         - add workaround to avoid selection of already selected word
874
875         No new tests.
876
877         * inspector/front-end/CodeMirrorTextEditor.js:
878         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
879         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
880         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype.nextToken):
881         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
882         * inspector/front-end/cm/cmdevtools.css:
883         (.line-with-selection .cm-column-with-selection):
884
885 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
886
887         Unreviewed, rolling out r145514.
888         http://trac.webkit.org/changeset/145514
889         https://bugs.webkit.org/show_bug.cgi?id=112134
890
891         breaks Mac build (Requested by falken on #webkit).
892
893         * dom/Element.cpp:
894         * dom/Element.h:
895         * dom/EventDispatcher.cpp:
896         (WebCore::EventDispatcher::dispatchSimulatedClick):
897         * dom/GestureEvent.cpp:
898         (WebCore::GestureEventDispatchMediator::dispatchEvent):
899         * dom/MouseEvent.cpp:
900         (WebCore::MouseEventDispatchMediator::dispatchEvent):
901         * dom/Node.cpp:
902         (WebCore):
903         (WebCore::Node::isInert):
904         (WebCore::Node::handleLocalEvents):
905         (WebCore::Node::disabled):
906         (WebCore::Node::willRespondToMouseMoveEvents):
907         (WebCore::Node::willRespondToMouseClickEvents):
908         (WebCore::Node::willRespondToTouchEvents):
909         * dom/Node.h:
910         (Node):
911
912 2013-03-12  Andrey Lushnikov  <lushnikov@chromium.org>
913
914         Web Inspector: [CodeMirror] highlight matching braces
915         https://bugs.webkit.org/show_bug.cgi?id=112041
916
917         Reviewed by Vsevolod Vlasov.
918
919         Add "matchbrackets" add-on to CodeMirror text editor add override
920         default styles for matched and unmatched braces.
921
922         No new tests.
923
924         * WebCore.gypi:
925         * WebCore.vcproj/WebCore.vcproj:
926         * WebCore.vcxproj/WebCore.vcxproj:
927         * WebCore.vcxproj/WebCore.vcxproj.filters:
928         * inspector/front-end/CodeMirrorTextEditor.js:
929         (WebInspector.CodeMirrorTextEditor):
930         * inspector/front-end/WebKit.qrc:
931         * inspector/front-end/cm/cmdevtools.css:
932         (.CodeMirror-matchingbracket):
933         (.CodeMirror-nonmatchingbracket):
934         * inspector/front-end/cm/matchbrackets.js: Added.
935         (.):
936
937 2013-03-12  Matt Falkenhagen  <falken@chromium.org>
938
939         Refactoring: Pull Node::disabled() and Node::isInert() down to Element.
940         https://bugs.webkit.org/show_bug.cgi?id=112085
941
942         Reviewed by Hajime Morrita.
943
944         Node is too low a level for these methods.
945
946         No new tests, just refactoring.
947
948         * dom/Element.cpp:
949         (WebCore::Element::disabled):
950         (WebCore):
951         (WebCore::Element::isInert):
952         * dom/Element.h:
953         (Element):
954         * dom/EventDispatcher.cpp:
955         (WebCore::EventDispatcher::dispatchSimulatedClick):
956         * dom/GestureEvent.cpp:
957         (WebCore::GestureEventDispatchMediator::dispatchEvent):
958         * dom/MouseEvent.cpp:
959         (WebCore::MouseEventDispatchMediator::dispatchEvent):
960         * dom/Node.cpp:
961         (WebCore::Node::handleLocalEvents):
962         (WebCore::Node::willRespondToMouseMoveEvents):
963         (WebCore::Node::willRespondToMouseClickEvents):
964         (WebCore::Node::willRespondToTouchEvents):
965         * dom/Node.h:
966         (Node):
967
968 2013-03-12  Marja Hölttä  <marja@chromium.org>
969
970         [V8] Get rid of function-level static FunctionTemplates in generated bindings code
971         https://bugs.webkit.org/show_bug.cgi?id=111971
972
973         Reviewed by Jochen Eisinger.
974
975         In the future we'll create and store function templates for main world
976         and non-main worlds separately (see bug 111724), having function
977         templates as static variables inside functions will break the
978         functionality.
979
980         No new tests (updated the bindings test expectations).
981
982         * bindings/scripts/CodeGeneratorV8.pm:
983         (GenerateDomainSafeFunctionGetter):
984         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
985         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
986         * bindings/v8/V8PerIsolateData.cpp:
987         (WebCore::V8PerIsolateData::V8PerIsolateData):
988         (WebCore::V8PerIsolateData::privateTemplate):
989         (WebCore):
990         * bindings/v8/V8PerIsolateData.h:
991         (V8PerIsolateData):
992         * bindings/v8/custom/V8LocationCustom.cpp:
993         (WebCore::V8Location::reloadAttrGetterCustom):
994         (WebCore::V8Location::replaceAttrGetterCustom):
995         (WebCore::V8Location::assignAttrGetterCustom):
996
997 2013-03-12  Takashi Sakamoto  <tasak@google.com>
998
999         [Refactoring] Implement RuleCollector
1000         https://bugs.webkit.org/show_bug.cgi?id=109916
1001
1002         Reviewed by Antti Koivisto.
1003
1004         Implemented rule collector for an element and collector for a page.
1005         Not all members in class State are required entire while resolving
1006         a style.
1007
1008         No new tests, because just refactoring.
1009
1010         * CMakeLists.txt:
1011         * GNUmakefile.list.am:
1012         * Target.pri:
1013         * WebCore.gypi:
1014         * WebCore.xcodeproj/project.pbxproj:
1015         * css/CSSAllInOne.cpp:
1016         Added ElementRuleCollector and PageRuleCollector.
1017         * css/DocumentRuleSets.cpp:
1018         (WebCore::ShadowDistributedRules::collectMatchRequests):
1019         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
1020         removed from here.
1021         * css/DocumentRuleSets.h:
1022         (WebCore::ShadowDistributedRules::isEmpty):
1023         Added to quickly check whether there exist any ShadowDistributedRules
1024         or not.
1025         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
1026         (WebCore):
1027         (WebCore::ElementRuleCollector::matchedResult):
1028         (WebCore::ElementRuleCollector::matchedRuleList):
1029         (WebCore::ElementRuleCollector::addMatchedRule):
1030         (WebCore::ElementRuleCollector::clearMatchedRules):
1031         (WebCore::ElementRuleCollector::ensureRuleList):
1032         (WebCore::ElementRuleCollector::addElementStyleProperties):
1033         (WebCore::ElementRuleCollector::collectMatchingRules):
1034         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
1035         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1036         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
1037         (WebCore::ElementRuleCollector::matchHostRules):
1038         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
1039         (WebCore::ElementRuleCollector::matchAuthorRules):
1040         (WebCore::ElementRuleCollector::matchUserRules):
1041         (WebCore::ElementRuleCollector::matchUARules):
1042         (WebCore::ElementRuleCollector::ruleMatches):
1043         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1044         (WebCore::ElementRuleCollector::sortMatchedRules):
1045         (WebCore::ElementRuleCollector::matchAllRules):
1046         Moved these methods from StyleResolver to this class.
1047         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
1048         This method is used for checking whether a given element can share
1049         a cache.
1050         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
1051         (WebCore):
1052         (WebCore::ElementRuleCollector::ElementRuleCollector):
1053         Use styleResolver instance to initialize its member variables, i.e.
1054         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
1055         StyleScopedResolver.
1056         (ElementRuleCollector):
1057         (WebCore::ElementRuleCollector::setMode):
1058         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
1059         (WebCore::ElementRuleCollector::setSameOriginOnly):
1060         (WebCore::ElementRuleCollector::setRegionForStyling):
1061         Mode, SameOriginOnly, RegionForStyling are only used while collecting
1062         matched rules.
1063         (WebCore::ElementRuleCollector::setMedium):
1064         Need to know which default stylesheet should be looked up.
1065         (WebCore::ElementRuleCollector::document):
1066         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
1067         (WebCore::comparePageRules):
1068         (WebCore::PageRuleCollector::isLeftPage):
1069         (WebCore::PageRuleCollector::isFirstPage):
1070         (WebCore::PageRuleCollector::pageName):
1071         (WebCore::PageRuleCollector::matchAllPageRules):
1072         (WebCore::PageRuleCollector::matchPageRules):
1073         (WebCore::checkPageSelectorComponents):
1074         (WebCore::PageRuleCollector::matchPageRulesForList):
1075         Moved from StyleResolver.
1076         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
1077         (WebCore):
1078         (WebCore::PageRuleCollector::PageRuleCollector):
1079         (PageRuleCollector):
1080         (WebCore::PageRuleCollector::matchedResult):
1081         * css/StyleResolver.cpp:
1082         (WebCore):
1083         (WebCore::StyleResolver::State::clear):
1084         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
1085         (WebCore::StyleResolver::State::initForStyleResolve):
1086         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
1087         (WebCore::StyleResolver::styleForElement):
1088         (WebCore::StyleResolver::styleForKeyframe):
1089         (WebCore::StyleResolver::pseudoStyleForElement):
1090         (WebCore::StyleResolver::styleForPage):
1091         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1092         (WebCore::StyleResolver::applyMatchedProperties):
1093         * css/StyleResolver.h:
1094         (WebCore::MatchRequest::MatchRequest):
1095         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
1096         state.
1097         (MatchRequest):
1098         (WebCore::StyleResolver::selectorFilter):
1099         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
1100         (StyleResolver):
1101         (MatchResult):
1102         (WebCore::StyleResolver::State::State):
1103         To pass ASSERT in StyleResolver::applyProperties, need to keep
1104         m_regionForStyling.
1105         (State):
1106         (WebCore::StyleResolver::State::regionForStyling):
1107         (WebCore::StyleResolver::State::useSVGZoomRules):
1108         (WebCore::StyleResolver::hasSelectorForId):
1109         (WebCore):
1110         (WebCore::checkRegionSelector):
1111         * inspector/InspectorCSSAgent.cpp:
1112         (WebCore::InspectorCSSAgent::willMatchRule):
1113         Removed StyleResolver from its parameter list. Instead, added
1114         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
1115         * inspector/InspectorCSSAgent.h:
1116         (WebCore):
1117         (InspectorCSSAgent):
1118         * inspector/InspectorInstrumentation.cpp:
1119         (WebCore):
1120         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
1121         * inspector/InspectorInstrumentation.h:
1122         (WebCore):
1123         (InspectorInstrumentation):
1124         (WebCore::InspectorInstrumentation::willMatchRule):
1125
1126 2013-03-12  Floris Bos  <bos@je-eigen-domein.nl>
1127
1128         [Qt] WebKit fails to compile if EGL headers are not in default INCLUDEPATH
1129         https://bugs.webkit.org/show_bug.cgi?id=111859
1130
1131         Reviewed by Jocelyn Turcotte.
1132
1133         The 3D graphics code wants to include EGL header files.
1134         But on some platforms such as the Raspberry Pi those are not in /usr/include
1135         but in another folder.
1136         Fix adds "egl" to CONFIG when OpenGL ES2 is used, so the right include
1137         paths are added.
1138
1139         * WebCore.pri:
1140
1141 2013-03-12  Mike West  <mkwst@chromium.org>
1142
1143         XSSAuditor should send only one console error when blocking a page.
1144         https://bugs.webkit.org/show_bug.cgi?id=110733
1145
1146         Reviewed by Daniel Bates.
1147
1148         Currently, we send two console errors when XSSAuditor blocks a page:
1149         "Refused to execute a JavaScript script. Source code of script found
1150         within request.\n", and "Entire page will be blocked.".
1151
1152         We should only send one message, tuning it properly for the context, and
1153         including the URL of the page effected by the XSSAuditor's work.
1154
1155         Covered by rebaselines of all the XSSAuditor and 'reflected-xss' tests.
1156
1157         * html/parser/XSSAuditor.cpp:
1158         * html/parser/XSSAuditor.h:
1159         (WebCore::XSSAuditor::XSSAuditor):
1160             Add two booleans to track the headers used to set the XSSAuditor state.
1161         (WebCore::XSSAuditor::init):
1162         (WebCore::XSSAuditor::filterToken):
1163             Add detail about the header status to the constructed XSSInfo object.
1164         * html/parser/XSSAuditorDelegate.cpp:
1165         (WebCore::buildConsoleError):
1166             Move message construction out into a separate inlined function, as
1167             it's becoming complex.
1168         (WebCore::XSSAuditorDelegate::didBlockScript):
1169             Fold the "Entire page will be blocked" message into the main console
1170             error.
1171         * html/parser/XSSAuditorDelegate.h:
1172         (WebCore::XSSInfo::create):
1173         (WebCore::XSSInfo::XSSInfo):
1174             Add detail about header status to XSSInfo in order to correctly
1175             construct the console error.
1176
1177 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1178
1179         Unreviewed, rolling out r145494.
1180         http://trac.webkit.org/changeset/145494
1181         https://bugs.webkit.org/show_bug.cgi?id=112117
1182
1183         Breaks Chromium Mac (Requested by pfeldman on #webkit).
1184
1185         * bindings/scripts/CodeGeneratorV8.pm:
1186         (GenerateDomainSafeFunctionGetter):
1187         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1188         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
1189         * bindings/v8/V8PerIsolateData.cpp:
1190         (WebCore::V8PerIsolateData::V8PerIsolateData):
1191         * bindings/v8/V8PerIsolateData.h:
1192         (V8PerIsolateData):
1193         * bindings/v8/custom/V8LocationCustom.cpp:
1194         (WebCore::V8Location::reloadAttrGetterCustom):
1195         (WebCore::V8Location::replaceAttrGetterCustom):
1196         (WebCore::V8Location::assignAttrGetterCustom):
1197
1198 2013-03-12  Yury Semikhatsky  <yurys@chromium.org>
1199
1200         Web Inspector: add memory instrumentation for ImageLoader
1201         https://bugs.webkit.org/show_bug.cgi?id=112115
1202
1203         Reviewed by Alexander Pavlov.
1204
1205         Added memory instrumentation to ImageLoader. CachedImage referenced
1206         by the loader is reported as having retaining reference. This allows
1207         to see in the native memory graph CachedImages that are not reachable
1208         from MemoryCache but referenced by HTMLImageElement.
1209
1210         * loader/ImageLoader.cpp:
1211         (WebCore::ImageLoader::reportMemoryUsage):
1212         (WebCore):
1213         * loader/ImageLoader.h:
1214         (ImageLoader):
1215
1216 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
1217
1218         Web Inspector: Broken shortcuts in Snippets SourceFrame
1219         https://bugs.webkit.org/show_bug.cgi?id=112038
1220
1221         Reviewed by Pavel Feldman.
1222
1223         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
1224         (WebInspector.SnippetJavaScriptSourceFrame):
1225         (WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):
1226
1227 2013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
1228
1229         Web Inspector: [Timeline] File selector control becomes visible on "tab" navigation.
1230         https://bugs.webkit.org/show_bug.cgi?id=111710
1231
1232         Reviewed by Pavel Feldman.
1233
1234         Solution: Exclude file selector control from tab-navigation flow.
1235
1236         * inspector/front-end/FileUtils.js: Set tab-index to control.
1237         * inspector/front-end/TimelinePanel.js: Remove duplicating code.
1238         * inspector/front-end/inspector.css:
1239         (.status-bar-item): Make scroll height equal to offset height.
1240
1241 2013-03-12  Marja Hölttä  <marja@chromium.org>
1242
1243         [V8] Get rid of function-level static FunctionTemplates in generated bindings code
1244         https://bugs.webkit.org/show_bug.cgi?id=111971
1245
1246         Reviewed by Kentaro Hara.
1247
1248         In the future we'll create and store function templates for main world
1249         and non-main worlds separately (see bug 111724), having function
1250         templates as static variables inside functions will break the
1251         functionality.
1252
1253         No new tests (updated the bindings test expectations).
1254
1255         * bindings/scripts/CodeGeneratorV8.pm:
1256         (GenerateDomainSafeFunctionGetter):
1257         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1258         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
1259         * bindings/v8/V8PerIsolateData.cpp:
1260         (WebCore::V8PerIsolateData::V8PerIsolateData):
1261         (WebCore::V8PerIsolateData::privateTemplate):
1262         (WebCore):
1263         * bindings/v8/V8PerIsolateData.h:
1264         (V8PerIsolateData):
1265         * bindings/v8/custom/V8LocationCustom.cpp:
1266         (WebCore::V8Location::reloadAttrGetterCustom):
1267         (WebCore::V8Location::replaceAttrGetterCustom):
1268         (WebCore::V8Location::assignAttrGetterCustom):
1269
1270 2013-03-12  Tien-Ren Chen  <trchen@chromium.org>
1271
1272         Need to notify ScrollingCoordinator when frame scrollbars are destroyed
1273         https://bugs.webkit.org/show_bug.cgi?id=112104
1274
1275         Reviewed by James Robinson.
1276
1277         Need to notify ScrollingCoordinatorChromium whenever m_layerForHorizontalScrollbar /
1278         m_layerForVerticalScrollbar changes, for correct lifetime management.
1279
1280         No new tests. Difficult to test lifetime management internal to ScrollingCoordinatorChromium.
1281
1282         * rendering/RenderLayerCompositor.cpp:
1283         (WebCore::RenderLayerCompositor::destroyRootLayer):
1284
1285 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
1286
1287         We'll get there eventually.
1288
1289         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
1290
1291 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
1292
1293         Fumbled adding new files to the vcproj. Fixing.
1294
1295         * WebCore.vcproj/WebCore.vcproj:
1296
1297 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
1298
1299         Fix the Windows build by providing implementations of PlatformCAFilters::setFiltersOnLayer(),
1300         PlatformCAFilters::numAnimatedFilterProperties() and PlatformCAFilters::animatedFilterPropertyName(),
1301         adding PlatformCAFiltersWin.cpp to the vcproj.
1302         
1303         * WebCore.vcproj/WebCore.vcproj:
1304         * platform/graphics/ca/PlatformCAFilters.h:
1305         (PlatformCAFilters):
1306         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp: Copied from Source/WebCore/platform/graphics/ca/PlatformCAFilters.h.
1307         (PlatformCAFilters::setFiltersOnLayer):
1308         (PlatformCAFilters::numAnimatedFilterProperties):
1309         (PlatformCAFilters::animatedFilterPropertyName):
1310
1311 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
1312
1313         Don't create multiple user gesture indicators when forwarding events to sub frames
1314         https://bugs.webkit.org/show_bug.cgi?id=111923
1315
1316         Reviewed by Adam Barth.
1317
1318         Ports that implement consumable user gestures depend on a single user
1319         gesture indicator being created in response to a single user gesture.
1320
1321         Test: platform/chromium/fast/events/popup-allowed-from-gesture-only-once-iframes.html
1322
1323         * dom/UserGestureIndicator.cpp:
1324         (WebCore::isDefinite):
1325         (WebCore::UserGestureIndicator::UserGestureIndicator):
1326         (WebCore::UserGestureIndicator::processingUserGesture):
1327         * dom/UserGestureIndicator.h:
1328         * page/EventHandler.cpp:
1329         (WebCore::EventHandler::handleMousePressEvent):
1330         (WebCore::EventHandler::handleMouseDoubleClickEvent):
1331         (WebCore::EventHandler::handleMouseReleaseEvent):
1332         (WebCore::EventHandler::keyEvent):
1333         (WebCore::EventHandler::handleTouchEvent):
1334
1335 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
1336
1337         Fix Windows build.
1338
1339         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
1340
1341 2013-03-11  Tim Horton  <timothy_horton@apple.com>
1342
1343         Unreviewed build fix after http://trac.webkit.org/changeset/145472.
1344
1345         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
1346         (PlatformCAFilters::colorMatrixValueForFilter):
1347
1348 2013-03-11  Takashi Sakamoto  <tasak@google.com>
1349
1350         [CSS] shadow from radius has wrong render in webkit
1351         https://bugs.webkit.org/show_bug.cgi?id=99928
1352
1353         Reviewed by Simon Fraser.
1354
1355         No rounded cornder should be expanded in the mixed case, i.e. some
1356         corners are rounded, but others are not rounded.
1357         Need to look at each corner independently,
1358         i.e. top-left, top-right, bottom-left and bottom-right, and
1359         to expand corners whose width and height are larger than 0.
1360
1361         Test: fast/box-shadow/box-shadow-with-zero-radius.html
1362
1363         * platform/graphics/RoundedRect.cpp:
1364         (WebCore::RoundedRect::Radii::expand):
1365
1366 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
1367
1368         [CA] Animations of CSS filters don't work correctly
1369         https://bugs.webkit.org/show_bug.cgi?id=111905
1370
1371         Reviewed by Dean Jackson.
1372
1373         Fix various issues with transitions of composited filters on Mac,
1374         most of which stemmed from the conversion to use CAFilter.
1375         
1376         Put the Mac CA filter-related code into a new file, PlatformCAFilters,
1377         to group code that creates filter properties into a single place.
1378         
1379         Animations of CIFilters using multiple values never worked correctly,
1380         because we would clobber all but the last property for each filter,
1381         so fix that.
1382         
1383         Changes in the moved filter code:
1384             - Made use of sepiaFullConstants in the CIFilter and CAFilter code.
1385             - For CI, return CIVectors instead of NSArrays of NSNumbers.
1386             - Fudge the inputColor for the CI grayscale filter to better match software filters.
1387             - fix some cases where the behavior was wrong in the isDefault() case.
1388
1389         * WebCore.xcodeproj/project.pbxproj: Add PlatformCAFilters.h, PlatformCAFiltersMac.mm.
1390         * platform/graphics/GraphicsLayer.cpp:
1391         (WebCore::GraphicsLayer::animationNameForTransition): This function was creating a string
1392         containing non-ASCII characters.
1393         * platform/graphics/ca/GraphicsLayerCA.cpp:
1394         (WebCore::animationIdentifier): To handle CIFilter animations, we need to tack another
1395         index onto the animation identifier, since some animations require animating multiple
1396         properties of the same CIFilter. Add "subIndex" for this.
1397         (WebCore::GraphicsLayerCA::moveOrCopyAnimations): Ditto.
1398         (WebCore::GraphicsLayerCA::updateAnimations): Ditto.
1399         (WebCore::GraphicsLayerCA::setAnimationOnLayer): Ditto.
1400         (WebCore::GraphicsLayerCA::removeCAAnimationFromLayer): Ditto.
1401         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer): Ditto.
1402         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): Ditto.
1403         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Ditto.
1404         * platform/graphics/ca/GraphicsLayerCA.h: Ditto.
1405         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
1406         (LayerPropertyAnimation):
1407         * platform/graphics/ca/PlatformCAAnimation.h:
1408         (PlatformCAAnimation): Functions moved.
1409         * platform/graphics/ca/PlatformCAFilters.h: Added.
1410         (PlatformCAFilters):
1411         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1412         (PlatformCAAnimation::setFromValue):
1413         (PlatformCAAnimation::setToValue):
1414         (PlatformCAAnimation::setValues):
1415         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Added.
1416         (PlatformCAFilters::filterValueForOperation):
1417         (PlatformCAFilters::colorMatrixValueForFilter):
1418         (PlatformCAFilters::numAnimatedFilterProperties):
1419         (PlatformCAFilters::animatedFilterPropertyName):
1420         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1421         (PlatformCALayer::PlatformCALayer):
1422         (PlatformCALayer::addAnimationForKey):
1423         (PlatformCALayer::setFilters):
1424         (PlatformCALayer::filtersCanBeComposited):
1425
1426 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1427
1428         Unreviewed, rolling out r145462.
1429         http://trac.webkit.org/changeset/145462
1430         https://bugs.webkit.org/show_bug.cgi?id=112097
1431
1432         Compilation failure in PluginView.cpp (Requested by jamesr_ on
1433         #webkit).
1434
1435         * accessibility/AccessibilityMenuList.cpp:
1436         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
1437         * bindings/objc/DOM.mm:
1438         (kitClass):
1439         * bindings/v8/V8LazyEventListener.cpp:
1440         (WebCore::V8LazyEventListener::prepareListenerObject):
1441         * css/SelectorChecker.cpp:
1442         (WebCore::SelectorChecker::checkOne):
1443         * editing/ApplyStyleCommand.cpp:
1444         (WebCore::isLegacyAppleStyleSpan):
1445         (WebCore::isEmptyFontTag):
1446         (WebCore::ApplyStyleCommand::applyBlockStyle):
1447         * editing/FormatBlockCommand.cpp:
1448         (WebCore::isElementForFormatBlock):
1449         * editing/ReplaceSelectionCommand.cpp:
1450         (WebCore::isMailPasteAsQuotationNode):
1451         (WebCore::haveSameTagName):
1452         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1453         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
1454         * history/CachedPage.cpp:
1455         (WebCore::CachedPage::restore):
1456         * html/ColorInputType.cpp:
1457         (WebCore::ColorInputType::suggestions):
1458         * html/HTMLTableRowsCollection.cpp:
1459         (WebCore::isInHead):
1460         (WebCore::isInBody):
1461         (WebCore::isInFoot):
1462         * inspector/DOMPatchSupport.cpp:
1463         (WebCore::DOMPatchSupport::innerPatchNode):
1464         * page/PageSerializer.cpp:
1465         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
1466         * plugins/PluginView.cpp:
1467         (WebCore::PluginView::getValue):
1468         * rendering/RenderEmbeddedObject.cpp:
1469         (WebCore::RenderEmbeddedObject::paintContents):
1470         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
1471         * rendering/RenderLayer.cpp:
1472         (WebCore::RenderLayer::name):
1473         * rendering/RenderMedia.cpp:
1474         (WebCore::RenderMedia::mediaElement):
1475         * rendering/RenderSearchField.cpp:
1476         (WebCore::RenderSearchField::autosaveName):
1477         * rendering/RenderTextControl.cpp:
1478         (WebCore::RenderTextControl::textFormControlElement):
1479         (WebCore::updateUserModifyProperty):
1480         * rendering/mathml/RenderMathMLFenced.cpp:
1481         (WebCore::RenderMathMLFenced::updateFromElement):
1482         * rendering/mathml/RenderMathMLFraction.cpp:
1483         (WebCore::RenderMathMLFraction::updateFromElement):
1484         * xml/parser/XMLDocumentParserLibxml2.cpp:
1485         (WebCore::XMLDocumentParser::XMLDocumentParser):
1486         (WebCore::XMLDocumentParser::endElementNs):
1487
1488 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
1489
1490         Move SharedWorkerRepository functions out of DefaultSharedWorkerRepository
1491         https://bugs.webkit.org/show_bug.cgi?id=100418
1492
1493         Reviewed by Sam Weinig.
1494
1495         * CMakeLists.txt:
1496         * GNUmakefile.list.am:
1497         * Target.pri:
1498         * WebCore.vcproj/WebCore.vcproj:
1499         * WebCore.xcodeproj/project.pbxproj:
1500         Added SharedWorkerRepository.cpp.
1501
1502         * WebCore.gyp/WebCore.gyp:
1503         * WebCore.gypi:
1504         Chromium uses WebKit/chromium/src/SharedWorkerRepository.cpp instead of
1505         WebCore/workers/DefaultSharedWorkerRepository.cpp. Not sure why it's added and
1506         then excluded, but did the same with the new SharedWorkerRepository.cpp, which
1507         just contains some code moved from that file.
1508
1509         * workers/DefaultSharedWorkerRepository.cpp:
1510         (WebCore::SharedWorkerScriptLoader::load): Removed a PLATFORM(CHROMIUM) clause,
1511         chromium doesn't compile this file.
1512         (WebCore::DefaultSharedWorkerRepository::connectToWorker): Added a FIXME about
1513         seemingly wrong code.
1514
1515         * workers/SharedWorkerRepository.cpp: Added.
1516         (WebCore::SharedWorkerRepository::isAvailable):
1517         (WebCore::SharedWorkerRepository::connect):
1518         (WebCore::SharedWorkerRepository::documentDetached):
1519         (WebCore::SharedWorkerRepository::hasSharedWorkers):
1520         Moved from DefaultSharedWorkerRepository.cpp, because this is part of SharedWorkerRepository.
1521
1522 2013-03-11  Adam Barth  <abarth@webkit.org>
1523
1524         Make BackgroundHTMLParser work with doc.writes that enter or leave foreign content
1525         https://bugs.webkit.org/show_bug.cgi?id=109764
1526
1527         Reviewed by Eric Seidel.
1528
1529         Previously, we were not reseting the state of the
1530         HTMLTreeBuilderSimulator when we failed speculative parsing. This had a
1531         number of observable consequences, including not parsing CDATA sections
1532         correctly when document.write caused us to enter foreign content.
1533
1534         Test: fast/parser/document-write-svg-cdata.html
1535
1536         * html/parser/BackgroundHTMLParser.cpp:
1537         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1538         (WebCore::BackgroundHTMLParser::resumeFrom):
1539         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1540         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
1541         * html/parser/BackgroundHTMLParser.h:
1542         (Checkpoint):
1543         (BackgroundHTMLParser):
1544         * html/parser/HTMLDocumentParser.cpp:
1545         (WebCore::HTMLDocumentParser::validateSpeculations):
1546         (WebCore::HTMLDocumentParser::didFailSpeculation):
1547         * html/parser/HTMLDocumentParser.h:
1548         (ParsedChunk):
1549         * html/parser/HTMLElementStack.h:
1550         (WebCore::HTMLElementStack::ElementRecord::namespaceURI):
1551         * html/parser/HTMLTreeBuilder.h:
1552         (WebCore::HTMLTreeBuilder::options):
1553         (WebCore::HTMLTreeBuilder::openElements):
1554         (HTMLTreeBuilder):
1555         * html/parser/HTMLTreeBuilderSimulator.cpp:
1556         (WebCore::HTMLTreeBuilderSimulator::stateFor):
1557         (WebCore):
1558         * html/parser/HTMLTreeBuilderSimulator.h:
1559         (WebCore):
1560         (WebCore::HTMLTreeBuilderSimulator::state):
1561         (WebCore::HTMLTreeBuilderSimulator::setState):
1562         (HTMLTreeBuilderSimulator):
1563
1564 2013-03-11  Abhishek Arya  <inferno@chromium.org>
1565
1566         Replace static_casts with to* functions.
1567         https://bugs.webkit.org/show_bug.cgi?id=112072
1568
1569         Reviewed by Philip Rogers.
1570
1571         to* functions are preferred over static_cast calls since they
1572         help to catch bad casts easily on the testing infrastructure.
1573
1574         * accessibility/AccessibilityMenuList.cpp:
1575         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
1576         * bindings/objc/DOM.mm:
1577         (kitClass):
1578         * bindings/v8/V8LazyEventListener.cpp:
1579         (WebCore::V8LazyEventListener::prepareListenerObject):
1580         * css/SelectorChecker.cpp:
1581         (WebCore::SelectorChecker::checkOne):
1582         * editing/ApplyStyleCommand.cpp:
1583         (WebCore::isLegacyAppleStyleSpan):
1584         (WebCore::isEmptyFontTag):
1585         (WebCore::ApplyStyleCommand::applyBlockStyle):
1586         * editing/FormatBlockCommand.cpp:
1587         (WebCore::isElementForFormatBlock):
1588         * editing/ReplaceSelectionCommand.cpp:
1589         (WebCore::isMailPasteAsQuotationNode):
1590         (WebCore::haveSameTagName):
1591         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1592         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
1593         * history/CachedPage.cpp:
1594         (WebCore::CachedPage::restore):
1595         * html/ColorInputType.cpp:
1596         (WebCore::ColorInputType::suggestions):
1597         * html/HTMLTableRowsCollection.cpp:
1598         (WebCore::isInHead):
1599         (WebCore::isInBody):
1600         (WebCore::isInFoot):
1601         * inspector/DOMPatchSupport.cpp:
1602         (WebCore::DOMPatchSupport::innerPatchNode):
1603         * page/PageSerializer.cpp:
1604         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
1605         * plugins/PluginView.cpp:
1606         (WebCore::PluginView::getValue):
1607         * rendering/RenderEmbeddedObject.cpp:
1608         (WebCore::RenderEmbeddedObject::paintContents):
1609         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
1610         * rendering/RenderLayer.cpp:
1611         (WebCore::RenderLayer::name):
1612         * rendering/RenderMedia.cpp:
1613         (WebCore::RenderMedia::mediaElement):
1614         * rendering/RenderSearchField.cpp:
1615         (WebCore::RenderSearchField::autosaveName):
1616         * rendering/RenderTextControl.cpp:
1617         (WebCore::RenderTextControl::textFormControlElement):
1618         (WebCore::updateUserModifyProperty):
1619         * rendering/mathml/RenderMathMLFenced.cpp:
1620         (WebCore::RenderMathMLFenced::updateFromElement):
1621         * rendering/mathml/RenderMathMLFraction.cpp:
1622         (WebCore::RenderMathMLFraction::updateFromElement):
1623         * xml/parser/XMLDocumentParserLibxml2.cpp:
1624         (WebCore::XMLDocumentParser::XMLDocumentParser):
1625         (WebCore::XMLDocumentParser::endElementNs):
1626
1627 2013-03-11  Philip Rogers  <pdr@google.com>
1628
1629         Replace static_casts for SVGSVGElement and SVGStopElement
1630         https://bugs.webkit.org/show_bug.cgi?id=111651
1631
1632         Reviewed by Stephen Chenney.
1633
1634         toSVGSVGElement and toSVGStopElement are preferred over static_casts because bad casts
1635         can be caught on our testing infrastructure. This patches replaces all static_casts for
1636         SVGSVGElement and SVGStopElement with toSVGSVGElement and toSVGStopElement, respectively.
1637
1638         Additionaly, this patch renames SVGElement::isSVG to SVGElement::isSVGSVGElement to
1639         remove ambiguity for callers who may confuse this with isSVGElement.
1640
1641         No new tests as this is covered with existing tests.
1642
1643         * rendering/svg/RenderSVGRoot.cpp:
1644         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
1645         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
1646         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
1647         (WebCore::RenderSVGRoot::layout):
1648         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
1649         (WebCore::RenderSVGRoot::hasRelativeDimensions):
1650         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
1651         (WebCore::RenderSVGRoot::hasRelativeLogicalHeight):
1652         * rendering/svg/RenderSVGViewportContainer.cpp:
1653         (WebCore::RenderSVGViewportContainer::determineIfLayoutSizeChanged):
1654         (WebCore::RenderSVGViewportContainer::calcViewport):
1655         (WebCore::RenderSVGViewportContainer::viewportTransform):
1656         * svg/SVGDocument.cpp:
1657         (WebCore::SVGDocument::rootElement):
1658         (WebCore::SVGDocument::childShouldCreateRenderer):
1659         * svg/SVGElement.cpp:
1660         (WebCore::SVGElement::ownerSVGElement):
1661         * svg/SVGElement.h:
1662         (WebCore::SVGElement::isSVGSVGElement):
1663         * svg/SVGGradientElement.cpp:
1664         (WebCore::SVGGradientElement::buildStops):
1665         * svg/SVGLengthContext.cpp:
1666         (WebCore::SVGLengthContext::determineViewport):
1667         * svg/SVGSVGElement.h:
1668         (WebCore):
1669         (WebCore::toSVGSVGElement):
1670         * svg/SVGStopElement.h:
1671         (WebCore::toSVGStopElement):
1672         (WebCore):
1673
1674 2013-03-11  Tony Chang  <tony@chromium.org>
1675
1676         Small code cleanup in RenderFlexibleBox
1677         https://bugs.webkit.org/show_bug.cgi?id=112076
1678
1679         Reviewed by Ojan Vafai.
1680
1681         No new tests, this is a refactor and existing tests in css3/flexbox should pass.
1682
1683         * rendering/RenderFlexibleBox.cpp:
1684         (WebCore::RenderFlexibleBox::layoutBlock): Remove unused param from repositionLogicalHeightDependentFlexItems.
1685         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Remove unused param from repositionLogicalHeightDependentFlexItems.
1686         The clientLogicalBottom can't have changed in this time (the only thing we've done is align children).
1687         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Just call layout() if we marked the flexitem as needing layout.
1688         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Just call layout() if we marked the flexitem as needing layout.
1689         * rendering/RenderFlexibleBox.h:
1690         (RenderFlexibleBox): Remove unused param from repositionLogicalHeightDependentFlexItems.
1691
1692 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
1693
1694         Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture
1695         https://bugs.webkit.org/show_bug.cgi?id=111959
1696
1697         Reviewed by Alexey Proskuryakov.
1698
1699         The rationale is that the UserGestureIndicator will increase the number
1700         of consumable user gestures when it's invoked with what is now
1701         DefinitelyProcessingNewUserGesture.
1702
1703         In a follow-up change I will reintroduce DefinitelyProcessingUserGesture
1704         which will only increase the consumable user gesture count if we are
1705         not already processing a user gesture.
1706
1707         No new tests, no change in functionality.
1708
1709         * accessibility/AccessibilityNodeObject.cpp:
1710         (WebCore::AccessibilityNodeObject::increment):
1711         (WebCore::AccessibilityNodeObject::decrement):
1712         * accessibility/AccessibilityObject.cpp:
1713         (WebCore::AccessibilityObject::press):
1714         * bindings/ScriptControllerBase.cpp:
1715         (WebCore::ScriptController::executeScript):
1716         * bindings/js/ScriptController.cpp:
1717         (WebCore::ScriptController::executeScriptInWorld):
1718         * bindings/v8/NPV8Object.cpp:
1719         (_NPN_EvaluateHelper):
1720         * dom/UserGestureIndicator.cpp:
1721         (WebCore::isDefinite):
1722         (WebCore::UserGestureIndicator::UserGestureIndicator):
1723         (WebCore::UserGestureIndicator::processingUserGesture):
1724         * dom/UserGestureIndicator.h:
1725         * inspector/InspectorFrontendClientLocal.cpp:
1726         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1727         * inspector/InspectorFrontendHost.cpp:
1728         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
1729         * inspector/InspectorPageAgent.cpp:
1730         (WebCore::InspectorPageAgent::navigate):
1731         * loader/NavigationScheduler.cpp:
1732         (WebCore::ScheduledURLNavigation::fire):
1733         (WebCore::ScheduledURLNavigation::didStartTimer):
1734         (WebCore::ScheduledRedirect::fire):
1735         (WebCore::ScheduledRefresh::fire):
1736         (WebCore::ScheduledHistoryNavigation::fire):
1737         (WebCore::ScheduledFormSubmission::fire):
1738         (WebCore::ScheduledFormSubmission::didStartTimer):
1739         * page/EventHandler.cpp:
1740         (WebCore::EventHandler::handleMousePressEvent):
1741         (WebCore::EventHandler::handleMouseDoubleClickEvent):
1742         (WebCore::EventHandler::handleMouseReleaseEvent):
1743         (WebCore::EventHandler::keyEvent):
1744         (WebCore::EventHandler::handleTouchEvent):
1745         * platform/chromium/PopupContainer.cpp:
1746         (WebCore::PopupContainer::handleMouseDownEvent):
1747         (WebCore::PopupContainer::handleMouseMoveEvent):
1748         (WebCore::PopupContainer::handleMouseReleaseEvent):
1749         (WebCore::PopupContainer::handleWheelEvent):
1750         (WebCore::PopupContainer::handleKeyEvent):
1751
1752 2013-03-11  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1753
1754         Ruby text is incorrectly positioned when its writing-mode is changed to vertical after layout is done
1755         https://bugs.webkit.org/show_bug.cgi?id=96592
1756
1757         Reviewed by Hajime Morrita.
1758
1759         Fixed logical left of RenderRubyText is not cleared.
1760
1761         This causes trouble when RenderRubyTest is laid out vertically after horizontally.
1762         Horizontal layout set logical top(== y).
1763         Vertical layout don't set logical left(== y).
1764         RenderRubyText::y remain old one.
1765         We clear old RenderRubyText::y at the first part of layout().
1766
1767         Test: fast/writing-mode/ruby-text-logical-left.html
1768
1769         * rendering/RenderRubyRun.cpp:
1770         (WebCore::RenderRubyRun::layout): Reset logicalLeft not to reuse old one.
1771
1772 2013-03-11  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
1773
1774         [css3-text] Add partial parsing support for text-underline-position property from CSS3 Text
1775         https://bugs.webkit.org/show_bug.cgi?id=102491
1776
1777         Reviewed by Julien Chaffraix.
1778
1779         This patch extends the existing parsing to support 'auto', 'alphabetic' and 'under'. We don't fully match
1780         the specification as we don't support [ left | right ] and this is left for another implementation
1781         as the rendering will need to be added.
1782
1783         Test: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position.html
1784
1785         * css/CSSComputedStyleDeclaration.cpp:
1786         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1787         * css/CSSParser.cpp:
1788         (WebCore::CSSParser::parseValue):
1789         (WebCore::CSSParser::parseTextUnderlinePosition):
1790         * css/CSSParser.h:
1791         * css/CSSPrimitiveValueMappings.h:
1792         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1793         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
1794         * css/CSSProperty.cpp:
1795         (WebCore::CSSProperty::isInheritedProperty):
1796         Added parsing-related checks for text-underline-position property.
1797         * css/CSSPropertyNames.in: Added '-webkit-underline-position' property.
1798         * css/CSSValueKeywords.in:
1799         * css/SVGCSSValueKeywords.in:
1800         * css/StyleBuilder.cpp:
1801         (ApplyPropertyTextUnderlinePosition):
1802         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
1803         (WebCore::ApplyPropertyTextUnderlinePosition::createHandler):
1804         (WebCore::StyleBuilder::StyleBuilder):
1805         Set property handler for text-underline-position.
1806         * css/StyleResolver.cpp:
1807         (WebCore::StyleResolver::applyProperty):
1808         * rendering/style/RenderStyle.h:
1809         * rendering/style/RenderStyleConstants.h:
1810         * rendering/style/StyleRareInheritedData.cpp:
1811         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1812         (WebCore::StyleRareInheritedData::operator==):
1813         Added support for m_textUnderlinePosition on copy constructor and operator
1814         assignment functions.
1815         * rendering/style/StyleRareInheritedData.h:
1816         (StyleRareInheritedData): Added m_textUnderlinePosition here as it won't be used regularly.
1817
1818 2013-03-11  Christian Biesinger  <cbiesinger@chromium.org>
1819
1820         Hit testing should use ancestorInThisScope to get the non-shadow ancestor
1821         https://bugs.webkit.org/show_bug.cgi?id=112068
1822
1823         Reviewed by Dimitri Glazkov.
1824
1825         Tests: media/nodesFromRect-shadowContent.html
1826
1827         * rendering/HitTestResult.cpp:
1828         (WebCore::HitTestResult::setToNonShadowAncestor):
1829         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1830         Use ancestorInThisScope which is not deprecated and which produces
1831         correct results for nested shadow trees (e.g. in case of <video>,
1832         which contains <input> elements for the controls, which themselves
1833         have shadow trees)
1834
1835 2013-03-11  Abhishek Arya  <inferno@chromium.org>
1836
1837         Replace static_cast with to* helper functions.
1838         https://bugs.webkit.org/show_bug.cgi?id=112045
1839
1840         Reviewed by Eric Seidel.
1841
1842         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1843         (WebCore::V8HTMLOptionsCollection::removeMethodCustom):
1844         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
1845         * bindings/v8/custom/V8NamedNodesCollection.cpp:
1846         (WebCore::V8NamedNodesCollection::namedItem):
1847         * bindings/v8/custom/V8NodeCustom.cpp:
1848         (WebCore::wrap):
1849         * editing/BreakBlockquoteCommand.cpp:
1850         (WebCore::BreakBlockquoteCommand::doApply):
1851         * editing/CompositeEditCommand.cpp:
1852         (WebCore::CompositeEditCommand::insertNodeAt):
1853         (WebCore::CompositeEditCommand::pushAnchorElementDown):
1854         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
1855         (WebCore::CompositeEditCommand::splitTreeToNode):
1856         * editing/InsertParagraphSeparatorCommand.cpp:
1857         (WebCore::InsertParagraphSeparatorCommand::doApply):
1858         * loader/archive/cf/LegacyWebArchive.cpp:
1859         (WebCore::LegacyWebArchive::create):
1860         * platform/chromium/PasteboardChromium.cpp:
1861         (WebCore::Pasteboard::writeImage):
1862         * platform/mac/HTMLConverter.mm:
1863         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1864         * rendering/RenderLayerBacking.cpp:
1865         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1866         * rendering/RenderLayerCompositor.cpp:
1867         (WebCore::RenderLayerCompositor::frameContentsCompositor):
1868         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
1869         * rendering/RenderSnapshottedPlugIn.cpp:
1870         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
1871         * rendering/mathml/RenderMathMLOperator.cpp:
1872         (WebCore::RenderMathMLOperator::updateFromElement):
1873         * rendering/svg/RenderSVGResourceContainer.cpp:
1874         (WebCore::RenderSVGResourceContainer::idChanged):
1875
1876 2013-03-11  James Robinson  <jamesr@chromium.org>
1877
1878         [chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs
1879         https://bugs.webkit.org/show_bug.cgi?id=111791
1880
1881         Reviewed by Adrienne Walker.
1882
1883         Adds a new utility function to convert a TransformationMatrix to an SkMatrix44 and
1884         uses it in AnimationTranslationUtil and GraphicsLayerChromium.
1885
1886         * WebCore.gypi:
1887         * platform/chromium/support/WebTransformationMatrix.cpp:
1888         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
1889         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
1890         (WebCore::toWebTransformOperations):
1891         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1892         (WebCore::GraphicsLayerChromium::updateTransform):
1893         (WebCore::GraphicsLayerChromium::updateChildrenTransform):
1894         * platform/graphics/chromium/TransformSkMatrix44Conversions.cpp:
1895         (WebCore::TransformSkMatrix44Conversions::convert):
1896         * platform/graphics/chromium/TransformSkMatrix44Conversions.h:
1897         (TransformSkMatrix44Conversions):
1898
1899 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1900
1901         Unreviewed, rolling out r145435.
1902         http://trac.webkit.org/changeset/145435
1903         https://bugs.webkit.org/show_bug.cgi?id=112082
1904
1905         Still does not compile (Requested by jamesr on #webkit).
1906
1907         * Modules/indexeddb/IDBBackingStore.cpp:
1908         (WebCore::IDBBackingStore::getObjectStores):
1909         (WebCore::IDBBackingStore::createObjectStore):
1910         (WebCore::IDBBackingStore::deleteObjectStore):
1911         (WebCore::IDBBackingStore::getRecord):
1912         (WebCore::IDBBackingStore::putRecord):
1913         (WebCore::IDBBackingStore::clearObjectStore):
1914         (WebCore::IDBBackingStore::deleteRecord):
1915         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
1916         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
1917         (WebCore::IDBBackingStore::keyExistsInObjectStore):
1918         (WebCore::IDBBackingStore::getIndexes):
1919         (WebCore::IDBBackingStore::createIndex):
1920         (WebCore::IDBBackingStore::deleteIndex):
1921         (WebCore::IDBBackingStore::putIndexDataForRecord):
1922         (WebCore::IDBBackingStore::findKeyInIndex):
1923         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
1924         (WebCore::IDBBackingStore::keyExistsInIndex):
1925         (WebCore::indexCursorOptions):
1926         * Modules/indexeddb/IDBBackingStore.h:
1927         (IDBBackingStore):
1928         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1929         (WebCore::DeleteIndexOperation::create):
1930         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
1931         (DeleteIndexOperation):
1932         (WebCore::IDBDatabaseBackendImpl::openInternal):
1933         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
1934         (WebCore::DeleteIndexOperation::perform):
1935         (WebCore::DeleteRangeOperation::perform):
1936         (WebCore::ClearOperation::perform):
1937         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1938         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
1939         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
1940         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
1941         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
1942         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
1943         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
1944         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
1945         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
1946         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
1947         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
1948         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
1949         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
1950         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
1951         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
1952         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
1953         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
1954         * Modules/indexeddb/IDBLevelDBCoding.h:
1955         (IDBLevelDBCoding):
1956         (KeyPrefix):
1957         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1958         (WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):
1959
1960 2013-03-11  Alec Flett  <alecflett@chromium.org>
1961
1962         IndexedDB: Protect against key prefix overflows
1963         https://bugs.webkit.org/show_bug.cgi?id=111138
1964
1965         Reviewed by Tony Chang.
1966
1967         This reworks the boundary checking for all databaseId,
1968         objectStoreId, and indexId, including negative and
1969         zero-based ids. All entrypoints into IDBLevelDBCoding
1970         are protected with explicit checks and all internal
1971         uses of KeyPrefix are protected with ASSERTs in the
1972         various constructors.
1973
1974         Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium
1975
1976         * Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
1977         * Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.
1978
1979 2013-03-11  Philip Rogers  <pdr@google.com>
1980
1981         Replace static_cast<SVGStyledElement> with toSVGStyledElement()
1982         https://bugs.webkit.org/show_bug.cgi?id=111651
1983
1984         Reviewed by Abhishek Arya.
1985
1986         toSVGStyledElement is preferred over static_cast<SVGStyledElement*> because bad casts
1987         can be caught on our testing infrastructure. This patch replaces all
1988         static_cast<SVGStyledElement> instances with toSVGStyledElement.
1989
1990         Additionally, this patch renames SVGElement::isStyled to SVGElement::isSVGStyledElement to
1991         remove a confusing overlap with html styled elements. This name differs slighly from the
1992         other is*() functions in SVGElement but this will be resolved up with webkit.org/b/107386.
1993
1994         No new tests as this is covered with existing tests.
1995
1996         * rendering/svg/RenderSVGModelObject.cpp:
1997         (WebCore::getElementCTM):
1998         * rendering/svg/RenderSVGResourceClipper.cpp:
1999         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2000         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
2001         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2002         * rendering/svg/RenderSVGResourceMasker.cpp:
2003         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2004         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
2005         * rendering/svg/RenderSVGResourcePattern.cpp:
2006         (WebCore::RenderSVGResourcePattern::createTileImage):
2007         * rendering/svg/SVGRenderSupport.cpp:
2008         (WebCore::SVGRenderSupport::layoutChildren):
2009         * rendering/svg/SVGResources.cpp:
2010         (WebCore::registerPendingResource):
2011         * svg/SVGAnimationElement.cpp:
2012         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
2013         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
2014         (WebCore::SVGAnimationElement::adjustForInheritance):
2015         (WebCore::inheritsFromProperty):
2016         * svg/SVGElement.cpp:
2017         (WebCore::collectInstancesForSVGElement):
2018         (WebCore::SVGElement::isAnimatableAttribute):
2019         * svg/SVGElement.h:
2020         (WebCore::SVGElement::isSVGStyledElement):
2021         * svg/SVGElementInstance.cpp:
2022         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
2023         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
2024         * svg/SVGLocatable.cpp:
2025         (WebCore::SVGLocatable::computeCTM):
2026         * svg/SVGStyledElement.cpp:
2027         (WebCore::SVGStyledElement::updateRelativeLengthsInformation):
2028         * svg/SVGStyledElement.h:
2029         (WebCore::SVGStyledElement::isSVGStyledElement):
2030         * svg/SVGUseElement.cpp:
2031         (WebCore::SVGUseElement::selfHasRelativeLengths):
2032         * svg/graphics/filters/SVGFEImage.cpp:
2033         (WebCore::FEImage::platformApplySoftware):
2034
2035 2013-03-11  Tim Horton  <timothy_horton@apple.com>
2036
2037         PDFPlugin: Make scrolling between pages in non-continuous modes work
2038         https://bugs.webkit.org/show_bug.cgi?id=111415
2039         <rdar://problem/12555320>
2040
2041         Reviewed by Alexey Proskuryakov.
2042
2043         * WebCore.exp.in: Export ScrollableArea::scrollToOffsetWithoutAnimation.
2044
2045 2013-03-11  Mark Lam  <mark.lam@apple.com>
2046
2047         Remove the use of the quotaMap cache in DatabaseTracker.
2048         https://bugs.webkit.org/show_bug.cgi?id=111805.
2049
2050         Reviewed by Geoffrey Garen.
2051
2052         This change is needed because using the quotaMap cache can result in
2053         an inaccurate read (in a multi-process system) on what database files
2054         are actually present on the filesystem. Instead of using the quotaMap
2055         cache, we rely on the tracker database and query it every time we need
2056         the origin/quota information.
2057
2058         No new tests.
2059
2060         * Modules/webdatabase/DatabaseTracker.cpp:
2061         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
2062         (WebCore::DatabaseTracker::hasEntryForOriginNoLock):
2063         (WebCore::DatabaseTracker::origins):
2064         (WebCore::DatabaseTracker::quotaForOriginNoLock):
2065         (WebCore::DatabaseTracker::setQuota):
2066         (WebCore::DatabaseTracker::addDatabase):
2067         (WebCore::DatabaseTracker::deleteOrigin):
2068         * Modules/webdatabase/DatabaseTracker.h:
2069
2070 2013-03-11  Morten Stenshorne  <mstensho@opera.com>
2071
2072         Don't rely on the fact that StaticPosition happens to be defined as 0
2073         https://bugs.webkit.org/show_bug.cgi?id=110123
2074
2075         Also made the expression slightly less convoluted.
2076
2077         Reviewed by Alexey Proskuryakov.
2078
2079         No new tests. This is just code cleanup.
2080
2081         * rendering/RenderObject.cpp:
2082         (WebCore::RenderObject::containingBlock):
2083
2084 2013-03-11  Adam Barth  <abarth@webkit.org>
2085
2086         Unreviewed attempt to fix build after http://trac.webkit.org/changeset/145421.
2087
2088         * html/HTMLPlugInImageElement.cpp:
2089
2090 2013-03-05  Ojan Vafai  <ojan@chromium.org>
2091
2092         Intrinsic width keyword values don't work for tables
2093         https://bugs.webkit.org/show_bug.cgi?id=111515
2094
2095         Reviewed by Julien Chaffraix.
2096
2097         Tests: fast/css-intrinsic-dimensions/css-tables.html
2098                fast/css-intrinsic-dimensions/tables.html
2099
2100         * rendering/RenderBox.cpp:
2101         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
2102         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2103         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2104         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2105         * rendering/RenderBox.h:
2106         Pass in the border and padding as an argument since RenderTable needs
2107         to pass in a different value. Unfortunately, the math doesn't work out right
2108         in the positioned/replaced cases if we just pass 0. We need to pass in the correct
2109         border and padding and then subtract it from the result.
2110
2111         * rendering/RenderTable.cpp:
2112         (WebCore::RenderTable::updateLogicalWidth):
2113         Compute intrinsic widths as well as specified ones. Down the road
2114         we may want to consider having intrinsic width values return true for
2115         isSpecified.
2116
2117         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
2118         Compute intrinsic widths as well.
2119
2120         (WebCore::RenderTable::computeIntrinsicLogicalWidths):
2121         Implement this method so that the RenderBox::computeIntrinsicLogicalWidthUsing
2122         gets the right intrinsic values instead of the preferred values.
2123
2124         (WebCore::RenderTable::computePreferredLogicalWidths):
2125         * rendering/RenderTable.h:
2126
2127 2013-03-11  Stephen Chenney  <schenney@chromium.org>
2128
2129         HTMLInputElement can delete an ImageLoader while it's still needed
2130         https://bugs.webkit.org/show_bug.cgi?id=110621
2131
2132         Reviewed by Darin Adler.
2133
2134         ImageLoader objects may fire events for HTMLInputElements that are of
2135         type ImageInputType that own the loader. These events may cause script
2136         to run that changes the type of the input element and hence causes the
2137         ImageLoader to be deleted, while the image loader is still processing
2138         the event dispatch. Bad things ensue.
2139
2140         This change moves ownership of the ImageLoader from the ImageInputType
2141         onto the HTMLImageElement which is already protected from deletion during
2142         event processing.
2143
2144         Test: fast/forms/image/image-error-event-modifies-type-crash.html
2145
2146         * html/HTMLInputElement.cpp:
2147         (WebCore::HTMLInputElement::imageLoader): Method to return the
2148           ImageLoader, creating it if not already created.
2149         * html/HTMLInputElement.h:
2150         (WebCore::HTMLInputElement::hasImageLoader): Return true if the
2151           ImageLoader has been created.
2152         (HTMLInputElement): Define ImageLoader access methods and the OwnPtr
2153           for the HTMLImageLoader.
2154         * html/ImageInputType.cpp:
2155         (WebCore::ImageInputType::srcAttributeChanged): Use the element's ImageLoader.
2156         (WebCore::ImageInputType::attach): Use the element's ImageLoader.
2157         (WebCore::ImageInputType::willMoveToNewOwnerDocument): Use the element's ImageLoader.
2158         (WebCore::ImageInputType::height): Use the element's ImageLoader.
2159         (WebCore::ImageInputType::width): Use the element's ImageLoader.
2160         * html/ImageInputType.h:
2161         (ImageInputType): Remove the declaration of the ImageLoader.
2162
2163 2013-03-11  Alok Priyadarshi  <alokp@chromium.org>
2164
2165         Revert "Mark GraphicsLayers as opaque when possible"
2166
2167         This reverts commit 0a4d3c2d8a0373aa9e5bd9209885137a13a7f0e0.
2168
2169         REGRESSION (r143626): http://chainlove.com shows garbage tiles on Mac
2170         https://bugs.webkit.org/show_bug.cgi?id=112043
2171
2172         Unreviewed, rolling out r143626.
2173
2174         * rendering/RenderBox.cpp:
2175         * rendering/RenderBox.h:
2176         (RenderBox):
2177         * rendering/RenderBoxModelObject.h:
2178         (RenderBoxModelObject):
2179         * rendering/RenderLayer.cpp:
2180         * rendering/RenderLayer.h:
2181         (RenderLayer):
2182         * rendering/RenderLayerBacking.cpp:
2183         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2184         * rendering/RenderLayerModelObject.h:
2185         (RenderLayerModelObject):
2186
2187 2013-03-11  Dean Jackson  <dino@apple.com>
2188
2189         Plugins created during user gestures (or soon after) should not be snapshotted
2190         https://bugs.webkit.org/show_bug.cgi?id=111975
2191
2192         Reviewed by Tim Horton.
2193
2194         There are sites which create plugins in response to user actions, such as clicking
2195         on an image that is acting like a poster frame. In those cases we should never snapshot.
2196
2197         There are some other sites which also create plugins in response to user actions,
2198         but don't necessarily create the content themselves. Instead they run some script
2199         that injects an iframe, and the frame loads a plugin. In order to make sure we don't
2200         snapshot in those cases, we're adding the concept of a blessed plugin. Anything that
2201         is created soon after a *handled* user gesture is not snapshotted. To do this we
2202         mark a timestamp in the document when we've called an event listener for a user
2203         gesture. The plugin element then compares its creation time with the most recent
2204         user action time.
2205
2206         * dom/Document.cpp:
2207         (WebCore::Document::Document): Initialise new timestamp.
2208         (WebCore::Document::resetLastHandledUserGestureTimestamp): Sets the member variable
2209             to the current time.
2210         * dom/Document.h:
2211         (WebCore::Document::lastHandledUserGestureTimestamp): Getter.
2212
2213         * dom/EventTarget.cpp:
2214         (WebCore::EventTarget::fireEventListeners): If there were some event listeners and
2215             we were processing a user gesture, then reset the timestamp in the document.
2216
2217         * html/HTMLPlugInImageElement.cpp:
2218         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remember if we were created
2219             during a user gesture.
2220         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Start the plugin
2221             if we were created during a user gesture, or if we are close enough in time
2222             to a listener that fired in relation to a user gesture.
2223         * html/HTMLPlugInImageElement.h: New private member flag indicating if we were
2224             in a user gesture when constructed.
2225
2226 2013-03-11  Jeffrey Pfau  <jpfau@apple.com>
2227
2228         List cache partitions as units instead of as their contents
2229         https://bugs.webkit.org/show_bug.cgi?id=111909
2230
2231         Reviewed by Maciej Stachowiak.
2232
2233         Not possible to test with current automated test tools, must be tested manually.
2234
2235         * loader/cache/MemoryCache.cpp:
2236         (WebCore::MemoryCache::getOriginsWithCache): List a cache item as a member of a partition, if possible
2237
2238 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
2239
2240         Chromium build fix. Forked files strike again.
2241
2242         * platform/network/chromium/ResourceHandle.cpp:
2243         (WebCore::ResourceHandle::firstRequest):
2244
2245 2013-03-11  James Robinson  <jamesr@chromium.org>
2246
2247         Fix typo from r145399. Rubber stamped by Abhishek Arya.
2248
2249         * rendering/svg/RenderSVGViewportContainer.h:
2250         (WebCore::toRenderSVGViewportContainer):
2251
2252 2013-03-11  Hans Muller  <hmuller@adobe.com>
2253
2254         [CSS Exclusions] Refactor the ExclusionPolygon class to enable storing multiple boundaries
2255         https://bugs.webkit.org/show_bug.cgi?id=111766
2256
2257         Reviewed by Dirk Schulze.
2258
2259         Refactored the ExclusionPolygon class to enable adding support for shape-margin and shape-padding.
2260         Extracted a new FloatPolygon class which is now used by ExclusionPolygon to represent the shape's
2261         boundary. It will be used to add m_paddedPolygon and m_marginPolygon members to ExclusionPolygon
2262         in a subsequent patch.
2263
2264         No new tests. This is strictly a refactoring of the existing code.
2265
2266         * CMakeLists.txt:
2267         * GNUmakefile.list.am:
2268         * WebCore.gypi:
2269         * WebCore.vcproj/WebCore.vcproj:
2270         * WebCore.xcodeproj/project.pbxproj:
2271         * platform/graphics/FloatPolygon.cpp: Factored out of Source/WebCore/rendering/ExclusionPolygon.cpp.
2272         (WebCore::determinant):
2273         (WebCore::areCollinearPoints):
2274         (WebCore::areCoincidentPoints):
2275         (WebCore::isPointOnLineSegment):
2276         (WebCore::nextVertexIndex):
2277         (WebCore::FloatPolygon::FloatPolygon):
2278         (WebCore::FloatPolygon::findNextEdgeVertexIndex):
2279         (WebCore::FloatPolygon::overlappingEdges):
2280         (WebCore::leftSide):
2281         (WebCore::FloatPolygon::contains):
2282         (WebCore::VertexPair::overlapsRect):
2283         (WebCore::VertexPair::intersection):
2284         * platform/graphics/FloatPolygon.h: Factored out of Source/WebCore/rendering/ExclusionPolygon.h.
2285         (FloatPolygon):
2286         (WebCore::FloatPolygon::vertexAt):
2287         (WebCore::FloatPolygon::numberOfVertices):
2288         (WebCore::FloatPolygon::fillRule):
2289         (WebCore::FloatPolygon::edgeAt):
2290         (WebCore::FloatPolygon::numberOfEdges):
2291         (WebCore::FloatPolygon::boundingBox):
2292         (WebCore::FloatPolygon::isEmpty):
2293         (VertexPair):
2294         (WebCore::VertexPair::~VertexPair):
2295         (WebCore::VertexPair::minX):
2296         (WebCore::VertexPair::minY):
2297         (WebCore::VertexPair::maxX):
2298         (WebCore::VertexPair::maxY):
2299         (FloatPolygonEdge):
2300         (WebCore::FloatPolygonEdge::previousEdge):
2301         (WebCore::FloatPolygonEdge::nextEdge):
2302         (WebCore::FloatPolygonEdge::polygon):
2303         (WebCore::FloatPolygonEdge::vertexIndex1):
2304         (WebCore::FloatPolygonEdge::vertexIndex2):
2305         (WebCore::FloatPolygonEdge::edgeIndex):
2306         * rendering/ExclusionPolygon.cpp: Now depends on FloatPolygon.
2307         (EdgeIntersection):
2308         (WebCore::leftSide):
2309         (WebCore::computeXIntersection):
2310         (WebCore::getVertexIntersectionVertices):
2311         (WebCore::computeXIntersections):
2312         (WebCore::computeOverlappingEdgeXProjections):
2313         (WebCore::ExclusionPolygon::getExcludedIntervals):
2314         (WebCore::ExclusionPolygon::getIncludedIntervals):
2315         (WebCore::firstFitRectInPolygon):
2316         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop):
2317         * rendering/ExclusionPolygon.h: Now depends on FloatPolygon.
2318         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
2319         (ExclusionPolygon):
2320         (WebCore::ExclusionPolygon::ExclusionPolygon):
2321
2322 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
2323
2324         Roll out part of r144671.
2325
2326         ResourceHandle::firstRequest() should not be const(), because it returns a
2327         non-const reference.        
2328
2329         * platform/network/ResourceHandle.cpp:
2330         (WebCore::ResourceHandle::firstRequest):
2331         * platform/network/ResourceHandle.h:
2332
2333 2013-01-30  Jer Noble  <jer.noble@apple.com>
2334
2335         Mac: Cmd-w should close full screen window.
2336         https://bugs.webkit.org/show_bug.cgi?id=108406
2337
2338         Reviewed by Darin Adler.
2339
2340         Pass performClose: requests on to the owning window controller.
2341
2342         * platform/mac/WebCoreFullScreenWindow.mm:
2343         (-[WebCoreFullScreenWindow performClose:]):
2344
2345 2013-03-11  Xiyuan Xia  <xiyuan@chromium.org>
2346
2347         [Chromium] chromium/linux breaks expectation of select popup background due to bad UA css rules
2348         https://bugs.webkit.org/show_bug.cgi?id=111873
2349
2350         Reviewed by Tony Chang.
2351
2352         On linux the default <select> background color is too dark to use as the
2353         popup background color.  Last fixes:
2354         https://bugs.webkit.org/show_bug.cgi?id=54115 and
2355         https://bugs.webkit.org/show_bug.cgi?id=56023
2356         attempt to fix the problem by applying a lighter background using
2357         special <option> selector. This breaks expectations of some websites.
2358
2359         This CL reverts the bad UA css rules above and provides the lighter
2360         background color if <select> and <option> elements are using the default
2361         background.
2362
2363         No new tests, this tests <select> popups and can be verified by ManualTests/select-scroll.html.
2364
2365         * css/themeChromiumLinux.css:
2366         (select):
2367         * platform/PopupMenuStyle.h:
2368         (WebCore::PopupMenuStyle::PopupMenuStyle):
2369         (WebCore::PopupMenuStyle::backgroundColorType):
2370         (PopupMenuStyle):
2371         * platform/chromium/PopupListBox.cpp:
2372         (WebCore::PopupListBox::paintRow):
2373         * rendering/RenderMenuList.cpp:
2374         (WebCore::RenderMenuList::itemStyle):
2375         (WebCore::RenderMenuList::getItemBackgroundColor):
2376         * rendering/RenderMenuList.h:
2377         (RenderMenuList):
2378         * rendering/RenderSearchField.cpp:
2379         (WebCore::RenderSearchField::menuStyle):
2380         * rendering/RenderThemeChromiumDefault.cpp:
2381         (WebCore::RenderThemeChromiumDefault::systemColor):
2382
2383 2013-03-11  James Robinson  <jamesr@chromium.org>
2384
2385         Compile fix. Rubber-stamp by Eric Seidel.
2386
2387         * html/shadow/MediaControlElements.cpp:
2388         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2389
2390 2013-03-11  Dima Gorbik  <dgorbik@apple.com>
2391
2392         Fix build for r145397 (part 2)
2393
2394         Unreviewed.
2395
2396         * html/track/TextTrackCue.cpp:
2397         (WebCore::TextTrackCue::getDisplayTree):
2398
2399 2013-03-11  Dima Gorbik  <dgorbik@apple.com>
2400
2401         Fix build for r145397
2402
2403         Unreviewed.
2404
2405         * html/shadow/MediaControls.cpp:
2406         (WebCore::MediaControls::createTextTrackDisplay):
2407         * html/shadow/MediaControlsChromium.cpp:
2408         (WebCore::MediaControlsChromium::createTextTrackDisplay):
2409         * html/shadow/MediaControlsGtk.cpp:
2410         (WebCore::MediaControlsGtk::createTextTrackDisplay):
2411
2412 2013-03-11  Abhishek Arya  <inferno@chromium.org>
2413
2414         Add ASSERT_WITH_SECURITY_IMPLICATION to catch bad casts.
2415         https://bugs.webkit.org/show_bug.cgi?id=112060
2416
2417         Reviewed by Eric Seidel.
2418
2419         * Modules/geolocation/Geolocation.cpp:
2420         (WebCore::Geolocation::document):
2421         * accessibility/AccessibilityMenuList.h:
2422         (WebCore::toAccessibilityMenuList):
2423         * accessibility/AccessibilityNodeObject.h:
2424         (WebCore::toAccessibilityNodeObject):
2425         * accessibility/AccessibilityRenderObject.h:
2426         (WebCore::toAccessibilityRenderObject):
2427         * accessibility/AccessibilitySVGRoot.h:
2428         (WebCore::toAccessibilitySVGRoot):
2429         * accessibility/AccessibilitySpinButton.h:
2430         (WebCore::toAccessibilitySpinButton):
2431         (WebCore::toAccessibilitySpinButtonPart):
2432         * accessibility/AccessibilityTable.h:
2433         (WebCore::toAccessibilityTable):
2434         * css/StyleRule.h:
2435         (WebCore::toStyleRuleMedia):
2436         (WebCore::toStyleRuleSupports):
2437         (WebCore::toStyleRuleRegion):
2438         * dom/EventContext.h:
2439         (WebCore::toTouchEventContext):
2440         * fileapi/File.h:
2441         (WebCore::toFile):
2442         * html/HTMLElement.cpp:
2443         (WebCore::HTMLElement::insertAdjacentElement):
2444         (WebCore::contextElementForInsertion):
2445         * html/HTMLMediaElement.h:
2446         (WebCore::toMediaElement):
2447         * html/HTMLMeterElement.h:
2448         (WebCore::toHTMLMeterElement):
2449         * html/HTMLOptionElement.cpp:
2450         (WebCore::toHTMLOptionElement):
2451         * html/HTMLProgressElement.cpp:
2452         (WebCore::HTMLProgressElement::renderProgress):
2453         * html/HTMLProgressElement.h:
2454         (WebCore::toHTMLProgressElement):
2455         * html/HTMLSelectElement.h:
2456         (WebCore::toHTMLSelectElement):
2457         * html/HTMLTableCellElement.cpp:
2458         (WebCore::toHTMLTableCellElement):
2459         * html/HTMLTextFormControlElement.h:
2460         (WebCore::toHTMLTextFormControlElement):
2461         * html/PluginDocument.h:
2462         (WebCore::toPluginDocument):
2463         * html/shadow/DetailsMarkerControl.cpp:
2464         (WebCore::DetailsMarkerControl::summaryElement):
2465         * html/shadow/HTMLContentElement.h:
2466         (WebCore::toHTMLContentElement):
2467         * html/shadow/HTMLShadowElement.h:
2468         (WebCore::toHTMLShadowElement):
2469         * html/shadow/TextFieldDecorationElement.cpp:
2470         (WebCore::TextFieldDecorationElement::hostInput):
2471         * page/DOMWindow.cpp:
2472         (WebCore::DOMWindow::document):
2473         * rendering/InlineTextBox.h:
2474         (WebCore::toInlineTextBox):
2475         * rendering/RenderHTMLCanvas.h:
2476         (WebCore::toRenderHTMLCanvas):
2477         * rendering/RenderScrollbar.h:
2478         (WebCore::toRenderScrollbar):
2479         * rendering/RenderTextFragment.h:
2480         (WebCore::toRenderTextFragment):
2481         * rendering/mathml/RenderMathMLOperator.h:
2482         (WebCore::toRenderMathMLOperator):
2483         * rendering/svg/RenderSVGTextPath.h:
2484         (WebCore::toRenderSVGTextPath):
2485         * rendering/svg/RenderSVGViewportContainer.h:
2486         (WebCore::toRenderSVGViewportContainer):
2487         * svg/graphics/SVGImageChromeClient.h:
2488         (WebCore::toSVGImageChromeClient):
2489
2490 2013-03-11  Adam Barth  <abarth@webkit.org>
2491
2492         Factor HTMLTreeBuilderSimulator out of BackgroundHTMLParser
2493         https://bugs.webkit.org/show_bug.cgi?id=112057
2494
2495         Reviewed by Eric Seidel.
2496
2497         Simulating the HTML tree builder is a separate concern from parsing on
2498         the background thread. We plan to re-use the tree builder simulator for
2499         the view-source parser, for example. Also, having the simulator as a
2500         separate object will make it easier to fix
2501         https://bugs.webkit.org/show_bug.cgi?id=109764.
2502
2503         * CMakeLists.txt:
2504         * GNUmakefile.list.am:
2505         * Target.pri:
2506         * WebCore.gypi:
2507         * WebCore.vcproj/WebCore.vcproj:
2508         * html/parser/BackgroundHTMLParser.cpp:
2509         (WebCore):
2510         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
2511         (WebCore::BackgroundHTMLParser::pumpTokenizer):
2512         * html/parser/BackgroundHTMLParser.h:
2513         (BackgroundHTMLParser):
2514
2515 2013-02-26  Dima Gorbik  <dgorbik@apple.com>
2516
2517         Not all properties apply to the '::cue' pseudo-element
2518         https://bugs.webkit.org/show_bug.cgi?id=110705
2519
2520         Reviewed by Eric Carlson.
2521
2522         Background properties are not inherited and they were not applied to right elements.
2523         Now we apply all ::cue properties to WebVTT cue background box, which -webkit-media-text-track-all-nodes
2524         container was corresponding to. Now it has 'cue' pseudoId instead of '-webkit-media-text-track-all-nodes'.
2525         Property filtering is turned off for user agent rules so that we are still able to apply filtered rules
2526         to this container internally. m_cueContainer is removed because it is no longer needed.
2527         m_allDocumentNodes container was renamed to m_cueBackgroundBox.
2528
2529         Existing tests modified to cover this case.
2530
2531         * css/RuleSet.h:
2532         (WebCore::RuleData::propertyWhitelistType): disable filtering for UA rules.
2533         * css/StyleResolver.cpp:
2534         (WebCore::StyleResolver::sortAndTransferMatchedRules): pass the UA scope to propertyWhitelistType().
2535         * css/mediaControls.css: rename -webkit-media-text-track-all-nodes to 'cue'
2536         (video::cue): 
2537         * html/shadow/MediaControlElements.cpp:
2538         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2539         * html/shadow/MediaControlElements.h:
2540         (MediaControlTextTrackContainerElement):
2541         * html/shadow/MediaControls.cpp:
2542         (WebCore::MediaControls::createTextTrackDisplay):
2543         * html/shadow/MediaControlsChromium.cpp:
2544         (WebCore::MediaControlsChromium::createTextTrackDisplay):
2545         * html/shadow/MediaControlsGtk.cpp:
2546         (WebCore::MediaControlsGtk::createTextTrackDisplay):
2547         * html/track/TextTrackCue.cpp:
2548         (WebCore::TextTrackCue::TextTrackCue):
2549         (WebCore::TextTrackCue::updateDisplayTree):
2550         (WebCore::TextTrackCue::getDisplayTree):
2551         * html/track/TextTrackCue.h:
2552         (WebCore::TextTrackCue::element):
2553         * page/CaptionUserPreferencesMac.mm:
2554         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride):
2555
2556 2013-03-11  Tim Horton  <timothy_horton@apple.com>
2557
2558         ChromeClient.h doesn’t need to include RenderSnapshottedPlugIn
2559         https://bugs.webkit.org/show_bug.cgi?id=111981
2560
2561         Reviewed by Kentaro Hara.
2562
2563         * page/ChromeClient.h: Remove the extraneous #include.
2564
2565 2013-03-11  David Hyatt  <hyatt@apple.com>
2566
2567         Vertical writing doesn't work with form controls.
2568         https://bugs.webkit.org/show_bug.cgi?id=70211
2569
2570         Reviewed by Simon Fraser.
2571
2572         This is just some basic plumbing work to make textfields and
2573         textareas work with vertical writing modes. This patch leaves the
2574         html.css override alone, so authors can't enable vertical
2575         writing yet.
2576         
2577         The changes consist of converting uses of x/y/width/height to
2578         logicalLeft/Top/Width/Height.
2579       
2580         * rendering/RenderBoxModelObject.h:
2581         (WebCore::RenderBoxModelObject::paddingLogicalLeft):
2582         (WebCore::RenderBoxModelObject::paddingLogicalRight):
2583         (RenderBoxModelObject):
2584         (WebCore::RenderBoxModelObject::marginLogicalHeight):
2585         (WebCore::RenderBoxModelObject::marginLogicalWidth):
2586         * rendering/RenderSearchField.cpp:
2587         (WebCore::RenderSearchField::computeControlLogicalHeight):
2588         (WebCore::RenderSearchField::computeLogicalHeightLimit):
2589         (WebCore::RenderSearchField::centerContainerIfNeeded):
2590         * rendering/RenderSearchField.h:
2591         (RenderSearchField):
2592         * rendering/RenderTextControl.cpp:
2593         (WebCore::RenderTextControl::textBlockLogicalHeight):
2594         (WebCore::RenderTextControl::textBlockLogicalWidth):
2595         (WebCore::RenderTextControl::computeLogicalHeight):
2596         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
2597         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2598         * rendering/RenderTextControl.h:
2599         (RenderTextControl):
2600         * rendering/RenderTextControlMultiLine.cpp:
2601         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
2602         (WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
2603         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
2604         * rendering/RenderTextControlMultiLine.h:
2605         (RenderTextControlMultiLine):
2606         * rendering/RenderTextControlSingleLine.cpp:
2607         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
2608         (WebCore::RenderTextControlSingleLine::paint):
2609         (WebCore::RenderTextControlSingleLine::computeLogicalHeightLimit):
2610         (WebCore::RenderTextControlSingleLine::layout):
2611         (WebCore::RenderTextControlSingleLine::styleDidChange):
2612         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
2613         (WebCore::RenderTextControlSingleLine::computeControlLogicalHeight):
2614         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
2615         * rendering/RenderTextControlSingleLine.h:
2616         (RenderTextControlSingleLine):
2617         * rendering/style/RenderStyle.h:
2618
2619 2013-03-11  Tim Horton  <timothy_horton@apple.com>
2620
2621         TiledBacking scrolling coverage can be unfairly limited for clients who do scrolling outside the web view
2622         https://bugs.webkit.org/show_bug.cgi?id=111958
2623         <rdar://problem/13356896>
2624
2625         Reviewed by Darin Adler.
2626
2627         Don't limit TiledBacking coverage if the client has opted into using
2628         its exposed rect to allow scrolling above the web view.
2629
2630         * platform/graphics/TiledBacking.h:
2631         * platform/graphics/ca/mac/TileController.h:
2632         * rendering/RenderLayerBacking.cpp:
2633         (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
2634
2635 2013-03-11  Rajeev Sarvaria  <rsarvaria@blackberry.com>
2636
2637         GetnUniform*vEXT (Robustness extension) passed incorrect parameter in WebGLRenderingContext
2638         https://bugs.webkit.org/show_bug.cgi?id=111450
2639
2640         Reviewed by Rob Buis.
2641
2642         Bufsize argument corrected to size in bytes instead of number of integers or floats.
2643
2644         * html/canvas/WebGLRenderingContext.cpp:
2645         (WebCore):
2646         (WebCore::WebGLRenderingContext::getUniform):
2647
2648 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2649
2650         Unreviewed, rolling out r145375.
2651         http://trac.webkit.org/changeset/145375
2652         https://bugs.webkit.org/show_bug.cgi?id=112050
2653
2654         Does not compile (Requested by jamesr on #webkit).
2655
2656         * Modules/indexeddb/IDBBackingStore.cpp:
2657         (WebCore::IDBBackingStore::getObjectStores):
2658         (WebCore::IDBBackingStore::createObjectStore):
2659         (WebCore::IDBBackingStore::deleteObjectStore):
2660         (WebCore::IDBBackingStore::getRecord):
2661         (WebCore::IDBBackingStore::putRecord):
2662         (WebCore::IDBBackingStore::clearObjectStore):
2663         (WebCore::IDBBackingStore::deleteRecord):
2664         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
2665         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
2666         (WebCore::IDBBackingStore::keyExistsInObjectStore):
2667         (WebCore::IDBBackingStore::getIndexes):
2668         (WebCore::IDBBackingStore::createIndex):
2669         (WebCore::IDBBackingStore::deleteIndex):
2670         (WebCore::IDBBackingStore::putIndexDataForRecord):
2671         (WebCore::IDBBackingStore::findKeyInIndex):
2672         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
2673         (WebCore::IDBBackingStore::keyExistsInIndex):
2674         (WebCore::indexCursorOptions):
2675         * Modules/indexeddb/IDBBackingStore.h:
2676         (IDBBackingStore):
2677         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2678         (WebCore::DeleteIndexOperation::create):
2679         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
2680         (DeleteIndexOperation):
2681         (WebCore::IDBDatabaseBackendImpl::openInternal):
2682         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
2683         (WebCore::DeleteIndexOperation::perform):
2684         (WebCore::DeleteRangeOperation::perform):
2685         (WebCore::ClearOperation::perform):
2686         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2687         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
2688         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
2689         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
2690         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
2691         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
2692         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
2693         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
2694         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
2695         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
2696         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
2697         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
2698         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
2699         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
2700         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
2701         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
2702         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
2703         * Modules/indexeddb/IDBLevelDBCoding.h:
2704         (IDBLevelDBCoding):
2705         (KeyPrefix):
2706         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2707         (WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):
2708
2709 2013-03-11  Adam Klein  <adamk@chromium.org>
2710
2711         MutationCallback should be a WebIDL 'callback', not a [Callback] interface
2712         https://bugs.webkit.org/show_bug.cgi?id=91406
2713
2714         Reviewed by Adam Barth.
2715
2716         Spec: http://dom.spec.whatwg.org/#mutationcallback
2717
2718         Besides no longer calling handleEvent methods on passed-in objects,
2719         throw a TypeError if a non-function is passed to the MutationObserver constructor.
2720         This is per WebIDL: http://www.w3.org/TR/WebIDL/#es-callback-function
2721
2722         Updated MutationObserver constructor tests to exercise TypeError-throwing behavior.
2723
2724         * bindings/js/JSMutationCallback.cpp:
2725         (WebCore::JSMutationCallback::call): Call the callback directly instead of handing off to JSCallbackData; make return value void.
2726         Use jsArray() to convert from WTF::Vector -> JSArray.
2727         * bindings/js/JSMutationCallback.h:
2728         (JSMutationCallback): Rename handleEvent() to call(), make it void.
2729         * bindings/js/JSMutationObserverCustom.cpp:
2730         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Throw if passed a non-function.
2731         * bindings/v8/V8MutationCallback.cpp:
2732         (WebCore::V8MutationCallback::V8MutationCallback): Take a v8::Function instead of a v8::Object.
2733         (WebCore::V8MutationCallback::call): Call the callback directly instead of handing off to invokeCallback(); make return value void.
2734         Use v8Array() to convert form WTF::Vector -> JSArray.
2735         * bindings/v8/V8MutationCallback.h:
2736         (WebCore::V8MutationCallback::create): Take a v8::Function instead of a v8::Object.
2737         (V8MutationCallback): ditto
2738         * bindings/v8/custom/V8MutationObserverCustom.cpp:
2739         (WebCore::V8MutationObserver::constructorCustom): Throw if passed a non-function, cast to a v8::Function when constructing callback.
2740         * dom/MutationCallback.h:
2741         (WebCore): Remove unnecessary typedef.
2742         (MutationCallback): Rename handleEvent() to call(), make it void.
2743         * dom/MutationObserver.cpp:
2744         (WebCore::MutationObserver::deliver): Update MutationCallback method name.
2745
2746 2013-03-11  Julien Chaffraix  <jchaffraix@webkit.org>
2747
2748         [CSS Grid Layout] Handle spanning grid items over specified grid tracks
2749         https://bugs.webkit.org/show_bug.cgi?id=111918
2750
2751         Reviewed by Tony Chang.
2752
2753         This change updates the containing block override logic to handle multiple
2754         spanned tracks. This makes the multiple specified grid tracks case work and
2755         will enable us to handle the minmax case once the computation logic has been
2756         updated.
2757
2758         Test: fast/css-grid-layout/grid-item-spanning-resolution.html
2759
2760         * rendering/RenderGrid.cpp:
2761         (WebCore::RenderGrid::logicalContentHeightForChild):
2762         (WebCore::RenderGrid::layoutGridItems):
2763         Updated these functions to use gridAreaBreadthForChild.
2764
2765         (WebCore::RenderGrid::gridAreaBreadthForChild):
2766         Added this helper function to handle multiple spanned grid tracks.
2767
2768         * rendering/RenderGrid.h: Added the previous function.
2769
2770 2013-03-11  Philip Rogers  <pdr@google.com>
2771
2772         Replace SVG's static_cast<SVGElement> with toSVGElement()
2773         https://bugs.webkit.org/show_bug.cgi?id=111651
2774
2775         Reviewed by Abhishek Arya.
2776
2777         toSVGElement is preferred over static_cast because bad casts can be caught on
2778         our testing infrastructure. This patch replaces all static_cast<SVGElement>
2779         instances with toSVGElement.
2780
2781         No new tests as this is just a refactoring.
2782
2783         * css/CSSCursorImageValue.cpp:
2784         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
2785         * css/StyleResolver.cpp:
2786         (WebCore::StyleResolver::matchAllRules):
2787         (WebCore::StyleResolver::locateCousinList):
2788         (WebCore::StyleResolver::canShareStyleWithElement):
2789         (WebCore::StyleResolver::locateSharedStyle):
2790         * dom/Element.cpp:
2791         (WebCore::Element::synchronizeAllAttributes):
2792         (WebCore::Element::synchronizeAttribute):
2793         * rendering/svg/RenderSVGModelObject.cpp:
2794         (WebCore::getElementCTM):
2795         (WebCore::RenderSVGModelObject::checkIntersection):
2796         (WebCore::RenderSVGModelObject::checkEnclosure):
2797         * rendering/svg/RenderSVGResource.cpp:
2798         (WebCore::removeFromCacheAndInvalidateDependencies):
2799         * rendering/svg/RenderSVGResourceClipper.cpp:
2800         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
2801         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2802         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
2803         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2804         * rendering/svg/RenderSVGResourceFilter.cpp:
2805         (WebCore::RenderSVGResourceFilter::buildPrimitives):
2806         * rendering/svg/RenderSVGResourceMasker.cpp:
2807         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2808         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
2809         * rendering/svg/RenderSVGResourcePattern.cpp:
2810         (WebCore::RenderSVGResourcePattern::createTileImage):
2811         * rendering/svg/RenderSVGShape.cpp:
2812         (WebCore::RenderSVGShape::strokeWidth):
2813         * rendering/svg/RenderSVGText.cpp:
2814         (WebCore::RenderSVGText::strokeBoundingBox):
2815         * rendering/svg/SVGRenderSupport.cpp:
2816         (WebCore::SVGRenderSupport::layoutChildren):
2817         (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
2818         * rendering/svg/SVGRenderTreeAsText.cpp:
2819         (WebCore::writeSVGPaintingResource):
2820         (WebCore::writeStyle):
2821         (WebCore::operator<<):
2822         * rendering/svg/SVGResources.cpp:
2823         (WebCore::SVGResources::buildCachedResources):
2824         * rendering/svg/SVGTextLayoutEngine.cpp:
2825         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
2826         * svg/SVGAElement.cpp:
2827         (WebCore::SVGAElement::createRenderer):
2828         * svg/SVGAnimationElement.cpp:
2829         (WebCore::SVGAnimationElement::adjustForInheritance):
2830         * svg/SVGElement.cpp:
2831         (WebCore::SVGElement::viewportElement):
2832         (WebCore::SVGElement::haveLoadedRequiredResources):
2833         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
2834         (WebCore::SVGElement::childShouldCreateRenderer):
2835         * svg/SVGElement.h:
2836         (WebCore::toSVGElement):
2837         (WebCore):
2838         * svg/SVGFEImageElement.cpp:
2839         (WebCore::SVGFEImageElement::buildPendingResource):
2840         * svg/SVGFilterElement.cpp:
2841         (WebCore::SVGFilterElement::childShouldCreateRenderer):
2842         * svg/SVGGradientElement.cpp:
2843         (WebCore::SVGGradientElement::buildStops):
2844         * svg/SVGLocatable.cpp:
2845         (WebCore::SVGLocatable::nearestViewportElement):
2846         (WebCore::SVGLocatable::farthestViewportElement):
2847         (WebCore::SVGLocatable::computeCTM):
2848         * svg/SVGMPathElement.cpp:
2849         (WebCore::SVGMPathElement::buildPendingResource):
2850         * svg/SVGSVGElement.cpp:
2851         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
2852         * svg/SVGStyledElement.cpp:
2853         (WebCore::SVGStyledElement::updateRelativeLengthsInformation):
2854         * svg/SVGSwitchElement.cpp:
2855         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
2856         * svg/SVGTextPathElement.cpp:
2857         (WebCore::SVGTextPathElement::buildPendingResource):
2858         * svg/SVGUseElement.cpp:
2859         (WebCore::SVGUseElement::buildPendingResource):
2860         (WebCore::SVGUseElement::toClipPath):
2861         (WebCore::SVGUseElement::rendererClipChild):
2862         (WebCore::SVGUseElement::buildInstanceTree):
2863         (WebCore::SVGUseElement::hasCycleUseReferencing):
2864         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2865         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2866         * svg/SVGViewSpec.cpp:
2867         (WebCore::SVGViewSpec::viewTarget):
2868         * svg/animation/SVGSMILElement.cpp:
2869         (WebCore::SVGSMILElement::buildPendingResource):
2870         * svg/graphics/filters/SVGFEImage.cpp:
2871         (WebCore::FEImage::platformApplySoftware):
2872
2873 2013-03-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2874
2875         [SOUP] ResourceRequest::updateSoupMessage doesn't update the URI of the soup message
2876         https://bugs.webkit.org/show_bug.cgi?id=112040
2877
2878         Reviewed by Gustavo Noronha Silva.
2879
2880         * platform/network/soup/ResourceRequestSoup.cpp:
2881         (WebCore::ResourceRequest::updateSoupMessage): Update the soup
2882         message URI with the ResourceRequest URL.
2883
2884 2013-03-11  Alec Flett  <alecflett@chromium.org>
2885
2886         IndexedDB: Protect against key prefix overflows
2887         https://bugs.webkit.org/show_bug.cgi?id=111138
2888
2889         Reviewed by Tony Chang.
2890
2891         This reworks the boundary checking for all databaseId,
2892         objectStoreId, and indexId, including negative and
2893         zero-based ids. All entrypoints into IDBLevelDBCoding
2894         are protected with explicit checks and all internal
2895         uses of KeyPrefix are protected with ASSERTs in the
2896         various constructors.
2897
2898         Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium
2899
2900         * Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
2901         * Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.
2902
2903 2013-03-11  Xan Lopez  <xlopez@igalia.com>
2904
2905         [BlackBerry] PlatformBlackBerry.cmake: create thin AR archives
2906         https://bugs.webkit.org/show_bug.cgi?id=110580
2907
2908         Reviewed by Rob Buis.
2909
2910         Otherwise libwebcore.a goes beyond the 4Gb file size limit and the
2911         link phase fails.
2912
2913         * PlatformBlackBerry.cmake:
2914
2915 2013-03-11  Pavel Feldman  <pfeldman@chromium.org>
2916
2917         Web Inspector: fix styles toolbar in the vertical mode.
2918         Not reviewed: swapped two lines.
2919
2920         * inspector/front-end/ElementsPanel.js:
2921         (WebInspector.ElementsPanel.prototype._splitVertically):
2922
2923 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
2924
2925         Web Inspector: [CodeMirror] add token highlight feature
2926         https://bugs.webkit.org/show_bug.cgi?id=112009
2927
2928         Reviewed by Pavel Feldman.
2929
2930         Handle CodeMirror's "cursorActivity" event, check selection for being
2931         a word and highlight all its occurrences via CodeMirror.addOverlay method.
2932
2933         No new tests.
2934
2935         * inspector/front-end/CodeMirrorTextEditor.js:
2936         (WebInspector.CodeMirrorTextEditor):
2937         (WebInspector.CodeMirrorTextEditor.TokenHighlighter):
2938         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
2939         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._isWord):
2940         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
2941         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight.nextToken):
2942         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
2943         * inspector/front-end/cm/cmdevtools.css:
2944         (.cm-token-highlight):
2945
2946 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
2947
2948         Web Inspector: [CodeMirror] set indentation size according to devtools settings
2949         https://bugs.webkit.org/show_bug.cgi?id=111717
2950
2951         Reviewed by Pavel Feldman.
2952
2953         Set up codemirror indent size according to devtools settings.
2954
2955         No new tests.
2956
2957         * inspector/front-end/CodeMirrorTextEditor.js:
2958         (.get if):
2959         (WebInspector.CodeMirrorTextEditor):
2960
2961 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
2962
2963         Web Inspector: add per image statistics to the native memory snapshot
2964         https://bugs.webkit.org/show_bug.cgi?id=112011
2965
2966         Reviewed by Pavel Feldman.
2967
2968         Added per-image statistics to the native memory distribution table.
2969
2970         * inspector/front-end/HeapSnapshotProxy.js:
2971         (WebInspector.HeapSnapshotWorker):
2972         (WebInspector.HeapSnapshotWorker.prototype.createLoader):
2973         (WebInspector.HeapSnapshotWorker.prototype.wrapCallback):
2974         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
2975         (WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod): the method now accepts
2976         proxy constructor function instead of its name. This eliminates unnecessary function lookup.
2977         (WebInspector.HeapSnapshotLoaderProxy):
2978         (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
2979         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
2980         (WebInspector.HeapSnapshotProxy.prototype.createRetainingEdgesProvider):
2981         (WebInspector.HeapSnapshotProxy.prototype.createAddedNodesProvider):
2982         (WebInspector.HeapSnapshotProxy.prototype.createDeletedNodesProvider):
2983         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
2984         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass):
2985         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator):
2986         (WebInspector.NativeHeapSnapshotProxy):
2987         (WebInspector.NativeHeapSnapshotProxy.prototype.images):
2988         * inspector/front-end/HeapSnapshotView.js:
2989         (WebInspector.HeapProfileHeader.prototype.snapshotProxyConstructor):
2990         (WebInspector.HeapProfileHeader.prototype._setupWorker):
2991         * inspector/front-end/NativeHeapSnapshot.js:
2992         (WebInspector.NativeHeapSnapshot.prototype.images):
2993         * inspector/front-end/NativeMemorySnapshotView.js:
2994         (WebInspector.NativeSnapshotNode):
2995         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
2996         (WebInspector.NativeSnapshotNode.prototype._populate):
2997         (WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph):
2998         (WebInspector.NativeSnapshotNode.prototype._addImageDetails.didLoad.didReceiveImages):
2999         (WebInspector.NativeSnapshotNode.prototype._addImageDetails):
3000         (WebInspector.NativeSnapshotProfileHeader.prototype.snapshotProxyConstructor):
3001
3002 2013-03-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3003
3004         [Qt] Enable tiled shadow blur for inset box shadows
3005         https://bugs.webkit.org/show_bug.cgi?id=111736
3006
3007         Reviewed by Noam Rosenthal.
3008
3009         Paint inset box-shadows using the optimized tiled shadow blur, instead of
3010         applying shadow blur to the entire painted rect.
3011
3012         This optimizes the default CSS on common pastebin sites.
3013
3014         Tested by existing tests.
3015
3016         * platform/graphics/GraphicsContext.cpp:
3017         * platform/graphics/ShadowBlur.cpp:
3018         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
3019             Must set fill color before calling clearShadow, as that might clear m_color.
3020         (WebCore::ShadowBlur::drawLayerPieces):
3021             Ditto.
3022         * platform/graphics/qt/GraphicsContextQt.cpp:
3023         (WebCore::GraphicsContext::fillPath):
3024         (WebCore::GraphicsContext::fillRectWithRoundedHole):
3025
3026 2013-03-11  Alberto Garcia  <agarcia@igalia.com>
3027
3028         [BlackBerry] GraphicsLayer: rename notifySyncRequired to notifyFlushRequired
3029         https://bugs.webkit.org/show_bug.cgi?id=111997
3030
3031         Reviewed by Rob Buis.
3032
3033         This changed in r130439 but the old name was introduced again by
3034         mistake in r144465.
3035
3036         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
3037         (WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
3038         * platform/graphics/blackberry/LayerWebKitThread.cpp:
3039         (WebCore::LayerWebKitThread::setNeedsCommit):
3040
3041 2013-03-11  Kent Tamura  <tkent@chromium.org>
3042
3043         Inappropriate validation message for required number/date input elements
3044         https://bugs.webkit.org/show_bug.cgi?id=111982
3045
3046         Reviewed by Kentaro Hara.
3047
3048         For validation message, badInput messages should take precedence
3049         over valueMissing messages because users already filled out the
3050         field with a bad value.
3051
3052         Tests: Update fast/forms/validationMessage.html
3053
3054         * html/InputType.cpp:
3055         (WebCore::InputType::validationMessage):
3056         Check badInput first.
3057
3058 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
3059
3060         Web Inspector: extract common parts of native profiles
3061         https://bugs.webkit.org/show_bug.cgi?id=111965
3062
3063         Reviewed by Alexander Pavlov.
3064
3065         Extracted common parts of native profiles into NativeProfileTypeBase. Memory
3066         domain dispatcher is now a separate class as it is shared by two native memory
3067         profile types.
3068
3069         Both native memory profile types now capture native heap graph.
3070
3071         * inspector/front-end/NativeMemorySnapshotView.js:
3072         (WebInspector.MemoryAgentDispatcher.instance):
3073         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked.didReceiveMemorySnapshot):
3074         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked):
3075         (WebInspector.NativeSnapshotProfileType):
3076         (WebInspector.NativeSnapshotProfileHeader.prototype._didReceiveMemorySnapshot):
3077         (WebInspector.NativeMemoryProfileType):
3078         (WebInspector.NativeMemoryProfileHeader.prototype._updateSnapshotStatus):
3079         (WebInspector.NativeMemoryProfileHeader.prototype._didReceiveMemorySnapshot):
3080
3081 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
3082
3083         Unreviewed, rolling out r145349.
3084         http://trac.webkit.org/changeset/145349
3085         https://bugs.webkit.org/show_bug.cgi?id=111966
3086
3087         Missing code history of Element,PageRuleCollector. (Requested
3088         by tasak on #webkit).
3089
3090         * CMakeLists.txt:
3091         * GNUmakefile.list.am:
3092         * Target.pri:
3093         * WebCore.gypi:
3094         * WebCore.xcodeproj/project.pbxproj:
3095         * css/CSSAllInOne.cpp:
3096         * css/DocumentRuleSets.cpp:
3097         (WebCore::ShadowDistributedRules::collectMatchRequests):
3098         * css/DocumentRuleSets.h:
3099         * css/ElementRuleCollector.cpp: Removed.
3100         * css/ElementRuleCollector.h: Removed.
3101         * css/PageRuleCollector.cpp: Removed.
3102         * css/PageRuleCollector.h: Removed.
3103         * css/StyleResolver.cpp:
3104         (WebCore::leftToRightDeclaration):
3105         (WebCore):
3106         (WebCore::rightToLeftDeclaration):
3107         (WebCore::StyleResolver::State::ensureRuleList):
3108         (WebCore::StyleResolver::State::clear):
3109         (WebCore::StyleResolver::addMatchedProperties):
3110         (WebCore::StyleResolver::addElementStyleProperties):
3111         (MatchingUARulesScope):
3112         (WebCore::MatchingUARulesScope::MatchingUARulesScope):
3113         (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
3114         (WebCore::MatchingUARulesScope::isMatchingUARules):
3115         (WebCore::StyleResolver::collectMatchingRules):
3116         (WebCore::StyleResolver::collectMatchingRulesForRegion):
3117         (WebCore::StyleResolver::sortAndTransferMatchedRules):
3118         (WebCore::StyleResolver::matchScopedAuthorRules):
3119         (WebCore::StyleResolver::matchHostRules):
3120         (WebCore::StyleResolver::matchAuthorRules):
3121         (WebCore::StyleResolver::matchUserRules):
3122         (WebCore::StyleResolver::matchUARules):
3123         (WebCore::StyleResolver::collectMatchingRulesForList):
3124         (WebCore::compareRules):
3125         (WebCore::StyleResolver::sortMatchedRules):
3126         (WebCore::StyleResolver::matchAllRules):
3127         (WebCore::StyleResolver::State::initForStyleResolve):
3128         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3129         (WebCore::StyleResolver::styleForElement):
3130         (WebCore::StyleResolver::styleForKeyframe):
3131         (WebCore::StyleResolver::pseudoStyleForElement):
3132         (WebCore::StyleResolver::styleForPage):
3133         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3134         (WebCore::StyleResolver::ruleMatches):
3135         (WebCore::StyleResolver::checkRegionSelector):
3136         (WebCore::comparePageRules):
3137         (WebCore::StyleResolver::matchPageRules):
3138         (WebCore::checkPageSelectorComponents):
3139         (WebCore::StyleResolver::matchPageRulesForList):
3140         (WebCore::StyleResolver::isLeftPage):
3141         (WebCore::StyleResolver::isFirstPage):
3142         (WebCore::StyleResolver::pageName):
3143         * css/StyleResolver.h:
3144         (WebCore::MatchRequest::MatchRequest):
3145         (MatchRequest):
3146         (StyleResolver):
3147         (MatchResult):
3148         (WebCore::StyleResolver::State::State):
3149         (State):
3150         (WebCore::StyleResolver::State::takeRuleList):
3151         (WebCore::StyleResolver::State::setSameOriginOnly):
3152         (WebCore::StyleResolver::State::isSameOriginOnly):
3153         (WebCore::StyleResolver::State::pseudoStyleRequest):
3154         (WebCore::StyleResolver::State::setMode):
3155         (WebCore::StyleResolver::State::mode):
3156         (WebCore::StyleResolver::State::matchedRules):
3157         (WebCore::StyleResolver::State::addMatchedRule):
3158         * inspector/InspectorCSSAgent.cpp:
3159         (WebCore::InspectorCSSAgent::willMatchRule):
3160         * inspector/InspectorCSSAgent.h:
3161         (WebCore):
3162         (InspectorCSSAgent):
3163         * inspector/InspectorInstrumentation.cpp:
3164         (WebCore):
3165         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
3166         * inspector/InspectorInstrumentation.h:
3167         (WebCore):
3168         (InspectorInstrumentation):
3169         (WebCore::InspectorInstrumentation::willMatchRule):
3170
3171 2013-03-11  Marja Hölttä  <marja@chromium.org>
3172
3173         [V8] Fix V8InjectedScriptManager
3174         https://bugs.webkit.org/show_bug.cgi?id=111968
3175
3176         Reviewed by Kentaro Hara.
3177
3178         This is needed to make the inspector work after templates for main world
3179         and non-main worlds are separated (bug 111724).
3180
3181         No new tests (no changes in functionality).
3182
3183         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3184         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
3185
3186 2013-03-11  Hayato Ito  <hayato@chromium.org>
3187
3188         Make sure that CSSSelector::setValue() is never called after parsing its pseudoType.
3189         https://bugs.webkit.org/show_bug.cgi?id=111957
3190
3191         Reviewed by Hajime Morrita.
3192
3193         It'd be nice to have an assertion here since
3194         CSSSelector::pseudoType() will never parse a new value after it
3195         parses a value and m_pseudoType is set to non-PseudoNotParsed.
3196
3197         No new tests (no change in behaviour).
3198
3199         * css/CSSSelector.h:
3200         (WebCore::CSSSelector::setValue):
3201
3202 2013-03-11  Takashi Sakamoto  <tasak@google.com>
3203
3204         [Refactoring] Implement RuleCollector
3205         https://bugs.webkit.org/show_bug.cgi?id=109916
3206
3207         Reviewed by Antti Koivisto.
3208
3209         Implemented rule collector for an element and collector for a page.
3210         Not all members in class State are required entire while resolving
3211         a style.
3212
3213         No new tests, because just refactoring.
3214
3215         * CMakeLists.txt:
3216         * GNUmakefile.list.am:
3217         * Target.pri:
3218         * WebCore.gypi:
3219         * WebCore.xcodeproj/project.pbxproj:
3220         * css/CSSAllInOne.cpp:
3221         Added ElementRuleCollector and PageRuleCollector.
3222         * css/DocumentRuleSets.cpp:
3223         (WebCore::ShadowDistributedRules::collectMatchRequests):
3224         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
3225         removed from here.
3226         * css/DocumentRuleSets.h:
3227         (WebCore::ShadowDistributedRules::isEmpty):
3228         Added to quickly check whether there exist any ShadowDistributedRules
3229         or not.
3230         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
3231         (WebCore):
3232         (WebCore::ElementRuleCollector::matchedResult):
3233         (WebCore::ElementRuleCollector::matchedRuleList):
3234         (WebCore::ElementRuleCollector::addMatchedRule):
3235         (WebCore::ElementRuleCollector::clearMatchedRules):
3236         (WebCore::ElementRuleCollector::ensureRuleList):
3237         (WebCore::ElementRuleCollector::addElementStyleProperties):
3238         (WebCore::ElementRuleCollector::collectMatchingRules):
3239         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
3240         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
3241         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
3242         (WebCore::ElementRuleCollector::matchHostRules):
3243         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
3244         (WebCore::ElementRuleCollector::matchAuthorRules):
3245         (WebCore::ElementRuleCollector::matchUserRules):
3246         (WebCore::ElementRuleCollector::matchUARules):
3247         (WebCore::ElementRuleCollector::ruleMatches):
3248         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3249         (WebCore::ElementRuleCollector::sortMatchedRules):
3250         (WebCore::ElementRuleCollector::matchAllRules):
3251         Moved these methods from StyleResolver to this class.
3252         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
3253         This method is used for checking whether a given element can share
3254         a cache.
3255         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
3256         (WebCore):
3257         (WebCore::ElementRuleCollector::ElementRuleCollector):
3258         Use styleResolver instance to initialize its member variables, i.e.
3259         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
3260         StyleScopedResolver.
3261         (ElementRuleCollector):
3262         (WebCore::ElementRuleCollector::setMode):
3263         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
3264         (WebCore::ElementRuleCollector::setSameOriginOnly):
3265         (WebCore::ElementRuleCollector::setRegionForStyling):
3266         Mode, SameOriginOnly, RegionForStyling are only used while collecting
3267         matched rules.
3268         (WebCore::ElementRuleCollector::setMedium):
3269         Need to know which default stylesheet should be looked up.
3270         (WebCore::ElementRuleCollector::document):
3271         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
3272         (WebCore::comparePageRules):
3273         (WebCore::PageRuleCollector::isLeftPage):
3274         (WebCore::PageRuleCollector::isFirstPage):
3275         (WebCore::PageRuleCollector::pageName):
3276         (WebCore::PageRuleCollector::matchAllPageRules):
3277         (WebCore::PageRuleCollector::matchPageRules):
3278         (WebCore::checkPageSelectorComponents):
3279         (WebCore::PageRuleCollector::matchPageRulesForList):
3280         Moved from StyleResolver.
3281         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
3282         (WebCore):
3283         (WebCore::PageRuleCollector::PageRuleCollector):
3284         (PageRuleCollector):
3285         (WebCore::PageRuleCollector::matchedResult):
3286         * css/StyleResolver.cpp:
3287         (WebCore):
3288         (WebCore::StyleResolver::State::clear):
3289         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
3290         (WebCore::StyleResolver::State::initForStyleResolve):
3291         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3292         (WebCore::StyleResolver::styleForElement):
3293         (WebCore::StyleResolver::styleForKeyframe):
3294         (WebCore::StyleResolver::pseudoStyleForElement):
3295         (WebCore::StyleResolver::styleForPage):
3296         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3297         (WebCore::StyleResolver::applyMatchedProperties):
3298         * css/StyleResolver.h:
3299         (WebCore::MatchRequest::MatchRequest):
3300         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
3301         state.
3302         (MatchRequest):
3303         (WebCore::StyleResolver::selectorFilter):
3304         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
3305         (StyleResolver):
3306         (MatchResult):
3307         (WebCore::StyleResolver::State::State):
3308         To pass ASSERT in StyleResolver::applyProperties, need to keep
3309         m_regionForStyling.
3310         (State):
3311         (WebCore::StyleResolver::State::regionForStyling):
3312         (WebCore::StyleResolver::State::useSVGZoomRules):
3313         (WebCore::StyleResolver::hasSelectorForId):
3314         (WebCore):
3315         (WebCore::checkRegionSelector):
3316         * inspector/InspectorCSSAgent.cpp:
3317         (WebCore::InspectorCSSAgent::willMatchRule):
3318         Removed StyleResolver from its parameter list. Instead, added
3319         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
3320         * inspector/InspectorCSSAgent.h:
3321         (WebCore):
3322         (InspectorCSSAgent):
3323         * inspector/InspectorInstrumentation.cpp:
3324         (WebCore):
3325         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
3326         * inspector/InspectorInstrumentation.h:
3327         (WebCore):
3328         (InspectorInstrumentation):
3329         (WebCore::InspectorInstrumentation::willMatchRule):
3330
3331 2013-03-11  Mike West  <mkwst@chromium.org>
3332
3333         XSSAuditor doesn't need a copy of the original document's body.
3334         https://bugs.webkit.org/show_bug.cgi?id=111946
3335
3336         Reviewed by Darin Adler.
3337
3338         The XSSAuditor currently copies the original HTTP body of the document
3339         that's being audited in order to include it into a violation report if
3340         reflected XSS is detected. We don't actually need to do this, as we
3341         have access to the original request information from inside the
3342         XSSAuditorDelegate where the report is generated.
3343         XSSAuditorDelegate::didBlockScript ASSERTs that it's running on the
3344         main thread, so it should be safe to reach through the document's
3345         loader to get that information directly, rather than passing it from
3346         thread to thread via XSSInfo object properties.
3347
3348         * html/parser/XSSAuditor.h:
3349         * html/parser/XSSAuditor.cpp:
3350         (WebCore::XSSAuditor::init):
3351         (WebCore::XSSAuditor::filterToken):
3352         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
3353         * html/parser/XSSAuditorDelegate.h:
3354         (WebCore::XSSInfo::create):
3355         (WebCore::XSSInfo::XSSInfo):
3356         * html/parser/XSSAuditorDelegate.cpp:
3357         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
3358             Drop the XSSInfo and XSSAuditor properties that held an
3359             isolatedCopy of the the original HTTP body. Depending on the
3360             document's size, this could be a significant savings.
3361         (WebCore::XSSAuditorDelegate::didBlockScript):
3362             Reach into the document's loader's original request in order to
3363             grab the body as a String, and feed that into the violation report
3364             object.
3365
3366             As a drive-by, this patch creates a FrameLoader* temporary
3367             variable to minimize repetition in this area of the code. We use
3368             the loader a few times, but should only have to grab it once.
3369
3370 2013-03-11  Silvia Pfeiffer  <silviapf@chromium.org>
3371
3372         [Chromium] REGRESSION: Closed Captions button not showing properly
3373         https://bugs.webkit.org/show_bug.cgi?id=109871
3374
3375         Reviewed by Jer Noble.
3376
3377         No new tests - covered by existing tests.
3378
3379         Most of the patch was in the meantime covered by a patch to
3380         https://bugs.webkit.org/show_bug.cgi?id=111109 .
3381         This changes a static Chromium-only function name to be consistent with
3382         parent class function names.
3383
3384         * rendering/RenderMediaControlsChromium.cpp:
3385         (WebCore::paintMediaToggleClosedCaptionsButton):
3386         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
3387         Rename paintMediaClosedCaptionsButton to paintMediaToggleClosedCaptionsButton.
3388
3389 2013-03-11  Tim Horton  <timothy_horton@apple.com>
3390
3391         RenderSnapshottedPlugIn paints in PaintPhaseBlockBackground instead of PaintPhaseForeground
3392         https://bugs.webkit.org/show_bug.cgi?id=111962
3393         <rdar://problem/13289335>
3394
3395         Reviewed by Dean Jackson.
3396
3397         RenderSnapshottedPlugIn should paint its snapshot during the foreground
3398         painting phase, instead of BlockBackground, to match normal plugin painting.
3399
3400         * rendering/RenderSnapshottedPlugIn.cpp:
3401         (WebCore::RenderSnapshottedPlugIn::paint):
3402
3403 2013-03-07  Alexander Pavlov  <apavlov@chromium.org>
3404
3405         Web Inspector: [Elements] XSLT transformation result from the xml-stylesheet PI not rendered
3406         https://bugs.webkit.org/show_bug.cgi?id=111313
3407
3408         Reviewed by Vsevolod Vlasov.
3409
3410         Frame document update upon XSL transformation was never instrumented.
3411         This change instruments the Document::applyXSLTransform() method to that end.
3412
3413         Test: http/tests/inspector/styles/xsl-transformed.xml
3414
3415         * dom/Document.cpp:
3416         (WebCore::Document::applyXSLTransform): Instrumented.
3417         * inspector/InspectorDOMAgent.cpp:
3418         (WebCore::InspectorDOMAgent::frameDocumentUpdated): Invoked upon applyXSLTransform().
3419         * inspector/InspectorDOMAgent.h:
3420         * inspector/InspectorInstrumentation.cpp:
3421         (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl): Added.
3422         * inspector/InspectorInstrumentation.h:
3423         (WebCore::InspectorInstrumentation::didCommitLoad): Drive-by: simplified.
3424         (WebCore::InspectorInstrumentation::frameDocumentUpdated): Added.
3425
3426 2013-03-10  Matt Falkenhagen  <falken@chromium.org>
3427
3428         Implement inert subtrees needed for modal <dialog>
3429         https://bugs.webkit.org/show_bug.cgi?id=110952
3430
3431         Reviewed by Hajime Morrita.
3432
3433         This changes Node::disabled() to return true when a modal dialog is
3434         open and the node is not in the dialog.
3435
3436         Reusing disabled for inertness is useful because then event
3437         targeting and focus control automatically have the desired behavior:
3438         inert nodes are skipped over.
3439
3440         Tests: fast/dom/HTMLDialogElement/closed-dialog-does-not-block-mouse-events.html
3441                fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events.html
3442                fast/dom/HTMLDialogElement/non-modal-dialog-does-not-block-mouse-events.html
3443
3444         * dom/Document.h:
3445         (WebCore::Document::activeModalDialog): Returns the topmost element in the top layer.
3446         Since now the only elements in the top layer are modal dialogs, it is the active modal dialog.
3447         * dom/Node.cpp:
3448         (WebCore):
3449         (WebCore::Node::isInert): As per the spec, a node that is not an ancestor or descendant of the modal dialog is inert.
3450         (WebCore::Node::disabled): Return false when inert.
3451         * dom/Node.h:
3452         * html/HTMLFormControlElement.cpp:
3453         (WebCore::HTMLFormControlElement::disabled): Fall back to the superclass so inert is taken into account.
3454
3455 2013-03-10  Glenn Adams  <glenn@skynav.com>
3456
3457         Line breaking opportunities at the end of a text node are missed
3458         https://bugs.webkit.org/show_bug.cgi?id=17427
3459
3460         Reviewed by Darin Adler.
3461
3462         When initializing context for determining next break position,
3463         reuse last two characters from previous text node(s) within block.
3464         This additional state is stored in the current LazyLineBreakIterator
3465         as an optimization to prevent having to add two new parameters to
3466         isBreakable().
3467
3468         At present, this fixes only the ASCII shortcut code path, but
3469         does not yet handle the non-ASCII path. Since the ASCII path is
3470         the most performant critical, the handling of this latter path
3471         will be addressed by webkit.org/b/105692.
3472
3473         Additionally test for case where last two characters context
3474         is derived from distinct nodes, possibly with intervening empty
3475         inline node(s).
3476
3477         Test: fast/text/line-break-between-text-nodes.html
3478
3479         * platform/text/TextBreakIterator.h:
3480         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
3481         (WebCore::LazyLineBreakIterator::lastCharacter):
3482         (WebCore::LazyLineBreakIterator::secondToLastCharacter):
3483         (WebCore::LazyLineBreakIterator::setLastTwoCharacters):
3484         (WebCore::LazyLineBreakIterator::resetLastTwoCharacters):
3485         (WebCore::LazyLineBreakIterator::updateLastTwoCharacters):
3486         (LazyLineBreakIterator):
3487         Add state variables to retain last two characters of previous text node(s)
3488         for reuse when initializing nextBreakPosition<>() context.
3489         * rendering/RenderBlockLineLayout.cpp:
3490         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
3491         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
3492         Record and reset retained last two characters of previous text node(s) as
3493         appropriate.
3494         * rendering/break_lines.cpp:
3495         (WebCore::nextBreakablePosition):
3496         Use state variables holding retained last two characters of previous text node(s)
3497         for when initializing nextBreakPosition<>() context.
3498
3499 2013-03-10  Darin Adler  <darin@apple.com>
3500
3501         NetworkStorageSession leaks its CFURLStorageSessionRef
3502         https://bugs.webkit.org/show_bug.cgi?id=111950
3503         <rdar://problem/13384134>
3504
3505         Reviewed by Sam Weinig.
3506
3507         * platform/network/NetworkStorageSession.h:
3508         Change the argument type of the constructor to a RetainPtr.
3509         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3510         (WebCore::NetworkStorageSession::NetworkStorageSession): Changed
3511         the argument type to a RetainPtr.
3512         (WebCore::NetworkStorageSession::switchToNewTestingSession): Added
3513         calls to adoptCF to adopt the value returned by wkCreatePrivateStorageSession.
3514         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Ditto.
3515         (WebCore::NetworkStorageSession::cookieStorage): Changed to use adoptCF
3516         instead of the RetainPtr constructor with AdoptCF since the former is
3517         far easier to read.
3518
3519 2013-03-10  Jason Anderssen  <janderssen@gmail.com>
3520
3521         Conformance Test 1.0.3 (Beta) function: bufferData undefined value failed.
3522         https://bugs.webkit.org/show_bug.cgi?id=111641
3523
3524         Reviewed by Dean Jackson.
3525
3526         The WebGL specification requires that a size of 0 is not valid. In javascript, passing in undefined 
3527         as a parameter to a long long is the same as passing in 0, so we must check for this incorrect
3528         value and fail. 
3529         The test suite in Kronos 1.0.3 failed, test to verify conformance is as follows:
3530         https://www.khronos.org/registry/webgl/sdk/tests/conformance/more/functions/bufferDataBadArgs.html.
3531
3532         * html/canvas/WebGLRenderingContext.cpp:
3533         (WebCore::WebGLRenderingContext::bufferData):
3534         Synthesize error and returned if size is 0.
3535
3536 2013-03-10  Andreas Kling  <akling@apple.com>
3537
3538         SVGDocumentExtensions should use OwnPtr for pending resource maps.
3539         <http://webkit.org/b/111943>
3540
3541         Reviewed by Anders Carlsson.
3542
3543         * svg/SVGDocumentExtensions.cpp:
3544         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
3545         (WebCore::SVGDocumentExtensions::addPendingResource):
3546         (WebCore::SVGDocumentExtensions::isElementPendingResources):
3547         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
3548         (WebCore::SVGDocumentExtensions::removePendingResource):
3549         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
3550         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
3551         * svg/SVGDocumentExtensions.h:
3552         (SVGDocumentExtensions):
3553
3554 2013-03-10  Tim Horton  <timothy_horton@apple.com>
3555
3556         Add a heuristic to determine the “primary” snapshotted plugin
3557         https://bugs.webkit.org/show_bug.cgi?id=111932
3558         <rdar://problem/13270208>
3559
3560         Reviewed by Dean Jackson.
3561
3562         * WebCore.exp.in: Export a few things.
3563         * html/HTMLPlugInImageElement.cpp:
3564         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
3565         (WebCore::classNameForShadowRoot): If we've been informed that we are the primary snapshotted plugin, add the 'primary' class.
3566         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Added
3567         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Hand classNameForShadowRoot our primary-ness.
3568         * html/HTMLPlugInImageElement.h:
3569         (HTMLPlugInImageElement): Add storage for m_isPrimarySnapshottedPlugIn.
3570
3571 2013-03-10  Mike West  <mkwst@chromium.org>
3572
3573         XSSAuditor doesn't need a copy of the original document URL.
3574         https://bugs.webkit.org/show_bug.cgi?id=111944
3575
3576         Reviewed by Adam Barth.
3577
3578         When creating an XSSInfo object in response to detecting reflected XSS
3579         on a page, the Auditor was passing in a copy of the document's
3580         original URL for reporting. It doesn't look like we need this, as
3581         XSSInfo's only consumer, XSSAuditorDelegate, runs on the main thread
3582         with access to the document. We can obtain access to the same
3583         information by reading the URL directly from the delegate's Document
3584         object if and when we need it.
3585
3586         * html/parser/XSSAuditorDelegate.cpp:
3587         (WebCore::XSSAuditorDelegate::didBlockScript):
3588             Read the document's URL directly in order to create a violation
3589             report.
3590         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
3591         * html/parser/XSSAuditorDelegate.h:
3592         (WebCore::XSSInfo::create):
3593         (WebCore::XSSInfo::XSSInfo):
3594         * html/parser/XSSAuditor.cpp:
3595         (WebCore::XSSAuditor::init):
3596         (WebCore::XSSAuditor::filterToken):
3597         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
3598         * html/parser/XSSAuditor.h:
3599             Remove the copied original URL from both XSSInfo objects and the
3600             XSSAuditor.
3601
3602 2013-03-10  Andreas Kling  <akling@apple.com>
3603
3604         GlyphMetricsMap should use OwnPtr.
3605         <http://webkit.org/b/111937>
3606
3607         Reviewed by Anders Carlsson.
3608
3609         Use OwnPtr instead of raw pointer + deleteAllValues().
3610
3611         * platform/graphics/GlyphMetricsMap.h:
3612         (GlyphMetricsMap):
3613         (WebCore::::locatePageSlowCase):
3614
3615 2013-03-10  Eric Carlson  <eric.carlson@apple.com>
3616
3617         Allow iOS port to use InbandTextTrackPrivateAVF
3618         https://bugs.webkit.org/show_bug.cgi?id=111933
3619
3620         Reviewed by Dean Jackson.
3621
3622         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3623         (WebCore::InbandTextTrackPrivateAVF::processCue): Drive-by cleanup.
3624         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
3625
3626 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
3627
3628         Enable platform code to implement text track menu
3629         https://bugs.webkit.org/show_bug.cgi?id=111924
3630
3631         Reviewed by Dean Jackson.
3632
3633         No new tests, the new code isn't enabled in any ports yet.
3634
3635         * WebCore.xcodeproj/project.pbxproj: Add PlatformTextTrack.h and PlatformTextTrackMenu.h.
3636
3637         * html/HTMLAudioElement.cpp:
3638         (WebCore::HTMLAudioElement::createForJSConstructor): scheduleLoad -> scheduleDelayedAction.
3639
3640         * html/HTMLMediaElement.cpp:
3641         (WebCore::HTMLMediaElement::HTMLMediaElement): Deal with scheduleLoad to scheduleDelayedAction rename.
3642         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
3643         (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
3644         (WebCore::HTMLMediaElement::insertedInto): Ditto.
3645         (WebCore::HTMLMediaElement::scheduleDelayedAction): Ditto.
3646         (WebCore::HTMLMediaElement::scheduleNextSourceChild): Ditto.
3647         (WebCore::HTMLMediaElement::loadTimerFired): Ditto.
3648         (WebCore::HTMLMediaElement::textTrackModeChanged): Notify platform menu of track change.
3649         (WebCore::HTMLMediaElement::playInternal): Deal with scheduleLoad to scheduleDelayedAction rename.
3650         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
3651         (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): Ditto. Call addTrack() instead of appending 
3652             the track directly.
3653         (WebCore::HTMLMediaElement::setSelectedTextTrack): Deal with platform menu changing the
3654             selected track.
3655         (WebCore::HTMLMediaElement::platformTextTracks): Return an array of PlatformTracks representing
3656             the current text tracks.
3657         (WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Notify the platform menu
3658             that the list of text tracks has changed.
3659         (WebCore::HTMLMediaElement::platformTextTrackMenu): Return the platform track menu, if any.
3660         (WebCore::HTMLMediaElement::closeCaptionTracksChanged): 
3661         (WebCore::HTMLMediaElement::addTrack): Call addTrack() instead of appending the track directly.
3662         (WebCore::HTMLMediaElement::removeTrack): Call closeCaptionTracksChanged.
3663         (WebCore::HTMLMediaElement::addTextTrack): Call addTrack() instead of appending the track directly.
3664         (WebCore::HTMLMediaElement::didAddTrack): Ditto.
3665         (WebCore::HTMLMediaElement::didRemoveTrack): Deal with scheduleLoad to scheduleDelayedAction rename.
3666         (WebCore::HTMLMediaElement::sourceWasAdded): Ditto.
3667         (WebCore::HTMLMediaElement::clearMediaPlayer): Forget the platform track menu.
3668         (WebCore::HTMLMediaElement::resume): Deal with scheduleLoad to scheduleDelayedAction rename.
3669         * html/HTMLMediaElement.h:
3670
3671         * html/track/InbandTextTrack.h: scheduleLoad -> scheduleDelayedAction.
3672
3673         * html/track/TextTrack.cpp:
3674         (WebCore::TextTrack::platformTextTrack): Create a PlatformTextTrack.
3675         * html/track/TextTrack.h:
3676
3677         * platform/graphics/MediaPlayer.cpp:
3678         (WebCore::MediaPlayer::implementsTextTrackControls): New, player private passthrough.
3679         (WebCore::MediaPlayer::textTrackMenu): Ditto.
3680         * platform/graphics/MediaPlayer.h:
3681         * platform/graphics/MediaPlayerPrivate.h:
3682
3683         * platform/graphics/PlatformTextTrack.h: Added.
3684
3685         * platform/graphics/PlatformTextTrackMenu.h: Added.
3686
3687 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
3688
3689         Video size calculated incorrectly when PLUGIN_PROXY_FOR_VIDEO
3690         https://bugs.webkit.org/show_bug.cgi?id=111912
3691
3692         Reviewed by Dean Jackson.
3693
3694         * html/shadow/MediaControlElements.cpp:
3695         (WebCore::MediaControlTextTrackContainerElement::updateSizes): We use RenderPart when
3696             PLUGIN_PROXY_FOR_VIDEO is defined, not RenderVideo.
3697
3698 2013-03-09  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
3699
3700         Fix offset handling in GStreamer WebKitWebSource.
3701         https://bugs.webkit.org/show_bug.cgi?id=111888
3702
3703         Reviewed by Philippe Normand.
3704
3705         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3706         (webKitWebSrcSeekDataCb):
3707         (StreamingClient::didReceiveData):
3708         The offset handling in WebKitWebSource was completely wrong
3709         before and caused wrong offsets to be set on the GStreamer buffers
3710         after a seek.
3711
3712         Apart from that there was also a race condition that happens
3713         when a downstream element causes seeks in very short succession
3714         and is switching between two different parts of the stream.
3715
3716 2013-03-09  Keishi Hattori  <keishi@webkit.org>
3717
3718         Month transition animation is missing in some places
3719         https://bugs.webkit.org/show_bug.cgi?id=111908
3720
3721         Reviewed by Kent Tamura.
3722
3723         Month transition animation was missing when navigating using keyboard
3724         shortcuts and when navigation was trigger by selecting.
3725
3726         Added tests to calendar-picker/*-picker-key-operations.html.
3727
3728         * Resources/pagepopups/calendarPicker.js:
3729         (Animator): Added annotations.
3730         (Animator.prototype.isRunning): Returns true of the animation is running. Used by test.
3731         (ScrollView.prototype.scrollAnimator): Returns the scroll animator. Used by test.
3732         (CalendarPicker):
3733         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Use CalendarPicker.NavigationBehavior enum instead of bool.
3734         (CalendarPicker.prototype.setSelection): Ditto.
3735         (CalendarPicker.prototype._moveHighlight): Ditto.
3736         (CalendarPicker.prototype.onCalendarTableKeyDown): Ditto.
3737         (CalendarPicker.prototype.onBodyKeyDown): Ditto.
3738
3739 2013-03-09  Dean Jackson  <dino@apple.com>
3740
3741         Can't build w/o accelerated compositing
3742         https://bugs.webkit.org/show_bug.cgi?id=111891
3743
3744         Patch originally came from Tobias Mueller <tobiasmue@gnome.org>
3745
3746         Unreviewed build fix for platforms without ACCELERATED_COMPOSITING enabled, due
3747         to r145057.
3748
3749         * dom/PseudoElement.cpp:
3750         (WebCore::PseudoElement::~PseudoElement): Wrap the call to pseudoElementDestroyed in
3751             USE(ACCELERATED_COMPOSITING)
3752
3753 2013-03-07  Robert Hogan  <robert@webkit.org>
3754
3755         REGRESSION(r140907): Incorrect baseline for cells with media content during load
3756         https://bugs.webkit.org/show_bug.cgi?id=108357
3757
3758         Reviewed by Julien Chaffraix.
3759
3760         If a cell has replaced content, the intrinsic height of its content can change between layouts. If that's the case then the intrinsic padding we used
3761         for layout (the padding required to push the contents of the cell down to the row's baseline) is included in the new height and baseline and makes both
3762         of them wrong. So if a cell's content's intrinsic height has changed push the new content up into the intrinsic padding and relayout so that the rest of
3763         table and row layout can use the correct baseline and height for this cell.
3764
3765         Tests: fast/css/vertical-align-baseline-rowspan-012.html
3766                http/tests/css/vertical-align-baseline-after-image-load-2.html
3767                http/tests/css/vertical-align-baseline-after-image-load-3.html
3768                http/tests/css/vertical-align-baseline-after-image-load.html
3769
3770         * rendering/RenderTableCell.cpp:
3771         (WebCore::RenderTableCell::layout):
3772         * rendering/RenderTableCell.h:
3773         (WebCore::RenderTableCell::isBaselineAligned):
3774         * rendering/RenderTableSection.cpp:
3775         (WebCore::RenderTableSection::calcRowLogicalHeight):
3776         (WebCore::RenderTableSection::layoutRows):
3777
3778 2013-03-08  Chris Fleizach  <cfleizach@apple.com>
3779
3780         REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
3781         https://bugs.webkit.org/show_bug.cgi?id=111613
3782
3783         Reviewed by Ryosuke Niwa.
3784
3785         This crash happens when the mock synthesizer utterance variable gets cleared
3786         before the speakingFinished timer happens. I don't see how that could happen
3787         but I was able to make a similar problem happen when cancel is called twice.
3788
3789         This adds in a few more asserts and common sense checks. I'm hoping it will
3790         illuminate the problem further.
3791
3792         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
3793         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
3794         (WebCore::PlatformSpeechSynthesizerMock::speak):
3795         (WebCore::PlatformSpeechSynthesizerMock::cancel):
3796
3797 2013-03-08  David Kilzer  <ddkilzer@apple.com>
3798
3799         BUILD FIX: Make WebCore link for iOS
3800
3801         * WebCore.exp.in:
3802         - Add ENABLE(RUBBER_BAND) for FrameView::setWantsLayerForTopOverHangArea(bool)
3803           and FrameView::setWantsLayerForBottomOverHangArea(bool).
3804         - Move FloatPoint::FloatPoint(_NSPoint const&) to !PLATFORM(IOS)
3805           section.
3806
3807 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
3808
3809         [CSS Grid Layout] Resolve grid-{end|after} integer against the end|after edge
3810         https://bugs.webkit.org/show_bug.cgi?id=111885
3811
3812         Reviewed by Tony Chang.
3813
3814         The current code resolves grid-end (resp. grid-after) <integer>'s format against the start
3815         (resp. before) axis. The specification changed so that they are resolved against their matching
3816         axis.
3817
3818         Test: fast/css-grid-layout/grid-auto-flow-resolution.html
3819
3820         * rendering/RenderGrid.cpp:
3821         (WebCore::RenderGrid::maximumIndexInDirection):
3822         Updated the code to do the grid sizing measurement without resolveGridPositionsFromStyle. That's required
3823         as resolveGridPositionsFromStyle requires the grid to be sized.
3824
3825         (WebCore::RenderGrid::placeItemsOnGrid):
3826         Added a comment about not recomputing after grid growth. This issue was raised to www-style
3827         (http://lists.w3.org/Archives/Public/www-style/2013Mar/0182.html).
3828
3829         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
3830         Added an ASSERT now that we don't call it during grid construction. Also added some code to pass
3831         the side of the GridPosition we give to resolveGridPositionFromStyle.
3832
3833         (WebCore::RenderGrid::resolveGridPositionFromStyle):
3834         Updated the code to resolve the grid position against the right side.
3835
3836         * rendering/RenderGrid.h:
3837         Added GridPositionSide and updated resolveGridPositionFromStyle's signature.
3838
3839 2013-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3840
3841         Unreviewed, rolling out r142015.
3842         http://trac.webkit.org/changeset/142015
3843         https://bugs.webkit.org/show_bug.cgi?id=111904
3844
3845         The change caused 2 major regressions (bug 111091 and bug
3846         111595) and Pravin doesn't have time to investigate them
3847         (Requested by jchaffraix on #webkit).
3848
3849         * dom/Node.cpp:
3850         (WebCore::Node::diff):
3851         * rendering/RenderBlock.cpp:
3852         (WebCore::RenderBlock::childBecameNonInline):
3853         (WebCore):
3854         * rendering/RenderBlock.h:
3855         (RenderBlock):
3856         * rendering/RenderBoxModelObject.h:
3857         (WebCore::RenderBoxModelObject::childBecameNonInline):
3858         (RenderBoxModelObject):
3859         * rendering/RenderInline.cpp:
3860         (WebCore::RenderInline::childBecameNonInline):
3861         (WebCore):
3862         * rendering/RenderInline.h:
3863         (RenderInline):
3864         * rendering/RenderObject.cpp:
3865         (WebCore):
3866         (WebCore::RenderObject::handleDynamicFloatPositionChange):
3867         (WebCore::RenderObject::styleWillChange):
3868         (WebCore::RenderObject::styleDidChange):
3869         * rendering/RenderObject.h:
3870         (RenderObject):
3871
3872 2013-03-08  Dean Jackson  <dino@apple.com>
3873
3874         Don't snapshot Java plugins
3875         https://bugs.webkit.org/show_bug.cgi?id=111899
3876
3877         Reviewed by Tim Horton.
3878
3879         Export MIMETypeRegistry::isJavaAppletMIMEType symbol.
3880
3881         * WebCore.exp.in:
3882
3883 2013-03-08  Rafael Weinstein  <rafaelw@chromium.org>
3884
3885         [HTMLTemplateElement] processTemplateEndTag() needs to check for template in html scope
3886         https://bugs.webkit.org/show_bug.cgi?id=111880
3887
3888         Reviewed by Eric Seidel.
3889
3890         Currently, </template> handling exits with an error if there is not a template tag "in scope"
3891         which will be true if there is a table (for instance) below a template. This makes it so that
3892         the search (correctly) examines the entire element stack.
3893
3894         Tests added to html5lib testing library.
3895
3896         * html/parser/HTMLTreeBuilder.cpp:
3897         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
3898
3899 2013-03-08  Eric Seidel  <eric@webkit.org>
3900
3901         BackgroundHTMLParser should be able to atomize well-known strings
3902         https://bugs.webkit.org/show_bug.cgi?id=107337
3903
3904         Reviewed by Adam Barth.
3905
3906         Testing this patch easily requires applying bug 107236 locally
3907         to remove all the rendering noise from Parser/html-threaded-parser.html.
3908
3909         This patch adds a new class HTMLIdentifier which allows us to avoid
3910         allocating strings for known tag/attribute names from HTMLNames.
3911
3912         There is still a lot of meat on this bone, but I think it's important to
3913         land something "smallish" to start and iterate from there.
3914
3915         This took Parser/html-threaded-parser.html from:
3916         median= 443.726500002 ms, stdev= 7.25002679952 ms, min= 430.244000047 ms, max= 455.511000007 ms
3917         to:
3918         median= 427.849500004 ms, stdev= 9.96967058292 ms, min= 417.914000049 ms, max= 461.528000014 ms
3919         on my MBP.
3920
3921         * CMakeLists.txt:
3922         * GNUmakefile.list.am:
3923         * Target.pri:
3924         * WebCore.gypi:
3925         * WebCore.vcproj/WebCore.vcproj:
3926         * WebCore.vcxproj/WebCore.vcxproj:
3927         * html/parser/AtomicHTMLToken.h:
3928         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3929         * html/parser/BackgroundHTMLParser.cpp:
3930         (WebCore::tokenExitsForeignContent):
3931         (WebCore::tokenExitsSVG):
3932         (WebCore::tokenExitsMath):
3933         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
3934         * html/parser/CSSPreloadScanner.cpp:
3935         (WebCore::CSSPreloadScanner::scan):
3936         * html/parser/CSSPreloadScanner.h:
3937         (WebCore):
3938         (CSSPreloadScanner):
3939         * html/parser/CompactHTMLToken.cpp:
3940         (SameSizeAsCompactHTMLToken):
3941         (WebCore::CompactHTMLToken::CompactHTMLToken):
3942         * html/parser/CompactHTMLToken.h:
3943         (WebCore::CompactHTMLToken::Attribute::Attribute):
3944         (Attribute):
3945         (WebCore::CompactHTMLToken::data):
3946         (WebCore::CompactHTMLToken::publicIdentifier):
3947         (CompactHTMLToken):
3948         * html/parser/HTMLDocumentParser.cpp:
3949         (WebCore::HTMLDocumentParser::startBackgroundParser):
3950         * html/parser/HTMLIdentifier.cpp: Added.
3951         (WebCore):
3952         (WebCore::identifierTable):
3953         (WebCore::HTMLIdentifier::hasIndex):
3954         (WebCore::HTMLIdentifier::findIndex):
3955         (WebCore::nameForIndex):
3956         (WebCore::HTMLIdentifier::asString):
3957         (WebCore::HTMLIdentifier::asStringImpl):
3958         (WebCore::HTMLIdentifier::addNames):
3959         (WebCore::HTMLIdentifier::init):
3960         * html/parser/HTMLIdentifier.h: Added.
3961         (WebCore):
3962         (HTMLIdentifier):
3963         (WebCore::HTMLIdentifier::HTMLIdentifier):
3964         (WebCore::HTMLIdentifier::isSafeToSendToAnotherThread):
3965         * html/parser/HTMLParserIdioms.cpp:
3966         (WebCore::threadSafeEqual):
3967         (WebCore::threadSafeMatch):
3968         * html/parser/HTMLParserIdioms.h:
3969         (WebCore):
3970         (WebCore::threadSafeHTMLNamesMatch):
3971         * html/parser/HTMLPreloadScanner.cpp:
3972         (WebCore::TokenPreloadScanner::tagIdFor):
3973         (WebCore::TokenPreloadScanner::StartTagScanner::match):
3974         (TokenPreloadScanner::StartTagScanner):
3975         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
3976         * html/parser/HTMLPreloadScanner.h:
3977
3978 2013-03-08  Brandon Jones  <bajones@google.com>
3979
3980         Check to ensure MultisampleRenderbuffer creation succeeds
3981         https://bugs.webkit.org/show_bug.cgi?id=111780
3982
3983         Reviewed by Dean Jackson.
3984
3985         On OSX systems using AMD graphics chips the allocation of large
3986         Multisample Renderbuffers in Chromium would fail without any indication
3987         of failure. Attempting to draw to the buffer resulted in garbage being
3988         rendered onscreen. This could be reproduced by opening a full-page
3989         WebGL app and pressing (Command + "-") several times. This patch adds an
3990         additional check during DrawingBuffer resize to verify that the resized
3991         buffer is valid. 
3992
3993         * platform/graphics/gpu/DrawingBuffer.cpp:
3994         (WebCore):
3995         (WebCore::DrawingBuffer::checkBufferIntegrity):
3996         (WebCore::DrawingBuffer::reset):
3997         * platform/graphics/gpu/DrawingBuffer.h:
3998         (DrawingBuffer):
3999
4000 2013-03-08  Harald Alvestrand  <hta@chromium.org>
4001
4002         Implemented new API for RTCStatsReport object.
4003         https://bugs.webkit.org/show_bug.cgi?id=110333
4004
4005         Removed RTCStatsElement object, moved its interface to
4006         RTCStatsReport. Preserved some interfaces for
4007         backwards compatibility; will be removed in a later patch.
4008
4009         Reviewed by Adam Barth.
4010
4011         Tested by extensions to RTCPeerConnection-stats test.
4012
4013         * Modules/mediastream/RTCStatsElement.cpp: Removed.
4014         * Modules/mediastream/RTCStatsElement.h: Removed.
4015         * Modules/mediastream/RTCStatsElement.idl: Removed.
4016         * Modules/mediastream/RTCStatsReport.cpp:
4017         (WebCore::RTCStatsReport::create):
4018         (WebCore::RTCStatsReport::RTCStatsReport):
4019         (WebCore):
4020         (WebCore::RTCStatsReport::names):
4021         (WebCore::RTCStatsReport::local):
4022         (WebCore::RTCStatsReport::remote):
4023         (WebCore::RTCStatsReport::addStatistic):
4024         (WebCore::RTCStatsReport::addElement):
4025         * Modules/mediastream/RTCStatsReport.h:
4026         (RTCStatsReport):
4027         (WebCore::RTCStatsReport::timestamp):
4028         (WebCore::RTCStatsReport::id):
4029         (WebCore::RTCStatsReport::stat):
4030         * Modules/mediastream/RTCStatsReport.idl:
4031         * Modules/mediastream/RTCStatsResponse.cpp:
4032         (WebCore::RTCStatsResponse::namedItem):
4033         (WebCore):
4034         (WebCore::RTCStatsResponse::addReport):
4035         (WebCore::RTCStatsResponse::addStatistic):
4036         * Modules/mediastream/RTCStatsResponse.h:
4037         (RTCStatsResponse):
4038         * Modules/mediastream/RTCStatsResponse.idl:
4039         * WebCore.gypi:
4040         * platform/chromium/support/WebRTCStatsResponse.cpp:
4041         (WebKit::WebRTCStatsResponse::addReport):
4042         (WebKit):
4043         (WebKit::WebRTCStatsResponse::addStatistic):
4044         (WebKit::WebRTCStatsResponse::addElement):
4045         * platform/mediastream/RTCStatsResponseBase.h:
4046         (RTCStatsResponseBase):
4047
4048 2013-03-08  Eric Seidel  <eric@webkit.org>
4049
4050         Free up background parser's checkpoints when speculation succeeds
4051         https://bugs.webkit.org/show_bug.cgi?id=110547
4052
4053         Reviewed by Adam Barth.
4054
4055         This should be a memory (and possible perf) win while parsing
4056         pages, as we will no longer hold multiple copies of every