[WinCairo] Link errors, unresolved texture mapper methods.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-04-01  Per Arne Vollan  <peavo@outlook.com>
2
3         [WinCairo] Link errors, unresolved texture mapper methods.
4         https://bugs.webkit.org/show_bug.cgi?id=143308
5
6         Reviewed by Alex Christensen.
7
8         New texture mapper files should be included in the project.
9
10         * WebCore.vcxproj/WebCore.vcxproj:
11         * WebCore.vcxproj/WebCore.vcxproj.filters:
12
13 2015-04-01  Myles C. Maxfield  <mmaxfield@apple.com>
14
15         Support forcing expansion opportunities at the beginning and ending of a run
16         https://bugs.webkit.org/show_bug.cgi?id=143292
17
18         Reviewed by David Hyatt.
19
20         Migrate ExpansionBehavior to an enum comprised of two values: one for leading behavior
21         and one for trailing behavior. Each of these two values can take on a value of
22         "force," "forbid," and neither. All calls that interact with justification are
23         migrated to use this new structure.
24
25         Note that in this terminology, "leading" and "trailing" are with respect to the order
26         that elements get laid out in a line. Therefore, leading is always on the left, since
27         lines get laid out that way regardless of their bidi attributes.
28
29         This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608
30
31         No new tests because there is no behavior change.
32
33         * platform/graphics/FontCascade.cpp:
34         (WebCore::FontCascade::expansionOpportunityCountInternal): Migrate to these new
35         values.
36         (WebCore::FontCascade::expansionOpportunityCount): Ditto.
37         (WebCore::FontCascade::leadingExpansionOpportunity): Returns whether one is present
38         or not.
39         (WebCore::FontCascade::trailingExpansionOpportunity): Ditto.
40         * platform/graphics/FontCascade.h:
41         * platform/graphics/GlyphBuffer.h: New leading expansion field.
42         (WebCore::GlyphBuffer::setLeadingExpansion):
43         (WebCore::GlyphBuffer::leadingExpansion):
44         * platform/graphics/TextRun.h: m_expansionBehavior needs more bits.
45         (WebCore::TextRun::expansionBehavior):
46         (WebCore::TextRun::allowsLeadingExpansion): Deleted.
47         (WebCore::TextRun::allowsTrailingExpansion): Deleted.
48         * platform/graphics/WidthIterator.cpp: Update to support new type.
49         (WebCore::WidthIterator::WidthIterator):
50         (WebCore::expansionLocation): Where should we insert expansions?
51         (WebCore::WidthIterator::advanceInternal): Use expansionLocation()
52         * platform/graphics/cocoa/FontCascadeCocoa.mm:
53         (WebCore::FontCascade::adjustSelectionRectForComplexText):
54         (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
55         * platform/graphics/mac/ComplexTextController.cpp: Same as WidthIterator
56         (WebCore::ComplexTextController::ComplexTextController):
57         (WebCore::ComplexTextController::advance):
58         (WebCore::expansionLocation):
59         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
60         * platform/graphics/mac/ComplexTextController.h:
61         (WebCore::ComplexTextController::leadingExpansion):
62         * platform/text/TextFlags.h: Add new enum values
63         * rendering/InlineBox.h: Update to include new values.
64         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
65         (WebCore::InlineBox::canHaveTrailingExpansion):
66         (WebCore::InlineBox::setCanHaveTrailingExpansion):
67         (WebCore::InlineBox::setForceTrailingExpansion):
68         (WebCore::InlineBox::forceTrailingExpansion):
69         (WebCore::InlineBox::setForceLeadingExpansion):
70         (WebCore::InlineBox::forceLeadingExpansion):
71         * rendering/InlineTextBox.h:
72         * rendering/RenderBlockLineLayout.cpp: Update to use new FontCascade signatures.
73         (WebCore::expansionBehaviorForInlineTextBox):
74         (WebCore::applyExpansionBehavior):
75         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
76
77 2015-04-01  Zalan Bujtas  <zalan@apple.com>
78
79         Lots of time spent querying table cell borders, when there are none.
80         https://bugs.webkit.org/show_bug.cgi?id=143277
81
82         Reviewed by Simon Fraser.
83
84         This patch speeds up collapsed border queries by using existing collapsed border
85         cache to calculate repaint rects and by introducing a fast path for zero width collapsed borders.
86
87         It reduces the number of calls to recompute collapsed borders from 36 000 to 1 600, while loading a page with a table of 400 rows (1 cell per row).
88         When scrolling the same page all the way down to the bottom, the number of calls to recompute collapsed borders falls from 290 000 to 0.
89
90         Covered by existing tests.
91
92         * rendering/RenderTable.cpp:
93         (WebCore::RenderTable::styleDidChange): This moves invalidation time from RenderTable::layout() to styleDidChange(). 
94         (WebCore::RenderTable::invalidateCollapsedBorders):
95         (WebCore::RenderTable::recalcCollapsedBorders):
96         * rendering/RenderTable.h:
97         (WebCore::RenderTable::collapsedBordersAreValid):
98         (WebCore::RenderTable::invalidateCollapsedBorders): Deleted.
99         * rendering/RenderTableCell.cpp:
100         (WebCore::RenderTableCell::RenderTableCell):
101         (WebCore::RenderTableCell::willBeRemovedFromTree): Invalidate caches so that when repaint rect is calculated, we don't end up using stale values.
102         (WebCore::RenderTableCell::styleDidChange): Same as willBeRemovedFromTree.
103         (WebCore::RenderTableCell::collapsedStartBorder): Check if collapsed border is zero -also query cache. 
104         (WebCore::RenderTableCell::collapsedEndBorder):
105         (WebCore::RenderTableCell::collapsedBeforeBorder):
106         (WebCore::RenderTableCell::collapsedAfterBorder):
107         (WebCore::RenderTableCell::cachedCollapsedLeftBorder):
108         (WebCore::RenderTableCell::cachedCollapsedRightBorder):
109         (WebCore::RenderTableCell::cachedCollapsedTopBorder):
110         (WebCore::RenderTableCell::cachedCollapsedBottomBorder):
111         (WebCore::RenderTableCell::paintCollapsedBorders):
112         (WebCore::RenderTableCell::cellAtLeft): Deleted.
113         (WebCore::RenderTableCell::cellAtRight): Deleted.
114         (WebCore::RenderTableCell::cellAtTop): Deleted.
115         (WebCore::RenderTableCell::cellAtBottom): Deleted.
116         * rendering/RenderTableCell.h:
117         (WebCore::RenderTableCell::invalidateHasEmptyCollapsedBorders):
118         * rendering/RenderTableCol.cpp:
119         (WebCore::RenderTableCol::styleDidChange):
120         * rendering/RenderTableRow.cpp:
121         (WebCore::RenderTableRow::styleDidChange):
122         (WebCore::RenderTableRow::addChild):
123         * rendering/RenderTableSection.cpp:
124         (WebCore::RenderTableSection::styleDidChange):
125         (WebCore::RenderTableSection::clearCachedCollapsedBorders): This is just an extra safety to invalidate collapsed border cache. This is always
126         called together with RenderTable::invalidateCollapsedBorders() -and that should prevent the RenderCells to use the cache.  
127         (WebCore::RenderTableSection::removeCachedCollapsedBorders):
128         (WebCore::RenderTableSection::setCachedCollapsedBorder):
129         (WebCore::RenderTableSection::cachedCollapsedBorder):
130         * rendering/RenderTableSection.h:
131
132 2015-04-01  Carlos Alberto Lopez Perez  <clopez@igalia.com>
133
134         [CMake][GTK] Use the right variable to include the Wayland headers.
135         https://bugs.webkit.org/show_bug.cgi?id=143304
136
137         Reviewed by Carlos Garcia Campos.
138
139         No new tests, no behavior changes.
140
141         * PlatformGTK.cmake: Use the right variable WAYLAND_INCLUDE_DIRS.
142
143 2015-03-30  Philippe Normand  <pnormand@igalia.com>
144
145         [GStreamer] Move synchronous message handler to MediaPlayerPrivateGStreamerBase
146         https://bugs.webkit.org/show_bug.cgi?id=143218
147
148         Reviewed by Carlos Garcia Campos.
149
150         Moved the pipeline pointer to the base class, sub-classes should
151         now invoke setPipeline() when loading a resource. The base class
152         now takes care of configuring the GL shared context, this is more
153         logical because video rendering is also managed by this class.
154
155         No new tests, this is only a code refactoring.
156
157         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
158         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
159         (WebCore::MediaPlayerPrivateGStreamer::load):
160         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
161         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
162         (WebCore::MediaPlayerPrivateGStreamer::pause):
163         (WebCore::MediaPlayerPrivateGStreamer::duration):
164         (WebCore::MediaPlayerPrivateGStreamer::currentTime):
165         (WebCore::MediaPlayerPrivateGStreamer::seek):
166         (WebCore::MediaPlayerPrivateGStreamer::doSeek):
167         (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
168         (WebCore::MediaPlayerPrivateGStreamer::paused):
169         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
170         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
171         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
172         (WebCore::MediaPlayerPrivateGStreamer::setRate):
173         (WebCore::MediaPlayerPrivateGStreamer::buffered):
174         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
175         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
176         (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress):
177         (WebCore::MediaPlayerPrivateGStreamer::sourceChanged):
178         (WebCore::MediaPlayerPrivateGStreamer::cancelLoad):
179         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
180         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
181         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
182         (WebCore::MediaPlayerPrivateGStreamer::cacheDuration):
183         (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
184         (WebCore::MediaPlayerPrivateGStreamer::audioSink):
185         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
186         (WebCore::MediaPlayerPrivateGStreamer::simulateAudioInterruption):
187         (WebCore::mediaPlayerPrivateSyncMessageCallback): Deleted.
188         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Deleted.
189         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): Deleted.
190         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
191         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
192         (WebCore::mediaPlayerPrivateNeedContextMessageCallback):
193         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
194         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline):
195         (WebCore::MediaPlayerPrivateGStreamerBase::handleNeedContextMessage):
196         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
197         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
198
199 2015-03-24  Philippe Normand  <philn@igalia.com>
200
201         [GStreamer] GstGL support in the video sink
202         https://bugs.webkit.org/show_bug.cgi?id=138562
203
204         Use GStreamer's glimagesink for video rendering instead of our
205         custom video sink if a recent-enough version of GstGL is found
206         during the build. When glimagesink is used it passes a texture to
207         the media player which then wraps it inside a TextureMapper
208         texture later used for actual rendering.
209
210         Using this new code path will allow us to remove our custom sink
211         entirely in the long term.
212
213         Reviewed by Carlos Garcia Campos.
214
215         No new test, existing media tests cover video rendering already.
216
217         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
218         (WebCore::mediaPlayerPrivateDrawCallback): client-draw signal callback.
219         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
220         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
221         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): Better
222         check for sample validity.
223         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Ditto.
224         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): Trigger a
225         repaint and wait its completion.
226         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
227         Extract texture ID and video dimensions from the sample and do actual paint.
228         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): Use
229         glimagesink if GstGL is available.
230         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
231
232 2015-04-01  Joonghun Park  <jh718.park@samsung.com>
233
234         nullptr cleanup in StyleResolver
235         https://bugs.webkit.org/show_bug.cgi?id=143260
236
237         Reviewed by Ryosuke Niwa.
238
239         No new tests, no behavior changes
240
241         * css/StyleResolver.cpp:
242         (WebCore::StyleResolver::State::initForStyleResolve):
243         (WebCore::StyleResolver::locateCousinList):
244         (WebCore::StyleResolver::locateSharedStyle):
245         (WebCore::StyleResolver::keyframeStylesForAnimation):
246         (WebCore::StyleResolver::pseudoStyleForElement):
247         (WebCore::StyleResolver::pseudoStyleRulesForElement):
248         (WebCore::StyleResolver::findFromMatchedPropertiesCache):
249         (WebCore::StyleResolver::applyMatchedProperties):
250         (WebCore::StyleResolver::applyPropertyToStyle):
251         (WebCore::StyleResolver::MatchedProperties::MatchedProperties):
252         * css/StyleResolver.h:
253         (WebCore::PseudoStyleRequest::PseudoStyleRequest):
254         (WebCore::StyleResolverParentPusher::StyleResolverParentPusher):
255
256 2015-03-31  Simon Fraser  <simon.fraser@apple.com>
257
258         Make it possible to compute a region for elements on the page that have wheel event handlers
259         https://bugs.webkit.org/show_bug.cgi?id=142807
260
261         Reviewed by David Hyatt.
262         
263         Make it possible to compute a region that covers the elements on the page that have
264         a wheel event handler. This region may overestimate, but must not underestimate the area.
265         
266         Elements with wheel handlers are registered on the document, and when a document gains
267         its first wheel handler, it registers the ownerElement in the parent document. Thus, on 
268         the main frame, the region encompasses elements with handlers, and iframes whose subdocuments
269         have handlers.
270         
271         Element gains some functions that allow it to return a rect which is the bounds of the element's
272         renderer, and renders for its descendant elements, which is the size or larger than the event
273         handling region for that element. Some configurations (e.g. position:fixed) require special
274         treatment.
275         
276         Document::absoluteRegionForEventTargets() can then iterate over all elements in the given set,
277         and build a Region for those (short-circuiting if the document itself has a handler).
278         
279         The new code is exercised for the debug MouseWheelRegionOverlay, and also added to the
280         non-fast scrollable region, used by threaded scrolling.
281
282         Tests: platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html
283                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html
284                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html
285                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html
286                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html
287                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html
288                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html
289                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html
290
291         * dom/ContainerNode.h:
292         (WebCore::ContainerNode::absoluteEventHandlerBounds): Base class implementation; returns empty rect.
293         * dom/Document.cpp:
294         (WebCore::Document::prepareForDestruction): Unregister from the parent document.
295         (WebCore::Document::didAddWheelEventHandler): Add to the wheel handler set. Tell the parent
296         document if we are adding wheel handlers for the first time. Eventually the wheelEventHandlerCountChanged()
297         code will be removed, now we have the set. Tell debug overlays that we changed.
298         (WebCore::Document::didRemoveWheelEventHandler): Remove from the set, and unregister with the parent
299         document if necessary. Tell debug overlays that we changed.
300         (WebCore::Document::didAddTouchEventHandler): Minor cleanup.
301         (WebCore::Document::didRemoveTouchEventHandler): Ditto.
302         (WebCore::Document::didRemoveEventTargetNode): Remove from wheel targets.
303         (WebCore::Document::absoluteEventHandlerBounds): Implementation of the ContainerNode
304         function, just return the document bounds.
305         (WebCore::Document::absoluteRegionForEventTargets): Iterate over the given event targets,
306         and call absoluteEventHandlerBounds() on each.
307         * dom/Document.h:
308         (WebCore::Document::wheelEventTargets):
309         * dom/Element.cpp:
310         (WebCore::layoutOverflowRectContainsAllDescendants): Return true if we can determine that the
311         layoutOverflow bounds of the given renderer contains the renderers of all descendant elements.
312         (WebCore::Element::eventBounds): Get the "event handling" bounds of this element (excluding
313         descendants), and while doing so, compute whether any descendants are position:fixed, and whether
314         these bounds are known to include descendants.
315         (WebCore::Element::eventBoundsOfElementAndDescendants): Recursive function that short-circuits
316         if it can determine that descendants are enclosed by the bounds.
317         (WebCore::Element::absoluteEventHandlerBounds):
318         * dom/Element.h:
319         * page/DebugPageOverlays.cpp:
320         (WebCore::MouseWheelRegionOverlay::updateRegion): Ask the document for the region of wheel
321         event handlers.
322         * page/scrolling/ScrollingCoordinator.cpp:
323         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Add the wheel handler region
324         to the non-fast scrollable region.
325         * rendering/RenderLayer.cpp:
326         (WebCore::RenderLayer::scrollTo): Overflow scrolling needs to dirty event regions.
327         * rendering/RenderObject.cpp:
328         (WebCore::RenderObject::absoluteBoundingBoxRect): Need to pass the "wasFixed" flag out
329         of this function.
330         (WebCore::RenderObject::localToAbsolute): Ditto.
331         * rendering/RenderObject.h:
332
333 2015-03-31  Alexey Proskuryakov  <ap@apple.com>
334
335         Fix bindings tests results after <http://trac.webkit.org/changeset/182205>.
336
337         * bindings/scripts/test/JS/JSTestObj.cpp:
338         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
339         (WebCore::setJSTestObjConditionalAttr4Constructor):
340         (WebCore::setJSTestObjConditionalAttr5Constructor):
341         (WebCore::setJSTestObjConditionalAttr6Constructor):
342         (WebCore::setJSTestObjReplaceableAttribute):
343
344 2015-03-31  Benjamin Poulain  <bpoulain@apple.com>
345
346         Content Extensions: split the state machines to minimize prefix states
347         https://bugs.webkit.org/show_bug.cgi?id=143253
348
349         Reviewed by Alex Christensen.
350
351         With this patch, we refine how the URLs are partitioned to make
352         multiple small machines instead of a big one.
353
354         Here, considering each pattern as a language, I took the simplest
355         partitioning: take the union minimizing the states
356         that differentiate languages.
357
358         The idea is the following: every time a subgraph can be skipped
359         or repeated, it is an opportunity for a merged language to start
360         with a distinguishable state.
361         To avoid accumulating those differences, we only merge languages
362         that share the exact same "variable" subgraph as a prefix.
363
364         A side effect is that we could create as many machines as we have patterns.
365         We'll have to address that in a follow-up by merging small machines
366         until they reach a certain size.
367         In the common cases, patterns look very much alike so that is not a problem
368         at the moment.
369
370         * WebCore.xcodeproj/project.pbxproj:
371         * contentextensions/CombinedURLFilters.cpp: Added.
372         I moved the prefix tree and graph construction out of URLFilterParser for clarity.
373
374         CombinedURLFilters maintain the term prefix tree. Instead of generating on the fly
375         as we build the prefix tree, we first generate the entire tree of terms, then generate
376         NFAs for each branch without a variable prefix.
377
378         (WebCore::ContentExtensions::CombinedURLFilters::CombinedURLFilters):
379         (WebCore::ContentExtensions::CombinedURLFilters::~CombinedURLFilters):
380
381         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
382         Note here that we keep track of which subtree contains a any variable length term.
383         Instead of anotating the edges, the destination vertex is anotated with the information
384         from the edge.
385
386         The flag "inVariableLengthPrefix" is there to simplify traversal.
387
388         (WebCore::ContentExtensions::generateNFAForSubtree):
389         (WebCore::ContentExtensions::CombinedURLFilters::createNFAs):
390         Since we are traversing a tree generated by string, using the stack for recursion
391         is out of the question.
392
393         Fortunately, the entire state is very simple when going depth first: we only need
394         the active vertex and edge, and traverse the edges in order.
395
396         To do keep track of the edges, I used the HashTable iterator on the current term.
397         Since no vertex is modified for generation, storing the iterators is safe.
398
399         * contentextensions/CombinedURLFilters.h:
400         * contentextensions/ContentExtensionCompiler.cpp:
401         (WebCore::ContentExtensions::compileRuleList):
402         * contentextensions/NFA.cpp:
403         (WebCore::ContentExtensions::NFA::setActions):
404         (WebCore::ContentExtensions::NFA::debugPrintDot):
405         (WebCore::ContentExtensions::NFA::setFinal): Deleted.
406         (WebCore::ContentExtensions::NFA::addRuleId): Deleted.
407         * contentextensions/NFA.h:
408         * contentextensions/NFAGraphBuilder.cpp: Added.
409         * contentextensions/NFAGraphBuilder.h: Added.
410         * contentextensions/NFANode.h:
411         * contentextensions/Term.h: Added.
412         Move the Term to its own file since it is now shared between the parser
413         and the CombinedURLFilters.
414
415         (WebCore::ContentExtensions::Term::CharacterSet::operator==):
416         (WebCore::ContentExtensions::Term::CharacterSet::hash):
417         (WebCore::ContentExtensions::Term::Group::operator==):
418         (WebCore::ContentExtensions::Term::Group::hash):
419         (WebCore::ContentExtensions::TermHash::hash):
420         (WebCore::ContentExtensions::TermHash::equal):
421         (WebCore::ContentExtensions::Term::Term):
422         (WebCore::ContentExtensions::Term::~Term):
423         (WebCore::ContentExtensions::Term::isValid):
424         (WebCore::ContentExtensions::Term::addCharacter):
425         (WebCore::ContentExtensions::Term::extendGroupSubpattern):
426         (WebCore::ContentExtensions::Term::quantify):
427         (WebCore::ContentExtensions::Term::Term::generateGraph):
428         (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
429         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
430         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString):
431         (WebCore::ContentExtensions::Term::hasFixedLength):
432         (WebCore::ContentExtensions::Term::operator=):
433         (WebCore::ContentExtensions::Term::operator==):
434         (WebCore::ContentExtensions::Term::hash):
435         (WebCore::ContentExtensions::Term::isEmptyValue):
436         (WebCore::ContentExtensions::Term::isDeletedValue):
437         (WebCore::ContentExtensions::Term::isUniversalTransition):
438         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
439         (WebCore::ContentExtensions::Term::destroy):
440         * contentextensions/URLFilterParser.cpp:
441         (WebCore::ContentExtensions::PatternParser::PatternParser):
442         (WebCore::ContentExtensions::PatternParser::finalize):
443         (WebCore::ContentExtensions::PatternParser::assertionBOL):
444         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
445         (WebCore::ContentExtensions::URLFilterParser::addPattern):
446         (WebCore::ContentExtensions::Term::Term): Deleted.
447         (WebCore::ContentExtensions::Term::~Term): Deleted.
448         (WebCore::ContentExtensions::Term::isValid): Deleted.
449         (WebCore::ContentExtensions::Term::addCharacter): Deleted.
450         (WebCore::ContentExtensions::Term::extendGroupSubpattern): Deleted.
451         (WebCore::ContentExtensions::Term::quantify): Deleted.
452         (WebCore::ContentExtensions::Term::generateGraph): Deleted.
453         (WebCore::ContentExtensions::Term::isEndOfLineAssertion): Deleted.
454         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter): Deleted.
455         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString): Deleted.
456         (WebCore::ContentExtensions::Term::operator=): Deleted.
457         (WebCore::ContentExtensions::Term::operator==): Deleted.
458         (WebCore::ContentExtensions::Term::hash): Deleted.
459         (WebCore::ContentExtensions::Term::isEmptyValue): Deleted.
460         (WebCore::ContentExtensions::Term::isDeletedValue): Deleted.
461         (WebCore::ContentExtensions::Term::isUniversalTransition): Deleted.
462         (WebCore::ContentExtensions::Term::generateSubgraphForAtom): Deleted.
463         (WebCore::ContentExtensions::Term::destroy): Deleted.
464         (WebCore::ContentExtensions::Term::CharacterSet::operator==): Deleted.
465         (WebCore::ContentExtensions::Term::CharacterSet::hash): Deleted.
466         (WebCore::ContentExtensions::Term::Group::operator==): Deleted.
467         (WebCore::ContentExtensions::Term::Group::hash): Deleted.
468         (WebCore::ContentExtensions::TermHash::hash): Deleted.
469         (WebCore::ContentExtensions::TermHash::equal): Deleted.
470         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder): Deleted.
471         (WebCore::ContentExtensions::GraphBuilder::finalize): Deleted.
472         (WebCore::ContentExtensions::GraphBuilder::assertionBOL): Deleted.
473         * contentextensions/URLFilterParser.h:
474
475 2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>
476
477         Move ExpansionBehaviorFlags and TextDirection to their own file
478         https://bugs.webkit.org/show_bug.cgi?id=143273
479
480         Reviewed by Simon Fraser.
481
482         This is a mechanical change. It just moves code around.
483
484         This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608
485
486         No new tests because there is no behavior change.
487
488         * Modules/notifications/Notification.h:
489         * WebCore.vcxproj/WebCore.vcxproj:
490         * WebCore.vcxproj/WebCore.vcxproj.filters:
491         * WebCore.xcodeproj/project.pbxproj:
492         * css/CSSPrimitiveValueMappings.h:
493         * css/CSSProperty.h:
494         * dom/Position.h:
495         * editing/VisiblePosition.h:
496         * editing/VisibleUnits.h:
497         * editing/htmlediting.h:
498         * html/canvas/CanvasRenderingContext2D.cpp:
499         (WebCore::CanvasRenderingContext2D::drawTextInternal):
500         * html/canvas/CanvasRenderingContext2D.h:
501         * platform/LengthBox.h:
502         * platform/PopupMenuStyle.h:
503         * platform/graphics/FontCascade.h:
504         * platform/graphics/LayoutBoxExtent.h:
505         * platform/graphics/TextRun.h:
506         * platform/ios/SelectionRect.h:
507         * platform/text/BidiResolver.h:
508         * platform/text/StringWithDirection.h:
509         * platform/text/TextHelpers.h: Renamed from Source/WebCore/platform/text/TextDirection.h.
510         (WebCore::isLeftToRightDirection):
511         * platform/win/PopupMenuWin.cpp:
512         (WebCore::PopupMenuWin::paint):
513         * rendering/EllipsisBox.cpp:
514         (WebCore::EllipsisBox::paint):
515         (WebCore::EllipsisBox::selectionRect):
516         (WebCore::EllipsisBox::paintSelection):
517         * rendering/HitTestLocation.h:
518         * rendering/HitTestResult.h:
519         * rendering/InlineBox.h:
520         * rendering/InlineTextBox.h:
521         (WebCore::InlineTextBox::expansionBehavior):
522         * rendering/RenderBlock.cpp:
523         (WebCore::constructTextRunInternal):
524         (WebCore::RenderBlock::constructTextRun):
525         * rendering/RenderBlock.h:
526         * rendering/RenderFileUploadControl.cpp:
527         (WebCore::RenderFileUploadControl::paintObject):
528         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
529         * rendering/RenderListBox.cpp:
530         (WebCore::RenderListBox::updateFromElement):
531         (WebCore::RenderListBox::paintItemForeground):
532         * rendering/RenderListMarker.cpp:
533         (WebCore::RenderListMarker::computePreferredLogicalWidths):
534         (WebCore::RenderListMarker::getRelativeMarkerRect):
535         * rendering/RenderMenuList.cpp:
536         (RenderMenuList::updateOptionsWidth):
537         * rendering/RenderTextControl.cpp:
538         (WebCore::RenderTextControl::getAverageCharWidth):
539         * rendering/RenderThemeIOS.mm:
540         * rendering/style/RenderStyle.h:
541         * rendering/svg/SVGInlineTextBox.cpp:
542         (WebCore::SVGInlineTextBox::constructTextRun):
543         * rendering/svg/SVGTextMetrics.cpp:
544         (WebCore::SVGTextMetrics::constructTextRun):
545
546 2015-03-31  Yusuke Suzuki  <utatane.tea@gmail.com>
547
548         Clean up Identifier factories to clarify the meaning of StringImpl*
549         https://bugs.webkit.org/show_bug.cgi?id=143146
550
551         Reviewed by Filip Pizlo.
552
553         Just change Identifier creations.
554
555         1. If the code creates Identifier from StringImpl*
556         which is treated as symbol or string(unique id), use Identifier::fromUid.
557         2. If the code creates Identifier from string, use Identifier::fromString.
558
559         * Modules/plugins/QuickTimePluginReplacement.mm:
560         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
561         (WebCore::QuickTimePluginReplacement::installReplacement):
562         * bindings/js/IDBBindingUtilities.cpp:
563         (WebCore::get):
564         (WebCore::set):
565         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
566         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
567         * bindings/js/JSCallbackData.cpp:
568         (WebCore::JSCallbackData::invokeCallback):
569         * bindings/js/JSCommandLineAPIHostCustom.cpp:
570         (WebCore::getJSListenerFunctions):
571         (WebCore::JSCommandLineAPIHost::getEventListeners):
572         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
573         (WebCore::JSCryptoAlgorithmBuilder::add):
574         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
575         (WebCore::getProperty):
576         (WebCore::getHashAlgorithm):
577         * bindings/js/JSCryptoKeySerializationJWK.cpp:
578         (WebCore::getJSArrayFromJSON):
579         (WebCore::getStringFromJSON):
580         (WebCore::getBooleanFromJSON):
581         (WebCore::addToJSON):
582         (WebCore::buildJSONForRSAComponents):
583         (WebCore::addBoolToJSON):
584         (WebCore::addUsagesToJSON):
585         * bindings/js/JSCustomXPathNSResolver.cpp:
586         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
587         * bindings/js/JSDOMStringMapCustom.cpp:
588         (WebCore::JSDOMStringMap::getOwnPropertyNames):
589         * bindings/js/JSDOMWindowCustom.cpp:
590         (WebCore::JSDOMWindow::defineOwnProperty):
591         (WebCore::JSDOMWindow::setLocation):
592         (WebCore::DialogHandler::dialogCreated):
593         (WebCore::DialogHandler::returnValue):
594         * bindings/js/JSDeviceMotionEventCustom.cpp:
595         (WebCore::readAccelerationArgument):
596         (WebCore::readRotationRateArgument):
597         (WebCore::createAccelerationObject):
598         (WebCore::createRotationRateObject):
599         * bindings/js/JSDictionary.cpp:
600         (WebCore::JSDictionary::tryGetProperty):
601         * bindings/js/JSEventListener.cpp:
602         (WebCore::JSEventListener::handleEvent):
603         * bindings/js/JSHTMLAllCollectionCustom.cpp:
604         (WebCore::callHTMLAllCollection):
605         (WebCore::JSHTMLAllCollection::item):
606         (WebCore::JSHTMLAllCollection::namedItem):
607         * bindings/js/JSHTMLDocumentCustom.cpp:
608         (WebCore::JSHTMLDocument::all):
609         (WebCore::JSHTMLDocument::setAll):
610         (WebCore::JSHTMLDocument::open):
611         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
612         (WebCore::JSHTMLFormControlsCollection::namedItem):
613         * bindings/js/JSIDBDatabaseCustom.cpp:
614         (WebCore::JSIDBDatabase::createObjectStore):
615         * bindings/js/JSIDBObjectStoreCustom.cpp:
616         (WebCore::JSIDBObjectStore::createIndex):
617         * bindings/js/JSImageDataCustom.cpp:
618         (WebCore::toJS):
619         * bindings/js/JSInspectorFrontendHostCustom.cpp:
620         (WebCore::populateContextMenuItems):
621         * bindings/js/JSLazyEventListener.cpp:
622         (WebCore::JSLazyEventListener::initializeJSFunction):
623         * bindings/js/JSNodeFilterCondition.cpp:
624         (WebCore::JSNodeFilterCondition::acceptNode):
625         * bindings/js/JSSQLResultSetRowListCustom.cpp:
626         (WebCore::JSSQLResultSetRowList::item):
627         * bindings/js/JSStorageCustom.cpp:
628         (WebCore::JSStorage::getOwnPropertyNames):
629         * bindings/js/ReadableStreamJSSource.cpp:
630         (WebCore::setInternalSlotToObject):
631         (WebCore::getInternalSlotFromObject):
632         * bindings/js/ScriptGlobalObject.cpp:
633         (WebCore::ScriptGlobalObject::set):
634         (WebCore::ScriptGlobalObject::get):
635         (WebCore::ScriptGlobalObject::remove):
636         * bindings/js/SerializedScriptValue.cpp:
637         (WebCore::CloneSerializer::CloneSerializer):
638         (WebCore::CloneSerializer::write):
639         (WebCore::CloneDeserializer::deserialize):
640         * bindings/objc/WebScriptObject.mm:
641         (-[WebScriptObject callWebScriptMethod:withArguments:]):
642         (-[WebScriptObject setValue:forKey:]):
643         (-[WebScriptObject valueForKey:]):
644         (-[WebScriptObject removeWebScriptKey:]):
645         (-[WebScriptObject hasWebScriptKey:]):
646         * bindings/scripts/CodeGeneratorJS.pm:
647         (GenerateImplementation):
648         * bindings/scripts/test/JS/JSFloat64Array.cpp:
649         (WebCore::JSFloat64Array::getOwnPropertyNames):
650         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
651         (WebCore::JSTestEventTarget::getOwnPropertyNames):
652         * bindings/scripts/test/JS/JSTestObj.cpp:
653         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
654         (WebCore::setJSTestObjConditionalAttr4Constructor):
655         (WebCore::setJSTestObjConditionalAttr5Constructor):
656         (WebCore::setJSTestObjConditionalAttr6Constructor):
657         (WebCore::setJSTestObjReplaceableAttribute):
658         * bridge/c/c_utility.cpp:
659         (JSC::Bindings::identifierFromNPIdentifier):
660         * bridge/objc/objc_runtime.mm:
661         (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
662         * bridge/testbindings.cpp:
663         (main):
664         * bridge/testbindings.mm:
665         (main):
666         * contentextensions/ContentExtensionParser.cpp:
667         (WebCore::ContentExtensions::loadTrigger):
668         (WebCore::ContentExtensions::loadAction):
669         * html/HTMLMediaElement.cpp:
670         (WebCore::HTMLMediaElement::parseAttribute):
671         * html/HTMLPlugInImageElement.cpp:
672         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
673         * testing/js/WebCoreTestSupport.cpp:
674         (WebCoreTestSupport::injectInternalsObject):
675
676 2015-03-31  Jer Noble  <jer.noble@apple.com>
677
678         [Mac] Songza.com fails to play; QTKit path reports it is always "seeking".
679         https://bugs.webkit.org/show_bug.cgi?id=143274
680
681         Rubber-stamped by Eric Carlson.
682
683         MediaTime::invalidTime() is always greater than any valid time. So when
684         checking to see if MediaPlayerPrivateQTKit is seeking, first check if the
685         m_seekTo time is valid before checking whether it's > 0.
686
687         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
688         (WebCore::MediaPlayerPrivateQTKit::seeking):
689
690 2015-03-31  Said Abou-Hallawa  <sabouhallawa@apple.com>
691
692         border-image with 'fill' keyword does not fill the middle area unless the border width is greater than zero.
693         https://bugs.webkit.org/show_bug.cgi?id=142650.
694
695         Reviewed by Simon Fraser.
696
697         The decoration of a RenderBox, a RenderTable or an InlineFlowBox should be
698         drawn if its RenderStyle has a non-zero width border or the border-image
699         has the keyword fill.
700
701         Tests: fast/borders/border-image-fill-inline-no-border.html
702                fast/borders/border-image-fill-no-border.html
703
704         * rendering/InlineFlowBox.cpp:
705         (WebCore::InlineFlowBox::paintBoxDecorations):
706         * rendering/RenderBox.cpp:
707         (WebCore::RenderBox::paintBoxDecorations):
708         * rendering/RenderBoxModelObject.cpp:
709         (WebCore::RenderBoxModelObject::hasBoxDecorationStyle):
710         * rendering/RenderTable.cpp:
711         (WebCore::RenderTable::paintBoxDecorations):
712         * rendering/style/BorderData.h:
713         (WebCore::BorderData::hasFill):
714         * rendering/style/RenderStyle.h:
715
716 2015-03-31  Alex Christensen  <achristensen@webkit.org>
717
718         [Win] Unreviewed build fix.
719
720         * WebCore.vcxproj/WebCore.vcxproj:
721         Don't include inspector files twice in debug builds.
722         InspectorAllInOne.cpp is now used on debug builds.
723
724 2015-03-31  David Hyatt  <hyatt@apple.com>
725
726         [New Block-Inside-Inline Model] Anonymous inline-blocks should size as though they are block-level.
727         https://bugs.webkit.org/show_bug.cgi?id=143271
728
729         Reviewed by Dean Jackson.
730
731         Added fast/block/inside-inlines/block-width-check.html.
732
733         * rendering/RenderBox.cpp:
734         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
735         Return false when an anonymous inline-block is encountered, since we want to treat it like a regular
736         block instead.
737
738 2015-03-31  Commit Queue  <commit-queue@webkit.org>
739
740         Unreviewed, rolling out r182186.
741         https://bugs.webkit.org/show_bug.cgi?id=143270
742
743         it crashes all the WebGL tests on the Debug bots (Requested by
744         dino on #webkit).
745
746         Reverted changeset:
747
748         "Web Inspector: add 2D/WebGL canvas instrumentation
749         infrastructure"
750         https://bugs.webkit.org/show_bug.cgi?id=137278
751         http://trac.webkit.org/changeset/182186
752
753 2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>
754
755         Crash in CGContextShowGlyphsWithAdvances when passing kCGFontIndexInvalid
756         https://bugs.webkit.org/show_bug.cgi?id=143114
757
758         This is a workaround for <rdar://problem/20230073>. Please remove when it is no longer necessary.
759
760         Reviewed by Alexey Proskuryakov.
761
762         Covered by:
763         compositing/regions/floated-region-with-transformed-child.html
764         compositing/regions/floated-region-with-transformed-child-expected.html
765         fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005.html
766         fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005-expected.html
767         fast/regions/overflow/overflow-content-transform-rotate.html
768         fast/regions/overflow/overflow-content-transform-rotate-expected.html
769
770         * platform/graphics/GlyphBuffer.h:
771         (WebCore::GlyphBuffer::shrink): Performing shaping may remove glyphs, so we need to shrink the GlyphBuffer.
772         * platform/graphics/WidthIterator.cpp:
773         (WebCore::applyFontTransforms): Filter out kCGFontIndexInvalid.
774         (WebCore::WidthIterator::advanceInternal): Moved code into applyFontTransforms, and trigger the
775         shrink of the GlyphBuffer.
776
777 2015-03-31  Beth Dakin  <bdakin@apple.com>
778
779         REGRESSION (r173484): Reducing content of scrollable region does not reset scroll 
780         position
781         https://bugs.webkit.org/show_bug.cgi?id=138525
782         -and corresponding-
783         rdar://problem/18166043
784
785         Reviewed by Simon Fraser.
786
787         The change that caused this regression was correct. That change does not allow 
788         RenderLayer to update scroll position after a layout if a rubber-band is currently 
789         happening. The change caused this regression because all of the member variables 
790         in ScrollController that attempt to keep track of the current state of the scroll 
791         gesture (m_inScrollGesture, m_momentumScrollInProgress, and 
792         m_snapRubberbandTimerIsActive) all indicated that a momentum scroll gesture was 
793         still in action for this div even though it very much is not when the bug happens. 
794         Those variables were never properly re-set because the 
795         PlatformWheelEventPhaseEnded events never got dispatched to the ScrollController, 
796         which brought the investigation back to Element.
797
798         We must still dispatch events that have zero delta so that the default event 
799         handlers can handle them, but we should stopPropagation() so that these events are 
800         not sent to the DOM. Websites will break if they get wheel events with no delta.
801         * dom/Element.cpp:
802         (WebCore::Element::dispatchWheelEvent):
803
804 2015-03-31  Alex Christensen  <achristensen@webkit.org>
805
806         [Win] Unreviewed debug build fix after r182186.
807
808         * WebCore.vcxproj/WebCore.vcxproj:
809         Include InspectorAllInOne.cpp in debug builds.
810
811 2015-03-30  David Hyatt  <hyatt@apple.com>
812
813         [New Block-Inside-Inline Model] Make sure line breaks occur before and after the anonymous inline-block.
814         https://bugs.webkit.org/show_bug.cgi?id=143238.
815
816         Reviewed by Dean Jackson.
817
818         Added fast/blocks/inside-inlines/breaking-behavior.html (and new-model equivalent).
819
820         * rendering/InlineFlowBox.h:
821         (WebCore::InlineFlowBox::InlineFlowBox):
822         (WebCore::InlineFlowBox::hasAnonymousInlineBlock):
823         (WebCore::InlineFlowBox::setHasAnonymousInlineBlock):
824         Add a bit to root line boxes (stored in the InlineFlowBox since it has free bits) that indicates whether
825         or not a line is an anonymous inline-block line.
826
827         * rendering/RenderBlockFlow.cpp:
828         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
829         Patch the preferred logical width computation to break both before and after an anonymous inline-block.
830         Also make sure to strip trailing spaces from the line before the anonymous inline-block.
831
832         * rendering/RenderBlockLineLayout.cpp:
833         (WebCore::RenderBlockFlow::constructLine):
834         Patch line construction so that no intermediate boxes are constructed between the InlineBox for the anonymous
835         inline-block and the root line box.
836
837         * rendering/RootInlineBox.cpp:
838         (WebCore::RootInlineBox::ascentAndDescentForBox):
839         The height of a "line" that holds an anonymous inline-block should ignore line-box-contain and also make sure
840         that the margins of the replaced element are "outside" the line, since those margins will collapse.
841
842         * rendering/line/BreakingContext.h:
843         (WebCore::BreakingContext::handleReplaced):
844         Patch handleReplaced to make sure breaks occur both before and after an anonymous inline-block. In the case of
845         a break after the block, we setPreviousLineBrokeCleanly to true so that <br>s that follow the anonymous inline-block
846         are respected.
847
848 2015-03-31  Csaba Osztrogonác  <ossy@webkit.org>
849
850         [EFL] Add nullptr check to GraphicsContext3D::makeContextCurrent()
851         https://bugs.webkit.org/show_bug.cgi?id=143214
852
853         Reviewed by Žan Doberšek.
854
855         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
856         (WebCore::GraphicsContext3D::makeContextCurrent):
857
858 2015-03-31  Matt Baker  <mattbaker@apple.com>
859
860         Web Inspector: add 2D/WebGL canvas instrumentation infrastructure
861         https://bugs.webkit.org/show_bug.cgi?id=137278
862
863         Reviewed by Timothy Hatcher.
864
865         Added backend agent for canvas inspection. A canvas is instrumented once its CanvasRenderingContext has been
866         created. WebGLRenderingContext is instrumented to track the lifetime of shader program objects.
867
868         To instrument off-screen rendering contexts (CSS canvases and detached canvas elements), the canvas agent must
869         track all CanvasRenderingContexts as they are created, even in the absense of the frontend. As far as I know,
870         there is no practical way to identify rendering contexts belonging to a frame that are not in the DOM. In the
871         absence of the inspector frontend the agent does only the minimum required to track the lifetime of rendering
872         contexts and their resources, to avoid creating a negative performance impact.
873
874         Tests: inspector/canvas/canvas-add-remove-events.html
875                inspector/canvas/canvas-context-attributes.html
876                inspector/canvas/canvas-css-name.html
877
878         * CMakeLists.txt:
879         * WebCore.xcodeproj/project.pbxproj:
880
881         * dom/Document.cpp:
882         (WebCore::Document::getCSSCanvasElement):
883         Instrumentation for CSS canvases.
884
885         * html/HTMLCanvasElement.cpp:
886         (WebCore::HTMLCanvasElement::getContext):
887         Instrumentation for context creation.
888
889         * html/canvas/WebGLRenderingContextBase.cpp:
890         (WebCore::WebGLRenderingContextBase::attachShader):
891         (WebCore::WebGLRenderingContextBase::createProgram):
892         (WebCore::WebGLRenderingContextBase::deleteProgram):
893         (WebCore::WebGLRenderingContextBase::detachShader):
894         Instrumentation for programs and shaders.
895
896         * inspector/InspectorAllInOne.cpp:
897
898         * inspector/InspectorCanvasAgent.cpp: Added.
899         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
900         (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
901         (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
902         (WebCore::InspectorCanvasAgent::frameNavigated):
903         (WebCore::InspectorCanvasAgent::didCreateCSSCanvas):
904         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
905         (WebCore::InspectorCanvasAgent::didAttachShader):
906         (WebCore::InspectorCanvasAgent::didDetachShader):
907         (WebCore::InspectorCanvasAgent::didCreateProgram):
908         (WebCore::InspectorCanvasAgent::didDeleteProgram):
909         (WebCore::InspectorCanvasAgent::getCanvases):
910         (WebCore::InspectorCanvasAgent::canvasDestroyed):
911         (WebCore::InspectorCanvasAgent::canvasDestroyedTimerFired):
912         (WebCore::InspectorCanvasAgent::reset):
913         (WebCore::InspectorCanvasAgent::getCanvasEntry):
914         (WebCore::InspectorCanvasAgent::getProgramEntry):
915         (WebCore::InspectorCanvasAgent::removeShaderFromShaderMap):
916         (WebCore::InspectorCanvasAgent::contextTypeJson):
917         (WebCore::InspectorCanvasAgent::buildObjectForCanvas):
918         * inspector/InspectorCanvasAgent.h: Added.
919         New backend agent.
920
921         * inspector/InspectorController.cpp:
922         (WebCore::InspectorController::InspectorController):
923         Support for new backend agent.
924
925         * inspector/InspectorInstrumentation.cpp:
926         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
927         (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl):
928         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
929         (WebCore::InspectorInstrumentation::didAttachShaderImpl):
930         (WebCore::InspectorInstrumentation::didDetachShaderImpl):
931         (WebCore::InspectorInstrumentation::didCreateProgramImpl):
932         (WebCore::InspectorInstrumentation::didDeleteProgramImpl):
933         (WebCore::InspectorInstrumentation::instrumentingAgentsForRenderingContext):
934         Plumbing for canvas instrumentation.
935
936         * inspector/InspectorInstrumentation.h:
937         (WebCore::InspectorInstrumentation::didCreateCSSCanvas):
938         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
939         (WebCore::InspectorInstrumentation::didAttachShader):
940         (WebCore::InspectorInstrumentation::didDetachShader):
941         (WebCore::InspectorInstrumentation::didCreateProgram):
942         (WebCore::InspectorInstrumentation::didDeleteProgram):
943
944         * inspector/InstrumentingAgents.cpp:
945         (WebCore::InstrumentingAgents::InstrumentingAgents):
946         (WebCore::InstrumentingAgents::reset):
947         * inspector/InstrumentingAgents.h:
948         (WebCore::InstrumentingAgents::inspectorCanvasAgent):
949         (WebCore::InstrumentingAgents::setInspectorCanvasAgent):
950         Support for new backend agent.
951
952 2015-03-31  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
953
954         [Streams API] Implement a barebone ReadableStreamReader interface
955         https://bugs.webkit.org/show_bug.cgi?id=142866
956
957         Reviewed by Benjamin Poulain.
958
959         This patch implements a barebone ReadableStreamReader as described in https://streams.spec.whatwg.org/#reader-class.
960         It implements the IDL without implementing most of the functionality behind.
961         It implements ReadableStreamReader JS constructor and the link with ReadableStream.getReader:
962         - Raise an error if stream is already locked
963         - Set the stream reader to the newly created ReadableStreamReader instance.
964
965         Test: streams/readablestreamreader-constructor.html
966
967         * CMakeLists.txt: Adding ReadableStreamReader files.
968         * DerivedSources.cpp: Ditto.
969         * DerivedSources.make: Ditto.
970         * Modules/streams/ReadableStream.cpp:
971         (WebCore::ReadableStream::createReader): Used by JS binding to get access to the reader.
972         * Modules/streams/ReadableStream.h: Declaration of createReader, reader and lock.
973         (WebCore::ReadableStream::reader):
974         (WebCore::ReadableStream::lock):
975         * Modules/streams/ReadableStream.idl: Cleaning-up the IDL.
976         * Modules/streams/ReadableStreamReader.cpp: Added.
977         (WebCore::ReadableStreamReader::create):
978         (WebCore::ReadableStreamReader::ReadableStreamReader):
979         (WebCore::ReadableStreamReader::~ReadableStreamReader):
980         (WebCore::ReadableStreamReader::closed):
981         (WebCore::ReadableStreamReader::activeDOMObjectName):
982         (WebCore::ReadableStreamReader::canSuspend):
983         * Modules/streams/ReadableStreamReader.h: Added.
984         (WebCore::ReadableStreamReader::stream):
985         * Modules/streams/ReadableStreamReader.idl: Added.
986         * WebCore.vcxproj/WebCore.vcxproj:
987         * WebCore.vcxproj/WebCore.vcxproj.filters:
988         * WebCore.xcodeproj/project.pbxproj:
989         * bindings/js/JSBindingsAllInOne.cpp:
990         * bindings/js/JSReadableStreamCustom.cpp:
991         (WebCore::JSReadableStream::getReader):
992         * bindings/js/JSReadableStreamReaderCustom.cpp: Added.
993         (WebCore::JSReadableStreamReader::read):
994         (WebCore::getOrCreatePromiseDeferredFromObject):
995         (WebCore::closedPromiseSlotName):
996         (WebCore::JSReadableStreamReader::closed):
997         (WebCore::JSReadableStreamReader::cancel):
998         (WebCore::JSReadableStreamReader::releaseLock):
999         (WebCore::constructJSReadableStreamReader):
1000
1001 2015-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>
1002
1003         [GTK] DnD icon/widget has odd background
1004         https://bugs.webkit.org/show_bug.cgi?id=143217
1005
1006         Reviewed by Martin Robinson.
1007
1008         Remove DragIcon class since it's no longer needed with GTK+3 and
1009         the GTK+2 code there is unused. GTK+ knows what to do with a cairo
1010         surface, I guess we migrated the GTK+2 code to GTK+3 without
1011         realizing that using the surface was enough.
1012
1013         * PlatformGTK.cmake:
1014         * platform/gtk/DragIcon.cpp: Removed.
1015         * platform/gtk/DragIcon.h: Removed.
1016
1017 2015-03-30  Alex Christensen  <achristensen@webkit.org>
1018
1019         Unreviewed build fix after r182168.
1020
1021         * contentextensions/ContentExtensionsBackend.cpp:
1022         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1023         Explicitly cast to unsigned.
1024
1025 2015-03-30  Alex Christensen  <achristensen@webkit.org>
1026
1027         [Content Extensions] Correctly handle regular expressions matching everything
1028         https://bugs.webkit.org/show_bug.cgi?id=143235
1029
1030         Reviewed by Benjamin Poulain.
1031
1032         Test: http/tests/contentextensions/whitelist.html
1033
1034         * contentextensions/CompiledContentExtension.cpp:
1035         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1036         Global actions can have non-css actions.  Only put the selectors into the list of selectors.
1037         * contentextensions/ContentExtensionCompiler.cpp:
1038         (WebCore::ContentExtensions::serializeSelector):
1039         (WebCore::ContentExtensions::serializeActions):
1040         Merge sequential css selectors with identical triggers (usually .*) into one action to reduce the number of actions.
1041         (WebCore::ContentExtensions::compileRuleList):
1042         Fail if a regular expression matches everything after ignore-previous-rules.
1043         * contentextensions/ContentExtensionError.cpp:
1044         (WebCore::ContentExtensions::contentExtensionErrorCategory):
1045         * contentextensions/ContentExtensionError.h:
1046         Add more failure cases.
1047         * contentextensions/ContentExtensionRule.h:
1048         (WebCore::ContentExtensions::Trigger::operator==):
1049         Allow comparing of Triggers to determine if sequential triggers are equal.
1050         * contentextensions/ContentExtensionsBackend.cpp:
1051         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1052         Put non-css actions that match everything into the list of actions if ignore-previous-rules was not hit.
1053         These actions will be out of order, but order only matters when determining if ignore-previous-rules, and this case is handled correctly.
1054         * contentextensions/DFABytecodeInterpreter.cpp:
1055         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1056         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1057         Added an assertion that all actions that match everything should be in the first DFA root.
1058         We should catch them all with URLFilterParser::MatchesEverything.
1059
1060 2015-03-30  Myles C. Maxfield  <mmaxfield@apple.com>
1061
1062         Allow building on Windows without Cygwin
1063         https://bugs.webkit.org/show_bug.cgi?id=143219
1064
1065         Reviewed by Brent Fulgham.
1066
1067         * AVFoundationSupport.py: Renamed from Source/WebCore/WebCore.vcxproj/MigrateScripts.
1068         Move logic from DerivedSources.make to its own script
1069         (lookFor):
1070         * DerivedSources.make: Paths like /usr/bin don't exist on Windows.
1071         Windows uses del instead of rm -f
1072         Windows doesn't have printf
1073         * WebCore.vcxproj/WebCoreGenerated.make: Pass the CC executable to
1074         build-generated-files.pl
1075         * WebCore.vcxproj/build-generated-files.pl: Export the CC executable as an environment
1076         variable. Don't use /usr/bin.
1077         * WebCore.vcxproj/migrate-scripts.pl: Deleted the MigrateScripts makefile. We don't
1078         need a whole Makefile just to copy 5 files. Moved this logic into migrate-scripts.pl.
1079         (copyFile):
1080         * bindings/scripts/preprocessor.pm:
1081         (applyPreprocessor): Support passing preprocessing flags to the Visual Studio
1082         compiler.
1083         * dom/make_names.pl: Ditto.
1084
1085 2015-03-30  Alexey Proskuryakov  <ap@apple.com>
1086
1087         Build fix.
1088
1089         * platform/spi/mac/AVFoundationSPI.h:
1090
1091 2015-03-30  Sam Weinig  <sam@webkit.org>
1092
1093         [Content Extensions] Flesh out the UserContentExtensionStore
1094         https://bugs.webkit.org/show_bug.cgi?id=143123
1095
1096         Reviewed by Benjamin Poulain.
1097
1098         - Adds a variant of getFileSize() that takes a PlatformFileHandle.
1099         - Adds a new file system function, rename() which operates as the POSIX
1100           rename function does.
1101
1102         * platform/FileSystem.h:
1103         Add new functions.
1104
1105         * platform/posix/FileSystemPOSIX.cpp:
1106         (WebCore::renameFile):
1107         (WebCore::getFileSize):
1108         Add implementations.
1109
1110         * platform/gtk/FileSystemGtk.cpp:
1111         (WebCore::renameFile):
1112         (WebCore::getFileSize):
1113         * platform/win/FileSystemWin.cpp:
1114         (WebCore::getFileSize):
1115         (WebCore::renameFile):
1116         Add stubs.
1117
1118 2015-03-30  Per Arne Vollan  <peavo@outlook.com>
1119
1120         [WinCairo] Crash when closing window while video is loading
1121         https://bugs.webkit.org/show_bug.cgi?id=143088
1122
1123         Reviewed by Mark Lam.
1124
1125         When the media player is destroyed, we have to cancel possible calls on the
1126         main thread made by a worker thread. Otherwise the destroyed media player
1127         will be accessed when performing the call.
1128
1129         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1130         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
1131         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
1132         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
1133         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
1134         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSourceCallback):
1135         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySetCallback):
1136         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1137
1138 2015-03-30  Gwang Yoon Hwang  <yoon@igalia.com>
1139
1140         [Threaded Compositor] Crash when animation changes frequently.
1141         https://bugs.webkit.org/show_bug.cgi?id=143213
1142
1143         Reviewed by Simon Fraser.
1144
1145         CompositingCoordinator copies CoordinatedGraphicsLayerState when
1146         flushing GraphicsLayer changes, and ThreadedCoordinatedCompositor passes
1147         it to compositing thread.
1148
1149         To ensure thread-safety, we need to provide copy constructor to copy
1150         Animation object in TextureMapperAnimation instead of referencing it.
1151
1152         Since TimingFunction and TransformOperation used by KeyframeValueList are
1153         not ThreadSafeRefCounted, these should be cloned also.
1154
1155         No new tests needed.
1156
1157         * platform/graphics/GraphicsLayer.h:
1158         (WebCore::AnimationValue::AnimationValue):
1159         (WebCore::FloatAnimationValue::FloatAnimationValue):
1160         (WebCore::TransformAnimationValue::TransformAnimationValue):
1161         (WebCore::FilterAnimationValue::FilterAnimationValue):
1162         Adds deep copy constructor.
1163
1164         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1165         (WebCore::TextureMapperAnimation::TextureMapperAnimation):
1166         Because the name of the animation can be AtomicString, we need to create
1167         isolated version of string to ensure thread safty.
1168
1169         * platform/graphics/texmap/TextureMapperAnimation.h:
1170         * platform/graphics/transforms/IdentityTransformOperation.h:
1171         * platform/graphics/transforms/Matrix3DTransformOperation.h:
1172         * platform/graphics/transforms/MatrixTransformOperation.h:
1173         * platform/graphics/transforms/PerspectiveTransformOperation.h:
1174         * platform/graphics/transforms/RotateTransformOperation.h:
1175         * platform/graphics/transforms/ScaleTransformOperation.h:
1176         * platform/graphics/transforms/SkewTransformOperation.h:
1177         * platform/graphics/transforms/TransformOperation.h:
1178         * platform/graphics/transforms/TranslateTransformOperation.h:
1179         Adds TransformOperation::clone() for threadsafety.
1180
1181 2015-03-30  Chris Dumez  <cdumez@apple.com>
1182
1183         Cached "Expires" header is not updated upon successful resource revalidation
1184         https://bugs.webkit.org/show_bug.cgi?id=143228
1185         <rdar://problem/20348059>
1186
1187         Reviewed by Antti Koivisto.
1188
1189         Cached "Expires" header was not updated upon successful resource
1190         revalidation. This affected both our disk cache and our memory cache.
1191         This was caused by shouldUpdateHeaderAfterRevalidation() in
1192         CacheValidation.cpp returning false for the "Expires" header.
1193
1194         There is a comment there stating that the list of ignored headers
1195         matches Chromium's net library but that's not the case, at least not
1196         anymore:
1197         http://osxr.org/android/source/external/chromium/net/http/http_response_headers.cc
1198
1199         HTTP servers such as Apache return an "Expires" header in their 304
1200         responses and the "Expires" header is potentially a new one. However,
1201         our caches were ignoring the updated expiration date and kept using the
1202         old one, which meant that the cached resource expired sooner than it
1203         should have.
1204
1205         See the following Apache bugs that explain the issue:
1206         https://bz.apache.org/bugzilla/show_bug.cgi?id=24884
1207         https://bz.apache.org/bugzilla/show_bug.cgi?id=25123
1208
1209         Test: http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html
1210
1211         * platform/network/CacheValidation.cpp:
1212
1213 2015-03-30  Antti Koivisto  <antti@apple.com>
1214
1215         Don't cache resources that are very unlikely to be reused
1216         https://bugs.webkit.org/show_bug.cgi?id=143226
1217         <rdar://problem/20347160>
1218
1219         Reviewed by Geoff Garen.
1220
1221         Allow overriding resource load priorities via Internals for testing.
1222
1223         * loader/FrameLoader.cpp:
1224         (WebCore::FrameLoader::addExtraFieldsToRequest):
1225         (WebCore::FrameLoader::clearTestingOverrides):
1226         * loader/FrameLoader.h:
1227         (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting):
1228         (WebCore::FrameLoader::clearOverrideCachePolicyForTesting): Deleted.
1229         * page/DiagnosticLoggingKeys.cpp:
1230         (WebCore::DiagnosticLoggingKeys::unlikelyToReuseKey):
1231         * page/DiagnosticLoggingKeys.h:
1232
1233             Add a key.
1234
1235         * testing/Internals.cpp:
1236         (WebCore::Internals::resetToConsistentState):
1237         (WebCore::stringToResourceLoadPriority):
1238         (WebCore::Internals::setOverrideResourceLoadPriority):
1239         * testing/Internals.h:
1240         * testing/Internals.idl:
1241
1242 2015-03-30  Javier Fernandez  <jfernandez@igalia.com>
1243
1244         [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
1245         https://bugs.webkit.org/show_bug.cgi?id=133359
1246
1247         Reviewed by David Hyatt.
1248
1249         From Blink r164817 and r165264 by <jchaffraix@chromium.org>
1250
1251         Broaden justify-self's parsing name
1252
1253         This is in preparation of migrating align-self, align-items
1254         and justify-items to the CSS 3 Alignment syntax.
1255
1256         The current naming was too tied to justify-self and needs to
1257         be broadened. This will reduce the follow-up implementations'
1258         patches.
1259
1260         Upgrade align-self and align-items parsing to CSS 3
1261
1262         This change migrates the 2 properties to the CSS 3 Alignment
1263         parsing. The new parsing is identical to how we parse
1264         'justify-self'. The 2 properties need to be migrated together
1265         as they are used in tandem in CSSComputedStyleDeclaration.
1266
1267         This change also removes EAlignItems as it is now unused.
1268
1269         Tests: css3/parse-align-items.html
1270                css3/parse-align-self.html
1271
1272         * css/CSSComputedStyleDeclaration.cpp:
1273         (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties.
1274         (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
1275         (WebCore::ComputedStyleExtractor::propertyValue):
1276         * css/CSSParser.cpp:
1277          (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items.
1278         (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items.
1279         (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value.
1280         (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
1281         (WebCore::CSSParser::parseJustifySelf): Deleted.
1282         (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
1283         * css/CSSParser.h:
1284         * css/CSSPrimitiveValueMappings.h:
1285         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added.
1286         (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
1287         (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
1288         (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
1289         (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
1290         (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
1291         * css/CSSPropertyNames.in:
1292         * css/CSSValueKeywords.in:
1293         * css/StyleBuilderCustom.h:
1294         (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added.
1295         (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added.
1296         (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added.
1297         (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added.
1298         (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added.
1299         (WebCore::StyleBuilderCustom::applyValueAlignItems): Added.
1300         (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added.
1301         (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added.
1302         (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added.
1303         (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted.
1304         * css/StyleResolver.cpp:
1305         (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function.
1306         (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle.
1307         (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle.
1308         (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle.
1309         * rendering/RenderBox.cpp:
1310         (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum.
1311         * rendering/RenderFlexibleBox.cpp:
1312         (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum.
1313         (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum.
1314         (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum.
1315         (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum.
1316         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum.
1317         (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum.
1318         (WebCore::resolveAlignment): Deleted. Moved to RenderStyle.
1319         * rendering/RenderFlexibleBox.h:
1320         * rendering/RenderFullScreen.cpp:
1321         (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum.
1322         * rendering/RenderMenuList.cpp:
1323         (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum.
1324         * rendering/mathml/RenderMathMLRoot.cpp:
1325         (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum.
1326         * rendering/mathml/RenderMathMLScripts.cpp:
1327         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum.
1328         (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum.
1329         * rendering/style/ContentData.h:
1330         * rendering/style/RenderStyle.cpp:
1331         (WebCore::RenderStyle::resolveAlignment): Added.
1332         * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum.
1333         * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum.
1334         * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum.
1335         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum.
1336         (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum.
1337         * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum.
1338         * style/StyleResolveTree.cpp:
1339         (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach.
1340
1341 2015-03-27  David Hyatt  <hyatt@apple.com>
1342
1343         [New Block-Inside-Inline Model] Create anonymous inline blocks to hold blocks-inside-inlines.
1344         https://bugs.webkit.org/show_bug.cgi?id=143145
1345
1346         Reviewed by Dean Jackson.
1347
1348         Added fast/block/inside-inlines/ tests.
1349
1350         * rendering/RenderBlock.cpp:
1351         (WebCore::RenderBlock::renderName):
1352         Add support for labeling anonymous inline-blocks when dumped by the render tree.
1353
1354         * rendering/RenderInline.cpp:
1355         (WebCore::RenderInline::addChildIgnoringContinuation):
1356         When the pref is set to use the new block-inside-inline model, create an anonymous inline block to
1357         hold block children of RenderInlines instead of splitting flows or creating continuations.
1358
1359         * rendering/RenderObject.h:
1360         (WebCore::RenderObject::isAnonymousInlineBlock):
1361         Add the definition of isAnonymousInlineBlock (note the exclusion of Ruby, since Ruby creates anonymous
1362         inline-blocks also).
1363
1364 2015-03-30  Chris Dumez  <cdumez@apple.com>
1365
1366         [WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
1367         https://bugs.webkit.org/show_bug.cgi?id=143159
1368         <rdar://problem/20333296>
1369
1370         Reviewed by Antti Koivisto.
1371
1372         Add support for "Cache-Control: max-stale" request header:
1373         https://tools.ietf.org/html/rfc7234#section-5.2.1.2
1374
1375         Test: http/tests/cache/disk-cache/disk-cache-request-max-stale.html
1376
1377         * platform/network/CacheValidation.cpp:
1378         (WebCore::parseCacheControlDirectives):
1379         * platform/network/CacheValidation.h:
1380
1381 2015-03-30  Simon Fraser  <simon.fraser@apple.com>
1382
1383         Fix iOS internal build after r182132.
1384
1385         * page/scrolling/ScrollingCoordinator.cpp:
1386         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
1387
1388 2015-03-30  Jer Noble  <jer.noble@apple.com>
1389
1390         [iOS] When Web Audio is interrupted by a phone call, it cannot be restarted.
1391         https://bugs.webkit.org/show_bug.cgi?id=143190
1392
1393         Reviewed by Darin Adler.
1394
1395         Tests: webaudio/audiocontext-state-interrupted.html
1396                webaudio/audiocontext-state.html
1397
1398         Implement the following methods and properties from the Web Audio spec:
1399         close(), suspend(), resume(), onstatechange.
1400
1401         AudioContext will take more responsibility for tracking state and interruptions (and
1402         AudioDestination will give up that responsibility). This means AudioContext must be a
1403         MediaSessionClient, and own its own MediaSession. In return, AudioDestinationIOS and 
1404         AudioDestinationMac relinquish both.
1405
1406         * Modules/webaudio/AudioContext.cpp:
1407         (WebCore::AudioContext::AudioContext): Set default values in header.
1408         (WebCore::AudioContext::uninitialize): Call setState() instead of setting m_state.
1409         (WebCore::AudioContext::addReaction): Added. Append the callback to the appropriate vector for the state.
1410         (WebCore::AudioContext::setState): Added. Fire events and resolve the appropriate reaction callbacks for the new state.
1411         (WebCore::AudioContext::state): Return a string representing the context's state.
1412         (WebCore::AudioContext::stop): Close the event queue.
1413         (WebCore::AudioContext::startRendering): Call setState().
1414         (WebCore::AudioContext::fireCompletionEvent): Call setState().
1415         (WebCore::AudioContext::suspendContext): Added. Add reaction callback and call suspend() on the destination node.
1416         (WebCore::AudioContext::resumeContext): Added. Add reaction callback and call resume() on the destination node.
1417         (WebCore::AudioContext::closeContext): Added. Add reaction callback and call close() on the destination node.
1418         (WebCore::AudioContext::suspendPlayback): Added. Suspend playback and set state to interrupted.
1419         (WebCore::AudioContext::mayResumePlayback): Added. Conditionally resume playback.
1420         * bindings/js/JSAudioContextCustom.cpp:
1421         (WebCore::JSAudioContext::suspend): Added. Create and return a new Promise object.
1422         (WebCore::JSAudioContext::resume): Ditto.
1423         (WebCore::JSAudioContext::close): Ditto.
1424         * Modules/webaudio/AudioContext.idl: Add new methods and properties.
1425
1426         Extensive organizational changes were made to AudioContext.h to group instance
1427         variables together and add C++11 initializers in their declarations:
1428
1429         * Modules/webaudio/AudioContext.h:
1430         (WebCore::AudioContext::mediaType): Moved from AudioDestinationNode.
1431         (WebCore::AudioContext::presentationType): Ditto.
1432         (WebCore::AudioContext::canReceiveRemoteControlCommands): Ditto.
1433         (WebCore::AudioContext::didReceiveRemoteControlCommand): Ditto.
1434         (WebCore::AudioContext::overrideBackgroundPlaybackRestriction): Ditto.
1435         
1436         Other changes to support the new AudioContext methods:
1437
1438         * Modules/webaudio/AudioDestinationNode.h:
1439         (WebCore::AudioDestinationNode::resume): Add empty default virtual method.
1440         (WebCore::AudioDestinationNode::suspend): Ditto.
1441         (WebCore::AudioDestinationNode::close): Ditto.
1442         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
1443         (WebCore::DefaultAudioDestinationNode::resume): Added. Pass to AudioDestination.
1444         (WebCore::DefaultAudioDestinationNode::suspend): Ditto.
1445         (WebCore::DefaultAudioDestinationNode::close): Ditto.
1446         * Modules/webaudio/DefaultAudioDestinationNode.h:
1447         * bindings/js/JSDOMPromise.h:
1448         (WebCore::DeferredWrapper::resolve): Add an overload for a nullptr resolve value.
1449         * dom/EventNames.h: Added 'statechange'.
1450         * dom/ScriptExecutionContext.h:
1451         (WebCore::ScriptExecutionContext::Task::Task): Add a constructor which takes a void() callback.
1452
1453         Modify MediaSession, AudioSession, and MediaSessionManager to support the new
1454         interruption behavior.
1455
1456         * html/HTMLMediaElement.cpp:
1457         (WebCore::HTMLMediaElement::suspendPlayback): Renamed from pausePlayback().
1458         (WebCore::HTMLMediaElement::mayResumePlayback): Renamed from resumePlayback().
1459         * html/HTMLMediaElement.h:
1460         * platform/audio/AudioSession.cpp:
1461         (WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return true by default.
1462         (WebCore::AudioSession::setActive): Deleted.
1463         * platform/audio/AudioSession.h:
1464         * platform/audio/MediaSession.cpp:
1465         (WebCore::MediaSession::beginInterruption): pausePlayback() was renamed to suspendPlayback().
1466         (WebCore::MediaSession::endInterruption): Always notify the client, telling it whether to resume.
1467         (WebCore::MediaSession::clientWillBeginPlayback): Bail early if reentrant.  Check the (new) 
1468             return value of sessionWillBeginPlayback() and remember to resume once the interruption ends.
1469         (WebCore::MediaSession::clientWillPausePlayback): Bail early if reentrant.
1470         (WebCore::MediaSession::pauseSession): pausePlayback() was renamed to suspendPlayback().
1471         * platform/audio/MediaSession.h:
1472         * platform/audio/MediaSessionManager.cpp:
1473         (WebCore::MediaSessionManager::sessionWillBeginPlayback): Return false if not allowed to break interruption or 
1474             if activating the audio session failed. Otherwise, end the interruption.
1475         * platform/audio/MediaSessionManager.h:
1476         * platform/audio/ios/AudioDestinationIOS.cpp:
1477         (WebCore::AudioDestinationIOS::AudioDestinationIOS): m_mediaSession was removed.
1478         (WebCore::AudioDestinationIOS::start): Ditto.
1479         * platform/audio/ios/AudioDestinationIOS.h:
1480         * platform/audio/ios/AudioSessionIOS.mm:
1481         (WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return false if the AVAudioSession could not be activated.
1482         (WebCore::AudioSession::setActive): Deleted.
1483         * platform/audio/ios/MediaSessionManagerIOS.h:
1484         * platform/audio/ios/MediaSessionManagerIOS.mm:
1485         (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Do not update the now playing info if session playback was blocked.
1486         * platform/audio/mac/AudioDestinationMac.cpp:
1487         (WebCore::AudioDestinationMac::AudioDestinationMac): m_mediaSession was removed.
1488         * platform/audio/mac/AudioDestinationMac.h:
1489         * platform/audio/mac/AudioSessionMac.cpp:
1490         (WebCore::AudioSession::tryToSetActive): Renamed from setActive(). Return true by default.
1491         (WebCore::AudioSession::setActive): Deleted.
1492         * platform/audio/mac/MediaSessionManagerMac.cpp:
1493         (MediaSessionManager::updateSessionState): No longer attempt to activate the session, as this is done
1494             MediaSessionManager::sessionWillBeginPlayback().
1495         * testing/Internals.cpp:
1496         (WebCore::Internals::setMediaSessionRestrictions): Add "InterruptedPlaybackNotPermitted".
1497
1498 2015-03-25 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1499
1500         [Streams API] Error storage should be moved from source to stream/reader
1501         https://bugs.webkit.org/show_bug.cgi?id=143048
1502
1503         Reviewed by Benjamin Poulain.
1504
1505         This patch removes error storage from the source as it should be stored at the stream level as error access goes through the reader.
1506         It removes abstract ReadableStreamSource::isErrored and the storage of JavaScript errors from ReadableStreamJSSource.
1507
1508         Existing tests cover most of the changes.
1509         Added test case for creating readable stream from empty JS object.
1510
1511         * Modules/streams/ReadableStreamSource.h: Removing isErrored().
1512         * bindings/js/JSReadableStreamCustom.cpp:
1513         (WebCore::constructJSReadableStream): Added JS stream constructor parameters checking.
1514         * bindings/js/ReadableStreamJSSource.cpp:
1515         (WebCore::ReadableStreamJSSource::ReadableStreamJSSource): Removed JS stream constructor parameters checking.
1516         (WebCore::ReadableStreamJSSource::start): Changed prototype of start so that start can throw errors directly.
1517         (WebCore::ReadableStreamJSSource::setInternalError): Deleted.
1518         * bindings/js/ReadableStreamJSSource.h: Removed m_error, setInternalError and updated start declaration.
1519
1520 2015-03-30  Philippe Normand  <pnormand@igalia.com>
1521
1522         [GStreamer] More GL shared context fixes
1523         https://bugs.webkit.org/show_bug.cgi?id=143216
1524
1525         Reviewed by Carlos Garcia Campos.
1526
1527         Moved the GLX/EGL context tests to be done at runtime rather than
1528         using build-time macros because in the GTK port at least, both EGL
1529         and GLX support are mutually exclusive. Also fixed a couple wrong
1530         defines (USE(GLES2) doesn't exist).
1531
1532         * platform/graphics/GLContext.h: Simple utility method to check if
1533         the platform context is compatible with EGL APIs or not.
1534         * platform/graphics/egl/GLContextEGL.h:
1535         (WebCore::GLContextEGL::isEGLContext):
1536         * platform/graphics/glx/GLContextGLX.h:
1537         (WebCore::GLContextGLX::isEGLContext):
1538         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1539         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): Do
1540         runtime checks and properly ensure GLES2/GL API usage.
1541
1542 2015-03-30  Marcos Chavarría Teijeiro  <chavarria1991@gmail.com>
1543
1544         Add support for deleting emoji on GTK
1545         https://bugs.webkit.org/show_bug.cgi?id=141419
1546
1547         Reviewed by Gustavo Noronha Silva.
1548
1549         The code for deleting special group of characters was specific for
1550         COCOA and EFL platforms. The fix consists on add GTK to the #if
1551         preprocessor directive.
1552
1553         * rendering/RenderText.cpp:
1554         (WebCore::RenderText::previousOffsetForBackwardDeletion):
1555
1556 2015-03-30  Benjamin Poulain  <benjamin@webkit.org>
1557
1558         Start the features.json files
1559         https://bugs.webkit.org/show_bug.cgi?id=143207
1560
1561         Reviewed by Darin Adler.
1562
1563         * features.json: Added.
1564
1565 2015-03-29  Simon Fraser  <simon.fraser@apple.com>
1566
1567         Convert arguments to ScrollingCoordinator functions to references
1568         https://bugs.webkit.org/show_bug.cgi?id=143198
1569
1570         Reviewed by Darin Adler.
1571
1572         Convert all the FrameView* and ScrollableArea* arguments to ScrollingCoordinator functions to
1573         references, and use references in a few other places.
1574
1575         * dom/Document.cpp:
1576         (WebCore::wheelEventHandlerCountChanged):
1577         * loader/HistoryController.cpp:
1578         (WebCore::HistoryController::restoreScrollPositionAndViewState):
1579         * page/DebugPageOverlays.cpp:
1580         (WebCore::NonFastScrollableRegionOverlay::updateRegion):
1581         * page/Frame.cpp:
1582         (WebCore::Frame::willDetachPage):
1583         * page/FrameView.cpp:
1584         (WebCore::FrameView::prepareForDetach):
1585         (WebCore::FrameView::addSlowRepaintObject):
1586         (WebCore::FrameView::removeSlowRepaintObject):
1587         (WebCore::FrameView::addViewportConstrainedObject):
1588         (WebCore::FrameView::removeViewportConstrainedObject):
1589         (WebCore::FrameView::requestScrollPositionUpdate):
1590         (WebCore::FrameView::performPostLayoutTasks):
1591         (WebCore::FrameView::scrollableAreaSetChanged):
1592         (WebCore::FrameView::wheelEvent):
1593         * page/Page.cpp:
1594         (WebCore::Page::nonFastScrollableRects):
1595         * page/Page.h:
1596         * page/scrolling/AsyncScrollingCoordinator.cpp:
1597         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1598         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
1599         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
1600         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
1601         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
1602         (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
1603         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
1604         (WebCore::AsyncScrollingCoordinator::updateMainFrameScrollLayerPosition):
1605         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
1606         * page/scrolling/AsyncScrollingCoordinator.h:
1607         * page/scrolling/ScrollingCoordinator.cpp:
1608         (WebCore::ScrollingCoordinator::pageDestroyed):
1609         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
1610         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
1611         (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged):
1612         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
1613         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
1614         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea):
1615         (WebCore::ScrollingCoordinator::scrollLayerForFrameView):
1616         (WebCore::ScrollingCoordinator::headerLayerForFrameView):
1617         (WebCore::ScrollingCoordinator::footerLayerForFrameView):
1618         (WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView):
1619         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
1620         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
1621         (WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
1622         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
1623         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
1624         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
1625         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
1626         (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
1627         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
1628         (WebCore::ScrollingCoordinator::replaySessionStateDidChange):
1629         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
1630         * page/scrolling/ScrollingCoordinator.h: Align the bitmask enums to make mistakes easier to spot.
1631         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
1632         (WebCore::ScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
1633         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
1634         (WebCore::ScrollingCoordinator::handleWheelEvent):
1635         (WebCore::ScrollingCoordinator::willDestroyScrollableArea):
1636         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
1637         (WebCore::ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
1638         (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
1639         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1640         (WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
1641         (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
1642         (WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate):
1643         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
1644         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
1645         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1646         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1647         (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
1648         * rendering/RenderLayer.cpp:
1649         (WebCore::RenderLayer::~RenderLayer):
1650         * rendering/RenderLayerBacking.cpp:
1651         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
1652         * rendering/RenderLayerCompositor.cpp:
1653         (WebCore::RenderLayerCompositor::updateBacking):
1654         (WebCore::RenderLayerCompositor::hasCoordinatedScrolling):
1655         (WebCore::RenderLayerCompositor::scrollingLayerDidChange):
1656         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1657         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1658         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1659         (WebCore::RenderLayerCompositor::destroyRootLayer):
1660         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
1661         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1662         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1663         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
1664         * testing/Internals.cpp:
1665         (WebCore::Internals::nonFastScrollableRects):
1666
1667 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
1668
1669         Use :matches() instead of :-webkit-any() for the sections and headings default style
1670         https://bugs.webkit.org/show_bug.cgi?id=143197
1671
1672         Reviewed by Darin Adler.
1673
1674         We no longer need to use the :-webkit-any() hack in the default stylesheet.
1675
1676         The pseudo class :matches() also support correct specificity. This is not observable
1677         since those selector do not conflict with any other rule in the default stylesheet.
1678
1679         * css/CSSSelector.h:
1680         * css/SelectorChecker.cpp:
1681         (WebCore::SelectorChecker::determineLinkMatchType):
1682         * css/html.css:
1683         (:matches(article, aside, nav, section) h1):
1684         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1685         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1686         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1687         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1688         (:-webkit-any(article,aside,nav,section) h1): Deleted.
1689         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1690         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1691         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1692         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1693
1694 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
1695
1696         `currentColor` computes to the same colour on all elements, even if 'color' is inherited differently
1697         https://bugs.webkit.org/show_bug.cgi?id=133420
1698
1699         Reviewed by Darin Adler.
1700
1701         When resolving a style with the help of the property cache, we were
1702         completely ignoring currentColor.
1703
1704         Since you can set currentColor on properties that are not inherited,
1705         those properties would just be copied from the cached style, which
1706         may have a completely different inherited color.
1707
1708         This pacth fixes the issue by preventing any MatchResult from hitting
1709         the cache if it contains any non-inherited property that would require
1710         resolution by the cache:
1711         -Using the inherit value.
1712         -Using the currentColor value.
1713
1714         Tests: fast/css/currentColor-on-before-after-pseudo-elements.html
1715                fast/css/currentColor-style-update-reftest.html
1716                fast/css/currentColor-value-style-update.html
1717
1718         * css/ElementRuleCollector.cpp:
1719         (WebCore::ElementRuleCollector::addElementStyleProperties):
1720         (WebCore::ElementRuleCollector::matchAuthorRules):
1721         (WebCore::ElementRuleCollector::matchUserRules):
1722         (WebCore::ElementRuleCollector::matchUARules):
1723         * css/StyleResolver.cpp:
1724         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
1725         (WebCore::StyleResolver::styleForKeyframe):
1726         (WebCore::StyleResolver::pseudoStyleForElement):
1727         (WebCore::StyleResolver::styleForPage):
1728         (WebCore::StyleResolver::findFromMatchedPropertiesCache):
1729         (WebCore::StyleResolver::addToMatchedPropertiesCache):
1730         (WebCore::extractDirectionAndWritingMode):
1731         (WebCore::StyleResolver::applyMatchedProperties):
1732         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
1733         (WebCore::StyleResolver::CascadedProperties::addMatches):
1734         * css/StyleResolver.h:
1735         (WebCore::StyleResolver::MatchResult::matchedProperties):
1736
1737 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
1738
1739         Enable :any-link by default
1740         https://bugs.webkit.org/show_bug.cgi?id=143201
1741
1742         Reviewed by Sam Weinig.
1743
1744         The pseudo class :any-link has been stable for a while. This patch enables
1745         it by default and remove the -webkit- prefix on the default style.
1746
1747         * css/CSSDefaultStyleSheets.cpp:
1748         * css/CSSSelector.cpp:
1749         (WebCore::CSSSelector::selectorText):
1750         * css/CSSSelector.h:
1751         * css/RuleSet.cpp:
1752         (WebCore::RuleSet::addRule):
1753         * css/SelectorChecker.cpp:
1754         (WebCore::SelectorChecker::checkOne):
1755         * css/SelectorChecker.h:
1756         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
1757         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1758         * css/html.css:
1759         (a:any-link):
1760         (a:any-link:active):
1761         (:any-link img):
1762         (a:-webkit-any-link): Deleted.
1763         (a:-webkit-any-link:active): Deleted.
1764         (:-webkit-any-link img): Deleted.
1765         * cssjit/SelectorCompiler.cpp:
1766         (WebCore::SelectorCompiler::addPseudoClassType):
1767         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
1768
1769 2015-03-29  Joonghun Park  <jh718.park@samsung.com>
1770
1771         nullptr cleanup in RenderFooBox classes
1772         https://bugs.webkit.org/show_bug.cgi?id=143182
1773
1774         Reviewed by Ryosuke Niwa.
1775
1776         No new tests, no behavior changes
1777
1778         Replace 0 with nullptr in RenderFooBox classes.
1779
1780         * rendering/RenderBox.cpp:
1781         (WebCore::RenderBox::RenderBox):
1782         (WebCore::RenderBox::paintFillLayer):
1783         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
1784         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
1785         (WebCore::RenderBox::renderBoxRegionInfo):
1786         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1787         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1788         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
1789         (WebCore::RenderBox::positionForPoint):
1790         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1791         * rendering/RenderBox.h:
1792         (WebCore::RenderBox::setMarginBefore):
1793         (WebCore::RenderBox::setMarginAfter):
1794         (WebCore::RenderBox::setMarginStart):
1795         (WebCore::RenderBox::setMarginEnd):
1796         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
1797         (WebCore::RenderBox::setInlineBoxWrapper):
1798         * rendering/RenderBoxModelObject.cpp:
1799         (WebCore::RenderBoxModelObject::willBeDestroyed):
1800         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
1801         (WebCore::RenderBoxModelObject::paintBorderSides):
1802         (WebCore::RenderBoxModelObject::firstLetterRemainingText):
1803         * rendering/RenderBoxModelObject.h:
1804         (WebCore::RenderBoxModelObject::moveChildTo):
1805         (WebCore::RenderBoxModelObject::moveAllChildrenTo):
1806         (WebCore::RenderBoxModelObject::moveChildrenTo):
1807         * rendering/RenderDeprecatedFlexibleBox.cpp:
1808         (WebCore::FlexBoxIterator::reset):
1809         (WebCore::FlexBoxIterator::next):
1810         * rendering/RenderDeprecatedFlexibleBox.h:
1811         * rendering/RenderFlexibleBox.cpp:
1812         (WebCore::RenderFlexibleBox::firstLineBaseline):
1813         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1814         * rendering/RenderLineBoxList.cpp:
1815         (WebCore::RenderLineBoxList::deleteLineBoxTree):
1816         (WebCore::RenderLineBoxList::extractLineBox):
1817         (WebCore::RenderLineBoxList::deleteLineBoxes):
1818         (WebCore::RenderLineBoxList::checkConsistency):
1819         * rendering/RenderLineBoxList.h:
1820         (WebCore::RenderLineBoxList::RenderLineBoxList):
1821         * rendering/RenderListBox.cpp:
1822         (WebCore::RenderListBox::enclosingScrollableArea):
1823         (WebCore::RenderListBox::setHasVerticalScrollbar):
1824         * rendering/RenderListBox.h:
1825
1826 2015-03-29  Darin Adler  <darin@apple.com>
1827
1828         HTMLCollection caches incorrect length if item(0) is called before length on an empty collection
1829         https://bugs.webkit.org/show_bug.cgi?id=143203
1830         rdar://problem/18460462
1831
1832         Reviewed by Antti Koivisto.
1833
1834         Test: fast/dom/htmlcollection-length-after-item-2.html
1835
1836         * dom/CollectionIndexCache.h:
1837         (CollectionIndexCache::nodeAt): If we hit the end looking for index 0, cache a length
1838         of 0, not a length of 1.
1839
1840 2015-03-29  Darin Adler  <darin@apple.com>
1841
1842         Remove unneeded SVG code, including most isSupportedAttribute functions
1843         https://bugs.webkit.org/show_bug.cgi?id=143194
1844
1845         Reviewed by Antti Koivisto.
1846
1847         - Removed most implementations of isSupportedAttribute. Others can be removed in
1848           future patches. The ones left behind are now all private static member functions.
1849           It's dangerous for them to be public because they tend to indicate which attributes
1850           are supported at a particular level in the class hierarchy and they are not virtual
1851           functions; might want to rethink the function name if we keep any of these long term.
1852
1853         - Removed unneeded includes, especially of Attr.h and Attribute.h.
1854
1855         - Changed most parseAttribute and svgAttributeChanged functions so they no longer
1856           rely on checking attribute names against a set. Also removed lots of unneeded calls
1857           to SVGLangSpace::parseAttribute, which is called by SVGElement::parseAttribute and
1858           need not be called by derived classes.
1859
1860         - Removed return values from parseAttribute functions. Skipping other parseAttribute
1861           logic is not an important optimization and makes functions needlessly complex.
1862
1863         - Moved use of InstanceInvalidationGuard closer to where they are needed. Eventually
1864           we may be able to remove many of these.
1865
1866         - Used auto in a few places where the same type is repeated twice on the same line of
1867           code, and auto makes it a bit smaller.
1868
1869         - Got rid of protected sections in some final classes; doesn't make sense to combine
1870           these two. Also moved a few functions from protected to private in other classes.
1871
1872         - Made a number of functions into static member functions in the base classes such
1873           as SVGLangSpace; they were not making any use of the object, and so it was wasteful
1874           to compile them as non-static member functions.
1875
1876         * rendering/svg/RenderSVGImage.cpp: Removed unneeded includes.
1877         * svg/SVGAElement.cpp: Removed unneeded includes.
1878         (WebCore::SVGAElement::isSupportedAttribute): Deleted.
1879         (WebCore::SVGAElement::parseAttribute): Don't use isSupportedAttribute.
1880         (WebCore::SVGAElement::svgAttributeChanged): Don't use isSupportedAttribute.
1881         * svg/SVGAElement.h: Removed isSupportedAttribute.
1882         * svg/SVGAnimateMotionElement.cpp: Removed unneeded includes.
1883         (WebCore::SVGAnimateMotionElement::isSupportedAttribute): Deleted.
1884         (WebCore::SVGAnimateMotionElement::parseAttribute): Don't use isSupportedAttribute.
1885         * svg/SVGAnimateMotionElement.h: Removed isSupportedAttribute.
1886         * svg/SVGAnimateTransformElement.cpp:
1887         (WebCore::SVGAnimateTransformElement::isSupportedAttribute): Deleted.
1888         (WebCore::SVGAnimateTransformElement::parseAttribute): Don't use isSupportedAttribute.
1889         * svg/SVGAnimateTransformElement.h: Removed isSupportedAttribute.
1890         * svg/SVGAnimationElement.cpp:
1891         (WebCore::SVGAnimationElement::parseAttribute): Don't use isSupportedAttribute.
1892         * svg/SVGCircleElement.cpp:
1893         (WebCore::SVGCircleElement::isSupportedAttribute): Deleted.
1894         (WebCore::SVGCircleElement::parseAttribute): Don't use isSupportedAttribute.
1895         (WebCore::SVGCircleElement::svgAttributeChanged): Don't use isSupportedAttribute.
1896         * svg/SVGCircleElement.h: Removed isSupportedAttribute.
1897         * svg/SVGClipPathElement.cpp: Removed unneeded includes.
1898         (WebCore::SVGClipPathElement::parseAttribute): Don't use isSupportedAttribute.
1899         * svg/SVGComponentTransferFunctionElement.cpp:
1900         (WebCore::SVGComponentTransferFunctionElement::parseAttribute): Don't use isSupportedAttribute.
1901         * svg/SVGCursorElement.cpp: Removed unneeded includes.
1902         (WebCore::SVGCursorElement::parseAttribute): Don't use isSupportedAttribute.
1903         (WebCore::SVGCursorElement::svgAttributeChanged): Don't use isSupportedAttribute.
1904         * svg/SVGElement.cpp: Removed unneeded includes.
1905         * svg/SVGEllipseElement.cpp: Removed unneeded includes.
1906         (WebCore::SVGEllipseElement::isSupportedAttribute): Deleted.
1907         (WebCore::SVGEllipseElement::parseAttribute): Don't use isSupportedAttribute.
1908         (WebCore::SVGEllipseElement::svgAttributeChanged): Don't use isSupportedAttribute.
1909         * svg/SVGEllipseElement.h: Removed isSupportedAttribute.
1910         * svg/SVGExternalResourcesRequired.cpp: Removed unneeded includes.
1911         (WebCore::SVGExternalResourcesRequired::parseAttribute): Don't return a boolean.
1912         * svg/SVGExternalResourcesRequired.h: Don't return a boolean.
1913         * svg/SVGFEBlendElement.cpp: Removed unneeded includes.
1914         (WebCore::SVGFEBlendElement::isSupportedAttribute): Deleted.
1915         (WebCore::SVGFEBlendElement::parseAttribute): Don't use isSupportedAttribute.
1916         (WebCore::SVGFEBlendElement::svgAttributeChanged): Don't use isSupportedAttribute.
1917         * svg/SVGFEBlendElement.h: Removed isSupportedAttribute.
1918         * svg/SVGFEColorMatrixElement.cpp: Removed unneeded includes.
1919         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute): Deleted.
1920         (WebCore::SVGFEColorMatrixElement::parseAttribute): Don't use isSupportedAttribute.
1921         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
1922         * svg/SVGFEColorMatrixElement.h: Removed isSupportedAttribute.
1923         * svg/SVGFEComponentTransferElement.cpp: Removed unneeded includes.
1924         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute): Deleted.
1925         (WebCore::SVGFEComponentTransferElement::parseAttribute): Don't use isSupportedAttribute.
1926         * svg/SVGFEComponentTransferElement.h: Removed unneeded includes.
1927         * svg/SVGFECompositeElement.cpp: Removed unneeded includes.
1928         (WebCore::SVGFECompositeElement::isSupportedAttribute): Deleted.
1929         (WebCore::SVGFECompositeElement::parseAttribute): Don't use isSupportedAttribute.
1930         (WebCore::SVGFECompositeElement::svgAttributeChanged): Don't use isSupportedAttribute.
1931         * svg/SVGFECompositeElement.h:
1932         * svg/SVGFEConvolveMatrixElement.cpp: Removed unneeded includes.
1933         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute): Deleted.
1934         (WebCore::SVGFEConvolveMatrixElement::parseAttribute): Don't use isSupportedAttribute.
1935         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
1936         * svg/SVGFEConvolveMatrixElement.h:
1937         * svg/SVGFEDiffuseLightingElement.cpp: Removed unneeded includes.
1938         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute): Deleted.
1939         (WebCore::SVGFEDiffuseLightingElement::parseAttribute): Don't use isSupportedAttribute.
1940         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
1941         * svg/SVGFEDiffuseLightingElement.h:
1942         * svg/SVGFEDisplacementMapElement.cpp: Removed unneeded includes.
1943         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute): Deleted.
1944         (WebCore::SVGFEDisplacementMapElement::parseAttribute): Don't use isSupportedAttribute.
1945         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Don't use isSupportedAttribute.
1946         * svg/SVGFEDisplacementMapElement.h:
1947         * svg/SVGFEDropShadowElement.cpp: Removed unneeded includes.
1948         (WebCore::SVGFEDropShadowElement::isSupportedAttribute): Deleted.
1949         (WebCore::SVGFEDropShadowElement::parseAttribute): Don't use isSupportedAttribute.
1950         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Don't use isSupportedAttribute.
1951         * svg/SVGFEDropShadowElement.h:
1952         * svg/SVGFEFloodElement.cpp: Removed unneeded includes.
1953         * svg/SVGFEGaussianBlurElement.cpp: Removed unneeded includes.
1954         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): Deleted.
1955         (WebCore::SVGFEGaussianBlurElement::parseAttribute): Don't use isSupportedAttribute.
1956         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Don't use isSupportedAttribute.
1957         * svg/SVGFEGaussianBlurElement.h:
1958         * svg/SVGFEImageElement.cpp: Removed unneeded includes.
1959         (WebCore::SVGFEImageElement::isSupportedAttribute): Deleted.
1960         (WebCore::SVGFEImageElement::parseAttribute): Don't use isSupportedAttribute.
1961         (WebCore::SVGFEImageElement::svgAttributeChanged): Don't use isSupportedAttribute.
1962         * svg/SVGFEImageElement.h:
1963         * svg/SVGFELightElement.cpp: Removed unneeded includes.
1964         (WebCore::SVGFELightElement::isSupportedAttribute): Deleted.
1965         (WebCore::SVGFELightElement::parseAttribute): Don't use isSupportedAttribute.
1966         (WebCore::SVGFELightElement::svgAttributeChanged): Don't use isSupportedAttribute.
1967         * svg/SVGFELightElement.h:
1968         * svg/SVGFEMergeNodeElement.cpp: Removed unneeded includes.
1969         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute): Deleted.
1970         (WebCore::SVGFEMergeNodeElement::parseAttribute): Don't use isSupportedAttribute.
1971         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Don't use isSupportedAttribute.
1972         * svg/SVGFEMergeNodeElement.h:
1973         * svg/SVGFEMorphologyElement.cpp: Removed unneeded includes.
1974         (WebCore::SVGFEMorphologyElement::isSupportedAttribute): Deleted.
1975         (WebCore::SVGFEMorphologyElement::parseAttribute): Don't use isSupportedAttribute.
1976         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Don't use isSupportedAttribute.
1977         * svg/SVGFEMorphologyElement.h:
1978         * svg/SVGFEOffsetElement.cpp: Removed unneeded includes.
1979         (WebCore::SVGFEOffsetElement::isSupportedAttribute): Deleted.
1980         (WebCore::SVGFEOffsetElement::parseAttribute): Don't use isSupportedAttribute.
1981         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Don't use isSupportedAttribute.
1982         * svg/SVGFEOffsetElement.h:
1983         * svg/SVGFESpecularLightingElement.cpp: Removed unneeded includes.
1984         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute): Deleted.
1985         (WebCore::SVGFESpecularLightingElement::parseAttribute): Don't use isSupportedAttribute.
1986         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
1987         * svg/SVGFESpecularLightingElement.h:
1988         * svg/SVGFETileElement.cpp: Removed unneeded includes.
1989         (WebCore::SVGFETileElement::isSupportedAttribute): Deleted.
1990         (WebCore::SVGFETileElement::parseAttribute): Don't use isSupportedAttribute.
1991         (WebCore::SVGFETileElement::svgAttributeChanged): Don't use isSupportedAttribute.
1992         * svg/SVGFETileElement.h:
1993         * svg/SVGFETurbulenceElement.cpp: Removed unneeded includes.
1994         (WebCore::SVGFETurbulenceElement::isSupportedAttribute): Deleted.
1995         (WebCore::SVGFETurbulenceElement::parseAttribute): Don't use isSupportedAttribute.
1996         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Don't use isSupportedAttribute.
1997         * svg/SVGFETurbulenceElement.h:
1998         * svg/SVGFilterElement.cpp: Removed unneeded includes.
1999         (WebCore::SVGFilterElement::parseAttribute): Don't use isSupportedAttribute.
2000         * svg/SVGFilterPrimitiveStandardAttributes.cpp: Removed unneeded includes.
2001         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): Don't use isSupportedAttribute.
2002         * svg/SVGFilterPrimitiveStandardAttributes.h: Removed isSupportedAttribute and also moved a
2003         couple functions out of the class definition.
2004         * svg/SVGFitToViewBox.cpp: Removed unneeded includes.
2005         * svg/SVGFontFaceElement.cpp: Removed unneeded includes.
2006         * svg/SVGFontFaceUriElement.cpp: Removed unneeded includes.
2007         * svg/SVGForeignObjectElement.cpp: Removed unneeded includes.
2008         (WebCore::SVGForeignObjectElement::parseAttribute): Don't use isSupportedAttribute.
2009         * svg/SVGGElement.cpp: Removed unneeded includes.
2010         (WebCore::SVGGElement::parseAttribute): Don't use isSupportedAttribute.
2011         * svg/SVGGlyphElement.cpp: Removed unneeded includes.
2012         * svg/SVGGlyphRefElement.cpp: Removed unneeded includes.
2013         (WebCore::SVGGlyphRefElement::hasValidGlyphElement): Rewrote to use is<> instead of hasTagName.
2014         (WebCore::SVGGlyphRefElement::parseAttribute): Don't use return value from SVGURIReference::parseAttribute.
2015         * svg/SVGGradientElement.cpp: Removed unneeded includes.
2016         (WebCore::SVGGradientElement::parseAttribute): Don't use isSupportedAttribute.
2017         * svg/SVGGraphicsElement.cpp: Removed unneeded includes.
2018         (WebCore::SVGGraphicsElement::parseAttribute): Don't use isSupportedAttribute.
2019         * svg/SVGImageElement.cpp: Removed unneeded includes.
2020         (WebCore::SVGImageElement::parseAttribute): Don't use isSupportedAttribute.
2021         * svg/SVGLangSpace.cpp: Removed unneeded includes.
2022         (WebCore::SVGLangSpace::parseAttribute): Removed the return value.
2023         * svg/SVGLangSpace.h: Converted functions to static member functions and removed the
2024         return value from parseAttribute.
2025         * svg/SVGLineElement.cpp: Removed unneeded includes.
2026         (WebCore::SVGLineElement::parseAttribute): Don't use isSupportedAttribute.
2027         * svg/SVGLinearGradientElement.cpp: Removed unneeded includes.
2028         (WebCore::SVGLinearGradientElement::parseAttribute): Don't use isSupportedAttribute.
2029         * svg/SVGMPathElement.cpp: Removed unneeded includes.
2030         (WebCore::SVGMPathElement::isSupportedAttribute): Deleted.
2031         (WebCore::SVGMPathElement::parseAttribute): Don't use isSupportedAttribute.
2032         (WebCore::SVGMPathElement::svgAttributeChanged): Don't use isSupportedAttribute.
2033         * svg/SVGMPathElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
2034         private instead of protected.
2035         * svg/SVGMarkerElement.cpp: Removed unneeded includes.
2036         (WebCore::SVGMarkerElement::parseAttribute): Don't use isSupportedAttribute.
2037         * svg/SVGMaskElement.cpp: Removed unneeded includes.
2038         (WebCore::SVGMaskElement::parseAttribute): Don't use isSupportedAttribute.
2039         * svg/SVGPathElement.cpp: Removed unneeded includes.
2040         (WebCore::SVGPathElement::parseAttribute): Don't use isSupportedAttribute.
2041         * svg/SVGPatternElement.cpp: Removed unneeded includes.
2042         (WebCore::SVGPatternElement::parseAttribute): Don't use isSupportedAttribute.
2043         * svg/SVGPolyElement.cpp: Removed unneeded includes.
2044         (WebCore::SVGPolyElement::isSupportedAttribute): Deleted.
2045         (WebCore::SVGPolyElement::parseAttribute): Don't use isSupportedAttribute.
2046         (WebCore::SVGPolyElement::svgAttributeChanged): Don't use isSupportedAttribute.
2047         * svg/SVGPolyElement.h:
2048         * svg/SVGRadialGradientElement.cpp: Removed unneeded includes.
2049         (WebCore::SVGRadialGradientElement::parseAttribute): Don't use isSupportedAttribute.
2050         * svg/SVGRectElement.cpp: Removed unneeded includes.
2051         (WebCore::SVGRectElement::isSupportedAttribute): Deleted.
2052         (WebCore::SVGRectElement::parseAttribute): Don't use isSupportedAttribute.
2053         (WebCore::SVGRectElement::svgAttributeChanged): Don't use isSupportedAttribute.
2054         * svg/SVGRectElement.h:
2055         * svg/SVGSVGElement.cpp: Removed unneeded includes.
2056         (WebCore::SVGSVGElement::parseAttribute): Don't use isSupportedAttribute.
2057         * svg/SVGScriptElement.cpp: Removed unneeded includes.
2058         * svg/SVGStopElement.cpp: Removed unneeded includes.
2059         (WebCore::SVGStopElement::isSupportedAttribute): Deleted.
2060         (WebCore::SVGStopElement::parseAttribute): Don't use isSupportedAttribute.
2061         (WebCore::SVGStopElement::svgAttributeChanged): Don't use isSupportedAttribute.
2062         * svg/SVGStopElement.h: Removed isSupportedAttribute.
2063         * svg/SVGStyleElement.cpp: Removed unneeded includes.
2064         (WebCore::SVGStyleElement::isSupportedAttribute): Deleted.
2065         (WebCore::SVGStyleElement::parseAttribute): Don't use isSupportedAttribute.
2066         * svg/SVGStyleElement.h: Removed isSupportedAttribute.
2067         * svg/SVGSymbolElement.cpp: Removed unneeded includes.
2068         (WebCore::SVGSymbolElement::isSupportedAttribute): Deleted.
2069         (WebCore::SVGSymbolElement::parseAttribute): Don't use isSupportedAttribute.
2070         (WebCore::SVGSymbolElement::svgAttributeChanged): Don't use isSupportedAttribute.
2071         * svg/SVGSymbolElement.h: Removed isSupportedAttribute.
2072         * svg/SVGTRefElement.cpp: Removed unneeded includes.
2073         (WebCore::SVGTRefElement::isSupportedAttribute): Deleted.
2074         (WebCore::SVGTRefElement::parseAttribute): Don't use isSupportedAttribute.
2075         (WebCore::SVGTRefElement::svgAttributeChanged): Don't use isSupportedAttribute.
2076         * svg/SVGTRefElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
2077         private instead of protected.
2078         * svg/SVGTests.cpp: Removed unneeded includes.
2079         (WebCore::SVGTests::parseAttribute): Removed return value.
2080         * svg/SVGTests.h: Removed return value of parseAttribute.
2081         * svg/SVGTextContentElement.cpp: Removed unneeded includes.
2082         (WebCore::SVGTextContentElement::collectStyleForPresentationAttribute): Don't use
2083         isSupportedAttribute. Also removed global to optimize comparing attribute value against
2084         the string "preserve".
2085         (WebCore::SVGTextContentElement::parseAttribute): Don't use isSupportedAttribute.
2086         (WebCore::SVGTextContentElement::svgAttributeChanged): Don't use isSupportedAttribute.
2087         * svg/SVGTextContentElement.h: Made isSupportedAttribute private instead of protected.
2088         * svg/SVGTextElement.cpp: Removed unneeded includes.
2089         * svg/SVGTextPathElement.cpp: Removed unneeded includes.
2090         (WebCore::SVGTextPathElement::parseAttribute): Don't use isSupportedAttribute.
2091         * svg/SVGTextPositioningElement.cpp: Removed unneeded includes.
2092         (WebCore::SVGTextPositioningElement::isSupportedAttribute): Deleted.
2093         (WebCore::SVGTextPositioningElement::parseAttribute): Don't use isSupportedAttribute.
2094         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Don't use isSupportedAttribute.
2095         * svg/SVGTextPositioningElement.h: Removed isSupportedAttribute and made some functions
2096         private insetad of protected.
2097         * svg/SVGURIReference.cpp: Removed unneeded includes.
2098         (WebCore::SVGURIReference::parseAttribute): Don't use isSupportedAttribute.
2099         * svg/SVGURIReference.h:
2100         (WebCore::SVGURIReference::isExternalURIReference):
2101         * svg/SVGUseElement.cpp: Removed unneeded includes.
2102         (WebCore::SVGUseElement::parseAttribute): Don't use isSupportedAttribute.
2103         * svg/SVGViewElement.h: Removed isSupportedAttribute.
2104         * svg/animation/SVGSMILElement.cpp: Removed unneeded includes.
2105
2106 2015-03-29  Darin Adler  <darin@apple.com>
2107
2108         Remove unneeded includes of "Attribute.h"
2109         https://bugs.webkit.org/show_bug.cgi?id=143195
2110
2111         Reviewed by Antti Koivisto.
2112
2113         * css/StyleResolver.cpp:
2114         * html/HTMLAnchorElement.cpp:
2115         * html/HTMLAreaElement.cpp:
2116         * html/HTMLBRElement.cpp:
2117         * html/HTMLBaseElement.cpp:
2118         * html/HTMLBodyElement.cpp:
2119         * html/HTMLButtonElement.cpp:
2120         * html/HTMLCanvasElement.cpp:
2121         * html/HTMLDivElement.cpp:
2122         * html/HTMLElement.cpp:
2123         * html/HTMLEmbedElement.cpp:
2124         * html/HTMLFontElement.cpp:
2125         * html/HTMLFormControlElement.cpp:
2126         * html/HTMLFormElement.cpp:
2127         * html/HTMLFrameElement.cpp:
2128         * html/HTMLFrameElementBase.cpp:
2129         * html/HTMLFrameSetElement.cpp:
2130         * html/HTMLHRElement.cpp:
2131         * html/HTMLIFrameElement.cpp:
2132         * html/HTMLImageElement.cpp:
2133         * html/HTMLOListElement.cpp:
2134         * html/HTMLOptionElement.cpp:
2135         * html/HTMLParagraphElement.cpp:
2136         * html/HTMLParamElement.cpp:
2137         * html/HTMLPlugInElement.cpp:
2138         * html/HTMLPreElement.cpp:
2139         * html/HTMLProgressElement.cpp:
2140         * html/HTMLScriptElement.cpp:
2141         * html/HTMLSelectElement.cpp:
2142         * html/HTMLStyleElement.cpp:
2143         * html/HTMLTableCaptionElement.cpp:
2144         * html/HTMLTableCellElement.cpp:
2145         * html/HTMLTableColElement.cpp:
2146         * html/HTMLTableElement.cpp:
2147         * html/HTMLTablePartElement.cpp:
2148         * html/HTMLTextAreaElement.cpp:
2149         * html/HTMLTextFormControlElement.cpp:
2150         * html/HTMLUListElement.cpp:
2151         * html/HTMLVideoElement.cpp:
2152         * html/parser/HTMLScriptRunner.cpp:
2153         * inspector/InspectorNodeFinder.cpp:
2154         Removed includes of "Attribute.h".
2155
2156 2015-03-28  Eric Carlson  <eric.carlson@apple.com>
2157
2158         [Mac] Update for output device API change
2159         https://bugs.webkit.org/show_bug.cgi?id=143187
2160
2161         Reviewed by Zalan Bujtas.
2162
2163         The API used for output device is being deprecated, update to the replacement.
2164
2165         * WebCore.xcodeproj/project.pbxproj: Add SPI headers.
2166
2167         * platform/graphics/MediaPlaybackTarget.h:
2168         (WebCore::MediaPlaybackTarget::MediaPlaybackTarget): Update for API change.
2169         (WebCore::MediaPlaybackTarget::setDevicePickerContext):
2170         (WebCore::MediaPlaybackTarget::devicePickerContext):
2171
2172         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
2173         (WebCore::MediaPlaybackTarget::encode):
2174         (WebCore::MediaPlaybackTarget::decode):
2175
2176         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
2177         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2178         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
2179         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
2180         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired):
2181         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
2182         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
2183         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets):
2184         (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
2185         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Deleted.
2186
2187         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2188         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2189         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2190         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2191         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
2192         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2193
2194         * platform/spi/cocoa/AVKitSPI.h: Copied from Source/WebCore/platform/spi/ios/AVKitSPI.h. Moved
2195             from ios directory, added Mac includes and prototypes.
2196         * platform/spi/ios/AVKitSPI.h: Removed.
2197
2198         * platform/spi/mac/AVFoundationSPI.h: Added.
2199
2200 2015-03-28  Simon Fraser  <simon.fraser@apple.com>
2201
2202         Optimize RenderLayer::intersectsDamageRect() slightly
2203         https://bugs.webkit.org/show_bug.cgi?id=143186
2204
2205         Reviewed by Zalan Bujtas.
2206
2207         We can early return from RenderLayer::intersectsDamageRect() if the
2208         damageRect is empty, since nothing will intersect with the empty rect.
2209         
2210         Slight performance gain when scrolling overflow-scroll with lots of nested,
2211         clipping layers.
2212
2213         * rendering/RenderLayer.cpp:
2214         (WebCore::RenderLayer::calculateClipRects):
2215
2216 2015-03-28  Anders Carlsson  <andersca@apple.com>
2217
2218         Remove an unused SPI method from WebKitLegacy
2219         https://bugs.webkit.org/show_bug.cgi?id=143185
2220
2221         Reviewed by Sam Weinig.
2222
2223         * loader/appcache/ApplicationCacheStorage.cpp:
2224         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Deleted.
2225         * loader/appcache/ApplicationCacheStorage.h:
2226
2227 2015-03-28  Joonghun Park  <jh718.park@samsung.com>
2228
2229         nullptr cleanup in InlineFooBox classes
2230         https://bugs.webkit.org/show_bug.cgi?id=143178
2231
2232         Reviewed by Csaba Osztrogonác.
2233
2234         No new tests, no behavior changes
2235
2236         Replace 0 with nullptr in InlineFooBox classes.
2237
2238         * rendering/InlineBox.cpp:
2239         (WebCore::InlineBox::prevLeafChildIgnoringLineBreak):
2240         * rendering/InlineFlowBox.cpp:
2241         (WebCore::InlineFlowBox::removeChild):
2242         (WebCore::InlineFlowBox::deleteLine):
2243         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
2244         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
2245         * rendering/InlineFlowBox.h:
2246         (WebCore::InlineFlowBox::InlineFlowBox):
2247         * rendering/InlineTextBox.h:
2248         (WebCore::InlineTextBox::InlineTextBox):
2249         * rendering/RootInlineBox.cpp:
2250         (WebCore::RootInlineBox::getLogicalStartBoxWithNode):
2251         (WebCore::RootInlineBox::getLogicalEndBoxWithNode):
2252         * rendering/RootInlineBox.h:
2253         * rendering/svg/SVGInlineTextBox.cpp:
2254         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
2255         (WebCore::SVGInlineTextBox::releasePaintingResource):
2256         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
2257         * rendering/svg/SVGRootInlineBox.cpp:
2258         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
2259         (WebCore::findFirstAndLastAttributesInVector):
2260         * rendering/svg/SVGRootInlineBox.h:
2261
2262 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
2263
2264         More modern loops in RenderLayer.cpp
2265         https://bugs.webkit.org/show_bug.cgi?id=143175
2266
2267         Reviewed by Ryosuke Niwa.
2268
2269         Use modern loops in more places in RenderLayer.app.
2270
2271         * rendering/RenderLayer.cpp:
2272         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
2273         (WebCore::RenderLayer::paint):
2274         (WebCore::performOverlapTests):
2275         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
2276         (WebCore::RenderLayer::paintList):
2277         (WebCore::RenderLayer::collectFragments):
2278         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2279         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2280         (WebCore::RenderLayer::calculateClipRects):
2281
2282 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
2283
2284         nullptr cleanup in RenderLayer
2285         https://bugs.webkit.org/show_bug.cgi?id=143174
2286
2287         Reviewed by Ryosuke Niwa.
2288
2289         Replace 0 with nullptr in RenderLayer.cpp.
2290
2291         * rendering/RenderLayer.cpp:
2292         (WebCore::RenderLayer::filterRenderer):
2293         (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
2294         (WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll):
2295         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
2296         (WebCore::RenderLayer::enclosingOverflowClipLayer):
2297         (WebCore::RenderLayer::enclosingCompositingLayer):
2298         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
2299         (WebCore::RenderLayer::enclosingFilterLayer):
2300         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
2301         (WebCore::RenderLayer::clippingRootForPainting):
2302         (WebCore::RenderLayer::transparentPaintingAncestor):
2303         (WebCore::transparencyClipBox):
2304         (WebCore::RenderLayer::removeChild):
2305         (WebCore::RenderLayer::removeOnlyThisLayer):
2306         (WebCore::RenderLayer::insertOnlyThisLayer):
2307         (WebCore::accumulateOffsetTowardsAncestor):
2308         (WebCore::RenderLayer::enclosingScrollableArea):
2309         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
2310         (WebCore::RenderLayer::enclosingElement):
2311         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
2312         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2313         (WebCore::RenderLayer::hitTestLayer):
2314         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2315         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
2316         (WebCore::RenderLayer::hitTestList):
2317         (WebCore::RenderLayer::updateClipRects):
2318         (WebCore::RenderLayer::clipRects):
2319         (WebCore::RenderLayer::calculateClipRects):
2320
2321 2015-03-27  Gwang Yoon Hwang  <yoon@igalia.com>
2322
2323         [TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
2324         https://bugs.webkit.org/show_bug.cgi?id=142386
2325
2326         Reviewed by Žan Doberšek.
2327
2328         TextureMapper and TextureMapperGL are bloated and tightly coupled with
2329         BitmapTexture. We should move these classes to seperated file of their own.
2330         Also, this patch removes friend relationship from TextureMapperGL and  its
2331         subsidiary classes.
2332
2333         The main purpose of this refactoring is to expose BitmapTexturePool to
2334         renderers of platformlayers like Video and Canvas. By doing this, each
2335         renderer can acquire textures from the global texture pool to paint
2336         their contents directly.
2337
2338         No new tests needed.
2339
2340         * PlatformEfl.cmake:
2341         * PlatformGTK.cmake:
2342         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2343         Include BitmapTextureGL and BitmapTexturePool explicitly
2344
2345         * platform/graphics/texmap/BitmapTexture.cpp: Added.
2346         * platform/graphics/texmap/BitmapTexture.h: Added.
2347         (WebCore::BitmapTexture::updateContents):
2348         Exclude BitmapTexture class from TextureMapper
2349
2350         * platform/graphics/texmap/BitmapTextureGL.cpp: Added.
2351         * platform/graphics/texmap/BitmapTextureGL.h: Added.
2352         Exclude BitmapTextureGL class from TextureMapperGL
2353         (WebCore::BitmapTextureGL::clipStack): Added.
2354         Add the getter for clipStack for TextureMapperGL
2355         (WebCore::BitmapTextureGL::Bind): Deleted.
2356         (WebCore::BitmapTextureGL::BindAsSurface): Added.
2357         Bind used TextureMapperGL's internal data directly to compute projection matrix as a friend class,
2358         However, TextureMapperGL can compute projection matrix itself after binding job, so this
2359         friend ship is not needed. Also, this patch renames Bind to BindAsSurface to remove ambiguity.
2360
2361         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Added.
2362         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Added.
2363         Exclude BitmapTextureImageBuffer class from TextureMapperImageBuffer
2364
2365         * platform/graphics/texmap/BitmapTexturePool.cpp: Added.
2366         * platform/graphics/texmap/BitmapTexturePool.h: Added.
2367         Exclude BitmapTexturePool class from TextureMapperGL
2368         (WebCore::BitmapTexturePool::acquireTexture):
2369         Modified to use passed GraphicsContext3D instead of TextureMapperGL to remove redundant coupling
2370
2371         * platform/graphics/texmap/TextureMapper.cpp:
2372         * platform/graphics/texmap/TextureMapper.h:
2373         Remove BitmapTexturePool and BitmapTexture from its implementation.
2374
2375         * platform/graphics/texmap/TextureMapperGL.cpp:
2376         * platform/graphics/texmap/TextureMapperGL.h:
2377         Remove BitmapTextureGL from its implementation.
2378         (WebCore::TextureMapperGL::TextureMapperGL):
2379         (WebCore::TextureMapperGL::clipStack):
2380         (WebCore::TextureMapperGL::bindSurface):
2381         (WebCore::TextureMapperGL::currentSurface):
2382         Add a getter of the current surface for filtering operation in BitmapTextureGL.
2383         It would be clear to move filtering operation from BitmapTextureGL to TextureMapperGL later.
2384
2385         (WebCore::TextureMapperGL::ClipStack):
2386         Move inner class declaration to public.
2387
2388         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2389         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2390         Remove BitmapTextureImageBuffer from its implementation.
2391
2392 2015-03-27  Tim Horton  <timothy_horton@apple.com>
2393
2394         WebProcess started by editable WKWebView spends 15% of its initialization time loading DataDetectors
2395         https://bugs.webkit.org/show_bug.cgi?id=143142
2396         <rdar://problem/20324495>
2397
2398         Reviewed by Anders Carlsson.
2399
2400         Calling DataDetectorsLibrary() is expensive; we should avoid doing it
2401         until actually necessary. When loading a page that makes a caret selection,
2402         ServicesOverlayController was calling DataDetectorsLibrary() (ignoring the fact
2403         that a caret selection can't have any services associated with it) to avoid
2404         crashing on systems where DataDetectors is not available. Instead, we should
2405         first check if there's anything to do, and then check for the existence
2406         of DataDetectors.
2407
2408         * page/mac/ServicesOverlayController.mm:
2409         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
2410         Build the list of phone number ranges, and bail (clearing the potential highlights)
2411         if it is empty, before calling DataDetectorsLibrary().
2412
2413         (WebCore::ServicesOverlayController::buildSelectionHighlight):
2414         Check the list of selection rects, and bail (clearing the potential highlights)
2415         if it is empty, before calling DataDetectorsLibrary().
2416
2417 2015-03-27  Jer Noble  <jer.noble@apple.com>
2418
2419         [Mac] Safari fails to fire page "load" event with video[preload=none]
2420         https://bugs.webkit.org/show_bug.cgi?id=143147
2421
2422         Reviewed by Simon Fraser.
2423
2424         Test: media/video-page-load-preload-none.html
2425
2426         When told to load() when preload == None, set the networkState to Idle.
2427         This causes HTMLMediaElement to set the shouldDelayLoadEvent flag to
2428         false, and allows the page's 'load' event to fire.
2429
2430         Drive-by fix: add setNetworkState() and setReadyState() methods to
2431         MediaPlayerPrivateAVFoundation, reducing a bunch of code duplication.
2432
2433         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2434         (WebCore::MediaPlayerPrivateAVFoundation::load):
2435         (WebCore::MediaPlayerPrivateAVFoundation::setNetworkState):
2436         (WebCore::MediaPlayerPrivateAVFoundation::setReadyState):
2437         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
2438         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2439
2440 2015-03-27  Alexey Proskuryakov  <ap@apple.com>
2441
2442         Calling crypto.webkitSubtle.generateKey causes page memory to never be released
2443         https://bugs.webkit.org/show_bug.cgi?id=143151
2444         rdar://problem/18940687
2445
2446         Reviewed by Tim Horton.
2447
2448         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair): Don't.
2449
2450 2015-03-27  Brent Fulgham  <bfulgham@apple.com>
2451
2452         Null dereference in InbandMetadataTextTrack handling
2453         https://bugs.webkit.org/show_bug.cgi?id=143144
2454         <rdar://problem/18983250>
2455
2456         Reviewed by Eric Carlson.
2457
2458         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
2459         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): Check for null return value from
2460         'client()', just like we do in all other methods.
2461
2462 2015-03-27  Oliver Hunt  <oliver@apple.com>
2463
2464         Forward additional CFNetwork ATS information to child processes
2465         https://bugs.webkit.org/show_bug.cgi?id=143136
2466
2467         Reviewed by Anders Carlsson.
2468
2469         Declare SPI.
2470
2471         * platform/spi/cf/CFNetworkSPI.h:
2472
2473 2015-03-27  Chris Dumez  <cdumez@apple.com>
2474
2475         [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
2476         https://bugs.webkit.org/show_bug.cgi?id=143125
2477         <rdar://problem/20321172>
2478
2479         Reviewed by Antti Koivisto.
2480
2481         Export a couple of extra symbols.
2482
2483         * platform/network/ResourceResponseBase.h:
2484
2485 2015-03-27  Jer Noble  <jer.noble@apple.com>
2486
2487         HTMLMediaElement will fire 'seeked' before seek completes, leading to currentTime discontinuities.
2488         https://bugs.webkit.org/show_bug.cgi?id=143132
2489
2490         Reviewed by Eric Carlson.
2491
2492         When seeking, if the ready state rises to >= HAVE_CURRENT_DATA, we will fire the 'seeked'
2493         event and continue playback. However, if a media engine updates the ready state before its
2494         seek operation actually completes, the currentTime it returns may still be the time before
2495         the seek.
2496
2497         Wait until both the ready state rises to HAVE_CURRENT_DATA and m_player->seeking() returns
2498         false before firing the 'seeked' event.
2499
2500         * html/HTMLMediaElement.cpp:
2501         (WebCore::HTMLMediaElement::parseAttribute):
2502
2503 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
2504
2505         Make some more objects use FastMalloc
2506         https://bugs.webkit.org/show_bug.cgi?id=143122
2507
2508         Reviewed by Csaba Osztrogonác.
2509
2510         * Modules/geolocation/GeolocationController.h:
2511         * Modules/geolocation/NavigatorGeolocation.h:
2512         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
2513         * Modules/notifications/NotificationController.h:
2514         * Modules/webdatabase/DatabaseServer.h:
2515         * css/CSSFontFaceSource.h:
2516         * html/HTMLMediaSession.h:
2517         * inspector/InspectorIndexedDBAgent.h:
2518         * inspector/InspectorReplayAgent.h:
2519         * page/CaptionUserPreferencesMediaAF.h:
2520         * page/PageConsoleClient.h:
2521         * page/PageDebuggable.h:
2522         * page/animation/CSSPropertyAnimation.cpp:
2523         * page/mac/ServicesOverlayController.h:
2524         * platform/RemoteCommandListener.h:
2525         * platform/Timer.h:
2526         * platform/audio/MediaSessionManager.h:
2527         * platform/mac/SystemSleepListenerMac.h:
2528         * platform/mac/ThemeMac.h:
2529         * rendering/svg/RenderSVGResourceSolidColor.h:
2530         * replay/ReplayController.h:
2531
2532 2015-03-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
2533
2534         FEMorphology::platformApplyGeneric() should bail out if the radius is less than or equal to zero.
2535         https://bugs.webkit.org/show_bug.cgi?id=142885.
2536
2537         Reviewed by Dean Jackson.
2538
2539         FEMorphology class implementation code clean up.
2540         
2541         Tests: svg/filters/feMorphology-radius-cases.svg
2542
2543         * platform/graphics/filters/FEMorphology.cpp:
2544         (WebCore::shouldSupersedeExtremum): Reuse code instead of repeating it and
2545         use < and > instead of =< and >=.
2546         
2547         (WebCore::pixelArrayIndex): Returns the array index of a pixel in an image
2548         buffer, given: position(x, y), image width and the color channel.
2549         
2550         (WebCore::columnExtremum): Returns the extremum of a column of pixels.
2551         
2552         (WebCore::kernelExtremum): Returns the extremum of a filter kernel.
2553         
2554         (WebCore::FEMorphology::platformApplyGeneric): Apply some code clean-up.
2555         The kernel size should be equal to radius of the filter. The extra pixel
2556         was causing the resulted image to be asymmetric in some cases.
2557         
2558         (WebCore::FEMorphology::platformApplyDegenerate):
2559         (WebCore::FEMorphology::platformApplySoftware): After applying scaling, we
2560         still need to check the resulted radius is negative (overflow case) or less
2561         than one (zero radius case) and treat these cases differently.
2562         
2563         (WebCore::FEMorphology::morphologyOperator): Deleted.
2564         (WebCore::FEMorphology::radiusX): Deleted.
2565         (WebCore::FEMorphology::radiusY): Deleted.
2566         * platform/graphics/filters/FEMorphology.h:
2567         (WebCore::FEMorphology::morphologyOperator):
2568         (WebCore::FEMorphology::radiusX):
2569         (WebCore::FEMorphology::radiusY):
2570         Move a single line functions from the source file to the header file.
2571
2572 2015-03-27  Antti Koivisto  <antti@apple.com>
2573
2574         Move CacheValidation to platform
2575         https://bugs.webkit.org/show_bug.cgi?id=143133
2576
2577         Reviewed by Chris Dumez.
2578
2579         It deals with platform types only and is currently violating layering.
2580
2581         * WebCore.xcodeproj/project.pbxproj:
2582         * loader/cache/CacheValidation.cpp: Removed.
2583         * loader/cache/CacheValidation.h: Removed.
2584         * platform/network/CacheValidation.cpp: Copied from Source/WebCore/loader/cache/CacheValidation.cpp.
2585         * platform/network/CacheValidation.h: Copied from Source/WebCore/loader/cache/CacheValidation.h.
2586
2587 2015-03-27  Commit Queue  <commit-queue@webkit.org>
2588
2589         Unreviewed, rolling out r177896.
2590         https://bugs.webkit.org/show_bug.cgi?id=142978
2591
2592         Loading libgstclutter.so in-process hangs web process
2593         (Requested by mcatanzaro on #webkit).
2594
2595         Reverted changeset:
2596
2597         "[GStreamer] Disable gst-plugin-scanner if seccomp filters are
2598         enabled"
2599         https://bugs.webkit.org/show_bug.cgi?id=140069
2600         http://trac.webkit.org/changeset/177896
2601
2602 2015-03-26  Antti Koivisto  <antti@apple.com>
2603
2604         Respect cache-control directives in request
2605         https://bugs.webkit.org/show_bug.cgi?id=143121
2606         rdar://problem/19714040
2607
2608         Reviewed by Chris Dumez.
2609
2610         Test: http/tests/cache/disk-cache/disk-cache-request-headers.html
2611
2612         * loader/cache/CacheValidation.cpp:
2613         (WebCore::isCacheHeaderSeparator):
2614         (WebCore::isControlCharacter):
2615         (WebCore::trimToNextSeparator):
2616         (WebCore::parseCacheHeader):
2617         (WebCore::parseCacheControlDirectives):
2618
2619             Factor Cache-control parsing here so it can be used for both requests and responses.
2620
2621         * loader/cache/CacheValidation.h:
2622         * platform/network/ResourceRequestBase.h:
2623         * platform/network/ResourceResponseBase.cpp:
2624         (WebCore::ResourceResponseBase::ResourceResponseBase):
2625         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2626         (WebCore::ResourceResponseBase::cacheControlContainsNoCache):
2627         (WebCore::ResourceResponseBase::cacheControlContainsNoStore):
2628         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
2629         (WebCore::ResourceResponseBase::cacheControlMaxAge):
2630         (WebCore::isCacheHeaderSeparator): Deleted.
2631         (WebCore::isControlCharacter): Deleted.
2632         (WebCore::trimToNextSeparator): Deleted.
2633         (WebCore::parseCacheHeader): Deleted.
2634         * platform/network/ResourceResponseBase.h:
2635
2636 2015-03-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2637
2638         [GStreamer] share GL context in pipeline, part 2
2639         https://bugs.webkit.org/show_bug.cgi?id=143049
2640
2641         Reviewed by Carlos Garcia Campos.
2642
2643         This patch, instead of cluttering the GstGL attributes creation in
2644         ::handleSyncMessage(), creates a new method ::ensureGstGLContext(),
2645         where those attributes are defined. This method is guarded by
2646         USE(GSTREAMER_GL)
2647
2648         ::handlSyncMessage() shall return nothing, according to GStreamer
2649         documentation, not a boolean.
2650
2651         The GstGL attributes are now GRefPtr<> to avoid memory leaks.
2652
2653         The GstGLAPI and GstGLPlatform are now set given by the pre-processor
2654         directives, and the code in ::ensureGstGLContext() is simpler.
2655
2656         No new tests because this is platform specific and it depends in the
2657         run-time availability and configurations of GstGL elements.
2658
2659         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2660         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2661         Don't initialise the GstGL attributes since are GRefPtr<>
2662         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Changed the
2663         signature to use void instead of gboolean.
2664         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): New method.
2665         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2666
2667 2015-03-26  Jeremy Jones  <jeremyj@apple.com>
2668
2669         Optimized Fullscreen fails to cleanup because of no longer necessary release of m_playerController in exitFullscreen()
2670         https://bugs.webkit.org/show_bug.cgi?id=143120
2671
2672         Reviewed by Eric Carlson.
2673
2674         We used to release m_playerController in WebVideoFullscreenInterfaceAVKit::exitFullscreen() in order to make sure 
2675         media state was reset. This is no longer necessary as we now have a way the model can explicitly request resetting the
2676         media state via resetMediaState(). m_playerController is already released in 
2677         WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal(). Releasing it prematurely can actually prevent the exit
2678         fullscreen process from completing successfully.
2679
2680         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2681         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
2682
2683 2015-03-26  Zalan Bujtas  <zalan@apple.com>
2684
2685         Inline continuation code should not take anonymous containing wrapper granted.
2686         https://bugs.webkit.org/show_bug.cgi?id=133312
2687
2688         Reviewed by Dave Hyatt.
2689
2690         It's wrong to assume that when RenderInline is part of an inline continuation, its containing block
2691         is an anonymous wrapper and its sibling might be a block level renderer.
2692         When the inline continuation is no longer needed, for example when the block level renderer that initiated the continuation
2693         is detached from the render tree, the inline renderes still continue to form continuation.(however they no longer require
2694         anonymous wrappers)
2695
2696         Test: fast/inline/crash-when-position-property-is-changed-and-no-longer-in-continuation.html
2697
2698         * rendering/RenderInline.cpp:
2699         (WebCore::updateStyleOfAnonymousBlockContinuations):
2700         (WebCore::RenderInline::styleDidChange):
2701
2702 2015-03-26  Tim Horton  <timothy_horton@apple.com>
2703
2704         REGRESSION (r181358 and r181507): Lots of sites think that we support touch events on OS X
2705         https://bugs.webkit.org/show_bug.cgi?id=142888
2706         <rdar://problem/20227304>
2707
2708         Reviewed by Beth Dakin.
2709
2710         * dom/Document.idl:
2711         * dom/Element.idl:
2712         * html/HTMLBodyElement.idl:
2713         * html/HTMLFrameSetElement.idl:
2714         * page/DOMWindow.idl:
2715         Re-conditionalize a lot of event listeners; sites test ("ontouchstart" in window), which
2716         is not covered by NotEnumerable, and so r181358 and r181507 broke a bunch of sites
2717         (apple.com, blaze.com, anything using nicescroll.js, etc.) by causing them to think
2718         that (Mac) Safari was touch-enabled.
2719
2720 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
2721
2722         "lineNo" does not match WebKit coding style guidelines
2723         https://bugs.webkit.org/show_bug.cgi?id=143119
2724
2725         Reviewed by Michael Saboff.
2726
2727         We can afford to use whole words.
2728
2729         * bindings/js/JSLazyEventListener.cpp:
2730         (WebCore::JSLazyEventListener::initializeJSFunction):
2731         * bindings/js/JSMainThreadExecStateInstrumentation.h:
2732         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
2733         * inspector/InspectorDOMAgent.cpp:
2734         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2735         * testing/Internals.cpp:
2736         (WebCore::Internals::parserMetaData):
2737
2738 2015-03-26  Roger Fong  <roger_fong@apple.com>
2739
2740         Apply blur effect to media control background.
2741         https://bugs.webkit.org/show_bug.cgi?id=143116.
2742         <rdar://problem/20316964>.
2743
2744         Reviewed by Brent Fulgham.
2745
2746         There are still a few issues, like the borders of the controls being blurred with black,
2747         and the volume slider background not showing the blur effect. Will fix those separately.
2748
2749         Add CSS for new divs to create blur effect using back drop filters and blend modes.
2750         * Modules/mediacontrols/mediaControlsApple.css:
2751         (audio::-webkit-media-controls-panel):
2752         (audio::-webkit-media-controls-panel-tint):
2753         (audio::-webkit-media-controls-panel-background):
2754         (audio::-webkit-media-controls-panel .volume-box):
2755         (audio::-webkit-media-controls-volume-slider-container-background):
2756         (audio::-webkit-media-controls-volume-slider-container-tint):
2757         (audio::-webkit-media-controls-toggle-closed-captions-button): Adjust fill.
2758         (audio::-webkit-media-controls-fullscreen-button): Adjust fill.
2759         (audio::-webkit-media-controls-fullscreen-button.exit): Adjust fill.
2760         (video:-webkit-full-screen::-webkit-media-controls-panel):
2761         (audio:-webkit-full-screen::-webkit-media-controls-panel-tint):
2762         (audio:-webkit-full-screen::-webkit-media-controls-panel-background):
2763         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
2764         (video:-webkit-full-screen::-webkit-media-controls-play-button):
2765         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
2766         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
2767         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
2768         (video:-webkit-full-screen::-webkit-media-controls-status-display):
2769         (audio::-webkit-media-controls-panel .volume-box:active): Deleted.
2770         * Modules/mediacontrols/mediaControlsApple.js:
2771         (Controller.prototype.createControls):
2772         (Controller.prototype.configureInlineControls): Add new divs for blurred background effect.
2773         (Controller.prototype.configureFullScreenControls): Ditto.
2774         (Controller.prototype.handlePanelMouseDown): The tint div is now in front.
2775         (Controller.prototype.drawTimelineBackground): Adjust colors to make border look better with new background.
2776         (Controller.prototype.drawVolumeBackground): Ditto.
2777
2778 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
2779
2780         Assertion firing in JavaScriptCore/parser/parser.h for statesman.com site
2781         https://bugs.webkit.org/show_bug.cgi?id=142974
2782
2783         Reviewed by Joseph Pecoraro.
2784
2785         * bindings/js/JSLazyEventListener.cpp:
2786         (WebCore::JSLazyEventListener::initializeJSFunction): Use the new override
2787         line number API to guarantee that errors will map to the .html file locations
2788         that we like.
2789
2790         * bindings/js/ScriptController.cpp:
2791         (WebCore::ScriptController::eventHandlerPosition): Added a FIXME to cover
2792         some cases where our line and column numbers are still nonsense.
2793
2794 2015-03-26  Beth Dakin  <bdakin@apple.com>
2795
2796         Relevant repainted objects callback is inaccurate and inconsistent for PDF 
2797         documents
2798         https://bugs.webkit.org/show_bug.cgi?id=143118
2799         -and corresponding-
2800         rdar://problem/13371582
2801
2802         Reviewed by Tim Horton.
2803
2804         Investigating this bug resulted in finding two things that should change for the 
2805         relevant repainted objects heuristic. First, we should not count any objects 
2806         painted while updating control tints. And secondly, we should not use it at all 
2807         for plugin documents. In other documents, we count the plugin area as “painted” 
2808         when we get to paint whether or not the plugin has actually loaded. This is 
2809         intentional because it allows us to account for chunks of the page that will be 
2810         filled in by possibly slow-loading ads. However, if the plugin is the whole 
2811         document, then the heuristic just doesn’t make any sense and it leads to 
2812         inconsistent behavior at different window sizes. So we’ll only count plugins when 
2813         the document is not a plugin document. 
2814
2815         Don’t count objects during this paint!
2816         * page/FrameView.cpp:
2817         (WebCore::FrameView::updateControlTints):
2818         * page/Page.h:
2819         (WebCore::Page::setIsCountingRelevantRepaintedObjects):
2820
2821         Make sure the document is not a plugin document.
2822         * rendering/RenderEmbeddedObject.cpp:
2823         (WebCore::RenderEmbeddedObject::paint):
2824
2825 2015-03-26  Alex Christensen  <achristensen@webkit.org>
2826
2827         Progress towards CMake on Mac.
2828         https://bugs.webkit.org/show_bug.cgi?id=143112
2829
2830         Reviewed by Chris Dumez.
2831
2832         * CMakeLists.txt:
2833         * PlatformEfl.cmake:
2834         * PlatformGTK.cmake:
2835         * PlatformMac.cmake:
2836         * platform/graphics/mac/IconMac.mm:
2837
2838 2015-03-26  Jer Noble  <jer.noble@apple.com>
2839
2840         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
2841         https://bugs.webkit.org/show_bug.cgi?id=142970
2842
2843         Reviewed by Eric Carlson.
2844
2845         isMainThread() will (ironically) return true if called from the web thread. Rather than dispatch
2846         synchronously to the main thread to allocate the _volumeView, dispatch asynchronously and handle
2847         the case where the MPVolumeView has not yet been created.
2848
2849         * platform/audio/ios/MediaSessionManagerIOS.mm:
2850         (-[WebMediaSessionHelper allocateVolumeView]): Dispatch to the main thread to allocate. Move notification
2851             registration to -setVolumeView:.
2852         (-[WebMediaSessionHelper setVolumeView:]): Added. Register/Unregister for route availablitiy notifications.
2853         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Handle the possibility of a nil _volumeView.
2854
2855 2015-03-26  Benjamin Poulain  <bpoulain@apple.com>
2856
2857         Fix state maching debugging after r181964
2858         https://bugs.webkit.org/show_bug.cgi?id=143082
2859
2860         Reviewed by Alex Christensen.
2861
2862         * contentextensions/ContentExtensionCompiler.cpp:
2863         (WebCore::ContentExtensions::compileRuleList):
2864
2865 2015-03-25  David Hyatt  <hyatt@apple.com>
2866
2867         Improve the offsetWidth/Height layout optimization
2868         https://bugs.webkit.org/show_bug.cgi?id=143008
2869
2870         Reviewed by Zalan Bujtas.
2871
2872         * dom/Document.cpp:
2873         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
2874         * dom/Document.h:
2875         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
2876         the positioning restrictions on the optimization check.
2877
2878         * dom/Element.cpp:
2879         (WebCore::Element::offsetWidth):
2880         (WebCore::Element::offsetHeight):
2881         Change to use Element& instead of Element*.
2882
2883         (WebCore::Element::clientWidth):
2884         (WebCore::Element::clientHeight):
2885         (WebCore::Element::scrollWidth):
2886         (WebCore::Element::scrollHeight):
2887         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
2888
2889 2015-03-26  Brady Eidson  <beidson@apple.com>
2890
2891         Apply ContentExtension actions after redirects.
2892         <rdar://problem/20062613> and https://bugs.webkit.org/show_bug.cgi?id=143055
2893
2894         Reviewed by Alex Christensen.
2895
2896         Tests: http/tests/contentextensions/loading/main-resource-redirect-blocked.php
2897                http/tests/contentextensions/subresource-redirect-blocked.html
2898
2899         This patch moves the "run a URL against the content extension" code from CachedResourceLoader to
2900         the ContentExtensionsBackend.
2901
2902         That allows it to be shared between the CachedResourceLoader where loads are initiated and 
2903         ResourceLoader where redirects are handled.
2904
2905         * contentextensions/ContentExtension.cpp:
2906         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
2907
2908         * contentextensions/ContentExtensionsBackend.cpp:
2909         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2910         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
2911         * contentextensions/ContentExtensionsBackend.h:
2912
2913         * loader/NetscapePlugInStreamLoader.cpp:
2914         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
2915
2916         * loader/ResourceLoadInfo.h:
2917
2918         * loader/ResourceLoader.cpp:
2919         (WebCore::ResourceLoader::ResourceLoader):
2920         (WebCore::ResourceLoader::willSendRequest):
2921         * loader/ResourceLoader.h:
2922
2923         * loader/SubresourceLoader.cpp:
2924         (WebCore::SubresourceLoader::SubresourceLoader):
2925
2926         * loader/cache/CachedResourceLoader.cpp:
2927         (WebCore::CachedResourceLoader::requestResource):
2928
2929         * page/UserContentController.cpp:
2930         (WebCore::UserContentController::processContentExtensionRulesForLoad):
2931         (WebCore::UserContentController::actionsForResourceLoad): Deleted.
2932         (WebCore::UserContentController::globalDisplayNoneStyleSheet): Deleted.
2933         (WebCore::UserContentController::displayNoneCSSRule): Deleted.
2934         * page/UserContentController.h:
2935
2936 2015-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
2937
2938         Crash when laying out (char)0
2939         https://bugs.webkit.org/show_bug.cgi?id=143103
2940
2941         Reviewed by Dean Jackson.
2942
2943         We currently cache a character -> Font mapping in a HashMap.
2944         However, keys in Hashmaps can't be 0. This patch simply skips
2945         the cache in this case.
2946
2947         No new tests, for now. I'm having trouble creating a test because
2948         the site that causes this bug generates their page using script,
2949         and the script is all minified, and difficult to understand. I
2950         will contact the owner of the site and ask for and unminified
2951         version of their sources. However, I don't want to that to block
2952         this tiny fix from going in.
2953
2954         * platform/graphics/Font.cpp:
2955         (WebCore::Font::systemFallbackFontForCharacter):
2956
2957 2015-03-26  Jer Noble  <jer.noble@apple.com>
2958
2959         [Mac][EME] Crash at com.apple.WebCore: WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys + 177
2960         https://bugs.webkit.org/show_bug.cgi?id=143080
2961
2962         Reviewed by Eric Carlson.
2963
2964         Null-check m_certificate before dereferencing.
2965
2966         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2967         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
2968
2969 2015-03-26  Chris Fleizach  <cfleizach@apple.com>
2970
2971         AX: [role="button"][aria-pressed] should be exposed as AXCheckbox:AXToggleButton, with role description of "toggle button"
2972         https://bugs.webkit.org/show_bug.cgi?id=115298
2973
2974         Reviewed by Mario Sanchez Prada.
2975
2976         A role=button + aria-pressed object should be exposed as AXCheckbox on Mac now. It should also convert the
2977         aria-pressed state into a 0, 1, 2 number value for the Mac.
2978
2979         Test: platform/mac/accessibility/aria-pressed-button-attributes.html
2980
2981         * accessibility/AccessibilityObject.cpp:
2982         (WebCore::AccessibilityObject::checkboxOrRadioValue):
2983         * accessibility/AccessibilityObject.h:
2984         (WebCore::AccessibilityObject::isToggleButton):
2985         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2986         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2987         (createAccessibilityRoleMap):
2988         (-[WebAccessibilityObjectWrapper subrole]):
2989         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2990
2991 2015-03-25  Dean Jackson  <dino@apple.com>
2992
2993         CSS blend modes do not parse when in the shadow tree
2994         https://bugs.webkit.org/show_bug.cgi?id=143067
2995         <rdar://problem/20302662>
2996
2997         Reviewed by Anders Carlson.
2998
2999         The media controls style sheets are injected as UA stylesheets
3000         when we come across a <video> or <audio> element. These stylesheets
3001         have a different parsing context than the document stylesheets -
3002         one that uses the default constructor, which initializes some
3003         features like cssCompositingEnabled to false without checking
3004         the runtime state.
3005
3006         The easy fix is to use the global state to initialize the context.
3007
3008         Unfortunately we can't test this since it only occurs in the shadow
3009         tree.
3010
3011         * css/CSSParser.cpp:
3012         (WebCore::CSSParserContext::CSSParserContext): Check the state
3013         of RuntimeEnabledFeatures to initialize CSS Regions and
3014         CSS Compositing (Blending).
3015
3016 2015-03-25  Chris Fleizach  <cfleizach@apple.com>
3017
3018         AX: table cells that use display:block render the table inaccessible to VoiceOver
3019         https://bugs.webkit.org/show_bug.cgi?id=143007
3020
3021         Reviewed by Mario Sanchez Prada.
3022
3023         When display:block is used on a table cell, it was being ignored because it was anonymous.
3024         This is still a valid scenario however if it's still inside of a valid table.
3025
3026         Test: accessibility/table-cell-display-block.html
3027
3028         * accessibility/AccessibilityTableCell.cpp:
3029         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
3030
3031 2015-03-25  Tim Horton  <timothy_horton@apple.com>
3032
3033         Add a preference to prevent "user-scalable=no" from having any effect
3034         https://bugs.webkit.org/show_bug.cgi?id=143032
3035
3036         Reviewed by Sam Weinig.
3037
3038         * page/ViewportConfiguration.cpp:
3039         (WebCore::ViewportConfiguration::ViewportConfiguration):
3040         (WebCore::ViewportConfiguration::allowsUserScaling):
3041         * page/ViewportConfiguration.h:
3042         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
3043         If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
3044
3045 2015-03-25  Dan Bernstein  <mitz@apple.com>
3046
3047         Another attempt to get the iOS EWS building again.
3048
3049         * WebCore.xcodeproj/project.pbxproj:
3050
3051 2015-03-25  Alex Christensen  <achristensen@webkit.org>
3052
3053         Add case-insensitive checks to DFA bytecode.
3054         https://bugs.webkit.org/show_bug.cgi?id=142977
3055
3056         Reviewed by Benjamin Poulain.
3057
3058         * contentextensions/DFABytecode.h:
3059         (WebCore::ContentExtensions::instructionSizeWithArguments):
3060         * contentextensions/DFABytecodeCompiler.cpp:
3061         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
3062         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
3063         Add case-insensitive bytecode.
3064         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
3065         Check to see if case-insensitive bytecodes can be used.
3066         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
3067         * contentextensions/DFABytecodeCompiler.h:
3068         (WebCore::ContentExtensions::DFABytecodeCompiler::Range::Range):
3069         Added Range structure to be able to count the ranges in a future patch deciding if we want to use jump tables.
3070         * contentextensions/DFABytecodeInterpreter.cpp:
3071         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3072         Interpret case-insensitive bytecodes.
3073
3074 2015-03-25  Sam Weinig  <sam@webkit.org>
3075
3076         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
3077
3078         * contentextensions/ContentExtensionCompiler.cpp:
3079         (WebCore::ContentExtensions::compileRuleList):
3080         * contentextensions/ContentExtensionCompiler.h:
3081         * contentextensions/ContentExtensionParser.cpp:
3082         (WebCore::ContentExtensions::getTypeFlags):
3083
3084 2015-03-25  Sam Weinig  <sam@webkit.org>
3085
3086         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
3087         https://bugs.webkit.org/show_bug.cgi?id=143059
3088
3089         Reviewed by Alex Christensen.
3090
3091         * WebCore.xcodeproj/project.pbxproj:
3092         Add ContentExtensionError.h/cpp.
3093
3094         * contentextensions/ContentExtensionError.cpp: Added.
3095         (WebCore::ContentExtensions::contentExtensionErrorCategory):
3096         * contentextensions/ContentExtensionError.h: Added.
3097         (WebCore::ContentExtensions::make_error_code):
3098         Add ContentExtensionError enum and std::error_code adaptor.
3099
3100         * contentextensions/ContentExtensionCompiler.h:
3101         Instead of returning CompiledContentExtensionData, use a client interface
3102         to pass data. Eventually, this should be turned into a direct streaming 
3103         interface so we can write directly to a file.
3104
3105         * contentextensions/ContentExtensionCompiler.cpp:
3106         (WebCore::ContentExtensions::compileRuleList):
3107         * contentextensions/ContentExtensionParser.cpp:
3108         (WebCore::ContentExtensions::getTypeFlags):
3109         (WebCore::ContentExtensions::loadTrigger):
3110         (WebCore::ContentExtensions::loadAction):
3111         (WebCore::ContentExtensions::loadRule):
3112         (WebCore::ContentExtensions::loadEncodedRules):
3113         (WebCore::ContentExtensions::parseRuleList):
3114         * contentextensions/ContentExtensionParser.h:
3115         Convert to return an error.
3116
3117 2015-03-25  Beth Dakin  <bdakin@apple.com>
3118
3119         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
3120         force preview
3121         https://bugs.webkit.org/show_bug.cgi?id=143057
3122         -and corresponding-
3123         rdar://problem/20251436
3124
3125         Reviewed by Tim Horton.
3126
3127         This patch adds a value for ActionUpdated to the ImmediateActionStage enum. Now if 
3128         m_immediateActionStage indicates that an immediate action has either begun or 
3129         completed then we can have the same behavior.
3130         * page/EventHandler.cpp:
3131         (WebCore::EventHandler::handleMouseReleaseEvent):
3132         * page/EventHandler.h:
3133
3134 2015-03-25  Dean Jackson  <dino@apple.com>
3135
3136         MediaControls: Use font with fixed number width
3137         https://bugs.webkit.org/show_bug.cgi?id=143018
3138         <rdar://problem/20245415>
3139
3140         Reviewed by Eric Carlson.
3141
3142         Add a new font-family, specific to Apple platforms,
3143         called -apple-system-font-monospaced-numbers. This is
3144         a special variant of the system font which uses monospaced
3145         forms for the number glyphs - allowing a time reading that
3146         doesn't bounce around as the time changes.
3147
3148         * Modules/mediacontrols/mediaControlsApple.css: Media controls should
3149         use the new font.
3150         (audio::-webkit-media-controls-time-remaining-display):
3151         * Modules/mediacontrols/mediaControlsiOS.css:
3152         (audio::-webkit-media-controls-time-remaining-display):
3153
3154         * platform/graphics/ios/FontCacheIOS.mm: Request a new CTFontRef with
3155         the appropriate attributes.
3156         (WebCore::createCTFontWithFamilyNameAndWeight):
3157         * platform/graphics/mac/FontCacheMac.mm: Ditto, but NSFont.
3158         (WebCore::fontWithFamily):
3159         * platform/spi/cocoa/CoreTextSPI.h: Expose the constants for
3160         the new form so that the public SDK can build.
3161
3162 2015-03-25  Alex Christensen  <achristensen@webkit.org>
3163
3164         [Content Extensions] Add multi-DFA compiling and interpreting.
3165         https://bugs.webkit.org/show_bug.cgi?id=143010
3166
3167         Reviewed by Benjamin Poulain.
3168
3169         * contentextensions/ContentExtensionCompiler.cpp:
3170         (WebCore::ContentExtensions::compileRuleList):
3171         Compile multiple NFAs to DFAs.
3172         * contentextensions/ContentExtensionsBackend.cpp:
3173         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3174         Fixed a bug when there are no non-universal actions.
3175         We still need to report that no ignore-previous-rules was hit to apply the
3176         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
3177         and skipped in DFABytecodeInterpreter::interpret.
3178         * contentextensions/DFABytecodeCompiler.cpp:
3179         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
3180         Add a header for each DFA.
3181         * contentextensions/DFABytecodeInterpreter.cpp:
3182         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
3183         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3184         Interpret as many DFAs as there are in the bytecode.
3185
3186 2015-03-25  Per Arne Vollan  <peavo@outlook.com>
3187
3188         [Win] Illegal character in project file.
3189         https://bugs.webkit.org/show_bug.cgi?id=143051
3190
3191         Reviewed by Brent Fulgham.
3192
3193         There is an illegal character in the WebCore project filter.
3194         WebCore files are shown unfiltered.
3195
3196         * WebCore.vcxproj/WebCore.vcxproj.filters:
3197
3198 2015-03-25  David Hyatt  <hyatt@apple.com>
3199
3200         Add a pref to enable the new block-inside-inline model
3201         https://bugs.webkit.org/show_bug.cgi?id=143050
3202
3203         Reviewed by Sam Weinig.
3204
3205         * page/Settings.in:
3206
3207 2015-03-25  Dan Bernstein  <mitz@apple.com>
3208
3209         iOS Simulator build fix.
3210
3211         * platform/spi/cocoa/IOSurfaceSPI.h:
3212
3213 2015-03-25  Commit Queue  <commit-queue@webkit.org>
3214
3215         Unreviewed, rolling out r181932.
3216         https://bugs.webkit.org/show_bug.cgi?id=143041
3217
3218         The test fails most of the time on bots (Requested by ap on
3219         #webkit).
3220
3221         Reverted changeset:
3222
3223         "[Content Extensions] Add multi-DFA compiling and
3224         interpreting."
3225         https://bugs.webkit.org/show_bug.cgi?id=143010
3226         http://trac.webkit.org/changeset/181932
3227
3228 2015-03-24  Dean Jackson  <dino@apple.com>
3229
3230         Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
3231         https://bugs.webkit.org/show_bug.cgi?id=143039
3232
3233         Unreviewed build fix for newer versions of OS X.
3234
3235         * rendering/RenderThemeMac.mm: Define a null language parameter. This
3236         seemed better than turning the clang warning off for just that
3237         function.
3238         (WebCore::AttachmentLayout::layOutTitle):
3239         (WebCore::AttachmentLayout::layOutSubtitle):
3240
3241 2015-03-24  Dan Bernstein  <mitz@apple.com>
3242
3243         Another attempt to fix the build.
3244
3245         * WebCore.xcodeproj/project.pbxproj:
3246         * platform/spi/cocoa/QuartzCoreSPI.h:
3247
3248 2015-03-24  Alex Christensen  <achristensen@webkit.org>
3249
3250         [Content Extensions] Add multi-DFA compiling and interpreting.
3251         https://bugs.webkit.org/show_bug.cgi?id=143010
3252
3253         Reviewed by Benjamin Poulain.
3254
3255         * contentextensions/ContentExtensionCompiler.cpp:
3256         (WebCore::ContentExtensions::compileRuleList):
3257         Compile multiple NFAs to DFAs.
3258         * contentextensions/ContentExtensionsBackend.cpp:
3259         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3260         Fixed a bug when there are no non-universal actions.
3261         We still need to report that no ignore-previous-rules was hit to apply the
3262         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
3263         and skipped in DFABytecodeInterpreter::interpret.
3264         * contentextensions/DFABytecodeCompiler.cpp:
3265         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
3266         Add a header for each DFA.
3267         * contentextensions/DFABytecodeInterpreter.cpp:
3268         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
3269         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3270         Interpret as many DFAs as there are in the bytecode.
3271
3272 2015-03-24  Dan Bernstein  <mitz@apple.com>
3273
3274         Tried to fix the EWS build.
3275
3276         * platform/spi/cocoa/QuartzCoreSPI.h:
3277
3278 2015-03-24  Commit Queue  <commit-queue@webkit.org>
3279
3280         Unreviewed, rolling out r181898 and r181909.
3281         https://bugs.webkit.org/show_bug.cgi?id=143034
3282
3283         Broke fast/regions/auto-size/autoheight-two-pass-layout-
3284         complex-002.html (Requested by ap on #webkit).
3285
3286         Reverted changesets:
3287
3288         "Improve the offsetWidth/Height layout optimization"
3289         https://bugs.webkit.org/show_bug.cgi?id=143008
3290         http://trac.webkit.org/changeset/181898
3291
3292         "Disable layout dimensions optimization for RenderRegions"
3293         https://bugs.webkit.org/show_bug.cgi?id=143017
3294         http://trac.webkit.org/changeset/181909
3295
3296 2015-03-24  Zhuo Li  <zachli@apple.com>
3297
3298         Scripts running in isolated world should not subject to a page's CSP about 'eval'.
3299         https://bugs.webkit.org/show_bug.cgi?id=141316.
3300
3301         Reviewed by Geoffrey Garen.
3302
3303         * bindings/js/ScriptController.cpp:
3304         (WebCore::ScriptController::initScript):
3305         We should not impose the main world Content Security Policy onto the isolated world.
3306
3307 2015-03-24  Chris Dumez  <cdumez@apple.com>
3308
3309         [Mac] Use .cpp file extension instead of .mm for SharedTimerCF and PowerObserverMac
3310         https://bugs.webkit.org/show_bug.cgi?id=143026
3311
3312         Reviewed by Andy Estes.
3313
3314         Use .cpp file extension instead of .mm for SharedTimerCF and
3315         PowerObserverMac.
3316
3317         * WebCore.xcodeproj/project.pbxproj:
3318         * platform/cf/SharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.mm.
3319         (WebCore::timerFired):
3320         Use WTF::AutodrainedPool instead of @autoreleasepool {}.
3321
3322         * platform/mac/PowerObserverMac.cpp: Renamed from Source/WebCore/platform/mac/PowerObserverMac.mm.
3323
3324 2015-03-24  Yusuke Suzuki  <utatane.tea@gmail.com>
3325
3326         REGRESSION (r181458): Heap use-after-free in JSSetIterator destructor
3327         https://bugs.webkit.org/show_bug.cgi?id=142696
3328
3329         Reviewed and tweaked by Geoffrey Garen.
3330
3331         Use JSSetIterator/JSMapIterator to iterate over JSSet and JSMap.
3332
3333         * ForwardingHeaders/runtime/JSMapIterator.h: Added.
3334         * ForwardingHeaders/runtime/JSSetIterator.h: Added.
3335         * bindings/js/SerializedScriptValue.cpp:
3336         (WebCore::CloneSerializer::serialize):
3337
3338 2015-03-24  Dan Bernstein  <mitz@apple.com>
3339
3340         Tried to fix the iOS Simulator build.
3341
3342         * platform/spi/cocoa/QuartzCoreSPI.h:
3343
3344 2015-03-24  Benjamin Poulain  <bpoulain@apple.com>
3345
3346         Make URL filter patterns matching consistent and add a simple canonicalization step
3347         https://bugs.webkit.org/show_bug.cgi?id=142998
3348
3349         Reviewed by Alex Christensen.
3350
3351         This patch makes two changes to the url filter input:
3352         -Make the matching "Search" by default, the pattern can now appear anywhere
3353          in the URL by default.
3354         -Make the input a little less fragile: do not explode on valid input
3355          that is not formatted in a certain way.
3356
3357         To implement the search behavior, I simply add an implict ".*" in front of the patterns
3358         when that make sense.
3359
3360         To make the input more solid, we do some little modification on the input:
3361         -Remove duplicated ".*".
3362         -Remove matching suffixes that do not bring new information.
3363         -Unify all the ".*" in the same format.
3364
3365         Why do that here? That should be done through a graph analysis on the machine.
3366
3367         The reason is this is incredibly cheap compared to the graph analysis. Any state
3368         removed upfront will save the handling of several hundred nodes in the deterministic
3369         graph.
3370