af797799d322b6b60921475f5424f7ca2d8ef3aa
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-10-25  Andreas Kling  <akling@apple.com>
2
3         SVG: postApplyResource() should take a RenderElement&.
4         <https://webkit.org/b/123334>
5
6         This function is always called with an object, and that object
7         is guaranteed to never be a text renderer.
8
9         Reviewed by Antti Koivisto.
10
11 2013-10-25  Antti Koivisto  <antti@apple.com>
12
13         REGRESSION(r157950): It made many tests assert on Windows, EFL, GTK
14         https://bugs.webkit.org/show_bug.cgi?id=123309
15
16         Reviewed by Andreas Kling.
17
18         Disable simple line layout on non-Mac plaforms for now.
19
20         * rendering/SimpleLineLayout.cpp:
21         (WebCore::SimpleLineLayout::canUseFor):
22
23 2013-10-24  Andreas Kling  <akling@apple.com>
24
25         SVG: applyResource() should take a RenderElement&.
26         <https://webkit.org/b/123286>
27
28         This function is always called with an object, and that object
29         is guaranteed to never be a text renderer.
30
31         Reviewed by Antti Koivisto.
32
33 2013-10-25  Andreas Kling  <akling@apple.com>
34
35         RenderElement::styleWillChange() should pass newStyle as reference.
36         <https://webkit.org/b/123332>
37
38         When styleWillChange() is called, there is always a new style getting
39         set so there's no need to handle the null style case.
40         This flushed out a couple of unnecessary checks.
41
42         Reviewed by Antti Koivisto.
43
44 2013-10-25  peavo@outlook.com  <peavo@outlook.com>
45
46         [WinCairo] Compile fixes.
47         https://bugs.webkit.org/show_bug.cgi?id=123269
48
49         Reviewed by Csaba Osztrogonác.
50
51         * platform/graphics/win/ImageCairoWin.cpp: Added new parameter to BitmapImage::draw() calls.
52         (WebCore::BitmapImage::getHBITMAPOfSize):
53         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
54
55 2013-10-25  Sergio Villar Senin  <svillar@igalia.com>
56
57         Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox
58         https://bugs.webkit.org/show_bug.cgi?id=118620
59
60         Reviewed by Antti Koivisto.
61
62         Turns out that order is extremelly uncommon so using a Vector is
63         much less expensive. This also special-cases the much common case
64         of only having order of value 0 by using Vectors with just one
65         preallocated member.
66
67         Also added the performance test that shows a ~1% win when using a
68         vector instead of the HashSet.
69
70         * rendering/RenderFlexibleBox.cpp:
71         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
72         (WebCore::RenderFlexibleBox::layoutBlock):
73         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
74         * rendering/RenderFlexibleBox.h:
75
76 2013-10-25  Sergio Villar Senin  <svillar@igalia.com>
77
78         Non-SVG build broken after r157950
79         https://bugs.webkit.org/show_bug.cgi?id=123328
80
81         Reviewed by Xan Lopez.
82
83         The isSVGInlineTest() check should be done only if SVG is enabled.
84
85         * rendering/SimpleLineLayout.cpp:
86         (WebCore::SimpleLineLayout::canUseFor):
87
88 2013-10-24  Jer Noble  <jer.noble@apple.com>
89
90         [Mac] Add helper methods to convert CMTime <--> MediaTime
91         https://bugs.webkit.org/show_bug.cgi?id=123285
92
93         Reviewed by Eric Carlson.
94
95         Add utility methods to convert between CMTime (a rational time class) and MediaTime.
96         Once there, PlatformClockCM can now vend and accept MediaTimes for currentTime.
97
98         * platform/mac/MediaTimeMac.h:
99         * platform/mac/MediaTimeMac.cpp:
100         (WebCore::toMediaTime): Added conversion utility method.
101         (WebCore::toCMTime): Ditto.
102
103         * platform/mac/PlatformClockCM.h:
104         * platform/mac/PlatformClockCM.mm:
105         (PlatformClockCM::setCurrentMediaTime): Added.
106         (PlatformClockCM::currentMediaTime): Added.
107
108         * WebCore.xcodeproj/project.pbxproj: Add new files to project.
109
110 2013-10-24  Mark Rowe  <mrowe@apple.com>
111
112         Remove references to OS X 10.7 from Xcode configuration settings.
113
114         Now that we're not building for OS X 10.7 they're no longer needed.
115
116         Reviewed by Anders Carlsson.
117
118
119         * Configurations/Base.xcconfig:
120         * Configurations/DebugRelease.xcconfig:
121         * Configurations/FeatureDefines.xcconfig:
122         * Configurations/Version.xcconfig:
123
124 2013-10-24  Antti Koivisto  <antti@apple.com>
125
126         Cache line layout path
127         https://bugs.webkit.org/show_bug.cgi?id=123298
128
129         Reviewed by Sam Weinig.
130         
131         Determining the path can be non-trivial. Avoid computing it repeatedly on relayouts.
132
133         * rendering/RenderBlock.cpp:
134         (WebCore::RenderBlock::RenderBlock):
135         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
136         (WebCore::RenderBlock::invalidateLineLayoutPath):
137         (WebCore::RenderBlock::removeChild):
138         
139             Invalidate the path when children change.
140
141         * rendering/RenderBlock.h:
142         * rendering/RenderBlockFlow.cpp:
143         (WebCore::RenderBlockFlow::layoutInlineChildren):
144         (WebCore::RenderBlockFlow::styleDidChange):
145         
146             Invalidate the path when style changes.
147
148         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
149         (WebCore::RenderBlockFlow::ensureLineBoxes):
150         * rendering/RenderText.cpp:
151         (WebCore::RenderText::setText):
152         
153             Invalidate the path when text changes.
154
155 2013-10-24  Mark Rowe  <mrowe@apple.com>
156
157         <rdar://problem/15312643> Prepare for the mysterious future.
158
159         Reviewed by David Kilzer.
160
161
162         * Configurations/Base.xcconfig:
163         * Configurations/DebugRelease.xcconfig:
164         * Configurations/FeatureDefines.xcconfig:
165         * Configurations/Version.xcconfig:
166
167 2013-10-24  Andreas Kling  <akling@apple.com>
168
169         DocumentLoader::cachedResourceLoader() should return a reference.
170         <https://webkit.org/b/123303>
171
172         ..and while we're at it, make DocumentLoader::m_cachedResourceLoader
173         a Ref, and have CachedResourceLoader::create return a PassRef.
174
175         Reviewed by Sam Weinig.
176
177 2013-10-24  Anders Carlsson  <andersca@apple.com>
178
179         Stop bringing in the std namespace
180         https://bugs.webkit.org/show_bug.cgi?id=123273
181
182         Reviewed by Andreas Kling.
183
184         * Modules/webaudio/AudioBufferSourceNode.cpp:
185         (WebCore::AudioBufferSourceNode::renderFromBuffer):
186         (WebCore::AudioBufferSourceNode::startGrain):
187         (WebCore::AudioBufferSourceNode::totalPitchRate):
188         * Modules/webaudio/AudioNodeInput.cpp:
189         (WebCore::AudioNodeInput::numberOfChannels):
190         * Modules/webaudio/AudioParamTimeline.cpp:
191         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
192         * Modules/webaudio/AudioScheduledSourceNode.cpp:
193         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
194         (WebCore::AudioScheduledSourceNode::stop):
195         * Modules/webaudio/AudioSummingJunction.cpp:
196         * Modules/webaudio/DelayDSPKernel.cpp:
197         (WebCore::DelayDSPKernel::process):
198         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
199         (WebCore::OfflineAudioDestinationNode::offlineRender):
200         * Modules/webaudio/OscillatorNode.cpp:
201         * Modules/webaudio/PannerNode.cpp:
202         (WebCore::PannerNode::dopplerRate):
203         * Modules/webaudio/WaveShaperDSPKernel.cpp:
204         (WebCore::WaveShaperDSPKernel::processCurve):
205         * Modules/webdatabase/DatabaseTracker.cpp:
206         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
207         * Modules/websockets/WebSocket.cpp:
208         (WebCore::saturateAdd):
209         * Modules/websockets/WebSocketChannel.cpp:
210         * Modules/websockets/WebSocketFrame.cpp:
211         (WebCore::WebSocketFrame::parseFrame):
212         * accessibility/AccessibilityARIAGrid.cpp:
213         * accessibility/AccessibilityARIAGridCell.cpp:
214         * accessibility/AccessibilityARIAGridRow.cpp:
215         * accessibility/AccessibilityList.cpp:
216         * accessibility/AccessibilityListBox.cpp:
217         * accessibility/AccessibilityListBoxOption.cpp:
218         * accessibility/AccessibilityNodeObject.cpp:
219         * accessibility/AccessibilityObject.cpp:
220         * accessibility/AccessibilityRenderObject.cpp:
221         * accessibility/AccessibilityTable.cpp:
222         (WebCore::AccessibilityTable::addChildren):
223         * accessibility/AccessibilityTableCell.cpp:
224         * accessibility/AccessibilityTableColumn.cpp:
225         * accessibility/AccessibilityTableHeaderContainer.cpp:
226         * accessibility/AccessibilityTableRow.cpp:
227         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
228         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
229         (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
230         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
231         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
232         * bindings/js/JSGeolocationCustom.cpp:
233         (WebCore::setTimeout):
234         (WebCore::setMaximumAge):
235         * bindings/js/ScriptController.cpp:
236         * bindings/js/SerializedScriptValue.cpp:
237         (WebCore::writeLittleEndian):
238         (WebCore::CloneSerializer::write):
239         (WebCore::CloneDeserializer::deserialize):
240         (WebCore::CloneDeserializer::readString):
241         * css/CSSComputedStyleDeclaration.cpp:
242         (WebCore::ComputedStyleExtractor::propertyValue):
243         * css/CSSFontSelector.cpp:
244         (WebCore::CSSFontSelector::getFontFace):
245         * css/CSSGradientValue.cpp:
246         (WebCore::CSSRadialGradientValue::createGradient):
247         * css/CSSParser.cpp:
248         (WebCore::CSSParser::parseValue):
249         (WebCore::CSSParser::parseColorParameters):
250         (WebCore::CSSParser::parseHSLParameters):
251         * css/CSSReflectValue.cpp:
252         * css/DeprecatedStyleBuilder.cpp:
253         (WebCore::ApplyPropertyFontSize::applyValue):
254         * css/PropertySetCSSStyleDeclaration.cpp:
255         * css/SVGCSSParser.cpp:
256         * css/StylePropertySet.cpp:
257         (WebCore::StylePropertySet::getLayeredShorthandValue):
258         * css/StyleResolver.cpp:
259         (WebCore::StyleResolver::viewportPercentageValue):
260         * dom/CharacterData.cpp:
261         (WebCore::CharacterData::parserAppendData):
262         * dom/ContainerNode.cpp:
263         * dom/Document.cpp:
264         (WebCore::Document::minimumLayoutDelay):
265         * dom/Node.cpp:
266         (WebCore::Node::compareDocumentPosition):
267         * dom/Range.cpp:
268         (WebCore::Range::toString):
269         (WebCore::Range::textRects):
270         (WebCore::Range::textQuads):
271         * dom/ScriptedAnimationController.cpp:
272         (WebCore::ScriptedAnimationController::scheduleAnimation):
273         * dom/StyledElement.cpp:
274         (WebCore::StyledElement::makePresentationAttributeCacheKey):
275         * dom/Text.cpp:
276         * dom/ViewportArguments.cpp:
277         (WebCore::clampLengthValue):
278         (WebCore::clampScaleValue):
279         (WebCore::ViewportArguments::resolve):
280         (WebCore::computeMinimumScaleFactorForContentContained):
281         (WebCore::restrictMinimumScaleFactorToViewportSize):
282         * editing/AlternativeTextController.cpp:
283         * editing/ApplyStyleCommand.cpp:
284         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
285         * editing/CompositeEditCommand.cpp:
286         (WebCore::CompositeEditCommand::deleteInsignificantText):
287         * editing/Editor.cpp:
288         (WebCore::Editor::setComposition):
289         (WebCore::Editor::compositionRange):
290         * editing/EditorCommand.cpp:
291         (WebCore::verticalScrollDistance):
292         * editing/TextIterator.cpp:
293         (WebCore::TextIterator::handleTextNode):
294         (WebCore::TextIterator::handleTextBox):
295         (WebCore::CharacterIterator::string):
296         (WebCore::SearchBuffer::SearchBuffer):
297         (WebCore::SearchBuffer::append):
298         (WebCore::SearchBuffer::prependContext):
299         (WebCore::SearchBuffer::search):
300         * editing/VisibleUnits.cpp:
301         (WebCore::startOfParagraph):
302         * editing/htmlediting.cpp:
303         * editing/markup.cpp:
304         * fileapi/FileReaderLoader.cpp:
305         (WebCore::FileReaderLoader::didReceiveResponse):
306         (WebCore::FileReaderLoader::didReceiveData):
307         * history/BackForwardList.cpp:
308         (WebCore::BackForwardList::backListWithLimit):
309         (WebCore::BackForwardList::forwardListWithLimit):
310         * history/PageCache.cpp:
311         (WebCore::PageCache::setCapacity):
312         * html/BaseDateAndTimeInputType.cpp:
313         * html/FTPDirectoryDocument.cpp:
314         * html/HTMLAreaElement.cpp:
315         (WebCore::HTMLAreaElement::getRegion):
316         * html/HTMLElement.cpp:
317         (WebCore::HTMLElement::parseAttribute):
318         (WebCore::parseColorStringWithCrazyLegacyRules):
319         * html/HTMLFormControlElement.cpp:
320         * html/HTMLFormElement.cpp:
321         (WebCore::HTMLFormElement::getTextFieldValues):
322         * html/HTMLImageElement.cpp:
323         * html/HTMLInputElement.cpp:
324         * html/HTMLMapElement.cpp:
325         * html/HTMLMediaElement.cpp:
326         (WebCore::HTMLMediaElement::HTMLMediaElement):
327         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
328         (WebCore::HTMLMediaElement::textTrackAddCue):
329         (WebCore::HTMLMediaElement::textTrackRemoveCue):
330         (WebCore::HTMLMediaElement::rewind):
331         (WebCore::HTMLMediaElement::seek):
332         (WebCore::HTMLMediaElement::duration):
333         * html/HTMLSelectElement.cpp:
334         (WebCore::HTMLSelectElement::parseAttribute):
335         (WebCore::HTMLSelectElement::updateListBoxSelection):
336         * html/HTMLSourceElement.cpp:
337         * html/HTMLTableCellElement.cpp:
338         (WebCore::HTMLTableCellElement::colSpan):
339         (WebCore::HTMLTableCellElement::rowSpan):
340         * html/HTMLTableElement.cpp:
341         (WebCore::HTMLTableElement::parseAttribute):
342         * html/HTMLTextFormControlElement.cpp:
343         (WebCore::HTMLTextFormControlElement::setSelectionStart):
344         (WebCore::HTMLTextFormControlElement::setSelectionEnd):
345         (WebCore::HTMLTextFormControlElement::select):
346         (WebCore::HTMLTextFormControlElement::setSelectionRange):
347         * html/HTMLTrackElement.cpp:
348         * html/ImageDocument.cpp:
349         (WebCore::ImageDocument::scale):
350         * html/InputType.cpp:
351         (WebCore::InputType::valueAsDouble):
352         * html/MediaController.cpp:
353         (MediaController::duration):
354         (MediaController::currentTime):
355         (MediaController::setCurrentTime):
356         (MediaController::updateReadyState):
357         * html/NumberInputType.cpp:
358         (WebCore::NumberInputType::setValueAsDouble):
359         (WebCore::NumberInputType::setValueAsDecimal):
360         (WebCore::NumberInputType::createStepRange):
361         * html/RangeInputType.cpp:
362         (WebCore::RangeInputType::handleKeydownEvent):
363         * html/SearchInputType.cpp:
364         (WebCore::SearchInputType::startSearchEventTimer):
365         * html/StepRange.cpp:
366         (WebCore::StepRange::clampValue):
367         (WebCore::StepRange::parseStep):
368         * html/TimeRanges.cpp:
369         * html/ValidationMessage.cpp:
370         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
371         (WebCore::adjustBubblePosition):
372         * html/canvas/CanvasRenderingContext2D.cpp:
373         (WebCore::normalizeRect):
374         * html/canvas/WebGLRenderingContext.cpp:
375         (WebCore::WebGLRenderingContext::validateIndexArrayConservative):
376         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
377         * html/shadow/MediaControlElements.cpp:
378         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
379         * html/shadow/MediaControlsApple.cpp:
380         * html/shadow/SliderThumbElement.cpp:
381         (WebCore::SliderThumbElement::setPositionFromPoint):
382         * inspector/ContentSearchUtils.cpp:
383         * inspector/DOMEditor.cpp:
384         * inspector/DOMPatchSupport.cpp:
385         (WebCore::DOMPatchSupport::diff):
386         * inspector/InjectedScriptHost.cpp:
387         * loader/ProgressTracker.cpp:
388         (WebCore::ProgressTracker::incrementProgress):
389         * loader/cache/CachedImage.cpp:
390         * page/DOMWindow.cpp:
391         (WebCore::DOMWindow::adjustWindowRect):
392         * page/EventHandler.cpp:
393         (WebCore::MaximumDurationTracker::~MaximumDurationTracker):
394         * page/FrameTree.cpp:
395         * page/FrameView.cpp:
396         (WebCore::FrameView::adjustedDeferredRepaintDelay):
397         (WebCore::FrameView::autoSizeIfEnabled):
398         * page/PrintContext.cpp:
399         (WebCore::PrintContext::computeAutomaticScaleFactor):
400         * page/SpatialNavigation.cpp:
401         (WebCore::entryAndExitPointsForDirection):
402         * page/animation/CSSPropertyAnimation.cpp:
403         (WebCore::blendFilterOperations):
404         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
405         * platform/graphics/FloatRect.cpp:
406         (WebCore::FloatRect::FloatRect):
407         (WebCore::FloatRect::intersect):
408         (WebCore::FloatRect::uniteEvenIfEmpty):
409         (WebCore::FloatRect::extend):
410         (WebCore::FloatRect::fitToPoints):
411         * platform/graphics/GlyphPageTreeNode.cpp:
412         (WebCore::GlyphPageTreeNode::initializePage):
413         (WebCore::GlyphPageTreeNode::getChild):
414         * platform/graphics/IntRect.cpp:
415         (WebCore::IntRect::intersect):
416         (WebCore::IntRect::unite):
417         (WebCore::IntRect::uniteIfNonZero):
418         * platform/graphics/LayoutRect.cpp:
419         (WebCore::LayoutRect::intersect):
420         (WebCore::LayoutRect::unite):
421         (WebCore::LayoutRect::uniteIfNonZero):
422         * platform/graphics/filters/FEMorphology.cpp:
423         (WebCore::FEMorphology::platformApplyGeneric):
424         (WebCore::FEMorphology::platformApplySoftware):
425         * platform/mac/MemoryPressureHandlerMac.mm:
426         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
427         * platform/text/TextCodecICU.cpp:
428         * rendering/LineWidth.cpp:
429         (WebCore::LineWidth::fitBelowFloats):
430         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
431         * rendering/RenderBlock.h:
432         (WebCore::RenderBlock::availableLogicalWidthForLine):
433         (WebCore::RenderBlock::availableLogicalWidthForContent):
434         * rendering/RenderFieldset.cpp:
435         (WebCore::RenderFieldset::computePreferredLogicalWidths):
436         (WebCore::RenderFieldset::layoutSpecialExcludedChild):
437         (WebCore::RenderFieldset::paintBoxDecorations):
438         * rendering/RenderFlowThread.cpp:
439         (WebCore::RenderFlowThread::updateLogicalWidth):
440         (WebCore::RenderFlowThread::addForcedRegionBreak):
441         * rendering/RenderFrameBase.cpp:
442         (WebCore::RenderFrameBase::layoutWithFlattening):
443         * rendering/RenderFrameSet.cpp:
444         (WebCore::RenderFrameSet::layOutAxis):
445         * rendering/RenderSlider.cpp:
446         (WebCore::RenderSlider::computePreferredLogicalWidths):
447         * rendering/RenderTableCell.h:
448         * rendering/RenderTreeAsText.cpp:
449         (WebCore::writeLayers):
450         * rendering/RootInlineBox.h:
451         (WebCore::RootInlineBox::selectionHeight):
452         (WebCore::RootInlineBox::selectionHeightAdjustedForPrecedingBlock):
453         * rendering/mathml/RenderMathMLRow.cpp:
454         (WebCore::RenderMathMLRow::layout):
455         * rendering/mathml/RenderMathMLScripts.cpp:
456         (WebCore::RenderMathMLScripts::layout):
457         * rendering/style/RenderStyle.h:
458         * rendering/style/StyleGeneratedImage.cpp:
459         (WebCore::StyleGeneratedImage::imageSize):
460         * style/StyleFontSizeFunctions.cpp:
461         (WebCore::Style::fontSizeForKeyword):
462         * svg/SVGSVGElement.cpp:
463         (WebCore::SVGSVGElement::setCurrentTime):
464
465 2013-10-24  Andreas Kling  <akling@apple.com>
466
467         Uncomplicate some of SVGTextRunRenderingContext.
468         <https://webkit.org/b/123294>
469
470         This class was weird about a few things, so I've taken these steps
471         to clear things up:
472
473         - FINAL and OVERRIDE all the things.
474         - Constructor now takes a RenderObject&.
475         - renderer() now returns a RenderObject&.
476         - drawSVGGlyphs() no longer takes a TextRun.
477         - glyphDataForCharacter() no longer takes a TextRun.
478
479         To expand on the last two, there was also some awkward hoop-jumping
480         where we'd go through the TextRun passed by argument to find its
481         rendering context, which was really just |this| all along.
482
483         Reviewed by Antti Koivisto.
484
485 2013-10-24  Roger Fong  <roger_fong@apple.com>
486
487         Add texture level dependent size checks to textureImage2D calls.
488         https://bugs.webkit.org/show_bug.cgi?id=123290
489         <rdar://problem/15201382>
490
491         Reviewed by Dean Jackson
492
493         Test covered by WebGL Conformance suite 1.0.2 test, textures/texture-size-limit.html.
494
495         There are different size limits when calling textureImage2D on different texture levels.
496         We should be throwing an error if our texture size exceeds these limits.
497
498         * html/canvas/WebGLRenderingContext.cpp:
499         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
500
501 2013-10-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
502
503         [MediaStream API] allow a stream source to be shared
504         https://bugs.webkit.org/show_bug.cgi?id=121954
505
506         Reviewed by Eric Carlson.
507
508         Now, the MediaStreamSource don't know about the MediaStream that owns it,
509         since there can be more than one MediaStream that has it as source for some track.
510         MediaStreamTrack classes now have observers registered, in case there are more than
511         one MediaStream owning that track
512
513         No new tests, no change in functionality.
514
515         * Modules/mediastream/MediaStream.cpp:
516         (WebCore::MediaStream::MediaStream): Adding the MediaStream as an observer for each track it owns.
517
518         (WebCore::MediaStream::addTrack): Now adding the MediaStream as an observer the new added track
519         and adding the source to the MediaStreamDescriptor.
520
521         (WebCore::MediaStream::removeTrack): Instead of removing the source right away, we first check if
522         there isn't any other track using that source, if not we remove the source.
523
524         (WebCore::MediaStream::haveTrackWithSource):
525         (WebCore::MediaStream::addRemoteSource): MediaStreamSource has no information about the MediaStream
526         that uses it, so now we don't set the stream in the source anymore.
527
528         (WebCore::MediaStream::removeRemoteSource): There can be more than on track using the source. So we
529         get each track that is using the source and then remove it and fire the ended event.
530
531         * Modules/mediastream/MediaStream.h:
532         * Modules/mediastream/MediaStreamTrack.cpp:
533         (WebCore::MediaStreamTrack::addObserver):
534         (WebCore::MediaStreamTrack::removeObserver):
535         (WebCore::MediaStreamTrack::trackDidEnd): Does not get the client from the MediaStreamDescriptor, it now
536         notify each of its observers that the track ended.
537
538         * Modules/mediastream/MediaStreamTrack.h: Adding Observer class.
539
540         * platform/mediastream/MediaStreamDescriptor.cpp: Destructor now does nothing. Previously it was setting
541         each MediaStreamSource's descriptor to null.
542
543         (WebCore::MediaStreamDescriptor::removeSource): Not setting the stream in source anymore.
544
545         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto.
546
547         (WebCore::MediaStreamDescriptor::setEnded): Not setting the state of the source to Ended
548
549         * platform/mediastream/MediaStreamDescriptor.h:
550         (WebCore::MediaStreamDescriptor::~MediaStreamDescriptor):
551         * platform/mediastream/MediaStreamSource.cpp: Removing references to MediaStream object
552         (WebCore::MediaStreamSource::MediaStreamSource):
553         (WebCore::MediaStreamSource::reset):
554         * platform/mediastream/MediaStreamSource.h:
555
556 2013-10-24  Daniel Bates  <dabates@apple.com>
557
558         Crash in WebCore::NavigationScheduler::startTimer()
559         https://bugs.webkit.org/show_bug.cgi?id=123288
560         <rdar://problem/14055644>
561
562         Reviewed by Alexey Proskuryakov.
563
564         Currently NavigationScheduler::startTimer() synchronously notifies the client
565         before the Web Inspector of a scheduled redirect. If a client cancels this
566         redirect then NavigationScheduler::m_redirect will become null and we'll
567         subsequently crash when informing the Web Inspector of this formerly scheduled
568         redirect. Instead, NavigationScheduler::startTimer() should notify the Web
569         Inspector before it notifies the client of a scheduled redirect.
570
571         As a side benefit of this change, the Web Inspector is notified of a scheduled
572         redirect before being notified of it being canceled when a client chooses to cancel
573         a scheduled redirect.
574
575         * loader/NavigationScheduler.cpp:
576         (WebCore::NavigationScheduler::startTimer):
577
578 2013-10-24  Antti Koivisto  <antti@apple.com>
579
580         Try to fix build without CSS_SHAPES.
581
582         * rendering/SimpleLineLayout.cpp:
583         (WebCore::SimpleLineLayout::canUseFor):
584
585 2013-10-24  Antti Koivisto  <antti@apple.com>
586
587         Simple line layout
588         https://bugs.webkit.org/show_bug.cgi?id=122458
589
590         Reviewed by Darin Adler.
591
592         Line box based inline layout is powerful but also rather slow and memory intensive. Simple line layout
593         is a compact alternative data structure and fast code path to cover common cases without requiring line
594         boxes.
595         
596         This patch handles a case single left-aligned text renderer inside flow with no floats. Even this very basic
597         case is sufficiently common to handle up to 25% of all text lines on some popular new sites. The decision
598         which path to use is made per block flow (paragraph).
599         
600         Simple line layout aims to produce pixel-exact rendering result when compared to the line box layout.
601         
602         The goal is to handle everything that requires line level access in cases that allow use of simple lines.
603         This is not quite the case yet. For example selections and outline painting are not supported. In these
604         cases we seamlessly switch to the line boxes.
605
606         The simple line data structure currently uses 12 bytes per line. Lineboxes take ~160 bytes minimum per line.
607         Laying out the lines is also several times faster as is iterating over them.
608
609         * CMakeLists.txt:
610         * GNUmakefile.list.am:
611         * WebCore.vcxproj/WebCore.vcxproj:
612         * WebCore.xcodeproj/project.pbxproj:
613         * dom/Position.cpp:
614         (WebCore::Position::upstream):
615         (WebCore::Position::downstream):
616         (WebCore::Position::getInlineBoxAndOffset):
617         
618             Creating positions within a simple line flow causes switch to line boxes.
619
620         * editing/TextIterator.cpp:
621         (WebCore::TextIterator::handleTextNode):
622         
623             TextIterator traverses line boxes if available. In case simple line case we need to replicate the
624             same results (for compatibility but especially to avoid changing test results). This is done here
625             by just traversing the string without actually using the layout.
626
627         * rendering/RenderBlock.cpp:
628         (WebCore::RenderBlock::RenderBlock):
629         (WebCore::RenderBlock::layoutShapeInsideInfo):
630         * rendering/RenderBlock.h:
631         * rendering/RenderBlockFlow.cpp:
632         (WebCore::RenderBlockFlow::layoutInlineChildren):
633         
634             Select the layout path to use.
635
636         (WebCore::RenderBlockFlow::deleteLines):
637         (WebCore::RenderBlockFlow::hitTestInlineChildren):
638         (WebCore::RenderBlockFlow::adjustForBorderFit):
639         (WebCore::RenderBlockFlow::firstLineBaseline):
640         (WebCore::RenderBlockFlow::inlineBlockBaseline):
641         (WebCore::RenderBlockFlow::inlineSelectionGaps):
642         (WebCore::RenderBlockFlow::clearTruncation):
643         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
644         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
645         (WebCore::RenderBlockFlow::paintInlineChildren):
646         (WebCore::RenderBlockFlow::hasLines):
647         (WebCore::RenderBlockFlow::layoutSimpleLines):
648         
649             Do simple layout.
650
651         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
652         (WebCore::RenderBlockFlow::ensureLineBoxes):
653         
654             This function switches from simple lines to line boxes. The switching can be done outside normal layout.
655             This is used to cover some cases that are not yet supported by simple lines (like selections).
656
657         * rendering/RenderBlockFlow.h:
658         (WebCore::RenderBlockFlow::simpleLines):
659         * rendering/RenderBlockLineLayout.cpp:
660         (WebCore::RenderBlockFlow::layoutLineBoxes):
661         
662             Rename the line box layout function.
663
664         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
665         * rendering/RenderText.cpp:
666         (WebCore::RenderText::deleteLineBoxesBeforeSimpleLineLayout):
667         (WebCore::RenderText::absoluteRects):
668         (WebCore::RenderText::absoluteRectsForRange):
669         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
670         (WebCore::RenderText::absoluteQuads):
671         (WebCore::RenderText::absoluteQuadsForRange):
672         (WebCore::RenderText::positionForPoint):
673         (WebCore::RenderText::knownToHaveNoOverflowAndNoFallbackFonts):
674         (WebCore::RenderText::setSelectionState):
675         (WebCore::RenderText::setTextWithOffset):
676         (WebCore::RenderText::ensureLineBoxes):
677         (WebCore::RenderText::simpleLines):
678         (WebCore::RenderText::linesBoundingBox):
679         (WebCore::RenderText::linesVisualOverflowBoundingBox):
680         (WebCore::RenderText::selectionRectForRepaint):
681         (WebCore::RenderText::caretMinOffset):
682         (WebCore::RenderText::caretMaxOffset):
683         (WebCore::RenderText::countRenderedCharacterOffsetsUntil):
684         (WebCore::RenderText::containsRenderedCharacterOffset):
685         (WebCore::RenderText::containsCaretOffset):
686         (WebCore::RenderText::hasRenderedText):
687         * rendering/RenderText.h:
688         * rendering/RenderTreeAsText.cpp:
689         (WebCore::RenderTreeAsText::writeRenderObject):
690         (WebCore::writeSimpleLine):
691         (WebCore::write):
692         * rendering/SimpleLineLayout.cpp: Added.
693         (WebCore::SimpleLineLayout::canUseFor):
694         
695             This check for the cases supported by the simple line layout path.
696
697         (WebCore::SimpleLineLayout::isWhitespace):
698         (WebCore::SimpleLineLayout::skipWhitespaces):
699         (WebCore::SimpleLineLayout::textWidth):
700         (WebCore::SimpleLineLayout::createLines):
701         
702             The main layout functions that breaks text to lines. It only handles the cases allowed by 
703             SimpleLineLayout::canUseFor. What it handles it aims to break exactly as line box layout does.
704
705         * rendering/SimpleLineLayout.h: Added.
706         * rendering/SimpleLineLayoutFunctions.cpp: Added.
707         (WebCore::SimpleLineLayout::paintFlow):
708         (WebCore::SimpleLineLayout::hitTestFlow):
709         (WebCore::SimpleLineLayout::collectFlowOverflow):
710         (WebCore::SimpleLineLayout::computeTextBoundingBox):
711         * rendering/SimpleLineLayoutFunctions.h: Added.
712         (WebCore::SimpleLineLayout::computeFlowHeight):
713         (WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
714         (WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
715         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
716         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
717         (WebCore::SimpleLineLayout::containsTextCaretOffset):
718         (WebCore::SimpleLineLayout::isTextRendered):
719         (WebCore::SimpleLineLayout::lineHeightFromFlow):
720         
721             Support functions called from RenderBlockFlow and RenderText. They are equivalent to
722             similar line box functions.
723
724         (WebCore::SimpleLineLayout::baselineFromFlow):
725         * rendering/SimpleLineLayoutResolver.h: Added.
726         (WebCore::SimpleLineLayout::Resolver::Line::Line):
727         (WebCore::SimpleLineLayout::Resolver::Line::rect):
728         (WebCore::SimpleLineLayout::Resolver::Line::baseline):
729         (WebCore::SimpleLineLayout::Resolver::Line::text):
730         (WebCore::SimpleLineLayout::Resolver::Iterator::Iterator):
731         (WebCore::SimpleLineLayout::Resolver::Iterator::operator++):
732         (WebCore::SimpleLineLayout::Resolver::Iterator::operator--):
733         (WebCore::SimpleLineLayout::Resolver::Iterator::operator==):
734         (WebCore::SimpleLineLayout::Resolver::Iterator::operator!=):
735         (WebCore::SimpleLineLayout::Resolver::Iterator::operator*):
736         
737             Lazy iterator for deriving line metrics. This keeps the line data structure small as
738             we don't need to keep easily derived values around.
739
740         (WebCore::SimpleLineLayout::Resolver::Resolver):
741         (WebCore::SimpleLineLayout::Resolver::size):
742         (WebCore::SimpleLineLayout::Resolver::begin):
743         (WebCore::SimpleLineLayout::Resolver::end):
744         (WebCore::SimpleLineLayout::Resolver::last):
745         (WebCore::SimpleLineLayout::Resolver::operator[]):
746
747 2013-10-24  Myles C. Maxfield  <mmaxfield@apple.com>
748
749         Gaps between underlines in adjacent underlined text runs
750         https://bugs.webkit.org/show_bug.cgi?id=123236
751
752         Reviewed by Simon Fraser and Darin Adler.
753
754         There are two pieces to this change. The first piece is in
755         InlineTextBox::paint(). We were putting floating-point
756         extents into a LayoutSize, which simply uses ints (for now),
757         and then immediately converting this back to a FloatSize.
758         Instead, we should be using floats throughout all of
759         this code.
760
761         In addition, inside GraphicsContext::drawLineForText(), we are
762         rounding the underline to pixel boundaries so that it appears
763         very crisp on the screen. However, we should round once after
764         performing computations, rather than rounding twice and then
765         performing computations on the rounded numbers.
766
767         Test: fast/css3-text/css3-text-decoration/no-gap-between-two-rounded-textboxes.html
768
769         * platform/graphics/cg/GraphicsContextCG.cpp:
770         (WebCore::GraphicsContext::drawLineForText): Change rounding mode
771             to perform computations before rounding
772         * rendering/InlineTextBox.cpp:
773         (WebCore::InlineTextBox::paint): Don't convert to a LayoutSize
774             just to convert to a FloatSize
775
776 2013-10-24  Andreas Kling  <akling@apple.com>
777
778         SVGRenderingContext should wrap a RenderElement.
779         <https://webkit.org/b/123283>
780
781         The SVG rendering context class is never used with text renderers
782         so we can have it wrap a RenderElement for tighter code.
783
784         Also renamed SVGRenderingContext::m_object to m_renderer.
785
786         Reviewed by Antti Koivisto.
787
788 2013-10-24  Santosh Mahto  <santosh.ma@samsung.com>
789
790         [contenteditable] Content after non-editable element disappears when merging lines using backspace
791         https://bugs.webkit.org/show_bug.cgi?id=122748
792
793         Reviewed by Ryosuke Niwa.
794
795         In case of paragraph merging after deletion if second paragraph
796         contains non-editable element, then content after the non-editable
797         element(including non-editable element) will be removed while the
798         content before the element will be merged with the first paragraph.
799         This happens becasue endOfParagraphToMove calculation in merging function
800         stop at editing boundary so endOfParagraphToMove becomes position just
801         before non-editable content.
802         With this patch now endOfParagraphToMove is calculated by skipping
803         over the non-editable element.
804
805         Test: editing/deleting/merge-paragraph-contatining-noneditable.html
806
807         * editing/DeleteSelectionCommand.cpp:
808         (WebCore::DeleteSelectionCommand::mergeParagraphs): use CanSkipOverEditingBoundary
809         condition while calculating endOfParagraphToMove.
810
811 2013-10-24  Antoine Quint  <graouts@apple.com>
812
813         Web Inspector: Inspector doesn't show webkitTransitionEnd events in the timeline
814         https://bugs.webkit.org/show_bug.cgi?id=123263
815
816         Reviewed by Timothy Hatcher.
817
818         A legacy event type is only set on an event in EventTarget::fireEventListeners(Event*)
819         which is called after we used to call InspectorInstrumentation::willDispatchEvent(), the method
820         that would ultimately yield the creation of a TimelineRecord for the event in the Web Inspector
821         frontend, and as a result we would try to dispatch an event with an unprefixed event type to
822         the frontend, which wouldn't even happen because most likely it wouldn't have listeners for this
823         unprefixed type.
824
825         We now move the call to InspectorInstrumentation::willDispatchEvent() in
826         EventTarget::fireEventListeners(Event*, EventTargetData*, EventListenerVector&) such that the
827         correct event type and list of listeners is used to determine what event to dispatch to the frontend.
828
829         * dom/EventDispatcher.cpp:
830         (WebCore::EventDispatcher::dispatchEvent):
831         Remove calls to InspectorInstrumentation::willDispatchEvent() and InspectorInstrumentation::didDispatchEvent().
832
833         * dom/EventTarget.cpp:
834         (WebCore::EventTarget::fireEventListeners):
835         Add call to InspectorInstrumentation::willDispatchEvent() before we go through each listener and
836         call InspectorInstrumentation::willHandleEvent(). Additionally, we refactor some code since we're
837         getting references to the ScriptExecutionContext and Document upfront now.
838
839 2013-10-24  Andreas Kling  <akling@apple.com>
840
841         SVG: RenderElement-ize intersectRepaintRectWithResources().
842         <https://webkit.org/b/123278>
843
844         SVGRenderSupport::intersectRepaintRectWithResources() is only ever
845         called with non-text renderers so make it take RenderElement&.
846
847         Had to tweak RenderSVGResource::resourceBoundingBox() to take the
848         renderer by reference.
849
850         Reviewed by Antti Koivisto.
851
852 2013-10-24  Joseph Pecoraro  <pecoraro@apple.com>
853
854         Web Inspector: Breakpoints in sourceURL named scripts do not work
855         https://bugs.webkit.org/show_bug.cgi?id=123231
856
857         Reviewed by Timothy Hatcher.
858
859         Remember a Script's sourceURL and sourceMappingURL. When setting a
860         breakpoint by URL, check it against the sourceURL or original URL.
861         If a script had a sourceURL that would have been the only URL sent
862         to the frontend, so that receives priority.
863
864         Test: inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html
865
866         * inspector/InspectorDebuggerAgent.cpp:
867         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
868         (WebCore::InspectorDebuggerAgent::didParseSource):
869         * inspector/InspectorDebuggerAgent.h:
870         * inspector/ScriptDebugListener.h:
871
872 2013-10-23  Alexey Proskuryakov  <ap@apple.com>
873
874         Add CryptoKey base class and bindings
875         https://bugs.webkit.org/show_bug.cgi?id=123216
876
877         Reviewed by Sam Weinig.
878
879         * crypto/CryptoKey.idl: Added.
880
881         * CMakeLists.txt:
882         * DerivedSources.make:
883         * GNUmakefile.list.am:
884         Process the IDL.
885
886         * WebCore.xcodeproj/project.pbxproj: Added files.
887
888         * bindings/js/JSCryptoKeyCustom.cpp: Added.
889         (WebCore::JSCryptoKey::algorithm): Use a visitor to build algorithm dictionary
890         for the key.
891
892         * crypto/CryptoAlgorithmDescriptionBuilder.cpp: Added.
893         * crypto/CryptoAlgorithmDescriptionBuilder.h: Added.
894         An interface for a visitor we'll use to expose CrytoKey.algorithm in bindings,
895         and possibly also for storage serialization. Not complete yet, we'll need support
896         for a few more simple types, and less trivially, for nested algorithms.
897
898         * bindings/js/JSCryptoAlgorithmBuilder.cpp: Added.
899         * bindings/js/JSCryptoAlgorithmBuilder.h: Added.
900         An implementation that builds an algorithm description dictionary for JS bindings.
901
902         * crypto/CryptoKey.cpp: Added.
903         (WebCore::CryptoKey::~CryptoKey):
904         (WebCore::CryptoKey::buildAlgorithmDescription):
905         * crypto/CryptoKey.h: Added.
906         Added an almost empty implementation. Some of the functions that are currently
907         marked as pure virtual will likely be implemented in this base class.
908
909 2013-10-24  Commit Queue  <commit-queue@webkit.org>
910
911         Unreviewed, rolling out r157916.
912         http://trac.webkit.org/changeset/157916
913         https://bugs.webkit.org/show_bug.cgi?id=123274
914
915         Broke Layout/flexbox-lots-of-data.html on perfbot (Requested
916         by ap on #webkit).
917
918         * rendering/RenderFlexibleBox.cpp:
919         (WebCore::RenderFlexibleBox::OrderHashTraits::emptyValue):
920         (WebCore::RenderFlexibleBox::OrderHashTraits::constructDeletedValue):
921         (WebCore::RenderFlexibleBox::OrderHashTraits::isDeletedValue):
922         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
923         (WebCore::RenderFlexibleBox::layoutBlock):
924         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
925         * rendering/RenderFlexibleBox.h:
926
927 2013-10-24  Zan Dobersek  <zdobersek@igalia.com>
928
929         Comment in ScopedEventQueue::dispatchEvent is unnecessarily verbose
930         https://bugs.webkit.org/show_bug.cgi?id=123252
931
932         Reviewed by Darin Adler.
933
934         Shorten the comment about the crash avoidance in ScopedEventQueue::dispatchEvent due to
935         the calling convention in C++ is left unspecified. The problem was already fixed in r157219
936         and later adjusted in r157401, but the comment could have been shorter and simpler in both cases.
937
938         * dom/ScopedEventQueue.cpp:
939         (WebCore::ScopedEventQueue::dispatchEvent):
940
941 2013-10-24  Alex Christensen  <achristensen@webkit.org>
942
943         Removed unused ThreadSafeCoordinatedSurface and CertificateInfoCurl files.
944         https://bugs.webkit.org/show_bug.cgi?id=123246
945
946         Reviewed by Noam Rosenthal.
947
948         * WebCore.vcxproj/WebCore.vcxproj:
949         * WebCore.vcxproj/WebCore.vcxproj.filters:
950         Removed references to ThreadSafeCoordinatedSurface and CertificateInfoCurl.
951         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp: Removed.
952         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h: Removed.
953         * platform/network/curl/CertificateInfoCurl.cpp: Removed.
954
955 2013-10-24  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
956
957         Removed Qt workaround.
958         https://bugs.webkit.org/show_bug.cgi?id=123258
959
960         Reviewed by Csaba Osztrogonác.
961
962         No change of functionality, no new tests needed.
963
964         !$defines case can be removed, because Qt and Android aren't in WebKit trunk,
965         all ports (Mac,EFL,GTK,Windows) call this script with --defines option now
966
967         * css/make-css-file-arrays.pl:
968
969 2013-10-24  Antti Koivisto  <antti@apple.com>
970
971         Remove a stray space.
972         
973         Not reviewed.
974
975         * accessibility/AccessibilityRenderObject.cpp:
976         (WebCore::AccessibilityRenderObject::addImageMapChildren):
977
978 2013-10-24  Antti Koivisto  <antti@apple.com>
979
980         Element iterator functions should take reference
981         https://bugs.webkit.org/show_bug.cgi?id=123267
982
983         Reviewed by Andreas Kling.
984
985         The argument has to be non-null.
986
987 2013-10-24  Ryuan Choi  <ryuan.choi@samsung.com>
988
989         [EFL] Build break with latest EFL 1.8 libraries.
990         https://bugs.webkit.org/show_bug.cgi?id=123245
991
992         Reviewed by Gyuyoung Kim.
993
994         After fixed build break on EFL 1.8 at r138326, EFL libraries are changed
995         Eo typedef and splitted header files which contain version macro.
996
997         * platform/Widget.h: Changed Eo typedef.
998         * platform/efl/EflScreenUtilities.h: Ditto.
999         * platform/graphics/Image.h: Ditto.
1000
1001 2013-10-24  Andreas Kling  <akling@apple.com>
1002
1003         RenderSVGResource: Pass RenderElement to fill/strokePaintingResource.
1004         <https://webkit.org/b/123242>
1005
1006         We never pass text renderers to these functions, so make them take
1007         RenderElement instead.
1008
1009         Reviewed by Anders Carlsson.
1010
1011 2013-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1012
1013         [GObject bindings] Make EventTarget interface introspectable
1014         https://bugs.webkit.org/show_bug.cgi?id=77835
1015
1016         Reviewed by Gustavo Noronha Silva.
1017
1018         Add webkit_dom_event_target_add_event_listener_with_closure and
1019         webkit_dom_event_target_remove_event_listener_with_closure to be
1020         used by GObject instrospection bindings. Instead of receving a
1021         GCallback, which makes the function not introspectable, they
1022         receive a GClosure.
1023
1024         * bindings/gobject/GObjectEventListener.cpp:
1025         (WebCore::GObjectEventListener::GObjectEventListener):
1026         (WebCore::GObjectEventListener::~GObjectEventListener):
1027         (WebCore::GObjectEventListener::gobjectDestroyed):
1028         (WebCore::GObjectEventListener::handleEvent):
1029         (WebCore::GObjectEventListener::operator==):
1030         * bindings/gobject/GObjectEventListener.h:
1031         (WebCore::GObjectEventListener::addEventListener):
1032         (WebCore::GObjectEventListener::removeEventListener):
1033         * bindings/gobject/WebKitDOMEventTarget.cpp:
1034         (webkit_dom_event_target_dispatch_event):
1035         (webkit_dom_event_target_add_event_listener):
1036         (webkit_dom_event_target_remove_event_listener):
1037         (webkit_dom_event_target_add_event_listener_with_closure):
1038         (webkit_dom_event_target_remove_event_listener_with_closure):
1039         * bindings/gobject/WebKitDOMEventTarget.h:
1040         * bindings/scripts/CodeGeneratorGObject.pm:
1041         (GenerateEventTargetIface):
1042         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1043         (webkit_dom_test_event_target_dispatch_event):
1044         (webkit_dom_test_event_target_add_event_listener):
1045         (webkit_dom_test_event_target_remove_event_listener):
1046         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1047         (webkit_dom_test_node_dispatch_event):
1048         (webkit_dom_test_node_add_event_listener):
1049         (webkit_dom_test_node_remove_event_listener):
1050
1051 2013-10-14  Sergio Villar Senin  <svillar@igalia.com>
1052
1053         Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox
1054         https://bugs.webkit.org/show_bug.cgi?id=118620
1055
1056         Reviewed by Antti Koivisto.
1057
1058         Turns out that order is extremelly uncommon so using a Vector is
1059         much less expensive. This also special-cases the much common case
1060         of only having order of value 0 by using Vectors with just one
1061         preallocated member.
1062
1063         Also added the performance test that shows a ~1% win when using a
1064         vector instead of the HashSet.
1065
1066         * rendering/RenderFlexibleBox.cpp:
1067         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
1068         (WebCore::RenderFlexibleBox::layoutBlock):
1069         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1070         * rendering/RenderFlexibleBox.h:
1071
1072 2013-10-23  ChangSeok Oh  <changseok.oh@collabora.com>
1073
1074         Unreviewed build fix since r157823.
1075         FilterOperation::getOperationType() is renamed FilterOperation::type().
1076
1077         * platform/graphics/texmap/TextureMapperGL.cpp:
1078         (WebCore::prepareFilterProgram):
1079         (WebCore::TextureMapperGL::drawTexture):
1080         (WebCore::TextureMapperGL::drawUsingCustomFilter):
1081         (WebCore::TextureMapperGL::drawFiltered):
1082         (WebCore::BitmapTextureGL::applyFilters):
1083         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1084         (WebCore::CoordinatedGraphicsScene::injectCachedCustomFilterPrograms):
1085
1086 2013-10-23  Ryuan Choi  <ryuan.choi@samsung.com>
1087
1088         Unreviewed build fix on CMake based ports when CMAKE_BUILD_TYPE is not given.
1089
1090         When CMAKE_BUILD_TYPE is empty, FIND command will be failed.
1091
1092         * CMakeLists.txt:
1093
1094 2013-10-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1095
1096         Integrate css3-images image-orientation with existing EXIF support
1097         https://bugs.webkit.org/show_bug.cgi?id=91566
1098
1099         Reviewed by Beth Dakin.
1100
1101         Original patch by David Barr(davidbarr@chromium.org).
1102
1103         This patch passes an information of image orientation into existing EXIF support functions
1104         (draw() functions of image classes mainly). We need to let the functions to know the information
1105         in order to meet the image-orientation requirement.
1106
1107         Spec: http://dev.w3.org/csswg/css-images-3/#the-image-orientation
1108         The css3-images module specification is at last call.
1109
1110         Test: fast/css/image-orientation/image-orientation.html
1111         Image orientation test is to check if incorrect rotation value can be fixed with correct orientation.
1112
1113         * loader/cache/CachedImage.cpp:
1114         (WebCore::CachedImage::imageSizeForRenderer):
1115         * page/DragController.cpp:
1116         (WebCore::DragController::doImageDrag):
1117         * page/Frame.cpp:
1118         (WebCore::Frame::nodeImage):
1119         * platform/graphics/BitmapImage.cpp:
1120         (WebCore::BitmapImage::updateSize):
1121         (WebCore::BitmapImage::sizeRespectingOrientation):
1122         (WebCore::BitmapImage::drawPattern):
1123         * platform/graphics/BitmapImage.h:
1124         * platform/graphics/CrossfadeGeneratedImage.cpp:
1125         (WebCore::CrossfadeGeneratedImage::draw):
1126         * platform/graphics/CrossfadeGeneratedImage.h:
1127         * platform/graphics/GeneratedImage.h:
1128         * platform/graphics/GradientImage.cpp:
1129         (WebCore::GradientImage::draw):
1130         * platform/graphics/GradientImage.h:
1131         * platform/graphics/Image.cpp:
1132         (WebCore::Image::draw):
1133         (WebCore::Image::drawTiled):
1134         * platform/graphics/Image.h:
1135         * platform/graphics/blackberry/ImageBlackBerry.cpp:
1136         * platform/graphics/cairo/BitmapImageCairo.cpp:
1137         (WebCore::BitmapImage::draw):
1138         * platform/graphics/cg/BitmapImageCG.cpp:
1139         * platform/graphics/cg/PDFDocumentImage.cpp:
1140         (WebCore::PDFDocumentImage::draw):
1141         * platform/graphics/cg/PDFDocumentImage.h:
1142         * platform/graphics/win/ImageCGWin.cpp:
1143         (WebCore::BitmapImage::getHBITMAPOfSize):
1144         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1145         * platform/graphics/wince/ImageBufferWinCE.cpp:
1146         (WebCore::BufferedImage::draw):
1147         * platform/graphics/wince/ImageWinCE.cpp:
1148         (WebCore::BitmapImage::draw):
1149         * platform/mac/DragImageMac.mm:
1150         (WebCore::createDragImageFromImage):
1151         * rendering/RenderEmbeddedObject.cpp:
1152         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
1153         * rendering/RenderImage.cpp:
1154         (WebCore::RenderImage::styleDidChange):
1155         * rendering/RenderSnapshottedPlugIn.cpp:
1156         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1157         * rendering/style/RenderStyle.cpp:
1158         (WebCore::RenderStyle::changeRequiresLayout):
1159         * svg/graphics/SVGImage.cpp:
1160         (WebCore::SVGImage::drawForContainer):
1161         (WebCore::SVGImage::nativeImageForCurrentFrame):
1162         (WebCore::SVGImage::draw):
1163         * svg/graphics/SVGImage.h:
1164         * svg/graphics/SVGImageForContainer.cpp:
1165         (WebCore::SVGImageForContainer::draw):
1166         * svg/graphics/SVGImageForContainer.h:
1167
1168 2013-10-23  Andreas Kling  <akling@apple.com>
1169
1170         Tighten typing in SVGInlineTextBox a bit.
1171         <https://webkit.org/b/123238>
1172
1173         Use RenderBoxModelObject& instead of generic RenderObject* in some
1174         places where it happens as a natural consequence of keeping the
1175         original return type from InlineBox::parent()->renderer().
1176
1177         Reviewed by Anders Carlsson.
1178
1179 2013-10-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1180
1181         Introduce RENDER_OBJECT_TYPE_CASTS to replace manual toFoo() in child render object
1182         https://bugs.webkit.org/show_bug.cgi?id=123150
1183
1184         Reviewed by Andreas Kling.
1185
1186         As a step to let toFoo use TYPE_CASTS_BASE, toRenderFoo() can use it for child render object.
1187         So, this patch introduces RENDER_OBJECT_TYPE_CASTS based on the TYPE_CASTS_BASE. This will
1188         generate plenty more helper functions for render object type cast.
1189
1190         Some unnecessary type casts are fixed by this change.
1191
1192         No new tests, no behavior changes.
1193
1194         * rendering/RenderBlock.h:
1195         * rendering/RenderBlockFlow.h:
1196         * rendering/RenderBox.h:
1197         * rendering/RenderBoxModelObject.h:
1198         * rendering/RenderButton.h:
1199         * rendering/RenderCounter.h:
1200         * rendering/RenderElement.h:
1201         (WebCore::RenderElement::generatingElement):
1202         * rendering/RenderEmbeddedObject.h:
1203         * rendering/RenderFieldset.h:
1204         * rendering/RenderFileUploadControl.h:
1205         * rendering/RenderFlexibleBox.h:
1206         * rendering/RenderFlowThread.h:
1207         * rendering/RenderFrame.h:
1208         * rendering/RenderFrameSet.h:
1209         * rendering/RenderFullScreen.h:
1210         * rendering/RenderHTMLCanvas.h:
1211         * rendering/RenderIFrame.h:
1212         * rendering/RenderImage.h:
1213         * rendering/RenderInline.h:
1214         * rendering/RenderLayerModelObject.h:
1215         * rendering/RenderLineBreak.h:
1216         * rendering/RenderListBox.h:
1217         * rendering/RenderListItem.h:
1218         * rendering/RenderMedia.h:
1219         * rendering/RenderMenuList.h:
1220         * rendering/RenderMeter.h:
1221         * rendering/RenderMultiColumnBlock.h:
1222         * rendering/RenderMultiColumnSet.h:
1223         * rendering/RenderNamedFlowFragment.h:
1224         * rendering/RenderNamedFlowThread.h:
1225         * rendering/RenderObject.h:
1226         * rendering/RenderProgress.h:
1227         * rendering/RenderQuote.h:
1228         * rendering/RenderRegion.h:
1229         * rendering/RenderReplaced.h:
1230         * rendering/RenderRubyRun.h:
1231         * rendering/RenderScrollbarPart.h:
1232         * rendering/RenderSearchField.h:
1233         * rendering/RenderSlider.h:
1234         * rendering/RenderSnapshottedPlugIn.h:
1235         * rendering/RenderTable.h:
1236         * rendering/RenderTableCaption.h:
1237         * rendering/RenderTableCell.h:
1238         * rendering/RenderTableCol.h:
1239         * rendering/RenderTableRow.h:
1240         * rendering/RenderTableSection.h:
1241         * rendering/RenderText.h:
1242         * rendering/RenderTextControl.h:
1243         * rendering/RenderTextControlMultiLine.h:
1244         * rendering/RenderTextControlSingleLine.h:
1245         * rendering/RenderWidget.h:
1246         * rendering/mathml/RenderMathMLBlock.h:
1247         * rendering/svg/RenderSVGContainer.h:
1248         * rendering/svg/RenderSVGGradientStop.h:
1249         * rendering/svg/RenderSVGImage.h:
1250         * rendering/svg/RenderSVGInlineText.h:
1251         * rendering/svg/RenderSVGPath.h:
1252         * rendering/svg/RenderSVGResourceFilter.h:
1253         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
1254         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
1255         * rendering/svg/RenderSVGRoot.h:
1256         * rendering/svg/RenderSVGShape.h:
1257         * rendering/svg/RenderSVGText.h:
1258         * rendering/svg/RenderSVGTextPath.h:
1259         * rendering/svg/RenderSVGViewportContainer.h:
1260         * rendering/svg/SVGInlineFlowBox.cpp:
1261         (WebCore::SVGInlineFlowBox::paint):
1262
1263 2013-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
1264
1265         Include misspelling dot gap width when centering misspelling dots
1266         https://bugs.webkit.org/show_bug.cgi?id=122365
1267
1268         Reviewed by Simon Fraser.
1269
1270         When calculating where to place the misspelling dots, we find the
1271         maximum number of full dots that can fit under the misspelled word,
1272         and then center a run of that many dots. However, when we're
1273         centering the run, we are only considering the size of the extra
1274         fractional dot that we cut off. However, the dot image has a "gap"
1275         of transparent pixels (which visually provide tracking for the dots)
1276         which visually appears to be empty space. We should take this gap
1277         space into consideration when centering the run of dots. We also
1278         should make sure that our dots start on integral pixel boundaries
1279         because otherwise we can't set the phase of the dot run properly.
1280
1281         Test: editing/spelling/centering-misspelling-dots.html
1282
1283         * platform/graphics/mac/GraphicsContextMac.mm:
1284         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1285
1286 2013-10-23  Andreas Kling  <akling@apple.com>
1287
1288         SVGFilterBuilder should not be ref-counted.
1289         <https://webkit.org/b/123222>
1290
1291         These objects are singly-owned and do not need ref counting.
1292
1293         Reviewed by Anders Carlsson.
1294
1295 2013-10-23  Brady Eidson  <beidson@apple.com>
1296
1297         Remove unused IDBBackingStoreLevelDB default constructor.
1298
1299         Rubberstamped by Anders Carlsson.
1300
1301         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1302         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1303
1304 2013-10-23  Alex Christensen  <achristensen@webkit.org>
1305
1306         Added Texture Mapper and Coordinated Graphics to Windows build for WinCairo.
1307         https://bugs.webkit.org/show_bug.cgi?id=123215
1308
1309         Reviewed by Brent Fulgham.
1310
1311         * WebCore.vcxproj/WebCore.vcxproj:
1312         * WebCore.vcxproj/WebCore.vcxproj.filters:
1313         Added source files for Texture Mapper to Windows build.
1314         * WebCore.vcxproj/WebCoreCairo.props:
1315         Added Texture Mapper include directories for WinCairo.
1316
1317 2013-10-23  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1318
1319         Adding mock class to test RTCDataChannelHandler
1320         https://bugs.webkit.org/show_bug.cgi?id=123205
1321
1322         Reviewed by Eric Carlson.
1323
1324         Now RTCPeerConnectionHandler-datachannel LayouTest can run properly.
1325         Also updated the expected file, removing the reliable property check (which was removed in the spec)
1326
1327         Existing tests updated.
1328
1329         * CMakeLists.txt:
1330         * platform/mediastream/RTCDataChannelHandlerClient.h:
1331         * platform/mock/RTCDataChannelHandlerMock.cpp: Added.
1332         * platform/mock/RTCDataChannelHandlerMock.h: Added.
1333         * platform/mock/RTCNotifiersMock.cpp:
1334         (WebCore::RemoteDataChannelNotifier::RemoteDataChannelNotifier):
1335         (WebCore::RemoteDataChannelNotifier::fire):
1336         (WebCore::DataChannelStateNotifier::DataChannelStateNotifier):
1337         (WebCore::DataChannelStateNotifier::fire):
1338         * platform/mock/RTCNotifiersMock.h:
1339         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1340         (WebCore::RTCPeerConnectionHandlerMock::createDataChannel):
1341
1342 2013-10-23  Andreas Kling  <akling@apple.com>
1343
1344         Clock should not be ref-counted.
1345         <https://webkit.org/b/123217>
1346
1347         The Clock object is only ever owned by the MediaController,
1348         so remove the ref counting and store it in a std::unique_ptr.
1349
1350         Also slapped the Clock subclasses with FINAL and OVERRIDE.
1351
1352         Reviewed by Anders Carlsson.
1353
1354 2013-10-23  Mark Lam  <mark.lam@apple.com>
1355
1356         Fix assertion in DatabaseManager::detailsForNameAndOrigin() to be iOS friendly.
1357         https://bugs.webkit.org/show_bug.cgi?id=123218.
1358
1359         Reviewed by Joseph Pecoraro.
1360
1361         No new tests.
1362
1363         * Modules/webdatabase/DatabaseManager.cpp:
1364         (WebCore::DatabaseManager::detailsForNameAndOrigin):
1365
1366 2013-10-23  Alex Christensen  <achristensen@webkit.org>
1367
1368         Separated USE(CA) from USE(ACCELERATED_COMPOSITING) to prepare WinCairo for accelerated compositing.
1369         https://bugs.webkit.org/show_bug.cgi?id=123214
1370
1371         Reviewed by Brent Fulgham.
1372
1373         * platform/graphics/PlatformLayer.h:
1374         Added TextureMapperPlatformLayer PlatformLayer declaration for WinCairo.
1375         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
1376         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow):
1377         (WebCore::MediaPlayerPrivateFullscreenWindow::wndProc):
1378         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
1379         Added USE(CA) where necessary to compile WinCairo with accelerated compositing.
1380
1381 2013-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
1382
1383         Antialias underlines if they're not axis-aligned
1384         https://bugs.webkit.org/show_bug.cgi?id=123004
1385
1386         Reviewed by Simon Fraser.
1387
1388         In order to make underlines crisp, GraphicsContext:drawLineForText
1389         modifies the bounds of the underline rect in order to make the rect
1390         device-pixel-aligned, and then turns off antialiasing when drawing
1391         the line. This makes sense when the underline is axis-aligned, but
1392         doesn't when the rect is rotated or skewed. Therefore, we should
1393         only opt-in to this behavior if the underline we're about to draw
1394         is axis-aligned. This requires figuring out whether or not the
1395         current transformation is axis-aligned every time
1396         GraphicsContext::drawLineForText is called, which will incur a small
1397         performance hit. However, this is justified by underlines looking
1398         much better (antialiased) when the context is rotated or skewed.
1399
1400         Tests: svg/custom/foreign-object-skew.html
1401                svg/zoom/page/zoom-foreignObject.html
1402                svg/zoom/text/zoom-foreignObject.html:
1403
1404         * platform/graphics/cg/GraphicsContextCG.cpp:
1405         (WebCore::GraphicsContext::drawLineForText):
1406
1407 2013-10-23  Mark Lam  <mark.lam@apple.com>
1408
1409         Re-instate ProposedDatabases needed by detailsForNameAndOrigin().
1410         https://bugs.webkit.org/show_bug.cgi?id=123131.
1411
1412         Reviewed by Geoffrey Garen.
1413
1414         Test: storage/websql/open-database-expand-quota.html
1415
1416         If a webpage tries to create a database that exceeds the database size
1417         quota for that security origin, the WebKit1 quota request mechanism
1418         uses detailsForNameAndOrigin() to get the requested size of the database
1419         (that the webpage is attempting to open) in order to determine whether
1420         to increase the quota or not.
1421
1422         Previously, detailsForNameAndOrigin() relies on the ProposedDatabase
1423         mechanism to provide this size information. This change re-instates the
1424         ProposedDatabase mechanism so that WebKit1 client code that relies on
1425         this behavior will continue to work.
1426
1427         * Modules/webdatabase/DatabaseManager.cpp:
1428         (WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase):
1429         (WebCore::DatabaseManager::ProposedDatabase::~ProposedDatabase):
1430         (WebCore::DatabaseManager::DatabaseManager):
1431         (WebCore::DatabaseManager::openDatabaseBackend):
1432         (WebCore::DatabaseManager::fullPathForDatabase):
1433         (WebCore::DatabaseManager::detailsForNameAndOrigin):
1434         * Modules/webdatabase/DatabaseManager.h:
1435         (WebCore::DatabaseManager::ProposedDatabase::origin):
1436         (WebCore::DatabaseManager::ProposedDatabase::details):
1437
1438 2013-10-23  Tim Horton  <timothy_horton@apple.com>
1439
1440         [cg] Fix the capitalization of kCGImageSourceSkipMetaData (-> Metadata)
1441         https://bugs.webkit.org/show_bug.cgi?id=122918
1442
1443         Reviewed by Anders Carlsson.
1444
1445         * platform/graphics/cg/ImageSourceCG.cpp:
1446         (WebCore::imageSourceOptions):
1447         The capitalization of kCGImageSourceSkipMetaData changed to
1448         kCGImageSourceSkipMetadata in Mountain Lion.
1449
1450 2013-10-23  Brady Eidson  <beidson@apple.com>
1451
1452         Make IDBDatabaseBackendLevelDB.cpp be cross platform
1453         https://bugs.webkit.org/show_bug.cgi?id=123027
1454
1455         Attentively reviewed by Dean Jackson.
1456
1457         Move it out of the indexeddb/leveldb directory, and rename it to IDBDatabaseBackendImpl.
1458
1459         Project files:
1460         * CMakeLists.txt:
1461         * GNUmakefile.list.am:
1462         * WebCore.vcxproj/WebCore.vcxproj:
1463         * WebCore.vcxproj/WebCore.vcxproj.filters:
1464         * WebCore.xcodeproj/project.pbxproj:
1465
1466         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp.
1467         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h.
1468
1469         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1470         (WebCore::IDBDatabaseBackendInterface::isIDBDatabaseBackendImpl): Add to support a required cast in LevelDB code.
1471
1472         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1473
1474         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
1475         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
1476
1477         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1478         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
1479         (WebCore::IDBFactoryBackendLevelDB::open):
1480         (WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend):
1481         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1482
1483         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1484         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
1485
1486         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
1487         (WebCore::IDBTransactionBackendLevelDB::create):
1488         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
1489         (WebCore::IDBTransactionBackendLevelDB::scheduleVersionChangeOperation):
1490         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
1491
1492         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
1493         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
1494         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
1495         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
1496
1497 2013-10-23  Daniel Bates  <dabates@apple.com>
1498
1499         [iOS] Upstream more ARMv7s bits
1500         https://bugs.webkit.org/show_bug.cgi?id=123052
1501
1502         Reviewed by Joseph Pecoraro.
1503
1504         Define exported symbol file for armv7s and arm64.
1505
1506         * Configurations/WebCore.xcconfig:
1507
1508 2013-10-23  Krzysztof Wolanski  <k.wolanski@samsung.com>
1509
1510         [GTK] accessibility/self-referencing-aria-labelledby.html is failing
1511         https://bugs.webkit.org/show_bug.cgi?id=121594
1512
1513         Reviewed by Mario Sanchez Prada.
1514
1515         According to http://www.w3.org/TR/REC-html40/struct/objects.html#edef-IMG
1516         description of image element should be determined by alt attribute, then
1517         if it is empty by title attributte.
1518
1519         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1520         (webkitAccessibleGetDescription):
1521
1522 2013-10-15  Andreas Kling  <akling@apple.com>
1523
1524         Tighten animation-driven restyle to operate on Element only.
1525         <https://webkit.org/b/122820>
1526
1527         Text nodes are never directly animated, so we can tighten this code
1528         to work on Element only. This happens naturally since the code was
1529         already working with RenderElement everywhere.
1530
1531         Reviewed by Antti Koivisto.
1532
1533 2013-10-22  Andreas Kling  <akling@apple.com>
1534
1535         Even more PassRef<RenderStyle>!
1536         <https://webkit.org/b/123147>
1537
1538         Convert more of the WebCore code to use PassRef for RenderStyle
1539         in places where they are known to be non-null.
1540
1541         Re-landing this without region styling since that caused some
1542         assertions last time.
1543
1544         Reviewed by Antti Koivisto.
1545
1546 2013-10-22  Zoltan Horvath  <zoltan@webkit.org>
1547
1548         Refactor LineBreaker::nextSegmentBreak, add BreakingContext that holds all its state
1549         https://bugs.webkit.org/show_bug.cgi?id=123038
1550
1551         Reviewed by David Hyatt.
1552
1553         I followed Levi's logic on Blink's nextSegmentBreak refactoring (https://chromiumcodereview.appspot.com/25054004). 
1554         I mostly did the same changes, but the code is too diverged at this point to just apply that patch on our trunk. The patch
1555         introduces BreakingContext as a separate class. I added new methods for each condition, which were originally located in
1556         nextSegmentBreak. I also removed the goto-s from the code. All the new methods are inline in order to avoid introducing any
1557         performance regression. The change makes the code so much cleaner and understandable.
1558
1559         This change would be the first step of the nextSegmentBreak refactoring, I wanted to keep things in place in RenderBlockLineLayout.cpp
1560         for now, but I'm planning to separate BreakingContext into a new file and do additional changes to make things nicer. I'm tracking
1561         the entire progress under http://webkit.org/b/121261 meta bug.
1562
1563         No new tests, covered by existing tests.
1564         - I updated 1 expected result, because there was a 1 pixel difference on the result, which I believe comes from a rounding situation.
1565
1566         * rendering/RenderBlockFlow.h:
1567         * rendering/RenderBlockLineLayout.cpp:
1568         (WebCore::BreakingContext::BreakingContext):
1569         (WebCore::BreakingContext::currentObject):
1570         (WebCore::BreakingContext::lineBreak):
1571         (WebCore::BreakingContext::lineBreakRef):
1572         (WebCore::BreakingContext::lineWidth):
1573         (WebCore::BreakingContext::atEnd):
1574         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
1575         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
1576         (WebCore::BreakingContext::initializeForCurrentObject):
1577         (WebCore::BreakingContext::increment):
1578         (WebCore::BreakingContext::handleBR):
1579         (WebCore::BreakingContext::handleOutOfFlowPositioned):
1580         (WebCore::BreakingContext::handleFloat):
1581         (WebCore::BreakingContext::handleEmptyInline):
1582         (WebCore::BreakingContext::handleReplaced):
1583         (WebCore::nextCharacter):
1584         (WebCore::BreakingContext::handleText):
1585         (WebCore::textBeginsWithBreakablePosition):
1586         (WebCore::BreakingContext::canBreakAtThisPosition):
1587         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
1588         (WebCore::BreakingContext::handleEndOfLine):
1589         (WebCore::LineBreaker::nextSegmentBreak):
1590
1591 2013-10-22  Commit Queue  <commit-queue@webkit.org>
1592
1593         Unreviewed, rolling out r157826.
1594         http://trac.webkit.org/changeset/157826
1595         https://bugs.webkit.org/show_bug.cgi?id=123197
1596
1597         Caused some regions tests to assert (Requested by smfr on
1598         #webkit).
1599
1600         * dom/Document.cpp:
1601         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
1602         * dom/Document.h:
1603         * dom/Element.cpp:
1604         (WebCore::Element::styleForRenderer):
1605         * dom/Element.h:
1606         * dom/ElementRareData.h:
1607         (WebCore::ElementRareData::setComputedStyle):
1608         (WebCore::ElementRareData::resetComputedStyle):
1609         * html/HTMLTitleElement.cpp:
1610         (WebCore::HTMLTitleElement::textWithDirection):
1611         * page/animation/AnimationController.cpp:
1612         (WebCore::AnimationController::updateAnimations):
1613         * page/animation/CompositeAnimation.cpp:
1614         (WebCore::CompositeAnimation::animate):
1615         * page/animation/CompositeAnimation.h:
1616         * rendering/RenderElement.cpp:
1617         (WebCore::RenderElement::createFor):
1618         * rendering/RenderElement.h:
1619         (WebCore::RenderElement::setStyleInternal):
1620         * rendering/RenderRegion.cpp:
1621         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
1622         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
1623         (WebCore::RenderRegion::computeStyleInRegion):
1624         (WebCore::RenderRegion::computeChildrenStyleInRegion):
1625         (WebCore::RenderRegion::setObjectStyleInRegion):
1626         * rendering/RenderRegion.h:
1627         * style/StyleResolveTree.cpp:
1628         (WebCore::Style::resolveLocal):
1629
1630 2013-10-22  Ryuan Choi  <ryuan.choi@samsung.com>
1631
1632         [EFL] Remove HAVE_GLX macro
1633         https://bugs.webkit.org/show_bug.cgi?id=123191
1634
1635         Reviewed by Gyuyoung Kim.
1636
1637         Since r138313, HAVE(GLX) was replaced to USE(GLX) except in GraphicsSurfaceToken.h.
1638
1639         * platform/graphics/surfaces/GraphicsSurfaceToken.h:
1640         Replace HAVE(GLX) to USE(GLX)
1641
1642 2013-10-22  Mark Lam  <mark.lam@apple.com>
1643
1644         Gardening: fix broken build on Windows.
1645         https://bugs.webkit.org/show_bug.cgi?id=123174.
1646
1647         Not reviewed.
1648
1649         No new tests.
1650
1651         * WebCore.vcxproj/WebCore.vcxproj:
1652         * WebCore.vcxproj/WebCore.vcxproj.filters:
1653
1654 2013-10-22  Brady Eidson  <beidson@apple.com>
1655
1656         Get rid of IDBObjectStoreBackendLevelDB
1657         https://bugs.webkit.org/show_bug.cgi?id=123174
1658
1659         Reviewed by Tim Horton.
1660
1661         This file was kind of a dumping ground.
1662         Its contents can be merged into IDBBackingStoreInterface and a new IDBIndexWriter class.
1663
1664         Also took the opportunity to do a little bit of RefPtr<> and pointer-vs-reference cleanup.
1665
1666         * CMakeLists.txt:
1667         * GNUmakefile.list.am:
1668         * WebCore.xcodeproj/project.pbxproj:
1669
1670         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Removed.
1671         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Removed.
1672
1673         * Modules/indexeddb/IDBIndexWriter.cpp: Added.
1674         (WebCore::IDBIndexWriter::IDBIndexWriter):
1675         (WebCore::IDBIndexWriter::writeIndexKeys):
1676         (WebCore::IDBIndexWriter::verifyIndexKeys):
1677         (WebCore::IDBIndexWriter::addingKeyAllowed):
1678         * Modules/indexeddb/IDBIndexWriter.h: Added.
1679         (WebCore::IDBIndexWriter::create):
1680
1681         * Modules/indexeddb/IDBBackingStoreInterface.h:
1682         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1683
1684         * Modules/indexeddb/IDBMetadata.h:
1685         * Modules/indexeddb/IDBTransactionBackendInterface.h:
1686
1687         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1688         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
1689         (WebCore::IDBBackingStoreLevelDB::generateKey):
1690         (WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
1691         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1692
1693         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
1694         (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
1695         (WebCore::IDBDatabaseBackendLevelDB::setIndexesReady):
1696         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
1697
1698         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
1699         (WebCore::IDBTransactionBackendLevelDB::schedulePutOperation):
1700         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
1701
1702         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
1703         (WebCore::PutOperation::perform):
1704         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
1705         (WebCore::PutOperation::create):
1706         (WebCore::PutOperation::PutOperation):
1707
1708 2013-10-22  Dean Jackson  <dino@apple.com>
1709
1710         [WebGL] Implement a software rendering option on Mac
1711         https://bugs.webkit.org/show_bug.cgi?id=123177
1712
1713         Reviewed by Tim Horton.
1714
1715         Implement a way to force software OpenGL rendering
1716         for WebGL, via a Setting/Preference.
1717
1718         No new tests. We intentionally hide the capabilities of
1719         the renderer from the content, so you can't test for
1720         this setting. However, manual inspection is pretty
1721         obvious. Just go to a page with a complex shader
1722         such as https://www.shadertoy.com/view/lss3WS.
1723
1724         * html/canvas/WebGLRenderingContext.cpp:
1725         (WebCore::WebGLRenderingContext::create): If we're forcing software
1726         rendering, mark the context attributes as such.
1727         * page/Settings.in: New setting key.
1728         * platform/graphics/GraphicsContext3D.h: New flag in Attributes.
1729         (WebCore::GraphicsContext3D::Attributes::Attributes):
1730         * platform/graphics/mac/GraphicsContext3DMac.mm:
1731         (WebCore::GraphicsContext3D::GraphicsContext3D): Slight update to the
1732         algorithm that sets a pixel format. If we're forcing software rendering,
1733         obviously we never want to create an accelerated pixel format.
1734         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
1735         (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded): Set the attribute
1736         here before trying to create the context.
1737         * platform/graphics/filters/CustomFilterGlobalContext.h: Add a forceSoftwareRendering
1738         flag to prepareContextIfNeeded.
1739         * rendering/FilterEffectRenderer.cpp:
1740         (WebCore::createCustomFilterEffect): Check the Setting before creating a custom
1741         filter context.
1742
1743 2013-10-22  Anders Carlsson  <andersca@apple.com>
1744
1745         Revert r157445 since it broke certificates on Mac.
1746         <rdar://problem/15246926&15254017&15269117>
1747
1748         * GNUmakefile.list.am:
1749         * PlatformEfl.cmake:
1750         * WebCore.exp.in:
1751         * WebCore.vcxproj/WebCore.vcxproj:
1752         * WebCore.vcxproj/WebCore.vcxproj.filters:
1753         * WebCore.xcodeproj/project.pbxproj:
1754         * platform/network/ResourceErrorBase.h:
1755         * platform/network/ResourceResponseBase.h:
1756         * platform/network/cf/CertificateInfoCFNet.cpp: Removed.
1757         * platform/network/cf/ResourceResponse.h:
1758         * platform/network/mac/ResourceResponseMac.mm:
1759         (WebCore::ResourceResponse::setCertificateChain):
1760         (WebCore::ResourceResponse::certificateChain):
1761         * platform/network/soup/ResourceError.h:
1762         (WebCore::ResourceError::ResourceError):
1763         (WebCore::ResourceError::tlsErrors):
1764         (WebCore::ResourceError::setTLSErrors):
1765         (WebCore::ResourceError::certificate):
1766         (WebCore::ResourceError::setCertificate):
1767         * platform/network/soup/ResourceErrorSoup.cpp:
1768         (WebCore::ResourceError::tlsError):
1769         (WebCore::ResourceError::platformCopy):
1770         (WebCore::ResourceError::platformCompare):
1771         * platform/network/soup/ResourceResponse.h:
1772         (WebCore::ResourceResponse::ResourceResponse):
1773         (WebCore::ResourceResponse::soupMessageCertificate):
1774         (WebCore::ResourceResponse::setSoupMessageCertificate):
1775         (WebCore::ResourceResponse::soupMessageTLSErrors):
1776         (WebCore::ResourceResponse::setSoupMessageTLSErrors):
1777         * platform/network/soup/ResourceResponseSoup.cpp:
1778         (WebCore::ResourceResponse::toSoupMessage):
1779         (WebCore::ResourceResponse::updateFromSoupMessage):
1780
1781 2013-10-22  Jer Noble  <jer.noble@apple.com>
1782
1783         [Media] Refactor supportsType() factory method to take a parameters object.
1784         https://bugs.webkit.org/show_bug.cgi?id=122489
1785
1786         Reviewed by Eric Carlson.
1787
1788         In order to support adding new conditional properties with which to decide
1789         what MediaPlayerPrivate subclass to create, replace the two versions of the
1790         supportsType() factory method with a single one taking a parameters object.
1791
1792         At the same time, add a 'isMediaSource' parameter to that object, allowing
1793         MediaPlayerPrivate subclasses which support the same type and codecs but
1794         which do not both support MediaSource to be distinguised.
1795
1796         * platform/graphics/MediaPlayer.cpp:
1797         (WebCore::bestMediaEngineForSupportParameters): Renamed from
1798             bestMediaEngineForTypeAndCodecs.
1799         (WebCore::MediaPlayer::nextBestMediaEngine): Added convenience function.
1800         (WebCore::MediaPlayer::loadWithNextMediaEngine): Call nextBestMediaEngine()
1801         (WebCore::MediaPlayer::supportsType): Pass parameter object.
1802         (WebCore::MediaPlayer::networkStateChanged): Call nextBestMediaEngine().
1803         * platform/graphics/MediaPlayer.h:
1804         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1805         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Handle parameter object.
1806         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1807         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1808         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1809         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Remove extraneous
1810             extendedSupportsType method.
1811         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Handle parameter object.
1812         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1813         (WebCore::MediaPlayerPrivate::supportsType): Ditto.
1814         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1815         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1816         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1817         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1818         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1819         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Remove extraneous
1820             extendedSupportsType method.
1821         (WebCore::MediaPlayerPrivateQTKit::supportsType): Handle parameter object.
1822         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1823         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType): Ditto.
1824         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
1825         * platform/graphics/wince/MediaPlayerPrivateWinCE.h:
1826
1827 2013-10-22  Andreas Kling  <akling@apple.com>
1828
1829         Merge SVGRenderBlock::styleWillChange() into styleDidChange().
1830         <https://webkit.org/b/123181>
1831
1832         I meant to do this one in r157787, but better late than never.
1833
1834         Reviewed by Geoffrey Garen.
1835
1836 2013-10-22  Sam Weinig  <sam@webkit.org>
1837
1838         CTTE: Modernize RenderBlock a bit
1839         https://bugs.webkit.org/show_bug.cgi?id=123162
1840
1841         Reviewed by Andreas Kling.
1842
1843         Start threading references through RenderBlock. While we 
1844         are here, do some selective modernization as well.
1845
1846 2013-10-22  Andreas Kling  <akling@apple.com>
1847
1848         Even more PassRef<RenderStyle>!
1849         <https://webkit.org/b/123147>
1850
1851         Convert the remaining WebCore code to use PassRef for RenderStyle
1852         wherever they are known to be non-null.
1853
1854         Reviewed by Antti Koivisto.
1855
1856 2013-10-22  Commit Queue  <commit-queue@webkit.org>
1857
1858         Unreviewed, rolling out r157819.
1859         http://trac.webkit.org/changeset/157819
1860         https://bugs.webkit.org/show_bug.cgi?id=123180
1861
1862         Broke 32-bit builds (Requested by smfr on #webkit).
1863
1864         * Configurations/WebCore.xcconfig:
1865
1866 2013-10-22  Antti Koivisto  <antti@apple.com>
1867
1868         Rename deleteLineBoxTree to deleteLines
1869         https://bugs.webkit.org/show_bug.cgi?id=123176
1870
1871         Reviewed by Andreas Kling.
1872
1873         RenderBlock::deleteLineBoxTree -> RenderBlock::deleteLines
1874         RenderInline::deleteLineBoxTree -> RenderInline::deleteLines
1875
1876 2013-10-22  Tim Horton  <timothy_horton@apple.com>
1877
1878         {ClipPathOperation, FilterOperation}::getOperationType() should not include 'get'
1879         https://bugs.webkit.org/show_bug.cgi?id=123172
1880
1881         Reviewed by Simon Fraser.
1882
1883         No new tests, just a rename.
1884
1885         "get" in WebCore tends to mean that the function has out arguments; these have no arguments.
1886         Rename FilterOperation::getOperationType() to FilterOperation::type().
1887         I noticed that ClipPathOperation had the same mistake, so I fixed it there too.
1888
1889         Removed long and useless list of files.
1890
1891 2013-10-22  Samuel White  <samuel_white@apple.com>
1892
1893         AX: Add paramAttrs to fetch start and end text markers in a given rect.
1894         https://bugs.webkit.org/show_bug.cgi?id=122164
1895
1896         Reviewed by Chris Fleizach.
1897
1898         Added ability to fetch end and start text markers inside a given bounds. This gives ScreenReaders
1899         like VoiceOver a way to retrieve the text markers for a specified column of page text.
1900
1901         Test: platform/mac/accessibility/text-marker-for-bounds.html
1902
1903         * accessibility/AccessibilityObject.cpp:
1904         (WebCore::AccessibilityObject::mainFrame):
1905         (WebCore::AccessibilityObject::topDocument):
1906         (WebCore::AccessibilityObject::visiblePositionForBounds):
1907         * accessibility/AccessibilityObject.h:
1908         * accessibility/AccessibilityRenderObject.cpp:
1909         * accessibility/AccessibilityRenderObject.h:
1910         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1911         (-[WebAccessibilityObjectWrapper screenToContents:]):
1912         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
1913         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1914
1915 2013-10-22  Zoltan Horvath  <zoltan@webkit.org>
1916
1917         [CSS Shapes] Match adjustLogicalLineTopAndLogicalHeightIfNeeded's implementation with Blink's
1918         https://bugs.webkit.org/show_bug.cgi?id=123033
1919
1920         Reviewed by David Hyatt.
1921
1922         In Blink I made this function in a bit different way. This change modifies it
1923         to be identical, which helps a lot in the future cross-merging patches.
1924
1925         No new tests, covered by existing texts.
1926
1927         * rendering/RenderBlockLineLayout.cpp:
1928         (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
1929
1930 2013-10-22  Daniel Bates  <dabates@apple.com>
1931
1932         [iOS] Upstream more ARMv7s bits
1933         https://bugs.webkit.org/show_bug.cgi?id=123052
1934
1935         Reviewed by Joseph Pecoraro.
1936
1937         * Configurations/WebCore.xcconfig:
1938
1939 2013-10-22  Simon Fraser  <simon.fraser@apple.com>
1940
1941         Try to fix Mavericks build; use <> for framework include.
1942
1943         * page/CaptionUserPreferencesMediaAF.cpp:
1944
1945 2013-10-22  Tim Horton  <timothy_horton@apple.com>
1946
1947         GammaFilterOperation seems to be dead code
1948         https://bugs.webkit.org/show_bug.cgi?id=123173
1949
1950         Reviewed by Simon Fraser.
1951
1952         * platform/graphics/filters/FilterOperation.cpp:
1953         * platform/graphics/filters/FilterOperation.h:
1954         Remove dead code.
1955
1956 2013-10-22  Antti Koivisto  <antti@apple.com>
1957
1958         Rename some line box functions to be just about lines
1959         https://bugs.webkit.org/show_bug.cgi?id=123168
1960
1961         Reviewed by Dave Hyatt.
1962
1963         firstLineBoxBaseline -> firstLineBaseline
1964         hasInlineBoxChildren -> hasLines
1965         
1966         Also use hasLines in a bunch of places where firstLineBox() was used.
1967
1968         * accessibility/AccessibilityRenderObject.cpp:
1969         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1970         
1971             Also use hasRenderedText() instead of firstTextBox()
1972
1973         * rendering/RenderFullScreen.cpp:
1974         
1975             Fix namespace.
1976
1977 2013-10-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1978
1979         Adding Mock class to test RTCPeerConnection
1980         https://bugs.webkit.org/show_bug.cgi?id=122848
1981
1982         Reviewed by Eric Carlson.
1983
1984         The following tests can be run:
1985
1986             RTCPeerConnection-createAnswer.html
1987             RTCPeerConnection-createOffer.html
1988             RTCPeerConnection-ice.html
1989             RTCPeerConnection-localDescription.html
1990             RTCPeerConnection-remoteDescription.html
1991             RTCPeerConnection-state.html
1992
1993         Tests that require a MediaStream object, by invoking getUserMedia,
1994         are not ready to run yet.
1995
1996         No new tests needed.
1997
1998         * CMakeLists.txt:
1999         * platform/mediastream/RTCPeerConnectionHandler.cpp:
2000         (WebCore::createHandler):
2001         * platform/mediastream/RTCPeerConnectionHandler.h:
2002         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
2003         * platform/mock/RTCNotifiersMock.cpp: Added.
2004         * platform/mock/RTCNotifiersMock.h: Added.
2005         * platform/mock/RTCPeerConnectionHandlerMock.cpp: Added.
2006         * platform/mock/RTCPeerConnectionHandlerMock.h: Copied from Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h.
2007         * platform/mock/TimerEventBasedMock.h: Added.
2008         * testing/Internals.cpp:
2009         (WebCore::Internals::Internals):
2010         (WebCore::Internals::enableMockRTCPeerConnectionHandler):
2011         * testing/Internals.h:
2012
2013 2013-10-22  Zan Dobersek  <zdobersek@igalia.com>
2014
2015         WebCore::fillWithEmptyClients adopts new empty clients before leaking their pointers
2016         https://bugs.webkit.org/show_bug.cgi?id=122945
2017
2018         Reviewed by Anders Carlsson.
2019
2020         * loader/EmptyClients.cpp:
2021         (WebCore::fillWithEmptyClients): Store the static empty clients as NeverDestroyed, rather than
2022         adopting the pointer of each heap-allocated object and then immediately leaking that pointer.
2023
2024 2013-10-22  Zan Dobersek  <zdobersek@igalia.com>
2025
2026         Simplify HRTFDatabaseLoader's load map
2027         https://bugs.webkit.org/show_bug.cgi?id=122944
2028
2029         Reviewed by Eric Carlson.
2030
2031         * platform/audio/HRTFDatabaseLoader.cpp:
2032         (WebCore::loaderMap): Return a reference to a NeverDestroyed HashMap that maps sample rates to loaders.
2033         (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
2034         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
2035         * platform/audio/HRTFDatabaseLoader.h: Remove the LoaderMap type definition, the private singleton of that type
2036         and the singleton's unused getter.
2037
2038 2013-10-22  Tim Horton  <timothy_horton@apple.com>
2039
2040         Remote Layer Tree: Support hardware accelerated filters
2041         https://bugs.webkit.org/show_bug.cgi?id=123139
2042
2043         Reviewed by Anders Carlsson.
2044
2045         * WebCore.exp.in:
2046         Export a variety of filter-related things.
2047
2048         * platform/graphics/ca/PlatformCAFilters.h:
2049         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2050         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2051         (PlatformCALayerMac::setFilters):
2052         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
2053         (PlatformCAFilters::setFiltersOnLayer):
2054         setFiltersOnLayer should take a PlatformLayer instead of a PlatformCALayer
2055         as its argument, because it doesn't need a PlatformCALayer, and this way
2056         we can share code with the RemoteLayerTreeHost, which only has PlatformLayers
2057         and not PlatformCALayers.
2058
2059 2013-10-22  Brendan Long  <b.long@cablelabs.com>
2060
2061         cue.text fails for some track element cues
2062         https://bugs.webkit.org/show_bug.cgi?id=81123
2063
2064         Reviewed by Eric Carlson.
2065
2066         Test: media/track/track-long-captions-file.html
2067
2068         * html/track/WebVTTParser.cpp:
2069         (WebCore::WebVTTParser::parseBytes): Use buffer when we don't have full lines.
2070         (WebCore::WebVTTParser::fileFinished): Force file to finish parsing.
2071         (WebCore::WebVTTParser::hasRequiredFileIdentifier): Simplify due to using String.
2072         (WebCore::WebVTTParser::collectCueText): Don't automatically create cues when we run out of data.
2073         (WebCore::WebVTTParser::collectNextLine): Use buffer.
2074         * html/track/WebVTTParser.h: Add m_buffer and Finished state.
2075         * loader/TextTrackLoader.cpp:
2076         (WebCore::TextTrackLoader::notifyFinished): Call m_parser->fileFinished() when done.
2077
2078 2013-10-22  peavo@outlook.com  <peavo@outlook.com>
2079
2080         [WinCairo] Compile error.
2081         https://bugs.webkit.org/show_bug.cgi?id=123161
2082
2083         Reviewed by Brent Fulgham.
2084
2085         * rendering/RenderFlowThread.h: Move USE(ACCELERATED_COMPOSITING) guard to expose needed type.
2086
2087 2013-10-21  Brady Eidson  <beidson@apple.com>
2088
2089         Add a cross-platform IDBRecordIdentifier
2090         https://bugs.webkit.org/show_bug.cgi?id=123138
2091
2092         Reviewed by Andreas Kling.
2093
2094         Add the cross-platform header:
2095         * Modules/indexeddb/IDBRecordIdentifier.h: Added.
2096         (WebCore::IDBRecordIdentifier::create):
2097         (WebCore::IDBRecordIdentifier::encodedPrimaryKey):
2098         (WebCore::IDBRecordIdentifier::version):
2099         (WebCore::IDBRecordIdentifier::reset):
2100         (WebCore::IDBRecordIdentifier::IDBRecordIdentifier):
2101         * WebCore.xcodeproj/project.pbxproj:
2102         * GNUmakefile.list.am:
2103
2104         Remove the old abstract and LevelDB classes:
2105         * Modules/indexeddb/IDBBackingStoreInterface.h:
2106         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2107
2108         Use the cross-platform one everywhere:
2109         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2110         (WebCore::IDBBackingStoreLevelDB::putRecord):
2111         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
2112         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
2113         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
2114         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
2115         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
2116
2117         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
2118         (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
2119
2120         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
2121         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
2122
2123         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
2124         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
2125         (WebCore::PutOperation::perform):
2126
2127 2013-10-22  Andrei Bucur  <abucur@adobe.com>
2128
2129         [CSS Regions] Possible performance regression after r157567
2130         https://bugs.webkit.org/show_bug.cgi?id=123016
2131
2132         Reviewed by Andreas Kling.
2133
2134         The revision 157567 http://trac.webkit.org/changeset/157567 may have regressed
2135         Parser/html5-full-render by ~1.1% and Parser/html-parser by ~2%. These changes
2136         try to optimize the initial patch, based on Andreas Kling's review.
2137
2138         The patch also adds a couple of refactorings that should make the code easier to read:
2139         - the CSS Shapes functions are now wrapped in a single #if clause
2140         - the CSS Shapes and CSS Regions pre-layout preparations are wrapped in a helper function
2141
2142         The RenderFlowThread::logicalWidthChangedInRegionsForBlock function is optimized by passing
2143         it information about the state of the relayout children flag. If the flag is true already,
2144         some of the steps are skipped.
2145
2146         Tests: no new tests.
2147
2148         * dom/Element.cpp:
2149         (WebCore::Element::webkitGetRegionFlowRanges):
2150         * inspector/InspectorOverlay.cpp:
2151         (WebCore::buildObjectForElementInfo):
2152         * rendering/RenderBlock.cpp:
2153         (WebCore::shapeInfoRequiresRelayout):
2154         (WebCore::RenderBlock::updateShapesBeforeBlockLayout):
2155         (WebCore::RenderBlock::computeShapeSize):
2156         (WebCore::RenderBlock::prepareShapesAndPaginationBeforeBlockLayout):
2157         * rendering/RenderBlock.h:
2158         * rendering/RenderBlockFlow.cpp:
2159         (WebCore::RenderBlockFlow::layoutBlock):
2160         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
2161         (WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
2162         (WebCore::RenderBlockFlow::ensureRareData):
2163         * rendering/RenderBlockFlow.h:
2164         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
2165         (WebCore::RenderElement::isRenderNamedFlowFragmentContainer):
2166         * rendering/RenderDeprecatedFlexibleBox.cpp:
2167         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2168         * rendering/RenderElement.h:
2169         (WebCore::RenderElement::generatingElement):
2170         * rendering/RenderFlexibleBox.cpp:
2171         (WebCore::RenderFlexibleBox::layoutBlock):
2172         * rendering/RenderFlowThread.cpp:
2173         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
2174         * rendering/RenderFlowThread.h:
2175         * rendering/RenderGrid.cpp:
2176         (WebCore::RenderGrid::layoutBlock):
2177         * rendering/RenderNamedFlowFragment.h:
2178         * rendering/RenderObject.cpp:
2179         * rendering/RenderObject.h:
2180         * rendering/RenderTreeAsText.cpp:
2181         (WebCore::write):
2182         * style/StyleResolveTree.cpp:
2183         (WebCore::Style::elementInsideRegionNeedsRenderer):
2184
2185 2013-10-22  Andreas Kling  <akling@apple.com>
2186
2187         CSSStyleSheet constructor functions should return PassRef.
2188         <https://webkit.org/b/123156>
2189
2190         Make CSSStyleSheet::create*() return PassRef and tighten some call
2191         sites that were using them. Most callers didn't need any tweaks to
2192         take advantage of PassRef.
2193
2194         Reviewed by Antti Koivisto.
2195
2196 2013-10-22  Andreas Kling  <akling@apple.com>
2197
2198         CTTE: RenderMathMLFraction always has a MathMLInlineContainerElement.
2199         <https://webkit.org/b/123154>
2200
2201         This renderer is never anonymous and always has a corresponding
2202         MathMLInlineContainerElement. Overload element() with a tighter
2203         return type.
2204
2205         Also marked the class FINAL and made most member functions private.
2206
2207         Reviewed by Antti Koivisto.
2208
2209 2013-10-22  Andreas Kling  <akling@apple.com>
2210
2211         FontGlyphs constructor functions should return PassRef.
2212         <https://webkit.org/b/123159>
2213
2214         Made the two FontGlyphs creator functions return PassRef and tweaked
2215         the FontGlyphsCache in Font.cpp to make more efficient use of it.
2216
2217         Reviewed by Antti Koivisto.
2218
2219 2013-10-22  Andreas Kling  <akling@apple.com>
2220
2221         Fix some more code to use RenderElement instead of RenderObject.
2222         <https://webkit.org/b/123149>
2223
2224         Using RenderElement where possible lets us skip the isRenderElement()
2225         branch in RenderObject::style() and generates much tighter code.
2226
2227         Reviewed by Antti Koivisto.
2228
2229 2013-10-22  Andreas Kling  <akling@apple.com>
2230
2231         Merge SVG renderers' styleWillChange() into styleDidChange().
2232         <https://webkit.org/b/123108>
2233
2234         This work can just as well be done after setting the style.
2235         Three more styleWillChange() overloads gone.
2236
2237         Reviewed by Antti Koivisto.
2238
2239 2013-10-22  Andreas Kling  <akling@apple.com>
2240
2241         CSSValueList constructor functions should return PassRef.
2242         <https://webkit.org/b/123151>
2243
2244         These functions always return objects, and thus can return PassRef.
2245         Also made CSSValueList::createFromParserValueList() take a reference
2246         since that function is only ever called with a non-null value.
2247
2248         Reviewed by Antti Koivisto.
2249
2250 2013-10-22  Andreas Kling  <akling@apple.com>
2251
2252         Avoid parent style ref churn in createTextRendererIfNeeded().
2253         <https://webkit.org/b/123148>
2254
2255         There's no need to take a temporary ref on the parent's RenderStyle
2256         while creating a text renderer. It's not going away, and the text
2257         renderer is not going to participate in ownership afterwards.
2258
2259         Reviewed by Antti Koivisto.
2260
2261 2013-10-22  Andreas Kling  <akling@apple.com>
2262
2263         Remove some unnecessary null checks in RenderElement::setStyle().
2264         <https://webkit.org/b/123146>
2265
2266         After assigning the new style to RenderElement::m_style, we know that
2267         it'll be non-null, so remove all the checking for this.
2268
2269         Reviewed by Antti Koivisto.
2270
2271 2013-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2272
2273         Introduce ACCESSIBILITY_OBJECT_TYPE_CASTS to replace manual toFoo() in accessibility child class
2274         https://bugs.webkit.org/show_bug.cgi?id=123140
2275
2276         Reviewed by Andreas Kling.
2277
2278         As a step to let toFoo use TYPE_CASTS_BASE, DEFINE_TYPE_CASTS can be used for toFoo() in accessibility
2279         child class. The DEFINE_TYPE_CASTS will generate plenty more helper functions for accessibility type cast.
2280
2281         No new tests, no behavior changes.
2282
2283         * accessibility/AccessibilityList.h:
2284         * accessibility/AccessibilityMenuList.h:
2285         * accessibility/AccessibilityMockObject.h:
2286         * accessibility/AccessibilityNodeObject.h:
2287         * accessibility/AccessibilityObject.h:
2288         * accessibility/AccessibilityRenderObject.h:
2289         * accessibility/AccessibilitySVGRoot.h:
2290         * accessibility/AccessibilityScrollView.h:
2291         * accessibility/AccessibilitySpinButton.h:
2292         * accessibility/AccessibilityTable.h:
2293
2294 2013-10-22  Brian Holt  <brian.holt@samsung.com>
2295
2296         [GTK] Add WebKit2 API for TLS errors
2297         https://bugs.webkit.org/show_bug.cgi?id=120160
2298
2299         Reviewed by Carlos Garcia Campos.
2300
2301         Added a new constructor for CertificateInfo under Soup.
2302
2303         * platform/network/CertificateInfo.h:
2304         * platform/network/soup/CertificateInfoSoup.cpp:
2305         (WebCore::CertificateInfo::CertificateInfo): New constructor using
2306         GTlsCertificateFlags and GTlsCertificate.
2307
2308 2013-10-22  Mihnea Ovidenie  <mihnea@adobe.com>
2309
2310         [CSSRegions] Use RenderStyle::hasFlowFrom when needed
2311         https://bugs.webkit.org/show_bug.cgi?id=122543
2312
2313         Reviewed by David Hyatt.
2314
2315         Rename RenderStyle::hasStyleRegion -> RenderStyle::hasFlowFrom.
2316         Use RenderStyle::hasFlowFrom() helper function instead of directly
2317         checking the value of RenderStyle::regionThread().
2318
2319         No change of functionality, covered by existing tests.
2320
2321         * css/CSSComputedStyleDeclaration.cpp:
2322         (WebCore::contentToCSSValue):
2323         (WebCore::ComputedStyleExtractor::propertyValue):
2324         * css/StyleResolver.cpp:
2325         (WebCore::StyleResolver::adjustRenderStyle):
2326         * dom/PseudoElement.cpp:
2327         (WebCore::PseudoElement::didAttachRenderers):
2328         * dom/PseudoElement.h:
2329         (WebCore::pseudoElementRendererIsNeeded):
2330         * rendering/RenderBlockFlow.cpp:
2331         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
2332         * rendering/RenderLayer.cpp:
2333         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
2334         * rendering/style/RenderStyle.h:
2335
2336 2013-10-21  Brent Fulgham  <bfulgham@apple.com>
2337
2338         [WIN] Properly support reverse animations without needing software fallback.
2339         https://bugs.webkit.org/show_bug.cgi?id=85121
2340
2341         Reviewed by Dean Jackson.
2342
2343         Testing is provided by existing animation tests.
2344
2345         * platform/animation/TimingFunction.h:
2346         (WebCore::CubicBezierTimingFunction::createReversed): Added.
2347         * platform/graphics/ca/GraphicsLayerCA.cpp:
2348         (WebCore::GraphicsLayerCA::addAnimation): The early return when performing a reverse or
2349         autoreverse animation is no longer needed.
2350         * platform/graphics/ca/PlatformCAAnimation.h:
2351         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2352         (toCAMediaTimingFunction): Use new reversed function.
2353         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2354         (toCACFTimingFunction): Ditto.
2355         (PlatformCAAnimation::setTimingFunction): Pass 'reverse' flag.
2356         (PlatformCAAnimation::setTimingFunctions): Ditto.
2357
2358 2013-10-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2359
2360         Use TYPE_CASTS_BASE for CSS_VALUE_TYPE_CASTS
2361         https://bugs.webkit.org/show_bug.cgi?id=123126
2362
2363         Reviewed by Andreas Kling.
2364
2365         TYPE_CASTS_BASE was moved to common place to be used by all toFoo().
2366         CSS_VALUE_TYPE_CASTS starts to use it for CSS child value. This change
2367         generates plenty more helper functions for toCSSFooValue().
2368
2369         Additionally, this use support that toWebKitCSSFooValue, which couldn't
2370         use CSS_VALUE_TYPE_CASTS macro.
2371
2372         No new tests, no behavior change.
2373
2374         * css/CSSAspectRatioValue.h:
2375         * css/CSSBorderImageSliceValue.h:
2376         * css/CSSCalculationValue.h:
2377         * css/CSSCanvasValue.h:
2378         * css/CSSCrossfadeValue.h:
2379         * css/CSSCursorImageValue.h:
2380         * css/CSSFilterImageValue.h:
2381         * css/CSSFontFaceSrcValue.h:
2382         * css/CSSFontFeatureValue.h:
2383         * css/CSSFontValue.h:
2384         * css/CSSFunctionValue.h:
2385         * css/CSSGradientValue.h:
2386         * css/CSSGridTemplateValue.h:
2387         * css/CSSImageSetValue.h:
2388         * css/CSSImageValue.h:
2389         * css/CSSInheritedValue.h:
2390         * css/CSSInitialValue.h:
2391         * css/CSSLineBoxContainValue.h:
2392         * css/CSSPrimitiveValue.h:
2393         * css/CSSReflectValue.h:
2394         * css/CSSShadowValue.h:
2395         * css/CSSTimingFunctionValue.h:
2396         * css/CSSUnicodeRangeValue.h:
2397         * css/CSSValue.h:
2398         * css/CSSValueList.h:
2399         * css/CSSVariableValue.h:
2400         * css/WebKitCSSArrayFunctionValue.h:
2401         * css/WebKitCSSFilterValue.h:
2402         * css/WebKitCSSMatFunctionValue.h:
2403         * css/WebKitCSSMixFunctionValue.h:
2404         * css/WebKitCSSSVGDocumentValue.h:
2405         * css/WebKitCSSShaderValue.h:
2406
2407 2013-10-21  Joone Hur  <joone.hur@intel.com>
2408
2409         Bad cast with toRenderBoxModelObject in RenderBlock::updateFirstLetter()
2410         https://bugs.webkit.org/show_bug.cgi?id=123013
2411
2412         Reviewed by Andreas Kling.
2413
2414         No new tests because this was reported by Google ClusterFuzz.
2415         https://codereview.chromium.org/25713009/
2416
2417         There is a case that toRenderBoxModelObject causes a crash in RenderBlock::updateFirstLetter() 
2418         due to bad cast, so we need to check whether the RenderObject is a RenderBoxModelObject 
2419         by running isBoxModelObject() before calling toRenderBoxModelObject.  
2420
2421         * rendering/RenderBlock.cpp:
2422         (WebCore::RenderBlock::updateFirstLetter):
2423
2424 2013-10-21  Brady Eidson  <beidson@apple.com>
2425
2426         Make IDBTransactionCoordinatorLevelDB cross platform
2427         https://bugs.webkit.org/show_bug.cgi?id=123124
2428
2429         Enthusiastically reviewed by Tim Horton.
2430
2431         * CMakeLists.txt:
2432         * GNUmakefile.list.am:
2433         * WebCore.xcodeproj/project.pbxproj:
2434
2435         Make more methods pure virtual in the interface:
2436         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2437         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
2438         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2439
2440         Update the name of the class, and use IDBTransactionBackendInterface instead of IDBTransactionBackendLeveDB:
2441         * Modules/indexeddb/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp.
2442         (WebCore::IDBTransactionCoordinator::create):
2443         (WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator):
2444         (WebCore::IDBTransactionCoordinator::~IDBTransactionCoordinator):
2445         (WebCore::IDBTransactionCoordinator::didCreateTransaction):
2446         (WebCore::IDBTransactionCoordinator::didStartTransaction):
2447         (WebCore::IDBTransactionCoordinator::didFinishTransaction):
2448         (WebCore::IDBTransactionCoordinator::isActive):
2449         (WebCore::IDBTransactionCoordinator::processStartedTransactions):
2450         (WebCore::doScopesOverlap):
2451         (WebCore::IDBTransactionCoordinator::canRunTransaction):
2452         * Modules/indexeddb/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h.
2453
2454         Update the name of the class elsewhere:
2455         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
2456         (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
2457         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
2458         (WebCore::IDBDatabaseBackendLevelDB::transactionCoordinator):
2459         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2460
2461 2013-10-21  Daniel Bates  <dabates@apple.com>
2462
2463         [iOS] Upstream JSGlobalObject::shouldInterruptScriptBeforeTimeout()
2464         https://bugs.webkit.org/show_bug.cgi?id=123045
2465
2466         Reviewed by Joseph Pecoraro.
2467
2468         * bindings/js/JSDOMWindowBase.cpp:
2469         (WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage): Added.
2470         (WebCore::JSDOMWindowBase::shouldInterruptScript): Extracted comment and assertion
2471         about null Page object into WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage()
2472         so that it can be shared by both this function and JSDOMWindowBase::shouldInterruptScriptBeforeTimeout().
2473         (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
2474         * bindings/js/JSDOMWindowBase.h:
2475         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2476         (WebCore::JSWorkerGlobalScopeBase::shouldInterruptScriptBeforeTimeout): Added.
2477         * bindings/js/JSWorkerGlobalScopeBase.h:
2478         * loader/EmptyClients.h: Added isStopping(). We'll land the iOS chrome client implementation
2479         in a subsequent patch.
2480         * page/ChromeClient.h: Added isStopping().
2481
2482 2013-10-21  Anders Carlsson  <andersca@apple.com>
2483
2484         Navigation policy callback not called when performing the same fragment navigation twice
2485         https://bugs.webkit.org/show_bug.cgi?id=123121
2486         <rdar://problem/15230466>
2487
2488         Reviewed by Beth Dakin.
2489
2490         There's code in PolicyChecker::checkNavigationPolicy that will call the decision function right away 
2491         if the requests are equal, without consulting any policy client. Because of this, make sure to empty out
2492         the last checked request of the document loader when doing a fragment navigation.
2493
2494         * loader/FrameLoader.cpp:
2495         (WebCore::FrameLoader::loadURL):
2496         (WebCore::FrameLoader::loadWithDocumentLoader):
2497
2498 2013-10-21  Jer Noble  <jer.noble@apple.com>
2499
2500         Unreviewed build fix; unprotect the declaration of updateSleepDisabling();
2501
2502         * html/HTMLMediaElement.h:
2503
2504 2013-10-20  Mark Lam  <mark.lam@apple.com>
2505
2506         Avoid JSC debugger overhead unless needed.
2507         https://bugs.webkit.org/show_bug.cgi?id=123084.
2508
2509         Reviewed by Geoffrey Garen.
2510
2511         No new tests.
2512
2513         - If no breakpoints are set, we now avoid calling the debug hook callbacks.
2514         - If no break on exception is set, we also avoid exception event debug callbacks.
2515         - When we return from the ScriptDebugServer to the JSC::Debugger, we may no
2516           longer call the debug hook callbacks if not needed. Hence, the m_currentCallFrame
2517           pointer in the ScriptDebugServer may become stale. To avoid this issue, before
2518           returning, the ScriptDebugServer will clear its m_currentCallFrame if
2519           needsOpDebugCallbacks() is false.
2520
2521         * bindings/js/ScriptDebugServer.cpp:
2522         (WebCore::ScriptDebugServer::setBreakpoint):
2523         (WebCore::ScriptDebugServer::removeBreakpoint):
2524         (WebCore::ScriptDebugServer::clearBreakpoints):
2525         (WebCore::ScriptDebugServer::setPauseOnExceptionsState):
2526         (WebCore::ScriptDebugServer::setPauseOnNextStatement):
2527         (WebCore::ScriptDebugServer::breakProgram):
2528         (WebCore::ScriptDebugServer::stepIntoStatement):
2529         (WebCore::ScriptDebugServer::dispatchDidContinue):
2530         (WebCore::ScriptDebugServer::exception):
2531         (WebCore::ScriptDebugServer::didReachBreakpoint):
2532         * inspector/InspectorDebuggerAgent.cpp:
2533         (WebCore::InspectorDebuggerAgent::reset):
2534
2535 2013-10-21  Myles C. Maxfield  <mmaxfield@apple.com>
2536
2537         Grammar markers are not updated when switching between 1x and 2x
2538         https://bugs.webkit.org/show_bug.cgi?id=122146
2539
2540         Reviewed by Dean Jackson.
2541
2542         When running editing/spelling/grammar-markers-hidpi.html, the 2x
2543         grammar/spelling dot resources are cached. If you then run
2544         editing/spelling/grammar-markers.html without tearing down WebKit,
2545         it re-uses the 2x dots. The difference between the two tests is a call
2546         to testRunner.setBackingScaleFactor().
2547
2548         We create a NSColor from an NSImage, and remember it in a static
2549         variable. However, NSColor inspects the current graphics context to
2550         determine which resolution to use, and then remembers that decision.
2551         Therefore, we want to recreate the NSColor whenever the device pixel
2552         ratio changes. This patch adds a new static function to GraphicsContext
2553         which recreates this NSColor every time the ratio changes.
2554
2555         Tests: editing/spelling/grammar-markers.html
2556                editing/spelling/inline_spelling_markers.html
2557
2558         * platform/graphics/mac/GraphicsContextMac.mm:
2559         (WebCore::makePattern):
2560         (WebCore::GraphicsContext::drawLineForDocumentMarker):
2561
2562 2013-10-21  Simon Fraser  <simon.fraser@apple.com>
2563
2564         Use pink layer borders for compositing layers with a contents layer
2565         https://bugs.webkit.org/show_bug.cgi?id=123118
2566
2567         Reviewed by Dean Jackson.
2568
2569         With the existing layer border colors, it's not possible to distinguish an empty
2570         layer from one with solid color, image or video contents. So use a pink color
2571         for those. This makes it easier to diagnose bugs like 122784.
2572
2573         * platform/graphics/GraphicsLayer.cpp:
2574         (WebCore::GraphicsLayer::getDebugBorderInfo):
2575
2576 2013-10-21  Jer Noble  <jer.noble@apple.com>
2577
2578         Limit use of display sleep assertion when <video> element is off-screen.
2579         https://bugs.webkit.org/show_bug.cgi?id=123041
2580
2581         Reviewed by Darin Adler.
2582
2583         Use page visibility changes to suspend and resume the use of sleep assertions in
2584         HTMLMediaElement.
2585
2586         Page will propogate the page visibility change notifications to its Documents, which
2587         will further propogate those notifications to registered elements.  Upon receiving
2588         these notifications, HTMLMediaElement will release or take a DisplaySleepDisabler
2589         token if necessary.
2590
2591         Also, rename HTMLMediaElement's updateDisableSleep() to updateSleepDisabling() and wrap
2592         the implementation in a PLATFORM(MAC) guard rather than at each call site.
2593
2594         * dom/Document.cpp:
2595         (WebCore::Document::registerForVisibilityStateCallbacks): Added registration method.
2596         (WebCore::Document::unregisterForVisibilityStateCallbacks): Added unregistration method.
2597         (WebCore::Document::visibilityStateChanged): Call all registered clients.
2598         * dom/Document.h:
2599         * dom/Element.h:
2600         (WebCore::Element::visibilityStateChanged): Added default virtual method to be overridden
2601             by subclasses.
2602         * html/HTMLMediaElement.cpp:
2603         (WebCore::HTMLMediaElement::HTMLMediaElement): Register for the notification, and check the
2604             current status of Document::hidden().
2605         (WebCore::HTMLMediaElement::~HTMLMediaElement): Unregister for the notification.
2606         (WebCore::HTMLMediaElement::visibilityStateChanged): Set m_displaySleepDisablingSuspended
2607             and call updateSleepDisabling().
2608         (WebCore::HTMLMediaElement::shouldDisableSleep): Add a check for m_displaySleepDisablingSuspended.
2609         * html/HTMLMediaElement.h:
2610         * page/Page.cpp:
2611         (WebCore::Page::setVisibilityState): Pass to every child document.
2612
2613         Rename updateDisableSleep() -> updateSleepDisabling():
2614         * html/HTMLMediaElement.cpp:
2615         (WebCore::HTMLMediaElement::HTMLMediaElement):
2616         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2617         (WebCore::HTMLMediaElement::parseAttribute):
2618         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
2619         (WebCore::HTMLMediaElement::clearMediaPlayer):
2620         (WebCore::HTMLMediaElement::stop):
2621
2622 2013-10-21  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2623
2624         MediaStreamTrack now tracks its own state
2625         https://bugs.webkit.org/show_bug.cgi?id=123025
2626
2627         Reviewed by Jer Noble.
2628
2629         The spec says that a MediaStreamSource can be shared by different tracks,
2630         so a track must have its own state tracking, synchronizing with its MediaStreamSource when
2631         the underlying MediaStreamSource changes the readyState.
2632         In the old implementation if a user invoked the stop method, its readyState method was still
2633         returning the MediaStreamSource state, which was wrong.
2634         This also adds a setEnabled method, which can be used to set the state of a track when a
2635         remote peer ends it, for instance.
2636
2637         No new tests needed.
2638
2639         * Modules/mediastream/MediaStreamTrack.cpp:
2640         (WebCore::MediaStreamTrack::readyState):
2641         (WebCore::MediaStreamTrack::setState):
2642         (WebCore::MediaStreamTrack::stopProducingData):
2643         (WebCore::MediaStreamTrack::ended):
2644         (WebCore::MediaStreamTrack::sourceStateChanged):
2645         (WebCore::MediaStreamTrack::trackDidEnd):
2646         * Modules/mediastream/MediaStreamTrack.h:
2647
2648 2013-10-21  Tim Horton  <timothy_horton@apple.com>
2649
2650         Remote Layer Tree: Clean up transaction logging
2651         https://bugs.webkit.org/show_bug.cgi?id=123116
2652
2653         Reviewed by Anders Carlsson.
2654
2655         * WebCore.exp.in:
2656         Export some TextStream functions.
2657
2658 2013-10-21  Brady Eidson  <beidson@apple.com>
2659
2660         Transition most use of IDBBackingStoreLevelDB to IDBBackingStoreInterface
2661         https://bugs.webkit.org/show_bug.cgi?id=123105
2662
2663         Reviewed by Anders Carlsson.
2664
2665         Export more required headers:
2666         * WebCore.xcodeproj/project.pbxproj:
2667
2668         Flesh out many of the pure virtual methods on IDBBackingStoreInterface, as well as
2669         the RecordIdentifier and Cursor classes:
2670
2671         * Modules/indexeddb/IDBBackingStoreInterface.h:
2672         (WebCore::IDBBackingStoreInterface::RecordIdentifier::~RecordIdentifier):
2673         (WebCore::IDBBackingStoreInterface::Cursor::~Cursor):
2674
2675         Use IDBBackingStoreInterface, IDBBackingStoreInterface::RecordIdentifier, and
2676         IDBBackingStoreInterface::Cursor wherever possible:
2677
2678         * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
2679         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2680
2681         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2682         (WebCore::IDBBackingStoreLevelDB::putRecord):
2683         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
2684         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
2685         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
2686         (WebCore::ObjectStoreKeyCursorImpl::clone):
2687         (WebCore::ObjectStoreCursorImpl::clone):
2688         (WebCore::IndexKeyCursorImpl::clone):
2689         (WebCore::IndexCursorImpl::clone):
2690         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
2691         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
2692         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
2693         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
2694         (WebCore::IDBBackingStoreLevelDB::Transaction::Transaction):
2695         (WebCore::IDBBackingStoreLevelDB::Transaction::begin):
2696         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2697         (WebCore::IDBBackingStoreLevelDB::RecordIdentifier::RecordIdentifier):
2698
2699         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
2700         (WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
2701         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
2702
2703         (WebCore::IDBCursorBackendLevelDB::create):
2704         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
2705         (WebCore::IDBDatabaseBackendLevelDB::create):
2706         (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
2707         (WebCore::IDBDatabaseBackendLevelDB::backingStore):
2708         (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
2709         (WebCore::IDBDatabaseBackendLevelDB::createTransaction):
2710         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
2711
2712         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2713         (WebCore::IDBFactoryBackendLevelDB::createTransactionBackend):
2714         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2715
2716         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
2717         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys):
2718         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
2719         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed):
2720         (WebCore::IDBObjectStoreBackendLevelDB::makeIndexWriters):
2721         (WebCore::IDBObjectStoreBackendLevelDB::generateKey):
2722         (WebCore::IDBObjectStoreBackendLevelDB::updateKeyGenerator):
2723         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
2724
2725         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
2726         (WebCore::IDBTransactionBackendLevelDB::create):
2727         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
2728         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2729
2730         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
2731         (WebCore::GetOperation::perform):
2732         (WebCore::OpenCursorOperation::perform):
2733         (WebCore::CountOperation::perform):
2734         (WebCore::DeleteRangeOperation::perform):
2735         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
2736         (WebCore::CreateObjectStoreOperation::create):
2737         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
2738         (WebCore::DeleteObjectStoreOperation::create):
2739         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
2740         (WebCore::CreateIndexOperation::create):
2741         (WebCore::CreateIndexOperation::CreateIndexOperation):
2742         (WebCore::DeleteIndexOperation::create):
2743         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
2744         (WebCore::GetOperation::create):
2745         (WebCore::GetOperation::GetOperation):
2746         (WebCore::PutOperation::create):
2747         (WebCore::PutOperation::PutOperation):
2748         (WebCore::OpenCursorOperation::create):
2749         (WebCore::OpenCursorOperation::OpenCursorOperation):
2750         (WebCore::CountOperation::create):
2751         (WebCore::CountOperation::CountOperation):
2752         (WebCore::DeleteRangeOperation::create):
2753         (WebCore::DeleteRangeOperation::DeleteRangeOperation):
2754         (WebCore::ClearOperation::create):
2755         (WebCore::ClearOperation::ClearOperation):
2756
2757 2013-10-21  Zoltan Horvath  <zoltan@webkit.org>
2758
2759         [CSS Shapes][CSS Regions] Don't apply shape-inside when we have multiple auto-height regions and the height is not resolved
2760         https://bugs.webkit.org/show_bug.cgi?id=123103
2761
2762         Reviewed by David Hyatt.
2763
2764         When we have multiple regions with auto-height, the region's height is not resolved from other elements we can't apply the
2765         the shape on the region. This patch prevents to apply the shape and fixes the behavior for these cases.
2766
2767         Test: fast/regions/shape-inside/shape-inside-on-multiple-autoheight-regions.html
2768
2769         * rendering/RenderBlock.cpp:
2770         (WebCore::RenderBlock::layoutShapeInsideInfo):
2771         * rendering/RenderBlockLineLayout.cpp:
2772         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
2773
2774 2013-10-21  Tim Horton  <timothy_horton@apple.com>
2775
2776         Remote Layer Tree: Backing store should take contentsScale into account
2777         https://bugs.webkit.org/show_bug.cgi?id=123106
2778
2779         Reviewed by Simon Fraser.
2780
2781         * WebCore.exp.in:
2782         Export FloatRect::scale.
2783
2784 2013-10-21  Andreas Kling  <akling@apple.com>
2785
2786         RenderScrollbarPart doesn't need styleWillChange().
2787         <https://webkit.org/b/123113>
2788
2789         We will call setInline(false) in styleDidChange(), there's no need
2790         to override styleWillChange() just to do it twice.
2791
2792         Reviewed by Darin Adler.
2793
2794 2013-10-21  Mihai Maerean  <mmaerean@adobe.com>
2795
2796         [CSS Regions] The layers from the flow thread should be collected under the regions' layers.
2797         https://bugs.webkit.org/show_bug.cgi?id=120457
2798
2799         Reviewed by David Hyatt.
2800
2801         This patch is based on the work of Alexandru Chiculita at https://bugs.webkit.org/attachment.cgi?id=203872&action=review
2802
2803         The composited layers inside the named flow threads are collected as part of the regions (as children of the
2804         GraphicsLayer of the layer that corresponds to the region (which is attached to the parent renderer of
2805         RenderNameFlowFragment)).
2806         When a region displays a layer that needs accelerated compositing we activate the accelerated compositing for
2807         that region too (inside RenderLayerCompositor::computeRegionCompositingRequirements).
2808
2809         This patch has landed before (as http://trac.webkit.org/changeset/156451), but was reverted because
2810         fast/multicol/mixed-positioning-stacking-order.html failed. The fix is inside RenderLayerCompositor::canBeComposited
2811         that only enables compositing for layers inside flow threads that collect the graphics layers under the regions.
2812
2813         Another change from changeset #156451 is that now the region renderers are created as anonymous renderers under
2814         the element that has the flow-from property. When a composited layer is needed for the region, it sits in it's
2815         parent renderer, not in the region renderer (RenderNamedFlowFragment).
2816
2817         Tests: compositing/regions/crash-transform-inside-region.html
2818                compositing/regions/floated-region-with-transformed-child.html
2819                compositing/regions/move-layer-from-one-region-to-another.html
2820                compositing/regions/propagate-region-box-shadow-border-padding-for-video.html
2821                compositing/regions/propagate-region-box-shadow-border-padding.html
2822                compositing/regions/region-as-layer-in-another-flowthread.html
2823                compositing/regions/transform-transparent-positioned-video-inside-region.html
2824                compositing/regions/transformed-layer-inside-transformed-layer.html
2825                compositing/regions/z-index-update.html
2826                compositing/regions/z-index.html
2827
2828         * rendering/FlowThreadController.cpp:
2829         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
2830         * rendering/RenderElement.cpp:
2831         (WebCore::RenderElement::propagateStyleToAnonymousChildren): Not for RenderFlowThreads, as they are updated
2832         through the RenderView::styleDidChange function.
2833         * rendering/RenderFlowThread.cpp:
2834         (WebCore::RenderFlowThread::layout): When the layout of the flow thread is over (including the 2 phase layout),
2835         we update all the mappings between the layers inside the flow thread and the regions where those layers will be
2836         painted.
2837         (WebCore::RenderFlowThread::hasCompositingRegionDescendant): Whether any of the regions has a compositing descendant.
2838         (WebCore::RenderFlowThread::getLayerListForRegion):
2839         (WebCore::RenderFlowThread::regionForCompositedLayer):
2840         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
2841         (WebCore::RenderFlowThread::collectsGraphicsLayersUnderRegions):
2842         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Triggers an update of the layers if a layer has moved
2843         from a region to another since the last update.
2844         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
2845         * rendering/RenderFlowThread.h:
2846         * rendering/RenderGeometryMap.cpp:
2847         (WebCore::RenderGeometryMap::pushRenderFlowThread):
2848         * rendering/RenderGeometryMap.h:
2849         * rendering/RenderLayer.cpp:
2850         (WebCore::RenderLayer::paintList):
2851         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
2852         (WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
2853         (WebCore::RenderLayer::hitTestList):
2854         (WebCore::RenderLayer::calculateLayerBounds): When we calculate the bounds of the RenderView, we ignore those
2855         flow threads that collect the graphics layers under the regions.
2856         (WebCore::RenderLayer::dirtyZOrderLists):
2857         (WebCore::RenderLayer::dirtyNormalFlowList):
2858         * rendering/RenderLayer.h:
2859         * rendering/RenderLayerBacking.cpp:
2860         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Not if it's a flow thread that collects the graphics
2861         layers under the regions
2862         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Now adjusts the ancestorCompositingBounds for the FlowThread.
2863         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): Make sure that the region propagates
2864         its borders, paddings, outlines or box-shadows to layers inside it.
2865         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2866         * rendering/RenderLayerBacking.h:
2867         * rendering/RenderLayerCompositor.cpp:
2868         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Now calls computeRegionCompositingRequirements.
2869         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
2870         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Do not iterate the RenderFlowThread directly if
2871         we are going to collect the composited layers as part of regions.
2872         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
2873         (WebCore::RenderLayerCompositor::canBeComposited): CSS Regions flow threads do not need to be composited as we
2874         use composited RenderRegions to render the background of the RenderFlowThread.
2875         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): If it's a container of a css region.
2876         * rendering/RenderLayerCompositor.h:
2877         * rendering/RenderMultiColumnSet.cpp:
2878         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
2879         * rendering/RenderMultiColumnSet.h:
2880         * rendering/RenderNamedFlowFragment.h:
2881         (WebCore::RenderNamedFlowFragment::layerOwner): When the content inside the region requires the region to have a
2882         layer, the layer will be created on the region's parent renderer instead. This method returns that renderer
2883         holding the layer. The return value may be null.
2884         * rendering/RenderNamedFlowThread.cpp:
2885         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2886         (WebCore::RenderNamedFlowThread::nextRendererForNode):
2887         (WebCore::RenderNamedFlowThread::previousRendererForNode):
2888         (WebCore::RenderNamedFlowThread::addFlowChild):
2889         (WebCore::RenderNamedFlowThread::removeFlowChild):
2890         (WebCore::RenderNamedFlowThread::collectsGraphicsLayersUnderRegions):
2891         * rendering/RenderNamedFlowThread.h: m_flowThreadChildList is now allocated through an OwnPtr to keep the render
2892         arena under the size limit.
2893         * rendering/RenderRegion.cpp:
2894         (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
2895         * rendering/RenderRegion.h:
2896         (WebCore::toRenderRegion):
2897         * rendering/RenderTreeAsText.cpp:
2898         (WebCore::writeLayers):
2899         * WebCore.exp.in: WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions
2900
2901 2013-10-21  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2902
2903         Fixing mediastream debug build
2904         https://bugs.webkit.org/show_bug.cgi?id=123104
2905
2906         Reviewed by Andreas Kling.
2907
2908         No new tests needed.
2909
2910         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
2911         (WebCore::RTCDTMFToneChangeEvent::create):
2912
2913 2013-10-21  Andreas Kling  <akling@apple.com>
2914
2915         Merge RenderListMarker::styleWillChange() into styleDidChange().
2916         <https://webkit.org/b/123098>
2917
2918         If the marker's list-style-type or list-style-position changed, we
2919         need to dirty the layout. Move this logic to styleDidChange() so we
2920         can get rid of one styleWillChange() overload.
2921
2922         Reviewed by Antti Koivisto.
2923
2924 2013-10-21  Mihai Maerean  <mmaerean@adobe.com>
2925
2926         [CSS Regions] Fix WHITESPACE issues in the CSS grammar.
2927         https://bugs.webkit.org/show_bug.cgi?id=123082
2928
2929         Reviewed by Andreas Kling.
2930
2931         This is a port of Rune Lillesveen's patch from https://codereview.chromium.org/25607005
2932
2933         Fix WHITESPACE issues in the CSS grammar.
2934
2935         A single WHITESPACE token consumes consecutive spaces, but does not consume
2936         spaces separated by comments. That means S* and S+ in CSS grammars need to
2937         accept multiple WHITESPACE tokens. Additionally, white spaces are not
2938         mandatory to separate an @-symbol and the rest of the prelude.
2939
2940         Use space non-terminal instead of WHITESPACE for S+ in calc expressions.
2941
2942         Use maybe_space non-terminal instead of WHITESPACE for S* after @-webkit-filter
2943         and @-webkit-region.
2944
2945         Tests: fast/css/calc-comments-allowed.html
2946                fast/regions/webkit-region-syntax-space.html
2947
2948         * css/CSSGrammar.y.in:
2949
2950 2013-10-21  Anton Obzhirov  <a.obzhirov@samsung.com>
2951
2952         [ATK] Use atk_object_notify_state_change instead of manually emitting signals
2953         https://bugs.webkit.org/show_bug.cgi?id=122968
2954
2955         Reviewed by Mario Sanchez Prada.
2956
2957         Refactor emitting "state-change" event to use atk_object_notify_state_change
2958         instead of using g_signal_emit_by_name.
2959
2960         * accessibility/atk/AXObjectCacheAtk.cpp:
2961         (WebCore::notifyChildrenSelectionChange):
2962         (WebCore::AXObjectCache::postPlatformNotification):
2963         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2964         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
2965         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2966         (webkitAccessibleDetach):
2967         * editing/atk/FrameSelectionAtk.cpp:
2968         (WebCore::maybeEmitTextFocusChange):
2969
2970 2013-10-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2971
2972         Make TYPE_CASTS_BASE more flexible
2973         https://bugs.webkit.org/show_bug.cgi?id=122951
2974
2975         Reviewed by Andreas Kling.
2976
2977         TYPE_CASTS_BASE is being used by node|element type casts. However, it is difficult
2978         to be used by other type casts. For instance, CSSValue, Accessibility and so on.
2979         This patch modifies TYPE_CASTS_BASE which can support other type casts.
2980
2981         Besides TYPE_CASTS_BASE body is moved from node.h to Assertions.h.
2982
2983         No new tests, no behavior changes.
2984
2985         * dom/Document.h:
2986         * dom/Node.h:
2987
2988 2013-10-21  Santosh Mahto  <santosh.ma@samsung.com>
2989
2990         ASSERTION FAILED: !style->propertyIsImportant(propertyID) in WebCore::setTextDecorationProperty
2991         https://bugs.webkit.org/show_bug.cgi?id=122097
2992
2993         Reviewed by Ryosuke Niwa.
2994
2995         When remove format command is called we pushdown the ancestor style
2996         down to its children. Currently applying inline style to iframe
2997         while pushing down style which causes iframe to be reinserted in tree and
2998         triggres again subframe loading which repeats everytime and finally
2999         crash happens. So we should avoid applying inline style to iframe
3000         element as it doesnot reflect in its content while pushing down style
3001         on it.
3002
3003         And ASSERT call has been removed from setTextDecoration property as
3004         the scenario is perfectly valid case.
3005
3006         Test: editing/execCommand/remove-format-textdecoration-in-iframe.html
3007
3008         * editing/ApplyStyleCommand.cpp:
3009         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Return if
3010         element is iframe.
3011         * editing/EditingStyle.cpp:
3012         (WebCore::StyleChange::setTextDecorationProperty): Remove ASSERT.
3013
3014 2013-10-20  Sam Weinig  <sam@webkit.org>
3015
3016         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 5)
3017         https://bugs.webkit.org/show_bug.cgi?id=122969
3018
3019         Reviewed by Antti Koivisto.
3020
3021         - Move m_lineBoxes to RenderBlockFlow.
3022
3023         * accessibility/AccessibilityRenderObject.cpp:
3024         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3025         * rendering/HitTestResult.cpp:
3026         (WebCore::HitTestResult::innerTextIfTruncated):
3027         * rendering/RenderBlock.cpp:
3028         (WebCore::RenderBlock::RenderBlock):
3029         (WebCore::RenderBlock::willBeDestroyed):
3030         (WebCore::RenderBlock::deleteLineBoxTree):
3031         (WebCore::RenderBlock::isSelfCollapsingBlock):
3032         (WebCore::RenderBlock::removeFromDelayedUpdateScrollInfoSet):
3033         (WebCore::RenderBlock::paintContents):
3034         (WebCore::blockDirectionOffset):
3035         (WebCore::inlineDirectionOffset):
3036         (WebCore::RenderBlock::inlineSelectionGaps):
3037         (WebCore::RenderBlock::hitTestContents):
3038         (WebCore::positionForPointRespectingEditingBoundaries):
3039         (WebCore::RenderBlock::positionForPointWithInlineChildren):
3040         (WebCore::RenderBlock::firstLineBoxBaseline):
3041         (WebCore::RenderBlock::inlineBlockBaseline):
3042         (WebCore::RenderBlock::addFocusRingRectsForInlineChildren):
3043         (WebCore::RenderBlock::addFocusRingRects):
3044         (WebCore::RenderBlock::showLineTreeAndMark):
3045         * rendering/RenderBlock.h:
3046         (WebCore::RenderBlock::addOverflowFromInlineChildren):
3047         (WebCore::RenderBlock::hasInlineBoxChildren):
3048         (WebCore::RenderBlock::paintInlineChildren):
3049         (WebCore::RenderBlock::hitTestInlineChildren):
3050         * rendering/RenderBlockFlow.cpp:
3051         (WebCore::RenderBlockFlow::RenderBlockFlow):
3052         (WebCore::RenderBlockFlow::willBeDestroyed):
3053         (WebCore::RenderBlockFlow::deleteLineBoxTree):
3054         (WebCore::RenderBlockFlow::hitTestInlineChildren):
3055         (WebCore::RenderBlockFlow::adjustForBorderFit):
3056         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
3057         (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
3058         (WebCore::RenderBlockFlow::firstLineBoxBaseline):
3059         (WebCore::RenderBlockFlow::inlineBlockBaseline):
3060         (WebCore::RenderBlockFlow::inlineSelectionGaps):
3061         (WebCore::RenderBlockFlow::positionForBox):
3062         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
3063         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
3064         (WebCore::RenderBlockFlow::paintInlineChildren):
3065         (WebCore::RenderBlockFlow::relayoutForPagination):
3066         (WebCore::RenderBlockFlow::showLineTreeAndMark):
3067         * rendering/RenderBlockFlow.h:
3068         (WebCore::RenderBlockFlow::lineBoxes):
3069         (WebCore::RenderBlockFlow::firstLineBox):
3070         (WebCore::RenderBlockFlow::lastLineBox):
3071         (WebCore::RenderBlockFlow::firstRootBox):
3072         (WebCore::RenderBlockFlow::lastRootBox):
3073         * rendering/RenderBlockLineLayout.cpp:
3074         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
3075         * rendering/RootInlineBox.cpp:
3076         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
3077
3078 2013-10-20  Andreas Kling  <akling@apple.com>
3079
3080         Avoid unnecessary vector copy in AnimationController event dispatch.
3081         <https://webkit.org/b/122994>
3082
3083         Use Vector's move constructor instead of making a copy of the pending
3084         events queue and then clearing it.
3085
3086         Reviewed by Simon Fraser.
3087
3088 2013-10-19  Brady Eidson  <beidson@apple.com>
3089
3090         Add abstract IDBBackingStoreInterface, use it to get IDBDatabaseBackendLevelDB closer to going cross-platform
3091         https://bugs.webkit.org/show_bug.cgi?id=123074
3092
3093         Reviewed by Andreas Kling.
3094
3095         * Modules/indexeddb/IDBBackingStoreInterface.h: Added.
3096         (WebCore::IDBBackingStoreInterface::~IDBBackingStoreInterface):
3097         (WebCore::IDBBackingStoreInterface::Transaction::~Transaction):
3098
3099         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3100
3101         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3102         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseIntVersion):
3103         (WebCore::IDBBackingStoreLevelDB::createObjectStore):
3104         (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
3105         (WebCore::IDBBackingStoreLevelDB::getRecord):
3106         (WebCore::IDBBackingStoreLevelDB::putRecord):
3107         (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
3108         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
3109         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
3110         (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
3111         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
3112         (WebCore::IDBBackingStoreLevelDB::createIndex):
3113         (WebCore::IDBBackingStoreLevelDB::deleteIndex):
3114         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
3115         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
3116         (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
3117         (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
3118         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
3119         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
3120         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
3121         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
3122         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3123         (WebCore::IDBBackingStoreLevelDB::Transaction::reset):
3124         (WebCore::IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom):
3125
3126         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
3127         (WebCore::IDBCursorBackendLevelDB::deleteFunction):
3128         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
3129
3130         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
3131         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys):
3132         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
3133         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed):
3134         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
3135
3136         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3137         (WebCore::IDBTransactionBackendLevelDB::backingStoreTransaction):
3138
3139         * WebCore.xcodeproj/project.pbxproj:
3140         * GNUmakefile.list.am:
3141
3142 2013-10-20  Andreas Kling  <akling@apple.com>
3143
3144         Use PassRef for StyleSheetContents.
3145         <https://webkit.org/b/123083>
3146
3147         Let functions that return newly-constructed StyleSheetContents
3148         objects vend PassRef<StyleSheetContents> instead of PassRefPtr.
3149
3150         Updated functions that take StyleSheetContents in arguments
3151         accordingly. And CSSStyleSheet now has a Ref internally. Woo!
3152
3153         Reviewed by Antti Koivisto.
3154
3155 2013-10-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3156
3157         Removing "unused parameter" compiling warnings from WebKit2 and WebCore
3158         https://bugs.webkit.org/show_bug.cgi?id=123075
3159
3160         Reviewed by Andreas Kling.
3161
3162         No new tests needed.
3163
3164         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
3165         (WebCore::RTCDTMFToneChangeEvent::create):
3166         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3167         (lineAtPositionForAtkBoundary):
3168         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3169         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
3170
3171 2013-10-19  Andreas Kling  <akling@apple.com>
3172
3173         Use PassRef for constructing StyleRules.
3174         <https://webkit.org/b/123072>
3175
3176         Let functions that return newly-constructed StyleRuleFoo objects
3177         vend PassRef<StyleRuleFoo> instead of PassRefPtr.
3178
3179         Since StyleRuleBase::copy() has to return something, we can't rely
3180         on ASSERT_NOT_REACHED() + return nullptr anymore, so I've replaced
3181         those with CRASH(). No call sites actually handled null anyway.
3182
3183         Reviewed by Sam Weinig.
3184
3185 2013-10-19  Jer Noble  <jer.noble@apple.com>
3186
3187         Unreviewed roll out of r157695; broke Mac builds.
3188
3189         * Configurations/FeatureDefines.xcconfig:
3190
3191 2013-10-07  Jer Noble  <jer.noble@apple.com>
3192
3193         [MSE] [Mac] Enable MediaSource on the Mac
3194         https://bugs.webkit.org/show_bug.cgi?id=122484
3195
3196         Reviewed by Darin Adler.
3197
3198         Enable ENABLE_MEDIA_SOURCE.
3199
3200         * Configurations/FeatureDefines.xcconfig:
3201
3202 2013-10-19  Sam Weinig  <sam@webkit.org>
3203
3204         CTTE: Tighten up type usage around InputType::innerTextElement()
3205         https://bugs.webkit.org/show_bug.cgi?id=123078
3206
3207         Reviewed by Anders Carlsson.
3208
3209         * editing/TextIterator.cpp:
3210         (WebCore::TextIterator::handleReplacedElement):
3211         * html/HTMLElement.h:
3212         (WebCore::HTMLElement::isTextControlInnerTextElement):
3213         * html/HTMLInputElement.cpp:
3214         (WebCore::HTMLInputElement::innerTextElement):
3215         * html/HTMLInputElement.h:
3216         * html/HTMLTextAreaElement.cpp:
3217         (WebCore::HTMLTextAreaElement::innerTextElement):
3218         * html/HTMLTextAreaElement.h:
3219         * html/HTMLTextFormControlElement.cpp:
3220         (WebCore::hasVisibleTextArea):
3221         (WebCore::HTMLTextFormControlElement::selection):
3222         (WebCore::HTMLTextFormControlElement::innerTextValue):
3223         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
3224         * html/HTMLTextFormControlElement.h:
3225         * html/InputType.h:
3226         (WebCore::InputType::innerTextElement):
3227         * html/TextFieldInputType.cpp:
3228         (WebCore::TextFieldInputType::forwardEvent):
3229         (WebCore::TextFieldInputType::innerTextElement):
3230         * html/TextFieldInputType.h:
3231         * html/shadow/TextControlInnerElements.cpp:
3232         (WebCore::TextControlInnerTextElement::renderer):
3233         * html/shadow/TextControlInnerElements.h:
3234         (WebCore::isTextControlInnerTextElement):
3235         * rendering/RenderObject.h:
3236         (WebCore::RenderObject::isTextControlInnerBlock):
3237         * rendering/RenderTextControl.cpp:
3238         (WebCore::RenderTextControl::innerTextElement):
3239         (WebCore::RenderTextControl::styleDidChange):
3240         (WebCore::RenderTextControl::textBlockLogicalWidth):
3241         (WebCore::RenderTextControl::updateFromElement):
3242         (WebCore::RenderTextControl::computeLogicalHeight):
3243         (WebCore::RenderTextControl::hitInnerTextElement):
3244         * rendering/RenderTextControl.h:
3245         * rendering/RenderTextControlSingleLine.cpp:
3246         (WebCore::RenderTextControlSingleLine::layout):
3247         (WebCore::RenderTextControlSingleLine::styleDidChange):
3248         (WebCore::RenderTextControlSingleLine::autoscroll):
3249         (WebCore::RenderTextControlSingleLine::scroll):
3250         (WebCore::RenderTextControlSingleLine::logicalScroll):
3251         * rendering/RenderTextControlSingleLine.h:
3252         (WebCore::toRenderTextControlInnerBlock):
3253
3254 2013-10-19  Sam Weinig  <sam@webkit.org>
3255
3256         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 4)
3257         https://bugs.webkit.org/show_bug.cgi?id=122969
3258
3259         Reviewed by Andreas Kling.
3260
3261         - Fix classes derived from RenderBlockFlow that were still calling
3262           up to RenderBlock rather than RenderBlockFlow.
3263
3264         * rendering/RenderDetailsMarker.cpp:
3265         (WebCore::RenderDetailsMarker::paint):
3266         * rendering/RenderFieldset.cpp:
3267         (WebCore::RenderFieldset::computePreferredLogicalWidths):
3268         (WebCore::RenderFieldset::paintBoxDecorations):
3269         (WebCore::RenderFieldset::paintMask):
3270         * rendering/RenderFileUploadControl.cpp:
3271         (WebCore::RenderFileUploadControl::paintObject):
3272         * rendering/RenderFlowThread.cpp:
3273         (WebCore::RenderFlowThread::styleDidChange):
3274         (WebCore::RenderFlowThread::layout):
3275         (WebCore::RenderFlowThread::nodeAtPoint):
3276         * rendering/RenderFullScreen.cpp:
3277         (RenderFullScreenPlaceholder::willBeDestroyed):
3278         * rendering/RenderListItem.cpp:
3279         (WebCore::RenderListItem::styleDidChange):
3280         * rendering/RenderMultiColumnBlock.cpp:
3281         (WebCore::RenderMultiColumnBlock::styleDidChange):
3282         (WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
3283         (WebCore::RenderMultiColumnBlock::addChild):
3284         * rendering/RenderProgress.cpp:
3285         (WebCore::RenderProgress::updateFromElement):
3286         * rendering/RenderRuby.cpp:
3287         (WebCore::RenderRubyAsBlock::styleDidChange):
3288         (WebCore::RenderRubyAsBlock::addChild):
3289         (WebCore::RenderRubyAsBlock::removeChild):
3290         * rendering/RenderRubyRun.cpp:
3291         (WebCore::RenderRubyRun::rubyBaseSafe):
3292         (WebCore::RenderRubyRun::addChild):
3293         (WebCore::RenderRubyRun::removeChild):
3294         (WebCore::RenderRubyRun::layout):
3295         * rendering/RenderRubyText.cpp:
3296         (WebCore::RenderRubyText::textAlignmentForLine):
3297         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
3298         * rendering/RenderTableCaption.cpp:
3299         (WebCore::RenderTableCaption::willBeRemovedFromTree):
3300         * rendering/RenderTableCell.cpp:
3301         (WebCore::RenderTableCell::willBeRemovedFromTree):
3302         (WebCore::RenderTableCell::computePreferredLogicalWidths):
3303         (WebCore::RenderTableCell::offsetFromContainer):
3304         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
3305         (WebCore::RenderTableCell::computeRectForRepaint):
3306         (WebCore::RenderTableCell::styleDidChange):
3307         (WebCore::RenderTableCell::borderLeft):
3308         (WebCore::RenderTableCell::borderRight):
3309         (WebCore::RenderTableCell::borderTop):
3310         (WebCore::RenderTableCell::borderBottom):
3311         (WebCore::RenderTableCell::borderStart):
3312         (WebCore::RenderTableCell::borderEnd):
3313         (WebCore::RenderTableCell::borderBefore):
3314         (WebCore::RenderTableCell::borderAfter):
3315         (WebCore::RenderTableCell::paint):
3316         * rendering/RenderTextControl.cpp:
3317         (WebCore::RenderTextControl::styleDidChange):
3318         * rendering/RenderTextControlSingleLine.cpp:
3319         (WebCore::RenderTextControlSingleLine::scrollWidth):
3320         (WebCore::RenderTextControlSingleLine::scrollHeight):
3321         (WebCore::RenderTextControlSingleLine::scrollLeft):
3322         (WebCore::RenderTextControlSingleLine::scrollTop):
3323         (WebCore::RenderTextControlSingleLine::scroll):
3324         (WebCore::RenderTextControlSingleLine::logicalScroll):
3325         * rendering/RenderTextTrackCue.cpp:
3326         (WebCore::RenderTextTrackCue::layout):
3327         * rendering/RenderView.cpp:
3328         (WebCore::RenderView::layoutContent):
3329         (WebCore::RenderView::addChild):
3330         (WebCore::RenderView::visualOverflowRect):
3331         (WebCore::RenderView::styleDidChange):
3332         * rendering/svg/RenderSVGBlock.cpp:
3333         (WebCore::RenderSVGBlock::setStyle):
3334         (WebCore::RenderSVGBlock::updateFromStyle):
3335         (WebCore::RenderSVGBlock::willBeDestroyed):
3336         (WebCore::RenderSVGBlock::styleWillChange):
3337         (WebCore::RenderSVGBlock::styleDidChange):
3338         * rendering/svg/SVGTextQuery.cpp:
3339         (WebCore::flowBoxForRenderer):
3340
3341 2013-10-19  Sam Weinig  <sam@webkit.org>
3342
3343         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 3)
3344         https://bugs.webkit.org/show_bug.cgi?id=122969
3345
3346         Reviewed by Andreas Kling.
3347
3348         - Move containsNonZeroBidiLevel to RenderBlockFlow.
3349
3350         * editing/Editor.cpp:
3351         (WebCore::Editor::hasBidiSelection):
3352         * rendering/RenderBlock.cpp:
3353         * rendering/RenderBlock.h:
3354         * rendering/RenderBlockFlow.cpp:
3355         (WebCore::RenderBlockFlow::containsNonZeroBidiLevel):
3356         * rendering/RenderBlockFlow.h:
3357
3358 2013-10-18  Sam Weinig  <sam@webkit.org>
3359
3360         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 2)
3361         https://bugs.webkit.org/show_bug.cgi?id=122969
3362
3363         Reviewed by Antti Koivisto.
3364
3365         - Move truncation (e.g. line clamp and ellipse) support to RenderBlockFlow.
3366
3367         * rendering/EllipsisBox.cpp:
3368         (WebCore::EllipsisBox::EllipsisBox):
3369         (WebCore::EllipsisBox::paint):
3370         (WebCore::EllipsisBox::markupBox):
3371         (WebCore::EllipsisBox::selectionRect):
3372         (WebCore::EllipsisBox::paintSelection):
3373         (WebCore::EllipsisBox::nodeAtPoint):
3374         * rendering/EllipsisBox.h:
3375         * rendering/RenderBlock.cpp:
3376         * rendering/RenderBlock.h:
3377         * rendering/RenderBlockFlow.cpp:
3378         (WebCore::shouldCheckLines):
3379         (WebCore::RenderBlockFlow::lineAtIndex):
3380         (WebCore::RenderBlockFlow::lineCount):
3381         (WebCore::getHeightForLineCount):
3382         (WebCore::RenderBlockFlow::heightForLineCount):
3383         (WebCore::RenderBlockFlow::clearTruncation):
3384         * rendering/RenderBlockFlow.h:
3385         * rendering/RenderDeprecatedFlexibleBox.cpp:
3386         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3387         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
3388         * rendering/RootInlineBox.cpp:
3389         (WebCore::RootInlineBox::placeEllipsis):
3390
3391 2013-10-19  Andreas Kling  <akling@apple.com>
3392
3393         StyleResolver should deal in PassRef<RenderStyle> where possible.
3394         <https://webkit.org/b/123061>
3395
3396         Make StyleResolver functions that returned or took RenderStyles
3397         by PassRefPtr use PassRef instead where possible.
3398
3399         Reviewed by Anders Carlsson.
3400
3401 2013-10-19  Brady Eidson  <beidson@apple.com>
3402
3403         Global rename of the class "IDBBackingStore" to "IDBBackingStoreLevelDB"
3404
3405         Rubberstamped by Anders Carlsson (And Andreas Kling wanted to, but he wasn’t around)
3406
3407         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3408         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3409         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3410         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
3411         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
3412         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
3413         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
3414         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3415         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3416         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
3417         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
3418         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
3419         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3420         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
3421         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
3422
3423 2013-10-19  peavo@outlook.com  <peavo@outlook.com>
3424
3425         [WinCairo] Link fails.
3426         https://bugs.webkit.org/show_bug.cgi?id=123019
3427
3428         Reviewed by Darin Adler.
3429
3430         Added empty CertificateInfo implementation for Curl.
3431
3432         * WebCore.vcxproj/WebCore.vcxproj:
3433         * WebCore.vcxproj/WebCore.vcxproj.filters:
3434         * platform/network/curl/CertificateInfoCurl.cpp: Added.
3435         (WebCore::CertificateInfo::CertificateInfo):
3436         (WebCore::CertificateInfo::~CertificateInfo):
3437
3438 2013-10-19  Filip Pizlo  <fpizlo@apple.com>
3439
3440         libWebCoreTestSupport should have explicit exports
3441         https://bugs.webkit.org/show_bug.cgi?id=123053
3442
3443         Reviewed by Oliver Hunt.
3444
3445         No new tests because there is no change in behavior.
3446
3447         * Configurations/WebCoreTestSupport.xcconfig:
3448         * testing/js/WebCoreTestSupport.h:
3449
3450 2013-10-18  Andreas Kling  <akling@apple.com>
3451
3452         Start passing RenderStyle around with PassRef.
3453         <https://webkit.org/b/123051>
3454
3455         Made the RenderStyle::create methods return PassRef<RenderStyle>
3456         and RenderElement::setStyle take a PassRef<RenderStyle>.
3457
3458         Reviewed by Darin Adler.
3459
3460 2013-10-18  Sam Weinig  <sam@webkit.org>
3461
3462         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 1)
3463         https://bugs.webkit.org/show_bug.cgi?id=122969
3464
3465         Reviewed by Dan Bernstein.
3466
3467         - Make the RootInlineBox constructor take a RenderBlockFlow.
3468         - Move createRootInlineBox, and createAndAppendRootInlineBox to RenderBlockFlow.
3469
3470         * editing/VisibleUnits.cpp:
3471         (WebCore::absoluteLineDirectionPointToLocalPointInBlock):
3472         * rendering/InlineBox.cpp:
3473         (WebCore::InlineBox::locationIncludingFlipping):
3474         (WebCore::InlineBox::flipForWritingMode):
3475         * rendering/InlineFlowBox.cpp:
3476         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
3477         * rendering/RenderBlock.cpp:
3478         * rendering/RenderBlock.h:
3479         * rendering/RenderBlockFlow.h:
3480         * rendering/RenderBlockLineLayout.cpp:
3481         (WebCore::RenderBlockFlow::createRootInlineBox):
3482         (WebCore::RenderBlockFlow::createAndAppendRootInlineBox):
3483         (WebCore::createInlineBoxForRenderer):
3484         (WebCore::RenderBlockFlow::createLineBoxes):
3485         * rendering/RenderBox.cpp:
3486         (WebCore::RenderBox::positionLineBox):
3487         * rendering/RenderListMarker.cpp:
3488         (WebCore::RenderListMarker::localSelectionRect):
3489         * rendering/RenderReplaced.cpp:
3490         (WebCore::RenderReplaced::localSelectionRect):
3491         * rendering/RootInlineBox.cpp:
3492         (WebCore::RootInlineBox::RootInlineBox):
3493         (WebCore::RootInlineBox::rendererLineBoxes):
3494         (WebCore::RootInlineBox::placeEllipsis):
3495         (WebCore::RootInlineBox::containingRegion):
3496         (WebCore::RootInlineBox::setContainingRegion):
3497         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
3498         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
3499         (WebCore::RootInlineBox::lineSnapAdjustment):
3500         (WebCore::RootInlineBox::lineSelectionGap):
3501         (WebCore::RootInlineBox::computeCaretRect):
3502         (WebCore::RootInlineBox::selectionTop):
3503         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
3504         (WebCore::RootInlineBox::selectionBottom):
3505         (WebCore::RootInlineBox::blockDirectionPointInLine):
3506         (WebCore::RootInlineBox::blockFlow):
3507         (WebCore::RootInlineBox::closestLeafChildForPoint):
3508         (WebCore::RootInlineBox::removeLineBoxFromRenderObject):
3509         (WebCore::RootInlineBox::extractLineBoxFromRenderObject):
3510         (WebCore::RootInlineBox::attachLineBoxToRenderObject):
3511         * rendering/RootInlineBox.h:
3512         * rendering/TrailingFloatsRootInlineBox.h:
3513         * rendering/svg/RenderSVGText.h:
3514         (WebCore::toRenderSVGText):
3515         * rendering/svg/SVGRootInlineBox.cpp:
3516         (WebCore::SVGRootInlineBox::SVGRootInlineBox):
3517         (WebCore::SVGRootInlineBox::renderSVGText):
3518         (WebCore::SVGRootInlineBox::paint):
3519         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
3520         (WebCore::SVGRootInlineBox::layoutRootBox):
3521         * rendering/svg/SVGRootInlineBox.h:
3522
3523 2013-10-18  Tim Horton  <timothy_horton@apple.com>
3524
3525         Remote Layer Tree: Double-buffering and minimization of repaints
3526         https://bugs.webkit.org/show_bug.cgi?id=123043
3527
3528         Reviewed by Simon Fraser.
3529
3530         No new tests, not yet testable.
3531
3532         * WebCore.exp.in:
3533         Export one version of drawLayerContents and Region::contains.
3534
3535         * WebCore.xcodeproj/project.pbxproj:
3536         Expose WebLayer.h as a private header.
3537
3538         * platform/graphics/mac/WebLayer.h:
3539         Clean up this header, and add a new drawLayerContents that can operate without a CALayer.
3540
3541         * platform/graphics/mac/WebLayer.mm:
3542         (WebCore::drawLayerContents):
3543         Split drawLayerContents into one method that acquires properties CALayer,
3544         and one that just does the painting.
3545
3546 2013-10-18  Anders Carlsson  <andersca@apple.com>
3547
3548         Try to fix the Lion build.
3549
3550         * bindings/objc/ObjCNodeFilterCondition.h:
3551
3552 2013-10-18  Daniel Bates  <dabates@apple.com>
3553
3554         [iOS] Upstream WebSafe{GCActivityCallback, IncrementalSweeper}IOS
3555         https://bugs.webkit.org/show_bug.cgi?id=123049
3556
3557         Reviewed by Mark Hahnenberg.
3558
3559         * WebCore.xcodeproj/project.pbxproj:
3560         * platform/ios/WebSafeGCActivityCallbackIOS.h: Added.
3561         * platform/ios/WebSafeIncrementalSweeperIOS.h: Added.
3562
3563 2013-10-18  Anders Carlsson  <andersca@apple.com>
3564
3565         Remove spaces between template angle brackets
3566         https://bugs.webkit.org/show_bug.cgi?id=123040
3567
3568         Reviewed by Andreas Kling.
3569
3570         * Modules/encryptedmedia/MediaKeySession.h:
3571         * Modules/encryptedmedia/MediaKeys.h:
3572         * Modules/geolocation/Geolocation.h:
3573         * Modules/geolocation/GeolocationController.cpp:
3574         (WebCore::GeolocationController::positionChanged):
3575         (WebCore::GeolocationController::errorOccurred):
3576         * Modules/geolocation/GeolocationController.h:
3577         * Modules/indexeddb/IDBCallbacks.h:
3578         * Modules/indexeddb/IDBDatabase.h:
3579         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
3580         * Modules/indexeddb/IDBEventDispatcher.cpp:
3581         (WebCore::IDBEventDispatcher::dispatch):
3582         * Modules/indexeddb/IDBEventDispatcher.h:
3583         * Modules/indexeddb/IDBKey.h:
3584         * Modules/indexeddb/IDBObjectStore.h:
3585         * Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
3586         * Modules/indexeddb/IDBRequest.cpp:
3587         (WebCore::IDBRequest::dispatchEvent):
3588         * Modules/indexeddb/IDBRequest.h:
3589         (WebCore::IDBRequest::onSuccessWithPrefetch):
3590         * Modules/indexeddb/IDBTransaction.cpp:
3591         (WebCore::IDBTransaction::dispatchEvent):
3592         * Modules/indexeddb/IDBTransaction.h:
3593         * Modules/mediacontrols/MediaControlsHost.cpp:
3594         (WebCore::MediaControlsHost::sortedTrackListForMenu):
3595         * Modules/mediacontrols/MediaControlsHost.h:
3596         * Modules/mediasource/MediaSource.cpp:
3597         (WebCore::MediaSource::activeRanges):
3598         * Modules/mediasource/MediaSource.h:
3599         * Modules/mediasource/MediaSourceBase.cpp:
3600         (WebCore::MediaSourceBase::buffered):
3601         * Modules/mediasource/MediaSourceBase.h:
3602         * Modules/mediasource/MediaSourceRegistry.cpp:
3603         (WebCore::MediaSourceRegistry::unregisterURL):
3604         * Modules/mediasource/MediaSourceRegistry.h:
3605         * Modules/mediasource/SourceBufferList.h:
3606         * Modules/mediasource/WebKitMediaSource.cpp:
3607         (WebCore::WebKitMediaSource::activeRanges):
3608         * Modules/mediasource/WebKitMediaSource.h:
3609         * Modules/mediasource/WebKitSourceBufferList.h:
3610         * Modules/mediastream/MediaStream.cpp:
3611         (WebCore::MediaStream::scheduledEventTimerFired):
3612         * Modules/mediastream/MediaStream.h:
3613         * Modules/mediastream/MediaStreamRegistry.h:
3614         * Modules/mediastream/MediaStreamTrack.h:
3615         * Modules/mediastream/RTCDTMFSender.cpp:
3616         (WebCore::RTCDTMFSender::scheduledEventTimerFired):
3617         * Modules/mediastream/RTCDTMFSender.h:
3618         * Modules/mediastream/RTCDataChannel.cpp:
3619         (WebCore::RTCDataChannel::scheduledEventTimerFired):
3620         * Modules/mediastream/RTCDataChannel.h:
3621         * Modules/mediastream/RTCPeerConnection.cpp:
3622         (WebCore::RTCPeerConnection::stop):
3623         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
3624         * Modules/mediastream/RTCPeerConnection.h:
3625         * Modules/mediastream/RTCStatsResponse.h:
3626         (WebCore::RTCStatsResponse::result):
3627         * Modules/notifications/Notification.h:
3628         * Modules/notifications/NotificationCenter.h:
3629         * Modules/speech/SpeechSynthesis.cpp:
3630         (WebCore::SpeechSynthesis::getVoices):
3631         * Modules/speech/SpeechSynthesis.h:
3632         * Modules/webaudio/AudioBuffer.h:
3633         * Modules/webaudio/AudioNode.h:
3634         * Modules/webaudio/AudioNodeOutput.h:
3635         * Modules/webaudio/MediaStreamAudioSource.cpp:
3636         (WebCore::MediaStreamAudioSource::setAudioFormat):
3637         (WebCore::MediaStreamAudioSource::consumeAudio):
3638         * Modules/webaudio/PeriodicWave.h:
3639         * Modules/webaudio/ScriptProcessorNode.h:
3640         * Modules/webdatabase/AbstractDatabaseServer.h:
3641         * Modules/webdatabase/DatabaseBackend.h:
3642         * Modules/webdatabase/DatabaseManager.cpp:
3643         (WebCore::DatabaseManager::origins):
3644         * Modules/webdatabase/DatabaseManager.h:
3645         * Modules/webdatabase/DatabaseServer.cpp:
3646         (WebCore::DatabaseServer::origins):
3647         * Modules/webdatabase/DatabaseServer.h:
3648         * Modules/webdatabase/DatabaseThread.h:
3649         * Modules/webdatabase/DatabaseTracker.cpp:
3650         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
3651         (WebCore::DatabaseTracker::origins):
3652         (WebCore::DatabaseTracker::getOpenDatabases):
3653         (WebCore::DatabaseTracker::deleteAllDatabases):
3654         (WebCore::DatabaseTracker::deleteDatabaseFile):
3655         * Modules/webdatabase/DatabaseTracker.h:
3656         * Modules/webdatabase/SQLStatementBackend.cpp:
3657         * Modules/webdatabase/SQLTransactionBackend.cpp:
3658         * Modules/webdatabase/SQLTransactionBackend.h:
3659         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
3660         (WebCore::SQLTransactionCoordinator::shutdown):
3661         * Modules/webdatabase/SQLTransactionCoordinator.h:
3662         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3663         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3664         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
3665         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback):
3666         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
3667         * Modules/websockets/WebSocket.cpp:
3668         (WebCore::WebSocket::didReceiveBinaryData):
3669         * Modules/websockets/WebSocket.h:
3670         * Modules/websockets/WebSocketChannel.cpp:
3671         (WebCore::WebSocketChannel::processFrame):
3672         * Modules/websockets/WebSocketChannel.h:
3673         * Modules/websockets/WebSocketChannelClient.h:
3674         (WebCore::WebSocketChannelClient::didReceiveBinaryData):
3675         * Modules/websockets/WebSocketExtensionDispatcher.h:
3676         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3677         (WebCore::workerGlobalScopeDidReceiveBinaryData):
3678         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
3679         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer):
3680         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
3681         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3682         * accessibility/AXObjectCache.cpp:
3683         (WebCore::AXObjectCache::~AXObjectCache):
3684         * accessibility/AXObjectCache.h:
3685         * accessibility/AccessibilityNodeObject.cpp:
3686         (WebCore::AccessibilityNodeObject::ariaLabeledByText):
3687         * accessibility/AccessibilityObject.h:
3688         (WebCore::AccessibilityText::AccessibilityText):
3689         * bindings/js/DOMWrapperWorld.h:
3690         * bindings/js/JSDOMBinding.h:
3691         (WebCore::toRefPtrNativeArray):
3692         * bindings/js/JSDOMGlobalObject.h:
3693         * bindings/js/JSMutationCallback.cpp:
3694         (WebCore::JSMutationCallback::call):
3695         * bindings/js/JSMutationCallback.h:
3696         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3697         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
3698         * bindings/js/PageScriptDebugServer.h:
3699         * bindings/js/ScheduledAction.h:
3700         * bindings/js/ScriptController.cpp:
3701         (WebCore::ScriptController::collectIsolatedContexts):
3702         * bindings/js/ScriptController.h:
3703         * bindings/js/ScriptDebugServer.h:
3704         * bindings/js/ScriptProfile.cpp:
3705         (WebCore::buildInspectorObjectFor):
3706         * bindings/objc/ObjCNodeFilterCondition.h:
3707         * bridge/objc/objc_class.h:
3708         * bridge/runtime_root.cpp:
3709         (JSC::Bindings::RootObject::invalidate):
3710         * bridge/runtime_root.h:
3711         * css/BasicShapeFunctions.cpp:
3712         (WebCore::basicShapeForValue):
3713         * css/CSSBasicShapes.h:
3714         (WebCore::CSSBasicShapePolygon::values):
3715         * css/CSSComputedStyleDeclaration.cpp:
3716         (WebCore::ComputedStyleExtractor::valueForFilter):
3717         * css/CSSFontFace.h:
3718         * css/CSSFontFaceSource.h:
3719         * css/CSSFontSelector.cpp:
3720         (WebCore::CSSFontSelector::addFontFaceRule):
3721         (WebCore::CSSFontSelector::getFontFace):
3722         (WebCore::CSSFontSelector::beginLoadTimerFired):
3723         * css/CSSFontSelector.h:
3724         * css/CSSGroupingRule.h:
3725         * css/CSSImageGeneratorValue.h:
3726         * css/CSSParserValues.cpp:
3727         (WebCore::CSSParserSelector::adoptSelectorVector):
3728         * css/CSSParserValues.h:
3729         * css/CSSPropertySourceData.h:
3730         * css/CSSRuleList.h:
3731         (WebCore::StaticCSSRuleList::rules):
3732         * css/CSSSegmentedFontFace.cpp:
3733         (WebCore::CSSSegmentedFontFace::fontLoaded):
3734         * css/CSSSegmentedFontFace.h:
3735         * css/CSSSelectorList.cpp:
3736         (WebCore::CSSSelectorList::adoptSelectorVector):
3737         * css/CSSSelectorList.h:
3738         * css/CSSStyleSheet.h:
3739         * css/CSSValue.h:
3740         (WebCore::compareCSSValueVector):
3741         * css/CSSValuePool.h:
3742         * css/DocumentRuleSets.cpp:
3743         (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets):
3744         (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
3745         * css/DocumentRuleSets.h:
3746         * css/ElementRuleCollector.cpp:
3747         (WebCore::ElementRuleCollector::matchedRuleList):
3748         * css/ElementRuleCollector.h:
3749         * css/FontLoader.h:
3750         * css/InspectorCSSOMWrappers.cpp:
3751         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
3752         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheets):
3753         * css/InspectorCSSOMWrappers.h:
3754         * css/MediaList.cpp:
3755         (WebCore::MediaQuerySet::parse):
3756         (WebCore::MediaList::item):
3757         (WebCore::reportMediaQueryWarningIfNeeded):
3758         * css/MediaList.h:
3759         (WebCore::MediaQuerySet::queryVector):
3760         * css/MediaQueryEvaluator.cpp:
3761         (WebCore::MediaQueryEvaluator::eval):
3762         * css/MediaQueryMatcher.h:
3763         * css/PropertySetCSSStyleDeclaration.cpp:
3764         (WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM):
3765         * css/PropertySetCSSStyleDeclaration.h:
3766         * css/RuleSet.cpp:
3767         (WebCore::RuleSet::addToRuleSet):
3768         (WebCore::RuleSet::addRegionRule):
3769         (WebCore::RuleSet::addChildRules):
3770         (WebCore::RuleSet::addRulesFromSheet):
3771         * css/RuleSet.h:
3772         * css/SelectorFilter.h:
3773         * css/StyleInvalidationAnalysis.cpp:
3774         (WebCore::StyleInvalidationAnalysis::analyzeStyleSheet):
3775         * css/StylePropertySet.cpp:
3776         (WebCore::StylePropertySet::getLayeredShorthandValue):
3777         * css/StyleResolver.cpp:
3778         (WebCore::StyleResolver::appendAuthorStyleSheets):
3779         (WebCore::StyleResolver::keyframeStylesForAnimation):
3780         (WebCore::StyleResolver::styleRulesForElement):
3781         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3782         (WebCore::StyleResolver::resolveVariables):
3783         (WebCore::StyleResolver::applyProperty):
3784         (WebCore::StyleResolver::loadPendingSVGDocuments):
3785         (WebCore::StyleResolver::loadPendingShaders):
3786         * css/StyleResolver.h:
3787         * css/StyleRule.cpp:
3788         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
3789         (WebCore::StyleRuleGroup::StyleRuleGroup):
3790         (WebCore::StyleRuleMedia::StyleRuleMedia):
3791         (WebCore::StyleRuleSupports::StyleRuleSupports):
3792         (WebCore::StyleRuleRegion::StyleRuleRegion):
3793         * css/StyleRule.h:
3794         (WebCore::StyleRule::parserAdoptSelectorVector):
3795         (WebCore::StyleRulePage::parserAdoptSelectorVector):
3796         (WebCore::StyleRuleGroup::childRules):
3797         (WebCore::StyleRuleMedia::create):
3798         (WebCore::StyleRuleSupports::create):
3799         (WebCore::StyleRuleRegion::create):
3800         (WebCore::StyleRuleHost::create):
3801         (WebCore::StyleRuleHost::StyleRuleHost):
3802         * css/StyleScopeResolver.h:
3803         * css/StyleSheetContents.cpp:
3804         (WebCore::StyleSheetContents::parserAppendRule):
3805         (WebCore::childRulesHaveFailedOrCanceledSubresources):
3806         * css/StyleSheetContents.h:
3807         (WebCore::StyleSheetContents::childRules):
3808         (WebCore::StyleSheetContents::importRules):
3809         * css/StyleSheetList.cpp:
3810         (WebCore::StyleSheetList::styleSheets):
3811         (WebCore::StyleSheetList::item):
3812         * css/StyleSheetList.h:
3813         * css/WebKitCSSKeyframesRule.h:
3814         (WebCore::StyleRuleKeyframes::keyframes):
3815         * dom/CheckedRadioButtons.h:
3816         * dom/ClientRectList.h:
3817         * dom/ContainerNode.h:
3818         (WebCore::ChildNodesLazySnapshot::nextNode):
3819         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
3820         * dom/CrossThreadTask.h:
3821         * dom/Document.cpp:
3822         (WebCore::Document::webkitCancelFullScreen):
3823         (WebCore::Document::webkitExitFullscreen):
3824         (WebCore::Document::fullScreenChangeDelayTimerFired):
3825         (WebCore::Document::didAssociateFormControlsTimerFired):
3826         * dom/Document.h:
3827         * dom/DocumentMarkerController.cpp:
3828         (WebCore::DocumentMarkerController::removeMarkers):
3829         * dom/DocumentMarkerController.h:
3830         * dom/DocumentStyleSheetCollection.cpp:
3831         (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
3832         (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
3833         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
3834         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
3835         (WebCore::styleSheetsUseRemUnits):
3836         (WebCore::filterEnabledNonemptyCSSStyleSheets):
3837         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
3838         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3839         * dom/DocumentStyleSheetCollection.h:
3840         * dom/Element.cpp:
3841         (WebCore::Element::attrNodeList):
3842         (WebCore::Element::webkitGetRegionFlowRanges):
3843         * dom/Element.h:
3844         * dom/EventListenerMap.h:
3845         * dom/EventSender.h:
3846         (WebCore::EventSender::timerFired):
3847         * dom/IdTargetObserverRegistry.h:
3848         * dom/MutationCallback.h:
3849         * dom/MutationObserver.cpp:
3850         (WebCore::MutationObserver::takeRecords):
3851         (WebCore::MutationObserver::deliver):
3852         (WebCore::MutationObserver::deliverAllMutations):
3853         * dom/MutationObserver.h:
3854         * dom/MutationObserverRegistration.h:
3855         * dom/NamedFlowCollection.cpp:
3856         (WebCore::NamedFlowCollection::namedFlows):
3857         * dom/NamedFlowCollection.h:
3858         * dom/Node.cpp:
3859         (WebCore::Node::didMoveToNewDocument):
3860         (WebCore::Node::mutationObserverRegistry):
3861         (WebCore::Node::registerMutationObserver):
3862         (WebCore::Node::unregisterMutationObserver):
3863         (WebCore::Node::notifyMutationObserversNodeWillDetach):
3864         * dom/Node.h:
3865         * dom/NodeRareData.h:
3866         * dom/Range.cpp:
3867         (WebCore::Range::processContents):
3868         (WebCore::Range::processNodes):
3869         (WebCore::Range::processAncestorsAndTheirSiblings):
3870         * dom/Range.h:
3871         * dom/ScopedEventQueue.h:
3872         * dom/ScriptExecutionContext.cpp:
3873         (WebCore::ScriptExecutionContext::reportException):
3874         * dom/ScriptExecutionContext.h:
3875         * dom/ScriptedAnimationController.h:
3876         * editing/ApplyStyleCommand.cpp:
3877         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
3878         * editing/BreakBlockquoteCommand.cpp:
3879         (WebCore::BreakBlockquoteCommand::doApply):
3880         * editing/CompositeEditCommand.cpp:
3881         (WebCore::CompositeEditCommand::removeChildrenInRange):
3882         (WebCore::CompositeEditCommand::deleteInsignificantText):
3883         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
3884         * editing/CompositeEditCommand.h:
3885         * editing/EditingStyle.cpp:
3886         (WebCore::htmlElementEquivalents):
3887         (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement):
3888         (WebCore::htmlAttributeEquivalents):
3889         (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
3890         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
3891         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
3892         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
3893         (WebCore::styleFromMatchedRulesForElement):
3894         * editing/Editor.cpp:
3895         (WebCore::Editor::countMatchesForText):
3896         * editing/Editor.h:
3897         * editing/InsertParagraphSeparatorCommand.cpp:
3898         (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock):
3899         (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
3900         (WebCore::InsertParagraphSeparatorCommand::doApply):
3901         * editing/InsertParagraphSeparatorCommand.h:
3902         * editing/MergeIdenticalElementsCommand.cpp:
3903         (WebCore::MergeIdenticalElementsCommand::doApply):
3904         (WebCore::MergeIdenticalElementsCommand::doUnapply):
3905         * editing/RemoveNodePreservingChildrenCommand.cpp:
3906         (WebCore::RemoveNodePreservingChildrenCommand::doApply):
3907         * editing/ReplaceSelectionCommand.cpp:
3908         (WebCore::ReplacementFragment::removeUnrenderedNodes):
3909         * editing/SimplifyMarkupCommand.cpp:
3910         (WebCore::SimplifyMarkupCommand::doApply):
3911         (WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):
3912         * editing/SimplifyMarkupCommand.h:
3913         * editing/SpellChecker.h:
3914         * editing/SplitElementCommand.cpp:
3915         (WebCore::SplitElementCommand::executeApply):
3916         (WebCore::SplitElementCommand::doUnapply):
3917         * editing/WrapContentsInDummySpanCommand.cpp:
3918         (WebCore::WrapContentsInDummySpanCommand::executeApply):
3919         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
3920         * editing/mac/AlternativeTextUIController.h:
3921         * fileapi/FileList.h:
3922         * history/BackForwardList.h:
3923         * history/HistoryItem.cpp:
3924         (WebCore::HistoryItem::setRedirectURLs):
3925         * history/HistoryItem.h:
3926         * history/mac/HistoryItemMac.mm:
3927         (WebCore::HistoryItem::setTransientProperty):
3928         * html/FormController.h:
3929         * html/HTMLAnchorElement.cpp:
3930         * html/HTMLCollection.cpp:
3931         (WebCore::HTMLCollection::append):
3932         * html/HTMLCollection.h:
3933         * html/HTMLFormControlElement.cpp:
3934         (WebCore::HTMLFormControlElement::checkValidity):
3935         * html/HTMLFormControlElement.h:
3936         * html/HTMLFormElement.cpp:
3937         (WebCore::HTMLFormElement::validateInteractively):
3938         (WebCore::HTMLFormElement::checkValidity):
3939         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
3940         * html/HTMLFormElement.h:
3941         * html/HTMLMediaElement.cpp:
3942         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
3943         (WebCore::HTMLMediaElement::platformTextTracks):
3944         (WebCore::HTMLMediaElement::configureTextTrackGroup):
3945         * html/HTMLMediaElement.h:
3946         * html/HTMLPlugInImageElement.cpp:
3947         * html/HTMLSelectElement.cpp:
3948         (WebCore::HTMLSelectElement::setLength):
3949         * html/MediaController.cpp:
3950         (MediaController::asyncEventTimerFired):
3951         * html/MediaController.h:
3952         * html/MediaFragmentURIParser.h:
3953         * html/ValidationMessage.h:
3954         * html/canvas/WebGLFramebuffer.h:
3955         * html/canvas/WebGLRenderingContext.cpp:
3956         (WebCore::WebGLRenderingContext::getAttachedShaders):
3957         * html/canvas/WebGLRenderingContext.h:
3958         * html/canvas/WebGLTexture.h:
3959         * html/parser/BackgroundHTMLParser.cpp:
3960         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
3961         * html/parser/BackgroundHTMLParser.h:
3962         (WebCore::BackgroundHTMLParser::create):
3963         * html/parser/HTMLDocumentParser.cpp:
3964         (WebCore::HTMLDocumentParser::startBackgroundParser):
3965         * html/parser/HTMLDocumentParser.h:
3966         * html/parser/HTMLMetaCharsetParser.h:
3967         * html/parser/HTMLPreloadScanner.cpp:
3968         (WebCore::TokenPreloadScanner::scan):
3969         (WebCore::TokenPreloadScanner::scanCommon):
3970         * html/parser/HTMLResourcePreloader.h:
3971         * html/parser/XSSAuditor.h:
3972         * html/shadow/ContentDistributor.cpp:
3973         (WebCore::ContentDistributor::ensureInsertionPointList):
3974         (WebCore::ContentDistributor::distribute):
3975         (WebCore::ContentDistributor::invalidate):
3976         * html/shadow/ContentDistributor.h:
3977         * html/shadow/MediaControlElements.cpp:
3978         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
3979         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
3980         * html/shadow/MediaControlElements.h:
3981         * html/track/InbandGenericTextTrack.h:
3982         * html/track/InbandWebVTTTextTrack.cpp:
3983         (WebCore::InbandWebVTTTextTrack::newCuesParsed):
3984         * html/track/LoadableTextTrack.cpp:
3985         (WebCore::LoadableTextTrack::newCuesAvailable):
3986         (WebCore::LoadableTextTrack::newRegionsAvailable):
3987         * html/track/TextTrackCueList.h:
3988         * html/track/TextTrackList.cpp:
3989         (TextTrackList::invalidateTrackIndexesAfterTrack):
3990         (TextTrackList::remove):
3991         (TextTrackList::contains):
3992         * html/track/TextTrackList.h:
3993         * html/track/TrackListBase.cpp:
3994         (TrackListBase::asyncEventTimerFired):
3995         * html/track/TrackListBase.h:
3996         * html/track/WebVTTParser.cpp:
3997         (WebCore::WebVTTParser::getNewCues):
3998         (WebCore::WebVTTParser::getNewRegions):
3999         * html/track/WebVTTParser.h:
4000         * inspector/ConsoleMessage.cpp:
4001         (WebCore::ConsoleMessage::addToFrontend):
4002         * inspector/ContentSearchUtils.cpp:
4003         (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
4004         (WebCore::ContentSearchUtils::lineEndings):
4005         (WebCore::ContentSearchUtils::searchInTextByLines):
4006         * inspector/ContentSearchUtils.h:
4007         * inspector/DOMPatchSupport.cpp:
4008         (WebCore::DOMPatchSupport::patchNode):
4009         (WebCore::DOMPatchSupport::diff):
4010         (WebCore::DOMPatchSupport::innerPatchChildren):
4011         * inspector/DOMPatchSupport.h:
4012         * inspector/InjectedScript.cpp:
4013         (WebCore::InjectedScript::getProperties):
4014         (WebCore::InjectedScript::getInternalProperties):
4015         (WebCore::InjectedScript::wrapCallFrames):
4016         * inspector/InjectedScript.h:
4017         * inspector/InjectedScriptHost.h:
4018         * inspector/InspectorAgent.cpp:
4019         (WebCore::InspectorAgent::enable):
4020         * inspector/InspectorApplicationCacheAgent.cpp:
4021         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
4022         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
4023         * inspector/InspectorApplicationCacheAgent.h:
4024         * inspector/InspectorBaseAgent.h:
4025         * inspector/InspectorCSSAgent.cpp:
4026         (WebCore::SelectorProfile::toInspectorObject):
4027         (WebCore::UpdateRegionLayoutTask::onTimer):
4028         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
4029         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
4030         (WebCore::InspectorCSSAgent::getAllStyleSheets):
4031         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
4032         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
4033         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
4034         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
4035         (WebCore::InspectorCSSAgent::buildArrayForRegions):
4036         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
4037         * inspector/InspectorCSSAgent.h:
4038         * inspector/InspectorConsoleAgent.h:
4039         * inspector/InspectorDOMAgent.cpp:
4040         (WebCore::RevalidateStyleAttributeTask::onTimer):
4041         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
4042         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
4043         (WebCore::InspectorDOMAgent::getEventListenersForNode):
4044         (WebCore::InspectorDOMAgent::performSearch):
4045         (WebCore::InspectorDOMAgent::getSearchResults):
4046         (WebCore::InspectorDOMAgent::getAttributes):
4047         (WebCore::InspectorDOMAgent::buildObjectForNode):
4048         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
4049         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
4050         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
4051         * inspector/InspectorDOMAgent.h:
4052         * inspector/InspectorDOMStorageAgent.cpp:
4053         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
4054         * inspector/InspectorDOMStorageAgent.h:
4055         * inspector/InspectorDatabaseAgent.cpp:
4056         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
4057         * inspector/InspectorDatabaseAgent.h:
4058         * inspector/InspectorDebuggerAgent.cpp:
4059         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
4060         (WebCore::InspectorDebuggerAgent::searchInContent):
4061         (WebCore::InspectorDebuggerAgent::setScriptSource):
4062     &nbs