[CSS Shapes] Floats with shape-outside aren't painting in the correct order
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-06  Bem Jones-Bey  <bjonesbe@adobe.com>
2
3         [CSS Shapes] Floats with shape-outside aren't painting in the correct order
4         https://bugs.webkit.org/show_bug.cgi?id=118492
5
6         Reviewed by Darin Adler.
7
8         When removing the old positioning behavior, the code that makes a
9         float with shape-outside gain a layer was left behind. This patch
10         removes that, so now floats with shape-outside are painted just like
11         floats without shape-outside.
12
13         Also remove the isFloatingWithShapeOutside helper method because its
14         use is now somewhat redundant, and the check it does is now only
15         needed in one place.
16
17         Test: fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer.html
18
19         * rendering/RenderBox.h:
20         (WebCore::RenderBox::shapeOutsideInfo):
21         * rendering/RenderObject.h:
22         * rendering/shapes/ShapeOutsideInfo.cpp:
23         (WebCore::ShapeOutsideInfo::isEnabledFor): 
24
25 2013-09-06  Anders Carlsson  <andersca@apple.com>
26
27         Add a new smart pointer type for fastMalloc'ed memory
28         https://bugs.webkit.org/show_bug.cgi?id=120911
29
30         Reviewed by Andreas Kling.
31
32         Update for WTF changes.
33
34         * platform/network/cf/FormDataStreamCFNet.cpp:
35         (WebCore::advanceCurrentStream):
36
37 2013-09-06  Dirk Schulze  <krit@webkit.org>
38
39         Interpolate between CSS filter() and cached images
40         https://bugs.webkit.org/show_bug.cgi?id=120602
41
42         Reviewed by Simon Fraser.
43
44         Interpolate from a filter() image function to a url() image reference and
45         the other way around, if the input image on the filter function is the same
46         as the referenced image on url().
47
48         * page/animation/CSSPropertyAnimation.cpp: Replaced old
49             filterBlend function with blendFilter function which is more generic
50             and can be reused in multiple places.
51         (WebCore::blendFilterOperations):
52         (WebCore::blendFunc):
53         (WebCore::blendFilter):
54
55 2013-09-06  Ryosuke Niwa  <rniwa@webkit.org>
56
57         Elements retained by AccessibilityImageMapLink leak
58         https://bugs.webkit.org/show_bug.cgi?id=120917
59
60         Reviewed by Chris Fleizach.
61
62         Merge https://chromium.googlesource.com/chromium/blink/+/df0bd288efe65e5e38425fbdcdfc68b5a2a79e42
63
64         Unfortunately, the test added by the Blink change doesn't reproduce a leak in WebKit.
65
66         * accessibility/AccessibilityImageMapLink.cpp:
67         (WebCore::AccessibilityImageMapLink::detachFromParent):
68         * accessibility/AccessibilityImageMapLink.h:
69         * accessibility/AccessibilityMockObject.h:
70         (WebCore::AccessibilityMockObject::detachFromParent):
71
72 2013-09-06  Andreas Kling  <akling@apple.com>
73
74         Make Obj-C bindings generator less #include-happy.
75         <https://webkit.org/b/120913>
76
77         Reviewed by Anders Carlsson.
78
79         Knock out an old FIXME in CodeGeneratorObjC.pm and avoid including unrelated
80         interface declarations from implementation files where they are not needed.
81
82         * bindings/scripts/CodeGeneratorObjC.pm:
83         (GenerateImplementation):
84
85             Only include DOMFooInternal.h relevant to the current interface.
86
87         * bindings/scripts/test/ObjC/*
88
89             Rebaseline Obj-C bindings tests now that they include fewer things.
90
91 2013-09-06  Andreas Kling  <akling@apple.com>
92
93         Rebaseline bindings tests after Swedish breakage.
94
95 2013-09-06  Andreas Kling  <akling@apple.com>
96
97         Don't include Document.h from JSDOMBinding.h
98         <https://webkit.org/b/120909>
99
100         Reviewed by Anders Carlsson.
101
102         Move DOMConstructorWithDocument out of JSDOMBinding.h to its own header.
103         This was the only part of JSDOMBinding.h that needed Document's definition.
104
105         This reduces the include dependency graph of many bindings files.
106
107         * WebCore.xcodeproj/project.pbxproj:
108         * bindings/js/DOMConstructorWithDocument.h:
109         * bindings/js/JSDOMBinding.cpp:
110         * bindings/js/JSDOMBinding.h:
111         * bindings/scripts/CodeGeneratorJS.pm:
112         * bindings/scripts/CodeGeneratorGObject.pm:
113
114 2013-09-06  Ryosuke Niwa  <rniwa@webkit.org>
115
116         Range::ownerDocument should return Document&
117         https://bugs.webkit.org/show_bug.cgi?id=120908
118
119         Reviewed by Andreas Kling.
120
121         Return Document& in Range::ownerDocument(). Also make setDocument take Document& so that this invariant is self-evident.
122
123         * bindings/objc/DOM.mm:
124         (-[DOMRange boundingBox]):
125         (-[DOMRange renderedImageForcingBlackText:]):
126         (-[DOMRange textRects]):
127         * dom/Range.cpp:
128         (WebCore::Range::setDocument):
129         (WebCore::Range::setStart):
130         (WebCore::Range::setEnd):
131         (WebCore::Range::selectNode):
132         (WebCore::Range::selectNodeContents):
133         * dom/Range.h:
134         (WebCore::Range::ownerDocument):
135         * editing/AlternativeTextController.cpp:
136         (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
137         * editing/Editor.cpp:
138         (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
139         (WebCore::isFrameInRange):
140         (WebCore::Editor::countMatchesForText):
141         * editing/EditorCommand.cpp:
142         (WebCore::unionDOMRanges):
143         * editing/TextCheckingHelper.cpp:
144         (WebCore::TextCheckingHelper::unifiedTextCheckerEnabled):
145         * editing/TextIterator.cpp:
146         (WebCore::plainText):
147         (WebCore::findPlainText):
148         * editing/htmlediting.cpp:
149         (WebCore::extendRangeToWrappingNodes):
150         * editing/markup.cpp:
151         (WebCore::createMarkup):
152         (WebCore::createFragmentFromText):
153         * page/DragController.cpp:
154         (WebCore::documentFragmentFromDragData):
155         (WebCore::DragController::concludeEditDrag):
156         * page/Page.cpp:
157         (WebCore::Page::rangeOfString):
158         * rendering/RenderObject.cpp:
159         (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
160         * testing/Internals.cpp:
161         (WebCore::Internals::addTextMatchMarker):
162
163 2013-09-06  Brent Fulgham  <bfulgham@apple.com>
164
165         [Windows] StructuredExceptionHandlerSuppressor Causes Bad Interactions with Support Libraries
166         https://bugs.webkit.org/show_bug.cgi?id=120901
167
168         Reviewed by Anders Carlsson.
169
170         Change from old "crash on any exception" implementation to a new version that leaves normal
171         exception handling infrastructure in place for use by support libraries. We check exceptions
172         and decide whether to abort or not based on the failure type.
173
174         * WebCore.vcxproj/WebCore.vcxproj: Add new implementation files.
175         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
176         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
177         (WebCore::LayerChangesFlusher::hookCallback): Allocate handler struct on stack.
178         * platform/win/StructuredExceptionHandlerSuppressor.cpp: Added.
179         (exceptionShouldTerminateProgram): New.
180         (exceptionHandler): New.
181         (WebCore::StructuredExceptionHandlerSuppressor::StructuredExceptionHandlerSuppressor): Moved
182         from header, and updated to add our new exception handler.
183         (WebCore::StructuredExceptionHandlerSuppressor::~StructuredExceptionHandlerSuppressor): Moved
184         from header.
185         * platform/win/StructuredExceptionHandlerSuppressor.h: Move implementation of constructor and
186         destructor from header file.
187         * platform/win/makesafeseh.asm: Added.
188
189 2013-09-06  Vivek Galatage  <vivek.vg@samsung.com>
190
191         Refactor XMLDocumentParser to defer creation of XMLErrors until error occurs
192         https://bugs.webkit.org/show_bug.cgi?id=120850
193
194         Reviewed by Darin Adler.
195
196         XMLErrors is created as soon as XMLDocumentParser is constructed. It may not be required 
197         for all the valid XML documents. Deferring its creation until an error for the invalid
198         XML document.
199
200         No new tests as code refactoring.
201
202         * xml/parser/XMLDocumentParser.cpp:
203         (WebCore::XMLDocumentParser::handleError):
204         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
205         * xml/parser/XMLDocumentParser.h:
206         * xml/parser/XMLDocumentParserLibxml2.cpp:
207         (WebCore::XMLDocumentParser::XMLDocumentParser):
208         * xml/parser/XMLDocumentParserQt.cpp:
209         (WebCore::XMLDocumentParser::XMLDocumentParser):
210
211 2013-09-06  Anders Carlsson  <andersca@apple.com>
212
213         Remove fastNew/fastDelete
214         https://bugs.webkit.org/show_bug.cgi?id=120904
215
216         Reviewed by Andreas Kling.
217
218         Call operator delete directly.
219
220         * css/CSSSelectorList.cpp:
221         (WebCore::CSSSelectorList::adoptSelectorVector):
222
223 2013-09-06  Anders Carlsson  <andersca@apple.com>
224
225         Stop using fastNew/fastDelete in JavaScriptCore
226         https://bugs.webkit.org/show_bug.cgi?id=120898
227
228         Reviewed by Oliver Hunt.
229
230         Update for changes to JavaScriptCore.
231
232         * bindings/js/DOMObjectHashTableMap.h:
233         (WebCore::DOMObjectHashTableMap::get):
234         * bindings/js/JSDOMBinding.cpp:
235         (WebCore::getHashTableForGlobalData):
236         * bindings/js/JSDOMBinding.h:
237         * bindings/js/JSDOMWindowCustom.cpp:
238         (WebCore::JSDOMWindow::put):
239         * bindings/js/JSPluginElementFunctions.h:
240         (WebCore::pluginElementCustomGetOwnPropertySlot):
241         * bindings/js/JSStorageCustom.cpp:
242         (WebCore::JSStorage::deleteProperty):
243         (WebCore::JSStorage::putDelegate):
244         * bindings/scripts/CodeGeneratorJS.pm:
245         (hashTableAccessor):
246         (prototypeHashTableAccessor):
247         (constructorHashTableAccessor):
248         (GenerateGetOwnPropertySlotBody):
249         (GenerateImplementation):
250         (GenerateConstructorHelperMethods):
251
252 2013-09-06  Andreas Kling  <akling@apple.com>
253
254         Include Frame.h in fewer places.
255         <https://webkit.org/b/120868>
256
257         Reviewed by Anders Carlsson.
258
259         - Move JSMainThreadExecState::instrumentFunctionCall() to a separate header.
260           This avoids including InspectorInstrumentation.h from JSMainThreadExecState.h
261           which caused all JS and Objective-C bindings to depend on Frame.h
262
263         - Out-of-line the three methods on FrameView that were operating on Frames.
264           Most of the call sites were in FrameView.cpp so they will still get inlined.
265
266         - Removed GenericBinding.h, nothing was using it anyway.
267
268         After this, touching Frame.h and doing a (debug) rebuild goes from 9m30 to 3m30
269         on my laptop.
270
271         * GNUmakefile.list.am:
272         * WebCore.exp.in:
273         * WebCore.vcxproj/WebCore.vcxproj:
274         * WebCore.vcxproj/WebCore.vcxproj.filters:
275         * WebCore.xcodeproj/project.pbxproj:
276         * bindings/generic/GenericBinding.h: Removed.
277         * bindings/js/JSCallbackData.cpp:
278         * bindings/js/JSEventListener.cpp:
279         * bindings/js/JSMainThreadExecState.h:
280         * bindings/js/JSMainThreadExecStateInstrumentation.h: Added.
281         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
282         * bindings/js/JSMutationCallback.cpp:
283         * bindings/js/ScheduledAction.cpp:
284         * css/DeprecatedStyleBuilder.cpp:
285         * css/ElementRuleCollector.cpp:
286         * css/MediaQueryEvaluator.cpp:
287         * css/SelectorChecker.h:
288         * dom/StyledElement.cpp:
289         * html/HTMLPlugInImageElement.cpp:
290         * inspector/InspectorPageAgent.h:
291         * inspector/NetworkResourcesData.h:
292         * inspector/PageRuntimeAgent.cpp:
293         * loader/cache/CachedImage.cpp:
294         * page/FrameView.cpp:
295         (WebCore::FrameView::renderView):
296         (WebCore::FrameView::mapFromLayoutToCSSUnits):
297         (WebCore::FrameView::mapFromCSSToLayoutUnits):
298         * page/FrameView.h:
299         * page/TouchAdjustment.cpp:
300         * rendering/RenderBoxModelObject.cpp:
301         * rendering/RenderLayer.cpp:
302         * rendering/RenderLayerCompositor.h:
303         * rendering/RenderText.cpp:
304         * svg/graphics/SVGImage.cpp:
305
306 2013-09-06  Brent Fulgham  <bfulgham@apple.com>
307
308         [Windows] Unreviewed gardening: Spell 'Suppressor' properly
309
310         * WebCore.vcxproj/WebCore.vcxproj: Change StructuredExceptionHandlerSupressor to StructuredExceptionHandlerSuppressor
311         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
312         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
313         (WebCore::LayerChangesFlusher::hookCallback): Ditto
314         * platform/win/StructuredExceptionHandlerSuppressor.h: Copied from platform/win/StructuredExceptionHandlerSupressor.h.
315         * platform/win/StructuredExceptionHandlerSupressor.h: Removed.
316
317 2013-09-06  David Hyatt  <hyatt@apple.com>
318
319         Add new RenderBlockFlow class.
320         https://bugs.webkit.org/show_bug.cgi?id=120777
321
322         Reviewed by Beth Dakin.
323
324         This patch adds a new RenderBlockFlow class. The idea is to get all of the line/float/margin
325         code out of RenderBlock and into the subclass, and then we can make RenderBlock an abstract
326         base. This will save memory for all of the classes that derive from RenderBlock but have
327         their own layout systems (e.g., flexbox, grid, table), and it will let us tighten up
328         types to make it more clear when we're talking about block layout code vs. a more generic
329         block-level object that can have any kind of layout.
330
331         This patch adds the new class and it makes sure all the objects that should be block flows
332         inherit from the new class.
333         
334         isBlockFlow() proved to be a problematic method (and was the source of regressions when I
335         landed this patch the first time). When the method was first implemented, it was added as
336         "I'm a block but not a table." and at the time table was the only subclass of block. However
337         when new subclasses were added, this function was never patched to account for them. This
338         means, for example, that flexible boxes and grids claim to be block flows in the codebase
339         and have for years. This is obviously wrong, since flexible boxes are not in fact block
340         flows, but because of this mistake, code has started relying on the incorrect behavior of
341         isBlockFlow() (form controls mostly).
342         
343         What I've done to deal with this problem is renamed isBlockFlow() to be
344         isBlockFlowFlexBoxOrGrid() in order to make it obvious that this method is returning true
345         for pretty much all blocks other than tables. This makes a lot of call sites look pretty
346         stupid, since they obviously never intended to include flexible boxes or grids, but at least
347         it is clear what the method is doing now.
348         
349         The plan is to land this patch and then start converting call sites from 
350         isBlockFlowFlexBoxOrGrid() to isRenderBlockFlow() one by one, and that way we can figure
351         out which code is making bad assumptions and change those callers to be isRenderBlock()
352         instead. Ultimately this isBlockFlowFlexBoxOrGrid() method will go away with callers either
353         changing to use isRenderBlock() or isRenderBlockFlow().
354
355         * CMakeLists.txt:
356         * GNUmakefile.list.am:
357         * Target.pri:
358         * WebCore.vcxproj/WebCore.vcxproj:
359         * WebCore.xcodeproj/project.pbxproj:
360         * accessibility/AccessibilityRenderObject.cpp:
361         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
362         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
363         * dom/Position.cpp:
364         (WebCore::Position::isCandidate):
365         (WebCore::Position::getInlineBoxAndOffset):
366         (WebCore::Position::primaryDirection):
367         * dom/PositionIterator.cpp:
368         (WebCore::PositionIterator::isCandidate):
369         * editing/ApplyStyleCommand.cpp:
370         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
371         * editing/CompositeEditCommand.cpp:
372         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
373         * editing/Editor.cpp:
374         (WebCore::Editor::baseWritingDirectionForSelectionStart):
375         * editing/FrameSelection.cpp:
376         (WebCore::caretRenderer):
377         * editing/TextIterator.cpp:
378         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
379         * editing/TypingCommand.cpp:
380         (WebCore::TypingCommand::makeEditableRootEmpty):
381         * editing/htmlediting.cpp:
382         (WebCore::isBlockFlowElement):
383         * html/HTMLDetailsElement.cpp:
384         (WebCore::HTMLDetailsElement::createRenderer):
385         * html/HTMLSummaryElement.cpp:
386         (WebCore::HTMLSummaryElement::createRenderer):
387         * html/shadow/SliderThumbElement.cpp:
388         (WebCore::RenderSliderThumb::RenderSliderThumb):
389         * html/shadow/SliderThumbElement.h:
390         * rendering/LayoutState.cpp:
391         (WebCore::LayoutState::LayoutState):
392         * rendering/RenderBlock.cpp:
393         (WebCore::RenderBlock::createAnonymous):
394         (WebCore::RenderBlock::layoutBlock):
395         (WebCore::RenderBlock::collapseMargins):
396         (WebCore::RenderBlock::selectionGaps):
397         (WebCore::RenderBlock::firstLineBoxBaseline):
398         (WebCore::RenderBlock::lastLineBoxBaseline):
399         (WebCore::RenderBlock::firstLineBlock):
400         (WebCore::findFirstLetterBlock):
401         (WebCore::shouldCheckLines):
402         (WebCore::RenderBlock::adjustForBorderFit):
403         * rendering/RenderBlock.h:
404         * rendering/RenderBox.cpp:
405         (WebCore::RenderBox::computeRectForRepaint):
406         (WebCore::RenderBox::positionForPoint):
407         * rendering/RenderBoxModelObject.h:
408         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
409         * rendering/RenderDeprecatedFlexibleBox.cpp:
410         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
411         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
412         * rendering/RenderDetailsMarker.cpp:
413         (WebCore::RenderDetailsMarker::RenderDetailsMarker):
414         * rendering/RenderDetailsMarker.h:
415         * rendering/RenderFieldset.cpp:
416         (WebCore::RenderFieldset::RenderFieldset):
417         * rendering/RenderFieldset.h:
418         * rendering/RenderFileUploadControl.cpp:
419         (WebCore::RenderFileUploadControl::RenderFileUploadControl):
420         * rendering/RenderFileUploadControl.h:
421         * rendering/RenderFlowThread.cpp:
422         (WebCore::RenderFlowThread::RenderFlowThread):
423         * rendering/RenderFlowThread.h:
424         * rendering/RenderFullScreen.cpp:
425         * rendering/RenderInline.cpp:
426         (WebCore::RenderInline::computeRectForRepaint):
427         * rendering/RenderLineBoxList.cpp:
428         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
429         * rendering/RenderListItem.cpp:
430         (WebCore::RenderListItem::RenderListItem):
431         (WebCore::RenderListItem::willBeDestroyed):
432         (WebCore::RenderListItem::willBeRemovedFromTree):
433         (WebCore::RenderListItem::layout):
434         (WebCore::RenderListItem::addOverflowFromChildren):
435         (WebCore::RenderListItem::computePreferredLogicalWidths):
436         (WebCore::RenderListItem::paint):
437         * rendering/RenderListItem.h:
438         * rendering/RenderMeter.cpp:
439         (WebCore::RenderMeter::RenderMeter):
440         * rendering/RenderMeter.h:
441         * rendering/RenderMultiColumnBlock.cpp:
442         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
443         * rendering/RenderMultiColumnBlock.h:
444         * rendering/RenderObject.cpp:
445         (WebCore::RenderObject::createObject):
446         (WebCore::RenderObject::computeRectForRepaint):
447         (WebCore::RenderObject::styleWillChange):
448         (WebCore::firstLineStyleForCachedUncachedType):
449         * rendering/RenderObject.h:
450         (WebCore::RenderObject::isBR):
451         (WebCore::RenderObject::isRenderBlockFlow):
452         (WebCore::RenderObject::isBlockFlowFlexBoxOrGrid):
453         * rendering/RenderObjectChildList.cpp:
454         (WebCore::RenderObjectChildList::insertChildNode):
455         * rendering/RenderProgress.cpp:
456         (WebCore::RenderProgress::RenderProgress):
457         * rendering/RenderProgress.h:
458         * rendering/RenderRegion.cpp:
459         (WebCore::RenderRegion::RenderRegion):
460         * rendering/RenderRegion.h:
461         * rendering/RenderRuby.cpp:
462         (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
463         * rendering/RenderRuby.h:
464         * rendering/RenderRubyBase.cpp:
465         (WebCore::RenderRubyBase::RenderRubyBase):
466         * rendering/RenderRubyBase.h:
467         * rendering/RenderRubyRun.cpp:
468         (WebCore::RenderRubyRun::RenderRubyRun):
469         * rendering/RenderRubyRun.h:
470         * rendering/RenderRubyText.cpp:
471         (WebCore::RenderRubyText::RenderRubyText):
472         * rendering/RenderRubyText.h:
473         * rendering/RenderTableCaption.cpp:
474         (WebCore::RenderTableCaption::RenderTableCaption):
475         * rendering/RenderTableCaption.h:
476         * rendering/RenderTableCell.cpp:
477         (WebCore::RenderTableCell::RenderTableCell):
478         * rendering/RenderTableCell.h:
479         * rendering/RenderTextControl.cpp:
480         (WebCore::RenderTextControl::RenderTextControl):
481         * rendering/RenderTextControl.h:
482         * rendering/RenderTextControlSingleLine.h:
483         (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
484         * rendering/RenderTextTrackCue.cpp:
485         (WebCore::RenderTextTrackCue::RenderTextTrackCue):
486         * rendering/RenderTextTrackCue.h:
487         * rendering/RenderView.cpp:
488         (WebCore::RenderView::RenderView):
489         * rendering/RenderView.h:
490         * rendering/RenderingAllInOne.cpp:
491         * rendering/mathml/RenderMathMLOperator.cpp:
492         (WebCore::RenderMathMLOperator::createGlyph):
493         * rendering/svg/RenderSVGBlock.cpp:
494         (WebCore::RenderSVGBlock::RenderSVGBlock):
495         * rendering/svg/RenderSVGBlock.h:
496
497 2013-09-06  Vivek Galatage  <vivek.vg@samsung.com>
498
499         Calling window.close() should indicate failure with warning message
500         https://bugs.webkit.org/show_bug.cgi?id=120156
501
502         Reviewed by Darin Adler.
503
504         Closing of window is allowed for the tests for the automation.
505
506         * page/DOMWindow.cpp:
507         (WebCore::DOMWindow::close):
508
509 2013-09-06  Mike West  <mkwst@chromium.org>
510
511         Revalidation header blacklisting should be case-insensitive.
512         https://bugs.webkit.org/show_bug.cgi?id=120832
513
514         Reviewed by Alexey Proskuryakov.
515
516         Headers like 'content-type' should be ignored for 304 responses,
517         even if they are delivered as 'Content-Type', or 'CoNtEnT-TyPe', etc.
518
519         I broke this behavior in http://trac.webkit.org/changeset/142068
520         ("Entity-header extension headers honored on 304 responses"). Pages like
521         https://learndev.unm.edu/ currently break on reload, as they incorrectly
522         send 'Content-Type: text/plain' for 304 responses for resources like
523         CSS and JavaScript. The browser should drop these headers, but because
524         we're comparing in a case-sensitive fashion, we don't.
525
526         https://code.google.com/p/chromium/issues/detail?id=246875 documents the
527         Blink-side fix; this patch is a port of that patch.
528
529         Test: http/tests/cache/content-type-ignored-during-revalidation.html
530
531         * loader/cache/CachedResource.cpp:
532         (WebCore::shouldUpdateHeaderAfterRevalidation):
533         Compare the provided AtomicString 'header' to the revalidation
534         blacklists in a case-insensitive fashion.
535
536 2013-09-06  Eric Carlson  <eric.carlson@apple.com>
537
538         [MediaStream API] Allow empty MediaStreams
539         https://bugs.webkit.org/show_bug.cgi?id=120815
540
541         Reviewed by Jer Noble.
542
543         The spec is a bit unclear ecactly what should happen with newly created MediaStreams 
544         that doesn't have any tracks. The current implementation is too strict and the spec 
545         is being worked upon to be clearer. In the meantime this patch doesn't set eneded to 
546         true in the constructor. 
547
548         No new tests, existing test updated.
549
550         (WebCore::MediaStreamRegistry::lookupMediaStreamDescriptor):
551         * platform/mediastream/MediaStreamDescriptor.h:
552         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
553
554 2013-09-06  Anders Carlsson  <andersca@apple.com>
555
556         Stop using fastNew/fastDelete in WebCore
557         https://bugs.webkit.org/show_bug.cgi?id=120867
558
559         Reviewed by Geoffrey Garen.
560
561         Using fastNew/fastDelete can be dangerous, especially when put into a smart pointer
562         such as OwnPtr which uses regular delete. Because of this I'd like to remove fastNew/fastDelete.
563         Turns out it's only used in a couple of places in WebCore, so just use new/delete here instead.
564
565         * platform/audio/FFTFrame.h:
566         * platform/audio/gstreamer/FFTFrameGStreamer.cpp:
567         (WebCore::FFTFrame::FFTFrame):
568         (WebCore::FFTFrame::~FFTFrame):
569         (WebCore::FFTFrame::doFFT):
570         (WebCore::FFTFrame::doInverseFFT):
571         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
572         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
573         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
574         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
575         (webkitVideoSinkDispose):
576
577 2013-09-06  Anders Carlsson  <andersca@apple.com>
578
579         Fix fastMalloc/delete mismatches in CSS parser
580         https://bugs.webkit.org/show_bug.cgi?id=120864
581
582         Reviewed by Andreas Kling.
583
584         Stop putting fastMalloced memory inside an OwnPtr.
585
586         * css/CSSParserValues.cpp:
587         (WebCore::CSSParserSelector::CSSParserSelector):
588         (WebCore::CSSParserSelector::adoptSelectorVector):
589
590 2013-09-06  Andreas Kling  <akling@apple.com>
591
592         FrameLoader::subresourceLoader() should return a reference.
593         <https://webkit.org/b/120830>
594
595         Reviewed by Anders Carlsson.
596
597         There is always a SubresourceLoader, so this method could never return null.
598         Also made m_subresourceLoader an OwnPtr to reduce header dependencies.
599
600 2013-09-06  Chris Fleizach  <cfleizach@apple.com>
601
602         AX: aria-relevant does not expose AXARIARelevant
603         https://bugs.webkit.org/show_bug.cgi?id=120373
604
605         Reviewed by Darin Adler.
606
607         When global ARIA attributes are present on an Element we need to ignore
608         a presentational role, if set on that Element.
609
610         Test: accessibility/global-aria-attributes-invalidate-presentational.html
611
612         * accessibility/AccessibilityNodeObject.cpp:
613         (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
614         * accessibility/AccessibilityObject.cpp:
615         (WebCore::AccessibilityObject::supportsARIAAttributes):
616
617 2013-09-06  Brendan Long  <b.long@cablelabs.com>
618
619         [Qt][BlackBerry] Text track localized string functions are named wrong
620         https://bugs.webkit.org/show_bug.cgi?id=120788
621
622         Reviewed by Philippe Normand.
623
624         This renames textTrackOffText() to textTrackOffMenuItemText(), and
625         adds textTrackAutomaticMenuItemText(), to make them match the
626         definitions in LocalizedStrings.h.
627
628         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
629         * platform/qt/LocalizedStringsQt.cpp:
630
631 2013-09-06  Allan Sandfeld Jensen  <allan.jensen@digia.com>
632
633         [Qt][WK2] Cached credentials not cleared between tests
634         https://bugs.webkit.org/show_bug.cgi?id=120775
635
636         Reviewed by Jocelyn Turcotte.
637
638         Clear the access credentials when resetting the state of a page for testing.
639
640         * testing/Internals.cpp:
641         (WebCore::Internals::resetToConsistentState):
642
643 2013-09-06  Sergio Villar Senin  <svillar@igalia.com>
644
645         [CSS Grid Layout] Resolve named grid lines
646         https://bugs.webkit.org/show_bug.cgi?id=119632
647
648         Reviewed by Andreas Kling.
649
650         From Blink r152659, r153794 by <jchaffraix@chromium.org>
651
652         Test: fast/css-grid-layout/grid-item-named-grid-line-resolution.html
653
654         This change adds the code which translates from a raw named grid
655         line (stored in RenderStyle) to its actual grid position. This
656         even includes named grid resolution for grid lines with the 'span'
657         keyword.
658
659         * rendering/RenderGrid.cpp:
660         (WebCore::RenderGrid::explicitGridSizeForSide):
661         (WebCore::adjustGridPositionForRowEndColumnEndSide):
662         (WebCore::adjustGridPositionForSide):
663         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle):
664         (WebCore::RenderGrid::resolveGridPositionFromStyle):
665         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
666         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition):
667         (WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
668         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
669         * rendering/RenderGrid.h:
670
671 2013-09-06  Dirk Schulze  <krit@webkit.org>
672
673         Allow string as image reference on filter()
674         https://bugs.webkit.org/show_bug.cgi?id=120829
675
676         Reviewed by Andreas Kling.
677
678         Beside <image> (which already includes url(), gradients, cross-fade() and
679         image-set()), the filter() image function should support <string> as image
680         reference.
681
682         http://dev.w3.org/fxtf/filters/#FilterCSSImageValue
683
684         * css/CSSParser.cpp:
685         (WebCore::CSSParser::parseFilterImage): Create CSSImageValue from string.
686
687 2013-09-05  Dirk Schulze  <krit@webkit.org>
688
689         Support SVG filters on -webkit-filter() function
690         https://bugs.webkit.org/show_bug.cgi?id=120806
691
692         Reviewed by Darin Adler.
693
694         Add support for SVG Filters on CSS -webkit-filter() image function.
695
696         Test: fast/filter-image/filter-image-svg.html
697
698         * css/CSSFilterImageValue.cpp:
699         (WebCore::CSSFilterImageValue::image): Pass renderer to filter builder.
700
701 2013-09-05  Yoav Weiss  <yoav@yoav.ws>
702
703         DRY out srcset related deviceScaleFactor calculations
704         https://bugs.webkit.org/show_bug.cgi?id=120791
705
706         Identical deviceScaleFactor calculations were performed in 3 different locations.
707         I've added that calculation as a method of Document.
708         Previous calculations are replaced by calls to this method.
709
710         Reviewed by Andreas Kling.
711
712         No new tests since this is a refactoring change. No functionality have changed.
713
714         * dom/Document.cpp:
715         (WebCore::Document::deviceScaleFactor):
716         * dom/Document.h:
717         * html/HTMLImageElement.cpp:
718         (WebCore::HTMLImageElement::parseAttribute):
719         * html/parser/HTMLDocumentParser.cpp:
720         (WebCore::HTMLDocumentParser::pumpTokenizer):
721         (WebCore::HTMLDocumentParser::insert):
722
723 2013-09-05  Brendan Long  <b.long@cablelabs.com>
724
725         [Qt] DefaultFullScreenVideoHandler and PlatformVideoWindow are included in the build when they are disabled
726         https://bugs.webkit.org/show_bug.cgi?id=117206
727
728         Reviewed by Philippe Normand.
729
730         No new tests because this just fixes a build warning.
731
732         * Target.pri: Don't include PlatformVideoWindow* files in the build when they are disabled.
733
734 2013-09-05  Andreas Kling  <akling@apple.com>
735
736         FrameView: Constructor should take Frame&.
737         <https://webkit.org/b/120824>
738
739         Reviewed by Anders Carlsson.
740
741         * WebCore.exp.in:
742         * inspector/InspectorOverlay.cpp:
743         (WebCore::InspectorOverlay::overlayPage):
744         * page/Frame.cpp:
745         (WebCore::Frame::createView):
746         * page/FrameView.cpp:
747         (WebCore::FrameView::FrameView):
748         (WebCore::FrameView::create):
749         * page/FrameView.h:
750         * svg/graphics/SVGImage.cpp:
751         (WebCore::SVGImage::dataChanged):
752
753 2013-09-05  Jinwoo Song  <jinwoo7.song@samsung.com>
754
755         Fix build warnings by unused parameter
756         https://bugs.webkit.org/show_bug.cgi?id=120821
757
758         Reviewed by Anders Carlsson.
759
760         Fix warning by removing unused parameter.
761
762         * platform/graphics/gstreamer/TextSinkGStreamer.cpp:
763         (webkitTextSinkGetProperty):
764         (webkitTextSinkSetProperty):
765         * platform/network/soup/SynchronousLoaderClientSoup.cpp:
766         (WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
767
768 2013-09-05  Andreas Kling  <akling@apple.com>
769
770         FrameLoader: Convert three little loops to using Vector<Ref<Frame>>.
771         <https://webkit.org/b/120798>
772
773         Reviewed by Antti Koivisto.
774
775         Also apply a bit of inline capacity + reserveInitialCapacity + uncheckedAppend
776         in FrameLoader::detachChildren() since we know the final size from the start.
777
778         * loader/FrameLoader.cpp:
779         (WebCore::FrameLoader::detachChildren):
780         (WebCore::FrameLoader::checkLoadComplete):
781         (WebCore::FrameLoader::shouldClose):
782
783 2013-09-05  Andreas Kling  <akling@apple.com>
784
785         ContainerNode: Apply Ref<T> to some popular DOM functions.
786         <https://webkit.org/b/120800>
787
788         Reviewed by Antti Koivisto.
789
790         Use Ref to avoid a bunch of null checks in some popular DOM functions.
791
792         * dom/ContainerNode.cpp:
793         (WebCore::ContainerNode::insertBefore):
794
795             'refChild' is never null here, so store it in a Ref.
796
797         (WebCore::ContainerNode::replaceChild):
798
799             'removedChild' is never null here, so store it in a Ref.
800
801         (WebCore::ContainerNode::removeChild):
802
803             'child' is never null here, so store it in a Ref.
804             Also return "true" at the end of the function since we can't
805             null-check 'child' anymore (not that it would ever be false!)
806
807         (WebCore::dispatchChildInsertionEvents):
808         (WebCore::dispatchChildRemovalEvents):
809
810             Use Ref<Document> in both of these methods.
811
812 2013-09-05  Andreas Kling  <akling@apple.com>
813
814         ScrollView::children() should return a reference.
815         <https://webkit.org/b/120795>
816
817         Reviewed by Anders Carlsson.
818
819         This function was already just returning the address of a member variable.
820         Modernized some loops that were using it.
821
822         * bindings/js/PageScriptDebugServer.cpp:
823         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
824         * page/FrameView.cpp:
825         (WebCore::FrameView::hasCustomScrollbars):
826         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
827         * page/Page.cpp:
828         (WebCore::Page::pluginViews):
829         * page/scrolling/ScrollingCoordinator.cpp:
830         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
831         * platform/ScrollView.h:
832         (WebCore::ScrollView::children):
833         * plugins/IFrameShimSupport.cpp:
834         (WebCore::getPluginOcclusions):
835
836 2013-09-05  Beth Dakin  <bdakin@apple.com>
837
838         Reverting revisions 155139, 155141, 155142, and 155145 since they appear to have 
839         caused about 50 new test failures. 
840
841         * CMakeLists.txt:
842         * GNUmakefile.list.am:
843         * Target.pri:
844         * WebCore.vcxproj/WebCore.vcxproj:
845         * WebCore.xcodeproj/project.pbxproj:
846         * accessibility/AccessibilityRenderObject.cpp:
847         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
848         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
849         * dom/Position.cpp:
850         (WebCore::Position::isCandidate):
851         (WebCore::Position::getInlineBoxAndOffset):
852         (WebCore::Position::primaryDirection):
853         * dom/PositionIterator.cpp:
854         (WebCore::PositionIterator::isCandidate):
855         * editing/ApplyStyleCommand.cpp:
856         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
857         * editing/CompositeEditCommand.cpp:
858         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
859         * editing/Editor.cpp:
860         (WebCore::Editor::baseWritingDirectionForSelectionStart):
861         * editing/FrameSelection.cpp:
862         (WebCore::caretRenderer):
863         * editing/TextIterator.cpp:
864         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
865         * editing/TypingCommand.cpp:
866         (WebCore::TypingCommand::makeEditableRootEmpty):
867         * editing/htmlediting.cpp:
868         (WebCore::isBlockFlowElement):
869         * html/HTMLDetailsElement.cpp:
870         (WebCore::HTMLDetailsElement::createRenderer):
871         * html/HTMLSummaryElement.cpp:
872         (WebCore::HTMLSummaryElement::createRenderer):
873         * html/shadow/SliderThumbElement.cpp:
874         (WebCore::RenderSliderThumb::RenderSliderThumb):
875         * html/shadow/SliderThumbElement.h:
876         * rendering/LayoutState.cpp:
877         (WebCore::LayoutState::LayoutState):
878         * rendering/RenderBlock.cpp:
879         (WebCore::RenderBlock::createAnonymous):
880         (WebCore::RenderBlock::layoutBlock):
881         (WebCore::RenderBlock::collapseMargins):
882         (WebCore::RenderBlock::selectionGaps):
883         (WebCore::RenderBlock::firstLineBoxBaseline):
884         (WebCore::RenderBlock::lastLineBoxBaseline):
885         (WebCore::RenderBlock::firstLineBlock):
886         (WebCore::findFirstLetterBlock):
887         (WebCore::shouldCheckLines):
888         (WebCore::RenderBlock::adjustForBorderFit):
889         * rendering/RenderBlock.h:
890         * rendering/RenderBlockFlow.cpp: Removed.
891         * rendering/RenderBlockFlow.h: Removed.
892         * rendering/RenderBox.cpp:
893         (WebCore::RenderBox::computeRectForRepaint):
894         (WebCore::RenderBox::positionForPoint):
895         * rendering/RenderBoxModelObject.h:
896         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
897         * rendering/RenderDeprecatedFlexibleBox.cpp:
898         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
899         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
900         * rendering/RenderDetailsMarker.cpp:
901         (WebCore::RenderDetailsMarker::RenderDetailsMarker):
902         * rendering/RenderDetailsMarker.h:
903         * rendering/RenderFieldset.cpp:
904         (WebCore::RenderFieldset::RenderFieldset):
905         * rendering/RenderFieldset.h:
906         * rendering/RenderFileUploadControl.cpp:
907         (WebCore::RenderFileUploadControl::RenderFileUploadControl):
908         * rendering/RenderFileUploadControl.h:
909         * rendering/RenderFlowThread.cpp:
910         (WebCore::RenderFlowThread::RenderFlowThread):
911         * rendering/RenderFlowThread.h:
912         * rendering/RenderFullScreen.cpp:
913         * rendering/RenderInline.cpp:
914         (WebCore::RenderInline::computeRectForRepaint):
915         * rendering/RenderLineBoxList.cpp:
916         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
917         * rendering/RenderListItem.cpp:
918         (WebCore::RenderListItem::RenderListItem):
919         (WebCore::RenderListItem::willBeDestroyed):
920         (WebCore::RenderListItem::willBeRemovedFromTree):
921         (WebCore::RenderListItem::layout):
922         (WebCore::RenderListItem::addOverflowFromChildren):
923         (WebCore::RenderListItem::computePreferredLogicalWidths):
924         (WebCore::RenderListItem::paint):
925         * rendering/RenderListItem.h:
926         * rendering/RenderMeter.cpp:
927         (WebCore::RenderMeter::RenderMeter):
928         * rendering/RenderMeter.h:
929         * rendering/RenderMultiColumnBlock.cpp:
930         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
931         * rendering/RenderMultiColumnBlock.h:
932         * rendering/RenderObject.cpp:
933         (WebCore::RenderObject::createObject):
934         (WebCore::RenderObject::computeRectForRepaint):
935         (WebCore::RenderObject::styleWillChange):
936         (WebCore::firstLineStyleForCachedUncachedType):
937         * rendering/RenderObject.h:
938         (WebCore::RenderObject::isBlockFlow):
939         (WebCore::RenderObject::isRenderBlock):
940         * rendering/RenderObjectChildList.cpp:
941         (WebCore::RenderObjectChildList::insertChildNode):
942         * rendering/RenderProgress.cpp:
943         (WebCore::RenderProgress::RenderProgress):
944         * rendering/RenderProgress.h:
945         * rendering/RenderRegion.cpp:
946         (WebCore::RenderRegion::RenderRegion):
947         * rendering/RenderRegion.h:
948         * rendering/RenderRuby.cpp:
949         (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
950         * rendering/RenderRuby.h:
951         * rendering/RenderRubyBase.cpp:
952         (WebCore::RenderRubyBase::RenderRubyBase):
953         * rendering/RenderRubyBase.h:
954         * rendering/RenderRubyRun.cpp:
955         (WebCore::RenderRubyRun::RenderRubyRun):
956         * rendering/RenderRubyRun.h:
957         * rendering/RenderRubyText.cpp:
958         (WebCore::RenderRubyText::RenderRubyText):
959         * rendering/RenderRubyText.h:
960         * rendering/RenderTableCaption.cpp:
961         (WebCore::RenderTableCaption::RenderTableCaption):
962         * rendering/RenderTableCaption.h:
963         * rendering/RenderTableCell.cpp:
964         (WebCore::RenderTableCell::RenderTableCell):
965         * rendering/RenderTableCell.h:
966         * rendering/RenderTextControl.cpp:
967         (WebCore::RenderTextControl::RenderTextControl):
968         * rendering/RenderTextControl.h:
969         * rendering/RenderTextControlSingleLine.h:
970         (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
971         * rendering/RenderTextTrackCue.cpp:
972         (WebCore::RenderTextTrackCue::RenderTextTrackCue):
973         * rendering/RenderTextTrackCue.h:
974         * rendering/RenderView.cpp:
975         (WebCore::RenderView::RenderView):
976         * rendering/RenderView.h:
977         * rendering/RenderingAllInOne.cpp:
978         * rendering/mathml/RenderMathMLOperator.cpp:
979         (WebCore::RenderMathMLOperator::createGlyph):
980         * rendering/svg/RenderSVGBlock.cpp:
981         (WebCore::RenderSVGBlock::RenderSVGBlock):
982         * rendering/svg/RenderSVGBlock.h:
983
984 2013-09-05  Alexey Proskuryakov  <ap@apple.com>
985
986         Flaky Test: platform/mac/editing/deleting/deletionUI-single-instance.html
987         https://bugs.webkit.org/show_bug.cgi?id=114181
988
989         Reviewed by Ryosuke Niwa.
990
991         Editor survives navigations, and so did DeleteButtonController. But the state it holds
992         is document specific (like nodes in the old document).
993
994         * editing/Editor.cpp: (WebCore::Editor::clear): Replace DeleteButtonController.
995
996 2013-09-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
997
998         Generate toFooElement() functions from tagname data.
999         https://bugs.webkit.org/show_bug.cgi?id=120676
1000
1001         Reviewed by Andreas Kling.
1002
1003         As r154965 introduced the isFooElement() generation, this patch adds generations of toFooElement() function
1004         to *generateTypeChecking* attribute. To represent isFooElement() and toFooElement(), *generateTypeChecking*
1005         is changed to *generateTypeHelpers*.
1006
1007         Removed all the hand-written toFooElement() that can be covered by the *generateTypeHelpers*.
1008
1009         * GNUmakefile.am:
1010         * GNUmakefile.list.am:
1011         * WebCore.vcxproj/WebCore.vcxproj:
1012         * WebCore.xcodeproj/project.pbxproj:
1013         * dom/make_names.pl:
1014         (defaultTagPropertyHash):
1015         (printTypeHelpers):
1016         (printTypeHelpersHeaderFile):
1017         * html/HTMLAnchorElement.h:
1018         * html/HTMLAreaElement.h:
1019         * html/HTMLAudioElement.h:
1020         * html/HTMLCanvasElement.h:
1021         * html/HTMLElement.h:
1022         * html/HTMLFormElement.h:
1023         * html/HTMLFrameSetElement.h:
1024         * html/HTMLImageElement.h:
1025         * html/HTMLInputElement.h:
1026         * html/HTMLLabelElement.h:
1027         * html/HTMLMapElement.h:
1028         * html/HTMLMeterElement.h:
1029         * html/HTMLOptGroupElement.h:
1030         * html/HTMLOptionElement.h:
1031         * html/HTMLProgressElement.h:
1032         * html/HTMLScriptElement.h:
1033         * html/HTMLStyleElement.h:
1034         * html/HTMLTableElement.h:
1035         * html/HTMLTableRowElement.h:
1036         * html/HTMLTagNames.in:
1037         * html/HTMLTextAreaElement.h:
1038         * html/HTMLTitleElement.h:
1039         * svg/SVGElement.h:
1040         * svg/SVGFontElement.h:
1041         * svg/SVGFontFaceElement.h:
1042         * svg/SVGImageElement.h:
1043         * svg/SVGScriptElement.h:
1044         * svg/svgtags.in:
1045
1046 2013-09-05  Andreas Kling  <akling@apple.com>
1047
1048         Cached Page and Frame don't need to be ref-counted.
1049         <https://webkit.org/b/120710>
1050
1051         Reviewed by Anders Carlsson.
1052
1053         - CachedPage is owned by HistoryItem.
1054         - CachedFrame is owned by CachedPage.
1055
1056         Remove the ref counting from these objects to make the code less confusing.
1057
1058         Added a new method:
1059
1060         - PassOwnPtr<CachedPage> PageCache::take(HistoryItem*)
1061
1062         ..which is what it looks like - a combined get() and remove() that transfers
1063         ownership of the CachedPage to the caller.
1064
1065         This is used by commitProvisionalLoad() and invalidateCurrentItemCachedPage()
1066         to accomplish in one swoop what they used to do in awkwardly spaced steps.
1067
1068         * history/CachedFrame.h:
1069         (WebCore::CachedFrame::create):
1070         * history/CachedPage.cpp:
1071         (WebCore::CachedPage::create):
1072         * history/CachedPage.h:
1073         * history/HistoryItem.h:
1074         * history/PageCache.cpp:
1075         (WebCore::PageCache::take):
1076         * history/PageCache.h:
1077         * loader/FrameLoader.cpp:
1078         (WebCore::FrameLoader::commitProvisionalLoad):
1079         (WebCore::FrameLoader::transitionToCommitted):
1080         * loader/FrameLoader.h:
1081         * loader/HistoryController.cpp:
1082         (WebCore::HistoryController::invalidateCurrentItemCachedPage):
1083
1084 2013-09-05  David Kilzer  <ddkilzer@apple.com>
1085
1086         BUILD FIX (r155108): Add SynchronousLoaderClientCFNet.cpp to Xcode project
1087
1088         * WebCore.xcodeproj/project.pbxproj: The iOS port defines
1089         USE(CFNETWORK), so it needs to compile
1090         SynchronousLoaderClientCFNet.cpp to build successfully.
1091
1092 2013-09-05  Anders Carlsson  <andersca@apple.com>
1093
1094         GCAssertions.h should use STL type traits and static_assert
1095         https://bugs.webkit.org/show_bug.cgi?id=120785
1096
1097         Reviewed by Andreas Kling.
1098
1099         Update for JavaScriptCore changes.
1100
1101         * bindings/js/JSDOMBinding.cpp:
1102         * bindings/js/JSImageConstructor.cpp:
1103
1104 2013-09-05  David Hyatt  <hyatt@apple.com>
1105
1106         Make RenderListItem inherit from RenderBlockFlow.
1107         https://bugs.webkit.org/show_bug.cgi?id=120789
1108
1109         Reviewed by Beth Dakin.
1110
1111         * rendering/RenderListItem.cpp:
1112         (WebCore::RenderListItem::RenderListItem):
1113         (WebCore::RenderListItem::willBeDestroyed):
1114         (WebCore::RenderListItem::willBeRemovedFromTree):
1115         (WebCore::RenderListItem::layout):
1116         (WebCore::RenderListItem::addOverflowFromChildren):
1117         (WebCore::RenderListItem::computePreferredLogicalWidths):
1118         (WebCore::RenderListItem::paint):
1119         * rendering/RenderListItem.h:
1120
1121 2013-09-05  David Hyatt  <hyatt@apple.com>
1122
1123         Make RenderBlock have a protected constructor..
1124         https://bugs.webkit.org/show_bug.cgi?id=120787
1125
1126         Reviewed by Beth Dakin.
1127
1128         Make sure nobody can create a RenderBlock directly. Make sure RenderBlockFlows
1129         get made when a display:block/inline-block/compact/run-in is seen.
1130
1131         * html/HTMLDetailsElement.cpp:
1132         (WebCore::HTMLDetailsElement::createRenderer):
1133         * html/HTMLSummaryElement.cpp:
1134         (WebCore::HTMLSummaryElement::createRenderer):
1135         * rendering/RenderBlock.cpp:
1136         (WebCore::RenderBlock::createAnonymous):
1137         * rendering/RenderBlock.h:
1138         * rendering/RenderObject.cpp:
1139         (WebCore::RenderObject::createObject):
1140
1141 2013-09-05  David Hyatt  <hyatt@apple.com>
1142
1143         Add new RenderBlockFlow class
1144         https://bugs.webkit.org/show_bug.cgi?id=120777
1145
1146         Reviewed by Simon Fraser.
1147
1148         This patch adds a new RenderBlockFlow class. The idea is to get all of the line/float/margin
1149         code out of RenderBlock and into the subclass, and then we can make RenderBlock an abstract
1150         base. This will save memory for all of the classes that derive from RenderBlock but have
1151         their own layout systems (e.g., flexbox, grid, table), and it will let us tighten up
1152         types to make it more clear when we're talking about block layout code vs. a more generic
1153         block-level object that can have any kind of layout.
1154
1155         The only real change here is that isBlockFlow() has been renamed to isRenderBlockFlow() and
1156         is now checking if the object is a RenderBlockFlow. All of the block subclasses have been patched
1157         to be a RenderBlock or RenderBlockFlow.
1158
1159         * CMakeLists.txt:
1160         * GNUmakefile.list.am:
1161         * Target.pri:
1162         * WebCore.vcxproj/WebCore.vcxproj:
1163         * WebCore.xcodeproj/project.pbxproj:
1164         * accessibility/AccessibilityRenderObject.cpp:
1165         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1166         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1167         * dom/Position.cpp:
1168         (WebCore::Position::isCandidate):
1169         (WebCore::Position::getInlineBoxAndOffset):
1170         (WebCore::Position::primaryDirection):
1171         * dom/PositionIterator.cpp:
1172         (WebCore::PositionIterator::isCandidate):
1173         * editing/ApplyStyleCommand.cpp:
1174         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
1175         * editing/CompositeEditCommand.cpp:
1176         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
1177         * editing/Editor.cpp:
1178         (WebCore::Editor::baseWritingDirectionForSelectionStart):
1179         * editing/FrameSelection.cpp:
1180         (WebCore::caretRenderer):
1181         * editing/TextIterator.cpp:
1182         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
1183         * editing/TypingCommand.cpp:
1184         (WebCore::TypingCommand::makeEditableRootEmpty):
1185         * editing/htmlediting.cpp:
1186         (WebCore::isBlockFlowElement):
1187         * html/shadow/SliderThumbElement.cpp:
1188         (WebCore::RenderSliderThumb::RenderSliderThumb):
1189         * html/shadow/SliderThumbElement.h:
1190         * rendering/LayoutState.cpp:
1191         (WebCore::LayoutState::LayoutState):
1192         * rendering/RenderBlock.cpp:
1193         (WebCore::RenderBlock::layoutBlock):
1194         (WebCore::RenderBlock::collapseMargins):
1195         (WebCore::RenderBlock::selectionGaps):
1196         (WebCore::RenderBlock::firstLineBoxBaseline):
1197         (WebCore::RenderBlock::lastLineBoxBaseline):
1198         (WebCore::RenderBlock::firstLineBlock):
1199         (WebCore::findFirstLetterBlock):
1200         (WebCore::shouldCheckLines):
1201         (WebCore::RenderBlock::adjustForBorderFit):
1202         * rendering/RenderBlock.h:
1203         * rendering/RenderBlockFlow.cpp: Added.
1204         (WebCore::RenderBlockFlow::RenderBlockFlow):
1205         (WebCore::RenderBlockFlow::~RenderBlockFlow):
1206         * rendering/RenderBlockFlow.h: Added.
1207         (WebCore::toRenderBlockFlow):
1208         * rendering/RenderBox.cpp:
1209         (WebCore::RenderBox::computeRectForRepaint):
1210         (WebCore::RenderBox::positionForPoint):
1211         * rendering/RenderBoxModelObject.h:
1212         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
1213         * rendering/RenderDeprecatedFlexibleBox.cpp:
1214         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
1215         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
1216         * rendering/RenderDetailsMarker.cpp:
1217         (WebCore::RenderDetailsMarker::RenderDetailsMarker):
1218         * rendering/RenderDetailsMarker.h:
1219         * rendering/RenderFieldset.cpp:
1220         (WebCore::RenderFieldset::RenderFieldset):
1221         * rendering/RenderFieldset.h:
1222         * rendering/RenderFileUploadControl.cpp:
1223         (WebCore::RenderFileUploadControl::RenderFileUploadControl):
1224         * rendering/RenderFileUploadControl.h:
1225         * rendering/RenderFlowThread.cpp:
1226         (WebCore::RenderFlowThread::RenderFlowThread):
1227         * rendering/RenderFlowThread.h:
1228         * rendering/RenderFullScreen.cpp:
1229         * rendering/RenderInline.cpp:
1230         (WebCore::RenderInline::computeRectForRepaint):
1231         * rendering/RenderLineBoxList.cpp:
1232         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
1233         * rendering/RenderMeter.cpp:
1234         (WebCore::RenderMeter::RenderMeter):
1235         * rendering/RenderMeter.h:
1236         * rendering/RenderMultiColumnBlock.cpp:
1237         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
1238         * rendering/RenderMultiColumnBlock.h:
1239         * rendering/RenderObject.cpp:
1240         (WebCore::RenderObject::computeRectForRepaint):
1241         (WebCore::RenderObject::styleWillChange):
1242         (WebCore::firstLineStyleForCachedUncachedType):
1243         * rendering/RenderObject.h:
1244         (WebCore::RenderObject::isBR):
1245         (WebCore::RenderObject::isRenderBlockFlow):
1246         * rendering/RenderObjectChildList.cpp:
1247         (WebCore::RenderObjectChildList::insertChildNode):
1248         * rendering/RenderProgress.cpp:
1249         (WebCore::RenderProgress::RenderProgress):
1250         * rendering/RenderProgress.h:
1251         * rendering/RenderRegion.cpp:
1252         (WebCore::RenderRegion::RenderRegion):
1253         * rendering/RenderRegion.h:
1254         * rendering/RenderRuby.cpp:
1255         (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
1256         * rendering/RenderRuby.h:
1257         * rendering/RenderRubyBase.cpp:
1258         (WebCore::RenderRubyBase::RenderRubyBase):
1259         * rendering/RenderRubyBase.h:
1260         * rendering/RenderRubyRun.cpp:
1261         (WebCore::RenderRubyRun::RenderRubyRun):
1262         * rendering/RenderRubyRun.h:
1263         * rendering/RenderRubyText.cpp:
1264         (WebCore::RenderRubyText::RenderRubyText):
1265         * rendering/RenderRubyText.h:
1266         * rendering/RenderTableCaption.cpp:
1267         (WebCore::RenderTableCaption::RenderTableCaption):
1268         * rendering/RenderTableCaption.h:
1269         * rendering/RenderTableCell.cpp:
1270         (WebCore::RenderTableCell::RenderTableCell):
1271         * rendering/RenderTableCell.h:
1272         * rendering/RenderTextControl.cpp:
1273         (WebCore::RenderTextControl::RenderTextControl):
1274         * rendering/RenderTextControl.h:
1275         * rendering/RenderTextControlSingleLine.h:
1276         (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
1277         * rendering/RenderTextTrackCue.cpp:
1278         (WebCore::RenderTextTrackCue::RenderTextTrackCue):
1279         * rendering/RenderTextTrackCue.h:
1280         * rendering/RenderView.cpp:
1281         (WebCore::RenderView::RenderView):
1282         * rendering/RenderView.h:
1283         * rendering/svg/RenderSVGBlock.cpp:
1284         (WebCore::RenderSVGBlock::RenderSVGBlock):
1285         * rendering/svg/RenderSVGBlock.h:
1286
1287 2013-09-05  Tim Horton  <timothy_horton@apple.com>
1288
1289         iOS build broke with change to make Mac use PDFKit for PDFDocumentImage
1290         https://bugs.webkit.org/show_bug.cgi?id=120771
1291
1292         Reviewed by Anders Carlsson.
1293
1294         * platform/graphics/cg/PDFDocumentImage.cpp:
1295         (WebCore::PDFDocumentImage::createPDFDocument):
1296         Use the (removed in r155069) PLATFORM(MAC) way of making a CGDataProvider from a SharedBuffer
1297         everywhere; this is what iOS was expecting to use (where I accidentally changed behavior),
1298         and it should also work for Windows, the only other USE(CG) platform.
1299
1300         Since we only createPDFDocument() after all data has been received, I'm not
1301         restoring the comment about the SharedBuffer being secretly written to behind its back.
1302
1303 2013-09-04  Dean Jackson  <dino@apple.com>
1304
1305         Rename supportsContext to probablySupportsContext
1306         https://bugs.webkit.org/show_bug.cgi?id=120716
1307         <rdar://problem/14914499>
1308
1309         Reviewed by Antoine Quint.
1310
1311         As decided in: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-September/040680.html
1312
1313         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1314         (WebCore::JSHTMLCanvasElement::probablySupportsContext):
1315         * html/HTMLCanvasElement.cpp:
1316         (WebCore::HTMLCanvasElement::probablySupportsContext):
1317         * html/HTMLCanvasElement.h:
1318         * html/HTMLCanvasElement.idl:
1319
1320 2013-09-05  Joseph Pecoraro  <pecoraro@apple.com>
1321
1322         Fix build warning about unused variable.
1323
1324         Unreviewed build fix.
1325
1326         * bindings/js/ScriptDebugServer.cpp:
1327         (WebCore::ScriptDebugServer::evaluateBreakpointAction):
1328
1329 2013-09-05  Anders Carlsson  <andersca@apple.com>
1330
1331         Enable C++11 wherever we build C++ files that include wtf/Platform.h
1332         https://bugs.webkit.org/show_bug.cgi?id=120782
1333
1334         Reviewed by Andreas Kling.
1335
1336         Pass -std=gnu++11 when preprocessing wtf/Platform.h.
1337
1338         * DerivedSources.make:
1339
1340 2013-09-05  Joseph Pecoraro  <pecoraro@apple.com>
1341
1342         Web Inspector: Breakpoint Actions
1343         https://bugs.webkit.org/show_bug.cgi?id=120576
1344
1345         Reviewed by Timothy Hatcher.
1346
1347         Tests: inspector-protocol/debugger/setBreakpoint-actions.html
1348                inspector-protocol/debugger/setBreakpoint-options-exception.html
1349
1350         * inspector/ScriptBreakpoint.h:
1351         (WebCore::ScriptBreakpointAction::ScriptBreakpointAction):
1352         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
1353         Struct for a breakpoint action. Type and string of data.
1354
1355         * bindings/js/ScriptDebugServer.h:
1356         * bindings/js/ScriptDebugServer.cpp:
1357         (WebCore::ScriptDebugServer::hasBreakpoint):
1358         (WebCore::ScriptDebugServer::evaluateBreakpointAction):
1359         (WebCore::ScriptDebugServer::evaluateBreakpointActions):
1360         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
1361         (WebCore::ScriptDebugServer::pauseIfNeeded):
1362         When a breakpoint is triggered evaluate each of its breakpoint
1363         actions in order. If there are exceptions, log them.
1364
1365         * inspector/Inspector.json:
1366         * inspector/InspectorDebuggerAgent.cpp:
1367         (WebCore::buildObjectForBreakpointCookie):
1368         (WebCore::InspectorDebuggerAgent::didParseSource):
1369         Save and restore breakpoint actions where needed.
1370
1371         (WebCore::breakpointActionTypeForString):
1372         (WebCore::breakpointActionsFromProtocol):
1373         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1374         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1375         Parse optional breakpoint actions from the protocol into
1376         ScriptBreakpointAction objects.
1377
1378 2013-09-05  Simon Fraser  <simon.fraser@apple.com>
1379
1380         Fix repaint issue on "paints into ancestor" filtered layers
1381         https://bugs.webkit.org/show_bug.cgi?id=120780
1382
1383         Reviewed by Tim Horton.
1384         
1385         When a repaint happened on a layer with a filter, and which paints into
1386         its compositing ancestor, we'd repaint the wrong layer (and assert).
1387         
1388         Fix by ensuring that RenderLayer::enclosingFilterLayer() takes paintsIntoCompositedAncestor()
1389         into account, by adding a function that we share between three callers who
1390         check isComposited() && !paintsIntoCompositedAncestor(). I didn't use a function
1391         on RenderLayer, because I wanted it to be inline but to not #include RenderLayerBacking
1392         in RenderLayer.h.
1393
1394         Test: compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html
1395
1396         * dom/Node.cpp: Drive-by removal of #include "RenderLayer.h"
1397         * rendering/RenderLayer.cpp: 
1398         (WebCore::compositedWithOwnBackingStore):
1399         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
1400         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
1401         (WebCore::RenderLayer::clippingRootForPainting):
1402
1403 2013-09-05  Brent Fulgham  <bfulgham@apple.com>
1404
1405         [Windows] Unreviewed build/link improvement after r155127 to be
1406         consistent about using debug-build support libraries.
1407
1408         Now that <rdar://problem/9898937> is resolved, we should be linking
1409         to debug AVFoundationCF as well.
1410
1411         * page/CaptionUserPreferencesMediaAF.cpp: Link to AVFoundationCF_debug
1412         when building with the DEBUG_ALL target.
1413         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Ditto.
1414         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Ditto.
1415
1416 2013-09-04  Anders Carlsson  <andersca@apple.com>
1417
1418         Vector::releaseBuffer should return an OwnPtr
1419         https://bugs.webkit.org/show_bug.cgi?id=120718
1420
1421         Reviewed by Andreas Kling.
1422
1423         Change FormStreamFields::currentData to an OwnPtr.
1424
1425         * platform/network/cf/FormDataStreamCFNet.cpp:
1426         (WebCore::closeCurrentStream):
1427         (WebCore::advanceCurrentStream):
1428         (WebCore::formCreate):
1429
1430 2013-09-05  Andreas Kling  <akling@apple.com>
1431
1432         Reverting "Cached Page and Frame don't need to be ref-counted.
1433         <https://webkit.org/b/120758>
1434
1435         This didn't work so well on Qt bots. Will have to take bigger steps
1436         here instead of iterating.
1437
1438         * history/CachedFrame.h:
1439         (WebCore::CachedFrame::create):
1440         * history/CachedPage.cpp:
1441         (WebCore::CachedPage::create):
1442         * history/CachedPage.h:
1443         * history/HistoryItem.h:
1444         * loader/FrameLoader.cpp:
1445         (WebCore::FrameLoader::commitProvisionalLoad):
1446         (WebCore::FrameLoader::transitionToCommitted):
1447         * loader/FrameLoader.h:
1448
1449 2013-09-04  Anders Carlsson  <andersca@apple.com>
1450
1451         Animations in an AnimationList are never null
1452         https://bugs.webkit.org/show_bug.cgi?id=120720
1453
1454         Reviewed by Andreas Kling.
1455
1456         Change AnimationList::operator[] to return an Animation& and fix up related code to also take references.
1457
1458         * css/CSSComputedStyleDeclaration.cpp:
1459         * css/DeprecatedStyleBuilder.cpp:
1460         * page/animation/CompositeAnimation.cpp:
1461         * page/animation/KeyframeAnimation.cpp:
1462         * platform/animation/Animation.h:
1463         * platform/animation/AnimationList.cpp:
1464         * platform/animation/AnimationList.h:
1465         * rendering/RenderLayerBacking.cpp:
1466
1467 2013-09-05  Antti Koivisto  <antti@apple.com>
1468
1469         Call createTextRenderersForSiblingsAfterAttachIfNeeded only for the attach root
1470         https://bugs.webkit.org/show_bug.cgi?id=120770
1471
1472         Reviewed by Andreas Kling.
1473
1474         There is no need to call this during recursive attach as siblings are going to be attached normally anyway.
1475         Move call sites to attach roots only.
1476
1477         * style/StyleResolveTree.cpp:
1478         (WebCore::Style::createTextRenderersForSiblingsAfterAttachIfNeeded):
1479         
1480             Factor to take reference and do the inital tests itself.
1481
1482         (WebCore::Style::createTextRendererIfNeeded):
1483         (WebCore::Style::updateTextRendererAfterContentChange):
1484         (WebCore::Style::attachChildren):
1485         
1486             Also tightened the condition where previously attached children may be encountered.
1487
1488         (WebCore::Style::attachRenderTree):
1489         (WebCore::Style::resolveLocal):
1490         (WebCore::Style::updateTextStyle):
1491         (WebCore::Style::reattachRenderTree):
1492
1493 2013-09-05  Enrique Ocaña González  <eocanha@igalia.com>
1494
1495         [GTK] Assertion fails when the mouse pointer is styled with a custom cursor
1496         https://bugs.webkit.org/show_bug.cgi?id=118905
1497
1498         Reviewed by Philippe Normand.
1499
1500         Checked that the custom cursor image and its pixbuf is valid and create a null
1501         cursor otherwise.
1502
1503         * platform/gtk/CursorGtk.cpp:
1504         (WebCore::createCustomCursor):
1505
1506 2013-09-05  Praveen R Jadhav  <praveen.j@samsung.com>
1507
1508         Precision updates in WebAudio.
1509         https://bugs.webkit.org/show_bug.cgi?id=119739
1510
1511         Reviewed by Philippe Normand.
1512
1513         WebAudio Specification suggests to use 'double' datatypes
1514         for minDecibels, maxDecibels and smoothingTimeConstant in
1515         AnalyserNode.idl and currentTime in AudioContext.idl.
1516         Current WebKit implementation has declared these attributes
1517         as 'float' type.
1518
1519         Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioContext-section
1520               https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AnalyserNode
1521
1522         No new tests, covered by existing tests.
1523
1524         * Modules/webaudio/AnalyserNode.cpp:
1525         (WebCore::AnalyserNode::setMinDecibels):
1526         (WebCore::AnalyserNode::setMaxDecibels):
1527         (WebCore::AnalyserNode::setSmoothingTimeConstant):
1528         * Modules/webaudio/AnalyserNode.h:
1529         (WebCore::AnalyserNode::minDecibels):
1530         (WebCore::AnalyserNode::maxDecibels):
1531         (WebCore::AnalyserNode::smoothingTimeConstant):
1532         * Modules/webaudio/AnalyserNode.idl:
1533         * Modules/webaudio/AudioContext.idl:
1534         * Modules/webaudio/RealtimeAnalyser.h:
1535         (WebCore::RealtimeAnalyser::setMinDecibels):
1536         (WebCore::RealtimeAnalyser::minDecibels):
1537         (WebCore::RealtimeAnalyser::setMaxDecibels):
1538         (WebCore::RealtimeAnalyser::maxDecibels):
1539         (WebCore::RealtimeAnalyser::setSmoothingTimeConstant):
1540         (WebCore::RealtimeAnalyser::smoothingTimeConstant):
1541
1542 2013-09-05  Mihnea Ovidenie  <mihnea@adobe.com>
1543
1544         Replace node() calls with generatingNode() for RenderRegion code
1545         https://bugs.webkit.org/show_bug.cgi?id=120397
1546
1547         Reviewed by Darin Adler.
1548
1549         As regions will become anonymous blocks nested inside elements with the flow-from property, a first step
1550         would be to change the calls to node() with calls to generatingNode(). In the case of regions, generatingNode()
1551         will always return an Element* and not a Node*. Therefore, to get rid of toElement() casts, i created
1552         a specific method RenderRegion::generatingElement that will return the generating node as Element.
1553         No new tests as no functional change was introduced.
1554
1555         Original patch by Catalin Badea.
1556
1557         * css/ElementRuleCollector.cpp:
1558         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
1559         * dom/WebKitNamedFlow.cpp:
1560         (WebCore::WebKitNamedFlow::getRegionsByContent):
1561         (WebCore::WebKitNamedFlow::getRegions):
1562         * rendering/RenderRegion.cpp:
1563         (WebCore::RenderRegion::regionOversetState):
1564         (WebCore::RenderRegion::setRegionOversetState):
1565         (WebCore::RenderRegion::checkRegionStyle):
1566         * rendering/RenderRegion.h:
1567         (WebCore::RenderRegion::generatingElement):
1568         * rendering/RenderTreeAsText.cpp:
1569         (WebCore::writeRenderRegionList): For pseudo-elements as regions, i want to print
1570         {pseudo} instead of {div} marker for the parent.
1571
1572 2013-09-05  Csaba Osztrogonác  <ossy@webkit.org>
1573
1574         Fix SynchronousLoaderClient class for !USE(CFNETWORK) platforms
1575         https://bugs.webkit.org/show_bug.cgi?id=120532
1576
1577         Reviewed by Darin Adler.
1578
1579         * CMakeLists.txt:
1580         * PlatformEfl.cmake:
1581         * PlatformGTK.cmake:
1582         * WebCore.vcxproj/WebCore.vcxproj:
1583         * WebCore.vcxproj/WebCore.vcxproj.filters:
1584         * platform/network/SynchronousLoaderClient.cpp:
1585         * platform/network/cf/SynchronousLoaderClientCFNet.cpp: Added.
1586         (WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
1587         (WebCore::SynchronousLoaderClient::platformBadResponseError):
1588         * platform/network/soup/SynchronousLoaderClientSoup.cpp: Added.
1589         (WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
1590         (WebCore::SynchronousLoaderClient::platformBadResponseError):
1591
1592 2013-09-05  Jinwoo Song  <jinwoo7.song@samsung.com>
1593
1594         Fix unused parameter warning in WebKitAccessibleInterfaceText.cpp
1595         <https://webkit.org/b/120761>
1596
1597         Reviewed by Gyuyoung Kim.
1598
1599         Fix warning by removing unused parameter.
1600
1601         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1602         (sentenceAtPositionForAtkBoundary):
1603
1604 2013-09-05  Dirk Schulze  <krit@webkit.org>
1605
1606         NULL ptr in WebCore::RefCountedPropertyWrapper<WebCore::ClipPathOperation>::blend
1607         https://bugs.webkit.org/show_bug.cgi?id=105408
1608
1609         Reviewed by Dean Jackson.
1610
1611         Adding an early return if from or to clip-path values are 'none'. According to the
1612         specification we shall just interpolate between two basic shapes.
1613
1614         http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation
1615
1616         * page/animation/CSSPropertyAnimation.cpp:
1617         (WebCore::blendFunc):
1618
1619 2013-09-05  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
1620
1621         [Qt][WK1] REGRESSION(r154988): compositing/video/video-with-invalid-source.html
1622         https://bugs.webkit.org/show_bug.cgi?id=120683
1623
1624         Reviewed by Philippe Normand.
1625
1626         Do not set pipeline state to NULL on MediaPlayerPrivateGStreamer::loadingFailed()
1627         otherwise the bus is flushed and we never get a GST_MESSAGE_ERROR when failing to
1628         load uris.
1629         Also restore previous behaviour (before r154988) of not invoking loadingFailed() for
1630         all failed manual state change attempts.
1631
1632         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1633         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
1634         Do not call loadingFailed() if state change fails as all manual state changes are
1635         now done with changePipelineState().
1636         (WebCore::MediaPlayerPrivateGStreamer::play):
1637         (WebCore::MediaPlayerPrivateGStreamer::pause):
1638         (WebCore::MediaPlayerPrivateGStreamer::seek):
1639         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1640         Restore previous behaviour (before changeset r154988) when calling changePipelineState().
1641         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
1642         Do nothing if changing to READY on EOS (same behaviour as setting to NULL as it was before
1643         changeset r154988).
1644         (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
1645         Do not set pipeline state to NULL so we properly get GST_MESSAGE_ERROR on loading failures.
1646
1647 2013-09-05  Alberto Garcia  <berto@igalia.com>
1648
1649         [GTK] MediaControlsGtk: fix warning in constructor due to incorrect order of attributes
1650         https://bugs.webkit.org/show_bug.cgi?id=120703
1651
1652         Reviewed by Carlos Garcia Campos.
1653
1654         Fix member initialization so it matches their declaration [-Wreorder].
1655
1656         * html/shadow/MediaControlsGtk.cpp:
1657         (WebCore::MediaControlsGtk::MediaControlsGtk):
1658
1659 2013-09-04  Dirk Schulze  <krit@webkit.org>
1660
1661         Support interpolation between cross-fade() images
1662         https://bugs.webkit.org/show_bug.cgi?id=119955
1663
1664         Reviewed by Darin Adler.
1665
1666         With this patch, CSS can animate from one -webkit-cross-fade
1667         function to another, when the input images are the same in the
1668         same order.
1669
1670         * css/CSSCrossfadeValue.cpp: Added blend function.
1671         (WebCore::blendFunc):
1672         (WebCore::CSSCrossfadeValue::blend):
1673         (WebCore::CSSCrossfadeValue::equals):
1674         (WebCore::CSSCrossfadeValue::equalInputImages):
1675         * css/CSSCrossfadeValue.h: Added save casting functions.
1676         (WebCore::toCSSCrossfadeValue):
1677         * css/CSSValue.h:
1678         (WebCore::CSSValue::isCrossfadeValue):
1679         * page/animation/CSSPropertyAnimation.cpp: Add another condition to
1680             interpolate between two -webkit-cross-fade functions.
1681         (WebCore::blendFunc):
1682
1683 2013-09-04  Zoltan Herczeg  <zherczeg@webkit.org>
1684
1685         <https://webkit.org/b/118553> Hash navigation doesn't affect history when the page is retrieved from appcache
1686
1687         Reviewed by Darin Adler.
1688
1689         A new flag called keepInHistory is added to allow keeping
1690         certain pages in the history even if they have substitute data.
1691
1692         Test: http/tests/appcache/history-test.html
1693
1694         * loader/DocumentLoader.cpp:
1695         (WebCore::DocumentLoader::urlForHistory):
1696         * loader/SubstituteData.h:
1697         (WebCore::SubstituteData::SubstituteData):
1698         (WebCore::SubstituteData::shouldRevealToSessionHistory):
1699         (WebCore::SubstituteData::setShouldRevealToSessionHistory):
1700         * loader/appcache/ApplicationCacheHost.cpp:
1701         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
1702
1703 2013-09-04  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1704
1705         Remove deprecated markersForNode(Node* node).
1706         https://bugs.webkit.org/show_bug.cgi?id=120679
1707
1708         Reviewed by Ryosuke Niwa.
1709
1710         DocumentMarkerController::markersForNode(Node* node) has been marked as
1711         deprecated in favor of markersFor(Node*, MarkerTypes = AllMarkers()).
1712
1713         No new tests, no behavior change.
1714
1715         * dom/DocumentMarkerController.cpp:
1716         * dom/DocumentMarkerController.h:
1717         Remove never used markersForNode(Node*).
1718
1719 2013-09-04  Andreas Kling  <akling@apple.com>
1720
1721         CachedPage construction should begin with a Page&.
1722         <https://webkit.org/b/120721>
1723
1724         Reviewed by Anders Carlsson.
1725
1726         We can't create a CachedPage from a null Page anyway.
1727
1728         * history/CachedPage.cpp:
1729         (WebCore::CachedPage::create):
1730         (WebCore::CachedPage::CachedPage):
1731         (WebCore::CachedPage::restore):
1732         * history/CachedPage.h:
1733         * history/PageCache.cpp:
1734         (WebCore::PageCache::add):
1735         * history/PageCache.h:
1736         * loader/FrameLoader.cpp:
1737         (WebCore::FrameLoader::commitProvisionalLoad):
1738
1739 2013-09-04  Arpita Bahuguna  <a.bah@samsung.com>
1740
1741         setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
1742         https://bugs.webkit.org/show_bug.cgi?id=120293
1743
1744         Reviewed by Darin Adler.
1745
1746         setAttributeNode() performs a case-insensitive search for an existing
1747         attribute. If an existing attribute is found, it retrieves the index of
1748         such an attribute. For setting the attribute's new value, we call upon
1749         setAttributeInternal() to which both the index as well as the name of
1750         the attribute is passed.
1751         The name passed to this method is the same as the one passed to the
1752         setAttributeNode() API from the webpage and thus can be in any case.
1753
1754         However, setAttributeInternal() uses this name to get the corresponding
1755         existing attribute node. Since this retrieval is not case-insensitive,
1756         the existing node is not returned and thus the new value is not set on
1757         the existing node.
1758         We should instead use the passed index and use that to retrieve the
1759         existing node.
1760
1761         Note that obtaining the attribute's value using getAttributeNode() would
1762         still return the correct value, i.e. the new one.
1763
1764         Also, this change shall make our behavior similar to that of FF and IE.
1765
1766         Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
1767
1768         * dom/Element.cpp:
1769         (WebCore::Element::setAttributeInternal):
1770         If the passed index is not equal to attributeNotFound, we use that index
1771         to retrieve the existing attribute.
1772
1773 2013-09-04  Andreas Kling  <akling@apple.com>
1774
1775         CachedFrame construction should begin with a Frame&.
1776         <https://webkit.org/b/120719>
1777
1778         Reviewed by Anders Carlsson.
1779
1780         We can't create a CachedFrame from a null Frame anyway.
1781
1782         * bindings/js/ScriptCachedFrameData.cpp:
1783         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1784         (WebCore::ScriptCachedFrameData::restore):
1785         * bindings/js/ScriptCachedFrameData.h:
1786         * history/CachedFrame.cpp:
1787         (WebCore::CachedFrameBase::CachedFrameBase):
1788         (WebCore::CachedFrameBase::restore):
1789         (WebCore::CachedFrame::CachedFrame):
1790         * history/CachedFrame.h:
1791         (WebCore::CachedFrame::create):
1792         * history/CachedPage.cpp:
1793         (WebCore::CachedPage::CachedPage):
1794
1795 2013-09-04  Andreas Kling  <akling@apple.com>
1796
1797         Set "render tree being torn down" flag a bit earlier.
1798         <https://webkit.org/b/120717>
1799
1800         Reviewed by Anders Carlsson.
1801
1802         Set the flag at the start of Document::detach() so everyone can get a chance
1803         to avoid unnecessary work, not just renderers.
1804
1805         * dom/Document.cpp:
1806         (WebCore::Document::detach):
1807
1808 2013-09-04  Andreas Kling  <akling@apple.com>
1809
1810         Cached Page and Frame don't need to be ref-counted.
1811         <https://webkit.org/b/120710>
1812
1813         Reviewed by Anders Carlsson.
1814
1815         - CachedPage is owned by HistoryItem.
1816         - CachedFrame is owned by CachedPage.
1817
1818         Remove the ref counting from these objects to make the code less confusing.
1819
1820         The only place that used this was in FrameLoader::commitProvisionalLoad() which
1821         took a temporary ref on the CachedPage. Switched this to using a raw pointer.
1822
1823         * history/CachedFrame.h:
1824         (WebCore::CachedFrame::create):
1825         * history/CachedPage.cpp:
1826         (WebCore::CachedPage::create):
1827         * history/CachedPage.h:
1828         * history/HistoryItem.h:
1829         * loader/FrameLoader.cpp:
1830         (WebCore::FrameLoader::commitProvisionalLoad):
1831         (WebCore::FrameLoader::transitionToCommitted):
1832         * loader/FrameLoader.h:
1833
1834 2013-09-04  Roger Fong  <roger_fong@apple.com>
1835
1836         Link to libdispatch_debug.lib when using DebugSuffix configuration.
1837         https://bugs.webkit.org/show_bug.cgi?id=120712.
1838         <rdar://problem/14883216>.
1839
1840         Reviewed by Brent Fulgham.
1841
1842         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1843
1844 2013-09-04  Roger Fong  <roger_fong@apple.com>
1845
1846         Unreviewed. Windows build fix and WebCore project cleanup.
1847
1848         * WebCore.vcxproj/WebCore.vcxproj.filters:
1849         * rendering/RenderingAllInOne.cpp:
1850
1851 2013-09-04  Mark Lam  <mark.lam@apple.com>
1852
1853         Renamed StackIterator to StackVisitor.
1854         https://bugs.webkit.org/show_bug.cgi?id=120706.
1855
1856         Reviewed by Geoffrey Garen.
1857
1858         No new tests.
1859
1860         * ForwardingHeaders/interpreter/StackIterator.h: Removed.
1861         * ForwardingHeaders/interpreter/StackVisitor.h: Copied from Source/WebCore/ForwardingHeaders/interpreter/StackIterator.h.
1862         * bindings/js/JSXMLHttpRequestCustom.cpp:
1863         (WebCore::SendFunctor::operator()):
1864         * bindings/js/ScriptCallStackFactory.cpp:
1865         (WebCore::CreateScriptCallStackFunctor::operator()):
1866         (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
1867
1868 2013-09-04  Samuel White  <samuel_white@apple.com>
1869
1870         AX: when no other label on provided on form elements, WebKit should fall back to using @title
1871         https://bugs.webkit.org/show_bug.cgi?id=112842
1872
1873         Reviewed by Chris Fleizach.
1874
1875         Don't let input elements include empty labels in their accessibility title.
1876
1877         Test: platform/mac/accessibility/input-title.html
1878
1879         * accessibility/AccessibilityNodeObject.cpp:
1880         (WebCore::AccessibilityNodeObject::titleElementText):
1881
1882 2013-09-04  Andreas Kling  <akling@apple.com>
1883
1884         Make ImageQualityController per-RenderView.
1885         <https://webkit.org/b/120702>
1886
1887         Reviewed by Anders Carlsson.
1888
1889         Move ImageQualityController to its own files and add a RenderView::imageQualityController()
1890         getter instead of using a global map for all render trees.
1891
1892         This avoids having to unregister every renderer (well, every RenderBoxModelObject) from the
1893         global hash map during render tree teardown.
1894
1895         It also simplifies the live resize optimization a bit since it can now short-circuit if
1896         the RenderView's FrameView is being resized. (Previously there could be any number of
1897         RenderViews present in the map.)
1898
1899         * CMakeLists.txt:
1900         * GNUmakefile.list.am:
1901         * Target.pri:
1902         * WebCore.vcxproj/WebCore.vcxproj:
1903         * WebCore.xcodeproj/project.pbxproj:
1904         * rendering/ImageQualityController.cpp: Added.
1905         * rendering/ImageQualityController.h: Added.
1906
1907 2013-09-04  Roger Fong  <roger_fong@apple.com>
1908
1909         Unreviewed Build fix for Windows DebugSuffix configuration.
1910
1911         * WebCore.vcxproj/WebCore.vcxproj:
1912         * WebCore.vcxproj/WebCore.vcxproj.filters:
1913
1914 2013-09-04  Mark Lam  <mark.lam@apple.com>
1915
1916         Refining the StackIterator callback interface.
1917         https://bugs.webkit.org/show_bug.cgi?id=120695.
1918
1919         Reviewed by Geoffrey Garen.
1920
1921         No new tests.
1922
1923         * bindings/js/JSXMLHttpRequestCustom.cpp:
1924         (WebCore::SendFunctor::SendFunctor):
1925         (WebCore::SendFunctor::line):
1926         (WebCore::SendFunctor::url):
1927         (WebCore::SendFunctor::operator()):
1928         (WebCore::JSXMLHttpRequest::send):
1929         * bindings/js/ScriptCallStackFactory.cpp:
1930         (WebCore::createScriptCallStack):
1931
1932 2013-09-04  Andreas Kling  <akling@apple.com>
1933
1934         Remove unnecessary RenderView.h inclusion from headers.
1935         <https://webkit.org/b/120365>
1936
1937         Reviewed by Anders Carlsson.
1938
1939         RenderView.h was overzealously included by RenderText and RenderTextTrackCue,
1940         making it unpleasant to edit on my laptop.
1941
1942         * rendering/RenderText.h:
1943         * rendering/RenderTextTrackCue.h:
1944
1945             Don't include RenderView.h here, do it in .cpp files.
1946
1947 2013-09-04  Alexey Proskuryakov  <ap@apple.com>
1948
1949         Editor::m_removedAnchor is unused
1950         https://bugs.webkit.org/show_bug.cgi?id=120701
1951
1952         Reviewed by Ryosuke Niwa.
1953
1954         * editing/Editor.h: Removed m_removedAnchor. It was not only unused, but also broken,
1955         as we didn't reset it when navigating.
1956
1957 2013-09-04  Pratik Solanki  <psolanki@apple.com>
1958
1959         Document::updateHoverActiveState() should allow for deferred style recalcs
1960         https://bugs.webkit.org/show_bug.cgi?id=120700
1961
1962         Reviewed by Simon Fraser.
1963
1964         Add an extra argument to Document::updateHoverActiveState() to specify if a style recalc
1965         should be done. The default value keeps the current behavior of doing a style recalc. iOS
1966         touch handling code will pass in DeferRecalcStyleIfNeeded to avoid the work.
1967
1968         No new tests because no functional changes.
1969
1970         * dom/Document.cpp:
1971         (WebCore::Document::updateHoverActiveState):
1972         * dom/Document.h:
1973
1974 2013-09-04  Tim Horton  <timothy_horton@apple.com>
1975
1976         [mac] PDFDocumentImage should use PDFKit to draw
1977         https://bugs.webkit.org/show_bug.cgi?id=120651
1978         <rdar://problem/12810731>
1979
1980         Reviewed by Alexey Proskuryakov.
1981
1982         Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
1983
1984         Test: fast/images/pdf-as-image-with-annotations.html
1985
1986         * WebCore.xcodeproj/project.pbxproj:
1987         Add PDFDocumentImageMac.mm.
1988
1989         * platform/graphics/cg/PDFDocumentImage.cpp:
1990         (WebCore::PDFDocumentImage::PDFDocumentImage):
1991         We don't need to initialize m_document anymore because it's now a RetainPtr.
1992         Initialize m_hasPage to false.
1993
1994         (WebCore::PDFDocumentImage::~PDFDocumentImage):
1995         We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
1996
1997         (WebCore::PDFDocumentImage::size):
1998         Use expandedIntSize for explicitness.
1999
2000         (WebCore::PDFDocumentImage::applyRotationForPainting):
2001         Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
2002         We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
2003         Also, explicitly use std::min instead of importing the whole std namespace.
2004
2005         (WebCore::PDFDocumentImage::dataChanged):
2006         Assert that we don't re-enter dataChanged after we've created a document,
2007         because it seems like that shouldn't happen - we only create a document when
2008         we've supposedly received all data, and it would be nice if we didn't have
2009         all this varying code to deal with SharedBuffers changing out from under each other.
2010         Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
2011         replace it with a different implementation that creates a PDFDocument.
2012
2013         (WebCore::PDFDocumentImage::setCurrentPage):
2014         Make all page-number-related things unsigned, since they are in CG and PDFKit,
2015         and add m_hasPage to denote whether we've acquired a valid page yet.
2016         Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
2017         Remove setCurrentPage itself, as we never use a page other than the first page;
2018         we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
2019
2020         (WebCore::PDFDocumentImage::draw):
2021         Fix a weird comment.
2022         Factor code that actually draws the PDF out into drawPDFPage.
2023
2024         The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
2025
2026         (WebCore::PDFDocumentImage::createPDFDocument):
2027         Factored out of dataChanged(); I only kept the !PLATFORM(MAC) branch.
2028
2029         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
2030         Factored out of setCurrentPage().
2031         Use deg2rad since we have it.
2032
2033         (WebCore::PDFDocumentImage::pageCount):
2034         (WebCore::PDFDocumentImage::drawPDFPage):
2035         Factored out of draw().
2036         Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
2037
2038         * platform/graphics/cg/PDFDocumentImage.h:
2039         Unindent all the things, as we don't indent the first level inside a namespace scope.
2040         Forward-declare PDFDocument.
2041         Make m_currentPage unsigned as it should be.
2042         Add m_hasPage.
2043         Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.
2044
2045         * platform/graphics/mac/PDFDocumentImageMac.mm: Added.
2046         Soft-link in PDFKit and specifically the PDFDocument class.
2047
2048         (WebCore::PDFDocumentImage::createPDFDocument):
2049         Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
2050         (with respect to the SharedBuffer's data being appended to in secret), because we've waited
2051         for the document to finish loading before getting here.
2052
2053         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
2054         Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
2055         Ask PDFKit for the page's rotation.
2056
2057         (WebCore::PDFDocumentImage::pageCount):
2058         Ask PDFKit for the page count.
2059
2060         (WebCore::PDFDocumentImage::drawPDFPage):
2061         Paint the current page of the PDF. Note that we do not apply the rotation here
2062         via applyRotationForPainting because PDFKit will do it itself.
2063
2064         * platform/mac/SoftLinking.h:
2065         I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
2066         so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
2067         of the umbrella framework and the subframework, so I could use it to soft link
2068         Quartz.framework's PDFKit.framework.
2069
2070 2013-09-04  Roger Fong  <roger_fong@apple.com>
2071
2072         Unreviewed Windows build fix.
2073
2074         * WebCore.vcxproj/WebCoreCommon.props:
2075
2076 2013-09-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2077
2078         FloatingObjects should manage cleaning it's line box tree pointers itself
2079         https://bugs.webkit.org/show_bug.cgi?id=120692
2080
2081         Reviewed by David Hyatt.
2082
2083         This is another step in properly encapsulating FloatingObjects.
2084         Instead of having RenderBlock walk and clear the line box tree
2085         pointers, create a method for the behavior, and have RenderBlock call
2086         that.
2087
2088         In addtion, add a proper destructor to FloatingObjects, so that
2089         RenderBlock does not have to explicitly delete the set in
2090         FloatingObjects.
2091
2092         And as a bonus, fix the ordering of an if to avoid the expensive
2093         descendantChild check.
2094
2095         This is a port of a Blink patch by Eric Seidel.
2096
2097         No new tests, no behavior change.
2098
2099         * rendering/RenderBlock.cpp:
2100         (WebCore::RenderBlock::~RenderBlock):
2101         (WebCore::RenderBlock::deleteLineBoxTree):
2102         (WebCore::RenderBlock::repaintOverhangingFloats):
2103         (WebCore::RenderBlock::FloatingObjects::~FloatingObjects):
2104         (WebCore::RenderBlock::FloatingObjects::clearLineBoxTreePointers):
2105         (WebCore::RenderBlock::FloatingObjects::clear):
2106         * rendering/RenderBlock.h:
2107
2108 2013-09-04  Tim Horton  <timothy_horton@apple.com>
2109
2110         Rename customCssText -> customCSSText to match WebKit style
2111         https://bugs.webkit.org/show_bug.cgi?id=120694
2112
2113         Reviewed by Simon Fraser.
2114
2115         No new tests, just a rename.
2116
2117         * WebCore.order:
2118         * css/CSSAspectRatioValue.cpp:
2119         (WebCore::CSSAspectRatioValue::customCSSText):
2120         * css/CSSAspectRatioValue.h:
2121         * css/CSSBorderImageSliceValue.cpp:
2122         (WebCore::CSSBorderImageSliceValue::customCSSText):
2123         * css/CSSBorderImageSliceValue.h:
2124         * css/CSSCalculationValue.cpp:
2125         (WebCore::CSSCalcValue::customCSSText):
2126         (WebCore::CSSCalcPrimitiveValue::customCSSText):
2127         (WebCore::CSSCalcBinaryOperation::customCSSText):
2128         * css/CSSCalculationValue.h:
2129         * css/CSSCanvasValue.cpp:
2130         (WebCore::CSSCanvasValue::customCSSText):
2131         * css/CSSCanvasValue.h:
2132         * css/CSSCrossfadeValue.cpp:
2133         (WebCore::CSSCrossfadeValue::customCSSText):
2134         * css/CSSCrossfadeValue.h:
2135         * css/CSSCursorImageValue.cpp:
2136         (WebCore::CSSCursorImageValue::customCSSText):
2137         * css/CSSCursorImageValue.h:
2138         * css/CSSFilterImageValue.cpp:
2139         (WebCore::CSSFilterImageValue::customCSSText):
2140         * css/CSSFilterImageValue.h:
2141         * css/CSSFontFaceSrcValue.cpp:
2142         (WebCore::CSSFontFaceSrcValue::customCSSText):
2143         * css/CSSFontFaceSrcValue.h:
2144         * css/CSSFunctionValue.cpp:
2145         (WebCore::CSSFunctionValue::customCSSText):
2146         * css/CSSFunctionValue.h:
2147         * css/CSSGradientValue.cpp:
2148         (WebCore::CSSLinearGradientValue::customCSSText):
2149         (WebCore::CSSRadialGradientValue::customCSSText):
2150         * css/CSSGradientValue.h:
2151         * css/CSSImageSetValue.cpp:
2152         (WebCore::CSSImageSetValue::customCSSText):
2153         * css/CSSImageSetValue.h:
2154         * css/CSSImageValue.cpp:
2155         (WebCore::CSSImageValue::customCSSText):
2156         * css/CSSImageValue.h:
2157         * css/CSSInheritedValue.cpp:
2158         (WebCore::CSSInheritedValue::customCSSText):
2159         * css/CSSInheritedValue.h:
2160         * css/CSSInitialValue.cpp:
2161         (WebCore::CSSInitialValue::customCSSText):
2162         * css/CSSInitialValue.h:
2163         * css/CSSLineBoxContainValue.cpp:
2164         (WebCore::CSSLineBoxContainValue::customCSSText):
2165         * css/CSSLineBoxContainValue.h:
2166         * css/CSSPrimitiveValue.cpp:
2167         (WebCore::CSSPrimitiveValue::customCSSText):
2168         (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
2169         * css/CSSPrimitiveValue.h:
2170         * css/CSSReflectValue.cpp:
2171         (WebCore::CSSReflectValue::customCSSText):
2172         * css/CSSReflectValue.h:
2173         * css/CSSTimingFunctionValue.cpp:
2174         (WebCore::CSSLinearTimingFunctionValue::customCSSText):
2175         (WebCore::CSSCubicBezierTimingFunctionValue::customCSSText):
2176         (WebCore::CSSStepsTimingFunctionValue::customCSSText):
2177         * css/CSSTimingFunctionValue.h:
2178         * css/CSSUnicodeRangeValue.cpp:
2179         (WebCore::CSSUnicodeRangeValue::customCSSText):
2180         * css/CSSUnicodeRangeValue.h:
2181         * css/CSSValue.cpp:
2182         (WebCore::CSSValue::cssText):
2183         * css/CSSValueList.cpp:
2184         (WebCore::CSSValueList::customCSSText):
2185         * css/CSSValueList.h:
2186         * css/FontFeatureValue.cpp:
2187         (WebCore::FontFeatureValue::customCSSText):
2188         * css/FontFeatureValue.h:
2189         * css/FontValue.cpp:
2190         (WebCore::FontValue::customCSSText):
2191         * css/FontValue.h:
2192         * css/ShadowValue.cpp:
2193         (WebCore::ShadowValue::customCSSText):
2194         * css/ShadowValue.h:
2195         * css/WebKitCSSArrayFunctionValue.cpp:
2196         (WebCore::WebKitCSSArrayFunctionValue::customCSSText):
2197         * css/WebKitCSSArrayFunctionValue.h:
2198         * css/WebKitCSSFilterValue.cpp:
2199         (WebCore::WebKitCSSFilterValue::customCSSText):
2200         * css/WebKitCSSFilterValue.h:
2201         * css/WebKitCSSMatFunctionValue.cpp:
2202         (WebCore::WebKitCSSMatFunctionValue::customCSSText):
2203         * css/WebKitCSSMatFunctionValue.h:
2204         * css/WebKitCSSMixFunctionValue.cpp:
2205         (WebCore::WebKitCSSMixFunctionValue::customCSSText):
2206         * css/WebKitCSSMixFunctionValue.h:
2207         * css/WebKitCSSSVGDocumentValue.cpp:
2208         (WebCore::WebKitCSSSVGDocumentValue::customCSSText):
2209         * css/WebKitCSSSVGDocumentValue.h:
2210         * css/WebKitCSSShaderValue.cpp:
2211         (WebCore::WebKitCSSShaderValue::customCSSText):
2212         * css/WebKitCSSShaderValue.h:
2213         * css/WebKitCSSTransformValue.cpp:
2214         (WebCore::WebKitCSSTransformValue::customCSSText):
2215         * css/WebKitCSSTransformValue.h:
2216         * svg/SVGColor.cpp:
2217         (WebCore::SVGColor::customCSSText):
2218         * svg/SVGColor.h:
2219         * svg/SVGPaint.cpp:
2220         (WebCore::SVGPaint::customCSSText):
2221         * svg/SVGPaint.h:
2222
2223 2013-09-04  Chris Fleizach  <cfleizach@apple.com>
2224
2225         AX: aria-valuetext property not exposing AXValueDescription
2226         https://bugs.webkit.org/show_bug.cgi?id=120375
2227
2228         Reviewed by Darin Adler.
2229
2230         Expose value based attributes for incrementor roles (which are called spinbuttons by ARIA).
2231
2232         Test: platform/mac/accessibility/spinbutton-valuedescription.html
2233
2234         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2235         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2236
2237 2013-09-04  Javier Fernandez  <jfernandez@igalia.com>
2238
2239         <https://webkit.org/b/119622> [CSSRegions] Not possible to clear the selection when mixing content from different FlowThreads
2240
2241         Reviewed by David Hyatt.
2242
2243         When using CSS Regions is usual that the RenderTree doesn't match
2244         the DOM Tree in terms of relative position of the nodes. Besides,
2245         usually the content of a certain node is split and spread across
2246         multiple blocks, rendered in different positions.
2247
2248         Regarding the Selection, this problem is even more important; the
2249         selection direction changes when crossing the FlowThread
2250         boundaries. This weird behavior is also present in other layouts
2251         using non-regular positioning mechanisms, like absolute,
2252         static. However, for those layouts the RenderTree preserves the
2253         order of the nodes, unlike the CSS Regions layout model.
2254
2255         Because of how the RenderTree is generated with CSS Regions, the
2256         RenderView::setSelection algorithm is not able to repaint some of
2257         the rectangles defined during the selection process. In order to
2258         face this issue, the proposed fix determines whether it should
2259         backwards traversing the RenderTree, from the "stop" node to the
2260         RenderView node.
2261
2262         Test: fast/regions/selecting-text-through-different-region-flows-2.html
2263
2264         * rendering/RenderView.cpp:
2265         (WebCore::getNextOrPrevRenderObjectBasedOnDirection): Added.
2266         (WebCore::RenderView::setSelection):
2267
2268 2013-09-04  Eric Carlson  <eric.carlson@apple.com>
2269
2270         Get MEDIA_STREAM compiling on OSX
2271         https://bugs.webkit.org/show_bug.cgi?id=120650
2272
2273         Reviewed by Darin Adler.
2274
2275         No new tests, the code changed doesn't run on OSX yet.
2276
2277         * DerivedSources.make: Add MediaStream idl files.
2278
2279         * Modules/mediastream/LocalMediaStream.h: Mark class as FINAL.
2280
2281         * Modules/mediastream/MediaConstraintsImpl.cpp:
2282         (WebCore::MediaConstraintsImpl::getOptionalConstraints): append -> appendRange so we don't
2283             need a MediaConstraint copy constructor.
2284
2285         * Modules/mediastream/RTCDataChannel.cpp:
2286         (WebCore::RTCDataChannel::send): Remove an unused parameter name.
2287         * Modules/mediastream/RTCDataChannel.h: ArrayBuffer and ArrayBufferView are in the JSC namespace.
2288
2289         * Modules/mediastream/RTCPeerConnection.cpp:
2290         (WebCore::RTCPeerConnection::RTCPeerConnection): loader() doesn't return a pointer.
2291         (WebCore::RTCPeerConnection::localDescription): Set the ExceptionCode on error.
2292         (WebCore::RTCPeerConnection::remoteDescription): Ditto.
2293
2294         * Modules/mediastream/RTCSessionDescription.cpp:
2295         (WebCore::RTCSessionDescription::setSdp): Remove the unused ExceptionCode parameter.
2296         * Modules/mediastream/RTCSessionDescription.h: Ditto.
2297         * Modules/mediastream/RTCSessionDescription.idl: Ditto.
2298
2299         * Modules/mediastream/RTCStatsResponse.cpp:
2300         (WebCore::RTCStatsResponse::canGetItemsForName): Add so JSRTCStatsResponse::canGetItemsForName
2301             doesn't cause ref count churn.
2302         * Modules/mediastream/RTCStatsResponse.h: Mark class as FINAL. Declare canGetItemsForName.
2303
2304         * WebCore.xcodeproj/project.pbxproj: Add new files.
2305
2306         * bindings/js/JSRTCStatsResponseCustom.cpp:
2307         (WebCore::JSRTCStatsResponse::canGetItemsForName): Use canGetItemsForName instead of namedItem.
2308             Use propertyNameToAtomicString instead of propertyNameToString 
2309         (WebCore::JSRTCStatsResponse::nameGetter): Use propertyNameToAtomicString instead of 
2310             propertyNameToString because namedItem takes an AtomicString.
2311
2312         * platform/mediastream/mac: Added.
2313         * platform/mediastream/mac/MediaStreamCenterMac.cpp: Added.
2314         * platform/mediastream/mac/MediaStreamCenterMac.h: Added.
2315
2316 2013-09-04  Daniel Bates  <dabates@apple.com>
2317
2318         [iOS] Fix the build following <http://trac.webkit.org/changeset/154903>
2319         (https://bugs.webkit.org/show_bug.cgi?id=120540)
2320
2321         * style/StyleResolveTree.cpp:
2322         (WebCore::Style::resolveTree): Use address operator and dot-notation when
2323         passing Element to CheckForVisibilityChangeOnRecalcStyle and calling
2324         Element::renderStyle(), respectively.
2325
2326 2013-09-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2327
2328         Move logical dimension getters/setters to FloatingObject from RenderBlock
2329         https://bugs.webkit.org/show_bug.cgi?id=120686
2330
2331         Reviewed by David Hyatt.
2332
2333         This is the first step in decoupling FloatingObject, FloatingObjects,
2334         et al from RenderBlock. It is not ideal that the methods take a bool;
2335         however, passing down the actual writing mode would require
2336         refactoring the way that RenderBlock stores this information, which is
2337         a task for the future.
2338
2339         No new tests, no behavior change.
2340
2341         * rendering/RenderBlock.cpp:
2342         (WebCore::RenderBlock::repaintOverhangingFloats): Use new methods.
2343         (WebCore::RenderBlock::insertFloatingObject):  Ditto.
2344         (WebCore::RenderBlock::removeFloatingObject): Ditto.
2345         (WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
2346         (WebCore::RenderBlock::computeLogicalLocationForFloat): Ditto.
2347         (WebCore::RenderBlock::positionNewFloats): Ditto.
2348         (WebCore::::updateOffsetIfNeeded): Ditto.
2349         (WebCore::::collectIfNeeded): Ditto.
2350         (WebCore::::getHeightRemaining): Ditto.
2351         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
2352         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
2353         (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Ditto.
2354         (WebCore::RenderBlock::lowestFloatLogicalBottom): Ditto.
2355         (WebCore::RenderBlock::clearFloats): Ditto.
2356         (WebCore::RenderBlock::addOverhangingFloats): Ditto.
2357         (WebCore::RenderBlock::hasOverhangingFloat): Ditto.
2358         (WebCore::RenderBlock::addIntrudingFloats): Ditto.
2359         * rendering/RenderBlock.h:
2360         (WebCore::RenderBlock::FloatingObject::logicalTop): Moved from RenderBlock::logicalTopForFloat
2361         (WebCore::RenderBlock::FloatingObject::logicalBottom): Moved from RenderBlock::logicalBottomForFloat
2362         (WebCore::RenderBlock::FloatingObject::logicalLeft): Moved from RenderBlock::logicalLeftForFloat
2363         (WebCore::RenderBlock::FloatingObject::logicalRight): Moved from RenderBlock::logicalRightForFloat
2364         (WebCore::RenderBlock::FloatingObject::logicalWidth): Moved from RenderBlock::logicalWidthForFloat
2365         (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalTop): Moved from RenderBlock::pixelSnappedLogicalTopForFloat
2366         (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalBottom): Moved from RenderBlock::pixelSnappedLogicalBottomForFloat
2367         (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalLeft): Moved from RenderBlock::pixelSnappedLogicalLeftForFloat
2368         (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalRight): Moved from RenderBlock::pixelSnappedLogicalRightForFloat
2369         (WebCore::RenderBlock::FloatingObject::setLogicalTop): Moved from RenderBlock::setLogicalTopForFloat
2370         (WebCore::RenderBlock::FloatingObject::setLogicalLeft): Moved from RenderBlock::setLogicalLeftForFloat
2371         (WebCore::RenderBlock::FloatingObject::setLogicalHeight): Moved from RenderBlock::setLogicalHeightForFloat
2372         (WebCore::RenderBlock::FloatingObject::setLogicalWidth): Moved from RenderBlock::setLogicalWidthForFloat
2373         * rendering/RenderBlockLineLayout.cpp:
2374         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Use new methods.
2375         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Ditto.
2376         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Ditto.
2377         (WebCore::RenderBlock::positionNewFloatOnLine): Ditto.
2378
2379 2013-09-04  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
2380
2381         REGRESSION(r154977): Do not urlencode soup message on ResourceRequest::toSoupMessage()
2382         https://bugs.webkit.org/show_bug.cgi?id=120681
2383
2384         Reviewed by Martin Robinson.
2385
2386         Do not call soup_message_set_uri with soupURI() (url encoded uri) on
2387         ResourceRequest::toSoupMessage().
2388
2389         * platform/network/soup/ResourceRequest.h:
2390         * platform/network/soup/ResourceRequestSoup.cpp:
2391         (WebCore::ResourceRequest::updateSoupMessageMembers):
2392         (WebCore::ResourceRequest::updateSoupMessage):
2393         (WebCore::ResourceRequest::toSoupMessage):
2394         Split common code from updateSoupMessage/toSoupMessage into updateSoupMessageMembers.
2395
2396 2013-09-04  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
2397
2398         [GTK] add support for subtitles on webkit2GTK
2399         https://bugs.webkit.org/show_bug.cgi?id=117008
2400
2401         By activating subtitles support on webkit2GTK, the video player
2402         recognizes and use text <tracks> inside <video> elements.
2403
2404         Reviewed by Martin Robinson.
2405
2406         Layout tests (track-menu) should cover this change.
2407
2408         * css/mediaControlsGtk.css:
2409         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
2410         (video::-webkit-media-controls-closed-captions-container):
2411         (video::-webkit-media-controls-closed-captions-track-list):
2412         (video::-webkit-media-controls-closed-captions-track-list h3):
2413         (video::-webkit-media-controls-closed-captions-track-list ul):
2414         (video::-webkit-media-controls-closed-captions-track-list li):
2415         (video::-webkit-media-controls-closed-captions-track-list li.selected):
2416         * html/shadow/MediaControlElements.cpp:
2417         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
2418         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
2419         * html/shadow/MediaControlElements.h:
2420         * html/shadow/MediaControlsGtk.cpp:
2421         (WebCore::MediaControlsGtkEventListener::create):
2422         (WebCore::MediaControlsGtkEventListener::cast):
2423         (WebCore::MediaControlsGtkEventListener::MediaControlsGtkEventListener):
2424         (WebCore::MediaControlsGtk::MediaControlsGtk):
2425         (WebCore::MediaControlsGtk::initializeControls):
2426         (WebCore::MediaControlsGtk::setMediaController):
2427         (WebCore::MediaControlsGtk::reset):
2428         (WebCore::MediaControlsGtk::makeTransparent):
2429         (WebCore::MediaControlsGtk::toggleClosedCaptionTrackList):
2430         (WebCore::MediaControlsGtk::showClosedCaptionTrackList):
2431         (WebCore::MediaControlsGtk::hideClosedCaptionTrackList):
2432         (WebCore::MediaControlsGtk::handleClickEvent):
2433         (WebCore::MediaControlsGtk::eventListener):
2434         (WebCore::MediaControlsGtkEventListener::handleEvent):
2435         (WebCore::MediaControlsGtkEventListener::operator==):
2436         * html/shadow/MediaControlsGtk.h:
2437         * page/CaptionUserPreferences.cpp:
2438         (WebCore::trackDisplayName):
2439         * platform/gtk/LocalizedStringsGtk.cpp:
2440         (WebCore::textTrackSubtitlesText):
2441         (WebCore::textTrackOffMenuItemText):
2442         (WebCore::textTrackNoLabelText):
2443         * platform/gtk/RenderThemeGtk.h:
2444
2445 2013-09-03  Darin Adler  <darin@apple.com>
2446
2447         Use OwnPtr in the RenderLayerFilterInfo map
2448         https://bugs.webkit.org/show_bug.cgi?id=120619
2449
2450         Reviewed by Anders Carlsson.
2451
2452         * rendering/RenderLayer.cpp:
2453         (WebCore::RenderLayer::~RenderLayer): Use FilterInfo::remove directly instead of
2454         going through removeFilterInfoIfNeeded function.
2455         (WebCore::RenderLayer::paintsWithFilters): Rearranged #if a little bit and tweaked
2456         the comment.
2457         (WebCore::RenderLayer::requiresFullLayerImageForFilters): Use && instead of ternary.
2458         (WebCore::RenderLayer::filterRenderer): Use FilterInfo::getIfExists directly instead
2459         of going through filterInfo function.
2460         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): Use FilterInfo::get
2461         directly instead of going through filterInfo function. Also use references instead
2462         of pointers.
2463         (WebCore::shouldDoSoftwarePaint): Marked this simple function, used only once, as
2464         inline.
2465         (WebCore::paintForFixedRootBackground): Ditto.
2466         (WebCore::RenderLayer::setupFilters): Use FilterInfo::getIfExists directly instead
2467         of going through filterInfo function. Also get rendererer out of filterInfo instead
2468         of calling filterRenderer.
2469         (WebCore::RenderLayer::updateOrRemoveFilterClients): Use FilterInfo::get and
2470         FilterInfo::getIfExists directly instead of using ensureFilterInfo and
2471         filterInfo functions.
2472         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Use FilterInfo::getIfExists
2473         and FilterInfo::get directly instead of using filterInfo function.
2474
2475         * rendering/RenderLayer.h: Removed the ifdefs around forward declarations; overkill,
2476         since there is no harm in a few extras. Marked the RenderLayer class FINAL. Removed the
2477         no-longer-needed filterInfo, ensureFilterInfo, removeFilterInfoIfNeeded, hasFilterInfo,
2478         and setHasFilterInfo functions. Mark everything private instead of protected since
2479         there are no classes derived from this one. Made FilterInfo an embedded class so it
2480         can get at the m_hasFilterInfo data member directly and has a shorter name.
2481
2482         * rendering/RenderLayerFilterInfo.cpp: Removed the ifs around includes, which were
2483         overkill, since there is little harm including a few extra files.
2484         (WebCore::RenderLayer::FilterInfo::map): Added. Returns the single global map.
2485         (WebCore::RenderLayer::FilterInfo::getIfExists): Renamed from filterInfoForRenderLayer.
2486         Also changed to take a reference instead of a pointer, and to use the new filterMap.
2487         (WebCore::RenderLayer::FilterInfo::get): Renamed from createFilterInfoForRenderLayerIfNeeded.
2488         Also changed to take a reference instead of a pointer, to use the new filterMap, and
2489         to use add to avoid hashing twice when adding a new layer to the map.
2490         (WebCore::RenderLayer::FilterInfo::remove): Renamed from removeFilterInfoForRenderLayer.
2491         Also changed to take a reference instead of a pointer and eliminated the explicit
2492         delete since we use OwnPtr now.
2493         (WebCore::RenderLayer::FilterInfo::FilterInfo): Take a reference instead of a pointer.
2494         (WebCore::RenderLayer::FilterInfo::~FilterInfo): Updated class name.
2495         (WebCore::RenderLayer::FilterInfo::setRenderer): Ditto.
2496         (WebCore::RenderLayer::FilterInfo::notifyFinished): Update since m_layer is a reference.
2497         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Update to iterate in a
2498         slightly more idiomatic and efficient way. Also update since m_layer is a reference.
2499         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
2500         (WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded): Ditto.
2501         (WebCore::RenderLayer::FilterInfo::updateCustomFilterClients): Ditto. Also switched to
2502         a raw pointer for CustomFilterProgram*.
2503         (WebCore::RenderLayer::FilterInfo::removeCustomFilterClients): Ditto.
2504
2505         * rendering/RenderLayerFilterInfo.h: Removed the ifs around includes, which were
2506         overkill, since there is little harm including a few extra files. Changed to be a
2507         member class of RenderLayer, marked the class FINAL, and changed the style of the
2508         conditionals around the base classes. Renamed functions. Made overrides private and
2509         used OVERRIDE. Changed functions to take references instead of pointers. Did some
2510         small style cleanup. Made deleteOwnedPtr a friend so we can keep the destructor private.
2511         Moved the typedef of RenderLayerFilterInfoMap into the class and named it just Map.
2512         Got rid of s_filterMap and instead added a function named just map().
2513
2514 2013-09-04  Andreas Kling  <akling@apple.com>
2515
2516         Simplify subtree relayout scheduling a bit.
2517         <https://webkit.org/b/120684>
2518
2519         Reviewed by Antti Koivisto.
2520
2521         Subtree relayout scheduling should only happen while there's a render tree up,
2522         the code can freely assume that there's a RenderView present.
2523
2524         Added an assertion that the render tree isn't being torn down. This should catch
2525         renderers doing unnecessary work during document detach and could be a source
2526         of "performance freebies."
2527
2528         I also un-nested scheduleRelayoutOfSubtree() with early-return style to make
2529         the code more human-readable.
2530
2531         * page/FrameView.h:
2532         * page/FrameView.cpp:
2533         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2534         * rendering/RenderObject.cpp:
2535         (WebCore::RenderObject::scheduleRelayout):
2536
2537 2013-09-04  Jae Hyun Park  <jae.park@company100.net>
2538
2539         [Coordinated Graphics] Remove unused method in CoordinatedGraphicsLayer
2540         https://bugs.webkit.org/show_bug.cgi?id=120664
2541
2542         Reviewed by Darin Adler.
2543
2544         CoordinatedGraphicsLayer::hasPendingVisibleChanges is not used as of
2545         r148952.
2546
2547         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2548         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2549
2550 2013-09-04  Hans Muller  <hmuller@adobe.com>
2551
2552         [CSS Shapes] Revise the ShapeInterval set operations' implementation
2553         https://bugs.webkit.org/show_bug.cgi?id=120349
2554
2555         Reviewed by Alexandru Chiculita.
2556
2557         Revised the ShapeIntervals unite, intersect, and subtract operations to
2558         improve efficiency and clarity.
2559
2560         No new tests are required, this is just an internal refactoring.
2561
2562         * rendering/shapes/PolygonShape.cpp:
2563         (WebCore::computeOverlappingEdgeXProjections): Removed call to ShapeInterval<T>sortVector(), since calling std::sort directly is simpler.
2564         * rendering/shapes/ShapeInterval.h:
2565         (WebCore::ShapeInterval::contains): True if the interval parameter is within this interval.
2566         (WebCore::ShapeInterval::intersect): Substantially revised version of the original method.
2567         (WebCore::ShapeInterval::uniteVectors): Ditto.
2568         (WebCore::ShapeInterval::intersectVectors): Ditto.
2569         (WebCore::ShapeInterval::subtractVectors): Ditto.
2570
2571 2013-09-04  Krzysztof Czech  <k.czech@samsung.com>
2572
2573         [ATK] Adds an accessibility support to access a value of the color control element
2574         https://bugs.webkit.org/show_bug.cgi?id=114354
2575
2576         Reviewed by Mario Sanchez Prada.
2577
2578         Implements a possibility of retrieving a value of the color control element.
2579
2580         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2581         (webkitAccessibleTextGetText):
2582         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2583         (getInterfaceMaskFromObject):
2584
2585 2013-09-04  Andreas Kling  <akling@apple.com>
2586
2587         Use Vector<Ref<T>> in three random WebCore loops.
2588         <https://webkit.org/b/120661>
2589
2590         Reviewed by Darin Adler.
2591
2592         Clean up three little loops to use Refs to avoid null checking known-valid objects.
2593         Also apply auto, reserveInitialCapacity and uncheckedAppend as appropriate.
2594
2595         * page/DOMWindow.cpp:
2596         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2597         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
2598         * platform/graphics/FontCache.cpp:
2599         (WebCore::FontCache::invalidate):
2600
2601 2013-09-04  Claudio Saavedra  <csaavedra@igalia.com>
2602
2603         [GTK] Color of input button's text broken with recent gnome-themes-standard
2604         https://bugs.webkit.org/show_bug.cgi?id=120581
2605
2606         Reviewed by Carlos Garcia Campos.
2607
2608         * platform/gtk/RenderThemeGtk3.cpp:
2609         (WebCore::getStyleContext): add the "text-button" class.
2610         (WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
2611         as this is the one actually used for button labels.
2612
2613 2013-09-04  Zan Dobersek  <zdobersek@igalia.com>
2614
2615         [GTK] Add support for the Wayland build target
2616         https://bugs.webkit.org/show_bug.cgi?id=120627
2617
2618         Reviewed by Gustavo Noronha Silva.
2619
2620         * GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files.
2621         The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and
2622         PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously
2623         guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND
2624         conditional is used. If neither of those two targets is being built we fall back to adding source files to the build
2625         as necessary by the actual build target.
2626         * platform/gtk/GtkVersioning.c:
2627         (gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being
2628         defined - these should only be built when building the X11 target, checked for with PLATFORM(X11).
2629
2630 2013-09-04  Mario Sanchez Prada  <mario.prada@samsung.com>
2631
2632         [GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
2633         https://bugs.webkit.org/show_bug.cgi?id=114873
2634
2635         Reviewed by Chris Fleizach.
2636
2637         Re-implement these functions without using GailTextUtil nor Pango.
2638
2639         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2640         (webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary,
2641         to keep it consistent with names for new functions.
2642         (isSentenceBoundary): Helper function to know when we are either
2643         at the beginning or the end of a sentence.
2644         (isWhiteSpaceBetweenSentences): It returns true if we are in the
2645         middle of a white space between sentences. Useful for implementing
2646         the SENTENCE_END boundary type.
2647         (sentenceAtPositionForAtkBoundary): New helper function to find the
2648         sentence at a given position considering values of AtkTextBoundary.
2649         (webkitAccessibleTextSentenceForBoundary): New function,
2650         implementing atk_text_get_text_*_offset for SENTENCE.
2651         (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
2652         SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary().
2653
2654 2013-09-04  Andrei Bucur  <abucur@adobe.com>
2655
2656         [CSS Regions] Extend the RenderRegionRange class to include overflow information + apply the layout overflow
2657         https://bugs.webkit.org/show_bug.cgi?id=116299
2658
2659         Reviewed by David Hyatt.
2660
2661         Patch for computing overflow for boxes per region and applying it for layout overflow.
2662         The approach is based on adding a RenderOverflow object inside the RenderBoxRegionInfo
2663         structure. The RenderOverflow object is manipulated by the RenderRegion using some utility
2664         functions that receive the target box as a parameter.
2665         When computing the portion of a box inside a region it is necessary to split the border
2666         rect of the box between regions. This means mapping the rectangle in the flow thread
2667         coordinates, making the split and then remapping the fragment in the box coordinates.
2668         For now, this is not optimized and walks the render tree to compute the block offsets.
2669         The function getRegionRangeForBox is used to determine in what regions a box should
2670         be rendered into. The range is computed at layout time and it depends on the height of
2671         the box, if its unsplittable for fragmentation etc.
2672         The patch also propagates the layout overflow to the regions. This enables to correctly
2673         display scrollbars when chaining varying size regions (currently the horizontal overflow
2674         is as wide as the widest region for all the regions). Unsplittable boxes will also generate
2675         layout overflow in the start region so they can be scrolled and fully reachable. This
2676         functionality depends on fixing the visual overflow and adapting the layout to take into
2677         account the unsplittable box. Besides this, the relative positioning and transforms are applied
2678         at a fragment level. This is in line with the CSS3 Break specification:
2679         http://dev.w3.org/csswg/css-break/#transforms
2680
2681         Tests: fast/regions/overflow-scrollable-rel-pos-fragment.html
2682                fast/regions/overflow-scrollable-rotated-fragment.html
2683                fast/regions/overflow-scrollable-unsplittable-fragment.html
2684                fast/regions/overflow-scrollable-varying-width-1.html
2685                fast/regions/overflow-scrollable-varying-width-2.html
2686
2687         * rendering/RenderBlock.cpp:
2688         (WebCore::RenderBlock::computeOverflow):
2689         (WebCore::RenderBlock::clearLayoutOverflow):
2690         (WebCore::RenderBlock::addVisualOverflowFromTheme):
2691         (WebCore::RenderBlock::relayoutForPagination):
2692         * rendering/RenderBlockLineLayout.cpp:
2693         (WebCore::RenderBlock::addOverflowFromInlineChildren):
2694         * rendering/RenderBox.cpp:
2695         (WebCore::RenderBox::clientBoxRectInRegion):
2696         (WebCore::RenderBox::addVisualEffectOverflow):
2697         (WebCore::RenderBox::applyVisualEffectOverflow):
2698         (WebCore::RenderBox::addOverflowFromChild):
2699         (WebCore::RenderBox::clearOverflow):
2700         * rendering/RenderBox.h:
2701         * rendering/RenderBoxRegionInfo.h:
2702         (WebCore::RenderBoxRegionInfo::createOverflow):
2703         (WebCore::RenderBoxRegionInfo::overflow):
2704         (WebCore::RenderBoxRegionInfo::clearOverflow):
2705         * rendering/RenderEmbeddedObject.cpp:
2706         (WebCore::RenderEmbeddedObject::layout):
2707         * rendering/RenderFlowThread.cpp:
2708         (WebCore::RenderFlowThread::updateLogicalWidth):
2709         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
2710         (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
2711         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
2712         (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
2713         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
2714         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
2715         (WebCore::RenderFlowThread::addRegionsLayoutOverflow):
2716         (WebCore::RenderFlowThread::clearRegionsOverflow):
2717         * rendering/RenderFlowThread.h:
2718         * rendering/RenderIFrame.cpp:
2719         (WebCore::RenderIFrame::layout):
2720         * rendering/RenderRegion.cpp:
2721         (WebCore::RenderRegion::computeOverflowFromFlowThread):
2722         (WebCore::RenderRegion::setRenderBoxRegionInfo):
2723         (WebCore::RenderRegion::ensureOverflowForBox):
2724         (WebCore::RenderRegion::rectFlowPortionForBox):
2725         (WebCore::RenderRegion::addLayoutOverflowForBox):
2726         (WebCore::RenderRegion::addVisualOverflowForBox):
2727         (WebCore::RenderRegion::layoutOverflowRectForBox):
2728         (WebCore::RenderRegion::visualOverflowRectForBox):
2729         (WebCore::RenderRegion::layoutOverflowRectForBoxForPropagation):
2730         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
2731         * rendering/RenderRegion.h:
2732         * rendering/RenderReplaced.cpp:
2733         (WebCore::RenderReplaced::layout):
2734         * rendering/RenderTableSection.cpp:
2735         (WebCore::RenderTableSection::computeOverflowFromCells):
2736
2737 2013-09-04  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
2738
2739         [GStreamer] cannot play live streams
2740         https://bugs.webkit.org/show_bug.cgi?id=116831
2741
2742         Reviewed by Philippe Normand.
2743
2744         Fix issues with rtsp streams embedded on <video> not loading.
2745
2746         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2747         Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
2748         live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
2749         starting playback.
2750
2751 2013-09-03  Chris Fleizach  <cfleizach@apple.com>
2752
2753         AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists.
2754         https://bugs.webkit.org/show_bug.cgi?id=120550
2755
2756         Reviewed by Mario Sanchez Prada.
2757
2758         Resolve a FIXME from the accessible name computation refactoring so that alternative text for links do not
2759         show up in the title field and do not duplicate naming when a title tag is used.
2760
2761         Effectively, this means that links no longer use AXTitle for alternative text. They use AXDescription
2762         like all other elements.
2763
2764         Test: platform/mac/accessibility/link-with-title.html
2765
2766         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2767         (-[WebAccessibilityObjectWrapper accessibilityTitle]):
2768         (-[WebAccessibilityObjectWrapper accessibilityDescription]):
2769
2770 2013-09-03  Darin Adler  <darin@apple.com>
2771
2772         Change type of Document::doctype back to a raw pointer
2773         https://bugs.webkit.org/show_bug.cgi?id=120617
2774
2775         Reviewed by Andreas Kling.
2776
2777         * dom/Document.cpp:
2778         (WebCore::Document::doctype): Return a raw pointer.
2779         (WebCore::Document::childrenChanged): Use the raw pointer.
2780         Also added a FIXME about this code that is probably in the wrong place.
2781         * dom/Document.h: More of the same.
2782
2783         * editing/markup.cpp:
2784         (WebCore::documentTypeString): Get rid of local variable entirely,
2785         since null is already handled right by createMarkup, and also remove
2786         the call to get since doctype is just a raw pointer.
2787
2788 2013-09-03  Andreas Kling  <akling@apple.com>
2789
2790         ASSERTION FAILED: frame().view() == this closing a page with SVG or video
2791         <https://webkit.org/b/120645>
2792
2793         Reviewed by Antti Koivisto.
2794
2795         Have RenderSVGResourceContainer check if the document is being destroyed before
2796         triggering any repaints. This replaces the previous check for a null RenderView
2797         which meant basically the same thing.
2798
2799         We could add more and better assertions to catch unnecessary work during tree
2800         teardown, but let's do that separately.
2801
2802         * rendering/svg/RenderSVGResourceContainer.cpp:
2803         (WebCore::RenderSVGResourceContainer::markClientForInvalidation):
2804
2805 2013-09-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2806
2807         Fix uninitialized build warning in make_names.pl
2808         https://bugs.webkit.org/show_bug.cgi?id=120658
2809
2810         Reviewed by Andreas Kling.
2811
2812         No new tests, no behavior change.
2813
2814         * dom/make_names.pl:
2815         (printTypeChecks): Fixed a build warning since r154965.
2816
2817 2013-09-03  Darin Adler  <darin@apple.com>
2818
2819         Fix backwards branch in ~Node from r154967
2820         https://bugs.webkit.org/show_bug.cgi?id=120659
2821
2822         Reviewed by Andreas Kling.
2823
2824         * dom/Node.cpp:
2825         (WebCore::Node::~Node): Fix backwards branch. The old code ran the code only
2826         when we did not remove the item from the table. I removed a ! from this expression
2827         after review; bad idea.
2828
2829 2013-09-03  Enrica Casucci  <enrica@apple.com>
2830
2831         Can't select Katakana word by double-clicking.
2832         <rdar://problem/14654926>
2833
2834         Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
2835
2836         For some languages, like Japanese we need
2837         to use more context for word breaking.
2838
2839         New test: editing/selection/doubleclick-japanese-text.html
2840
2841         * platform/text/TextBoundaries.h:
2842         (WebCore::requiresContextForWordBoundary):
2843
2844 2013-09-03  Mark Lam  <mark.lam@apple.com>
2845
2846         Converting StackIterator to a callback interface.
2847         https://bugs.webkit.org/show_bug.cgi?id=120564.
2848
2849         Reviewed by Filip Pizlo.
2850
2851         No new tests.
2852
2853         * bindings/js/JSXMLHttpRequestCustom.cpp:
2854         (WebCore::SendFunctor::SendFunctor):
2855         (WebCore::SendFunctor::hasViableFrame):
2856         (WebCore::SendFunctor::operator()):
2857         (WebCore::JSXMLHttpRequest::send):
2858         * bindings/js/ScriptCallStackFactory.cpp:
2859         (WebCore::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor):
2860         (WebCore::CreateScriptCallStackFunctor::operator()):
2861         (WebCore::createScriptCallStack):
2862         (WebCore::CreateScriptCallStackForConsoleFunctor::CreateScriptCallStackForConsoleFunctor):
2863         (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
2864
2865 2013-09-03  Oliver Hunt  <oliver@apple.com>
2866
2867         Support structured clone of Map and Set
2868         https://bugs.webkit.org/show_bug.cgi?id=120654
2869
2870         Reviewed by Simon Fraser.
2871
2872         Add support for cloning Map and Set.  Fairly self explanatory change.
2873         Needed to add Forwarding headers for the JSMap, JSSet and MapData classes.
2874
2875         * ForwardingHeaders/runtime/JSMap.h: Added.
2876         * ForwardingHeaders/runtime/JSSet.h: Added.
2877         * ForwardingHeaders/runtime/MapData.h: Added.
2878         * bindings/js/SerializedScriptValue.cpp:
2879         (WebCore::CloneSerializer::isMap):
2880         (WebCore::CloneSerializer::isSet):
2881         (WebCore::CloneSerializer::startSet):
2882         (WebCore::CloneSerializer::startMap):
2883         (WebCore::CloneSerializer::serialize):
2884         (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible):
2885         (WebCore::CloneDeserializer::deserialize):
2886
2887 2013-09-03  Bear Travis  <betravis@adobe.com>
2888
2889         [CSS Shapes] Shape's content gets extra left offset when left-border is positive on the content box
2890         https://bugs.webkit.org/show_bug.cgi?id=117573
2891
2892         Reviewed by David Hyatt.
2893
2894         Nested blocks need to take into account their offset from the shape-inside container.
2895         The new code calculates the offset from the shape-inside container, then applies the
2896         offset to the computed segments. The line must be moved down by the offset's height,
2897         and each segment must be moved left by the offset's width.
2898
2899         Test: fast/shapes/shape-inside/shape-inside-offset-block-children.html
2900
2901         * rendering/RenderBlock.cpp:
2902         (WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Relayout a block child if its
2903         new logical left would cause it to rest at a new position within a shape container.
2904         (WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Calculate the logical
2905         offset form a shape inside ancestor container.
2906         (WebCore::RenderBlock::layoutBlockChild): Call relayoutShapeDescendantIfMoved with the
2907         new position offset.
2908         * rendering/RenderBlock.h:
2909         * rendering/RenderBlockLineLayout.cpp:
2910         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use layout offset, rather
2911         than just vertical offset.
2912         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Ditto.
2913         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
2914         * rendering/shapes/ShapeInsideInfo.h:
2915         (WebCore::ShapeInsideInfo::computeSegmentsForLine): Shift segments logically left when
2916         there is an inline offset.
2917
2918 2013-09-03  Antoine Quint  <graouts@apple.com>
2919
2920         Web Inspector: exceptions triggered from console evaluation do not pause the debugger
2921         https://bugs.webkit.org/show_bug.cgi?id=120460
2922
2923         Reviewed by Timothy Hatcher.
2924
2925         * inspector/InjectedScriptSource.js:
2926         Explicitly set a sourceURL such that the frontend may identify injected script when
2927         processing call frames in order to hide such code from the debugger.
2928
2929 2013-09-03  Andreas Kling  <akling@apple.com>
2930
2931         Support Vector<Ref<T>>.
2932         <https://webkit.org/b/120637>
2933
2934         Reviewed by Antti Koivisto.
2935
2936         Use Vector<Ref<T>> internally in Page.
2937
2938         * page/Page.cpp:
2939         (WebCore::networkStateChanged):
2940         (WebCore::Page::refreshPlugins):
2941
2942             Clean up these functions and use Vector<Ref<Frame>> to store pointers to frames
2943             since we know they are not going to be null.
2944
2945         (WebCore::Page::pluginViews):
2946
2947             Changed this to return a Vector<Ref<PluginView>> by value instead of passing a
2948             writable vector as an argument. Clean up loops with 'auto'.
2949
2950         (WebCore::Page::storageBlockingStateChanged):
2951         (WebCore::Page::privateBrowsingStateChanged):
2952
2953             Tweaked for pluginViews() returning a Vector now.
2954
2955         (WebCore::Page::setVisibilityState):
2956
2957             Store Documents that need a visibilitychange event in a Vector<Ref<Document>>.
2958
2959 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
2960
2961         [CSS Grid Layout] Add parsing for named grid lines
2962         https://bugs.webkit.org/show_bug.cgi?id=119540
2963
2964         Reviewed by Andreas Kling.
2965
2966         From Blink r150381,r150587 by <jchaffraix@chromium.org>
2967
2968         Adds parsing support for named grid lines at <grid-line> level,
2969         i.e., inside grid-{row|column}-{start|end}. This change covers
2970         only the parsing, layout changes coming in a follow up patch.
2971
2972         * css/CSSComputedStyleDeclaration.cpp:
2973         (WebCore::valueForGridPosition):
2974         * css/CSSParser.cpp:
2975         (WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
2976         (WebCore::CSSParser::parseGridPosition):
2977         * css/CSSParser.h:
2978         * css/StyleResolver.cpp:
2979         (WebCore::createGridPosition):
2980         * rendering/RenderGrid.cpp:
2981         (WebCore::RenderGrid::resolveGridPositionFromStyle):
2982         * rendering/style/GridPosition.h:
2983         (WebCore::GridPosition::setExplicitPosition):
2984         (WebCore::GridPosition::setSpanPosition):
2985         (WebCore::GridPosition::integerPosition):
2986         (WebCore::GridPosition::namedGridLine):
2987
2988 2013-09-03  Alexey Proskuryakov  <ap@apple.com>
2989
2990         [Mac] Hyphenation respects regional format settings language instead of primary language
2991         https://bugs.webkit.org/show_bug.cgi?id=120641
2992
2993         Reviewed by Dan Bernstein.
2994
2995         Fixes hyphenation tests on my machine with non-English regional format settings.
2996
2997         * platform/text/cf/HyphenationCF.cpp: (createValueForNullKey):
2998         Use primary UI language for hyphenation, not regional settings language.
2999
3000 2013-09-03  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
3001
3002         [GTK][EFL] include missing localized strings for subtitle auto track
3003         https://bugs.webkit.org/show_bug.cgi?id=120629
3004
3005         those methods are necessary to show the "Auto" track on webkitgtk
3006
3007         Reviewed by Gustavo Noronha Silva.
3008
3009         * platform/efl/LocalizedStringsEfl.cpp:
3010         (WebCore::textTrackAutomaticMenuItemText):
3011         * platform/gtk/LocalizedStringsGtk.cpp:
3012         (WebCore::textTrackAutomaticMenuItemText):
3013
3014 2013-09-03  Daniel Bates  <dabates@apple.com>
3015
3016         Require layout when -webkit-overflow-scrolling changes
3017         https://bugs.webkit.org/show_bug.cgi?id=120535
3018
3019         Reviewed by Darin Adler.
3020
3021         Test: fast/repaint/overflow-scroll-touch-repaint.html
3022
3023         We want to require a layout when the value of -webkit-overflow-scrolling changes
3024         since -webkit-overflow-scrolling creates a stacking context.
3025
3026         * rendering/style/RenderStyle.cpp:
3027         (WebCore::RenderStyle::changeRequiresLayout):
3028
3029 2013-09-02  Ryosuke Niwa  <rniwa@webkit.org>
3030
3031         Support the "json" responseType and JSON response entity in XHR
3032         https://bugs.webkit.org/show_bug.cgi?id=73648
3033
3034         Reviewed by Oliver Hunt.
3035
3036         Based on the patch written by Jarred Nicholls.
3037
3038         Implement 'json' type for XMLHttpRequest.response. We cache the result on JSC side as a cached attribute
3039         unlike other response types like 'document' and 'blob' for which the parsed response object is cached
3040         in XMLHttpRequest itself. In the long run, we should do the same for other types of response types.
3041
3042         Also refactored the various code to share the code.
3043
3044         Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-json-invalid.html
3045                fast/xmlhttprequest/xmlhttprequest-responsetype-json-utf16.html
3046                fast/xmlhttprequest/xmlhttprequest-responsetype-json-valid.html
3047
3048         * ForwardingHeaders/runtime/JSONObject.h: Added.
3049
3050         * bindings/js/JSXMLHttpRequestCustom.cpp:
3051         (WebCore::JSXMLHttpRequest::visitChildren):
3052         (WebCore::JSXMLHttpRequest::response): Use JSONParse to parse the response text and cache the result.
3053         Call didCacheResponseJSON to set the cache status and clear the original response buffer.
3054
3055         * xml/XMLHttpRequest.cpp:
3056         (WebCore::XMLHttpRequest::XMLHttpRequest): Added m_responseCacheIsValid to invalidate the cache of
3057         a json response.
3058         (WebCore::XMLHttpRequest::responseText):
3059         (WebCore::XMLHttpRequest::didCacheResponseJSON): Added; Updates m_responseCacheIsValid and clears the
3060         response buffer to save memory.
3061         (WebCore::XMLHttpRequest::responseXML):
3062         (WebCore::XMLHttpRequest::setResponseType):
3063         (WebCore::XMLHttpRequest::responseType):
3064         (WebCore::XMLHttpRequest::clearResponseBuffers):
3065         (WebCore::XMLHttpRequest::didReceiveData):
3066
3067         * xml/XMLHttpRequest.h:
3068         (WebCore::XMLHttpRequest::doneWithoutErrors): Extracted from responseXML.
3069         (WebCore::XMLHttpRequest::responseTextIgnoringResponseType): Extracted from responseText.
3070         (WebCore::XMLHttpRequest::responseCacheIsValid): Added.
3071         (WebCore::XMLHttpRequest::shouldDecodeResponse): Extracted from didReceiveData.
3072         Also modified to decode when the response type is ResponseTypeJSON.
3073
3074         * xml/XMLHttpRequest.idl: Added CachedAttribute IDL extention on response property. This cache is
3075         used when the response type is 'json'.
3076
3077 2013-09-03  Commit Queue  <commit-queue@webkit.org>
3078
3079         Unreviewed, rolling out r154881.
3080         http://trac.webkit.org/changeset/154881
3081         https://bugs.webkit.org/show_bug.cgi?id=120643
3082
3083         Crashes on macworld.com (Requested by kling on #webkit).
3084
3085         * dom/Element.cpp:
3086         (WebCore::Element::setAttributeInternal):
3087
3088 2013-09-03  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
3089
3090         [GStreamer] Don't set state to NULL until element is destroyed
3091         https://bugs.webkit.org/show_bug.cgi?id=117354
3092
3093         Reviewed by Philippe Normand.
3094
3095         Don't set playbin to NULL until it is going to be destroyed or if we stay
3096         for too long on the READY state. Instead only set the state to READY as this
3097         allows much faster state changes to PAUSED/PLAYING again. playbin internally
3098         caches some state that is destroyed when setting it to NULL.
3099         This state is independent of the URI and it is even possible to change the
3100         URI in READY state.
3101
3102         To avoid having resources (e.g. audio devices) open indefinitely,
3103         when setting the state to READY we create a timeout and if the timeout
3104         is reached we reset the pipeline state to NULL to free resources.
3105
3106         Also now all state changes use the changePipelineState method instead of setting
3107         the playbin state directly with gst_element_set_state, so we have a better control
3108         of when we are requesting state changes.
3109
3110         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3111         (WebCore::mediaPlayerPrivateReadyStateTimeoutCallback):
3112         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3113         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
3114         (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
3115         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
3116         (WebCore::MediaPlayerPrivateGStreamer::setRate):
3117         (WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
3118         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3119
3120 2013-09-03  peavo@outlook.com  <peavo@outlook.com>
3121
3122         [WinCairo] Unneeded code in method GlyphPage::fill().
3123         https://bugs.webkit.org/show_bug.cgi?id=120634
3124
3125         Reviewed by Andreas Kling.
3126
3127         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
3128         (WebCore::GlyphPage::fill): Remove unneeded call to GetTextMetrics() function.
3129
3130 2013-09-03  Mihnea Ovidenie  <mihnea@adobe.com>
3131
3132         [CSSRegions] Pseudo-elements as regions should not be exposed to JS
3133         https://bugs.webkit.org/show_bug.cgi?id=120633
3134
3135         Reviewed by Andreas Kling.
3136
3137         Until we properly implement the Region interface (http://dev.w3.org/csswg/css-regions/#the-region-interface)
3138         for pseudo-elements, we should not return these as regions in JS.
3139
3140         Tests: fast/regions/get-regions-by-content-pseudo.html
3141                fast/regions/webkit-named-flow-get-regions-pseudo.html
3142
3143         * dom/WebKitNamedFlow.cpp:
3144         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex): Skip pseudo-elements as regions here too,
3145         otherwise we may get an index that cannot be used with getRegions().
3146         (WebCore::WebKitNamedFlow::getRegionsByContent):
3147         (WebCore::WebKitNamedFlow::getRegions):
3148
3149 2013-09-03  Zan Dobersek  <zdobersek@igalia.com>
3150
3151         REGRESSION(r154967): http appcache tests crashing on WK1
3152         https://bugs.webkit.org/show_bug.cgi?id=120620
3153
3154         Reviewed by Andreas Kling.
3155
3156         * loader/appcache/ApplicationCacheGroup.cpp:
3157         (WebCore::ApplicationCacheGroup::cacheDestroyed): Reintroduce pre-r154967 behavior that returned early in
3158         this method if the passed-in ApplicationCache object was not found in the ApplicationCacheGroup's HashSet
3159         of all the caches. This is now done by checking that the HashSet<T>::remove(T) returns true (meaning the
3160         object was found in the HashSet and removed from it) in addition to that HashSet being subsequently empty
3161         before the method moves on to destroying its ApplicationCacheGroup instance.
3162
3163 2013-09-03  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
3164
3165         [gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
3166         https://bugs.webkit.org/show_bug.cgi?id=115354
3167
3168         Reviewed by Philippe Normand.
3169
3170         Also disable Accept-Encoding on ResourceRequest::toSoupMessage accordingly.
3171
3172         * platform/network/soup/ResourceRequestSoup.cpp:
3173         (WebCore::ResourceRequest::toSoupMessage):
3174         Call ResourceRequest::updateSoupMessage from ResourceRequest::toSoupMessage so that the
3175         Accept-Encoding header is also respected.
3176
3177 2013-09-03  Krzysztof Czech  <k.czech@samsung.com>
3178
3179         [AX][ATK] Added support for sort and help attributes.
3180         https://bugs.webkit.org/show_bug.cgi?id=120456
3181
3182         Reviewed by Chris Fleizach.
3183
3184         Added support for aria-sort and aria-help attributes.
3185
3186         Test: accessibility/aria-sort.html
3187
3188         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3189         (webkitAccessibleGetAttributes):
3190
3191 2013-09-03  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3192
3193         [Qt] Remove dead code for QtXmlPatterns
3194         https://bugs.webkit.org/show_bug.cgi?id=120624
3195
3196         Reviewed by Simon Hausmann.
3197
3198         Remove code supporting XSLT using QtXmlPatterns which has been
3199         dead for some time.
3200
3201         * Target.pri:
3202         * WebCore.pri:
3203         * dom/TransformSourceQt.cpp: Removed.
3204         * xml/XSLStyleSheetQt.cpp: Removed.
3205         * xml/XSLTProcessorQt.cpp: Removed.
3206         * xml/parser/XMLDocumentParserQt.cpp:
3207         (WebCore::XMLDocumentParser::doEnd):
3208         (WebCore::XMLDocumentParser::parseProcessingInstruction):
3209
3210 2013-09-03  Mihnea Ovidenie  <mihnea@adobe.com>
3211
3212         [CSS Regions] position: fixed is computed relative to the first region, not the viewport
3213         https://bugs.webkit.org/show_bug.cgi?id=111176
3214
3215         Reviewed by David Hyatt.
3216
3217         Fixed positioned elements inside a named flow should be positioned and sized relative to the viewport,
3218         not on the first region, as described in the spec: http://dev.w3.org/csswg/css-regions/#the-flow-into-property.
3219         While the flow thread will still act as containing block for the fixed positioned elements, the painting and hit
3220         testing for the fixed positioned elements is done by RenderView. The layers for the fixed positioned elements
3221         are collected by the flow thread.
3222  
3223         Tests: fast/regions/element-in-named-flow-absolute-from-fixed.html
3224                fast/regions/element-in-named-flow-fixed-from-absolute.html
3225                fast/regions/element-inflow-fixed-from-outflow-static.html
3226                fast/regions/element-outflow-static-from-inflow-fixed.html
3227                fast/regions/fixed-element-transformed-parent.html
3228                fast/regions/fixed-in-named-flow-scroll.html
3229                fast/regions/fixed-inside-fixed-in-named-flow.html
3230                fast/regions/fixed-inside-named-flow-zIndex.html
3231                fast/regions/fixed-pos-elem-in-namedflow-noregions.html
3232                fast/regions/fixed-pos-region-in-nested-flow.html
3233
3234         * rendering/FlowThreadController.cpp:
3235         (WebCore::FlowThreadController::collectFixedPositionedLayers):
3236         Return the list of layers for the fixed positioned elements with named flows as containing blocks.
3237         Used in RenderLayer:: paintFixedLayersInNamedFlows and RenderLayer:: hitTestFixedLayersInNamedFlows.
3238         * rendering/FlowThreadController.h:
3239         * rendering/RenderBox.cpp:
3240         (WebCore::RenderBox::mapLocalToContainer):
3241         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3242         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
3243         For fixed positioned elements, width and height are given by the view instead of the first region.
3244         * rendering/RenderLayer.cpp:
3245         (WebCore::accumulateOffsetTowardsAncestor):
3246         Modified for the fixed positioned elements inside named flows with the named flows as containing block
3247         to take into account the view scroll.
3248         (WebCore::compareZIndex):
3249         Moved upwards because it is used in RenderLayer::paintFixedLayersInNamedFlows.
3250         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
3251         Paint the list of fixed layers directly from the RenderView instead of painting them through regions -> named flows.
3252         (WebCore::RenderLayer::paintLayerContents):
3253         (WebCore::RenderLayer::paintList):
3254         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
3255         Hit test the layers for the fix positioned elements inside named flows from the RenderView layer
3256         instead of the region -> named flow layer.
3257         (WebCore::RenderLayer::hitTestLayer):
3258         (WebCore::RenderLayer::calculateRects):
3259         * rendering/RenderLayer.h:
3260         * rendering/RenderLayerCompositor.cpp:
3261         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
3262         We do not support yet the accelerated compositing for elements in named flows,
3263         so bail out early here. We need to revisit fixed elements once we finish accelerated compositing for elements in named flows.
3264         * rendering/RenderObject.cpp:
3265         (WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock):
3266         (WebCore::hasFixedPosInNamedFlowContainingBlock):
3267         (WebCore::RenderObject::containerForRepaint):
3268         Changed to take into account that RenderView should be the repaintContainer for the
3269         fixed positioned elements with named flow as the containing block.
3270         * rendering/RenderObject.h:
3271
3272 2013-09-03  Arvid Nilsson  <anilsson@rim.com>
3273
3274         [BlackBerry] Remove LayerData::LayerProgram
3275         https://bugs.webkit.org/show_bug.cgi?id=120601
3276
3277         Reviewed by Anders Carlsson.
3278
3279         JIRA 490672
3280         All layer contents are RGBA now, so there's no need to support BGRA any
3281         more and the LayerData::LayerProgram enum can be removed. Related dead
3282         code was removed.
3283
3284         No new tests, no change in behavior.
3285
3286         * platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
3287         (WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread):
3288         * platform/graphics/blackberry/LayerData.h:
3289         (WebCore::LayerData::LayerData):
3290         * platform/graphics/blackberry/LayerRenderer.cpp:
3291         (WebCore::LayerRenderer::compositeLayersRecursive):
3292         (WebCore::LayerRenderer::createProgram):
3293         * platform/graphics/blackberry/LayerRenderer.h:
3294         * platform/graphics/blackberry/LayerWebKitThread.h:
3295         * platform/graphics/blackberry/PluginLayerWebKitThread.cpp:
3296         (WebCore::PluginLayerWebKitThread::setPluginView):
3297
3298 2013-09-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3299
3300         [GStreamer] Video player sets system volume to 100%
3301         https://bugs.webkit.org/show_bug.cgi?id=118974
3302
3303         Reviewed by Philippe Normand.
3304
3305         In order to preserve the system volume we need to keep track of
3306         the volume being initialized in the HTMLMediaElement and then just
3307         setting the volume to the sink when initializing the pipeline if
3308         that volume was changed before.
3309
3310         * html/HTMLMediaElement.cpp:
3311         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
3312         attribute to false.
3313         (WebCore::HTMLMediaElement::setVolume): Set the attribute to true
3314         when volume is changed.
3315         (WebCore::HTMLMediaElement::updateVolume): Set the volume only if
3316         volume was initialized.
3317         (WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
3318         Platform volume configuration is required only if volume was not
3319         initialized before.
3320         * html/HTMLMediaElement.h: Added attribute and interface method.
3321         * platform/graphics/MediaPlayer.h:
3322         (WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
3323         Declared and added default implementation for the interface method.
3324         (WebCore::MediaPlayer::platformVolumeConfigurationRequired):
3325         Asked the client, meaning the HTMLMediaElement if the platform
3326         volume configuration is required.
3327         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3328         (WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
3329         (WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
3330         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
3331         Set the volume only if not platform volume is required and added log.
3332
3333 2013-09-02  Darin Adler  <darin@apple.com>
3334
3335         * inspector/InspectorProfilerAgent.cpp:
3336         (WebCore::InspectorProfilerAgent::removeProfile): Fix braces here; a review
3337         comment I forgot to address in my last check-in.
3338
3339 2013-09-02  Darin Adler  <darin@apple.com>
3340
3341         Cut down on double hashing and code needlessly using hash table iterators
3342         https://bugs.webkit.org/show_bug.cgi?id=120611
3343
3344         Reviewed by Andreas Kling.
3345
3346         Some of these changes are primarily code cleanup, but others could provide
3347         a small code size and speed improvement by avoiding extra hashing.
3348
3349         * Modules/geolocation/Geolocation.cpp:
3350         (WebCore::Geolocation::Watchers::find): Use get instead of find.
3351         (WebCore::Geolocation::Watchers::remove): Use take instead of find.
3352         (WebCore::Geolocation::makeCachedPositionCallbacks): Use the return
3353         value from remove to avoid hashing twice.
3354
3355         * Modules/webaudio/AudioContext.cpp:
3356         (WebCore::AudioContext::addAutomaticPullNode): Use the return value from
3357         add to avoid hashing twice.
3358         (WebCore::AudioContext::removeAutomaticPullNode): Use the return value
3359         from remove to avoid hashing twice.
3360
3361         * Modules/webaudio/AudioNodeInput.cpp:
3362         (WebCore::AudioNodeInput::connect): Use the return value from add to avoid
3363         hashing twice.
3364         (WebCore::AudioNodeInput::disconnect): Use the return value from remove
3365         to avoid hashing twice.
3366
3367         * Modules/webaudio/AudioParam.cpp:
3368         (WebCore::AudioParam::connect): Use the return value from add to avoid
3369         hashing twice.
3370         (WebCore::AudioParam::disconnect): Use the return value from remove to
3371         avoid hashing twice.
3372
3373         * bridge/NP_jsobject.cpp:
3374         (ObjectMap::remove): Use remove instead of find/remove.
3375
3376         * dom/Node.cpp:
3377         (WebCore::Node::~Node): Use the return value from remove instead of
3378         find/remove.
3379
3380         * inspector/InspectorProfilerAgent.cpp:
3381         (WebCore::InspectorProfilerAgent::removeProfile): Remove needless
3382         calls to contains.
3383
3384         * loader/DocumentLoader.cpp:
3385         (WebCore::DocumentLoader::removeSubresourceLoader): Use the return
3386         value from remove instead of find/remove.
3387
3388         * loader/ResourceLoadScheduler.cpp:
3389         (WebCore::ResourceLoadScheduler::HostInformation::remove): Use the
3390         return value from remove to avoid hashing twice.
3391
3392         * loader/appcache/ApplicationCacheGroup.cpp:
3393         (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Use
3394         remove instead of find/remove.
3395         (WebCore::ApplicationCacheGroup::cacheDestroyed): Removed a needless
3396         call to contains to avoid hashing twice. It's fine to do the check
3397         for an empty hash table unconditionally.
3398
3399         * page/DOMWindow.cpp:
3400         (WebCore::addUnloadEventListener): Eliminated a local variable for clarity.
3401         (WebCore::removeUnloadEventListener): Ditto. Also use remove instead
3402         of find/remove.
3403         (WebCore::removeAllUnloadEventListeners): Ditto. Also use removeAll instead
3404         of find/removeAll.
3405         (WebCore::addBeforeUnloadEventListener): Ditto.
3406         (WebCore::removeBeforeUnloadEventListener): Ditto.
3407         (WebCore::removeAllBeforeUnloadEventListeners): Ditto.
3408
3409         * page/FrameView.cpp:
3410         (WebCore::FrameView::removeViewportConstrainedObject): Use the return
3411         value from remove to avoid hashing twice.
3412         (WebCore::FrameView::removeScrollableArea): Use the return value from
3413         remove instead of find/remove.
3414         (WebCore::FrameView::containsScrollableArea): Use && instead of an if
3415         statement in a way that is idiomatic for this kind of function.
3416
3417         * page/Page.cpp:
3418         (WebCore::Page::addRelevantRepaintedObject): Use the return value from
3419         remove instead of find/remove.
3420
3421         * page/PageGroup.cpp:
3422         (WebCore::PageGroup::removeUserScriptsFromWorld): Use remove instead
3423         of find/remove.
3424         (WebCore::PageGroup::removeUserStyleSheetsFromWorld): Use the return
3425         value from remove instead of find/remove.
3426
3427         * page/PerformanceUserTiming.cpp:
3428         (WebCore::clearPeformanceEntries): Removed a needless call to contains.
3429
3430         * platform/graphics/DisplayRefreshMonitor.cpp:
3431         (WebCore::DisplayRefreshMonitor::removeClient): Use the return value
3432         from remove instead of find/remove.
3433         (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Use remove
3434         instead of find/remove.
3435
3436         * platform/graphics/blackberry/LayerRenderer.cpp:
3437         (WebCore::LayerRenderer::removeLayer): Use the return value from remove
3438         instead of find/remove.
3439
3440         * platform/win/WindowMessageBroadcaster.cpp:
3441         (WebCore::WindowMessageBroadcaster::removeListener): Use remove instead
3442         of find/remove. It's fine to do the check for an empty hash table unconditionally.
3443
3444         * plugins/PluginDatabase.cpp:
3445         (WebCore::PluginDatabase::removeDisabledPluginFile): Use the return value
3446         from remove instead of find/remove.
3447
3448         * rendering/style/StyleCustomFilterProgramCache.cpp:
3449         (WebCore::StyleCustomFilterProgramCache::lookup): Use get instead of find.
3450         (WebCore::StyleCustomFilterProgramCache::add): Use contains instead of find
3451         in an assertion.
3452         (WebCore::StyleCustomFilterProgramCache::remove): Use remove instead of
3453         find/remove.
3454
3455         * svg/SVGCursorElement.cpp: