Should have an editing behavior specific for IOS.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-16  Enrica Casucci  <enrica@apple.com>
2
3         Should have an editing behavior specific for IOS.
4         https://bugs.webkit.org/show_bug.cgi?id=136876
5
6         Reviewed by Sam Weinig.
7
8         This patch introduces a new editing behavior type to be able
9         to perform editing tasks that are specific to iOS.
10         All the existing EditingBehavior methods return the same boolean
11         value for for Mac and iOS. A new one has been introduced to support
12         a specific behavior in the DeleteSelectionCommand.
13
14         * editing/DeleteSelectionCommand.cpp:
15         (WebCore::DeleteSelectionCommand::doApply):
16         * editing/EditingBehavior.h:
17         (WebCore::EditingBehavior::shouldConsiderSelectionAsDirectional):
18         (WebCore::EditingBehavior::shouldCenterAlignWhenSelectionIsRevealed):
19         (WebCore::EditingBehavior::shouldToggleStyleBasedOnStartOfSelection):
20         (WebCore::EditingBehavior::shouldAlwaysGrowSelectionWhenExtendingToBoundary):
21         (WebCore::EditingBehavior::shouldSelectOnContextualMenuClick):
22         (WebCore::EditingBehavior::shouldExtendSelectionByWordOrLineAcrossCaret):
23         (WebCore::EditingBehavior::shouldRebalanceWhiteSpacesInSecureField):
24         * editing/EditingBehaviorTypes.h:
25         * editing/FrameSelection.cpp:
26         (WebCore::FrameSelection::positionForPlatform):
27         * page/Settings.cpp:
28         (WebCore::editingBehaviorTypeForPlatform):
29         * testing/InternalSettings.cpp:
30         (WebCore::InternalSettings::setEditingBehavior):
31
32 2014-09-16  Commit Queue  <commit-queue@webkit.org>
33
34         Unreviewed, rolling out r173670.
35         https://bugs.webkit.org/show_bug.cgi?id=136871
36
37         Creates layering violation (Requested by enrica on #webkit).
38
39         Reverted changeset:
40
41         "Move HTMLConverter from editing/cocoa to platform/cocoa."
42         https://bugs.webkit.org/show_bug.cgi?id=136474
43         http://trac.webkit.org/changeset/173670
44
45 2014-09-16  Eric Carlson  <eric.carlson@apple.com>
46
47         [Mac] MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput doesn't work with rotated movies
48         https://bugs.webkit.org/show_bug.cgi?id=136872
49
50         Reviewed by Tim Horton.
51
52         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
53         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator): Add logging.
54         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Apply the video track
55             preferred transform.
56
57 2014-09-16  Enrica Casucci  <enrica@apple.com>
58
59         Move HTMLConverter from editing/cocoa to platform/cocoa.
60         https://bugs.webkit.org/show_bug.cgi?id=136474
61
62         Reviewed by Benjamin Poulain.
63
64         This is a platform specific class and it belongs to the platform folder.
65
66         * WebCore.xcodeproj/project.pbxproj:
67         * editing/cocoa: Removed.
68         * editing/cocoa/HTMLConverter.h: Removed.
69         * editing/cocoa/HTMLConverter.mm: Removed.
70         * platform/cocoa/HTMLConverter.h: Copied from editing/cocoa/HTMLConverter.h.
71         * platform/cocoa/HTMLConverter.mm: Copied from editing/cocoa/HTMLConverter.mm.
72
73 2014-09-16  Enrica Casucci  <enrica@apple.com>
74
75         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
76         https://bugs.webkit.org/show_bug.cgi?id=136474
77
78         Reviewed by Benjamin Poulain.
79
80         This is the updated version of the patch that was landed in r173340.
81         This patch removes the use of PLATFORM(IOS) from TextAffinity.h
82         and removes the assumption that EAffinity values match NSSelectionAffinity
83         values. It also removes the includes in TextAffinity.h, creating the need to
84         include explicitly the files when necessary.
85
86         * editing/TextAffinity.h:
87         (kit): Deleted.
88         (core): Deleted.
89         * editing/cocoa/HTMLConverter.mm:
90         * page/mac/WebCoreFrameView.h:
91
92 2014-09-16  Beth Dakin  <bdakin@apple.com>
93
94         overflow:scroll should not leave space for a scroll corner with overlay scrollbars
95         https://bugs.webkit.org/show_bug.cgi?id=136861
96
97         Reviewed by Sam Weinig.
98
99         overflow:scroll should behave like overflow:auto when the scrollbar will render as 
100         an overlay scrollbar.
101
102         Re-name hasAutoVerticalScrollbar()/Horizontal to 
103         hasVerticalScrollbarWithAutoBehavior()/Horizontal, and return true for 
104         overflow:scroll scrollbars that will render as overlay scrollbars.
105         * rendering/RenderBox.cpp:
106         (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior):
107         (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior):
108         * rendering/RenderBox.h:
109         (WebCore::RenderBox::scrollsOverflowX):
110         (WebCore::RenderBox::scrollsOverflowY):
111         (WebCore::RenderBox::hasAutoVerticalScrollbar): Deleted.
112         (WebCore::RenderBox::hasAutoHorizontalScrollbar): Deleted.
113
114         Re-name overflowRequiresScrollbar() to styleRequiresScrollbar() and also re-name 
115         overflowDefinesAutomaticScrollbar() to styleDefinesAutomaticScrollbar(), and make         
116         these functions take into account the fact that overflow:scroll should act like 
117         overflow:auto when the scrollbar will render as an overlay scrollbar.
118         * rendering/RenderLayer.cpp:
119         (WebCore::styleRequiresScrollbar):
120         (WebCore::styleDefinesAutomaticScrollbar):
121         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
122         (WebCore::RenderLayer::calculateClipRects):
123
124 2014-09-16  peavo@outlook.com  <peavo@outlook.com>
125
126         [Curl] Sometimes incomplete or empty content can be loaded from cache.
127         https://bugs.webkit.org/show_bug.cgi?id=136855
128
129         Reviewed by Alex Christensen.
130
131         Sometimes, when two requests with the same url are started at the same time,
132         there is a possibility of loading incomplete or empty content from the cache.
133         This happens because the method CurlCacheEntry::isLoading() is returning the wrong status
134         in the time period between the headers are received, and the content data is received.
135         This can be fixed by using a flag for the load status, instead of checking whether
136         the content file is open. 
137
138         * platform/network/curl/CurlCacheEntry.cpp:
139         (WebCore::CurlCacheEntry::CurlCacheEntry): Initialize loading flag.
140         (WebCore::CurlCacheEntry::isLoading): Return loading flag.
141         (WebCore::CurlCacheEntry::didFail): Call new method to set loading flag.
142         (WebCore::CurlCacheEntry::didFinishLoading): Ditto.
143         (WebCore::CurlCacheEntry::setIsLoading): Added new method to set loading flag.
144         * platform/network/curl/CurlCacheEntry.h: Added loading flag and new method to set it.
145         * platform/network/curl/CurlCacheManager.cpp:
146         (WebCore::CurlCacheManager::didReceiveResponse): Call new method to set loading flag.
147
148 2014-09-16  Chris Dumez  <cdumez@apple.com>
149
150         Rename Node::nodeIndex() to computeNodeIndex() for clarity
151         https://bugs.webkit.org/show_bug.cgi?id=136826
152
153         Reviewed by Benjamin Poulain.
154
155         Rename Node::nodeIndex() to computeNodeIndex() to make it clear that
156         index is being computed and that calling this method is potentially
157         expensive.
158
159         No new tests, no behavior change.
160
161         * WebCore.exp.in:
162         * WebCore.order:
163         Rename exported symbol for Node::nodeIndex() as well.
164
165         * dom/Document.cpp:
166         (WebCore::Document::caretRangeFromPoint):
167         * dom/Node.cpp:
168         (WebCore::Node::computeNodeIndex):
169         (WebCore::Node::nodeIndex): Deleted.
170         * dom/Node.h:
171         * dom/NodeWithIndex.h:
172         (WebCore::NodeWithIndex::index):
173         Clean up implementation to reduce the scope of the Node variable and
174         to follow coding style (variable naming, spacing, star placement).
175
176         * dom/Position.cpp:
177         (WebCore::Position::computeOffsetInContainerNode):
178         (WebCore::Position::previous):
179         (WebCore::Position::next):
180         (WebCore::Position::upstream):
181         (WebCore::Position::downstream):
182         * dom/Position.h:
183         (WebCore::positionInParentBeforeNode):
184         (WebCore::positionInParentAfterNode):
185         * dom/Range.cpp:
186         (WebCore::Range::compareNode):
187         (WebCore::Range::intersectsNode):
188         (WebCore::Range::processContents):
189         (WebCore::Range::insertNode):
190         (WebCore::Range::setStartAfter):
191         (WebCore::Range::setEndBefore):
192         (WebCore::Range::setEndAfter):
193         (WebCore::Range::setStartBefore):
194         * dom/RangeBoundaryPoint.h:
195         (WebCore::RangeBoundaryPoint::ensureOffsetIsValid):
196         * editing/ApplyStyleCommand.cpp:
197         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
198         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
199         * editing/DeleteSelectionCommand.cpp:
200         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
201         * editing/Editor.cpp:
202         (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
203         * editing/FrameSelection.cpp:
204         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
205         * editing/ReplaceSelectionCommand.cpp:
206         (WebCore::ReplaceSelectionCommand::doApply):
207         * editing/TextIterator.cpp:
208         (WebCore::TextIterator::range):
209         (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement):
210         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
211         * editing/htmlediting.cpp:
212         (WebCore::updatePositionForNodeRemoval):
213         * html/HTMLTextFormControlElement.cpp:
214         (WebCore::setContainerAndOffsetForRange):
215         * page/DOMSelection.cpp:
216         (WebCore::DOMSelection::getRangeAt):
217         (WebCore::DOMSelection::containsNode):
218         (WebCore::DOMSelection::shadowAdjustedOffset):
219         * rendering/RenderBlock.cpp:
220         (WebCore::positionForPointRespectingEditingBoundaries):
221         * rendering/RenderTreeAsText.cpp:
222         (WebCore::nodePosition):
223
224 2014-09-16  Jer Noble  <jer.noble@apple.com>
225
226         Videos with controls enabled never receive 'dragstart' events.
227         https://bugs.webkit.org/show_bug.cgi?id=136837
228
229         Reviewed by Eric Carlson.
230
231         Fixes a crash regression introduced by r173631. Node::contains() has an interesting property of returning false
232         if `this` is NULL. Rather than depending on this behavior, explicitly NULL-check state.source and bail early.
233
234         * page/DragController.cpp:
235         (WebCore::DragController::startDrag):
236
237 2014-09-16  Csaba Osztrogon√°c  <ossy@webkit.org>
238
239         URTBF after r173659.
240
241         After r173659 convertToIntLength() is used only inside ENABLE(DASHBOARD_SUPPORT), so it
242         became unused function and caused build failure if ENABLE(DASHBOARD_SUPPORT) is false.
243
244         Source/WebCore/css/StyleResolver.cpp:1471:15: error: 'WebCore::Length WebCore::convertToIntLength(const WebCore::CSSPrimitiveValue*, const WebCore::CSSToLengthConversionData&)'
245         defined but not used [-Werror=unused-function] cc1plus: all warnings being treated as errors
246
247         * css/StyleResolver.cpp: Missing ENABLE(DASHBOARD_SUPPORT) guard added.
248
249 2014-09-14  Darin Adler  <darin@apple.com>
250
251         Scroll snap properties don't handle inherit and initial propertly.
252         https://bugs.webkit.org/show_bug.cgi?id=136643
253
254         Reviewed by Beth Dakin.
255
256         Restructured scroll snap code both to handle inherit and initial, and to reduce the
257         total code size a bit, fixing a few minor bugs along the way. Updated the regression
258         tests to cover the new parts.
259
260         * css/CSSComputedStyleDeclaration.cpp:
261         (WebCore::addValuesForNamedGridLinesAtIndex): Use a modern for loop.
262         (WebCore::scrollSnapDestination): Changed to take a LengthSize. Also streamlined.
263         (WebCore::scrollSnapPoints): Changed to to take a ScrollSnapPoints. Also streamlined and
264         added code to handle the "uses elements" case; serialize that as an identifier, not the
265         string "elements", fixing a minor bug.
266         (WebCore::scrollSnapCoordinates): Changed to take a Vector<LengthSize>. Also streamlined
267         and added code to handle the empty vector case; serialize that as an identifier, not the
268         string "none", fixing a minor bug.
269         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword): Use nullptr.
270         (WebCore::counterToCSSValue): Use nullptr.
271         (WebCore::ComputedStyleExtractor::styledNode): Use nullptr.
272         (WebCore::ComputedStyleExtractor::propertyValue): Use nullptr. Moved CSS_SCROLL_SNAP
273         to a more appropriate section of the switch statement. Made it just call through to
274         the functions above in a more straightforward way.
275         (WebCore::CSSComputedStyleDeclaration::getPropertyValue): Reversed logic to use early
276         return and to call emptyString.
277         (WebCore::CSSComputedStyleDeclaration::item): Use emptyString.
278         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand): Use nullptr.
279         (WebCore::CSSComputedStyleDeclaration::parentRule): Use nullptr.
280         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Use nullptr.
281         (WebCore::CSSComputedStyleDeclaration::getPropertyPriority): Use emptyString.
282         (WebCore::CSSComputedStyleDeclaration::getPropertyShorthand): Use emptyString.
283
284         * css/DeprecatedStyleBuilder.cpp:
285         (WebCore::ApplyPropertyMarqueeIncrement::applyValue): Use the switch statement for the
286         invalid value as well as for the valid values, rather than a separate if statement.
287         Call convertToLength directly rather than through a StyleResolver static member function.
288
289         * css/PropertySetCSSStyleDeclaration.cpp:
290         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Fixed a formatting mistake.
291
292         * css/StyleResolver.cpp:
293         (WebCore::convertToIntLength): Made this function local to this file instead of a
294         static member function.
295         (WebCore::convertToFloatLength): Ditto.
296         (WebCore::StyleResolver::parseSnapCoordinate): Added. Used to keep snap point parsing
297         code small.
298         (WebCore::StyleResolver::parseSnapCoordinatePair): Ditto.
299         (WebCore::StyleResolver::parseSnapPoints): Added. Parses an entire snap points property.
300         (WebCore::StyleResolver::applyProperty): Removed various bits of redundant code that
301         were not using the primitiveValue value already in a local variable. Added the
302         HANDLE_INHERIT_AND_INITIAL to all the scroll snap properties and updated since the
303         RenderStyle structure now more closely matches the CSS properties.
304
305         * css/StyleResolver.h: Updated for above changes, and removed a redundant "private:".
306
307         * page/scrolling/AxisScrollSnapOffsets.cpp:
308         (WebCore::appendChildSnapOffsets): Use auto& instead of SnapCoordinate since that type
309         is now gone. Updated since coordinates are now LengthSize.
310         (WebCore::updateFromStyle): Changed to take a reference instead of a pointer and
311         also to fetch the data from RenderStyle in a new way that more closely matches the
312         CSS properties.
313         (WebCore::updateSnapOffsetsForScrollableArea): Ditto. Also moved some memory allocation
314         inside if statements so we don't wastefully allocate and destroy.
315
316         * rendering/style/RenderStyle.cpp: Added an include of StyleScrollSnapPoints.h now
317         that the header doesn't include them. Moved the conditional includes out of the main
318         include paragraph (even though I don't think conditional includes are usually a good
319         idea).
320         (WebCore::RenderStyle::initialScrollSnapPointsX): Added.
321         (WebCore::RenderStyle::initialScrollSnapPointsY): Added.
322         (WebCore::RenderStyle::initialScrollSnapDestination): Added.
323         (WebCore::RenderStyle::initialScrollSnapCoordinates): Added.
324         (WebCore::RenderStyle::scrollSnapPointsX): Added.
325         (WebCore::RenderStyle::scrollSnapPointsY): Added.
326         (WebCore::RenderStyle::scrollSnapDestination): Added.
327         (WebCore::RenderStyle::scrollSnapCoordinates): Added.
328         (WebCore::RenderStyle::setScrollSnapPointsX): Added.
329         (WebCore::RenderStyle::setScrollSnapPointsY): Added.
330         (WebCore::RenderStyle::setScrollSnapDestination): Added.
331         (WebCore::RenderStyle::setScrollSnapCoordinates): Added.
332
333         * rendering/style/RenderStyle.h: Replaced the include of StyleScrollSnapPoints.h with
334         a forward declaration of ScrollSnapPoints. Removed getters and setters for the old
335         style properties and replaced them with new ones that match the CSS properties more
336         closely. Tweaked formatting a bit. Added initial value functions for the the scroll snap
337         properties.
338
339         * rendering/style/StyleRareNonInheritedData.cpp: Added include of StyleScrollSnapPoints.h
340         now that RenderStyle.h doesn't include it.
341         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Updated since
342         m_scrollSnapType is now unsigned instead of ScrollSnapType.
343
344         * rendering/style/StyleRareNonInheritedData.h: Fixed type of m_scrollSnapType to be
345         unsigned instead of ScrollSnapType. This should have been causing problems on Windows,
346         but I think we got lucky and had no detectable problems.
347
348         * rendering/style/StyleScrollSnapPoints.cpp:
349         (WebCore::ScrollSnapPoints::ScrollSnapPoints): Added.
350         (WebCore::operator==): Added overloads for both ScrollSnapPoints and also for
351         StyleScrollSnapPoints; using a free function for both since both have public data.
352         (WebCore::defaultScrollSnapDestination): Added, replaces a static member function.
353         (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Updated both the default
354         constructor and the copy constructor for the new design.
355
356         * rendering/style/StyleScrollSnapPoints.h: Added a ScrollSnapPoints struct for the
357         type of the snap-points-x and snap-points-y CSS properties. Changed the data members
358         of StyleScrollSnapPoints to match the various CSS properties rather than breaking
359         out all the data into separate data members.
360         (WebCore::StyleScrollSnapPoints::defaultRepeatOffset): Deleted. Replaced by the
361         default constructor for ScrollSnapPoints.
362         (WebCore::StyleScrollSnapPoints::defaultDestinationOffset): Deleted. Replaced by
363         a function inside the .cpp file.
364
365 2014-09-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>
366
367         [GStreamer] http/tests/media/video-auth.html is failing
368         https://bugs.webkit.org/show_bug.cgi?id=126619
369
370         Reviewed by Philippe Normand.
371
372         Test: http/tests/media/video-auth-cors.html
373
374         Use stored credentials when retrieving videos following image loading behavior
375         (i.e. stored credentials are always used except when in cors anonymous mode),
376         except that requesting credentials from user remains disabled for cross-origin requests.
377
378         Patch is covered by http/tests/media/video-auth.html.
379
380         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
381         (CachedResourceStreamingClient::CachedResourceStreamingClient): Enable using stored credentials except when using cors anonymous mode.
382
383 2014-09-16  Jinho Bang  <jinho.bang@samsung.com>
384
385         Add version of drawFocusIfNeeded that take a Path2D parameter.
386         https://bugs.webkit.org/show_bug.cgi?id=136846
387
388         Reviewed by Dirk Schulze.
389
390         Tests: fast/canvas/draw-focus-if-needed-with-path.html
391
392         * html/canvas/CanvasRenderingContext2D.cpp:
393         (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
394         (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
395         * html/canvas/CanvasRenderingContext2D.h:
396         * html/canvas/CanvasRenderingContext2D.idl:
397
398 2014-09-15  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
399
400         [GTK] Add WaylandDisplay
401         https://bugs.webkit.org/show_bug.cgi?id=136216
402
403         Reviewed by Martin Robinson.
404
405         Add the WaylandDisplay class. This class is used in the LayerTreeHostGtk,
406         in the WebProcess, and controls the connection to the nested Wayland
407         compositor in the UIProcess. Only one instance of the class is used in the
408         WebProcess, accessible via the static WaylandDisplay::instance() method.
409
410         The WaylandDisplay constructor performs the EGL initialization while also
411         querying the Wayland register, resulting in initializing client-side objects
412         that can interact with the wl_compositor and wl_webkitgtk interfaces
413         implemented in the nested Wayland compositor. The single class instance is
414         only deemed properly initialized if it picked up the Wayland interface objects
415         and has properly acquired the EGL display and config.
416
417         WaylandDisplay::createSurface() is called by the LayerTreeHostGtk during
418         its own initialization. The method creates a new wl_surface object via the
419         wl_compositor interface and a new wl_egl_window object that's based on that
420         surface. For the wl_egl_window object, we fall back to a width or height of 1
421         in case the passed-in value for either is 0. This avoids problems in Mesa
422         where widths or heights of 0 are not supported.
423
424         We associate the created surface with the passed-in widget ID, as provided
425         by LayerTreeHostGtk, via the wl_webkitgtk interface. This enables proper
426         mapping of Wayland surfaces and the GtkWidgets in the UIProcess and makes
427         it possible for the nested Wayland compositor to correctly determine which
428         GtkWidget has to be redrawn after some surface has been committed.
429
430         WaylandDisplay::createSharingGLContext() creates a new GLContextEGL object
431         that's to be used as a sharing context. The method creates a new surface
432         via the wl_compositor interface and uses it to create a dummy native EGL
433         window that's 1x1px in size. The GLContextEGL object is then created
434         through the static GLContextEGL::createWindowContext() method.
435
436         * PlatformGTK.cmake:
437         * platform/graphics/wayland/WaylandDisplay.cpp: Added.
438         (WebCore::WaylandDisplay::globalCallback):
439         (WebCore::WaylandDisplay::globalRemoveCallback):
440         (WebCore::WaylandDisplay::instance):
441         (WebCore::WaylandDisplay::WaylandDisplay):
442         (WebCore::WaylandDisplay::createSurface):
443         (WebCore::WaylandDisplay::createSharingGLContext):
444         * platform/graphics/wayland/WaylandDisplay.h: Added.
445         (WebCore::WaylandDisplay::nativeDisplay):
446         (WebCore::WaylandDisplay::eglDisplay):
447         * platform/graphics/wayland/WaylandSurface.cpp:
448         (WebCore::WaylandSurface::~WaylandSurface): Assert that the WaylandDisplay
449         instance is present before going on to destroy the surface resources.
450
451 2014-09-15  Chris Dumez  <cdumez@apple.com>
452
453         Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
454         https://bugs.webkit.org/show_bug.cgi?id=136844
455
456         Reviewed by Sam Weinig.
457
458         Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
459         for clarity as the argument is an Element.
460
461         No new tests, no behavior change.
462
463         * dom/ClassNodeList.h:
464         (WebCore::ClassNodeList::elementMatches):
465         (WebCore::ClassNodeList::nodeMatches): Deleted.
466         * dom/DocumentOrderedMap.cpp:
467         (WebCore::keyMatchesWindowNamedItem):
468         (WebCore::keyMatchesDocumentNamedItem):
469         * dom/Element.cpp:
470         (WebCore::Element::updateNameForDocument):
471         (WebCore::Element::updateIdForDocument):
472         * dom/LiveNodeList.cpp:
473         (WebCore::LiveNodeList::namedItem):
474         * dom/LiveNodeList.h:
475         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
476         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
477         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
478         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
479         * dom/NameNodeList.h:
480         (WebCore::NameNodeList::elementMatches):
481         (WebCore::NameNodeList::nodeMatches): Deleted.
482         * dom/TagNodeList.h:
483         (WebCore::TagNodeList::elementMatches):
484         (WebCore::HTMLTagNodeList::elementMatches):
485         (WebCore::TagNodeList::nodeMatches): Deleted.
486         (WebCore::HTMLTagNodeList::nodeMatches): Deleted.
487         * html/HTMLCollection.cpp:
488         (WebCore::isMatchingElement):
489         * html/HTMLNameCollection.cpp:
490         (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
491         (WebCore::WindowNameCollection::elementMatches):
492         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
493         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
494         (WebCore::DocumentNameCollection::elementMatches):
495         (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
496         (WebCore::WindowNameCollection::nodeMatches): Deleted.
497         (WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Deleted.
498         (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
499         (WebCore::DocumentNameCollection::nodeMatches): Deleted.
500         * html/HTMLNameCollection.h:
501         * html/LabelsNodeList.cpp:
502         (WebCore::LabelsNodeList::elementMatches):
503         (WebCore::LabelsNodeList::nodeMatches): Deleted.
504         * html/LabelsNodeList.h:
505         * html/RadioNodeList.cpp:
506         (WebCore::RadioNodeList::elementMatches):
507         (WebCore::RadioNodeList::nodeMatches): Deleted.
508         * html/RadioNodeList.h:
509
510 2014-09-15  Chris Dumez  <cdumez@apple.com>
511
512         Use an AtomicString as key for caching ClassNodeList objects
513         https://bugs.webkit.org/show_bug.cgi?id=136830
514
515         Reviewed by Benjamin Poulain.
516
517         Use an AtomicString as key for caching ClassNodeList objects instead of
518         a String. ClassNodeList is the only type using a String instead of an
519         AtomicString as key in the cache HashTable. This brings some
520         complexity.
521
522         I believe this was done to avoid unnecessarily atomizing the String,
523         for performance reasons. However, at the moment, the String gets
524         atomized anyway when constructing the ClassNodeList object. This is
525         because the ClassNodeList::m_classNames member is of SpaceSplitString
526         type and the SpaceSplitString constructor takes an AtomicString in
527         argument.
528
529         Using an AtomicString to cache ClassNodeLists simplifies the code quite
530         a bit and decreases the size of NodeListsNodeData as well.
531
532         Test: fast/dom/getElementsByClassName/conflict-tag-name.html
533
534         * WebCore.order:
535         Remove symbol corresponding to addCacheWithName() as it was removed.
536
537         * dom/ClassNodeList.cpp:
538         (WebCore::ClassNodeList::~ClassNodeList):
539         Update the constructor to take an AtomicString in argument instead of
540         a String, for clarity. The String gets atomized when initializing
541         m_classNames anyway.
542
543         (WebCore::ClassNodeList::ClassNodeList):
544         Call removeCacheWithAtomicName() instead of removeCacheWithName() now
545         that m_originalClassNames is an AtomicString.
546
547         * dom/ClassNodeList.h:
548         Use AtomicString instead of String type for classNames, in both the
549         constructor argument and the m_originalClassNames data member.
550
551         * dom/ContainerNode.cpp:
552         (WebCore::ContainerNode::getElementsByClassName):
553         Call addCacheWithAtomicName() instead of addCacheWithName() now that
554         addCacheWithName() has been removed.
555
556         * dom/Node.cpp:
557         (WebCore::NodeListsNodeData::invalidateCaches):
558         Stop invalidating m_nameCaches as this HashMap no longer exists.
559
560         * dom/NodeRareData.h:
561         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::hash):
562         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal):
563         (WebCore::NodeListsNodeData::isEmpty):
564         (WebCore::NodeListsNodeData::adoptDocument):
565         (WebCore::NodeListsNodeData::namedNodeListKey):
566         (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
567         (WebCore::NodeListsNodeData::addCacheWithName): Deleted.
568         (WebCore::NodeListsNodeData::removeCacheWithName): Deleted.
569         - Drop addCacheWithName() / removeCacheWithName() now that no NodeList
570           uses a String as HashMap key.
571         - Drop m_nameCaches now that ClassNodeLists are cached in
572           m_atomicNameCaches instead.
573         - Remove StringType template parameter and hardcode AtomicString
574           instead.
575
576 2014-09-15  Chris Dumez  <cdumez@apple.com>
577
578         Return early in SelectorChecker::checkOne() if selector.isAttributeSelector() is true
579         https://bugs.webkit.org/show_bug.cgi?id=136838
580
581         Reviewed by Benjamin Poulain.
582
583         Return early in SelectorChecker::checkOne() if selector.isAttributeSelector()
584         is true and the selector matched. Previously, we were only returning early if
585         the selector did not match and we were falling through if it did. This means
586         that we ended up doing the 2 if() checks below in the method unnecessarily:
587         - selector.m_match == CSSSelector::PseudoClass
588         - selector.m_match == CSSSelector::PseudoElement
589
590         No new tests, no behavior change.
591
592         * css/SelectorChecker.cpp:
593         (WebCore::SelectorChecker::checkOne):
594
595 2014-09-15  Chris Dumez  <cdumez@apple.com>
596
597         Un-inline the Node constructor
598         https://bugs.webkit.org/show_bug.cgi?id=136842
599
600         Reviewed by Benjamin Poulain.
601
602         Un-inline the Node constructor as it does not seem to impact
603         performance, based on my testing:
604         http://dromaeo.com/?id=226992,226998
605
606         This reduces the stripped binary size by ~4Kb.
607
608         No new tests, no behavior change.
609
610         * dom/Document.h:
611         (WebCore::Node::Node): Deleted.
612         * dom/Node.cpp:
613         (WebCore::Node::Node):
614
615 2014-09-15  Shivakumar JM  <shiva.jm@samsung.com>
616
617         Web Core: Websocket state should be set to closed in didReceiveMessage call back.
618         https://bugs.webkit.org/show_bug.cgi?id=136219
619
620         Reviewed by Alexey Proskuryakov.
621
622         Set the Websocket state to closed in didReceiveMessage call back.
623
624         Test: http/tests/websocket/tests/hybi/error-event-ready-state.html
625
626         * Modules/websockets/WebSocket.cpp:
627         (WebCore::WebSocket::didReceiveMessageError):
628
629 2014-09-15  Jon Honeycutt  <jhoneycutt@apple.com>
630
631         Naming clean-up.
632
633         Rubber-stamped by Andy Estes.
634
635         * html/HTMLFormElement.cpp:
636         (WebCore::HTMLFormElement::requestAutocomplete):
637         (WebCore::HTMLFormElement::finishRequestAutocomplete):
638         Remove superfluous "AutocompleteResult".
639
640         * html/HTMLFormElement.h:
641         Ditto.
642
643 2014-09-15  Alexey Proskuryakov  <ap@apple.com>
644
645         Crash when logging in to optionshouse.com
646         https://bugs.webkit.org/show_bug.cgi?id=136834
647
648         Reviewed by Anders Carlsson.
649
650         No test, because I couldn't make one. I don't have a way to reproduce first-hand.
651
652         * platform/network/cf/SocketStreamHandleCFNet.cpp:
653         (WebCore::SocketStreamHandle::readStreamCallback):
654         (WebCore::SocketStreamHandle::writeStreamCallback):
655
656 2014-09-15  Jer Noble  <jer.noble@apple.com>
657
658         Unreviewed build fix for 32-bit builds.
659
660         Make casts from unsigned long long -> size_t explicit, rather than implicit. Also
661         make CARingBuffer be protected by USING_MEDIA_TOOLBOX so ports without that flag
662         won't try to compile unused code.
663
664         * platform/audio/mac/CARingBuffer.cpp:
665         (WebCore::CARingBuffer::fetch):
666         * platform/audio/mac/CARingBuffer.h:
667         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
668         (WebCore::AudioSourceProviderAVFObjC::provideInput):
669
670 2014-09-15  Jer Noble  <jer.noble@apple.com>
671
672         Unreviewed logic fix from r173631. Logic for includeShadowDOM was reversed.
673
674         * page/DragController.cpp:
675         (WebCore::DragController::startDrag):
676
677 2014-09-15  Jer Noble  <jer.noble@apple.com>
678
679         Videos with controls enabled never receive 'dragstart' events.
680         https://bugs.webkit.org/show_bug.cgi?id=136837
681
682         Reviewed by Simon Fraser.
683
684         When initiating a drag, the DragController checks whether the hit-tested element at a
685         drag location is a child of the drag source, and bails if early if that is not the case.
686         For a <video> element with controls, the hit-tested element is an element within the
687         <video> element's Shadow DOM. Because the DragController uses a method which does not
688         take Shadow DOM into account when determining a child-parent relationship, this test fails
689         and all drag operations fail as well.
690
691         For <video> elements only, when testing whether the drag source is an ancestor of the
692         hit-tested element, use containsIncludingShadowDOM() instead of contains(). To ensure that
693         the controls are still usable when a drag listener is active on a <video> element, mark
694         the controls as a draggable element, but simply call preventDefault() in the controls'
695         'dragstart' handler, ensuring the timeline and volume controls are themselves still draggable.
696
697         * Modules/mediacontrols/mediaControlsApple.css:
698         (audio::-webkit-media-controls-panel):
699         * Modules/mediacontrols/mediaControlsApple.js:
700         (Controller.prototype.createControls):
701         (Controller.prototype.handlePanelDragStart):
702         * page/DragController.cpp:
703         (WebCore::DragController::startDrag):
704
705 2014-09-15  Roger Fong  <roger_fong@apple.com>
706
707         Unreviewed. Add an unimplemented case to handle CSSPropertyWebkitInitialLetter so we don't get an assertion failure.
708
709         * css/SVGCSSStyleSelector.cpp:
710         (WebCore::StyleResolver::applySVGProperty):
711
712 2014-09-15  Jer Noble  <jer.noble@apple.com>
713
714         [Mac] Support audioSourceProvider() in MediaPlayerPrivateAVFoundationObjC
715         https://bugs.webkit.org/show_bug.cgi?id=135042
716
717         Reviewed by Eric Carlson.
718
719         Add support for AudioSourceProvider in MediaPlayerPrivateAVFoundationObjC, thereby
720         supporting MediaElementAudioSourceNode.
721
722         Import the CARingBuffer from CoreAudio sample code, making the necessary modifications
723         for WebKit style and coding conventions. The threading assumptions for this class are
724         that there will be a single writer thread and a single reader thread.
725
726         * platform/audio/mac/CARingBuffer.cpp: Added.
727         (WebCore::CARingBuffer::create): Create a unique_ptr.
728         (WebCore::CARingBuffer::CARingBuffer): Simple constructor.
729         (WebCore::CARingBuffer::~CARingBuffer): Simple destructor.
730         (WebCore::CARingBuffer::allocate): Initialize the buffers and time bounds structures.
731         (WebCore::CARingBuffer::deallocate): Destroy same.
732         (WebCore::ZeroRange): Static utility method.
733         (WebCore::StoreABL): Ditto.
734         (WebCore::FetchABL): Ditto.
735         (WebCore::ZeroABL): Ditto.
736         (WebCore::CARingBuffer::store): Store the passed in buffer in the ring buffer, wrapping
737             if necessary.
738         (WebCore::CARingBuffer::setTimeBounds): Set the new time bounds by incrementing the
739             bounds index locally, filling in the new values, then atomically incrementing the
740             reader-visible index.
741         (WebCore::CARingBuffer::getTimeBounds): Get the new time bounds by masking the time
742             bounds index, and using it as an offset to the time bounds array. Protect against
743             CPU starvation on the reading thread by checking the index against the stored
744             index in the array entry. This check will fail if the writing thread has wrapped
745             more than the size of the array.
746         (WebCore::CARingBuffer::clipTimeBounds): Clamp the passed values to the available bounds.
747         (WebCore::CARingBuffer::startFrame): Simple accessor.
748         (WebCore::CARingBuffer::endFrame): Ditto.
749         (WebCore::CARingBuffer::fetch): Read an audio buffer list from the ring buffer, possbily
750             wrapping around to the start of the ring buffer.
751         * platform/audio/mac/CARingBuffer.h: Added.
752         (WebCore::CARingBuffer::numberOfChannels): Simple accessor.
753         (WebCore::CARingBuffer::frameOffset): Ditto.
754         (WebCore::CARingBuffer::TimeBounds::TimeBounds): Struct holding the start and end frame values.
755
756         Add an implementation of AudioSourceProvider, using AVAudioMix and MTAudioProcessingTap
757         to tap an AVPlayerItem's audio output and feed it to a MediaElementAudioSourceNode.
758
759         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h: Added.
760         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: Added.
761         (WebCore::AudioSourceProviderAVFObjC::create): Simple factory.
762         (WebCore::AudioSourceProviderAVFObjC::AudioSourceProviderAVFObjC): Simple constructor.
763         (WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC): Simple destructor.
764         (WebCore::AudioSourceProviderAVFObjC::provideInput): Push audio into the ring buffer.
765         (WebCore::AudioSourceProviderAVFObjC::setClient): Call destroyMix()/createMix() as appropriate.
766         (WebCore::AudioSourceProviderAVFObjC::setPlayerItem): Ditto.
767         (WebCore::AudioSourceProviderAVFObjC::destroyMix): Detach and destroy the AVAudioMix and tap.
768         (WebCore::AudioSourceProviderAVFObjC::createMix): Set up the AVAudioMix and tap and attach to
769             the AVPlayerItem.
770         (WebCore::AudioSourceProviderAVFObjC::initCallback): Pass to class method.
771         (WebCore::AudioSourceProviderAVFObjC::finalizeCallback): Ditto.
772         (WebCore::AudioSourceProviderAVFObjC::prepareCallback): Ditto.
773         (WebCore::AudioSourceProviderAVFObjC::unprepareCallback): Ditto.
774         (WebCore::AudioSourceProviderAVFObjC::processCallback): Ditto.
775         (WebCore::AudioSourceProviderAVFObjC::init): Set up the storage pointer for the tap.
776         (WebCore::AudioSourceProviderAVFObjC::finalize): No-op.
777         (WebCore::operator==): Compare two AudioStreamBasicDescription objects.
778         (WebCore::operator!=): Ditto.
779         (WebCore::AudioSourceProviderAVFObjC::prepare): Create an AudioCoverter object if necessary,
780             create the ring buffer, and notify the client of format changes.
781         (WebCore::AudioSourceProviderAVFObjC::unprepare): Destroy same.
782         (WebCore::AudioSourceProviderAVFObjC::process): Copy samples out of the ring buffer,
783             format converting them if necessary. Mute original audio.
784
785         Create the AudioSourceProviderAVFObjC object and notify it when the current AVPlayerItem changes.
786
787         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
788         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
789         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
790         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
791         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):
792
793         Enable SOFT_LINK_MAY_FAIL on the Mac platform.
794
795         * platform/mac/SoftLinking.h:
796
797         Add new files to the project.
798
799         * WebCore.xcodeproj/project.pbxproj:
800
801 2014-09-15  Chris Dumez  <cdumez@apple.com>
802
803         Avoid redundant isElementNode() checks in Traversal<HTML*Element> / Traversal<SVG*Element>
804         https://bugs.webkit.org/show_bug.cgi?id=136719
805
806         Reviewed by Darin Adler.
807
808         Avoid redundant isElementNode() checks in Traversal<HTML*Element> /
809         Traversal<SVG*Element>.  We used to iterate through Elements, and then
810         call isElementOfType<HTML*Element>()  on each Element. This made sense
811         because hasTagName() used to be defined on Element. However, after
812         http://trac.webkit.org/changeset/165699, hasTagName() is now defined on
813         Node for HTMLQualifiedName / SVGQualifiedName arguments.
814
815         Node::hasTagName(HTMLQualifiedName) basically does the following check
816         "isHTMLElement() &&  toHTMLElement(*this).hasTagName(tagName)". As a
817         consequence, doing an isElementNode() check is now redundant as
818         isHTMLElement() is defined on Node.
819
820         This patch adds a template parameter to isElementOfType() so that it can
821         take any type in argument (particulaly Node, Element, HTMLElement,
822         SVGElement, MathMLElement), not just an Element. I had to add an
823         ElementTypeCastTraits struct to support partial specialization as C++
824         does not support partial specialization of template functions.
825         This patch also updates Traversal<ElementType> so that the methods use
826         NodeTraversal internally instead of Traversal<ElementType>. As a result,
827         we now iterate over Nodes (not Elements) and call the new
828         isElementOfType<ElementType>(Node) helpers (which are efficient after
829         r165699).
830
831         Before the patch, the code ended up doing the following checks for
832         Traversal<HTML*element>:
833         node.isElementNode() && toElement(node).isHTMLElement()
834             && toHTMLElement(node).hasTagName(HTMLNames::fooTag)
835
836         After the patch, the code only does:
837         node.isHTMLElement()
838             && toHTMLElement(node).hasTagName(HTMLNames::fooTag)
839
840         No new tests, no behavior change.
841
842         * dom/Element.h:
843         (WebCore::Element>):
844         (WebCore::isElementOfType):
845         Add template parameter to isElementOfType() function so that it can
846         handle any argument type, not just Elements. Also introduce an
847         ElementTypeCastTraits struct that is called by isElementOfType()
848         function so that we can so partial template specialization.
849
850         * dom/ElementTraversal.h:
851         (WebCore::Traversal<ElementType>::firstWithinTemplate):
852         (WebCore::Traversal<ElementType>::lastWithinTemplate):
853         (WebCore::Traversal<ElementType>::nextTemplate):
854         (WebCore::Traversal<ElementType>::previousTemplate):
855         Use NodeTraversal API internally instead of Traversal<Element> to avoid
856         redundant isElementNode() checks.
857
858         (WebCore::Traversal<Element>::lastWithinTemplate): Deleted.
859         The code is now identical to the generic version.
860
861         (WebCore::Traversal<Element>::previousTemplate): Deleted.
862         The code is now identical to the generic version.
863
864         * dom/make_names.pl:
865         (printTypeHelpers):
866         - Generate template specializations for ElementTypeCastTraits struct
867           instead of isElementOfType(). This avoids having to provide overloads
868           for specific argument types (e.g. Node, Element, HTMLElement, ...).
869         - Share more code between HTML code path and the other path (for SVG,
870           MTHML).
871
872         * html/HTMLElement.h:
873         (WebCore::HTMLElement>):
874         Provide HTMLElement template specialization for ElementTypeCastTraits
875         struct instead of isElementOfType().
876
877         * html/HTMLFormControlElement.h:
878         (WebCore::HTMLFormControlElement>):
879         Provide HTMLFormControlElement template specialization for
880         ElementTypeCastTraits struct instead of isElementOfType().
881
882         * html/HTMLFrameElementBase.h:
883         (WebCore::isHTMLFrameElementBase):
884         - Remove helper taking an Element in argument as it does not bring any
885           benefit. Instead, update the overload taking a Node in argument to
886           remove the unnecessary isElementNode() check as isHTMLFrameElement(Node)
887           is now efficient.
888         - Add an overload taking an HTMLElement in argument so that we can bypass
889           the isHTMLElement() check when we know the input is an HTMLElement.
890
891         * html/HTMLMediaElement.h:
892         (WebCore::HTMLMediaElement>):
893         Provide HTMLMediaElement template specialization for ElementTypeCastTraits
894         struct instead of isElementOfType().
895
896         * html/HTMLPlugInImageElement.h:
897         (WebCore::HTMLPlugInImageElement>):
898         Provide HTMLPlugInImageElement template specialization for
899         ElementTypeCastTraits struct instead of isElementOfType().
900
901         * html/LabelableElement.h:
902         (WebCore::LabelableElement>):
903         Provide LabelableElement template specialization for ElementTypeCastTraits
904         struct instead of isElementOfType().
905
906         * mathml/MathMLElement.h:
907         (WebCore::MathMLElement>):
908         Provide MathMLElement template specialization for ElementTypeCastTraits
909         struct for consistency with HTMLElement / SVGElement.
910
911         * svg/SVGElement.h:
912         (WebCore::SVGElement>):
913         - Provide SVGElement template specialization for ElementTypeCastTraits
914           struct instead of isElementOfType().
915         - include SVGElementTypeHelpers.h at the end of the file (similarly to
916           what is already done in HTMLElement.h because
917           isElementOfType(const SVGElement&) needs to be defiend because the
918           include.
919
920         * svg/SVGFilterPrimitiveStandardAttributes.h:
921         (WebCore::SVGFilterPrimitiveStandardAttributes>):
922         Provide SVGFilterPrimitiveStandardAttributes template specialization for
923         ElementTypeCastTraits struct instead of isElementOfType().
924
925         * svg/animation/SVGSMILElement.h:
926         (WebCore::SVGSMILElement>):
927         Provide SVGSMILElement template specialization for ElementTypeCastTraits
928         struct instead of isElementOfType().
929
930
931 2014-08-07  Sergio Villar Senin  <svillar@igalia.com>
932
933         [CSS Grid Layout] Sort items by span when resolving content-based track sizing functions
934         https://bugs.webkit.org/show_bug.cgi?id=135701
935
936         Reviewed by Darin Adler.
937
938         Section 10.4 of the specs mentions that we should first treat non
939         spanning items and then incrementally proceed with items with
940         greater spans when resolving the track breaths in the Track Sizing
941         Algorithm.
942
943         As a nice side effect we're removing the multiple processing of
944         spanning grid items caused by GridIterator (it returns the same
945         item as many times as the number of cells it spans). This adds a
946         ~4% performance penalty in auto-grid-lots-of-data.html mainly due
947         to the use of a hash to remove duplicates.
948
949         Test: fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html
950
951         * rendering/RenderGrid.cpp:
952         (WebCore::RenderGrid::gridItemSpan):
953         (WebCore::gridItemWithSpanSorter):
954         (WebCore::uniquePointerInPair):
955         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
956         * rendering/RenderGrid.h:
957
958 2014-09-15  Zan Dobersek  <zdobersek@igalia.com>
959
960         [GTK][CMake] Build WebCore with Wayland-specific include directories, libraries
961         https://bugs.webkit.org/show_bug.cgi?id=136815
962
963         Reviewed by Philippe Normand.
964
965         * PlatformGTK.cmake: Add the platform/graphics/wayland/ directory to the list of
966         WebCore's include directories. Add include directories of the Wayland dependency
967         to the list of WebCore's include directories. Same for the Wayland libraries.
968
969 2014-09-15  peavo@outlook.com  <peavo@outlook.com>
970
971         [WinCairo] Make it easier to enable/disable GStreamer.
972         https://bugs.webkit.org/show_bug.cgi?id=135766
973
974         Reviewed by Brent Fulgham.
975
976         Make it possible to enable/disable GStreamer by editing the new user macro ENABLE_GSTREAMER_WINCAIRO.
977
978         * WebCore.vcxproj/WebCoreDebugWinCairo.props: Import GStreamer property file.
979         * WebCore.vcxproj/WebCoreReleaseWinCairo.props: Ditto.
980
981 2014-09-12  Sergio Villar Senin  <svillar@igalia.com>
982
983         [CSS Grid Layout] Crash at CSSParser::parseGridTemplateRowsAndAreas
984         https://bugs.webkit.org/show_bug.cgi?id=136778
985
986         Reviewed by Darin Adler.
987
988         An empty list of grid line names (represented by "()") does not
989         add anything to the list of parsed values. That's why trying to
990         concatenate an adjacent list of grid line names was failing,
991         because we were trying to concatenate a list with the last parsed
992         CSSValue which was not the expected grid line names list.
993
994         * css/CSSParser.cpp:
995         (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
996         (WebCore::CSSParser::parseGridLineNames):
997         * css/CSSParser.h:
998
999 2014-09-15  Andres Gomez  <agomez@igalia.com>
1000
1001         [GStreamer] don't send transferMode HTTP header
1002         https://bugs.webkit.org/show_bug.cgi?id=136781
1003
1004         Reviewed by Philippe Normand.
1005
1006         No header at all is better than having the wrong header as DLNA
1007         mandates that a missing header has to be tolerated while a wrong
1008         header is an error.
1009
1010         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1011         (webKitWebSrcStart):
1012         * platform/network/HTTPHeaderNames.in:
1013
1014 2014-09-14  Christophe Dumez  <cdumez@apple.com>
1015
1016         Fix post-mortem nits for r173528 & r173549
1017         https://bugs.webkit.org/show_bug.cgi?id=136808
1018
1019         Reviewed by Darin Adler.
1020
1021         Fix post-mortem nits for r173528 & r173549.
1022
1023         No new tests, no behavior change.
1024
1025         * accessibility/AccessibilityNodeObject.cpp:
1026         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
1027         - Use auto* instead of more specific types.
1028         - Use fastGetAttribute() instead of getAttribute() as this is
1029           supported for the "title" attribute.
1030
1031         * editing/FrameSelection.cpp:
1032         (WebCore::FrameSelection::setSelectionFromNone):
1033         Use auto* instead of more specific types.
1034
1035 2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1036
1037         Introduce FONT_DATA_TYPE_CASTS, and use it
1038         https://bugs.webkit.org/show_bug.cgi?id=136766
1039
1040         Reviewed by Darin Adler.
1041
1042         As a step to use toFoo, this patch introduces FONT_DATA_TYPE_CASTS macro for toFooFontData().
1043         This will help to detect wrong type cast.
1044
1045         * platform/graphics/FontData.h:
1046         * platform/graphics/FontGlyphs.cpp:
1047         (WebCore::FontGlyphs::releaseFontData):
1048         (WebCore::FontGlyphs::determinePitch):
1049         * platform/graphics/GlyphPageTreeNode.cpp:
1050         (WebCore::GlyphPageTreeNode::initializePage):
1051         * platform/graphics/SegmentedFontData.h:
1052         * platform/graphics/SimpleFontData.h:
1053         * platform/graphics/mac/SimpleFontDataMac.mm:
1054         (WebCore::SimpleFontData::getCompositeFontReferenceFontData):
1055
1056 2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1057
1058         Generate toCSSStyleSheet using STYLE_SHEET_TYPE_CASTS
1059         https://bugs.webkit.org/show_bug.cgi?id=136774
1060
1061         Reviewed by Darin Adler.
1062
1063         As a step to use toFoo, this patch introduces STYLE_SHEET_TYPE_CASTS for toCSSStyleSheet().
1064         This will help to detect wrong type cast. Additonally this patch helps to remove argument type of RefPtr.
1065
1066         No new tests, no behavior changes.
1067
1068         * bindings/gobject/WebKitDOMPrivate.cpp:
1069         (WebKit::wrap):
1070         * css/CSSStyleSheet.h:
1071         * css/StyleSheet.h:
1072         * dom/DocumentStyleSheetCollection.cpp:
1073         (WebCore::filterEnabledNonemptyCSSStyleSheets):
1074         * dom/ProcessingInstruction.cpp:
1075         (WebCore::ProcessingInstruction::parseStyleSheet):
1076         * inspector/InspectorCSSAgent.cpp:
1077         (WebCore::InspectorCSSAgent::getAllStyleSheets):
1078         (WebCore::InspectorCSSAgent::collectStyleSheets):
1079
1080 2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1081
1082         Generate toFooElementData() using ELEMENT_DATA_TYPE_CASTS
1083         https://bugs.webkit.org/show_bug.cgi?id=136775
1084
1085         Reviewed by Darin Adler.
1086
1087         As a step to use toFoo, this patch introduces ELEMENT_DATA_TYPE_CASTS for toFooElementData().
1088         This will help to detect wrong type cast. Additonally this patch helps to remove argument type of RefPtr.
1089
1090         No new tests, no behavior changes.
1091
1092         * dom/Element.cpp:
1093         (WebCore::Element::cloneAttributesFromElement):
1094         (WebCore::Element::createUniqueElementData):
1095         * dom/ElementData.cpp:
1096         (WebCore::ElementData::destroy):
1097         * dom/ElementData.h:
1098         (WebCore::ElementData::length):
1099         (WebCore::ElementData::attributeBase):
1100         (WebCore::ElementData::presentationAttributeStyle):
1101         (WebCore::ElementData::attributesIterator):
1102         * svg/SVGSVGElement.cpp:
1103         (WebCore::SVGSVGElement::setupInitialView): Remove static_cast<SVGSVGElement*>
1104
1105 2014-09-14  Chris Dumez  <cdumez@apple.com>
1106
1107         Remove unnecessary overloads taking a ContainerNode in Element Traversal
1108         https://bugs.webkit.org/show_bug.cgi?id=136767
1109
1110         Reviewed by Darin Adler.
1111
1112         Remove unnecessary overloads taking a ContainerNode in Element Traversal.
1113         Several of those don't bring any performance improvements as the needed
1114         methods are defined on Node (not ContainerNode).
1115
1116         No new tests, no behavior change.
1117
1118         * dom/ElementTraversal.h:
1119         (WebCore::Traversal<Element>::previous):
1120         NodeTraversal::previous() takes a const Node* in argument so the
1121         ContainerNode overload is not needed.
1122
1123         (WebCore::Traversal<ElementType>::previous):
1124         Unnecessary now that Traversal<Element>::previous() takes a const Node*
1125         in argument.
1126
1127         (WebCore::Traversal<ElementType>::nextSibling):
1128         nextSibling() is defined on Node, not ContainerNode, so the overload
1129         is not needed.
1130
1131         (WebCore::Traversal<ElementType>::previousSibling):
1132         previousSibling() is defined on Node, not ContainerNode, so the overload
1133         is not needed.
1134
1135         (WebCore::Traversal<Element>::previousTemplate): Deleted.
1136         (WebCore::Traversal<ElementType>::previousTemplate): Deleted.
1137         (WebCore::Traversal<ElementType>::nextSiblingTemplate): Deleted.
1138         (WebCore::Traversal<ElementType>::previousSiblingTemplate): Deleted.
1139         No need to have those functions templated anymore.
1140
1141 2014-09-14  Daniel Bates  <dabates@apple.com>
1142
1143         [iOS] Attempt to fix the iOS build after <http://trac.webkit.org/changeset/173606>
1144         (https://bugs.webkit.org/show_bug.cgi?id=136789)
1145
1146         Substitute Node::countChildNodes() for Node::childNodeCount() in more places.
1147
1148         Although I updated a comment in WebCore::lastOffsetForEditing() (defined in file
1149         editing/htmlediting.cpp) to refer to Node::countChildNodes(), I'm unclear what the
1150         comment is trying to explain that isn't otherwise explained by the code or the
1151         comments that precede this function. Specifically, I don't understand the use of
1152         the word "preempt" in the comment. We should look to improve the readability of
1153         this comment.
1154
1155         * editing/htmlediting.cpp:
1156         (WebCore::lastOffsetForEditing):
1157         * page/ios/FrameIOS.mm:
1158         (WebCore::Frame::interpretationsForCurrentRoot):
1159
1160 2014-09-14  Chris Dumez  <cdumez@apple.com>
1161
1162         Drop NodeTraversal::nextSkippingChildren() overload taking a ContainerNode
1163         https://bugs.webkit.org/show_bug.cgi?id=136764
1164
1165         Reviewed by Darin Adler.
1166
1167         Drop NodeTraversal::nextSkippingChildren() overload taking a
1168         ContainerNode argument. This one does not bring any performance
1169         improvement because nextSibling() is defined on Node and
1170         nextAncestorSibling() takes a Node in argument.
1171
1172         Also remove the overload in ElementTraversal as it no longer makes
1173         sense after this change.
1174
1175         No new tests, no behavior change.
1176
1177         * dom/ElementTraversal.h:
1178         (WebCore::Traversal<ElementType>::nextSkippingChildren):
1179         (WebCore::Traversal<ElementType>::nextSkippingChildrenTemplate): Deleted.
1180         * dom/NodeTraversal.h:
1181         (WebCore::NodeTraversal::nextSkippingChildren):
1182         (WebCore::NodeTraversal::next):
1183         (WebCore::NodeTraversal::traverseNextSkippingChildrenTemplate): Deleted.
1184
1185 2014-09-14  Chris Dumez  <cdumez@apple.com>
1186
1187         Rename Node::childNodeCount() to countChildNodes() and avoid inefficient uses
1188         https://bugs.webkit.org/show_bug.cgi?id=136789
1189
1190         Reviewed by Darin Adler.
1191
1192         Rename Node::childNodeCount() to countChildNodes() to make it clearer
1193         that the method actually computes the result rather than returning a
1194         cached value.
1195
1196         This patch also introduces a new Node::hasOneChild() method that is
1197         used to check if a Node has a single child. This is much more efficient
1198         than calling countChildNodes() == 1.
1199
1200         The patch also leverages Node::hasChildNodes() in a lot of places
1201         instead of calling countChildNodes().
1202
1203         Finally, in a couple of places, we now use childrenOfType() to iterate
1204         over children more efficient than using countChildNodes() and
1205         childNode(index).
1206
1207         No new tests, no behavior change.
1208
1209         * WebCore.exp.in:
1210         * WebCore.order:
1211         Update the name of the exposed symbol for countChildNodes().
1212
1213         * dom/ContainerNode.cpp:
1214         (WebCore::ContainerNode::removeChildren):
1215         (WebCore::ContainerNode::countChildNodes):
1216         (WebCore::ContainerNode::childNodeCount): Deleted.
1217         Rename childNodeCount() to countChildNodes() to make it obvious it is
1218         computing the result rather than returning a cached value.
1219
1220         * dom/ContainerNode.h:
1221         (WebCore::ContainerNode::hasOneChild):
1222         Introduce an efficient way to check in a ContainerNode has a single
1223         child as "countChildNodes() == 1" calls were frequent and inefficient.
1224
1225         (WebCore::Node::countChildNodes):
1226         (WebCore::Node::childNodeCount): Deleted.
1227         * dom/Node.h:
1228         Rename childNodeCount() to countChildNodes().
1229
1230         * dom/Position.cpp:
1231         (WebCore::Position::parentAnchoredEquivalent):
1232         * dom/Position.h:
1233         (WebCore::lastOffsetInNode):
1234         * dom/Range.cpp:
1235         Mechanical renaming.
1236
1237         (WebCore::lengthOfContentsInNode):
1238         * editing/ApplyStyleCommand.cpp:
1239         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1240         (WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
1241         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
1242         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1243         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
1244         Call hasChildNodes() rather than countChildNodes() as it is a lot more
1245         efficient.
1246
1247         * editing/Editor.cpp:
1248         (WebCore::Editor::setTextAsChildOfElement):
1249         (WebCore::Editor::rangeOfString):
1250         (WebCore::Editor::countMatchesForText):
1251         * editing/FrameSelection.cpp:
1252         (WebCore::FrameSelection::elementRangeContainingCaretSelection):
1253         Mechanical renaming.
1254
1255         * editing/ReplaceSelectionCommand.cpp:
1256         (WebCore::ReplaceSelectionCommand::insertAsListItems):
1257         Call hasOneChild() instead of countChildNodes() == 1. Also remove
1258         redundant listElement->hasChildNodes() check as hasOneChild() takes
1259         care of this already.
1260
1261         * editing/TextIterator.cpp:
1262         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
1263         * editing/VisibleUnits.cpp:
1264         (WebCore::endOfDocument):
1265         * editing/htmlediting.cpp:
1266         (WebCore::lastOffsetForEditing):
1267         Mechanical renaming.
1268
1269         (WebCore::visiblePositionBeforeNode):
1270         (WebCore::visiblePositionAfterNode):
1271         Call hasChildNodes() instead of converting countChildNodes() to a
1272         boolean.
1273
1274         * editing/markup.cpp:
1275         (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
1276         Call !hasChildNodes() instead of !countChildNodes().
1277
1278         (WebCore::isPlainTextMarkup):
1279         - Drop !node->isElementNode() check as !node->hasTagName(divTag) takes
1280           care of discarding non-Element Nodes already.
1281         - Cast the Node to an HTMLDivElement as soon as possible to avoid
1282           calling calling the slower Node APIs in several cases.
1283         - Call hasOneChild() instead of countChildNodes() == 1.
1284
1285         * html/HTMLDivElement.h:
1286         * html/HTMLTagNames.in:
1287         Generate casting helpers as I use them in WebCore::isPlainTextMarkup().
1288
1289         * html/HTMLScriptElement.cpp:
1290         (WebCore::HTMLScriptElement::setText):
1291         * html/HTMLTitleElement.cpp:
1292         (WebCore::HTMLTitleElement::setText):
1293         Call hasOneChild() / hasChildNodes() instead of countChildNodes().
1294
1295         * html/shadow/MediaControlElements.cpp:
1296         (WebCore::MediaControlTimelineContainerElement::setTimeDisplaysHidden):
1297         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1298         Use childrenOfType<Element>() to iterate of child Elements instead of
1299         slower childNodeCount() + childNode(index) + isElementNode(). Also,
1300         childNodeCount() was not even cached before the loop.
1301
1302         * html/track/VTTRegion.cpp:
1303         (WebCore::VTTRegion::displayLastTextTrackCueBox):
1304         Use childrenOfType<Element>() to iterate of child Elements, thus
1305         avoiding calling childNodeCount() + childNode(index).
1306
1307         * page/DOMSelection.cpp:
1308         (WebCore::DOMSelection::extend):
1309         (WebCore::DOMSelection::selectAllChildren):
1310         * rendering/RenderObject.cpp:
1311         (WebCore::RenderObject::caretMaxOffset):
1312         * rendering/RenderReplaced.cpp:
1313         (WebCore::RenderReplaced::isSelected):
1314         * rendering/RenderView.cpp:
1315         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1316         Mechanical renaming.
1317
1318 2014-09-13  Chris Dumez  <cdumez@apple.com>
1319
1320         Un-inline Element constructor
1321         https://bugs.webkit.org/show_bug.cgi?id=136786
1322
1323         Reviewed by Benjamin Poulain.
1324
1325         Un-inline Element constructor as it is non-trivial and it does not seem
1326         to impact performance based on my testing:
1327         http://dromaeo.com/?id=226865,226869
1328
1329         This reduces the stripped binary size by 8 Kb.
1330
1331         No new tests, no behavior change.
1332
1333         * dom/Element.cpp:
1334         (WebCore::Element::Element):
1335         * dom/Element.h:
1336         (WebCore::Element::Element): Deleted.
1337
1338 2014-09-12  Jon Honeycutt  <jhoneycutt@apple.com>
1339
1340         Build fix with REQUEST_AUTOCOMPLETE enabled
1341
1342         * html/HTMLFormElement.cpp:
1343         (WebCore::HTMLFormElement::requestAutocomplete):
1344         (WebCore::HTMLFormElement::finishRequestAutocomplete):
1345
1346 2014-09-10  Jon Honeycutt  <jhoneycutt@apple.com>
1347
1348         Re-add the request autocomplete feature
1349
1350         <https://bugs.webkit.org/show_bug.cgi?id=136730>
1351
1352         This feature was rolled out in r148731 because it was only used by
1353         Chromium. As we consider supporting this feature, roll it back in, but
1354         leave it disabled.
1355
1356         This rolls out r148731 (which removed the feature) with small changes
1357         needed to make the code build in ToT, to match modern style, to make
1358         the tests run, and to remove unused code.
1359
1360         Reviewed by Andy Estes.
1361
1362         Tests: fast/events/constructors/autocomplete-error-event-constructor.html
1363                fast/forms/form-request-autocomplete.html
1364
1365         * Configurations/FeatureDefines.xcconfig:
1366         * DerivedSources.make:
1367         * WebCore.xcodeproj/project.pbxproj:
1368         * dom/AutocompleteErrorEvent.h: Added.
1369         (WebCore::AutocompleteErrorEvent::create):
1370         (WebCore::AutocompleteErrorEvent::reason):
1371         (WebCore::AutocompleteErrorEvent::AutocompleteErrorEvent):
1372         * dom/AutocompleteErrorEvent.idl: Added.
1373         * dom/EventNames.h:
1374         * dom/EventNames.in:
1375         * html/HTMLAttributeNames.in:
1376         * html/HTMLFormElement.cpp:
1377         (WebCore::HTMLFormElement::HTMLFormElement):
1378         (WebCore::HTMLFormElement::requestAutocomplete):
1379         (WebCore::HTMLFormElement::finishRequestAutocomplete):
1380         (WebCore::HTMLFormElement::requestAutocompleteTimerFired):
1381         (WebCore::HTMLFormElement::parseAttribute):
1382         * html/HTMLFormElement.h:
1383         * html/HTMLFormElement.idl:
1384         * loader/EmptyClients.h:
1385         * loader/FrameLoaderClient.h:
1386         * page/DOMWindow.idl:
1387
1388 2014-09-12  Vivek Galatage  <vivek.vg@samsung.com>
1389
1390         CanvasRenderingContext2D should update the computed style while setting the font
1391         https://bugs.webkit.org/show_bug.cgi?id=136737
1392
1393         Reviewed by Darin Adler.
1394
1395         Before accessing the computed style for populating 'font' property of CanvasRenderingContext2D
1396         make sure to have an up-to-date computed style avoiding any stale reference.
1397
1398         Test: fast/canvas/canvas-set-font-with-updated-style.html
1399
1400         * html/canvas/CanvasRenderingContext2D.cpp:
1401         (WebCore::CanvasRenderingContext2D::setFont):
1402
1403 2014-09-12  Yusuke Suzuki  <utatane.tea@gmail.com>
1404
1405         CSS JIT: Apply CSS JIT to SelectorQuery with multiple selectors
1406         https://bugs.webkit.org/show_bug.cgi?id=135255
1407
1408         Reviewed by Benjamin Poulain.
1409
1410         After dropping SelectorCheckerFastPath, Dromaeo cssquery-jquery test
1411         result becomes significantly worse. 400.26/s to 348.16/s, 13%
1412         performance regression.
1413
1414         Investigated the cause of it and we found that the test results for
1415         querySelector with multiple selectors causes performance regressions.
1416
1417         To solve this, we attempt to JIT compile all selectors in multiple
1418         selectors. And if compiling some selectors is failed, SelectorQuery
1419         fallbacks to the slower implementation.
1420
1421         This change improves the performance. After applying this patch,
1422         cssquery-jquery test result becomes 418.71/s, 4.61% better than the
1423         previous good performance case.
1424
1425         Test: fast/selectors/querySelector-multiple-selectors.html
1426
1427         * dom/SelectorQuery.cpp:
1428         (WebCore::SelectorDataList::SelectorDataList):
1429         (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
1430         (WebCore::SelectorDataList::execute):
1431         * dom/SelectorQuery.h:
1432
1433 2014-09-12  Jer Noble  <jer.noble@apple.com>
1434
1435         [Fullscreen] Taking embedded youtube video full screen takes the whole page full screen
1436         https://bugs.webkit.org/show_bug.cgi?id=136792
1437
1438         Reviewed by Beth Dakin.
1439
1440         Recalculate style after beginning the enter fullscreen animation, but before sending the
1441         "webkitfullscreenchange" event to listeners.
1442
1443         * dom/Document.cpp:
1444         (WebCore::Document::webkitWillEnterFullScreenForElement):
1445
1446 2014-09-12  Commit Queue  <commit-queue@webkit.org>
1447
1448         Unreviewed, rolling out r173575.
1449         https://bugs.webkit.org/show_bug.cgi?id=136790
1450
1451         Failing tests (Requested by enrica on #webkit).
1452
1453         Reverted changeset:
1454
1455         "Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
1456         https://bugs.webkit.org/show_bug.cgi?id=136474
1457         http://trac.webkit.org/changeset/173575
1458
1459 2014-09-12  Enrica Casucci  <enrica@apple.com>
1460
1461         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
1462         https://bugs.webkit.org/show_bug.cgi?id=136474
1463
1464         Reviewed by Benjamin Poulain.
1465
1466         This is the updated version of the patch that was landed in r173340.
1467         I changed the use of IntPoint to FloatPoint since it was causing tests
1468         to fail.
1469         This patch removes the use of PLATFORM(IOS) from TextAffinity.h
1470         and removes the assumption that EAffinity values match NSSelectionAffinity
1471         values. It also removes the includes in TextAffinity.h, creating the need to
1472         include explicitly the files when necessary. It also removes the unnecessary
1473         use of platform specific types, replacing them with WebCore types.
1474
1475         * WebCore.exp.in:
1476         * editing/TextAffinity.h:
1477         (kit): Deleted.
1478         (core): Deleted.
1479         * editing/cocoa/HTMLConverter.mm:
1480         * page/mac/WebCoreFrameView.h:
1481         * platform/ios/ScrollViewIOS.mm:
1482         (WebCore::ScrollView::platformSetScrollPosition):
1483         * platform/ios/wak/WAKScrollView.mm:
1484         (-[WAKScrollView setScrollOrigin:updatePositionAtAll:immediately:]):
1485         (-[WAKScrollView scrollOrigin]):
1486         * platform/mac/ScrollViewMac.mm:
1487         (WebCore::ScrollView::platformSetScrollPosition):
1488
1489 2014-09-12  Dean Jackson  <dino@apple.com>
1490
1491         Unprefix the flexbox CSS properties
1492         https://bugs.webkit.org/show_bug.cgi?id=98420
1493
1494         Unreviewed fix up, that missed the original
1495         commit. Tony Chang made some comments
1496         on the bugzilla.
1497
1498         "justify-self" should not have been unprefixed.
1499
1500         * css/CSSComputedStyleDeclaration.cpp:
1501         (WebCore::ComputedStyleExtractor::propertyValue):
1502         * css/CSSParser.cpp:
1503         (WebCore::isValidKeywordPropertyAndValue):
1504         (WebCore::CSSParser::parseValue):
1505         * css/CSSPropertyNames.in:
1506         * css/StyleResolver.cpp:
1507         (WebCore::StyleResolver::applyProperty):
1508
1509 2014-09-12  Dean Jackson  <dino@apple.com>
1510
1511         Unprefix the flexbox CSS properties
1512         https://bugs.webkit.org/show_bug.cgi?id=98420
1513
1514         Reviewed by Benjamin Poulain.
1515
1516         Remove the need for a "-webkit-" prefix on flexbox
1517         and related properties. This includes:
1518         - align-content
1519         - align-items
1520         - align-self
1521         - flex-basis
1522         - flex-direction
1523         - flex-wrap
1524         - flex-grow
1525         - flex-shrink
1526         - flex
1527         - flex-flow
1528         - justify-content
1529         - order
1530
1531         ... as well as the display keyword values "flex" and
1532         "inline-flex".
1533
1534         * css/CSSComputedStyleDeclaration.cpp:  Change names.
1535         (WebCore::ComputedStyleExtractor::propertyValue):
1536         * css/CSSParser.cpp: Ditto.
1537         (WebCore::isValidKeywordPropertyAndValue):
1538         (WebCore::isKeywordPropertyID):
1539         (WebCore::CSSParser::parseValue):
1540         (WebCore::CSSParser::parseFlex):
1541         * css/CSSPrimitiveValueMappings.h: Since we need to still handle the old
1542         keywords for display, this has added two new keywords.
1543         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1544         (WebCore::CSSPrimitiveValue::operator EDisplay): If the older keywords were used in
1545         content, map them to the new value names.
1546         * css/CSSPropertyNames.in: Add aliases for the prefixed properties.
1547         * css/CSSValueKeywords.in: Add "flex" and "inline-flex".
1548         * css/DeprecatedStyleBuilder.cpp: Change names.
1549         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1550         * css/StyleProperties.cpp: Change names.
1551         (WebCore::StyleProperties::getPropertyValue):
1552         (WebCore::StyleProperties::asText):
1553         * css/StylePropertyShorthand.cpp: Rename shorthand methods to remove the prefix.
1554         (WebCore::flexFlowShorthand):
1555         (WebCore::flexShorthand):
1556         (WebCore::shorthandForProperty):
1557         (WebCore::matchingShorthandsForLonghand):
1558         (WebCore::webkitFlexFlowShorthand): Deleted.
1559         (WebCore::webkitFlexShorthand): Deleted.
1560         * css/StylePropertyShorthand.h:
1561         * css/StyleResolver.cpp:
1562         (WebCore::equivalentBlockDisplay):
1563         (WebCore::StyleResolver::applyProperty):
1564         * page/animation/CSSPropertyAnimation.cpp: Change names.
1565         (WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
1566         * rendering/RenderElement.cpp:
1567         (WebCore::RenderElement::createFor): Handle the two new display values (the same way as
1568         the old values).
1569         * rendering/style/RenderStyleConstants.h: Add constants for the new display values.
1570
1571 2014-09-12  Yusuke Suzuki  <utatane.tea@gmail.com>
1572
1573         ASSERTION FAILED: e in WebCore::StyleResolver::adjustRenderStyle
1574         https://bugs.webkit.org/show_bug.cgi?id=136366
1575
1576         Reviewed by Benjamin Poulain.
1577
1578         Since element becomes nullptr when resolving styles for pseudo elements,
1579         so don't do `ASSERT(e)` and use pointer for that.
1580
1581         Test: fast/css/appearance-with-pseudo-elements.html
1582
1583         * css/StyleResolver.cpp:
1584         (WebCore::StyleResolver::adjustRenderStyle):
1585         * html/shadow/SliderThumbElement.cpp:
1586         (WebCore::RenderSliderThumb::updateAppearance):
1587         * platform/efl/RenderThemeEfl.cpp:
1588         (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
1589         (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
1590         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
1591         (WebCore::RenderThemeEfl::adjustCheckboxStyle):
1592         (WebCore::RenderThemeEfl::adjustRadioStyle):
1593         (WebCore::RenderThemeEfl::adjustButtonStyle):
1594         (WebCore::RenderThemeEfl::adjustMenuListStyle):
1595         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
1596         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
1597         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
1598         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
1599         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
1600         (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
1601         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
1602         (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
1603         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
1604         * platform/efl/RenderThemeEfl.h:
1605         * platform/gtk/RenderThemeGtk.h:
1606         * rendering/RenderTheme.cpp:
1607         (WebCore::RenderTheme::adjustStyle):
1608         (WebCore::RenderTheme::adjustCheckboxStyle):
1609         (WebCore::RenderTheme::adjustRadioStyle):
1610         (WebCore::RenderTheme::adjustButtonStyle):
1611         (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
1612         (WebCore::RenderTheme::adjustTextFieldStyle):
1613         (WebCore::RenderTheme::adjustTextAreaStyle):
1614         (WebCore::RenderTheme::adjustMenuListStyle):
1615         (WebCore::RenderTheme::adjustMeterStyle):
1616         (WebCore::RenderTheme::adjustProgressBarStyle):
1617         (WebCore::RenderTheme::adjustMenuListButtonStyle):
1618         (WebCore::RenderTheme::adjustMediaControlStyle):
1619         (WebCore::RenderTheme::adjustSliderTrackStyle):
1620         (WebCore::RenderTheme::adjustSliderThumbStyle):
1621         (WebCore::RenderTheme::adjustSliderThumbSize):
1622         (WebCore::RenderTheme::adjustSearchFieldStyle):
1623         (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
1624         (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
1625         (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
1626         (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
1627         * rendering/RenderTheme.h:
1628         * rendering/RenderThemeGtk.cpp:
1629         (WebCore::RenderThemeGtk::adjustButtonStyle):
1630         (WebCore::RenderThemeGtk::adjustMenuListStyle):
1631         (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
1632         (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
1633         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
1634         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
1635         (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
1636         (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
1637         (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
1638         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
1639         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
1640         (WebCore::RenderThemeGtk::adjustProgressBarStyle):
1641         * rendering/RenderThemeIOS.h:
1642         * rendering/RenderThemeIOS.mm:
1643         (WebCore::RenderThemeIOS::adjustCheckboxStyle):
1644         (WebCore::RenderThemeIOS::adjustRadioStyle):
1645         (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
1646         (WebCore::RenderThemeIOS::adjustSliderTrackStyle):
1647         (WebCore::RenderThemeIOS::adjustSliderThumbSize):
1648         (WebCore::RenderThemeIOS::adjustSearchFieldStyle):
1649         (WebCore::RenderThemeIOS::adjustButtonStyle):
1650         * rendering/RenderThemeMac.h:
1651         * rendering/RenderThemeMac.mm:
1652         (WebCore::RenderThemeMac::adjustTextFieldStyle):
1653         (WebCore::RenderThemeMac::adjustTextAreaStyle):
1654         (WebCore::RenderThemeMac::adjustProgressBarStyle):
1655         (WebCore::RenderThemeMac::adjustMenuListStyle):
1656         (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
1657         (WebCore::RenderThemeMac::adjustSliderTrackStyle):
1658         (WebCore::RenderThemeMac::adjustSliderThumbStyle):
1659         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
1660         (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
1661         (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
1662         (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
1663         (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
1664         (WebCore::RenderThemeMac::adjustSliderThumbSize):
1665         * rendering/RenderThemeSafari.cpp:
1666         (WebCore::RenderThemeSafari::adjustButtonStyle):
1667         (WebCore::RenderThemeSafari::adjustTextFieldStyle):
1668         (WebCore::RenderThemeSafari::adjustTextAreaStyle):
1669         (WebCore::RenderThemeSafari::adjustMenuListStyle):
1670         (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
1671         (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
1672         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
1673         (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
1674         (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
1675         (WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
1676         (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
1677         (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
1678         (WebCore::RenderThemeSafari::adjustMeterStyle):
1679         * rendering/RenderThemeSafari.h:
1680         * rendering/RenderThemeWin.cpp:
1681         (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
1682         (WebCore::RenderThemeWin::adjustMenuListStyle):
1683         (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
1684         (WebCore::RenderThemeWin::adjustSliderThumbSize):
1685         (WebCore::RenderThemeWin::adjustSearchFieldStyle):
1686         (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
1687         (WebCore::RenderThemeWin::adjustSearchFieldDecorationPartStyle):
1688         (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
1689         (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
1690         (WebCore::RenderThemeWin::adjustMeterStyle):
1691         * rendering/RenderThemeWin.h:
1692
1693 2014-09-12  Joseph Pecoraro  <pecoraro@apple.com>
1694
1695         Fix casing in method name - formatNumberForCustomCSSText
1696         https://bugs.webkit.org/show_bug.cgi?id=136758
1697
1698         Reviewed by Benjamin Poulain.
1699
1700         * css/CSSPrimitiveValue.cpp:
1701         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
1702         (WebCore::CSSPrimitiveValue::customCSSText):
1703         (WebCore::CSSPrimitiveValue::formatNumberForcustomCSSText): Deleted.
1704         * css/CSSPrimitiveValue.h:
1705
1706 2014-09-12  Chris Dumez  <cdumez@apple.com>
1707
1708         Make all CSSSelector data members private
1709         https://bugs.webkit.org/show_bug.cgi?id=136784
1710
1711         Reviewed by Benjamin Poulain.
1712
1713         Make all CSSSelector data members private. Previously, some of the data
1714         members such as m_relation / m_match / m_pseudoType were public and
1715         accessed directly from outside the class. The new approach is better
1716         because:
1717         - Those members are bit fields so by using getters, we can hide the
1718           casts inside the getters. The setters can now also check that the
1719           bitfield is big enough to actually store the enum value.
1720         - When using those in switch() statements, the compiler now complains
1721           if we fail to test some of the enum values as the value is now an
1722           enum, and not merely an unsigned integer.
1723         - Some of these members already has getters (e.g. relation()).
1724         - Better encapsulation.
1725
1726         No new tests, no behavior change.
1727
1728         * css/CSSParserValues.cpp:
1729         (WebCore::CSSParserSelector::parsePagePseudoSelector):
1730         (WebCore::CSSParserSelector::parsePseudoElementSelector):
1731         (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
1732         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
1733         (WebCore::CSSParserSelector::setPseudoClassValue):
1734         (WebCore::CSSParserSelector::isSimple):
1735         (WebCore::CSSParserSelector::prependTagSelector):
1736         * css/CSSParserValues.h:
1737         (WebCore::CSSParserSelector::setMatch):
1738         (WebCore::CSSParserSelector::setRelation):
1739         (WebCore::CSSParserSelector::isPseudoElementCueFunction):
1740         * css/CSSSelector.cpp:
1741         (WebCore::CSSSelector::createRareData):
1742         (WebCore::CSSSelector::specificityForOneSelector):
1743         (WebCore::CSSSelector::specificityForPage):
1744         (WebCore::CSSSelector::operator==):
1745         (WebCore::CSSSelector::selectorText):
1746         * css/CSSSelector.h:
1747         (WebCore::CSSSelector::setPseudoElementType):
1748         (WebCore::CSSSelector::setPagePseudoType):
1749         (WebCore::CSSSelector::pseudoClassType):
1750         (WebCore::CSSSelector::setPseudoClassType):
1751         (WebCore::CSSSelector::pseudoElementType):
1752         (WebCore::CSSSelector::pagePseudoClassType):
1753         (WebCore::CSSSelector::setRelation):
1754         (WebCore::CSSSelector::match):
1755         (WebCore::CSSSelector::setMatch):
1756         (WebCore::CSSSelector::matchesPseudoElement):
1757         (WebCore::CSSSelector::isUnknownPseudoElement):
1758         (WebCore::CSSSelector::isCustomPseudoElement):
1759         (WebCore::CSSSelector::isSiblingSelector):
1760         (WebCore::CSSSelector::isAttributeSelector):
1761         (WebCore::CSSSelector::setValue):
1762         (WebCore::CSSSelector::CSSSelector):
1763         (WebCore::CSSSelector::~CSSSelector):
1764         (WebCore::CSSSelector::tagQName):
1765         (WebCore::CSSSelector::value):
1766         * css/CSSSelectorList.cpp:
1767         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
1768         * css/PageRuleCollector.cpp:
1769         (WebCore::checkPageSelectorComponents):
1770         * css/RuleFeature.cpp:
1771         (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
1772         * css/RuleSet.cpp:
1773         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
1774         (WebCore::determinePropertyWhitelistType):
1775         (WebCore::RuleSet::addRule):
1776         * css/SelectorChecker.cpp:
1777         (WebCore::SelectorChecker::matchRecursively):
1778         (WebCore::anyAttributeMatches):
1779         (WebCore::canMatchHoverOrActiveInQuirksMode):
1780         (WebCore::SelectorChecker::checkOne):
1781         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
1782         (WebCore::SelectorChecker::determineLinkMatchType):
1783         * css/SelectorChecker.h:
1784         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
1785         * css/SelectorFilter.cpp:
1786         (WebCore::collectDescendantSelectorIdentifierHashes):
1787         * cssjit/SelectorCompiler.cpp:
1788         (WebCore::SelectorCompiler::constructFragments):
1789         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
1790         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
1791         * dom/SelectorQuery.cpp:
1792         (WebCore::isSingleTagNameSelector):
1793         (WebCore::isSingleClassNameSelector):
1794         (WebCore::findIdMatchingType):
1795         (WebCore::SelectorDataList::SelectorDataList):
1796         (WebCore::selectorForIdLookup):
1797         (WebCore::filterRootById):
1798
1799 2014-09-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1800
1801         REGRESSION(r173441): [GTK] All buttons appear insensitive
1802         https://bugs.webkit.org/show_bug.cgi?id=136614
1803
1804         Reviewed by Sergio Villar Senin.
1805
1806         Do not use RenderTheme::isReadOnlyControl() to decide whether to
1807         render non text based forms sensitive or unsensitive, isEnabled()
1808         is enough in those cases.
1809
1810         * rendering/RenderThemeGtk.cpp:
1811         (WebCore::paintToggle):
1812         (WebCore::renderButton):
1813         (WebCore::RenderThemeGtk::paintSliderTrack):
1814         (WebCore::RenderThemeGtk::paintSliderThumb):
1815
1816 2014-09-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1817
1818         REGRESSION(r173423): CertificateInfo is never sent to the UI process when using shared secondary process model
1819         https://bugs.webkit.org/show_bug.cgi?id=136669
1820
1821         Reviewed by Antti Koivisto.
1822
1823         Add CertificateInfoPolicy option to ResourceLoaderOptions. It's
1824         set to DoNotIncludeCertificateInfo for all loads except the main
1825         resource load.
1826
1827         * loader/DocumentLoader.cpp:
1828         (WebCore::DocumentLoader::startLoadingMainResource): Pass
1829         IncludeCertificateInfo to ResourceLoaderOptions.
1830         * loader/NetscapePlugInStreamLoader.cpp:
1831         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
1832         Pass DoNotIncludeCertificateInfo to ResourceLoaderOptions().
1833         * loader/ResourceLoader.h:
1834         (WebCore::ResourceLoader::shouldIncludeCertificateInfo): Return
1835         true if IncludeCertificateInfo option was given.
1836         * loader/ResourceLoaderOptions.h:
1837         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
1838         (WebCore::ResourceLoaderOptions::certificateInfoPolicy):
1839         (WebCore::ResourceLoaderOptions::setCertificateInfoPolicy):
1840         * loader/SubresourceLoader.cpp:
1841         (WebCore::SubresourceLoader::didReceiveResponse): If
1842         IncludeCertificateInfo option is present, call
1843         includeCertificateInfo() on the response.
1844         * loader/cache/CachedResourceLoader.cpp:
1845         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass
1846         DoNotIncludeCertificateInfo to ResourceLoaderOptions().
1847         (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Ditto.
1848         * loader/icon/IconLoader.cpp:
1849         (WebCore::IconLoader::startLoading): Ditto.
1850         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
1851         (WebCore::WebCoreAVCFResourceLoader::startLoading): Ditto.
1852         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1853         (WebCore::WebCoreAVFResourceLoader::startLoading): Ditto.
1854         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1855         (CachedResourceStreamingClient::CachedResourceStreamingClient): Ditto.
1856
1857 2014-09-11  Ryuan Choi  <ryuan.choi@gmail.com>
1858
1859         Unreviewed build fix attempt on windows port since r173553.
1860
1861         * WebCore.vcxproj/WebCore.vcxproj:
1862         * WebCore.vcxproj/WebCore.vcxproj.filters:
1863
1864 2014-09-11  Brian J. Burg  <burg@cs.washington.edu>
1865
1866         Web Inspector: disambiguate integral and real number primitive types in the protocol
1867         https://bugs.webkit.org/show_bug.cgi?id=136606
1868
1869         Reviewed by Timothy Hatcher.
1870
1871         Update clients of InspectorValue to disambiguate integer and double primitive types.
1872
1873         No new tests, no behavior changed.
1874
1875         * inspector/InspectorDOMAgent.cpp:
1876         (WebCore::parseColor):
1877         (WebCore::parseQuad):
1878         (WebCore::InspectorDOMAgent::performSearch):
1879         * inspector/InspectorDOMDebuggerAgent.cpp:
1880         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
1881         * inspector/InspectorIndexedDBAgent.cpp:
1882         * inspector/InspectorOverlay.cpp:
1883         (WebCore::buildObjectForPoint):
1884         (WebCore::buildObjectForRect):
1885         (WebCore::buildObjectForSize):
1886         (WebCore::appendPathCommandAndPoints):
1887         (WebCore::InspectorOverlay::reset):
1888         * inspector/InspectorReplayAgent.cpp:
1889         (WebCore::InspectorReplayAgent::replayToPosition):
1890         * inspector/InspectorStyleSheet.h:
1891         (WebCore::InspectorCSSId::InspectorCSSId):
1892         * inspector/InspectorTimelineAgent.cpp:
1893         (WebCore::InspectorTimelineAgent::didWriteHTML):
1894         (WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
1895         * inspector/TimelineRecordFactory.cpp:
1896         (WebCore::TimelineRecordFactory::createGenericRecord):
1897         (WebCore::TimelineRecordFactory::createBackgroundRecord):
1898         (WebCore::TimelineRecordFactory::createGCEventData):
1899         (WebCore::TimelineRecordFactory::createFunctionCallData):
1900         (WebCore::TimelineRecordFactory::createProbeSampleData):
1901         (WebCore::TimelineRecordFactory::createGenericTimerData):
1902         (WebCore::TimelineRecordFactory::createTimerInstallData):
1903         (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData):
1904         (WebCore::TimelineRecordFactory::createEvaluateScriptData):
1905         (WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
1906         (WebCore::TimelineRecordFactory::createResourceFinishData):
1907         (WebCore::TimelineRecordFactory::createReceiveResourceData):
1908         (WebCore::TimelineRecordFactory::createLayoutData):
1909         (WebCore::TimelineRecordFactory::createParseHTMLData):
1910         (WebCore::TimelineRecordFactory::createAnimationFrameData):
1911         (WebCore::createQuad):
1912         * inspector/TimelineRecordFactory.h:
1913         (WebCore::TimelineRecordFactory::createWebSocketCreateData):
1914         (WebCore::TimelineRecordFactory::createGenericWebSocketData):
1915         * page/ContentSecurityPolicy.cpp:
1916         (WebCore::ContentSecurityPolicy::reportViolation):
1917
1918 2014-09-11  Ryuan Choi  <ryuan.choi@gmail.com>
1919
1920         [EFL][CoordinatedGraphics] Move CoordinatedGraphicsScene and CoordinatedBackingStore to WebKit2
1921         https://bugs.webkit.org/show_bug.cgi?id=136770
1922
1923         Reviewed by Gyuyoung Kim.
1924
1925         CoordinatedGraphicsScene and CoordinatedBackingStore is only for UIProcess.
1926         This patch moved them from WebCore to WebKit2/UIProcess/CoordinatedGraphics/.
1927
1928         No new tests, no behavior change.
1929
1930         * PlatformEfl.cmake:
1931
1932 2014-09-11  Shivakumar JM  <shiva.jm@samsung.com>
1933
1934         The overrideMimeType in XMLHttpRequest should throw the exception.
1935         https://bugs.webkit.org/show_bug.cgi?id=136699
1936
1937         Reviewed by Darin Adler.
1938
1939         No new tests, modifed test http/tests/xmlhttprequest/exceptions.html.
1940
1941         Set XMLHttpRequest::overrideMimeType to throw an "InvalidStateError" exception, if the state is LOADING or DONE.
1942
1943         * xml/XMLHttpRequest.cpp:
1944         (WebCore::XMLHttpRequest::overrideMimeType):
1945         * xml/XMLHttpRequest.h:
1946         * xml/XMLHttpRequest.idl:
1947
1948 2014-09-11  Joseph Pecoraro  <pecoraro@apple.com>
1949
1950         Web Inspector: Occasional ASSERT closing web inspector
1951         https://bugs.webkit.org/show_bug.cgi?id=136762
1952
1953         Reviewed by Timothy Hatcher.
1954
1955         * bindings/js/WorkerScriptDebugServer.h:
1956         * inspector/PageScriptDebugServer.h:
1957
1958 2014-09-11  Chris Dumez  <cdumez@apple.com>
1959
1960         Simplify DOM tree traversal in FrameSelection::setSelectionFromNone()
1961         https://bugs.webkit.org/show_bug.cgi?id=136763
1962
1963         Reviewed by Ryosuke Niwa.
1964
1965         We only need to traverse the direct children of the Document element to
1966         find the body. The previous code was potentially traversing descendants.
1967         The new code is consistent with Document::body() except that we only
1968         look for an HTMLBodyElement (and ignore HTMLFrameSetElement).
1969
1970         Also update the code to use tighter typing for clarity.
1971
1972         No new tests, no behavior change.
1973
1974         * editing/FrameSelection.cpp:
1975         (WebCore::FrameSelection::setSelectionFromNone):
1976
1977 2014-09-11  Chris Fleizach  <cfleizach@apple.com>
1978
1979         AX: Size of web view in Safari as reported by AX changes when adding/removing bars is wrong
1980         https://bugs.webkit.org/show_bug.cgi?id=136756
1981
1982         Reviewed by Beth Dakin.
1983
1984         topContentInset not only seems to push the scroll view's origin down, but it also shrinks its height as well, which
1985         was not accounted for in the original fix.
1986
1987         Modified: platform/mac-wk2/accessibility/content-inset-scrollview-frame.html
1988
1989         * accessibility/AccessibilityScrollView.cpp:
1990         (WebCore::AccessibilityScrollView::elementRect):
1991
1992 2014-09-11  Roger Fong  <roger_fong@apple.com>
1993
1994         [Windows] Unreviewed build fix.
1995
1996         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1997         (WebCore::GraphicsContext3D::checkVaryingsPacking):
1998
1999 2014-09-11  Beth Dakin  <bdakin@apple.com>
2000
2001         WebKit scrollbars flash in non-dominant spaces when entering Mission Control
2002         https://bugs.webkit.org/show_bug.cgi?id=136761
2003         -and corresponding-
2004         rdar://problem/18195616
2005
2006         Reviewed by Tim Horton.
2007
2008         This patch makes our logic about when to call ScrollableArea::contentAreaDidHide/
2009         Show match the logic in AppKit. We only want these notifications when the window 
2010         has become both visible and active (or lost both, in the case of hide).
2011
2012         Re-name setIsVisibleInternal() to setIsVisibleAndActiveInternal(), and call it 
2013         only when both visibility and active-state have changed.
2014         * page/FocusController.cpp:
2015         (WebCore::FocusController::setViewState):
2016         (WebCore::FocusController::setIsVisibleAndActiveInternal):
2017         (WebCore::FocusController::setIsVisibleInternal): Deleted.
2018         * page/FocusController.h:
2019
2020         FocusController::setViewState() is the only place that needs to call 
2021         ScrollableArea::contentAreaDidHide/Show, so remove these callers.
2022         * page/FrameView.cpp:
2023         (WebCore::FrameView::didMoveOnscreen): Deleted.
2024         (WebCore::FrameView::willMoveOffscreen): Deleted.
2025         * page/FrameView.h:
2026         * page/Page.cpp:
2027         (WebCore::Page::setIsVisibleInternal):
2028
2029 2014-09-10  Michael Saboff  <msaboff@apple.com>
2030
2031         Move JSScope out of JSFunction into separate JSCallee class
2032         https://bugs.webkit.org/show_bug.cgi?id=136725
2033
2034         Reviewed by Oliver Hunt.
2035
2036         Created new JSCallee class that contains a JSScope*.  Changed JSFunction to inherit from
2037         JSCallee.
2038
2039         * ForwardingHeaders/runtime/JSCallee.h: New forwarding header.
2040
2041 2014-09-11  Roger Fong  <roger_fong@apple.com>
2042
2043         Unreviewed build fix iOS.
2044
2045         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2046         (WebCore::GraphicsContext3D::checkVaryingsPacking):
2047
2048 2014-09-11  Jer Noble  <jer.noble@apple.com>
2049
2050         Add site-specific quirk for entering fullscreen on YouTube.com.
2051         https://bugs.webkit.org/show_bug.cgi?id=136742
2052
2053         Reviewed by Eric Carlson.
2054
2055         YouTube only resizes its <video> content when entering fullscreen after receiving the "webkitfullscreenchange"
2056         event, which is fired once the animation to enter fullscreen completes. This leaves the apparent <video> content
2057         too small during the animation, especially at the beginning of the animation. Add a site-specific hack for
2058         YouTube sites which fires the "webkitfullscreenchange" event synchronously with the beginning of the enter
2059         fullscreen animation. This will cause YouTube to resize their <video> content during the period of time where we
2060         disable screen updates, and makes the enter fullscreen animation seamless.
2061
2062         Add a static utility method, hostIsYouTube(), for the various pieces of this site-specific hack, and expand it
2063         to match youtube.co.uk, youtube.fr, etc.
2064
2065         * dom/Document.cpp:
2066         (WebCore::hostIsYouTube): Added.
2067         (WebCore::Document::webkitWillEnterFullScreenForElement): Fire fullscreenchange event if hacks are enabled.
2068         (WebCore::Document::webkitDidEnterFullScreenForElement): Don't fire the event if same.
2069         (WebCore::Document::webkitDidExitFullScreenForElement): Use hostIsYouTube().
2070         
2071 2014-09-11  Bear Travis  <betravis@adobe.com>
2072
2073         [CSS Font Loading] Enable CSS Font Loading on Mac
2074         https://bugs.webkit.org/show_bug.cgi?id=135473
2075
2076         Reviewed by Antti Koivisto.
2077
2078         Enable CSS Font Loading in FeatureDefines, and in
2079         RuntimeEnabledFeatures.
2080
2081         Font Loading tests have been toggled back on in the Mac
2082         TestExpectations file.
2083
2084         * Configurations/FeatureDefines.xcconfig:
2085         * bindings/generic/RuntimeEnabledFeatures.cpp:
2086         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
2087
2088 2014-09-11  Chris Dumez  <cdumez@apple.com>
2089
2090         Use tighter typing for Document::ownerElement() return value
2091         https://bugs.webkit.org/show_bug.cgi?id=136746
2092
2093         Reviewed by Ryosuke Niwa.
2094
2095         Use tighter typing for Document::ownerElement() return value at call
2096         sites to increase code readability a bit and allow the compiler to
2097         generate slightly more efficient code in some cases. In particular,
2098         the more efficient HTMLElement::hasTagName(HTMLQualifiedName) is
2099         now called in several cases instead of the one on Node. This bypasses
2100         unnecessary isHTMLElement() checks.
2101
2102         No new tests, no behavior change.
2103
2104         * accessibility/AccessibilityNodeObject.cpp:
2105         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
2106         * dom/Document.cpp:
2107         (WebCore::Document::updateLayout):
2108         (WebCore::Document::topDocument):
2109         * html/HTMLBodyElement.cpp:
2110         (WebCore::HTMLBodyElement::insertedInto):
2111         * rendering/RenderBoxModelObject.cpp:
2112         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2113         * rendering/RenderLayer.cpp:
2114         (WebCore::RenderLayer::scrollRectToVisible):
2115         * rendering/RenderView.cpp:
2116         (WebCore::RenderView::paintBoxDecorations):
2117
2118 2014-09-10  Roger Fong  <roger_fong@apple.com>
2119
2120         Check for varying packing restrictions per program instead of per shader.
2121         https://bugs.webkit.org/show_bug.cgi?id=136585.
2122         <rdar://problem/16308409>.
2123
2124         Reviewed by Dean Jackson.
2125
2126         Covered by webgl/1.0.2/conformance/ogles/GL/build/build_009_to_016.html.
2127
2128         * html/canvas/WebGLRenderingContext.cpp:
2129         (WebCore::WebGLRenderingContext::linkProgram): 
2130         Check for varying packing restrictions when linking the program.
2131
2132         * platform/graphics/GraphicsContext3D.h:
2133         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2134         (WebCore::GraphicsContext3D::checkVaryingsPacking): 
2135         Checks varyings shared by both vertex and fragment shaders and makes sure
2136         they satisfy packing restrictions.
2137
2138 2014-09-11  Beth Dakin  <bdakin@apple.com>
2139
2140         Support rubber-banding in sub-frames
2141         https://bugs.webkit.org/show_bug.cgi?id=136726
2142         -and corresponding-
2143         rdar://problem/10011924
2144
2145         Reviewed by Tim Horton.
2146
2147         Set the appropriate scroll elasticity for all frames! As long as its enabled, sub-
2148         frames want an elasticity of ScrollElasticityAutomatic, which will allow for 
2149         latching. 
2150         * page/FrameView.cpp:
2151         (WebCore::FrameView::FrameView):
2152
2153         Account for rubber-banding in sub-frames.
2154         (WebCore::FrameView::isScrollableOrRubberbandable):
2155         (WebCore::FrameView::hasScrollableOrRubberbandableAncestor):
2156
2157         This patch also re-names rubberBandingForOverflowScrollEnabled to 
2158         rubberBandingForSubScrollableRegionsEnabled
2159         * page/Settings.in:
2160         * rendering/RenderLayer.cpp:
2161         (WebCore::RenderLayer::overhangAmount):
2162         (WebCore::RenderLayer::setHasHorizontalScrollbar):
2163         (WebCore::RenderLayer::setHasVerticalScrollbar):
2164
2165 2014-09-11  Myles C. Maxfield <mmaxfield@apple.com>  <litherum@gmail.com>
2166
2167         Initial implementation of SVG to OTF font converter
2168         https://bugs.webkit.org/show_bug.cgi?id=136688
2169
2170         Reviewed by Darin Adler.
2171
2172         This patch creates a new file and new function which turns an SVG font into an OpenType font.
2173         This function is not very full featured, and as such is never called. However, it works with
2174         fonts that only support simple horizontal basic multilingual plane codepoints. It has only
2175         been tested on OS X, and does not have any automated tests. This patch is only jumping off
2176         point, laying the basic groundwork for a more robust font converter.
2177
2178         The goal of this patch is to eventually allow us to delete the codepath with which we draw
2179         text using SVG fonts. Using a native codepath instead will allow for better performance,
2180         security, and code clarity. In my initial benchmarks, using this converter instead of the
2181         SVG codepath is at least a 100x speed improvement (after running for 4 hours I stepped
2182         away from my machine).
2183
2184         No new tests because the function is not ready to be called (yet!)
2185         Initial implementation of SVG to OTF font converter
2186         https://bugs.webkit.org/show_bug.cgi?id=136688
2187
2188         * WebCore.xcodeproj/project.pbxproj: Add new file.
2189         * svg/SVGPathBuilder.h: Single function. Takes a SVGFontElement and returns a byte
2190         * svg/SVGToOTFFontConversion.cpp: Added.
2191         (WebCore::write32): Write a big-endian Int32.
2192         (WebCore::write16): Write a big-endian Int16.
2193         (WebCore::overwrite32): Overwrite an existing Int32 in a vector (instead of appending)
2194         (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Internal class to hold state during
2195         function calls.
2196         (WebCore::roundDownToPowerOfTwo):
2197         (WebCore::SVGToOTFFontConverter::appendCMAPTable): See function name.
2198         (WebCore::SVGToOTFFontConverter::appendHEADTable): Ditto.
2199         (WebCore::clampTo): Used to clamp data types to fit into other data types.
2200         (WebCore::SVGToOTFFontConverter::appendHHEATable): See function name.
2201         (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto.
2202         (WebCore::SVGToOTFFontConverter::appendMAXPTable): Ditto.
2203         (WebCore::SVGToOTFFontConverter::appendNAMETable): Ditto.
2204         (WebCore::SVGToOTFFontConverter::appendOS2Table): Ditto.
2205         (WebCore::SVGToOTFFontConverter::appendPOSTTable): Ditto.
2206         (WebCore::isValidStringForCFF): The CFF font format only allows strings with particular
2207         characters in them.
2208         (WebCore::appendCFFValidString): Append a string assuming it's valid to append.
2209         (WebCore::SVGToOTFFontConverter::appendCFFTable): See function name.
2210         (WebCore::SVGToOTFFontConverter::appendVORGTable): Ditto.
2211         (WebCore::writeCFFEncodedNumber): CFF has this wacky encoding scheme for encoding and
2212         decoding numbers.
2213         (WebCore::CFFBuilder::CFFBuilder): Subclass of SVGPathBuilder, which is used for building
2214         CFF CharStrings (which are glyph path representations).
2215         (WebCore::CFFBuilder::updateForConstituentPoint): Invoked for every point in a path, does
2216         things like updates glyph bounding box information.
2217         (WebCore::CFFBuilder::boundingBox): Getter.
2218         (WebCore::transcodeGlyphPaths): SVG path data string -> CFF CharString
2219         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Generate internal state ahead of
2220         time before generating any tables.
2221         (WebCore::isFourByteAligned):
2222         (WebCore::calculateChecksum): OTF files have checksums.
2223         (WebCore::SVGToOTFFontConverter::appendTable): Invoked for each entry in the table of
2224         contents of the OTF font.
2225         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Write out the tables.
2226         (WebCore::convertSVGToOTFFont): Entry point.
2227         * svg/SVGToOTFFontConversion.h: Added.
2228
2229 2014-09-11  Jer Noble  <jer.noble@apple.com>
2230
2231         [EME] REGRESSION(??): test media/encrypted-media/encrypted-media-v2-syntax.html is failing
2232         https://bugs.webkit.org/show_bug.cgi?id=136723
2233
2234         Reviewed by Eric Carlson.
2235
2236         Update a comment to point to the implemented Working Draft 18 Feburary 2014 version of the spec.
2237
2238         * Modules/encryptedmedia/MediaKeys.cpp:
2239         (WebCore::MediaKeys::createSession):
2240
2241 2014-09-11  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2242
2243         [WK2] Authentication dialog is displayed for cross-origin XHR
2244         https://bugs.webkit.org/show_bug.cgi?id=131349
2245
2246         Reviewed by Alexey Proskuryakov.
2247
2248         * WebCore.exp.in: Export of isAllowedToAskUserForCredentials.
2249         * loader/ResourceLoader.cpp:
2250         (WebCore::ResourceLoader::isAllowedToAskUserForCredentials): Replacing clientCredentialPolicy method. Returns true if credentials can be requested to the user.
2251         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Updated to use isAllowedToAskUserForCredentials.
2252         * loader/ResourceLoader.h: Removing clientCredentialPolicy method and adding isAllowedToAskUserForCredentials method.
2253
2254 2014-09-11  Chris Fleizach  <cfleizach@apple.com>
2255
2256         AX: Children inside a <legend> are not accessible
2257         https://bugs.webkit.org/show_bug.cgi?id=136735
2258
2259         Reviewed by Mario Sanchez Prada.
2260
2261         The AX children of a <legend> are being hidden currently, which makes it impossible for
2262         VoiceOver to activate control elements inside of a <legend>.
2263         The solution is that legend elements SHOULD be allowed to have children.
2264
2265         Test: accessibility/legend-children-are-visible.html
2266
2267         * accessibility/AccessibilityNodeObject.cpp:
2268         (WebCore::AccessibilityNodeObject::canHaveChildren):
2269
2270 2014-09-11  Brendan Long  <b.long@cablelabs.com>
2271
2272         Fix FIXME's in JSTrackCustom now that AudioTrack and VideoTrack exist.
2273         https://bugs.webkit.org/show_bug.cgi?id=136552
2274
2275         Reviewed by Eric Carlson.
2276
2277         * bindings/js/JSTrackCustom.cpp:
2278         (WebCore::toTrack): Add casts for AudioTrack and VideoTrack.
2279
2280 2014-09-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2281
2282         [GTK] Merge WebKitAuthenticationWidget into WebKitAuthenticationDialog
2283         https://bugs.webkit.org/show_bug.cgi?id=136700
2284
2285         Reviewed by Sergio Villar Senin.
2286
2287         Remove WebKitAuthenticationWidget. The only reason why we had this
2288         widget separated in WebCore was to share it between WebKit1 and
2289         WebKit2, but now it's only used by WebKitAuthenticationDialog in WebKit2.
2290
2291         * PlatformGTK.cmake: Remove files from compilation.
2292         * platform/gtk/WebKitAuthenticationWidget.cpp: Removed.
2293         * platform/gtk/WebKitAuthenticationWidget.h: Removed.
2294
2295 2014-09-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2296
2297         Use ASSERT instead of ASSERT_WITH_SECURITY_IMPLICATION
2298         https://bugs.webkit.org/show_bug.cgi?id=136732
2299
2300         Reviewed by Andy Estes.
2301
2302         Since r173458 changed to use static_cast<> with toFoo, ASSERT_WITH_SECURITY_IMPLICATION doesn't
2303         need to be used anymore. ASSERT is enough for it.
2304
2305         * workers/DefaultSharedWorkerRepository.cpp:
2306         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
2307         * workers/WorkerMessagingProxy.cpp:
2308         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2309         * xml/XMLHttpRequest.cpp:
2310         (WebCore::XMLHttpRequest::document):
2311
2312 2014-09-10  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2313
2314         [SVG] Cleanup iterator code in SMILTimeContainer using range-based loop
2315         https://bugs.webkit.org/show_bug.cgi?id=136720
2316
2317         Reviewed by Filip Pizlo.
2318
2319         No new tests, no change on behavior.
2320
2321         * svg/animation/SMILTimeContainer.cpp:
2322         (WebCore::SMILTimeContainer::setElapsed):
2323         (WebCore::SMILTimeContainer::updateAnimations):
2324
2325 2014-09-10  Timothy Horton  <timothy_horton@apple.com>
2326
2327         Fix the build.
2328
2329         * platform/network/ResourceHandle.h:
2330         * platform/network/mac/ResourceHandleMac.mm:
2331
2332 2014-09-09  Myles C. Maxfield <mmaxfield@apple.com>  <litherum@gmail.com>
2333
2334         Delete class SavedDrawingStateForMask
2335         https://bugs.webkit.org/show_bug.cgi?id=136498
2336
2337         Reviewed by Darin Adler.
2338
2339         This class is left over from when text-decoration-skip: ink used
2340         GraphicsContext masking.
2341
2342         No new tests because there is no behavior change.
2343
2344         * rendering/InlineTextBox.cpp:
2345         (WebCore::InlineTextBox::applyShadowToGraphicsContext):
2346         * rendering/InlineTextBox.h:
2347         * rendering/TextPainter.cpp:
2348         (WebCore::TextPainter::TextPainter):
2349         (WebCore::paintTextWithShadows):
2350         (WebCore::TextPainter::paintText):
2351         * rendering/TextPainter.h:
2352         (WebCore::SavedDrawingStateForMask::SavedDrawingStateForMask): Deleted.
2353         * rendering/svg/SVGInlineTextBox.cpp:
2354         (WebCore::SVGInlineTextBox::paintTextWithShadows):
2355
2356 2014-09-10  Tim Horton  <timothy_horton@apple.com>
2357
2358         Call setCollectsTimingData only once, and before making any {CF,NS}URLConnections
2359         https://bugs.webkit.org/show_bug.cgi?id=136731
2360         <rdar://problem/18252844>
2361
2362         Reviewed by Simon Fraser.
2363
2364         * platform/network/cf/ResourceHandleCFNet.cpp:
2365         (WebCore::ResourceHandle::start):
2366         Move setCollectsTimingData to before createCFURLConnection, so the first connection
2367         has timing data associated with it.
2368
2369         * platform/network/mac/ResourceHandleMac.mm:
2370         (WebCore::ResourceHandle::createNSURLConnection):
2371         Move setCollectsTimingData to before we create our NSURLConnection, so the first connection
2372         has timing data associated with it.
2373         Use setCollectsTimingData instead of the NSURLConnection SPI directly.
2374
2375         (WebCore::ResourceHandle::setCollectsTimingData):
2376         Only call _setCollectsTimingData once.
2377
2378 2014-09-10  Enrica Casucci  <enrica@apple.com>
2379
2380         Remove iOS-only -webkit-composition-fill-color CSS property.
2381         https://bugs.webkit.org/show_bug.cgi?id=136728
2382         rdar://problem/10439154
2383
2384         Reviewed by Tim Horton.
2385
2386         This property is no longer used on iOS.
2387
2388         * css/CSSComputedStyleDeclaration.cpp:
2389         (WebCore::ComputedStyleExtractor::propertyValue):
2390         * css/CSSParser.cpp:
2391         (WebCore::CSSParser::parseValue):
2392         * css/CSSPropertyNames.in:
2393         * css/StyleResolver.cpp:
2394         (WebCore::StyleResolver::applyProperty):
2395         * editing/EditingStyle.cpp:
2396         * platform/graphics/Color.h:
2397         * rendering/InlineTextBox.cpp:
2398         (WebCore::InlineTextBox::paintCompositionBackground):
2399         * rendering/style/RenderStyle.h:
2400         * rendering/style/StyleRareInheritedData.cpp:
2401         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2402         (WebCore::StyleRareInheritedData::operator==):
2403         * rendering/style/StyleRareInheritedData.h:
2404
2405 2014-09-10  Tim Horton  <timothy_horton@apple.com>
2406
2407         Remove ImageSource::ShouldSkipMetadata
2408         https://bugs.webkit.org/show_bug.cgi?id=136713
2409
2410         Reviewed by Pratik Solanki.
2411
2412         * platform/graphics/ImageSource.h:
2413         * platform/graphics/cg/ImageSourceCG.cpp:
2414         (WebCore::createImageSourceOptions):
2415         (WebCore::imageSourceOptions):
2416         (WebCore::ImageSource::frameSizeAtIndex):
2417         (WebCore::ImageSource::createFrameAtIndex):
2418         (WebCore::ImageSource::frameDurationAtIndex):
2419         Remove ShouldSkipMetadata and users. Nobody ever uses DoNotSkipMetadata.
2420
2421 2014-09-10  Beth Dakin  <bdakin@apple.com>
2422
2423         https://bugs.webkit.org/show_bug.cgi?id=136650
2424         Rubber-banding in the DOM view of the WebInspector is really jumpy
2425         -and corresponding-
2426         rdar://problem/18166043
2427
2428         Reviewed by Darin Adler.
2429
2430         This patch implements the ScrollableArea virtual function isRubberBandInProgress() 
2431         for RenderLayer, and then uses that to determine whether to clamp the scroll 
2432         position in updateScrollInfoAfterLayout().
2433         * rendering/RenderLayer.cpp:
2434         (WebCore::RenderLayer::isRubberBandInProgress):
2435         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2436         * rendering/RenderLayer.h:
2437
2438 2014-09-10  Tim Horton  <timothy_horton@apple.com>
2439
2440         Remove a workaround in frameIsCompleteAtIndex for a problem that was fixed in Lion
2441         https://bugs.webkit.org/show_bug.cgi?id=136652
2442
2443         Reviewed by Dan Bernstein.
2444
2445         * platform/graphics/cg/ImageSourceCG.cpp:
2446         (WebCore::ImageSource::frameIsCompleteAtIndex):
2447         ImageIO returns the right thing now.
2448
2449 2014-09-10  Myles C. Maxfield  <mmaxfield@apple.com>
2450
2451         Laying out a TextRun using an SVG font is O(n^2)
2452         https://bugs.webkit.org/show_bug.cgi?id=136584
2453
2454         Reviewed by Darin Adler.
2455
2456         Addressing post-commit review from Darin.
2457
2458         No new tests.
2459
2460         * platform/graphics/Font.h:
2461         (WebCore::Font::treatAsSpace): Un-inline.
2462         (WebCore::Font::treatAsZeroWidthSpace): Ditto.
2463         (WebCore::Font::treatAsZeroWidthSpaceInComplexScript): Ditto.
2464         * svg/SVGFontData.cpp:
2465         (WebCore::computeNormalizedSpaces): Avoid unnecessary copy.
2466
2467 2014-09-10  peavo@outlook.com  <peavo@outlook.com>
2468
2469         [Curl] Optimization; avoid reallocating string many times.
2470         https://bugs.webkit.org/show_bug.cgi?id=136704
2471
2472         Reviewed by Alex Christensen.
2473
2474         Adding individual characters to a string is inefficient, the string will be reallocated each time.
2475
2476         * platform/network/curl/CookieJarCurl.cpp:
2477         (WebCore::readCurlCookieToken):
2478
2479 2014-09-10  peavo@outlook.com  <peavo@outlook.com>
2480
2481         [Curl] Compile error, CertificateInfo.h is not found.
2482         https://bugs.webkit.org/show_bug.cgi?id=136703
2483
2484         Reviewed by Alex Christensen.
2485
2486         Curl also needs to implement the CertificateInfo class.
2487
2488         * platform/network/curl/CertificateInfo.h: Added.
2489         (WebCore::CertificateInfo::CertificateInfo):
2490
2491 2014-09-10  Simon Fraser  <simon.fraser@apple.com>
2492
2493         Clean up some ENABLE(PICTURE_SIZES) stuff, don't change function signatures inside #ifdefs
2494         https://bugs.webkit.org/show_bug.cgi?id=136654
2495
2496         Reviewed by Darin Adler.
2497
2498         Adding parameters inside an #ifdef makes for unreadable code, so remove some
2499         #if ENABLE(PICTURE_SIZES) related to the preload scanner and always pass the arguments.
2500         Reduced the argument count on some functions by just passing a Document&. 
2501         
2502         Also fix a couple of uses of #if ENABLE_PICTURE_SIZES.
2503
2504         * html/HTMLImageElement.h:
2505         * html/parser/HTMLDocumentParser.cpp:
2506         (WebCore::HTMLDocumentParser::pumpTokenizer):
2507         (WebCore::HTMLDocumentParser::insert):
2508         (WebCore::HTMLDocumentParser::append):
2509         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
2510         * html/parser/HTMLPreloadScanner.cpp:
2511         (WebCore::TokenPreloadScanner::scan):
2512         (WebCore::HTMLPreloadScanner::scan):
2513         * html/parser/HTMLPreloadScanner.h:
2514         * html/parser/HTMLSrcsetParser.cpp:
2515         (WebCore::pickBestImageCandidate):
2516         (WebCore::bestFitSourceForImageAttributes):
2517         * html/parser/HTMLSrcsetParser.h:
2518
2519 2014-09-10  Chris Fleizach  <cfleizach@apple.com>
2520
2521         AX: aria-labelledby is not honoring sub-node text
2522         https://bugs.webkit.org/show_bug.cgi?id=136689
2523
2524         Reviewed by Mario Sanchez Prada.
2525
2526         Test: accessibility/aria-labelledby-with-descendants.html
2527
2528         When aria-labelledby retrieves the textUnderElements it needs to consider
2529         all sub-children, including focusable content.
2530
2531         * accessibility/AccessibilityNodeObject.cpp:
2532         (WebCore::accessibleNameForNode):
2533
2534 2014-09-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2535
2536         Use toDocument instead of static_cast<Document*>
2537         https://bugs.webkit.org/show_bug.cgi?id=136694
2538
2539         Reviewed by Andy Estes.
2540
2541         Clean up static_cast<Document*>.
2542
2543         * Modules/mediasource/SourceBuffer.cpp:
2544         (WebCore::SourceBuffer::document):
2545         * Modules/webaudio/AudioContext.cpp:
2546         (WebCore::AudioContext::document):
2547         * bindings/gobject/WebKitDOMPrivate.cpp:
2548         (WebKit::wrap):
2549         * dom/ScriptExecutionContext.cpp:
2550         (WebCore::ScriptExecutionContext::dispatchErrorEvent): Add a line to remove .get().
2551         * workers/DefaultSharedWorkerRepository.cpp:
2552         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
2553         * workers/WorkerMessagingProxy.cpp:
2554         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2555         * xml/XMLHttpRequest.cpp:
2556         (WebCore::XMLHttpRequest::document):
2557         (WebCore::XMLHttpRequest::open):
2558
2559 2014-09-10  Yusuke Suzuki  <utatane.tea@gmail.com>
2560
2561         Merge CheckingContexts from SelectorCompiler and SelectorChecker
2562         https://bugs.webkit.org/show_bug.cgi?id=135255
2563
2564         Reviewed by Benjamin Poulain.
2565
2566         In this patch, we merge SelectorChecker::SelectorCheckingContext and SelectorCompiler::CheckingContext.
2567         We expose only SelectorChecker::CheckingContext. That is the same to the old SelectorCompiler::CheckingContext.
2568
2569         In SelectorChecker.cpp, we define SelectorChecker::CheckingContextWithStatus and use it internally.
2570         And we move VisitedMatchType from SelectorChecker.h to SelectorChecker.cpp.
2571
2572         VisitedMatchType is also explicitly used by SelectorCheckerFastPath. However, SelectorCheckerFastPath is now
2573         used only from SelectorQuery (Style resolution algorithm no longer uses it: r171059).
2574         In this patch, we remove SelectorCheckerFastPath since the major cases are covered by CSS JIT.
2575         In `RightMostWithIdMatch`, `Element#matches` and multiple selectors `querySelector('a, b')` cases,
2576         CSS JIT is not used. So dropping fast path affects them. But 1) these cases are rare or 2) the target node
2577         is typically only one since nodes are filtered before matching. So it doesn't have performance regression.
2578
2579         And now since CheckingContextWithStatus is the derived class of CheckingContext, we can use
2580         the same test functions; template parameter is not necessary. It reduces code size.
2581
2582         * CMakeLists.txt:
2583         * WebCore.xcodeproj/project.pbxproj:
2584         * css/CSSAllInOne.cpp:
2585         * css/ElementRuleCollector.cpp:
2586         (WebCore::ElementRuleCollector::ruleMatches):
2587         * css/SelectorChecker.cpp:
2588         (WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus):
2589         (WebCore::SelectorChecker::match):
2590         (WebCore::checkingContextForParent):
2591         (WebCore::SelectorChecker::matchRecursively):
2592         (WebCore::canMatchHoverOrActiveInQuirksMode):
2593         (WebCore::SelectorChecker::checkOne):
2594         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
2595         * css/SelectorChecker.h:
2596         (WebCore::SelectorChecker::CheckingContext::CheckingContext):
2597         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): Deleted.
2598         * css/SelectorCheckerFastPath.cpp: Removed.
2599         * css/SelectorCheckerFastPath.h: Removed.
2600         * css/SelectorCheckerTestFunctions.h:
2601         (WebCore::scrollbarMatchesEnabledPseudoClass):
2602         (WebCore::scrollbarMatchesDisabledPseudoClass):
2603         (WebCore::scrollbarMatchesHoverPseudoClass):
2604         (WebCore::scrollbarMatchesActivePseudoClass):
2605         (WebCore::scrollbarMatchesHorizontalPseudoClass):
2606         (WebCore::scrollbarMatchesVerticalPseudoClass):
2607         (WebCore::scrollbarMatchesDecrementPseudoClass):
2608         (WebCore::scrollbarMatchesIncrementPseudoClass):
2609         (WebCore::scrollbarMatchesStartPseudoClass):
2610         (WebCore::scrollbarMatchesEndPseudoClass):
2611         (WebCore::scrollbarMatchesDoubleButtonPseudoClass):
2612         (WebCore::scrollbarMatchesSingleButtonPseudoClass):
2613         (WebCore::scrollbarMatchesNoButtonPseudoClass):
2614         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
2615         * css/StyleResolver.h:
2616         (WebCore::checkRegionSelector):
2617         * cssjit/SelectorCompiler.cpp:
2618         (WebCore::SelectorCompiler::SelectorFragment::appendUnoptimizedPseudoClassWithContext):
2619         (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
2620         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
2621         (WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingModeWithCheckingContext):
2622         (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
2623         (WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
2624         (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
2625         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
2626         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
2627         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
2628         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
2629         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
2630         * cssjit/SelectorCompiler.h:
2631         (WebCore::SelectorCompiler::CheckingContext::CheckingContext): Deleted.
2632         * dom/SelectorQuery.cpp:
2633         (WebCore::SelectorDataList::SelectorDataList):
2634         (WebCore::SelectorDataList::selectorMatches):
2635         (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
2636         (WebCore::isCompiledSelector):
2637         (WebCore::SelectorDataList::compileSelector):
2638         (WebCore::SelectorDataList::execute):
2639         * dom/SelectorQuery.h:
2640         (WebCore::SelectorDataList::SelectorData::SelectorData):
2641
2642 2014-09-09  Jer Noble  <jer.noble@apple.com>
2643
2644         [MSE] http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html failing after r173318
2645         https://bugs.webkit.org/show_bug.cgi?id=136676
2646
2647         Reviewed by Eric Carlson.
2648
2649         Revert the inadvertant conditional change introduced in r173318.
2650
2651         * Modules/mediasource/MediaSource.cpp:
2652         (WebCore::MediaSource::setDurationInternal):
2653
2654 2014-09-09  Roger Fong  <roger_fong@apple.com>
2655
2656         Unreviewed build fix for Windows.
2657
2658         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2659         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2660         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2661
2662 2014-09-09  Dan Bernstein  <mitz@apple.com>
2663
2664         FrameLoader::prepareForHistoryNavigation is unused
2665         https://bugs.webkit.org/show_bug.cgi?id=136683
2666
2667         Reviewed by Tim Horton.
2668
2669         * loader/FrameLoader.cpp:
2670         (WebCore::FrameLoader::prepareForHistoryNavigation): Deleted.
2671         * loader/FrameLoader.h: Removed the declaration.
2672
2673 2014-09-09  Manuel Rego Casasnovas  <rego@igalia.com>
2674
2675         [CSS Grid Layout] Ignore ::first-letter pseudo-element
2676         https://bugs.webkit.org/show_bug.cgi?id=136625
2677
2678         Reviewed by Darin Adler.
2679
2680         According to the spec the ::first-letter pseudo-element do not apply to
2681         grid containers (neither to flexboxes).
2682
2683         Fixed issue in RenderBlock::getFirstLetter() that applies to both grids
2684         and flexboxes. Basically if the grid's or flexbox's container was
2685         defining the ::first-line pseudo-element and the grid or flexbox itself
2686         too, the value from the grid or flexbox was being applied to the items.
2687         Added the proper check to avoid this.
2688
2689         Added two new tests for grid and modified one flexbox test to cover the
2690         issue explained above.
2691
2692         Tests: css3/flexbox/flexbox-ignore-container-firstLetter.html
2693                fast/css-grid-layout/grid-container-ignore-first-letter.html
2694                fast/css-grid-layout/grid-item-first-letter-valid.html
2695
2696         * rendering/RenderBlock.cpp:
2697         (WebCore::isRenderBlockFlowOrRenderButton): New method refactoring
2698         similar calls through the source code.
2699         (WebCore::RenderBlock::firstLineBlock): Use
2700         isRenderBlockFlowOrRenderButton().
2701         (WebCore::findFirstLetterBlock): Modify it to use
2702         isRenderBlockFlowOrRenderButton() in order to include grids and not only
2703         check flexboxes.
2704         (WebCore::RenderBlock::getFirstLetter): Use
2705         isRenderBlockFlowOrRenderButton().
2706         (WebCore::RenderBlock::updateFirstLetter): Early return if
2707         firstLetterContainer is null (in the case of flexboxes or grids).
2708
2709 2014-09-09  Benjamin Poulain  <benjamin@webkit.org>
2710
2711         Add support for :read-write/:read-only matching editable content
2712         https://bugs.webkit.org/show_bug.cgi?id=136668
2713
2714         Reviewed by Antti Koivisto.
2715
2716         This is the second part of the update of :read-write/:read-only to the latest spec
2717         (http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#selectors).
2718
2719         The selectors :read-write/:read-only should match elements that are editable. The exact definition is:
2720         "elements that are editing hosts or editable and are neither input elements nor textarea elements".
2721
2722         Matching that definition is really easy. It was done by updating HTMLElement's matchesReadWritePseudoClass()
2723         to consider both contentEditable and designMode.
2724
2725         The tricky part is making that efficient in all cases. Matching contentEditable is horribly inefficient
2726         compared to the other primitives. We don't want to execute that for every element.
2727
2728         Since matchesReadWritePseudoClass() was used by the theming code, that code was adjusted to
2729         -Avoid calling that on regular HTMLElement, limiting the query to <input> and <textarea> where it is fast.
2730         -Avoid the call entirely when possible.
2731
2732         Tests: fast/css/read-only-read-write-contenteditable-basics.html
2733                fast/css/read-only-read-write-designmode-basics.html
2734                fast/css/read-only-read-write-webkit-user-modify.html
2735                fast/selectors/read-only-read-write-contenteditable-basics.html
2736                fast/selectors/read-only-read-write-contenteditable-svg-foreignObject.html
2737                fast/selectors/read-only-read-write-designmode-basics.html
2738                fast/selectors/read-only-read-write-style-update.html
2739
2740         * html/HTMLElement.cpp:
2741         (WebCore::contentEditableType):
2742         This code is a generalization of the code that was in HTMLElement::contentEditable().
2743         It is used by both matchesReadWritePseudoClass() and contentEditable() to determine
2744         a valid state from the value of contentEditable.
2745
2746         (WebCore::HTMLElement::matchesReadWritePseudoClass):
2747         Per the definition of editable content, we first check if the current element is an editing host,
2748         if not we look for an editing host. If there are none, test for designMode.
2749
2750         (WebCore::HTMLElement::contentEditable):
2751
2752         (WebCore::RenderTheme::isReadOnlyControl):
2753         The old definition would only match <input> and <textarea>. The code was updated to keep the same
2754         behavior after matchesReadWritePseudoClass() is udpated. This avoids the performance problem of calling
2755         matchesReadWritePseudoClass() on regular HTMLElement.
2756
2757         * platform/ControlStates.h:
2758         ReadOnlyState was only used by ThemeMac for convertControlStatesToThemeDrawState().
2759         In turn, convertControlStatesToThemeDrawState() was only used for painting
2760         "-webkit-inner-spin-button". Buttons are not read-write to begin with.
2761         The whole code looks like legacy from styling of input elements and was removed.
2762
2763         Removing ReadOnlyState removes the expensive part of extractControlStatesForRenderer().
2764
2765         * html/HTMLElement.h:
2766         * html/HTMLFormControlElement.cpp:
2767         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
2768         * platform/mac/ThemeMac.mm:
2769         (WebCore::convertControlStatesToThemeDrawState):
2770         * rendering/RenderTheme.cpp:
2771         (WebCore::RenderTheme::extractControlStatesForRenderer):
2772
2773 2014-09-09  Jer Noble  <jer.noble@apple.com>
2774
2775         [MSE] media/media-source tests broken after r173318
2776         https://bugs.webkit.org/show_bug.cgi?id=136675
2777
2778         Reviewed by Eric Carlson.
2779
2780         Fixes the following tests:
2781             http/tests/media/media-source/mediasource-play.html
2782             http/tests/media/media-source/mediasource-remove.html
2783             media/media-source/media-source-monitor-source-buffers.html
2784             media/media-source/media-source-overlapping-append-buffered.html   
2785
2786         In r173318, a for loop was converted to a C++11 loop, but in so doing, left
2787         pre-initialized, empty values in the beginning of returned Vector, which caused
2788         the calling algorithm to miscalculate the amount of data buffered by the media
2789         source.
2790
2791         * Modules/mediasource/MediaSource.cpp:
2792         (WebCore::MediaSource::activeRanges):
2793
2794 2014-09-09  Takeshi Kurosawa  <taken.spc@gmail.com>
2795
2796         AX: HTML5 landmark (and related) elements should not be ignored.
2797         https://bugs.webkit.org/show_bug.cgi?id=135116
2798
2799         Reviewed by Chris Fleizach.
2800
2801         Make sure following element should not be ignored in computeAccessibilityIsIgnored
2802         - header, aside, address, main, nav, article, section
2803         - dt, dd
2804
2805         Tests: platform/mac/accessibility/descriptionlist-not-ignored.html
2806                platform/mac/accessibility/landmark-not-ignored.html
2807
2808         * accessibility/AccessibilityRenderObject.cpp:
2809         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2810
2811 2014-09-08  Sergio Villar Senin  <svillar@igalia.com>
2812
2813         [CSS Grid Layout] RenderGrid methods should take RenderBox references
2814         https://bugs.webkit.org/show_bug.cgi?id=136630
2815
2816         Reviewed by Darin Adler.
2817
2818         RenderGrid has several methods that take pointers to RenderBox
2819         instances but the body of those methods assumes that the objects
2820         will never be NULL. We should replace them by references.
2821
2822         * rendering/RenderGrid.cpp:
2823         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2824         (WebCore::RenderGrid::logicalContentHeightForChild):
2825         (WebCore::RenderGrid::minContentForChild):
2826         (WebCore::RenderGrid::maxContentForChild):
2827         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2828         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2829         (WebCore::RenderGrid::insertItemIntoGrid):
2830         (WebCore::RenderGrid::placeItemsOnGrid):
2831         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
2832         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
2833         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid):
2834         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2835         (WebCore::RenderGrid::layoutGridItems):
2836         (WebCore::RenderGrid::cachedGridCoordinate):
2837         (WebCore::RenderGrid::gridAreaBreadthForChild):
2838         (WebCore::RenderGrid::findChildLogicalPosition):
2839         * rendering/RenderGrid.h:
2840
2841 2014-09-09  Antti Koivisto  <antti@apple.com>
2842
2843         Remove unnecessary assert that is getting hit in some scenarios.
2844
2845         * platform/network/ResourceResponseBase.cpp:
2846         (WebCore::ResourceResponseBase::certificateInfo):
2847
2848 2014-09-09  Antti Koivisto  <antti@apple.com>
2849
2850         Try to fix windows build.
2851
2852         * platform/network/cf/ResourceResponseCFNet.cpp:
2853         (WebCore::ResourceResponse::platformCertificateInfo):
2854
2855 2014-09-08  Mihnea Ovidenie  <mihnea@adobe.com>
2856
2857         [CSSRegions]Incorrect layout for multicol element transformed into region
2858         https://bugs.webkit.org/show_bug.cgi?id=136459
2859
2860         Reviewed by David Hyatt.
2861
2862         Until we will support the multicolumn region functionality, a multicolumn element
2863         that also has flow-from style is not transformed into a region (https://bugs.webkit.org/show_bug.cgi?id=135153).
2864         However, when a multicolumn element with flow-from style dynamically loses
2865         its multicolumn style while keeping the flow-from style, we have to transform
2866         the element into a region by detaching and attaching the associated DOM node,
2867         in the same way we are proceeding when an element receives a different flow-from style.
2868
2869         Test: fast/regions/multicol/nested-multicol-into-region-dynamic.html
2870
2871         * style/StyleResolveTree.cpp:
2872         (WebCore::Style::determineChange):
2873
2874 2014-09-08  Antti Koivisto  <antti@apple.com>
2875
2876         Pass certificate info as part of ResourceResponse
2877         https://bugs.webkit.org/show_bug.cgi?id=136611
2878
2879         Reviewed by Darin Adler.
2880
2881         The current way of passing certificate info separately from ResourceResponse and then jamming it back
2882         is complex and confusing. This patch makes it a true part of the ResourceResponse.
2883
2884         With this patch we also only create and pass the certificate info object for the main resource. It is
2885         a big and complex object and we never look into it for any other resource type.
2886
2887         * WebCore.exp.in:
2888         * platform/network/ResourceResponseBase.cpp:
2889         (WebCore::ResourceResponseBase::ResourceResponseBase):
2890
2891             Mark initialized for synthetic responses, unitialized for those backed by a platform request.
2892
2893         (WebCore::ResourceResponseBase::initializeCertificateInfo):
2894
2895             Calling this pulls the certificate info out from the platform type.
2896             It shoud only be used for resources that need it.
2897
2898         (WebCore::ResourceResponseBase::certificateInfo):
2899         * platform/network/ResourceResponseBase.h:
2900         (WebCore::ResourceResponseBase::platformCertificateInfo):
2901         (WebCore::ResourceResponseBase::platformSuggestedFileName):
2902         (WebCore::ResourceResponseBase::encode):
2903         (WebCore::ResourceResponseBase::decode):
2904
2905             Encode and decode certificate info if it is present.
2906
2907         * platform/network/cf/ResourceResponse.h:
2908         * platform/network/mac/CertificateInfo.h:
2909         * platform/network/mac/CertificateInfoMac.mm:
2910         (WebCore::CertificateInfo::CertificateInfo):
2911         * platform/network/mac/ResourceResponseMac.mm:
2912         (WebCore::ResourceResponse::platformCertificateInfo):
2913         (WebCore::ResourceResponse::setCertificateChain): Deleted.
2914         (WebCore::ResourceResponse::certificateChain): Deleted.
2915         * platform/network/soup/ResourceResponse.h:
2916         * platform/network/soup/ResourceResponseSoup.cpp:
2917         (WebCore::ResourceResponse::platformCertificateInfo):
2918
2919 2014-09-09  Mihnea Ovidenie  <mihnea@adobe.com>
2920
2921         [CSSRegions] Use C++11 range-based loops in FlowThreadController
2922         https://bugs.webkit.org/show_bug.cgi?id=136634
2923
2924         Reviewed by Andrei Bucur.
2925
2926         No new tests as no new functionality was introduced.
2927
2928         * rendering/FlowThreadController.cpp:
2929         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
2930         (WebCore::FlowThreadController::styleDidChange):
2931         (WebCore::FlowThreadController::layoutRenderNamedFlowThreads):
2932         (WebCore::FlowThreadController::updateFlowThreadsChainIfNecessary):
2933         (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
2934         (WebCore::FlowThreadController::updateFlowThreadsNeedingTwoStepLayout):
2935         (WebCore::FlowThreadController::resetFlowThreadsWithAutoHeightRegions):
2936         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
2937         (WebCore::FlowThreadController::updateFlowThreadsLayerToRegionMappingsIfNeeded):
2938         (WebCore::FlowThreadController::updateNamedFlowsLayerListsIfNeeded):
2939         (WebCore::FlowThreadController::collectFixedPositionedLayers):
2940         (WebCore::FlowThreadController::isAutoLogicalHeightRegionsCountConsistent):
2941
2942 2014-09-08  Simon Fraser  <simon.fraser@apple.com>
2943
2944         Minor refactor in CSSComputedStyleDeclaration
2945         https://bugs.webkit.org/show_bug.cgi?id=136664
2946
2947         Reviewed by Darin Adler.
2948
2949         The "if (length.isPercentNotCalculated()) createValue() else zoomAdjustedPixelValue()"
2950         pattern occurred a number of times here, so factor into percentageOrZoomAdjustedValue().
2951
2952         * css/CSSComputedStyleDeclaration.cpp:
2953         (WebCore::positionOffsetValue): l -> length
2954         (WebCore::percentageOrZoomAdjustedValue):
2955         (WebCore::getBorderRadiusCornerValues):
2956         (WebCore::getBorderRadiusCornerValue):
2957         (WebCore::scrollSnapDestination):
2958         (WebCore::scrollSnapPoints):
2959         (WebCore::scrollSnapCoordinates):
2960
2961 2014-09-08  Alexey Proskuryakov  <ap@apple.com>
2962
2963         Application Cache Storage: failed to execute statement "DELETE FROM CacheGroups" error "no such table: CacheGroups"
2964         https://bugs.webkit.org/show_bug.cgi?id=136647
2965
2966         Reviewed by Darin Adler.
2967
2968         * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::verifySchemaVersion):
2969         Don't try to delete the tables if we can't expect to have them yet.
2970
2971 2014-09-08  Myles C. Maxfield  <mmaxfield@apple.com>
2972
2973         REGRESSION (r172153): Text drawn with wrong color when second text shadow has zero offset and blur (breaks buttons at aws.amazon.com)
2974         https://bugs.webkit.org/show_bug.cgi?id=136612
2975
2976         Reviewed by Darin Adler.
2977
2978         r172153 was fundamentally broken, and would restore graphics contexts that had never been saved. This patch
2979         reimplements r172153 by using "continue" to skip loop iterations instead of changing the internal logic of
2980         the loop.
2981
2982         In addition, I have refactored InlineTextBox::applyShadowToGraphicsContext() to take an extra boolean
2983         reference as an out parameter in order to make it obvious it if saved a graphics context that needs
2984         to be restored. This should make it less likely to make these kinds of mistakes in the future.
2985
2986         Test: fast/text/empty-shadow-with-color.html
2987
2988         * rendering/InlineTextBox.cpp:
2989         (WebCore::InlineTextBox::applyShadowToGraphicsContext): Add bool reference out param.
2990         * rendering/InlineTextBox.h: Ditto.
2991         * rendering/TextPainter.cpp:
2992         (WebCore::isEmptyShadow): Change logic to not skip loop iterations on a null shadow.
2993         (WebCore::paintTextWithShadows): Use continue to skip loop iterations for empty shadows. In addition,
2994         use the out param in InlineTextBox::applyShadowToGraphicsContext().
2995         * rendering/svg/SVGInlineTextBox.cpp:
2996         (WebCore::SVGInlineTextBox::paintTextWithShadows): Update for new sigurature of
2997         InlineTextBox::applyShadowToGraphicsContext().
2998
2999 2014-09-08  Commit Queue  <commit-queue@webkit.org>
3000
3001         Unreviewed, rolling out r173402.
3002         https://bugs.webkit.org/show_bug.cgi?id=136649
3003
3004         Breaking buildw with error "unable to restore file position to
3005         0x00000c60 for section __DWARF.__debug_info (errno = 9)"
3006         (Requested by mlam_ on #webkit).
3007
3008         Reverted changeset:
3009
3010         "Move CallFrame and Register inlines functions out of
3011         JSScope.h."
3012         https://bugs.webkit.org/show_bug.cgi?id=136579
3013         http://trac.webkit.org/changeset/173402
3014
3015 2014-09-05  Mark Lam  <mark.lam@apple.com>
3016
3017         Move CallFrame and Register inlines functions out of JSScope.h.
3018         <https://webkit.org/b/136579>
3019
3020         Reviewed by Geoffrey Garen.
3021
3022         No new tests.
3023
3024         Added #include of the appropriate *Inlines.h files.  Unlike in
3025         JavaScriptCore, I #include'd the specific needed *Inlines.h instead of
3026         JSCInlines.h.  This is done to minimize the need for WebCore to be
3027         rebuilt when JSC changes are introduced.
3028
3029         * ForwardingHeaders/interpreter/RegisterInlines.h: Added.
3030         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
3031         * bindings/js/JSAudioTrackCustom.cpp:
3032         * bindings/js/JSBiquadFilterNodeCustom.cpp:
3033         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3034         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3035         * bindings/js/JSCommandLineAPIHostCustom.cpp:
3036         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
3037         * bindings/js/JSDOMBinding.h:
3038         * bindings/js/JSDOMStringListCustom.cpp:
3039         * bindings/js/JSDOMWindowBase.cpp:
3040         * bindings/js/JSDOMWindowShell.cpp:
3041         * bindings/js/JSDocumentCustom.cpp:
3042         * bindings/js/JSHTMLDocumentCustom.cpp:
3043         * bindings/js/JSOscillatorNodeCustom.cpp:
3044         * bindings/js/JSPannerNodeCustom.cpp:
3045         * bindings/js/JSPopStateEventCustom.cpp:
3046         * dom/TreeWalker.cpp:
3047         * html/HTMLPlugInImageElement.cpp:
3048         * inspector/CommandLineAPIModule.cpp:
3049         * inspector/InspectorController.cpp:
3050
3051 2014-09-08  Dean Jackson  <dino@apple.com>
3052
3053         Separate the Apple media controls module from other ports
3054         https://bugs.webkit.org/show_bug.cgi?id=136644
3055         rdar://problem/18270969
3056
3057         Reviewed by Eric Carlson.
3058
3059         Make a mediaControlsBase.{js|css} that acts as the base
3060         class for the EFL and GTK ports (they were using mediaControlsApple).
3061         Over time, the Apple-specific controls may use more of the
3062         Base class.
3063
3064         * Modules/mediacontrols/mediaControlsBase.css: Added.
3065         * Modules/mediacontrols/mediaControlsBase.js: Added.
3066         * PlatformEfl.cmake:
3067         * PlatformGTK.cmake:
3068         * platform/efl/RenderThemeEfl.cpp:
3069         (WebCore::RenderThemeEfl::mediaControlsStyleSheet): Load Base rather than Apple.
3070         (WebCore::RenderThemeEfl::mediaControlsScript): Ditto.
3071         * rendering/RenderThemeGtk.cpp:
3072         (WebCore::RenderThemeGtk::mediaControlsScript): Ditto.
3073
3074 2014-09-08  Jochen Eisinger  <jochen@chromium.org>
3075
3076         Always update the referrer header in CachedResource
3077         https://bugs.webkit.org/show_bug.cgi?id=136642
3078
3079         Reviewed by Alexey Proskuryakov.
3080
3081         If a request already includes a referrer header, and the document has
3082         a non-default referrer policy, it is possible that we have to modify
3083         the referrer header.
3084
3085         * loader/cache/CachedResource.cpp:
3086         (WebCore::CachedResource::addAdditionalRequestHeaders):
3087
3088 2014-09-08  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
3089
3090         Remove FILTERS flag
3091         https://bugs.webkit.org/show_bug.cgi?id=136571
3092
3093         Reviewed by Darin Adler.
3094
3095         No new tests required, no new functionality.
3096
3097         * CMakeLists.txt:
3098         * Configurations/FeatureDefines.xcconfig:
3099         * DerivedSources.make:
3100         * dom/DOMImplementation.cpp:
3101         (WebCore::isSupportedSVG10Feature):
3102         (WebCore::isSupportedSVG11Feature):
3103         * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
3104         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
3105         * platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h:
3106         * platform/graphics/cpu/arm/filters/NEONHelpers.h:
3107         * platform/graphics/filters/DistantLightSource.cpp:
3108         * platform/graphics/filters/DistantLightSource.h:
3109         * platform/graphics/filters/FEBlend.cpp:
3110         * platform/graphics/filters/FEBlend.h:
3111         * platform/graphics/filters/FEColorMatrix.cpp:
3112         * platform/graphics/filters/FEColorMatrix.h:
3113         * platform/graphics/filters/FEComponentTransfer.cpp:
3114         * platform/graphics/filters/FEComponentTransfer.h:
3115         * platform/graphics/filters/FEComposite.cpp:
3116         * platform/graphics/filters/FEComposite.h:
3117         * platform/graphics/filters/FEConvolveMatrix.cpp:
3118         * platform/graphics/filters/FEConvolveMatrix.h:
3119         * platform/graphics/filters/FEDiffuseLighting.cpp:
3120         * platform/graphics/filters/FEDiffuseLighting.h:
3121         * platform/graphics/filters/FEDisplacementMap.cpp:
3122         * platform/graphics/filters/FEDisplacementMap.h:
3123         * platform/graphics/filters/FEDropShadow.cpp:
3124         * platform/graphics/filters/FEDropShadow.h:
3125         * platform/graphics/filters/FEFlood.cpp:
3126         * platform/graphics/filters/FEFlood.h:
3127         * platform/graphics/filters/FEGaussianBlur.cpp:
3128         * platform/graphics/filters/FEGaussianBlur.h:
3129         * platform/graphics/filters/FELighting.cpp:
3130         * platform/graphics/filters/FELighting.h:
3131         * platform/graphics/filters/FEMerge.cpp:
3132         * platform/graphics/filters/FEMerge.h:
3133         * platform/graphics/filters/FEMorphology.cpp:
3134         * platform/graphics/filters/FEMorphology.h:
3135         * platform/graphics/filters/FEOffset.cpp:
3136         * platform/graphics/filters/FEOffset.h:
3137         * platform/graphics/filters/FESpecularLighting.cpp:
3138         * platform/graphics/filters/FESpecularLighting.h:
3139         * platform/graphics/filters/FETile.cpp:
3140         * platform/graphics/filters/FETile.h:
3141         * platform/graphics/filters/FETurbulence.cpp:
3142         * platform/graphics/filters/FETurbulence.h:
3143         * platform/graphics/filters/Filter.h:
3144         * platform/graphics/filters/FilterEffect.cpp:
3145         * platform/graphics/filters/FilterEffect.h:
3146         * platform/graphics/filters/LightSource.h:
3147         * platform/graphics/filters/PointLightSource.cpp:
3148         * platform/graphics/filters/PointLightSource.h:
3149         * platform/graphics/filters/SourceAlpha.cpp:
3150         * platform/graphics/filters/SourceAlpha.h:
3151         * platform/graphics/filters/SourceGraphic.cpp:
3152         * platform/graphics/filters/SourceGraphic.h:
3153         * platform/graphics/filters/SpotLightSource.cpp:
3154         * platform/graphics/filters/SpotLightSource.h:
3155         * rendering/svg/RenderSVGResource.cpp:
3156         (WebCore::removeFromCacheAndInvalidateDependencies):
3157         * rendering/svg/RenderSVGResourceFilter.cpp:
3158         * rendering/svg/RenderSVGResourceFilter.h:
3159         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
3160         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
3161         * rendering/svg/RenderSVGRoot.cpp:
3162         * rendering/svg/SVGRenderSupport.cpp:
3163         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
3164         * rendering/svg/SVGRenderTreeAsText.cpp:
3165         (WebCore::writeSVGResourceContainer):
3166         (WebCore::writeResources):
3167         * rendering/svg/SVGRenderingContext.cpp:
3168         (WebCore::SVGRenderingContext::~SVGRenderingContext):
3169         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3170         * rendering/svg/SVGRenderingContext.h:
3171         (WebCore::SVGRenderingContext::SVGRenderingContext):
3172         * rendering/svg/SVGResources.cpp:
3173         (WebCore::targetReferenceFromResource):
3174         (WebCore::SVGResources::buildCachedResources):
3175         (WebCore::SVGResources::removeClientFromCache):
3176         (WebCore::SVGResources::resourceDestroyed):
3177         (WebCore::SVGResources::buildSetOfResources):
3178         (WebCore::SVGResources::resetFilter):
3179         (WebCore::SVGResources::dump):
3180         * rendering/svg/SVGResources.h:
3181         (WebCore::SVGResources::filter):
3182         (WebCore::SVGResources::ClipperFilterMaskerData::ClipperFilterMaskerData):
3183         * rendering/svg/SVGResourcesCycleSolver.cpp:
3184         (WebCore::SVGResourcesCycleSolver::breakCycle):
3185         * svg/SVGAnimatedEnumeration.cpp:
3186         (WebCore::enumerationValueForTargetAttribute):
3187         * svg/SVGComponentTransferFunctionElement.cpp:
3188         * svg/SVGComponentTransferFunctionElement.h:
3189         * svg/SVGComponentTransferFunctionElement.idl:
3190         * svg/SVGFEBlendElement.cpp:
3191         * svg/SVGFEBlendElement.h:
3192         * svg/SVGFEBlendElement.idl:
3193         * svg/SVGFEColorMatrixElement.cpp:
3194         * svg/SVGFEColorMatrixElement.h:
3195         * svg/SVGFEColorMatrixElement.idl:
3196         * svg/SVGFEComponentTransferElement.cpp:
3197         * svg/SVGFEComponentTransferElement.h:
3198         * svg/SVGFEComponentTransferElement.idl:
3199         * svg/SVGFECompositeElement.cpp:
3200         * svg/SVGFECompositeElement.h:
3201         * svg/SVGFECompositeElement.idl:
3202         * svg/SVGFEConvolveMatrixElement.cpp:
3203         * svg/SVGFEConvolveMatrixElement.h:
3204         * svg/SVGFEConvolveMatrixElement.idl:
3205         * svg/SVGFEDiffuseLightingElement.cpp:
3206         * svg/SVGFEDiffuseLightingElement.h:
3207         * svg/SVGFEDiffuseLightingElement.idl:
3208         * svg/SVGFEDisplacementMapElement.cpp:
3209         * svg/SVGFEDisplacementMapElement.h:
3210         * svg/SVGFEDisplacementMapElement.idl:
3211         * svg/SVGFEDistantLightElement.cpp:
3212         * svg/SVGFEDistantLightElement.h:
3213         * svg/SVGFEDistantLightElement.idl:
3214         * svg/SVGFEDropShadowElement.cpp:
3215         * svg/SVGFEDropShadowElement.h:
3216         * svg/SVGFEDropShadowElement.idl:
3217         * svg/SVGFEFloodElement.cpp:
3218         * svg/SVGFEFloodElement.h:
3219         * svg/SVGFEFloodElement.idl:
3220         * svg/SVGFEFuncAElement.cpp:
3221         * svg/SVGFEFuncAElement.h:
3222         * svg/SVGFEFuncAElement.idl:
3223         * svg/SVGFEFuncBElement.cpp:
3224         * svg/SVGFEFuncBElement.h:
3225         * svg/SVGFEFuncBElement.idl:
3226         * svg/SVGFEFuncGElement.cpp:
3227         * svg/SVGFEFuncGElement.h:
3228         * svg/SVGFEFuncGElement.idl:
3229         * svg/SVGFEFuncRElement.cpp:
3230         * svg/SVGFEFuncRElement.h:
3231         * svg/SVGFEFuncRElement.idl:
3232         * svg/SVGFEGaussianBlurElement.cpp:
3233         * svg/SVGFEGaussianBlurElement.h:
3234         * svg/SVGFEGaussianBlurElement.idl:
3235         * svg/SVGFEImageElement.cpp:
3236         * svg/SVGFEImageElement.h:
3237         * svg/SVGFEImageElement.idl:
3238         * svg/SVGFELightElement.cpp:
3239         * svg/SVGFELightElement.h:
3240         * svg/SVGFEMergeElement.cpp:
3241         * svg/SVGFEMergeElement.h:
3242         * svg/SVGFEMergeElement.idl:
3243         * svg/SVGFEMergeNodeElement.cpp:
3244         * svg/SVGFEMergeNodeElement.h:
3245         * svg/SVGFEMergeNodeElement.idl:
3246         * svg/SVGFEMorphologyElement.cpp:
3247         * svg/SVGFEMorphologyElement.h:
3248         * svg/SVGFEMorphologyElement.idl:
3249         * svg/SVGFEOffsetElement.cpp:
3250         * svg/SVGFEOffsetElement.h:
3251         * svg/SVGFEOffsetElement.idl:
3252         * svg/SVGFEPointLightElement.cpp:
3253         * svg/SVGFEPointLightElement.h:
3254         * svg/SVGFEPointLightElement.idl:
3255         * svg/SVGFESpecularLightingElement.cpp:
3256         * svg/SVGFESpecularLightingElement.h:
3257         * svg/SVGFESpecularLightingElement.idl:
3258         * svg/SVGFESpotLightElement.cpp:
3259         * svg/SVGFESpotLightElement.h:
3260         * svg/SVGFESpotLightElement.idl:
3261         * svg/SVGFETileElement.cpp:
3262         * svg/SVGFETileElement.h:
3263         * svg/SVGFETileElement.idl:
3264         * svg/SVGFETurbulenceElement.cpp:
3265         * svg/SVGFETurbulenceElement.h:
3266         * svg/SVGFETurbulenceElement.idl:
3267         * svg/SVGFilterElement.cpp:
3268         * svg/SVGFilterElement.h:
3269         * svg/SVGFilterElement.idl:
3270         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3271         * svg/SVGFilterPrimitiveStandardAttributes.h:
3272         * svg/graphics/filters/SVGFEImage.cpp:
3273         * svg/graphics/filters/SVGFEImage.h:
3274         * svg/graphics/filters/SVGFilter.cpp:
3275         * svg/graphics/filters/SVGFilter.h:
3276         * svg/graphics/filters/SVGFilterBuilder.cpp:
3277         * svg/graphics/filters/SVGFilterBuilder.h:
3278         * svg/svgtags.in:
3279
3280 2014-09-08  Simon Fraser  <simon.fraser@apple.com>
3281
3282         Use enum class for the RunPostLayoutTasks enum
3283         https://bugs.webkit.org/show_bug.cgi?id=136640
3284
3285         Reviewed by Dean Jackson.
3286
3287         Use enum class for RunPostLayoutTasks fixing callers. Add an explanatory comment,
3288         and add some spacing.
3289
3290         * dom/Document.cpp:
3291         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
3292         * dom/Document.h:
3293         * html/HTMLAppletElement.cpp:
3294         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
3295         * html/HTMLEmbedElement.cpp:
3296         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
3297         * html/HTMLObjectElement.cpp:
3298         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
3299         * testing/Internals.cpp:
3300         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
3301
3302 2014-09-08  peavo@outlook.com  <peavo@outlook.com>
3303
3304         [WinCairo] Compile error.
3305         https://bugs.webkit.org/show_bug.cgi?id=136633
3306
3307         Reviewed by Darin Adler.
3308
3309         Enum name has already been defined.
3310
3311         * platform/audio/AudioHardwareListener.h:
3312
3313 2014-09-08  Tim Horton  <timothy_horton@apple.com>
3314
3315         Remove some unused code in ImageSourceCG
3316         https://bugs.webkit.org/show_bug.cgi?id=136638
3317
3318         Reviewed by Dan Bernstein.
3319
3320         * platform/graphics/cg/ImageSourceCG.cpp:
3321         (WebCore::ImageSource::setData):
3322         Remove this code. Firstly, it's in a USE(CG) && !PLATFORM(COCOA) && !PLATFORM(WIN)
3323         block, and that's simply not a thing. Secondly, the referenced bug was fixed in Lion.
3324
3325 2014-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3326
3327         Introduce CSS_RULE_TYPE_CASTS, and use it
3328         https://bugs.webkit.org/show_bug.cgi?id=136628
3329
3330         Reviewed by Darin Adler.
3331
3332         As a step to use toFoo, this patch introduces toCSSFooRule(). This will help to detect
3333         wrong type cast. Additionally some missing type casts are clean up as well.
3334
3335         No new tests, no behavior changes.
3336
3337         * bindings/gobject/WebKitDOMPrivate.cpp:
3338         (WebKit::wrap):
3339         * css/CSSFontSelector.cpp:
3340         (WebCore::CSSFontSelector::addFontFaceRule):
3341         * css/CSSImportRule.h:
3342         * css/CSSMediaRule.h:
3343         * css/CSSParser.cpp:
3344         (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
3345         * css/CSSRule.h:
3346         * css/CSSStyleRule.h:
3347         * css/CSSSupportsRule.h:
3348         * css/InspectorCSSOMWrappers.cpp:
3349         (WebCore::InspectorCSSOMWrappers::collect):
3350         * css/WebKitCSSRegionRule.h:
3351         * inspector/InspectorCSSAgent.cpp:
3352         (WebCore::InspectorCSSAgent::asCSSStyleRule):
3353         (WebCore::InspectorCSSAgent::collectStyleSheets):
3354         * inspector/InspectorStyleSheet.cpp:
3355         (WebCore::asCSSRuleList):
3356         (WebCore::fillMediaListChain):
3357         * page/PageSerializer.cpp:
3358         (WebCore::PageSerializer::serializeCSSStyleSheet):
3359
3360 2014-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3361
3362         [EFL[WK2] MiniBrowser comes to crash on debug mode
3363         https://bugs.webkit.org/show_bug.cgi?id=136617
3364
3365         Reviewed by Csaba Osztrogon√°c.
3366
3367         Fix wrong ASSERTION use in applyCursorFromEcoreX().
3368
3369         * platform/efl/EflScreenUtilities.cpp: Change ASSERT(!window) with *ASSERT(window)*
3370         (WebCore::applyCursorFromEcoreX):
3371
3372 2014-09-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3373
3374         Introduce toBasicShapeFoo() instead of static_cast<BasicShapeFoo*>
3375         https://bugs.webkit.org/show_bug.cgi?id=136609
3376
3377         Reviewed by Darin Adler.
3378
3379         To use BasicShapeFoo() helps to detect wrong type casting and improve code readability.
3380
3381         No new tests, no behavior changes.
3382
3383         * css/BasicShapeFunctions.cpp:
3384         (WebCore::valueForBasicShape):
3385         * rendering/shapes/Shape.cpp:
3386         (WebCore::Shape::createShape):
3387         * rendering/style/BasicShapes.cpp:
3388         (WebCore::BasicShape::canBlend):
3389         (WebCore::BasicShapeCircle::blend):
3390         (WebCore::BasicShapeEllipse::blend):
3391         (WebCore::BasicShapePolygon::blend):
3392         (WebCore::BasicShapeInset::blend):
3393         * rendering/style/BasicShapes.h:
3394
3395 2014-09-06  Jer Noble  <jer.noble@apple.com>
3396
3397         [Fullscreen] Add a site-specific hack to work around "flash on exit" behavior of YouTube.com.
3398         https://bugs.webkit.org/show_bug.cgi?id=136604
3399
3400         Reviewed by Eric Carlson.
3401
3402         YouTube.com will cause a "flash" of the full screen sized <video> element upon exiting full
3403         screen because the "fullscreenchange" event is fired asynchronously after the exit animation
3404         completes. Only YouTube sites and embeds, add a site-specific-quirk which runs the "fullscreenchange"
3405         event synchronously at the end of the exit animation. This causes YouTube's video resizing logic
3406         to run during the period of time where we've disabled screen updates, instead of immediately
3407         after.
3408
3409         * dom/Document.cpp:
3410         (WebCore::Document::webkitDidExitFullScreenForElement):
3411
3412 2014-09-06  Darin Adler  <darin@apple.com>
3413
3414         Make updates suggested by new version of Xcode
3415         https://bugs.webkit.org/show_bug.cgi?id=136603
3416
3417         Reviewed by Mark Rowe.
3418
3419         * Configurations/Base.xcconfig: Added COMBINE_HIDPI_IMAGES and
3420         ENABLE_STRICT_OBJC_MSGSEND as suggested by Xcode upgrade check.
3421
3422         * WebCore.xcodeproj/project.pbxproj: Let Xcode remove an orphaned item from the file,
3423         and also updated LastUpgradeCheck.
3424
3425         * html/HTMLMediaElement.cpp:
3426         (WebCore::HTMLMediaElement::updateTextTrackDisplay): Use #if/#else/#endif instead of
3427         using #if/return/#endif and leaving code unreachable.
3428         (WebCore::HTMLMediaElement::configureMediaControls): Ditto.
3429         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
3430         * html/canvas/WebGLDrawBuffers.cpp:
3431         (WebCore::WebGLDrawBuffers::supported): Ditto.
3432
3433 2014-09-06  Brian J. Burg  <burg@cs.washington.edu>
3434
3435         Web Inspector