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