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