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