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