1fd96d7d103a93ca5a19fcbfed84a3214c15c0d0
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Web Inspector: Generate all Inspector domains together in JavaScriptCore
4         https://bugs.webkit.org/show_bug.cgi?id=137748
5
6         Reviewed by Brian Burg.
7
8         After moving the json files into JavaScriptCore update the includes,
9         and names of functions that were previously prefixed.
10
11         * CMakeLists.txt:
12         * DerivedSources.make:
13         * ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Added.
14         * ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Added.
15         * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Removed.
16         * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Removed.
17         * ForwardingHeaders/inspector/InspectorJSProtocolTypes.h: Removed.
18         * ForwardingHeaders/inspector/InspectorProtocolTypesBase.h: Added.
19         * WebCore.vcxproj/WebCore.vcxproj:
20         * WebCore.vcxproj/WebCore.vcxproj.filters:
21         * WebCore.vcxproj/copyForwardingHeaders.cmd:
22         * WebCore.xcodeproj/project.pbxproj:
23         * inspector/CommandLineAPIHost.cpp:
24         * inspector/InspectorApplicationCacheAgent.cpp:
25         * inspector/InspectorApplicationCacheAgent.h:
26         * inspector/InspectorCSSAgent.cpp:
27         * inspector/InspectorCSSAgent.h:
28         * inspector/InspectorController.cpp:
29         * inspector/InspectorDOMAgent.cpp:
30         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
31         * inspector/InspectorDOMAgent.h:
32         * inspector/InspectorDOMDebuggerAgent.cpp:
33         * inspector/InspectorDOMDebuggerAgent.h:
34         * inspector/InspectorDOMStorageAgent.cpp:
35         * inspector/InspectorDOMStorageAgent.h:
36         * inspector/InspectorDatabaseAgent.cpp:
37         * inspector/InspectorDatabaseAgent.h:
38         * inspector/InspectorDatabaseResource.cpp:
39         * inspector/InspectorDatabaseResource.h:
40         * inspector/InspectorFrontendClientLocal.cpp:
41         * inspector/InspectorIndexedDBAgent.cpp:
42         * inspector/InspectorIndexedDBAgent.h:
43         * inspector/InspectorLayerTreeAgent.cpp:
44         * inspector/InspectorLayerTreeAgent.h:
45         * inspector/InspectorPageAgent.cpp:
46         * inspector/InspectorPageAgent.h:
47         * inspector/InspectorReplayAgent.cpp:
48         * inspector/InspectorReplayAgent.h:
49         * inspector/InspectorResourceAgent.cpp:
50         * inspector/InspectorResourceAgent.h:
51         * inspector/InspectorStyleSheet.cpp:
52         * inspector/InspectorStyleSheet.h:
53         * inspector/InspectorTimelineAgent.cpp:
54         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
55         * inspector/InspectorTimelineAgent.h:
56         * inspector/InspectorWorkerAgent.cpp:
57         * inspector/InspectorWorkerAgent.h:
58         * inspector/PageRuntimeAgent.h:
59         * inspector/TimelineRecordFactory.cpp:
60         * inspector/WorkerInspectorController.cpp:
61
62 2014-10-20  Andy Estes  <aestes@apple.com>
63
64         Fix the GTK build.
65
66         * dom/RenderedDocumentMarker.h:
67
68 2014-10-19  Antti Koivisto  <antti@apple.com>
69
70         Avoid unnecessary NSURLResponse construction for QuickLook on iOS
71         https://bugs.webkit.org/show_bug.cgi?id=137876
72
73         Reviewed by Andy Estes.
74
75         QuickLook specific code path creates NSURLResponse in the web process for every response.
76         It is rarely needed so this is unnecessary work.
77
78         * WebCore.exp.in:
79         * platform/network/ios/QuickLook.h:
80         * platform/network/ios/QuickLook.mm:
81         (WebCore::isMainResourceLoader):
82         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
83
84             Separate function for testing if QuickLookHandle is needed.
85
86         (WebCore::QuickLookHandle::create):
87
88             Switch the interface to take ResourceResponse.
89
90 2014-10-20  Andy Estes  <aestes@apple.com>
91
92         Fix the iOS build.
93
94         * WebCore.xcodeproj/project.pbxproj:
95         * dom/RenderedDocumentMarker.h:
96         * page/ios/FrameIOS.mm:
97         (WebCore::Frame::interpretationsForCurrentRoot):
98
99 2014-10-20  Benjamin Poulain  <benjamin@webkit.org>
100
101         Update the <link>'s link status
102         https://bugs.webkit.org/show_bug.cgi?id=137861
103
104         Reviewed by Chris Dumez.
105
106         In the latest HTML spec, <link> has the link status
107         if it has a 'href' attribute, exactly like <a> and <area>:
108             https://html.spec.whatwg.org/multipage/scripting.html#selector-link
109
110         This patch updates WebKit accordingly.
111
112         Tests: fast/css/link-basics.html
113                fast/selectors/link-basics-xhtml.xhtml
114                fast/selectors/link-basics.html
115                fast/selectors/webkit-any-link-basics.html
116
117         * html/HTMLLinkElement.cpp:
118         (WebCore::HTMLLinkElement::parseAttribute):
119
120 2014-10-20  Chris Dumez  <cdumez@apple.com>
121
122         [Mac] Optimize cookiesForDOM() by filtering and serializing cookies in a single pass
123         https://bugs.webkit.org/show_bug.cgi?id=137869
124
125         Reviewed by Darin Adler.
126
127         Optimize cookiesForDOM() by filtering and serializing in 1 pass instead of 2.
128
129         Previously, when accessing document.cookie, we ended up doing the following:
130         1. Call wkHTTPCookiesForURL() to get an NSArray of NSHTTPCookies.
131         2. Call filterCookies() to filter out cookies that are httpOnly or with an
132            empty name, thus allocating a new NSMutableArray.
133         3. Call NSHTTPCookie's requestHeaderFieldsWithCookies() to serialize the
134            cookies
135         4. Construct a WTF::String from the NSString*
136
137         There were several inefficiencies here:
138         1. We needed to pre-filter the cookies and allocate a new NSMutableArray
139            before calling requestHeaderFieldsWithCookies()
140         2. requestHeaderFieldsWithCookies() does more things that we actually need.
141            It constructs a Dictionary of header fields, of which we query the
142            "Cookie" field, even though we merely want a ';'-separated string
143            representation of the cookies in "key=value" form.
144
145         With this patch, we now take care of the string serialization ourselves,
146         using a StringBuilder as it is trivial to do. This also allows us to filter
147         out the httpOnly/invalid cookies as we do the serialization instead of
148         having a first pass to do so.
149
150         When scrolling the http://www.apple.com/iphone/ entire page down, then up,
151         se were spending ~13.1% of the NetworkProcess time in cookiesForDOM()
152         (~96ms) on my machine. With the patch, we spend ~23% less time in
153         cookiesForDOM() (~74ms).
154
155         No new tests, no behavior change.
156
157         * platform/network/mac/CookieJarMac.mm:
158         (WebCore::cookiesForSession):
159         (WebCore::cookiesForDOM):
160         (WebCore::cookieRequestHeaderFieldValue):
161
162 2014-10-19  Chris Dumez  <cdumez@apple.com>
163
164         Kill toRenderedDocumentMarker() by using tighter typing
165         https://bugs.webkit.org/show_bug.cgi?id=137858
166
167         Reviewed by Darin Adler.
168
169         Kill toRenderedDocumentMarker() by using tighter typing. This method
170         was doing no type validation, just a static_cast<>().
171
172         No new tests, no behavior change.
173
174         * dom/DocumentMarkerController.cpp:
175         (WebCore::DocumentMarkerController::addTextMatchMarker):
176         (WebCore::DocumentMarkerController::markersFor):
177         (WebCore::DocumentMarkerController::markersInRange):
178         (DocumentMarkerController::hasMarkers):
179         * dom/DocumentMarkerController.h:
180         * dom/RenderedDocumentMarker.h:
181         (WebCore::toRenderedDocumentMarker): Deleted.
182         * editing/AlternativeTextController.cpp:
183         (WebCore::markersHaveIdenticalDescription):
184         (WebCore::AlternativeTextController::respondToChangedSelection):
185         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
186         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
187         (WebCore::AlternativeTextController::applyDictationAlternative):
188         * editing/CompositeEditCommand.cpp:
189         (WebCore::copyMarkers):
190         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
191         * editing/DeleteSelectionCommand.cpp:
192         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
193         * editing/Editor.cpp:
194         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
195         (WebCore::Editor::selectionStartHasMarkerFor):
196         * rendering/InlineTextBox.cpp:
197         (WebCore::InlineTextBox::paintDocumentMarker):
198         (WebCore::InlineTextBox::paintTextMatchMarker):
199         (WebCore::InlineTextBox::computeRectForReplacementMarker):
200         (WebCore::InlineTextBox::paintDocumentMarkers):
201         * rendering/InlineTextBox.h:
202         * rendering/svg/SVGInlineFlowBox.cpp:
203         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
204         * testing/Internals.cpp:
205         (WebCore::Internals::markerAt):
206         (WebCore::Internals::markerRangeForNode):
207         (WebCore::Internals::markerDescriptionForNode):
208         * testing/Internals.h:
209
210 2014-10-19  Chris Dumez  <cdumez@apple.com>
211
212         Use is<>() / downcast<>() for all remaining RenderObject subclasses
213         https://bugs.webkit.org/show_bug.cgi?id=137845
214
215         Reviewed by Darin Adler.
216
217         Use is<>() / downcast<>() for all remaining RenderObject subclasses and
218         clean up the surrounding code.
219
220         No new tests, no behavior change.
221
222         * accessibility/AccessibilityProgressIndicator.cpp:
223         (WebCore::AccessibilityProgressIndicator::progressElement):
224         (WebCore::AccessibilityProgressIndicator::meterElement):
225         * accessibility/AccessibilityRenderObject.cpp:
226         (WebCore::AccessibilityRenderObject::layoutCount):
227         (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
228         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
229         * dom/Document.cpp:
230         (WebCore::widgetForElement):
231         * dom/Position.cpp:
232         (WebCore::Position::getInlineBoxAndOffset):
233         * dom/WebKitNamedFlow.cpp:
234         (WebCore::WebKitNamedFlow::overset):
235         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
236         (WebCore::WebKitNamedFlow::getRegionsByContent):
237         (WebCore::WebKitNamedFlow::getRegions):
238         * editing/FrameSelection.cpp:
239         (WebCore::isFrameElement):
240         * html/HTMLEmbedElement.cpp:
241         (WebCore::findWidgetRenderer):
242         * html/HTMLFrameOwnerElement.cpp:
243         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
244         (WebCore::HTMLFrameOwnerElement::renderWidget):
245         * html/HTMLMediaElement.cpp:
246         (WebCore::HTMLMediaElement::parseAttribute):
247         * html/HTMLMeterElement.cpp:
248         (WebCore::HTMLMeterElement::renderMeter):
249         * html/HTMLPlugInElement.cpp:
250         (WebCore::HTMLPlugInElement::supportsFocus):
251         * html/HTMLPlugInImageElement.cpp:
252         (WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
253         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
254         * html/HTMLProgressElement.cpp:
255         (WebCore::HTMLProgressElement::renderProgress):
256         * html/PluginDocument.cpp:
257         (WebCore::PluginDocument::pluginWidget):
258         * html/shadow/MediaControlElements.cpp:
259         (WebCore::MediaControlTimelineElement::defaultEventHandler):
260         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
261         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
262         * inspector/InspectorLayerTreeAgent.cpp:
263         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
264         * inspector/InspectorOverlay.cpp:
265         (WebCore::buildObjectForElementInfo):
266         * loader/SubframeLoader.cpp:
267         (WebCore::SubframeLoader::loadSubframe):
268         * page/Frame.cpp:
269         (WebCore::Frame::ownerRenderer):
270         * page/FrameView.cpp:
271         (WebCore::FrameView::layout):
272         * page/gtk/EventHandlerGtk.cpp:
273         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
274         * page/ios/EventHandlerIOS.mm:
275         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
276         (WebCore::EventHandler::passSubframeEventToSubframe):
277         * page/mac/EventHandlerMac.mm:
278         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
279         (WebCore::EventHandler::passSubframeEventToSubframe):
280         (WebCore::widgetForEventTarget):
281         * platform/efl/RenderThemeEfl.cpp:
282         (WebCore::RenderThemeEfl::applyEdjeRTLState):
283         * rendering/InlineTextBox.cpp:
284         (WebCore::fontToUse):
285         (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
286         (WebCore::InlineTextBox::paint):
287         * rendering/LayoutState.cpp:
288         (WebCore::LayoutState::LayoutState):
289         * rendering/RenderBlock.cpp:
290         (WebCore::RenderBlock::collapseAnonymousBoxChild):
291         (WebCore::RenderBlock::simplifiedLayout):
292         (WebCore::RenderBlock::paintObject):
293         (WebCore::RenderBlock::selectionGaps):
294         (WebCore::RenderBlock::nodeAtPoint):
295         * rendering/RenderBlockFlow.cpp:
296         (WebCore::RenderBlockFlow::layoutBlock):
297         (WebCore::RenderBlockFlow::hitTestFloats):
298         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
299         * rendering/RenderBlockLineLayout.cpp:
300         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
301         * rendering/RenderBox.cpp:
302         (WebCore::RenderBox::scroll):
303         (WebCore::RenderBox::nodeAtPoint):
304         (WebCore::RenderBox::repaintLayerRectsForImage):
305         (WebCore::RenderBox::mapLocalToContainer):
306         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
307         * rendering/RenderCombineText.h:
308         * rendering/RenderElement.cpp:
309         (WebCore::RenderElement::adjustStyleDifference):
310         (WebCore::addLayers):
311         (WebCore::RenderElement::removeLayers):
312         (WebCore::RenderElement::moveLayers):
313         (WebCore::RenderElement::setNeedsPositionedMovementLayout):
314         (WebCore::RenderElement::renderNamedFlowThreadWrapper):
315         * rendering/RenderEmbeddedObject.h:
316         * rendering/RenderFlowThread.cpp:
317         (WebCore::RenderFlowThread::validateRegions):
318         (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
319         (WebCore::RenderFlowThread::regionForCompositedLayer):
320         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
321         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
322         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
323         (WebCore::RenderFlowThread::addForcedRegionBreak):
324         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
325         * rendering/RenderFlowThread.h:
326         * rendering/RenderLayer.cpp:
327         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
328         (WebCore::transparencyClipBox):
329         (WebCore::accumulateOffsetTowardsAncestor):
330         (WebCore::RenderLayer::collectFragments):
331         (WebCore::RenderLayer::hitTest):
332         (WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
333         (WebCore::RenderLayer::calculateClipRects):
334         * rendering/RenderLayerBacking.cpp:
335         (WebCore::RenderLayerBacking::updateAfterWidgetResize):
336         (WebCore::RenderLayerBacking::updateConfiguration):
337         (WebCore::isRestartedPlugin):
338         (WebCore::isCompositedPlugin):
339         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
340         (WebCore::RenderLayerBacking::containsPaintedContent):
341         * rendering/RenderLayerCompositor.cpp:
342         (WebCore::RenderLayerCompositor::updateBacking):
343         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
344         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
345         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
346         (WebCore::RenderLayerCompositor::reasonsForCompositing):
347         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
348         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
349         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
350         * rendering/RenderLayerModelObject.h:
351         * rendering/RenderLineBreak.h:
352         * rendering/RenderMeter.h:
353         * rendering/RenderMultiColumnFlowThread.cpp:
354         (WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
355         (WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
356         (WebCore::RenderMultiColumnFlowThread::layout):
357         (WebCore::RenderMultiColumnFlowThread::addRegionToThread):
358         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
359         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
360         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
361         (WebCore::RenderMultiColumnFlowThread::setPageBreak):
362         (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
363         (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
364         (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
365         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
366         * rendering/RenderMultiColumnFlowThread.h:
367         * rendering/RenderMultiColumnSet.cpp:
368         (WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
369         (WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
370         * rendering/RenderMultiColumnSet.h:
371         * rendering/RenderMultiColumnSpannerPlaceholder.h:
372         * rendering/RenderNamedFlowFragment.cpp:
373         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
374         (WebCore::RenderNamedFlowFragment::namedFlowThread):
375         * rendering/RenderNamedFlowFragment.h:
376         * rendering/RenderNamedFlowThread.cpp:
377         (WebCore::RenderNamedFlowThread::updateWritingMode):
378         (WebCore::addFragmentToList):
379         (WebCore::RenderNamedFlowThread::addRegionToThread):
380         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
381         (WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
382         (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
383         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
384         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
385         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
386         * rendering/RenderNamedFlowThread.h:
387         * rendering/RenderObject.cpp:
388         (WebCore::scheduleRelayoutForSubtree):
389         (WebCore::RenderObject::setLayerNeedsFullRepaint):
390         (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
391         (WebCore::RenderObject::repaintUsingContainer):
392         (WebCore::RenderObject::selectionRoot):
393         (WebCore::RenderObject::shouldUseTransformFromContainer):
394         (WebCore::RenderObject::getTransformFromContainer):
395         (WebCore::RenderObject::isRooted):
396         (WebCore::RenderObject::willBeDestroyed):
397         (WebCore::RenderObject::isComposited):
398         (WebCore::RenderObject::currentRenderNamedFlowFragment):
399         * rendering/RenderObject.h:
400         * rendering/RenderProgress.h:
401         * rendering/RenderRuby.cpp:
402         (WebCore::lastRubyRun):
403         * rendering/RenderRubyBase.cpp:
404         (WebCore::RenderRubyBase::rubyRun):
405         * rendering/RenderRubyRun.cpp:
406         (WebCore::RenderRubyRun::removeChild):
407         * rendering/RenderRubyRun.h:
408         * rendering/RenderSlider.h:
409         * rendering/RenderText.cpp:
410         (WebCore::RenderText::widthFromCache):
411         * rendering/RenderThemeGtk.cpp:
412         (WebCore::RenderThemeGtk::calculateProgressRect):
413         * rendering/RenderThemeIOS.mm:
414         (WebCore::RenderThemeIOS::paintProgressBar):
415         * rendering/RenderThemeMac.mm:
416         (WebCore::RenderThemeMac::paintMeter):
417         (WebCore::RenderThemeMac::paintProgressBar):
418         * rendering/RenderThemeSafari.cpp:
419         (WebCore::RenderThemeSafari::paintMeter):
420         * rendering/RenderThemeWin.cpp:
421         (WebCore::RenderThemeWin::paintMeter):
422         * rendering/RenderTreeAsText.cpp:
423         (WebCore::writeRenderRegionList):
424         (WebCore::writeLayers):
425         * rendering/RenderVideo.h:
426         * rendering/RenderView.cpp:
427         (WebCore::SelectionIterator::checkForSpanner):
428         (WebCore::isComposited):
429         * rendering/RenderView.h:
430         * rendering/RenderWidget.h:
431         * rendering/line/BreakingContextInlineHeaders.h:
432         (WebCore::BreakingContext::handleText):
433         * rendering/line/LineBreaker.cpp:
434         (WebCore::LineBreaker::skipLeadingWhitespace):
435         * testing/Internals.cpp:
436         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
437
438 2014-10-19  Chris Dumez  <cdumez@apple.com>
439
440         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
441         https://bugs.webkit.org/show_bug.cgi?id=137854
442
443         Reviewed by Darin Adler.
444
445         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar instead of a
446         custom toRenderScrollbar() function, for consistency.
447
448         No new tests, no behavior change.
449
450         * rendering/RenderScrollbar.h:
451         (isType):
452         (WebCore::toRenderScrollbar): Deleted.
453         * rendering/RenderScrollbarTheme.cpp:
454         (WebCore::RenderScrollbarTheme::minimumThumbLength):
455         (WebCore::RenderScrollbarTheme::backButtonRect):
456         (WebCore::RenderScrollbarTheme::forwardButtonRect):
457         (WebCore::RenderScrollbarTheme::trackRect):
458         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
459         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
460         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
461         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
462         (WebCore::RenderScrollbarTheme::paintTrackBackground):
463         (WebCore::RenderScrollbarTheme::paintTrackPiece):
464         (WebCore::RenderScrollbarTheme::paintButton):
465         (WebCore::RenderScrollbarTheme::paintThumb):
466
467 2014-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
468
469         [GTK] Move GtkDragAndDropHelper from Platform to WebKit2
470         https://bugs.webkit.org/show_bug.cgi?id=137422
471
472         Reviewed by Martin Robinson.
473
474         Remove ClipboardUtilitiesGtk and GtkDragAndDropHelper.
475
476         * PlatformGTK.cmake:
477         * platform/gtk/ClipboardUtilitiesGtk.cpp: Removed.
478         * platform/gtk/ClipboardUtilitiesGtk.h: Removed.
479         * platform/gtk/GtkDragAndDropHelper.cpp: Removed.
480         * platform/gtk/GtkDragAndDropHelper.h: Removed.
481
482 2014-10-19  Roger Fong  <roger_fong@apple.com>
483
484         Unreviewed. Style fix following r174855.
485
486         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
487         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
488
489 2014-10-18  Antti Koivisto  <antti@apple.com>
490
491         REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
492         https://bugs.webkit.org/show_bug.cgi?id=137855
493
494         Reviewed by Dan Bernstein.
495
496         We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
497         backchannel data that the synthesized response doesn't have.
498
499         Test: http/tests/mime/mime-type-sniff.html
500
501         * platform/network/mac/ResourceResponseMac.mm:
502         (WebCore::ResourceResponse::initNSURLResponse):
503
504             When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.
505
506 2014-10-18  Chris Dumez  <cdumez@apple.com>
507
508         [Mac] Use Fast enumeration consistently in WebFontCache.mm
509         https://bugs.webkit.org/show_bug.cgi?id=137791
510
511         Reviewed by Darin Adler.
512
513         Use fast enumeration consistently in WebFontCache.mm as this results in
514         more efficient, concise and safer code.
515
516         No new tests, no behavior change.
517
518         * platform/mac/WebFontCache.mm:
519         (+[WebFontCache getTraits:inFamily:]):
520         Reserve Vector capacity before the loop as we know how many traits we
521         are going to append. Also use uncheckedAppend() for performance.
522
523         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
524
525 2014-10-18  Chris Fleizach  <cfleizach@apple.com>
526
527         AX: Tables with <colgroups> are not reporting table column headers
528         https://bugs.webkit.org/show_bug.cgi?id=137846
529
530         Reviewed by Mario Sanchez Prada.
531
532         The code to search for header objects was getting stuck on anonymous RenderTableSections.
533         We also need to check more rows for headers, in case the first row or more is not visible or is empty.
534
535         Test: accessibility/table-column-headers-with-captions.html
536
537         * accessibility/AccessibilityTableColumn.cpp:
538         (WebCore::AccessibilityTableColumn::headerObject):
539         (WebCore::AccessibilityTableColumn::headerObjectForSection):
540
541 2014-10-18  KwangHyuk Kim  <hyuki.kim@samsung.com>
542
543         [EFL] build break occurs on webkit efl build.
544         https://bugs.webkit.org/show_bug.cgi?id=137844
545
546         Reviewed by Gyuyoung Kim.
547
548         As local variable elementAddressRegisterIndex is assigned but not used, there is build break for the webkit efl.
549
550         No new tests because it's just to fix build break.
551
552         * cssjit/SelectorCompiler.cpp:
553         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
554
555 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
556
557         Apply std::unique_ptr to FooFont classes
558         https://bugs.webkit.org/show_bug.cgi?id=137769
559
560         Reviewed by Andreas Kling.
561
562         As a step to use std::unique_ptr, this patch applies std::unique_ptr to Font classes.
563
564         No new tests, no behavior changes.
565
566         * platform/graphics/Font.cpp:
567         (WebCore::retrieveOrAddCachedFontGlyphs):
568         (WebCore::Font::createLayout):
569         * platform/graphics/SimpleFontData.cpp:
570         (WebCore::SimpleFontData::DerivedFontData::create):
571         * platform/graphics/SimpleFontData.h:
572         Remove create() factory function because public ctor and std::make_unique<> can replace it.
573         * platform/graphics/mac/ComplexTextController.cpp:
574         (WebCore::Font::createLayout):
575
576 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
577
578         Use std::unique_ptr in WebCore/bindings
579         https://bugs.webkit.org/show_bug.cgi?id=137808
580
581         Reviewed by Andreas Kling.
582
583         Clean up PassOwnPtr|OwnPtr in WebCore/bindings by using std::unique_ptr, std::make_unique
584         and WTF::move.
585
586         No new tests, no behavior changes.
587
588         * bindings/generic/ActiveDOMCallback.h:
589         * bindings/js/JSMessageEventCustom.cpp:
590         (WebCore::handleInitMessageEvent):
591         * bindings/js/SerializedScriptValue.cpp:
592         (WebCore::SerializedScriptValue::SerializedScriptValue):
593         (WebCore::SerializedScriptValue::transferArrayBuffers):
594         (WebCore::SerializedScriptValue::create):
595         * bindings/js/SerializedScriptValue.h:
596         * bindings/js/WorkerScriptDebugServer.cpp:
597         (WebCore::WorkerScriptDebugServer::interruptAndRunTask):
598         * bindings/js/WorkerScriptDebugServer.h:
599         * inspector/WorkerDebuggerAgent.cpp:
600         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
601
602 2014-10-16  Roger Fong  <roger_fong@apple.com>
603
604         Calling glReadPixels with BGRA format on an NVIDIA machine with an opaque context returns the wrong alpha values.
605         https://bugs.webkit.org/show_bug.cgi?id=137793.
606         <rdar://problem/15408133>
607
608         Reviewed by Dean Jackson.
609
610         This fixes conformance test context/context-attribute-preserve-drawing-buffer.html.
611
612         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
613         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
614         On an NVIDIA machine, when the context has alpha turned off, call glReadPixels with RGBA format and then convert to RGBA.
615
616 2014-10-17  Chris Dumez  <cdumez@apple.com>
617
618         Use is<>() / downcast<>() for all SVG RenderObjects
619         https://bugs.webkit.org/show_bug.cgi?id=137840
620
621         Reviewed by Benjamin Poulain.
622
623         Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
624         surrounding code.
625
626         No new tests, no behaviro change.
627
628         * accessibility/AccessibilityRenderObject.cpp:
629         (WebCore::AccessibilityRenderObject::supportsPath):
630         (WebCore::AccessibilityRenderObject::elementPath):
631         * page/FrameView.cpp:
632         (WebCore::FrameView::applyOverflowToViewport):
633         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
634         * rendering/RenderLayerFilterInfo.cpp:
635         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
636         * rendering/svg/RenderSVGGradientStop.cpp:
637         (WebCore::RenderSVGGradientStop::styleDidChange):
638         * rendering/svg/RenderSVGImage.h:
639         * rendering/svg/RenderSVGInlineText.h:
640         * rendering/svg/RenderSVGResourceContainer.cpp:
641         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
642         * rendering/svg/RenderSVGResourceContainer.h:
643         * rendering/svg/RenderSVGRoot.cpp:
644         (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
645         * rendering/svg/RenderSVGRoot.h:
646         * rendering/svg/RenderSVGShape.h:
647         * rendering/svg/RenderSVGText.cpp:
648         (WebCore::collectLayoutAttributes):
649         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
650         (WebCore::RenderSVGText::subtreeTextDidChange):
651         (WebCore::updateFontInAllDescendants):
652         * rendering/svg/RenderSVGText.h:
653         * rendering/svg/SVGInlineTextBox.h:
654         * rendering/svg/SVGRenderSupport.cpp:
655         (WebCore::SVGRenderSupport::mapLocalToContainer):
656         (WebCore::SVGRenderSupport::pushMappingToContainer):
657         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
658         * rendering/svg/SVGRenderTreeAsText.cpp:
659         (WebCore::writeStyle):
660         * rendering/svg/SVGRenderingContext.cpp:
661         (WebCore::SVGRenderingContext::bufferForeground):
662         * rendering/svg/SVGResourcesCycleSolver.cpp:
663         (WebCore::SVGResourcesCycleSolver::resolveCycles):
664         * rendering/svg/SVGRootInlineBox.cpp:
665         (WebCore::SVGRootInlineBox::renderSVGText):
666         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
667         * svg/SVGCircleElement.cpp:
668         (WebCore::SVGCircleElement::svgAttributeChanged):
669         * svg/SVGElement.cpp:
670         (WebCore::SVGElement::svgAttributeChanged):
671         * svg/SVGEllipseElement.cpp:
672         (WebCore::SVGEllipseElement::svgAttributeChanged):
673         * svg/SVGImageElement.cpp:
674         (WebCore::SVGImageElement::svgAttributeChanged):
675         (WebCore::SVGImageElement::didAttachRenderers):
676         * svg/SVGLineElement.cpp:
677         (WebCore::SVGLineElement::svgAttributeChanged):
678         * svg/SVGPolyElement.cpp:
679         (WebCore::SVGPolyElement::svgAttributeChanged):
680         * svg/SVGRectElement.cpp:
681         (WebCore::SVGRectElement::svgAttributeChanged):
682         * svg/SVGSVGElement.cpp:
683         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
684         (WebCore::SVGSVGElement::currentViewBoxRect):
685         * svg/graphics/SVGImage.cpp:
686         (WebCore::SVGImage::setContainerSize):
687         (WebCore::SVGImage::containerSize):
688
689 2014-10-17  Chris Dumez  <cdumez@apple.com>
690
691         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
692         https://bugs.webkit.org/show_bug.cgi?id=137836
693
694         Reviewed by Andreas Kling.
695
696         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
697         This function is only called from WidthIterator::applyFontTransforms(),
698         which already makes sure to call applyTransforms() if isSVGFont()
699         returns false. This patch replaces the check with a simple assertion.
700
701         No new tests, no behavior change.
702
703         * platform/graphics/SimpleFontData.h:
704         * svg/SVGFontData.h:
705
706 2014-10-17  Michael Saboff  <msaboff@apple.com>
707
708         Don't create cached functions that access lexicalGlobalObject()
709         https://bugs.webkit.org/show_bug.cgi?id=137839
710
711         Reviewed by Geoffrey Garen.
712
713         Made it so that all the JSDOMWindow special functions blur(), close(), focus() and postMessage()
714         are always created as needed for every prototype.  Made it so that JSHTMLDocument does
715         the same for open().  Updated test to account for these methods not being cached
716
717         Updated tests accordingly.
718
719         * bindings/js/JSDOMWindowCustom.cpp: 
720         (WebCore::JSDOMWindow::getOwnPropertySlot): Updated to always create cached versions of the
721         special functions.
722         * bindings/js/JSHTMLDocumentCustom.cpp:
723         (WebCore::JSHTMLDocument::getOwnPropertySlot): Added to create an uncached open() method when
724         it is first accessed.
725         * html/HTMLDocument.idl: Added CustomGetOwnPropertySlot and implemented it in JSHTMLDocumentCustom.cpp.
726
727 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
728
729         [iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinatedLayer()
730         https://bugs.webkit.org/show_bug.cgi?id=137837
731         rdar://problem/18545452
732
733         Reviewed by Tim Horton.
734
735         Crash logs suggest that an iframe's RenderView's RenderLayer's backing can be null
736         in a call to updateScrollCoordinatedLayer(), so add an assertion (to help find a reproducible case)
737         and a null check.
738
739         * rendering/RenderLayerCompositor.cpp:
740         (WebCore::RenderLayerCompositor::attachScrollingNode):
741
742 2014-10-17  Andreas Kling  <akling@apple.com>
743
744         Re-arrange parentheses for compilation purposes.
745
746         * cssjit/SelectorCompiler.cpp:
747         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
748
749 2014-10-17  Andreas Kling  <akling@apple.com>
750
751         Unreviewed build fix after r174838.
752
753         Use StackAllocator::addressOf() instead of the old way of grabbing at a stack reference.
754
755         * cssjit/SelectorCompiler.cpp:
756         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
757
758 2014-10-17  Chris Dumez  <cdumez@apple.com>
759
760         Use is<>() / downcast<>() for RenderBox
761         https://bugs.webkit.org/show_bug.cgi?id=137804
762
763         Reviewed by Andreas Kling.
764
765         Use is<>() / downcast<>() for RenderBox and clean up the surrounding
766         code.
767
768         No new tests, no behavior change.
769
770         * accessibility/AccessibilityRenderObject.cpp:
771         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
772         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
773         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
774         (WebCore::AccessibilityRenderObject::scrollTo):
775         * bindings/objc/DOMHTML.mm:
776         (-[DOMHTMLElement scrollYOffset]):
777         (-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
778         * bindings/objc/DOMUIKitExtensions.mm:
779         (-[DOMNode borderRadii]):
780         * css/CSSComputedStyleDeclaration.cpp:
781         (WebCore::sizingBox):
782         (WebCore::computedTransform):
783         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
784         (WebCore::ComputedStyleExtractor::propertyValue):
785         * dom/ContainerNode.cpp:
786         (WebCore::ContainerNode::getLowerRightCorner):
787         * dom/Document.cpp:
788         (WebCore::Document::webkitWillEnterFullScreenForElement):
789         * dom/Element.cpp:
790         (WebCore::Element::scrollByUnits):
791         * dom/Node.cpp:
792         (WebCore::Node::defaultEventHandler):
793         * dom/Position.cpp:
794         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
795         * editing/DeleteButtonController.cpp:
796         (WebCore::isDeletableElement):
797         * editing/EditorCommand.cpp:
798         (WebCore::verticalScrollDistance):
799         * editing/FrameSelection.cpp:
800         (WebCore::CaretBase::paintCaret):
801         * editing/TextIterator.cpp:
802         (WebCore::fullyClipsContents):
803         (WebCore::shouldEmitExtraNewlineForNode):
804         * editing/htmlediting.cpp:
805         (WebCore::absoluteBoundsForLocalCaretRect):
806         * html/HTMLFormControlElement.cpp:
807         (WebCore::HTMLFormControlElement::isFocusable):
808         * html/HTMLPlugInImageElement.cpp:
809         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
810         * html/HTMLSelectElement.cpp:
811         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
812         * html/shadow/SliderThumbElement.cpp:
813         (WebCore::SliderThumbElement::setPositionFromPoint):
814         * inspector/InspectorOverlay.cpp:
815         (WebCore::buildObjectForElementInfo):
816         * page/AutoscrollController.cpp:
817         (WebCore::AutoscrollController::updateAutoscrollRenderer):
818         * page/EventHandler.cpp:
819         (WebCore::EventHandler::startPanScrolling):
820         * page/FrameView.cpp:
821         (WebCore::FrameView::embeddedContentBox):
822         * page/GestureTapHighlighter.cpp:
823         * page/SpatialNavigation.cpp:
824         (WebCore::isScrollableNode):
825         * page/animation/CSSPropertyAnimation.cpp:
826         (WebCore::blendFunc):
827         * platform/efl/RenderThemeEfl.cpp:
828         (WebCore::RenderThemeEfl::baselinePosition):
829         * plugins/PluginView.cpp:
830         (WebCore::PluginView::invalidateWindowlessPluginRect):
831         * rendering/InlineBox.cpp:
832         (WebCore::InlineBox::logicalHeight):
833         (WebCore::InlineBox::adjustPosition):
834         * rendering/InlineElementBox.cpp:
835         (WebCore::InlineElementBox::deleteLine):
836         (WebCore::InlineElementBox::extractLine):
837         (WebCore::InlineElementBox::attachLine):
838         (WebCore::InlineElementBox::paint):
839         (WebCore::InlineElementBox::nodeAtPoint):
840         * rendering/InlineFlowBox.cpp:
841         (WebCore::InlineFlowBox::addToLine):
842         (WebCore::InlineFlowBox::addReplacedChildOverflow):
843         * rendering/LayoutState.cpp:
844         (WebCore::LayoutState::LayoutState):
845         * rendering/RenderBlock.cpp:
846         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
847         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
848         (WebCore::RenderBlock::clearPercentHeightDescendantsFrom):
849         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
850         (WebCore::RenderBlock::addFocusRingRects):
851         * rendering/RenderBlockFlow.cpp:
852         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
853         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
854         * rendering/RenderBlockLineLayout.cpp:
855         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
856         (WebCore::RenderBlockFlow::layoutLineBoxes):
857         * rendering/RenderBox.cpp:
858         (WebCore::RenderBox::findAutoscrollable):
859         (WebCore::computeBlockStaticDistance):
860         (WebCore::RenderBox::positionForPoint):
861         (WebCore::RenderBox::layoutOverflowRectForPropagation):
862         * rendering/RenderBox.h:
863         (WebCore::RenderBox::previousSiblingBox):
864         (WebCore::RenderBox::nextSiblingBox):
865         (WebCore::RenderBox::parentBox):
866         (WebCore::RenderBox::firstChildBox):
867         (WebCore::RenderBox::lastChildBox):
868         * rendering/RenderBoxModelObject.cpp:
869         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
870         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
871         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
872         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
873         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
874         * rendering/RenderElement.cpp:
875         (WebCore::RenderElement::removeChildInternal):
876         (WebCore::RenderElement::styleWillChange):
877         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
878         * rendering/RenderEmbeddedObject.cpp:
879         (WebCore::RenderEmbeddedObject::layout):
880         * rendering/RenderFieldset.cpp:
881         (WebCore::RenderFieldset::findLegend):
882         * rendering/RenderFlowThread.cpp:
883         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
884         (WebCore::RenderFlowThread::currentActiveRenderBox):
885         * rendering/RenderFlowThread.h:
886         * rendering/RenderFullScreen.cpp:
887         (WebCore::RenderFullScreen::unwrapRenderer):
888         * rendering/RenderImage.cpp:
889         (WebCore::RenderImage::layoutShadowControls):
890         (WebCore::RenderImage::computeIntrinsicRatioInformation):
891         * rendering/RenderInline.cpp:
892         (WebCore::RenderInline::absoluteRects):
893         (WebCore::RenderInline::addFocusRingRects):
894         * rendering/RenderLayer.cpp:
895         (WebCore::RenderLayer::updateLayerPosition):
896         (WebCore::RenderLayer::perspectiveTransform):
897         (WebCore::RenderLayer::perspectiveOrigin):
898         (WebCore::parentLayerCrossFrame):
899         (WebCore::RenderLayer::enclosingScrollableLayer):
900         (WebCore::RenderLayer::resize):
901         (WebCore::RenderLayer::scrollsOverflow):
902         (WebCore::computeReferenceBox):
903         (WebCore::RenderLayer::calculateClipRects):
904         * rendering/RenderLayer.h:
905         * rendering/RenderLayerBacking.cpp:
906         (WebCore::RenderLayerBacking::updateTransform):
907         (WebCore::RenderLayerBacking::updateGeometry):
908         (WebCore::RenderLayerBacking::resetContentsRect):
909         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
910         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
911         (WebCore::RenderLayerBacking::contentsBox):
912         (WebCore::RenderLayerBacking::backgroundBoxForPainting):
913         (WebCore::RenderLayerBacking::startAnimation):
914         (WebCore::RenderLayerBacking::startTransition):
915         * rendering/RenderLineBoxList.cpp:
916         (WebCore::RenderLineBoxList::rangeIntersectsRect):
917         * rendering/RenderMediaControlElements.cpp:
918         (WebCore::RenderMediaVolumeSliderContainer::layout):
919         * rendering/RenderMultiColumnFlowThread.cpp:
920         (WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
921         (WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
922         (WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
923         (WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
924         (WebCore::isValidColumnSpanner):
925         (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
926         * rendering/RenderNamedFlowThread.cpp:
927         (WebCore::RenderNamedFlowThread::getRanges):
928         * rendering/RenderObject.cpp:
929         (WebCore::RenderObject::computeRectForRepaint):
930         (WebCore::RenderObject::showRegionsInformation):
931         (WebCore::RenderObject::showRenderObject):
932         (WebCore::RenderObject::mapLocalToContainer):
933         (WebCore::RenderObject::pushMappingToContainer):
934         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
935         (WebCore::RenderObject::addAnnotatedRegions):
936         * rendering/RenderTable.cpp:
937         (WebCore::RenderTable::nodeAtPoint):
938         * rendering/RenderTextControlMultiLine.cpp:
939         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
940         * rendering/RenderTheme.cpp:
941         (WebCore::RenderTheme::baselinePosition):
942         * rendering/RenderThemeGtk.cpp:
943         (WebCore::RenderThemeGtk::baselinePosition):
944         (WebCore::centerRectVerticallyInParentInputElement):
945         * rendering/RenderThemeIOS.mm:
946         (WebCore::RenderThemeIOS::baselinePosition):
947         * rendering/RenderThemeSafari.cpp:
948         (WebCore::RenderThemeSafari::baselinePosition):
949         * rendering/RenderThemeWin.cpp:
950         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
951         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
952         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
953         * rendering/RenderTreeAsText.cpp:
954         (WebCore::RenderTreeAsText::writeRenderObject):
955         (WebCore::externalRepresentation):
956         * rendering/RenderView.cpp:
957         (WebCore::RenderView::paintBoxDecorations):
958         * rendering/RootInlineBox.cpp:
959         (WebCore::RootInlineBox::setLineBreakInfo):
960         * rendering/line/BreakingContextInlineHeaders.h:
961         (WebCore::BreakingContext::handleOutOfFlowPositioned):
962         (WebCore::BreakingContext::handleFloat):
963         (WebCore::BreakingContext::handleReplaced):
964         * rendering/line/LineBreaker.cpp:
965         (WebCore::LineBreaker::skipTrailingWhitespace):
966         (WebCore::LineBreaker::skipLeadingWhitespace):
967         * rendering/mathml/RenderMathMLUnderOver.cpp:
968         (WebCore::RenderMathMLUnderOver::layout):
969         * svg/graphics/SVGImage.cpp:
970         (WebCore::SVGImage::embeddedContentBox):
971
972 2014-10-17  Andreas Kling  <akling@apple.com>
973
974         Get rid of wrapperContext() in DOM bindings.
975         <https://webkit.org/b/137834>
976
977         Reviewed by Chris Dumez.
978
979         The "wrapper context" is always the DOMWrapperWorld, and since we're passing that around
980         already, we don't need a separate mechanism to get at the context.
981
982         The context is extra data stored in the DOM object's JSC::Weak (the wrapper GC object.)
983
984         * bindings/js/JSDOMBinding.h:
985         (WebCore::setInlineCachedWrapper):
986         (WebCore::cacheWrapper):
987         (WebCore::wrapperContext): Deleted.
988         * bindings/scripts/CodeGeneratorJS.pm:
989         (GenerateHeader):
990
991 2014-10-17  Benjamin Poulain  <benjamin@webkit.org>
992
993         Make a better use of the available registers when compiling nested selector lists
994         https://bugs.webkit.org/show_bug.cgi?id=137802
995
996         Reviewed by Andreas Kling.
997
998         Previously, when compiling a nested selector list, the compiler would start by pushing all
999         the allocated registers to the stack to free them for the compiled selector list.
1000         While neat to ensure register allocation is correct, this is very inefficient.
1001
1002         This patch brings the first step for reducing the overhead. Instead of pushing everything
1003         to the stack, we just push as many registers as we need for compiling the selector list.
1004
1005         In most cases, we have so many registers that we don't even need to push anything to the stack.
1006
1007         Test: fast/selectors/nth-child-of-register-requirement.html
1008
1009         * cssjit/SelectorCompiler.cpp:
1010         Add an explicit type for SelectorList to keep information aggregated from all
1011         SelectorFragmentList inside it.
1012
1013         SelectorFragmentList is also extended to include its register and stack requirements.
1014         This information is then used to create a SelectorList and to compile the SelectorFragmentList.
1015
1016         (WebCore::SelectorCompiler::hasAnyCombinators):
1017         We only change the elementAddressRegister when moving over combinators. This is used to detect
1018         if a selector list clobber the elementAddressRegister or leave it untouched.
1019
1020         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
1021         (WebCore::SelectorCompiler::computeBacktrackingInformation):
1022         Instead of returning a BacktrackingMemoryRequirements, update the SelectorFragmentList and SelectorList directly.
1023
1024         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1025         This is where the fun happen.
1026         First step is keep the input untouched. For now it is simply pushed on the stack. This can be improved later.
1027
1028         Then we find how many allocated registers we need to save to compile the input selector list. We push those registers
1029         to the stack and give them back to the register allocator.
1030
1031         With enough registers we can now compile the nested selector list. The code has changed a bit for efficiency. Instead
1032         of creating a shortcut for success case, the code now exit on error and proceed on success. This is the general pattern
1033         of SelectorCompiler and it is quite a bit more efficient in the common cases.
1034
1035         Finally, we reallocate the registers and get their values back from the stack. The "tail" is duplicated but that's fine
1036         because in the vast majority of cases it is 1 or 2 pop.
1037
1038         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1039         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
1040         * cssjit/StackAllocator.h:
1041         (WebCore::StackAllocator::push):
1042
1043 2014-10-17  Chris Dumez  <cdumez@apple.com>
1044
1045         Use is<>() / downcast<>() for StyleImage
1046         https://bugs.webkit.org/show_bug.cgi?id=137824
1047
1048         Reviewed by Andreas Kling.
1049
1050         Use is<>() / downcast<>() for StyleImage and clean up the surrouding
1051         code.
1052
1053         No new tests, no behavior change.
1054
1055         * css/CSSCursorImageValue.cpp:
1056         (WebCore::CSSCursorImageValue::detachPendingImage):
1057         (WebCore::CSSCursorImageValue::cachedImage):
1058         (WebCore::CSSCursorImageValue::cachedImageURL):
1059         * css/CSSImageSetValue.cpp:
1060         (WebCore::CSSImageSetValue::detachPendingImage):
1061         (WebCore::CSSImageSetValue::~CSSImageSetValue):
1062         (WebCore::CSSImageSetValue::cachedImageSet):
1063         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
1064         * css/CSSImageValue.cpp:
1065         (WebCore::CSSImageValue::detachPendingImage):
1066         (WebCore::CSSImageValue::cachedImage):
1067         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
1068         * css/StyleResolver.cpp:
1069         (WebCore::StyleResolver::loadPendingShapeImage):
1070         (WebCore::StyleResolver::loadPendingImages):
1071         * page/PageSerializer.cpp:
1072         (WebCore::PageSerializer::retrieveResourcesForProperties):
1073         * page/animation/CSSPropertyAnimation.cpp:
1074         (WebCore::blendFunc):
1075         * rendering/style/StyleCachedImage.h:
1076         * rendering/style/StyleCachedImageSet.h:
1077         * rendering/style/StyleGeneratedImage.h:
1078         * rendering/style/StyleImage.h:
1079         * rendering/style/StylePendingImage.h:
1080
1081 2014-10-17  Dean Jackson  <dino@apple.com>
1082
1083         [Media] Always update controls for <audio> since they are always visible
1084         https://bugs.webkit.org/show_bug.cgi?id=137829
1085         <rdar://problem/18693987>
1086
1087         Reviewed by Brent Fulgham.
1088
1089         Revision 174756 made a change to only update the display of the controls
1090         while they are visible. However, <audio> elements didn't detect visibility
1091         the same way, since their controls do not auto-hide.
1092
1093         Change controlsAreHidden to check if we're an audio element.
1094
1095         * Modules/mediacontrols/mediaControlsApple.js:
1096         (Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.
1097
1098 2014-10-17  peavo@outlook.com  <peavo@outlook.com>
1099
1100         [WinCairo] Accelerated compositing is not implemented.
1101         https://bugs.webkit.org/show_bug.cgi?id=137345
1102
1103         Reviewed by Brent Fulgham.
1104
1105         This patch is based on GTK, and the texture mapper graphics layer type.
1106
1107         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
1108         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
1109         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
1110         (WebCore::GraphicsLayerTextureMapper::addAnimation):
1111         * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
1112         (WebCore::GraphicsLayerTextureMapper::startedAnimation):
1113         * platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
1114         Otherwise glLinkProgram() will fail, and nothing will be rendered.
1115
1116 2014-10-17  Alexey Proskuryakov  <ap@apple.com>
1117
1118         [iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
1119         https://bugs.webkit.org/show_bug.cgi?id=137826
1120         rdar://problem/17329599
1121
1122         Reviewed by Brady Eidson.
1123
1124         No new tests, as we don't have a way to simulate details of user interaction with
1125         an auth dialog.
1126
1127         * platform/network/cf/ResourceHandleCFNet.cpp:
1128         (WebCore::ResourceHandle::receivedCredential):
1129         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
1130         (WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling):
1131         (WebCore::ResourceHandle::receivedChallengeRejection):
1132         Added null checks before passing m_connection for CFNetwork functions, making this
1133         match what Mac code does when sending a message to a nil receiver.
1134
1135 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
1136
1137         Fix the iOS build.
1138
1139         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
1140         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):
1141
1142 2014-10-16  Jer Noble  <jer.noble@apple.com>
1143
1144         [Mac] Represent AVMediaSelectionOptions as AudioTracks
1145         https://bugs.webkit.org/show_bug.cgi?id=137474
1146
1147         Reviewed by Brent Fulgham.
1148
1149         Test: http/tests/media/hls/hls-audio-tracks.html
1150
1151         Support selecting audio "tracks" in HLS streams by exposing AVMediaSelectionOptions
1152         as entries in the video's AudioTrackList.
1153
1154         AVMediaSessionGroups and AVPlayerItems don't have KVO or notifications to track when options
1155         are selected and deselected, so wrap AVMediaSessionGroup and AVMediaSessionOption in C++
1156         wrappers. Each AVMediaSelectionGroup can have only one AVMediaSelectionOption selected at a
1157         time, so the wrapper will take care of answering which AVMediaSelectionOption is currently
1158         selected, as without KVO notifications, asking the AVMediaSelectionGroup directly is
1159         inconsistent. Because setting the selected option multiple times in the same run-loop can
1160         cause flakiness, coalesce calls to setSelectedOption() by setting a one-shot timer to do
1161         the actual selection in the next run-loop.
1162
1163         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Added.
1164         (WebCore::MediaSelectionOptionAVFObjC::avMediaSelectionOption):
1165         (WebCore::MediaSelectionOptionAVFObjC::clearGroup): Clear backpointer to group from option.
1166         (WebCore::MediaSelectionGroupAVFObjC::selectedOption): Simple accessor.
1167         (WebCore::MediaSelectionGroupAVFObjC::options):  Simple accessor.
1168         (WebCore::MediaSelectionGroupAVFObjC::avMediaSelectionGroup): Simple accessor.
1169         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: Added.
1170         (WebCore::MediaSelectionOptionAVFObjC::create): Simple factory method.
1171         (WebCore::MediaSelectionOptionAVFObjC::MediaSelectionOptionAVFObjC): Simple constructor.
1172         (WebCore::MediaSelectionOptionAVFObjC::setSelected): Pass through to MediaSelectionGroupAVFObjC.
1173         (WebCore::MediaSelectionOptionAVFObjC::selected): Ditto.
1174         (WebCore::MediaSelectionOptionAVFObjC::index): Return index of this object in the group's object.
1175         (WebCore::MediaSelectionGroupAVFObjC::create):
1176         (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
1177         (WebCore::MediaSelectionGroupAVFObjC::~MediaSelectionGroupAVFObjC):
1178         (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Discover added or removed options.
1179         (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set a one shot timer to coalesce multiple calls.
1180         (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): Set the selected AVSelectionOption.
1181
1182         Modify AVTrackPrivateAVFObjCImpl to support both AVPlayerItemTracks and these new
1183         MediaSelectionOptionAVFObjC objects.
1184
1185         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
1186         (WebCore::AVTrackPrivateAVFObjCImpl::mediaSelectionOption): Simple accessor.
1187         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
1188         (WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):  Simple constructor.
1189         (WebCore::AVTrackPrivateAVFObjCImpl::~AVTrackPrivateAVFObjCImpl): Simple destructor.
1190         (WebCore::AVTrackPrivateAVFObjCImpl::enabled): Use MediaSelectionOptionAVFObjC, if present.
1191         (WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
1192         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Ditto.
1193         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Ditto.
1194         (WebCore::AVTrackPrivateAVFObjCImpl::index): Ditto.
1195         (WebCore::AVTrackPrivateAVFObjCImpl::id): Ditto.
1196         (WebCore::AVTrackPrivateAVFObjCImpl::label): Ditto.
1197         (WebCore::AVTrackPrivateAVFObjCImpl::language): Ditto.
1198         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption): Ditto.
1199         (WebCore::AVTrackPrivateAVFObjCImpl::trackID): Ditto.
1200
1201         Allow AudioTrackPrivateAVFObjC and VideoTrackPrivateAVFObjC to be created with
1202         a MediaSelectionOptionAVFObjC.
1203
1204         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
1205         (WebCore::AudioTrackPrivateAVFObjC::create): Takes a MediaSelectionOptionAVFObjC.
1206         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
1207         (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Simple constructor.
1208         (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): Create a new AVTrackPrivateAVFObjCImpl.
1209         (WebCore::AudioTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
1210         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
1211         (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Simple constructor.
1212         (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): Create a new AVTrackPrivateAVFObjCImpl.
1213         (WebCore::VideoTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
1214         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
1215
1216         Because IDs are not necessarily unique across AVPlayerItemTracks and AVMediaSelectionOptions,
1217         use the index of the track or option instead of it's self-declared ID for ordering for the
1218         trackIndex.
1219
1220         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
1221         (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
1222         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
1223         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
1224
1225         Rather than making allowing the AVPlayerItem to automatically select the "best"
1226         AVMediaSelectionOption, select the automatic options when creating the AVPlayerItem
1227         and thereafter allow the users manual selections "stick".
1228
1229         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1230         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1231         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayer):
1232         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerItem):
1233
1234         Determine whether any MediaSelectionOptionsAVFObjC have been added or removed and send trackChange events accordingly.
1235
1236         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1237         (WebCore::determineChangedTracksFromNewTracksAndOldItems): Added.
1238         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Search for updated selection options.
1239         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
1240         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Return selection group, if available.
1241         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
1242         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Filter out AVPlayerItemTracks without
1243             AVAssetTracks, as these will be represented by MediaSelectionGroupObjCs instead.
1244         
1245         Add new files to project.
1246         * WebCore.xcodeproj/project.pbxproj:
1247
1248 2014-10-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1249
1250         [EFL] window.screen.width returns wrong value if more displays are available
1251         https://bugs.webkit.org/show_bug.cgi?id=137778
1252
1253         Reviewed by Gyuyoung Kim.
1254
1255         ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
1256         having two displays of 1680x1050, it will return 3360x1050.
1257
1258         Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.
1259
1260         No new tests. Hardware specific bug including multiple displays.
1261
1262         * platform/efl/PlatformScreenEfl.cpp:
1263         (WebCore::screenRect):
1264         Use ecore's xrandr to determine the screen on which browser window is displayed.
1265
1266 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1267
1268         [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
1269         https://bugs.webkit.org/show_bug.cgi?id=137782
1270
1271         Reviewed by Sergio Villar Senin.
1272
1273         * platform/gtk/SharedTimerGtk.cpp:
1274         (WebCore::setSharedTimerFireInterval): Use microseconds instead of
1275         milliseconds.
1276
1277 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1278
1279         [GTK] Move touch events handling from Platform to WebKit2
1280         https://bugs.webkit.org/show_bug.cgi?id=137735
1281
1282         Reviewed by Sergio Villar Senin.
1283
1284         Remove GtkTouchContextHelper.
1285
1286         * PlatformGTK.cmake:
1287         * platform/gtk/GtkTouchContextHelper.cpp: Removed.
1288         * platform/gtk/GtkTouchContextHelper.h: Removed.
1289
1290 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1291
1292         Remove unused function in WorkerThreadableLoader.h 
1293         https://bugs.webkit.org/show_bug.cgi?id=137811
1294
1295         Reviewed by Csaba Osztrogon√°c.
1296
1297         mainThreadCreateLoader() isn't used anywhere. Even there is no implementation.
1298
1299         * loader/WorkerThreadableLoader.h:
1300
1301 2014-10-15  Yusuke Suzuki  <utatane.tea@gmail.com>
1302
1303         CSS Selectors Level 4: Implement :matches in SelectorChecker
1304         https://bugs.webkit.org/show_bug.cgi?id=137393
1305
1306         Reviewed by Benjamin Poulain.
1307
1308         In this patch, we introduce initial :matches implementation.
1309         In this current implementation, we don't consider pseudo elements.
1310
1311         Test: fast/selectors/querySelector-matches.html
1312
1313         * css/SelectorChecker.cpp:
1314         (WebCore::SelectorChecker::checkOne):
1315
1316 2014-10-16  Yusuke Suzuki  <utatane.tea@gmail.com>
1317
1318         CSS JIT: Introduce StackAllocator::addressOf
1319         https://bugs.webkit.org/show_bug.cgi?id=137771
1320
1321         Reviewed by Benjamin Poulain.
1322
1323         Introduce StackAllocator::addressOf and drop offsetToStackReference, it's too primitive.
1324
1325         * cssjit/SelectorCompiler.cpp:
1326         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1327         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
1328         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1329         (WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
1330         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
1331         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
1332         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
1333         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
1334         * cssjit/StackAllocator.h:
1335         (WebCore::StackAllocator::addressOf):
1336         (WebCore::StackAllocator::offsetToStackReference):
1337
1338 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
1339
1340         REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website
1341         https://bugs.webkit.org/show_bug.cgi?id=137679
1342         rdar://problem/18450335
1343
1344         Reviewed by Enrica Casucci.
1345
1346         Test: platform/mac/editing/input/selected-composed-text-painting.html
1347
1348         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): We do not paint
1349         selection beckground for unconfirmed text with underlines, so we should use a regular
1350         style for text painting, as well.
1351
1352 2014-10-16  Chris Dumez  <cdumez@apple.com>
1353
1354         Use is<>() / downcast<>() for BasicShape subclasses
1355         https://bugs.webkit.org/show_bug.cgi?id=137766
1356
1357         Reviewed by Andreas Kling.
1358
1359         Use is<>() / downcast<>() for BasicShape subclasses and clean up the
1360         surrounding code.
1361
1362         No new tests, no behavior change.
1363
1364         * css/BasicShapeFunctions.cpp:
1365         (WebCore::valueForBasicShape):
1366         (WebCore::basicShapeForValue):
1367         * css/BasicShapeFunctions.h:
1368         * css/CSSComputedStyleDeclaration.cpp:
1369         (WebCore::shapePropertyValue):
1370         * page/animation/CSSPropertyAnimation.cpp:
1371         (WebCore::blendFunc):
1372         * rendering/ClipPathOperation.h:
1373         (WebCore::ShapeClipPathOperation::create):
1374         Take a PassRef<BasicShape> in argument to make it obvious it is never
1375         null.
1376
1377         (WebCore::ShapeClipPathOperation::basicShape):
1378         Return a reference instead of a pointer as it can never return null.
1379
1380         (WebCore::ShapeClipPathOperation::windRule):
1381         (WebCore::ShapeClipPathOperation::pathForReferenceRect):
1382         Make it non-const due to the const-correctness of Ref::get().
1383
1384         (WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
1385         * rendering/RenderBlock.cpp:
1386         (WebCore::RenderBlock::nodeAtPoint):
1387         * rendering/RenderLayer.cpp:
1388         (WebCore::RenderLayer::setupClipPath):
1389         * rendering/shapes/Shape.cpp:
1390         (WebCore::Shape::createShape):
1391         * rendering/shapes/Shape.h:
1392         * rendering/shapes/ShapeOutsideInfo.cpp:
1393         (WebCore::ShapeOutsideInfo::computedShape):
1394         * rendering/style/BasicShapes.cpp:
1395         (WebCore::BasicShape::canBlend):
1396         (WebCore::BasicShapeCircle::blend):
1397         (WebCore::BasicShapeEllipse::blend):
1398         (WebCore::BasicShapePolygon::blend):
1399         (WebCore::BasicShapeInset::blend):
1400         * rendering/style/BasicShapes.h:
1401         * rendering/svg/SVGRenderingContext.cpp:
1402         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1403
1404 2014-10-16  Chris Dumez  <cdumez@apple.com>
1405
1406         Leverage the new RenderElement::m_isCSSAnimating flag in more places
1407         https://bugs.webkit.org/show_bug.cgi?id=137786
1408
1409         Reviewed by Simon Fraser.
1410
1411         Leverage the new RenderElement::m_isCSSAnimating flag that was introduced
1412         in r174703 in more places, for performance. This avoids doing extra work
1413         for renderers on which we are not running animations on. This patch also
1414         updates the API a bit to use more references instead of pointers, making
1415         it clear the RenderElement cannot be null and thus avoiding unnecessary
1416         null checks.
1417
1418         No new tests, no behavior change.
1419
1420         * css/CSSComputedStyleDeclaration.cpp:
1421         (WebCore::computeRenderStyleForProperty):
1422         * page/animation/AnimationController.cpp:
1423         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
1424         (WebCore::AnimationControllerPrivate::clear):
1425         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
1426         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
1427         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
1428         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
1429         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
1430         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
1431         (WebCore::AnimationController::cancelAnimations):
1432         (WebCore::AnimationController::updateAnimations):
1433         (WebCore::AnimationController::getAnimatedStyleForRenderer):
1434         (WebCore::AnimationController::notifyAnimationStarted):
1435         (WebCore::AnimationController::isRunningAnimationOnRenderer):
1436         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
1437         * page/animation/AnimationController.h:
1438         * page/animation/AnimationControllerPrivate.h:
1439         * rendering/RenderElement.cpp:
1440         (WebCore::RenderElement::willBeDestroyed):
1441         * rendering/RenderLayer.cpp:
1442         (WebCore::RenderLayer::currentTransform):
1443         * rendering/RenderLayerBacking.cpp:
1444         (WebCore::RenderLayerBacking::updateGeometry):
1445         (WebCore::RenderLayerBacking::notifyAnimationStarted):
1446         * rendering/RenderLayerCompositor.cpp:
1447         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1448         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
1449
1450 2014-10-16  Adrien Destugues  <pulkomandy@gmail.com>
1451
1452         Missing RefPtr.release() calls in TextureMapper
1453         https://bugs.webkit.org/show_bug.cgi?id=137777
1454
1455         Reviewed by Chris Dumez.
1456
1457         No new tests: no functional change, cleanup/optimization.
1458
1459         Avoids useless ref/deref cycle when returning from functions.
1460
1461         * platform/graphics/texmap/TextureMapper.cpp:
1462         (WebCore::TextureMapper::acquireTextureFromPool):
1463         * platform/graphics/texmap/TextureMapperLayer.cpp:
1464         (WebCore::TextureMapperLayer::paintIntoSurface):
1465
1466 2014-10-16  Chris Dumez  <cdumez@apple.com>
1467
1468         Use is<>() / downcast<>() for ContentData subclasses
1469         https://bugs.webkit.org/show_bug.cgi?id=137768
1470
1471         Reviewed by Andreas Kling.
1472
1473         Use is<>() / downcast<>() for ContentData subclasses.
1474
1475         No new tests, no behavior change.
1476
1477         * css/CSSComputedStyleDeclaration.cpp:
1478         (WebCore::contentToCSSValue):
1479         * css/StyleResolver.cpp:
1480         (WebCore::StyleResolver::loadPendingImages):
1481         * rendering/RenderElement.cpp:
1482         (WebCore::RenderElement::createFor):
1483         * rendering/style/ContentData.h:
1484         (WebCore::operator==):
1485         * rendering/style/RenderStyle.cpp:
1486         (WebCore::RenderStyle::setContent):
1487
1488 2014-10-16  Commit Queue  <commit-queue@webkit.org>
1489
1490         Unreviewed, rolling out r174744.
1491         https://bugs.webkit.org/show_bug.cgi?id=137790
1492
1493         Caused another WebGL conformance test to fail (Requested by
1494         rfong on #webkit).
1495
1496         Reverted changeset:
1497
1498         "glReadPixels on NVIDIA cards returns the wrong values for the
1499         alpha channel when alpha is off."
1500         https://bugs.webkit.org/show_bug.cgi?id=137752
1501         http://trac.webkit.org/changeset/174744
1502
1503 2014-10-16  Tim Horton  <timothy_horton@apple.com>
1504
1505         Implement selection services menu for Legacy WebKit
1506         https://bugs.webkit.org/show_bug.cgi?id=137582
1507         <rdar://problem/18604241>
1508
1509         Reviewed by Brady Eidson.
1510
1511         * WebCore.exp.in:
1512         * editing/Editor.h:
1513         * editing/ios/EditorIOS.mm:
1514         (WebCore::Editor::replaceSelectionWithAttributedString):
1515         * editing/mac/EditorMac.mm:
1516         (WebCore::Editor::replaceSelectionWithAttributedString):
1517         Add replaceSelectionWithAttributedString, which replaces the selection
1518         with the given attributed string (converting to plain text if the destination
1519         is not richly editable).
1520
1521 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
1522
1523         Crashes in ResourceHandleCFURLConnectionDelegateWithOperationQueue due to unimplemented retain/release
1524         https://bugs.webkit.org/show_bug.cgi?id=137779
1525         rdar://problem/18679320
1526
1527         Reviewed by Brady Eidson.
1528
1529         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1530         (WebCore::ResourceHandleCFURLConnectionDelegate::retain):
1531         (WebCore::ResourceHandleCFURLConnectionDelegate::release):
1532         (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
1533         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
1534         Implemented retain/release. They are necessary, as ResourceHandle goes away when
1535         it's canceled, and there is noone else to keep the client object alive but
1536         CFURLConnection itself.
1537
1538         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1539         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
1540         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1541         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
1542         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
1543         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
1544         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
1545         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
1546         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
1547         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
1548         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
1549         Added a FIXME about potential improvements that I spotted while invsestigating this.
1550
1551 2014-10-15  Andrei Bucur  <abucur@adobe.com>
1552
1553         ASSERTION  FAILED in WebCore::RenderFlowThread::getRegionRangeForBox
1554         https://bugs.webkit.org/show_bug.cgi?id=135563
1555
1556         Reviewed by David Hyatt.
1557
1558         The new multi-column code doesn't work correctly when the document contains nested fragmentation
1559         contexts. The problem is the current flow thread concept that can store only one RenderFlowThread
1560         at a time and use it during layout.
1561
1562         The stored flow thread is always correct for regions because named flow threads are absolutley positioned
1563         so every child renderer is contained inside them (with the expcetion of fixed positioned elements which are
1564         treated separately).
1565
1566         For multi-column elements this is no longer the case. An absolutely positioned element inside a static
1567         multi-column element will be contained by a block outside the fragmentation context. It can even be
1568         contained by a different multi-column element in the case of nested flow threads.
1569
1570         The patch below explores a solution that's not based on a current flow thread stored globally. The proposed
1571         patch makes every block to store a pointer to its fragmentation context and a flag that states if this pointer
1572         needs to be updated or not. If the renderer is not a block it will get its flow thread from the containing
1573         block. Once the containing flow thread is requested for the block, the pointer is computed and cached until
1574         invalidated:
1575         - when a subtree is removed from a flow thread
1576         - when the position property of an element inside a flow thread changes
1577
1578         The process is recursive and it doesn't affect elements that are not nested inside a flow thread. If a block
1579         changes position from relative to static, any element that was contained by it can only be contained by an
1580         ancestor of the block. This ancestor will still be outside of any flow thread. This ensures that non-fragmentation
1581         code is not affected from a performance perspective.
1582
1583         The patch affects the results of the performance tests:
1584         - the regions layout tests have a decreased performance raging from 2% to 5-6%
1585         - the regions selection tests have an increased performance raging from 1-2% to 10%
1586         - the multicolumn layout tests (now pending review in b137687) have an increased performance
1587         raging from 1.8% to 5%
1588
1589         Tests: fast/multicol/multicol-all-positioned-crash.html
1590                fast/multicol/multicol-transform-containing-block.html
1591
1592         * rendering/FlowThreadController.cpp:
1593         (WebCore::FlowThreadController::FlowThreadController):
1594         * rendering/FlowThreadController.h:
1595         (WebCore::FlowThreadController::currentRenderFlowThread): Deleted.
1596         (WebCore::FlowThreadController::setCurrentRenderFlowThread): Deleted.
1597         * rendering/LayoutState.h:
1598         (WebCore::LayoutState::currentRenderFlowThread):
1599         (WebCore::LayoutState::setCurrentRenderFlowThread):
1600         * rendering/RenderBlock.cpp:
1601         (WebCore::RenderBlockRareData::RenderBlockRareData):
1602         (WebCore::RenderBlock::styleWillChange):
1603         (WebCore::RenderBlock::styleDidChange):
1604         (WebCore::RenderBlock::collapseAnonymousBoxChild):
1605         (WebCore::RenderBlock::cachedFlowThreadContainingBlock):
1606         (WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate):
1607         (WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
1608         (WebCore::RenderBlock::updateCachedFlowThreadContainingBlock):
1609         (WebCore::RenderBlock::locateFlowThreadContainingBlock):
1610         * rendering/RenderBlock.h:
1611         * rendering/RenderBlockFlow.cpp:
1612         (WebCore::RenderBlockFlow::styleWillChange):
1613         * rendering/RenderBox.cpp:
1614         (WebCore::RenderBox::borderBoxRectInRegion):
1615         * rendering/RenderFlowThread.cpp:
1616         (WebCore::RenderFlowThread::layout):
1617         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
1618         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1619         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): Deleted.
1620         (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): Deleted.
1621         (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler): Deleted.
1622         (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler): Deleted.
1623         * rendering/RenderFlowThread.h:
1624         * rendering/RenderLayer.cpp:
1625         (WebCore::RenderLayer::paintLayer):
1626         (WebCore::RenderLayer::hitTestLayer):
1627         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
1628         (WebCore::RenderLayer::calculateClipRects):
1629         * rendering/RenderObject.cpp:
1630         (WebCore::RenderObject::showRegionsInformation):
1631         (WebCore::RenderObject::insertedIntoTree):
1632         (WebCore::RenderObject::removeFromRenderFlowThread):
1633         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
1634         (WebCore::RenderObject::invalidateFlowThreadContainingBlockIncludingDescendants):
1635         (WebCore::RenderObject::currentRenderNamedFlowFragment):
1636         (WebCore::RenderObject::locateFlowThreadContainingBlock):
1637         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache): Deleted.
1638         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Deleted.
1639         * rendering/RenderObject.h:
1640         (WebCore::RenderObject::flowThreadContainingBlock):
1641         * rendering/RenderRegion.cpp:
1642         (WebCore::RenderRegion::computeOverflowFromFlowThread):
1643         * rendering/RenderView.cpp:
1644         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
1645         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
1646         * rendering/RenderView.h:
1647
1648 2014-10-15  Chris Dumez  <cdumez@apple.com>
1649
1650         Use is<>() / downcast<>() for list-related render objects
1651         https://bugs.webkit.org/show_bug.cgi?id=137764
1652
1653         Reviewed by Benjamin Poulain.
1654
1655         Use is<>() / downcast<>() for list-related render objects and clean up
1656         the surrounding code.
1657
1658         No new tests, no behavior change.
1659
1660         * accessibility/AccessibilityListBox.cpp:
1661         (WebCore::AccessibilityListBox::visibleChildren):
1662         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
1663         * accessibility/AccessibilityListBoxOption.cpp:
1664         (WebCore::AccessibilityListBoxOption::elementRect):
1665         * accessibility/AccessibilityObject.cpp:
1666         (WebCore::renderListItemContainerForNode):
1667         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1668         (getRangeLengthForObject):
1669         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1670         (accessibilityObjectLength):
1671         (offsetAdjustmentForListItem):
1672         (webkitAccessibleTextGetText):
1673         * editing/BreakBlockquoteCommand.cpp:
1674         (WebCore::BreakBlockquoteCommand::doApply):
1675         * html/HTMLLIElement.cpp:
1676         (WebCore::HTMLLIElement::didAttachRenderers):
1677         (WebCore::HTMLLIElement::parseValue):
1678         * html/HTMLSelectElement.cpp:
1679         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
1680         (WebCore::HTMLSelectElement::scrollToSelection):
1681         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
1682         (WebCore::HTMLSelectElement::selectOption):
1683         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
1684         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1685         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1686         * html/HTMLSelectElementWin.cpp:
1687         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
1688         * page/mac/EventHandlerMac.mm:
1689         (WebCore::EventHandler::platformPrepareForWheelEvents):
1690         * rendering/InlineFlowBox.cpp:
1691         (WebCore::InlineFlowBox::addToLine):
1692         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
1693         * rendering/RenderCounter.cpp:
1694         (WebCore::planCounter):
1695         * rendering/RenderListBox.h:
1696         * rendering/RenderListItem.cpp:
1697         (WebCore::nextListItem):
1698         (WebCore::previousListItem):
1699         * rendering/RenderListItem.h:
1700         * rendering/RenderListMarker.h:
1701         * rendering/RenderMenuList.h:
1702         * rendering/RenderTreeAsText.cpp:
1703         (WebCore::markerTextForListItem):
1704         * rendering/TextAutoSizing.cpp:
1705         (WebCore::TextAutoSizingValue::adjustNodeSizes):
1706         * rendering/line/BreakingContextInlineHeaders.h:
1707         (WebCore::BreakingContext::handleReplaced):
1708         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
1709         * testing/Internals.cpp:
1710         (WebCore::Internals::isSelectPopupVisible):
1711
1712 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1713
1714         Use std::unique_ptr for CachedResource
1715         https://bugs.webkit.org/show_bug.cgi?id=137736
1716
1717         Reviewed by Darin Adler.
1718
1719         No new tests, no behavior change.
1720
1721         * loader/cache/CachedResource.cpp: Use std::unique_ptr instead of PassOwnPtr|OwnPtr.
1722         (WebCore::CachedResource::removeClient):
1723         * loader/cache/CachedResource.h: Set ctor from private to public.
1724         (WebCore::CachedResource::CachedResourceCallback::schedule):
1725
1726 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1727
1728         Move TextCodec classes to std::unique_ptr
1729         https://bugs.webkit.org/show_bug.cgi?id=137738
1730
1731         Reviewed by Darin Adler.
1732
1733         Replace uses of PassOwnPtr in code under TextCodecFoo class with std::unique_ptr.
1734         To do this, ctor of TextCodecFoo classes is changed from private to public. Besides
1735         related classes follow this change as well.
1736
1737         No new tests, no behavior change.
1738
1739         * html/parser/HTMLMetaCharsetParser.h:
1740         * loader/TextResourceDecoder.cpp:
1741         (WebCore::TextResourceDecoder::setEncoding):
1742         (WebCore::TextResourceDecoder::flush):
1743         * loader/TextResourceDecoder.h:
1744         * platform/text/TextCodec.h:
1745         * platform/text/TextCodecICU.cpp:
1746         (WebCore::TextCodecICU::create):
1747         * platform/text/TextCodecICU.h:
1748         * platform/text/TextCodecLatin1.cpp:
1749         (WebCore::newStreamingTextDecoderWindowsLatin1):
1750         * platform/text/TextCodecUTF16.cpp:
1751         (WebCore::newStreamingTextDecoderUTF16LE):
1752         (WebCore::newStreamingTextDecoderUTF16BE):
1753         * platform/text/TextCodecUTF8.cpp:
1754         (WebCore::TextCodecUTF8::create):
1755         * platform/text/TextCodecUTF8.h:
1756         * platform/text/TextCodecUserDefined.cpp:
1757         (WebCore::newStreamingTextDecoderUserDefined):
1758         * platform/text/TextEncodingRegistry.cpp:
1759         (WebCore::newTextCodec):
1760         * platform/text/TextEncodingRegistry.h:
1761         * platform/text/mac/TextCodecMac.cpp:
1762         (WebCore::newTextCodecMac):
1763
1764 2014-10-15  Dean Jackson  <dino@apple.com>
1765
1766         [Media] Reduce style updates (painting) in controls
1767         https://bugs.webkit.org/show_bug.cgi?id=137763
1768         <rdar://problem/17833045>
1769
1770         Reviewed by Simon Fraser.
1771
1772         Media controls were causing a lot of repaints they were
1773         constantly updating the style of the widgets, the value
1774         of the forms, or the text in the display.
1775
1776         This is necessary when the controls are visible, but not
1777         necessary when they are hidden. Return immediately in that case.
1778
1779         * Modules/mediacontrols/mediaControlsApple.js:
1780         (Controller.prototype.createControls): Initialise the slider to a zero value.
1781         (Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
1782         (Controller.prototype.updateProgress): Don't update if we're hidden.
1783         (Controller.prototype.updateTime): Ditto.
1784         * Modules/mediacontrols/mediaControlsiOS.js:
1785         (ControllerIOS.prototype.updateProgress): Ditto.
1786
1787 2014-10-15  Chris Dumez  <cdumez@apple.com>
1788
1789         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel) - Part 2
1790         https://bugs.webkit.org/show_bug.cgi?id=137721
1791
1792         Reviewed by Darin Adler.
1793
1794         Follow-up patch to r174717 addressing review comments made after the patch landed:
1795         - Use modern C++ loop
1796         - Remove explicit calls to String(NSString*) constructor
1797
1798         No new tests, no new tests.
1799
1800         * platform/network/mac/ResourceResponseMac.mm:
1801         (WebCore::ResourceResponse::platformLazyInit):
1802
1803 2014-10-15  Chris Dumez  <cdumez@apple.com>
1804
1805         Use is<>() / downcast<>() for InlineBox subclasses
1806         https://bugs.webkit.org/show_bug.cgi?id=137749
1807
1808         Reviewed by Darin Adler.
1809
1810         Use is<>() / downcast<>() for InlineBox subclasses and clean up the
1811         surrounding code.
1812
1813         No new tests, no behavior change.
1814
1815         * dom/Position.cpp:
1816         (WebCore::Position::upstream):
1817         (WebCore::Position::downstream):
1818         * editing/VisibleUnits.cpp:
1819         (WebCore::wordBreakIteratorForMinOffsetBoundary):
1820         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
1821         (WebCore::visualWordPosition):
1822         (WebCore::startPositionForLine):
1823         (WebCore::endPositionForLine):
1824         * rendering/InlineBox.cpp:
1825         (WebCore::InlineBox::root):
1826         (WebCore::InlineBox::nextLeafChild):
1827         (WebCore::InlineBox::prevLeafChild):
1828         (WebCore::InlineBox::nextLeafChildIgnoringLineBreak):
1829         * rendering/InlineBox.h:
1830         * rendering/InlineElementBox.h:
1831         * rendering/InlineFlowBox.cpp:
1832         (WebCore::InlineFlowBox::getFlowSpacingLogicalWidth):
1833         (WebCore::InlineFlowBox::addToLine):
1834         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
1835         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
1836         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
1837         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
1838         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
1839         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1840         (WebCore::InlineFlowBox::computeMaxLogicalTop):
1841         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
1842         (WebCore::InlineFlowBox::computeOverflow):
1843         (WebCore::InlineFlowBox::firstLeafChild):
1844         (WebCore::InlineFlowBox::lastLeafChild):
1845         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
1846         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
1847         * rendering/InlineFlowBox.h:
1848         * rendering/InlineTextBox.h:
1849         * rendering/RenderBlockFlow.cpp:
1850         (WebCore::RenderBlockFlow::positionForBox):
1851         * rendering/RenderBlockFlow.h:
1852         (WebCore::RenderBlockFlow::firstRootBox):
1853         (WebCore::RenderBlockFlow::lastRootBox):
1854         * rendering/RenderBlockLineLayout.cpp:
1855         (WebCore::RenderBlockFlow::createLineBoxes):
1856         (WebCore::RenderBlockFlow::constructLine):
1857         (WebCore::setLogicalWidthForTextRun):
1858         (WebCore::computeExpansionForJustifiedText):
1859         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
1860         (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
1861         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
1862         * rendering/RenderText.cpp:
1863         (WebCore::RenderText::localCaretRect):
1864         * rendering/RootInlineBox.cpp:
1865         (WebCore::RootInlineBox::isHyphenated):
1866         (WebCore::RootInlineBox::ascentAndDescentForBox):
1867         * rendering/RootInlineBox.h:
1868         (WebCore::RootInlineBox::nextRootBox):
1869         (WebCore::RootInlineBox::prevRootBox):
1870         * rendering/svg/RenderSVGInlineText.cpp:
1871         (WebCore::RenderSVGInlineText::localCaretRect):
1872         (WebCore::RenderSVGInlineText::positionForPoint):
1873         * rendering/svg/RenderSVGText.cpp:
1874         (WebCore::RenderSVGText::positionForPoint):
1875         * rendering/svg/SVGInlineFlowBox.cpp:
1876         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
1877         (WebCore::SVGInlineFlowBox::paint):
1878         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1879         * rendering/svg/SVGInlineFlowBox.h:
1880         * rendering/svg/SVGInlineTextBox.h:
1881         * rendering/svg/SVGRenderTreeAsText.cpp:
1882         (WebCore::writeRenderSVGTextBox):
1883         (WebCore::writeSVGInlineTextBoxes):
1884         * rendering/svg/SVGRootInlineBox.cpp:
1885         (WebCore::SVGRootInlineBox::paint):
1886         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
1887         (WebCore::SVGRootInlineBox::layoutChildBoxes):
1888         (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
1889         * rendering/svg/SVGRootInlineBox.h:
1890         * rendering/svg/SVGTextQuery.cpp:
1891         (WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
1892
1893 2014-10-15  Roger Fong  <roger_fong@apple.com>
1894
1895         glReadPixels on NVIDIA cards returns the wrong values for the alpha channel when alpha is off.
1896         https://bugs.webkit.org/show_bug.cgi?id=137752.
1897         <rdar://problem/15408133>
1898
1899         Reviewed by Brent Fulgham.
1900
1901         This change fixed the 1.0.2 conformance test: context/context-attribute-preserve-drawing-buffer.html
1902
1903         * platform/graphics/GraphicsContext3D.h:
1904         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1905         Manually set the alpha channel to 255 when alpha is off on the rendering context.
1906
1907 2014-10-13  Chris Fleizach  <cfleizach@apple.com>
1908
1909         AX: Going back is broken for VoiceOver
1910         https://bugs.webkit.org/show_bug.cgi?id=137382
1911
1912         Reviewed by Darin Adler.
1913
1914         There were two issues preventing VoiceOver from navigating when using page history to go back/forward.
1915           1) Existing AXLoadComplete does not get fired when you just move through page history. 
1916                There were existing frameLoad notifications used by GTK. I think we should use those which seem more reliable.
1917           2) The AccessibilityScrollView cached its children, but on some history page loads, that cache was never cleared out.
1918                Rather than trying to find those places to clear out the cache, it's easier to just add the elements to the children
1919                array everytime it's asked for. Since there's only ever 3 elements (web area + 2 scroll bars) this should not be a performance hit.
1920
1921         Tests are not possible since they require monitoring notifications across multiple page loads.
1922
1923         * accessibility/AXObjectCache.h:
1924         * accessibility/AccessibilityScrollView.cpp:
1925         (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
1926         * accessibility/ios/AXObjectCacheIOS.mm:
1927         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1928         * accessibility/mac/AXObjectCacheMac.mm:
1929         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1930         * dom/Document.cpp:
1931         (WebCore::Document::implicitClose):
1932
1933 2014-10-15  Simon Fraser  <simon.fraser@apple.com>
1934
1935         Sometimes can't scroll overflow:scroll areas in subframes
1936         https://bugs.webkit.org/show_bug.cgi?id=137746
1937         rdar://problem/18603560
1938
1939         Reviewed by Tim Horton.
1940         
1941         r169733 introduced a regression which caused us to no longer update the non-fast
1942         scrollable region on every layout in subframes, by adding a bogus isMainFrame() check.
1943         Revert to the previous code.
1944
1945         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html
1946
1947         * page/scrolling/AsyncScrollingCoordinator.cpp:
1948         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1949
1950 2014-10-15  Chris Dumez  <cdumez@apple.com>
1951
1952         Use is<>() / downcast<>() for TransformOperation subclasses
1953         https://bugs.webkit.org/show_bug.cgi?id=137731
1954
1955         Reviewed by Darin Adler.
1956
1957         Use is<>() / downcast<>() for TransformOperation subclasses and clean
1958         up the surrounding code.
1959
1960         No new tests, no behavior change.
1961
1962         * platform/graphics/GraphicsLayer.cpp:
1963         (WebCore::GraphicsLayer::validateTransformOperations):
1964         * platform/graphics/ca/GraphicsLayerCA.cpp:
1965         (WebCore::getTransformFunctionValue):
1966         * platform/graphics/transforms/IdentityTransformOperation.h:
1967         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
1968         (WebCore::Matrix3DTransformOperation::operator==):
1969         * platform/graphics/transforms/Matrix3DTransformOperation.h:
1970         * platform/graphics/transforms/MatrixTransformOperation.cpp:
1971         (WebCore::MatrixTransformOperation::operator==):
1972         (WebCore::MatrixTransformOperation::blend):
1973         * platform/graphics/transforms/MatrixTransformOperation.h:
1974         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1975         (WebCore::PerspectiveTransformOperation::operator==):
1976         (WebCore::PerspectiveTransformOperation::blend):
1977         * platform/graphics/transforms/PerspectiveTransformOperation.h:
1978         * platform/graphics/transforms/RotateTransformOperation.cpp:
1979         (WebCore::RotateTransformOperation::operator==):
1980         (WebCore::RotateTransformOperation::blend):
1981         * platform/graphics/transforms/RotateTransformOperation.h:
1982         * platform/graphics/transforms/ScaleTransformOperation.cpp:
1983         (WebCore::ScaleTransformOperation::operator==):
1984         (WebCore::ScaleTransformOperation::blend):
1985         * platform/graphics/transforms/ScaleTransformOperation.h:
1986         * platform/graphics/transforms/SkewTransformOperation.cpp:
1987         (WebCore::SkewTransformOperation::operator==):
1988         (WebCore::SkewTransformOperation::blend):
1989         * platform/graphics/transforms/SkewTransformOperation.h:
1990         * platform/graphics/transforms/TransformOperation.h:
1991         * platform/graphics/transforms/TranslateTransformOperation.cpp:
1992         (WebCore::TranslateTransformOperation::operator==):
1993         (WebCore::TranslateTransformOperation::blend):
1994         * platform/graphics/transforms/TranslateTransformOperation.h:
1995
1996 2014-10-15  Chris Dumez  <cdumez@apple.com>
1997
1998         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine
1999         https://bugs.webkit.org/show_bug.cgi?id=137727
2000
2001         Reviewed by Darin Adler.
2002
2003         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine.
2004
2005         No new tests, no behavior change.
2006
2007         * accessibility/AccessibilityRenderObject.cpp:
2008         (WebCore::AccessibilityRenderObject::selectedText):
2009         (WebCore::AccessibilityRenderObject::selectedTextRange):
2010         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2011         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
2012         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
2013         * editing/TextIterator.cpp:
2014         (WebCore::TextIterator::handleReplacedElement):
2015         * html/TextFieldInputType.cpp:
2016         (WebCore::TextFieldInputType::forwardEvent):
2017         * html/shadow/TextControlInnerElements.cpp:
2018         (WebCore::TextControlInnerElement::customStyleForRenderer):
2019         * page/EventHandler.cpp:
2020         (WebCore::EventHandler::capsLockStateMayHaveChanged):
2021         * page/ios/FrameIOS.mm:
2022         (WebCore::ancestorRespondingToScrollWheelEvents):
2023         * rendering/RenderTextControl.h:
2024         * rendering/RenderTextControlSingleLine.h:
2025         * rendering/SimpleLineLayout.cpp:
2026         (WebCore::SimpleLineLayout::canUseFor):
2027
2028 2014-10-15  Chris Dumez  <cdumez@apple.com>
2029
2030         Use is<>() / downcast<>() for ClipPathOperation subclasses
2031         https://bugs.webkit.org/show_bug.cgi?id=137733
2032
2033         Reviewed by Mihnea Ovidenie.
2034
2035         Use is<>() / downcast<>() for ClipPathOperation subclasses.
2036
2037         No new tests, no behavior change.
2038
2039         * css/CSSComputedStyleDeclaration.cpp:
2040         (WebCore::ComputedStyleExtractor::propertyValue):
2041         * css/DeprecatedStyleBuilder.cpp:
2042         (WebCore::ApplyPropertyClipPath::applyValue):
2043         * rendering/ClipPathOperation.h:
2044         * rendering/RenderBlock.cpp:
2045         (WebCore::RenderBlock::nodeAtPoint):
2046         * rendering/RenderLayer.cpp:
2047         (WebCore::RenderLayer::setupClipPath):
2048         * rendering/svg/SVGRenderingContext.cpp:
2049         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2050
2051 2014-10-15  Chris Dumez  <cdumez@apple.com>
2052
2053         [Mac] Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable()
2054         https://bugs.webkit.org/show_bug.cgi?id=137723
2055
2056         Reviewed by Simon Fraser.
2057
2058         Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable() instead
2059         of CFDictionaryGetValue() as we are not actually interested in the
2060         value.
2061
2062         No new tests, no behavior change.
2063
2064         * platform/graphics/cg/ImageSourceCG.cpp:
2065         (WebCore::ImageSource::isSizeAvailable):
2066
2067 2014-10-15  Mihnea Ovidenie  <mihnea@adobe.com>
2068
2069         Use modern loops in subtrees selection code
2070         https://bugs.webkit.org/show_bug.cgi?id=137688
2071
2072         Reviewed by Andreas Kling.
2073
2074         No new tests as no change in functionality.
2075
2076         * rendering/RenderView.cpp:
2077         (WebCore::RenderView::splitSelectionBetweenSubtrees):
2078         (WebCore::RenderView::updateSelectionForSubtrees):
2079         (WebCore::RenderView::clearSubtreeSelection):
2080         (WebCore::RenderView::applySubtreeSelection):
2081         * rendering/RenderView.h:
2082
2083 2014-10-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2084
2085         Clean up unnecessary PassOwnPtr.h inclusion
2086         https://bugs.webkit.org/show_bug.cgi?id=137726
2087
2088         Reviewed by Chris Dumez.
2089
2090         No new tests, no behavior changes.
2091
2092         * dom/Document.h: Remove PassOwnPtr.h inclusion.
2093         * loader/ResourceBuffer.h: ditto.
2094         * loader/cocoa/DiskCacheMonitorCocoa.mm: ditto.
2095         * page/scrolling/AxisScrollSnapOffsets.h: ditto.
2096         * page/scrolling/ScrollingStateScrollingNode.h: ditto.
2097         * platform/ColorChooserClient.h: ditto.
2098         * platform/ScrollableArea.cpp: ditto.
2099         * platform/ScrollbarThemeClient.h: ditto.
2100         * platform/SharedBuffer.cpp: ditto.
2101         * platform/Supplementable.h: ditto.
2102         * platform/graphics/surfaces/GraphicsSurface.h: ditto.
2103         * platform/graphics/surfaces/GraphicsSurfaceToken.h: ditto.
2104         * platform/graphics/win/WKCAImageQueue.cpp: ditto.
2105         * platform/win/CursorWin.cpp: ditto.
2106
2107 2014-10-14  Chris Dumez  <cdumez@apple.com>
2108
2109         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
2110         https://bugs.webkit.org/show_bug.cgi?id=137728
2111
2112         Reviewed by Benjamin Poulain.
2113
2114         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
2115         instead of a RenderObject*. The argument passed is never null and the type
2116         should be a RenderElement as the argument is a container.
2117
2118         No new tests, no behavior change.
2119
2120         * editing/htmlediting.cpp:
2121         (WebCore::localCaretRectInRendererForCaretPainting):
2122         * page/GestureTapHighlighter.cpp:
2123         * rendering/RenderBox.cpp:
2124         (WebCore::RenderBox::mapLocalToContainer):
2125         (WebCore::RenderBox::pushMappingToContainer):
2126         (WebCore::RenderBox::offsetFromContainer):
2127         (WebCore::RenderBox::computeRectForRepaint):
2128         * rendering/RenderBox.h:
2129         * rendering/RenderBoxModelObject.cpp:
2130         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2131         * rendering/RenderInline.cpp:
2132         (WebCore::RenderInline::computeRectForRepaint):
2133         (WebCore::RenderInline::offsetFromContainer):
2134         (WebCore::RenderInline::mapLocalToContainer):
2135         (WebCore::RenderInline::pushMappingToContainer):
2136         * rendering/RenderInline.h:
2137         * rendering/RenderMultiColumnFlowThread.cpp:
2138         (WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
2139         * rendering/RenderMultiColumnFlowThread.h:
2140         * rendering/RenderNamedFlowFragment.cpp:
2141         (WebCore::RenderNamedFlowFragment::offsetFromContainer):
2142         * rendering/RenderNamedFlowFragment.h:
2143         * rendering/RenderObject.cpp:
2144         (WebCore::RenderObject::offsetFromContainer):
2145         (WebCore::RenderObject::offsetFromAncestorContainer):
2146         * rendering/RenderObject.h:
2147         * rendering/RenderTableCell.cpp:
2148         (WebCore::RenderTableCell::offsetFromContainer):
2149         * rendering/RenderTableCell.h:
2150         * rendering/RenderThemeMac.mm:
2151         (WebCore::RenderThemeMac::convertToPaintingRect):
2152
2153 2014-10-14  Jer Noble  <jer.noble@apple.com>
2154
2155         REGRESSION (r159208): Crash when clicking scrubber after navigating away/back to video
2156         https://bugs.webkit.org/show_bug.cgi?id=137715
2157
2158         Reviewed by Darin Adler.
2159
2160         Simple null-check of m_player in refreshCachedTime.
2161
2162         * html/HTMLMediaElement.cpp:
2163         (WebCore::HTMLMediaElement::refreshCachedTime):
2164
2165 2014-10-14  Chris Dumez  <cdumez@apple.com>
2166
2167         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel)
2168         https://bugs.webkit.org/show_bug.cgi?id=137721
2169
2170         Reviewed by Geoffrey Garen.
2171
2172         There were several inefficiencies with the Mac implementation of
2173         ResourceResponse::platformLazyInit(InitLevel):
2174         1. We end up initializing uncommon fields even if called with
2175            'CommonFieldsOnly' initLevel.
2176         2. If called with 'AllFields' initLevel (and if currently
2177            uninitialized), we end up populating m_httpHeaderFields twice, once
2178            with only the common headers, then a second time with ALL the
2179            headers. We can skip the common-header case in this case to avoid
2180            wasting CPU time.
2181
2182         This patch addresses both inefficiencies and cleans up the code a
2183         little bit to reduce variable scope and to use fast enumeration of
2184         header names.
2185
2186         As a result, we spend almost twice as little time in platformLazyInit()
2187         when loading msn.com (~30ms -> ~18ms).
2188
2189         No new tests, no behavior change.
2190
2191         * platform/network/mac/ResourceResponseMac.mm:
2192         (WebCore::ResourceResponse::platformLazyInit):
2193
2194 2014-10-14  Zalan Bujtas  <zalan@apple.com>
2195
2196         REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
2197         https://bugs.webkit.org/show_bug.cgi?id=137205
2198
2199         Reviewed by Simon Fraser.
2200
2201         Child layer should not reset radius clipping behaviour.
2202
2203         Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html
2204
2205         * rendering/RenderLayer.cpp:
2206         (WebCore::RenderLayer::calculateClipRects):
2207
2208 2014-10-14  Chris Dumez  <cdumez@apple.com>
2209
2210         Use is<>() / downcast<>() for PlatformCAAnimation subclasses
2211         https://bugs.webkit.org/show_bug.cgi?id=137722
2212
2213         Reviewed by Simon Fraser.
2214
2215         Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
2216         up the surrounding code.
2217
2218         No new tests, no behavior change.
2219
2220         * page/mac/ServicesOverlayController.mm:
2221         (WebCore::ServicesOverlayController::Highlight::fadeIn):
2222         (WebCore::ServicesOverlayController::Highlight::fadeOut):
2223         * platform/graphics/ca/GraphicsLayerCA.cpp:
2224         (WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
2225         (WebCore::GraphicsLayerCA::updateAnimations):
2226         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
2227         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
2228         * platform/graphics/ca/GraphicsLayerCA.h:
2229         * platform/graphics/ca/PlatformCAAnimation.h:
2230         * platform/graphics/ca/PlatformCALayer.h:
2231         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
2232         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2233         (PlatformCAAnimationMac::copy):
2234         (PlatformCAAnimationMac::copyTimingFunctionFrom):
2235         (PlatformCAAnimationMac::copyFromValueFrom):
2236         (PlatformCAAnimationMac::copyToValueFrom):
2237         (PlatformCAAnimationMac::copyValuesFrom):
2238         (PlatformCAAnimationMac::copyKeyTimesFrom):
2239         (PlatformCAAnimationMac::copyTimingFunctionsFrom):
2240         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2241         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2242         (PlatformCALayerMac::addAnimationForKey):
2243         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2244         (PlatformCAAnimationWin::copy):
2245         (PlatformCAAnimationWin::copyTimingFunctionFrom):
2246         (PlatformCAAnimationWin::copyFromValueFrom):
2247         (PlatformCAAnimationWin::copyToValueFrom):
2248         (PlatformCAAnimationWin::copyValuesFrom):
2249         (PlatformCAAnimationWin::copyKeyTimesFrom):
2250         (PlatformCAAnimationWin::copyTimingFunctionsFrom):
2251         * platform/graphics/ca/win/PlatformCAAnimationWin.h:
2252         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2253         (PlatformCALayerWin::addAnimationForKey):
2254         * platform/graphics/ca/win/PlatformCALayerWin.h:
2255
2256 2014-10-14  Chris Dumez  <cdumez@apple.com>
2257
2258         Use is<>() / downcast<>() for RenderInline
2259         https://bugs.webkit.org/show_bug.cgi?id=137704
2260
2261         Reviewed by Darin Adler.
2262
2263         Use is<>() / downcast<>() for RenderInline and clean up the surrounding
2264         code.
2265
2266         No new tests, no behavior change.
2267
2268         * accessibility/AccessibilityRenderObject.cpp:
2269         (WebCore::firstChildInContinuation):
2270         * editing/SimplifyMarkupCommand.cpp:
2271         (WebCore::SimplifyMarkupCommand::doApply):
2272         * inspector/InspectorOverlay.cpp:
2273         (WebCore::buildRendererHighlight):
2274         * page/FrameView.cpp:
2275         (WebCore::FrameView::paintContents):
2276         * rendering/InlineFlowBox.cpp:
2277         (WebCore::InlineFlowBox::removeLineBoxFromRenderObject):
2278         (WebCore::InlineFlowBox::extractLineBoxFromRenderObject):
2279         (WebCore::InlineFlowBox::attachLineBoxToRenderObject):
2280         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
2281         (WebCore::InlineFlowBox::nodeAtPoint):
2282         (WebCore::InlineFlowBox::paint):
2283         * rendering/InlineIterator.h:
2284         (WebCore::bidiFirstSkippingEmptyInlines):
2285         * rendering/LayoutState.cpp:
2286         (WebCore::LayoutState::LayoutState):
2287         * rendering/RenderBlock.cpp:
2288         (WebCore::RenderBlock::willBeDestroyed):
2289         (WebCore::RenderBlock::paintObject):
2290         (WebCore::RenderBlock::inlineElementContinuation):
2291         (WebCore::RenderBlock::addFocusRingRects):
2292         * rendering/RenderBlockFlow.cpp:
2293         (WebCore::RenderBlockFlow::willBeDestroyed):
2294         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
2295         * rendering/RenderBlockFlow.h:
2296         * rendering/RenderBlockLineLayout.cpp:
2297         (WebCore::constructBidiRunsForSegment):
2298         (WebCore::RenderBlockFlow::layoutLineBoxes):
2299         * rendering/RenderBox.cpp:
2300         (WebCore::RenderBox::offsetFromContainer):
2301         (WebCore::RenderBox::computeRectForRepaint):
2302         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2303         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2304         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2305         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
2306         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2307         * rendering/RenderBoxModelObject.cpp:
2308         (WebCore::accumulateInFlowPositionOffsets):
2309         * rendering/RenderElement.cpp:
2310         (WebCore::RenderElement::willBeRemovedFromTree):
2311         * rendering/RenderElement.h:
2312         (WebCore::RenderElement::dirtyLinesFromChangedChild):
2313         * rendering/RenderFlowThread.cpp:
2314         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
2315         * rendering/RenderInline.cpp:
2316         (WebCore::RenderInline::willBeDestroyed):
2317         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
2318         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2319         * rendering/RenderInline.h:
2320         * rendering/RenderLayer.cpp:
2321         (WebCore::RenderLayer::updateLayerPosition):
2322         (WebCore::RenderLayer::calculateClipRects):
2323         * rendering/RenderLineBoxList.cpp:
2324         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
2325         * rendering/RenderLineBoxList.h:
2326         * rendering/RenderNamedFlowThread.cpp:
2327         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
2328         * rendering/RenderObject.cpp:
2329         (WebCore::RenderObject::insertedIntoTree):
2330         * rendering/RenderRegion.cpp:
2331         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
2332         (WebCore::RenderRegion::visualOverflowRectForBox):
2333         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
2334         * rendering/RenderRegion.h:
2335         * rendering/RenderReplaced.cpp:
2336         (WebCore::RenderReplaced::willBeDestroyed):
2337         * rendering/RenderTextLineBoxes.cpp:
2338         (WebCore::RenderTextLineBoxes::removeAllFromParent):
2339         (WebCore::RenderTextLineBoxes::dirtyRange):
2340         * rendering/line/BreakingContextInlineHeaders.h:
2341         (WebCore::inlineLogicalWidth):
2342         (WebCore::BreakingContext::handleEmptyInline):
2343         * rendering/line/LineInlineHeaders.h:
2344         (WebCore::requiresLineBox):
2345         (WebCore::setStaticPositions):
2346         * rendering/svg/SVGInlineTextBox.cpp:
2347         (WebCore::SVGInlineTextBox::paint):
2348
2349 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2350
2351         [Win] Unreviewed build fix after r174710.
2352
2353         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2354         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2355
2356 2014-10-14  Dan Bernstein  <mitz@apple.com>
2357
2358         URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior
2359         https://bugs.webkit.org/show_bug.cgi?id=137718
2360
2361         Reviewed by Alexey Proskuryakov.
2362
2363         Added cases to fast/loader/url-parse-1.html.
2364
2365         * platform/URL.cpp:
2366         (WebCore::URL::parse): In hierarchical schemes other than file:, ignore any additional
2367         slashes after the ://, as prescribed by the authority-ignore-slashes state in the current
2368         URL spec.
2369
2370 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2371
2372         [Win] Unreviewed build fix after r174698 and r174709.
2373
2374         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2375         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
2376         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2377         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem):
2378         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
2379         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2380
2381 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2382
2383         [Win] Unreviewed build fix after r174698
2384
2385         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2386         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
2387         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2388         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2389
2390 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
2391
2392         Improve debug description of WAKViews
2393         https://bugs.webkit.org/show_bug.cgi?id=137716
2394
2395         Reviewed by Simon Fraser.
2396
2397         No new tests because there is no behavior change.
2398
2399         * platform/ios/wak/WAKView.mm:
2400         (-[WAKView description]):
2401         * platform/ios/wak/WKView.h:
2402         * platform/ios/wak/WKView.mm:
2403         (WKViewGetOrigin):
2404
2405 2014-10-14  Chris Dumez  <cdumez@apple.com>
2406
2407         Introduce an isCSSAnimated flag on RenderElement for performance
2408         https://bugs.webkit.org/show_bug.cgi?id=137583
2409
2410         Reviewed by Simon Fraser.
2411
2412         I noticed when profiling the ebay.com page load that isRunningAnimationOnRenderer()
2413         and isRunningAcceleratedAnimationOnRenderer() were called frequently, causing
2414         ~4.7 millions m_compositeAnimations HashMap lookups.
2415
2416         This patch introduces an isCSSAnimated flag on RenderElement to return early if
2417         there is no animation on the renderer, thus avoiding HashMap lookups. This reduces
2418         the number of HashMap lookups from ~4.7 millions to ~68k. On my machine, I see
2419         the following performance improvements:
2420         - isRunning*AnimationOnRenderer() / computeCompositingRequirements()
2421           - before: ~45ms  / ~90ms
2422           - after:  ~4ms / ~30ms
2423
2424         No new tests, no behavior change.
2425
2426         * page/animation/AnimationController.cpp:
2427         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
2428         (WebCore::AnimationControllerPrivate::clear):
2429         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
2430         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
2431         (WebCore::AnimationController::isRunningAnimationOnRenderer):
2432         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
2433         * rendering/RenderElement.cpp:
2434         (WebCore::RenderElement::RenderElement):
2435         * rendering/RenderElement.h:
2436         (WebCore::RenderElement::isCSSAnimating):
2437         (WebCore::RenderElement::setIsCSSAnimating):
2438
2439 2014-10-14  Dean Jackson  <dino@apple.com>
2440
2441         Crash in WebCore::UserGestureIndicator::processingUserGesture with WebWorkers
2442         https://bugs.webkit.org/show_bug.cgi?id=137676
2443         <rdar://problem/15735049>
2444
2445         Reviewed by Alexey Proskuryakov.
2446
2447         Remove the code I added that tracks the timestamp of the most recent
2448         user gesture from the event handling dispatch, as it was both
2449         a silly place to do it and it originally crashed when events were fired from
2450         Worker threads (although this was fixed in r152238).
2451
2452         It's now recorded by going through UserGestureIndicator, which is good because
2453         it knows when a user has triggered an event. Its constructor now takes
2454         a pointer to Document, and updates the timestamp there if necessary.
2455
2456         Not all UserGestureIndicator instances needed to reset the timestamp; Those did
2457         not have to pass along the Document.
2458
2459         This is untestable due to the fix mentioned above.
2460
2461         * WebCore.exp.in: Change constructor signature.
2462
2463         * accessibility/AccessibilityNodeObject.cpp: Pass a pointer to the Document into the UserGestureIndicator.
2464         (WebCore::AccessibilityNodeObject::increment):
2465         (WebCore::AccessibilityNodeObject::decrement):
2466         * accessibility/AccessibilityObject.cpp: Ditto.
2467         (WebCore::AccessibilityObject::press):
2468
2469         * dom/Document.cpp:
2470         (WebCore::Document::updateLastHandledUserGestureTimestamp): Renamed.
2471         * dom/Document.h:
2472
2473         * dom/EventTarget.cpp: Remove the code to update the timestamp.
2474         (WebCore::EventTarget::fireEventListeners):
2475
2476         * dom/UserGestureIndicator.cpp:
2477         (WebCore::UserGestureIndicator::UserGestureIndicator): If there is a Document and
2478         this is a user gesture, then reset the timestamp.
2479         * dom/UserGestureIndicator.h:
2480
2481         * page/EventHandler.cpp: Pass a pointer to the Document.
2482         (WebCore::EventHandler::handleMousePressEvent):
2483         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2484         (WebCore::EventHandler::handleMouseReleaseEvent):
2485         (WebCore::EventHandler::keyEvent):
2486         (WebCore::EventHandler::handleTouchEvent):
2487
2488         * rendering/HitTestResult.cpp: Ditto.
2489         (WebCore::HitTestResult::toggleMediaFullscreenState):
2490         (WebCore::HitTestResult::enterFullscreenForVideo):
2491
2492 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2493
2494         [Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
2495
2496         * WebCore.vcxproj: Modified property svn:ignore.
2497
2498 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2499
2500         [Win] Enable Encrypted Media Support
2501         https://bugs.webkit.org/show_bug.cgi?id=137710
2502         <rdar://problem/18652699>
2503
2504         Reviewed by Jer Noble.
2505
2506         This feature is covered by existing media tests.
2507
2508         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2509         (WebCore::destroyAVFWrapper): Remove redundant ASSERT.
2510         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2511         (displayOnMainThreadContext::displayOnMainThreadContext): Added.
2512         (redispatchOnMainQueue): Added.
2513         (PlatformCALayerWinInternal::displayCallback): Check if a display
2514         call is happening on a background queue, and re-dispatch on the
2515         main thread if necessary.
2516
2517 2014-10-14  Chris Dumez  <cdumez@apple.com>
2518
2519         [Mac] Avoid unnecessary dictionary lookup in ImageSource::isSizeAvailable()
2520         https://bugs.webkit.org/show_bug.cgi?id=137701
2521
2522         Reviewed by Simon Fraser.
2523
2524         The CG implementation of ImageSource::isSizeAvailable() was looking up
2525         both the width and the height keys in the dictionary before determining
2526         if the size is available. We can abort early and return false if the
2527         first key (the width) is missing, thus avoiding an extra dictionary
2528         lookup in this case.
2529
2530         This is a small win but ImageSource::isSizeAvailable() is called quite
2531         frequently during page loads
2532
2533         No new tests, no behavior change.
2534
2535         * platform/graphics/cg/ImageSourceCG.cpp:
2536         (WebCore::ImageSource::isSizeAvailable):
2537
2538 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
2539
2540         Remove unnecessary logging from SimpleFontData
2541         https://bugs.webkit.org/show_bug.cgi?id=137699
2542
2543         Reviewed by Andreas Kling.
2544
2545         Because of web fonts, fonts that don't have a glyph page 0 are common and expected. Printing out a
2546         message is not helpful, especially if you're not dealing with a font-related piece of WebKit.
2547
2548         No new tests because there is no behavior change.
2549
2550         * platform/graphics/SimpleFontData.cpp:
2551         (WebCore::SimpleFontData::platformGlyphInit):
2552
2553 2014-10-14  Martin Hock  <mhock@apple.com>
2554
2555         Update ViewportConfiguration whenever its size attributes change
2556         https://bugs.webkit.org/show_bug.cgi?id=137682
2557         rdar://problem/18643655
2558
2559         Reviewed by Benjamin Poulain.
2560
2561         * page/ViewportConfiguration.cpp:
2562         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
2563         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
2564
2565 2014-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2566
2567         Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree
2568         https://bugs.webkit.org/show_bug.cgi?id=137681
2569
2570         Reviewed by Timothy Hatcher.
2571
2572         * inspector/InspectorDOMAgent.cpp:
2573         (WebCore::InspectorDOMAgent::buildObjectForNode):
2574         Include the nodeName, localName, and nodeValue (string data)
2575         properties for processing instruction nodes.
2576
2577 2014-10-14  Chris Dumez  <cdumez@apple.com>
2578
2579         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet
2580         https://bugs.webkit.org/show_bug.cgi?id=137696
2581
2582         Reviewed by Darin Adler.
2583
2584         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet.
2585
2586         No new tests, no behavior change.
2587
2588         * html/HTMLFrameSetElement.cpp:
2589         (WebCore::HTMLFrameSetElement::defaultEventHandler):
2590         * rendering/RenderFrame.cpp:
2591         (WebCore::RenderFrame::updateFromElement):
2592         * rendering/RenderFrame.h:
2593         * rendering/RenderFrameSet.cpp:
2594         (WebCore::RenderFrameSet::computeEdgeInfo):
2595         (WebCore::RenderFrameSet::positionFramesWithFlattening):
2596         * rendering/RenderFrameSet.h:
2597
2598 2014-10-14  Youenn Fablet  <youennf@gmail.com>
2599
2600         [XHR] Abort method execution when m_loader->cancel() in internalAbort() caused reentry
2601         https://bugs.webkit.org/show_bug.cgi?id=126975
2602
2603         Reviewed by Alexey Proskuryakov.
2604
2605         Merging https://chromium.googlesource.com/chromium/blink/+/0d75daf2053631518606ae15daaece701a25b2c4
2606         Ensuring new test from https://codereview.chromium.org/76133002/ is passing.
2607
2608         Test: http/tests/xmlhttprequest/reentrant-cancel-abort.html
2609
2610         * xml/XMLHttpRequest.cpp:
2611         (WebCore::XMLHttpRequest::open): exit early if internalAbort asks so
2612         (WebCore::XMLHttpRequest::abort): exit early if internalAbort asks so
2613         (WebCore::XMLHttpRequest::internalAbort): ask calling function to exit early if a new loader is created during the cancellation of the loader (potential reentrant case through window.onload callback)   
2614         (WebCore::XMLHttpRequest::didTimeout): exit early if internalAbort asks so
2615         * xml/XMLHttpRequest.h:
2616
2617 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
2618
2619         Multiple refactors in RenderMathMLOperator
2620         https://bugs.webkit.org/show_bug.cgi?id=137611
2621
2622         Reviewed by Darin Adler.
2623
2624         The changes include:
2625         - Rename m_operator to m_textContent.
2626         - Make most of the functions private, we needed to create some
2627         public member functions to be able to make the some funtions private
2628         and move trailingSpaceError to RenderMathMLOperator.
2629         - Fix incorrect capitalization of setOperatorProperties function.
2630         - Make all data members private and move them to the end of the
2631         class defition.
2632
2633         No new tests as no change in functionality.
2634
2635         * rendering/mathml/RenderMathMLOperator.cpp:
2636         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
2637         (WebCore::RenderMathMLOperator::setOperatorProperties): Renamed,
2638         incorrect capitalization
2639         (WebCore::RenderMathMLOperator::stretchTo):
2640         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
2641         (WebCore::RenderMathMLOperator::rebuildTokenContent):
2642         (WebCore::RenderMathMLOperator::updateFromElement):
2643         (WebCore::RenderMathMLOperator::updateOperatorProperties):
2644         (WebCore::RenderMathMLOperator::shouldAllowStretching):
2645         (WebCore::RenderMathMLOperator::updateStyle):
2646         (WebCore::RenderMathMLOperator::trailingSpaceError):
2647         (WebCore::RenderMathMLOperator::SetOperatorProperties): Deleted.
2648         (WebCore::RenderMathMLOperator::advanceForGlyph): Deleted.
2649         (WebCore::RenderMathMLOperator::updateTokenContent): Deleted.
2650         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): Deleted.
2651         * rendering/mathml/RenderMathMLOperator.h:
2652         (WebCore::RenderMathMLOperator::setLeadingSpace): Added.
2653         (WebCore::RenderMathMLOperator::setTrailingSpace):  Added.
2654         (WebCore::RenderMathMLOperator::textContent): Added.
2655         (WebCore::RenderMathMLOperator::isInvisibleOperator):
2656         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
2657         (WebCore::RenderMathMLRadicalOperator::setOperatorProperties):
2658         Renamed, incorrect capitalization
2659         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties): Deleted.
2660         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError): Deleted.
2661         * rendering/mathml/RenderMathMLRadicalOperator.h:
2662
2663 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
2664
2665         Changes in the stretchy attribute do not update rendering
2666         https://bugs.webkit.org/show_bug.cgi?id=136883
2667
2668         Reviewed by Darin Adler.
2669
2670         Test: mathml/presentation/mo-stretch-update.html
2671
2672         We need to relayout when a change in the stretchy attribute
2673         happens.
2674
2675         * mathml/MathMLTextElement.cpp:
2676         (WebCore::MathMLTextElement::parseAttribute): Parse the
2677         modifications of the stretchy attribute.
2678         * mathml/MathMLTextElement.h:
2679         * rendering/mathml/RenderMathMLOperator.cpp:
2680         (WebCore::RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded):
2681         Add function that receives the value instead of looking for it and
2682         checks if the change should schedule a layout.
2683         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
2684         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue):
2685         Add function that receives the value instead of looking for it.
2686         * rendering/mathml/RenderMathMLOperator.h:
2687
2688 2014-10-14  Chris Dumez  <cdumez@apple.com>
2689
2690         Use is<>() / downcast<>() for RenderImage
2691         https://bugs.webkit.org/show_bug.cgi?id=137683
2692
2693         Reviewed by Mihnea Ovidenie.
2694
2695         Use is<>() / downcast<>() for RenderImage.
2696
2697         No new tests, no behavior change.
2698
2699         * accessibility/AccessibilityNodeObject.cpp:
2700         (WebCore::AccessibilityNodeObject::alternativeText):
2701         * accessibility/AccessibilityRenderObject.cpp:
2702         (WebCore::AccessibilityRenderObject::addImageMapChildren):
2703         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
2704         * bindings/objc/DOM.mm:
2705         (-[DOMElement image]):
2706         (-[DOMElement _imageTIFFRepresentation]):
2707         * editing/TextIterator.cpp:
2708         (WebCore::TextIterator::handleReplacedElement):
2709         * editing/cocoa/HTMLConverter.mm:
2710         (fileWrapperForElement):
2711         * editing/gtk/EditorGtk.cpp:
2712         (WebCore::getImageForElement):
2713         * editing/ios/EditorIOS.mm:
2714         (WebCore::getImage):
2715         * editing/mac/EditorMac.mm:
2716         (WebCore::getImage):
2717         * html/HTMLAnchorElement.cpp:
2718         (WebCore::appendServerMapMousePosition):
2719         * html/HTMLAreaElement.cpp:
2720         (WebCore::HTMLAreaElement::setFocus):
2721         * html/HTMLImageElement.cpp:
2722         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
2723         (WebCore::HTMLImageElement::parseAttribute):
2724         (WebCore::HTMLImageElement::didAttachRenderers):
2725         (WebCore::HTMLImageElement::createImageControls):
2726         (WebCore::HTMLImageElement::destroyImageControls):
2727         * html/HTMLVideoElement.cpp:
2728         (WebCore::HTMLVideoElement::didAttachRenderers):
2729         (WebCore::HTMLVideoElement::parseAttribute):
2730         * html/ImageInputType.cpp:
2731         (WebCore::ImageInputType::altAttributeChanged):
2732         (WebCore::ImageInputType::attach):
2733         * html/canvas/CanvasRenderingContext2D.cpp:
2734         (WebCore::size):
2735         * html/shadow/mac/ImageControlsRootElementMac.cpp:
2736         (WebCore::RenderImageControls::updateLogicalWidth):
2737         (WebCore::RenderImageControls::computeLogicalHeight):
2738         * loader/ImageLoader.cpp:
2739         (WebCore::ImageLoader::renderImageResource):
2740         * page/ContextMenuController.cpp:
2741         (WebCore::imageFromImageElementNode):
2742         * page/DragController.cpp:
2743         (WebCore::getCachedImage):
2744         (WebCore::getImage):
2745         * platform/win/PasteboardWin.cpp:
2746         (WebCore::Pasteboard::writeImage):
2747         (WebCore::getCachedImage):
2748         * rendering/HitTestResult.cpp:
2749         (WebCore::HitTestResult::image):
2750         * rendering/RenderImage.h:
2751         * rendering/RenderImageResource.cpp:
2752         (WebCore::RenderImageResource::getImageSize):
2753         * rendering/RenderLayerBacking.cpp:
2754         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
2755         (WebCore::RenderLayerBacking::updateImageContents):
2756         * rendering/RenderReplaced.cpp:
2757         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
2758         * rendering/shapes/ShapeOutsideInfo.cpp:
2759         (WebCore::ShapeOutsideInfo::createShapeForImage):
2760
2761 2014-10-14  Andrzej Badowski  <a.badowski@samsung.com>
2762
2763         [AX] Improve AccessibilityTableCell columnHeaders and rowHeaders functions.
2764         https://bugs.webkit.org/show_bug.cgi?id=136818
2765
2766         Reviewed by Chris Fleizach.
2767
2768         Take into account that <th> elements can be both the column headers and row headers 
2769         improved the operation of two functions: columnHeaders and rowHeaders.
2770
2771         Test: accessibility/table-headers.html
2772
2773         * accessibility/AccessibilityTableCell.cpp:
2774         (WebCore::AccessibilityTableCell::isColumnHeaderCell):
2775         A new function that helps the main goal.
2776         (WebCore::AccessibilityTableCell::isRowHeaderCell):
2777         A new function that helps the main goal.
2778         (WebCore::AccessibilityTableCell::columnHeaders):
2779         Use isColumnHeaderCell instead of isTableHeaderCell.
2780         (WebCore::AccessibilityTableCell::rowHeaders):
2781         Use isRowHeaderCell also includes <th> row header element next to the scope attribute.
2782         * accessibility/AccessibilityTableCell.h:
2783         Adds new functions to the header file.
2784
2785 2014-10-14  Csaba Osztrogon√°c  <ossy@webkit.org>
2786
2787         Fix the !ENABLE(VIDEO) build after r174353
2788         https://bugs.webkit.org/show_bug.cgi?id=137655
2789
2790         Reviewed by Darin Adler.
2791
2792         * dom/Document.cpp:
2793         * dom/Document.h:
2794         * page/Page.cpp:
2795         * page/Page.h:
2796
2797 2014-10-14  peavo@outlook.com  <peavo@outlook.com>
2798
2799         [Curl] Compile error in CurlDownload.cpp.
2800         https://bugs.webkit.org/show_bug.cgi?id=137654
2801
2802         Reviewed by Philippe Normand.
2803
2804         A template specialization is not needed anymore.
2805
2806         * platform/network/curl/CurlDownload.cpp:
2807
2808 2014-10-13  Joseph Pecoraro  <pecoraro@apple.com>
2809
2810         Web Inspector: Remove unused stale Page protocol methods
2811         https://bugs.webkit.org/show_bug.cgi?id=137678
2812
2813         Reviewed by Andreas Kling.
2814
2815         * inspector/InspectorClient.h:
2816         (WebCore::InspectorClient::canShowDebugBorders): Deleted.
2817         (WebCore::InspectorClient::setShowDebugBorders): Deleted.
2818         (WebCore::InspectorClient::canShowFPSCounter): Deleted.
2819         (WebCore::InspectorClient::setShowFPSCounter): Deleted.
2820         (WebCore::InspectorClient::canContinuouslyPaint): Deleted.
2821         (WebCore::InspectorClient::setContinuousPaintingEnabled): Deleted.
2822         * inspector/InspectorPageAgent.cpp:
2823         (WebCore::InspectorPageAgent::disable):
2824         (WebCore::InspectorPageAgent::canShowDebugBorders): Deleted.
2825         (WebCore::InspectorPageAgent::setShowDebugBorders): Deleted.
2826         (WebCore::InspectorPageAgent::canShowFPSCounter): Deleted.
2827         (WebCore::InspectorPageAgent::setShowFPSCounter): Deleted.
2828         (WebCore::InspectorPageAgent::canContinuouslyPaint): Deleted.
2829         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled): Deleted.
2830         * inspector/InspectorPageAgent.h:
2831         * inspector/protocol/Page.json:
2832
2833 2014-10-13  Eric Carlson  <eric.carlson@apple.com>
2834
2835         [iOS] Refactor AirPlay monitoring code
2836         https://bugs.webkit.org/show_bug.cgi?id=137645
2837         <rdar://problem/18444817>
2838
2839         Reviewed by Jer Noble.
2840
2841         Refactor AirPlay route change monitoring code:
2842         + Have MediaSessionManager register/unregister for route changes depending on the state of
2843             all sessions so it does the right thing when there is more than one media element.
2844         + Make HTMLMediaElement unregister with MediaSession as soon as the media player is cleared
2845             because there can be no wireless playback without a player.
2846
2847         * html/HTMLMediaElement.cpp:
2848         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call mediaSession->setHasPlaybackTargetAvailabilityListeners
2849             when there are target availability changed listeners.
2850         (WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
2851         (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): New, media session client method.
2852         * html/HTMLMediaElement.h:
2853
2854         * html/HTMLMediaSession.cpp:
2855         (WebCore::HTMLMediaSession::HTMLMediaSession): Initialize m_hasPlaybackTargetAvailabilityListeners.
2856         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Remember whether or not
2857             the client has a target availability listener and tell the media session manager to reconfigure
2858             itself instead of telling it to start or stop listening for route changes so it does the 
2859             right thing when there is more than one media element.
2860         * html/HTMLMediaSession.h:
2861         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Return true when the client 
2862             has a target availability listener, false otherwise.
2863
2864         * platform/audio/MediaSession.cpp:
2865         (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Inform the client that routes have changed.
2866         * platform/audio/MediaSession.h:
2867         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
2868         (WebCore::MediaSessionClient::wirelessRoutesAvailableDidChange):
2869
2870         * platform/audio/MediaSessionManager.cpp:
2871         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Implement it.
2872         * platform/audio/MediaSessionManager.h:
2873         (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
2874         (WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
2875         (WebCore::MediaSessionManager::sessions):
2876         (WebCore::MediaSessionManager::startMonitoringAirPlayRoutes): Deleted.
2877         (WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes): Deleted.
2878
2879         * platform/audio/ios/MediaSessionManagerIOS.h:
2880         * platform/audio/ios/MediaSessionManagerIOS.mm:
2881         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Start or stop monitoring
2882             for route changes depending on client state.
2883         (WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes): Deleted.
2884         (WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes): Deleted.
2885
2886 2014-10-13  Chris Dumez  <cdumez@apple.com>
2887
2888         [Mac] Return value of createImageSourceOptions() is leaked in ImageSourceCG
2889         https://bugs.webkit.org/show_bug.cgi?id=137677
2890
2891         Reviewed by Simon Fraser.
2892
2893         The return value of createImageSourceOptions() was leaked in
2894         ImageSourceCG.cpp. It was returning a CFDictionaryRef created using
2895         CFDictionaryCreate(). Therefore, the return value should have been
2896         released but wasn't.
2897
2898         This patch makes createImageSourceOptions() return a
2899         RetainPtr<CFDictionaryRef> to make sure the CFDictionaryRef properly
2900         gets released after use.
2901
2902         No new tests, no behavior change.
2903
2904         * platform/graphics/cg/ImageSourceCG.cpp:
2905         (WebCore::createImageSourceOptions):
2906         (WebCore::imageSourceOptions):
2907         (WebCore::ImageSource::isSizeAvailable):
2908         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
2909         (WebCore::ImageSource::frameSizeAtIndex):
2910         (WebCore::ImageSource::orientationAtIndex):
2911         (WebCore::ImageSource::getHotSpot):
2912         (WebCore::ImageSource::repetitionCount):
2913         (WebCore::ImageSource::createFrameAtIndex):
2914         (WebCore::ImageSource::frameDurationAtIndex):
2915
2916 2014-10-13  Yusuke Suzuki  <utatane.tea@gmail.com>
2917
2918         CSS JIT: Implement :visited pseudo class
2919         https://bugs.webkit.org/show_bug.cgi?id=135293
2920
2921         Reviewed by Benjamin Poulain.
2922
2923         This patch implements CSS JIT for :visited. And it makes :not(:link) JIT-ed.
2924         Following the design discussed at the other bug[1], implemented :visited JIT
2925         without tracking VisitedMatchEnabled state.
2926
2927         In this patch, we change the semantics of :visited / :link
2928         inside functional pseudo classes for further CSS Selector Level 4 extensions.
2929
2930         Edge cases are tested by the existing tests.
2931         :not(:link)
2932             fast/history/link-inside-not.html
2933         :not(:visited)
2934             fast/history/visited-inside-not.html
2935         :-webkit-any(:link)
2936             fast/history/link-inside-any.html
2937         :-webkit-any(:visited)
2938             fast/history/visited-inside-any.html
2939
2940         [1]: https://bugs.webkit.org/show_bug.cgi?id=135639
2941
2942         Test: fast/history/link-inside-not-inside-any.html
2943             To cover the :-webkit-any(:not(:link)), added new tests.
2944
2945         * css/SelectorChecker.cpp:
2946         (WebCore::SelectorChecker::checkOne):
2947         * cssjit/SelectorCompiler.cpp:
2948         (WebCore::SelectorCompiler::addPseudoClassType):
2949         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2950         (WebCore::SelectorCompiler::constructFragments):
2951         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2952         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
2953         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRightmostTreeWalker):
2954         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2955         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2956         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
2957         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
2958
2959 2014-10-13  Chris Dumez  <cdumez@apple.com>
2960
2961         Use modern loops in RenderLayerCompositor
2962         https://bugs.webkit.org/show_bug.cgi?id=137670
2963
2964         Reviewed by Simon Fraser.
2965
2966         Use modern range for-loops in RenderLayerCompositor.
2967
2968         No new tests, no behavior change.
2969
2970         * rendering/RenderLayerCompositor.cpp:
2971         (WebCore::OverlapMapContainer::overlapsLayers):
2972         (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
2973         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
2974         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
2975         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2976         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
2977         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2978         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
2979         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed):
2980         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2981         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
2982         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
2983         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
2984         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
2985         (WebCore::resetTrackedRepaintRectsRecursive):
2986         (WebCore::RenderLayerCompositor::layerHas3DContent):
2987         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
2988         (WebCore::RenderLayerCompositor::registerAllScrollingLayers):
2989         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers):
2990
2991 2014-10-13  Chris Dumez  <cdumez@apple.com>
2992
2993         Drop unnecessary overlapMap null checks in computeCompositingRequirements()
2994         https://bugs.webkit.org/show_bug.cgi?id=137668
2995
2996         Reviewed by Andreas Kling.
2997
2998         Drop unnecessary overlapMap null checks in computeCompositingRequirements().
2999         The function is never called with a null overlapMap so we can make the
3000         argument a reference and drop all the null checks.
3001
3002         No new tests, no behavior change.
3003
3004         * rendering/RenderLayerCompositor.cpp:
3005         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3006         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
3007         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3008         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
3009         * rendering/RenderLayerCompositor.h:
3010
3011 2014-10-13  Chris Dumez  <cdumez@apple.com>
3012
3013         Use is<>() / downcast<>() for PlatformCALayer subclasses
3014         https://bugs.webkit.org/show_bug.cgi?id=137661
3015
3016         Reviewed by Simon Fraser.
3017
3018         Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up
3019         the surrounding code.
3020
3021         No new tests, no behavior change.
3022
3023         * platform/graphics/ca/GraphicsLayerCA.cpp:
3024         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
3025         (WebCore::GraphicsLayerCA::updateContentsRects):
3026         (WebCore::GraphicsLayerCA::updateReplicatedLayers):
3027         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3028         (WebCore::GraphicsLayerCA::fetchCloneLayers): Deleted.
3029         * platform/graphics/ca/PlatformCALayer.h:
3030         * platform/graphics/ca/TileCoverageMap.cpp:
3031         (WebCore::TileCoverageMap::TileCoverageMap):
3032         * platform/graphics/ca/TileGrid.cpp:
3033         (WebCore::TileGrid::ensureTilesForRect):
3034         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3035         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3036         (PlatformCALayerMac::clone):
3037         (PlatformCALayerMac::appendSublayer):
3038         (PlatformCALayerMac::insertSublayer):
3039         (PlatformCALayerMac::replaceSublayer):
3040         (PlatformCALayerMac::adoptSublayers):
3041         (PlatformCALayerMac::copyFiltersFrom):
3042         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
3043         (WebCore::CACFLayerTreeHost::setRootChildLayer):
3044         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3045         (PlatformCALayerWin::clone):
3046         (PlatformCALayerWin::rootLayer):
3047         (PlatformCALayerWin::appendSublayer):
3048         (PlatformCALayerWin::insertSublayer):
3049         (PlatformCALayerWin::replaceSublayer):
3050         (PlatformCALayerWin::adoptSublayers):
3051         (PlatformCALayerWin::copyFiltersFrom):
3052         * platform/graphics/ca/win/PlatformCALayerWin.h:
3053         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3054         (PlatformCALayerWinInternal::insertSublayer):
3055         * platform/graphics/ca/win/PlatformCALayerWinInternal.h:
3056
3057 2014-10-13  Chris Dumez  <cdumez@apple.com>
3058
3059         Use is<>() / downcast<>() for Filter / FilterOperation subclasses
3060         https://bugs.webkit.org/show_bug.cgi?id=137644
3061
3062         Reviewed by Darin Adler.
3063
3064         Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
3065
3066         No new tests, no behavior change.
3067
3068         * css/CSSComputedStyleDeclaration.cpp:
3069         (WebCore::ComputedStyleExtractor::valueForFilter):
3070         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
3071         (PlatformCAFilters::filterValueForOperation):
3072         (PlatformCAFilters::colorMatrixValueForFilter):
3073         * platform/graphics/filters/Filter.h:
3074         * platform/graphics/filters/FilterOperation.cpp:
3075         (WebCore::DefaultFilterOperation::operator==):
3076         (WebCore::ReferenceFilterOperation::operator==):
3077         (WebCore::BasicColorMatrixFilterOperation::blend):
3078         (WebCore::BasicColorMatrixFilterOperation::operator==):
3079         (WebCore::BasicComponentTransferFilterOperation::blend):
3080         (WebCore::BasicComponentTransferFilterOperation::operator==):
3081         (WebCore::BlurFilterOperation::operator==):
3082         (WebCore::BlurFilterOperation::blend):
3083         (WebCore::DropShadowFilterOperation::operator==):
3084         (WebCore::DropShadowFilterOperation::blend):
3085         * platform/graphics/filters/FilterOperation.h:
3086         * platform/graphics/filters/FilterOperations.cpp:
3087         (WebCore::FilterOperations::outsets):
3088         * rendering/FilterEffectRenderer.cpp:
3089         (WebCore::FilterEffectRenderer::build):
3090         * rendering/RenderLayerFilterInfo.cpp:
3091         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
3092         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
3093         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
3094         * svg/graphics/filters/SVGFilter.h:
3095         (isType):
3096
3097 2014-10-13  Chris Dumez  <cdumez@apple.com>
3098
3099         Use is<>() / downcast<>() for Table render objects
3100         https://bugs.webkit.org/show_bug.cgi?id=137641
3101
3102         Reviewed by Mihnea Ovidenie.
3103
3104         Use is<>() / downcast<>() for table-related render objects and clean
3105         up the surrounding code.
3106
3107         No new tests, no behavior change.
3108
3109         * accessibility/AccessibilityARIAGrid.cpp:
3110         (WebCore::AccessibilityARIAGrid::addChildren):
3111         * accessibility/AccessibilityTable.cpp:
3112         (WebCore::AccessibilityTable::tableElement):
3113         (WebCore::AccessibilityTable::isDataTable):
3114         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
3115         (WebCore::AccessibilityTable::addChildren):
3116         * accessibility/AccessibilityTableCell.cpp:
3117         (WebCore::AccessibilityTableCell::parentTable):
3118         (WebCore::AccessibilityTableCell::rowIndexRange):
3119         (WebCore::AccessibilityTableCell::columnIndexRange):
3120         (WebCore::AccessibilityTableCell::titleUIElement):
3121         * accessibility/AccessibilityTableColumn.cpp:
3122         (WebCore::AccessibilityTableColumn::headerObject):
3123         * editing/DeleteSelectionCommand.cpp:
3124         (WebCore::DeleteSelectionCommand::removeNode):
3125         * editing/TextIterator.cpp:
3126         (WebCore::shouldEmitTabBeforeNode):
3127         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
3128         * html/HTMLTableCellElement.cpp:
3129         (WebCore::HTMLTableCellElement::parseAttribute):
3130         (WebCore::HTMLTableCellElement::cellAbove):
3131         * html/HTMLTableColElement.cpp:
3132         (WebCore::HTMLTableColElement::parseAttribute):
3133         * mathml/MathMLElement.cpp:
3134         (WebCore::MathMLElement::parseAttribute):
3135         * rendering/AutoTableLayout.cpp:
3136         (WebCore::AutoTableLayout::recalcColumn):
3137         (WebCore::shouldScaleColumns):
3138         * rendering/RenderBlockFlow.cpp:
3139         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
3140         * rendering/RenderBox.cpp:
3141         (WebCore::RenderBox::computePercentageLogicalHeight):
3142         (WebCore::RenderBox::layoutOverflowRectForPropagation):
3143         * rendering/RenderElement.cpp:
3144         (WebCore::RenderElement::addChild):
3145         * rendering/RenderLayer.cpp:
3146         (WebCore::RenderLayer::calculateClipRects):
3147         * rendering/RenderTable.cpp:
3148         (WebCore::RenderTable::addChild):
3149         (WebCore::RenderTable::layout):
3150         (WebCore::RenderTable::firstColumn):
3151         (WebCore::RenderTable::recalcSections):
3152         (WebCore::RenderTable::sectionAbove):
3153         (WebCore::RenderTable::sectionBelow):
3154         (WebCore::RenderTable::bottomSection):
3155         * rendering/RenderTable.h:
3156         * rendering/RenderTableCaption.cpp:
3157         (WebCore::RenderTableCaption::table):
3158         * rendering/RenderTableCell.h:
3159         (WebCore::RenderTableCell::nextCell):
3160         (WebCore::RenderTableCell::previousCell):
3161         (WebCore::RenderTableRow::firstCell):
3162         (WebCore::RenderTableRow::lastCell):
3163         * rendering/RenderTableCol.cpp:
3164         (WebCore::RenderTableCol::table):
3165         (WebCore::RenderTableCol::enclosingColumnGroup):
3166         (WebCore::RenderTableCol::nextColumn):
3167         * rendering/RenderTableCol.h:
3168         Make updateFromElement() public to allow the callers to use tighter
3169         typing and devitualize the call as the class is final.
3170
3171         * rendering/RenderTableRow.cpp:
3172         (WebCore::RenderTableRow::addChild):
3173         * rendering/RenderTableRow.h:
3174         (WebCore::RenderTableSection::firstRow):
3175         (WebCore::RenderTableSection::lastRow):
3176         (WebCore::RenderTableRow::nextRow):
3177         (WebCore::RenderTableRow::previousRow):
3178         * rendering/RenderTableSection.cpp:
3179         (WebCore::RenderTableSection::addChild):
3180         (WebCore::RenderTableSection::layoutRows):
3181         (WebCore::RenderTableSection::paintCell):
3182         * rendering/RenderTableSection.h:
3183         * rendering/RenderTreeAsText.cpp:
3184         (WebCore::writeTextRun):
3185         (WebCore::writeSimpleLine):
3186
3187 2014-10-08  Jer Noble  <jer.noble@apple.com>
3188
3189         MediaPlayer::characteristicChanged() is not called when new tracks are found in SourceBufferPrivateAVFObjC
3190         https://bugs.webkit.org/show_bug.cgi?id=137533
3191
3192         Reviewed by Darin Adler.
3193
3194         When a new AVAsset is returned out of the AVStreamDataParser, notify the HTMLMediaElement that
3195         characteristics of the player may have changed.
3196
3197         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3198         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3199         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::characteristicsChanged):
3200         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3201         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
3202
3203 2014-10-13  Jer Noble  <jer.noble@apple.com>
3204
3205         [iOS] Stop listening for wireless playback target availability when the default controls are hidden.
3206         https://bugs.webkit.org/show_bug.cgi?id=137633
3207
3208         Reviewed by Dean Jackson.
3209
3210         In order to minimize the excess bandwidth and power consumption required for actively listening
3211         for wireless playback target availablity, unregister for those notifications while the controls
3212         are hidden due to playback, or when the element's document is hidden.
3213
3214         * Modules/mediacontrols/mediaControlsiOS.js:
3215         (ControllerIOS.prototype.createBase): Register for document visiblity change notfications.
3216         (ControllerIOS.prototype.setControlsType): Call updateShouldListenForPlaybackTargetAvailabilityEvent()
3217             instead of setShouldListenForPlaybackTargetAvailabilityEvent()
3218         (ControllerIOS.prototype.hideControls): Ditto.
3219         (ControllerIOS.prototype.showControls): Ditto.
3220         (ControllerIOS.prototype.updateStatusDisplay): Ditto.
3221         (ControllerIOS.prototype.handleVisibilityChange): Ditto.
3222         (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent): Added. Only listen
3223             for target availability when the video has no errors, is not in the initial "big play button"
3224             controls state, and when the controls are not hidden.
3225         * platform/audio/ios/MediaSessionManagerIOS.mm:
3226         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Explicitly set the discoveryMode to "disabled"
3227             rather than waiting for the autoreleasepool to destroy our routing controller.
3228
3229 2014-10-13  Simon Fraser  <simon.fraser@apple.com>
3230
3231         iOS DRT snapshots are limited to the page visible area
3232         https://bugs.webkit.org/show_bug.cgi?id=137650
3233
3234         Reviewed by Daniel Bates.
3235
3236         LegacyTileCache drawing was limited to the window's visible area, found by
3237         crawling up the layer hierarchy to the root layer. This caused test snapshots to
3238         be missing non-composited content outside the iPhone visible area, which hinders
3239         testing.
3240         
3241         Fix by adding a test-only mode where the window visible area is the entire window.
3242
3243         * platform/ios/wak/WAKWindow.h:
3244         * platform/ios/wak/WAKWindow.mm:
3245         (-[WAKWindow setEntireWindowVisibleForTesting:]):
3246         (-[WAKWindow _visibleRectRespectingMasksToBounds:]):
3247
3248 2014-10-13  Mihnea Ovidenie  <mihnea@adobe.com>
3249
3250         [CSSRegions] Make RenderNamedFlowFragment::computeStyleInRegion const
3251         https://bugs.webkit.org/show_bug.cgi?id=137604
3252
3253         Reviewed by Andrei Bucur.
3254
3255         The method computeStyleInRegion should be const as it does not modify
3256         the state of the RenderNamedFlowFragment instance. Make pointers to
3257         the region used for styling const along the way. No new tests as no
3258         change in functionality.
3259
3260         * css/ElementRuleCollector.h:
3261         (WebCore::ElementRuleCollector::ElementRuleCollector):
3262         (WebCore::ElementRuleCollector::setRegionForStyling):
3263         * css/StyleResolver.cpp:
3264         (WebCore::StyleResolver::State::initForStyleResolve):
3265         (WebCore::StyleResolver::styleForElement):
3266         * css/StyleResolver.h:
3267         * rendering/RenderNamedFlowFragment.cpp:
3268         (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
3269         * rendering/RenderNamedFlowFragment.h:
3270
3271 2014-09-30  Sergio Villar Senin  <svillar@igalia.com>
3272
3273         [CSS Grid Layout] Pass the valid set of tracks to grow beyond growth limits
3274         https://bugs.webkit.org/show_bug.cgi?id=137253
3275
3276         Reviewed by Darin Adler.
3277
3278         Section 10.4 of the specs describe how to resolve content based
3279         track sizing functions. Among others it describes the "distribute
3280         extra space" algorithm. The 3rd bullet of that algorithm specifies
3281         how to distribute (and also the target tracks) the extra space
3282         once all the tracks have reached their growth limits.
3283
3284         Our implementation had 2 problems. First we were not passing a
3285         valid subset of tracks (instead we were always using all of
3286         them). Now we use a function that filters the right tracks to be
3287         the target of the extra space distribution depending on whether
3288         we're computing the min track function or the max track function.
3289
3290         Secondly the algorithm that was distributing the extra space was
3291         not using that list of passed in tracks (it iterated over all of
3292         them). From now on it will use the set of tracks selected using
3293         the filter function described above.
3294
3295         * rendering/RenderGrid.cpp:
3296         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3297         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
3298         (WebCore::RenderGrid::distributeSpaceToTracks):
3299         * rendering/RenderGrid.h:
3300         * rendering/style/GridTrackSize.h:
3301         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
3302         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
3303
3304 2014-10-12  Mike West  <mkwst@chromium.org>
3305
3306         Referrer Policy: Update <meta name="referrer"> values to match the spec
3307         https://bugs.webkit.org/show_bug.cgi?id=137635
3308
3309         Reviewed by Jochen Eisinger.
3310
3311         The Referrer Policy specification ([Working Draft][WD], [Editor's
3312         draft[ED]) defines different keywords than we originally
3313         implemented. We should support them in the interests of clarity and
3314         interoperability with other browsers implementing the specification.
3315
3316         [WD]: http://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-meta
3317         [ED]: http://w3c.github.io/webappsec/specs/referrer-policy/#referrer-policy-delivery-meta
3318
3319         This patch is a port of Blink's https://codereview.chromium.org/607433002/
3320
3321         Tests: http/tests/security/referrer-policy-conflicting-policies.html
3322                http/tests/security/referrer-policy-https-no-referrer-when-downgrade.html
3323                http/tests/security/referrer-policy-https-no-referrer.html
3324                http/tests/security/referrer-policy-https-unsafe-url.html
3325                http/tests/security/referrer-policy-no-referrer-when-downgrade.html
3326                http/tests/security/referrer-policy-no-referrer.html
3327
3328         * dom/Document.cpp:
3329         (WebCore::Document::processReferrerPolicy):
3330
3331 2014-10-12  Dhi Aurrahman  <diorahman@rockybars.com>
3332
3333         Support activation behavior of link element
3334         https://bugs.webkit.org/show_bug.cgi?id=137597
3335
3336         Reviewed by Benjamin Poulain.
3337
3338         Support activation behavior of link elements as defined in [1],
3339         i.e. to follow the hyperlink created by the link element when it is fully active.
3340
3341         [1] https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
3342
3343         Tests: fast/dom/html-link-element-activation-behavior-on-element-click.html
3344                fast/dom/html-link-element-activation-behavior-on-mouse-click.html
3345                fast/dom/html-link-element-activation-behavior-url-is-null.html
3346
3347         * dom/MouseEvent.cpp:
3348         (WebCore::MouseEvent::triggerActivationBehavior):
3349         * dom/MouseEvent.h:
3350         * html/HTMLAnchorElement.cpp:
3351         (WebCore::HTMLAnchorElement::defaultEventHandler):
3352         (WebCore::isLinkClick): Deleted.
3353         * html/HTMLAnchorElement.h:
3354         * html/HTMLLinkElement.cpp:
3355         (WebCore::HTMLLinkElement::defaultEventHandler):
3356         (WebCore::HTMLLinkElement::handleClick):
3357         * html/HTMLLinkElement.h:
3358         * svg/SVGAElement.cpp:
3359         (WebCore::SVGAElement::defaultEventHandler):
3360
3361 2014-10-11  KwangHyuk Kim  <hyuki.kim@samsung.com>
3362
3363         [EFL] Enable WebP support.
3364         https://bugs.webkit.org/show_bug.cgi?id=136156
3365
3366         Reviewed by Gyuyoung Kim.
3367
3368         Add WebP library and inlcude path to WebCore path for WK2 Efl.
3369         No new tests since existing feature is just enabled for WK2 Efl.
3370
3371         * PlatformEfl.cmake:
3372
3373 2014-10-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3374
3375         [GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource
3376         https://bugs.webkit.org/show_bug.cgi?id=137485
3377
3378         Reviewed by Sergio Villar Senin.
3379
3380         Use GThreadSafeMainLoopSource for GStreamer sources, since they
3381         can be used from different threads. Also update GMutexLocker
3382         usages, since it's now a template.
3383
3384         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3385         (WebCore::AudioFileReader::createBus):
3386         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
3387         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3388         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3389         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
3390         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
3391         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
3392         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3393         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
3394         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3395         (webkitVideoSinkTimeoutCallback):
3396         (webkitVideoSinkRender):
3397         (unlockBufferMutex):
3398         (webkitVideoSinkUnlockStop):
3399         (webkitVideoSinkStart):
3400         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
3401         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3402         (webKitWebSrcGetProperty):
3403         (webKitWebSrcStop):
3404         (webKitWebSrcStart):
3405         (webKitWebSrcChangeState):
3406         (webKitWebSrcQueryWithParent):
3407         (webKitWebSrcGetUri):
3408         (webKitWebSrcSetUri):
3409         (webKitWebSrcNeedDataMainCb):
3410         (webKitWebSrcNeedDataCb):
3411         (webKitWebSrcEnoughDataMainCb):
3412         (webKitWebSrcEnoughDataCb):
3413         (webKitWebSrcSeekDataCb):
3414         (webKitWebSrcSetMediaPlayer):
3415         (StreamingClient::createReadBuffer):
3416         (StreamingClient::handleResponseReceived):
3417         (StreamingClient::handleDataReceived):
3418         (StreamingClient::handleNotifyFinished):
3419         (ResourceHandleStreamingClient::wasBlocked):
3420         (ResourceHandleStreamingClient::cannotShowURL):
3421
3422 2014-10-10  Chris Dumez  <cdumez@apple.com>
3423
3424         Use is<>() / downcast<>() for Image subclasses
3425         https://bugs.webkit.org/show_bug.cgi?id=137625
3426
3427         Reviewed by Andreas Kling.
3428
3429         Use is<>() / downcast<>() for Image subclasses.
3430
3431         No new tests, no behavior change.
3432
3433         * accessibility/AccessibilityRenderObject.cpp:
3434         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
3435         * loader/cache/CachedImage.cpp:
3436         (WebCore::CachedImage::imageSizeForRenderer):
3437         (WebCore::CachedImage::createImage):
3438         * platform/graphics/BitmapImage.h:
3439         * platform/graphics/Image.h:
3440         * platform/mac/DragImageMac.mm:
3441         (WebCore::createDragImageFromImage):
3442         * rendering/RenderImage.cpp:
3443         (WebCore::RenderImage::embeddedContentBox):
3444         * svg/graphics/SVGImage.h:
3445
3446 2014-10-10  Chris Dumez  <cdumez@apple.com>
3447
3448         Use is<>() / downcast<>() for RenderElement
3449         https://bugs.webkit.org/show_bug.cgi?id=137622
3450
3451         Reviewed by Benjamin Poulain.
3452
3453         Use is<>() / downcast<>() for RenderElement and clean up the
3454         surrounding code.
3455
3456         No new tests, no behavior change.
3457
3458         * accessibility/AccessibilityImageMapLink.cpp:
3459         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
3460         * accessibility/AccessibilityRenderObject.cpp:
3461         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3462         * css/CSSComputedStyleDeclaration.cpp:
3463         (WebCore::computeRenderStyleForProperty):
3464         * dom/Node.cpp:
3465         (WebCore::Node::materializeRareData):
3466         * dom/Position.cpp:
3467         (WebCore::isNonTextLeafChild):
3468         (WebCore::searchAheadForBetterMatch):
3469         * dom/PseudoElement.cpp:
3470         (WebCore::PseudoElement::didRecalcStyle):
3471         * editing/CompositeEditCommand.cpp:
3472         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
3473         * editing/htmlediting.cpp:
3474         (WebCore::isEmptyTableCell):
3475         * rendering/InlineIterator.h:
3476         (WebCore::bidiNextShared):
3477         * rendering/RenderBlock.cpp:
3478         (WebCore::RenderBlock::getFirstLetter):
3479         * rendering/RenderBox.cpp:
3480         (WebCore::RenderBox::layout):
3481         * rendering/RenderCounter.cpp:
3482         (WebCore::RenderCounter::rendererRemovedFromTree):
3483         (WebCore::RenderCounter::rendererSubtreeAttached):
3484         (showCounterRendererTree):
3485         * rendering/RenderElement.cpp:
3486         (WebCore::RenderElement::insertChildInternal):
3487         (WebCore::RenderElement::removeChildInternal):
3488         (WebCore::RenderElement::findNextLayer):
3489         (WebCore::RenderElement::layout):
3490         * rendering/RenderElement.h:
3491         (WebCore::RenderObject::isRenderLayerModelObject):
3492         (WebCore::RenderObject::isBoxModelObject):
3493         (WebCore::RenderObject::isRenderBlock):
3494         (WebCore::RenderObject::isRenderBlockFlow):
3495         (WebCore::RenderObject::isRenderReplaced):
3496         (WebCore::RenderObject::isRenderInline):
3497         (WebCore::RenderObject::style):
3498         (WebCore::RenderObject::firstLineStyle):
3499         (WebCore::ContainerNode::renderer):
3500         * rendering/RenderFrameSet.cpp:
3501         (WebCore::RenderFrameSet::paint):
3502         * rendering/RenderLayer.cpp:
3503         (WebCore::RenderLayer::calculateClipRects):
3504         * rendering/RenderNamedFlowFragment.cpp:
3505         (WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
3506         (WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
3507         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
3508         * rendering/RenderObject.cpp:
3509         (WebCore::RenderObject::clearNeedsLayout):
3510         (WebCore::RenderObject::willBeDestroyed):
3511         (WebCore::RenderObject::collectAnnotatedRegions):
3512         * rendering/RenderVTTCue.cpp:
3513         (WebCore::RenderVTTCue::initializeLayoutParameters):
3514         (WebCore::RenderVTTCue::repositionGenericCue):
3515         * rendering/mathml/RenderMathMLFraction.cpp:
3516         (WebCore::RenderMathMLFraction::addChild):
3517         * rendering/mathml/RenderMathMLMenclose.cpp:
3518         (WebCore::RenderMathMLMenclose::addChild):
3519         * rendering/mathml/RenderMathMLOperator.cpp:
3520         (WebCore::RenderMathMLOperator::rebuildTokenContent):
3521         (WebCore::RenderMathMLOperator::updateStyle):
3522         * rendering/mathml/RenderMathMLRoot.cpp:
3523         (WebCore::RenderMathMLRoot::addChild):
3524         (WebCore::RenderMathMLRoot::layout):
3525         * rendering/mathml/RenderMathMLToken.cpp:
3526         (WebCore::RenderMathMLToken::addChild):
3527         (WebCore::RenderMathMLToken::updateTokenContent):
3528         (WebCore::RenderMathMLToken::updateStyle):
3529         * rendering/mathml/RenderMathMLUnderOver.cpp:
3530         (WebCore::RenderMathMLUnderOver::layout):
3531         * rendering/svg/RenderSVGResource.cpp:
3532         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
3533         * rendering/svg/RenderSVGText.cpp:
3534         (WebCore::findPreviousAndNextAttributes):
3535         (WebCore::RenderSVGText::subtreeStyleDidChange):
3536         (WebCore::updateFontInAllDescendants):
3537         * rendering/svg/SVGRenderSupport.cpp:
3538         (WebCore::SVGRenderSupport::layoutChildren):
3539         * rendering/svg/SVGResourcesCache.cpp:
3540         (WebCore::SVGResourcesCache::clientWasAddedToTree):
3541         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
3542         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
3543         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
3544         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
3545         (WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForTextRenderer):
3546         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
3547         * rendering/svg/SVGTextMetricsBuilder.cpp:
3548         (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
3549         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
3550         (WebCore::SVGTextMetricsBuilder::walkTree):
3551         (WebCore::SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes):
3552         * rendering/svg/SVGTextMetricsBuilder.h:
3553         * rendering/svg/SVGTextRunRenderingContext.cpp:
3554         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
3555         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
3556         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
3557         * svg/SVGFontData.cpp:
3558         (WebCore::SVGFontData::applySVGGlyphSelection):
3559
3560 2014-10-10  Benjamin Poulain  <benjamin@webkit.org>
3561
3562         Update :nth-child(An+B of selector-list) to the latest specification
3563         https://bugs.webkit.org/show_bug.cgi?id=137593
3564
3565         Reviewed by Andreas Kling.
3566
3567         Following my implementation feedback on :nth-child(An+B of selector-list),
3568         the CSS WG decided to change the definition such that the current element on which
3569         the selector is matched must also match the selector list in :nth-child().
3570
3571         This patch updates the implementation accordingly.
3572
3573         Test: fast/selectors/nth-child-of-chained-3.html
3574
3575         * css/SelectorChecker.cpp:
3576         (WebCore::SelectorChecker::checkOne):
3577         (WebCore::SelectorChecker::matchSelectorList):
3578         * css/SelectorChecker.h:
3579         * cssjit/SelectorCompiler.cpp:
3580         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
3581         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
3582
3583 2014-10-10  Chris Dumez  <cdumez@apple.com>
3584
3585         Drop RENDER_OBJECT_TYPE_CASTS() for a lot of RenderObject subclasses
3586         https://bugs.webkit.org/show_bug.cgi?id=137594
3587
3588         Reviewed by Darin Adler.
3589
3590         Drop RENDER_OBJECT_TYPE_CASTS() for RenderObject subclasses that no
3591         longer needed it or that required very few changes to do so. This will
3592         make sure developers start using is<>() / downcast<>() for those
3593         classes.
3594
3595         No new tests, no behavior change.
3596
3597         * accessibility/AccessibilityRenderObject.cpp:
3598         (WebCore::AccessibilityRenderObject::textUnderElement):
3599         (WebCore::AccessibilityRenderObject::stringValue):
3600         (WebCore::AccessibilityRenderObject::titleUIElement):
3601         * dom/PseudoElement.cpp:
3602         (WebCore::PseudoElement::didAttachRenderers):
3603         * html/HTMLCanvasElement.cpp:
3604         (WebCore::HTMLCanvasElement::reset):
3605         * html/HTMLPlugInElement.cpp:
3606         (WebCore::HTMLPlugInElement::defaultEventHandler):
3607         * html/HTMLPlugInImageElement.cpp:
3608         (WebCore::HTMLPlugInImageElement::updateSnapshot):
3609         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
3610         * html/SearchInputType.cpp:
3611         (WebCore::SearchInputType::addSearchResult):
3612         (WebCore::SearchInputType::didSetValueByUserEdit):
3613         * html/shadow/TextControlInnerElements.cpp:
3614         (WebCore::TextControlInnerTextElement::renderer):
3615         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
3616         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
3617         * page/FrameView.cpp:
3618         (WebCore::FrameView::isInChildFrameWithFrameFlattening):
3619         * rendering/RenderButton.h:
3620         * rendering/RenderCounter.h:
3621         * rendering/RenderDetailsMarker.h:
3622         * rendering/RenderFieldset.h:
3623         * rendering/RenderFileUploadControl.cpp:
3624         (WebCore::RenderFileUploadControl::paintObject):
3625         * rendering/RenderFileUploadControl.h:
3626         * rendering/RenderFlexibleBox.h:
3627         * rendering/RenderFullScreen.h:
3628         * rendering/RenderGrid.h:
3629         * rendering/RenderHTMLCanvas.h:
3630         * rendering/RenderIFrame.h:
3631         * rendering/RenderLayerBacking.cpp:
3632         (WebCore::RenderLayerBacking::contentsBox):
3633         * rendering/RenderMedia.h:
3634         * rendering/RenderQuote.cpp:
3635         (WebCore::RenderQuote::attachQuote):
3636         * rendering/RenderQuote.h:
3637         * rendering/RenderReplaced.h:
3638         * rendering/RenderScrollbarPart.h:
3639         * rendering/RenderSearchField.h:
3640         * rendering/RenderSnapshottedPlugIn.h:
3641         * rendering/RenderTableCaption.h:
3642         * rendering/RenderTextControlMultiLine.h:
3643         * rendering/RenderTextControlSingleLine.h:
3644         * rendering/RenderThemeMac.mm:
3645         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3646         * rendering/RenderTreeAsText.cpp:
3647         (WebCore::RenderTreeAsText::writeRenderObject):
3648         * rendering/RenderVideo.cpp:
3649         (WebCore::rendererPlaceholder):
3650         * rendering/line/BreakingContextInlineHeaders.h:
3651         (WebCore::updateCounterIfNeeded):
3652         * rendering/svg/RenderSVGContainer.h:
3653         * rendering/svg/RenderSVGGradientStop.h:
3654         * rendering/svg/RenderSVGModelObject.h:
3655         * rendering/svg/RenderSVGPath.h:
3656         * rendering/svg/RenderSVGResourceFilter.h:
3657         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
3658         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
3659         * rendering/svg/RenderSVGTextPath.h:
3660         * rendering/svg/RenderSVGTransformableContainer.h:
3661         * rendering/svg/RenderSVGViewportContainer.h:
3662         * rendering/svg/SVGRenderSupport.cpp:
3663         (WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow):
3664         (WebCore::SVGRenderSupport::checkForSVGRepaintDuringLayout):
3665         (WebCore::updateObjectBoundingBox):
3666         (WebCore::layoutSizeOfNearestViewportChanged):
3667         (WebCore::SVGRenderSupport::transformToRootChanged):
3668         (WebCore::SVGRenderSupport::rendererHasSVGShadow):
3669         (WebCore::SVGRenderSupport::setRendererHasSVGShadow):
3670         * rendering/svg/SVGTextLayoutEngine.cpp:
3671         (WebCore::SVGTextLayoutEngine::beginTextPathLayout):
3672         * svg/SVGPathElement.cpp:
3673         (WebCore::SVGPathElement::svgAttributeChanged):
3674         (WebCore::SVGPathElement::pathSegListChanged):
3675         (WebCore::SVGPathElement::getBBox):
3676         * svg/SVGSVGElement.cpp:
3677         (WebCore::SVGSVGElement::currentViewportSize):
3678
3679 2014-10-10  Chris Dumez  <cdumez@apple.com>
3680
3681         Use is<>() / downcast<>() for GraphicsLayer subclasses
3682         https://bugs.webkit.org/show_bug.cgi?id=137595
3683
3684         Reviewed by Darin Adler.
3685
3686         Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
3687         surrounding code.
3688
3689         No new tests, no behavior change.
3690
3691         * page/mac/ServicesOverlayController.mm:
3692         (WebCore::ServicesOverlayController::Highlight::Highlight):
3693         (WebCore::ServicesOverlayController::Highlight::fadeIn):
3694         (WebCore::ServicesOverlayController::Highlight::fadeOut):
3695         * platform/graphics/GraphicsLayer.h:
3696         * platform/graphics/ca/GraphicsLayerCA.cpp:
3697         (WebCore::GraphicsLayerCA::removeFromParent):
3698         (WebCore::GraphicsLayerCA::setMaskLayer):
3699         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
3700         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3701         (WebCore::GraphicsLayerCA::updateSublayerList):
3702         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
3703         (WebCore::GraphicsLayerCA::updateMaskLayer):
3704         (WebCore::GraphicsLayerCA::replicatedLayerRoot):
3705         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3706         (WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas):
3707         (WebCore::GraphicsLayerCA::fetchCloneLayers):
3708         * platform/graphics/ca/GraphicsLayerCA.h:
3709
3710 2014-10-10  Chris Dumez  <cdumez@apple.com>
3711
3712         Use is<>() / downcast<>() for RenderBoxModelObject
3713         https://bugs.webkit.org/show_bug.cgi?id=137587
3714
3715         Reviewed by Mihnea Ovidenie.
3716
3717         Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
3718         surrounding code.
3719
3720         No new tests, no behavior change.
3721
3722         * accessibility/AXObjectCache.cpp:
3723         (WebCore::createFromRenderer):
3724         * accessibility/AccessibilityRenderObject.cpp:
3725         (WebCore::AccessibilityRenderObject::renderBoxModelObject):
3726         (WebCore::isInlineWithContinuation):
3727         (WebCore::firstChildConsideringContinuation):
3728         (WebCore::lastChildHasContinuation):
3729         (WebCore::AccessibilityRenderObject::nextSibling):
3730         (WebCore::AccessibilityRenderObject::widget):
3731         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
3732         (WebCore::AccessibilityRenderObject::observableObject):
3733         (WebCore::msaaRoleForRenderer):
3734         * accessibility/AccessibilityRenderObject.h:
3735         * accessibility/AccessibilityTable.cpp:
3736         (WebCore::AccessibilityTable::isDataTable):
3737         * dom/Node.cpp:
3738         (WebCore::Node::renderBox):
3739         (WebCore::Node::renderBoxModelObject):
3740         * inspector/InspectorOverlay.cpp:
3741         (WebCore::buildObjectForElementInfo):
3742         * page/FrameView.cpp:
3743         (WebCore::FrameView::scrollContentsFastPath):
3744         * page/PrintContext.cpp:
3745         (WebCore::enclosingBoxModelObject):
3746         * page/animation/AnimationBase.cpp:
3747         (WebCore::AnimationBase::freezeAtTime):
3748         * page/animation/ImplicitAnimation.cpp:
3749         (WebCore::ImplicitAnimation::startAnimation):
3750         (WebCore::ImplicitAnimation::pauseAnimation):
3751         (WebCore::ImplicitAnimation::endAnimation):
3752         * page/animation/KeyframeAnimation.cpp:
3753         (WebCore::KeyframeAnimation::startAnimation):
3754         (WebCore::KeyframeAnimation::pauseAnimation):
3755         (WebCore::KeyframeAnimation::endAnimation):
3756         * page/ios/FrameIOS.mm:
3757         (WebCore::Frame::overflowScrollPositionChangedForNode):
3758         * page/scrolling/ScrollingCoordinator.cpp:
3759         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
3760         * rendering/InlineBox.h:
3761         (WebCore::InlineBox::boxModelObject):
3762         * rendering/InlineElementBox.h:
3763         (WebCore::InlineElementBox::renderer):
3764         * rendering/InlineFlowBox.cpp:
3765         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3766         * rendering/InlineFlowBox.h:
3767         (WebCore::InlineFlowBox::renderer):
3768         * rendering/InlineTextBox.cpp:
3769         (WebCore::InlineTextBox::baselinePosition):
3770         (WebCore::InlineTextBox::lineHeight):
3771         * rendering/RenderBlock.cpp:
3772         (WebCore::RenderBlock::addChildToContinuation):
3773         * rendering/RenderBox.cpp:
3774         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
3775         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3776         (WebCore::RenderBox::computePositionedLogicalWidth):
3777         (WebCore::RenderBox::computePositionedLogicalHeight):
3778         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
3779         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
3780         * rendering/RenderBoxModelObject.h:
3781         * rendering/RenderFlowThread.cpp:
3782         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
3783         * rendering/RenderInline.cpp:
3784         (WebCore::RenderInline::splitInlines):
3785         (WebCore::RenderInline::addChildToContinuation):
3786         * rendering/RenderLayer.cpp:
3787         (WebCore::RenderLayer::updateLayerPosition):
3788         (WebCore::RenderLayer::calculateClipRects):
3789         * rendering/RenderLayerBacking.cpp:
3790         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
3791         * rendering/RenderLayerCompositor.cpp:
3792         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
3793         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
3794         * rendering/RenderObject.cpp:
3795         (WebCore::RenderObject::destroy):
3796         (WebCore::RenderObject::offsetParent):
3797         * rendering/mathml/RenderMathMLScripts.cpp:
3798         (WebCore::RenderMathMLScripts::base):
3799
3800 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
3801
3802         Remove CrossThreadTask
3803         https://bugs.webkit.org/show_bug.cgi?id=137570
3804
3805         Reviewed by Darin Adler.
3806
3807         Replace uses of CrossThreadTask with C++11 lambdas. The initializations
3808         of cross-thread copies are rather verbose at the moment, but should look
3809         better once we can switch to using C++14 init capture for lambdas.
3810
3811         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3812         (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
3813         * WebCore.order:
3814         * WebCore.vcxproj/WebCore.vcxproj:
3815         * WebCore.vcxproj/WebCore.vcxproj.filters:
3816         * WebCore.xcodeproj/project.pbxproj:
3817         * dom/CrossThreadTask.h: Removed.
3818         * loader/WorkerThreadableLoader.cpp:
3819         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
3820         (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
3821         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
3822         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
3823         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
3824         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
3825         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
3826         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
3827         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
3828         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
3829         (WebCore::WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge): Deleted.
3830         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): Deleted.
3831         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy): Deleted.
3832         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel): Deleted.
3833         (WebCore::workerGlobalScopeDidSendData): Deleted.
3834         (WebCore::workerGlobalScopeDidReceiveResponse): Deleted.
3835         (WebCore::workerGlobalScopeDidReceiveData): Deleted.
3836         (WebCore::workerGlobalScopeDidFinishLoading): Deleted.
3837         (WebCore::workerGlobalScopeDidFail): Deleted.
3838         (WebCore::workerGlobalScopeDidFailAccessControlCheck): Deleted.
3839         (WebCore::workerGlobalScopeDidFailRedirectCheck): Deleted.
3840         * loader/WorkerThreadableLoader.h:
3841         * loader/cache/MemoryCache.cpp:
3842         (WebCore::MemoryCache::removeRequestFromCache):
3843         (WebCore::MemoryCache::removeRequestFromSessionCaches):
3844         (WebCore::MemoryCache::removeRequestFromCacheImpl): Deleted.
3845         (WebCore::MemoryCache::removeRequestFromSessionCachesImpl): Deleted.
3846         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Deleted.
3847         (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches): Deleted.
3848         * loader/cache/MemoryCache.h:
3849
3850 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
3851
3852         Avoid defaulting to capture-by-value for C++11 lambdas in WebCore
3853         https://bugs.webkit.org/show_bug.cgi?id=137565
3854
3855         Reviewed by Darin Adler.
3856
3857         C++11 lambas should avoid defaulting to capturing used variables by value as that
3858         can lead to unintended captures that, in worst cases, result in lambdas that are
3859         not self-contained and end up operating on dangling pointers.
3860
3861         Explicitly stating the variables that are to be copied by value can also serve as
3862         a checklist of variables that are actually intented for use in the lambda body. 
3863
3864         * Modules/quota/StorageErrorCallback.cpp:
3865         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
3866         * Modules/webdatabase/Database.cpp:
3867         (WebCore::Database::~Database):
3868         (WebCore::Database::runTransaction):
3869         (WebCore::Database::scheduleTransactionCallback):
3870         * Modules/webdatabase/DatabaseManager.cpp:
3871         (WebCore::DatabaseManager::openDatabase):
3872         * Modules/webdatabase/SQLCallbackWrapper.h:
3873         (WebCore::SQLCallbackWrapper::clear):
3874         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3875         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
3876         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
3877         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3878         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
3879         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3880         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3881         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
3882         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
3883         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3884         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
3885         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
3886         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
3887         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
3888         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
3889         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
3890         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
3891         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
3892         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
3893         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
3894         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
3895         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
3896         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
3897         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
3898         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
3899         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
3900         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
3901         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
3902         * bindings/js/JSCallbackData.h:
3903         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
3904         * bindings/js/JSDOMGlobalObjectTask.cpp:
3905         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
3906         * dom/ScriptExecutionContext.h:
3907         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
3908         * dom/StringCallback.cpp:
3909         (WebCore::StringCallback::scheduleCallback):
3910         * fileapi/FileReader.cpp:
3911         (WebCore::FileReader::abort):
3912         * loader/appcache/ApplicationCacheGroup.cpp:
3913         (WebCore::ApplicationCacheGroup::postListenerTask):
3914         * workers/DefaultSharedWorkerRepository.cpp:
3915         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
3916         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
3917         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
3918         * workers/WorkerEventQueue.cpp:
3919         (WebCore::WorkerEventQueue::enqueueEvent):
3920         * workers/WorkerMessagingProxy.cpp:
3921         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
3922         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
3923         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
3924         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
3925         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
3926         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
3927         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
3928         (WebCore::WorkerMessagingProxy::reportPendingActivity):
3929
3930 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
3931
3932         Remove MainThreadTask
3933         https://bugs.webkit.org/show_bug.cgi?id=137563
3934
3935         Reviewed by Darin Adler.
3936
3937         Replace the remaining uses of MainThreadTask with C++11 lambdas.
3938         Remove the MainThreadTask header from the build.
3939
3940         * WebCore.order:
3941         * WebCore.vcxproj/WebCore.vcxproj:
3942         * WebCore.vcxproj/WebCore.vcxproj.filters:
3943         * WebCore.xcodeproj/project.pbxproj:
3944         * platform/MainThreadTask.h: Removed.
3945         * platform/network/curl/CurlDownload.cpp:
3946         (WebCore::CurlDownloadManager::downloadThread):
3947         (WebCore::CurlDownload::didReceiveHeader):
3948         (WebCore::CurlDownload::didReceiveData):
3949
3950 2014-10-10  Andrzej Badowski  <a.badowski@samsung.com>
3951
3952         [ATK] Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
3953         https://bugs.webkit.org/show_bug.cgi?id=136150
3954
3955         Reviewed by Chris Fleizach.
3956
3957         Expose ColumnHeaderRole and RowHeaderRole objects into ATK.
3958
3959         Test: accessibility/table-roles-hierarchy.html
3960
3961         * accessibility/AccessibilityRenderObject.cpp:
3962         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3963         Platforms based on ATK: added distinction of roles for the <th> elements.
3964         * accessibility/AccessibilityTableCell.cpp:
3965         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
3966         Platforms based on ATK: the return value is determined in the ancestor.
3967         * accessibility/atk/AccessibilityObjectAtk.cpp:
3968         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
3969         In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
3970         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3971         (atkRole):
3972         Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
3973         (getInterfaceMaskFromObject):
3974         In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
3975
3976 2014-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
3977
3978         MediaPlayer should use a reference for the MediaPlayerClient
3979         https://bugs.webkit.org/show_bug.cgi?id=137552
3980
3981         Reviewed by Darin Adler.
3982
3983         The MediaPlayer client is set on constructor by HTMLMediaElement
3984         and cleared on HTMLMediaElement destructor that also frees the
3985         MediaPlayer object. Since the client will never be null while the
3986         MediaPlayer player is alive, we can use a reference and remove all
3987         the unneeded null checks. The member has also been renamed to m_client.
3988
3989         * html/HTMLMediaElement.cpp:
3990         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3991         (WebCore::HTMLMediaElement::parseAttribute):
3992         * platform/graphics/MediaPlayer.cpp:
3993         (WebCore::MediaPlayer::MediaPlayer):
3994         (WebCore::MediaPlayer::~MediaPlayer):
3995         (WebCore::MediaPlayer::loadWithNextMediaEngine):
3996         (WebCore::MediaPlayer::inMediaDocument):
3997         (WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
3998         (WebCore::MediaPlayer::networkStateChanged):
3999         (WebCore::MediaPlayer::readyStateChanged):
4000         (WebCore::MediaPlayer::volumeChanged):
4001         (WebCore::MediaPlayer::muteChanged):
4002         (WebCore::MediaPlayer::timeChanged):
4003         (WebCore::MediaPlayer::sizeChanged):
4004         (WebCore::MediaPlayer::repaint):
4005         (WebCore::MediaPlayer::durationChanged):
4006         (WebCore::MediaPlayer::rateChanged):
4007         (WebCore::MediaPlayer::playbackStateChanged):
4008         (WebCore::MediaPlayer::firstVideoFrameAvailable):
4009         (WebCore::MediaPlayer::characteristicChanged):
4010         (WebCore::MediaPlayer::keyAdded):
4011         (WebCore::MediaPlayer::keyError):
4012         (WebCore::MediaPlayer::keyMessage):
4013         (WebCore::MediaPlayer::keyNeeded):
4014         (WebCore::MediaPlayer::referrer):
4015         (WebCore::MediaPlayer::userAgent):
4016         (WebCore::MediaPlayer::graphicsDeviceAdapter):
4017         (WebCore::MediaPlayer::cachedResourceLoader):
4018         (WebCore::MediaPlayer::addAudioTrack):
4019         (WebCore::MediaPlayer::removeAudioTrack):
4020         (WebCore::MediaPlayer::addTextTrack):
4021         (WebCore::MediaPlayer::removeTextTrack):
4022         (WebCore::MediaPlayer::addVideoTrack):
4023         (WebCore::MediaPlayer::removeVideoTrack):
4024         (WebCore::MediaPlayer::outOfBandTrackSources):
4025         (WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge):
4026         (WebCore::MediaPlayer::handlePlaybackCommand):
4027         (WebCore::MediaPlayer::sourceApplicationIdentifier):