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