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