REGRESSION (r170808): Volume slider in built-in media controls only changes volume...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-21  Jer Noble  <jer.noble@apple.com>
2
3         REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
4         https://bugs.webkit.org/show_bug.cgi?id=137805
5
6         Reviewed by Dan Bernstein.
7
8         Test: media/video-volume-slider-drag.html
9
10         Respond to the 'input' event rather than the 'change' event for the volume slider, so that
11         volume changes are continuous during drag operations.
12
13         Also listen for both 'input' and 'change' events for the timeline slider, doing fastSeek()
14         during 'input' and setting an explicit currentTime during 'change'. This is the same behavior
15         as current, but using 'change' instead of 'mouseup' to do the final currentTime change.
16
17         * Modules/mediacontrols/mediaControlsApple.js:
18         (Controller.prototype.createControls):
19         (Controller.prototype.handleTimelineInput):
20         (Controller.prototype.handleTimelineChange):
21         (Controller.prototype.handleTimelineMouseUp):
22         (Controller.prototype.handleVolumeSliderInput):
23         (Controller.prototype.handlePlayButtonClicked): Deleted.
24         (Controller.prototype.handleMaxButtonClicked): Deleted.
25
26 2014-10-21  Manuel Rego Casasnovas  <rego@igalia.com>
27
28         ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid
29         https://bugs.webkit.org/show_bug.cgi?id=136939
30
31         Reviewed by Darin Adler.
32
33         In some particular situations computeIntrinsicLogicalWidths() is called
34         in the middle of layoutGridItems(). In these cases we do not need to
35         populate the grid again, so we should avoid calling placeItemsOnGrid().
36         In addition, we do not need to clean the grid either, as that will be
37         done later by layoutGridItems().
38
39         Test: fast/css-grid-layout/grid-was-populated-assert.html
40
41         * rendering/RenderGrid.cpp:
42         (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Avoid calls to
43         placeItemsOnGrid() and clearGrid() if the grid was already populated.
44         * rendering/RenderGrid.h: Move gridWasPopulated() header out of the
45         debug ifdefs.
46
47 2014-10-21  Zan Dobersek  <zdobersek@igalia.com>
48
49         [Cairo] Make dashPattern, dotPattern in GraphicsContext::setPlatformStrokeStyle() const
50         https://bugs.webkit.org/show_bug.cgi?id=137912
51
52         Reviewed by Carlos Garcia Campos.
53
54         * platform/graphics/cairo/GraphicsContextCairo.cpp:
55         (WebCore::GraphicsContext::setPlatformStrokeStyle): Make the two static variables
56         constants since their value doesn't change after initialization.
57
58 2014-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
59
60         [GTK] Several labels are white instead of black
61         https://bugs.webkit.org/show_bug.cgi?id=137803
62
63         Reviewed by Martin Robinson.
64
65         Recent GTK+ versions require to explicitly set the state before
66         getting a color.
67
68         * rendering/RenderThemeGtk.cpp:
69         (WebCore::styleColor): Helper function to get a color from a
70         GtkStylecontext that explicitly sets the state before getting the color.
71         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor): Use styleColor().
72         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor): Ditto.
73         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor): Ditto.
74         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor): Ditto.
75         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor): Ditto.
76         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor): Ditto.
77         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor): Ditto.
78         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor): Ditto.
79         (WebCore::RenderThemeGtk::systemColor): Ditto.
80
81 2014-10-20  YongGeol Jung  <yg48.jung@samsung.com>
82
83         [Coordinated Graphics] '-webkit-mask-image: -webkit-gradient' doesn't work for AC layer.
84         https://bugs.webkit.org/show_bug.cgi?id=125326
85
86         Reviewed by Gyuyoung Kim.
87
88         Mask layer hasn't requested to synchronize with AC layer in CoordinatedGraphics so far.
89         That's why the mask layer isn't shown under CoordinatedGraphics.
90         Thus this patch lets the mask layer synchronize with the AC layer whenever AC layer is updated.
91
92         Below layout test case is related to this issue when --pixel test is enabled.
93         Unfortunately EFL WebKitTestRunner doesn't support AC mode yet.
94         When EFL test framework supports AC mode, the test will be passed.
95
96         Test: compositing/masks/mask-of-clipped-layer.html
97
98         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
99         (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
100
101 2014-10-17  Jeffrey Pfau  <jpfau@apple.com>
102
103         Ensure attached frame count doesn't exceed the maximum allowed frames
104         https://bugs.webkit.org/show_bug.cgi?id=136457
105
106         Reviewed by Alexey Proskuryakov.
107
108         Test: fast/frames/exponential-frames.html
109
110         * html/HTMLFrameElementBase.cpp:
111         (WebCore::HTMLFrameElementBase::isURLAllowed):
112
113 2014-10-20  Chris Dumez  <cdumez@apple.com>
114
115         ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
116         https://bugs.webkit.org/show_bug.cgi?id=137797
117
118         Reviewed by Darin Adler.
119
120         ResourceRequest deserialization was unnecessarily calling partitionName()
121         on the decoded cache partition. In the deserialization case, we already
122         know the cache partition is a valid partition name so we can bypass the
123         call to partitionName() (which is fairly expensive) for performance.
124
125         This patch adds a setDomainForCachePartion() method to ResourceRequest
126         that calls partitionName() on the domain argument, and moves all the
127         callers of setCachedPartition() to this new setter, except
128         ArgumentCoder<ResourceRequest>::decode().
129
130         This patch updates the setCachedPartition() to merely set the
131         m_cachePartition member, without calling partitionName() on the
132         argument. There is also a new assertion in place to make sure the
133         argument is a valid partition name.
134
135         No new tests, no behavior change.
136
137         * html/DOMURL.cpp:
138         (WebCore::DOMURL::revokeObjectURL):
139         * inspector/InspectorPageAgent.cpp:
140         (WebCore::InspectorPageAgent::cachedResource):
141         * inspector/InspectorResourceAgent.cpp:
142         (WebCore::InspectorResourceAgent::replayXHR):
143         * loader/FrameLoader.cpp:
144         (WebCore::FrameLoader::loadURL):
145         * loader/archive/cf/LegacyWebArchive.cpp:
146         (WebCore::LegacyWebArchive::create):
147         * loader/cache/CachedResourceLoader.cpp:
148         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
149         (WebCore::CachedResourceLoader::requestResource):
150         * loader/cache/MemoryCache.cpp:
151         (WebCore::MemoryCache::addImageToCache):
152         (WebCore::MemoryCache::removeImageFromCache):
153         * loader/cache/MemoryCache.h:
154         * page/SecurityOrigin.cpp:
155         (WebCore::SecurityOrigin::domainForCachePartition):
156         (WebCore::SecurityOrigin::cachePartition): Deleted.
157         Rename cachePartition() getter to domainForCachePartition() to make it
158         clear it returns a domain and not a partition name. As such, the caller
159         should then use ResourceRequest::setDomainForCachePartition(), not
160         setCachePartition().
161
162         * page/SecurityOrigin.h:
163         * platform/network/cf/ResourceRequest.h:
164         (WebCore::ResourceRequest::setCachePartition):
165         (WebCore::ResourceRequest::setDomainForCachePartition):
166
167 2014-10-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
168
169         Tighten XMLHttpRequest setRequestHeader value check
170         https://bugs.webkit.org/show_bug.cgi?id=128593
171
172         Reviewed by Darin Adler.
173
174         Test: http/tests/xmlhttprequest/set-bad-headervalue.html
175
176         * platform/network/HTTPParsers.cpp:
177         (WebCore::isValidHTTPHeaderValue): Updated header values check according RFC 7230.
178         (WebCore::isValidHTTPToken): Renamed variable name and updated RFC related comment.
179
180 2014-10-20  Michael Saboff  <msaboff@apple.com>
181
182         Make post checkin suggested changes to r174847
183         https://bugs.webkit.org/show_bug.cgi?id=137885
184
185         Reviewed by Mark Lam.
186
187         Eliminated the creation of a temporary Identifier when comparing propertyName to "open".
188         Made the suggested post checkin change to put the declaration of "entry" into the if.
189
190         * bindings/js/JSHTMLDocumentCustom.cpp:
191         (WebCore::JSHTMLDocument::getOwnPropertySlot):
192
193 2014-10-20  Chris Dumez  <cdumez@apple.com>
194
195         Use is<>() / downcast<>() for SpinButtonElement
196         https://bugs.webkit.org/show_bug.cgi?id=137896
197
198         Reviewed by Gyuyoung Kim.
199
200         Use is<>() / downcast<>() for SpinButtonElement instead of
201         isSpinButtonElement() / static_cast for consistency with the rest of
202         the code and for safety.
203
204         No new tests, no behavior change.
205
206         * accessibility/AccessibilityRenderObject.cpp:
207         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
208         * html/shadow/SpinButtonElement.h:
209         (isType):
210         * rendering/RenderTheme.cpp:
211         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
212         (WebCore::RenderTheme::isHovered):
213         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
214
215 2014-10-20  Roger Fong  <roger_fong@apple.com>
216
217         Use glFlush instead of glFinish when drawing WebGL output to screen.
218         https://bugs.webkit.org/show_bug.cgi?id=137897.
219         <rdar://problem/15846550>
220
221         Reviewed by Brent Fulgham.
222
223         Passes all conformance tests.
224         Performance tested by http://threejs.org/examples/#webgl_performance and Unity WebGL performance tests.
225
226         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
227         (WebCore::GraphicsContext3D::prepareTexture):
228         Use glFlush instead of glFinish. glFinish is a blocking operation pushed out queued up WebGL operations and then waits until 
229         every operation has completed before returning and every pixel has been updated. This causes severe performance problems,
230         about a 10 fps difference on http://threejs.org/examples/#webgl_performance. glFlush, like glFinish,
231         forces all queued WebGL operations to take place, but returns immediately. Switching to glFlush does not seem
232         make our rendering quality any worse for the handful of sites I've tested and makes our performance on WebGL much better.
233         However, we should continue to be on the watch for any potential rendering issues after this lands.
234
235 2014-10-20  Benjamin Poulain  <bpoulain@apple.com>
236
237         Generalize the compilation of :not() to support arbitrary selector lists
238         https://bugs.webkit.org/show_bug.cgi?id=137843
239
240         Reviewed by Andreas Kling.
241
242         This builds :not() on top of the code created for :nth-child(An+B of selectorList)
243         to support any selector list.
244
245         The tests for the JIT were added previously:
246         -not-boundaries.html
247         -not-backtracking.html
248
249         * cssjit/SelectorCompiler.cpp:
250         (WebCore::SelectorCompiler::addPseudoClassType):
251         Any :not() of a selector is handled through a simple selector list. Cases like
252         :not(foo, bar) simply generate not([fragmentFoo, bragmentBar]).
253
254         Old cases like :not(foo):not(bar) simply add those cases to the selector list,
255         generating not([fragmentFoo, bragmentBar]).
256
257         (WebCore::SelectorCompiler::minimumRegisterRequirements):
258         Register pressure is now tracked through computeBacktrackingMemoryRequirements.
259
260         (WebCore::SelectorCompiler::hasAnyCombinators):
261         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
262         (WebCore::SelectorCompiler::computeBacktrackingInformation):
263         Abstract the code creating Selector Lists from :nth-child(of). Use that for :not()
264         and  :nth-child(of).
265
266         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
267
268 2014-10-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
269
270         Use std::unique_ptr<>|make_unique<> in PluginView::scheduleRequest()
271         https://bugs.webkit.org/show_bug.cgi?id=137874
272
273         Reviewed by Andreas Kling.
274
275         No new tests, no behavior change.
276
277         * plugins/PluginView.cpp:
278         (WebCore::PluginView::requestTimerFired):
279         (WebCore::PluginView::scheduleRequest): Replace PassOwnPtr with std::unique_ptr.
280         (WebCore::PluginView::load): Create PluginRequest using std::make_unique.
281         * plugins/PluginView.h:
282
283 2014-10-20  Beth Dakin  <bdakin@apple.com>
284
285         Speculative build fix.
286
287         * platform/spi/mac/NSViewSPI.h:
288
289 2014-10-20  Beth Dakin  <bdakin@apple.com>
290
291         Add support for action menus
292         https://bugs.webkit.org/show_bug.cgi?id=137891
293         rdar://problem/18451638
294         rdar://problem/18694470
295
296         Reviewed by Anders Carlsson.
297
298         New SPI that is needed for this.
299         * WebCore.exp.in:
300         * WebCore.xcodeproj/project.pbxproj:
301         * platform/spi/mac: Added.
302         * platform/spi/mac/NSViewSPI.h: Added.
303
304 2014-10-20  Dean Jackson  <dino@apple.com>
305
306         [Mac] Support "inverted-colors" and "monochrome" media feature.
307         https://bugs.webkit.org/show_bug.cgi?id=137535
308         <rdar://problem/18586398>
309
310         Rolling out the Windows part of this to fix the build.
311
312         * platform/win/PlatformScreenWin.cpp:
313         (WebCore::screenHasInvertedColors): Revert to a stub function.
314
315 2014-10-20  Chris Dumez  <cdumez@apple.com>
316
317         Unreviewed EFL / GTK build fix after r174898.
318
319         Add missing header include.
320
321         * accessibility/AccessibilityARIAGrid.cpp:
322
323 2014-10-20  Dean Jackson  <dino@apple.com>
324
325         [Mac] Support "inverted-colors" and "monochrome" media feature.
326         https://bugs.webkit.org/show_bug.cgi?id=137535
327         <rdar://problem/18586398>
328
329         Reviewed by Brent Fulgham.
330
331         Add a new media query from CSS Level 4, "inverted-colors", and
332         implement the Apple backends for the "monochrome" media query.
333
334         The platform code went into PlatformScreenMac, which already
335         had a screenIsMonochrome method. This now calls into Core
336         Graphics via SPI. I added a screenHasInvertedColors
337         method which tests for inversion. On iOS, there is public API
338         for both queries. On Windows, we try to use CoreGraphics.
339
340         At the moment neither of these media queries re-evaluate
341         automatically if the user changes their mode. The page will
342         need to be reloaded. It is possible to detect a change on iOS,
343         but not OS X.
344         https://bugs.webkit.org/show_bug.cgi?id=137868
345
346         I decided to not add an ENABLE flag for this, mostly because it
347         is such an isolated feature and seems very unlikely to be
348         controversial. I don't expect the syntax to change. (I'm sure
349         this comment will come back to haunt me.)
350
351         Testing this automatically is slightly tricky. We'd need
352         to expose SPI to invert the user's screen, but then we get
353         inverted images from our testing which could interfere with concurrent
354         operations. Instead I've included some tests that exercise
355         the "false" parts of the media query, with explanations as
356         to why they would fail if the display is inverted.
357
358         Tests: fast/media/mq-inverted-colors.html
359                fast/media/mq-monochrome.html
360
361         * css/CSSValueKeywords.in: Add the "inverted" keyword for "inverted-colors".
362         * css/MediaFeatureNames.h: Add the "inverted-colors" feature name.
363         * css/MediaQueryEvaluator.cpp:
364         (WebCore::inverted_colorsMediaFeatureEval): Implementation of the new media query.
365         * css/MediaQueryExp.cpp:
366         (WebCore::featureWithCSSValueID): The new query takes an id...
367         (WebCore::featureWithoutValue): ... or no value.
368         * platform/PlatformScreen.h: Add "screenHasInvertedColors".
369         * platform/efl/PlatformScreenEfl.cpp:
370         (WebCore::screenHasInvertedColors): Stub implementation.
371         * platform/gtk/PlatformScreenGtk.cpp:
372         (WebCore::screenHasInvertedColors): Ditto.
373         * platform/ios/PlatformScreenIOS.mm:
374         (WebCore::screenHasInvertedColors): Call into the platform accessibility API.
375         (WebCore::screenIsMonochrome): Ditto.
376         * platform/mac/PlatformScreenMac.mm:
377         (WebCore::screenIsMonochrome): Call into the CoreGraphics SPI.
378         (WebCore::screenHasInvertedColors): Call into the CoreGraphics SPI.
379         * platform/win/PlatformScreenWin.cpp:
380         (WebCore::screenHasInvertedColors): Call into CoreGraphics if we're using it.
381
382 2014-10-20  Chris Dumez  <cdumez@apple.com>
383
384         Use is<>() / downcast<>() for Accessibility objects
385         https://bugs.webkit.org/show_bug.cgi?id=137286
386
387         Reviewed by Darin Adler.
388
389         Use is<>() / downcast<>() for Accessibility objects and clean up the
390         surrounding code.
391
392         No new tests, no behavior change.
393
394         * accessibility/AXObjectCache.cpp:
395         (WebCore::AXObjectCache::focusedImageMapUIElement):
396         (WebCore::AXObjectCache::notificationPostTimerFired):
397         * accessibility/AccessibilityARIAGrid.cpp:
398         (WebCore::AccessibilityARIAGrid::addTableCellChild):
399         (WebCore::AccessibilityARIAGrid::addChildren):
400         * accessibility/AccessibilityARIAGridCell.cpp:
401         (WebCore::AccessibilityARIAGridCell::parentTable):
402         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
403         * accessibility/AccessibilityARIAGridRow.cpp:
404         (WebCore::AccessibilityARIAGridRow::disclosedRows):
405         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
406         (WebCore::AccessibilityARIAGridRow::parentTable):
407         * accessibility/AccessibilityARIAGridRow.h:
408         * accessibility/AccessibilityImageMapLink.cpp:
409         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
410         * accessibility/AccessibilityImageMapLink.h:
411         * accessibility/AccessibilityList.h:
412         * accessibility/AccessibilityListBox.cpp:
413         (WebCore::AccessibilityListBox::setSelectedChildren):
414         (WebCore::AccessibilityListBox::selectedChildren):
415         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
416         * accessibility/AccessibilityListBox.h:
417         * accessibility/AccessibilityListBoxOption.h:
418         * accessibility/AccessibilityMenuList.cpp:
419         (WebCore::AccessibilityMenuList::addChildren):
420         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
421         * accessibility/AccessibilityMenuList.h:
422         * accessibility/AccessibilityMenuListOption.h:
423         * accessibility/AccessibilityMenuListPopup.cpp:
424         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
425         * accessibility/AccessibilityMenuListPopup.h:
426         * accessibility/AccessibilityMockObject.h:
427         * accessibility/AccessibilityNodeObject.cpp:
428         (WebCore::AccessibilityNodeObject::textUnderElement):
429         * accessibility/AccessibilityNodeObject.h:
430         * accessibility/AccessibilityObject.cpp:
431         (WebCore::appendChildrenToArray):
432         (WebCore::AccessibilityObject::scrollViewAncestor):
433         * accessibility/AccessibilityObject.h:
434         * accessibility/AccessibilityRenderObject.cpp:
435         (WebCore::AccessibilityRenderObject::getDocumentLinks):
436         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
437         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
438         (WebCore::AccessibilityRenderObject::addImageMapChildren):
439         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
440         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
441         (WebCore::AccessibilityRenderObject::ariaSelectedRows):
442         * accessibility/AccessibilityRenderObject.h:
443         * accessibility/AccessibilitySVGRoot.h:
444         * accessibility/AccessibilityScrollView.cpp:
445         (WebCore::AccessibilityScrollView::addChildScrollbar):
446         * accessibility/AccessibilityScrollView.h:
447         * accessibility/AccessibilityScrollbar.h:
448         * accessibility/AccessibilitySlider.cpp:
449         (WebCore::AccessibilitySlider::addChildren):
450         * accessibility/AccessibilitySlider.h:
451         * accessibility/AccessibilitySpinButton.cpp:
452         (WebCore::AccessibilitySpinButton::addChildren):
453         (WebCore::AccessibilitySpinButtonPart::press):
454         * accessibility/AccessibilitySpinButton.h:
455         * accessibility/AccessibilityTable.cpp:
456         (WebCore::AccessibilityTable::addChildren):
457         (WebCore::AccessibilityTable::addChildrenFromSection):
458         (WebCore::AccessibilityTable::headerContainer):
459         (WebCore::AccessibilityTable::columnHeaders):
460         (WebCore::AccessibilityTable::rowHeaders):
461         (WebCore::AccessibilityTable::cellForColumnAndRow):
462         * accessibility/AccessibilityTable.h:
463         Make isAccessibilityTable() public and mark as final so that callers
464         can benefit from tighter typing, as isAccessibilityTable() is
465         stricter than isTable(). isTable() indicates that the object is an
466         AccessibilityTable and is equivalent to is<AccessibilityTable>(object).
467         isAccessibilityTable() is equivalent to "isTable() && renderer()".
468
469         * accessibility/AccessibilityTableCell.cpp:
470         (WebCore::AccessibilityTableCell::parentTable):
471         * accessibility/AccessibilityTableCell.h:
472         * accessibility/AccessibilityTableColumn.cpp:
473         (WebCore::AccessibilityTableColumn::headerObject):
474         (WebCore::AccessibilityTableColumn::addChildren):
475         * accessibility/AccessibilityTableColumn.h:
476         * accessibility/AccessibilityTableHeaderContainer.cpp:
477         (WebCore::AccessibilityTableHeaderContainer::addChildren):
478         * accessibility/AccessibilityTableRow.cpp:
479         (WebCore::AccessibilityTableRow::parentTable):
480         (WebCore::AccessibilityTableRow::headerObject):
481         * accessibility/AccessibilityTableRow.h:
482         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
483         (webkitAccessibleSelectionClearSelection):
484         (webkitAccessibleSelectionSelectAllSelection):
485         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
486         (core):
487         (cell):
488         (cellAtIndex):
489         (webkitAccessibleTableGetIndexAt):
490         (webkitAccessibleTableGetNColumns):
491         (webkitAccessibleTableGetNRows):
492         (webkitAccessibleTableGetColumnHeader):
493         (webkitAccessibleTableGetRowHeader):
494         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
495         (webkitAccessibleTableCellGetColumnHeaderCells):
496         (webkitAccessibleTableCellGetRowHeaderCells):
497         (webkitAccessibleTableCellGetColumnSpan):
498         (webkitAccessibleTableCellGetRowSpan):
499         (webkitAccessibleTableCellGetPosition):
500         * accessibility/ios/AccessibilityObjectIOS.mm:
501         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
502         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
503         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
504         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
505         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
506         (AXAttributeStringSetElement):
507         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
508         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
509         (-[WebAccessibilityObjectWrapper subrole]):
510         (-[WebAccessibilityObjectWrapper roleDescription]):
511         (-[WebAccessibilityObjectWrapper scrollViewParent]):
512         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
513         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
514         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
515         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
516         * inspector/InspectorDOMAgent.cpp:
517         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
518         * rendering/RenderMenuList.cpp:
519         (RenderMenuList::didUpdateActiveOption):
520
521 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
522
523         Web Inspector: Generate all Inspector domains together in JavaScriptCore
524         https://bugs.webkit.org/show_bug.cgi?id=137748
525
526         Reviewed by Brian Burg.
527
528         After moving the json files into JavaScriptCore update the includes,
529         and names of functions that were previously prefixed.
530
531         * CMakeLists.txt:
532         * DerivedSources.make:
533         * ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Added.
534         * ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Added.
535         * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Removed.
536         * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Removed.
537         * ForwardingHeaders/inspector/InspectorJSProtocolTypes.h: Removed.
538         * ForwardingHeaders/inspector/InspectorProtocolTypesBase.h: Added.
539         * WebCore.vcxproj/WebCore.vcxproj:
540         * WebCore.vcxproj/WebCore.vcxproj.filters:
541         * WebCore.vcxproj/copyForwardingHeaders.cmd:
542         * WebCore.xcodeproj/project.pbxproj:
543         * inspector/CommandLineAPIHost.cpp:
544         * inspector/InspectorApplicationCacheAgent.cpp:
545         * inspector/InspectorApplicationCacheAgent.h:
546         * inspector/InspectorCSSAgent.cpp:
547         * inspector/InspectorCSSAgent.h:
548         * inspector/InspectorController.cpp:
549         * inspector/InspectorDOMAgent.cpp:
550         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
551         * inspector/InspectorDOMAgent.h:
552         * inspector/InspectorDOMDebuggerAgent.cpp:
553         * inspector/InspectorDOMDebuggerAgent.h:
554         * inspector/InspectorDOMStorageAgent.cpp:
555         * inspector/InspectorDOMStorageAgent.h:
556         * inspector/InspectorDatabaseAgent.cpp:
557         * inspector/InspectorDatabaseAgent.h:
558         * inspector/InspectorDatabaseResource.cpp:
559         * inspector/InspectorDatabaseResource.h:
560         * inspector/InspectorFrontendClientLocal.cpp:
561         * inspector/InspectorIndexedDBAgent.cpp:
562         * inspector/InspectorIndexedDBAgent.h:
563         * inspector/InspectorLayerTreeAgent.cpp:
564         * inspector/InspectorLayerTreeAgent.h:
565         * inspector/InspectorPageAgent.cpp:
566         * inspector/InspectorPageAgent.h:
567         * inspector/InspectorReplayAgent.cpp:
568         * inspector/InspectorReplayAgent.h:
569         * inspector/InspectorResourceAgent.cpp:
570         * inspector/InspectorResourceAgent.h:
571         * inspector/InspectorStyleSheet.cpp:
572         * inspector/InspectorStyleSheet.h:
573         * inspector/InspectorTimelineAgent.cpp:
574         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
575         * inspector/InspectorTimelineAgent.h:
576         * inspector/InspectorWorkerAgent.cpp:
577         * inspector/InspectorWorkerAgent.h:
578         * inspector/PageRuntimeAgent.h:
579         * inspector/TimelineRecordFactory.cpp:
580         * inspector/WorkerInspectorController.cpp:
581
582 2014-10-20  Andy Estes  <aestes@apple.com>
583
584         Fix the GTK build.
585
586         * dom/RenderedDocumentMarker.h:
587
588 2014-10-19  Antti Koivisto  <antti@apple.com>
589
590         Avoid unnecessary NSURLResponse construction for QuickLook on iOS
591         https://bugs.webkit.org/show_bug.cgi?id=137876
592
593         Reviewed by Andy Estes.
594
595         QuickLook specific code path creates NSURLResponse in the web process for every response.
596         It is rarely needed so this is unnecessary work.
597
598         * WebCore.exp.in:
599         * platform/network/ios/QuickLook.h:
600         * platform/network/ios/QuickLook.mm:
601         (WebCore::isMainResourceLoader):
602         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
603
604             Separate function for testing if QuickLookHandle is needed.
605
606         (WebCore::QuickLookHandle::create):
607
608             Switch the interface to take ResourceResponse.
609
610 2014-10-20  Andy Estes  <aestes@apple.com>
611
612         Fix the iOS build.
613
614         * WebCore.xcodeproj/project.pbxproj:
615         * dom/RenderedDocumentMarker.h:
616         * page/ios/FrameIOS.mm:
617         (WebCore::Frame::interpretationsForCurrentRoot):
618
619 2014-10-20  Benjamin Poulain  <benjamin@webkit.org>
620
621         Update the <link>'s link status
622         https://bugs.webkit.org/show_bug.cgi?id=137861
623
624         Reviewed by Chris Dumez.
625
626         In the latest HTML spec, <link> has the link status
627         if it has a 'href' attribute, exactly like <a> and <area>:
628             https://html.spec.whatwg.org/multipage/scripting.html#selector-link
629
630         This patch updates WebKit accordingly.
631
632         Tests: fast/css/link-basics.html
633                fast/selectors/link-basics-xhtml.xhtml
634                fast/selectors/link-basics.html
635                fast/selectors/webkit-any-link-basics.html
636
637         * html/HTMLLinkElement.cpp:
638         (WebCore::HTMLLinkElement::parseAttribute):
639
640 2014-10-20  Chris Dumez  <cdumez@apple.com>
641
642         [Mac] Optimize cookiesForDOM() by filtering and serializing cookies in a single pass
643         https://bugs.webkit.org/show_bug.cgi?id=137869
644
645         Reviewed by Darin Adler.
646
647         Optimize cookiesForDOM() by filtering and serializing in 1 pass instead of 2.
648
649         Previously, when accessing document.cookie, we ended up doing the following:
650         1. Call wkHTTPCookiesForURL() to get an NSArray of NSHTTPCookies.
651         2. Call filterCookies() to filter out cookies that are httpOnly or with an
652            empty name, thus allocating a new NSMutableArray.
653         3. Call NSHTTPCookie's requestHeaderFieldsWithCookies() to serialize the
654            cookies
655         4. Construct a WTF::String from the NSString*
656
657         There were several inefficiencies here:
658         1. We needed to pre-filter the cookies and allocate a new NSMutableArray
659            before calling requestHeaderFieldsWithCookies()
660         2. requestHeaderFieldsWithCookies() does more things that we actually need.
661            It constructs a Dictionary of header fields, of which we query the
662            "Cookie" field, even though we merely want a ';'-separated string
663            representation of the cookies in "key=value" form.
664
665         With this patch, we now take care of the string serialization ourselves,
666         using a StringBuilder as it is trivial to do. This also allows us to filter
667         out the httpOnly/invalid cookies as we do the serialization instead of
668         having a first pass to do so.
669
670         When scrolling the http://www.apple.com/iphone/ entire page down, then up,
671         se were spending ~13.1% of the NetworkProcess time in cookiesForDOM()
672         (~96ms) on my machine. With the patch, we spend ~23% less time in
673         cookiesForDOM() (~74ms).
674
675         No new tests, no behavior change.
676
677         * platform/network/mac/CookieJarMac.mm:
678         (WebCore::cookiesForSession):
679         (WebCore::cookiesForDOM):
680         (WebCore::cookieRequestHeaderFieldValue):
681
682 2014-10-19  Chris Dumez  <cdumez@apple.com>
683
684         Kill toRenderedDocumentMarker() by using tighter typing
685         https://bugs.webkit.org/show_bug.cgi?id=137858
686
687         Reviewed by Darin Adler.
688
689         Kill toRenderedDocumentMarker() by using tighter typing. This method
690         was doing no type validation, just a static_cast<>().
691
692         No new tests, no behavior change.
693
694         * dom/DocumentMarkerController.cpp:
695         (WebCore::DocumentMarkerController::addTextMatchMarker):
696         (WebCore::DocumentMarkerController::markersFor):
697         (WebCore::DocumentMarkerController::markersInRange):
698         (DocumentMarkerController::hasMarkers):
699         * dom/DocumentMarkerController.h:
700         * dom/RenderedDocumentMarker.h:
701         (WebCore::toRenderedDocumentMarker): Deleted.
702         * editing/AlternativeTextController.cpp:
703         (WebCore::markersHaveIdenticalDescription):
704         (WebCore::AlternativeTextController::respondToChangedSelection):
705         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
706         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
707         (WebCore::AlternativeTextController::applyDictationAlternative):
708         * editing/CompositeEditCommand.cpp:
709         (WebCore::copyMarkers):
710         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
711         * editing/DeleteSelectionCommand.cpp:
712         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
713         * editing/Editor.cpp:
714         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
715         (WebCore::Editor::selectionStartHasMarkerFor):
716         * rendering/InlineTextBox.cpp:
717         (WebCore::InlineTextBox::paintDocumentMarker):
718         (WebCore::InlineTextBox::paintTextMatchMarker):
719         (WebCore::InlineTextBox::computeRectForReplacementMarker):
720         (WebCore::InlineTextBox::paintDocumentMarkers):
721         * rendering/InlineTextBox.h:
722         * rendering/svg/SVGInlineFlowBox.cpp:
723         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
724         * testing/Internals.cpp:
725         (WebCore::Internals::markerAt):
726         (WebCore::Internals::markerRangeForNode):
727         (WebCore::Internals::markerDescriptionForNode):
728         * testing/Internals.h:
729
730 2014-10-19  Chris Dumez  <cdumez@apple.com>
731
732         Use is<>() / downcast<>() for all remaining RenderObject subclasses
733         https://bugs.webkit.org/show_bug.cgi?id=137845
734
735         Reviewed by Darin Adler.
736
737         Use is<>() / downcast<>() for all remaining RenderObject subclasses and
738         clean up the surrounding code.
739
740         No new tests, no behavior change.
741
742         * accessibility/AccessibilityProgressIndicator.cpp:
743         (WebCore::AccessibilityProgressIndicator::progressElement):
744         (WebCore::AccessibilityProgressIndicator::meterElement):
745         * accessibility/AccessibilityRenderObject.cpp:
746         (WebCore::AccessibilityRenderObject::layoutCount):
747         (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
748         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
749         * dom/Document.cpp:
750         (WebCore::widgetForElement):
751         * dom/Position.cpp:
752         (WebCore::Position::getInlineBoxAndOffset):
753         * dom/WebKitNamedFlow.cpp:
754         (WebCore::WebKitNamedFlow::overset):
755         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
756         (WebCore::WebKitNamedFlow::getRegionsByContent):
757         (WebCore::WebKitNamedFlow::getRegions):
758         * editing/FrameSelection.cpp:
759         (WebCore::isFrameElement):
760         * html/HTMLEmbedElement.cpp:
761         (WebCore::findWidgetRenderer):
762         * html/HTMLFrameOwnerElement.cpp:
763         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
764         (WebCore::HTMLFrameOwnerElement::renderWidget):
765         * html/HTMLMediaElement.cpp:
766         (WebCore::HTMLMediaElement::parseAttribute):
767         * html/HTMLMeterElement.cpp:
768         (WebCore::HTMLMeterElement::renderMeter):
769         * html/HTMLPlugInElement.cpp:
770         (WebCore::HTMLPlugInElement::supportsFocus):
771         * html/HTMLPlugInImageElement.cpp:
772         (WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
773         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
774         * html/HTMLProgressElement.cpp:
775         (WebCore::HTMLProgressElement::renderProgress):
776         * html/PluginDocument.cpp:
777         (WebCore::PluginDocument::pluginWidget):
778         * html/shadow/MediaControlElements.cpp:
779         (WebCore::MediaControlTimelineElement::defaultEventHandler):
780         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
781         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
782         * inspector/InspectorLayerTreeAgent.cpp:
783         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
784         * inspector/InspectorOverlay.cpp:
785         (WebCore::buildObjectForElementInfo):
786         * loader/SubframeLoader.cpp:
787         (WebCore::SubframeLoader::loadSubframe):
788         * page/Frame.cpp:
789         (WebCore::Frame::ownerRenderer):
790         * page/FrameView.cpp:
791         (WebCore::FrameView::layout):
792         * page/gtk/EventHandlerGtk.cpp:
793         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
794         * page/ios/EventHandlerIOS.mm:
795         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
796         (WebCore::EventHandler::passSubframeEventToSubframe):
797         * page/mac/EventHandlerMac.mm:
798         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
799         (WebCore::EventHandler::passSubframeEventToSubframe):
800         (WebCore::widgetForEventTarget):
801         * platform/efl/RenderThemeEfl.cpp:
802         (WebCore::RenderThemeEfl::applyEdjeRTLState):
803         * rendering/InlineTextBox.cpp:
804         (WebCore::fontToUse):
805         (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
806         (WebCore::InlineTextBox::paint):
807         * rendering/LayoutState.cpp:
808         (WebCore::LayoutState::LayoutState):
809         * rendering/RenderBlock.cpp:
810         (WebCore::RenderBlock::collapseAnonymousBoxChild):
811         (WebCore::RenderBlock::simplifiedLayout):
812         (WebCore::RenderBlock::paintObject):
813         (WebCore::RenderBlock::selectionGaps):
814         (WebCore::RenderBlock::nodeAtPoint):
815         * rendering/RenderBlockFlow.cpp:
816         (WebCore::RenderBlockFlow::layoutBlock):
817         (WebCore::RenderBlockFlow::hitTestFloats):
818         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
819         * rendering/RenderBlockLineLayout.cpp:
820         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
821         * rendering/RenderBox.cpp:
822         (WebCore::RenderBox::scroll):
823         (WebCore::RenderBox::nodeAtPoint):
824         (WebCore::RenderBox::repaintLayerRectsForImage):
825         (WebCore::RenderBox::mapLocalToContainer):
826         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
827         * rendering/RenderCombineText.h:
828         * rendering/RenderElement.cpp:
829         (WebCore::RenderElement::adjustStyleDifference):
830         (WebCore::addLayers):
831         (WebCore::RenderElement::removeLayers):
832         (WebCore::RenderElement::moveLayers):
833         (WebCore::RenderElement::setNeedsPositionedMovementLayout):
834         (WebCore::RenderElement::renderNamedFlowThreadWrapper):
835         * rendering/RenderEmbeddedObject.h:
836         * rendering/RenderFlowThread.cpp:
837         (WebCore::RenderFlowThread::validateRegions):
838         (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
839         (WebCore::RenderFlowThread::regionForCompositedLayer):
840         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
841         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
842         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
843         (WebCore::RenderFlowThread::addForcedRegionBreak):
844         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
845         * rendering/RenderFlowThread.h:
846         * rendering/RenderLayer.cpp:
847         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
848         (WebCore::transparencyClipBox):
849         (WebCore::accumulateOffsetTowardsAncestor):
850         (WebCore::RenderLayer::collectFragments):
851         (WebCore::RenderLayer::hitTest):
852         (WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
853         (WebCore::RenderLayer::calculateClipRects):
854         * rendering/RenderLayerBacking.cpp:
855         (WebCore::RenderLayerBacking::updateAfterWidgetResize):
856         (WebCore::RenderLayerBacking::updateConfiguration):
857         (WebCore::isRestartedPlugin):
858         (WebCore::isCompositedPlugin):
859         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
860         (WebCore::RenderLayerBacking::containsPaintedContent):
861         * rendering/RenderLayerCompositor.cpp:
862         (WebCore::RenderLayerCompositor::updateBacking):
863         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
864         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
865         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
866         (WebCore::RenderLayerCompositor::reasonsForCompositing):
867         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
868         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
869         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
870         * rendering/RenderLayerModelObject.h:
871         * rendering/RenderLineBreak.h:
872         * rendering/RenderMeter.h:
873         * rendering/RenderMultiColumnFlowThread.cpp:
874         (WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
875         (WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
876         (WebCore::RenderMultiColumnFlowThread::layout):
877         (WebCore::RenderMultiColumnFlowThread::addRegionToThread):
878         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
879         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
880         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
881         (WebCore::RenderMultiColumnFlowThread::setPageBreak):
882         (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
883         (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
884         (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
885         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
886         * rendering/RenderMultiColumnFlowThread.h:
887         * rendering/RenderMultiColumnSet.cpp:
888         (WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
889         (WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
890         * rendering/RenderMultiColumnSet.h:
891         * rendering/RenderMultiColumnSpannerPlaceholder.h:
892         * rendering/RenderNamedFlowFragment.cpp:
893         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
894         (WebCore::RenderNamedFlowFragment::namedFlowThread):
895         * rendering/RenderNamedFlowFragment.h:
896         * rendering/RenderNamedFlowThread.cpp:
897         (WebCore::RenderNamedFlowThread::updateWritingMode):
898         (WebCore::addFragmentToList):
899         (WebCore::RenderNamedFlowThread::addRegionToThread):
900         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
901         (WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
902         (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
903         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
904         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
905         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
906         * rendering/RenderNamedFlowThread.h:
907         * rendering/RenderObject.cpp:
908         (WebCore::scheduleRelayoutForSubtree):
909         (WebCore::RenderObject::setLayerNeedsFullRepaint):
910         (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
911         (WebCore::RenderObject::repaintUsingContainer):
912         (WebCore::RenderObject::selectionRoot):
913         (WebCore::RenderObject::shouldUseTransformFromContainer):
914         (WebCore::RenderObject::getTransformFromContainer):
915         (WebCore::RenderObject::isRooted):
916         (WebCore::RenderObject::willBeDestroyed):
917         (WebCore::RenderObject::isComposited):
918         (WebCore::RenderObject::currentRenderNamedFlowFragment):
919         * rendering/RenderObject.h:
920         * rendering/RenderProgress.h:
921         * rendering/RenderRuby.cpp:
922         (WebCore::lastRubyRun):
923         * rendering/RenderRubyBase.cpp:
924         (WebCore::RenderRubyBase::rubyRun):
925         * rendering/RenderRubyRun.cpp:
926         (WebCore::RenderRubyRun::removeChild):
927         * rendering/RenderRubyRun.h:
928         * rendering/RenderSlider.h:
929         * rendering/RenderText.cpp:
930         (WebCore::RenderText::widthFromCache):
931         * rendering/RenderThemeGtk.cpp:
932         (WebCore::RenderThemeGtk::calculateProgressRect):
933         * rendering/RenderThemeIOS.mm:
934         (WebCore::RenderThemeIOS::paintProgressBar):
935         * rendering/RenderThemeMac.mm:
936         (WebCore::RenderThemeMac::paintMeter):
937         (WebCore::RenderThemeMac::paintProgressBar):
938         * rendering/RenderThemeSafari.cpp:
939         (WebCore::RenderThemeSafari::paintMeter):
940         * rendering/RenderThemeWin.cpp:
941         (WebCore::RenderThemeWin::paintMeter):
942         * rendering/RenderTreeAsText.cpp:
943         (WebCore::writeRenderRegionList):
944         (WebCore::writeLayers):
945         * rendering/RenderVideo.h:
946         * rendering/RenderView.cpp:
947         (WebCore::SelectionIterator::checkForSpanner):
948         (WebCore::isComposited):
949         * rendering/RenderView.h:
950         * rendering/RenderWidget.h:
951         * rendering/line/BreakingContextInlineHeaders.h:
952         (WebCore::BreakingContext::handleText):
953         * rendering/line/LineBreaker.cpp:
954         (WebCore::LineBreaker::skipLeadingWhitespace):
955         * testing/Internals.cpp:
956         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
957
958 2014-10-19  Chris Dumez  <cdumez@apple.com>
959
960         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
961         https://bugs.webkit.org/show_bug.cgi?id=137854
962
963         Reviewed by Darin Adler.
964
965         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar instead of a
966         custom toRenderScrollbar() function, for consistency.
967
968         No new tests, no behavior change.
969
970         * rendering/RenderScrollbar.h:
971         (isType):
972         (WebCore::toRenderScrollbar): Deleted.
973         * rendering/RenderScrollbarTheme.cpp:
974         (WebCore::RenderScrollbarTheme::minimumThumbLength):
975         (WebCore::RenderScrollbarTheme::backButtonRect):
976         (WebCore::RenderScrollbarTheme::forwardButtonRect):
977         (WebCore::RenderScrollbarTheme::trackRect):
978         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
979         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
980         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
981         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
982         (WebCore::RenderScrollbarTheme::paintTrackBackground):
983         (WebCore::RenderScrollbarTheme::paintTrackPiece):
984         (WebCore::RenderScrollbarTheme::paintButton):
985         (WebCore::RenderScrollbarTheme::paintThumb):
986
987 2014-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
988
989         [GTK] Move GtkDragAndDropHelper from Platform to WebKit2
990         https://bugs.webkit.org/show_bug.cgi?id=137422
991
992         Reviewed by Martin Robinson.
993
994         Remove ClipboardUtilitiesGtk and GtkDragAndDropHelper.
995
996         * PlatformGTK.cmake:
997         * platform/gtk/ClipboardUtilitiesGtk.cpp: Removed.
998         * platform/gtk/ClipboardUtilitiesGtk.h: Removed.
999         * platform/gtk/GtkDragAndDropHelper.cpp: Removed.
1000         * platform/gtk/GtkDragAndDropHelper.h: Removed.
1001
1002 2014-10-19  Roger Fong  <roger_fong@apple.com>
1003
1004         Unreviewed. Style fix following r174855.
1005
1006         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1007         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
1008
1009 2014-10-18  Antti Koivisto  <antti@apple.com>
1010
1011         REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
1012         https://bugs.webkit.org/show_bug.cgi?id=137855
1013
1014         Reviewed by Dan Bernstein.
1015
1016         We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
1017         backchannel data that the synthesized response doesn't have.
1018
1019         Test: http/tests/mime/mime-type-sniff.html
1020
1021         * platform/network/mac/ResourceResponseMac.mm:
1022         (WebCore::ResourceResponse::initNSURLResponse):
1023
1024             When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.
1025
1026 2014-10-18  Chris Dumez  <cdumez@apple.com>
1027
1028         [Mac] Use Fast enumeration consistently in WebFontCache.mm
1029         https://bugs.webkit.org/show_bug.cgi?id=137791
1030
1031         Reviewed by Darin Adler.
1032
1033         Use fast enumeration consistently in WebFontCache.mm as this results in
1034         more efficient, concise and safer code.
1035
1036         No new tests, no behavior change.
1037
1038         * platform/mac/WebFontCache.mm:
1039         (+[WebFontCache getTraits:inFamily:]):
1040         Reserve Vector capacity before the loop as we know how many traits we
1041         are going to append. Also use uncheckedAppend() for performance.
1042
1043         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
1044
1045 2014-10-18  Chris Fleizach  <cfleizach@apple.com>
1046
1047         AX: Tables with <colgroups> are not reporting table column headers
1048         https://bugs.webkit.org/show_bug.cgi?id=137846
1049
1050         Reviewed by Mario Sanchez Prada.
1051
1052         The code to search for header objects was getting stuck on anonymous RenderTableSections.
1053         We also need to check more rows for headers, in case the first row or more is not visible or is empty.
1054
1055         Test: accessibility/table-column-headers-with-captions.html
1056
1057         * accessibility/AccessibilityTableColumn.cpp:
1058         (WebCore::AccessibilityTableColumn::headerObject):
1059         (WebCore::AccessibilityTableColumn::headerObjectForSection):
1060
1061 2014-10-18  KwangHyuk Kim  <hyuki.kim@samsung.com>
1062
1063         [EFL] build break occurs on webkit efl build.
1064         https://bugs.webkit.org/show_bug.cgi?id=137844
1065
1066         Reviewed by Gyuyoung Kim.
1067
1068         As local variable elementAddressRegisterIndex is assigned but not used, there is build break for the webkit efl.
1069
1070         No new tests because it's just to fix build break.
1071
1072         * cssjit/SelectorCompiler.cpp:
1073         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1074
1075 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1076
1077         Apply std::unique_ptr to FooFont classes
1078         https://bugs.webkit.org/show_bug.cgi?id=137769
1079
1080         Reviewed by Andreas Kling.
1081
1082         As a step to use std::unique_ptr, this patch applies std::unique_ptr to Font classes.
1083
1084         No new tests, no behavior changes.
1085
1086         * platform/graphics/Font.cpp:
1087         (WebCore::retrieveOrAddCachedFontGlyphs):
1088         (WebCore::Font::createLayout):
1089         * platform/graphics/SimpleFontData.cpp:
1090         (WebCore::SimpleFontData::DerivedFontData::create):
1091         * platform/graphics/SimpleFontData.h:
1092         Remove create() factory function because public ctor and std::make_unique<> can replace it.
1093         * platform/graphics/mac/ComplexTextController.cpp:
1094         (WebCore::Font::createLayout):
1095
1096 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1097
1098         Use std::unique_ptr in WebCore/bindings
1099         https://bugs.webkit.org/show_bug.cgi?id=137808
1100
1101         Reviewed by Andreas Kling.
1102
1103         Clean up PassOwnPtr|OwnPtr in WebCore/bindings by using std::unique_ptr, std::make_unique
1104         and WTF::move.
1105
1106         No new tests, no behavior changes.
1107
1108         * bindings/generic/ActiveDOMCallback.h:
1109         * bindings/js/JSMessageEventCustom.cpp:
1110         (WebCore::handleInitMessageEvent):
1111         * bindings/js/SerializedScriptValue.cpp:
1112         (WebCore::SerializedScriptValue::SerializedScriptValue):
1113         (WebCore::SerializedScriptValue::transferArrayBuffers):
1114         (WebCore::SerializedScriptValue::create):
1115         * bindings/js/SerializedScriptValue.h:
1116         * bindings/js/WorkerScriptDebugServer.cpp:
1117         (WebCore::WorkerScriptDebugServer::interruptAndRunTask):
1118         * bindings/js/WorkerScriptDebugServer.h:
1119         * inspector/WorkerDebuggerAgent.cpp:
1120         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
1121
1122 2014-10-16  Roger Fong  <roger_fong@apple.com>
1123
1124         Calling glReadPixels with BGRA format on an NVIDIA machine with an opaque context returns the wrong alpha values.
1125         https://bugs.webkit.org/show_bug.cgi?id=137793.
1126         <rdar://problem/15408133>
1127
1128         Reviewed by Dean Jackson.
1129
1130         This fixes conformance test context/context-attribute-preserve-drawing-buffer.html.
1131
1132         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1133         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
1134         On an NVIDIA machine, when the context has alpha turned off, call glReadPixels with RGBA format and then convert to RGBA.
1135
1136 2014-10-17  Chris Dumez  <cdumez@apple.com>
1137
1138         Use is<>() / downcast<>() for all SVG RenderObjects
1139         https://bugs.webkit.org/show_bug.cgi?id=137840
1140
1141         Reviewed by Benjamin Poulain.
1142
1143         Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
1144         surrounding code.
1145
1146         No new tests, no behaviro change.
1147
1148         * accessibility/AccessibilityRenderObject.cpp:
1149         (WebCore::AccessibilityRenderObject::supportsPath):
1150         (WebCore::AccessibilityRenderObject::elementPath):
1151         * page/FrameView.cpp:
1152         (WebCore::FrameView::applyOverflowToViewport):
1153         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
1154         * rendering/RenderLayerFilterInfo.cpp:
1155         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
1156         * rendering/svg/RenderSVGGradientStop.cpp:
1157         (WebCore::RenderSVGGradientStop::styleDidChange):
1158         * rendering/svg/RenderSVGImage.h:
1159         * rendering/svg/RenderSVGInlineText.h:
1160         * rendering/svg/RenderSVGResourceContainer.cpp:
1161         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
1162         * rendering/svg/RenderSVGResourceContainer.h:
1163         * rendering/svg/RenderSVGRoot.cpp:
1164         (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
1165         * rendering/svg/RenderSVGRoot.h:
1166         * rendering/svg/RenderSVGShape.h:
1167         * rendering/svg/RenderSVGText.cpp:
1168         (WebCore::collectLayoutAttributes):
1169         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
1170         (WebCore::RenderSVGText::subtreeTextDidChange):
1171         (WebCore::updateFontInAllDescendants):
1172         * rendering/svg/RenderSVGText.h:
1173         * rendering/svg/SVGInlineTextBox.h:
1174         * rendering/svg/SVGRenderSupport.cpp:
1175         (WebCore::SVGRenderSupport::mapLocalToContainer):
1176         (WebCore::SVGRenderSupport::pushMappingToContainer):
1177         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
1178         * rendering/svg/SVGRenderTreeAsText.cpp:
1179         (WebCore::writeStyle):
1180         * rendering/svg/SVGRenderingContext.cpp:
1181         (WebCore::SVGRenderingContext::bufferForeground):
1182         * rendering/svg/SVGResourcesCycleSolver.cpp:
1183         (WebCore::SVGResourcesCycleSolver::resolveCycles):
1184         * rendering/svg/SVGRootInlineBox.cpp:
1185         (WebCore::SVGRootInlineBox::renderSVGText):
1186         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
1187         * svg/SVGCircleElement.cpp:
1188         (WebCore::SVGCircleElement::svgAttributeChanged):
1189         * svg/SVGElement.cpp:
1190         (WebCore::SVGElement::svgAttributeChanged):
1191         * svg/SVGEllipseElement.cpp:
1192         (WebCore::SVGEllipseElement::svgAttributeChanged):
1193         * svg/SVGImageElement.cpp:
1194         (WebCore::SVGImageElement::svgAttributeChanged):
1195         (WebCore::SVGImageElement::didAttachRenderers):
1196         * svg/SVGLineElement.cpp:
1197         (WebCore::SVGLineElement::svgAttributeChanged):
1198         * svg/SVGPolyElement.cpp:
1199         (WebCore::SVGPolyElement::svgAttributeChanged):
1200         * svg/SVGRectElement.cpp:
1201         (WebCore::SVGRectElement::svgAttributeChanged):
1202         * svg/SVGSVGElement.cpp:
1203         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
1204         (WebCore::SVGSVGElement::currentViewBoxRect):
1205         * svg/graphics/SVGImage.cpp:
1206         (WebCore::SVGImage::setContainerSize):
1207         (WebCore::SVGImage::containerSize):
1208
1209 2014-10-17  Chris Dumez  <cdumez@apple.com>
1210
1211         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
1212         https://bugs.webkit.org/show_bug.cgi?id=137836
1213
1214         Reviewed by Andreas Kling.
1215
1216         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
1217         This function is only called from WidthIterator::applyFontTransforms(),
1218         which already makes sure to call applyTransforms() if isSVGFont()
1219         returns false. This patch replaces the check with a simple assertion.
1220
1221         No new tests, no behavior change.
1222
1223         * platform/graphics/SimpleFontData.h:
1224         * svg/SVGFontData.h:
1225
1226 2014-10-17  Michael Saboff  <msaboff@apple.com>
1227
1228         Don't create cached functions that access lexicalGlobalObject()
1229         https://bugs.webkit.org/show_bug.cgi?id=137839
1230
1231         Reviewed by Geoffrey Garen.
1232
1233         Made it so that all the JSDOMWindow special functions blur(), close(), focus() and postMessage()
1234         are always created as needed for every prototype.  Made it so that JSHTMLDocument does
1235         the same for open().  Updated test to account for these methods not being cached
1236
1237         Updated tests accordingly.
1238
1239         * bindings/js/JSDOMWindowCustom.cpp: 
1240         (WebCore::JSDOMWindow::getOwnPropertySlot): Updated to always create cached versions of the
1241         special functions.
1242         * bindings/js/JSHTMLDocumentCustom.cpp:
1243         (WebCore::JSHTMLDocument::getOwnPropertySlot): Added to create an uncached open() method when
1244         it is first accessed.
1245         * html/HTMLDocument.idl: Added CustomGetOwnPropertySlot and implemented it in JSHTMLDocumentCustom.cpp.
1246
1247 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
1248
1249         [iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinatedLayer()
1250         https://bugs.webkit.org/show_bug.cgi?id=137837
1251         rdar://problem/18545452
1252
1253         Reviewed by Tim Horton.
1254
1255         Crash logs suggest that an iframe's RenderView's RenderLayer's backing can be null
1256         in a call to updateScrollCoordinatedLayer(), so add an assertion (to help find a reproducible case)
1257         and a null check.
1258
1259         * rendering/RenderLayerCompositor.cpp:
1260         (WebCore::RenderLayerCompositor::attachScrollingNode):
1261
1262 2014-10-17  Andreas Kling  <akling@apple.com>
1263
1264         Re-arrange parentheses for compilation purposes.
1265
1266         * cssjit/SelectorCompiler.cpp:
1267         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1268
1269 2014-10-17  Andreas Kling  <akling@apple.com>
1270
1271         Unreviewed build fix after r174838.
1272
1273         Use StackAllocator::addressOf() instead of the old way of grabbing at a stack reference.
1274
1275         * cssjit/SelectorCompiler.cpp:
1276         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1277
1278 2014-10-17  Chris Dumez  <cdumez@apple.com>
1279
1280         Use is<>() / downcast<>() for RenderBox
1281         https://bugs.webkit.org/show_bug.cgi?id=137804
1282
1283         Reviewed by Andreas Kling.
1284
1285         Use is<>() / downcast<>() for RenderBox and clean up the surrounding
1286         code.
1287
1288         No new tests, no behavior change.
1289
1290         * accessibility/AccessibilityRenderObject.cpp:
1291         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1292         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
1293         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
1294         (WebCore::AccessibilityRenderObject::scrollTo):
1295         * bindings/objc/DOMHTML.mm:
1296         (-[DOMHTMLElement scrollYOffset]):
1297         (-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
1298         * bindings/objc/DOMUIKitExtensions.mm:
1299         (-[DOMNode borderRadii]):
1300         * css/CSSComputedStyleDeclaration.cpp:
1301         (WebCore::sizingBox):
1302         (WebCore::computedTransform):
1303         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
1304         (WebCore::ComputedStyleExtractor::propertyValue):
1305         * dom/ContainerNode.cpp:
1306         (WebCore::ContainerNode::getLowerRightCorner):
1307         * dom/Document.cpp:
1308         (WebCore::Document::webkitWillEnterFullScreenForElement):
1309         * dom/Element.cpp:
1310         (WebCore::Element::scrollByUnits):
1311         * dom/Node.cpp:
1312         (WebCore::Node::defaultEventHandler):
1313         * dom/Position.cpp:
1314         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
1315         * editing/DeleteButtonController.cpp:
1316         (WebCore::isDeletableElement):
1317         * editing/EditorCommand.cpp:
1318         (WebCore::verticalScrollDistance):
1319         * editing/FrameSelection.cpp:
1320         (WebCore::CaretBase::paintCaret):
1321         * editing/TextIterator.cpp:
1322         (WebCore::fullyClipsContents):
1323         (WebCore::shouldEmitExtraNewlineForNode):
1324         * editing/htmlediting.cpp:
1325         (WebCore::absoluteBoundsForLocalCaretRect):
1326         * html/HTMLFormControlElement.cpp:
1327         (WebCore::HTMLFormControlElement::isFocusable):
1328         * html/HTMLPlugInImageElement.cpp:
1329         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
1330         * html/HTMLSelectElement.cpp:
1331         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1332         * html/shadow/SliderThumbElement.cpp:
1333         (WebCore::SliderThumbElement::setPositionFromPoint):
1334         * inspector/InspectorOverlay.cpp:
1335         (WebCore::buildObjectForElementInfo):
1336         * page/AutoscrollController.cpp:
1337         (WebCore::AutoscrollController::updateAutoscrollRenderer):
1338         * page/EventHandler.cpp:
1339         (WebCore::EventHandler::startPanScrolling):
1340         * page/FrameView.cpp:
1341         (WebCore::FrameView::embeddedContentBox):
1342         * page/GestureTapHighlighter.cpp:
1343         * page/SpatialNavigation.cpp:
1344         (WebCore::isScrollableNode):
1345         * page/animation/CSSPropertyAnimation.cpp:
1346         (WebCore::blendFunc):
1347         * platform/efl/RenderThemeEfl.cpp:
1348         (WebCore::RenderThemeEfl::baselinePosition):
1349         * plugins/PluginView.cpp:
1350         (WebCore::PluginView::invalidateWindowlessPluginRect):
1351         * rendering/InlineBox.cpp:
1352         (WebCore::InlineBox::logicalHeight):
1353         (WebCore::InlineBox::adjustPosition):
1354         * rendering/InlineElementBox.cpp:
1355         (WebCore::InlineElementBox::deleteLine):
1356         (WebCore::InlineElementBox::extractLine):
1357         (WebCore::InlineElementBox::attachLine):
1358         (WebCore::InlineElementBox::paint):
1359         (WebCore::InlineElementBox::nodeAtPoint):
1360         * rendering/InlineFlowBox.cpp:
1361         (WebCore::InlineFlowBox::addToLine):
1362         (WebCore::InlineFlowBox::addReplacedChildOverflow):
1363         * rendering/LayoutState.cpp:
1364         (WebCore::LayoutState::LayoutState):
1365         * rendering/RenderBlock.cpp:
1366         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
1367         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
1368         (WebCore::RenderBlock::clearPercentHeightDescendantsFrom):
1369         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
1370         (WebCore::RenderBlock::addFocusRingRects):
1371         * rendering/RenderBlockFlow.cpp:
1372         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
1373         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
1374         * rendering/RenderBlockLineLayout.cpp:
1375         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
1376         (WebCore::RenderBlockFlow::layoutLineBoxes):
1377         * rendering/RenderBox.cpp:
1378         (WebCore::RenderBox::findAutoscrollable):
1379         (WebCore::computeBlockStaticDistance):
1380         (WebCore::RenderBox::positionForPoint):
1381         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1382         * rendering/RenderBox.h:
1383         (WebCore::RenderBox::previousSiblingBox):
1384         (WebCore::RenderBox::nextSiblingBox):
1385         (WebCore::RenderBox::parentBox):
1386         (WebCore::RenderBox::firstChildBox):
1387         (WebCore::RenderBox::lastChildBox):
1388         * rendering/RenderBoxModelObject.cpp:
1389         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1390         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
1391         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
1392         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1393         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1394         * rendering/RenderElement.cpp:
1395         (WebCore::RenderElement::removeChildInternal):
1396         (WebCore::RenderElement::styleWillChange):
1397         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
1398         * rendering/RenderEmbeddedObject.cpp:
1399         (WebCore::RenderEmbeddedObject::layout):
1400         * rendering/RenderFieldset.cpp:
1401         (WebCore::RenderFieldset::findLegend):
1402         * rendering/RenderFlowThread.cpp:
1403         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1404         (WebCore::RenderFlowThread::currentActiveRenderBox):
1405         * rendering/RenderFlowThread.h:
1406         * rendering/RenderFullScreen.cpp:
1407         (WebCore::RenderFullScreen::unwrapRenderer):
1408         * rendering/RenderImage.cpp:
1409         (WebCore::RenderImage::layoutShadowControls):
1410         (WebCore::RenderImage::computeIntrinsicRatioInformation):
1411         * rendering/RenderInline.cpp:
1412         (WebCore::RenderInline::absoluteRects):
1413         (WebCore::RenderInline::addFocusRingRects):
1414         * rendering/RenderLayer.cpp:
1415         (WebCore::RenderLayer::updateLayerPosition):
1416         (WebCore::RenderLayer::perspectiveTransform):
1417         (WebCore::RenderLayer::perspectiveOrigin):
1418         (WebCore::parentLayerCrossFrame):
1419         (WebCore::RenderLayer::enclosingScrollableLayer):
1420         (WebCore::RenderLayer::resize):
1421         (WebCore::RenderLayer::scrollsOverflow):
1422         (WebCore::computeReferenceBox):
1423         (WebCore::RenderLayer::calculateClipRects):
1424         * rendering/RenderLayer.h:
1425         * rendering/RenderLayerBacking.cpp:
1426         (WebCore::RenderLayerBacking::updateTransform):
1427         (WebCore::RenderLayerBacking::updateGeometry):
1428         (WebCore::RenderLayerBacking::resetContentsRect):
1429         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
1430         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
1431         (WebCore::RenderLayerBacking::contentsBox):
1432         (WebCore::RenderLayerBacking::backgroundBoxForPainting):
1433         (WebCore::RenderLayerBacking::startAnimation):
1434         (WebCore::RenderLayerBacking::startTransition):
1435         * rendering/RenderLineBoxList.cpp:
1436         (WebCore::RenderLineBoxList::rangeIntersectsRect):
1437         * rendering/RenderMediaControlElements.cpp:
1438         (WebCore::RenderMediaVolumeSliderContainer::layout):
1439         * rendering/RenderMultiColumnFlowThread.cpp:
1440         (WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
1441         (WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
1442         (WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
1443         (WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
1444         (WebCore::isValidColumnSpanner):
1445         (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
1446         * rendering/RenderNamedFlowThread.cpp:
1447         (WebCore::RenderNamedFlowThread::getRanges):
1448         * rendering/RenderObject.cpp:
1449         (WebCore::RenderObject::computeRectForRepaint):
1450         (WebCore::RenderObject::showRegionsInformation):
1451         (WebCore::RenderObject::showRenderObject):
1452         (WebCore::RenderObject::mapLocalToContainer):
1453         (WebCore::RenderObject::pushMappingToContainer):
1454         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
1455         (WebCore::RenderObject::addAnnotatedRegions):
1456         * rendering/RenderTable.cpp:
1457         (WebCore::RenderTable::nodeAtPoint):
1458         * rendering/RenderTextControlMultiLine.cpp:
1459         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
1460         * rendering/RenderTheme.cpp:
1461         (WebCore::RenderTheme::baselinePosition):
1462         * rendering/RenderThemeGtk.cpp:
1463         (WebCore::RenderThemeGtk::baselinePosition):
1464         (WebCore::centerRectVerticallyInParentInputElement):
1465         * rendering/RenderThemeIOS.mm:
1466         (WebCore::RenderThemeIOS::baselinePosition):
1467         * rendering/RenderThemeSafari.cpp:
1468         (WebCore::RenderThemeSafari::baselinePosition):
1469         * rendering/RenderThemeWin.cpp:
1470         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
1471         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
1472         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
1473         * rendering/RenderTreeAsText.cpp:
1474         (WebCore::RenderTreeAsText::writeRenderObject):
1475         (WebCore::externalRepresentation):
1476         * rendering/RenderView.cpp:
1477         (WebCore::RenderView::paintBoxDecorations):
1478         * rendering/RootInlineBox.cpp:
1479         (WebCore::RootInlineBox::setLineBreakInfo):
1480         * rendering/line/BreakingContextInlineHeaders.h:
1481         (WebCore::BreakingContext::handleOutOfFlowPositioned):
1482         (WebCore::BreakingContext::handleFloat):
1483         (WebCore::BreakingContext::handleReplaced):
1484         * rendering/line/LineBreaker.cpp:
1485         (WebCore::LineBreaker::skipTrailingWhitespace):
1486         (WebCore::LineBreaker::skipLeadingWhitespace):
1487         * rendering/mathml/RenderMathMLUnderOver.cpp:
1488         (WebCore::RenderMathMLUnderOver::layout):
1489         * svg/graphics/SVGImage.cpp:
1490         (WebCore::SVGImage::embeddedContentBox):
1491
1492 2014-10-17  Andreas Kling  <akling@apple.com>
1493
1494         Get rid of wrapperContext() in DOM bindings.
1495         <https://webkit.org/b/137834>
1496
1497         Reviewed by Chris Dumez.
1498
1499         The "wrapper context" is always the DOMWrapperWorld, and since we're passing that around
1500         already, we don't need a separate mechanism to get at the context.
1501
1502         The context is extra data stored in the DOM object's JSC::Weak (the wrapper GC object.)
1503
1504         * bindings/js/JSDOMBinding.h:
1505         (WebCore::setInlineCachedWrapper):
1506         (WebCore::cacheWrapper):
1507         (WebCore::wrapperContext): Deleted.
1508         * bindings/scripts/CodeGeneratorJS.pm:
1509         (GenerateHeader):
1510
1511 2014-10-17  Benjamin Poulain  <benjamin@webkit.org>
1512
1513         Make a better use of the available registers when compiling nested selector lists
1514         https://bugs.webkit.org/show_bug.cgi?id=137802
1515
1516         Reviewed by Andreas Kling.
1517
1518         Previously, when compiling a nested selector list, the compiler would start by pushing all
1519         the allocated registers to the stack to free them for the compiled selector list.
1520         While neat to ensure register allocation is correct, this is very inefficient.
1521
1522         This patch brings the first step for reducing the overhead. Instead of pushing everything
1523         to the stack, we just push as many registers as we need for compiling the selector list.
1524
1525         In most cases, we have so many registers that we don't even need to push anything to the stack.
1526
1527         Test: fast/selectors/nth-child-of-register-requirement.html
1528
1529         * cssjit/SelectorCompiler.cpp:
1530         Add an explicit type for SelectorList to keep information aggregated from all
1531         SelectorFragmentList inside it.
1532
1533         SelectorFragmentList is also extended to include its register and stack requirements.
1534         This information is then used to create a SelectorList and to compile the SelectorFragmentList.
1535
1536         (WebCore::SelectorCompiler::hasAnyCombinators):
1537         We only change the elementAddressRegister when moving over combinators. This is used to detect
1538         if a selector list clobber the elementAddressRegister or leave it untouched.
1539
1540         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
1541         (WebCore::SelectorCompiler::computeBacktrackingInformation):
1542         Instead of returning a BacktrackingMemoryRequirements, update the SelectorFragmentList and SelectorList directly.
1543
1544         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1545         This is where the fun happen.
1546         First step is keep the input untouched. For now it is simply pushed on the stack. This can be improved later.
1547
1548         Then we find how many allocated registers we need to save to compile the input selector list. We push those registers
1549         to the stack and give them back to the register allocator.
1550
1551         With enough registers we can now compile the nested selector list. The code has changed a bit for efficiency. Instead
1552         of creating a shortcut for success case, the code now exit on error and proceed on success. This is the general pattern
1553         of SelectorCompiler and it is quite a bit more efficient in the common cases.
1554
1555         Finally, we reallocate the registers and get their values back from the stack. The "tail" is duplicated but that's fine
1556         because in the vast majority of cases it is 1 or 2 pop.
1557
1558         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1559         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
1560         * cssjit/StackAllocator.h:
1561         (WebCore::StackAllocator::push):
1562
1563 2014-10-17  Chris Dumez  <cdumez@apple.com>
1564
1565         Use is<>() / downcast<>() for StyleImage
1566         https://bugs.webkit.org/show_bug.cgi?id=137824
1567
1568         Reviewed by Andreas Kling.
1569
1570         Use is<>() / downcast<>() for StyleImage and clean up the surrouding
1571         code.
1572
1573         No new tests, no behavior change.
1574
1575         * css/CSSCursorImageValue.cpp:
1576         (WebCore::CSSCursorImageValue::detachPendingImage):
1577         (WebCore::CSSCursorImageValue::cachedImage):
1578         (WebCore::CSSCursorImageValue::cachedImageURL):
1579         * css/CSSImageSetValue.cpp:
1580         (WebCore::CSSImageSetValue::detachPendingImage):
1581         (WebCore::CSSImageSetValue::~CSSImageSetValue):
1582         (WebCore::CSSImageSetValue::cachedImageSet):
1583         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
1584         * css/CSSImageValue.cpp:
1585         (WebCore::CSSImageValue::detachPendingImage):
1586         (WebCore::CSSImageValue::cachedImage):
1587         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
1588         * css/StyleResolver.cpp:
1589         (WebCore::StyleResolver::loadPendingShapeImage):
1590         (WebCore::StyleResolver::loadPendingImages):
1591         * page/PageSerializer.cpp:
1592         (WebCore::PageSerializer::retrieveResourcesForProperties):
1593         * page/animation/CSSPropertyAnimation.cpp:
1594         (WebCore::blendFunc):
1595         * rendering/style/StyleCachedImage.h:
1596         * rendering/style/StyleCachedImageSet.h:
1597         * rendering/style/StyleGeneratedImage.h:
1598         * rendering/style/StyleImage.h:
1599         * rendering/style/StylePendingImage.h:
1600
1601 2014-10-17  Dean Jackson  <dino@apple.com>
1602
1603         [Media] Always update controls for <audio> since they are always visible
1604         https://bugs.webkit.org/show_bug.cgi?id=137829
1605         <rdar://problem/18693987>
1606
1607         Reviewed by Brent Fulgham.
1608
1609         Revision 174756 made a change to only update the display of the controls
1610         while they are visible. However, <audio> elements didn't detect visibility
1611         the same way, since their controls do not auto-hide.
1612
1613         Change controlsAreHidden to check if we're an audio element.
1614
1615         * Modules/mediacontrols/mediaControlsApple.js:
1616         (Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.
1617
1618 2014-10-17  peavo@outlook.com  <peavo@outlook.com>
1619
1620         [WinCairo] Accelerated compositing is not implemented.
1621         https://bugs.webkit.org/show_bug.cgi?id=137345
1622
1623         Reviewed by Brent Fulgham.
1624
1625         This patch is based on GTK, and the texture mapper graphics layer type.
1626
1627         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
1628         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
1629         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
1630         (WebCore::GraphicsLayerTextureMapper::addAnimation):
1631         * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
1632         (WebCore::GraphicsLayerTextureMapper::startedAnimation):
1633         * platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
1634         Otherwise glLinkProgram() will fail, and nothing will be rendered.
1635
1636 2014-10-17  Alexey Proskuryakov  <ap@apple.com>
1637
1638         [iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
1639         https://bugs.webkit.org/show_bug.cgi?id=137826
1640         rdar://problem/17329599
1641
1642         Reviewed by Brady Eidson.
1643
1644         No new tests, as we don't have a way to simulate details of user interaction with
1645         an auth dialog.
1646
1647         * platform/network/cf/ResourceHandleCFNet.cpp:
1648         (WebCore::ResourceHandle::receivedCredential):
1649         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
1650         (WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling):
1651         (WebCore::ResourceHandle::receivedChallengeRejection):
1652         Added null checks before passing m_connection for CFNetwork functions, making this
1653         match what Mac code does when sending a message to a nil receiver.
1654
1655 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
1656
1657         Fix the iOS build.
1658
1659         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
1660         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):
1661
1662 2014-10-16  Jer Noble  <jer.noble@apple.com>
1663
1664         [Mac] Represent AVMediaSelectionOptions as AudioTracks
1665         https://bugs.webkit.org/show_bug.cgi?id=137474
1666
1667         Reviewed by Brent Fulgham.
1668
1669         Test: http/tests/media/hls/hls-audio-tracks.html
1670
1671         Support selecting audio "tracks" in HLS streams by exposing AVMediaSelectionOptions
1672         as entries in the video's AudioTrackList.
1673
1674         AVMediaSessionGroups and AVPlayerItems don't have KVO or notifications to track when options
1675         are selected and deselected, so wrap AVMediaSessionGroup and AVMediaSessionOption in C++
1676         wrappers. Each AVMediaSelectionGroup can have only one AVMediaSelectionOption selected at a
1677         time, so the wrapper will take care of answering which AVMediaSelectionOption is currently
1678         selected, as without KVO notifications, asking the AVMediaSelectionGroup directly is
1679         inconsistent. Because setting the selected option multiple times in the same run-loop can
1680         cause flakiness, coalesce calls to setSelectedOption() by setting a one-shot timer to do
1681         the actual selection in the next run-loop.
1682
1683         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Added.
1684         (WebCore::MediaSelectionOptionAVFObjC::avMediaSelectionOption):
1685         (WebCore::MediaSelectionOptionAVFObjC::clearGroup): Clear backpointer to group from option.
1686         (WebCore::MediaSelectionGroupAVFObjC::selectedOption): Simple accessor.
1687         (WebCore::MediaSelectionGroupAVFObjC::options):  Simple accessor.
1688         (WebCore::MediaSelectionGroupAVFObjC::avMediaSelectionGroup): Simple accessor.
1689         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: Added.
1690         (WebCore::MediaSelectionOptionAVFObjC::create): Simple factory method.
1691         (WebCore::MediaSelectionOptionAVFObjC::MediaSelectionOptionAVFObjC): Simple constructor.
1692         (WebCore::MediaSelectionOptionAVFObjC::setSelected): Pass through to MediaSelectionGroupAVFObjC.
1693         (WebCore::MediaSelectionOptionAVFObjC::selected): Ditto.
1694         (WebCore::MediaSelectionOptionAVFObjC::index): Return index of this object in the group's object.
1695         (WebCore::MediaSelectionGroupAVFObjC::create):
1696         (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
1697         (WebCore::MediaSelectionGroupAVFObjC::~MediaSelectionGroupAVFObjC):
1698         (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Discover added or removed options.
1699         (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set a one shot timer to coalesce multiple calls.
1700         (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): Set the selected AVSelectionOption.
1701
1702         Modify AVTrackPrivateAVFObjCImpl to support both AVPlayerItemTracks and these new
1703         MediaSelectionOptionAVFObjC objects.
1704
1705         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
1706         (WebCore::AVTrackPrivateAVFObjCImpl::mediaSelectionOption): Simple accessor.
1707         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
1708         (WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):  Simple constructor.
1709         (WebCore::AVTrackPrivateAVFObjCImpl::~AVTrackPrivateAVFObjCImpl): Simple destructor.
1710         (WebCore::AVTrackPrivateAVFObjCImpl::enabled): Use MediaSelectionOptionAVFObjC, if present.
1711         (WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
1712         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Ditto.
1713         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Ditto.
1714         (WebCore::AVTrackPrivateAVFObjCImpl::index): Ditto.
1715         (WebCore::AVTrackPrivateAVFObjCImpl::id): Ditto.
1716         (WebCore::AVTrackPrivateAVFObjCImpl::label): Ditto.
1717         (WebCore::AVTrackPrivateAVFObjCImpl::language): Ditto.
1718         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption): Ditto.
1719         (WebCore::AVTrackPrivateAVFObjCImpl::trackID): Ditto.
1720
1721         Allow AudioTrackPrivateAVFObjC and VideoTrackPrivateAVFObjC to be created with
1722         a MediaSelectionOptionAVFObjC.
1723
1724         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
1725         (WebCore::AudioTrackPrivateAVFObjC::create): Takes a MediaSelectionOptionAVFObjC.
1726         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
1727         (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Simple constructor.
1728         (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): Create a new AVTrackPrivateAVFObjCImpl.
1729         (WebCore::AudioTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
1730         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
1731         (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Simple constructor.
1732         (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): Create a new AVTrackPrivateAVFObjCImpl.
1733         (WebCore::VideoTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
1734         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
1735
1736         Because IDs are not necessarily unique across AVPlayerItemTracks and AVMediaSelectionOptions,
1737         use the index of the track or option instead of it's self-declared ID for ordering for the
1738         trackIndex.
1739
1740         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
1741         (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
1742         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
1743         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
1744
1745         Rather than making allowing the AVPlayerItem to automatically select the "best"
1746         AVMediaSelectionOption, select the automatic options when creating the AVPlayerItem
1747         and thereafter allow the users manual selections "stick".
1748
1749         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1750         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1751         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayer):
1752         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerItem):
1753
1754         Determine whether any MediaSelectionOptionsAVFObjC have been added or removed and send trackChange events accordingly.
1755
1756         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1757         (WebCore::determineChangedTracksFromNewTracksAndOldItems): Added.
1758         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Search for updated selection options.
1759         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
1760         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Return selection group, if available.
1761         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
1762         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Filter out AVPlayerItemTracks without
1763             AVAssetTracks, as these will be represented by MediaSelectionGroupObjCs instead.
1764         
1765         Add new files to project.
1766         * WebCore.xcodeproj/project.pbxproj:
1767
1768 2014-10-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1769
1770         [EFL] window.screen.width returns wrong value if more displays are available
1771         https://bugs.webkit.org/show_bug.cgi?id=137778
1772
1773         Reviewed by Gyuyoung Kim.
1774
1775         ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
1776         having two displays of 1680x1050, it will return 3360x1050.
1777
1778         Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.
1779
1780         No new tests. Hardware specific bug including multiple displays.
1781
1782         * platform/efl/PlatformScreenEfl.cpp:
1783         (WebCore::screenRect):
1784         Use ecore's xrandr to determine the screen on which browser window is displayed.
1785
1786 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1787
1788         [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
1789         https://bugs.webkit.org/show_bug.cgi?id=137782
1790
1791         Reviewed by Sergio Villar Senin.
1792
1793         * platform/gtk/SharedTimerGtk.cpp:
1794         (WebCore::setSharedTimerFireInterval): Use microseconds instead of
1795         milliseconds.
1796
1797 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1798
1799         [GTK] Move touch events handling from Platform to WebKit2
1800         https://bugs.webkit.org/show_bug.cgi?id=137735
1801
1802         Reviewed by Sergio Villar Senin.
1803
1804         Remove GtkTouchContextHelper.
1805
1806         * PlatformGTK.cmake:
1807         * platform/gtk/GtkTouchContextHelper.cpp: Removed.
1808         * platform/gtk/GtkTouchContextHelper.h: Removed.
1809
1810 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1811
1812         Remove unused function in WorkerThreadableLoader.h 
1813         https://bugs.webkit.org/show_bug.cgi?id=137811
1814
1815         Reviewed by Csaba Osztrogon√°c.
1816
1817         mainThreadCreateLoader() isn't used anywhere. Even there is no implementation.
1818
1819         * loader/WorkerThreadableLoader.h:
1820
1821 2014-10-15  Yusuke Suzuki  <utatane.tea@gmail.com>
1822
1823         CSS Selectors Level 4: Implement :matches in SelectorChecker
1824         https://bugs.webkit.org/show_bug.cgi?id=137393
1825
1826         Reviewed by Benjamin Poulain.
1827
1828         In this patch, we introduce initial :matches implementation.
1829         In this current implementation, we don't consider pseudo elements.
1830
1831         Test: fast/selectors/querySelector-matches.html
1832
1833         * css/SelectorChecker.cpp:
1834         (WebCore::SelectorChecker::checkOne):
1835
1836 2014-10-16  Yusuke Suzuki  <utatane.tea@gmail.com>
1837
1838         CSS JIT: Introduce StackAllocator::addressOf
1839         https://bugs.webkit.org/show_bug.cgi?id=137771
1840
1841         Reviewed by Benjamin Poulain.
1842
1843         Introduce StackAllocator::addressOf and drop offsetToStackReference, it's too primitive.
1844
1845         * cssjit/SelectorCompiler.cpp:
1846         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1847         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
1848         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1849         (WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
1850         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
1851         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
1852         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
1853         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
1854         * cssjit/StackAllocator.h:
1855         (WebCore::StackAllocator::addressOf):
1856         (WebCore::StackAllocator::offsetToStackReference):
1857
1858 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
1859
1860         REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website
1861         https://bugs.webkit.org/show_bug.cgi?id=137679
1862         rdar://problem/18450335
1863
1864         Reviewed by Enrica Casucci.
1865
1866         Test: platform/mac/editing/input/selected-composed-text-painting.html
1867
1868         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): We do not paint
1869         selection beckground for unconfirmed text with underlines, so we should use a regular
1870         style for text painting, as well.
1871
1872 2014-10-16  Chris Dumez  <cdumez@apple.com>
1873
1874         Use is<>() / downcast<>() for BasicShape subclasses
1875         https://bugs.webkit.org/show_bug.cgi?id=137766
1876
1877         Reviewed by Andreas Kling.
1878
1879         Use is<>() / downcast<>() for BasicShape subclasses and clean up the
1880         surrounding code.
1881
1882         No new tests, no behavior change.
1883
1884         * css/BasicShapeFunctions.cpp:
1885         (WebCore::valueForBasicShape):
1886         (WebCore::basicShapeForValue):
1887         * css/BasicShapeFunctions.h:
1888         * css/CSSComputedStyleDeclaration.cpp:
1889         (WebCore::shapePropertyValue):
1890         * page/animation/CSSPropertyAnimation.cpp:
1891         (WebCore::blendFunc):
1892         * rendering/ClipPathOperation.h:
1893         (WebCore::ShapeClipPathOperation::create):
1894         Take a PassRef<BasicShape> in argument to make it obvious it is never
1895         null.
1896
1897         (WebCore::ShapeClipPathOperation::basicShape):
1898         Return a reference instead of a pointer as it can never return null.
1899
1900         (WebCore::ShapeClipPathOperation::windRule):
1901         (WebCore::ShapeClipPathOperation::pathForReferenceRect):
1902         Make it non-const due to the const-correctness of Ref::get().
1903
1904         (WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
1905         * rendering/RenderBlock.cpp:
1906         (WebCore::RenderBlock::nodeAtPoint):
1907         * rendering/RenderLayer.cpp:
1908         (WebCore::RenderLayer::setupClipPath):
1909         * rendering/shapes/Shape.cpp:
1910         (WebCore::Shape::createShape):
1911         * rendering/shapes/Shape.h:
1912         * rendering/shapes/ShapeOutsideInfo.cpp:
1913         (WebCore::ShapeOutsideInfo::computedShape):
1914         * rendering/style/BasicShapes.cpp:
1915         (WebCore::BasicShape::canBlend):
1916         (WebCore::BasicShapeCircle::blend):
1917         (WebCore::BasicShapeEllipse::blend):
1918         (WebCore::BasicShapePolygon::blend):
1919         (WebCore::BasicShapeInset::blend):
1920         * rendering/style/BasicShapes.h:
1921         * rendering/svg/SVGRenderingContext.cpp:
1922         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1923
1924 2014-10-16  Chris Dumez  <cdumez@apple.com>
1925
1926         Leverage the new RenderElement::m_isCSSAnimating flag in more places
1927         https://bugs.webkit.org/show_bug.cgi?id=137786
1928
1929         Reviewed by Simon Fraser.
1930
1931         Leverage the new RenderElement::m_isCSSAnimating flag that was introduced
1932         in r174703 in more places, for performance. This avoids doing extra work
1933         for renderers on which we are not running animations on. This patch also
1934         updates the API a bit to use more references instead of pointers, making
1935         it clear the RenderElement cannot be null and thus avoiding unnecessary
1936         null checks.
1937
1938         No new tests, no behavior change.
1939
1940         * css/CSSComputedStyleDeclaration.cpp:
1941         (WebCore::computeRenderStyleForProperty):
1942         * page/animation/AnimationController.cpp:
1943         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
1944         (WebCore::AnimationControllerPrivate::clear):
1945         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
1946         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
1947         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
1948         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
1949         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
1950         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
1951         (WebCore::AnimationController::cancelAnimations):
1952         (WebCore::AnimationController::updateAnimations):
1953         (WebCore::AnimationController::getAnimatedStyleForRenderer):
1954         (WebCore::AnimationController::notifyAnimationStarted):
1955         (WebCore::AnimationController::isRunningAnimationOnRenderer):
1956         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
1957         * page/animation/AnimationController.h:
1958         * page/animation/AnimationControllerPrivate.h:
1959         * rendering/RenderElement.cpp:
1960         (WebCore::RenderElement::willBeDestroyed):
1961         * rendering/RenderLayer.cpp:
1962         (WebCore::RenderLayer::currentTransform):
1963         * rendering/RenderLayerBacking.cpp:
1964         (WebCore::RenderLayerBacking::updateGeometry):
1965         (WebCore::RenderLayerBacking::notifyAnimationStarted):
1966         * rendering/RenderLayerCompositor.cpp:
1967         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1968         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
1969
1970 2014-10-16  Adrien Destugues  <pulkomandy@gmail.com>
1971
1972         Missing RefPtr.release() calls in TextureMapper
1973         https://bugs.webkit.org/show_bug.cgi?id=137777
1974
1975         Reviewed by Chris Dumez.
1976
1977         No new tests: no functional change, cleanup/optimization.
1978
1979         Avoids useless ref/deref cycle when returning from functions.
1980
1981         * platform/graphics/texmap/TextureMapper.cpp:
1982         (WebCore::TextureMapper::acquireTextureFromPool):
1983         * platform/graphics/texmap/TextureMapperLayer.cpp:
1984         (WebCore::TextureMapperLayer::paintIntoSurface):
1985
1986 2014-10-16  Chris Dumez  <cdumez@apple.com>
1987
1988         Use is<>() / downcast<>() for ContentData subclasses
1989         https://bugs.webkit.org/show_bug.cgi?id=137768
1990
1991         Reviewed by Andreas Kling.
1992
1993         Use is<>() / downcast<>() for ContentData subclasses.
1994
1995         No new tests, no behavior change.
1996
1997         * css/CSSComputedStyleDeclaration.cpp:
1998         (WebCore::contentToCSSValue):
1999         * css/StyleResolver.cpp:
2000         (WebCore::StyleResolver::loadPendingImages):
2001         * rendering/RenderElement.cpp:
2002         (WebCore::RenderElement::createFor):
2003         * rendering/style/ContentData.h:
2004         (WebCore::operator==):
2005         * rendering/style/RenderStyle.cpp:
2006         (WebCore::RenderStyle::setContent):
2007
2008 2014-10-16  Commit Queue  <commit-queue@webkit.org>
2009
2010         Unreviewed, rolling out r174744.
2011         https://bugs.webkit.org/show_bug.cgi?id=137790
2012
2013         Caused another WebGL conformance test to fail (Requested by
2014         rfong on #webkit).
2015
2016         Reverted changeset:
2017
2018         "glReadPixels on NVIDIA cards returns the wrong values for the
2019         alpha channel when alpha is off."
2020         https://bugs.webkit.org/show_bug.cgi?id=137752
2021         http://trac.webkit.org/changeset/174744
2022
2023 2014-10-16  Tim Horton  <timothy_horton@apple.com>
2024
2025         Implement selection services menu for Legacy WebKit
2026         https://bugs.webkit.org/show_bug.cgi?id=137582
2027         <rdar://problem/18604241>
2028
2029         Reviewed by Brady Eidson.
2030
2031         * WebCore.exp.in:
2032         * editing/Editor.h:
2033         * editing/ios/EditorIOS.mm:
2034         (WebCore::Editor::replaceSelectionWithAttributedString):
2035         * editing/mac/EditorMac.mm:
2036         (WebCore::Editor::replaceSelectionWithAttributedString):
2037         Add replaceSelectionWithAttributedString, which replaces the selection
2038         with the given attributed string (converting to plain text if the destination
2039         is not richly editable).
2040
2041 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
2042
2043         Crashes in ResourceHandleCFURLConnectionDelegateWithOperationQueue due to unimplemented retain/release
2044         https://bugs.webkit.org/show_bug.cgi?id=137779
2045         rdar://problem/18679320
2046
2047         Reviewed by Brady Eidson.
2048
2049         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
2050         (WebCore::ResourceHandleCFURLConnectionDelegate::retain):
2051         (WebCore::ResourceHandleCFURLConnectionDelegate::release):
2052         (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
2053         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
2054         Implemented retain/release. They are necessary, as ResourceHandle goes away when
2055         it's canceled, and there is noone else to keep the client object alive but
2056         CFURLConnection itself.
2057
2058         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
2059         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
2060         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
2061         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
2062         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
2063         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
2064         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
2065         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
2066         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
2067         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
2068         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
2069         Added a FIXME about potential improvements that I spotted while invsestigating this.
2070
2071 2014-10-15  Andrei Bucur  <abucur@adobe.com>
2072
2073         ASSERTION  FAILED in WebCore::RenderFlowThread::getRegionRangeForBox
2074         https://bugs.webkit.org/show_bug.cgi?id=135563
2075
2076         Reviewed by David Hyatt.
2077
2078         The new multi-column code doesn't work correctly when the document contains nested fragmentation
2079         contexts. The problem is the current flow thread concept that can store only one RenderFlowThread
2080         at a time and use it during layout.
2081
2082         The stored flow thread is always correct for regions because named flow threads are absolutley positioned
2083         so every child renderer is contained inside them (with the expcetion of fixed positioned elements which are
2084         treated separately).
2085
2086         For multi-column elements this is no longer the case. An absolutely positioned element inside a static
2087         multi-column element will be contained by a block outside the fragmentation context. It can even be
2088         contained by a different multi-column element in the case of nested flow threads.
2089
2090         The patch below explores a solution that's not based on a current flow thread stored globally. The proposed
2091         patch makes every block to store a pointer to its fragmentation context and a flag that states if this pointer
2092         needs to be updated or not. If the renderer is not a block it will get its flow thread from the containing
2093         block. Once the containing flow thread is requested for the block, the pointer is computed and cached until
2094         invalidated:
2095         - when a subtree is removed from a flow thread
2096         - when the position property of an element inside a flow thread changes
2097
2098         The process is recursive and it doesn't affect elements that are not nested inside a flow thread. If a block
2099         changes position from relative to static, any element that was contained by it can only be contained by an
2100         ancestor of the block. This ancestor will still be outside of any flow thread. This ensures that non-fragmentation
2101         code is not affected from a performance perspective.
2102
2103         The patch affects the results of the performance tests:
2104         - the regions layout tests have a decreased performance raging from 2% to 5-6%
2105         - the regions selection tests have an increased performance raging from 1-2% to 10%
2106         - the multicolumn layout tests (now pending review in b137687) have an increased performance
2107         raging from 1.8% to 5%
2108
2109         Tests: fast/multicol/multicol-all-positioned-crash.html
2110                fast/multicol/multicol-transform-containing-block.html
2111
2112         * rendering/FlowThreadController.cpp:
2113         (WebCore::FlowThreadController::FlowThreadController):
2114         * rendering/FlowThreadController.h:
2115         (WebCore::FlowThreadController::currentRenderFlowThread): Deleted.
2116         (WebCore::FlowThreadController::setCurrentRenderFlowThread): Deleted.
2117         * rendering/LayoutState.h:
2118         (WebCore::LayoutState::currentRenderFlowThread):
2119         (WebCore::LayoutState::setCurrentRenderFlowThread):
2120         * rendering/RenderBlock.cpp:
2121         (WebCore::RenderBlockRareData::RenderBlockRareData):
2122         (WebCore::RenderBlock::styleWillChange):
2123         (WebCore::RenderBlock::styleDidChange):
2124         (WebCore::RenderBlock::collapseAnonymousBoxChild):
2125         (WebCore::RenderBlock::cachedFlowThreadContainingBlock):
2126         (WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate):
2127         (WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
2128         (WebCore::RenderBlock::updateCachedFlowThreadContainingBlock):
2129         (WebCore::RenderBlock::locateFlowThreadContainingBlock):
2130         * rendering/RenderBlock.h:
2131         * rendering/RenderBlockFlow.cpp:
2132         (WebCore::RenderBlockFlow::styleWillChange):
2133         * rendering/RenderBox.cpp:
2134         (WebCore::RenderBox::borderBoxRectInRegion):
2135         * rendering/RenderFlowThread.cpp:
2136         (WebCore::RenderFlowThread::layout):
2137         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
2138         (WebCore::RenderFlowThread::repaintRectangleInRegions):
2139         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): Deleted.
2140         (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): Deleted.
2141         (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler): Deleted.
2142         (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler): Deleted.
2143         * rendering/RenderFlowThread.h:
2144         * rendering/RenderLayer.cpp:
2145         (WebCore::RenderLayer::paintLayer):
2146         (WebCore::RenderLayer::hitTestLayer):
2147         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
2148         (WebCore::RenderLayer::calculateClipRects):
2149         * rendering/RenderObject.cpp:
2150         (WebCore::RenderObject::showRegionsInformation):
2151         (WebCore::RenderObject::insertedIntoTree):
2152         (WebCore::RenderObject::removeFromRenderFlowThread):
2153         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
2154         (WebCore::RenderObject::invalidateFlowThreadContainingBlockIncludingDescendants):
2155         (WebCore::RenderObject::currentRenderNamedFlowFragment):
2156         (WebCore::RenderObject::locateFlowThreadContainingBlock):
2157         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache): Deleted.
2158         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Deleted.
2159         * rendering/RenderObject.h:
2160         (WebCore::RenderObject::flowThreadContainingBlock):
2161         * rendering/RenderRegion.cpp:
2162         (WebCore::RenderRegion::computeOverflowFromFlowThread):
2163         * rendering/RenderView.cpp:
2164         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
2165         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
2166         * rendering/RenderView.h:
2167
2168 2014-10-15  Chris Dumez  <cdumez@apple.com>
2169
2170         Use is<>() / downcast<>() for list-related render objects
2171         https://bugs.webkit.org/show_bug.cgi?id=137764
2172
2173         Reviewed by Benjamin Poulain.
2174
2175         Use is<>() / downcast<>() for list-related render objects and clean up
2176         the surrounding code.
2177
2178         No new tests, no behavior change.
2179
2180         * accessibility/AccessibilityListBox.cpp:
2181         (WebCore::AccessibilityListBox::visibleChildren):
2182         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
2183         * accessibility/AccessibilityListBoxOption.cpp:
2184         (WebCore::AccessibilityListBoxOption::elementRect):
2185         * accessibility/AccessibilityObject.cpp:
2186         (WebCore::renderListItemContainerForNode):
2187         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2188         (getRangeLengthForObject):
2189         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2190         (accessibilityObjectLength):
2191         (offsetAdjustmentForListItem):
2192         (webkitAccessibleTextGetText):
2193         * editing/BreakBlockquoteCommand.cpp:
2194         (WebCore::BreakBlockquoteCommand::doApply):
2195         * html/HTMLLIElement.cpp:
2196         (WebCore::HTMLLIElement::didAttachRenderers):
2197         (WebCore::HTMLLIElement::parseValue):
2198         * html/HTMLSelectElement.cpp:
2199         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
2200         (WebCore::HTMLSelectElement::scrollToSelection):
2201         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
2202         (WebCore::HTMLSelectElement::selectOption):
2203         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
2204         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2205         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2206         * html/HTMLSelectElementWin.cpp:
2207         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
2208         * page/mac/EventHandlerMac.mm:
2209         (WebCore::EventHandler::platformPrepareForWheelEvents):
2210         * rendering/InlineFlowBox.cpp:
2211         (WebCore::InlineFlowBox::addToLine):
2212         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
2213         * rendering/RenderCounter.cpp:
2214         (WebCore::planCounter):
2215         * rendering/RenderListBox.h:
2216         * rendering/RenderListItem.cpp:
2217         (WebCore::nextListItem):
2218         (WebCore::previousListItem):
2219         * rendering/RenderListItem.h:
2220         * rendering/RenderListMarker.h:
2221         * rendering/RenderMenuList.h:
2222         * rendering/RenderTreeAsText.cpp:
2223         (WebCore::markerTextForListItem):
2224         * rendering/TextAutoSizing.cpp:
2225         (WebCore::TextAutoSizingValue::adjustNodeSizes):
2226         * rendering/line/BreakingContextInlineHeaders.h:
2227         (WebCore::BreakingContext::handleReplaced):
2228         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2229         * testing/Internals.cpp:
2230         (WebCore::Internals::isSelectPopupVisible):
2231
2232 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2233
2234         Use std::unique_ptr for CachedResource
2235         https://bugs.webkit.org/show_bug.cgi?id=137736
2236
2237         Reviewed by Darin Adler.
2238
2239         No new tests, no behavior change.
2240
2241         * loader/cache/CachedResource.cpp: Use std::unique_ptr instead of PassOwnPtr|OwnPtr.
2242         (WebCore::CachedResource::removeClient):
2243         * loader/cache/CachedResource.h: Set ctor from private to public.
2244         (WebCore::CachedResource::CachedResourceCallback::schedule):
2245
2246 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2247
2248         Move TextCodec classes to std::unique_ptr
2249         https://bugs.webkit.org/show_bug.cgi?id=137738
2250
2251         Reviewed by Darin Adler.
2252
2253         Replace uses of PassOwnPtr in code under TextCodecFoo class with std::unique_ptr.
2254         To do this, ctor of TextCodecFoo classes is changed from private to public. Besides
2255         related classes follow this change as well.
2256
2257         No new tests, no behavior change.
2258
2259         * html/parser/HTMLMetaCharsetParser.h:
2260         * loader/TextResourceDecoder.cpp:
2261         (WebCore::TextResourceDecoder::setEncoding):
2262         (WebCore::TextResourceDecoder::flush):
2263         * loader/TextResourceDecoder.h:
2264         * platform/text/TextCodec.h:
2265         * platform/text/TextCodecICU.cpp:
2266         (WebCore::TextCodecICU::create):
2267         * platform/text/TextCodecICU.h:
2268         * platform/text/TextCodecLatin1.cpp:
2269         (WebCore::newStreamingTextDecoderWindowsLatin1):
2270         * platform/text/TextCodecUTF16.cpp:
2271         (WebCore::newStreamingTextDecoderUTF16LE):
2272         (WebCore::newStreamingTextDecoderUTF16BE):
2273         * platform/text/TextCodecUTF8.cpp:
2274         (WebCore::TextCodecUTF8::create):
2275         * platform/text/TextCodecUTF8.h:
2276         * platform/text/TextCodecUserDefined.cpp:
2277         (WebCore::newStreamingTextDecoderUserDefined):
2278         * platform/text/TextEncodingRegistry.cpp:
2279         (WebCore::newTextCodec):
2280         * platform/text/TextEncodingRegistry.h:
2281         * platform/text/mac/TextCodecMac.cpp:
2282         (WebCore::newTextCodecMac):
2283
2284 2014-10-15  Dean Jackson  <dino@apple.com>
2285
2286         [Media] Reduce style updates (painting) in controls
2287         https://bugs.webkit.org/show_bug.cgi?id=137763
2288         <rdar://problem/17833045>
2289
2290         Reviewed by Simon Fraser.
2291
2292         Media controls were causing a lot of repaints they were
2293         constantly updating the style of the widgets, the value
2294         of the forms, or the text in the display.
2295
2296         This is necessary when the controls are visible, but not
2297         necessary when they are hidden. Return immediately in that case.
2298
2299         * Modules/mediacontrols/mediaControlsApple.js:
2300         (Controller.prototype.createControls): Initialise the slider to a zero value.
2301         (Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
2302         (Controller.prototype.updateProgress): Don't update if we're hidden.
2303         (Controller.prototype.updateTime): Ditto.
2304         * Modules/mediacontrols/mediaControlsiOS.js:
2305         (ControllerIOS.prototype.updateProgress): Ditto.
2306
2307 2014-10-15  Chris Dumez  <cdumez@apple.com>
2308
2309         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel) - Part 2
2310         https://bugs.webkit.org/show_bug.cgi?id=137721
2311
2312         Reviewed by Darin Adler.
2313
2314         Follow-up patch to r174717 addressing review comments made after the patch landed:
2315         - Use modern C++ loop
2316         - Remove explicit calls to String(NSString*) constructor
2317
2318         No new tests, no new tests.
2319
2320         * platform/network/mac/ResourceResponseMac.mm:
2321         (WebCore::ResourceResponse::platformLazyInit):
2322
2323 2014-10-15  Chris Dumez  <cdumez@apple.com>
2324
2325         Use is<>() / downcast<>() for InlineBox subclasses
2326         https://bugs.webkit.org/show_bug.cgi?id=137749
2327
2328         Reviewed by Darin Adler.
2329
2330         Use is<>() / downcast<>() for InlineBox subclasses and clean up the
2331         surrounding code.
2332
2333         No new tests, no behavior change.
2334
2335         * dom/Position.cpp:
2336         (WebCore::Position::upstream):
2337         (WebCore::Position::downstream):
2338         * editing/VisibleUnits.cpp:
2339         (WebCore::wordBreakIteratorForMinOffsetBoundary):
2340         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
2341         (WebCore::visualWordPosition):
2342         (WebCore::startPositionForLine):
2343         (WebCore::endPositionForLine):
2344         * rendering/InlineBox.cpp:
2345         (WebCore::InlineBox::root):
2346         (WebCore::InlineBox::nextLeafChild):
2347         (WebCore::InlineBox::prevLeafChild):
2348         (WebCore::InlineBox::nextLeafChildIgnoringLineBreak):
2349         * rendering/InlineBox.h:
2350         * rendering/InlineElementBox.h:
2351         * rendering/InlineFlowBox.cpp:
2352         (WebCore::InlineFlowBox::getFlowSpacingLogicalWidth):
2353         (WebCore::InlineFlowBox::addToLine):
2354         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
2355         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
2356         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
2357         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
2358         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2359         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2360         (WebCore::InlineFlowBox::computeMaxLogicalTop):
2361         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
2362         (WebCore::InlineFlowBox::computeOverflow):
2363         (WebCore::InlineFlowBox::firstLeafChild):
2364         (WebCore::InlineFlowBox::lastLeafChild):
2365         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
2366         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
2367         * rendering/InlineFlowBox.h:
2368         * rendering/InlineTextBox.h:
2369         * rendering/RenderBlockFlow.cpp:
2370         (WebCore::RenderBlockFlow::positionForBox):
2371         * rendering/RenderBlockFlow.h:
2372         (WebCore::RenderBlockFlow::firstRootBox):
2373         (WebCore::RenderBlockFlow::lastRootBox):
2374         * rendering/RenderBlockLineLayout.cpp:
2375         (WebCore::RenderBlockFlow::createLineBoxes):
2376         (WebCore::RenderBlockFlow::constructLine):
2377         (WebCore::setLogicalWidthForTextRun):
2378         (WebCore::computeExpansionForJustifiedText):
2379         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2380         (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
2381         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
2382         * rendering/RenderText.cpp:
2383         (WebCore::RenderText::localCaretRect):
2384         * rendering/RootInlineBox.cpp:
2385         (WebCore::RootInlineBox::isHyphenated):
2386         (WebCore::RootInlineBox::ascentAndDescentForBox):
2387         * rendering/RootInlineBox.h:
2388         (WebCore::RootInlineBox::nextRootBox):
2389         (WebCore::RootInlineBox::prevRootBox):
2390         * rendering/svg/RenderSVGInlineText.cpp:
2391         (WebCore::RenderSVGInlineText::localCaretRect):
2392         (WebCore::RenderSVGInlineText::positionForPoint):
2393         * rendering/svg/RenderSVGText.cpp:
2394         (WebCore::RenderSVGText::positionForPoint):
2395         * rendering/svg/SVGInlineFlowBox.cpp:
2396         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
2397         (WebCore::SVGInlineFlowBox::paint):
2398         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2399         * rendering/svg/SVGInlineFlowBox.h:
2400         * rendering/svg/SVGInlineTextBox.h:
2401         * rendering/svg/SVGRenderTreeAsText.cpp:
2402         (WebCore::writeRenderSVGTextBox):
2403         (WebCore::writeSVGInlineTextBoxes):
2404         * rendering/svg/SVGRootInlineBox.cpp:
2405         (WebCore::SVGRootInlineBox::paint):
2406         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
2407         (WebCore::SVGRootInlineBox::layoutChildBoxes):
2408         (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
2409         * rendering/svg/SVGRootInlineBox.h:
2410         * rendering/svg/SVGTextQuery.cpp:
2411         (WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
2412
2413 2014-10-15  Roger Fong  <roger_fong@apple.com>
2414
2415         glReadPixels on NVIDIA cards returns the wrong values for the alpha channel when alpha is off.
2416         https://bugs.webkit.org/show_bug.cgi?id=137752.
2417         <rdar://problem/15408133>
2418
2419         Reviewed by Brent Fulgham.
2420
2421         This change fixed the 1.0.2 conformance test: context/context-attribute-preserve-drawing-buffer.html
2422
2423         * platform/graphics/GraphicsContext3D.h:
2424         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2425         Manually set the alpha channel to 255 when alpha is off on the rendering context.
2426
2427 2014-10-13  Chris Fleizach  <cfleizach@apple.com>
2428
2429         AX: Going back is broken for VoiceOver
2430         https://bugs.webkit.org/show_bug.cgi?id=137382
2431
2432         Reviewed by Darin Adler.
2433
2434         There were two issues preventing VoiceOver from navigating when using page history to go back/forward.
2435           1) Existing AXLoadComplete does not get fired when you just move through page history. 
2436                There were existing frameLoad notifications used by GTK. I think we should use those which seem more reliable.
2437           2) The AccessibilityScrollView cached its children, but on some history page loads, that cache was never cleared out.
2438                Rather than trying to find those places to clear out the cache, it's easier to just add the elements to the children
2439                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.
2440
2441         Tests are not possible since they require monitoring notifications across multiple page loads.
2442
2443         * accessibility/AXObjectCache.h:
2444         * accessibility/AccessibilityScrollView.cpp:
2445         (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
2446         * accessibility/ios/AXObjectCacheIOS.mm:
2447         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2448         * accessibility/mac/AXObjectCacheMac.mm:
2449         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2450         * dom/Document.cpp:
2451         (WebCore::Document::implicitClose):
2452
2453 2014-10-15  Simon Fraser  <simon.fraser@apple.com>
2454
2455         Sometimes can't scroll overflow:scroll areas in subframes
2456         https://bugs.webkit.org/show_bug.cgi?id=137746
2457         rdar://problem/18603560
2458
2459         Reviewed by Tim Horton.
2460         
2461         r169733 introduced a regression which caused us to no longer update the non-fast
2462         scrollable region on every layout in subframes, by adding a bogus isMainFrame() check.
2463         Revert to the previous code.
2464
2465         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html
2466
2467         * page/scrolling/AsyncScrollingCoordinator.cpp:
2468         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2469
2470 2014-10-15  Chris Dumez  <cdumez@apple.com>
2471
2472         Use is<>() / downcast<>() for TransformOperation subclasses
2473         https://bugs.webkit.org/show_bug.cgi?id=137731
2474
2475         Reviewed by Darin Adler.
2476
2477         Use is<>() / downcast<>() for TransformOperation subclasses and clean
2478         up the surrounding code.
2479
2480         No new tests, no behavior change.
2481
2482         * platform/graphics/GraphicsLayer.cpp:
2483         (WebCore::GraphicsLayer::validateTransformOperations):
2484         * platform/graphics/ca/GraphicsLayerCA.cpp:
2485         (WebCore::getTransformFunctionValue):
2486         * platform/graphics/transforms/IdentityTransformOperation.h:
2487         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
2488         (WebCore::Matrix3DTransformOperation::operator==):
2489         * platform/graphics/transforms/Matrix3DTransformOperation.h:
2490         * platform/graphics/transforms/MatrixTransformOperation.cpp:
2491         (WebCore::MatrixTransformOperation::operator==):
2492         (WebCore::MatrixTransformOperation::blend):
2493         * platform/graphics/transforms/MatrixTransformOperation.h:
2494         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2495         (WebCore::PerspectiveTransformOperation::operator==):
2496         (WebCore::PerspectiveTransformOperation::blend):
2497         * platform/graphics/transforms/PerspectiveTransformOperation.h:
2498         * platform/graphics/transforms/RotateTransformOperation.cpp:
2499         (WebCore::RotateTransformOperation::operator==):
2500         (WebCore::RotateTransformOperation::blend):
2501         * platform/graphics/transforms/RotateTransformOperation.h:
2502         * platform/graphics/transforms/ScaleTransformOperation.cpp:
2503         (WebCore::ScaleTransformOperation::operator==):
2504         (WebCore::ScaleTransformOperation::blend):
2505         * platform/graphics/transforms/ScaleTransformOperation.h:
2506         * platform/graphics/transforms/SkewTransformOperation.cpp:
2507         (WebCore::SkewTransformOperation::operator==):
2508         (WebCore::SkewTransformOperation::blend):
2509         * platform/graphics/transforms/SkewTransformOperation.h:
2510         * platform/graphics/transforms/TransformOperation.h:
2511         * platform/graphics/transforms/TranslateTransformOperation.cpp:
2512         (WebCore::TranslateTransformOperation::operator==):
2513         (WebCore::TranslateTransformOperation::blend):
2514         * platform/graphics/transforms/TranslateTransformOperation.h:
2515
2516 2014-10-15  Chris Dumez  <cdumez@apple.com>
2517
2518         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine
2519         https://bugs.webkit.org/show_bug.cgi?id=137727
2520
2521         Reviewed by Darin Adler.
2522
2523         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine.
2524
2525         No new tests, no behavior change.
2526
2527         * accessibility/AccessibilityRenderObject.cpp:
2528         (WebCore::AccessibilityRenderObject::selectedText):
2529         (WebCore::AccessibilityRenderObject::selectedTextRange):
2530         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2531         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
2532         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
2533         * editing/TextIterator.cpp:
2534         (WebCore::TextIterator::handleReplacedElement):
2535         * html/TextFieldInputType.cpp:
2536         (WebCore::TextFieldInputType::forwardEvent):
2537         * html/shadow/TextControlInnerElements.cpp:
2538         (WebCore::TextControlInnerElement::customStyleForRenderer):
2539         * page/EventHandler.cpp:
2540         (WebCore::EventHandler::capsLockStateMayHaveChanged):
2541         * page/ios/FrameIOS.mm:
2542         (WebCore::ancestorRespondingToScrollWheelEvents):
2543         * rendering/RenderTextControl.h:
2544         * rendering/RenderTextControlSingleLine.h:
2545         * rendering/SimpleLineLayout.cpp:
2546         (WebCore::SimpleLineLayout::canUseFor):
2547
2548 2014-10-15  Chris Dumez  <cdumez@apple.com>
2549
2550         Use is<>() / downcast<>() for ClipPathOperation subclasses
2551         https://bugs.webkit.org/show_bug.cgi?id=137733
2552
2553         Reviewed by Mihnea Ovidenie.
2554
2555         Use is<>() / downcast<>() for ClipPathOperation subclasses.
2556
2557         No new tests, no behavior change.
2558
2559         * css/CSSComputedStyleDeclaration.cpp:
2560         (WebCore::ComputedStyleExtractor::propertyValue):
2561         * css/DeprecatedStyleBuilder.cpp:
2562         (WebCore::ApplyPropertyClipPath::applyValue):
2563         * rendering/ClipPathOperation.h:
2564         * rendering/RenderBlock.cpp:
2565         (WebCore::RenderBlock::nodeAtPoint):
2566         * rendering/RenderLayer.cpp:
2567         (WebCore::RenderLayer::setupClipPath):
2568         * rendering/svg/SVGRenderingContext.cpp:
2569         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2570
2571 2014-10-15  Chris Dumez  <cdumez@apple.com>
2572
2573         [Mac] Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable()
2574         https://bugs.webkit.org/show_bug.cgi?id=137723
2575
2576         Reviewed by Simon Fraser.
2577
2578         Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable() instead
2579         of CFDictionaryGetValue() as we are not actually interested in the
2580         value.
2581
2582         No new tests, no behavior change.
2583
2584         * platform/graphics/cg/ImageSourceCG.cpp:
2585         (WebCore::ImageSource::isSizeAvailable):
2586
2587 2014-10-15  Mihnea Ovidenie  <mihnea@adobe.com>
2588
2589         Use modern loops in subtrees selection code
2590         https://bugs.webkit.org/show_bug.cgi?id=137688
2591
2592         Reviewed by Andreas Kling.
2593
2594         No new tests as no change in functionality.
2595
2596         * rendering/RenderView.cpp:
2597         (WebCore::RenderView::splitSelectionBetweenSubtrees):
2598         (WebCore::RenderView::updateSelectionForSubtrees):
2599         (WebCore::RenderView::clearSubtreeSelection):
2600         (WebCore::RenderView::applySubtreeSelection):
2601         * rendering/RenderView.h:
2602
2603 2014-10-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2604
2605         Clean up unnecessary PassOwnPtr.h inclusion
2606         https://bugs.webkit.org/show_bug.cgi?id=137726
2607
2608         Reviewed by Chris Dumez.
2609
2610         No new tests, no behavior changes.
2611
2612         * dom/Document.h: Remove PassOwnPtr.h inclusion.
2613         * loader/ResourceBuffer.h: ditto.
2614         * loader/cocoa/DiskCacheMonitorCocoa.mm: ditto.
2615         * page/scrolling/AxisScrollSnapOffsets.h: ditto.
2616         * page/scrolling/ScrollingStateScrollingNode.h: ditto.
2617         * platform/ColorChooserClient.h: ditto.
2618         * platform/ScrollableArea.cpp: ditto.
2619         * platform/ScrollbarThemeClient.h: ditto.
2620         * platform/SharedBuffer.cpp: ditto.
2621         * platform/Supplementable.h: ditto.
2622         * platform/graphics/surfaces/GraphicsSurface.h: ditto.
2623         * platform/graphics/surfaces/GraphicsSurfaceToken.h: ditto.
2624         * platform/graphics/win/WKCAImageQueue.cpp: ditto.
2625         * platform/win/CursorWin.cpp: ditto.
2626
2627 2014-10-14  Chris Dumez  <cdumez@apple.com>
2628
2629         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
2630         https://bugs.webkit.org/show_bug.cgi?id=137728
2631
2632         Reviewed by Benjamin Poulain.
2633
2634         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
2635         instead of a RenderObject*. The argument passed is never null and the type
2636         should be a RenderElement as the argument is a container.
2637
2638         No new tests, no behavior change.
2639
2640         * editing/htmlediting.cpp:
2641         (WebCore::localCaretRectInRendererForCaretPainting):
2642         * page/GestureTapHighlighter.cpp:
2643         * rendering/RenderBox.cpp:
2644         (WebCore::RenderBox::mapLocalToContainer):
2645         (WebCore::RenderBox::pushMappingToContainer):
2646         (WebCore::RenderBox::offsetFromContainer):
2647         (WebCore::RenderBox::computeRectForRepaint):
2648         * rendering/RenderBox.h:
2649         * rendering/RenderBoxModelObject.cpp:
2650         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2651         * rendering/RenderInline.cpp:
2652         (WebCore::RenderInline::computeRectForRepaint):
2653         (WebCore::RenderInline::offsetFromContainer):
2654         (WebCore::RenderInline::mapLocalToContainer):
2655         (WebCore::RenderInline::pushMappingToContainer):
2656         * rendering/RenderInline.h:
2657         * rendering/RenderMultiColumnFlowThread.cpp:
2658         (WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
2659         * rendering/RenderMultiColumnFlowThread.h:
2660         * rendering/RenderNamedFlowFragment.cpp:
2661         (WebCore::RenderNamedFlowFragment::offsetFromContainer):
2662         * rendering/RenderNamedFlowFragment.h:
2663         * rendering/RenderObject.cpp:
2664         (WebCore::RenderObject::offsetFromContainer):
2665         (WebCore::RenderObject::offsetFromAncestorContainer):
2666         * rendering/RenderObject.h:
2667         * rendering/RenderTableCell.cpp:
2668         (WebCore::RenderTableCell::offsetFromContainer):
2669         * rendering/RenderTableCell.h:
2670         * rendering/RenderThemeMac.mm:
2671         (WebCore::RenderThemeMac::convertToPaintingRect):
2672
2673 2014-10-14  Jer Noble  <jer.noble@apple.com>
2674
2675         REGRESSION (r159208): Crash when clicking scrubber after navigating away/back to video
2676         https://bugs.webkit.org/show_bug.cgi?id=137715
2677
2678         Reviewed by Darin Adler.
2679
2680         Simple null-check of m_player in refreshCachedTime.
2681
2682         * html/HTMLMediaElement.cpp:
2683         (WebCore::HTMLMediaElement::refreshCachedTime):
2684
2685 2014-10-14  Chris Dumez  <cdumez@apple.com>
2686
2687         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel)
2688         https://bugs.webkit.org/show_bug.cgi?id=137721
2689
2690         Reviewed by Geoffrey Garen.
2691
2692         There were several inefficiencies with the Mac implementation of
2693         ResourceResponse::platformLazyInit(InitLevel):
2694         1. We end up initializing uncommon fields even if called with
2695            'CommonFieldsOnly' initLevel.
2696         2. If called with 'AllFields' initLevel (and if currently
2697            uninitialized), we end up populating m_httpHeaderFields twice, once
2698            with only the common headers, then a second time with ALL the
2699            headers. We can skip the common-header case in this case to avoid
2700            wasting CPU time.
2701
2702         This patch addresses both inefficiencies and cleans up the code a
2703         little bit to reduce variable scope and to use fast enumeration of
2704         header names.
2705
2706         As a result, we spend almost twice as little time in platformLazyInit()
2707         when loading msn.com (~30ms -> ~18ms).
2708
2709         No new tests, no behavior change.
2710
2711         * platform/network/mac/ResourceResponseMac.mm:
2712         (WebCore::ResourceResponse::platformLazyInit):
2713
2714 2014-10-14  Zalan Bujtas  <zalan@apple.com>
2715
2716         REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
2717         https://bugs.webkit.org/show_bug.cgi?id=137205
2718
2719         Reviewed by Simon Fraser.
2720
2721         Child layer should not reset radius clipping behaviour.
2722
2723         Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html
2724
2725         * rendering/RenderLayer.cpp:
2726         (WebCore::RenderLayer::calculateClipRects):
2727
2728 2014-10-14  Chris Dumez  <cdumez@apple.com>
2729
2730         Use is<>() / downcast<>() for PlatformCAAnimation subclasses
2731         https://bugs.webkit.org/show_bug.cgi?id=137722
2732
2733         Reviewed by Simon Fraser.
2734
2735         Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
2736         up the surrounding code.
2737
2738         No new tests, no behavior change.
2739
2740         * page/mac/ServicesOverlayController.mm:
2741         (WebCore::ServicesOverlayController::Highlight::fadeIn):
2742         (WebCore::ServicesOverlayController::Highlight::fadeOut):
2743         * platform/graphics/ca/GraphicsLayerCA.cpp:
2744         (WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
2745         (WebCore::GraphicsLayerCA::updateAnimations):
2746         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
2747         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
2748         * platform/graphics/ca/GraphicsLayerCA.h:
2749         * platform/graphics/ca/PlatformCAAnimation.h:
2750         * platform/graphics/ca/PlatformCALayer.h:
2751         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
2752         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2753         (PlatformCAAnimationMac::copy):
2754         (PlatformCAAnimationMac::copyTimingFunctionFrom):
2755         (PlatformCAAnimationMac::copyFromValueFrom):
2756         (PlatformCAAnimationMac::copyToValueFrom):
2757         (PlatformCAAnimationMac::copyValuesFrom):
2758         (PlatformCAAnimationMac::copyKeyTimesFrom):
2759         (PlatformCAAnimationMac::copyTimingFunctionsFrom):
2760         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2761         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2762         (PlatformCALayerMac::addAnimationForKey):
2763         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2764         (PlatformCAAnimationWin::copy):
2765         (PlatformCAAnimationWin::copyTimingFunctionFrom):
2766         (PlatformCAAnimationWin::copyFromValueFrom):
2767         (PlatformCAAnimationWin::copyToValueFrom):
2768         (PlatformCAAnimationWin::copyValuesFrom):
2769         (PlatformCAAnimationWin::copyKeyTimesFrom):
2770         (PlatformCAAnimationWin::copyTimingFunctionsFrom):
2771         * platform/graphics/ca/win/PlatformCAAnimationWin.h:
2772         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2773         (PlatformCALayerWin::addAnimationForKey):
2774         * platform/graphics/ca/win/PlatformCALayerWin.h:
2775
2776 2014-10-14  Chris Dumez  <cdumez@apple.com>
2777
2778         Use is<>() / downcast<>() for RenderInline
2779         https://bugs.webkit.org/show_bug.cgi?id=137704
2780
2781         Reviewed by Darin Adler.
2782
2783         Use is<>() / downcast<>() for RenderInline and clean up the surrounding
2784         code.
2785
2786         No new tests, no behavior change.
2787
2788         * accessibility/AccessibilityRenderObject.cpp:
2789         (WebCore::firstChildInContinuation):
2790         * editing/SimplifyMarkupCommand.cpp:
2791         (WebCore::SimplifyMarkupCommand::doApply):
2792         * inspector/InspectorOverlay.cpp:
2793         (WebCore::buildRendererHighlight):
2794         * page/FrameView.cpp:
2795         (WebCore::FrameView::paintContents):
2796         * rendering/InlineFlowBox.cpp:
2797         (WebCore::InlineFlowBox::removeLineBoxFromRenderObject):
2798         (WebCore::InlineFlowBox::extractLineBoxFromRenderObject):
2799         (WebCore::InlineFlowBox::attachLineBoxToRenderObject):
2800         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
2801         (WebCore::InlineFlowBox::nodeAtPoint):
2802         (WebCore::InlineFlowBox::paint):
2803         * rendering/InlineIterator.h:
2804         (WebCore::bidiFirstSkippingEmptyInlines):
2805         * rendering/LayoutState.cpp:
2806         (WebCore::LayoutState::LayoutState):
2807         * rendering/RenderBlock.cpp:
2808         (WebCore::RenderBlock::willBeDestroyed):
2809         (WebCore::RenderBlock::paintObject):
2810         (WebCore::RenderBlock::inlineElementContinuation):
2811         (WebCore::RenderBlock::addFocusRingRects):
2812         * rendering/RenderBlockFlow.cpp:
2813         (WebCore::RenderBlockFlow::willBeDestroyed):
2814         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
2815         * rendering/RenderBlockFlow.h:
2816         * rendering/RenderBlockLineLayout.cpp:
2817         (WebCore::constructBidiRunsForSegment):
2818         (WebCore::RenderBlockFlow::layoutLineBoxes):
2819         * rendering/RenderBox.cpp:
2820         (WebCore::RenderBox::offsetFromContainer):
2821         (WebCore::RenderBox::computeRectForRepaint):
2822         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2823         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2824         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2825         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
2826         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2827         * rendering/RenderBoxModelObject.cpp:
2828         (WebCore::accumulateInFlowPositionOffsets):
2829         * rendering/RenderElement.cpp:
2830         (WebCore::RenderElement::willBeRemovedFromTree):
2831         * rendering/RenderElement.h:
2832         (WebCore::RenderElement::dirtyLinesFromChangedChild):
2833         * rendering/RenderFlowThread.cpp:
2834         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
2835         * rendering/RenderInline.cpp:
2836         (WebCore::RenderInline::willBeDestroyed):
2837         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
2838         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2839         * rendering/RenderInline.h:
2840         * rendering/RenderLayer.cpp:
2841         (WebCore::RenderLayer::updateLayerPosition):
2842         (WebCore::RenderLayer::calculateClipRects):
2843         * rendering/RenderLineBoxList.cpp:
2844         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
2845         * rendering/RenderLineBoxList.h:
2846         * rendering/RenderNamedFlowThread.cpp:
2847         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
2848         * rendering/RenderObject.cpp:
2849         (WebCore::RenderObject::insertedIntoTree):
2850         * rendering/RenderRegion.cpp:
2851         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
2852         (WebCore::RenderRegion::visualOverflowRectForBox):
2853         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
2854         * rendering/RenderRegion.h:
2855         * rendering/RenderReplaced.cpp:
2856         (WebCore::RenderReplaced::willBeDestroyed):
2857         * rendering/RenderTextLineBoxes.cpp:
2858         (WebCore::RenderTextLineBoxes::removeAllFromParent):
2859         (WebCore::RenderTextLineBoxes::dirtyRange):
2860         * rendering/line/BreakingContextInlineHeaders.h:
2861         (WebCore::inlineLogicalWidth):
2862         (WebCore::BreakingContext::handleEmptyInline):
2863         * rendering/line/LineInlineHeaders.h:
2864         (WebCore::requiresLineBox):
2865         (WebCore::setStaticPositions):
2866         * rendering/svg/SVGInlineTextBox.cpp:
2867         (WebCore::SVGInlineTextBox::paint):
2868
2869 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2870
2871         [Win] Unreviewed build fix after r174710.
2872
2873         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2874         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2875
2876 2014-10-14  Dan Bernstein  <mitz@apple.com>
2877
2878         URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior
2879         https://bugs.webkit.org/show_bug.cgi?id=137718
2880
2881         Reviewed by Alexey Proskuryakov.
2882
2883         Added cases to fast/loader/url-parse-1.html.
2884
2885         * platform/URL.cpp:
2886         (WebCore::URL::parse): In hierarchical schemes other than file:, ignore any additional
2887         slashes after the ://, as prescribed by the authority-ignore-slashes state in the current
2888         URL spec.
2889
2890 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2891
2892         [Win] Unreviewed build fix after r174698 and r174709.
2893
2894         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2895         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
2896         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2897         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem):
2898         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
2899         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2900
2901 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2902
2903         [Win] Unreviewed build fix after r174698
2904
2905         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2906         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
2907         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2908         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2909
2910 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
2911
2912         Improve debug description of WAKViews
2913         https://bugs.webkit.org/show_bug.cgi?id=137716
2914
2915         Reviewed by Simon Fraser.
2916
2917         No new tests because there is no behavior change.
2918
2919         * platform/ios/wak/WAKView.mm:
2920         (-[WAKView description]):
2921         * platform/ios/wak/WKView.h:
2922         * platform/ios/wak/WKView.mm:
2923         (WKViewGetOrigin):
2924
2925 2014-10-14  Chris Dumez  <cdumez@apple.com>
2926
2927         Introduce an isCSSAnimated flag on RenderElement for performance
2928         https://bugs.webkit.org/show_bug.cgi?id=137583
2929
2930         Reviewed by Simon Fraser.
2931
2932         I noticed when profiling the ebay.com page load that isRunningAnimationOnRenderer()
2933         and isRunningAcceleratedAnimationOnRenderer() were called frequently, causing
2934         ~4.7 millions m_compositeAnimations HashMap lookups.
2935
2936         This patch introduces an isCSSAnimated flag on RenderElement to return early if
2937         there is no animation on the renderer, thus avoiding HashMap lookups. This reduces
2938         the number of HashMap lookups from ~4.7 millions to ~68k. On my machine, I see
2939         the following performance improvements:
2940         - isRunning*AnimationOnRenderer() / computeCompositingRequirements()
2941           - before: ~45ms  / ~90ms
2942           - after:  ~4ms / ~30ms
2943
2944         No new tests, no behavior change.
2945
2946         * page/animation/AnimationController.cpp:
2947         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
2948         (WebCore::AnimationControllerPrivate::clear):
2949         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
2950         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
2951         (WebCore::AnimationController::isRunningAnimationOnRenderer):
2952         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
2953         * rendering/RenderElement.cpp:
2954         (WebCore::RenderElement::RenderElement):
2955         * rendering/RenderElement.h:
2956         (WebCore::RenderElement::isCSSAnimating):
2957         (WebCore::RenderElement::setIsCSSAnimating):
2958
2959 2014-10-14  Dean Jackson  <dino@apple.com>
2960
2961         Crash in WebCore::UserGestureIndicator::processingUserGesture with WebWorkers
2962         https://bugs.webkit.org/show_bug.cgi?id=137676
2963         <rdar://problem/15735049>
2964
2965         Reviewed by Alexey Proskuryakov.
2966
2967         Remove the code I added that tracks the timestamp of the most recent
2968         user gesture from the event handling dispatch, as it was both
2969         a silly place to do it and it originally crashed when events were fired from
2970         Worker threads (although this was fixed in r152238).
2971
2972         It's now recorded by going through UserGestureIndicator, which is good because
2973         it knows when a user has triggered an event. Its constructor now takes
2974         a pointer to Document, and updates the timestamp there if necessary.
2975
2976         Not all UserGestureIndicator instances needed to reset the timestamp; Those did
2977         not have to pass along the Document.
2978
2979         This is untestable due to the fix mentioned above.
2980
2981         * WebCore.exp.in: Change constructor signature.
2982
2983         * accessibility/AccessibilityNodeObject.cpp: Pass a pointer to the Document into the UserGestureIndicator.
2984         (WebCore::AccessibilityNodeObject::increment):
2985         (WebCore::AccessibilityNodeObject::decrement):
2986         * accessibility/AccessibilityObject.cpp: Ditto.
2987         (WebCore::AccessibilityObject::press):
2988
2989         * dom/Document.cpp:
2990         (WebCore::Document::updateLastHandledUserGestureTimestamp): Renamed.
2991         * dom/Document.h:
2992
2993         * dom/EventTarget.cpp: Remove the code to update the timestamp.
2994         (WebCore::EventTarget::fireEventListeners):
2995
2996         * dom/UserGestureIndicator.cpp:
2997         (WebCore::UserGestureIndicator::UserGestureIndicator): If there is a Document and
2998         this is a user gesture, then reset the timestamp.
2999         * dom/UserGestureIndicator.h:
3000
3001         * page/EventHandler.cpp: Pass a pointer to the Document.
3002         (WebCore::EventHandler::handleMousePressEvent):
3003         (WebCore::EventHandler::handleMouseDoubleClickEvent):
3004         (WebCore::EventHandler::handleMouseReleaseEvent):
3005         (WebCore::EventHandler::keyEvent):
3006         (WebCore::EventHandler::handleTouchEvent):
3007
3008         * rendering/HitTestResult.cpp: Ditto.
3009         (WebCore::HitTestResult::toggleMediaFullscreenState):
3010         (WebCore::HitTestResult::enterFullscreenForVideo):
3011
3012 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
3013
3014         [Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
3015
3016         * WebCore.vcxproj: Modified property svn:ignore.
3017
3018 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
3019
3020         [Win] Enable Encrypted Media Support
3021         https://bugs.webkit.org/show_bug.cgi?id=137710
3022         <rdar://problem/18652699>
3023
3024         Reviewed by Jer Noble.
3025
3026         This feature is covered by existing media tests.
3027
3028         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3029         (WebCore::destroyAVFWrapper): Remove redundant ASSERT.
3030         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3031         (displayOnMainThreadContext::displayOnMainThreadContext): Added.
3032         (redispatchOnMainQueue): Added.
3033         (PlatformCALayerWinInternal::displayCallback): Check if a display
3034         call is happening on a background queue, and re-dispatch on the
3035         main thread if necessary.
3036
3037 2014-10-14  Chris Dumez  <cdumez@apple.com>
3038
3039         [Mac] Avoid unnecessary dictionary lookup in ImageSource::isSizeAvailable()
3040         https://bugs.webkit.org/show_bug.cgi?id=137701
3041
3042         Reviewed by Simon Fraser.
3043
3044         The CG implementation of ImageSource::isSizeAvailable() was looking up
3045         both the width and the height keys in the dictionary before determining
3046         if the size is available. We can abort early and return false if the
3047         first key (the width) is missing, thus avoiding an extra dictionary
3048         lookup in this case.
3049
3050         This is a small win but ImageSource::isSizeAvailable() is called quite
3051         frequently during page loads
3052
3053         No new tests, no behavior change.
3054
3055         * platform/graphics/cg/ImageSourceCG.cpp:
3056         (WebCore::ImageSource::isSizeAvailable):
3057
3058 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
3059
3060         Remove unnecessary logging from SimpleFontData
3061         https://bugs.webkit.org/show_bug.cgi?id=137699
3062
3063         Reviewed by Andreas Kling.
3064
3065         Because of web fonts, fonts that don't have a glyph page 0 are common and expected. Printing out a
3066         message is not helpful, especially if you're not dealing with a font-related piece of WebKit.
3067
3068         No new tests because there is no behavior change.
3069
3070         * platform/graphics/SimpleFontData.cpp:
3071         (WebCore::SimpleFontData::platformGlyphInit):
3072
3073 2014-10-14  Martin Hock  <mhock@apple.com>
3074
3075         Update ViewportConfiguration whenever its size attributes change
3076         https://bugs.webkit.org/show_bug.cgi?id=137682
3077         rdar://problem/18643655
3078
3079         Reviewed by Benjamin Poulain.
3080
3081         * page/ViewportConfiguration.cpp:
3082         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
3083         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
3084
3085 2014-10-14  Joseph Pecoraro  <pecoraro@apple.com>
3086
3087         Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree
3088         https://bugs.webkit.org/show_bug.cgi?id=137681
3089
3090         Reviewed by Timothy Hatcher.
3091
3092         * inspector/InspectorDOMAgent.cpp:
3093         (WebCore::InspectorDOMAgent::buildObjectForNode):
3094         Include the nodeName, localName, and nodeValue (string data)
3095         properties for processing instruction nodes.
3096
3097 2014-10-14  Chris Dumez  <cdumez@apple.com>
3098
3099         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet
3100         https://bugs.webkit.org/show_bug.cgi?id=137696
3101
3102         Reviewed by Darin Adler.
3103
3104         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet.
3105
3106         No new tests, no behavior change.
3107
3108         * html/HTMLFrameSetElement.cpp:
3109         (WebCore::HTMLFrameSetElement::defaultEventHandler):
3110         * rendering/RenderFrame.cpp:
3111         (WebCore::RenderFrame::updateFromElement):
3112         * rendering/RenderFrame.h:
3113         * rendering/RenderFrameSet.cpp:
3114         (WebCore::RenderFrameSet::computeEdgeInfo):
3115         (WebCore::RenderFrameSet::positionFramesWithFlattening):
3116         * rendering/RenderFrameSet.h:
3117
3118 2014-10-14  Youenn Fablet  <youennf@gmail.com>
3119
3120         [XHR] Abort method execution when m_loader->cancel() in internalAbort() caused reentry
3121         https://bugs.webkit.org/show_bug.cgi?id=126975
3122
3123         Reviewed by Alexey Proskuryakov.
3124
3125         Merging https://chromium.googlesource.com/chromium/blink/+/0d75daf2053631518606ae15daaece701a25b2c4
3126         Ensuring new test from https://codereview.chromium.org/76133002/ is passing.
3127
3128         Test: http/tests/xmlhttprequest/reentrant-cancel-abort.html
3129
3130         * xml/XMLHttpRequest.cpp:
3131         (WebCore::XMLHttpRequest::open): exit early if internalAbort asks so
3132         (WebCore::XMLHttpRequest::abort): exit early if internalAbort asks so
3133         (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)   
3134         (WebCore::XMLHttpRequest::didTimeout): exit early if internalAbort asks so
3135         * xml/XMLHttpRequest.h:
3136
3137 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
3138
3139         Multiple refactors in RenderMathMLOperator
3140         https://bugs.webkit.org/show_bug.cgi?id=137611
3141
3142         Reviewed by Darin Adler.
3143
3144         The changes include:
3145         - Rename m_operator to m_textContent.
3146         - Make most of the functions private, we needed to create some
3147         public member functions to be able to make the some funtions private
3148         and move trailingSpaceError to RenderMathMLOperator.
3149         - Fix incorrect capitalization of setOperatorProperties function.
3150         - Make all data members private and move them to the end of the
3151         class defition.
3152
3153         No new tests as no change in functionality.
3154
3155         * rendering/mathml/RenderMathMLOperator.cpp:
3156         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
3157         (WebCore::RenderMathMLOperator::setOperatorProperties): Renamed,
3158         incorrect capitalization
3159         (WebCore::RenderMathMLOperator::stretchTo):
3160         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
3161         (WebCore::RenderMathMLOperator::rebuildTokenContent):
3162         (WebCore::RenderMathMLOperator::updateFromElement):
3163         (WebCore::RenderMathMLOperator::updateOperatorProperties):
3164         (WebCore::RenderMathMLOperator::shouldAllowStretching):
3165         (WebCore::RenderMathMLOperator::updateStyle):
3166         (WebCore::RenderMathMLOperator::trailingSpaceError):
3167         (WebCore::RenderMathMLOperator::SetOperatorProperties): Deleted.
3168         (WebCore::RenderMathMLOperator::advanceForGlyph): Deleted.
3169         (WebCore::RenderMathMLOperator::updateTokenContent): Deleted.
3170         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): Deleted.
3171         * rendering/mathml/RenderMathMLOperator.h:
3172         (WebCore::RenderMathMLOperator::setLeadingSpace): Added.
3173         (WebCore::RenderMathMLOperator::setTrailingSpace):  Added.
3174         (WebCore::RenderMathMLOperator::textContent): Added.
3175         (WebCore::RenderMathMLOperator::isInvisibleOperator):
3176         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
3177         (WebCore::RenderMathMLRadicalOperator::setOperatorProperties):
3178         Renamed, incorrect capitalization
3179         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties): Deleted.
3180         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError): Deleted.
3181         * rendering/mathml/RenderMathMLRadicalOperator.h:
3182
3183 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
3184
3185         Changes in the stretchy attribute do not update rendering
3186         https://bugs.webkit.org/show_bug.cgi?id=136883
3187
3188         Reviewed by Darin Adler.
3189
3190         Test: mathml/presentation/mo-stretch-update.html
3191
3192         We need to relayout when a change in the stretchy attribute
3193         happens.
3194
3195         * mathml/MathMLTextElement.cpp:
3196         (WebCore::MathMLTextElement::parseAttribute): Parse the
3197         modifications of the stretchy attribute.
3198         * mathml/MathMLTextElement.h:
3199         * rendering/mathml/RenderMathMLOperator.cpp:
3200         (WebCore::RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded):
3201         Add function that receives the value instead of looking for it and
3202         checks if the change should schedule a layout.
3203         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
3204         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue):
3205         Add function that receives the value instead of looking for it.
3206         * rendering/mathml/RenderMathMLOperator.h:
3207
3208 2014-10-14  Chris Dumez  <cdumez@apple.com>
3209
3210         Use is<>() / downcast<>() for RenderImage
3211         https://bugs.webkit.org/show_bug.cgi?id=137683
3212
3213         Reviewed by Mihnea Ovidenie.
3214
3215         Use is<>() / downcast<>() for RenderImage.
3216
3217         No new tests, no behavior change.
3218
3219         * accessibility/AccessibilityNodeObject.cpp:
3220         (WebCore::AccessibilityNodeObject::alternativeText):
3221         * accessibility/AccessibilityRenderObject.cpp:
3222         (WebCore::AccessibilityRenderObject::addImageMapChildren):
3223         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
3224         * bindings/objc/DOM.mm:
3225         (-[DOMElement image]):
3226         (-[DOMElement _imageTIFFRepresentation]):
3227         * editing/TextIterator.cpp:
3228         (WebCore::TextIterator::handleReplacedElement):
3229         * editing/cocoa/HTMLConverter.mm:
3230         (fileWrapperForElement):
3231         * editing/gtk/EditorGtk.cpp:
3232         (WebCore::getImageForElement):
3233         * editing/ios/EditorIOS.mm:
3234         (WebCore::getImage):
3235         * editing/mac/EditorMac.mm:
3236         (WebCore::getImage):
3237         * html/HTMLAnchorElement.cpp:
3238         (WebCore::appendServerMapMousePosition):
3239         * html/HTMLAreaElement.cpp:
3240         (WebCore::HTMLAreaElement::setFocus):
3241         * html/HTMLImageElement.cpp:
3242         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
3243         (WebCore::HTMLImageElement::parseAttribute):
3244         (WebCore::HTMLImageElement::didAttachRenderers):
3245         (WebCore::HTMLImageElement::createImageControls):
3246         (WebCore::HTMLImageElement::destroyImageControls):
3247         * html/HTMLVideoElement.cpp:
3248         (WebCore::HTMLVideoElement::didAttachRenderers):
3249         (WebCore::HTMLVideoElement::parseAttribute):
3250         * html/ImageInputType.cpp:
3251         (WebCore::ImageInputType::altAttributeChanged):
3252         (WebCore::ImageInputType::attach):
3253         * html/canvas/CanvasRenderingContext2D.cpp:
3254         (WebCore::size):
3255         * html/shadow/mac/ImageControlsRootElementMac.cpp:
3256         (WebCore::RenderImageControls::updateLogicalWidth):
3257         (WebCore::RenderImageControls::computeLogicalHeight):
3258         * loader/ImageLoader.cpp:
3259         (WebCore::ImageLoader::renderImageResource):
3260         * page/ContextMenuController.cpp:
3261         (WebCore::imageFromImageElementNode):
3262         * page/DragController.cpp:
3263         (WebCore::getCachedImage):
3264         (WebCore::getImage):
3265         * platform/win/PasteboardWin.cpp:
3266         (WebCore::Pasteboard::writeImage):
3267         (WebCore::getCachedImage):
3268         * rendering/HitTestResult.cpp:
3269         (WebCore::HitTestResult::image):
3270         * rendering/RenderImage.h:
3271         * rendering/RenderImageResource.cpp:
3272         (WebCore::RenderImageResource::getImageSize):
3273         * rendering/RenderLayerBacking.cpp:
3274         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
3275         (WebCore::RenderLayerBacking::updateImageContents):
3276         * rendering/RenderReplaced.cpp:
3277         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
3278         * rendering/shapes/ShapeOutsideInfo.cpp:
3279         (WebCore::ShapeOutsideInfo::createShapeForImage):
3280
3281 2014-10-14  Andrzej Badowski  <a.badowski@samsung.com>
3282
3283         [AX] Improve AccessibilityTableCell columnHeaders and rowHeaders functions.
3284         https://bugs.webkit.org/show_bug.cgi?id=136818
3285
3286         Reviewed by Chris Fleizach.
3287
3288         Take into account that <th> elements can be both the column headers and row headers 
3289         improved the operation of two functions: columnHeaders and rowHeaders.
3290
3291         Test: accessibility/table-headers.html
3292
3293         * accessibility/AccessibilityTableCell.cpp:
3294         (WebCore::AccessibilityTableCell::isColumnHeaderCell):
3295         A new function that helps the main goal.
3296         (WebCore::AccessibilityTableCell::isRowHeaderCell):
3297         A new function that helps the main goal.
3298         (WebCore::AccessibilityTableCell::columnHeaders):
3299         Use isColumnHeaderCell instead of isTableHeaderCell.
3300         (WebCore::AccessibilityTableCell::rowHeaders):
3301         Use isRowHeaderCell also includes <th> row header element next to the scope attribute.
3302         * accessibility/AccessibilityTableCell.h:
3303         Adds new functions to the header file.
3304
3305 2014-10-14  Csaba Osztrogon√°c  <ossy@webkit.org>
3306
3307         Fix the !ENABLE(VIDEO) build after r174353
3308         https://bugs.webkit.org/show_bug.cgi?id=137655
3309
3310         Reviewed by Darin Adler.
3311
3312         * dom/Document.cpp:
3313         * dom/Document.h:
3314         * page/Page.cpp:
3315         * page/Page.h:
3316
3317 2014-10-14  peavo@outlook.com  <peavo@outlook.com>
3318
3319         [Curl] Compile error in CurlDownload.cpp.
3320         https://bugs.webkit.org/show_bug.cgi?id=137654
3321
3322         Reviewed by Philippe Normand.
3323
3324         A template specialization is not needed anymore.
3325
3326         * platform/network/curl/CurlDownload.cpp:
3327
3328 2014-10-13  Joseph Pecoraro  <pecoraro@apple.com>
3329
3330         Web Inspector: Remove unused stale Page protocol methods
3331         https://bugs.webkit.org/show_bug.cgi?id=137678
3332
3333         Reviewed by Andreas Kling.
3334
3335         * inspector/InspectorClient.h:
3336         (WebCore::InspectorClient::canShowDebugBorders): Deleted.
3337         (WebCore::InspectorClient::setShowDebugBorders): Deleted.
3338         (WebCore::InspectorClient::canShowFPSCounter): Deleted.
3339         (WebCore::InspectorClient::setShowFPSCounter): Deleted.
3340         (WebCore::InspectorClient::canContinuouslyPaint): Deleted.
3341         (WebCore::InspectorClient::setContinuousPaintingEnabled): Deleted.
3342         * inspector/InspectorPageAgent.cpp:
3343         (WebCore::InspectorPageAgent::disable):
3344         (WebCore::InspectorPageAgent::canShowDebugBorders): Deleted.
3345         (WebCore::InspectorPageAgent::setShowDebugBorders): Deleted.
3346         (WebCore::InspectorPageAgent::canShowFPSCounter): Deleted.
3347         (WebCore::InspectorPageAgent::setShowFPSCounter): Deleted.
3348         (WebCore::InspectorPageAgent::canContinuouslyPaint): Deleted.
3349         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled): Deleted.
3350         * inspector/InspectorPageAgent.h:
3351         * inspector/protocol/Page.json:
3352
3353 2014-10-13  Eric Carlson  <eric.carlson@apple.com>
3354
3355         [iOS] Refactor AirPlay monitoring code
3356         https://bugs.webkit.org/show_bug.cgi?id=137645
3357         <rdar://problem/18444817>
3358
3359         Reviewed by Jer Noble.
3360
3361         Refactor AirPlay route change monitoring code:
3362         + Have MediaSessionManager register/unregister for route changes depending on the state of
3363             all sessions so it does the right thing when there is more than one media element.
3364         + Make HTMLMediaElement unregister with MediaSession as soon as the media player is cleared
3365             because there can be no wireless playback without a player.
3366
3367         * html/HTMLMediaElement.cpp:
3368         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call mediaSession->setHasPlaybackTargetAvailabilityListeners
3369             when there are target availability changed listeners.
3370         (WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
3371         (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): New, media session client method.
3372         * html/HTMLMediaElement.h:
3373
3374         * html/HTMLMediaSession.cpp:
3375         (WebCore::HTMLMediaSession::HTMLMediaSession): Initialize m_hasPlaybackTargetAvailabilityListeners.
3376         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Remember whether or not
3377             the client has a target availability listener and tell the media session manager to reconfigure
3378             itself instead of telling it to start or stop listening for route changes so it does the 
3379             right thing when there is more than one media element.
3380         * html/HTMLMediaSession.h:
3381         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Return true when the client 
3382             has a target availability listener, false otherwise.
3383
3384         * platform/audio/MediaSession.cpp:
3385         (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Inform the client that routes have changed.
3386         * platform/audio/MediaSession.h:
3387         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
3388         (WebCore::MediaSessionClient::wirelessRoutesAvailableDidChange):
3389
3390         * platform/audio/MediaSessionManager.cpp:
3391         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Implement it.
3392         * platform/audio/MediaSessionManager.h:
3393         (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
3394         (WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
3395         (WebCore::MediaSessionManager::sessions):
3396         (WebCore::MediaSessionManager::startMonitoringAirPlayRoutes): Deleted.
3397         (WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes): Deleted.
3398
3399         * platform/audio/ios/MediaSessionManagerIOS.h:
3400         * platform/audio/ios/MediaSessionManagerIOS.mm:
3401         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Start or stop monitoring
3402             for route changes depending on client state.
3403         (WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes): Deleted.
3404         (WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes): Deleted.
3405
3406 2014-10-13  Chris Dumez  <cdumez@apple.com>
3407
3408         [Mac] Return value of createImageSourceOptions() is leaked in ImageSourceCG
3409         https://bugs.webkit.org/show_bug.cgi?id=137677
3410
3411         Reviewed by Simon Fraser.
3412
3413         The return value of createImageSourceOptions() was leaked in
3414         ImageSourceCG.cpp. It was returning a CFDictionaryRef created using
3415         CFDictionaryCreate(). Therefore, the return value should have been
3416         released but wasn't.
3417
3418         This patch makes createImageSourceOptions() return a
3419         RetainPtr<CFDictionaryRef> to make sure the CFDictionaryRef properly
3420         gets released after use.
3421
3422         No new tests, no behavior change.
3423
3424         * platform/graphics/cg/ImageSourceCG.cpp:
3425         (WebCore::createImageSourceOptions):
3426         (WebCore::imageSourceOptions):
3427         (WebCore::ImageSource::isSizeAvailable):
3428         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
3429         (WebCore::ImageSource::frameSizeAtIndex):
3430         (WebCore::ImageSource::orientationAtIndex):
3431         (WebCore::ImageSource::getHotSpot):
3432         (WebCore::ImageSource::repetitionCount):
3433         (WebCore::ImageSource::createFrameAtIndex):
3434         (WebCore::ImageSource::frameDurationAtIndex):
3435
3436 2014-10-13  Yusuke Suzuki  <utatane.tea@gmail.com>
3437
3438         CSS JIT: Implement :visited pseudo class
3439         https://bugs.webkit.org/show_bug.cgi?id=135293
3440
3441         Reviewed by Benjamin Poulain.
3442