419bb6cf9f0f5c679650376141a9275f9862d881
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-05  Andreas Kling  <akling@apple.com>
2
3         Cached Page and Frame don't need to be ref-counted.
4         <https://webkit.org/b/120710>
5
6         Reviewed by Anders Carlsson.
7
8         - CachedPage is owned by HistoryItem.
9         - CachedFrame is owned by CachedPage.
10
11         Remove the ref counting from these objects to make the code less confusing.
12
13         Added a new method:
14
15         - PassOwnPtr<CachedPage> PageCache::take(HistoryItem*)
16
17         ..which is what it looks like - a combined get() and remove() that transfers
18         ownership of the CachedPage to the caller.
19
20         This is used by commitProvisionalLoad() and invalidateCurrentItemCachedPage()
21         to accomplish in one swoop what they used to do in awkwardly spaced steps.
22
23         * history/CachedFrame.h:
24         (WebCore::CachedFrame::create):
25         * history/CachedPage.cpp:
26         (WebCore::CachedPage::create):
27         * history/CachedPage.h:
28         * history/HistoryItem.h:
29         * history/PageCache.cpp:
30         (WebCore::PageCache::take):
31         * history/PageCache.h:
32         * loader/FrameLoader.cpp:
33         (WebCore::FrameLoader::commitProvisionalLoad):
34         (WebCore::FrameLoader::transitionToCommitted):
35         * loader/FrameLoader.h:
36         * loader/HistoryController.cpp:
37         (WebCore::HistoryController::invalidateCurrentItemCachedPage):
38
39 2013-09-05  David Kilzer  <ddkilzer@apple.com>
40
41         BUILD FIX (r155108): Add SynchronousLoaderClientCFNet.cpp to Xcode project
42
43         * WebCore.xcodeproj/project.pbxproj: The iOS port defines
44         USE(CFNETWORK), so it needs to compile
45         SynchronousLoaderClientCFNet.cpp to build successfully.
46
47 2013-09-05  Anders Carlsson  <andersca@apple.com>
48
49         GCAssertions.h should use STL type traits and static_assert
50         https://bugs.webkit.org/show_bug.cgi?id=120785
51
52         Reviewed by Andreas Kling.
53
54         Update for JavaScriptCore changes.
55
56         * bindings/js/JSDOMBinding.cpp:
57         * bindings/js/JSImageConstructor.cpp:
58
59 2013-09-05  David Hyatt  <hyatt@apple.com>
60
61         Make RenderListItem inherit from RenderBlockFlow.
62         https://bugs.webkit.org/show_bug.cgi?id=120789
63
64         Reviewed by Beth Dakin.
65
66         * rendering/RenderListItem.cpp:
67         (WebCore::RenderListItem::RenderListItem):
68         (WebCore::RenderListItem::willBeDestroyed):
69         (WebCore::RenderListItem::willBeRemovedFromTree):
70         (WebCore::RenderListItem::layout):
71         (WebCore::RenderListItem::addOverflowFromChildren):
72         (WebCore::RenderListItem::computePreferredLogicalWidths):
73         (WebCore::RenderListItem::paint):
74         * rendering/RenderListItem.h:
75
76 2013-09-05  David Hyatt  <hyatt@apple.com>
77
78         Make RenderBlock have a protected constructor..
79         https://bugs.webkit.org/show_bug.cgi?id=120787
80
81         Reviewed by Beth Dakin.
82
83         Make sure nobody can create a RenderBlock directly. Make sure RenderBlockFlows
84         get made when a display:block/inline-block/compact/run-in is seen.
85
86         * html/HTMLDetailsElement.cpp:
87         (WebCore::HTMLDetailsElement::createRenderer):
88         * html/HTMLSummaryElement.cpp:
89         (WebCore::HTMLSummaryElement::createRenderer):
90         * rendering/RenderBlock.cpp:
91         (WebCore::RenderBlock::createAnonymous):
92         * rendering/RenderBlock.h:
93         * rendering/RenderObject.cpp:
94         (WebCore::RenderObject::createObject):
95
96 2013-09-05  David Hyatt  <hyatt@apple.com>
97
98         Add new RenderBlockFlow class
99         https://bugs.webkit.org/show_bug.cgi?id=120777
100
101         Reviewed by Simon Fraser.
102
103         This patch adds a new RenderBlockFlow class. The idea is to get all of the line/float/margin
104         code out of RenderBlock and into the subclass, and then we can make RenderBlock an abstract
105         base. This will save memory for all of the classes that derive from RenderBlock but have
106         their own layout systems (e.g., flexbox, grid, table), and it will let us tighten up
107         types to make it more clear when we're talking about block layout code vs. a more generic
108         block-level object that can have any kind of layout.
109
110         The only real change here is that isBlockFlow() has been renamed to isRenderBlockFlow() and
111         is now checking if the object is a RenderBlockFlow. All of the block subclasses have been patched
112         to be a RenderBlock or RenderBlockFlow.
113
114         * CMakeLists.txt:
115         * GNUmakefile.list.am:
116         * Target.pri:
117         * WebCore.vcxproj/WebCore.vcxproj:
118         * WebCore.xcodeproj/project.pbxproj:
119         * accessibility/AccessibilityRenderObject.cpp:
120         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
121         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
122         * dom/Position.cpp:
123         (WebCore::Position::isCandidate):
124         (WebCore::Position::getInlineBoxAndOffset):
125         (WebCore::Position::primaryDirection):
126         * dom/PositionIterator.cpp:
127         (WebCore::PositionIterator::isCandidate):
128         * editing/ApplyStyleCommand.cpp:
129         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
130         * editing/CompositeEditCommand.cpp:
131         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
132         * editing/Editor.cpp:
133         (WebCore::Editor::baseWritingDirectionForSelectionStart):
134         * editing/FrameSelection.cpp:
135         (WebCore::caretRenderer):
136         * editing/TextIterator.cpp:
137         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
138         * editing/TypingCommand.cpp:
139         (WebCore::TypingCommand::makeEditableRootEmpty):
140         * editing/htmlediting.cpp:
141         (WebCore::isBlockFlowElement):
142         * html/shadow/SliderThumbElement.cpp:
143         (WebCore::RenderSliderThumb::RenderSliderThumb):
144         * html/shadow/SliderThumbElement.h:
145         * rendering/LayoutState.cpp:
146         (WebCore::LayoutState::LayoutState):
147         * rendering/RenderBlock.cpp:
148         (WebCore::RenderBlock::layoutBlock):
149         (WebCore::RenderBlock::collapseMargins):
150         (WebCore::RenderBlock::selectionGaps):
151         (WebCore::RenderBlock::firstLineBoxBaseline):
152         (WebCore::RenderBlock::lastLineBoxBaseline):
153         (WebCore::RenderBlock::firstLineBlock):
154         (WebCore::findFirstLetterBlock):
155         (WebCore::shouldCheckLines):
156         (WebCore::RenderBlock::adjustForBorderFit):
157         * rendering/RenderBlock.h:
158         * rendering/RenderBlockFlow.cpp: Added.
159         (WebCore::RenderBlockFlow::RenderBlockFlow):
160         (WebCore::RenderBlockFlow::~RenderBlockFlow):
161         * rendering/RenderBlockFlow.h: Added.
162         (WebCore::toRenderBlockFlow):
163         * rendering/RenderBox.cpp:
164         (WebCore::RenderBox::computeRectForRepaint):
165         (WebCore::RenderBox::positionForPoint):
166         * rendering/RenderBoxModelObject.h:
167         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
168         * rendering/RenderDeprecatedFlexibleBox.cpp:
169         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
170         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
171         * rendering/RenderDetailsMarker.cpp:
172         (WebCore::RenderDetailsMarker::RenderDetailsMarker):
173         * rendering/RenderDetailsMarker.h:
174         * rendering/RenderFieldset.cpp:
175         (WebCore::RenderFieldset::RenderFieldset):
176         * rendering/RenderFieldset.h:
177         * rendering/RenderFileUploadControl.cpp:
178         (WebCore::RenderFileUploadControl::RenderFileUploadControl):
179         * rendering/RenderFileUploadControl.h:
180         * rendering/RenderFlowThread.cpp:
181         (WebCore::RenderFlowThread::RenderFlowThread):
182         * rendering/RenderFlowThread.h:
183         * rendering/RenderFullScreen.cpp:
184         * rendering/RenderInline.cpp:
185         (WebCore::RenderInline::computeRectForRepaint):
186         * rendering/RenderLineBoxList.cpp:
187         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
188         * rendering/RenderMeter.cpp:
189         (WebCore::RenderMeter::RenderMeter):
190         * rendering/RenderMeter.h:
191         * rendering/RenderMultiColumnBlock.cpp:
192         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
193         * rendering/RenderMultiColumnBlock.h:
194         * rendering/RenderObject.cpp:
195         (WebCore::RenderObject::computeRectForRepaint):
196         (WebCore::RenderObject::styleWillChange):
197         (WebCore::firstLineStyleForCachedUncachedType):
198         * rendering/RenderObject.h:
199         (WebCore::RenderObject::isBR):
200         (WebCore::RenderObject::isRenderBlockFlow):
201         * rendering/RenderObjectChildList.cpp:
202         (WebCore::RenderObjectChildList::insertChildNode):
203         * rendering/RenderProgress.cpp:
204         (WebCore::RenderProgress::RenderProgress):
205         * rendering/RenderProgress.h:
206         * rendering/RenderRegion.cpp:
207         (WebCore::RenderRegion::RenderRegion):
208         * rendering/RenderRegion.h:
209         * rendering/RenderRuby.cpp:
210         (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
211         * rendering/RenderRuby.h:
212         * rendering/RenderRubyBase.cpp:
213         (WebCore::RenderRubyBase::RenderRubyBase):
214         * rendering/RenderRubyBase.h:
215         * rendering/RenderRubyRun.cpp:
216         (WebCore::RenderRubyRun::RenderRubyRun):
217         * rendering/RenderRubyRun.h:
218         * rendering/RenderRubyText.cpp:
219         (WebCore::RenderRubyText::RenderRubyText):
220         * rendering/RenderRubyText.h:
221         * rendering/RenderTableCaption.cpp:
222         (WebCore::RenderTableCaption::RenderTableCaption):
223         * rendering/RenderTableCaption.h:
224         * rendering/RenderTableCell.cpp:
225         (WebCore::RenderTableCell::RenderTableCell):
226         * rendering/RenderTableCell.h:
227         * rendering/RenderTextControl.cpp:
228         (WebCore::RenderTextControl::RenderTextControl):
229         * rendering/RenderTextControl.h:
230         * rendering/RenderTextControlSingleLine.h:
231         (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
232         * rendering/RenderTextTrackCue.cpp:
233         (WebCore::RenderTextTrackCue::RenderTextTrackCue):
234         * rendering/RenderTextTrackCue.h:
235         * rendering/RenderView.cpp:
236         (WebCore::RenderView::RenderView):
237         * rendering/RenderView.h:
238         * rendering/svg/RenderSVGBlock.cpp:
239         (WebCore::RenderSVGBlock::RenderSVGBlock):
240         * rendering/svg/RenderSVGBlock.h:
241
242 2013-09-05  Tim Horton  <timothy_horton@apple.com>
243
244         iOS build broke with change to make Mac use PDFKit for PDFDocumentImage
245         https://bugs.webkit.org/show_bug.cgi?id=120771
246
247         Reviewed by Anders Carlsson.
248
249         * platform/graphics/cg/PDFDocumentImage.cpp:
250         (WebCore::PDFDocumentImage::createPDFDocument):
251         Use the (removed in r155069) PLATFORM(MAC) way of making a CGDataProvider from a SharedBuffer
252         everywhere; this is what iOS was expecting to use (where I accidentally changed behavior),
253         and it should also work for Windows, the only other USE(CG) platform.
254
255         Since we only createPDFDocument() after all data has been received, I'm not
256         restoring the comment about the SharedBuffer being secretly written to behind its back.
257
258 2013-09-04  Dean Jackson  <dino@apple.com>
259
260         Rename supportsContext to probablySupportsContext
261         https://bugs.webkit.org/show_bug.cgi?id=120716
262         <rdar://problem/14914499>
263
264         Reviewed by Antoine Quint.
265
266         As decided in: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-September/040680.html
267
268         * bindings/js/JSHTMLCanvasElementCustom.cpp:
269         (WebCore::JSHTMLCanvasElement::probablySupportsContext):
270         * html/HTMLCanvasElement.cpp:
271         (WebCore::HTMLCanvasElement::probablySupportsContext):
272         * html/HTMLCanvasElement.h:
273         * html/HTMLCanvasElement.idl:
274
275 2013-09-05  Joseph Pecoraro  <pecoraro@apple.com>
276
277         Fix build warning about unused variable.
278
279         Unreviewed build fix.
280
281         * bindings/js/ScriptDebugServer.cpp:
282         (WebCore::ScriptDebugServer::evaluateBreakpointAction):
283
284 2013-09-05  Anders Carlsson  <andersca@apple.com>
285
286         Enable C++11 wherever we build C++ files that include wtf/Platform.h
287         https://bugs.webkit.org/show_bug.cgi?id=120782
288
289         Reviewed by Andreas Kling.
290
291         Pass -std=gnu++11 when preprocessing wtf/Platform.h.
292
293         * DerivedSources.make:
294
295 2013-09-05  Joseph Pecoraro  <pecoraro@apple.com>
296
297         Web Inspector: Breakpoint Actions
298         https://bugs.webkit.org/show_bug.cgi?id=120576
299
300         Reviewed by Timothy Hatcher.
301
302         Tests: inspector-protocol/debugger/setBreakpoint-actions.html
303                inspector-protocol/debugger/setBreakpoint-options-exception.html
304
305         * inspector/ScriptBreakpoint.h:
306         (WebCore::ScriptBreakpointAction::ScriptBreakpointAction):
307         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
308         Struct for a breakpoint action. Type and string of data.
309
310         * bindings/js/ScriptDebugServer.h:
311         * bindings/js/ScriptDebugServer.cpp:
312         (WebCore::ScriptDebugServer::hasBreakpoint):
313         (WebCore::ScriptDebugServer::evaluateBreakpointAction):
314         (WebCore::ScriptDebugServer::evaluateBreakpointActions):
315         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
316         (WebCore::ScriptDebugServer::pauseIfNeeded):
317         When a breakpoint is triggered evaluate each of its breakpoint
318         actions in order. If there are exceptions, log them.
319
320         * inspector/Inspector.json:
321         * inspector/InspectorDebuggerAgent.cpp:
322         (WebCore::buildObjectForBreakpointCookie):
323         (WebCore::InspectorDebuggerAgent::didParseSource):
324         Save and restore breakpoint actions where needed.
325
326         (WebCore::breakpointActionTypeForString):
327         (WebCore::breakpointActionsFromProtocol):
328         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
329         (WebCore::InspectorDebuggerAgent::setBreakpoint):
330         Parse optional breakpoint actions from the protocol into
331         ScriptBreakpointAction objects.
332
333 2013-09-05  Simon Fraser  <simon.fraser@apple.com>
334
335         Fix repaint issue on "paints into ancestor" filtered layers
336         https://bugs.webkit.org/show_bug.cgi?id=120780
337
338         Reviewed by Tim Horton.
339         
340         When a repaint happened on a layer with a filter, and which paints into
341         its compositing ancestor, we'd repaint the wrong layer (and assert).
342         
343         Fix by ensuring that RenderLayer::enclosingFilterLayer() takes paintsIntoCompositedAncestor()
344         into account, by adding a function that we share between three callers who
345         check isComposited() && !paintsIntoCompositedAncestor(). I didn't use a function
346         on RenderLayer, because I wanted it to be inline but to not #include RenderLayerBacking
347         in RenderLayer.h.
348
349         Test: compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html
350
351         * dom/Node.cpp: Drive-by removal of #include "RenderLayer.h"
352         * rendering/RenderLayer.cpp: 
353         (WebCore::compositedWithOwnBackingStore):
354         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
355         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
356         (WebCore::RenderLayer::clippingRootForPainting):
357
358 2013-09-05  Brent Fulgham  <bfulgham@apple.com>
359
360         [Windows] Unreviewed build/link improvement after r155127 to be
361         consistent about using debug-build support libraries.
362
363         Now that <rdar://problem/9898937> is resolved, we should be linking
364         to debug AVFoundationCF as well.
365
366         * page/CaptionUserPreferencesMediaAF.cpp: Link to AVFoundationCF_debug
367         when building with the DEBUG_ALL target.
368         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Ditto.
369         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Ditto.
370
371 2013-09-04  Anders Carlsson  <andersca@apple.com>
372
373         Vector::releaseBuffer should return an OwnPtr
374         https://bugs.webkit.org/show_bug.cgi?id=120718
375
376         Reviewed by Andreas Kling.
377
378         Change FormStreamFields::currentData to an OwnPtr.
379
380         * platform/network/cf/FormDataStreamCFNet.cpp:
381         (WebCore::closeCurrentStream):
382         (WebCore::advanceCurrentStream):
383         (WebCore::formCreate):
384
385 2013-09-05  Andreas Kling  <akling@apple.com>
386
387         Reverting "Cached Page and Frame don't need to be ref-counted.
388         <https://webkit.org/b/120758>
389
390         This didn't work so well on Qt bots. Will have to take bigger steps
391         here instead of iterating.
392
393         * history/CachedFrame.h:
394         (WebCore::CachedFrame::create):
395         * history/CachedPage.cpp:
396         (WebCore::CachedPage::create):
397         * history/CachedPage.h:
398         * history/HistoryItem.h:
399         * loader/FrameLoader.cpp:
400         (WebCore::FrameLoader::commitProvisionalLoad):
401         (WebCore::FrameLoader::transitionToCommitted):
402         * loader/FrameLoader.h:
403
404 2013-09-04  Anders Carlsson  <andersca@apple.com>
405
406         Animations in an AnimationList are never null
407         https://bugs.webkit.org/show_bug.cgi?id=120720
408
409         Reviewed by Andreas Kling.
410
411         Change AnimationList::operator[] to return an Animation& and fix up related code to also take references.
412
413         * css/CSSComputedStyleDeclaration.cpp:
414         * css/DeprecatedStyleBuilder.cpp:
415         * page/animation/CompositeAnimation.cpp:
416         * page/animation/KeyframeAnimation.cpp:
417         * platform/animation/Animation.h:
418         * platform/animation/AnimationList.cpp:
419         * platform/animation/AnimationList.h:
420         * rendering/RenderLayerBacking.cpp:
421
422 2013-09-05  Antti Koivisto  <antti@apple.com>
423
424         Call createTextRenderersForSiblingsAfterAttachIfNeeded only for the attach root
425         https://bugs.webkit.org/show_bug.cgi?id=120770
426
427         Reviewed by Andreas Kling.
428
429         There is no need to call this during recursive attach as siblings are going to be attached normally anyway.
430         Move call sites to attach roots only.
431
432         * style/StyleResolveTree.cpp:
433         (WebCore::Style::createTextRenderersForSiblingsAfterAttachIfNeeded):
434         
435             Factor to take reference and do the inital tests itself.
436
437         (WebCore::Style::createTextRendererIfNeeded):
438         (WebCore::Style::updateTextRendererAfterContentChange):
439         (WebCore::Style::attachChildren):
440         
441             Also tightened the condition where previously attached children may be encountered.
442
443         (WebCore::Style::attachRenderTree):
444         (WebCore::Style::resolveLocal):
445         (WebCore::Style::updateTextStyle):
446         (WebCore::Style::reattachRenderTree):
447
448 2013-09-05  Enrique Ocaña González  <eocanha@igalia.com>
449
450         [GTK] Assertion fails when the mouse pointer is styled with a custom cursor
451         https://bugs.webkit.org/show_bug.cgi?id=118905
452
453         Reviewed by Philippe Normand.
454
455         Checked that the custom cursor image and its pixbuf is valid and create a null
456         cursor otherwise.
457
458         * platform/gtk/CursorGtk.cpp:
459         (WebCore::createCustomCursor):
460
461 2013-09-05  Praveen R Jadhav  <praveen.j@samsung.com>
462
463         Precision updates in WebAudio.
464         https://bugs.webkit.org/show_bug.cgi?id=119739
465
466         Reviewed by Philippe Normand.
467
468         WebAudio Specification suggests to use 'double' datatypes
469         for minDecibels, maxDecibels and smoothingTimeConstant in
470         AnalyserNode.idl and currentTime in AudioContext.idl.
471         Current WebKit implementation has declared these attributes
472         as 'float' type.
473
474         Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioContext-section
475               https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AnalyserNode
476
477         No new tests, covered by existing tests.
478
479         * Modules/webaudio/AnalyserNode.cpp:
480         (WebCore::AnalyserNode::setMinDecibels):
481         (WebCore::AnalyserNode::setMaxDecibels):
482         (WebCore::AnalyserNode::setSmoothingTimeConstant):
483         * Modules/webaudio/AnalyserNode.h:
484         (WebCore::AnalyserNode::minDecibels):
485         (WebCore::AnalyserNode::maxDecibels):
486         (WebCore::AnalyserNode::smoothingTimeConstant):
487         * Modules/webaudio/AnalyserNode.idl:
488         * Modules/webaudio/AudioContext.idl:
489         * Modules/webaudio/RealtimeAnalyser.h:
490         (WebCore::RealtimeAnalyser::setMinDecibels):
491         (WebCore::RealtimeAnalyser::minDecibels):
492         (WebCore::RealtimeAnalyser::setMaxDecibels):
493         (WebCore::RealtimeAnalyser::maxDecibels):
494         (WebCore::RealtimeAnalyser::setSmoothingTimeConstant):
495         (WebCore::RealtimeAnalyser::smoothingTimeConstant):
496
497 2013-09-05  Mihnea Ovidenie  <mihnea@adobe.com>
498
499         Replace node() calls with generatingNode() for RenderRegion code
500         https://bugs.webkit.org/show_bug.cgi?id=120397
501
502         Reviewed by Darin Adler.
503
504         As regions will become anonymous blocks nested inside elements with the flow-from property, a first step
505         would be to change the calls to node() with calls to generatingNode(). In the case of regions, generatingNode()
506         will always return an Element* and not a Node*. Therefore, to get rid of toElement() casts, i created
507         a specific method RenderRegion::generatingElement that will return the generating node as Element.
508         No new tests as no functional change was introduced.
509
510         Original patch by Catalin Badea.
511
512         * css/ElementRuleCollector.cpp:
513         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
514         * dom/WebKitNamedFlow.cpp:
515         (WebCore::WebKitNamedFlow::getRegionsByContent):
516         (WebCore::WebKitNamedFlow::getRegions):
517         * rendering/RenderRegion.cpp:
518         (WebCore::RenderRegion::regionOversetState):
519         (WebCore::RenderRegion::setRegionOversetState):
520         (WebCore::RenderRegion::checkRegionStyle):
521         * rendering/RenderRegion.h:
522         (WebCore::RenderRegion::generatingElement):
523         * rendering/RenderTreeAsText.cpp:
524         (WebCore::writeRenderRegionList): For pseudo-elements as regions, i want to print
525         {pseudo} instead of {div} marker for the parent.
526
527 2013-09-05  Csaba Osztrogonác  <ossy@webkit.org>
528
529         Fix SynchronousLoaderClient class for !USE(CFNETWORK) platforms
530         https://bugs.webkit.org/show_bug.cgi?id=120532
531
532         Reviewed by Darin Adler.
533
534         * CMakeLists.txt:
535         * PlatformEfl.cmake:
536         * PlatformGTK.cmake:
537         * WebCore.vcxproj/WebCore.vcxproj:
538         * WebCore.vcxproj/WebCore.vcxproj.filters:
539         * platform/network/SynchronousLoaderClient.cpp:
540         * platform/network/cf/SynchronousLoaderClientCFNet.cpp: Added.
541         (WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
542         (WebCore::SynchronousLoaderClient::platformBadResponseError):
543         * platform/network/soup/SynchronousLoaderClientSoup.cpp: Added.
544         (WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
545         (WebCore::SynchronousLoaderClient::platformBadResponseError):
546
547 2013-09-05  Jinwoo Song  <jinwoo7.song@samsung.com>
548
549         Fix unused parameter warning in WebKitAccessibleInterfaceText.cpp
550         <https://webkit.org/b/120761>
551
552         Reviewed by Gyuyoung Kim.
553
554         Fix warning by removing unused parameter.
555
556         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
557         (sentenceAtPositionForAtkBoundary):
558
559 2013-09-05  Dirk Schulze  <krit@webkit.org>
560
561         NULL ptr in WebCore::RefCountedPropertyWrapper<WebCore::ClipPathOperation>::blend
562         https://bugs.webkit.org/show_bug.cgi?id=105408
563
564         Reviewed by Dean Jackson.
565
566         Adding an early return if from or to clip-path values are 'none'. According to the
567         specification we shall just interpolate between two basic shapes.
568
569         http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation
570
571         * page/animation/CSSPropertyAnimation.cpp:
572         (WebCore::blendFunc):
573
574 2013-09-05  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
575
576         [Qt][WK1] REGRESSION(r154988): compositing/video/video-with-invalid-source.html
577         https://bugs.webkit.org/show_bug.cgi?id=120683
578
579         Reviewed by Philippe Normand.
580
581         Do not set pipeline state to NULL on MediaPlayerPrivateGStreamer::loadingFailed()
582         otherwise the bus is flushed and we never get a GST_MESSAGE_ERROR when failing to
583         load uris.
584         Also restore previous behaviour (before r154988) of not invoking loadingFailed() for
585         all failed manual state change attempts.
586
587         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
588         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
589         Do not call loadingFailed() if state change fails as all manual state changes are
590         now done with changePipelineState().
591         (WebCore::MediaPlayerPrivateGStreamer::play):
592         (WebCore::MediaPlayerPrivateGStreamer::pause):
593         (WebCore::MediaPlayerPrivateGStreamer::seek):
594         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
595         Restore previous behaviour (before changeset r154988) when calling changePipelineState().
596         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
597         Do nothing if changing to READY on EOS (same behaviour as setting to NULL as it was before
598         changeset r154988).
599         (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
600         Do not set pipeline state to NULL so we properly get GST_MESSAGE_ERROR on loading failures.
601
602 2013-09-05  Alberto Garcia  <berto@igalia.com>
603
604         [GTK] MediaControlsGtk: fix warning in constructor due to incorrect order of attributes
605         https://bugs.webkit.org/show_bug.cgi?id=120703
606
607         Reviewed by Carlos Garcia Campos.
608
609         Fix member initialization so it matches their declaration [-Wreorder].
610
611         * html/shadow/MediaControlsGtk.cpp:
612         (WebCore::MediaControlsGtk::MediaControlsGtk):
613
614 2013-09-04  Dirk Schulze  <krit@webkit.org>
615
616         Support interpolation between cross-fade() images
617         https://bugs.webkit.org/show_bug.cgi?id=119955
618
619         Reviewed by Darin Adler.
620
621         With this patch, CSS can animate from one -webkit-cross-fade
622         function to another, when the input images are the same in the
623         same order.
624
625         * css/CSSCrossfadeValue.cpp: Added blend function.
626         (WebCore::blendFunc):
627         (WebCore::CSSCrossfadeValue::blend):
628         (WebCore::CSSCrossfadeValue::equals):
629         (WebCore::CSSCrossfadeValue::equalInputImages):
630         * css/CSSCrossfadeValue.h: Added save casting functions.
631         (WebCore::toCSSCrossfadeValue):
632         * css/CSSValue.h:
633         (WebCore::CSSValue::isCrossfadeValue):
634         * page/animation/CSSPropertyAnimation.cpp: Add another condition to
635             interpolate between two -webkit-cross-fade functions.
636         (WebCore::blendFunc):
637
638 2013-09-04  Zoltan Herczeg  <zherczeg@webkit.org>
639
640         <https://webkit.org/b/118553> Hash navigation doesn't affect history when the page is retrieved from appcache
641
642         Reviewed by Darin Adler.
643
644         A new flag called keepInHistory is added to allow keeping
645         certain pages in the history even if they have substitute data.
646
647         Test: http/tests/appcache/history-test.html
648
649         * loader/DocumentLoader.cpp:
650         (WebCore::DocumentLoader::urlForHistory):
651         * loader/SubstituteData.h:
652         (WebCore::SubstituteData::SubstituteData):
653         (WebCore::SubstituteData::shouldRevealToSessionHistory):
654         (WebCore::SubstituteData::setShouldRevealToSessionHistory):
655         * loader/appcache/ApplicationCacheHost.cpp:
656         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
657
658 2013-09-04  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
659
660         Remove deprecated markersForNode(Node* node).
661         https://bugs.webkit.org/show_bug.cgi?id=120679
662
663         Reviewed by Ryosuke Niwa.
664
665         DocumentMarkerController::markersForNode(Node* node) has been marked as
666         deprecated in favor of markersFor(Node*, MarkerTypes = AllMarkers()).
667
668         No new tests, no behavior change.
669
670         * dom/DocumentMarkerController.cpp:
671         * dom/DocumentMarkerController.h:
672         Remove never used markersForNode(Node*).
673
674 2013-09-04  Andreas Kling  <akling@apple.com>
675
676         CachedPage construction should begin with a Page&.
677         <https://webkit.org/b/120721>
678
679         Reviewed by Anders Carlsson.
680
681         We can't create a CachedPage from a null Page anyway.
682
683         * history/CachedPage.cpp:
684         (WebCore::CachedPage::create):
685         (WebCore::CachedPage::CachedPage):
686         (WebCore::CachedPage::restore):
687         * history/CachedPage.h:
688         * history/PageCache.cpp:
689         (WebCore::PageCache::add):
690         * history/PageCache.h:
691         * loader/FrameLoader.cpp:
692         (WebCore::FrameLoader::commitProvisionalLoad):
693
694 2013-09-04  Arpita Bahuguna  <a.bah@samsung.com>
695
696         setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
697         https://bugs.webkit.org/show_bug.cgi?id=120293
698
699         Reviewed by Darin Adler.
700
701         setAttributeNode() performs a case-insensitive search for an existing
702         attribute. If an existing attribute is found, it retrieves the index of
703         such an attribute. For setting the attribute's new value, we call upon
704         setAttributeInternal() to which both the index as well as the name of
705         the attribute is passed.
706         The name passed to this method is the same as the one passed to the
707         setAttributeNode() API from the webpage and thus can be in any case.
708
709         However, setAttributeInternal() uses this name to get the corresponding
710         existing attribute node. Since this retrieval is not case-insensitive,
711         the existing node is not returned and thus the new value is not set on
712         the existing node.
713         We should instead use the passed index and use that to retrieve the
714         existing node.
715
716         Note that obtaining the attribute's value using getAttributeNode() would
717         still return the correct value, i.e. the new one.
718
719         Also, this change shall make our behavior similar to that of FF and IE.
720
721         Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
722
723         * dom/Element.cpp:
724         (WebCore::Element::setAttributeInternal):
725         If the passed index is not equal to attributeNotFound, we use that index
726         to retrieve the existing attribute.
727
728 2013-09-04  Andreas Kling  <akling@apple.com>
729
730         CachedFrame construction should begin with a Frame&.
731         <https://webkit.org/b/120719>
732
733         Reviewed by Anders Carlsson.
734
735         We can't create a CachedFrame from a null Frame anyway.
736
737         * bindings/js/ScriptCachedFrameData.cpp:
738         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
739         (WebCore::ScriptCachedFrameData::restore):
740         * bindings/js/ScriptCachedFrameData.h:
741         * history/CachedFrame.cpp:
742         (WebCore::CachedFrameBase::CachedFrameBase):
743         (WebCore::CachedFrameBase::restore):
744         (WebCore::CachedFrame::CachedFrame):
745         * history/CachedFrame.h:
746         (WebCore::CachedFrame::create):
747         * history/CachedPage.cpp:
748         (WebCore::CachedPage::CachedPage):
749
750 2013-09-04  Andreas Kling  <akling@apple.com>
751
752         Set "render tree being torn down" flag a bit earlier.
753         <https://webkit.org/b/120717>
754
755         Reviewed by Anders Carlsson.
756
757         Set the flag at the start of Document::detach() so everyone can get a chance
758         to avoid unnecessary work, not just renderers.
759
760         * dom/Document.cpp:
761         (WebCore::Document::detach):
762
763 2013-09-04  Andreas Kling  <akling@apple.com>
764
765         Cached Page and Frame don't need to be ref-counted.
766         <https://webkit.org/b/120710>
767
768         Reviewed by Anders Carlsson.
769
770         - CachedPage is owned by HistoryItem.
771         - CachedFrame is owned by CachedPage.
772
773         Remove the ref counting from these objects to make the code less confusing.
774
775         The only place that used this was in FrameLoader::commitProvisionalLoad() which
776         took a temporary ref on the CachedPage. Switched this to using a raw pointer.
777
778         * history/CachedFrame.h:
779         (WebCore::CachedFrame::create):
780         * history/CachedPage.cpp:
781         (WebCore::CachedPage::create):
782         * history/CachedPage.h:
783         * history/HistoryItem.h:
784         * loader/FrameLoader.cpp:
785         (WebCore::FrameLoader::commitProvisionalLoad):
786         (WebCore::FrameLoader::transitionToCommitted):
787         * loader/FrameLoader.h:
788
789 2013-09-04  Roger Fong  <roger_fong@apple.com>
790
791         Link to libdispatch_debug.lib when using DebugSuffix configuration.
792         https://bugs.webkit.org/show_bug.cgi?id=120712.
793         <rdar://problem/14883216>.
794
795         Reviewed by Brent Fulgham.
796
797         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
798
799 2013-09-04  Roger Fong  <roger_fong@apple.com>
800
801         Unreviewed. Windows build fix and WebCore project cleanup.
802
803         * WebCore.vcxproj/WebCore.vcxproj.filters:
804         * rendering/RenderingAllInOne.cpp:
805
806 2013-09-04  Mark Lam  <mark.lam@apple.com>
807
808         Renamed StackIterator to StackVisitor.
809         https://bugs.webkit.org/show_bug.cgi?id=120706.
810
811         Reviewed by Geoffrey Garen.
812
813         No new tests.
814
815         * ForwardingHeaders/interpreter/StackIterator.h: Removed.
816         * ForwardingHeaders/interpreter/StackVisitor.h: Copied from Source/WebCore/ForwardingHeaders/interpreter/StackIterator.h.
817         * bindings/js/JSXMLHttpRequestCustom.cpp:
818         (WebCore::SendFunctor::operator()):
819         * bindings/js/ScriptCallStackFactory.cpp:
820         (WebCore::CreateScriptCallStackFunctor::operator()):
821         (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
822
823 2013-09-04  Samuel White  <samuel_white@apple.com>
824
825         AX: when no other label on provided on form elements, WebKit should fall back to using @title
826         https://bugs.webkit.org/show_bug.cgi?id=112842
827
828         Reviewed by Chris Fleizach.
829
830         Don't let input elements include empty labels in their accessibility title.
831
832         Test: platform/mac/accessibility/input-title.html
833
834         * accessibility/AccessibilityNodeObject.cpp:
835         (WebCore::AccessibilityNodeObject::titleElementText):
836
837 2013-09-04  Andreas Kling  <akling@apple.com>
838
839         Make ImageQualityController per-RenderView.
840         <https://webkit.org/b/120702>
841
842         Reviewed by Anders Carlsson.
843
844         Move ImageQualityController to its own files and add a RenderView::imageQualityController()
845         getter instead of using a global map for all render trees.
846
847         This avoids having to unregister every renderer (well, every RenderBoxModelObject) from the
848         global hash map during render tree teardown.
849
850         It also simplifies the live resize optimization a bit since it can now short-circuit if
851         the RenderView's FrameView is being resized. (Previously there could be any number of
852         RenderViews present in the map.)
853
854         * CMakeLists.txt:
855         * GNUmakefile.list.am:
856         * Target.pri:
857         * WebCore.vcxproj/WebCore.vcxproj:
858         * WebCore.xcodeproj/project.pbxproj:
859         * rendering/ImageQualityController.cpp: Added.
860         * rendering/ImageQualityController.h: Added.
861
862 2013-09-04  Roger Fong  <roger_fong@apple.com>
863
864         Unreviewed Build fix for Windows DebugSuffix configuration.
865
866         * WebCore.vcxproj/WebCore.vcxproj:
867         * WebCore.vcxproj/WebCore.vcxproj.filters:
868
869 2013-09-04  Mark Lam  <mark.lam@apple.com>
870
871         Refining the StackIterator callback interface.
872         https://bugs.webkit.org/show_bug.cgi?id=120695.
873
874         Reviewed by Geoffrey Garen.
875
876         No new tests.
877
878         * bindings/js/JSXMLHttpRequestCustom.cpp:
879         (WebCore::SendFunctor::SendFunctor):
880         (WebCore::SendFunctor::line):
881         (WebCore::SendFunctor::url):
882         (WebCore::SendFunctor::operator()):
883         (WebCore::JSXMLHttpRequest::send):
884         * bindings/js/ScriptCallStackFactory.cpp:
885         (WebCore::createScriptCallStack):
886
887 2013-09-04  Andreas Kling  <akling@apple.com>
888
889         Remove unnecessary RenderView.h inclusion from headers.
890         <https://webkit.org/b/120365>
891
892         Reviewed by Anders Carlsson.
893
894         RenderView.h was overzealously included by RenderText and RenderTextTrackCue,
895         making it unpleasant to edit on my laptop.
896
897         * rendering/RenderText.h:
898         * rendering/RenderTextTrackCue.h:
899
900             Don't include RenderView.h here, do it in .cpp files.
901
902 2013-09-04  Alexey Proskuryakov  <ap@apple.com>
903
904         Editor::m_removedAnchor is unused
905         https://bugs.webkit.org/show_bug.cgi?id=120701
906
907         Reviewed by Ryosuke Niwa.
908
909         * editing/Editor.h: Removed m_removedAnchor. It was not only unused, but also broken,
910         as we didn't reset it when navigating.
911
912 2013-09-04  Pratik Solanki  <psolanki@apple.com>
913
914         Document::updateHoverActiveState() should allow for deferred style recalcs
915         https://bugs.webkit.org/show_bug.cgi?id=120700
916
917         Reviewed by Simon Fraser.
918
919         Add an extra argument to Document::updateHoverActiveState() to specify if a style recalc
920         should be done. The default value keeps the current behavior of doing a style recalc. iOS
921         touch handling code will pass in DeferRecalcStyleIfNeeded to avoid the work.
922
923         No new tests because no functional changes.
924
925         * dom/Document.cpp:
926         (WebCore::Document::updateHoverActiveState):
927         * dom/Document.h:
928
929 2013-09-04  Tim Horton  <timothy_horton@apple.com>
930
931         [mac] PDFDocumentImage should use PDFKit to draw
932         https://bugs.webkit.org/show_bug.cgi?id=120651
933         <rdar://problem/12810731>
934
935         Reviewed by Alexey Proskuryakov.
936
937         Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
938
939         Test: fast/images/pdf-as-image-with-annotations.html
940
941         * WebCore.xcodeproj/project.pbxproj:
942         Add PDFDocumentImageMac.mm.
943
944         * platform/graphics/cg/PDFDocumentImage.cpp:
945         (WebCore::PDFDocumentImage::PDFDocumentImage):
946         We don't need to initialize m_document anymore because it's now a RetainPtr.
947         Initialize m_hasPage to false.
948
949         (WebCore::PDFDocumentImage::~PDFDocumentImage):
950         We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
951
952         (WebCore::PDFDocumentImage::size):
953         Use expandedIntSize for explicitness.
954
955         (WebCore::PDFDocumentImage::applyRotationForPainting):
956         Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
957         We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
958         Also, explicitly use std::min instead of importing the whole std namespace.
959
960         (WebCore::PDFDocumentImage::dataChanged):
961         Assert that we don't re-enter dataChanged after we've created a document,
962         because it seems like that shouldn't happen - we only create a document when
963         we've supposedly received all data, and it would be nice if we didn't have
964         all this varying code to deal with SharedBuffers changing out from under each other.
965         Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
966         replace it with a different implementation that creates a PDFDocument.
967
968         (WebCore::PDFDocumentImage::setCurrentPage):
969         Make all page-number-related things unsigned, since they are in CG and PDFKit,
970         and add m_hasPage to denote whether we've acquired a valid page yet.
971         Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
972         Remove setCurrentPage itself, as we never use a page other than the first page;
973         we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
974
975         (WebCore::PDFDocumentImage::draw):
976         Fix a weird comment.
977         Factor code that actually draws the PDF out into drawPDFPage.
978
979         The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
980
981         (WebCore::PDFDocumentImage::createPDFDocument):
982         Factored out of dataChanged(); I only kept the !PLATFORM(MAC) branch.
983
984         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
985         Factored out of setCurrentPage().
986         Use deg2rad since we have it.
987
988         (WebCore::PDFDocumentImage::pageCount):
989         (WebCore::PDFDocumentImage::drawPDFPage):
990         Factored out of draw().
991         Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
992
993         * platform/graphics/cg/PDFDocumentImage.h:
994         Unindent all the things, as we don't indent the first level inside a namespace scope.
995         Forward-declare PDFDocument.
996         Make m_currentPage unsigned as it should be.
997         Add m_hasPage.
998         Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.
999
1000         * platform/graphics/mac/PDFDocumentImageMac.mm: Added.
1001         Soft-link in PDFKit and specifically the PDFDocument class.
1002
1003         (WebCore::PDFDocumentImage::createPDFDocument):
1004         Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
1005         (with respect to the SharedBuffer's data being appended to in secret), because we've waited
1006         for the document to finish loading before getting here.
1007
1008         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
1009         Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
1010         Ask PDFKit for the page's rotation.
1011
1012         (WebCore::PDFDocumentImage::pageCount):
1013         Ask PDFKit for the page count.
1014
1015         (WebCore::PDFDocumentImage::drawPDFPage):
1016         Paint the current page of the PDF. Note that we do not apply the rotation here
1017         via applyRotationForPainting because PDFKit will do it itself.
1018
1019         * platform/mac/SoftLinking.h:
1020         I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
1021         so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
1022         of the umbrella framework and the subframework, so I could use it to soft link
1023         Quartz.framework's PDFKit.framework.
1024
1025 2013-09-04  Roger Fong  <roger_fong@apple.com>
1026
1027         Unreviewed Windows build fix.
1028
1029         * WebCore.vcxproj/WebCoreCommon.props:
1030
1031 2013-09-04  Bem Jones-Bey  <bjonesbe@adobe.com>
1032
1033         FloatingObjects should manage cleaning it's line box tree pointers itself
1034         https://bugs.webkit.org/show_bug.cgi?id=120692
1035
1036         Reviewed by David Hyatt.
1037
1038         This is another step in properly encapsulating FloatingObjects.
1039         Instead of having RenderBlock walk and clear the line box tree
1040         pointers, create a method for the behavior, and have RenderBlock call
1041         that.
1042
1043         In addtion, add a proper destructor to FloatingObjects, so that
1044         RenderBlock does not have to explicitly delete the set in
1045         FloatingObjects.
1046
1047         And as a bonus, fix the ordering of an if to avoid the expensive
1048         descendantChild check.
1049
1050         This is a port of a Blink patch by Eric Seidel.
1051
1052         No new tests, no behavior change.
1053
1054         * rendering/RenderBlock.cpp:
1055         (WebCore::RenderBlock::~RenderBlock):
1056         (WebCore::RenderBlock::deleteLineBoxTree):
1057         (WebCore::RenderBlock::repaintOverhangingFloats):
1058         (WebCore::RenderBlock::FloatingObjects::~FloatingObjects):
1059         (WebCore::RenderBlock::FloatingObjects::clearLineBoxTreePointers):
1060         (WebCore::RenderBlock::FloatingObjects::clear):
1061         * rendering/RenderBlock.h:
1062
1063 2013-09-04  Tim Horton  <timothy_horton@apple.com>
1064
1065         Rename customCssText -> customCSSText to match WebKit style
1066         https://bugs.webkit.org/show_bug.cgi?id=120694
1067
1068         Reviewed by Simon Fraser.
1069
1070         No new tests, just a rename.
1071
1072         * WebCore.order:
1073         * css/CSSAspectRatioValue.cpp:
1074         (WebCore::CSSAspectRatioValue::customCSSText):
1075         * css/CSSAspectRatioValue.h:
1076         * css/CSSBorderImageSliceValue.cpp:
1077         (WebCore::CSSBorderImageSliceValue::customCSSText):
1078         * css/CSSBorderImageSliceValue.h:
1079         * css/CSSCalculationValue.cpp:
1080         (WebCore::CSSCalcValue::customCSSText):
1081         (WebCore::CSSCalcPrimitiveValue::customCSSText):
1082         (WebCore::CSSCalcBinaryOperation::customCSSText):
1083         * css/CSSCalculationValue.h:
1084         * css/CSSCanvasValue.cpp:
1085         (WebCore::CSSCanvasValue::customCSSText):
1086         * css/CSSCanvasValue.h:
1087         * css/CSSCrossfadeValue.cpp:
1088         (WebCore::CSSCrossfadeValue::customCSSText):
1089         * css/CSSCrossfadeValue.h:
1090         * css/CSSCursorImageValue.cpp:
1091         (WebCore::CSSCursorImageValue::customCSSText):
1092         * css/CSSCursorImageValue.h:
1093         * css/CSSFilterImageValue.cpp:
1094         (WebCore::CSSFilterImageValue::customCSSText):
1095         * css/CSSFilterImageValue.h:
1096         * css/CSSFontFaceSrcValue.cpp:
1097         (WebCore::CSSFontFaceSrcValue::customCSSText):
1098         * css/CSSFontFaceSrcValue.h:
1099         * css/CSSFunctionValue.cpp:
1100         (WebCore::CSSFunctionValue::customCSSText):
1101         * css/CSSFunctionValue.h:
1102         * css/CSSGradientValue.cpp:
1103         (WebCore::CSSLinearGradientValue::customCSSText):
1104         (WebCore::CSSRadialGradientValue::customCSSText):
1105         * css/CSSGradientValue.h:
1106         * css/CSSImageSetValue.cpp:
1107         (WebCore::CSSImageSetValue::customCSSText):
1108         * css/CSSImageSetValue.h:
1109         * css/CSSImageValue.cpp:
1110         (WebCore::CSSImageValue::customCSSText):
1111         * css/CSSImageValue.h:
1112         * css/CSSInheritedValue.cpp:
1113         (WebCore::CSSInheritedValue::customCSSText):
1114         * css/CSSInheritedValue.h:
1115         * css/CSSInitialValue.cpp:
1116         (WebCore::CSSInitialValue::customCSSText):
1117         * css/CSSInitialValue.h:
1118         * css/CSSLineBoxContainValue.cpp:
1119         (WebCore::CSSLineBoxContainValue::customCSSText):
1120         * css/CSSLineBoxContainValue.h:
1121         * css/CSSPrimitiveValue.cpp:
1122         (WebCore::CSSPrimitiveValue::customCSSText):
1123         (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
1124         * css/CSSPrimitiveValue.h:
1125         * css/CSSReflectValue.cpp:
1126         (WebCore::CSSReflectValue::customCSSText):
1127         * css/CSSReflectValue.h:
1128         * css/CSSTimingFunctionValue.cpp:
1129         (WebCore::CSSLinearTimingFunctionValue::customCSSText):
1130         (WebCore::CSSCubicBezierTimingFunctionValue::customCSSText):
1131         (WebCore::CSSStepsTimingFunctionValue::customCSSText):
1132         * css/CSSTimingFunctionValue.h:
1133         * css/CSSUnicodeRangeValue.cpp:
1134         (WebCore::CSSUnicodeRangeValue::customCSSText):
1135         * css/CSSUnicodeRangeValue.h:
1136         * css/CSSValue.cpp:
1137         (WebCore::CSSValue::cssText):
1138         * css/CSSValueList.cpp:
1139         (WebCore::CSSValueList::customCSSText):
1140         * css/CSSValueList.h:
1141         * css/FontFeatureValue.cpp:
1142         (WebCore::FontFeatureValue::customCSSText):
1143         * css/FontFeatureValue.h:
1144         * css/FontValue.cpp:
1145         (WebCore::FontValue::customCSSText):
1146         * css/FontValue.h:
1147         * css/ShadowValue.cpp:
1148         (WebCore::ShadowValue::customCSSText):
1149         * css/ShadowValue.h:
1150         * css/WebKitCSSArrayFunctionValue.cpp:
1151         (WebCore::WebKitCSSArrayFunctionValue::customCSSText):
1152         * css/WebKitCSSArrayFunctionValue.h:
1153         * css/WebKitCSSFilterValue.cpp:
1154         (WebCore::WebKitCSSFilterValue::customCSSText):
1155         * css/WebKitCSSFilterValue.h:
1156         * css/WebKitCSSMatFunctionValue.cpp:
1157         (WebCore::WebKitCSSMatFunctionValue::customCSSText):
1158         * css/WebKitCSSMatFunctionValue.h:
1159         * css/WebKitCSSMixFunctionValue.cpp:
1160         (WebCore::WebKitCSSMixFunctionValue::customCSSText):
1161         * css/WebKitCSSMixFunctionValue.h:
1162         * css/WebKitCSSSVGDocumentValue.cpp:
1163         (WebCore::WebKitCSSSVGDocumentValue::customCSSText):
1164         * css/WebKitCSSSVGDocumentValue.h:
1165         * css/WebKitCSSShaderValue.cpp:
1166         (WebCore::WebKitCSSShaderValue::customCSSText):
1167         * css/WebKitCSSShaderValue.h:
1168         * css/WebKitCSSTransformValue.cpp:
1169         (WebCore::WebKitCSSTransformValue::customCSSText):
1170         * css/WebKitCSSTransformValue.h:
1171         * svg/SVGColor.cpp:
1172         (WebCore::SVGColor::customCSSText):
1173         * svg/SVGColor.h:
1174         * svg/SVGPaint.cpp:
1175         (WebCore::SVGPaint::customCSSText):
1176         * svg/SVGPaint.h:
1177
1178 2013-09-04  Chris Fleizach  <cfleizach@apple.com>
1179
1180         AX: aria-valuetext property not exposing AXValueDescription
1181         https://bugs.webkit.org/show_bug.cgi?id=120375
1182
1183         Reviewed by Darin Adler.
1184
1185         Expose value based attributes for incrementor roles (which are called spinbuttons by ARIA).
1186
1187         Test: platform/mac/accessibility/spinbutton-valuedescription.html
1188
1189         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1190         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1191
1192 2013-09-04  Javier Fernandez  <jfernandez@igalia.com>
1193
1194         <https://webkit.org/b/119622> [CSSRegions] Not possible to clear the selection when mixing content from different FlowThreads
1195
1196         Reviewed by David Hyatt.
1197
1198         When using CSS Regions is usual that the RenderTree doesn't match
1199         the DOM Tree in terms of relative position of the nodes. Besides,
1200         usually the content of a certain node is split and spread across
1201         multiple blocks, rendered in different positions.
1202
1203         Regarding the Selection, this problem is even more important; the
1204         selection direction changes when crossing the FlowThread
1205         boundaries. This weird behavior is also present in other layouts
1206         using non-regular positioning mechanisms, like absolute,
1207         static. However, for those layouts the RenderTree preserves the
1208         order of the nodes, unlike the CSS Regions layout model.
1209
1210         Because of how the RenderTree is generated with CSS Regions, the
1211         RenderView::setSelection algorithm is not able to repaint some of
1212         the rectangles defined during the selection process. In order to
1213         face this issue, the proposed fix determines whether it should
1214         backwards traversing the RenderTree, from the "stop" node to the
1215         RenderView node.
1216
1217         Test: fast/regions/selecting-text-through-different-region-flows-2.html
1218
1219         * rendering/RenderView.cpp:
1220         (WebCore::getNextOrPrevRenderObjectBasedOnDirection): Added.
1221         (WebCore::RenderView::setSelection):
1222
1223 2013-09-04  Eric Carlson  <eric.carlson@apple.com>
1224
1225         Get MEDIA_STREAM compiling on OSX
1226         https://bugs.webkit.org/show_bug.cgi?id=120650
1227
1228         Reviewed by Darin Adler.
1229
1230         No new tests, the code changed doesn't run on OSX yet.
1231
1232         * DerivedSources.make: Add MediaStream idl files.
1233
1234         * Modules/mediastream/LocalMediaStream.h: Mark class as FINAL.
1235
1236         * Modules/mediastream/MediaConstraintsImpl.cpp:
1237         (WebCore::MediaConstraintsImpl::getOptionalConstraints): append -> appendRange so we don't
1238             need a MediaConstraint copy constructor.
1239
1240         * Modules/mediastream/RTCDataChannel.cpp:
1241         (WebCore::RTCDataChannel::send): Remove an unused parameter name.
1242         * Modules/mediastream/RTCDataChannel.h: ArrayBuffer and ArrayBufferView are in the JSC namespace.
1243
1244         * Modules/mediastream/RTCPeerConnection.cpp:
1245         (WebCore::RTCPeerConnection::RTCPeerConnection): loader() doesn't return a pointer.
1246         (WebCore::RTCPeerConnection::localDescription): Set the ExceptionCode on error.
1247         (WebCore::RTCPeerConnection::remoteDescription): Ditto.
1248
1249         * Modules/mediastream/RTCSessionDescription.cpp:
1250         (WebCore::RTCSessionDescription::setSdp): Remove the unused ExceptionCode parameter.
1251         * Modules/mediastream/RTCSessionDescription.h: Ditto.
1252         * Modules/mediastream/RTCSessionDescription.idl: Ditto.
1253
1254         * Modules/mediastream/RTCStatsResponse.cpp:
1255         (WebCore::RTCStatsResponse::canGetItemsForName): Add so JSRTCStatsResponse::canGetItemsForName
1256             doesn't cause ref count churn.
1257         * Modules/mediastream/RTCStatsResponse.h: Mark class as FINAL. Declare canGetItemsForName.
1258
1259         * WebCore.xcodeproj/project.pbxproj: Add new files.
1260
1261         * bindings/js/JSRTCStatsResponseCustom.cpp:
1262         (WebCore::JSRTCStatsResponse::canGetItemsForName): Use canGetItemsForName instead of namedItem.
1263             Use propertyNameToAtomicString instead of propertyNameToString 
1264         (WebCore::JSRTCStatsResponse::nameGetter): Use propertyNameToAtomicString instead of 
1265             propertyNameToString because namedItem takes an AtomicString.
1266
1267         * platform/mediastream/mac: Added.
1268         * platform/mediastream/mac/MediaStreamCenterMac.cpp: Added.
1269         * platform/mediastream/mac/MediaStreamCenterMac.h: Added.
1270
1271 2013-09-04  Daniel Bates  <dabates@apple.com>
1272
1273         [iOS] Fix the build following <http://trac.webkit.org/changeset/154903>
1274         (https://bugs.webkit.org/show_bug.cgi?id=120540)
1275
1276         * style/StyleResolveTree.cpp:
1277         (WebCore::Style::resolveTree): Use address operator and dot-notation when
1278         passing Element to CheckForVisibilityChangeOnRecalcStyle and calling
1279         Element::renderStyle(), respectively.
1280
1281 2013-09-04  Bem Jones-Bey  <bjonesbe@adobe.com>
1282
1283         Move logical dimension getters/setters to FloatingObject from RenderBlock
1284         https://bugs.webkit.org/show_bug.cgi?id=120686
1285
1286         Reviewed by David Hyatt.
1287
1288         This is the first step in decoupling FloatingObject, FloatingObjects,
1289         et al from RenderBlock. It is not ideal that the methods take a bool;
1290         however, passing down the actual writing mode would require
1291         refactoring the way that RenderBlock stores this information, which is
1292         a task for the future.
1293
1294         No new tests, no behavior change.
1295
1296         * rendering/RenderBlock.cpp:
1297         (WebCore::RenderBlock::repaintOverhangingFloats): Use new methods.
1298         (WebCore::RenderBlock::insertFloatingObject):  Ditto.
1299         (WebCore::RenderBlock::removeFloatingObject): Ditto.
1300         (WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
1301         (WebCore::RenderBlock::computeLogicalLocationForFloat): Ditto.
1302         (WebCore::RenderBlock::positionNewFloats): Ditto.
1303         (WebCore::::updateOffsetIfNeeded): Ditto.
1304         (WebCore::::collectIfNeeded): Ditto.
1305         (WebCore::::getHeightRemaining): Ditto.
1306         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
1307         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
1308         (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Ditto.
1309         (WebCore::RenderBlock::lowestFloatLogicalBottom): Ditto.
1310         (WebCore::RenderBlock::clearFloats): Ditto.
1311         (WebCore::RenderBlock::addOverhangingFloats): Ditto.
1312         (WebCore::RenderBlock::hasOverhangingFloat): Ditto.
1313         (WebCore::RenderBlock::addIntrudingFloats): Ditto.
1314         * rendering/RenderBlock.h:
1315         (WebCore::RenderBlock::FloatingObject::logicalTop): Moved from RenderBlock::logicalTopForFloat
1316         (WebCore::RenderBlock::FloatingObject::logicalBottom): Moved from RenderBlock::logicalBottomForFloat
1317         (WebCore::RenderBlock::FloatingObject::logicalLeft): Moved from RenderBlock::logicalLeftForFloat
1318         (WebCore::RenderBlock::FloatingObject::logicalRight): Moved from RenderBlock::logicalRightForFloat
1319         (WebCore::RenderBlock::FloatingObject::logicalWidth): Moved from RenderBlock::logicalWidthForFloat
1320         (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalTop): Moved from RenderBlock::pixelSnappedLogicalTopForFloat
1321         (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalBottom): Moved from RenderBlock::pixelSnappedLogicalBottomForFloat
1322         (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalLeft): Moved from RenderBlock::pixelSnappedLogicalLeftForFloat
1323         (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalRight): Moved from RenderBlock::pixelSnappedLogicalRightForFloat
1324         (WebCore::RenderBlock::FloatingObject::setLogicalTop): Moved from RenderBlock::setLogicalTopForFloat
1325         (WebCore::RenderBlock::FloatingObject::setLogicalLeft): Moved from RenderBlock::setLogicalLeftForFloat
1326         (WebCore::RenderBlock::FloatingObject::setLogicalHeight): Moved from RenderBlock::setLogicalHeightForFloat
1327         (WebCore::RenderBlock::FloatingObject::setLogicalWidth): Moved from RenderBlock::setLogicalWidthForFloat
1328         * rendering/RenderBlockLineLayout.cpp:
1329         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Use new methods.
1330         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Ditto.
1331         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Ditto.
1332         (WebCore::RenderBlock::positionNewFloatOnLine): Ditto.
1333
1334 2013-09-04  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
1335
1336         REGRESSION(r154977): Do not urlencode soup message on ResourceRequest::toSoupMessage()
1337         https://bugs.webkit.org/show_bug.cgi?id=120681
1338
1339         Reviewed by Martin Robinson.
1340
1341         Do not call soup_message_set_uri with soupURI() (url encoded uri) on
1342         ResourceRequest::toSoupMessage().
1343
1344         * platform/network/soup/ResourceRequest.h:
1345         * platform/network/soup/ResourceRequestSoup.cpp:
1346         (WebCore::ResourceRequest::updateSoupMessageMembers):
1347         (WebCore::ResourceRequest::updateSoupMessage):
1348         (WebCore::ResourceRequest::toSoupMessage):
1349         Split common code from updateSoupMessage/toSoupMessage into updateSoupMessageMembers.
1350
1351 2013-09-04  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
1352
1353         [GTK] add support for subtitles on webkit2GTK
1354         https://bugs.webkit.org/show_bug.cgi?id=117008
1355
1356         By activating subtitles support on webkit2GTK, the video player
1357         recognizes and use text <tracks> inside <video> elements.
1358
1359         Reviewed by Martin Robinson.
1360
1361         Layout tests (track-menu) should cover this change.
1362
1363         * css/mediaControlsGtk.css:
1364         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
1365         (video::-webkit-media-controls-closed-captions-container):
1366         (video::-webkit-media-controls-closed-captions-track-list):
1367         (video::-webkit-media-controls-closed-captions-track-list h3):
1368         (video::-webkit-media-controls-closed-captions-track-list ul):
1369         (video::-webkit-media-controls-closed-captions-track-list li):
1370         (video::-webkit-media-controls-closed-captions-track-list li.selected):
1371         * html/shadow/MediaControlElements.cpp:
1372         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
1373         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
1374         * html/shadow/MediaControlElements.h:
1375         * html/shadow/MediaControlsGtk.cpp:
1376         (WebCore::MediaControlsGtkEventListener::create):
1377         (WebCore::MediaControlsGtkEventListener::cast):
1378         (WebCore::MediaControlsGtkEventListener::MediaControlsGtkEventListener):
1379         (WebCore::MediaControlsGtk::MediaControlsGtk):
1380         (WebCore::MediaControlsGtk::initializeControls):
1381         (WebCore::MediaControlsGtk::setMediaController):
1382         (WebCore::MediaControlsGtk::reset):
1383         (WebCore::MediaControlsGtk::makeTransparent):
1384         (WebCore::MediaControlsGtk::toggleClosedCaptionTrackList):
1385         (WebCore::MediaControlsGtk::showClosedCaptionTrackList):
1386         (WebCore::MediaControlsGtk::hideClosedCaptionTrackList):
1387         (WebCore::MediaControlsGtk::handleClickEvent):
1388         (WebCore::MediaControlsGtk::eventListener):
1389         (WebCore::MediaControlsGtkEventListener::handleEvent):
1390         (WebCore::MediaControlsGtkEventListener::operator==):
1391         * html/shadow/MediaControlsGtk.h:
1392         * page/CaptionUserPreferences.cpp:
1393         (WebCore::trackDisplayName):
1394         * platform/gtk/LocalizedStringsGtk.cpp:
1395         (WebCore::textTrackSubtitlesText):
1396         (WebCore::textTrackOffMenuItemText):
1397         (WebCore::textTrackNoLabelText):
1398         * platform/gtk/RenderThemeGtk.h:
1399
1400 2013-09-03  Darin Adler  <darin@apple.com>
1401
1402         Use OwnPtr in the RenderLayerFilterInfo map
1403         https://bugs.webkit.org/show_bug.cgi?id=120619
1404
1405         Reviewed by Anders Carlsson.
1406
1407         * rendering/RenderLayer.cpp:
1408         (WebCore::RenderLayer::~RenderLayer): Use FilterInfo::remove directly instead of
1409         going through removeFilterInfoIfNeeded function.
1410         (WebCore::RenderLayer::paintsWithFilters): Rearranged #if a little bit and tweaked
1411         the comment.
1412         (WebCore::RenderLayer::requiresFullLayerImageForFilters): Use && instead of ternary.
1413         (WebCore::RenderLayer::filterRenderer): Use FilterInfo::getIfExists directly instead
1414         of going through filterInfo function.
1415         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): Use FilterInfo::get
1416         directly instead of going through filterInfo function. Also use references instead
1417         of pointers.
1418         (WebCore::shouldDoSoftwarePaint): Marked this simple function, used only once, as
1419         inline.
1420         (WebCore::paintForFixedRootBackground): Ditto.
1421         (WebCore::RenderLayer::setupFilters): Use FilterInfo::getIfExists directly instead
1422         of going through filterInfo function. Also get rendererer out of filterInfo instead
1423         of calling filterRenderer.
1424         (WebCore::RenderLayer::updateOrRemoveFilterClients): Use FilterInfo::get and
1425         FilterInfo::getIfExists directly instead of using ensureFilterInfo and
1426         filterInfo functions.
1427         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Use FilterInfo::getIfExists
1428         and FilterInfo::get directly instead of using filterInfo function.
1429
1430         * rendering/RenderLayer.h: Removed the ifdefs around forward declarations; overkill,
1431         since there is no harm in a few extras. Marked the RenderLayer class FINAL. Removed the
1432         no-longer-needed filterInfo, ensureFilterInfo, removeFilterInfoIfNeeded, hasFilterInfo,
1433         and setHasFilterInfo functions. Mark everything private instead of protected since
1434         there are no classes derived from this one. Made FilterInfo an embedded class so it
1435         can get at the m_hasFilterInfo data member directly and has a shorter name.
1436
1437         * rendering/RenderLayerFilterInfo.cpp: Removed the ifs around includes, which were
1438         overkill, since there is little harm including a few extra files.
1439         (WebCore::RenderLayer::FilterInfo::map): Added. Returns the single global map.
1440         (WebCore::RenderLayer::FilterInfo::getIfExists): Renamed from filterInfoForRenderLayer.
1441         Also changed to take a reference instead of a pointer, and to use the new filterMap.
1442         (WebCore::RenderLayer::FilterInfo::get): Renamed from createFilterInfoForRenderLayerIfNeeded.
1443         Also changed to take a reference instead of a pointer, to use the new filterMap, and
1444         to use add to avoid hashing twice when adding a new layer to the map.
1445         (WebCore::RenderLayer::FilterInfo::remove): Renamed from removeFilterInfoForRenderLayer.
1446         Also changed to take a reference instead of a pointer and eliminated the explicit
1447         delete since we use OwnPtr now.
1448         (WebCore::RenderLayer::FilterInfo::FilterInfo): Take a reference instead of a pointer.
1449         (WebCore::RenderLayer::FilterInfo::~FilterInfo): Updated class name.
1450         (WebCore::RenderLayer::FilterInfo::setRenderer): Ditto.
1451         (WebCore::RenderLayer::FilterInfo::notifyFinished): Update since m_layer is a reference.
1452         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Update to iterate in a
1453         slightly more idiomatic and efficient way. Also update since m_layer is a reference.
1454         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
1455         (WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded): Ditto.
1456         (WebCore::RenderLayer::FilterInfo::updateCustomFilterClients): Ditto. Also switched to
1457         a raw pointer for CustomFilterProgram*.
1458         (WebCore::RenderLayer::FilterInfo::removeCustomFilterClients): Ditto.
1459
1460         * rendering/RenderLayerFilterInfo.h: Removed the ifs around includes, which were
1461         overkill, since there is little harm including a few extra files. Changed to be a
1462         member class of RenderLayer, marked the class FINAL, and changed the style of the
1463         conditionals around the base classes. Renamed functions. Made overrides private and
1464         used OVERRIDE. Changed functions to take references instead of pointers. Did some
1465         small style cleanup. Made deleteOwnedPtr a friend so we can keep the destructor private.
1466         Moved the typedef of RenderLayerFilterInfoMap into the class and named it just Map.
1467         Got rid of s_filterMap and instead added a function named just map().
1468
1469 2013-09-04  Andreas Kling  <akling@apple.com>
1470
1471         Simplify subtree relayout scheduling a bit.
1472         <https://webkit.org/b/120684>
1473
1474         Reviewed by Antti Koivisto.
1475
1476         Subtree relayout scheduling should only happen while there's a render tree up,
1477         the code can freely assume that there's a RenderView present.
1478
1479         Added an assertion that the render tree isn't being torn down. This should catch
1480         renderers doing unnecessary work during document detach and could be a source
1481         of "performance freebies."
1482
1483         I also un-nested scheduleRelayoutOfSubtree() with early-return style to make
1484         the code more human-readable.
1485
1486         * page/FrameView.h:
1487         * page/FrameView.cpp:
1488         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1489         * rendering/RenderObject.cpp:
1490         (WebCore::RenderObject::scheduleRelayout):
1491
1492 2013-09-04  Jae Hyun Park  <jae.park@company100.net>
1493
1494         [Coordinated Graphics] Remove unused method in CoordinatedGraphicsLayer
1495         https://bugs.webkit.org/show_bug.cgi?id=120664
1496
1497         Reviewed by Darin Adler.
1498
1499         CoordinatedGraphicsLayer::hasPendingVisibleChanges is not used as of
1500         r148952.
1501
1502         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1503         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1504
1505 2013-09-04  Hans Muller  <hmuller@adobe.com>
1506
1507         [CSS Shapes] Revise the ShapeInterval set operations' implementation
1508         https://bugs.webkit.org/show_bug.cgi?id=120349
1509
1510         Reviewed by Alexandru Chiculita.
1511
1512         Revised the ShapeIntervals unite, intersect, and subtract operations to
1513         improve efficiency and clarity.
1514
1515         No new tests are required, this is just an internal refactoring.
1516
1517         * rendering/shapes/PolygonShape.cpp:
1518         (WebCore::computeOverlappingEdgeXProjections): Removed call to ShapeInterval<T>sortVector(), since calling std::sort directly is simpler.
1519         * rendering/shapes/ShapeInterval.h:
1520         (WebCore::ShapeInterval::contains): True if the interval parameter is within this interval.
1521         (WebCore::ShapeInterval::intersect): Substantially revised version of the original method.
1522         (WebCore::ShapeInterval::uniteVectors): Ditto.
1523         (WebCore::ShapeInterval::intersectVectors): Ditto.
1524         (WebCore::ShapeInterval::subtractVectors): Ditto.
1525
1526 2013-09-04  Krzysztof Czech  <k.czech@samsung.com>
1527
1528         [ATK] Adds an accessibility support to access a value of the color control element
1529         https://bugs.webkit.org/show_bug.cgi?id=114354
1530
1531         Reviewed by Mario Sanchez Prada.
1532
1533         Implements a possibility of retrieving a value of the color control element.
1534
1535         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1536         (webkitAccessibleTextGetText):
1537         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1538         (getInterfaceMaskFromObject):
1539
1540 2013-09-04  Andreas Kling  <akling@apple.com>
1541
1542         Use Vector<Ref<T>> in three random WebCore loops.
1543         <https://webkit.org/b/120661>
1544
1545         Reviewed by Darin Adler.
1546
1547         Clean up three little loops to use Refs to avoid null checking known-valid objects.
1548         Also apply auto, reserveInitialCapacity and uncheckedAppend as appropriate.
1549
1550         * page/DOMWindow.cpp:
1551         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
1552         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
1553         * platform/graphics/FontCache.cpp:
1554         (WebCore::FontCache::invalidate):
1555
1556 2013-09-04  Claudio Saavedra  <csaavedra@igalia.com>
1557
1558         [GTK] Color of input button's text broken with recent gnome-themes-standard
1559         https://bugs.webkit.org/show_bug.cgi?id=120581
1560
1561         Reviewed by Carlos Garcia Campos.
1562
1563         * platform/gtk/RenderThemeGtk3.cpp:
1564         (WebCore::getStyleContext): add the "text-button" class.
1565         (WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
1566         as this is the one actually used for button labels.
1567
1568 2013-09-04  Zan Dobersek  <zdobersek@igalia.com>
1569
1570         [GTK] Add support for the Wayland build target
1571         https://bugs.webkit.org/show_bug.cgi?id=120627
1572
1573         Reviewed by Gustavo Noronha Silva.
1574
1575         * GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files.
1576         The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and
1577         PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously
1578         guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND
1579         conditional is used. If neither of those two targets is being built we fall back to adding source files to the build
1580         as necessary by the actual build target.
1581         * platform/gtk/GtkVersioning.c:
1582         (gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being
1583         defined - these should only be built when building the X11 target, checked for with PLATFORM(X11).
1584
1585 2013-09-04  Mario Sanchez Prada  <mario.prada@samsung.com>
1586
1587         [GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
1588         https://bugs.webkit.org/show_bug.cgi?id=114873
1589
1590         Reviewed by Chris Fleizach.
1591
1592         Re-implement these functions without using GailTextUtil nor Pango.
1593
1594         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1595         (webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary,
1596         to keep it consistent with names for new functions.
1597         (isSentenceBoundary): Helper function to know when we are either
1598         at the beginning or the end of a sentence.
1599         (isWhiteSpaceBetweenSentences): It returns true if we are in the
1600         middle of a white space between sentences. Useful for implementing
1601         the SENTENCE_END boundary type.
1602         (sentenceAtPositionForAtkBoundary): New helper function to find the
1603         sentence at a given position considering values of AtkTextBoundary.
1604         (webkitAccessibleTextSentenceForBoundary): New function,
1605         implementing atk_text_get_text_*_offset for SENTENCE.
1606         (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
1607         SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary().
1608
1609 2013-09-04  Andrei Bucur  <abucur@adobe.com>
1610
1611         [CSS Regions] Extend the RenderRegionRange class to include overflow information + apply the layout overflow
1612         https://bugs.webkit.org/show_bug.cgi?id=116299
1613
1614         Reviewed by David Hyatt.
1615
1616         Patch for computing overflow for boxes per region and applying it for layout overflow.
1617         The approach is based on adding a RenderOverflow object inside the RenderBoxRegionInfo
1618         structure. The RenderOverflow object is manipulated by the RenderRegion using some utility
1619         functions that receive the target box as a parameter.
1620         When computing the portion of a box inside a region it is necessary to split the border
1621         rect of the box between regions. This means mapping the rectangle in the flow thread
1622         coordinates, making the split and then remapping the fragment in the box coordinates.
1623         For now, this is not optimized and walks the render tree to compute the block offsets.
1624         The function getRegionRangeForBox is used to determine in what regions a box should
1625         be rendered into. The range is computed at layout time and it depends on the height of
1626         the box, if its unsplittable for fragmentation etc.
1627         The patch also propagates the layout overflow to the regions. This enables to correctly
1628         display scrollbars when chaining varying size regions (currently the horizontal overflow
1629         is as wide as the widest region for all the regions). Unsplittable boxes will also generate
1630         layout overflow in the start region so they can be scrolled and fully reachable. This
1631         functionality depends on fixing the visual overflow and adapting the layout to take into
1632         account the unsplittable box. Besides this, the relative positioning and transforms are applied
1633         at a fragment level. This is in line with the CSS3 Break specification:
1634         http://dev.w3.org/csswg/css-break/#transforms
1635
1636         Tests: fast/regions/overflow-scrollable-rel-pos-fragment.html
1637                fast/regions/overflow-scrollable-rotated-fragment.html
1638                fast/regions/overflow-scrollable-unsplittable-fragment.html
1639                fast/regions/overflow-scrollable-varying-width-1.html
1640                fast/regions/overflow-scrollable-varying-width-2.html
1641
1642         * rendering/RenderBlock.cpp:
1643         (WebCore::RenderBlock::computeOverflow):
1644         (WebCore::RenderBlock::clearLayoutOverflow):
1645         (WebCore::RenderBlock::addVisualOverflowFromTheme):
1646         (WebCore::RenderBlock::relayoutForPagination):
1647         * rendering/RenderBlockLineLayout.cpp:
1648         (WebCore::RenderBlock::addOverflowFromInlineChildren):
1649         * rendering/RenderBox.cpp:
1650         (WebCore::RenderBox::clientBoxRectInRegion):
1651         (WebCore::RenderBox::addVisualEffectOverflow):
1652         (WebCore::RenderBox::applyVisualEffectOverflow):
1653         (WebCore::RenderBox::addOverflowFromChild):
1654         (WebCore::RenderBox::clearOverflow):
1655         * rendering/RenderBox.h:
1656         * rendering/RenderBoxRegionInfo.h:
1657         (WebCore::RenderBoxRegionInfo::createOverflow):
1658         (WebCore::RenderBoxRegionInfo::overflow):
1659         (WebCore::RenderBoxRegionInfo::clearOverflow):
1660         * rendering/RenderEmbeddedObject.cpp:
1661         (WebCore::RenderEmbeddedObject::layout):
1662         * rendering/RenderFlowThread.cpp:
1663         (WebCore::RenderFlowThread::updateLogicalWidth):
1664         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
1665         (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
1666         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
1667         (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
1668         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
1669         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1670         (WebCore::RenderFlowThread::addRegionsLayoutOverflow):
1671         (WebCore::RenderFlowThread::clearRegionsOverflow):
1672         * rendering/RenderFlowThread.h:
1673         * rendering/RenderIFrame.cpp:
1674         (WebCore::RenderIFrame::layout):
1675         * rendering/RenderRegion.cpp:
1676         (WebCore::RenderRegion::computeOverflowFromFlowThread):
1677         (WebCore::RenderRegion::setRenderBoxRegionInfo):
1678         (WebCore::RenderRegion::ensureOverflowForBox):
1679         (WebCore::RenderRegion::rectFlowPortionForBox):
1680         (WebCore::RenderRegion::addLayoutOverflowForBox):
1681         (WebCore::RenderRegion::addVisualOverflowForBox):
1682         (WebCore::RenderRegion::layoutOverflowRectForBox):
1683         (WebCore::RenderRegion::visualOverflowRectForBox):
1684         (WebCore::RenderRegion::layoutOverflowRectForBoxForPropagation):
1685         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
1686         * rendering/RenderRegion.h:
1687         * rendering/RenderReplaced.cpp:
1688         (WebCore::RenderReplaced::layout):
1689         * rendering/RenderTableSection.cpp:
1690         (WebCore::RenderTableSection::computeOverflowFromCells):
1691
1692 2013-09-04  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
1693
1694         [GStreamer] cannot play live streams
1695         https://bugs.webkit.org/show_bug.cgi?id=116831
1696
1697         Reviewed by Philippe Normand.
1698
1699         Fix issues with rtsp streams embedded on <video> not loading.
1700
1701         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1702         Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
1703         live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
1704         starting playback.
1705
1706 2013-09-03  Chris Fleizach  <cfleizach@apple.com>
1707
1708         AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists.
1709         https://bugs.webkit.org/show_bug.cgi?id=120550
1710
1711         Reviewed by Mario Sanchez Prada.
1712
1713         Resolve a FIXME from the accessible name computation refactoring so that alternative text for links do not
1714         show up in the title field and do not duplicate naming when a title tag is used.
1715
1716         Effectively, this means that links no longer use AXTitle for alternative text. They use AXDescription
1717         like all other elements.
1718
1719         Test: platform/mac/accessibility/link-with-title.html
1720
1721         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1722         (-[WebAccessibilityObjectWrapper accessibilityTitle]):
1723         (-[WebAccessibilityObjectWrapper accessibilityDescription]):
1724
1725 2013-09-03  Darin Adler  <darin@apple.com>
1726
1727         Change type of Document::doctype back to a raw pointer
1728         https://bugs.webkit.org/show_bug.cgi?id=120617
1729
1730         Reviewed by Andreas Kling.
1731
1732         * dom/Document.cpp:
1733         (WebCore::Document::doctype): Return a raw pointer.
1734         (WebCore::Document::childrenChanged): Use the raw pointer.
1735         Also added a FIXME about this code that is probably in the wrong place.
1736         * dom/Document.h: More of the same.
1737
1738         * editing/markup.cpp:
1739         (WebCore::documentTypeString): Get rid of local variable entirely,
1740         since null is already handled right by createMarkup, and also remove
1741         the call to get since doctype is just a raw pointer.
1742
1743 2013-09-03  Andreas Kling  <akling@apple.com>
1744
1745         ASSERTION FAILED: frame().view() == this closing a page with SVG or video
1746         <https://webkit.org/b/120645>
1747
1748         Reviewed by Antti Koivisto.
1749
1750         Have RenderSVGResourceContainer check if the document is being destroyed before
1751         triggering any repaints. This replaces the previous check for a null RenderView
1752         which meant basically the same thing.
1753
1754         We could add more and better assertions to catch unnecessary work during tree
1755         teardown, but let's do that separately.
1756
1757         * rendering/svg/RenderSVGResourceContainer.cpp:
1758         (WebCore::RenderSVGResourceContainer::markClientForInvalidation):
1759
1760 2013-09-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1761
1762         Fix uninitialized build warning in make_names.pl
1763         https://bugs.webkit.org/show_bug.cgi?id=120658
1764
1765         Reviewed by Andreas Kling.
1766
1767         No new tests, no behavior change.
1768
1769         * dom/make_names.pl:
1770         (printTypeChecks): Fixed a build warning since r154965.
1771
1772 2013-09-03  Darin Adler  <darin@apple.com>
1773
1774         Fix backwards branch in ~Node from r154967
1775         https://bugs.webkit.org/show_bug.cgi?id=120659
1776
1777         Reviewed by Andreas Kling.
1778
1779         * dom/Node.cpp:
1780         (WebCore::Node::~Node): Fix backwards branch. The old code ran the code only
1781         when we did not remove the item from the table. I removed a ! from this expression
1782         after review; bad idea.
1783
1784 2013-09-03  Enrica Casucci  <enrica@apple.com>
1785
1786         Can't select Katakana word by double-clicking.
1787         <rdar://problem/14654926>
1788
1789         Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
1790
1791         For some languages, like Japanese we need
1792         to use more context for word breaking.
1793
1794         New test: editing/selection/doubleclick-japanese-text.html
1795
1796         * platform/text/TextBoundaries.h:
1797         (WebCore::requiresContextForWordBoundary):
1798
1799 2013-09-03  Mark Lam  <mark.lam@apple.com>
1800
1801         Converting StackIterator to a callback interface.
1802         https://bugs.webkit.org/show_bug.cgi?id=120564.
1803
1804         Reviewed by Filip Pizlo.
1805
1806         No new tests.
1807
1808         * bindings/js/JSXMLHttpRequestCustom.cpp:
1809         (WebCore::SendFunctor::SendFunctor):
1810         (WebCore::SendFunctor::hasViableFrame):
1811         (WebCore::SendFunctor::operator()):
1812         (WebCore::JSXMLHttpRequest::send):
1813         * bindings/js/ScriptCallStackFactory.cpp:
1814         (WebCore::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor):
1815         (WebCore::CreateScriptCallStackFunctor::operator()):
1816         (WebCore::createScriptCallStack):
1817         (WebCore::CreateScriptCallStackForConsoleFunctor::CreateScriptCallStackForConsoleFunctor):
1818         (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
1819
1820 2013-09-03  Oliver Hunt  <oliver@apple.com>
1821
1822         Support structured clone of Map and Set
1823         https://bugs.webkit.org/show_bug.cgi?id=120654
1824
1825         Reviewed by Simon Fraser.
1826
1827         Add support for cloning Map and Set.  Fairly self explanatory change.
1828         Needed to add Forwarding headers for the JSMap, JSSet and MapData classes.
1829
1830         * ForwardingHeaders/runtime/JSMap.h: Added.
1831         * ForwardingHeaders/runtime/JSSet.h: Added.
1832         * ForwardingHeaders/runtime/MapData.h: Added.
1833         * bindings/js/SerializedScriptValue.cpp:
1834         (WebCore::CloneSerializer::isMap):
1835         (WebCore::CloneSerializer::isSet):
1836         (WebCore::CloneSerializer::startSet):
1837         (WebCore::CloneSerializer::startMap):
1838         (WebCore::CloneSerializer::serialize):
1839         (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible):
1840         (WebCore::CloneDeserializer::deserialize):
1841
1842 2013-09-03  Bear Travis  <betravis@adobe.com>
1843
1844         [CSS Shapes] Shape's content gets extra left offset when left-border is positive on the content box
1845         https://bugs.webkit.org/show_bug.cgi?id=117573
1846
1847         Reviewed by David Hyatt.
1848
1849         Nested blocks need to take into account their offset from the shape-inside container.
1850         The new code calculates the offset from the shape-inside container, then applies the
1851         offset to the computed segments. The line must be moved down by the offset's height,
1852         and each segment must be moved left by the offset's width.
1853
1854         Test: fast/shapes/shape-inside/shape-inside-offset-block-children.html
1855
1856         * rendering/RenderBlock.cpp:
1857         (WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Relayout a block child if its
1858         new logical left would cause it to rest at a new position within a shape container.
1859         (WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Calculate the logical
1860         offset form a shape inside ancestor container.
1861         (WebCore::RenderBlock::layoutBlockChild): Call relayoutShapeDescendantIfMoved with the
1862         new position offset.
1863         * rendering/RenderBlock.h:
1864         * rendering/RenderBlockLineLayout.cpp:
1865         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use layout offset, rather
1866         than just vertical offset.
1867         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Ditto.
1868         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
1869         * rendering/shapes/ShapeInsideInfo.h:
1870         (WebCore::ShapeInsideInfo::computeSegmentsForLine): Shift segments logically left when
1871         there is an inline offset.
1872
1873 2013-09-03  Antoine Quint  <graouts@apple.com>
1874
1875         Web Inspector: exceptions triggered from console evaluation do not pause the debugger
1876         https://bugs.webkit.org/show_bug.cgi?id=120460
1877
1878         Reviewed by Timothy Hatcher.
1879
1880         * inspector/InjectedScriptSource.js:
1881         Explicitly set a sourceURL such that the frontend may identify injected script when
1882         processing call frames in order to hide such code from the debugger.
1883
1884 2013-09-03  Andreas Kling  <akling@apple.com>
1885
1886         Support Vector<Ref<T>>.
1887         <https://webkit.org/b/120637>
1888
1889         Reviewed by Antti Koivisto.
1890
1891         Use Vector<Ref<T>> internally in Page.
1892
1893         * page/Page.cpp:
1894         (WebCore::networkStateChanged):
1895         (WebCore::Page::refreshPlugins):
1896
1897             Clean up these functions and use Vector<Ref<Frame>> to store pointers to frames
1898             since we know they are not going to be null.
1899
1900         (WebCore::Page::pluginViews):
1901
1902             Changed this to return a Vector<Ref<PluginView>> by value instead of passing a
1903             writable vector as an argument. Clean up loops with 'auto'.
1904
1905         (WebCore::Page::storageBlockingStateChanged):
1906         (WebCore::Page::privateBrowsingStateChanged):
1907
1908             Tweaked for pluginViews() returning a Vector now.
1909
1910         (WebCore::Page::setVisibilityState):
1911
1912             Store Documents that need a visibilitychange event in a Vector<Ref<Document>>.
1913
1914 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
1915
1916         [CSS Grid Layout] Add parsing for named grid lines
1917         https://bugs.webkit.org/show_bug.cgi?id=119540
1918
1919         Reviewed by Andreas Kling.
1920
1921         From Blink r150381,r150587 by <jchaffraix@chromium.org>
1922
1923         Adds parsing support for named grid lines at <grid-line> level,
1924         i.e., inside grid-{row|column}-{start|end}. This change covers
1925         only the parsing, layout changes coming in a follow up patch.
1926
1927         * css/CSSComputedStyleDeclaration.cpp:
1928         (WebCore::valueForGridPosition):
1929         * css/CSSParser.cpp:
1930         (WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
1931         (WebCore::CSSParser::parseGridPosition):
1932         * css/CSSParser.h:
1933         * css/StyleResolver.cpp:
1934         (WebCore::createGridPosition):
1935         * rendering/RenderGrid.cpp:
1936         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1937         * rendering/style/GridPosition.h:
1938         (WebCore::GridPosition::setExplicitPosition):
1939         (WebCore::GridPosition::setSpanPosition):
1940         (WebCore::GridPosition::integerPosition):
1941         (WebCore::GridPosition::namedGridLine):
1942
1943 2013-09-03  Alexey Proskuryakov  <ap@apple.com>
1944
1945         [Mac] Hyphenation respects regional format settings language instead of primary language
1946         https://bugs.webkit.org/show_bug.cgi?id=120641
1947
1948         Reviewed by Dan Bernstein.
1949
1950         Fixes hyphenation tests on my machine with non-English regional format settings.
1951
1952         * platform/text/cf/HyphenationCF.cpp: (createValueForNullKey):
1953         Use primary UI language for hyphenation, not regional settings language.
1954
1955 2013-09-03  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
1956
1957         [GTK][EFL] include missing localized strings for subtitle auto track
1958         https://bugs.webkit.org/show_bug.cgi?id=120629
1959
1960         those methods are necessary to show the "Auto" track on webkitgtk
1961
1962         Reviewed by Gustavo Noronha Silva.
1963
1964         * platform/efl/LocalizedStringsEfl.cpp:
1965         (WebCore::textTrackAutomaticMenuItemText):
1966         * platform/gtk/LocalizedStringsGtk.cpp:
1967         (WebCore::textTrackAutomaticMenuItemText):
1968
1969 2013-09-03  Daniel Bates  <dabates@apple.com>
1970
1971         Require layout when -webkit-overflow-scrolling changes
1972         https://bugs.webkit.org/show_bug.cgi?id=120535
1973
1974         Reviewed by Darin Adler.
1975
1976         Test: fast/repaint/overflow-scroll-touch-repaint.html
1977
1978         We want to require a layout when the value of -webkit-overflow-scrolling changes
1979         since -webkit-overflow-scrolling creates a stacking context.
1980
1981         * rendering/style/RenderStyle.cpp:
1982         (WebCore::RenderStyle::changeRequiresLayout):
1983
1984 2013-09-02  Ryosuke Niwa  <rniwa@webkit.org>
1985
1986         Support the "json" responseType and JSON response entity in XHR
1987         https://bugs.webkit.org/show_bug.cgi?id=73648
1988
1989         Reviewed by Oliver Hunt.
1990
1991         Based on the patch written by Jarred Nicholls.
1992
1993         Implement 'json' type for XMLHttpRequest.response. We cache the result on JSC side as a cached attribute
1994         unlike other response types like 'document' and 'blob' for which the parsed response object is cached
1995         in XMLHttpRequest itself. In the long run, we should do the same for other types of response types.
1996
1997         Also refactored the various code to share the code.
1998
1999         Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-json-invalid.html
2000                fast/xmlhttprequest/xmlhttprequest-responsetype-json-utf16.html
2001                fast/xmlhttprequest/xmlhttprequest-responsetype-json-valid.html
2002
2003         * ForwardingHeaders/runtime/JSONObject.h: Added.
2004
2005         * bindings/js/JSXMLHttpRequestCustom.cpp:
2006         (WebCore::JSXMLHttpRequest::visitChildren):
2007         (WebCore::JSXMLHttpRequest::response): Use JSONParse to parse the response text and cache the result.
2008         Call didCacheResponseJSON to set the cache status and clear the original response buffer.
2009
2010         * xml/XMLHttpRequest.cpp:
2011         (WebCore::XMLHttpRequest::XMLHttpRequest): Added m_responseCacheIsValid to invalidate the cache of
2012         a json response.
2013         (WebCore::XMLHttpRequest::responseText):
2014         (WebCore::XMLHttpRequest::didCacheResponseJSON): Added; Updates m_responseCacheIsValid and clears the
2015         response buffer to save memory.
2016         (WebCore::XMLHttpRequest::responseXML):
2017         (WebCore::XMLHttpRequest::setResponseType):
2018         (WebCore::XMLHttpRequest::responseType):
2019         (WebCore::XMLHttpRequest::clearResponseBuffers):
2020         (WebCore::XMLHttpRequest::didReceiveData):
2021
2022         * xml/XMLHttpRequest.h:
2023         (WebCore::XMLHttpRequest::doneWithoutErrors): Extracted from responseXML.
2024         (WebCore::XMLHttpRequest::responseTextIgnoringResponseType): Extracted from responseText.
2025         (WebCore::XMLHttpRequest::responseCacheIsValid): Added.
2026         (WebCore::XMLHttpRequest::shouldDecodeResponse): Extracted from didReceiveData.
2027         Also modified to decode when the response type is ResponseTypeJSON.
2028
2029         * xml/XMLHttpRequest.idl: Added CachedAttribute IDL extention on response property. This cache is
2030         used when the response type is 'json'.
2031
2032 2013-09-03  Commit Queue  <commit-queue@webkit.org>
2033
2034         Unreviewed, rolling out r154881.
2035         http://trac.webkit.org/changeset/154881
2036         https://bugs.webkit.org/show_bug.cgi?id=120643
2037
2038         Crashes on macworld.com (Requested by kling on #webkit).
2039
2040         * dom/Element.cpp:
2041         (WebCore::Element::setAttributeInternal):
2042
2043 2013-09-03  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
2044
2045         [GStreamer] Don't set state to NULL until element is destroyed
2046         https://bugs.webkit.org/show_bug.cgi?id=117354
2047
2048         Reviewed by Philippe Normand.
2049
2050         Don't set playbin to NULL until it is going to be destroyed or if we stay
2051         for too long on the READY state. Instead only set the state to READY as this
2052         allows much faster state changes to PAUSED/PLAYING again. playbin internally
2053         caches some state that is destroyed when setting it to NULL.
2054         This state is independent of the URI and it is even possible to change the
2055         URI in READY state.
2056
2057         To avoid having resources (e.g. audio devices) open indefinitely,
2058         when setting the state to READY we create a timeout and if the timeout
2059         is reached we reset the pipeline state to NULL to free resources.
2060
2061         Also now all state changes use the changePipelineState method instead of setting
2062         the playbin state directly with gst_element_set_state, so we have a better control
2063         of when we are requesting state changes.
2064
2065         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2066         (WebCore::mediaPlayerPrivateReadyStateTimeoutCallback):
2067         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2068         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
2069         (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
2070         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
2071         (WebCore::MediaPlayerPrivateGStreamer::setRate):
2072         (WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
2073         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2074
2075 2013-09-03  peavo@outlook.com  <peavo@outlook.com>
2076
2077         [WinCairo] Unneeded code in method GlyphPage::fill().
2078         https://bugs.webkit.org/show_bug.cgi?id=120634
2079
2080         Reviewed by Andreas Kling.
2081
2082         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
2083         (WebCore::GlyphPage::fill): Remove unneeded call to GetTextMetrics() function.
2084
2085 2013-09-03  Mihnea Ovidenie  <mihnea@adobe.com>
2086
2087         [CSSRegions] Pseudo-elements as regions should not be exposed to JS
2088         https://bugs.webkit.org/show_bug.cgi?id=120633
2089
2090         Reviewed by Andreas Kling.
2091
2092         Until we properly implement the Region interface (http://dev.w3.org/csswg/css-regions/#the-region-interface)
2093         for pseudo-elements, we should not return these as regions in JS.
2094
2095         Tests: fast/regions/get-regions-by-content-pseudo.html
2096                fast/regions/webkit-named-flow-get-regions-pseudo.html
2097
2098         * dom/WebKitNamedFlow.cpp:
2099         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex): Skip pseudo-elements as regions here too,
2100         otherwise we may get an index that cannot be used with getRegions().
2101         (WebCore::WebKitNamedFlow::getRegionsByContent):
2102         (WebCore::WebKitNamedFlow::getRegions):
2103
2104 2013-09-03  Zan Dobersek  <zdobersek@igalia.com>
2105
2106         REGRESSION(r154967): http appcache tests crashing on WK1
2107         https://bugs.webkit.org/show_bug.cgi?id=120620
2108
2109         Reviewed by Andreas Kling.
2110
2111         * loader/appcache/ApplicationCacheGroup.cpp:
2112         (WebCore::ApplicationCacheGroup::cacheDestroyed): Reintroduce pre-r154967 behavior that returned early in
2113         this method if the passed-in ApplicationCache object was not found in the ApplicationCacheGroup's HashSet
2114         of all the caches. This is now done by checking that the HashSet<T>::remove(T) returns true (meaning the
2115         object was found in the HashSet and removed from it) in addition to that HashSet being subsequently empty
2116         before the method moves on to destroying its ApplicationCacheGroup instance.
2117
2118 2013-09-03  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
2119
2120         [gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
2121         https://bugs.webkit.org/show_bug.cgi?id=115354
2122
2123         Reviewed by Philippe Normand.
2124
2125         Also disable Accept-Encoding on ResourceRequest::toSoupMessage accordingly.
2126
2127         * platform/network/soup/ResourceRequestSoup.cpp:
2128         (WebCore::ResourceRequest::toSoupMessage):
2129         Call ResourceRequest::updateSoupMessage from ResourceRequest::toSoupMessage so that the
2130         Accept-Encoding header is also respected.
2131
2132 2013-09-03  Krzysztof Czech  <k.czech@samsung.com>
2133
2134         [AX][ATK] Added support for sort and help attributes.
2135         https://bugs.webkit.org/show_bug.cgi?id=120456
2136
2137         Reviewed by Chris Fleizach.
2138
2139         Added support for aria-sort and aria-help attributes.
2140
2141         Test: accessibility/aria-sort.html
2142
2143         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2144         (webkitAccessibleGetAttributes):
2145
2146 2013-09-03  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2147
2148         [Qt] Remove dead code for QtXmlPatterns
2149         https://bugs.webkit.org/show_bug.cgi?id=120624
2150
2151         Reviewed by Simon Hausmann.
2152
2153         Remove code supporting XSLT using QtXmlPatterns which has been
2154         dead for some time.
2155
2156         * Target.pri:
2157         * WebCore.pri:
2158         * dom/TransformSourceQt.cpp: Removed.
2159         * xml/XSLStyleSheetQt.cpp: Removed.
2160         * xml/XSLTProcessorQt.cpp: Removed.
2161         * xml/parser/XMLDocumentParserQt.cpp:
2162         (WebCore::XMLDocumentParser::doEnd):
2163         (WebCore::XMLDocumentParser::parseProcessingInstruction):
2164
2165 2013-09-03  Mihnea Ovidenie  <mihnea@adobe.com>
2166
2167         [CSS Regions] position: fixed is computed relative to the first region, not the viewport
2168         https://bugs.webkit.org/show_bug.cgi?id=111176
2169
2170         Reviewed by David Hyatt.
2171
2172         Fixed positioned elements inside a named flow should be positioned and sized relative to the viewport,
2173         not on the first region, as described in the spec: http://dev.w3.org/csswg/css-regions/#the-flow-into-property.
2174         While the flow thread will still act as containing block for the fixed positioned elements, the painting and hit
2175         testing for the fixed positioned elements is done by RenderView. The layers for the fixed positioned elements
2176         are collected by the flow thread.
2177  
2178         Tests: fast/regions/element-in-named-flow-absolute-from-fixed.html
2179                fast/regions/element-in-named-flow-fixed-from-absolute.html
2180                fast/regions/element-inflow-fixed-from-outflow-static.html
2181                fast/regions/element-outflow-static-from-inflow-fixed.html
2182                fast/regions/fixed-element-transformed-parent.html
2183                fast/regions/fixed-in-named-flow-scroll.html
2184                fast/regions/fixed-inside-fixed-in-named-flow.html
2185                fast/regions/fixed-inside-named-flow-zIndex.html
2186                fast/regions/fixed-pos-elem-in-namedflow-noregions.html
2187                fast/regions/fixed-pos-region-in-nested-flow.html
2188
2189         * rendering/FlowThreadController.cpp:
2190         (WebCore::FlowThreadController::collectFixedPositionedLayers):
2191         Return the list of layers for the fixed positioned elements with named flows as containing blocks.
2192         Used in RenderLayer:: paintFixedLayersInNamedFlows and RenderLayer:: hitTestFixedLayersInNamedFlows.
2193         * rendering/FlowThreadController.h:
2194         * rendering/RenderBox.cpp:
2195         (WebCore::RenderBox::mapLocalToContainer):
2196         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2197         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2198         For fixed positioned elements, width and height are given by the view instead of the first region.
2199         * rendering/RenderLayer.cpp:
2200         (WebCore::accumulateOffsetTowardsAncestor):
2201         Modified for the fixed positioned elements inside named flows with the named flows as containing block
2202         to take into account the view scroll.
2203         (WebCore::compareZIndex):
2204         Moved upwards because it is used in RenderLayer::paintFixedLayersInNamedFlows.
2205         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
2206         Paint the list of fixed layers directly from the RenderView instead of painting them through regions -> named flows.
2207         (WebCore::RenderLayer::paintLayerContents):
2208         (WebCore::RenderLayer::paintList):
2209         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2210         Hit test the layers for the fix positioned elements inside named flows from the RenderView layer
2211         instead of the region -> named flow layer.
2212         (WebCore::RenderLayer::hitTestLayer):
2213         (WebCore::RenderLayer::calculateRects):
2214         * rendering/RenderLayer.h:
2215         * rendering/RenderLayerCompositor.cpp:
2216         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
2217         We do not support yet the accelerated compositing for elements in named flows,
2218         so bail out early here. We need to revisit fixed elements once we finish accelerated compositing for elements in named flows.
2219         * rendering/RenderObject.cpp:
2220         (WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock):
2221         (WebCore::hasFixedPosInNamedFlowContainingBlock):
2222         (WebCore::RenderObject::containerForRepaint):
2223         Changed to take into account that RenderView should be the repaintContainer for the
2224         fixed positioned elements with named flow as the containing block.
2225         * rendering/RenderObject.h:
2226
2227 2013-09-03  Arvid Nilsson  <anilsson@rim.com>
2228
2229         [BlackBerry] Remove LayerData::LayerProgram
2230         https://bugs.webkit.org/show_bug.cgi?id=120601
2231
2232         Reviewed by Anders Carlsson.
2233
2234         JIRA 490672
2235         All layer contents are RGBA now, so there's no need to support BGRA any
2236         more and the LayerData::LayerProgram enum can be removed. Related dead
2237         code was removed.
2238
2239         No new tests, no change in behavior.
2240
2241         * platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
2242         (WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread):
2243         * platform/graphics/blackberry/LayerData.h:
2244         (WebCore::LayerData::LayerData):
2245         * platform/graphics/blackberry/LayerRenderer.cpp:
2246         (WebCore::LayerRenderer::compositeLayersRecursive):
2247         (WebCore::LayerRenderer::createProgram):
2248         * platform/graphics/blackberry/LayerRenderer.h:
2249         * platform/graphics/blackberry/LayerWebKitThread.h:
2250         * platform/graphics/blackberry/PluginLayerWebKitThread.cpp:
2251         (WebCore::PluginLayerWebKitThread::setPluginView):
2252
2253 2013-09-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2254
2255         [GStreamer] Video player sets system volume to 100%
2256         https://bugs.webkit.org/show_bug.cgi?id=118974
2257
2258         Reviewed by Philippe Normand.
2259
2260         In order to preserve the system volume we need to keep track of
2261         the volume being initialized in the HTMLMediaElement and then just
2262         setting the volume to the sink when initializing the pipeline if
2263         that volume was changed before.
2264
2265         * html/HTMLMediaElement.cpp:
2266         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
2267         attribute to false.
2268         (WebCore::HTMLMediaElement::setVolume): Set the attribute to true
2269         when volume is changed.
2270         (WebCore::HTMLMediaElement::updateVolume): Set the volume only if
2271         volume was initialized.
2272         (WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
2273         Platform volume configuration is required only if volume was not
2274         initialized before.
2275         * html/HTMLMediaElement.h: Added attribute and interface method.
2276         * platform/graphics/MediaPlayer.h:
2277         (WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
2278         Declared and added default implementation for the interface method.
2279         (WebCore::MediaPlayer::platformVolumeConfigurationRequired):
2280         Asked the client, meaning the HTMLMediaElement if the platform
2281         volume configuration is required.
2282         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2283         (WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
2284         (WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
2285         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
2286         Set the volume only if not platform volume is required and added log.
2287
2288 2013-09-02  Darin Adler  <darin@apple.com>
2289
2290         * inspector/InspectorProfilerAgent.cpp:
2291         (WebCore::InspectorProfilerAgent::removeProfile): Fix braces here; a review
2292         comment I forgot to address in my last check-in.
2293
2294 2013-09-02  Darin Adler  <darin@apple.com>
2295
2296         Cut down on double hashing and code needlessly using hash table iterators
2297         https://bugs.webkit.org/show_bug.cgi?id=120611
2298
2299         Reviewed by Andreas Kling.
2300
2301         Some of these changes are primarily code cleanup, but others could provide
2302         a small code size and speed improvement by avoiding extra hashing.
2303
2304         * Modules/geolocation/Geolocation.cpp:
2305         (WebCore::Geolocation::Watchers::find): Use get instead of find.
2306         (WebCore::Geolocation::Watchers::remove): Use take instead of find.
2307         (WebCore::Geolocation::makeCachedPositionCallbacks): Use the return
2308         value from remove to avoid hashing twice.
2309
2310         * Modules/webaudio/AudioContext.cpp:
2311         (WebCore::AudioContext::addAutomaticPullNode): Use the return value from
2312         add to avoid hashing twice.
2313         (WebCore::AudioContext::removeAutomaticPullNode): Use the return value
2314         from remove to avoid hashing twice.
2315
2316         * Modules/webaudio/AudioNodeInput.cpp:
2317         (WebCore::AudioNodeInput::connect): Use the return value from add to avoid
2318         hashing twice.
2319         (WebCore::AudioNodeInput::disconnect): Use the return value from remove
2320         to avoid hashing twice.
2321
2322         * Modules/webaudio/AudioParam.cpp:
2323         (WebCore::AudioParam::connect): Use the return value from add to avoid
2324         hashing twice.
2325         (WebCore::AudioParam::disconnect): Use the return value from remove to
2326         avoid hashing twice.
2327
2328         * bridge/NP_jsobject.cpp:
2329         (ObjectMap::remove): Use remove instead of find/remove.
2330
2331         * dom/Node.cpp:
2332         (WebCore::Node::~Node): Use the return value from remove instead of
2333         find/remove.
2334
2335         * inspector/InspectorProfilerAgent.cpp:
2336         (WebCore::InspectorProfilerAgent::removeProfile): Remove needless
2337         calls to contains.
2338
2339         * loader/DocumentLoader.cpp:
2340         (WebCore::DocumentLoader::removeSubresourceLoader): Use the return
2341         value from remove instead of find/remove.
2342
2343         * loader/ResourceLoadScheduler.cpp:
2344         (WebCore::ResourceLoadScheduler::HostInformation::remove): Use the
2345         return value from remove to avoid hashing twice.
2346
2347         * loader/appcache/ApplicationCacheGroup.cpp:
2348         (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Use
2349         remove instead of find/remove.
2350         (WebCore::ApplicationCacheGroup::cacheDestroyed): Removed a needless
2351         call to contains to avoid hashing twice. It's fine to do the check
2352         for an empty hash table unconditionally.
2353
2354         * page/DOMWindow.cpp:
2355         (WebCore::addUnloadEventListener): Eliminated a local variable for clarity.
2356         (WebCore::removeUnloadEventListener): Ditto. Also use remove instead
2357         of find/remove.
2358         (WebCore::removeAllUnloadEventListeners): Ditto. Also use removeAll instead
2359         of find/removeAll.
2360         (WebCore::addBeforeUnloadEventListener): Ditto.
2361         (WebCore::removeBeforeUnloadEventListener): Ditto.
2362         (WebCore::removeAllBeforeUnloadEventListeners): Ditto.
2363
2364         * page/FrameView.cpp:
2365         (WebCore::FrameView::removeViewportConstrainedObject): Use the return
2366         value from remove to avoid hashing twice.
2367         (WebCore::FrameView::removeScrollableArea): Use the return value from
2368         remove instead of find/remove.
2369         (WebCore::FrameView::containsScrollableArea): Use && instead of an if
2370         statement in a way that is idiomatic for this kind of function.
2371
2372         * page/Page.cpp:
2373         (WebCore::Page::addRelevantRepaintedObject): Use the return value from
2374         remove instead of find/remove.
2375
2376         * page/PageGroup.cpp:
2377         (WebCore::PageGroup::removeUserScriptsFromWorld): Use remove instead
2378         of find/remove.
2379         (WebCore::PageGroup::removeUserStyleSheetsFromWorld): Use the return
2380         value from remove instead of find/remove.
2381
2382         * page/PerformanceUserTiming.cpp:
2383         (WebCore::clearPeformanceEntries): Removed a needless call to contains.
2384
2385         * platform/graphics/DisplayRefreshMonitor.cpp:
2386         (WebCore::DisplayRefreshMonitor::removeClient): Use the return value
2387         from remove instead of find/remove.
2388         (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Use remove
2389         instead of find/remove.
2390
2391         * platform/graphics/blackberry/LayerRenderer.cpp:
2392         (WebCore::LayerRenderer::removeLayer): Use the return value from remove
2393         instead of find/remove.
2394
2395         * platform/win/WindowMessageBroadcaster.cpp:
2396         (WebCore::WindowMessageBroadcaster::removeListener): Use remove instead
2397         of find/remove. It's fine to do the check for an empty hash table unconditionally.
2398
2399         * plugins/PluginDatabase.cpp:
2400         (WebCore::PluginDatabase::removeDisabledPluginFile): Use the return value
2401         from remove instead of find/remove.
2402
2403         * rendering/style/StyleCustomFilterProgramCache.cpp:
2404         (WebCore::StyleCustomFilterProgramCache::lookup): Use get instead of find.
2405         (WebCore::StyleCustomFilterProgramCache::add): Use contains instead of find
2406         in an assertion.
2407         (WebCore::StyleCustomFilterProgramCache::remove): Use remove instead of
2408         find/remove.
2409
2410         * svg/SVGCursorElement.cpp:
2411         (WebCore::SVGCursorElement::removeClient): Use the return value from remove
2412         instead of find/remove.
2413
2414         * svg/SVGDocumentExtensions.cpp:
2415         (WebCore::SVGDocumentExtensions::removeResource): Removed an unneeded call
2416         to contains.
2417         (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Use
2418         remove instead of find/remove. It's fine to do the check for an empty hash
2419         table unconditionally.
2420         (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Use
2421         remove instead of find/remove. Also removed unhelpful assertions. One is
2422         already done by HashMap, and the other is just checking a basic invariant
2423         of every HashMap that doesn't need to be checked.
2424
2425         * svg/graphics/SVGImageCache.cpp:
2426         (WebCore::SVGImageCache::removeClientFromCache): Removed an unneeded call
2427         to contains.
2428
2429         * svg/properties/SVGAnimatedProperty.cpp:
2430         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Use the version of
2431         remove that takes an iterator rather than the one that takes a key, so
2432         we don't need to redo the hashing.
2433
2434 2013-09-02  Andreas Kling  <akling@apple.com>
2435
2436         Generate isFooElement() functions from tagname data.
2437         <https://webkit.org/b/120584>
2438
2439         Reviewed by Antti Koivisto.
2440
2441         Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
2442         If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
2443         This also outputs an isElementOfType<T> check for the Element iterators.
2444
2445         Removed all the hand-written isFooElement() functions that only checked tag name.
2446
2447         * html/HTMLTagNames.in:
2448         * svg/svgtags.in:
2449
2450             Added "generateTypeChecks" attribute as appropriate.
2451
2452         * GNUmakefile.am:
2453         * GNUmakefile.list.am:
2454         * WebCore.vcxproj/WebCore.vcxproj:
2455         * WebCore.xcodeproj/project.pbxproj:
2456
2457             Added to build systems based on how HTMLNames.h was done.
2458             We're just outputting an additional header file in the generated code directory
2459             so I suspect most ports will just pick this up automagically.
2460
2461         * dom/make_names.pl:
2462         (defaultTagPropertyHash):
2463         (printLicenseHeader):
2464         (printTypeChecks):
2465         (printTypeChecksHeaderFile):
2466
2467             Generate a separate file for each namespace with isFooElement() helpers for
2468             elements with "generateTypeChecks" attribute set.
2469
2470 2013-09-02  Darin Adler  <darin@apple.com>
2471
2472         [Mac] No need for HardAutorelease, which is same as CFBridgingRelease
2473         https://bugs.webkit.org/show_bug.cgi?id=120569
2474
2475         Reviewed by Andy Estes.
2476
2477         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2478         (AXTextMarkerRange):
2479         (AXTextMarkerRangeStart):
2480         (AXTextMarkerRangeEnd):
2481         (textMarkerForVisiblePosition):
2482         Use CFBridgingRelease.
2483
2484         * platform/mac/KURLMac.mm:
2485         (WebCore::KURL::operator NSURL *): Use CFBridgingRelease.
2486         (WebCore::KURL::createCFURL): Get rid of needless local variable.
2487
2488         * platform/mac/WebCoreNSURLExtras.mm:
2489         (WebCore::mapHostNameWithRange):
2490         (WebCore::URLWithData):
2491         (WebCore::userVisibleString):
2492         * platform/text/mac/StringImplMac.mm:
2493         (WTF::StringImpl::operator NSString *):
2494         Use CFBridgingRelease.
2495
2496 2013-09-01  Andreas Kling  <akling@apple.com>
2497
2498         Ref: A smart pointer for the reference age.
2499         <https://webkit.org/b/120570>
2500
2501         Reviewed by Antti Koivisto.
2502
2503         Use Ref<T> for various stack guards where null checking isn't needed.
2504
2505 2013-09-02  Andreas Kling  <akling@apple.com>
2506
2507         Simplify DocumentType handling.
2508         <https://webkit.org/b/120529>
2509
2510         Reviewed by Antti Koivisto.
2511
2512         Removed the insertedInto()/removedFrom() handlers from DocumentType.
2513
2514         Document no longer keeps a pointer to its doctype node, it was only used for the
2515         document.doctype DOM API, which now just looks through the list of (<=2) children.
2516
2517         The ENABLE(LEGACY_VIEWPORT_ADAPTION) hunk from Document::setDocType() was moved
2518         into Document::childrenChanged().
2519
2520         We no longer clear the style resolver on doctype insertion/removal since it
2521         doesn't actually affect style anyway.
2522
2523         Also made doctype() return a PassRefPtr<DocumentType> instead of a raw pointer.
2524
2525         * dom/Document.cpp:
2526         (WebCore::Document::dispose):
2527         (WebCore::Document::doctype):
2528         (WebCore::Document::childrenChanged):
2529         * dom/Document.h:
2530         * dom/DocumentType.cpp:
2531         * dom/DocumentType.h:
2532         * editing/markup.cpp:
2533         (WebCore::documentTypeString):
2534
2535 2013-09-02  Anton Obzhirov  <a.obzhirov@samsung.com>
2536
2537         <https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
2538
2539         Reviewed by Mario Sanchez Prada.
2540
2541         The patch exposes aria-invalid attribute to ATK.
2542
2543         * accessibility/atk/AXObjectCacheAtk.cpp:
2544         (WebCore::AXObjectCache::postPlatformNotification):
2545         Added emitting state-change signal for aria-invalid event.
2546         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2547         (webkitAccessibleGetAttributes):
2548         Added aria-invalid attribute.
2549
2550 2013-09-02  Commit Queue  <commit-queue@webkit.org>
2551
2552         Unreviewed, rolling out r154955.
2553         http://trac.webkit.org/changeset/154955
2554         https://bugs.webkit.org/show_bug.cgi?id=120605
2555
2556         broke xcode4 build :| (Requested by kling on #webkit).
2557
2558         * GNUmakefile.am:
2559         * GNUmakefile.list.am:
2560         * WebCore.vcxproj/WebCore.vcxproj:
2561         * WebCore.xcodeproj/project.pbxproj:
2562         * dom/make_names.pl:
2563         (defaultTagPropertyHash):
2564         (printLicenseHeader):
2565         * html/HTMLAnchorElement.h:
2566         (WebCore::isHTMLAnchorElement):
2567         (WebCore::HTMLAnchorElement):
2568         * html/HTMLAreaElement.h:
2569         (WebCore::isHTMLAreaElement):
2570         (WebCore::HTMLAreaElement):
2571         * html/HTMLAudioElement.h:
2572         (WebCore::isHTMLAudioElement):
2573         * html/HTMLBaseElement.h:
2574         (WebCore::isHTMLBaseElement):
2575         (WebCore::HTMLBaseElement):
2576         * html/HTMLCanvasElement.h:
2577         (WebCore::isHTMLCanvasElement):
2578         * html/HTMLElement.h:
2579         * html/HTMLFieldSetElement.h:
2580         (WebCore::isHTMLFieldSetElement):
2581         (WebCore::HTMLFieldSetElement):
2582         * html/HTMLFormElement.h:
2583         (WebCore::isHTMLFormElement):
2584         * html/HTMLFrameSetElement.h:
2585         (WebCore::isHTMLFrameSetElement):
2586         (WebCore::HTMLFrameSetElement):
2587         * html/HTMLImageElement.h:
2588         (WebCore::isHTMLImageElement):
2589         * html/HTMLInputElement.h:
2590         (WebCore::isHTMLInputElement):
2591         * html/HTMLLabelElement.h:
2592         (WebCore::isHTMLLabelElement):
2593         (WebCore::HTMLLabelElement):
2594         * html/HTMLLegendElement.h:
2595         (WebCore::isHTMLLegendElement):
2596         (WebCore::HTMLLegendElement):
2597         * html/HTMLMapElement.h:
2598         (WebCore::isHTMLMapElement):
2599         * html/HTMLMeterElement.h:
2600         (WebCore::isHTMLMeterElement):
2601         * html/HTMLOptGroupElement.h:
2602         (WebCore::isHTMLOptGroupElement):
2603         * html/HTMLOptionElement.h:
2604         (WebCore::isHTMLOptionElement):
2605         * html/HTMLParamElement.h:
2606         (WebCore::isHTMLParamElement):
2607         (WebCore::HTMLParamElement):
2608         * html/HTMLProgressElement.h:
2609         (WebCore::isHTMLProgressElement):
2610         * html/HTMLScriptElement.h:
2611         (WebCore::isHTMLScriptElement):
2612         * html/HTMLSourceElement.h:
2613         (WebCore::isHTMLSourceElement):
2614         (WebCore::HTMLSourceElement):
2615         * html/HTMLStyleElement.h:
2616         (WebCore::isHTMLStyleElement):
2617         (WebCore::HTMLStyleElement):
2618         * html/HTMLTableElement.h:
2619         (WebCore::isHTMLTableElement):
2620         * html/HTMLTableRowElement.h:
2621         (WebCore::isHTMLTableRowElement):
2622         (WebCore::HTMLTableRowElement):
2623         * html/HTMLTagNames.in:
2624         * html/HTMLTextAreaElement.h:
2625         (WebCore::isHTMLTextAreaElement):
2626         * html/HTMLTitleElement.h:
2627         (WebCore::isHTMLTitleElement):
2628         (WebCore::HTMLTitleElement):
2629         * html/HTMLTrackElement.h:
2630         (WebCore::isHTMLTrackElement):
2631         (WebCore::HTMLTrackElement):
2632         * svg/SVGElement.h:
2633         * svg/SVGFontElement.h:
2634         (WebCore::isSVGFontElement):
2635         * svg/SVGFontFaceElement.h:
2636         (WebCore::isSVGFontFaceElement):
2637         (WebCore::SVGFontFaceElement):
2638         * svg/SVGForeignObjectElement.h:
2639         (WebCore::isSVGForeignObjectElement):
2640         (WebCore::SVGForeignObjectElement):
2641         * svg/SVGImageElement.h:
2642         (WebCore::isSVGImageElement):
2643         * svg/SVGScriptElement.h:
2644         (WebCore::isSVGScriptElement):
2645         * svg/svgtags.in:
2646
2647 2013-09-02  Antti Koivisto  <antti@apple.com>
2648
2649         Clean up ContainerNode::childrenChanged
2650         https://bugs.webkit.org/show_bug.cgi?id=120599
2651
2652         Reviewed by Andreas Kling.
2653
2654         - Make childrenChanged take a single struct argument instead of a long list of arguments.
2655         - Use enum instead of childCountDelta. It was always -1, 0, 1 or the total number of children (in case of removing them all).
2656         - Remove use of Node*, give the change range as Elements.
2657         - Related cleanups.
2658
2659         * dom/Attr.cpp:
2660         (WebCore::Attr::childrenChanged):
2661         * dom/Attr.h:
2662         * dom/CharacterData.cpp:
2663         (WebCore::CharacterData::parserAppendData):
2664         (WebCore::CharacterData::dispatchModifiedEvent):
2665         * dom/ContainerNode.cpp:
2666         (WebCore::ContainerNode::insertBefore):
2667         (WebCore::ContainerNode::notifyChildInserted):
2668         (WebCore::ContainerNode::notifyChildRemoved):
2669         
2670             Add private helpers for setting up the struct.
2671
2672         (WebCore::ContainerNode::parserInsertBefore):
2673         (WebCore::ContainerNode::replaceChild):
2674         (WebCore::ContainerNode::removeChild):
2675         (WebCore::ContainerNode::parserRemoveChild):
2676         (WebCore::ContainerNode::removeChildren):
2677         (WebCore::ContainerNode::appendChild):
2678         (WebCore::ContainerNode::parserAppendChild):
2679         (WebCore::ContainerNode::childrenChanged):
2680         (WebCore::ContainerNode::updateTreeAfterInsertion):
2681         * dom/ContainerNode.h:
2682         * dom/Document.cpp:
2683         (WebCore::Document::childrenChanged):
2684         * dom/Document.h:
2685         * dom/Element.cpp:
2686         (WebCore::checkForSiblingStyleChanges):
2687         
2688             Clean up and simplify. Since we now get element range automatically we don't need to compute it.
2689
2690         (WebCore::Element::childrenChanged):
2691         (WebCore::Element::finishParsingChildren):
2692         * dom/Element.h:
2693         * dom/ShadowRoot.cpp:
2694         (WebCore::ShadowRoot::childrenChanged):
2695         * dom/ShadowRoot.h:
2696         * html/HTMLElement.cpp:
2697         (WebCore::HTMLElement::childrenChanged):
2698         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
2699         
2700             Try to keep the existing behavior. This code needs  more cleanup to be sane. It shouldn't operate on Nodes
2701             as it only really cares about Elements.
2702
2703         * html/HTMLElement.h:
2704         * html/HTMLFieldSetElement.cpp:
2705         (WebCore::HTMLFieldSetElement::childrenChanged):
2706         * html/HTMLFieldSetElement.h:
2707         * html/HTMLObjectElement.cpp:
2708         (WebCore::HTMLObjectElement::childrenChanged):
2709         * html/HTMLObjectElement.h:
2710         * html/HTMLOptGroupElement.cpp:
2711         (WebCore::HTMLOptGroupElement::childrenChanged):
2712         * html/HTMLOptGroupElement.h:
2713         * html/HTMLOptionElement.cpp:
2714         (WebCore::HTMLOptionElement::childrenChanged):
2715         * html/HTMLOptionElement.h:
2716         * html/HTMLOutputElement.cpp:
2717         (WebCore::HTMLOutputElement::childrenChanged):
2718         * html/HTMLOutputElement.h:
2719         * html/HTMLScriptElement.cpp:
2720         (WebCore::HTMLScriptElement::childrenChanged):
2721         * html/HTMLScriptElement.h:
2722         * html/HTMLSelectElement.cpp:
2723         (WebCore::HTMLSelectElement::childrenChanged):
2724         * html/HTMLSelectElement.h:
2725         * html/HTMLStyleElement.cpp:
2726         (WebCore::HTMLStyleElement::childrenChanged):
2727         * html/HTMLStyleElement.h:
2728         * html/HTMLTextAreaElement.cpp:
2729         (WebCore::HTMLTextAreaElement::childrenChanged):
2730         * html/HTMLTextAreaElement.h:
2731         * html/HTMLTitleElement.cpp:
2732         (WebCore::HTMLTitleElement::childrenChanged):
2733         * html/HTMLTitleElement.h:
2734         * html/shadow/InsertionPoint.cpp:
2735         (WebCore::InsertionPoint::childrenChanged):
2736         * html/shadow/InsertionPoint.h:
2737         * svg/SVGClipPathElement.cpp:
2738         (WebCore::SVGClipPathElement::childrenChanged):
2739         * svg/SVGClipPathElement.h:
2740         * svg/SVGElement.cpp:
2741         (WebCore::SVGElement::childrenChanged):
2742         * svg/SVGElement.h:
2743         * svg/SVGFELightElement.cpp:
2744         (WebCore::SVGFELightElement::childrenChanged):
2745         * svg/SVGFELightElement.h:
2746         * svg/SVGFilterElement.cpp:
2747         (WebCore::SVGFilterElement::childrenChanged):
2748         * svg/SVGFilterElement.h:
2749         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2750         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
2751         * svg/SVGFilterPrimitiveStandardAttributes.h:
2752         * svg/SVGFontFaceElement.cpp:
2753         (WebCore::SVGFontFaceElement::childrenChanged):
2754         * svg/SVGFontFaceElement.h:
2755         * svg/SVGFontFaceFormatElement.cpp:
2756         (WebCore::SVGFontFaceFormatElement::childrenChanged):
2757         * svg/SVGFontFaceFormatElement.h:
2758         * svg/SVGFontFaceSrcElement.cpp:
2759         (WebCore::SVGFontFaceSrcElement::childrenChanged):
2760         * svg/SVGFontFaceSrcElement.h:
2761         * svg/SVGFontFaceUriElement.cpp:
2762         (WebCore::SVGFontFaceUriElement::childrenChanged):
2763         * svg/SVGFontFaceUriElement.h:
2764         * svg/SVGGradientElement.cpp:
2765         (WebCore::SVGGradientElement::childrenChanged):
2766         * svg/SVGGradientElement.h:
2767         * svg/SVGMarkerElement.cpp:
2768         (WebCore::SVGMarkerElement::childrenChanged):
2769         * svg/SVGMarkerElement.h:
2770         * svg/SVGMaskElement.cpp:
2771         (WebCore::SVGMaskElement::childrenChanged):
2772         * svg/SVGMaskElement.h:
2773         * svg/SVGPatternElement.cpp:
2774         (WebCore::SVGPatternElement::childrenChanged):
2775         * svg/SVGPatternElement.h:
2776         * svg/SVGScriptElement.cpp:
2777         (WebCore::SVGScriptElement::childrenChanged):
2778         * svg/SVGScriptElement.h:
2779         * svg/SVGStyleElement.cpp:
2780         (WebCore::SVGStyleElement::childrenChanged):
2781         * svg/SVGStyleElement.h:
2782         * svg/SVGTitleElement.cpp:
2783         (WebCore::SVGTitleElement::childrenChanged):
2784         * svg/SVGTitleElement.h:
2785
2786 2013-09-02  Andreas Kling  <akling@apple.com>
2787
2788         Generate isFooElement() functions from tagname data.
2789         <https://webkit.org/b/120584>
2790
2791         Reviewed by Antti Koivisto.
2792
2793         Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
2794         If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
2795         This also outputs an isElementOfType<T> check for the Element iterators.
2796
2797         Removed all the hand-written isFooElement() functions that only checked tag name.
2798
2799         * html/HTMLTagNames.in:
2800         * svg/svgtags.in:
2801
2802             Added "generateTypeChecks" attribute as appropriate.
2803
2804         * GNUmakefile.am:
2805         * GNUmakefile.list.am:
2806         * WebCore.vcxproj/WebCore.vcxproj:
2807         * WebCore.xcodeproj/project.pbxproj:
2808
2809             Added to build systems based on how HTMLNames.h was done.
2810             We're just outputting an additional header file in the generated code directory
2811             so I suspect most ports will just pick this up automagically.
2812
2813         * dom/make_names.pl:
2814         (defaultTagPropertyHash):
2815         (printLicenseHeader):
2816         (printTypeChecks):
2817         (printTypeChecksHeaderFile):
2818
2819             Generate a separate file for each namespace with isFooElement() helpers for
2820             elements with "generateTypeChecks" attribute set.
2821
2822 2013-09-02  Dirk Schulze  <krit@webkit.org>
2823
2824         Use edgeMode=duplicate for blurring on filter() function
2825         https://bugs.webkit.org/show_bug.cgi?id=120590
2826
2827         Reviewed by Antti Koivisto.
2828
2829         Filters on the CSS Image function filter() are not allowed to extend the
2830         dimension of the input image. This causes weird results on blurring an image,
2831         where the fading on the edges is clipped at the half of the fading.
2832         We shouldn't fade edges at all and use the edgeMode=duplicate instead.
2833         This will duplicate the pixel value on the nearest edge of the input image
2834         instead of taking transparent black and results in nice blurred images with
2835         sharp edges.
2836
2837         Spec: http://dev.w3.org/fxtf/filters/#blurEquivalent
2838
2839         Test: fast/filter-image/filter-image-blur.html
2840
2841         * css/CSSFilterImageValue.cpp: Pass consumer information to the renderer.
2842         (WebCore::CSSFilterImageValue::image):
2843         * rendering/FilterEffectRenderer.cpp: Set edgeMode for feGaussianBlur to
2844             'duplicate' or 'none' depending on the consumer.
2845         (WebCore::FilterEffectRenderer::build):
2846         * rendering/FilterEffectRenderer.h: Add enumeration to differ between the 
2847             different consumers of the renderer.
2848         * rendering/RenderLayer.cpp:
2849         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):  Pass consumer
2850             information to the renderer.
2851
2852 2013-09-01  Dirk Schulze  <krit@webkit.org>
2853
2854         Add 'edgeMode' attribute to SVGFEGaussianBlur
2855         https://bugs.webkit.org/show_bug.cgi?id=120582
2856
2857         Add 'edgeMode' attribute to the SVGFEGaussianBlur element. This attribute
2858         allows users to define the behavior on edges with the values 'none' where
2859         pixel values outside the input image are treated as transparent black. (The
2860         current blurring behavior.) 'duplicate' which repeats the values on the
2861         nearest edge and 'warp', which takes the pixel of the opposite site of
2862         the input image.
2863         Beside the attribute, this patch implements the behavior of 'duplicate'.
2864
2865         http://dev.w3.org/fxtf/filters/#feGaussianBlurEdgeModeAttribute
2866
2867         Reviewed by Rob Buis.
2868
2869         Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html
2870                svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html
2871                svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg
2872                svg/filters/svg-gaussianblur-edgeMode-duplicate.svg
2873
2874         * platform/graphics/filters/FEGaussianBlur.cpp:
2875         (WebCore::FEGaussianBlur::FEGaussianBlur):
2876         (WebCore::FEGaussianBlur::create):
2877         (WebCore::FEGaussianBlur::edgeMode):
2878         (WebCore::FEGaussianBlur::setEdgeMode):
2879         (WebCore::boxBlur):
2880         (WebCore::FEGaussianBlur::platformApplyGeneric):
2881         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
2882         * platform/graphics/filters/FEGaussianBlur.h:
2883         * rendering/FilterEffectRenderer.cpp:
2884         (WebCore::FilterEffectRenderer::build):
2885         * svg/SVGFEGaussianBlurElement.cpp:
2886         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
2887         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
2888         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
2889         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
2890         (WebCore::SVGFEGaussianBlurElement::build):
2891         * svg/SVGFEGaussianBlurElement.h:
2892         * svg/SVGFEGaussianBlurElement.idl:
2893
2894 2013-09-01  Andreas Kling  <akling@apple.com>
2895
2896         EventHandler::m_frame should be a Frame&.
2897         <https://webkit.org/b/120580>
2898
2899         Reviewed by Darin Adler.
2900
2901         EventHandler is tied to the lifetime of its frame, so let m_frame be a Frame&.
2902         A handful of null checks and assertions removed.
2903
2904 2013-09-01  Darin Adler  <darin@apple.com>
2905
2906         Fix a mistake in my recent pasteboard/editor refactoring that was causing tests to fail.
2907
2908         * editing/mac/EditorMac.mm:
2909         (WebCore::getImage): One place this said cachedImage but it should have said tentativeCachedImage.
2910
2911 2013-09-01  Darin Adler  <darin@apple.com>
2912
2913         HitTestResult should have innerNonSharedElement
2914         https://bugs.webkit.org/show_bug.cgi?id=120579
2915
2916         Reviewed by Andreas Kling.
2917
2918         * editing/Editor.cpp:
2919         (WebCore::Editor::copyImage): Call HitTestResult member function version of
2920         innerNonSharedElement instead of a local function that does it.
2921
2922         * page/Chrome.cpp:
2923         (WebCore::Chrome::setToolTip): Use innerNonSharedElement instead of getting
2924         the node and checking if it's an input element. Also added some missing braces.
2925
2926         * page/EventHandler.cpp:
2927         (WebCore::EventHandler::selectClosestWordFromHitTestResult): Use targetNode for
2928         local variables instead of innerNode to match the HitTestResult function name.
2929         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
2930         (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
2931         (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
2932         (WebCore::EventHandler::handleMousePressEvent): Ditto.
2933
2934         * rendering/HitTestResult.cpp:
2935         (WebCore::HitTestResult::innerElement): Rewrote so there there is no loop.
2936         (WebCore::HitTestResult::innerNonSharedElement): Ditto.
2937
2938         * rendering/HitTestResult.h: Added innerNonSharedElement. Generally speaking,
2939         we'd like to avoid using Node unless there is some real need.
2940
2941 2013-09-01  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2942
2943         Volume slider value should be 0 when audio is muted
2944         https://bugs.webkit.org/show_bug.cgi?id=120553
2945
2946         Reviewed by Eric Carlson.
2947
2948         Fixed the problem of showing a non empty slider when audio is
2949         muted.
2950
2951         Test: media/volume-bar-empty-when-muted.html.
2952
2953         * html/shadow/MediaControls.cpp:
2954         (WebCore::MediaControls::reset): Use setSliderVolume.
2955         (WebCore::MediaControls::changedVolume): Use setSliderVolume.
2956         (WebCore::MediaControls::setSliderVolume): Added to set the volume
2957         to 0 when muted and to its value otherwise.
2958         * html/shadow/MediaControls.h: Added setSliderVolume.
2959         * html/shadow/MediaControlsApple.cpp:
2960         (WebCore::MediaControlsApple::reset): Used setSliderVolume and
2961         setFullscreenSliderVolume.
2962         (WebCore::MediaControlsApple::changedVolume): Used
2963         setFullscreenSliderVolume.
2964         (WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
2965         set the volume to 0 when muted and to its value otherwise.
2966         * html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
2967         * html/shadow/MediaControlsBlackBerry.cpp:
2968         (WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.
2969
2970 2013-09-01  Andreas Kling  <akling@apple.com>
2971
2972         Give EditCommand a protected Frame& getter.
2973         <https://webkit.org/b/120574>
2974
2975         Reviewed by Darin Adler.
2976
2977         EditCommand is only created for documents that are attached to a Frame,
2978         we already ASSERTed as much in the EditCommand constructor.
2979
2980         This patch adds a "Frame& EditCommand::frame()" helper, so EditCommand
2981         and its subclasses don't have to fumble around with pointers.
2982
2983 2013-08-31  Antti Koivisto  <antti@apple.com>
2984
2985         Add element ancestor iterator
2986         https://bugs.webkit.org/show_bug.cgi?id=120563
2987
2988         Reviewed by Andreas Kling.
2989
2990         This patch adds ancestor iterators. They iterate over elements parent chain up to the root.
2991         
2992         To iterate over Element ancestors:
2993         
2994         auto ancestors = elementAncestors(this);
2995         for (auto it = ancestors.begin(), end = ancestors.end(); it != end; ++it) {
2996             Element& element = *it;
2997             ...
2998
2999         To iterate over Element ancestors including the current element:
3000         
3001         auto lineage = elementLineage(this);
3002         for (auto it = lineage.begin(), end = lineage.end(); it != end; ++it) {
3003             Element& element = *it;
3004             ...
3005             
3006         To iterate over ancestors of a specific Element subclass:
3007
3008         auto htmlAncestors = ancestorsOfType<HTMLElement>(this);
3009         for (auto it = htmlAncestors.begin(), end = htmlAncestors.end(); it != end; ++it) {
3010             HTMLElement& htmlElement = *it;
3011             ...
3012             
3013         To iterate over ancestors of a specific Element subclass including the current element:
3014
3015         auto htmlLineage = lineageOfType<HTMLElement>(this);
3016         for (auto it = htmlLineage.begin(), end = htmlLineage.end(); it != end; ++it) {
3017             HTMLElement& htmlElement = *it;
3018             ...
3019             
3020         The patch also uses the new types in a few places.
3021
3022         * WebCore.xcodeproj/project.pbxproj:
3023         * accessibility/AccessibilityNodeObject.cpp:
3024         (WebCore::AccessibilityNodeObject::mouseButtonListener):
3025         (WebCore::AccessibilityNodeObject::labelForElement):
3026         * dom/ElementAncestorIterator.h: Added.
3027         (WebCore::::ElementAncestorIterator):
3028         (WebCore::::operator):
3029         (WebCore::::ElementAncestorConstIterator):
3030         (WebCore::::ElementAncestorIteratorAdapter):
3031         (WebCore::::begin):
3032         (WebCore::::end):
3033         (WebCore::::ElementAncestorConstIteratorAdapter):
3034         (WebCore::elementLineage):
3035         (WebCore::elementAncestors):
3036         (WebCore::ancestorsOfType):
3037         * dom/ElementIterator.h:
3038         (WebCore::findElementAncestorOfType):
3039         (WebCore::::traverseAncestor):
3040         (WebCore::=):
3041         * html/HTMLElement.cpp:
3042         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
3043         * html/HTMLFieldSetElement.h:
3044         (WebCore::isHTMLFieldSetElement):
3045         (WebCore::HTMLFieldSetElement):
3046         * html/HTMLFrameSetElement.cpp:
3047         (WebCore::HTMLFrameSetElement::findContaining):
3048         * html/HTMLFrameSetElement.h:
3049         (WebCore::HTMLFrameSetElement):
3050         * html/HTMLInputElement.h:
3051         (WebCore::isHTMLInputElement):
3052         (WebCore::toHTMLInputElement):
3053         * html/HTMLLegendElement.cpp:
3054         (WebCore::HTMLLegendElement::associatedControl):
3055
3056 2013-08-31  Darin Adler  <darin@apple.com>
3057
3058         Refactor URL and image writing so layer-violating parts are in Editor, not Pasteboard (Mac-only at first)
3059         https://bugs.webkit.org/show_bug.cgi?id=120573
3060
3061         Reviewed by Andreas Kling.
3062
3063         * editing/Editor.cpp:
3064         (WebCore::Editor::copy): Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
3065         (WebCore::Editor::copyURL): Use writeURLToPasteboard instead of Pasteboard::writeURL on Mac.
3066         (WebCore::innerNonSharedElement): Added. Used in copyImage.
3067         (WebCore::Editor::copyImage): Use innerNonSharedElement instead of innerNonSharedNode.
3068         Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
3069
3070         * editing/Editor.h: Add new functions, writeURLToPasteboard and writeImageToPasteboard,
3071         both Mac-only for now.
3072
3073         * editing/mac/EditorMac.mm:
3074         (WebCore::Editor::pasteWithPasteboard): Removed unneeded "m_frame.editor()" round trip that
3075         was left behind in this function.
3076         (WebCore::getImage): Added. Helper used by writeImageToPasteboard.
3077         (WebCore::Editor::writeURLToPasteboard): Added. Sets up PasteboardURL and then calls
3078         Pasteboard::write with it.
3079         (WebCore::Editor::writeImageToPasteboard): Added. Sets up PasteboardImage and then calls
3080         Pasteboard::write with it.
3081         * page/DragController.cpp:
3082         (WebCore::DragController::startDrag): Use Editor::writeURLToPasteboard instead of
3083         Pasteboard::writeURL on Mac.
3084
3085         * platform/Pasteboard.h: Added PasteboardURL and PasteboardImage structures.
3086         Declare write functions for PasteboardWebContent, PasteboardURL, and PasteboardImage.
3087         Guard writeURL and writeImage with !PLATFORM(MAC).
3088
3089         * platform/mac/PasteboardMac.mm:
3090         (WebCore::writeURLForTypes): Changed this to take a PasteboardURL.
3091         (WebCore::Pasteboard::write): Renamed writeURL and writeImage to this. Refactor both
3092         to take PasteboardURL and PasteboardImage arguments.
3093         (WebCore::fileWrapper): Renamed from fileWrapperForImage since the fact that this is
3094         for an image is now clear from its argument, a PasteboardImage.
3095         (WebCore::writeFileWrapperAsRTFDAttachment): Changed this function to use early return.
3096
3097 2013-08-31  Andreas Kling  <akling@apple.com>
3098
3099         EditCommand constructors should take Document&.
3100         <https://webkit.org/b/120566>
3101
3102         Reviewed by Darin Adler.
3103
3104         Let EditCommand's and all subclass constructors take Document& instead of Document*.
3105         EditCommand::document() now returns a Document&.
3106
3107         Added Editor::document() which returns Editor::frame().document() after asserting
3108         that it's non-null, to make passing a Document& from Editor functions easier.
3109
3110 2013-08-31  Andreas Kling  <akling@apple.com>
3111
3112         Make more use of toRenderFoo(RenderObject&) cast helpers.
3113         <https://webkit.org/b/120565>
3114
3115         Reviewed by Darin Adler.
3116
3117         To make amends for putting ugly toRenderFoo(&renderer) casts everywhere,
3118         here's a patch that switches a bunch of code over to using reference-based casts.
3119
3120         I removed pointer-based casts altogether for these renderers:
3121
3122             - RenderBR
3123             - RenderCombineText
3124             - RenderListMarker
3125             - RenderVideo
3126             - RenderView
3127
3128 2013-08-31  Santosh Mahto  <santosh.ma@samsung.com>
3129
3130         warning: unused parameter ‘renderingMode'  in ImageBufferCairo.cpp:94
3131         https://bugs.webkit.org/show_bug.cgi?id=120543
3132
3133         Reviewed by Darin Adler.
3134
3135         Fixing warning by adding ASSERT_UNUSED.
3136
3137         * platform/graphics/cairo/ImageBufferCairo.cpp:
3138         (WebCore::ImageBuffer::ImageBuffer):
3139
3140 2013-08-31  Andreas Kling  <akling@apple.com>
3141
3142         Fix typo in r154931 that caused assertions in continuation tests.
3143
3144         * rendering/InlineFlowBox.cpp:
3145         (WebCore::InlineFlowBox::paint):
3146
3147 2013-08-31  Rob Buis  <rwlbuis@webkit.org>
3148
3149         XMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
3150         https://bugs.webkit.org/show_bug.cgi?id=120490
3151
3152         Reviewed by Ryosuke Niwa.
3153
3154         Retain the key of the namespaces map by using AtomicString as key instead of AtomicStringImpl*.
3155
3156         * editing/MarkupAccumulator.h:
3157
3158 2013-08-31  Andreas Kling  <akling@apple.com>
3159
3160         InlineBox::renderer() and pals should return references.
3161         <https://webkit.org/b/120562>
3162
3163         Reviewed by Antti Koivisto.
3164
3165         Make InlineBox::renderer() and its friends return references instead of pointers.
3166         Every box always has a renderer, so this clears up any ambiguity, and a number of
3167         weird assertions in SVG code.
3168
3169         Made InlineBox::m_renderer private so subclasses have to go through renderer().
3170         The next step will be to replace renderer() with tightly-typed accessors where
3171         applicable (e.g InlineTextBox's renderer is always a RenderText.)
3172
3173         Also added reference versions of these RenderObject casts:
3174
3175             - toRenderBox()
3176             - toRenderBlock()
3177             - toRenderInline()
3178             - toRenderSVGInlineText()
3179
3180 2013-08-31  Andreas Kling  <akling@apple.com>
3181
3182         PostAttachCallbackDisabler should take a ContainerNode&.
3183         <https://webkit.org/b/120560>
3184
3185         Reviewed by Antti Koivisto.
3186
3187         Let PostAttachCallbackDisabler take a reference and remove an ugly assertion.
3188
3189         * dom/ContainerNode.h:
3190         (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
3191         (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
3192         * dom/Document.cpp:
3193         (WebCore::Document::recalcStyle):
3194         * style/StyleResolveTree.cpp:
3195         (WebCore::Style::attachRenderTree):
3196
3197 2013-08-31  Antti Koivisto  <antti@apple.com>
3198
3199         Rename ChildIterator -> ElementChildIterator, DescendantIterator -> ElementDescendantIterator
3200         https://bugs.webkit.org/show_bug.cgi?id=120561
3201
3202         Reviewed by Andreas Kling.
3203
3204         New names are more descriptive and consistent. They also put related iterator files close by in file lists.
3205         The types are always used with auto so longer names don't make them any clumsier to use.
3206
3207         For simplicity included all Element iterator types from ElementIterator.h so it is the only file that has
3208         to be included by the clients.
3209
3210         * GNUmakefile.list.am:
3211         * Target.pri:
3212         * WebCore.vcxproj/WebCore.vcxproj:
3213         * WebCore.xcodeproj/project.pbxproj:
3214         * accessibility/AccessibilityNodeObject.cpp:
3215         * accessibility/AccessibilityRenderObject.cpp:
3216         * accessibility/AccessibilityTable.cpp:
3217         * css/CSSFontFaceSource.cpp:
3218         * dom/ChildIterator.h: Removed.
3219         * dom/DescendantIterator.h: Removed.
3220         * dom/Document.cpp:
3221         * dom/ElementChildIterator.h: Copied from Source/WebCore/dom/ChildIterator.h.
3222         (WebCore::::ElementChildIterator):
3223         (WebCore::::operator):
3224         (WebCore::::ElementChildConstIterator):
3225         (WebCore::::ElementChildIteratorAdapter):
3226         (WebCore::::begin):
3227         (WebCore::::end):
3228         (WebCore::::ElementChildConstIteratorAdapter):
3229         (WebCore::elementChildren):
3230         (WebCore::childrenOfType):
3231         * dom/ElementDescendantIterator.h: Copied from Source/WebCore/dom/DescendantIterator.h.
3232         (WebCore::::ElementDescendantIterator):
3233         (WebCore::::operator):
3234         (WebCore::::ElementDescendantConstIterator):
3235         (WebCore::::ElementDescendantIteratorAdapter):
3236         (WebCore::::begin):
3237         (WebCore::::end):
3238         (WebCore::::ElementDescendantConstIteratorAdapter):
3239         (WebCore::elementDescendants):
3240         (WebCore::descendantsOfType):
3241         * dom/ElementIterator.h:
3242         * dom/Node.cpp:
3243         * dom/TreeScope.cpp:
3244         * editing/ApplyStyleCommand.cpp:
3245         * editing/markup.cpp:
3246         * html/HTMLAppletElement.cpp:
3247         * html/HTMLFieldSetElement.cpp:
3248         * html/HTMLLabelElement.cpp:
3249         * html/HTMLMapElement.cpp:
3250         * html/HTMLMediaElement.cpp:
3251         * html/HTMLObjectElement.cpp:
3252         * loader/PlaceholderDocument.cpp:
3253         * rendering/FilterEffectRenderer.cpp:
3254         * style/StyleResolveTree.cpp:
3255         * svg/SVGElement.cpp:
3256         * svg/SVGSVGElement.cpp:
3257         * svg/animation/SMILTimeContainer.cpp:
3258         * svg/graphics/SVGImage.cpp:
3259
3260 2013-08-31  Andreas Kling  <akling@apple.com>
3261
3262         Don't do document style recalc unless there's a RenderView.
3263         <https://webkit.org/b/120558>
3264
3265         Reviewed by Antti Koivisto.
3266
3267         There's no sense in computing style for a Document that has no RenderView.
3268         Checking this before continuing also lets us know that there's a Frame & FrameView
3269         present, simplifying some things later on.
3270
3271         * dom/Document.cpp:
3272         (WebCore::Document::recalcStyle):
3273         * style/StyleResolveForDocument.cpp:
3274         (WebCore::Style::resolveForDocument):
3275
3276 2013-08-31  Antti Koivisto  <antti@apple.com>
3277
3278         Add common base for element iterators
3279         https://bugs.webkit.org/show_bug.cgi?id=120557
3280
3281         Reviewed by Andreas Kling.
3282
3283         Add ElementIterator and use it as the base for child and descendant iterators. The only difference is the definition of operator++.
3284         
3285         Also renamed DescendantIteratorAssertions to ElementIteratorAssertions.
3286
3287         * GNUmakefile.list.am:
3288         * Target.pri:
3289         * WebCore.vcxproj/WebCore.vcxproj:
3290         * WebCore.xcodeproj/project.pbxproj:
3291         * dom/ChildIterator.h:
3292         (WebCore::::ChildIterator):
3293         (WebCore::::operator):
3294         (WebCore::::ChildConstIterator):
3295         (WebCore::::begin):
3296         (WebCore::::end):
3297         * dom/DescendantIterator.h:
3298         (WebCore::::DescendantIterator):
3299         (WebCore::::operator):
3300         (WebCore::::DescendantConstIterator):
3301         * dom/DescendantIteratorAssertions.h: Removed.
3302         * dom/ElementIterator.h: Added.
3303         (WebCore::::ElementIterator):
3304         (WebCore::::traverseNext):
3305         (WebCore::::traversePrevious):
3306         (WebCore::::traverseNextSibling):
3307         (WebCore::::traversePreviousSibling):
3308         (WebCore::::operator):
3309         (WebCore::=):
3310         (WebCore::::ElementConstIterator):
3311         * dom/ElementIteratorAssertions.h: Copied from Source/WebCore/dom/DescendantIteratorAssertions.h.
3312         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
3313         (WebCore::ElementIteratorAssertions::domTreeHasMutated):
3314         (WebCore::ElementIteratorAssertions::dropEventDispatchAssertion):
3315
3316 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
3317
3318         [Windows] Build fix after r154921.
3319
3320         AVFoundationCF uses an internal wrapper object around the C-API. The call point
3321         in the original patch was inside the wrapper, which did not (yet) provide
3322         a method implementation.
3323
3324         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3325         (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
3326         (WebCore::AVFWrapper::updateVideoLayerGravity):
3327
3328 2013-08-30  Simon Fraser  <simon.fraser@apple.com>
3329
3330         Video with object-fit: cover can spill outside the box
3331         https://bugs.webkit.org/show_bug.cgi?id=52103
3332
3333         Reviewed by Dean Jackson.
3334         
3335         object-fit on renderers which use accelerated compositing needs special
3336         treatment.
3337         
3338         For directly composited images, and video, GraphicsLayer needs to know
3339         both the size of the content layer, and also a rectangle at which this
3340         should be clipped (because, for the first time, that content layer can be
3341         larger than the renderer's content box).
3342         
3343         AVFoundation would always aspect-ratio fit video by default, so plumb
3344         through MediaPlayer a way to override that when object-fit requires it.
3345         
3346         Added a LAYER_TREE_INCLUDES_CONTENT_LAYERS enum to the layerTreeAsText()
3347         flags so we can dump content layers for testing.
3348
3349         Tests: compositing/images/direct-image-object-fit.html
3350                compositing/reflections/direct-image-object-fit-reflected.html
3351                compositing/video/video-object-fit.html
3352
3353         * page/Frame.h: New LayerTreeFlagsIncludeContentLayers flag.
3354         * platform/graphics/GraphicsLayer.h: New flag.
3355         * platform/graphics/MediaPlayer.cpp:
3356         (WebCore::MediaPlayer::shouldMaintainAspectRatio):
3357         (WebCore::MediaPlayer::setShouldMaintainAspectRatio):
3358         * platform/graphics/MediaPlayer.h:
3359         * platform/graphics/MediaPlayerPrivate.h:
3360         (WebCore::MediaPlayerPrivateInterface::shouldMaintainAspectRatio):
3361         (WebCore::MediaPlayerPrivateInterface::setShouldMaintainAspectRatio):
3362         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3363         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
3364         (WebCore::MediaPlayerPrivateAVFoundation::setShouldMaintainAspectRatio):
3365         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3366         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3367         (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
3368         (WebCore::AVFWrapper::platformLayer):
3369         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3370         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3371         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3372         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
3373         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
3374         * platform/graphics/ca/GraphicsLayerCA.cpp: We need a new m_contentsClippingLayer to
3375         clip the contents layer, which only gets created when necessary. It has to be cloned
3376         for reflections.
3377         (WebCore::GraphicsLayerCA::willBeDestroyed):
3378         (WebCore::GraphicsLayerCA::setContentsRect):
3379         (WebCore::GraphicsLayerCA::setContentsClippingRect):
3380         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3381         (WebCore::GraphicsLayerCA::updateSublayerList):
3382         (WebCore::GraphicsLayerCA::updateContentsImage):
3383         (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
3384         (WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
3385         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
3386         (WebCore::GraphicsLayerCA::updateContentsRects):
3387         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
3388         (WebCore::GraphicsLayerCA::ensureCloneLayers):
3389         (WebCore::GraphicsLayerCA::removeCloneLayers):
3390         (WebCore::GraphicsLayerCA::fetchCloneLayers):
3391         * platform/graphics/ca/GraphicsLayerCA.h:
3392         * rendering/RenderLayerBacking.cpp: Need to push both the contentsRect and
3393         the contentsClippingRect down to the GraphicsLayers. Most of the time they
3394         are the same, unless object-fit makes them different.
3395         (WebCore::RenderLayerBacking::resetContentsRect):
3396         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
3397         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
3398         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
3399         (WebCore::RenderLayerBacking::updateImageContents):
3400         (WebCore::RenderLayerBacking::contentsBox):
3401         * rendering/RenderLayerCompositor.cpp:
3402         (WebCore::RenderLayerCompositor::layerTreeAsText):
3403         * rendering/RenderVideo.cpp:
3404         (WebCore::RenderVideo::updatePlayer):
3405         * testing/Internals.cpp:
3406         (WebCore::Internals::layerTreeAsText):
3407         * testing/Internals.h:
3408         * testing/Internals.idl:
3409
3410 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
3411
3412         [Windows] Update to incorporate additional suggestions
3413         https://bugs.webkit.org/show_bug.cgi?id=120448
3414
3415         Reviewed by Darin Adler
3416
3417         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Add
3418         notes as to why AVFoundationCF needs this extra method call.
3419         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Use OVERRIDE
3420         * rendering/RenderVideo.cpp: Replace ternary operator with logical &&.
3421
3422 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
3423
3424         [Windows] Vide element in page always uses non-hw accelerated mode.
3425         https://bugs.webkit.org/show_bug.cgi?id=120448
3426
3427         Reviewed by Darin Adler
3428
3429         This patch is unfortunately larger than my original idea, but seems to make the
3430         layout system happier. Instead of switching into composited mode when building
3431         the media player, we now build the original layout tree with compositing active
3432         if the underlying media element requires it. The AVFoundationCF player needs to
3433         have the compositor available at construction time so it can attach to the
3434         rendering device. Otherwise it falls back to CPU-only mode.
3435
3436         * platform/graphics/MediaPlayer.cpp:
3437         (WebCore::MediaPlayer::requiresImmediateCompositing): Added
3438         * platform/graphics/MediaPlayer.h:
3439         * platform/graphics/MediaPlayerPrivate.h:
3440         (WebCore::MediaPlayerPrivateInterface::requiresImmediateCompositing): Added
3441         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3442         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Added
3443         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3444         (WebCore::MediaPlayerPrivateAVFoundationCF::requiresImmediateCompositing):
3445         * rendering/RenderLayerCompositor.cpp:
3446         (WebCore::RenderLayerCompositor::requiresCompositingForVideo): Uses new
3447         'requiresImmediateCompositing' to short-circuit check for whether a
3448         compositor is required.
3449         * rendering/RenderVideo.cpp:
3450         (WebCore::RenderVideo::requiresImmediateCompositing):
3451         * rendering/RenderVideo.h:
3452
3453 2013-08-30  Joseph Pecoraro  <pecoraro@apple.com>
3454
3455         Web Inspector: Breakpoints should have Automatically Continue Option
3456         https://bugs.webkit.org/show_bug.cgi?id=120187
3457
3458         Reviewed by Timothy Hatcher.
3459
3460         Tests: inspector-protocol/debugger/removeBreakpoint.html
3461                inspector-protocol/debugger/setBreakpoint-autoContinue.html
3462                inspector-protocol/debugger/setBreakpoint-column.html
3463                inspector-protocol/debugger/setBreakpoint-condition.html
3464                inspector-protocol/debugger/setBreakpoint.html
3465
3466         * inspector/Inspector.json:
3467         Convert the "condition" argument of setBreakpoint and setBreakpointByUrl
3468         to a BreakpointOptions object with optional properties. One of which
3469         is "condition" and a new option "autoContinue".
3470
3471         * bindings/js/ScriptDebugServer.h:
3472         * bindings/js/ScriptDebugServer.cpp:
3473         (WebCore::ScriptDebugServer::hasBreakpoint):
3474         (WebCore::ScriptDebugServer::pauseIfNeeded):
3475         Automatically continue if the breakpoint was hit and has autoContinue.
3476
3477         * inspector/InspectorDebuggerAgent.h:
3478         * inspector/InspectorDebuggerAgent.cpp:
3479         (WebCore::buildObjectForBreakpointCookie):
3480         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
3481         (WebCore::InspectorDebuggerAgent::setBreakpoint):
3482         (WebCore::InspectorDebuggerAgent::continueToLocation):
3483         (WebCore::InspectorDebuggerAgent::didParseSource):
3484         * inspector/ScriptBreakpoint.h:
3485         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
3486         Handle the new incoming BreakpointOptions type, and set the
3487         autoContinue state on ScriptBreakpoints.
3488
3489         * inspector/front-end/DebuggerModel.js:
3490         (WebInspector.DebuggerModel.prototype.setBreakpointByURL):
3491         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
3492         Update old front-end to be compatible with the new API.
3493
3494 2013-08-30  Dean Jackson  <dino@apple.com>
3495
3496         Animations should use double for key values, not floats
3497         https://bugs.webkit.org/show_bug.cgi?id=120547
3498
3499         Reviewed by Simon Fraser.
3500
3501         Merge https://chromium.googlesource.com/chromium/blink/+/71de046541c77120874b9bff82958ee9e0e20c7c
3502
3503         Some files have been renamed in the Blink port, and they have made some
3504         improvements, but I took what applied to us.
3505
3506         All our existing tests passed.
3507
3508         * css/StyleResolver.cpp:
3509         (WebCore::StyleResolver::keyframeStylesForAnimation):
3510         * css/WebKitCSSKeyframeRule.cpp:
3511         (WebCore::StyleKeyframe::parseKeyString):
3512         * css/WebKitCSSKeyframeRule.h:
3513         (WebCore::StyleKeyframe::getKeys):
3514         * platform/graphics/GraphicsLayer.h:
3515         (WebCore::AnimationValue::keyTime):
3516         (WebCore::AnimationValue::AnimationValue):
3517         (WebCore::FloatAnimationValue::create):
3518         (WebCore::FloatAnimationValue::FloatAnimationValue):
3519         (WebCore::TransformAnimationValue::create):
3520         (WebCore::TransformAnimationValue::TransformAnimationValue):
3521         (WebCore::FilterAnimationValue::create):
3522         (WebCore::FilterAnimationValue::FilterAnimationValue):
3523         * rendering/RenderLayerBacking.cpp:
3524         (WebCore::RenderLayerBacking::startAnimation):
3525         * rendering/style/KeyframeList.h:
3526         (WebCore::KeyframeValue::KeyframeValue):
3527         (WebCore::KeyframeValue::key):
3528         (WebCore::KeyframeValue::setKey):
3529
3530 2013-08-30  Brendan Long  <b.long@cablelabs.com>
3531
3532         [GStreamer] support in-band text tracks
3533         https://bugs.webkit.org/show_bug.cgi?id=103771
3534
3535         Reviewed by Eric Carlson.
3536
3537         Tests: New tests added because existing tests were too specific.
3538            media/track/in-band/track-in-band-kate-ogg-cues-added-once.html
3539            media/track/in-band/track-in-band-kate-ogg-kind.html
3540            media/track/in-band/track-in-band-kate-ogg-language.html
3541            media/track/in-band/track-in-band-kate-ogg-mode.html
3542            media/track/in-band/track-in-band-kate-ogg-style.html
3543            media/track/in-band/track-in-band-kate-ogg-track-order.html
3544            media/track/in-band/track-in-band-srt-mkv-cues-added-once.html
3545            media/track/in-band/track-in-band-srt-mkv-kind.html
3546            media/track/in-band/track-in-band-srt-mkv-language.html
3547            media/track/in-band/track-in-band-srt-mkv-mode.html
3548            media/track/in-band/track-in-band-srt-mkv-style.html
3549            media/track/in-band/track-in-band-srt-mkv-track-order.html
3550
3551         * CMakeLists.txt: Add InbandTextTrackPrivateGStreamer, InbandGenericTextTrack, InbandWebVTTTextTrack, and TextCombinerGStreamer files.
3552         * GNUmakefile.list.am: Same.
3553         * PlatformEfl.cmake: Same.
3554         * Target.pri: Same.
3555         * WebCore.vcxproj/WebCore.vcxproj: Same.
3556         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
3557         * WebCore.xcodeproj/project.pbxproj: Same.
3558         * html/track/InbandGenericTextTrack.cpp: Split out code for handling generic cues.
3559         (WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Move from InbandTextTrack.
3560         (WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Same.
3561         (WebCore::GenericTextTrackCueMap::add): Same.
3562         (WebCore::GenericTextTrackCueMap::find): Same.
3563         (WebCore::GenericTextTrackCueMap::remove): Same.
3564         (WebCore::InbandGenericTextTrack::create): Same.
3565         (WebCore::InbandGenericTextTrack::updateCueFromCueData): Same.
3566         (WebCore::InbandGenericTextTrack::addGenericCue): Same.
3567         (WebCore::InbandGenericTextTrack::updateGenericCue): Same.
3568         (WebCore::InbandGenericTextTrack::removeGenericCue): Same.
3569         (WebCore::InbandGenericTextTrack::removeCue): Same.
3570         (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Empty.
3571         (WebCore::InbandGenericTextTrack::~InbandGenericTextTrack): Empty.
3572         * html/track/InbandGenericTextTrack.h: Copied from Source/WebCore/html/track/InbandTextTrack.h.
3573         The only addition is the ASSERT_NOT_REACHED() for WebVTT cues.
3574         * html/track/InbandTextTrack.cpp: Add label and language changed callbacks.
3575         (WebCore::InbandTextTrack::create): Return a generic or WebVTT text track based on the private CueFormat.
3576         (WebCore::InbandTextTrack::labelChanged): Added.
3577         (WebCore::InbandTextTrack::languageChanged): Added.
3578         * html/track/InbandTextTrack.h: Add label and language changed callbacks.
3579         * html/track/InbandWebVTTTextTrack.cpp: Added, based on InbandTextTrack.
3580         (WebCore::InbandWebVTTTextTrack::create): Same.
3581         (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Empty.
3582         (WebCore::InbandWebVTTTextTrack::~InbandWebVTTTextTrack): Empty.
3583         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): Sends data to a WebVTTParser.
3584         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Adds cues when WebVTTParser parses them.
3585         (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Prints a warning when WebVTTParser has a problem.
3586         * html/track/InbandWebVTTTextTrack.h: Added.
3587         * platform/graphics/InbandTextTrackPrivate.h:
3588         (WebCore::InbandTextTrackPrivate::cueFormat): For determining if the track will have generic or WebVTT cues.
3589         (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): Pass CueFormat in the constructor.
3590         * platform/graphics/InbandTextTrackPrivateClient.h: Same.
3591         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3592         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Pass CueFormat (Generic) to InbandTextTrackPrivate.
3593         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr specializations for GstSample and GstEvent.
3594         * platform/graphics/gstreamer/GRefPtrGStreamer.h: Same.
3595         * platform/graphics/gstreamer/GStreamerUtilities.h: Add WARN_MEDIA_MESSAGE.
3596         * platform/graphics/gstreamer/GStreamerVersioning.h: Add a function to check GStreamer version at runtime.
3597         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Added.
3598         (WebCore::textTrackPrivateEventCallback): Watches for tag and stream start events.
3599         (WebCore::textTrackPrivateSampleTimeoutCallback): See notifyTrackOfSample();
3600         (WebCore::textTrackPrivateStreamTimeoutCallback): See notifyTrackOfStreamChanged();
3601         (WebCore::textTrackPrivateTagsChangeTimeoutCallback): See notifyTrackOfTagsChanged();
3602         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Initializes tags and stream and sets up event callback.
3603         (WebCore::InbandTextTrackPrivateGStreamer::~InbandTextTrackPrivateGStreamer): Calls disconnect:
3604         (WebCore::InbandTextTrackPrivateGStreamer::disconnect): Removes signal handlers and frees some memory.
3605         (WebCore::InbandTextTrackPrivateGStreamer::handleSample): Adds samples to a list and sets up callback.
3606         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Sets up callback.
3607         (WebCore::InbandTextTrackPrivateGStreamer::tagsChanged): Same.
3608         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): Parses all queued samples with WebVTTParser.
3609         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Keeps track of current stream.
3610         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Sets label and language from tags.
3611         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Added.
3612         (WebCore::InbandTextTrackPrivateGStreamer::create): Basic RefPtr create function.
3613         (WebCore::InbandTextTrackPrivateGStreamer::pad): Returns the pad this track is associated with (used
3614         to determine if a playbin text stream has already been associated with a text track).
3615         (WebCore::InbandTextTrackPrivateGStreamer::setIndex): Sets the track index (used for sorting).
3616         (WebCore::InbandTextTrackPrivateGStreamer::streamId): Returns the stream ID (used to handle new samples).
3617         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3618         (WebCore::mediaPlayerPrivateTextChangedCallback): Called for playbin "text-changed" event. See textChanged().
3619         (WebCore::mediaPlayerPrivateTextChangeTimeoutCallback): See notifyPlayerOfText().
3620         (WebCore::mediaPlayerPrivateNewTextSampleCallback): See newTextSample().
3621         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_textTimerHandler.
3622         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect text tracks (they don't necessarily
3623         get freed here, since a script could hold a reference).
3624         (WebCore::MediaPlayerPrivateGStreamer::textChanged): Setup callback for notifyPlayerOfText.
3625         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Create text tracks.
3626         (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Handle new samples by giving them to a text track
3627         with a matching stream. This method is syncryonous because we need to get the stream start sticky event
3628         immediately.
3629         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3630         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Added. This element forwards buffers from all
3631         of its input pads, but also converts plain text to WebVTT as needed.
3632         (webkit_text_combiner_init): Setup internal funnel.
3633         (webkitTextCombinerPadEvent): If the caps are plain text make sure we have a webvttenv, otherwise connect
3634         directly to the funnel.
3635         (webkitTextCombinerRequestNewPad): Setup ghostpad and event callback.
3636         (webkitTextCombinerReleasePad): Release pad and optional associated webvttenc.
3637         (webkit_text_combiner_class_init): Setup pad templates and request/release pad functions.
3638         (webkitTextCombinerNew): Returns a new WebKitTextCombiner.
3639         * platform/graphics/gstreamer/TextCombinerGStreamer.h: Added.
3640         * platform/graphics/gstreamer/TextSinkGStreamer.cpp: Added.
3641         (webkit_text_sink_init): Set sync=false.
3642         (webkitTextSinkGetProperty): Ignore sync property.
3643         (webkitTextSinkSetProperty): Same.
3644         (webkitTextSinkQuery): Ignore position and duration queries, forward everything else to appsink.
3645         (webkit_text_sink_class_init): Setup property and query functions.
3646         (webkitTextSinkNew): Return a new WebKitTextSink.
3647         * platform/graphics/gstreamer/TextSinkGStreamer.h: Added.
3648
3649 2013-08-30  Dirk Schulze  <krit@webkit.org>
3650
3651         Animate CSS Image filter() function
3652         https://bugs.webkit.org/show_bug.cgi?id=119938
3653
3654         Reviewed by Simon Fraser.
3655
3656         With this patch, the new introduced CSS Image function filter() can be
3657         animated. According to the spec, just filter functions can be
3658         interpolated.
3659
3660         The patch also prepares StyleImage blending for interpolation of other
3661         generated images like gradients or cross-fade().
3662
3663         http://dev.w3.org/fxtf/filters/#interpolating-filter-image
3664
3665         Test: fast/filter-image/filter-image-animation.html
3666
3667         * css/CSSComputedStyleDeclaration.cpp: Reuse the code that creates a
3668             CSSValueList from ComputeStyle logic.
3669         (WebCore::valueForPixel):
3670             For StyleRules we want to have not-adjusted length values.
3671         (WebCore::ComputedStyleExtractor::valueForShadow):
3672             Add argument to switch between adjusted and not-adjusted length.
3673         (WebCore::ComputedStyleExtractor::valueForFilter):
3674             Ditto.
3675         (WebCore::ComputedStyleExtractor::propertyValue):
3676         * css/CSSComputedStyleDeclaration.h:
3677         * css/CSSFilterImageValue.h: Add helper functions
3678             for animating filters. We need to pass the FilterOperations for
3679             the image generation and the CSSValueList for StyleRule.
3680         (WebCore::CSSFilterImageValue::filterOperations):
3681         (WebCore::CSSFilterImageValue::setFilterOperations):
3682         (WebCore::CSSFilterImageValue::cachedImage):
3683         * page/animation/CSSPropertyAnimation.cpp:
3684             Add animation code to support animations between two filter()
3685             function values.
3686         (WebCore::blendFilterOperations):
3687         (WebCore::blendFunc):
3688         (WebCore::filterBlend):
3689         * rendering/style/StyleGeneratedImage.h: Add helper functions.
3690         (WebCore::CSSFilterImageValue::imageValue):
3691
3692
3693 2013-08-30  Leo Yang  <leoyang@blackberry.com>
3694
3695         Make sure remove CachedResourceClient when destructing IconLoader
3696         https://bugs.webkit.org/show_bug.cgi?id=120541
3697
3698         Reviewed by Darin Adler.
3699
3700         It's a good practice to call CachedResource::removeClient(client)
3701         when the client is being destructed. We need to do this for InconLoader
3702         to prevent m_resource from keeping dangling client in case m_resource
3703         is referenced by someone else in the future.
3704
3705         Found by code inspection. Just a defensive enhancement no new tests.
3706
3707         * loader/icon/IconLoader.cpp:
3708         (WebCore::IconLoader::~IconLoader):
3709
3710 2013-08-30  Hans Muller  <hmuller@adobe.com>
3711
3712         [CSS Shapes] Redefine the ShapeIntervals class as a template
3713         https://bugs.webkit.org/show_bug.cgi?id=120381
3714
3715         Reviewed by Alexandru Chiculita.
3716
3717         No new tests, this was just an internal refactoring.
3718
3719         The existing ShapeIntervals class has been converted into a template whose
3720         type specifies the type of the interval's x1 and x2 horizontal endpoints
3721         (formerly float). There were several other minor changes, all in the realm
3722         of refactoring:
3723
3724         - The original type was a struct with public x1 and x2 fields. It's now a class
3725         with x1 and x2 accessors. ASSERTS are now used to maintain the x2 >= x1 invariant.
3726         In the original code the invariant was not checked.
3727
3728         - The logical comparison operators have been overloaded for ShapeInterval.
3729         This obviates the IntervalX1Comparator class which has been removed.
3730
3731         - The names of the global ShapeInterval Vector set operation methods have been
3732         changed to reflect the fact that they're now members of the template class,
3733         rather than globals.
3734
3735         PolygonShape.cpp depended on the ShapeInterval class. In the one or two places
3736         where an interval's x1 or x1 fields had been set explicitly, ShapeInterval::set()
3737         is now used to set both fields. This also enables the invariant check mentioned
3738         earlier. The other changes to this class are syntatic, to account for the ShapeInterval
3739         class's changes.
3740
3741         * CMakeLists.txt:
3742         * GNUmakefile.list.am:
3743         * WebCore.vcxproj/WebCore.vcxproj:
3744         * WebCore.xcodeproj/project.pbxproj:
3745         * rendering/shapes/PolygonShape.cpp:
3746         (WebCore::appendIntervalX):
3747         (WebCore::computeXIntersections):
3748         (WebCore::computeOverlappingEdgeXProjections):
3749         (WebCore::PolygonShape::getExcludedIntervals):
3750         (WebCore::PolygonShape::getIncludedIntervals):
3751         * rendering/shapes/PolygonShape.h:
3752         * rendering/shapes/ShapeInterval.cpp: Removed.
3753         * rendering/shapes/ShapeInterval.h: The entire implementation is now here. 
3754         (WebCore::ShapeInterval::ShapeInterval):
3755         (WebCore::ShapeInterval::x1):
3756         (WebCore::ShapeInterval::x2):
3757         (WebCore::ShapeInterval::set):
3758         (WebCore::ShapeInterval::overlaps):
3759         (WebCore::ShapeInterval::intersect):
3760         (WebCore::ShapeInterval::sortVector):
3761         (WebCore::ShapeInterval::uniteVectors):
3762         (WebCore::ShapeInterval::intersectVectors):
3763         (WebCore::ShapeInterval::subtractVectors):
3764         (WebCore::operator==):
3765         (WebCore::operator!=):
3766         (WebCore::operator< ):
3767         (WebCore::operator> ):
3768         (WebCore::operator<=):
3769         (WebCore::operator>=):
3770
3771 2013-08-30  Antti Koivisto  <antti@apple.com>
3772
3773         Use Element& in StyleResolveTree
3774         https://bugs.webkit.org/show_bug.cgi?id=120540
3775
3776         Reviewed by Andreas Kling.
3777
3778         * dom/ContainerNode.cpp:
3779         (WebCore::attachChild):
3780         (WebCore::detachChild):
3781         * dom/Document.cpp:
3782         (WebCore::Document::recalcStyle):
3783         (WebCore::Document::createRenderTree):
3784         (WebCore::Document::detach):
3785         * dom/Element.cpp:
3786         (WebCore::Element::lazyReattach):
3787         (WebCore::Element::updateExistingPseudoElement):
3788         (WebCore::Element::createPseudoElementIfNeeded):
3789         (WebCore::disconnectPseudoElement):
3790         * dom/ShadowRoot.cpp:
3791         (WebCore::ShadowRoot::setResetStyleInheritance):
3792         * html/HTMLDetailsElement.cpp:
3793         (WebCore::HTMLDetailsElement::parseAttribute):
3794         * html/HTMLInputElement.cpp:
3795         (WebCore::HTMLInputElement::updateType):
3796         (WebCore::HTMLInputElement::parseAttribute):
3797         * html/HTMLObjectElement.cpp:
3798         (WebCore::HTMLObjectElement::renderFallbackContent):
3799         * html/HTMLPlugInImageElement.cpp:
3800         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
3801         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
3802         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
3803         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
3804         * html/HTMLSelectElement.cpp:
3805         (WebCore::HTMLSelectElement::parseAttribute):
3806         (WebCore::HTMLSelectElement::parseMultipleAttribute):
3807         * html/HTMLViewSourceDocument.cpp:
3808         (WebCore::HTMLViewSourceDocument::createContainingTable):
3809         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
3810         (WebCore::HTMLViewSourceDocument::addLine):
3811         (WebCore::HTMLViewSourceDocument::finishLine):
3812         (WebCore::HTMLViewSourceDocument::addBase):
3813         (WebCore::HTMLViewSourceDocument::addLink):
3814         * html/parser/HTMLConstructionSite.cpp:
3815         (WebCore::executeTask):
3816         * html/parser/HTMLTreeBuilder.cpp:
3817         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3818         * html/shadow/InsertionPoint.cpp:
3819         (WebCore::InsertionPoint::willAttachRenderers):
3820         (WebCore::InsertionPoint::willDetachRenderers):
3821         * loader/PlaceholderDocument.cpp:
3822         (WebCore::PlaceholderDocument::createRenderTree):
3823         * style/StyleResolveTree.cpp:
3824         (WebCore::Style::attachChildren):
3825         (WebCore::Style::attachRenderTree):
3826         (WebCore::Style::detachChildren):
3827         (WebCore::Style::detachRenderTree):
3828         (WebCore::Style::resolveLocal):
3829         (WebCore::Style::updateTextStyle):
3830         (WebCore::Style::resolveShadowTree):
3831         (WebCore::Style::resolveTree):
3832         
3833             Documents only ever have one child element. Remove the loop.
3834
3835         (WebCore::Style::detachRenderTreeInReattachMode):
3836         (WebCore::Style::reattachRenderTree):
3837         * style/StyleResolveTree.h:
3838         * svg/SVGTests.cpp:
3839         (WebCore::SVGTests::handleAttributeChange):
3840         * xml/XMLErrors.cpp:
3841         (WebCore::XMLErrors::insertErrorMessageBlock):
3842         * xml/parser/XMLDocumentParserLibxml2.cpp:
3843         (WebCore::XMLDocumentParser::startElementNs):
3844
3845 2013-08-30  Andreas Kling  <akling@apple.com>
3846
3847         Document style resolve should take Document&.
3848         <https://webkit.org/b/120534>
3849
3850         Reviewed by Darin Adler.
3851
3852         Tweak Style::resolveTree(Document*) and Style::resolveForDocument(Document*) to take Document& instead.
3853
3854         * dom/Document.cpp:
3855         (WebCore::Document::recalcStyle):
3856         * html/HTMLLinkElement.cpp:
3857         (WebCore::HTMLLinkElement::process):
3858         * style/StyleResolveForDocument.cpp:
3859         (WebCore::Style::resolveForDocument):
3860         * style/StyleResolveForDocument.h:
3861         * style/StyleResolveTree.cpp:
3862         (WebCore::Style::resolveTree):
3863         * style/StyleResolveTree.h:
3864
3865 2013-08-30  Darin Adler  <darin@apple.com>
3866
3867         [Mac] No need for Pasteboard::getDataSelection
3868         https://bugs.webkit.org/show_bug.cgi?id=120536
3869
3870         Reviewed by Anders Carlsson.
3871
3872         * editing/Editor.h: Added some Mac-only private member functions.
3873
3874         * editing/mac/EditorMac.mm:
3875         (WebCore::Editor::selectionInWebArchiveFormat): Added.
3876         (WebCore::Editor::adjustedSelectionRange): Added.
3877         (WebCore::attributedStringForRange): Added.
3878         (WebCore::dataInRTFDFormat): Added.
3879         (WebCore::dataInRTFFormat): Added.
3880         (WebCore::Editor::dataSelectionForPasteboard): Moved the implementation
3881         of Pasteboard::getDataSelection here, refactoring to share code with the
3882         writeSelectionToPasteboard function.
3883         (WebCore::Editor::writeSelectionToPasteboard): Refactored to share code
3884         with the new function above.
3885
3886         * platform/Pasteboard.h: Removed getDataSelection. One less layering violation.
3887         * platform/mac/PasteboardMac.mm: Ditto.
3888
3889 2013-08-30  Rob Buis  <rwlbuis@webkit.org>
3890
3891         SVG error parsing empty path
3892         https://bugs.webkit.org/show_bug.cgi?id=78980
3893
3894         Reviewed by Darin Adler.
3895
3896         According to the spec (http://www.w3.org/TR/SVG/paths.html#PathData), path 'd' attribute can be empty.
3897         No error should be reported in this case.
3898
3899         * svg/SVGPathParser.cpp:
3900         (WebCore::SVGPathParser::parsePathDataFromSource):
3901         * svg/SVGPathUtilities.cpp:
3902         (WebCore::buildPathFromString):
3903         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
3904         (WebCore::buildPathFromByteStream):
3905         (WebCore::buildSVGPathSegListFromByteStream):
3906         (WebCore::buildStringFromByteStream):
3907         (WebCore::buildStringFromSVGPathSegList):
3908         (WebCore::buildSVGPathByteStreamFromString):
3909         (WebCore::buildAnimatedSVGPathByteStream):
3910         (WebCore::addToSVGPathByteStream):
3911
3912 2013-08-30  Andreas Kling  <akling@apple.com>
3913
3914         Try to fix CSS_VARIABLES and CSS_DEVICE_ADAPTATION builds.
3915
3916         * css/StyleResolver.cpp:
3917         (WebCore::StyleResolver::StyleResolver):
3918         (WebCore::StyleResolver::resolveVariables):
3919
3920 2013-08-30  Commit Queue  <commit-queue@webkit.org>
3921
3922         Unreviewed, rolling out r154891.
3923         http://trac.webkit.org/changeset/154891
3924         https://bugs.webkit.org/show_bug.cgi?id=120539
3925
3926         broke the mac build (Requested by Ossy on #webkit).
3927
3928         * platform/network/SynchronousLoaderClient.h:
3929
3930 2013-08-30  Csaba Osztrogonác  <ossy@webkit.org>
3931
3932         Add USE(CFNETWORK) guard to SynchronousLoaderClient::didReceiveAuthenticationChallengedidReceiveAuthenticationChallenge()
3933         https://bugs.webkit.org/show_bug.cgi?id=120532
3934
3935         Reviewed by Darin Adler.
3936
3937         * platform/network/SynchronousLoaderClient.h:
3938
3939 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
3940
3941         [Windows] Video inside page always uses non-hardware accelerated playback
3942         https://bugs.webkit.org/show_bug.cgi?id=120448
3943
3944         Reviewed by Eric Carlson.
3945
3946         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3947         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Check for
3948         D3D device. If it doesn't exist, switch to compositing mode and try again.
3949
3950 2013-08-30  Leo Yang  <leoyang@blackberry.com>
3951
3952         Possible dangling CachedResourceClient of StyleRuleImport and XSLImportRule
3953         https://bugs.webkit.org/show_bug.cgi?id=120479
3954
3955         Reviewed by Darin Adler.
3956
3957         In StyleRuleImport::requestStyleSheet() and XSLImportRule::loadSheet() we
3958         didn't call removeClient() for m_cachedSheet before assigning m_cachedSheet
3959         a new value. This could leave the client as a client of the old cached
3960         sheet and dangling after the client is deleted. Fix them by calling removeClient()
3961         before assigning m_cacheSheet a new value.
3962
3963         Found by code inspection. Seems no way to test it automatically.
3964
3965         * css/StyleRuleImport.cpp:
3966         (WebCore::StyleRuleImport::requestStyleSheet):
3967         * xml/XSLImportRule.cpp:
3968         (WebCore::XSLImportRule::loadSheet):
3969
3970 2013-08-30  Gabor Abraham  <abrhm@inf.u-szeged.hu>
3971
3972         Fix unused parameter warning in graphics/cairo/GraphicsContextCairo.cpp file.
3973         https://bugs.webkit.org/show_bug.cgi?id=120524
3974
3975         Reviewed by Darin Adler.
3976
3977         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3978         (WebCore::GraphicsContext::fillRectWithRoundedHole):
3979
3980 2013-08-30  Andreas Kling  <akling@apple.com>
3981
3982         StyleResolver & friends should use Document&.
3983         <https://webkit.org/b/120527>
3984
3985         Reviewed by Antti Koivisto.
3986
3987         Document&-ify StyleResolver, ElementRuleCollector and SelectorChecker.
3988
3989 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
3990
3991         [Windows] Unreviewed build correction after r154835. Only seen when doing a
3992         full (clean) rebuild.
3993
3994         * DerivedSources.cpp: Remove reference to deleted JSHTMLDialogElement.cpp
3995
3996 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
3997
3998         Resolve unused parameter warning in FindController.cpp
3999         https://bugs.webkit.org/show_bug.cgi?id=120407
4000
4001         Reviewed by Darin Adler.
4002
4003         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
4004         (wordAtPositionForAtkBoundary):
4005
4006 2013-08-30  Arpita Bahuguna  <a.bah@samsung.com>
4007
4008         setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
4009         https://bugs.webkit.org/show_bug.cgi?id=120293
4010
4011         Reviewed by Darin Adler.
4012
4013         setAttributeNode() performs a case-insensitive search for an existing
4014         attribute. If an existing attribute is found, it retrieves the index of
4015         such an attribute. For setting the attribute's new value, we call upon
4016         setAttributeInternal() to which both the index as well as the name of
4017         the attribute is passed.
4018         The name passed to this method is the same as the one passed to the